@thatopen/components 2.0.0-alpha.1 → 2.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -68,7 +68,7 @@
68
68
 
69
69
  }
70
70
 
71
- `,extensions:{derivatives:!0}});this._grid=new L.Mesh(a,l),this._grid.frustumCulled=!1,t.scene.three.add(this._grid),this.setupEvents(!0)}get visible(){return this._grid.visible}set visible(s){s?this.world.scene.three.add(this._grid):this._grid.removeFromParent()}get material(){return this._grid.material}get fade(){return this._fade===3}set fade(s){this._fade=s?3:0,this.material.uniforms.uFade.value=this._fade}[Symbol.dispose](){throw new Error("Method not implemented.")}get(){return this._grid}dispose(){this.setupEvents(!1),this.components.get(_t).destroy(this._grid),this.onDisposed.trigger(),this.onDisposed.reset(),this.world=null,this.components=null}setupEvents(s){if(!(this.world.camera instanceof De))return;const t=this.world.camera.controls;s?t.addEventListener("update",this.updateZoom):t.removeEventListener("update",this.updateZoom)}}class fn extends st{constructor(){super(...arguments);f(this,"list",new Map);f(this,"onDisposed",new U);f(this,"config",{color:new L.Color(12303291),size1:1,size2:10,distance:500});f(this,"enabled",!0)}create(t){if(this.list.has(t.uuid))throw new Error("This world already has a grid!");const e=new er(this.components,t,this.config);this.list.set(t.uuid,e),t.onDisposed.add(()=>{this.delete(t)})}delete(t){const e=this.list.get(t.uuid);e&&e.dispose(),this.list.delete(t.uuid)}dispose(){for(const[t,e]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger()}}f(fn,"uuid","d1e814d5-b81c-4452-87a2-f039375e0489");const Vt=new C.Raycaster,it=new C.Vector3,yt=new C.Vector3,Q=new C.Quaternion,Qi={X:new C.Vector3(1,0,0),Y:new C.Vector3(0,1,0),Z:new C.Vector3(0,0,1)},Ws={type:"change"},qi={type:"mouseDown"},ji={type:"mouseUp",mode:null},Ki={type:"objectChange"};class sr extends C.Object3D{constructor(s,t){super(),t===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),t=document),this.isTransformControls=!0,this.visible=!1,this.domElement=t,this.domElement.style.touchAction="none";const e=new cr;this._gizmo=e,this.add(e);const i=new lr;this._plane=i,this.add(i);const o=this;function n(m,O){let u=O;Object.defineProperty(o,m,{get:function(){return u!==void 0?u:O},set:function(R){u!==R&&(u=R,i[m]=R,e[m]=R,o.dispatchEvent({type:m+"-changed",value:R}),o.dispatchEvent(Ws))}}),o[m]=O,i[m]=O,e[m]=O}n("camera",s),n("object",void 0),n("enabled",!0),n("axis",null),n("mode","translate"),n("translationSnap",null),n("rotationSnap",null),n("scaleSnap",null),n("space","world"),n("size",1),n("dragging",!1),n("showX",!0),n("showY",!0),n("showZ",!0);const r=new C.Vector3,a=new C.Vector3,l=new C.Quaternion,E=new C.Quaternion,I=new C.Vector3,h=new C.Quaternion,d=new C.Vector3,p=new C.Vector3,F=new C.Vector3,A=0,T=new C.Vector3;n("worldPosition",r),n("worldPositionStart",a),n("worldQuaternion",l),n("worldQuaternionStart",E),n("cameraPosition",I),n("cameraQuaternion",h),n("pointStart",d),n("pointEnd",p),n("rotationAxis",F),n("rotationAngle",A),n("eye",T),this._offset=new C.Vector3,this._startNorm=new C.Vector3,this._endNorm=new C.Vector3,this._cameraScale=new C.Vector3,this._parentPosition=new C.Vector3,this._parentQuaternion=new C.Quaternion,this._parentQuaternionInv=new C.Quaternion,this._parentScale=new C.Vector3,this._worldScaleStart=new C.Vector3,this._worldQuaternionInv=new C.Quaternion,this._worldScale=new C.Vector3,this._positionStart=new C.Vector3,this._quaternionStart=new C.Quaternion,this._scaleStart=new C.Vector3,this._getPointer=ir.bind(this),this._onPointerDown=or.bind(this),this._onPointerHover=nr.bind(this),this._onPointerMove=rr.bind(this),this._onPointerUp=ar.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(this)}pointerHover(s){if(this.object===void 0||this.dragging===!0)return;Vt.setFromCamera(s,this.camera);const t=Xs(this._gizmo.picker[this.mode],Vt);t?this.axis=t.object.name:this.axis=null}pointerDown(s){if(!(this.object===void 0||this.dragging===!0||s.button!==0)&&this.axis!==null){Vt.setFromCamera(s,this.camera);const t=Xs(this._plane,Vt,!0);t&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(t.point).sub(this.worldPositionStart)),this.dragging=!0,qi.mode=this.mode,this.dispatchEvent(qi)}}pointerMove(s){const t=this.axis,e=this.mode,i=this.object;let o=this.space;if(e==="scale"?o="local":(t==="E"||t==="XYZE"||t==="XYZ")&&(o="world"),i===void 0||t===null||this.dragging===!1||s.button!==-1)return;Vt.setFromCamera(s,this.camera);const n=Xs(this._plane,Vt,!0);if(n){if(this.pointEnd.copy(n.point).sub(this.worldPositionStart),e==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),o==="local"&&t!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),t.indexOf("X")===-1&&(this._offset.x=0),t.indexOf("Y")===-1&&(this._offset.y=0),t.indexOf("Z")===-1&&(this._offset.z=0),o==="local"&&t!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),i.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(o==="local"&&(i.position.applyQuaternion(Q.copy(this._quaternionStart).invert()),t.search("X")!==-1&&(i.position.x=Math.round(i.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(i.position.y=Math.round(i.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(i.position.z=Math.round(i.position.z/this.translationSnap)*this.translationSnap),i.position.applyQuaternion(this._quaternionStart)),o==="world"&&(i.parent&&i.position.add(it.setFromMatrixPosition(i.parent.matrixWorld)),t.search("X")!==-1&&(i.position.x=Math.round(i.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(i.position.y=Math.round(i.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(i.position.z=Math.round(i.position.z/this.translationSnap)*this.translationSnap),i.parent&&i.position.sub(it.setFromMatrixPosition(i.parent.matrixWorld))));else if(e==="scale"){if(t.search("XYZ")!==-1){let r=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(r*=-1),yt.set(r,r,r)}else it.copy(this.pointStart),yt.copy(this.pointEnd),it.applyQuaternion(this._worldQuaternionInv),yt.applyQuaternion(this._worldQuaternionInv),yt.divide(it),t.search("X")===-1&&(yt.x=1),t.search("Y")===-1&&(yt.y=1),t.search("Z")===-1&&(yt.z=1);i.scale.copy(this._scaleStart).multiply(yt),this.scaleSnap&&(t.search("X")!==-1&&(i.scale.x=Math.round(i.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Y")!==-1&&(i.scale.y=Math.round(i.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Z")!==-1&&(i.scale.z=Math.round(i.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(e==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const r=20/this.worldPosition.distanceTo(it.setFromMatrixPosition(this.camera.matrixWorld));let a=!1;t==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(it.copy(this.rotationAxis).cross(this.eye))*r):(t==="X"||t==="Y"||t==="Z")&&(this.rotationAxis.copy(Qi[t]),it.copy(Qi[t]),o==="local"&&it.applyQuaternion(this.worldQuaternion),it.cross(this.eye),it.length()===0?a=!0:this.rotationAngle=this._offset.dot(it.normalize())*r),(t==="E"||a)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),o==="local"&&t!=="E"&&t!=="XYZE"?(i.quaternion.copy(this._quaternionStart),i.quaternion.multiply(Q.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),i.quaternion.copy(Q.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),i.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(Ws),this.dispatchEvent(Ki)}}pointerUp(s){s.button===0&&(this.dragging&&this.axis!==null&&(ji.mode=this.mode,this.dispatchEvent(ji)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(s){s.geometry&&s.geometry.dispose(),s.material&&s.material.dispose()})}attach(s){return this.object=s,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(Ws),this.dispatchEvent(Ki),this.pointStart.copy(this.pointEnd))}getRaycaster(){return Vt}getMode(){return this.mode}setMode(s){this.mode=s}setTranslationSnap(s){this.translationSnap=s}setRotationSnap(s){this.rotationSnap=s}setScaleSnap(s){this.scaleSnap=s}setSize(s){this.size=s}setSpace(s){this.space=s}}function ir(c){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:c.button};{const s=this.domElement.getBoundingClientRect();return{x:(c.clientX-s.left)/s.width*2-1,y:-(c.clientY-s.top)/s.height*2+1,button:c.button}}}function nr(c){if(this.enabled)switch(c.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(c));break}}function or(c){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(c.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(c)),this.pointerDown(this._getPointer(c)))}function rr(c){this.enabled&&this.pointerMove(this._getPointer(c))}function ar(c){this.enabled&&(this.domElement.releasePointerCapture(c.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(c)))}function Xs(c,s,t){const e=s.intersectObject(c,!0);for(let i=0;i<e.length;i++)if(e[i].object.visible||t)return e[i];return!1}const ss=new C.Euler,k=new C.Vector3(0,1,0),$i=new C.Vector3(0,0,0),Ji=new C.Matrix4,is=new C.Quaternion,as=new C.Quaternion,At=new C.Vector3,tn=new C.Matrix4,Ae=new C.Vector3(1,0,0),Gt=new C.Vector3(0,1,0),Oe=new C.Vector3(0,0,1),ns=new C.Vector3,Re=new C.Vector3,Fe=new C.Vector3;class cr extends C.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const s=new C.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),t=new C.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=s.clone();e.opacity=.15;const i=t.clone();i.opacity=.5;const o=s.clone();o.color.setHex(16711680);const n=s.clone();n.color.setHex(65280);const r=s.clone();r.color.setHex(255);const a=s.clone();a.color.setHex(16711680),a.opacity=.5;const l=s.clone();l.color.setHex(65280),l.opacity=.5;const E=s.clone();E.color.setHex(255),E.opacity=.5;const I=s.clone();I.opacity=.25;const h=s.clone();h.color.setHex(16776960),h.opacity=.25,s.clone().color.setHex(16776960);const p=s.clone();p.color.setHex(7895160);const F=new C.CylinderGeometry(0,.04,.1,12);F.translate(0,.05,0);const A=new C.BoxGeometry(.08,.08,.08);A.translate(0,.04,0);const T=new C.BufferGeometry;T.setAttribute("position",new C.Float32BufferAttribute([0,0,0,1,0,0],3));const m=new C.CylinderGeometry(.0075,.0075,.5,3);m.translate(0,.25,0);function O(v,H){const q=new C.TorusGeometry(v,.0075,3,64,H*Math.PI*2);return q.rotateY(Math.PI/2),q.rotateX(Math.PI/2),q}function u(){const v=new C.BufferGeometry;return v.setAttribute("position",new C.Float32BufferAttribute([0,0,0,1,1,1],3)),v}const R={X:[[new C.Mesh(F,o),[.5,0,0],[0,0,-Math.PI/2]],[new C.Mesh(F,o),[-.5,0,0],[0,0,Math.PI/2]],[new C.Mesh(m,o),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new C.Mesh(F,n),[0,.5,0]],[new C.Mesh(F,n),[0,-.5,0],[Math.PI,0,0]],[new C.Mesh(m,n)]],Z:[[new C.Mesh(F,r),[0,0,.5],[Math.PI/2,0,0]],[new C.Mesh(F,r),[0,0,-.5],[-Math.PI/2,0,0]],[new C.Mesh(m,r),null,[Math.PI/2,0,0]]],XYZ:[[new C.Mesh(new C.OctahedronGeometry(.1,0),I.clone()),[0,0,0]]],XY:[[new C.Mesh(new C.BoxGeometry(.15,.15,.01),E.clone()),[.15,.15,0]]],YZ:[[new C.Mesh(new C.BoxGeometry(.15,.15,.01),a.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new C.Mesh(new C.BoxGeometry(.15,.15,.01),l.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},S={X:[[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new C.Mesh(new C.OctahedronGeometry(.2,0),e)]],XY:[[new C.Mesh(new C.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new C.Mesh(new C.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new C.Mesh(new C.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]]},g={START:[[new C.Mesh(new C.OctahedronGeometry(.01,2),i),null,null,null,"helper"]],END:[[new C.Mesh(new C.OctahedronGeometry(.01,2),i),null,null,null,"helper"]],DELTA:[[new C.Line(u(),i),null,null,null,"helper"]],X:[[new C.Line(T,i.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new C.Line(T,i.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new C.Line(T,i.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},_={XYZE:[[new C.Mesh(O(.5,1),p),null,[0,Math.PI/2,0]]],X:[[new C.Mesh(O(.5,.5),o)]],Y:[[new C.Mesh(O(.5,.5),n),null,[0,0,-Math.PI/2]]],Z:[[new C.Mesh(O(.5,.5),r),null,[0,Math.PI/2,0]]],E:[[new C.Mesh(O(.75,1),h),null,[0,Math.PI/2,0]]]},N={AXIS:[[new C.Line(T,i.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},P={XYZE:[[new C.Mesh(new C.SphereGeometry(.25,10,8),e)]],X:[[new C.Mesh(new C.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new C.Mesh(new C.TorusGeometry(.5,.1,4,24),e),[0,0,0],[Math.PI/2,0,0]]],Z:[[new C.Mesh(new C.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,0,-Math.PI/2]]],E:[[new C.Mesh(new C.TorusGeometry(.75,.1,2,24),e)]]},w={X:[[new C.Mesh(A,o),[.5,0,0],[0,0,-Math.PI/2]],[new C.Mesh(m,o),[0,0,0],[0,0,-Math.PI/2]],[new C.Mesh(A,o),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new C.Mesh(A,n),[0,.5,0]],[new C.Mesh(m,n)],[new C.Mesh(A,n),[0,-.5,0],[0,0,Math.PI]]],Z:[[new C.Mesh(A,r),[0,0,.5],[Math.PI/2,0,0]],[new C.Mesh(m,r),[0,0,0],[Math.PI/2,0,0]],[new C.Mesh(A,r),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new C.Mesh(new C.BoxGeometry(.15,.15,.01),E),[.15,.15,0]]],YZ:[[new C.Mesh(new C.BoxGeometry(.15,.15,.01),a),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new C.Mesh(new C.BoxGeometry(.15,.15,.01),l),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new C.Mesh(new C.BoxGeometry(.1,.1,.1),I.clone())]]},M={X:[[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new C.Mesh(new C.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new C.Mesh(new C.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new C.Mesh(new C.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new C.Mesh(new C.BoxGeometry(.2,.2,.2),e),[0,0,0]]]},D={X:[[new C.Line(T,i.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new C.Line(T,i.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new C.Line(T,i.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function x(v){const H=new C.Object3D;for(const q in v)for(let tt=v[q].length;tt--;){const Z=v[q][tt][0].clone(),Ut=v[q][tt][1],xt=v[q][tt][2],bt=v[q][tt][3],Ue=v[q][tt][4];Z.name=q,Z.tag=Ue,Ut&&Z.position.set(Ut[0],Ut[1],Ut[2]),xt&&Z.rotation.set(xt[0],xt[1],xt[2]),bt&&Z.scale.set(bt[0],bt[1],bt[2]),Z.updateMatrix();const ae=Z.geometry.clone();ae.applyMatrix4(Z.matrix),Z.geometry=ae,Z.renderOrder=1/0,Z.position.set(0,0,0),Z.rotation.set(0,0,0),Z.scale.set(1,1,1),H.add(Z)}return H}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=x(R)),this.add(this.gizmo.rotate=x(_)),this.add(this.gizmo.scale=x(w)),this.add(this.picker.translate=x(S)),this.add(this.picker.rotate=x(P)),this.add(this.picker.scale=x(M)),this.add(this.helper.translate=x(g)),this.add(this.helper.rotate=x(N)),this.add(this.helper.scale=x(D)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(s){const e=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:as;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let i=[];i=i.concat(this.picker[this.mode].children),i=i.concat(this.gizmo[this.mode].children),i=i.concat(this.helper[this.mode].children);for(let o=0;o<i.length;o++){const n=i[o];n.visible=!0,n.rotation.set(0,0,0),n.position.copy(this.worldPosition);let r;if(this.camera.isOrthographicCamera?r=(this.camera.top-this.camera.bottom)/this.camera.zoom:r=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),n.scale.set(1,1,1).multiplyScalar(r*this.size/4),n.tag==="helper"){n.visible=!1,n.name==="AXIS"?(n.visible=!!this.axis,this.axis==="X"&&(Q.setFromEuler(ss.set(0,0,0)),n.quaternion.copy(e).multiply(Q),Math.abs(k.copy(Ae).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Y"&&(Q.setFromEuler(ss.set(0,0,Math.PI/2)),n.quaternion.copy(e).multiply(Q),Math.abs(k.copy(Gt).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Z"&&(Q.setFromEuler(ss.set(0,Math.PI/2,0)),n.quaternion.copy(e).multiply(Q),Math.abs(k.copy(Oe).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="XYZE"&&(Q.setFromEuler(ss.set(0,Math.PI/2,0)),k.copy(this.rotationAxis),n.quaternion.setFromRotationMatrix(Ji.lookAt($i,k,Gt)),n.quaternion.multiply(Q),n.visible=this.dragging),this.axis==="E"&&(n.visible=!1)):n.name==="START"?(n.position.copy(this.worldPositionStart),n.visible=this.dragging):n.name==="END"?(n.position.copy(this.worldPosition),n.visible=this.dragging):n.name==="DELTA"?(n.position.copy(this.worldPositionStart),n.quaternion.copy(this.worldQuaternionStart),it.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),it.applyQuaternion(this.worldQuaternionStart.clone().invert()),n.scale.copy(it),n.visible=this.dragging):(n.quaternion.copy(e),this.dragging?n.position.copy(this.worldPositionStart):n.position.copy(this.worldPosition),this.axis&&(n.visible=this.axis.search(n.name)!==-1));continue}n.quaternion.copy(e),this.mode==="translate"||this.mode==="scale"?(n.name==="X"&&Math.abs(k.copy(Ae).applyQuaternion(e).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Y"&&Math.abs(k.copy(Gt).applyQuaternion(e).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Z"&&Math.abs(k.copy(Oe).applyQuaternion(e).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XY"&&Math.abs(k.copy(Oe).applyQuaternion(e).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="YZ"&&Math.abs(k.copy(Ae).applyQuaternion(e).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XZ"&&Math.abs(k.copy(Gt).applyQuaternion(e).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1)):this.mode==="rotate"&&(is.copy(e),k.copy(this.eye).applyQuaternion(Q.copy(e).invert()),n.name.search("E")!==-1&&n.quaternion.setFromRotationMatrix(Ji.lookAt(this.eye,$i,Gt)),n.name==="X"&&(Q.setFromAxisAngle(Ae,Math.atan2(-k.y,k.z)),Q.multiplyQuaternions(is,Q),n.quaternion.copy(Q)),n.name==="Y"&&(Q.setFromAxisAngle(Gt,Math.atan2(k.x,k.z)),Q.multiplyQuaternions(is,Q),n.quaternion.copy(Q)),n.name==="Z"&&(Q.setFromAxisAngle(Oe,Math.atan2(k.y,k.x)),Q.multiplyQuaternions(is,Q),n.quaternion.copy(Q))),n.visible=n.visible&&(n.name.indexOf("X")===-1||this.showX),n.visible=n.visible&&(n.name.indexOf("Y")===-1||this.showY),n.visible=n.visible&&(n.name.indexOf("Z")===-1||this.showZ),n.visible=n.visible&&(n.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),n.material._color=n.material._color||n.material.color.clone(),n.material._opacity=n.material._opacity||n.material.opacity,n.material.color.copy(n.material._color),n.material.opacity=n.material._opacity,this.enabled&&this.axis&&(n.name===this.axis||this.axis.split("").some(function(a){return n.name===a}))&&(n.material.color.setHex(16776960),n.material.opacity=1)}super.updateMatrixWorld(s)}}class lr extends C.Mesh{constructor(){super(new C.PlaneGeometry(1e5,1e5,2,2),new C.MeshBasicMaterial({visible:!1,wireframe:!0,side:C.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(s){let t=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(t="local"),ns.copy(Ae).applyQuaternion(t==="local"?this.worldQuaternion:as),Re.copy(Gt).applyQuaternion(t==="local"?this.worldQuaternion:as),Fe.copy(Oe).applyQuaternion(t==="local"?this.worldQuaternion:as),k.copy(Re),this.mode){case"translate":case"scale":switch(this.axis){case"X":k.copy(this.eye).cross(ns),At.copy(ns).cross(k);break;case"Y":k.copy(this.eye).cross(Re),At.copy(Re).cross(k);break;case"Z":k.copy(this.eye).cross(Fe),At.copy(Fe).cross(k);break;case"XY":At.copy(Fe);break;case"YZ":At.copy(ns);break;case"XZ":k.copy(Fe),At.copy(Re);break;case"XYZ":case"E":At.set(0,0,0);break}break;case"rotate":default:At.set(0,0,0)}At.length()===0?this.quaternion.copy(this.cameraQuaternion):(tn.lookAt(it.set(0,0,0),At,k),this.quaternion.setFromRotationMatrix(tn)),super.updateMatrixWorld(s)}}class As{constructor(s,t,e,i,o,n=5,r=!0){f(this,"onDraggingStarted",new U);f(this,"onDraggingEnded",new U);f(this,"onDisposed",new U);f(this,"normal");f(this,"origin");f(this,"three",new L.Plane);f(this,"_helper");f(this,"_visible",!0);f(this,"_enabled",!0);f(this,"components");f(this,"world");f(this,"_controlsActive",!1);f(this,"_arrowBoundBox",new L.Mesh);f(this,"_planeMesh");f(this,"_controls");f(this,"_hiddenMaterial",new L.MeshBasicMaterial({visible:!1}));f(this,"update",async()=>{this._enabled&&this.three.setFromNormalAndCoplanarPoint(this.normal,this._helper.position)});f(this,"changeDrag",s=>{this._visible=!s.value,this.preventCameraMovement(),this.notifyDraggingChanged(s)});if(this.components=s,this.world=t,!t.renderer)throw new Error("The given world must have a renderer!");this.normal=i,this.origin=e,t.renderer.setPlane(!0,this.three),this._planeMesh=As.newPlaneMesh(n,o),this._helper=this.newHelper(),this._controls=this.newTransformControls(),this.three.setFromNormalAndCoplanarPoint(i,e),r&&this.toggleControls(!0)}get enabled(){return this._enabled}set enabled(s){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");this._enabled=s,this.world.renderer.setPlane(s,this.three)}get visible(){return this._visible}set visible(s){this._visible=s,this._controls.visible=s,this._helper.visible=s,this.toggleControls(s)}get meshes(){return[this._planeMesh,this._arrowBoundBox]}get planeMaterial(){return this._planeMesh.material}set planeMaterial(s){this._planeMesh.material=s}get size(){return this._planeMesh.scale.x}set size(s){this._planeMesh.scale.set(s,s,s)}get helper(){return this._helper}async setFromNormalAndCoplanarPoint(s,t){this.reset(),this.normal.equals(s)||(this.normal.copy(s),this._helper.lookAt(s)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix(),await this.update()}dispose(){this._enabled=!1,this.onDraggingStarted.reset(),this.onDraggingEnded.reset(),this._helper.removeFromParent(),this.world.renderer&&this.world.renderer.setPlane(!1,this.three),this._arrowBoundBox.removeFromParent(),this._arrowBoundBox.geometry.dispose(),this._planeMesh.geometry.dispose(),this._controls.removeFromParent(),this._controls.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}reset(){const s=new L.Vector3(1,0,0),t=new L.Vector3;this.normal.equals(s)||(this.normal.copy(s),this._helper.lookAt(s)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix()}toggleControls(s){if(s){if(this._controlsActive)return;this._controls.addEventListener("change",this.update),this._controls.addEventListener("dragging-changed",this.changeDrag)}else this._controls.removeEventListener("change",this.update),this._controls.removeEventListener("dragging-changed",this.changeDrag);this._controlsActive=s}newTransformControls(){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");const s=this.world.camera.three,t=this.world.renderer.three.domElement,e=new sr(s,t);return this.initializeControls(e),this.world.scene.three.add(e),e}initializeControls(s){s.attach(this._helper),s.showX=!1,s.showY=!1,s.setSpace("local"),this.createArrowBoundingBox(),s.children[0].children[0].add(this._arrowBoundBox)}createArrowBoundingBox(){this._arrowBoundBox.geometry=new L.CylinderGeometry(.18,.18,1.2),this._arrowBoundBox.material=this._hiddenMaterial,this._arrowBoundBox.rotateX(Math.PI/2),this._arrowBoundBox.updateMatrix(),this._arrowBoundBox.geometry.applyMatrix4(this._arrowBoundBox.matrix)}notifyDraggingChanged(s){s.value?this.onDraggingStarted.trigger():this.onDraggingEnded.trigger()}preventCameraMovement(){this.world.camera.enabled=this._visible}newHelper(){const s=new L.Object3D;return s.lookAt(this.normal),s.position.copy(this.origin),this._planeMesh.position.z+=.01,s.add(this._planeMesh),this.world.scene.three.add(s),s}static newPlaneMesh(s,t){const e=new L.PlaneGeometry(1),i=new L.Mesh(e,t);return i.scale.set(s,s,s),i}}const _e=class _e extends st{constructor(t){super(t);f(this,"onAfterCreate",new U);f(this,"onAfterDelete",new U);f(this,"onBeforeDrag",new U);f(this,"onAfterDrag",new U);f(this,"onBeforeCreate",new U);f(this,"onBeforeCancel",new U);f(this,"onAfterCancel",new U);f(this,"onBeforeDelete",new U);f(this,"onDisposed",new U);f(this,"orthogonalY",!1);f(this,"toleranceOrthogonalY",.7);f(this,"list",[]);f(this,"PlaneType");f(this,"_material",new L.MeshBasicMaterial({color:16776960,side:L.DoubleSide,transparent:!0,opacity:.2}));f(this,"_size",5);f(this,"_enabled",!1);f(this,"_visible",!1);f(this,"_onStartDragging",()=>{this.onBeforeDrag.trigger()});f(this,"_onEndDragging",()=>{this.onAfterDrag.trigger()});this.components.add(_e.uuid,this),this.PlaneType=As}get enabled(){return this._enabled}set enabled(t){this._enabled=t;for(const e of this.list)e.enabled=t;this.updateMaterialsAndPlanes()}get visible(){return this._visible}set visible(t){this._visible=t;for(const e of this.list)e.visible=t}get material(){return this._material}set material(t){this._material=t;for(const e of this.list)e.planeMaterial=t}get size(){return this._size}set size(t){this._size=t;for(const e of this.list)e.size=t}endCreation(){}cancelCreation(){}dispose(){this._enabled=!1;for(const t of this.list)t.dispose();this.list.length=0,this._material.dispose(),this.onBeforeCreate.reset(),this.onBeforeCancel.reset(),this.onBeforeDelete.reset(),this.onBeforeDrag.reset(),this.onAfterCreate.reset(),this.onAfterCancel.reset(),this.onAfterDelete.reset(),this.onAfterDrag.reset(),this.onDisposed.trigger(_e.uuid),this.onDisposed.reset()}create(t){if(!this.enabled)return;const o=this.components.get(Me).get(t).castRay();o&&this.createPlaneFromIntersection(t,o)}createFromNormalAndCoplanarPoint(t,e,i){const o=this.newPlane(t,i,e);return this.updateMaterialsAndPlanes(),o}delete(t,e){this.enabled&&(e||(e=this.pickPlane(t)),e&&this.deletePlane(e))}deleteAll(){for(;this.list.length>0;){const t=this.list[0];this.delete(t.world,t)}}deletePlane(t){const e=this.list.indexOf(t);if(e!==-1){if(this.list.splice(e,1),!t.world.renderer)throw new Error("Renderer not found for this plane's world!");t.world.renderer.setPlane(!1,t.three),t.dispose(),this.updateMaterialsAndPlanes(),this.onAfterDelete.trigger(t)}}pickPlane(t){const i=this.components.get(Me).get(t),o=this.getAllPlaneMeshes(),n=i.castRay(o);if(n){const r=n.object;return this.list.find(a=>a.meshes.includes(r))}}getAllPlaneMeshes(){const t=[];for(const e of this.list)t.push(...e.meshes);return t}createPlaneFromIntersection(t,e){var a;if(!t.renderer)throw new Error("The given world must have a renderer!");const i=e.point.distanceTo(new L.Vector3(0,0,0)),o=(a=e.face)==null?void 0:a.normal;if(!i||!o)return;const n=this.getWorldNormal(e,o),r=this.newPlane(t,e.point,n.negate());t.renderer.setPlane(!0,r.three),this.updateMaterialsAndPlanes()}getWorldNormal(t,e){const i=t.object;let o=t.object.matrixWorld.clone();if(i instanceof L.InstancedMesh&&t.instanceId!==void 0){const l=new L.Matrix4;i.getMatrixAt(t.instanceId,l),o=l.multiply(o)}const r=new L.Matrix3().getNormalMatrix(o),a=e.clone().applyMatrix3(r).normalize();return this.normalizePlaneDirectionY(a),a}normalizePlaneDirectionY(t){this.orthogonalY&&(t.y>this.toleranceOrthogonalY&&(t.x=0,t.y=1,t.z=0),t.y<-this.toleranceOrthogonalY&&(t.x=0,t.y=-1,t.z=0))}newPlane(t,e,i){const o=this.newPlaneInstance(t,e,i);return o.onDraggingStarted.add(this._onStartDragging),o.onDraggingEnded.add(this._onEndDragging),this.list.push(o),this.onAfterCreate.trigger(o),o}newPlaneInstance(t,e,i){return new this.PlaneType(this.components,t,e,i,this._material)}updateMaterialsAndPlanes(){const t=this.components.get(hs);for(const[e,i]of t.list){if(!i.renderer)continue;i.renderer.updateClippingPlanes();const{clippingPlanes:o}=i.renderer;for(const n of i.meshes)if(Array.isArray(n.material))for(const r of n.material)r.clippingPlanes=o;else n.material.clippingPlanes=o}}};f(_e,"uuid","66290bc5-18c4-4cd1-9379-2e17a0617611");let ii=_e;const Ne=class Ne extends st{constructor(t){super(t);f(this,"enabled",!0);f(this,"_originalBackground",new Map);f(this,"onDisposed",new U);f(this,"list",{});f(this,"_originals",{});this.components.add(Ne.uuid,this)}set(t,e=Object.keys(this.list)){for(const i of e){const{material:o,meshes:n}=this.list[i];for(const r of n)if(t)this._originals[r.uuid]||(this._originals[r.uuid]={material:r.material}),r instanceof L.InstancedMesh&&r.instanceColor&&(this._originals[r.uuid].instances=r.instanceColor,r.instanceColor=null),r.material=o;else{if(!this._originals[r.uuid])continue;r.material=this._originals[r.uuid].material;const a=this._originals[r.uuid].instances;r instanceof L.InstancedMesh&&a&&(r.instanceColor=a)}}}dispose(){for(const t in this.list){const{material:e}=this.list[t];e.dispose()}this.list={},this._originals={},this.onDisposed.trigger(Ne.uuid),this.onDisposed.reset(),this._originalBackground.clear()}setBackgroundColor(t,e){const i=e.scene.three;i instanceof L.Scene&&(this._originalBackground.has(e.uuid)||this._originalBackground.set(e.uuid,i.background),this._originalBackground&&(i.background=t))}resetBackgroundColor(t){const e=t.scene.three;if(!(e instanceof L.Scene))return;const i=this._originalBackground.get(t.uuid);i&&(e.background=i)}addMaterial(t,e){if(this.list[t])throw new Error("This ID already exists!");this.list[t]={material:e,meshes:new Set}}addMeshes(t,e){if(!this.list[t])throw new Error("This ID doesn't exists!");for(const i of e)this.list[t].meshes.add(i)}removeMeshes(t,e){if(!this.list[t])throw new Error("This ID doesn't exists!");for(const i of e)this.list[t].meshes.delete(i)}};f(Ne,"uuid","24989d27-fa2f-4797-8b08-35918f74e502");let ni=Ne;function hr(c,s,t,e){return new Promise((i,o)=>{function n(){const r=c.clientWaitSync(s,t,0);if(r===c.WAIT_FAILED){o();return}if(r===c.TIMEOUT_EXPIRED){setTimeout(n,e);return}i()}n()})}async function Er(c,s,t,e,i,o,n){const r=c.fenceSync(c.SYNC_GPU_COMMANDS_COMPLETE,0);c.flush(),await hr(c,r,0,10),c.deleteSync(r),c.bindBuffer(s,t),c.getBufferSubData(s,e,i,o,n),c.bindBuffer(s,null)}async function Cn(c,s,t,e,i,o,n,r){const a=c.createBuffer();return c.bindBuffer(c.PIXEL_PACK_BUFFER,a),c.bufferData(c.PIXEL_PACK_BUFFER,r.byteLength,c.STREAM_READ),c.readPixels(s,t,e,i,o,n,0),c.bindBuffer(c.PIXEL_PACK_BUFFER,null),await Er(c,c.PIXEL_PACK_BUFFER,a,0,r),c.deleteBuffer(a),r}class pn{constructor(s,t,e){f(this,"onDisposed",new U);f(this,"onViewUpdated",new U);f(this,"enabled",!0);f(this,"needsUpdate",!1);f(this,"renderDebugFrame",!1);f(this,"components");f(this,"world");f(this,"renderer");f(this,"autoUpdate",!0);f(this,"updateInterval",1e3);f(this,"worker");f(this,"scene",new L.Scene);f(this,"_width",512);f(this,"_height",512);f(this,"_availableColor",1);f(this,"renderTarget");f(this,"bufferSize");f(this,"_buffer");f(this,"updateVisibility",async s=>{if(!this.enabled||!this.needsUpdate&&!s)return;const t=this.world.camera.three;t.updateMatrix(),this.renderer.setSize(this._width,this._height),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,t);const e=this.renderer.getContext();await Cn(e,0,0,this._width,this._height,e.RGBA,e.UNSIGNED_BYTE,this._buffer),this.renderer.setRenderTarget(null),this.renderDebugFrame&&this.renderer.render(this.scene,t),this.worker.postMessage({buffer:this._buffer}),this.needsUpdate=!1});if(!t.renderer)throw new Error("The given world must have a renderer!");this.components=s,this.applySettings(e),this.world=t,this.renderer=new L.WebGLRenderer,this.renderTarget=new L.WebGLRenderTarget(this._width,this._height),this.bufferSize=this._width*this._height*4,this._buffer=new Uint8Array(this.bufferSize),this.renderer.clippingPlanes=t.renderer.clippingPlanes;const i=`
71
+ `,extensions:{derivatives:!0}});this._grid=new L.Mesh(a,l),this._grid.frustumCulled=!1,t.scene.three.add(this._grid),this.setupEvents(!0)}get visible(){return this._grid.visible}set visible(s){s?this.world.scene.three.add(this._grid):this._grid.removeFromParent()}get material(){return this._grid.material}get fade(){return this._fade===3}set fade(s){this._fade=s?3:0,this.material.uniforms.uFade.value=this._fade}[Symbol.dispose](){throw new Error("Method not implemented.")}get(){return this._grid}dispose(){this.setupEvents(!1),this.components.get(_t).destroy(this._grid),this.onDisposed.trigger(),this.onDisposed.reset(),this.world=null,this.components=null}setupEvents(s){if(!(this.world.camera instanceof De))return;const t=this.world.camera.controls;s?t.addEventListener("update",this.updateZoom):t.removeEventListener("update",this.updateZoom)}}class fn extends st{constructor(){super(...arguments);f(this,"list",new Map);f(this,"onDisposed",new U);f(this,"config",{color:new L.Color(12303291),size1:1,size2:10,distance:500});f(this,"enabled",!0)}create(t){if(this.list.has(t.uuid))throw new Error("This world already has a grid!");const e=new er(this.components,t,this.config);this.list.set(t.uuid,e),t.onDisposed.add(()=>{this.delete(t)})}delete(t){const e=this.list.get(t.uuid);e&&e.dispose(),this.list.delete(t.uuid)}dispose(){for(const[t,e]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger()}}f(fn,"uuid","d1e814d5-b81c-4452-87a2-f039375e0489");const Vt=new C.Raycaster,it=new C.Vector3,yt=new C.Vector3,Q=new C.Quaternion,Qi={X:new C.Vector3(1,0,0),Y:new C.Vector3(0,1,0),Z:new C.Vector3(0,0,1)},Ws={type:"change"},qi={type:"mouseDown"},ji={type:"mouseUp",mode:null},Ki={type:"objectChange"};class sr extends C.Object3D{constructor(s,t){super(),t===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),t=document),this.isTransformControls=!0,this.visible=!1,this.domElement=t,this.domElement.style.touchAction="none";const e=new cr;this._gizmo=e,this.add(e);const i=new lr;this._plane=i,this.add(i);const o=this;function n(m,O){let u=O;Object.defineProperty(o,m,{get:function(){return u!==void 0?u:O},set:function(R){u!==R&&(u=R,i[m]=R,e[m]=R,o.dispatchEvent({type:m+"-changed",value:R}),o.dispatchEvent(Ws))}}),o[m]=O,i[m]=O,e[m]=O}n("camera",s),n("object",void 0),n("enabled",!0),n("axis",null),n("mode","translate"),n("translationSnap",null),n("rotationSnap",null),n("scaleSnap",null),n("space","world"),n("size",1),n("dragging",!1),n("showX",!0),n("showY",!0),n("showZ",!0);const r=new C.Vector3,a=new C.Vector3,l=new C.Quaternion,E=new C.Quaternion,I=new C.Vector3,h=new C.Quaternion,d=new C.Vector3,p=new C.Vector3,F=new C.Vector3,A=0,T=new C.Vector3;n("worldPosition",r),n("worldPositionStart",a),n("worldQuaternion",l),n("worldQuaternionStart",E),n("cameraPosition",I),n("cameraQuaternion",h),n("pointStart",d),n("pointEnd",p),n("rotationAxis",F),n("rotationAngle",A),n("eye",T),this._offset=new C.Vector3,this._startNorm=new C.Vector3,this._endNorm=new C.Vector3,this._cameraScale=new C.Vector3,this._parentPosition=new C.Vector3,this._parentQuaternion=new C.Quaternion,this._parentQuaternionInv=new C.Quaternion,this._parentScale=new C.Vector3,this._worldScaleStart=new C.Vector3,this._worldQuaternionInv=new C.Quaternion,this._worldScale=new C.Vector3,this._positionStart=new C.Vector3,this._quaternionStart=new C.Quaternion,this._scaleStart=new C.Vector3,this._getPointer=ir.bind(this),this._onPointerDown=or.bind(this),this._onPointerHover=nr.bind(this),this._onPointerMove=rr.bind(this),this._onPointerUp=ar.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(this)}pointerHover(s){if(this.object===void 0||this.dragging===!0)return;Vt.setFromCamera(s,this.camera);const t=Xs(this._gizmo.picker[this.mode],Vt);t?this.axis=t.object.name:this.axis=null}pointerDown(s){if(!(this.object===void 0||this.dragging===!0||s.button!==0)&&this.axis!==null){Vt.setFromCamera(s,this.camera);const t=Xs(this._plane,Vt,!0);t&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(t.point).sub(this.worldPositionStart)),this.dragging=!0,qi.mode=this.mode,this.dispatchEvent(qi)}}pointerMove(s){const t=this.axis,e=this.mode,i=this.object;let o=this.space;if(e==="scale"?o="local":(t==="E"||t==="XYZE"||t==="XYZ")&&(o="world"),i===void 0||t===null||this.dragging===!1||s.button!==-1)return;Vt.setFromCamera(s,this.camera);const n=Xs(this._plane,Vt,!0);if(n){if(this.pointEnd.copy(n.point).sub(this.worldPositionStart),e==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),o==="local"&&t!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),t.indexOf("X")===-1&&(this._offset.x=0),t.indexOf("Y")===-1&&(this._offset.y=0),t.indexOf("Z")===-1&&(this._offset.z=0),o==="local"&&t!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),i.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(o==="local"&&(i.position.applyQuaternion(Q.copy(this._quaternionStart).invert()),t.search("X")!==-1&&(i.position.x=Math.round(i.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(i.position.y=Math.round(i.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(i.position.z=Math.round(i.position.z/this.translationSnap)*this.translationSnap),i.position.applyQuaternion(this._quaternionStart)),o==="world"&&(i.parent&&i.position.add(it.setFromMatrixPosition(i.parent.matrixWorld)),t.search("X")!==-1&&(i.position.x=Math.round(i.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(i.position.y=Math.round(i.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(i.position.z=Math.round(i.position.z/this.translationSnap)*this.translationSnap),i.parent&&i.position.sub(it.setFromMatrixPosition(i.parent.matrixWorld))));else if(e==="scale"){if(t.search("XYZ")!==-1){let r=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(r*=-1),yt.set(r,r,r)}else it.copy(this.pointStart),yt.copy(this.pointEnd),it.applyQuaternion(this._worldQuaternionInv),yt.applyQuaternion(this._worldQuaternionInv),yt.divide(it),t.search("X")===-1&&(yt.x=1),t.search("Y")===-1&&(yt.y=1),t.search("Z")===-1&&(yt.z=1);i.scale.copy(this._scaleStart).multiply(yt),this.scaleSnap&&(t.search("X")!==-1&&(i.scale.x=Math.round(i.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Y")!==-1&&(i.scale.y=Math.round(i.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Z")!==-1&&(i.scale.z=Math.round(i.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(e==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const r=20/this.worldPosition.distanceTo(it.setFromMatrixPosition(this.camera.matrixWorld));let a=!1;t==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(it.copy(this.rotationAxis).cross(this.eye))*r):(t==="X"||t==="Y"||t==="Z")&&(this.rotationAxis.copy(Qi[t]),it.copy(Qi[t]),o==="local"&&it.applyQuaternion(this.worldQuaternion),it.cross(this.eye),it.length()===0?a=!0:this.rotationAngle=this._offset.dot(it.normalize())*r),(t==="E"||a)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),o==="local"&&t!=="E"&&t!=="XYZE"?(i.quaternion.copy(this._quaternionStart),i.quaternion.multiply(Q.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),i.quaternion.copy(Q.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),i.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(Ws),this.dispatchEvent(Ki)}}pointerUp(s){s.button===0&&(this.dragging&&this.axis!==null&&(ji.mode=this.mode,this.dispatchEvent(ji)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(s){s.geometry&&s.geometry.dispose(),s.material&&s.material.dispose()})}attach(s){return this.object=s,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(Ws),this.dispatchEvent(Ki),this.pointStart.copy(this.pointEnd))}getRaycaster(){return Vt}getMode(){return this.mode}setMode(s){this.mode=s}setTranslationSnap(s){this.translationSnap=s}setRotationSnap(s){this.rotationSnap=s}setScaleSnap(s){this.scaleSnap=s}setSize(s){this.size=s}setSpace(s){this.space=s}}function ir(c){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:c.button};{const s=this.domElement.getBoundingClientRect();return{x:(c.clientX-s.left)/s.width*2-1,y:-(c.clientY-s.top)/s.height*2+1,button:c.button}}}function nr(c){if(this.enabled)switch(c.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(c));break}}function or(c){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(c.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(c)),this.pointerDown(this._getPointer(c)))}function rr(c){this.enabled&&this.pointerMove(this._getPointer(c))}function ar(c){this.enabled&&(this.domElement.releasePointerCapture(c.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(c)))}function Xs(c,s,t){const e=s.intersectObject(c,!0);for(let i=0;i<e.length;i++)if(e[i].object.visible||t)return e[i];return!1}const ss=new C.Euler,k=new C.Vector3(0,1,0),$i=new C.Vector3(0,0,0),Ji=new C.Matrix4,is=new C.Quaternion,as=new C.Quaternion,At=new C.Vector3,tn=new C.Matrix4,Ae=new C.Vector3(1,0,0),Gt=new C.Vector3(0,1,0),Oe=new C.Vector3(0,0,1),ns=new C.Vector3,Re=new C.Vector3,Fe=new C.Vector3;class cr extends C.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const s=new C.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),t=new C.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=s.clone();e.opacity=.15;const i=t.clone();i.opacity=.5;const o=s.clone();o.color.setHex(16711680);const n=s.clone();n.color.setHex(65280);const r=s.clone();r.color.setHex(255);const a=s.clone();a.color.setHex(16711680),a.opacity=.5;const l=s.clone();l.color.setHex(65280),l.opacity=.5;const E=s.clone();E.color.setHex(255),E.opacity=.5;const I=s.clone();I.opacity=.25;const h=s.clone();h.color.setHex(16776960),h.opacity=.25,s.clone().color.setHex(16776960);const p=s.clone();p.color.setHex(7895160);const F=new C.CylinderGeometry(0,.04,.1,12);F.translate(0,.05,0);const A=new C.BoxGeometry(.08,.08,.08);A.translate(0,.04,0);const T=new C.BufferGeometry;T.setAttribute("position",new C.Float32BufferAttribute([0,0,0,1,0,0],3));const m=new C.CylinderGeometry(.0075,.0075,.5,3);m.translate(0,.25,0);function O(v,H){const q=new C.TorusGeometry(v,.0075,3,64,H*Math.PI*2);return q.rotateY(Math.PI/2),q.rotateX(Math.PI/2),q}function u(){const v=new C.BufferGeometry;return v.setAttribute("position",new C.Float32BufferAttribute([0,0,0,1,1,1],3)),v}const R={X:[[new C.Mesh(F,o),[.5,0,0],[0,0,-Math.PI/2]],[new C.Mesh(F,o),[-.5,0,0],[0,0,Math.PI/2]],[new C.Mesh(m,o),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new C.Mesh(F,n),[0,.5,0]],[new C.Mesh(F,n),[0,-.5,0],[Math.PI,0,0]],[new C.Mesh(m,n)]],Z:[[new C.Mesh(F,r),[0,0,.5],[Math.PI/2,0,0]],[new C.Mesh(F,r),[0,0,-.5],[-Math.PI/2,0,0]],[new C.Mesh(m,r),null,[Math.PI/2,0,0]]],XYZ:[[new C.Mesh(new C.OctahedronGeometry(.1,0),I.clone()),[0,0,0]]],XY:[[new C.Mesh(new C.BoxGeometry(.15,.15,.01),E.clone()),[.15,.15,0]]],YZ:[[new C.Mesh(new C.BoxGeometry(.15,.15,.01),a.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new C.Mesh(new C.BoxGeometry(.15,.15,.01),l.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},S={X:[[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new C.Mesh(new C.OctahedronGeometry(.2,0),e)]],XY:[[new C.Mesh(new C.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new C.Mesh(new C.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new C.Mesh(new C.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]]},g={START:[[new C.Mesh(new C.OctahedronGeometry(.01,2),i),null,null,null,"helper"]],END:[[new C.Mesh(new C.OctahedronGeometry(.01,2),i),null,null,null,"helper"]],DELTA:[[new C.Line(u(),i),null,null,null,"helper"]],X:[[new C.Line(T,i.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new C.Line(T,i.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new C.Line(T,i.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},_={XYZE:[[new C.Mesh(O(.5,1),p),null,[0,Math.PI/2,0]]],X:[[new C.Mesh(O(.5,.5),o)]],Y:[[new C.Mesh(O(.5,.5),n),null,[0,0,-Math.PI/2]]],Z:[[new C.Mesh(O(.5,.5),r),null,[0,Math.PI/2,0]]],E:[[new C.Mesh(O(.75,1),h),null,[0,Math.PI/2,0]]]},N={AXIS:[[new C.Line(T,i.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},P={XYZE:[[new C.Mesh(new C.SphereGeometry(.25,10,8),e)]],X:[[new C.Mesh(new C.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new C.Mesh(new C.TorusGeometry(.5,.1,4,24),e),[0,0,0],[Math.PI/2,0,0]]],Z:[[new C.Mesh(new C.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,0,-Math.PI/2]]],E:[[new C.Mesh(new C.TorusGeometry(.75,.1,2,24),e)]]},w={X:[[new C.Mesh(A,o),[.5,0,0],[0,0,-Math.PI/2]],[new C.Mesh(m,o),[0,0,0],[0,0,-Math.PI/2]],[new C.Mesh(A,o),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new C.Mesh(A,n),[0,.5,0]],[new C.Mesh(m,n)],[new C.Mesh(A,n),[0,-.5,0],[0,0,Math.PI]]],Z:[[new C.Mesh(A,r),[0,0,.5],[Math.PI/2,0,0]],[new C.Mesh(m,r),[0,0,0],[Math.PI/2,0,0]],[new C.Mesh(A,r),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new C.Mesh(new C.BoxGeometry(.15,.15,.01),E),[.15,.15,0]]],YZ:[[new C.Mesh(new C.BoxGeometry(.15,.15,.01),a),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new C.Mesh(new C.BoxGeometry(.15,.15,.01),l),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new C.Mesh(new C.BoxGeometry(.1,.1,.1),I.clone())]]},M={X:[[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new C.Mesh(new C.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new C.Mesh(new C.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new C.Mesh(new C.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new C.Mesh(new C.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new C.Mesh(new C.BoxGeometry(.2,.2,.2),e),[0,0,0]]]},D={X:[[new C.Line(T,i.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new C.Line(T,i.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new C.Line(T,i.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function x(v){const H=new C.Object3D;for(const q in v)for(let tt=v[q].length;tt--;){const Z=v[q][tt][0].clone(),Ut=v[q][tt][1],xt=v[q][tt][2],bt=v[q][tt][3],Ue=v[q][tt][4];Z.name=q,Z.tag=Ue,Ut&&Z.position.set(Ut[0],Ut[1],Ut[2]),xt&&Z.rotation.set(xt[0],xt[1],xt[2]),bt&&Z.scale.set(bt[0],bt[1],bt[2]),Z.updateMatrix();const ae=Z.geometry.clone();ae.applyMatrix4(Z.matrix),Z.geometry=ae,Z.renderOrder=1/0,Z.position.set(0,0,0),Z.rotation.set(0,0,0),Z.scale.set(1,1,1),H.add(Z)}return H}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=x(R)),this.add(this.gizmo.rotate=x(_)),this.add(this.gizmo.scale=x(w)),this.add(this.picker.translate=x(S)),this.add(this.picker.rotate=x(P)),this.add(this.picker.scale=x(M)),this.add(this.helper.translate=x(g)),this.add(this.helper.rotate=x(N)),this.add(this.helper.scale=x(D)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(s){const e=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:as;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let i=[];i=i.concat(this.picker[this.mode].children),i=i.concat(this.gizmo[this.mode].children),i=i.concat(this.helper[this.mode].children);for(let o=0;o<i.length;o++){const n=i[o];n.visible=!0,n.rotation.set(0,0,0),n.position.copy(this.worldPosition);let r;if(this.camera.isOrthographicCamera?r=(this.camera.top-this.camera.bottom)/this.camera.zoom:r=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),n.scale.set(1,1,1).multiplyScalar(r*this.size/4),n.tag==="helper"){n.visible=!1,n.name==="AXIS"?(n.visible=!!this.axis,this.axis==="X"&&(Q.setFromEuler(ss.set(0,0,0)),n.quaternion.copy(e).multiply(Q),Math.abs(k.copy(Ae).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Y"&&(Q.setFromEuler(ss.set(0,0,Math.PI/2)),n.quaternion.copy(e).multiply(Q),Math.abs(k.copy(Gt).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Z"&&(Q.setFromEuler(ss.set(0,Math.PI/2,0)),n.quaternion.copy(e).multiply(Q),Math.abs(k.copy(Oe).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="XYZE"&&(Q.setFromEuler(ss.set(0,Math.PI/2,0)),k.copy(this.rotationAxis),n.quaternion.setFromRotationMatrix(Ji.lookAt($i,k,Gt)),n.quaternion.multiply(Q),n.visible=this.dragging),this.axis==="E"&&(n.visible=!1)):n.name==="START"?(n.position.copy(this.worldPositionStart),n.visible=this.dragging):n.name==="END"?(n.position.copy(this.worldPosition),n.visible=this.dragging):n.name==="DELTA"?(n.position.copy(this.worldPositionStart),n.quaternion.copy(this.worldQuaternionStart),it.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),it.applyQuaternion(this.worldQuaternionStart.clone().invert()),n.scale.copy(it),n.visible=this.dragging):(n.quaternion.copy(e),this.dragging?n.position.copy(this.worldPositionStart):n.position.copy(this.worldPosition),this.axis&&(n.visible=this.axis.search(n.name)!==-1));continue}n.quaternion.copy(e),this.mode==="translate"||this.mode==="scale"?(n.name==="X"&&Math.abs(k.copy(Ae).applyQuaternion(e).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Y"&&Math.abs(k.copy(Gt).applyQuaternion(e).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Z"&&Math.abs(k.copy(Oe).applyQuaternion(e).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XY"&&Math.abs(k.copy(Oe).applyQuaternion(e).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="YZ"&&Math.abs(k.copy(Ae).applyQuaternion(e).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XZ"&&Math.abs(k.copy(Gt).applyQuaternion(e).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1)):this.mode==="rotate"&&(is.copy(e),k.copy(this.eye).applyQuaternion(Q.copy(e).invert()),n.name.search("E")!==-1&&n.quaternion.setFromRotationMatrix(Ji.lookAt(this.eye,$i,Gt)),n.name==="X"&&(Q.setFromAxisAngle(Ae,Math.atan2(-k.y,k.z)),Q.multiplyQuaternions(is,Q),n.quaternion.copy(Q)),n.name==="Y"&&(Q.setFromAxisAngle(Gt,Math.atan2(k.x,k.z)),Q.multiplyQuaternions(is,Q),n.quaternion.copy(Q)),n.name==="Z"&&(Q.setFromAxisAngle(Oe,Math.atan2(k.y,k.x)),Q.multiplyQuaternions(is,Q),n.quaternion.copy(Q))),n.visible=n.visible&&(n.name.indexOf("X")===-1||this.showX),n.visible=n.visible&&(n.name.indexOf("Y")===-1||this.showY),n.visible=n.visible&&(n.name.indexOf("Z")===-1||this.showZ),n.visible=n.visible&&(n.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),n.material._color=n.material._color||n.material.color.clone(),n.material._opacity=n.material._opacity||n.material.opacity,n.material.color.copy(n.material._color),n.material.opacity=n.material._opacity,this.enabled&&this.axis&&(n.name===this.axis||this.axis.split("").some(function(a){return n.name===a}))&&(n.material.color.setHex(16776960),n.material.opacity=1)}super.updateMatrixWorld(s)}}class lr extends C.Mesh{constructor(){super(new C.PlaneGeometry(1e5,1e5,2,2),new C.MeshBasicMaterial({visible:!1,wireframe:!0,side:C.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(s){let t=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(t="local"),ns.copy(Ae).applyQuaternion(t==="local"?this.worldQuaternion:as),Re.copy(Gt).applyQuaternion(t==="local"?this.worldQuaternion:as),Fe.copy(Oe).applyQuaternion(t==="local"?this.worldQuaternion:as),k.copy(Re),this.mode){case"translate":case"scale":switch(this.axis){case"X":k.copy(this.eye).cross(ns),At.copy(ns).cross(k);break;case"Y":k.copy(this.eye).cross(Re),At.copy(Re).cross(k);break;case"Z":k.copy(this.eye).cross(Fe),At.copy(Fe).cross(k);break;case"XY":At.copy(Fe);break;case"YZ":At.copy(ns);break;case"XZ":k.copy(Fe),At.copy(Re);break;case"XYZ":case"E":At.set(0,0,0);break}break;case"rotate":default:At.set(0,0,0)}At.length()===0?this.quaternion.copy(this.cameraQuaternion):(tn.lookAt(it.set(0,0,0),At,k),this.quaternion.setFromRotationMatrix(tn)),super.updateMatrixWorld(s)}}class As{constructor(s,t,e,i,o,n=5,r=!0){f(this,"onDraggingStarted",new U);f(this,"onDraggingEnded",new U);f(this,"onDisposed",new U);f(this,"normal");f(this,"origin");f(this,"three",new L.Plane);f(this,"_helper");f(this,"_visible",!0);f(this,"_enabled",!0);f(this,"components");f(this,"world");f(this,"_controlsActive",!1);f(this,"_arrowBoundBox",new L.Mesh);f(this,"_planeMesh");f(this,"_controls");f(this,"_hiddenMaterial",new L.MeshBasicMaterial({visible:!1}));f(this,"update",async()=>{this._enabled&&this.three.setFromNormalAndCoplanarPoint(this.normal,this._helper.position)});f(this,"changeDrag",s=>{this._visible=!s.value,this.preventCameraMovement(),this.notifyDraggingChanged(s)});if(this.components=s,this.world=t,!t.renderer)throw new Error("The given world must have a renderer!");this.normal=i,this.origin=e,t.renderer.setPlane(!0,this.three),this._planeMesh=As.newPlaneMesh(n,o),this._helper=this.newHelper(),this._controls=this.newTransformControls(),this.three.setFromNormalAndCoplanarPoint(i,e),r&&this.toggleControls(!0)}get enabled(){return this._enabled}set enabled(s){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");this._enabled=s,this.world.renderer.setPlane(s,this.three)}get visible(){return this._visible}set visible(s){this._visible=s,this._controls.visible=s,this._helper.visible=s,this.toggleControls(s)}get meshes(){return[this._planeMesh,this._arrowBoundBox]}get planeMaterial(){return this._planeMesh.material}set planeMaterial(s){this._planeMesh.material=s}get size(){return this._planeMesh.scale.x}set size(s){this._planeMesh.scale.set(s,s,s)}get helper(){return this._helper}async setFromNormalAndCoplanarPoint(s,t){this.reset(),this.normal.equals(s)||(this.normal.copy(s),this._helper.lookAt(s)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix(),await this.update()}dispose(){this._enabled=!1,this.onDraggingStarted.reset(),this.onDraggingEnded.reset(),this._helper.removeFromParent(),this.world.renderer&&this.world.renderer.setPlane(!1,this.three),this._arrowBoundBox.removeFromParent(),this._arrowBoundBox.geometry.dispose(),this._planeMesh.geometry.dispose(),this._controls.removeFromParent(),this._controls.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}reset(){const s=new L.Vector3(1,0,0),t=new L.Vector3;this.normal.equals(s)||(this.normal.copy(s),this._helper.lookAt(s)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix()}toggleControls(s){if(s){if(this._controlsActive)return;this._controls.addEventListener("change",this.update),this._controls.addEventListener("dragging-changed",this.changeDrag)}else this._controls.removeEventListener("change",this.update),this._controls.removeEventListener("dragging-changed",this.changeDrag);this._controlsActive=s}newTransformControls(){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");const s=this.world.camera.three,t=this.world.renderer.three.domElement,e=new sr(s,t);return this.initializeControls(e),this.world.scene.three.add(e),e}initializeControls(s){s.attach(this._helper),s.showX=!1,s.showY=!1,s.setSpace("local"),this.createArrowBoundingBox(),s.children[0].children[0].add(this._arrowBoundBox)}createArrowBoundingBox(){this._arrowBoundBox.geometry=new L.CylinderGeometry(.18,.18,1.2),this._arrowBoundBox.material=this._hiddenMaterial,this._arrowBoundBox.rotateX(Math.PI/2),this._arrowBoundBox.updateMatrix(),this._arrowBoundBox.geometry.applyMatrix4(this._arrowBoundBox.matrix)}notifyDraggingChanged(s){s.value?this.onDraggingStarted.trigger():this.onDraggingEnded.trigger()}preventCameraMovement(){this.world.camera.enabled=this._visible}newHelper(){const s=new L.Object3D;return s.lookAt(this.normal),s.position.copy(this.origin),this._planeMesh.position.z+=.01,s.add(this._planeMesh),this.world.scene.three.add(s),s}static newPlaneMesh(s,t){const e=new L.PlaneGeometry(1),i=new L.Mesh(e,t);return i.scale.set(s,s,s),i}}const _e=class _e extends st{constructor(t){super(t);f(this,"onAfterCreate",new U);f(this,"onAfterDelete",new U);f(this,"onBeforeDrag",new U);f(this,"onAfterDrag",new U);f(this,"onBeforeCreate",new U);f(this,"onBeforeCancel",new U);f(this,"onAfterCancel",new U);f(this,"onBeforeDelete",new U);f(this,"onDisposed",new U);f(this,"orthogonalY",!1);f(this,"toleranceOrthogonalY",.7);f(this,"planes",[]);f(this,"PlaneType");f(this,"_material",new L.MeshBasicMaterial({color:16776960,side:L.DoubleSide,transparent:!0,opacity:.2}));f(this,"_size",5);f(this,"_enabled",!1);f(this,"_visible",!1);f(this,"_onStartDragging",()=>{this.onBeforeDrag.trigger()});f(this,"_onEndDragging",()=>{this.onAfterDrag.trigger()});this.components.add(_e.uuid,this),this.PlaneType=As}get enabled(){return this._enabled}set enabled(t){this._enabled=t;for(const e of this.planes)e.enabled=t;this.updateMaterialsAndPlanes()}get visible(){return this._visible}set visible(t){this._visible=t;for(const e of this.planes)e.visible=t}get material(){return this._material}set material(t){this._material=t;for(const e of this.planes)e.planeMaterial=t}get size(){return this._size}set size(t){this._size=t;for(const e of this.planes)e.size=t}endCreation(){}cancelCreation(){}dispose(){this._enabled=!1;for(const t of this.planes)t.dispose();this.planes.length=0,this._material.dispose(),this.onBeforeCreate.reset(),this.onBeforeCancel.reset(),this.onBeforeDelete.reset(),this.onBeforeDrag.reset(),this.onAfterCreate.reset(),this.onAfterCancel.reset(),this.onAfterDelete.reset(),this.onAfterDrag.reset(),this.onDisposed.trigger(_e.uuid),this.onDisposed.reset()}create(t){if(!this.enabled)return;const o=this.components.get(Me).get(t).castRay();o&&this.createPlaneFromIntersection(t,o)}createFromNormalAndCoplanarPoint(t,e,i){const o=this.newPlane(t,i,e);return this.updateMaterialsAndPlanes(),o}delete(t,e){this.enabled&&(e||(e=this.pickPlane(t)),e&&this.deletePlane(e))}deleteAll(){for(;this.planes.length>0;){const t=this.planes[0];this.delete(t.world,t)}}deletePlane(t){const e=this.planes.indexOf(t);if(e!==-1){if(this.planes.splice(e,1),!t.world.renderer)throw new Error("Renderer not found for this plane's world!");t.world.renderer.setPlane(!1,t.three),t.dispose(),this.updateMaterialsAndPlanes(),this.onAfterDelete.trigger(t)}}pickPlane(t){const i=this.components.get(Me).get(t),o=this.getAllPlaneMeshes(),n=i.castRay(o);if(n){const r=n.object;return this.planes.find(a=>a.meshes.includes(r))}}getAllPlaneMeshes(){const t=[];for(const e of this.planes)t.push(...e.meshes);return t}createPlaneFromIntersection(t,e){var a;if(!t.renderer)throw new Error("The given world must have a renderer!");const i=e.point.distanceTo(new L.Vector3(0,0,0)),o=(a=e.face)==null?void 0:a.normal;if(!i||!o)return;const n=this.getWorldNormal(e,o),r=this.newPlane(t,e.point,n.negate());t.renderer.setPlane(!0,r.three),this.updateMaterialsAndPlanes()}getWorldNormal(t,e){const i=t.object;let o=t.object.matrixWorld.clone();if(i instanceof L.InstancedMesh&&t.instanceId!==void 0){const l=new L.Matrix4;i.getMatrixAt(t.instanceId,l),o=l.multiply(o)}const r=new L.Matrix3().getNormalMatrix(o),a=e.clone().applyMatrix3(r).normalize();return this.normalizePlaneDirectionY(a),a}normalizePlaneDirectionY(t){this.orthogonalY&&(t.y>this.toleranceOrthogonalY&&(t.x=0,t.y=1,t.z=0),t.y<-this.toleranceOrthogonalY&&(t.x=0,t.y=-1,t.z=0))}newPlane(t,e,i){const o=this.newPlaneInstance(t,e,i);return o.onDraggingStarted.add(this._onStartDragging),o.onDraggingEnded.add(this._onEndDragging),this.planes.push(o),this.onAfterCreate.trigger(o),o}newPlaneInstance(t,e,i){return new this.PlaneType(this.components,t,e,i,this._material)}updateMaterialsAndPlanes(){const t=this.components.get(hs);for(const[e,i]of t.list){if(!i.renderer)continue;i.renderer.updateClippingPlanes();const{clippingPlanes:o}=i.renderer;for(const n of i.meshes)if(Array.isArray(n.material))for(const r of n.material)r.clippingPlanes=o;else n.material.clippingPlanes=o}}};f(_e,"uuid","66290bc5-18c4-4cd1-9379-2e17a0617611");let ii=_e;const Ne=class Ne extends st{constructor(t){super(t);f(this,"enabled",!0);f(this,"_originalBackground",new Map);f(this,"onDisposed",new U);f(this,"list",{});f(this,"_originals",{});this.components.add(Ne.uuid,this)}set(t,e=Object.keys(this.list)){for(const i of e){const{material:o,meshes:n}=this.list[i];for(const r of n)if(t)this._originals[r.uuid]||(this._originals[r.uuid]={material:r.material}),r instanceof L.InstancedMesh&&r.instanceColor&&(this._originals[r.uuid].instances=r.instanceColor,r.instanceColor=null),r.material=o;else{if(!this._originals[r.uuid])continue;r.material=this._originals[r.uuid].material;const a=this._originals[r.uuid].instances;r instanceof L.InstancedMesh&&a&&(r.instanceColor=a)}}}dispose(){for(const t in this.list){const{material:e}=this.list[t];e.dispose()}this.list={},this._originals={},this.onDisposed.trigger(Ne.uuid),this.onDisposed.reset(),this._originalBackground.clear()}setBackgroundColor(t,e){const i=e.scene.three;i instanceof L.Scene&&(this._originalBackground.has(e.uuid)||this._originalBackground.set(e.uuid,i.background),this._originalBackground&&(i.background=t))}resetBackgroundColor(t){const e=t.scene.three;if(!(e instanceof L.Scene))return;const i=this._originalBackground.get(t.uuid);i&&(e.background=i)}addMaterial(t,e){if(this.list[t])throw new Error("This ID already exists!");this.list[t]={material:e,meshes:new Set}}addMeshes(t,e){if(!this.list[t])throw new Error("This ID doesn't exists!");for(const i of e)this.list[t].meshes.add(i)}removeMeshes(t,e){if(!this.list[t])throw new Error("This ID doesn't exists!");for(const i of e)this.list[t].meshes.delete(i)}};f(Ne,"uuid","24989d27-fa2f-4797-8b08-35918f74e502");let ni=Ne;function hr(c,s,t,e){return new Promise((i,o)=>{function n(){const r=c.clientWaitSync(s,t,0);if(r===c.WAIT_FAILED){o();return}if(r===c.TIMEOUT_EXPIRED){setTimeout(n,e);return}i()}n()})}async function Er(c,s,t,e,i,o,n){const r=c.fenceSync(c.SYNC_GPU_COMMANDS_COMPLETE,0);c.flush(),await hr(c,r,0,10),c.deleteSync(r),c.bindBuffer(s,t),c.getBufferSubData(s,e,i,o,n),c.bindBuffer(s,null)}async function Cn(c,s,t,e,i,o,n,r){const a=c.createBuffer();return c.bindBuffer(c.PIXEL_PACK_BUFFER,a),c.bufferData(c.PIXEL_PACK_BUFFER,r.byteLength,c.STREAM_READ),c.readPixels(s,t,e,i,o,n,0),c.bindBuffer(c.PIXEL_PACK_BUFFER,null),await Er(c,c.PIXEL_PACK_BUFFER,a,0,r),c.deleteBuffer(a),r}class pn{constructor(s,t,e){f(this,"onDisposed",new U);f(this,"onViewUpdated",new U);f(this,"enabled",!0);f(this,"needsUpdate",!1);f(this,"renderDebugFrame",!1);f(this,"components");f(this,"world");f(this,"renderer");f(this,"autoUpdate",!0);f(this,"updateInterval",1e3);f(this,"worker");f(this,"scene",new L.Scene);f(this,"_width",512);f(this,"_height",512);f(this,"_availableColor",1);f(this,"renderTarget");f(this,"bufferSize");f(this,"_buffer");f(this,"updateVisibility",async s=>{if(!this.enabled||!this.needsUpdate&&!s)return;const t=this.world.camera.three;t.updateMatrix(),this.renderer.setSize(this._width,this._height),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,t);const e=this.renderer.getContext();await Cn(e,0,0,this._width,this._height,e.RGBA,e.UNSIGNED_BYTE,this._buffer),this.renderer.setRenderTarget(null),this.renderDebugFrame&&this.renderer.render(this.scene,t),this.worker.postMessage({buffer:this._buffer}),this.needsUpdate=!1});if(!t.renderer)throw new Error("The given world must have a renderer!");this.components=s,this.applySettings(e),this.world=t,this.renderer=new L.WebGLRenderer,this.renderTarget=new L.WebGLRenderTarget(this._width,this._height),this.bufferSize=this._width*this._height*4,this._buffer=new Uint8Array(this.bufferSize),this.renderer.clippingPlanes=t.renderer.clippingPlanes;const i=`
72
72
  addEventListener("message", (event) => {
73
73
  const { buffer } = event.data;
74
74
  const colors = new Map();
@@ -85,4 +85,4 @@
85
85
  }
86
86
  postMessage({ colors });
87
87
  });
88
- `,o=new Blob([i],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(o))}dispose(){this.enabled=!1;for(const s of this.scene.children)s.removeFromParent();this.onViewUpdated.reset(),this.worker.terminate(),this.renderer.dispose(),this.renderTarget.dispose(),this._buffer=null,this.onDisposed.reset()}getAvailableColor(){let s=BigInt(this._availableColor.toString());const t=[];do t.unshift(Number(s%256n)),s/=256n;while(s);for(;t.length!==3;)t.unshift(0);const[e,i,o]=t,n=`${e}-${i}-${o}`;return{r:e,g:i,b:o,code:n}}increaseColor(){if(this._availableColor===256*256*256){console.warn("Color can't be increased over 256 x 256 x 256!");return}this._availableColor++}decreaseColor(){if(this._availableColor===1){console.warn("Color can't be decreased under 0!");return}this._availableColor--}applySettings(s){s&&(s.updateInterval!==void 0&&(this.updateInterval=s.updateInterval),s.height!==void 0&&(this._height=s.height),s.width!==void 0&&(this._width=s.width),s.autoUpdate!==void 0&&(this.autoUpdate=s.autoUpdate))}}class Tn extends pn{constructor(t,e,i){super(t,e,i);f(this,"threshold",100);f(this,"onViewUpdated",new U);f(this,"colorMeshes",new Map);f(this,"isProcessing",!1);f(this,"_colorCodeMeshMap",new Map);f(this,"_meshIDColorCodeMap",new Map);f(this,"_currentVisibleMeshes",new Set);f(this,"_recentlyHiddenMeshes",new Set);f(this,"_transparentMat",new L.MeshBasicMaterial({transparent:!0,opacity:0}));f(this,"handleWorkerMessage",async t=>{if(this.isProcessing)return;const e=t.data.colors;this._recentlyHiddenMeshes=new Set(this._currentVisibleMeshes),this._currentVisibleMeshes.clear();for(const[i,o]of e){if(o<this.threshold)continue;const n=this._colorCodeMeshMap.get(i);n&&(this._currentVisibleMeshes.add(n),this._recentlyHiddenMeshes.delete(n))}this.onViewUpdated.trigger({seen:this._currentVisibleMeshes,unseen:this._recentlyHiddenMeshes})});this.worker.addEventListener("message",this.handleWorkerMessage),this.autoUpdate&&window.setInterval(async()=>{this.isProcessing||await this.updateVisibility()},this.updateInterval),this.onViewUpdated.add(({seen:o,unseen:n})=>{for(const r of o)r.visible=!0;for(const r of n)r.visible=!1})}dispose(){super.dispose(),this._currentVisibleMeshes.clear(),this._recentlyHiddenMeshes.clear(),this._meshIDColorCodeMap.clear(),this._transparentMat.dispose(),this._colorCodeMeshMap.clear();const t=this.components.get(_t);for(const e in this.colorMeshes){const i=this.colorMeshes.get(e);i&&t.destroy(i,!0)}this.colorMeshes.clear()}add(t){if(!this.enabled)return;if(this.isProcessing){console.log("Culler processing not finished yet.");return}this.isProcessing=!0;const e=t instanceof L.InstancedMesh,{geometry:i,material:o}=t,{colorMaterial:n,code:r}=this.getAvailableMaterial();let a;if(Array.isArray(o)){let I=!0;const h=[];for(const d of o)si.isTransparent(d)?h.push(this._transparentMat):(I=!1,h.push(n));if(I){n.dispose(),this.isProcessing=!1;return}a=h}else if(si.isTransparent(o)){n.dispose(),this.isProcessing=!1;return}else a=n;this._colorCodeMeshMap.set(r,t),this._meshIDColorCodeMap.set(t.uuid,r);const l=e?t.count:1,E=new L.InstancedMesh(i,a,l);e?E.instanceMatrix=t.instanceMatrix:E.setMatrixAt(0,new L.Matrix4),t.visible=!1,E.applyMatrix4(t.matrix),E.updateMatrix(),this.scene.add(E),this.colorMeshes.set(t.uuid,E),this.increaseColor(),this.isProcessing=!1}remove(t){if(this.isProcessing){console.log("Culler processing not finished yet.");return}this.isProcessing=!0;const e=this.components.get(_t);this._currentVisibleMeshes.delete(t),this._recentlyHiddenMeshes.delete(t);const i=this.colorMeshes.get(t.uuid),o=this._meshIDColorCodeMap.get(t.uuid);if(!i||!o){this.isProcessing=!1,console.log(t.visible);return}this._colorCodeMeshMap.delete(o),this._meshIDColorCodeMap.delete(t.uuid),this.colorMeshes.delete(t.uuid),i.geometry=void 0,i.material=[],e.destroy(i,!0),this._recentlyHiddenMeshes.delete(t),this._currentVisibleMeshes.delete(t),this.isProcessing=!1}getAvailableMaterial(){const{r:t,g:e,b:i,code:o}=this.getAvailableColor(),n=L.ColorManagement.enabled;L.ColorManagement.enabled=!1;const r=new L.Color(`rgb(${t}, ${e}, ${i})`);if(!this.world.renderer)throw new Error("Renderer not found in the world!");const a=this.world.renderer.clippingPlanes,l=new L.MeshBasicMaterial({color:r,clippingPlanes:a,side:L.DoubleSide});return L.ColorManagement.enabled=n,{colorMaterial:l,code:o}}}const ye=class ye extends st{constructor(t){super(t);f(this,"_enabled",!0);f(this,"list",new Map);f(this,"onDisposed",new U);t.add(ye.uuid,this)}get enabled(){return this._enabled}set enabled(t){this._enabled=t;for(const[e,i]of this.list)i.enabled=t}create(t,e){if(this.list.has(t.uuid))return this.list.get(t.uuid);const i=new Tn(this.components,t,e);return this.list.set(t.uuid,i),i}delete(t){const e=this.list.get(t.uuid);e&&e.dispose(),this.list.delete(t.uuid)}dispose(){this.enabled=!1,this.onDisposed.trigger(ye.uuid),this.onDisposed.reset();for(const[t,e]of this.list)e.dispose();this.list.clear()}};f(ye,"uuid","69f2a50d-c266-44fc-b1bd-fa4d34be89e6");let oi=ye;const Tt=class Tt extends st{constructor(t){super(t);f(this,"enabled",!0);f(this,"onDisposed",new U);f(this,"_absoluteMin");f(this,"_absoluteMax");f(this,"_meshes",[]);this.components.add(Tt.uuid,this),this._absoluteMin=Tt.newBound(!0),this._absoluteMax=Tt.newBound(!1)}static getDimensions(t){const{min:e,max:i}=t,o=Math.abs(i.x-e.x),n=Math.abs(i.y-e.y),r=Math.abs(i.z-e.z),a=new L.Vector3;return a.subVectors(i,e).divideScalar(2).add(e),{width:o,height:n,depth:r,center:a}}static newBound(t){const e=t?1:-1;return new L.Vector3(e*Number.MAX_VALUE,e*Number.MAX_VALUE,e*Number.MAX_VALUE)}static getBounds(t,e,i){const o=i||this.newBound(!1),n=e||this.newBound(!0);for(const r of t)r.x<n.x&&(n.x=r.x),r.y<n.y&&(n.y=r.y),r.z<n.z&&(n.z=r.z),r.x>o.x&&(o.x=r.x),r.y>o.y&&(o.y=r.y),r.z>o.z&&(o.z=r.z);return new L.Box3(e,i)}dispose(){const t=this.components.get(_t);for(const e of this._meshes)t.destroy(e);this._meshes=[],this.onDisposed.trigger(Tt.uuid),this.onDisposed.reset()}get(){const t=this._absoluteMin.clone(),e=this._absoluteMax.clone();return new L.Box3(t,e)}getSphere(){const t=this._absoluteMin.clone(),e=this._absoluteMax.clone(),i=Math.abs((e.x-t.x)/2),o=Math.abs((e.y-t.y)/2),n=Math.abs((e.z-t.z)/2),r=new L.Vector3(t.x+i,t.y+o,t.z+n),a=r.distanceTo(t);return new L.Sphere(r,a)}getMesh(){const t=new L.Box3(this._absoluteMin,this._absoluteMax),e=Tt.getDimensions(t),{width:i,height:o,depth:n,center:r}=e,a=new L.BoxGeometry(i,o,n),l=new L.Mesh(a);return this._meshes.push(l),l.position.copy(r),l}reset(){this._absoluteMin=Tt.newBound(!0),this._absoluteMax=Tt.newBound(!1)}add(t){for(const e of t.items)this.addMesh(e.mesh)}addMesh(t){if(!t.geometry.index)return;const e=Tt.getFragmentBounds(t);t.updateMatrixWorld();const i=t.matrixWorld,o=new L.Matrix4,n=t instanceof L.InstancedMesh,r=n?t.count:1;for(let a=0;a<r;a++){const l=e.min.clone(),E=e.max.clone();n&&(t.getMatrixAt(a,o),l.applyMatrix4(o),E.applyMatrix4(o)),l.applyMatrix4(i),E.applyMatrix4(i),l.x<this._absoluteMin.x&&(this._absoluteMin.x=l.x),l.y<this._absoluteMin.y&&(this._absoluteMin.y=l.y),l.z<this._absoluteMin.z&&(this._absoluteMin.z=l.z),l.x>this._absoluteMax.x&&(this._absoluteMax.x=l.x),l.y>this._absoluteMax.y&&(this._absoluteMax.y=l.y),l.z>this._absoluteMax.z&&(this._absoluteMax.z=l.z),E.x>this._absoluteMax.x&&(this._absoluteMax.x=E.x),E.y>this._absoluteMax.y&&(this._absoluteMax.y=E.y),E.z>this._absoluteMax.z&&(this._absoluteMax.z=E.z),E.x<this._absoluteMin.x&&(this._absoluteMin.x=E.x),E.y<this._absoluteMin.y&&(this._absoluteMin.y=E.y),E.z<this._absoluteMin.z&&(this._absoluteMin.z=E.z)}}static getFragmentBounds(t){const e=t.geometry.attributes.position,i=Number.MAX_VALUE,o=-i,n=new L.Vector3(i,i,i),r=new L.Vector3(o,o,o);if(!t.geometry.index)throw new Error("Geometry must be indexed!");const a=Array.from(t.geometry.index.array);for(let l=0;l<a.length;l++){if(l%3===0&&a[l]===0&&a[l+1]===0&&a[l+2]===0){l+=2;continue}const E=a[l],I=e.getX(E),h=e.getY(E),d=e.getZ(E);I<n.x&&(n.x=I),h<n.y&&(n.y=h),d<n.z&&(n.z=d),I>r.x&&(r.x=I),h>r.y&&(r.y=h),d>r.z&&(r.z=d)}return new L.Box3(n,r)}};f(Tt,"uuid","d1444724-dba6-4cdd-a0c7-68ee1450d166");let ri=Tt;const mn=new Set([1123145078,574549367,1675464909,2059837836,3798115385,32440307,3125803723,3207858831,2740243338,2624227202,4240577450,3615266464,3724593414,220341763,477187591,1878645084,1300840506,3303107099,1607154358,1878645084,846575682,1351298697,2417041796,3049322572,3331915920,1416205885,776857604,3285139300,3958052878,2827736869,2732653382,673634403,3448662350,4142052618,2924175390,803316827,2556980723,1809719519,2205249479,807026263,3737207727,1660063152,2347385850,3940055652,2705031697,3732776249,2485617015,2611217952,1704287377,2937912522,2770003689,1281925730,1484403080,3448662350,4142052618,3800577675,4006246654,3590301190,1383045692,2775532180,2047409740,370225590,3593883385,2665983363,4124623270,812098782,3649129432,987898635,1105321065,3510044353,1635779807,2603310189,3406155212,1310608509,4261334040,2736907675,3649129432,1136057603,1260505505,4182860854,2713105998,2898889636,59481748,3749851601,3486308946,3150382593,1062206242,3264961684,15328376,1485152156,370225590,1981873012,2859738748,45288368,2614616156,2732653382,775493141,2147822146,2601014836,2629017746,1186437898,2367409068,1213902940,3632507154,3900360178,476780140,1472233963,2804161546,3008276851,738692330,374418227,315944413,3905492369,3570813810,2571569899,178912537,2294589976,1437953363,2133299955,572779678,3092502836,388784114,2624227202,1425443689,3057273783,2347385850,1682466193,2519244187,2839578677,3958567839,2513912981,2830218821,427810014]);class Rn{async export(s,t,e=!1,i=!0){const o={},n=new Set(s.GetIfcEntityList(t)),r=new Set([b.IFCPROJECT,b.IFCSITE,b.IFCBUILDING,b.IFCBUILDINGSTOREY,b.IFCSPACE]);for(const a of r)n.add(a);for(const a of n){if(mn.has(a))continue;const l=r.has(a)&&i,E=s.GetLineIDsWithType(t,a);for(const I of E){const h=s.GetLine(0,I,l,e);o[h.expressID]=h}}return o}}const Fn={103090709:"IFCPROJECT",4097777520:"IFCSITE",4031249490:"IFCBUILDING",3124254112:"IFCBUILDINGSTOREY",3856911033:"IFCSPACE",1674181508:"IFCANNOTATION",25142252:"IFCCONTROLLER",32344328:"IFCBOILER",76236018:"IFCLAMP",90941305:"IFCPUMP",177149247:"IFCAIRTERMINALBOX",182646315:"IFCFLOWINSTRUMENT",263784265:"IFCFURNISHINGELEMENT",264262732:"IFCELECTRICGENERATOR",277319702:"IFCAUDIOVISUALAPPLIANCE",310824031:"IFCPIPEFITTING",331165859:"IFCSTAIR",342316401:"IFCDUCTFITTING",377706215:"IFCMECHANICALFASTENER",395920057:"IFCDOOR",402227799:"IFCELECTRICMOTOR",413509423:"IFCSYSTEMFURNITUREELEMENT",484807127:"IFCEVAPORATOR",486154966:"IFCWINDOWSTANDARDCASE",629592764:"IFCLIGHTFIXTURE",630975310:"IFCUNITARYCONTROLELEMENT",635142910:"IFCCABLECARRIERFITTING",639361253:"IFCCOIL",647756555:"IFCFASTENER",707683696:"IFCFLOWSTORAGEDEVICE",738039164:"IFCPROTECTIVEDEVICE",753842376:"IFCBEAM",812556717:"IFCTANK",819412036:"IFCFILTER",843113511:"IFCCOLUMN",862014818:"IFCELECTRICDISTRIBUTIONBOARD",900683007:"IFCFOOTING",905975707:"IFCCOLUMNSTANDARDCASE",926996030:"IFCVOIDINGFEATURE",979691226:"IFCREINFORCINGBAR",987401354:"IFCFLOWSEGMENT",1003880860:"IFCELECTRICTIMECONTROL",1051757585:"IFCCABLEFITTING",1052013943:"IFCDISTRIBUTIONCHAMBERELEMENT",1062813311:"IFCDISTRIBUTIONCONTROLELEMENT",1073191201:"IFCMEMBER",1095909175:"IFCBUILDINGELEMENTPROXY",1156407060:"IFCPLATESTANDARDCASE",1162798199:"IFCSWITCHINGDEVICE",1329646415:"IFCSHADINGDEVICE",1335981549:"IFCDISCRETEACCESSORY",1360408905:"IFCDUCTSILENCER",1404847402:"IFCSTACKTERMINAL",1426591983:"IFCFIRESUPPRESSIONTERMINAL",1437502449:"IFCMEDICALDEVICE",1509553395:"IFCFURNITURE",1529196076:"IFCSLAB",1620046519:"IFCTRANSPORTELEMENT",1634111441:"IFCAIRTERMINAL",1658829314:"IFCENERGYCONVERSIONDEVICE",1677625105:"IFCCIVILELEMENT",1687234759:"IFCPILE",1904799276:"IFCELECTRICAPPLIANCE",1911478936:"IFCMEMBERSTANDARDCASE",1945004755:"IFCDISTRIBUTIONELEMENT",1973544240:"IFCCOVERING",1999602285:"IFCSPACEHEATER",2016517767:"IFCROOF",2056796094:"IFCAIRTOAIRHEATRECOVERY",2058353004:"IFCFLOWCONTROLLER",2068733104:"IFCHUMIDIFIER",2176052936:"IFCJUNCTIONBOX",2188021234:"IFCFLOWMETER",2223149337:"IFCFLOWTERMINAL",2262370178:"IFCRAILING",2272882330:"IFCCONDENSER",2295281155:"IFCPROTECTIVEDEVICETRIPPINGUNIT",2320036040:"IFCREINFORCINGMESH",2347447852:"IFCTENDONANCHOR",2391383451:"IFCVIBRATIONISOLATOR",2391406946:"IFCWALL",2474470126:"IFCMOTORCONNECTION",2769231204:"IFCVIRTUALELEMENT",2814081492:"IFCENGINE",2906023776:"IFCBEAMSTANDARDCASE",2938176219:"IFCBURNER",2979338954:"IFCBUILDINGELEMENTPART",3024970846:"IFCRAMP",3026737570:"IFCTUBEBUNDLE",3027962421:"IFCSLABSTANDARDCASE",3040386961:"IFCDISTRIBUTIONFLOWELEMENT",3053780830:"IFCSANITARYTERMINAL",3079942009:"IFCOPENINGSTANDARDCASE",3087945054:"IFCALARM",3101698114:"IFCSURFACEFEATURE",3127900445:"IFCSLABELEMENTEDCASE",3132237377:"IFCFLOWMOVINGDEVICE",3171933400:"IFCPLATE",3221913625:"IFCCOMMUNICATIONSAPPLIANCE",3242481149:"IFCDOORSTANDARDCASE",3283111854:"IFCRAMPFLIGHT",3296154744:"IFCCHIMNEY",3304561284:"IFCWINDOW",3310460725:"IFCELECTRICFLOWSTORAGEDEVICE",3319311131:"IFCHEATEXCHANGER",3415622556:"IFCFAN",3420628829:"IFCSOLARDEVICE",3493046030:"IFCGEOGRAPHICELEMENT",3495092785:"IFCCURTAINWALL",3508470533:"IFCFLOWTREATMENTDEVICE",3512223829:"IFCWALLSTANDARDCASE",3518393246:"IFCDUCTSEGMENT",3571504051:"IFCCOMPRESSOR",3588315303:"IFCOPENINGELEMENT",3612865200:"IFCPIPESEGMENT",3640358203:"IFCCOOLINGTOWER",3651124850:"IFCPROJECTIONELEMENT",3694346114:"IFCOUTLET",3747195512:"IFCEVAPORATIVECOOLER",3758799889:"IFCCABLECARRIERSEGMENT",3824725483:"IFCTENDON",3825984169:"IFCTRANSFORMER",3902619387:"IFCCHILLER",4074379575:"IFCDAMPER",4086658281:"IFCSENSOR",4123344466:"IFCELEMENTASSEMBLY",4136498852:"IFCCOOLEDBEAM",4156078855:"IFCWALLELEMENTEDCASE",4175244083:"IFCINTERCEPTOR",4207607924:"IFCVALVE",4217484030:"IFCCABLESEGMENT",4237592921:"IFCWASTETERMINAL",4252922144:"IFCSTAIRFLIGHT",4278956645:"IFCFLOWFITTING",4288193352:"IFCACTUATOR",4292641817:"IFCUNITARYEQUIPMENT",3009204131:"IFCGRID"};class Ir{getAll(s,t){const e={},i=Object.keys(Fn).map(o=>parseInt(o,10));for(let o=0;o<i.length;o++){const n=i[o],r=s.GetLineIDsWithType(t,n),a=r.size();for(let l=0;l<a;l++)e[r.get(l)]=n}return e}}const fi={950732822:"IFCURIREFERENCE",4075327185:"IFCTIME",1209108979:"IFCTEMPERATURERATEOFCHANGEMEASURE",3457685358:"IFCSOUNDPRESSURELEVELMEASURE",4157543285:"IFCSOUNDPOWERLEVELMEASURE",2798247006:"IFCPROPERTYSETDEFINITIONSET",1790229001:"IFCPOSITIVEINTEGER",525895558:"IFCNONNEGATIVELENGTHMEASURE",1774176899:"IFCLINEINDEX",1275358634:"IFCLANGUAGEID",2541165894:"IFCDURATION",3701338814:"IFCDAYINWEEKNUMBER",2195413836:"IFCDATETIME",937566702:"IFCDATE",1683019596:"IFCCARDINALPOINTREFERENCE",2314439260:"IFCBINARY",1500781891:"IFCAREADENSITYMEASURE",3683503648:"IFCARCINDEX",4065007721:"IFCYEARNUMBER",1718600412:"IFCWARPINGMOMENTMEASURE",51269191:"IFCWARPINGCONSTANTMEASURE",2593997549:"IFCVOLUMETRICFLOWRATEMEASURE",3458127941:"IFCVOLUMEMEASURE",3345633955:"IFCVAPORPERMEABILITYMEASURE",1278329552:"IFCTORQUEMEASURE",2591213694:"IFCTIMESTAMP",2726807636:"IFCTIMEMEASURE",743184107:"IFCTHERMODYNAMICTEMPERATUREMEASURE",2016195849:"IFCTHERMALTRANSMITTANCEMEASURE",857959152:"IFCTHERMALRESISTANCEMEASURE",2281867870:"IFCTHERMALEXPANSIONCOEFFICIENTMEASURE",2645777649:"IFCTHERMALCONDUCTIVITYMEASURE",232962298:"IFCTHERMALADMITTANCEMEASURE",296282323:"IFCTEXTTRANSFORMATION",603696268:"IFCTEXTFONTNAME",3490877962:"IFCTEXTDECORATION",1460886941:"IFCTEXTALIGNMENT",2801250643:"IFCTEXT",58845555:"IFCTEMPERATUREGRADIENTMEASURE",361837227:"IFCSPECULARROUGHNESS",2757832317:"IFCSPECULAREXPONENT",3477203348:"IFCSPECIFICHEATCAPACITYMEASURE",993287707:"IFCSOUNDPRESSUREMEASURE",846465480:"IFCSOUNDPOWERMEASURE",3471399674:"IFCSOLIDANGLEMEASURE",408310005:"IFCSHEARMODULUSMEASURE",2190458107:"IFCSECTIONALAREAINTEGRALMEASURE",3467162246:"IFCSECTIONMODULUSMEASURE",2766185779:"IFCSECONDINMINUTE",3211557302:"IFCROTATIONALSTIFFNESSMEASURE",1755127002:"IFCROTATIONALMASSMEASURE",2133746277:"IFCROTATIONALFREQUENCYMEASURE",200335297:"IFCREAL",96294661:"IFCRATIOMEASURE",3972513137:"IFCRADIOACTIVITYMEASURE",3665567075:"IFCPRESSUREMEASURE",2169031380:"IFCPRESENTABLETEXT",1364037233:"IFCPOWERMEASURE",1245737093:"IFCPOSITIVERATIOMEASURE",3054510233:"IFCPOSITIVEPLANEANGLEMEASURE",2815919920:"IFCPOSITIVELENGTHMEASURE",4042175685:"IFCPLANEANGLEMEASURE",2642773653:"IFCPLANARFORCEMEASURE",2260317790:"IFCPARAMETERVALUE",929793134:"IFCPHMEASURE",2395907400:"IFCNUMERICMEASURE",2095195183:"IFCNORMALISEDRATIOMEASURE",765770214:"IFCMONTHINYEARNUMBER",2615040989:"IFCMONETARYMEASURE",3114022597:"IFCMOMENTOFINERTIAMEASURE",1648970520:"IFCMOLECULARWEIGHTMEASURE",3177669450:"IFCMOISTUREDIFFUSIVITYMEASURE",1753493141:"IFCMODULUSOFSUBGRADEREACTIONMEASURE",1052454078:"IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE",2173214787:"IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE",3341486342:"IFCMODULUSOFELASTICITYMEASURE",102610177:"IFCMINUTEINHOUR",3531705166:"IFCMASSPERLENGTHMEASURE",3124614049:"IFCMASSMEASURE",4017473158:"IFCMASSFLOWRATEMEASURE",1477762836:"IFCMASSDENSITYMEASURE",2486716878:"IFCMAGNETICFLUXMEASURE",286949696:"IFCMAGNETICFLUXDENSITYMEASURE",151039812:"IFCLUMINOUSINTENSITYMEASURE",2755797622:"IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE",2095003142:"IFCLUMINOUSFLUXMEASURE",503418787:"IFCLOGICAL",3086160713:"IFCLINEARVELOCITYMEASURE",1307019551:"IFCLINEARSTIFFNESSMEASURE",2128979029:"IFCLINEARMOMENTMEASURE",191860431:"IFCLINEARFORCEMEASURE",1243674935:"IFCLENGTHMEASURE",3258342251:"IFCLABEL",2054016361:"IFCKINEMATICVISCOSITYMEASURE",3192672207:"IFCISOTHERMALMOISTURECAPACITYMEASURE",3686016028:"IFCIONCONCENTRATIONMEASURE",3809634241:"IFCINTEGERCOUNTRATEMEASURE",1939436016:"IFCINTEGER",2679005408:"IFCINDUCTANCEMEASURE",3358199106:"IFCILLUMINANCEMEASURE",983778844:"IFCIDENTIFIER",2589826445:"IFCHOURINDAY",1158859006:"IFCHEATINGVALUEMEASURE",3113092358:"IFCHEATFLUXDENSITYMEASURE",3064340077:"IFCGLOBALLYUNIQUEID",3044325142:"IFCFREQUENCYMEASURE",1361398929:"IFCFORCEMEASURE",2590844177:"IFCFONTWEIGHT",2715512545:"IFCFONTVARIANT",1102727119:"IFCFONTSTYLE",2078135608:"IFCENERGYMEASURE",2506197118:"IFCELECTRICVOLTAGEMEASURE",2951915441:"IFCELECTRICRESISTANCEMEASURE",3790457270:"IFCELECTRICCURRENTMEASURE",2093906313:"IFCELECTRICCONDUCTANCEMEASURE",3818826038:"IFCELECTRICCHARGEMEASURE",1827137117:"IFCELECTRICCAPACITANCEMEASURE",69416015:"IFCDYNAMICVISCOSITYMEASURE",524656162:"IFCDOSEEQUIVALENTMEASURE",4134073009:"IFCDIMENSIONCOUNT",1514641115:"IFCDESCRIPTIVEMEASURE",300323983:"IFCDAYLIGHTSAVINGHOUR",86635668:"IFCDAYINMONTHNUMBER",94842927:"IFCCURVATUREMEASURE",1778710042:"IFCCOUNTMEASURE",3238673880:"IFCCONTEXTDEPENDENTMEASURE",3812528620:"IFCCOMPOUNDPLANEANGLEMEASURE",2991860651:"IFCCOMPLEXNUMBER",1867003952:"IFCBOXALIGNMENT",2735952531:"IFCBOOLEAN",2650437152:"IFCAREAMEASURE",632304761:"IFCANGULARVELOCITYMEASURE",360377573:"IFCAMOUNTOFSUBSTANCEMEASURE",4182062534:"IFCACCELERATIONMEASURE",3699917729:"IFCABSORBEDDOSEMEASURE",1971632696:"IFCGEOSLICE",2680139844:"IFCGEOMODEL",24726584:"IFCELECTRICFLOWTREATMENTDEVICE",3693000487:"IFCDISTRIBUTIONBOARD",3460952963:"IFCCONVEYORSEGMENT",3999819293:"IFCCAISSONFOUNDATION",3314249567:"IFCBOREHOLE",4196446775:"IFCBEARING",325726236:"IFCALIGNMENT",3425753595:"IFCTRACKELEMENT",991950508:"IFCSIGNAL",3798194928:"IFCREINFORCEDSOIL",3290496277:"IFCRAIL",1383356374:"IFCPAVEMENT",2182337498:"IFCNAVIGATIONELEMENT",234836483:"IFCMOORINGDEVICE",2078563270:"IFCMOBILETELECOMMUNICATIONSAPPLIANCE",1638804497:"IFCLIQUIDTERMINAL",1154579445:"IFCLINEARPOSITIONINGELEMENT",2696325953:"IFCKERB",2713699986:"IFCGEOTECHNICALASSEMBLY",2142170206:"IFCELECTRICFLOWTREATMENTDEVICETYPE",3376911765:"IFCEARTHWORKSFILL",1077100507:"IFCEARTHWORKSELEMENT",3071239417:"IFCEARTHWORKSCUT",479945903:"IFCDISTRIBUTIONBOARDTYPE",3426335179:"IFCDEEPFOUNDATION",1502416096:"IFCCOURSE",2940368186:"IFCCONVEYORSEGMENTTYPE",3203706013:"IFCCAISSONFOUNDATIONTYPE",3862327254:"IFCBUILTSYSTEM",1876633798:"IFCBUILTELEMENT",963979645:"IFCBRIDGEPART",644574406:"IFCBRIDGE",3649138523:"IFCBEARINGTYPE",1662888072:"IFCALIGNMENTVERTICAL",317615605:"IFCALIGNMENTSEGMENT",1545765605:"IFCALIGNMENTHORIZONTAL",4266260250:"IFCALIGNMENTCANT",3956297820:"IFCVIBRATIONDAMPERTYPE",1530820697:"IFCVIBRATIONDAMPER",840318589:"IFCVEHICLE",1953115116:"IFCTRANSPORTATIONDEVICE",618700268:"IFCTRACKELEMENTTYPE",2281632017:"IFCTENDONCONDUITTYPE",3663046924:"IFCTENDONCONDUIT",42703149:"IFCSINESPIRAL",1894708472:"IFCSIGNALTYPE",3599934289:"IFCSIGNTYPE",33720170:"IFCSIGN",1027922057:"IFCSEVENTHORDERPOLYNOMIALSPIRAL",544395925:"IFCSEGMENTEDREFERENCECURVE",3649235739:"IFCSECONDORDERPOLYNOMIALSPIRAL",550521510:"IFCROADPART",146592293:"IFCROAD",3818125796:"IFCRELADHERESTOELEMENT",4021432810:"IFCREFERENT",1891881377:"IFCRAILWAYPART",3992365140:"IFCRAILWAY",1763565496:"IFCRAILTYPE",1946335990:"IFCPOSITIONINGELEMENT",514975943:"IFCPAVEMENTTYPE",506776471:"IFCNAVIGATIONELEMENTTYPE",710110818:"IFCMOORINGDEVICETYPE",1950438474:"IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE",976884017:"IFCMARINEPART",525669439:"IFCMARINEFACILITY",1770583370:"IFCLIQUIDTERMINALTYPE",2176059722:"IFCLINEARELEMENT",679976338:"IFCKERBTYPE",3948183225:"IFCIMPACTPROTECTIONDEVICETYPE",2568555532:"IFCIMPACTPROTECTIONDEVICE",2898700619:"IFCGRADIENTCURVE",1594536857:"IFCGEOTECHNICALSTRATUM",4230923436:"IFCGEOTECHNICALELEMENT",4228831410:"IFCFACILITYPARTCOMMON",1310830890:"IFCFACILITYPART",24185140:"IFCFACILITY",4234616927:"IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID",1306400036:"IFCDEEPFOUNDATIONTYPE",4189326743:"IFCCOURSETYPE",2000195564:"IFCCOSINESPIRAL",3497074424:"IFCCLOTHOID",1626504194:"IFCBUILTELEMENTTYPE",3651464721:"IFCVEHICLETYPE",1229763772:"IFCTRIANGULATEDIRREGULARNETWORK",3665877780:"IFCTRANSPORTATIONDEVICETYPE",782932809:"IFCTHIRDORDERPOLYNOMIALSPIRAL",2735484536:"IFCSPIRAL",1356537516:"IFCSECTIONEDSURFACE",1290935644:"IFCSECTIONEDSOLIDHORIZONTAL",1862484736:"IFCSECTIONEDSOLID",1441486842:"IFCRELPOSITIONS",1033248425:"IFCRELASSOCIATESPROFILEDEF",3381221214:"IFCPOLYNOMIALCURVE",2485787929:"IFCOFFSETCURVEBYDISTANCES",590820931:"IFCOFFSETCURVE",3465909080:"IFCINDEXEDPOLYGONALTEXTUREMAP",593015953:"IFCDIRECTRIXCURVESWEPTAREASOLID",4212018352:"IFCCURVESEGMENT",3425423356:"IFCAXIS2PLACEMENTLINEAR",823603102:"IFCSEGMENT",2165702409:"IFCPOINTBYDISTANCEEXPRESSION",182550632:"IFCOPENCROSSPROFILEDEF",388784114:"IFCLINEARPLACEMENT",536804194:"IFCALIGNMENTHORIZONTALSEGMENT",3752311538:"IFCALIGNMENTCANTSEGMENT",1010789467:"IFCTEXTURECOORDINATEINDICESWITHVOIDS",222769930:"IFCTEXTURECOORDINATEINDICES",2691318326:"IFCQUANTITYNUMBER",3633395639:"IFCALIGNMENTVERTICALSEGMENT",2879124712:"IFCALIGNMENTPARAMETERSEGMENT",25142252:"IFCCONTROLLER",3087945054:"IFCALARM",4288193352:"IFCACTUATOR",630975310:"IFCUNITARYCONTROLELEMENT",4086658281:"IFCSENSOR",2295281155:"IFCPROTECTIVEDEVICETRIPPINGUNIT",182646315:"IFCFLOWINSTRUMENT",1426591983:"IFCFIRESUPPRESSIONTERMINAL",819412036:"IFCFILTER",3415622556:"IFCFAN",1003880860:"IFCELECTRICTIMECONTROL",402227799:"IFCELECTRICMOTOR",264262732:"IFCELECTRICGENERATOR",3310460725:"IFCELECTRICFLOWSTORAGEDEVICE",862014818:"IFCELECTRICDISTRIBUTIONBOARD",1904799276:"IFCELECTRICAPPLIANCE",1360408905:"IFCDUCTSILENCER",3518393246:"IFCDUCTSEGMENT",342316401:"IFCDUCTFITTING",562808652:"IFCDISTRIBUTIONCIRCUIT",4074379575:"IFCDAMPER",3640358203:"IFCCOOLINGTOWER",4136498852:"IFCCOOLEDBEAM",2272882330:"IFCCONDENSER",3571504051:"IFCCOMPRESSOR",3221913625:"IFCCOMMUNICATIONSAPPLIANCE",639361253:"IFCCOIL",3902619387:"IFCCHILLER",4217484030:"IFCCABLESEGMENT",1051757585:"IFCCABLEFITTING",3758799889:"IFCCABLECARRIERSEGMENT",635142910:"IFCCABLECARRIERFITTING",2938176219:"IFCBURNER",32344328:"IFCBOILER",2906023776:"IFCBEAMSTANDARDCASE",277319702:"IFCAUDIOVISUALAPPLIANCE",2056796094:"IFCAIRTOAIRHEATRECOVERY",177149247:"IFCAIRTERMINALBOX",1634111441:"IFCAIRTERMINAL",486154966:"IFCWINDOWSTANDARDCASE",4237592921:"IFCWASTETERMINAL",4156078855:"IFCWALLELEMENTEDCASE",4207607924:"IFCVALVE",4292641817:"IFCUNITARYEQUIPMENT",3179687236:"IFCUNITARYCONTROLELEMENTTYPE",3026737570:"IFCTUBEBUNDLE",3825984169:"IFCTRANSFORMER",812556717:"IFCTANK",1162798199:"IFCSWITCHINGDEVICE",385403989:"IFCSTRUCTURALLOADCASE",1404847402:"IFCSTACKTERMINAL",1999602285:"IFCSPACEHEATER",3420628829:"IFCSOLARDEVICE",3027962421:"IFCSLABSTANDARDCASE",3127900445:"IFCSLABELEMENTEDCASE",1329646415:"IFCSHADINGDEVICE",3053780830:"IFCSANITARYTERMINAL",2572171363:"IFCREINFORCINGBARTYPE",1232101972:"IFCRATIONALBSPLINECURVEWITHKNOTS",90941305:"IFCPUMP",655969474:"IFCPROTECTIVEDEVICETRIPPINGUNITTYPE",738039164:"IFCPROTECTIVEDEVICE",1156407060:"IFCPLATESTANDARDCASE",3612865200:"IFCPIPESEGMENT",310824031:"IFCPIPEFITTING",3694346114:"IFCOUTLET",144952367:"IFCOUTERBOUNDARYCURVE",2474470126:"IFCMOTORCONNECTION",1911478936:"IFCMEMBERSTANDARDCASE",1437502449:"IFCMEDICALDEVICE",629592764:"IFCLIGHTFIXTURE",76236018:"IFCLAMP",2176052936:"IFCJUNCTIONBOX",4175244083:"IFCINTERCEPTOR",2068733104:"IFCHUMIDIFIER",3319311131:"IFCHEATEXCHANGER",2188021234:"IFCFLOWMETER",1209101575:"IFCEXTERNALSPATIALELEMENT",484807127:"IFCEVAPORATOR",3747195512:"IFCEVAPORATIVECOOLER",2814081492:"IFCENGINE",2417008758:"IFCELECTRICDISTRIBUTIONBOARDTYPE",3242481149:"IFCDOORSTANDARDCASE",3205830791:"IFCDISTRIBUTIONSYSTEM",400855858:"IFCCOMMUNICATIONSAPPLIANCETYPE",905975707:"IFCCOLUMNSTANDARDCASE",1677625105:"IFCCIVILELEMENT",3296154744:"IFCCHIMNEY",2674252688:"IFCCABLEFITTINGTYPE",2188180465:"IFCBURNERTYPE",1177604601:"IFCBUILDINGSYSTEM",39481116:"IFCBUILDINGELEMENTPARTTYPE",1136057603:"IFCBOUNDARYCURVE",2461110595:"IFCBSPLINECURVEWITHKNOTS",1532957894:"IFCAUDIOVISUALAPPLIANCETYPE",4088093105:"IFCWORKCALENDAR",4009809668:"IFCWINDOWTYPE",926996030:"IFCVOIDINGFEATURE",2391383451:"IFCVIBRATIONISOLATOR",2415094496:"IFCTENDONTYPE",3081323446:"IFCTENDONANCHORTYPE",413509423:"IFCSYSTEMFURNITUREELEMENT",3101698114:"IFCSURFACEFEATURE",3657597509:"IFCSTRUCTURALSURFACEACTION",2757150158:"IFCSTRUCTURALCURVEREACTION",1004757350:"IFCSTRUCTURALCURVEACTION",338393293:"IFCSTAIRTYPE",1072016465:"IFCSOLARDEVICETYPE",4074543187:"IFCSHADINGDEVICETYPE",2157484638:"IFCSEAMCURVE",2781568857:"IFCROOFTYPE",2310774935:"IFCREINFORCINGMESHTYPE",964333572:"IFCREINFORCINGELEMENTTYPE",683857671:"IFCRATIONALBSPLINESURFACEWITHKNOTS",1469900589:"IFCRAMPTYPE",2839578677:"IFCPOLYGONALFACESET",1158309216:"IFCPILETYPE",3079942009:"IFCOPENINGSTANDARDCASE",1114901282:"IFCMEDICALDEVICETYPE",3113134337:"IFCINTERSECTIONCURVE",3946677679:"IFCINTERCEPTORTYPE",2571569899:"IFCINDEXEDPOLYCURVE",3493046030:"IFCGEOGRAPHICELEMENT",1509553395:"IFCFURNITURE",1893162501:"IFCFOOTINGTYPE",2853485674:"IFCEXTERNALSPATIALSTRUCTUREELEMENT",4148101412:"IFCEVENT",132023988:"IFCENGINETYPE",2397081782:"IFCELEMENTASSEMBLYTYPE",2323601079:"IFCDOORTYPE",1213902940:"IFCCYLINDRICALSURFACE",1525564444:"IFCCONSTRUCTIONPRODUCTRESOURCETYPE",4105962743:"IFCCONSTRUCTIONMATERIALRESOURCETYPE",2185764099:"IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE",15328376:"IFCCOMPOSITECURVEONSURFACE",3875453745:"IFCCOMPLEXPROPERTYTEMPLATE",3893394355:"IFCCIVILELEMENTTYPE",2197970202:"IFCCHIMNEYTYPE",167062518:"IFCBSPLINESURFACEWITHKNOTS",2887950389:"IFCBSPLINESURFACE",2603310189:"IFCADVANCEDBREPWITHVOIDS",1635779807:"IFCADVANCEDBREP",2916149573:"IFCTRIANGULATEDFACESET",1935646853:"IFCTOROIDALSURFACE",2387106220:"IFCTESSELLATEDFACESET",3206491090:"IFCTASKTYPE",699246055:"IFCSURFACECURVE",4095615324:"IFCSUBCONTRACTRESOURCETYPE",603775116:"IFCSTRUCTURALSURFACEREACTION",4015995234:"IFCSPHERICALSURFACE",2481509218:"IFCSPATIALZONETYPE",463610769:"IFCSPATIALZONE",710998568:"IFCSPATIALELEMENTTYPE",1412071761:"IFCSPATIALELEMENT",3663146110:"IFCSIMPLEPROPERTYTEMPLATE",3243963512:"IFCREVOLVEDAREASOLIDTAPERED",816062949:"IFCREPARAMETRISEDCOMPOSITECURVESEGMENT",1521410863:"IFCRELSPACEBOUNDARY2NDLEVEL",3523091289:"IFCRELSPACEBOUNDARY1STLEVEL",427948657:"IFCRELINTERFERESELEMENTS",307848117:"IFCRELDEFINESBYTEMPLATE",1462361463:"IFCRELDEFINESBYOBJECT",2565941209:"IFCRELDECLARES",1027710054:"IFCRELASSIGNSTOGROUPBYFACTOR",3521284610:"IFCPROPERTYTEMPLATE",492091185:"IFCPROPERTYSETTEMPLATE",653396225:"IFCPROJECTLIBRARY",569719735:"IFCPROCEDURETYPE",3967405729:"IFCPREDEFINEDPROPERTYSET",1682466193:"IFCPCURVE",428585644:"IFCLABORRESOURCETYPE",2294589976:"IFCINDEXEDPOLYGONALFACEWITHVOIDS",178912537:"IFCINDEXEDPOLYGONALFACE",4095422895:"IFCGEOGRAPHICELEMENTTYPE",2652556860:"IFCFIXEDREFERENCESWEPTAREASOLID",2804161546:"IFCEXTRUDEDAREASOLIDTAPERED",4024345920:"IFCEVENTTYPE",2629017746:"IFCCURVEBOUNDEDSURFACE",1815067380:"IFCCREWRESOURCETYPE",3419103109:"IFCCONTEXT",2574617495:"IFCCONSTRUCTIONRESOURCETYPE",2059837836:"IFCCARTESIANPOINTLIST3D",1675464909:"IFCCARTESIANPOINTLIST2D",574549367:"IFCCARTESIANPOINTLIST",3406155212:"IFCADVANCEDFACE",3698973494:"IFCTYPERESOURCE",3736923433:"IFCTYPEPROCESS",901063453:"IFCTESSELLATEDITEM",1096409881:"IFCSWEPTDISKSOLIDPOLYGONAL",1042787934:"IFCRESOURCETIME",1608871552:"IFCRESOURCECONSTRAINTRELATIONSHIP",2943643501:"IFCRESOURCEAPPROVALRELATIONSHIP",2090586900:"IFCQUANTITYSET",1482703590:"IFCPROPERTYTEMPLATEDEFINITION",3778827333:"IFCPREDEFINEDPROPERTIES",2998442950:"IFCMIRROREDPROFILEDEF",853536259:"IFCMATERIALRELATIONSHIP",3404854881:"IFCMATERIALPROFILESETUSAGETAPERING",3079605661:"IFCMATERIALPROFILESETUSAGE",2852063980:"IFCMATERIALCONSTITUENTSET",3708119e3:"IFCMATERIALCONSTITUENT",1585845231:"IFCLAGTIME",2133299955:"IFCINDEXEDTRIANGLETEXTUREMAP",1437953363:"IFCINDEXEDTEXTUREMAP",3570813810:"IFCINDEXEDCOLOURMAP",1437805879:"IFCEXTERNALREFERENCERELATIONSHIP",297599258:"IFCEXTENDEDPROPERTIES",211053100:"IFCEVENTTIME",2713554722:"IFCCONVERSIONBASEDUNITWITHOFFSET",3285139300:"IFCCOLOURRGBLIST",1236880293:"IFCWORKTIME",1199560280:"IFCTIMEPERIOD",3611470254:"IFCTEXTUREVERTEXLIST",2771591690:"IFCTASKTIMERECURRING",1549132990:"IFCTASKTIME",2043862942:"IFCTABLECOLUMN",2934153892:"IFCSURFACEREINFORCEMENTAREA",609421318:"IFCSTRUCTURALLOADORRESULT",3478079324:"IFCSTRUCTURALLOADCONFIGURATION",1054537805:"IFCSCHEDULINGTIME",2439245199:"IFCRESOURCELEVELRELATIONSHIP",2433181523:"IFCREFERENCE",3915482550:"IFCRECURRENCEPATTERN",986844984:"IFCPROPERTYABSTRACTION",3843373140:"IFCPROJECTEDCRS",677532197:"IFCPRESENTATIONITEM",1507914824:"IFCMATERIALUSAGEDEFINITION",552965576:"IFCMATERIALPROFILEWITHOFFSETS",164193824:"IFCMATERIALPROFILESET",2235152071:"IFCMATERIALPROFILE",1847252529:"IFCMATERIALLAYERWITHOFFSETS",760658860:"IFCMATERIALDEFINITION",3057273783:"IFCMAPCONVERSION",4294318154:"IFCEXTERNALINFORMATION",1466758467:"IFCCOORDINATEREFERENCESYSTEM",1785450214:"IFCCOORDINATEOPERATION",775493141:"IFCCONNECTIONVOLUMEGEOMETRY",979691226:"IFCREINFORCINGBAR",3700593921:"IFCELECTRICDISTRIBUTIONPOINT",1062813311:"IFCDISTRIBUTIONCONTROLELEMENT",1052013943:"IFCDISTRIBUTIONCHAMBERELEMENT",578613899:"IFCCONTROLLERTYPE",2454782716:"IFCCHAMFEREDGEFEATURE",753842376:"IFCBEAM",3001207471:"IFCALARMTYPE",2874132201:"IFCACTUATORTYPE",3304561284:"IFCWINDOW",3512223829:"IFCWALLSTANDARDCASE",2391406946:"IFCWALL",3313531582:"IFCVIBRATIONISOLATORTYPE",2347447852:"IFCTENDONANCHOR",3824725483:"IFCTENDON",2515109513:"IFCSTRUCTURALANALYSISMODEL",4252922144:"IFCSTAIRFLIGHT",331165859:"IFCSTAIR",1529196076:"IFCSLAB",1783015770:"IFCSENSORTYPE",1376911519:"IFCROUNDEDEDGEFEATURE",2016517767:"IFCROOF",2320036040:"IFCREINFORCINGMESH",3027567501:"IFCREINFORCINGELEMENT",3055160366:"IFCRATIONALBEZIERCURVE",3283111854:"IFCRAMPFLIGHT",3024970846:"IFCRAMP",2262370178:"IFCRAILING",3171933400:"IFCPLATE",1687234759:"IFCPILE",1073191201:"IFCMEMBER",900683007:"IFCFOOTING",3508470533:"IFCFLOWTREATMENTDEVICE",2223149337:"IFCFLOWTERMINAL",707683696:"IFCFLOWSTORAGEDEVICE",987401354:"IFCFLOWSEGMENT",3132237377:"IFCFLOWMOVINGDEVICE",4037862832:"IFCFLOWINSTRUMENTTYPE",4278956645:"IFCFLOWFITTING",2058353004:"IFCFLOWCONTROLLER",4222183408:"IFCFIRESUPPRESSIONTERMINALTYPE",1810631287:"IFCFILTERTYPE",346874300:"IFCFANTYPE",1658829314:"IFCENERGYCONVERSIONDEVICE",857184966:"IFCELECTRICALELEMENT",1634875225:"IFCELECTRICALCIRCUIT",712377611:"IFCELECTRICTIMECONTROLTYPE",1217240411:"IFCELECTRICMOTORTYPE",1365060375:"IFCELECTRICHEATERTYPE",1534661035:"IFCELECTRICGENERATORTYPE",3277789161:"IFCELECTRICFLOWSTORAGEDEVICETYPE",663422040:"IFCELECTRICAPPLIANCETYPE",855621170:"IFCEDGEFEATURE",2030761528:"IFCDUCTSILENCERTYPE",3760055223:"IFCDUCTSEGMENTTYPE",869906466:"IFCDUCTFITTINGTYPE",395920057:"IFCDOOR",3041715199:"IFCDISTRIBUTIONPORT",3040386961:"IFCDISTRIBUTIONFLOWELEMENT",1945004755:"IFCDISTRIBUTIONELEMENT",2063403501:"IFCDISTRIBUTIONCONTROLELEMENTTYPE",1599208980:"IFCDISTRIBUTIONCHAMBERELEMENTTYPE",2635815018:"IFCDISCRETEACCESSORYTYPE",1335981549:"IFCDISCRETEACCESSORY",4147604152:"IFCDIAMETERDIMENSION",3961806047:"IFCDAMPERTYPE",3495092785:"IFCCURTAINWALL",1973544240:"IFCCOVERING",2954562838:"IFCCOOLINGTOWERTYPE",335055490:"IFCCOOLEDBEAMTYPE",488727124:"IFCCONSTRUCTIONPRODUCTRESOURCE",1060000209:"IFCCONSTRUCTIONMATERIALRESOURCE",3898045240:"IFCCONSTRUCTIONEQUIPMENTRESOURCE",1163958913:"IFCCONDITIONCRITERION",2188551683:"IFCCONDITION",2816379211:"IFCCONDENSERTYPE",3850581409:"IFCCOMPRESSORTYPE",843113511:"IFCCOLUMN",2301859152:"IFCCOILTYPE",2611217952:"IFCCIRCLE",2951183804:"IFCCHILLERTYPE",1285652485:"IFCCABLESEGMENTTYPE",3293546465:"IFCCABLECARRIERSEGMENTTYPE",395041908:"IFCCABLECARRIERFITTINGTYPE",1909888760:"IFCBUILDINGELEMENTPROXYTYPE",1095909175:"IFCBUILDINGELEMENTPROXY",2979338954:"IFCBUILDINGELEMENTPART",52481810:"IFCBUILDINGELEMENTCOMPONENT",3299480353:"IFCBUILDINGELEMENT",231477066:"IFCBOILERTYPE",1916977116:"IFCBEZIERCURVE",819618141:"IFCBEAMTYPE",1967976161:"IFCBSPLINECURVE",3460190687:"IFCASSET",2470393545:"IFCANGULARDIMENSION",1871374353:"IFCAIRTOAIRHEATRECOVERYTYPE",3352864051:"IFCAIRTERMINALTYPE",1411407467:"IFCAIRTERMINALBOXTYPE",3821786052:"IFCACTIONREQUEST",1213861670:"IFC2DCOMPOSITECURVE",1033361043:"IFCZONE",3342526732:"IFCWORKSCHEDULE",4218914973:"IFCWORKPLAN",1028945134:"IFCWORKCONTROL",1133259667:"IFCWASTETERMINALTYPE",1898987631:"IFCWALLTYPE",2769231204:"IFCVIRTUALELEMENT",728799441:"IFCVALVETYPE",1911125066:"IFCUNITARYEQUIPMENTTYPE",1600972822:"IFCTUBEBUNDLETYPE",3593883385:"IFCTRIMMEDCURVE",1620046519:"IFCTRANSPORTELEMENT",1692211062:"IFCTRANSFORMERTYPE",1637806684:"IFCTIMESERIESSCHEDULE",5716631:"IFCTANKTYPE",2254336722:"IFCSYSTEM",2315554128:"IFCSWITCHINGDEVICETYPE",148013059:"IFCSUBCONTRACTRESOURCE",1975003073:"IFCSTRUCTURALSURFACECONNECTION",2986769608:"IFCSTRUCTURALRESULTGROUP",1235345126:"IFCSTRUCTURALPOINTREACTION",734778138:"IFCSTRUCTURALPOINTCONNECTION",2082059205:"IFCSTRUCTURALPOINTACTION",3987759626:"IFCSTRUCTURALPLANARACTIONVARYING",1621171031:"IFCSTRUCTURALPLANARACTION",1252848954:"IFCSTRUCTURALLOADGROUP",1721250024:"IFCSTRUCTURALLINEARACTIONVARYING",1807405624:"IFCSTRUCTURALLINEARACTION",2445595289:"IFCSTRUCTURALCURVEMEMBERVARYING",214636428:"IFCSTRUCTURALCURVEMEMBER",4243806635:"IFCSTRUCTURALCURVECONNECTION",1179482911:"IFCSTRUCTURALCONNECTION",682877961:"IFCSTRUCTURALACTION",1039846685:"IFCSTAIRFLIGHTTYPE",3112655638:"IFCSTACKTERMINALTYPE",3812236995:"IFCSPACETYPE",652456506:"IFCSPACEPROGRAM",1305183839:"IFCSPACEHEATERTYPE",3856911033:"IFCSPACE",2533589738:"IFCSLABTYPE",4097777520:"IFCSITE",4105383287:"IFCSERVICELIFE",3517283431:"IFCSCHEDULETIMECONTROL",1768891740:"IFCSANITARYTERMINALTYPE",2863920197:"IFCRELASSIGNSTASKS",160246688:"IFCRELAGGREGATES",2324767716:"IFCRAMPFLIGHTTYPE",2893384427:"IFCRAILINGTYPE",3248260540:"IFCRADIUSDIMENSION",2250791053:"IFCPUMPTYPE",1842657554:"IFCPROTECTIVEDEVICETYPE",3651124850:"IFCPROJECTIONELEMENT",3642467123:"IFCPROJECTORDERRECORD",2904328755:"IFCPROJECTORDER",2744685151:"IFCPROCEDURE",3740093272:"IFCPORT",3724593414:"IFCPOLYLINE",4017108033:"IFCPLATETYPE",4231323485:"IFCPIPESEGMENTTYPE",804291784:"IFCPIPEFITTINGTYPE",3327091369:"IFCPERMIT",2382730787:"IFCPERFORMANCEHISTORY",2837617999:"IFCOUTLETTYPE",3425660407:"IFCORDERACTION",3588315303:"IFCOPENINGELEMENT",4143007308:"IFCOCCUPANT",1916936684:"IFCMOVE",977012517:"IFCMOTORCONNECTIONTYPE",3181161470:"IFCMEMBERTYPE",2108223431:"IFCMECHANICALFASTENERTYPE",377706215:"IFCMECHANICALFASTENER",2506943328:"IFCLINEARDIMENSION",1161773419:"IFCLIGHTFIXTURETYPE",1051575348:"IFCLAMPTYPE",3827777499:"IFCLABORRESOURCE",4288270099:"IFCJUNCTIONBOXTYPE",2391368822:"IFCINVENTORY",1806887404:"IFCHUMIDIFIERTYPE",1251058090:"IFCHEATEXCHANGERTYPE",2706460486:"IFCGROUP",3009204131:"IFCGRID",200128114:"IFCGASTERMINALTYPE",814719939:"IFCFURNITURESTANDARD",263784265:"IFCFURNISHINGELEMENT",3009222698:"IFCFLOWTREATMENTDEVICETYPE",2297155007:"IFCFLOWTERMINALTYPE",1339347760:"IFCFLOWSTORAGEDEVICETYPE",1834744321:"IFCFLOWSEGMENTTYPE",1482959167:"IFCFLOWMOVINGDEVICETYPE",3815607619:"IFCFLOWMETERTYPE",3198132628:"IFCFLOWFITTINGTYPE",3907093117:"IFCFLOWCONTROLLERTYPE",1287392070:"IFCFEATUREELEMENTSUBTRACTION",2143335405:"IFCFEATUREELEMENTADDITION",2827207264:"IFCFEATUREELEMENT",2489546625:"IFCFASTENERTYPE",647756555:"IFCFASTENER",3737207727:"IFCFACETEDBREPWITHVOIDS",807026263:"IFCFACETEDBREP",3390157468:"IFCEVAPORATORTYPE",3174744832:"IFCEVAPORATIVECOOLERTYPE",3272907226:"IFCEQUIPMENTSTANDARD",1962604670:"IFCEQUIPMENTELEMENT",2107101300:"IFCENERGYCONVERSIONDEVICETYPE",1704287377:"IFCELLIPSE",2590856083:"IFCELEMENTCOMPONENTTYPE",1623761950:"IFCELEMENTCOMPONENT",4123344466:"IFCELEMENTASSEMBLY",1758889154:"IFCELEMENT",360485395:"IFCELECTRICALBASEPROPERTIES",3849074793:"IFCDISTRIBUTIONFLOWELEMENTTYPE",3256556792:"IFCDISTRIBUTIONELEMENTTYPE",681481545:"IFCDIMENSIONCURVEDIRECTEDCALLOUT",1457835157:"IFCCURTAINWALLTYPE",3295246426:"IFCCREWRESOURCE",1916426348:"IFCCOVERINGTYPE",1419761937:"IFCCOSTSCHEDULE",3895139033:"IFCCOSTITEM",3293443760:"IFCCONTROL",2559216714:"IFCCONSTRUCTIONRESOURCE",2510884976:"IFCCONIC",3732776249:"IFCCOMPOSITECURVE",300633059:"IFCCOLUMNTYPE",2937912522:"IFCCIRCLEHOLLOWPROFILEDEF",3124254112:"IFCBUILDINGSTOREY",1950629157:"IFCBUILDINGELEMENTTYPE",4031249490:"IFCBUILDING",1260505505:"IFCBOUNDEDCURVE",3649129432:"IFCBOOLEANCLIPPINGRESULT",1334484129:"IFCBLOCK",3207858831:"IFCASYMMETRICISHAPEPROFILEDEF",1674181508:"IFCANNOTATION",2296667514:"IFCACTOR",2097647324:"IFCTRANSPORTELEMENTTYPE",3473067441:"IFCTASK",1580310250:"IFCSYSTEMFURNITUREELEMENTTYPE",4124788165:"IFCSURFACEOFREVOLUTION",2809605785:"IFCSURFACEOFLINEAREXTRUSION",2028607225:"IFCSURFACECURVESWEPTAREASOLID",4070609034:"IFCSTRUCTUREDDIMENSIONCALLOUT",2218152070:"IFCSTRUCTURALSURFACEMEMBERVARYING",3979015343:"IFCSTRUCTURALSURFACEMEMBER",3689010777:"IFCSTRUCTURALREACTION",530289379:"IFCSTRUCTURALMEMBER",3136571912:"IFCSTRUCTURALITEM",3544373492:"IFCSTRUCTURALACTIVITY",451544542:"IFCSPHERE",3893378262:"IFCSPATIALSTRUCTUREELEMENTTYPE",2706606064:"IFCSPATIALSTRUCTUREELEMENT",3626867408:"IFCRIGHTCIRCULARCYLINDER",4158566097:"IFCRIGHTCIRCULARCONE",1856042241:"IFCREVOLVEDAREASOLID",2914609552:"IFCRESOURCE",1401173127:"IFCRELVOIDSELEMENT",3451746338:"IFCRELSPACEBOUNDARY",366585022:"IFCRELSERVICESBUILDINGS",4122056220:"IFCRELSEQUENCE",1058617721:"IFCRELSCHEDULESCOSTITEMS",1245217292:"IFCRELREFERENCEDINSPATIALSTRUCTURE",750771296:"IFCRELPROJECTSELEMENT",202636808:"IFCRELOVERRIDESPROPERTIES",2051452291:"IFCRELOCCUPIESSPACES",3268803585:"IFCRELNESTS",4189434867:"IFCRELINTERACTIONREQUIREMENTS",279856033:"IFCRELFLOWCONTROLELEMENTS",3940055652:"IFCRELFILLSELEMENT",781010003:"IFCRELDEFINESBYTYPE",4186316022:"IFCRELDEFINESBYPROPERTIES",693640335:"IFCRELDEFINES",2551354335:"IFCRELDECOMPOSES",2802773753:"IFCRELCOVERSSPACES",886880790:"IFCRELCOVERSBLDGELEMENTS",3242617779:"IFCRELCONTAINEDINSPATIALSTRUCTURE",3678494232:"IFCRELCONNECTSWITHREALIZINGELEMENTS",504942748:"IFCRELCONNECTSWITHECCENTRICITY",1638771189:"IFCRELCONNECTSSTRUCTURALMEMBER",3912681535:"IFCRELCONNECTSSTRUCTURALELEMENT",2127690289:"IFCRELCONNECTSSTRUCTURALACTIVITY",3190031847:"IFCRELCONNECTSPORTS",4201705270:"IFCRELCONNECTSPORTTOELEMENT",3945020480:"IFCRELCONNECTSPATHELEMENTS",1204542856:"IFCRELCONNECTSELEMENTS",826625072:"IFCRELCONNECTS",2851387026:"IFCRELASSOCIATESPROFILEPROPERTIES",2655215786:"IFCRELASSOCIATESMATERIAL",3840914261:"IFCRELASSOCIATESLIBRARY",982818633:"IFCRELASSOCIATESDOCUMENT",2728634034:"IFCRELASSOCIATESCONSTRAINT",919958153:"IFCRELASSOCIATESCLASSIFICATION",4095574036:"IFCRELASSOCIATESAPPROVAL",1327628568:"IFCRELASSOCIATESAPPLIEDVALUE",1865459582:"IFCRELASSOCIATES",205026976:"IFCRELASSIGNSTORESOURCE",3372526763:"IFCRELASSIGNSTOPROJECTORDER",2857406711:"IFCRELASSIGNSTOPRODUCT",4278684876:"IFCRELASSIGNSTOPROCESS",1307041759:"IFCRELASSIGNSTOGROUP",2495723537:"IFCRELASSIGNSTOCONTROL",1683148259:"IFCRELASSIGNSTOACTOR",3939117080:"IFCRELASSIGNS",3454111270:"IFCRECTANGULARTRIMMEDSURFACE",2798486643:"IFCRECTANGULARPYRAMID",2770003689:"IFCRECTANGLEHOLLOWPROFILEDEF",3219374653:"IFCPROXY",1451395588:"IFCPROPERTYSET",4194566429:"IFCPROJECTIONCURVE",103090709:"IFCPROJECT",4208778838:"IFCPRODUCT",2945172077:"IFCPROCESS",220341763:"IFCPLANE",603570806:"IFCPLANARBOX",3566463478:"IFCPERMEABLECOVERINGPROPERTIES",3505215534:"IFCOFFSETCURVE3D",3388369263:"IFCOFFSETCURVE2D",3888040117:"IFCOBJECT",1425443689:"IFCMANIFOLDSOLIDBREP",1281925730:"IFCLINE",572779678:"IFCLSHAPEPROFILEDEF",1484403080:"IFCISHAPEPROFILEDEF",987898635:"IFCGEOMETRICCURVESET",1268542332:"IFCFURNITURETYPE",4238390223:"IFCFURNISHINGELEMENTTYPE",3455213021:"IFCFLUIDFLOWPROPERTIES",315944413:"IFCFILLAREASTYLETILES",4203026998:"IFCFILLAREASTYLETILESYMBOLWITHSTYLE",374418227:"IFCFILLAREASTYLEHATCHING",2047409740:"IFCFACEBASEDSURFACEMODEL",477187591:"IFCEXTRUDEDAREASOLID",80994333:"IFCENERGYPROPERTIES",2835456948:"IFCELLIPSEPROFILEDEF",2777663545:"IFCELEMENTARYSURFACE",339256511:"IFCELEMENTTYPE",1883228015:"IFCELEMENTQUANTITY",1472233963:"IFCEDGELOOP",4006246654:"IFCDRAUGHTINGPREDEFINEDCURVEFONT",445594917:"IFCDRAUGHTINGPREDEFINEDCOLOUR",3073041342:"IFCDRAUGHTINGCALLOUT",526551008:"IFCDOORSTYLE",1714330368:"IFCDOORPANELPROPERTIES",2963535650:"IFCDOORLININGPROPERTIES",32440307:"IFCDIRECTION",4054601972:"IFCDIMENSIONCURVETERMINATOR",606661476:"IFCDIMENSIONCURVE",693772133:"IFCDEFINEDSYMBOL",2827736869:"IFCCURVEBOUNDEDPLANE",2601014836:"IFCCURVE",2147822146:"IFCCSGSOLID",2506170314:"IFCCSGPRIMITIVE3D",194851669:"IFCCRANERAILFSHAPEPROFILEDEF",4133800736:"IFCCRANERAILASHAPEPROFILEDEF",2485617015:"IFCCOMPOSITECURVESEGMENT",2205249479:"IFCCLOSEDSHELL",1383045692:"IFCCIRCLEPROFILEDEF",1416205885:"IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM",3331915920:"IFCCARTESIANTRANSFORMATIONOPERATOR3D",3486308946:"IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM",3749851601:"IFCCARTESIANTRANSFORMATIONOPERATOR2D",59481748:"IFCCARTESIANTRANSFORMATIONOPERATOR",1123145078:"IFCCARTESIANPOINT",2898889636:"IFCCSHAPEPROFILEDEF",2713105998:"IFCBOXEDHALFSPACE",2581212453:"IFCBOUNDINGBOX",4182860854:"IFCBOUNDEDSURFACE",2736907675:"IFCBOOLEANRESULT",2740243338:"IFCAXIS2PLACEMENT3D",3125803723:"IFCAXIS2PLACEMENT2D",4261334040:"IFCAXIS1PLACEMENT",1302238472:"IFCANNOTATIONSURFACE",2265737646:"IFCANNOTATIONFILLAREAOCCURRENCE",669184980:"IFCANNOTATIONFILLAREA",3288037868:"IFCANNOTATIONCURVEOCCURRENCE",2543172580:"IFCZSHAPEPROFILEDEF",1299126871:"IFCWINDOWSTYLE",512836454:"IFCWINDOWPANELPROPERTIES",336235671:"IFCWINDOWLININGPROPERTIES",2759199220:"IFCVERTEXLOOP",1417489154:"IFCVECTOR",427810014:"IFCUSHAPEPROFILEDEF",2347495698:"IFCTYPEPRODUCT",1628702193:"IFCTYPEOBJECT",1345879162:"IFCTWODIRECTIONREPEATFACTOR",2715220739:"IFCTRAPEZIUMPROFILEDEF",3124975700:"IFCTEXTLITERALWITHEXTENT",4282788508:"IFCTEXTLITERAL",3028897424:"IFCTERMINATORSYMBOL",3071757647:"IFCTSHAPEPROFILEDEF",230924584:"IFCSWEPTSURFACE",1260650574:"IFCSWEPTDISKSOLID",2247615214:"IFCSWEPTAREASOLID",1878645084:"IFCSURFACESTYLERENDERING",2513912981:"IFCSURFACE",2233826070:"IFCSUBEDGE",3653947884:"IFCSTRUCTURALSTEELPROFILEPROPERTIES",3843319758:"IFCSTRUCTURALPROFILEPROPERTIES",1190533807:"IFCSTRUCTURALLOADSINGLEFORCEWARPING",1597423693:"IFCSTRUCTURALLOADSINGLEFORCE",1973038258:"IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION",2473145415:"IFCSTRUCTURALLOADSINGLEDISPLACEMENT",2668620305:"IFCSTRUCTURALLOADPLANARFORCE",1595516126:"IFCSTRUCTURALLOADLINEARFORCE",390701378:"IFCSPACETHERMALLOADPROPERTIES",1202362311:"IFCSOUNDVALUE",2485662743:"IFCSOUNDPROPERTIES",723233188:"IFCSOLIDMODEL",2609359061:"IFCSLIPPAGECONNECTIONCONDITION",4124623270:"IFCSHELLBASEDSURFACEMODEL",2411513650:"IFCSERVICELIFEFACTOR",1509187699:"IFCSECTIONEDSPINE",2778083089:"IFCROUNDEDRECTANGLEPROFILEDEF",478536968:"IFCRELATIONSHIP",3765753017:"IFCREINFORCEMENTDEFINITIONPROPERTIES",3413951693:"IFCREGULARTIMESERIES",3615266464:"IFCRECTANGLEPROFILEDEF",110355661:"IFCPROPERTYTABLEVALUE",3650150729:"IFCPROPERTYSINGLEVALUE",3357820518:"IFCPROPERTYSETDEFINITION",941946838:"IFCPROPERTYREFERENCEVALUE",2752243245:"IFCPROPERTYLISTVALUE",4166981789:"IFCPROPERTYENUMERATEDVALUE",1680319473:"IFCPROPERTYDEFINITION",871118103:"IFCPROPERTYBOUNDEDVALUE",673634403:"IFCPRODUCTDEFINITIONSHAPE",179317114:"IFCPREDEFINEDPOINTMARKERSYMBOL",433424934:"IFCPREDEFINEDDIMENSIONSYMBOL",2559016684:"IFCPREDEFINEDCURVEFONT",759155922:"IFCPREDEFINEDCOLOUR",2775532180:"IFCPOLYGONALBOUNDEDHALFSPACE",2924175390:"IFCPOLYLOOP",1423911732:"IFCPOINTONSURFACE",4022376103:"IFCPOINTONCURVE",2067069095:"IFCPOINT",1663979128:"IFCPLANAREXTENT",2004835150:"IFCPLACEMENT",597895409:"IFCPIXELTEXTURE",3021840470:"IFCPHYSICALCOMPLEXQUANTITY",2519244187:"IFCPATH",2529465313:"IFCPARAMETERIZEDPROFILEDEF",1029017970:"IFCORIENTEDEDGE",2665983363:"IFCOPENSHELL",2833995503:"IFCONEDIRECTIONREPEATFACTOR",219451334:"IFCOBJECTDEFINITION",1430189142:"IFCMECHANICALCONCRETEMATERIALPROPERTIES",2022407955:"IFCMATERIALDEFINITIONREPRESENTATION",2347385850:"IFCMAPPEDITEM",1008929658:"IFCLOOP",2624227202:"IFCLOCALPLACEMENT",3422422726:"IFCLIGHTSOURCESPOT",1520743889:"IFCLIGHTSOURCEPOSITIONAL",4266656042:"IFCLIGHTSOURCEGONIOMETRIC",2604431987:"IFCLIGHTSOURCEDIRECTIONAL",125510826:"IFCLIGHTSOURCEAMBIENT",1402838566:"IFCLIGHTSOURCE",3741457305:"IFCIRREGULARTIMESERIES",3905492369:"IFCIMAGETEXTURE",2445078500:"IFCHYGROSCOPICMATERIALPROPERTIES",812098782:"IFCHALFSPACESOLID",178086475:"IFCGRIDPLACEMENT",3590301190:"IFCGEOMETRICSET",4142052618:"IFCGEOMETRICREPRESENTATIONSUBCONTEXT",2453401579:"IFCGEOMETRICREPRESENTATIONITEM",3448662350:"IFCGEOMETRICREPRESENTATIONCONTEXT",1446786286:"IFCGENERALPROFILEPROPERTIES",803998398:"IFCGENERALMATERIALPROPERTIES",3857492461:"IFCFUELPROPERTIES",738692330:"IFCFILLAREASTYLE",4219587988:"IFCFAILURECONNECTIONCONDITION",3008276851:"IFCFACESURFACE",803316827:"IFCFACEOUTERBOUND",1809719519:"IFCFACEBOUND",2556980723:"IFCFACE",1860660968:"IFCEXTENDEDMATERIALPROPERTIES",476780140:"IFCEDGECURVE",3900360178:"IFCEDGE",4170525392:"IFCDRAUGHTINGPREDEFINEDTEXTFONT",3732053477:"IFCDOCUMENTREFERENCE",1694125774:"IFCDIMENSIONPAIR",2273265877:"IFCDIMENSIONCALLOUTRELATIONSHIP",3632507154:"IFCDERIVEDPROFILEDEF",3800577675:"IFCCURVESTYLE",2889183280:"IFCCONVERSIONBASEDUNIT",3050246964:"IFCCONTEXTDEPENDENTUNIT",45288368:"IFCCONNECTIONPOINTECCENTRICITY",1981873012:"IFCCONNECTIONCURVEGEOMETRY",370225590:"IFCCONNECTEDFACESET",1485152156:"IFCCOMPOSITEPROFILEDEF",2542286263:"IFCCOMPLEXPROPERTY",776857604:"IFCCOLOURRGB",647927063:"IFCCLASSIFICATIONREFERENCE",3150382593:"IFCCENTERLINEPROFILEDEF",616511568:"IFCBLOBTEXTURE",2705031697:"IFCARBITRARYPROFILEDEFWITHVOIDS",1310608509:"IFCARBITRARYOPENPROFILEDEF",3798115385:"IFCARBITRARYCLOSEDPROFILEDEF",2297822566:"IFCANNOTATIONTEXTOCCURRENCE",3612888222:"IFCANNOTATIONSYMBOLOCCURRENCE",962685235:"IFCANNOTATIONSURFACEOCCURRENCE",2442683028:"IFCANNOTATIONOCCURRENCE",1065908215:"IFCWATERPROPERTIES",891718957:"IFCVIRTUALGRIDINTERSECTION",1907098498:"IFCVERTEXPOINT",3304826586:"IFCVERTEXBASEDTEXTUREMAP",2799835756:"IFCVERTEX",180925521:"IFCUNITASSIGNMENT",1735638870:"IFCTOPOLOGYREPRESENTATION",1377556343:"IFCTOPOLOGICALREPRESENTATIONITEM",581633288:"IFCTIMESERIESVALUE",1718945513:"IFCTIMESERIESREFERENCERELATIONSHIP",3101149627:"IFCTIMESERIES",3317419933:"IFCTHERMALMATERIALPROPERTIES",1210645708:"IFCTEXTUREVERTEX",2552916305:"IFCTEXTUREMAP",1742049831:"IFCTEXTURECOORDINATEGENERATOR",280115917:"IFCTEXTURECOORDINATE",1484833681:"IFCTEXTSTYLEWITHBOXCHARACTERISTICS",1640371178:"IFCTEXTSTYLETEXTMODEL",2636378356:"IFCTEXTSTYLEFORDEFINEDFONT",1983826977:"IFCTEXTSTYLEFONTMODEL",1447204868:"IFCTEXTSTYLE",912023232:"IFCTELECOMADDRESS",531007025:"IFCTABLEROW",985171141:"IFCTABLE",1290481447:"IFCSYMBOLSTYLE",626085974:"IFCSURFACETEXTURE",1351298697:"IFCSURFACESTYLEWITHTEXTURES",846575682:"IFCSURFACESTYLESHADING",1607154358:"IFCSURFACESTYLEREFRACTION",3303107099:"IFCSURFACESTYLELIGHTING",1300840506:"IFCSURFACESTYLE",3049322572:"IFCSTYLEDREPRESENTATION",3958052878:"IFCSTYLEDITEM",2830218821:"IFCSTYLEMODEL",3408363356:"IFCSTRUCTURALLOADTEMPERATURE",2525727697:"IFCSTRUCTURALLOADSTATIC",2162789131:"IFCSTRUCTURALLOAD",2273995522:"IFCSTRUCTURALCONNECTIONCONDITION",3692461612:"IFCSIMPLEPROPERTY",4240577450:"IFCSHAPEREPRESENTATION",3982875396:"IFCSHAPEMODEL",867548509:"IFCSHAPEASPECT",4165799628:"IFCSECTIONREINFORCEMENTPROPERTIES",2042790032:"IFCSECTIONPROPERTIES",448429030:"IFCSIUNIT",2341007311:"IFCROOT",3679540991:"IFCRIBPLATEPROFILEPROPERTIES",1660063152:"IFCREPRESENTATIONMAP",3008791417:"IFCREPRESENTATIONITEM",3377609919:"IFCREPRESENTATIONCONTEXT",1076942058:"IFCREPRESENTATION",1222501353:"IFCRELAXATION",1580146022:"IFCREINFORCEMENTBARPROPERTIES",2692823254:"IFCREFERENCESVALUEDOCUMENT",825690147:"IFCQUANTITYWEIGHT",2405470396:"IFCQUANTITYVOLUME",3252649465:"IFCQUANTITYTIME",931644368:"IFCQUANTITYLENGTH",2093928680:"IFCQUANTITYCOUNT",2044713172:"IFCQUANTITYAREA",3710013099:"IFCPROPERTYENUMERATION",148025276:"IFCPROPERTYDEPENDENCYRELATIONSHIP",3896028662:"IFCPROPERTYCONSTRAINTRELATIONSHIP",2598011224:"IFCPROPERTY",2802850158:"IFCPROFILEPROPERTIES",3958567839:"IFCPROFILEDEF",2267347899:"IFCPRODUCTSOFCOMBUSTIONPROPERTIES",2095639259:"IFCPRODUCTREPRESENTATION",2417041796:"IFCPRESENTATIONSTYLEASSIGNMENT",3119450353:"IFCPRESENTATIONSTYLE",1304840413:"IFCPRESENTATIONLAYERWITHSTYLE",2022622350:"IFCPRESENTATIONLAYERASSIGNMENT",1775413392:"IFCPREDEFINEDTEXTFONT",3213052703:"IFCPREDEFINEDTERMINATORSYMBOL",990879717:"IFCPREDEFINEDSYMBOL",3727388367:"IFCPREDEFINEDITEM",3355820592:"IFCPOSTALADDRESS",2226359599:"IFCPHYSICALSIMPLEQUANTITY",2483315170:"IFCPHYSICALQUANTITY",101040310:"IFCPERSONANDORGANIZATION",2077209135:"IFCPERSON",1207048766:"IFCOWNERHISTORY",1411181986:"IFCORGANIZATIONRELATIONSHIP",4251960020:"IFCORGANIZATION",1227763645:"IFCOPTICALMATERIALPROPERTIES",2251480897:"IFCOBJECTIVE",3701648758:"IFCOBJECTPLACEMENT",1918398963:"IFCNAMEDUNIT",2706619895:"IFCMONETARYUNIT",3368373690:"IFCMETRIC",677618848:"IFCMECHANICALSTEELMATERIALPROPERTIES",4256014907:"IFCMECHANICALMATERIALPROPERTIES",2597039031:"IFCMEASUREWITHUNIT",3265635763:"IFCMATERIALPROPERTIES",2199411900:"IFCMATERIALLIST",1303795690:"IFCMATERIALLAYERSETUSAGE",3303938423:"IFCMATERIALLAYERSET",248100487:"IFCMATERIALLAYER",1847130766:"IFCMATERIALCLASSIFICATIONRELATIONSHIP",1838606355:"IFCMATERIAL",30780891:"IFCLOCALTIME",1566485204:"IFCLIGHTINTENSITYDISTRIBUTION",4162380809:"IFCLIGHTDISTRIBUTIONDATA",3452421091:"IFCLIBRARYREFERENCE",2655187982:"IFCLIBRARYINFORMATION",3020489413:"IFCIRREGULARTIMESERIESVALUE",852622518:"IFCGRIDAXIS",3548104201:"IFCEXTERNALLYDEFINEDTEXTFONT",3207319532:"IFCEXTERNALLYDEFINEDSYMBOL",1040185647:"IFCEXTERNALLYDEFINEDSURFACESTYLE",2242383968:"IFCEXTERNALLYDEFINEDHATCHSTYLE",3200245327:"IFCEXTERNALREFERENCE",1648886627:"IFCENVIRONMENTALIMPACTVALUE",3796139169:"IFCDRAUGHTINGCALLOUTRELATIONSHIP",770865208:"IFCDOCUMENTINFORMATIONRELATIONSHIP",1154170062:"IFCDOCUMENTINFORMATION",1376555844:"IFCDOCUMENTELECTRONICFORMAT",2949456006:"IFCDIMENSIONALEXPONENTS",1045800335:"IFCDERIVEDUNITELEMENT",1765591967:"IFCDERIVEDUNIT",1072939445:"IFCDATEANDTIME",3510044353:"IFCCURVESTYLEFONTPATTERN",2367409068:"IFCCURVESTYLEFONTANDSCALING",1105321065:"IFCCURVESTYLEFONT",539742890:"IFCCURRENCYRELATIONSHIP",602808272:"IFCCOSTVALUE",1065062679:"IFCCOORDINATEDUNIVERSALTIMEOFFSET",347226245:"IFCCONSTRAINTRELATIONSHIP",613356794:"IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP",1658513725:"IFCCONSTRAINTAGGREGATIONRELATIONSHIP",1959218052:"IFCCONSTRAINT",2732653382:"IFCCONNECTIONSURFACEGEOMETRY",4257277454:"IFCCONNECTIONPORTGEOMETRY",2614616156:"IFCCONNECTIONPOINTGEOMETRY",2859738748:"IFCCONNECTIONGEOMETRY",3264961684:"IFCCOLOURSPECIFICATION",3639012971:"IFCCLASSIFICATIONNOTATIONFACET",938368621:"IFCCLASSIFICATIONNOTATION",1098599126:"IFCCLASSIFICATIONITEMRELATIONSHIP",1767535486:"IFCCLASSIFICATIONITEM",747523909:"IFCCLASSIFICATION",622194075:"IFCCALENDARDATE",2069777674:"IFCBOUNDARYNODECONDITIONWARPING",1387855156:"IFCBOUNDARYNODECONDITION",3367102660:"IFCBOUNDARYFACECONDITION",1560379544:"IFCBOUNDARYEDGECONDITION",4037036970:"IFCBOUNDARYCONDITION",3869604511:"IFCAPPROVALRELATIONSHIP",390851274:"IFCAPPROVALPROPERTYRELATIONSHIP",2080292479:"IFCAPPROVALACTORRELATIONSHIP",130549933:"IFCAPPROVAL",1110488051:"IFCAPPLIEDVALUERELATIONSHIP",411424972:"IFCAPPLIEDVALUE",639542469:"IFCAPPLICATION",618182010:"IFCADDRESS",3630933823:"IFCACTORROLE",599546466:"FILE_DESCRIPTION",1390159747:"FILE_NAME",1109904537:"FILE_SCHEMA"};class dt{static async getUnits(s){var n;const{IFCUNITASSIGNMENT:t}=b,e=await s.getAllPropertiesOfType(t);if(!e)return 1;const i=Object.keys(e),o=e[parseInt(i[0],10)];for(const r of o.Units){if(r.value===void 0||r.value===null)continue;const a=await s.getProperties(r.value);if(!a||!a.UnitType||!a.UnitType.value||a.UnitType.value!=="LENGTHUNIT")continue;let E=1,I=1;return a.Name.value==="METRE"&&(I=1),a.Name.value==="FOOT"&&(I=.3048),((n=a.Prefix)==null?void 0:n.value)==="MILLI"&&(E=.001),I*E}return 1}static async findItemByGuid(s,t){var i;const e=s.getAllPropertiesIDs();for(const o of e){const n=await s.getProperties(o);if(n&&((i=n.GlobalId)==null?void 0:i.value)===t)return n}return null}static async getRelationMap(s,t,e){var a;const o=e??(()=>{}),n={},r=s.getAllPropertiesIDs();for(const l of r){const E=await s.getProperties(l);if(!E)continue;const I=E.type===t,h=Object.keys(E).find(T=>T.startsWith("Relating")),d=Object.keys(E).find(T=>T.startsWith("Related"));if(!(I&&h&&d))continue;const p=await s.getProperties((a=E[h])==null?void 0:a.value),F=E[d];if(!p||!F||!(F&&Array.isArray(F)))continue;const A=F.map(T=>T.value);o(p.expressID,A),n[p.expressID]=A}return n}static async getQsetQuantities(s,t,e){const o=e??(()=>{}),n=await s.getProperties(t);return!n||n.type!==b.IFCELEMENTQUANTITY?null:(n.Quantities??[{}]).map(l=>(l.value&&o(l.value),l.value)).filter(l=>l!==null)}static async getPsetProps(s,t,e){const o=e??(()=>{}),n=await s.getProperties(t);return!n||n.type!==b.IFCPROPERTYSET?null:(n.HasProperties??[{}]).map(l=>(l.value&&o(l.value),l.value)).filter(l=>l!==null)}static async getPsetRel(s,t){var r;if(!await s.getProperties(t))return null;const i=await s.getAllPropertiesOfType(b.IFCRELDEFINESBYPROPERTIES);if(!i)return null;const o=Object.values(i);let n=null;for(const a of o)((r=a.RelatingPropertyDefinition)==null?void 0:r.value)===t&&(n=a.expressID);return n}static async getQsetRel(s,t){return dt.getPsetRel(s,t)}static async getEntityName(s,t){var n;const e=await s.getProperties(t);if(!e)return{key:null,name:null};const i=Object.keys(e).find(r=>r.endsWith("Name"))??null,o=i?(n=e[i])==null?void 0:n.value:null;return{key:i,name:o}}static async getQuantityValue(s,t){const e=await s.getProperties(t);if(!e)return{key:null,value:null};const i=Object.keys(e).find(n=>n.endsWith("Value"))??null;let o;return i===null||e[i]===void 0||e[i]===null?o=null:o=e[i].value,{key:i,value:o}}static isRel(s){return fi[s].startsWith("IFCREL")}static async attributeExists(s,t,e){const i=await s.getProperties(t);return i?Object.keys(i).includes(e):!1}static async groupEntitiesByType(s,t){var i;const e=new Map;for(const o of t){const n=await s.getProperties(o);if(!n)continue;const r=n.type;e.get(r)||e.set(r,new Set),(i=e.get(r))==null||i.add(o)}return e}}const fs=class fs extends st{constructor(t){super(t);f(this,"onDisposed",new U);f(this,"onFragmentsLoaded",new U);f(this,"onFragmentsDisposed",new U);f(this,"list",new Map);f(this,"groups",new Map);f(this,"enabled",!0);f(this,"baseCoordinationModel","");f(this,"_loader",new en.Serializer);this.components.add(fs.uuid,this)}get meshes(){const t=[];for(const[e,i]of this.list)t.push(i.mesh);return t}dispose(){for(const[t,e]of this.groups)e.dispose(!0);this.baseCoordinationModel="",this.groups.clear(),this.list.clear(),this.onFragmentsLoaded.reset(),this.onFragmentsDisposed.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}disposeGroup(t){const{uuid:e}=t,i=[];for(const o of t.items)i.push(o.id),this.list.delete(o.id);t.dispose(!0),this.groups.delete(t.uuid),this.onFragmentsDisposed.trigger({groupID:e,fragmentIDs:i})}load(t,e=!0){const i=this._loader.import(t);for(const o of i.items)o.group=i,this.list.set(o.id,o);return e&&this.coordinate([i]),this.groups.set(i.uuid,i),this.onFragmentsLoaded.trigger(i),i}export(t){return this._loader.export(t)}coordinate(t=Array.from(this.groups.values())){if(this.baseCoordinationModel.length===0){const o=t.pop();if(!o)return;this.baseCoordinationModel=o.uuid}if(!t.length)return;const i=this.groups.get(this.baseCoordinationModel);if(!i){console.log("No base model found for coordination!");return}for(const o of t)o!==i&&(o.position.set(0,0,0),o.rotation.set(0,0,0),o.scale.set(1,1,1),o.updateMatrix(),o.applyMatrix4(o.coordinationMatrix.clone().invert()),o.applyMatrix4(i.coordinationMatrix))}};f(fs,"uuid","fef46874-46a3-461b-8c44-2922ab77c806");let ut=fs;class dr extends st{constructor(t){super(t);f(this,"onFound",new U);f(this,"onDisposed",new U);f(this,"enabled",!0);f(this,"indexedModels",{});f(this,"_conditionFunctions");f(this,"_noHandleAttributes",["type"]);f(this,"onFragmentsDisposed",t=>{delete this.indexedModels[t.groupID]});this._conditionFunctions=this.getConditionFunctions(),t.get(ut).onFragmentsDisposed.add(this.onFragmentsDisposed)}dispose(){this.indexedModels={},this.onFound.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}async indexEntityRelations(t){const e={};await dt.getRelationMap(t,b.IFCRELDEFINESBYPROPERTIES,async(o,n)=>{e[o]||(e[o]=new Set);const r=[];await dt.getPsetProps(t,o,a=>{r.push(a),e[o].add(a),e[a]||(e[a]=new Set),e[a].add(o)});for(const a of n){e[o].add(a);for(const l of r)e[l].add(a);e[a]||(e[a]=new Set),e[a].add(a)}});const i=[b.IFCRELCONTAINEDINSPATIALSTRUCTURE,b.IFCRELDEFINESBYTYPE,b.IFCRELASSIGNSTOGROUP];for(const o of i)await dt.getRelationMap(t,o,async(n,r)=>{e[n]||(e[n]=new Set);for(const a of r)e[n].add(a),e[a]||(e[a]=new Set),e[a].add(a)});return this.indexedModels[t.uuid]=e,e}async find(t,e){const i=this.components.get(ut),o=e||i.groups.values(),n={};for(const a of o){let l=this.indexedModels[a.uuid];l||(l=await this.indexEntityRelations(a));let E=[];for(const[d,p]of t.entries()){const F=new Set,A=this.simpleQuery(a,p,F),T=[];for(const m of A){const O=l[m];if(O){T.push(m);for(const u of O)F.has(u)||T.push(u)}}E=p.operator==="AND"&&d>0?this.getCommonElements(E,T):[...E,...T]}const I=new Set;for(const[d]of a.data)E.includes(d)&&I.add(d);const h=new Set;for(const d of E)I.has(d)||h.add(d);n[a.uuid]={modelEntities:I,otherEntities:h}}const r=this.toFragmentMap(n);return this.onFound.trigger(r),r}toFragmentMap(t){const e=this.components.get(ut),i={};for(const o in t){const n=e.groups.get(o);if(!n)continue;const r=t[o].modelEntities;for(const a of r){const l=n.data.get(a);if(l)for(const E of l[0]){const I=n.keyFragments.get(E);if(!I)throw new Error("Fragment ID not found!");i[I]||(i[I]=new Set),i[I].add(a)}}}return i}simpleQuery(t,e,i){const o=t.getLocalProperties();if(!o)throw new Error("Model has no properties");let n={},r=0,a=[];for(const l of e.queries){let E=[];const I=l.operator==="AND"?n:o;if(l.condition){const d=this.getMatchingEntities(I,l,i);E=d.expressIDs,n={...n,...d.entities}}else E=[...this.simpleQuery(t,l,i)];a=r===0?E:this.combineArrays(a,E,l.operator??"AND"),r++}return new Set(a)}getMatchingEntities(t,e,i){const{attribute:o,condition:n}=e;let{value:r}=e;const a=!this._noHandleAttributes.includes(o),l=[],E=[];for(const I in t){const h=t[I];if(h===void 0)continue;const d=h[o];let p=a?d==null?void 0:d.value:d;if(p==null)continue;const F=typeof r,A=typeof p;F==="number"&&A==="string"?r=r.toString():F==="string"&&A==="number"&&(p=p.toString());let T=this._conditionFunctions[n](p,r);if(e.negateResult&&(T=!T),!T){e.negateResult&&i.add(h.expressID);continue}l.push(h.expressID),E.push(h)}return{expressIDs:l,entities:E,excludedItems:i}}combineArrays(t,e,i){return i?i==="AND"?this.arrayIntersection(t,e):this.arrayUnion(t,e):e}getCommonElements(...t){const e=[],i=new Map;for(const o of t){const n=new Set(o);for(const r of n)i.has(r)?i.set(r,i.get(r)+1):i.set(r,1)}for(const[o,n]of i)n===t.length&&e.push(o);return e}arrayIntersection(t,e){return t.filter(i=>e.includes(i))}arrayUnion(t,e){return[...t,...e]}getConditionFunctions(){return{is:(t,e)=>t===e,includes:(t,e)=>t.toString().includes(e.toString()),startsWith:(t,e)=>t.toString().startsWith(e.toString()),endsWith:(t,e)=>t.toString().endsWith(e.toString()),matches:(t,e)=>new RegExp(e.toString()).test(t.toString())}}}const Le=class Le extends st{constructor(t){super(t);f(this,"onDisposed",new U);f(this,"enabled",!0);f(this,"relationsToProcess",[b.IFCRELDEFINESBYPROPERTIES,b.IFCRELDEFINESBYTYPE,b.IFCRELASSOCIATESMATERIAL,b.IFCRELCONTAINEDINSPATIALSTRUCTURE,b.IFCRELASSOCIATESCLASSIFICATION,b.IFCRELASSIGNSTOGROUP]);f(this,"indexMap",{});f(this,"_propertiesManager",null);f(this,"onPropertiesManagerSet",new U);f(this,"onFragmentsDisposed",t=>{delete this.indexMap[t.groupID]});this.components.add(Le.uuid,this),t.get(ut).onFragmentsDisposed.add(this.onFragmentsDisposed)}set propertiesManager(t){this._propertiesManager||(this._propertiesManager=t,t&&(t.onElementToPset.add(async({model:e,psetID:i,elementID:o})=>{this.indexMap[e.uuid]&&this.setEntityIndex(e,o).add(i)}),this.onPropertiesManagerSet.trigger(t)))}get propertiesManager(){return this._propertiesManager}async dispose(){this.indexMap={},this.propertiesManager=null,this.onPropertiesManagerSet.reset(),this.components.get(ut).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(Le.uuid),this.onDisposed.reset()}async getProperties(t,e){if(!t.hasProperties)return null;const i=t.getLocalProperties();if(i===void 0)return null;const o=this.indexMap[t.uuid];if(!o)return null;const n=o[e],r=parseInt(e,10),a=await t.getProperties(r);if(!a)throw new Error("Properties not found!");const l=this.cloneProperty(a);if(!l)throw new Error("Properties not found!");const E=[l];if(n)for(const I of n){const h=await t.getProperties(I);if(!h)continue;const d=this.cloneProperty(h);d&&(this.getPsetProperties(d,i),this.getNestedPsets(d,i),E.push(d))}return E}getNestedPsets(t,e){if(t.HasPropertySets)for(const i of t.HasPropertySets){const o=i.value;i.value=this.cloneProperty(e[o]),this.getPsetProperties(i.value,e)}}getPsetProperties(t,e){if(t.HasProperties)for(const i of t.HasProperties){const o=i.value,n=this.cloneProperty(e[o]);i.value={...n}}}async process(t){if(!t.hasProperties)throw new Error("FragmentsGroup properties not found");this.indexMap[t.uuid]={};const e=[b.IFCPROPERTYSET,b.IFCELEMENTQUANTITY];for(const i of this.relationsToProcess)await dt.getRelationMap(t,i,async(o,n)=>{const r=await t.getProperties(o);if(r){e.includes(r.type)||this.setEntityIndex(t,o);for(const a of n)this.setEntityIndex(t,a).add(o)}})}setEntityIndex(t,e){return this.indexMap[t.uuid][e]||(this.indexMap[t.uuid][e]=new Set),this.indexMap[t.uuid][e]}cloneProperty(t,e={}){if(!t)return e;for(const i in t){const o=t[i],n=Array.isArray(o),r=typeof o=="object"&&!n&&o!==null;if(n){e[i]=[];const a=e[i];this.clonePropertyArray(o,a)}else if(r){e[i]={};const a=e[i];this.cloneProperty(o,a)}else e[i]=o}return e}clonePropertyArray(t,e){for(const i of t){const o=Array.isArray(i),n=typeof i=="object"&&!o&&i!==null;if(o){const r=[];e.push(r),this.clonePropertyArray(i,r)}else if(n){const r={};e.push(r),this.cloneProperty(i,r)}else e.push(i)}}};f(Le,"uuid","23a889ab-83b3-44a4-8bee-ead83438370b");let ai=Le;class ur{constructor(){f(this,"factor",1);f(this,"complement",1)}apply(s){const e=this.getScaleMatrix().multiply(s);s.copy(e)}setUp(s){var o;this.factor=1;const t=this.getLengthUnits(s);if(!t)return;const e=t==null,i=t.Name===void 0||t.Name===null;e||i||(t.Name.value==="FOOT"?this.factor=.3048:((o=t.Prefix)==null?void 0:o.value)==="MILLI"&&(this.complement=.001))}getLengthUnits(s){try{const e=s.GetLineIDsWithType(0,b.IFCUNITASSIGNMENT).get(0),i=s.GetLine(0,e);for(const o of i.Units){if(!o||o.value===null||o.value===void 0)continue;const n=s.GetLine(0,o.value);if(n.UnitType&&n.UnitType.value==="LENGTHUNIT")return n}return null}catch{return console.log("Could not get units"),null}}getScaleMatrix(){const s=this.factor;return new L.Matrix4().fromArray([s,0,0,0,0,s,0,0,0,0,s,0,0,0,0,1])}}class An{constructor(){f(this,"itemsByFloor",{});f(this,"_units",new ur)}setUp(s){this._units.setUp(s),this.cleanUp();try{const t=s.GetLineIDsWithType(0,b.IFCRELCONTAINEDINSPATIALSTRUCTURE),e=new Set,i=s.GetLineIDsWithType(0,b.IFCSPACE);for(let l=0;l<i.size();l++)e.add(i.get(l));const o=s.GetLineIDsWithType(0,b.IFCRELAGGREGATES),n=o.size();for(let l=0;l<n;l++){const E=o.get(l),I=s.GetLine(0,E);if(!I||!I.RelatingObject||!I.RelatedObjects)continue;const h=I.RelatingObject.value,d=I.RelatedObjects;for(const p of d){const F=p.value;e.has(F)&&(this.itemsByFloor[F]=h)}}const r={},a=t.size();for(let l=0;l<a;l++){const E=t.get(l),I=s.GetLine(0,E);if(!I||!I.RelatingStructure||!I.RelatedElements)continue;const h=I.RelatingStructure.value,d=I.RelatedElements;if(e.has(h))for(const p of d){r[h]||(r[h]=[]);const F=p.value;r[h].push(F)}else for(const p of d){const F=p.value;this.itemsByFloor[F]=h}}for(const l in r){const E=this.itemsByFloor[l];if(E!==void 0){const I=r[l];for(const h of I)this.itemsByFloor[h]=E}}for(let l=0;l<n;l++){const E=o.get(l),I=s.GetLine(0,E);if(!I||!I.RelatingObject||!I.RelatedObjects)continue;const h=I.RelatingObject.value,d=I.RelatedObjects;for(const p of d){const F=p.value,A=this.itemsByFloor[h];A!==void 0&&(this.itemsByFloor[F]=A)}}}catch{console.log("Could not get floors.")}}cleanUp(){this.itemsByFloor={}}}class Ci{constructor(){f(this,"includeProperties",!0);f(this,"optionalCategories",[b.IFCSPACE]);f(this,"coordinate",!0);f(this,"wasm",{path:"",absolute:!1,logLevel:b.LogLevel.LOG_LEVEL_OFF});f(this,"excludedCategories",new Set);f(this,"saveLocations",!1);f(this,"webIfc",{COORDINATE_TO_ORIGIN:!0,OPTIMIZE_PROFILES:!0});f(this,"autoSetWasm",!0);f(this,"customLocateFileHandler",null)}}class On{constructor(){f(this,"defLineMat",new L.LineBasicMaterial({color:16777215}))}read(s){const t=s.GetAllAlignments(0),e=s.GetAllCrossSections2D(0),i=s.GetAllCrossSections3D(0),o={IfcAlignment:t,IfcCrossSection2D:e,IfcCrossSection3D:i};return this.get(o)}get(s){if(s.IfcAlignment){const t=new Map;for(const e of s.IfcAlignment){const i=new Ht.Alignment;i.absolute=this.getCurves(e.curve3D,i),i.horizontal=this.getCurves(e.horizontal,i),i.vertical=this.getCurves(e.vertical,i),t.set(t.size,i)}return{alignments:t,coordinationMatrix:new L.Matrix4}}}getCurves(s,t){const e=[];let i=0;for(const o of s){const n={};if(o.data)for(const h of o.data){const[d,p]=h.split(": "),F=parseFloat(p);n[d]=F||p}const{points:r}=o,a=new Float32Array(r.length*3);for(let h=0;h<r.length;h++){const{x:d,y:p,z:F}=r[h];a[h*3]=d,a[h*3+1]=p,a[h*3+2]=F||0}const l=new L.BufferAttribute(a,3),E=new L.EdgesGeometry;E.setAttribute("position",l);const I=new Ht.CurveMesh(i,n,t,E,this.defLineMat);e.push(I.curve),i++}return e}}class Sn{get(s,t){let e="";const i=s.GetHeaderLine(0,t)||"";if(!i)return e;for(const o of i.arguments)if(o!=null)if(Array.isArray(o))for(const n of o)e+=`${n.value}|`;else e+=`${o.value}|`;return e}}const Pe=class Pe extends st{constructor(t){super(t);f(this,"onIfcLoaded",new U);f(this,"onIfcStartedLoading",new U);f(this,"onSetup",new U);f(this,"onDisposed",new U);f(this,"settings",new Ci);f(this,"enabled",!0);f(this,"webIfc",new b.IfcAPI);f(this,"_material",new L.MeshLambertMaterial);f(this,"_spatialTree",new An);f(this,"_metaData",new Sn);f(this,"_fragmentInstances",new Map);f(this,"_civil",new On);f(this,"_propertyExporter",new Rn);f(this,"_visitedFragments",new Map);f(this,"_materialT",new L.MeshLambertMaterial({transparent:!0,opacity:.5}));this.components.add(Pe.uuid,this),this.settings.excludedCategories.add(b.IFCOPENINGELEMENT)}dispose(){this.onIfcLoaded.reset(),this.webIfc=null,this.onDisposed.trigger(Pe.uuid),this.onDisposed.reset()}async setup(t){this.settings={...this.settings,...t},this.settings.autoSetWasm&&await this.autoSetWasm(),this.onSetup.trigger()}async load(t,e=!0){const i=performance.now();this.onIfcStartedLoading.trigger(),await this.readIfcFile(t);const o=await this.getAllGeometries(),n=await this._propertyExporter.export(this.webIfc,0);o.setLocalProperties(n),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-i} ms!`);const r=this.components.get(ut);r.groups.set(o.uuid,o);for(const a of o.items)r.list.set(a.id,a),a.mesh.uuid=a.id,a.group=o;return e&&r.coordinate([o]),this.onIfcLoaded.trigger(o),o}async readIfcFile(t){const{path:e,absolute:i,logLevel:o}=this.settings.wasm;return this.webIfc.SetWasmPath(e,i),await this.webIfc.Init(),o&&this.webIfc.SetLogLevel(o),this.webIfc.OpenModel(t,this.settings.webIfc)}async getAllGeometries(){this._spatialTree.setUp(this.webIfc);const t=this.webIfc.GetIfcEntityList(0),e=new Ht.FragmentsGroup,{FILE_NAME:i,FILE_DESCRIPTION:o}=b;e.ifcMetadata={name:this._metaData.get(this.webIfc,i),description:this._metaData.get(this.webIfc,o),schema:this.webIfc.GetModelSchema(0)||"IFC2X3",maxExpressID:this.webIfc.GetMaxExpressID(0)};const n=[];for(const a of t){if(!this.webIfc.IsIfcElement(a)&&a!==b.IFCSPACE||this.settings.excludedCategories.has(a))continue;const l=this.webIfc.GetLineIDsWithType(0,a),E=l.size();for(let I=0;I<E;I++){const h=l.get(I);n.push(h);const d=this._spatialTree.itemsByFloor[h]||0;e.data.set(h,[[],[d,a]])}}this._spatialTree.cleanUp(),this.webIfc.StreamMeshes(0,n,a=>{this.getMesh(a,e)});for(const a of this._visitedFragments){const{index:l,fragment:E}=a[1];e.keyFragments.set(l,E.id)}for(const a of e.items){const l=this._fragmentInstances.get(a.id);if(!l)throw new Error("Fragment not found!");const E=[];for(const[I,h]of l)E.push(h);a.add(E)}const r=this.webIfc.GetCoordinationMatrix(0);return e.coordinationMatrix.fromArray(r),e.civilData=this._civil.read(this.webIfc),e}cleanUp(){this.webIfc=null,this.webIfc=new b.IfcAPI,this._visitedFragments.clear(),this._fragmentInstances.clear()}getMesh(t,e){const i=t.geometries.size(),o=t.expressID;for(let n=0;n<i;n++){const r=t.geometries.get(n),{x:a,y:l,z:E,w:I}=r.color,h=I!==1,{geometryExpressID:d}=r,p=`${d}-${h}`;if(!this._visitedFragments.has(p)){const R=this.getGeometry(this.webIfc,d),S=h?this._materialT:this._material,g=new Ht.Fragment(R,S,1);e.add(g.mesh),e.items.push(g);const _=this._visitedFragments.size;this._visitedFragments.set(p,{index:_,fragment:g})}const F=new L.Color().setRGB(a,l,E,"srgb"),A=new L.Matrix4;A.fromArray(r.flatTransformation);const T=this._visitedFragments.get(p);if(T===void 0)throw new Error("Error getting geometry data for streaming!");const m=e.data.get(o);if(!m)throw new Error("Data not found!");m[0].push(T.index);const{fragment:O}=T;this._fragmentInstances.has(O.id)||this._fragmentInstances.set(O.id,new Map);const u=this._fragmentInstances.get(O.id);if(!u)throw new Error("Instances not found!");if(u.has(o)){const R=u.get(o);if(!R)throw new Error("Instance not found!");R.transforms.push(A),R.colors&&R.colors.push(F)}else u.set(o,{id:o,transforms:[A],colors:[F]})}}getGeometry(t,e){const i=t.GetGeometry(0,e),o=t.GetIndexArray(i.GetIndexData(),i.GetIndexDataSize()),n=t.GetVertexArray(i.GetVertexData(),i.GetVertexDataSize()),r=new Float32Array(n.length/2),a=new Float32Array(n.length/2);for(let h=0;h<n.length;h+=6)r[h/2]=n[h],r[h/2+1]=n[h+1],r[h/2+2]=n[h+2],a[h/2]=n[h+3],a[h/2+1]=n[h+4],a[h/2+2]=n[h+5];const l=new L.BufferGeometry,E=new L.BufferAttribute(r,3),I=new L.BufferAttribute(a,3);return l.setAttribute("position",E),l.setAttribute("normal",I),l.setIndex(Array.from(o)),i.delete(),l}async autoSetWasm(){const t=await fetch(`https://unpkg.com/openbim-components@${ls.release}/package.json`);if(!t.ok){console.warn("Couldn't get openbim-components package.json. Set wasm settings manually.");return}const e=await t.json();if(!("web-ifc"in e.peerDependencies))console.warn("Couldn't get web-ifc from peer dependencies in openbim-components. Set wasm settings manually.");else{const i=e.peerDependencies["web-ifc"];this.settings.wasm.path=`https://unpkg.com/web-ifc@${i}/`,this.settings.wasm.absolute=!0}}};f(Pe,"uuid","a659add7-1418-4771-a0d6-7d4d438e4624");let Es=Pe;const Mt=class Mt extends st{constructor(t){super(t);f(this,"onDisposed",new U);f(this,"onRequestFile",new U);f(this,"ifcToExport",null);f(this,"onElementToPset",new U);f(this,"onPropToPset",new U);f(this,"onPsetRemoved",new U);f(this,"onDataChanged",new U);f(this,"wasm",{path:"/",absolute:!1});f(this,"enabled",!0);f(this,"attributeListeners",{});f(this,"selectedModel");f(this,"_changeMap",{});this.components.add(Mt.uuid,this)}get(){return this._changeMap}dispose(){this.selectedModel=void 0,this.attributeListeners={},this._changeMap={},this.onElementToPset.reset(),this.onPropToPset.reset(),this.onPsetRemoved.reset(),this.onDataChanged.reset(),this.onDisposed.trigger(Mt.uuid),this.onDisposed.reset()}increaseMaxID(t){return t.ifcMetadata.maxExpressID++,t.ifcMetadata.maxExpressID}static getIFCSchema(t){const e=t.ifcMetadata.schema;if(!e)throw new Error("IFC Schema not found");return e}newGUID(t){const e=Mt.getIFCSchema(t);return new b[e].IfcGloballyUniqueId(oe.create())}async getOwnerHistory(t){const e=await t.getAllPropertiesOfType(b.IFCOWNERHISTORY);if(!e)throw new Error("No OwnerHistory was found.");const i=Object.keys(e).map(r=>parseInt(r,10)),o=e[i[0]],n=new b.Handle(o.expressID);return{ownerHistory:o,ownerHistoryHandle:n}}registerChange(t,...e){this._changeMap[t.uuid]||(this._changeMap[t.uuid]=new Set);for(const i of e)this._changeMap[t.uuid].add(i),this.onDataChanged.trigger({model:t,expressID:i})}async setData(t,...e){for(const i of e){const o=i.expressID;o&&(await t.setProperties(o,i),this.registerChange(t,o))}}async newPset(t,e,i){const o=Mt.getIFCSchema(t),{ownerHistoryHandle:n}=await this.getOwnerHistory(t),r=this.newGUID(t),a=new b[o].IfcLabel(e),l=i?new b[o].IfcText(i):null,E=new b[o].IfcPropertySet(r,n,a,l,[]);E.expressID=this.increaseMaxID(t);const I=this.newGUID(t),h=new b[o].IfcRelDefinesByProperties(I,n,null,null,[],new b.Handle(E.expressID));return h.expressID=this.increaseMaxID(t),await this.setData(t,E,h),{pset:E,rel:h}}async removePset(t,...e){for(const i of e){const o=await t.getProperties(i);if((o==null?void 0:o.type)!==b.IFCPROPERTYSET)continue;const n=await dt.getPsetRel(t,i);if(n&&(await t.setProperties(n,null),this.registerChange(t,n)),o){for(const r of o.HasProperties)await t.setProperties(r.value,null);await t.setProperties(i,null),this.onPsetRemoved.trigger({model:t,psetID:i}),this.registerChange(t,i)}}}async newSingleProperty(t,e,i,o){const n=Mt.getIFCSchema(t),r=new b[n].IfcIdentifier(i),a=new b[n][e](o),l=new b[n].IfcPropertySingleValue(r,null,a,null);return l.expressID=this.increaseMaxID(t),await this.setData(t,l),l}newSingleStringProperty(t,e,i,o){return this.newSingleProperty(t,e,i,o)}newSingleNumericProperty(t,e,i,o){return this.newSingleProperty(t,e,i,o)}newSingleBooleanProperty(t,e,i,o){return this.newSingleProperty(t,e,i,o)}async removePsetProp(t,e,i){const o=await t.getProperties(e),n=await t.getProperties(i);!o||!n||o.type===b.IFCPROPERTYSET&&n&&(o.HasProperties=o.HasProperties.filter(r=>r.value!==i),await t.setProperties(i,null),this.registerChange(t,e,i))}async addElementToPset(t,e,...i){const o=await dt.getPsetRel(t,e);if(!o)return;const n=await t.getProperties(o);if(n){for(const r of i){const a=new b.Handle(r);n.RelatedObjects.push(a),this.onElementToPset.trigger({model:t,psetID:e,elementID:r})}this.registerChange(t,e)}}async addPropToPset(t,e,...i){const o=await t.getProperties(e);if(o){for(const n of i){if(o.HasProperties.includes(n))continue;const r=new b.Handle(n);o.HasProperties.push(r),this.onPropToPset.trigger({model:t,psetID:e,propID:n})}this.registerChange(t,e)}}async saveToIfc(t,e){const i=this.components.get(Es),o=i.webIfc,n=await i.readIfcFile(e),r=this._changeMap[t.uuid]??[];for(const l of r){const E=await t.getProperties(l);if(E)try{o.WriteLine(n,E)}catch{}else try{o.DeleteLine(n,l)}catch{}}const a=o.SaveModel(n);return i.webIfc.CloseModel(n),i.cleanUp(),a}async setAttributeListener(t,e,i){this.attributeListeners[t.uuid]||(this.attributeListeners[t.uuid]={});const o=this.attributeListeners[t.uuid][e]?this.attributeListeners[t.uuid][e][i]:null;if(o)return o;const n=await t.getProperties(e);if(!n)throw new Error(`Entity with expressID ${e} doesn't exists.`);const r=n[i];if(Array.isArray(r)||!r)throw new Error(`Attribute ${i} is array or null, and it can't have a listener.`);const a=r.value;if(a===void 0||a==null)throw new Error(`Attribute ${i} has a badly defined handle.`);const l=new U;return Object.defineProperty(n[i],"value",{get(){return this._value},async set(E){this._value=E,l.trigger(E)}}),n[i].value=a,this.attributeListeners[t.uuid][e]||(this.attributeListeners[t.uuid][e]={}),this.attributeListeners[t.uuid][e][i]=l,l}};f(Mt,"uuid","58c2d9f0-183c-48d6-a402-dfcf5b9a34df");let ci=Mt;const Cs=class Cs extends st{constructor(t){super(t);f(this,"enabled",!0);f(this,"_groupSystems",{});f(this,"onDisposed",new U);f(this,"onFragmentsDisposed",t=>{const{groupID:e,fragmentIDs:i}=t;for(const o in this._groupSystems){const n=this._groupSystems[o],r=Object.keys(n);if(r.includes(e))delete n[e],Object.values(n).length===0&&delete this._groupSystems[o];else for(const a of r){const l=n[a];for(const E of i)delete l[E];Object.values(l).length===0&&delete n[a]}}});t.add(Cs.uuid,this),t.get(ut).onFragmentsDisposed.add(this.onFragmentsDisposed)}get(){return this._groupSystems}dispose(){this._groupSystems={},this.components.get(ut).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(),this.onDisposed.reset()}remove(t){for(const e in this._groupSystems){const i=this._groupSystems[e];for(const o in i){const n=i[o];delete n[t]}}}find(t){const e=this.components.get(ut);if(!t){const r={};for(const[a,l]of e.list)r[a]=new Set(l.ids);return r}const i=Object.keys(t).length,o={};for(const r in t){const a=t[r];if(!this._groupSystems[r]){console.warn(`Classification ${r} does not exist.`);continue}for(const l of a){const E=this._groupSystems[r][l];if(E)for(const I in E){o[I]||(o[I]=new Map);for(const h of E[I]){const d=o[I].get(h);d===void 0?o[I].set(h,1):o[I].set(h,d+1)}}}}const n={};for(const r in o){const a=o[r];for(const[l,E]of a){if(E===void 0)throw new Error("Malformed fragments map!");E===i&&(n[r]||(n[r]=new Set),n[r].add(l))}}return n}byModel(t,e){this._groupSystems.model||(this._groupSystems.model={});const i=this._groupSystems.model;i[t]||(i[t]={});const o=i[t];for(const[n,r]of e.data){const a=r[0];for(const l of a){const E=e.keyFragments.get(l);E&&(o[E]||(o[E]=new Set),o[E].add(n))}}}async byPredefinedType(t){var o;this._groupSystems.predefinedTypes||(this._groupSystems.predefinedTypes={});const e=this._groupSystems.predefinedTypes,i=t.getAllPropertiesIDs();for(const n of i){const r=await t.getProperties(n);if(!r)continue;const a=String((o=r.PredefinedType)==null?void 0:o.value).toUpperCase();e[a]||(e[a]={});const l=e[a];for(const[E,I]of t.data){const h=I[0];for(const d of h){const p=t.keyFragments.get(d);if(!p)throw new Error("Fragment ID not found!");l[p]||(l[p]=new Set),l[p].add(r.expressID)}}}}byEntity(t){this._groupSystems.entities||(this._groupSystems.entities={});for(const[e,i]of t.data){const n=i[1][1],r=fi[n];this.saveItem(t,"entities",r,e)}}byStorey(t){for(const[e,i]of t.data){const r=i[1][0].toString();this.saveItem(t,"storeys",r,e)}}async byIfcRel(t,e,i){dt.isRel(e)&&await dt.getRelationMap(t,e,async(o,n)=>{const{name:r}=await dt.getEntityName(t,o);for(const a of n)this.saveItem(t,i,r??"NO REL NAME",a)})}saveItem(t,e,i,o){this._groupSystems[e]||(this._groupSystems[e]={});const n=t.data.get(o);if(n)for(const r of n[0]){const a=t.keyFragments.get(r);if(a){const l=this._groupSystems[e];l[i]||(l[i]={}),l[i][a]||(l[i][a]=new Set),l[i][a].add(o)}}}};f(Cs,"uuid","e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");let li=Cs;class gn extends Ci{constructor(){super(...arguments);f(this,"minGeometrySize",10);f(this,"minAssetsSize",1e3)}}class _n extends Ci{constructor(){super(...arguments);f(this,"propertiesSize",100)}}class Nn extends st{constructor(){super(...arguments);f(this,"onPropertiesStreamed",new U);f(this,"onProgress",new U);f(this,"onIndicesStreamed",new U);f(this,"onDisposed",new U);f(this,"enabled",!0);f(this,"settings",new _n);f(this,"webIfc",new b.IfcAPI)}async dispose(){this.onIndicesStreamed.reset(),this.onPropertiesStreamed.reset(),this.webIfc=null,this.onDisposed.reset()}async streamFromBuffer(t){const e=performance.now();await this.readIfcFile(t),await this.streamAllProperties(),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-e} ms!`)}async streamFromCallBack(t){const e=performance.now();await this.streamIfcFile(t),await this.streamAllProperties(),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-e} ms!`)}async readIfcFile(t){const{path:e,absolute:i,logLevel:o}=this.settings.wasm;this.webIfc.SetWasmPath(e,i),await this.webIfc.Init(),o&&this.webIfc.SetLogLevel(o),this.webIfc.OpenModel(t,this.settings.webIfc)}async streamIfcFile(t){const{path:e,absolute:i,logLevel:o}=this.settings.wasm;this.webIfc.SetWasmPath(e,i),await this.webIfc.Init(),o&&this.webIfc.SetLogLevel(o),this.webIfc.OpenModelFromCallback(t,this.settings.webIfc)}async streamAllProperties(){const{propertiesSize:t}=this.settings,e=new Set(this.webIfc.GetIfcEntityList(0)),i=[b.IFCRELDEFINESBYPROPERTIES,b.IFCRELDEFINESBYTYPE,b.IFCRELASSOCIATESMATERIAL,b.IFCRELCONTAINEDINSPATIALSTRUCTURE,b.IFCRELASSOCIATESCLASSIFICATION,b.IFCRELASSIGNSTOGROUP],o=new Map,n=new Set([b.IFCPROJECT,b.IFCSITE,b.IFCBUILDING,b.IFCBUILDINGSTOREY,b.IFCSPACE]);for(const E of n)e.add(E);let r=.01,a=0;for(const E of e){if(a++,mn.has(E))continue;const I=n.has(E),h=this.webIfc.GetLineIDsWithType(0,E),d=h.size();let p=0;for(let A=0;A<d-t;A+=t){const T={};for(let m=0;m<t;m++){p++;const O=h.get(A+m);try{const u=this.webIfc.GetLine(0,O,I);i.includes(E)&&this.getIndices(u,O,o),T[u.expressID]=u}catch{console.log(`Could not get property: ${O}`)}}await this.onPropertiesStreamed.trigger({type:E,data:T})}if(p!==d){const A={};for(let T=p;T<d;T++){const m=h.get(T);try{const O=this.webIfc.GetLine(0,m,I);i.includes(E)&&this.getIndices(O,m,o),A[O.expressID]=O}catch{console.log(`Could not get property: ${m}`)}}await this.onPropertiesStreamed.trigger({type:E,data:A})}const F=a/e.size;F>r&&(r+=.01,r=Math.max(r,F),await this.onProgress.trigger(Math.round(r*100)/100))}const l=[];for(const[E,I]of o)l.push([E,...I]);await this.onIndicesStreamed.trigger(l)}getIndices(t,e,i){const o=t.RelatedObjects||t.RelatedElements;if(!o){console.log(`Related objects not found: ${e}`);return}const n=t.RelatingType||t.RelatingMaterial||t.RelatingStructure||t.RelatingPropertyDefinition||t.RelatingGroup||t.RelatingClassification;if(!n){console.log(`Relating object not found: ${e}`);return}if(!Array.isArray(o)||n.value===void 0)return;const r=n.value;for(const a of o){if(a.value===void 0||a.value===null)continue;const l=a.value;i.has(l)||i.set(l,new Set),i.get(l).add(r)}}cleanUp(){this.webIfc=null,this.webIfc=new b.IfcAPI}}f(Nn,"uuid","88d2c89c-ce32-47d7-8cb6-d51e4b311a0b");const ps=class ps extends st{constructor(t){super(t);f(this,"onGeometryStreamed",new U);f(this,"onAssetStreamed",new U);f(this,"onProgress",new U);f(this,"onIfcLoaded",new U);f(this,"onDisposed",new U);f(this,"settings",new gn);f(this,"enabled",!0);f(this,"webIfc",new b.IfcAPI);f(this,"_spatialTree",new An);f(this,"_metaData",new Sn);f(this,"_visitedGeometries",new Map);f(this,"_streamSerializer",new Ht.StreamSerializer);f(this,"_geometries",new Map);f(this,"_geometryCount",0);f(this,"_civil",new On);f(this,"_groupSerializer",new Ht.Serializer);f(this,"_assets",[]);f(this,"_meshesWithHoles",new Set);this.components.add(ps.uuid,this),this.settings.excludedCategories.add(b.IFCOPENINGELEMENT)}dispose(){this.onIfcLoaded.reset(),this.onGeometryStreamed.reset(),this.onAssetStreamed.reset(),this.webIfc=null,this.onDisposed.trigger(),this.onDisposed.reset()}async streamFromBuffer(t){const e=performance.now();await this.readIfcFile(t),await this.streamAllGeometries(),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-e} ms!`)}async streamFromCallBack(t){const e=performance.now();await this.streamIfcFile(t),await this.streamAllGeometries(),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-e} ms!`)}async readIfcFile(t){const{path:e,absolute:i,logLevel:o}=this.settings.wasm;this.webIfc.SetWasmPath(e,i),await this.webIfc.Init(),o&&this.webIfc.SetLogLevel(o),this.webIfc.OpenModel(t,this.settings.webIfc)}async streamIfcFile(t){const{path:e,absolute:i,logLevel:o}=this.settings.wasm;this.webIfc.SetWasmPath(e,i),await this.webIfc.Init(),o&&this.webIfc.SetLogLevel(o),this.webIfc.OpenModelFromCallback(t,this.settings.webIfc)}async streamAllGeometries(){const{minGeometrySize:t,minAssetsSize:e}=this.settings;this._spatialTree.setUp(this.webIfc);const i=this.webIfc.GetIfcEntityList(0),o=[[]],n=new Ht.FragmentsGroup,{FILE_NAME:r,FILE_DESCRIPTION:a}=b;n.ifcMetadata={name:this._metaData.get(this.webIfc,r),description:this._metaData.get(this.webIfc,a),schema:this.webIfc.GetModelSchema(0)||"IFC2X3",maxExpressID:this.webIfc.GetMaxExpressID(0)};let l=0,E=0;for(const m of i){if(!this.webIfc.IsIfcElement(m)&&m!==b.IFCSPACE||this.settings.excludedCategories.has(m))continue;const O=this.webIfc.GetLineIDsWithType(0,m),u=O.size();for(let R=0;R<u;R++){l>t&&(l=0,E++,o.push([]));const S=O.get(R);o[E].push(S);const g=this._spatialTree.itemsByFloor[S]||0;n.data.set(S,[[],[g,m]]),l++}}this._spatialTree.cleanUp();let I=.01,h=0;for(const m of o){h++,this.webIfc.StreamMeshes(0,m,u=>{this.getMesh(this.webIfc,u,n)}),this._geometryCount>t&&await this.streamGeometries(),this._assets.length>e&&await this.streamAssets();const O=h/o.length;O>I&&(I+=.01,I=Math.max(I,O),this.onProgress.trigger(Math.round(I*100)/100))}this._geometryCount&&await this.streamGeometries(),this._assets.length&&await this.streamAssets();const{opaque:d,transparent:p}=n.geometryIDs;for(const[m,{index:O,uuid:u}]of this._visitedGeometries)n.keyFragments.set(O,u),(m>1?d:p).set(m,O);const F=n.data.keys();for(const m of F){const[O]=n.data.get(m);O.length||n.data.delete(m)}const A=this.webIfc.GetCoordinationMatrix(0);n.coordinationMatrix.fromArray(A),n.civilData=this._civil.read(this.webIfc);const T=this._groupSerializer.export(n);this.onIfcLoaded.trigger(T),n.dispose(!0)}cleanUp(){this.webIfc=null,this.webIfc=new b.IfcAPI,this._visitedGeometries.clear(),this._geometries.clear(),this._assets=[],this._meshesWithHoles.clear()}getMesh(t,e,i){const o=e.geometries.size(),n=e.expressID,r={id:n,geometries:[]};e.expressID===664833&&console.log("Heyyy");for(let a=0;a<o;a++){const l=e.geometries.get(a),E=l.geometryExpressID,I=l.color.w===1?1:-1,h=E*I;if(!this._visitedGeometries.has(h)){this._visitedGeometries.has(E)||this.getGeometry(t,E);const R=this._visitedGeometries.size,S=L.MathUtils.generateUUID();this._visitedGeometries.set(h,{uuid:S,index:R})}const d=this._visitedGeometries.get(h);if(d===void 0)throw new Error("Error getting geometry data for streaming!");const p=i.data.get(n);if(!p)throw new Error("Data not found!");p[0].push(d.index);const{x:F,y:A,z:T,w:m}=l.color,O=[F,A,T,m],u=l.flatTransformation;r.geometries.push({color:O,geometryID:E,transformation:u})}this._assets.push(r)}getGeometry(t,e){const i=t.GetGeometry(0,e),o=t.GetIndexArray(i.GetIndexData(),i.GetIndexDataSize()),n=t.GetVertexArray(i.GetVertexData(),i.GetVertexDataSize()),r=new Float32Array(n.length/2),a=new Float32Array(n.length/2);for(let d=0;d<n.length;d+=6)r[d/2]=n[d],r[d/2+1]=n[d+1],r[d/2+2]=n[d+2],a[d/2]=n[d+3],a[d/2+1]=n[d+4],a[d/2+2]=n[d+5];const l=hn(r),E=new Float32Array(l.transformation.elements),I=[l.center.x,l.center.y,l.center.z];let h=!1;for(let d=0;d<r.length-2;d+=3){const p=r[d],F=r[d+1],A=r[d+2],T=a[d],m=a[d+1],O=a[d+2];if(En(I,[p,F,A],[T,m,O])){h=!0;break}}this._geometries.set(e,{position:r,normal:a,index:o,boundingBox:E,hasHoles:h}),i.delete(),this._geometryCount++}async streamAssets(){await this.onAssetStreamed.trigger(this._assets),this._assets=null,this._assets=[]}async streamGeometries(){let t=this._streamSerializer.export(this._geometries),e={};for(const[i,{boundingBox:o,hasHoles:n}]of this._geometries)e[i]={boundingBox:o,hasHoles:n};this.onGeometryStreamed.trigger({data:e,buffer:t}),e=null,t=null,this._geometries.clear(),this._geometryCount=0}};f(ps,"uuid","d9999a00-e1f5-4d3f-8cfe-c56e08609764");let hi=ps;exports.Base=Rs;exports.BaseCamera=an;exports.BaseRenderer=cn;exports.BaseScene=ln;exports.BaseWorldItem=Fs;exports.Clipper=ii;exports.Component=st;exports.Components=ls;exports.CullerRenderer=pn;exports.Cullers=oi;exports.Disposer=_t;exports.Event=U;exports.FragmentBoundingBox=ri;exports.FragmentClassifier=li;exports.FragmentIfcLoader=Es;exports.FragmentIfcStreamConverter=hi;exports.FragmentManager=ut;exports.FragmentPropsStreamConverter=Nn;exports.Grids=fn;exports.IfcCategories=Ir;exports.IfcCategoryMap=fi;exports.IfcElements=Fn;exports.IfcJsonExporter=Rn;exports.IfcPropertiesFinder=dr;exports.IfcPropertiesIndexer=ai;exports.IfcPropertiesManager=ci;exports.IfcPropertiesUtils=dt;exports.IfcStreamingSettings=gn;exports.Materials=ni;exports.MaterialsUtils=si;exports.MeshCullerRenderer=Tn;exports.PropertiesStreamingSettings=_n;exports.Raycasters=Me;exports.SimpleCamera=De;exports.SimplePlane=As;exports.SimpleRenderer=jo;exports.SimpleScene=qo;exports.SimpleWorld=In;exports.UUID=oe;exports.Worlds=hs;exports.isPointInFrontOfPlane=En;exports.obbFromPoints=hn;exports.readPixelsAsync=Cn;
88
+ `,o=new Blob([i],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(o))}dispose(){this.enabled=!1;for(const s of this.scene.children)s.removeFromParent();this.onViewUpdated.reset(),this.worker.terminate(),this.renderer.dispose(),this.renderTarget.dispose(),this._buffer=null,this.onDisposed.reset()}getAvailableColor(){let s=BigInt(this._availableColor.toString());const t=[];do t.unshift(Number(s%256n)),s/=256n;while(s);for(;t.length!==3;)t.unshift(0);const[e,i,o]=t,n=`${e}-${i}-${o}`;return{r:e,g:i,b:o,code:n}}increaseColor(){if(this._availableColor===256*256*256){console.warn("Color can't be increased over 256 x 256 x 256!");return}this._availableColor++}decreaseColor(){if(this._availableColor===1){console.warn("Color can't be decreased under 0!");return}this._availableColor--}applySettings(s){s&&(s.updateInterval!==void 0&&(this.updateInterval=s.updateInterval),s.height!==void 0&&(this._height=s.height),s.width!==void 0&&(this._width=s.width),s.autoUpdate!==void 0&&(this.autoUpdate=s.autoUpdate))}}class Tn extends pn{constructor(t,e,i){super(t,e,i);f(this,"threshold",100);f(this,"onViewUpdated",new U);f(this,"colorMeshes",new Map);f(this,"isProcessing",!1);f(this,"_colorCodeMeshMap",new Map);f(this,"_meshIDColorCodeMap",new Map);f(this,"_currentVisibleMeshes",new Set);f(this,"_recentlyHiddenMeshes",new Set);f(this,"_transparentMat",new L.MeshBasicMaterial({transparent:!0,opacity:0}));f(this,"handleWorkerMessage",async t=>{if(this.isProcessing)return;const e=t.data.colors;this._recentlyHiddenMeshes=new Set(this._currentVisibleMeshes),this._currentVisibleMeshes.clear();for(const[i,o]of e){if(o<this.threshold)continue;const n=this._colorCodeMeshMap.get(i);n&&(this._currentVisibleMeshes.add(n),this._recentlyHiddenMeshes.delete(n))}this.onViewUpdated.trigger({seen:this._currentVisibleMeshes,unseen:this._recentlyHiddenMeshes})});this.worker.addEventListener("message",this.handleWorkerMessage),this.autoUpdate&&window.setInterval(async()=>{this.isProcessing||await this.updateVisibility()},this.updateInterval),this.onViewUpdated.add(({seen:o,unseen:n})=>{for(const r of o)r.visible=!0;for(const r of n)r.visible=!1})}dispose(){super.dispose(),this._currentVisibleMeshes.clear(),this._recentlyHiddenMeshes.clear(),this._meshIDColorCodeMap.clear(),this._transparentMat.dispose(),this._colorCodeMeshMap.clear();const t=this.components.get(_t);for(const e in this.colorMeshes){const i=this.colorMeshes.get(e);i&&t.destroy(i,!0)}this.colorMeshes.clear()}add(t){if(!this.enabled)return;if(this.isProcessing){console.log("Culler processing not finished yet.");return}this.isProcessing=!0;const e=t instanceof L.InstancedMesh,{geometry:i,material:o}=t,{colorMaterial:n,code:r}=this.getAvailableMaterial();let a;if(Array.isArray(o)){let I=!0;const h=[];for(const d of o)si.isTransparent(d)?h.push(this._transparentMat):(I=!1,h.push(n));if(I){n.dispose(),this.isProcessing=!1;return}a=h}else if(si.isTransparent(o)){n.dispose(),this.isProcessing=!1;return}else a=n;this._colorCodeMeshMap.set(r,t),this._meshIDColorCodeMap.set(t.uuid,r);const l=e?t.count:1,E=new L.InstancedMesh(i,a,l);e?E.instanceMatrix=t.instanceMatrix:E.setMatrixAt(0,new L.Matrix4),t.visible=!1,E.applyMatrix4(t.matrix),E.updateMatrix(),this.scene.add(E),this.colorMeshes.set(t.uuid,E),this.increaseColor(),this.isProcessing=!1}remove(t){if(this.isProcessing){console.log("Culler processing not finished yet.");return}this.isProcessing=!0;const e=this.components.get(_t);this._currentVisibleMeshes.delete(t),this._recentlyHiddenMeshes.delete(t);const i=this.colorMeshes.get(t.uuid),o=this._meshIDColorCodeMap.get(t.uuid);if(!i||!o){this.isProcessing=!1,console.log(t.visible);return}this._colorCodeMeshMap.delete(o),this._meshIDColorCodeMap.delete(t.uuid),this.colorMeshes.delete(t.uuid),i.geometry=void 0,i.material=[],e.destroy(i,!0),this._recentlyHiddenMeshes.delete(t),this._currentVisibleMeshes.delete(t),this.isProcessing=!1}getAvailableMaterial(){const{r:t,g:e,b:i,code:o}=this.getAvailableColor(),n=L.ColorManagement.enabled;L.ColorManagement.enabled=!1;const r=new L.Color(`rgb(${t}, ${e}, ${i})`);if(!this.world.renderer)throw new Error("Renderer not found in the world!");const a=this.world.renderer.clippingPlanes,l=new L.MeshBasicMaterial({color:r,clippingPlanes:a,side:L.DoubleSide});return L.ColorManagement.enabled=n,{colorMaterial:l,code:o}}}const ye=class ye extends st{constructor(t){super(t);f(this,"_enabled",!0);f(this,"list",new Map);f(this,"onDisposed",new U);t.add(ye.uuid,this)}get enabled(){return this._enabled}set enabled(t){this._enabled=t;for(const[e,i]of this.list)i.enabled=t}create(t,e){if(this.list.has(t.uuid))return this.list.get(t.uuid);const i=new Tn(this.components,t,e);return this.list.set(t.uuid,i),i}delete(t){const e=this.list.get(t.uuid);e&&e.dispose(),this.list.delete(t.uuid)}dispose(){this.enabled=!1,this.onDisposed.trigger(ye.uuid),this.onDisposed.reset();for(const[t,e]of this.list)e.dispose();this.list.clear()}};f(ye,"uuid","69f2a50d-c266-44fc-b1bd-fa4d34be89e6");let oi=ye;const Tt=class Tt extends st{constructor(t){super(t);f(this,"enabled",!0);f(this,"onDisposed",new U);f(this,"_absoluteMin");f(this,"_absoluteMax");f(this,"_meshes",[]);this.components.add(Tt.uuid,this),this._absoluteMin=Tt.newBound(!0),this._absoluteMax=Tt.newBound(!1)}static getDimensions(t){const{min:e,max:i}=t,o=Math.abs(i.x-e.x),n=Math.abs(i.y-e.y),r=Math.abs(i.z-e.z),a=new L.Vector3;return a.subVectors(i,e).divideScalar(2).add(e),{width:o,height:n,depth:r,center:a}}static newBound(t){const e=t?1:-1;return new L.Vector3(e*Number.MAX_VALUE,e*Number.MAX_VALUE,e*Number.MAX_VALUE)}static getBounds(t,e,i){const o=i||this.newBound(!1),n=e||this.newBound(!0);for(const r of t)r.x<n.x&&(n.x=r.x),r.y<n.y&&(n.y=r.y),r.z<n.z&&(n.z=r.z),r.x>o.x&&(o.x=r.x),r.y>o.y&&(o.y=r.y),r.z>o.z&&(o.z=r.z);return new L.Box3(e,i)}dispose(){const t=this.components.get(_t);for(const e of this._meshes)t.destroy(e);this._meshes=[],this.onDisposed.trigger(Tt.uuid),this.onDisposed.reset()}get(){const t=this._absoluteMin.clone(),e=this._absoluteMax.clone();return new L.Box3(t,e)}getSphere(){const t=this._absoluteMin.clone(),e=this._absoluteMax.clone(),i=Math.abs((e.x-t.x)/2),o=Math.abs((e.y-t.y)/2),n=Math.abs((e.z-t.z)/2),r=new L.Vector3(t.x+i,t.y+o,t.z+n),a=r.distanceTo(t);return new L.Sphere(r,a)}getMesh(){const t=new L.Box3(this._absoluteMin,this._absoluteMax),e=Tt.getDimensions(t),{width:i,height:o,depth:n,center:r}=e,a=new L.BoxGeometry(i,o,n),l=new L.Mesh(a);return this._meshes.push(l),l.position.copy(r),l}reset(){this._absoluteMin=Tt.newBound(!0),this._absoluteMax=Tt.newBound(!1)}add(t){for(const e of t.items)this.addMesh(e.mesh)}addMesh(t){if(!t.geometry.index)return;const e=Tt.getFragmentBounds(t);t.updateMatrixWorld();const i=t.matrixWorld,o=new L.Matrix4,n=t instanceof L.InstancedMesh,r=n?t.count:1;for(let a=0;a<r;a++){const l=e.min.clone(),E=e.max.clone();n&&(t.getMatrixAt(a,o),l.applyMatrix4(o),E.applyMatrix4(o)),l.applyMatrix4(i),E.applyMatrix4(i),l.x<this._absoluteMin.x&&(this._absoluteMin.x=l.x),l.y<this._absoluteMin.y&&(this._absoluteMin.y=l.y),l.z<this._absoluteMin.z&&(this._absoluteMin.z=l.z),l.x>this._absoluteMax.x&&(this._absoluteMax.x=l.x),l.y>this._absoluteMax.y&&(this._absoluteMax.y=l.y),l.z>this._absoluteMax.z&&(this._absoluteMax.z=l.z),E.x>this._absoluteMax.x&&(this._absoluteMax.x=E.x),E.y>this._absoluteMax.y&&(this._absoluteMax.y=E.y),E.z>this._absoluteMax.z&&(this._absoluteMax.z=E.z),E.x<this._absoluteMin.x&&(this._absoluteMin.x=E.x),E.y<this._absoluteMin.y&&(this._absoluteMin.y=E.y),E.z<this._absoluteMin.z&&(this._absoluteMin.z=E.z)}}static getFragmentBounds(t){const e=t.geometry.attributes.position,i=Number.MAX_VALUE,o=-i,n=new L.Vector3(i,i,i),r=new L.Vector3(o,o,o);if(!t.geometry.index)throw new Error("Geometry must be indexed!");const a=Array.from(t.geometry.index.array);for(let l=0;l<a.length;l++){if(l%3===0&&a[l]===0&&a[l+1]===0&&a[l+2]===0){l+=2;continue}const E=a[l],I=e.getX(E),h=e.getY(E),d=e.getZ(E);I<n.x&&(n.x=I),h<n.y&&(n.y=h),d<n.z&&(n.z=d),I>r.x&&(r.x=I),h>r.y&&(r.y=h),d>r.z&&(r.z=d)}return new L.Box3(n,r)}};f(Tt,"uuid","d1444724-dba6-4cdd-a0c7-68ee1450d166");let ri=Tt;const mn=new Set([1123145078,574549367,1675464909,2059837836,3798115385,32440307,3125803723,3207858831,2740243338,2624227202,4240577450,3615266464,3724593414,220341763,477187591,1878645084,1300840506,3303107099,1607154358,1878645084,846575682,1351298697,2417041796,3049322572,3331915920,1416205885,776857604,3285139300,3958052878,2827736869,2732653382,673634403,3448662350,4142052618,2924175390,803316827,2556980723,1809719519,2205249479,807026263,3737207727,1660063152,2347385850,3940055652,2705031697,3732776249,2485617015,2611217952,1704287377,2937912522,2770003689,1281925730,1484403080,3448662350,4142052618,3800577675,4006246654,3590301190,1383045692,2775532180,2047409740,370225590,3593883385,2665983363,4124623270,812098782,3649129432,987898635,1105321065,3510044353,1635779807,2603310189,3406155212,1310608509,4261334040,2736907675,3649129432,1136057603,1260505505,4182860854,2713105998,2898889636,59481748,3749851601,3486308946,3150382593,1062206242,3264961684,15328376,1485152156,370225590,1981873012,2859738748,45288368,2614616156,2732653382,775493141,2147822146,2601014836,2629017746,1186437898,2367409068,1213902940,3632507154,3900360178,476780140,1472233963,2804161546,3008276851,738692330,374418227,315944413,3905492369,3570813810,2571569899,178912537,2294589976,1437953363,2133299955,572779678,3092502836,388784114,2624227202,1425443689,3057273783,2347385850,1682466193,2519244187,2839578677,3958567839,2513912981,2830218821,427810014]);class Rn{async export(s,t,e=!1,i=!0){const o={},n=new Set(s.GetIfcEntityList(t)),r=new Set([b.IFCPROJECT,b.IFCSITE,b.IFCBUILDING,b.IFCBUILDINGSTOREY,b.IFCSPACE]);for(const a of r)n.add(a);for(const a of n){if(mn.has(a))continue;const l=r.has(a)&&i,E=s.GetLineIDsWithType(t,a);for(const I of E){const h=s.GetLine(0,I,l,e);o[h.expressID]=h}}return o}}const Fn={103090709:"IFCPROJECT",4097777520:"IFCSITE",4031249490:"IFCBUILDING",3124254112:"IFCBUILDINGSTOREY",3856911033:"IFCSPACE",1674181508:"IFCANNOTATION",25142252:"IFCCONTROLLER",32344328:"IFCBOILER",76236018:"IFCLAMP",90941305:"IFCPUMP",177149247:"IFCAIRTERMINALBOX",182646315:"IFCFLOWINSTRUMENT",263784265:"IFCFURNISHINGELEMENT",264262732:"IFCELECTRICGENERATOR",277319702:"IFCAUDIOVISUALAPPLIANCE",310824031:"IFCPIPEFITTING",331165859:"IFCSTAIR",342316401:"IFCDUCTFITTING",377706215:"IFCMECHANICALFASTENER",395920057:"IFCDOOR",402227799:"IFCELECTRICMOTOR",413509423:"IFCSYSTEMFURNITUREELEMENT",484807127:"IFCEVAPORATOR",486154966:"IFCWINDOWSTANDARDCASE",629592764:"IFCLIGHTFIXTURE",630975310:"IFCUNITARYCONTROLELEMENT",635142910:"IFCCABLECARRIERFITTING",639361253:"IFCCOIL",647756555:"IFCFASTENER",707683696:"IFCFLOWSTORAGEDEVICE",738039164:"IFCPROTECTIVEDEVICE",753842376:"IFCBEAM",812556717:"IFCTANK",819412036:"IFCFILTER",843113511:"IFCCOLUMN",862014818:"IFCELECTRICDISTRIBUTIONBOARD",900683007:"IFCFOOTING",905975707:"IFCCOLUMNSTANDARDCASE",926996030:"IFCVOIDINGFEATURE",979691226:"IFCREINFORCINGBAR",987401354:"IFCFLOWSEGMENT",1003880860:"IFCELECTRICTIMECONTROL",1051757585:"IFCCABLEFITTING",1052013943:"IFCDISTRIBUTIONCHAMBERELEMENT",1062813311:"IFCDISTRIBUTIONCONTROLELEMENT",1073191201:"IFCMEMBER",1095909175:"IFCBUILDINGELEMENTPROXY",1156407060:"IFCPLATESTANDARDCASE",1162798199:"IFCSWITCHINGDEVICE",1329646415:"IFCSHADINGDEVICE",1335981549:"IFCDISCRETEACCESSORY",1360408905:"IFCDUCTSILENCER",1404847402:"IFCSTACKTERMINAL",1426591983:"IFCFIRESUPPRESSIONTERMINAL",1437502449:"IFCMEDICALDEVICE",1509553395:"IFCFURNITURE",1529196076:"IFCSLAB",1620046519:"IFCTRANSPORTELEMENT",1634111441:"IFCAIRTERMINAL",1658829314:"IFCENERGYCONVERSIONDEVICE",1677625105:"IFCCIVILELEMENT",1687234759:"IFCPILE",1904799276:"IFCELECTRICAPPLIANCE",1911478936:"IFCMEMBERSTANDARDCASE",1945004755:"IFCDISTRIBUTIONELEMENT",1973544240:"IFCCOVERING",1999602285:"IFCSPACEHEATER",2016517767:"IFCROOF",2056796094:"IFCAIRTOAIRHEATRECOVERY",2058353004:"IFCFLOWCONTROLLER",2068733104:"IFCHUMIDIFIER",2176052936:"IFCJUNCTIONBOX",2188021234:"IFCFLOWMETER",2223149337:"IFCFLOWTERMINAL",2262370178:"IFCRAILING",2272882330:"IFCCONDENSER",2295281155:"IFCPROTECTIVEDEVICETRIPPINGUNIT",2320036040:"IFCREINFORCINGMESH",2347447852:"IFCTENDONANCHOR",2391383451:"IFCVIBRATIONISOLATOR",2391406946:"IFCWALL",2474470126:"IFCMOTORCONNECTION",2769231204:"IFCVIRTUALELEMENT",2814081492:"IFCENGINE",2906023776:"IFCBEAMSTANDARDCASE",2938176219:"IFCBURNER",2979338954:"IFCBUILDINGELEMENTPART",3024970846:"IFCRAMP",3026737570:"IFCTUBEBUNDLE",3027962421:"IFCSLABSTANDARDCASE",3040386961:"IFCDISTRIBUTIONFLOWELEMENT",3053780830:"IFCSANITARYTERMINAL",3079942009:"IFCOPENINGSTANDARDCASE",3087945054:"IFCALARM",3101698114:"IFCSURFACEFEATURE",3127900445:"IFCSLABELEMENTEDCASE",3132237377:"IFCFLOWMOVINGDEVICE",3171933400:"IFCPLATE",3221913625:"IFCCOMMUNICATIONSAPPLIANCE",3242481149:"IFCDOORSTANDARDCASE",3283111854:"IFCRAMPFLIGHT",3296154744:"IFCCHIMNEY",3304561284:"IFCWINDOW",3310460725:"IFCELECTRICFLOWSTORAGEDEVICE",3319311131:"IFCHEATEXCHANGER",3415622556:"IFCFAN",3420628829:"IFCSOLARDEVICE",3493046030:"IFCGEOGRAPHICELEMENT",3495092785:"IFCCURTAINWALL",3508470533:"IFCFLOWTREATMENTDEVICE",3512223829:"IFCWALLSTANDARDCASE",3518393246:"IFCDUCTSEGMENT",3571504051:"IFCCOMPRESSOR",3588315303:"IFCOPENINGELEMENT",3612865200:"IFCPIPESEGMENT",3640358203:"IFCCOOLINGTOWER",3651124850:"IFCPROJECTIONELEMENT",3694346114:"IFCOUTLET",3747195512:"IFCEVAPORATIVECOOLER",3758799889:"IFCCABLECARRIERSEGMENT",3824725483:"IFCTENDON",3825984169:"IFCTRANSFORMER",3902619387:"IFCCHILLER",4074379575:"IFCDAMPER",4086658281:"IFCSENSOR",4123344466:"IFCELEMENTASSEMBLY",4136498852:"IFCCOOLEDBEAM",4156078855:"IFCWALLELEMENTEDCASE",4175244083:"IFCINTERCEPTOR",4207607924:"IFCVALVE",4217484030:"IFCCABLESEGMENT",4237592921:"IFCWASTETERMINAL",4252922144:"IFCSTAIRFLIGHT",4278956645:"IFCFLOWFITTING",4288193352:"IFCACTUATOR",4292641817:"IFCUNITARYEQUIPMENT",3009204131:"IFCGRID"};class Ir{getAll(s,t){const e={},i=Object.keys(Fn).map(o=>parseInt(o,10));for(let o=0;o<i.length;o++){const n=i[o],r=s.GetLineIDsWithType(t,n),a=r.size();for(let l=0;l<a;l++)e[r.get(l)]=n}return e}}const fi={950732822:"IFCURIREFERENCE",4075327185:"IFCTIME",1209108979:"IFCTEMPERATURERATEOFCHANGEMEASURE",3457685358:"IFCSOUNDPRESSURELEVELMEASURE",4157543285:"IFCSOUNDPOWERLEVELMEASURE",2798247006:"IFCPROPERTYSETDEFINITIONSET",1790229001:"IFCPOSITIVEINTEGER",525895558:"IFCNONNEGATIVELENGTHMEASURE",1774176899:"IFCLINEINDEX",1275358634:"IFCLANGUAGEID",2541165894:"IFCDURATION",3701338814:"IFCDAYINWEEKNUMBER",2195413836:"IFCDATETIME",937566702:"IFCDATE",1683019596:"IFCCARDINALPOINTREFERENCE",2314439260:"IFCBINARY",1500781891:"IFCAREADENSITYMEASURE",3683503648:"IFCARCINDEX",4065007721:"IFCYEARNUMBER",1718600412:"IFCWARPINGMOMENTMEASURE",51269191:"IFCWARPINGCONSTANTMEASURE",2593997549:"IFCVOLUMETRICFLOWRATEMEASURE",3458127941:"IFCVOLUMEMEASURE",3345633955:"IFCVAPORPERMEABILITYMEASURE",1278329552:"IFCTORQUEMEASURE",2591213694:"IFCTIMESTAMP",2726807636:"IFCTIMEMEASURE",743184107:"IFCTHERMODYNAMICTEMPERATUREMEASURE",2016195849:"IFCTHERMALTRANSMITTANCEMEASURE",857959152:"IFCTHERMALRESISTANCEMEASURE",2281867870:"IFCTHERMALEXPANSIONCOEFFICIENTMEASURE",2645777649:"IFCTHERMALCONDUCTIVITYMEASURE",232962298:"IFCTHERMALADMITTANCEMEASURE",296282323:"IFCTEXTTRANSFORMATION",603696268:"IFCTEXTFONTNAME",3490877962:"IFCTEXTDECORATION",1460886941:"IFCTEXTALIGNMENT",2801250643:"IFCTEXT",58845555:"IFCTEMPERATUREGRADIENTMEASURE",361837227:"IFCSPECULARROUGHNESS",2757832317:"IFCSPECULAREXPONENT",3477203348:"IFCSPECIFICHEATCAPACITYMEASURE",993287707:"IFCSOUNDPRESSUREMEASURE",846465480:"IFCSOUNDPOWERMEASURE",3471399674:"IFCSOLIDANGLEMEASURE",408310005:"IFCSHEARMODULUSMEASURE",2190458107:"IFCSECTIONALAREAINTEGRALMEASURE",3467162246:"IFCSECTIONMODULUSMEASURE",2766185779:"IFCSECONDINMINUTE",3211557302:"IFCROTATIONALSTIFFNESSMEASURE",1755127002:"IFCROTATIONALMASSMEASURE",2133746277:"IFCROTATIONALFREQUENCYMEASURE",200335297:"IFCREAL",96294661:"IFCRATIOMEASURE",3972513137:"IFCRADIOACTIVITYMEASURE",3665567075:"IFCPRESSUREMEASURE",2169031380:"IFCPRESENTABLETEXT",1364037233:"IFCPOWERMEASURE",1245737093:"IFCPOSITIVERATIOMEASURE",3054510233:"IFCPOSITIVEPLANEANGLEMEASURE",2815919920:"IFCPOSITIVELENGTHMEASURE",4042175685:"IFCPLANEANGLEMEASURE",2642773653:"IFCPLANARFORCEMEASURE",2260317790:"IFCPARAMETERVALUE",929793134:"IFCPHMEASURE",2395907400:"IFCNUMERICMEASURE",2095195183:"IFCNORMALISEDRATIOMEASURE",765770214:"IFCMONTHINYEARNUMBER",2615040989:"IFCMONETARYMEASURE",3114022597:"IFCMOMENTOFINERTIAMEASURE",1648970520:"IFCMOLECULARWEIGHTMEASURE",3177669450:"IFCMOISTUREDIFFUSIVITYMEASURE",1753493141:"IFCMODULUSOFSUBGRADEREACTIONMEASURE",1052454078:"IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE",2173214787:"IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE",3341486342:"IFCMODULUSOFELASTICITYMEASURE",102610177:"IFCMINUTEINHOUR",3531705166:"IFCMASSPERLENGTHMEASURE",3124614049:"IFCMASSMEASURE",4017473158:"IFCMASSFLOWRATEMEASURE",1477762836:"IFCMASSDENSITYMEASURE",2486716878:"IFCMAGNETICFLUXMEASURE",286949696:"IFCMAGNETICFLUXDENSITYMEASURE",151039812:"IFCLUMINOUSINTENSITYMEASURE",2755797622:"IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE",2095003142:"IFCLUMINOUSFLUXMEASURE",503418787:"IFCLOGICAL",3086160713:"IFCLINEARVELOCITYMEASURE",1307019551:"IFCLINEARSTIFFNESSMEASURE",2128979029:"IFCLINEARMOMENTMEASURE",191860431:"IFCLINEARFORCEMEASURE",1243674935:"IFCLENGTHMEASURE",3258342251:"IFCLABEL",2054016361:"IFCKINEMATICVISCOSITYMEASURE",3192672207:"IFCISOTHERMALMOISTURECAPACITYMEASURE",3686016028:"IFCIONCONCENTRATIONMEASURE",3809634241:"IFCINTEGERCOUNTRATEMEASURE",1939436016:"IFCINTEGER",2679005408:"IFCINDUCTANCEMEASURE",3358199106:"IFCILLUMINANCEMEASURE",983778844:"IFCIDENTIFIER",2589826445:"IFCHOURINDAY",1158859006:"IFCHEATINGVALUEMEASURE",3113092358:"IFCHEATFLUXDENSITYMEASURE",3064340077:"IFCGLOBALLYUNIQUEID",3044325142:"IFCFREQUENCYMEASURE",1361398929:"IFCFORCEMEASURE",2590844177:"IFCFONTWEIGHT",2715512545:"IFCFONTVARIANT",1102727119:"IFCFONTSTYLE",2078135608:"IFCENERGYMEASURE",2506197118:"IFCELECTRICVOLTAGEMEASURE",2951915441:"IFCELECTRICRESISTANCEMEASURE",3790457270:"IFCELECTRICCURRENTMEASURE",2093906313:"IFCELECTRICCONDUCTANCEMEASURE",3818826038:"IFCELECTRICCHARGEMEASURE",1827137117:"IFCELECTRICCAPACITANCEMEASURE",69416015:"IFCDYNAMICVISCOSITYMEASURE",524656162:"IFCDOSEEQUIVALENTMEASURE",4134073009:"IFCDIMENSIONCOUNT",1514641115:"IFCDESCRIPTIVEMEASURE",300323983:"IFCDAYLIGHTSAVINGHOUR",86635668:"IFCDAYINMONTHNUMBER",94842927:"IFCCURVATUREMEASURE",1778710042:"IFCCOUNTMEASURE",3238673880:"IFCCONTEXTDEPENDENTMEASURE",3812528620:"IFCCOMPOUNDPLANEANGLEMEASURE",2991860651:"IFCCOMPLEXNUMBER",1867003952:"IFCBOXALIGNMENT",2735952531:"IFCBOOLEAN",2650437152:"IFCAREAMEASURE",632304761:"IFCANGULARVELOCITYMEASURE",360377573:"IFCAMOUNTOFSUBSTANCEMEASURE",4182062534:"IFCACCELERATIONMEASURE",3699917729:"IFCABSORBEDDOSEMEASURE",1971632696:"IFCGEOSLICE",2680139844:"IFCGEOMODEL",24726584:"IFCELECTRICFLOWTREATMENTDEVICE",3693000487:"IFCDISTRIBUTIONBOARD",3460952963:"IFCCONVEYORSEGMENT",3999819293:"IFCCAISSONFOUNDATION",3314249567:"IFCBOREHOLE",4196446775:"IFCBEARING",325726236:"IFCALIGNMENT",3425753595:"IFCTRACKELEMENT",991950508:"IFCSIGNAL",3798194928:"IFCREINFORCEDSOIL",3290496277:"IFCRAIL",1383356374:"IFCPAVEMENT",2182337498:"IFCNAVIGATIONELEMENT",234836483:"IFCMOORINGDEVICE",2078563270:"IFCMOBILETELECOMMUNICATIONSAPPLIANCE",1638804497:"IFCLIQUIDTERMINAL",1154579445:"IFCLINEARPOSITIONINGELEMENT",2696325953:"IFCKERB",2713699986:"IFCGEOTECHNICALASSEMBLY",2142170206:"IFCELECTRICFLOWTREATMENTDEVICETYPE",3376911765:"IFCEARTHWORKSFILL",1077100507:"IFCEARTHWORKSELEMENT",3071239417:"IFCEARTHWORKSCUT",479945903:"IFCDISTRIBUTIONBOARDTYPE",3426335179:"IFCDEEPFOUNDATION",1502416096:"IFCCOURSE",2940368186:"IFCCONVEYORSEGMENTTYPE",3203706013:"IFCCAISSONFOUNDATIONTYPE",3862327254:"IFCBUILTSYSTEM",1876633798:"IFCBUILTELEMENT",963979645:"IFCBRIDGEPART",644574406:"IFCBRIDGE",3649138523:"IFCBEARINGTYPE",1662888072:"IFCALIGNMENTVERTICAL",317615605:"IFCALIGNMENTSEGMENT",1545765605:"IFCALIGNMENTHORIZONTAL",4266260250:"IFCALIGNMENTCANT",3956297820:"IFCVIBRATIONDAMPERTYPE",1530820697:"IFCVIBRATIONDAMPER",840318589:"IFCVEHICLE",1953115116:"IFCTRANSPORTATIONDEVICE",618700268:"IFCTRACKELEMENTTYPE",2281632017:"IFCTENDONCONDUITTYPE",3663046924:"IFCTENDONCONDUIT",42703149:"IFCSINESPIRAL",1894708472:"IFCSIGNALTYPE",3599934289:"IFCSIGNTYPE",33720170:"IFCSIGN",1027922057:"IFCSEVENTHORDERPOLYNOMIALSPIRAL",544395925:"IFCSEGMENTEDREFERENCECURVE",3649235739:"IFCSECONDORDERPOLYNOMIALSPIRAL",550521510:"IFCROADPART",146592293:"IFCROAD",3818125796:"IFCRELADHERESTOELEMENT",4021432810:"IFCREFERENT",1891881377:"IFCRAILWAYPART",3992365140:"IFCRAILWAY",1763565496:"IFCRAILTYPE",1946335990:"IFCPOSITIONINGELEMENT",514975943:"IFCPAVEMENTTYPE",506776471:"IFCNAVIGATIONELEMENTTYPE",710110818:"IFCMOORINGDEVICETYPE",1950438474:"IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE",976884017:"IFCMARINEPART",525669439:"IFCMARINEFACILITY",1770583370:"IFCLIQUIDTERMINALTYPE",2176059722:"IFCLINEARELEMENT",679976338:"IFCKERBTYPE",3948183225:"IFCIMPACTPROTECTIONDEVICETYPE",2568555532:"IFCIMPACTPROTECTIONDEVICE",2898700619:"IFCGRADIENTCURVE",1594536857:"IFCGEOTECHNICALSTRATUM",4230923436:"IFCGEOTECHNICALELEMENT",4228831410:"IFCFACILITYPARTCOMMON",1310830890:"IFCFACILITYPART",24185140:"IFCFACILITY",4234616927:"IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID",1306400036:"IFCDEEPFOUNDATIONTYPE",4189326743:"IFCCOURSETYPE",2000195564:"IFCCOSINESPIRAL",3497074424:"IFCCLOTHOID",1626504194:"IFCBUILTELEMENTTYPE",3651464721:"IFCVEHICLETYPE",1229763772:"IFCTRIANGULATEDIRREGULARNETWORK",3665877780:"IFCTRANSPORTATIONDEVICETYPE",782932809:"IFCTHIRDORDERPOLYNOMIALSPIRAL",2735484536:"IFCSPIRAL",1356537516:"IFCSECTIONEDSURFACE",1290935644:"IFCSECTIONEDSOLIDHORIZONTAL",1862484736:"IFCSECTIONEDSOLID",1441486842:"IFCRELPOSITIONS",1033248425:"IFCRELASSOCIATESPROFILEDEF",3381221214:"IFCPOLYNOMIALCURVE",2485787929:"IFCOFFSETCURVEBYDISTANCES",590820931:"IFCOFFSETCURVE",3465909080:"IFCINDEXEDPOLYGONALTEXTUREMAP",593015953:"IFCDIRECTRIXCURVESWEPTAREASOLID",4212018352:"IFCCURVESEGMENT",3425423356:"IFCAXIS2PLACEMENTLINEAR",823603102:"IFCSEGMENT",2165702409:"IFCPOINTBYDISTANCEEXPRESSION",182550632:"IFCOPENCROSSPROFILEDEF",388784114:"IFCLINEARPLACEMENT",536804194:"IFCALIGNMENTHORIZONTALSEGMENT",3752311538:"IFCALIGNMENTCANTSEGMENT",1010789467:"IFCTEXTURECOORDINATEINDICESWITHVOIDS",222769930:"IFCTEXTURECOORDINATEINDICES",2691318326:"IFCQUANTITYNUMBER",3633395639:"IFCALIGNMENTVERTICALSEGMENT",2879124712:"IFCALIGNMENTPARAMETERSEGMENT",25142252:"IFCCONTROLLER",3087945054:"IFCALARM",4288193352:"IFCACTUATOR",630975310:"IFCUNITARYCONTROLELEMENT",4086658281:"IFCSENSOR",2295281155:"IFCPROTECTIVEDEVICETRIPPINGUNIT",182646315:"IFCFLOWINSTRUMENT",1426591983:"IFCFIRESUPPRESSIONTERMINAL",819412036:"IFCFILTER",3415622556:"IFCFAN",1003880860:"IFCELECTRICTIMECONTROL",402227799:"IFCELECTRICMOTOR",264262732:"IFCELECTRICGENERATOR",3310460725:"IFCELECTRICFLOWSTORAGEDEVICE",862014818:"IFCELECTRICDISTRIBUTIONBOARD",1904799276:"IFCELECTRICAPPLIANCE",1360408905:"IFCDUCTSILENCER",3518393246:"IFCDUCTSEGMENT",342316401:"IFCDUCTFITTING",562808652:"IFCDISTRIBUTIONCIRCUIT",4074379575:"IFCDAMPER",3640358203:"IFCCOOLINGTOWER",4136498852:"IFCCOOLEDBEAM",2272882330:"IFCCONDENSER",3571504051:"IFCCOMPRESSOR",3221913625:"IFCCOMMUNICATIONSAPPLIANCE",639361253:"IFCCOIL",3902619387:"IFCCHILLER",4217484030:"IFCCABLESEGMENT",1051757585:"IFCCABLEFITTING",3758799889:"IFCCABLECARRIERSEGMENT",635142910:"IFCCABLECARRIERFITTING",2938176219:"IFCBURNER",32344328:"IFCBOILER",2906023776:"IFCBEAMSTANDARDCASE",277319702:"IFCAUDIOVISUALAPPLIANCE",2056796094:"IFCAIRTOAIRHEATRECOVERY",177149247:"IFCAIRTERMINALBOX",1634111441:"IFCAIRTERMINAL",486154966:"IFCWINDOWSTANDARDCASE",4237592921:"IFCWASTETERMINAL",4156078855:"IFCWALLELEMENTEDCASE",4207607924:"IFCVALVE",4292641817:"IFCUNITARYEQUIPMENT",3179687236:"IFCUNITARYCONTROLELEMENTTYPE",3026737570:"IFCTUBEBUNDLE",3825984169:"IFCTRANSFORMER",812556717:"IFCTANK",1162798199:"IFCSWITCHINGDEVICE",385403989:"IFCSTRUCTURALLOADCASE",1404847402:"IFCSTACKTERMINAL",1999602285:"IFCSPACEHEATER",3420628829:"IFCSOLARDEVICE",3027962421:"IFCSLABSTANDARDCASE",3127900445:"IFCSLABELEMENTEDCASE",1329646415:"IFCSHADINGDEVICE",3053780830:"IFCSANITARYTERMINAL",2572171363:"IFCREINFORCINGBARTYPE",1232101972:"IFCRATIONALBSPLINECURVEWITHKNOTS",90941305:"IFCPUMP",655969474:"IFCPROTECTIVEDEVICETRIPPINGUNITTYPE",738039164:"IFCPROTECTIVEDEVICE",1156407060:"IFCPLATESTANDARDCASE",3612865200:"IFCPIPESEGMENT",310824031:"IFCPIPEFITTING",3694346114:"IFCOUTLET",144952367:"IFCOUTERBOUNDARYCURVE",2474470126:"IFCMOTORCONNECTION",1911478936:"IFCMEMBERSTANDARDCASE",1437502449:"IFCMEDICALDEVICE",629592764:"IFCLIGHTFIXTURE",76236018:"IFCLAMP",2176052936:"IFCJUNCTIONBOX",4175244083:"IFCINTERCEPTOR",2068733104:"IFCHUMIDIFIER",3319311131:"IFCHEATEXCHANGER",2188021234:"IFCFLOWMETER",1209101575:"IFCEXTERNALSPATIALELEMENT",484807127:"IFCEVAPORATOR",3747195512:"IFCEVAPORATIVECOOLER",2814081492:"IFCENGINE",2417008758:"IFCELECTRICDISTRIBUTIONBOARDTYPE",3242481149:"IFCDOORSTANDARDCASE",3205830791:"IFCDISTRIBUTIONSYSTEM",400855858:"IFCCOMMUNICATIONSAPPLIANCETYPE",905975707:"IFCCOLUMNSTANDARDCASE",1677625105:"IFCCIVILELEMENT",3296154744:"IFCCHIMNEY",2674252688:"IFCCABLEFITTINGTYPE",2188180465:"IFCBURNERTYPE",1177604601:"IFCBUILDINGSYSTEM",39481116:"IFCBUILDINGELEMENTPARTTYPE",1136057603:"IFCBOUNDARYCURVE",2461110595:"IFCBSPLINECURVEWITHKNOTS",1532957894:"IFCAUDIOVISUALAPPLIANCETYPE",4088093105:"IFCWORKCALENDAR",4009809668:"IFCWINDOWTYPE",926996030:"IFCVOIDINGFEATURE",2391383451:"IFCVIBRATIONISOLATOR",2415094496:"IFCTENDONTYPE",3081323446:"IFCTENDONANCHORTYPE",413509423:"IFCSYSTEMFURNITUREELEMENT",3101698114:"IFCSURFACEFEATURE",3657597509:"IFCSTRUCTURALSURFACEACTION",2757150158:"IFCSTRUCTURALCURVEREACTION",1004757350:"IFCSTRUCTURALCURVEACTION",338393293:"IFCSTAIRTYPE",1072016465:"IFCSOLARDEVICETYPE",4074543187:"IFCSHADINGDEVICETYPE",2157484638:"IFCSEAMCURVE",2781568857:"IFCROOFTYPE",2310774935:"IFCREINFORCINGMESHTYPE",964333572:"IFCREINFORCINGELEMENTTYPE",683857671:"IFCRATIONALBSPLINESURFACEWITHKNOTS",1469900589:"IFCRAMPTYPE",2839578677:"IFCPOLYGONALFACESET",1158309216:"IFCPILETYPE",3079942009:"IFCOPENINGSTANDARDCASE",1114901282:"IFCMEDICALDEVICETYPE",3113134337:"IFCINTERSECTIONCURVE",3946677679:"IFCINTERCEPTORTYPE",2571569899:"IFCINDEXEDPOLYCURVE",3493046030:"IFCGEOGRAPHICELEMENT",1509553395:"IFCFURNITURE",1893162501:"IFCFOOTINGTYPE",2853485674:"IFCEXTERNALSPATIALSTRUCTUREELEMENT",4148101412:"IFCEVENT",132023988:"IFCENGINETYPE",2397081782:"IFCELEMENTASSEMBLYTYPE",2323601079:"IFCDOORTYPE",1213902940:"IFCCYLINDRICALSURFACE",1525564444:"IFCCONSTRUCTIONPRODUCTRESOURCETYPE",4105962743:"IFCCONSTRUCTIONMATERIALRESOURCETYPE",2185764099:"IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE",15328376:"IFCCOMPOSITECURVEONSURFACE",3875453745:"IFCCOMPLEXPROPERTYTEMPLATE",3893394355:"IFCCIVILELEMENTTYPE",2197970202:"IFCCHIMNEYTYPE",167062518:"IFCBSPLINESURFACEWITHKNOTS",2887950389:"IFCBSPLINESURFACE",2603310189:"IFCADVANCEDBREPWITHVOIDS",1635779807:"IFCADVANCEDBREP",2916149573:"IFCTRIANGULATEDFACESET",1935646853:"IFCTOROIDALSURFACE",2387106220:"IFCTESSELLATEDFACESET",3206491090:"IFCTASKTYPE",699246055:"IFCSURFACECURVE",4095615324:"IFCSUBCONTRACTRESOURCETYPE",603775116:"IFCSTRUCTURALSURFACEREACTION",4015995234:"IFCSPHERICALSURFACE",2481509218:"IFCSPATIALZONETYPE",463610769:"IFCSPATIALZONE",710998568:"IFCSPATIALELEMENTTYPE",1412071761:"IFCSPATIALELEMENT",3663146110:"IFCSIMPLEPROPERTYTEMPLATE",3243963512:"IFCREVOLVEDAREASOLIDTAPERED",816062949:"IFCREPARAMETRISEDCOMPOSITECURVESEGMENT",1521410863:"IFCRELSPACEBOUNDARY2NDLEVEL",3523091289:"IFCRELSPACEBOUNDARY1STLEVEL",427948657:"IFCRELINTERFERESELEMENTS",307848117:"IFCRELDEFINESBYTEMPLATE",1462361463:"IFCRELDEFINESBYOBJECT",2565941209:"IFCRELDECLARES",1027710054:"IFCRELASSIGNSTOGROUPBYFACTOR",3521284610:"IFCPROPERTYTEMPLATE",492091185:"IFCPROPERTYSETTEMPLATE",653396225:"IFCPROJECTLIBRARY",569719735:"IFCPROCEDURETYPE",3967405729:"IFCPREDEFINEDPROPERTYSET",1682466193:"IFCPCURVE",428585644:"IFCLABORRESOURCETYPE",2294589976:"IFCINDEXEDPOLYGONALFACEWITHVOIDS",178912537:"IFCINDEXEDPOLYGONALFACE",4095422895:"IFCGEOGRAPHICELEMENTTYPE",2652556860:"IFCFIXEDREFERENCESWEPTAREASOLID",2804161546:"IFCEXTRUDEDAREASOLIDTAPERED",4024345920:"IFCEVENTTYPE",2629017746:"IFCCURVEBOUNDEDSURFACE",1815067380:"IFCCREWRESOURCETYPE",3419103109:"IFCCONTEXT",2574617495:"IFCCONSTRUCTIONRESOURCETYPE",2059837836:"IFCCARTESIANPOINTLIST3D",1675464909:"IFCCARTESIANPOINTLIST2D",574549367:"IFCCARTESIANPOINTLIST",3406155212:"IFCADVANCEDFACE",3698973494:"IFCTYPERESOURCE",3736923433:"IFCTYPEPROCESS",901063453:"IFCTESSELLATEDITEM",1096409881:"IFCSWEPTDISKSOLIDPOLYGONAL",1042787934:"IFCRESOURCETIME",1608871552:"IFCRESOURCECONSTRAINTRELATIONSHIP",2943643501:"IFCRESOURCEAPPROVALRELATIONSHIP",2090586900:"IFCQUANTITYSET",1482703590:"IFCPROPERTYTEMPLATEDEFINITION",3778827333:"IFCPREDEFINEDPROPERTIES",2998442950:"IFCMIRROREDPROFILEDEF",853536259:"IFCMATERIALRELATIONSHIP",3404854881:"IFCMATERIALPROFILESETUSAGETAPERING",3079605661:"IFCMATERIALPROFILESETUSAGE",2852063980:"IFCMATERIALCONSTITUENTSET",3708119e3:"IFCMATERIALCONSTITUENT",1585845231:"IFCLAGTIME",2133299955:"IFCINDEXEDTRIANGLETEXTUREMAP",1437953363:"IFCINDEXEDTEXTUREMAP",3570813810:"IFCINDEXEDCOLOURMAP",1437805879:"IFCEXTERNALREFERENCERELATIONSHIP",297599258:"IFCEXTENDEDPROPERTIES",211053100:"IFCEVENTTIME",2713554722:"IFCCONVERSIONBASEDUNITWITHOFFSET",3285139300:"IFCCOLOURRGBLIST",1236880293:"IFCWORKTIME",1199560280:"IFCTIMEPERIOD",3611470254:"IFCTEXTUREVERTEXLIST",2771591690:"IFCTASKTIMERECURRING",1549132990:"IFCTASKTIME",2043862942:"IFCTABLECOLUMN",2934153892:"IFCSURFACEREINFORCEMENTAREA",609421318:"IFCSTRUCTURALLOADORRESULT",3478079324:"IFCSTRUCTURALLOADCONFIGURATION",1054537805:"IFCSCHEDULINGTIME",2439245199:"IFCRESOURCELEVELRELATIONSHIP",2433181523:"IFCREFERENCE",3915482550:"IFCRECURRENCEPATTERN",986844984:"IFCPROPERTYABSTRACTION",3843373140:"IFCPROJECTEDCRS",677532197:"IFCPRESENTATIONITEM",1507914824:"IFCMATERIALUSAGEDEFINITION",552965576:"IFCMATERIALPROFILEWITHOFFSETS",164193824:"IFCMATERIALPROFILESET",2235152071:"IFCMATERIALPROFILE",1847252529:"IFCMATERIALLAYERWITHOFFSETS",760658860:"IFCMATERIALDEFINITION",3057273783:"IFCMAPCONVERSION",4294318154:"IFCEXTERNALINFORMATION",1466758467:"IFCCOORDINATEREFERENCESYSTEM",1785450214:"IFCCOORDINATEOPERATION",775493141:"IFCCONNECTIONVOLUMEGEOMETRY",979691226:"IFCREINFORCINGBAR",3700593921:"IFCELECTRICDISTRIBUTIONPOINT",1062813311:"IFCDISTRIBUTIONCONTROLELEMENT",1052013943:"IFCDISTRIBUTIONCHAMBERELEMENT",578613899:"IFCCONTROLLERTYPE",2454782716:"IFCCHAMFEREDGEFEATURE",753842376:"IFCBEAM",3001207471:"IFCALARMTYPE",2874132201:"IFCACTUATORTYPE",3304561284:"IFCWINDOW",3512223829:"IFCWALLSTANDARDCASE",2391406946:"IFCWALL",3313531582:"IFCVIBRATIONISOLATORTYPE",2347447852:"IFCTENDONANCHOR",3824725483:"IFCTENDON",2515109513:"IFCSTRUCTURALANALYSISMODEL",4252922144:"IFCSTAIRFLIGHT",331165859:"IFCSTAIR",1529196076:"IFCSLAB",1783015770:"IFCSENSORTYPE",1376911519:"IFCROUNDEDEDGEFEATURE",2016517767:"IFCROOF",2320036040:"IFCREINFORCINGMESH",3027567501:"IFCREINFORCINGELEMENT",3055160366:"IFCRATIONALBEZIERCURVE",3283111854:"IFCRAMPFLIGHT",3024970846:"IFCRAMP",2262370178:"IFCRAILING",3171933400:"IFCPLATE",1687234759:"IFCPILE",1073191201:"IFCMEMBER",900683007:"IFCFOOTING",3508470533:"IFCFLOWTREATMENTDEVICE",2223149337:"IFCFLOWTERMINAL",707683696:"IFCFLOWSTORAGEDEVICE",987401354:"IFCFLOWSEGMENT",3132237377:"IFCFLOWMOVINGDEVICE",4037862832:"IFCFLOWINSTRUMENTTYPE",4278956645:"IFCFLOWFITTING",2058353004:"IFCFLOWCONTROLLER",4222183408:"IFCFIRESUPPRESSIONTERMINALTYPE",1810631287:"IFCFILTERTYPE",346874300:"IFCFANTYPE",1658829314:"IFCENERGYCONVERSIONDEVICE",857184966:"IFCELECTRICALELEMENT",1634875225:"IFCELECTRICALCIRCUIT",712377611:"IFCELECTRICTIMECONTROLTYPE",1217240411:"IFCELECTRICMOTORTYPE",1365060375:"IFCELECTRICHEATERTYPE",1534661035:"IFCELECTRICGENERATORTYPE",3277789161:"IFCELECTRICFLOWSTORAGEDEVICETYPE",663422040:"IFCELECTRICAPPLIANCETYPE",855621170:"IFCEDGEFEATURE",2030761528:"IFCDUCTSILENCERTYPE",3760055223:"IFCDUCTSEGMENTTYPE",869906466:"IFCDUCTFITTINGTYPE",395920057:"IFCDOOR",3041715199:"IFCDISTRIBUTIONPORT",3040386961:"IFCDISTRIBUTIONFLOWELEMENT",1945004755:"IFCDISTRIBUTIONELEMENT",2063403501:"IFCDISTRIBUTIONCONTROLELEMENTTYPE",1599208980:"IFCDISTRIBUTIONCHAMBERELEMENTTYPE",2635815018:"IFCDISCRETEACCESSORYTYPE",1335981549:"IFCDISCRETEACCESSORY",4147604152:"IFCDIAMETERDIMENSION",3961806047:"IFCDAMPERTYPE",3495092785:"IFCCURTAINWALL",1973544240:"IFCCOVERING",2954562838:"IFCCOOLINGTOWERTYPE",335055490:"IFCCOOLEDBEAMTYPE",488727124:"IFCCONSTRUCTIONPRODUCTRESOURCE",1060000209:"IFCCONSTRUCTIONMATERIALRESOURCE",3898045240:"IFCCONSTRUCTIONEQUIPMENTRESOURCE",1163958913:"IFCCONDITIONCRITERION",2188551683:"IFCCONDITION",2816379211:"IFCCONDENSERTYPE",3850581409:"IFCCOMPRESSORTYPE",843113511:"IFCCOLUMN",2301859152:"IFCCOILTYPE",2611217952:"IFCCIRCLE",2951183804:"IFCCHILLERTYPE",1285652485:"IFCCABLESEGMENTTYPE",3293546465:"IFCCABLECARRIERSEGMENTTYPE",395041908:"IFCCABLECARRIERFITTINGTYPE",1909888760:"IFCBUILDINGELEMENTPROXYTYPE",1095909175:"IFCBUILDINGELEMENTPROXY",2979338954:"IFCBUILDINGELEMENTPART",52481810:"IFCBUILDINGELEMENTCOMPONENT",3299480353:"IFCBUILDINGELEMENT",231477066:"IFCBOILERTYPE",1916977116:"IFCBEZIERCURVE",819618141:"IFCBEAMTYPE",1967976161:"IFCBSPLINECURVE",3460190687:"IFCASSET",2470393545:"IFCANGULARDIMENSION",1871374353:"IFCAIRTOAIRHEATRECOVERYTYPE",3352864051:"IFCAIRTERMINALTYPE",1411407467:"IFCAIRTERMINALBOXTYPE",3821786052:"IFCACTIONREQUEST",1213861670:"IFC2DCOMPOSITECURVE",1033361043:"IFCZONE",3342526732:"IFCWORKSCHEDULE",4218914973:"IFCWORKPLAN",1028945134:"IFCWORKCONTROL",1133259667:"IFCWASTETERMINALTYPE",1898987631:"IFCWALLTYPE",2769231204:"IFCVIRTUALELEMENT",728799441:"IFCVALVETYPE",1911125066:"IFCUNITARYEQUIPMENTTYPE",1600972822:"IFCTUBEBUNDLETYPE",3593883385:"IFCTRIMMEDCURVE",1620046519:"IFCTRANSPORTELEMENT",1692211062:"IFCTRANSFORMERTYPE",1637806684:"IFCTIMESERIESSCHEDULE",5716631:"IFCTANKTYPE",2254336722:"IFCSYSTEM",2315554128:"IFCSWITCHINGDEVICETYPE",148013059:"IFCSUBCONTRACTRESOURCE",1975003073:"IFCSTRUCTURALSURFACECONNECTION",2986769608:"IFCSTRUCTURALRESULTGROUP",1235345126:"IFCSTRUCTURALPOINTREACTION",734778138:"IFCSTRUCTURALPOINTCONNECTION",2082059205:"IFCSTRUCTURALPOINTACTION",3987759626:"IFCSTRUCTURALPLANARACTIONVARYING",1621171031:"IFCSTRUCTURALPLANARACTION",1252848954:"IFCSTRUCTURALLOADGROUP",1721250024:"IFCSTRUCTURALLINEARACTIONVARYING",1807405624:"IFCSTRUCTURALLINEARACTION",2445595289:"IFCSTRUCTURALCURVEMEMBERVARYING",214636428:"IFCSTRUCTURALCURVEMEMBER",4243806635:"IFCSTRUCTURALCURVECONNECTION",1179482911:"IFCSTRUCTURALCONNECTION",682877961:"IFCSTRUCTURALACTION",1039846685:"IFCSTAIRFLIGHTTYPE",3112655638:"IFCSTACKTERMINALTYPE",3812236995:"IFCSPACETYPE",652456506:"IFCSPACEPROGRAM",1305183839:"IFCSPACEHEATERTYPE",3856911033:"IFCSPACE",2533589738:"IFCSLABTYPE",4097777520:"IFCSITE",4105383287:"IFCSERVICELIFE",3517283431:"IFCSCHEDULETIMECONTROL",1768891740:"IFCSANITARYTERMINALTYPE",2863920197:"IFCRELASSIGNSTASKS",160246688:"IFCRELAGGREGATES",2324767716:"IFCRAMPFLIGHTTYPE",2893384427:"IFCRAILINGTYPE",3248260540:"IFCRADIUSDIMENSION",2250791053:"IFCPUMPTYPE",1842657554:"IFCPROTECTIVEDEVICETYPE",3651124850:"IFCPROJECTIONELEMENT",3642467123:"IFCPROJECTORDERRECORD",2904328755:"IFCPROJECTORDER",2744685151:"IFCPROCEDURE",3740093272:"IFCPORT",3724593414:"IFCPOLYLINE",4017108033:"IFCPLATETYPE",4231323485:"IFCPIPESEGMENTTYPE",804291784:"IFCPIPEFITTINGTYPE",3327091369:"IFCPERMIT",2382730787:"IFCPERFORMANCEHISTORY",2837617999:"IFCOUTLETTYPE",3425660407:"IFCORDERACTION",3588315303:"IFCOPENINGELEMENT",4143007308:"IFCOCCUPANT",1916936684:"IFCMOVE",977012517:"IFCMOTORCONNECTIONTYPE",3181161470:"IFCMEMBERTYPE",2108223431:"IFCMECHANICALFASTENERTYPE",377706215:"IFCMECHANICALFASTENER",2506943328:"IFCLINEARDIMENSION",1161773419:"IFCLIGHTFIXTURETYPE",1051575348:"IFCLAMPTYPE",3827777499:"IFCLABORRESOURCE",4288270099:"IFCJUNCTIONBOXTYPE",2391368822:"IFCINVENTORY",1806887404:"IFCHUMIDIFIERTYPE",1251058090:"IFCHEATEXCHANGERTYPE",2706460486:"IFCGROUP",3009204131:"IFCGRID",200128114:"IFCGASTERMINALTYPE",814719939:"IFCFURNITURESTANDARD",263784265:"IFCFURNISHINGELEMENT",3009222698:"IFCFLOWTREATMENTDEVICETYPE",2297155007:"IFCFLOWTERMINALTYPE",1339347760:"IFCFLOWSTORAGEDEVICETYPE",1834744321:"IFCFLOWSEGMENTTYPE",1482959167:"IFCFLOWMOVINGDEVICETYPE",3815607619:"IFCFLOWMETERTYPE",3198132628:"IFCFLOWFITTINGTYPE",3907093117:"IFCFLOWCONTROLLERTYPE",1287392070:"IFCFEATUREELEMENTSUBTRACTION",2143335405:"IFCFEATUREELEMENTADDITION",2827207264:"IFCFEATUREELEMENT",2489546625:"IFCFASTENERTYPE",647756555:"IFCFASTENER",3737207727:"IFCFACETEDBREPWITHVOIDS",807026263:"IFCFACETEDBREP",3390157468:"IFCEVAPORATORTYPE",3174744832:"IFCEVAPORATIVECOOLERTYPE",3272907226:"IFCEQUIPMENTSTANDARD",1962604670:"IFCEQUIPMENTELEMENT",2107101300:"IFCENERGYCONVERSIONDEVICETYPE",1704287377:"IFCELLIPSE",2590856083:"IFCELEMENTCOMPONENTTYPE",1623761950:"IFCELEMENTCOMPONENT",4123344466:"IFCELEMENTASSEMBLY",1758889154:"IFCELEMENT",360485395:"IFCELECTRICALBASEPROPERTIES",3849074793:"IFCDISTRIBUTIONFLOWELEMENTTYPE",3256556792:"IFCDISTRIBUTIONELEMENTTYPE",681481545:"IFCDIMENSIONCURVEDIRECTEDCALLOUT",1457835157:"IFCCURTAINWALLTYPE",3295246426:"IFCCREWRESOURCE",1916426348:"IFCCOVERINGTYPE",1419761937:"IFCCOSTSCHEDULE",3895139033:"IFCCOSTITEM",3293443760:"IFCCONTROL",2559216714:"IFCCONSTRUCTIONRESOURCE",2510884976:"IFCCONIC",3732776249:"IFCCOMPOSITECURVE",300633059:"IFCCOLUMNTYPE",2937912522:"IFCCIRCLEHOLLOWPROFILEDEF",3124254112:"IFCBUILDINGSTOREY",1950629157:"IFCBUILDINGELEMENTTYPE",4031249490:"IFCBUILDING",1260505505:"IFCBOUNDEDCURVE",3649129432:"IFCBOOLEANCLIPPINGRESULT",1334484129:"IFCBLOCK",3207858831:"IFCASYMMETRICISHAPEPROFILEDEF",1674181508:"IFCANNOTATION",2296667514:"IFCACTOR",2097647324:"IFCTRANSPORTELEMENTTYPE",3473067441:"IFCTASK",1580310250:"IFCSYSTEMFURNITUREELEMENTTYPE",4124788165:"IFCSURFACEOFREVOLUTION",2809605785:"IFCSURFACEOFLINEAREXTRUSION",2028607225:"IFCSURFACECURVESWEPTAREASOLID",4070609034:"IFCSTRUCTUREDDIMENSIONCALLOUT",2218152070:"IFCSTRUCTURALSURFACEMEMBERVARYING",3979015343:"IFCSTRUCTURALSURFACEMEMBER",3689010777:"IFCSTRUCTURALREACTION",530289379:"IFCSTRUCTURALMEMBER",3136571912:"IFCSTRUCTURALITEM",3544373492:"IFCSTRUCTURALACTIVITY",451544542:"IFCSPHERE",3893378262:"IFCSPATIALSTRUCTUREELEMENTTYPE",2706606064:"IFCSPATIALSTRUCTUREELEMENT",3626867408:"IFCRIGHTCIRCULARCYLINDER",4158566097:"IFCRIGHTCIRCULARCONE",1856042241:"IFCREVOLVEDAREASOLID",2914609552:"IFCRESOURCE",1401173127:"IFCRELVOIDSELEMENT",3451746338:"IFCRELSPACEBOUNDARY",366585022:"IFCRELSERVICESBUILDINGS",4122056220:"IFCRELSEQUENCE",1058617721:"IFCRELSCHEDULESCOSTITEMS",1245217292:"IFCRELREFERENCEDINSPATIALSTRUCTURE",750771296:"IFCRELPROJECTSELEMENT",202636808:"IFCRELOVERRIDESPROPERTIES",2051452291:"IFCRELOCCUPIESSPACES",3268803585:"IFCRELNESTS",4189434867:"IFCRELINTERACTIONREQUIREMENTS",279856033:"IFCRELFLOWCONTROLELEMENTS",3940055652:"IFCRELFILLSELEMENT",781010003:"IFCRELDEFINESBYTYPE",4186316022:"IFCRELDEFINESBYPROPERTIES",693640335:"IFCRELDEFINES",2551354335:"IFCRELDECOMPOSES",2802773753:"IFCRELCOVERSSPACES",886880790:"IFCRELCOVERSBLDGELEMENTS",3242617779:"IFCRELCONTAINEDINSPATIALSTRUCTURE",3678494232:"IFCRELCONNECTSWITHREALIZINGELEMENTS",504942748:"IFCRELCONNECTSWITHECCENTRICITY",1638771189:"IFCRELCONNECTSSTRUCTURALMEMBER",3912681535:"IFCRELCONNECTSSTRUCTURALELEMENT",2127690289:"IFCRELCONNECTSSTRUCTURALACTIVITY",3190031847:"IFCRELCONNECTSPORTS",4201705270:"IFCRELCONNECTSPORTTOELEMENT",3945020480:"IFCRELCONNECTSPATHELEMENTS",1204542856:"IFCRELCONNECTSELEMENTS",826625072:"IFCRELCONNECTS",2851387026:"IFCRELASSOCIATESPROFILEPROPERTIES",2655215786:"IFCRELASSOCIATESMATERIAL",3840914261:"IFCRELASSOCIATESLIBRARY",982818633:"IFCRELASSOCIATESDOCUMENT",2728634034:"IFCRELASSOCIATESCONSTRAINT",919958153:"IFCRELASSOCIATESCLASSIFICATION",4095574036:"IFCRELASSOCIATESAPPROVAL",1327628568:"IFCRELASSOCIATESAPPLIEDVALUE",1865459582:"IFCRELASSOCIATES",205026976:"IFCRELASSIGNSTORESOURCE",3372526763:"IFCRELASSIGNSTOPROJECTORDER",2857406711:"IFCRELASSIGNSTOPRODUCT",4278684876:"IFCRELASSIGNSTOPROCESS",1307041759:"IFCRELASSIGNSTOGROUP",2495723537:"IFCRELASSIGNSTOCONTROL",1683148259:"IFCRELASSIGNSTOACTOR",3939117080:"IFCRELASSIGNS",3454111270:"IFCRECTANGULARTRIMMEDSURFACE",2798486643:"IFCRECTANGULARPYRAMID",2770003689:"IFCRECTANGLEHOLLOWPROFILEDEF",3219374653:"IFCPROXY",1451395588:"IFCPROPERTYSET",4194566429:"IFCPROJECTIONCURVE",103090709:"IFCPROJECT",4208778838:"IFCPRODUCT",2945172077:"IFCPROCESS",220341763:"IFCPLANE",603570806:"IFCPLANARBOX",3566463478:"IFCPERMEABLECOVERINGPROPERTIES",3505215534:"IFCOFFSETCURVE3D",3388369263:"IFCOFFSETCURVE2D",3888040117:"IFCOBJECT",1425443689:"IFCMANIFOLDSOLIDBREP",1281925730:"IFCLINE",572779678:"IFCLSHAPEPROFILEDEF",1484403080:"IFCISHAPEPROFILEDEF",987898635:"IFCGEOMETRICCURVESET",1268542332:"IFCFURNITURETYPE",4238390223:"IFCFURNISHINGELEMENTTYPE",3455213021:"IFCFLUIDFLOWPROPERTIES",315944413:"IFCFILLAREASTYLETILES",4203026998:"IFCFILLAREASTYLETILESYMBOLWITHSTYLE",374418227:"IFCFILLAREASTYLEHATCHING",2047409740:"IFCFACEBASEDSURFACEMODEL",477187591:"IFCEXTRUDEDAREASOLID",80994333:"IFCENERGYPROPERTIES",2835456948:"IFCELLIPSEPROFILEDEF",2777663545:"IFCELEMENTARYSURFACE",339256511:"IFCELEMENTTYPE",1883228015:"IFCELEMENTQUANTITY",1472233963:"IFCEDGELOOP",4006246654:"IFCDRAUGHTINGPREDEFINEDCURVEFONT",445594917:"IFCDRAUGHTINGPREDEFINEDCOLOUR",3073041342:"IFCDRAUGHTINGCALLOUT",526551008:"IFCDOORSTYLE",1714330368:"IFCDOORPANELPROPERTIES",2963535650:"IFCDOORLININGPROPERTIES",32440307:"IFCDIRECTION",4054601972:"IFCDIMENSIONCURVETERMINATOR",606661476:"IFCDIMENSIONCURVE",693772133:"IFCDEFINEDSYMBOL",2827736869:"IFCCURVEBOUNDEDPLANE",2601014836:"IFCCURVE",2147822146:"IFCCSGSOLID",2506170314:"IFCCSGPRIMITIVE3D",194851669:"IFCCRANERAILFSHAPEPROFILEDEF",4133800736:"IFCCRANERAILASHAPEPROFILEDEF",2485617015:"IFCCOMPOSITECURVESEGMENT",2205249479:"IFCCLOSEDSHELL",1383045692:"IFCCIRCLEPROFILEDEF",1416205885:"IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM",3331915920:"IFCCARTESIANTRANSFORMATIONOPERATOR3D",3486308946:"IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM",3749851601:"IFCCARTESIANTRANSFORMATIONOPERATOR2D",59481748:"IFCCARTESIANTRANSFORMATIONOPERATOR",1123145078:"IFCCARTESIANPOINT",2898889636:"IFCCSHAPEPROFILEDEF",2713105998:"IFCBOXEDHALFSPACE",2581212453:"IFCBOUNDINGBOX",4182860854:"IFCBOUNDEDSURFACE",2736907675:"IFCBOOLEANRESULT",2740243338:"IFCAXIS2PLACEMENT3D",3125803723:"IFCAXIS2PLACEMENT2D",4261334040:"IFCAXIS1PLACEMENT",1302238472:"IFCANNOTATIONSURFACE",2265737646:"IFCANNOTATIONFILLAREAOCCURRENCE",669184980:"IFCANNOTATIONFILLAREA",3288037868:"IFCANNOTATIONCURVEOCCURRENCE",2543172580:"IFCZSHAPEPROFILEDEF",1299126871:"IFCWINDOWSTYLE",512836454:"IFCWINDOWPANELPROPERTIES",336235671:"IFCWINDOWLININGPROPERTIES",2759199220:"IFCVERTEXLOOP",1417489154:"IFCVECTOR",427810014:"IFCUSHAPEPROFILEDEF",2347495698:"IFCTYPEPRODUCT",1628702193:"IFCTYPEOBJECT",1345879162:"IFCTWODIRECTIONREPEATFACTOR",2715220739:"IFCTRAPEZIUMPROFILEDEF",3124975700:"IFCTEXTLITERALWITHEXTENT",4282788508:"IFCTEXTLITERAL",3028897424:"IFCTERMINATORSYMBOL",3071757647:"IFCTSHAPEPROFILEDEF",230924584:"IFCSWEPTSURFACE",1260650574:"IFCSWEPTDISKSOLID",2247615214:"IFCSWEPTAREASOLID",1878645084:"IFCSURFACESTYLERENDERING",2513912981:"IFCSURFACE",2233826070:"IFCSUBEDGE",3653947884:"IFCSTRUCTURALSTEELPROFILEPROPERTIES",3843319758:"IFCSTRUCTURALPROFILEPROPERTIES",1190533807:"IFCSTRUCTURALLOADSINGLEFORCEWARPING",1597423693:"IFCSTRUCTURALLOADSINGLEFORCE",1973038258:"IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION",2473145415:"IFCSTRUCTURALLOADSINGLEDISPLACEMENT",2668620305:"IFCSTRUCTURALLOADPLANARFORCE",1595516126:"IFCSTRUCTURALLOADLINEARFORCE",390701378:"IFCSPACETHERMALLOADPROPERTIES",1202362311:"IFCSOUNDVALUE",2485662743:"IFCSOUNDPROPERTIES",723233188:"IFCSOLIDMODEL",2609359061:"IFCSLIPPAGECONNECTIONCONDITION",4124623270:"IFCSHELLBASEDSURFACEMODEL",2411513650:"IFCSERVICELIFEFACTOR",1509187699:"IFCSECTIONEDSPINE",2778083089:"IFCROUNDEDRECTANGLEPROFILEDEF",478536968:"IFCRELATIONSHIP",3765753017:"IFCREINFORCEMENTDEFINITIONPROPERTIES",3413951693:"IFCREGULARTIMESERIES",3615266464:"IFCRECTANGLEPROFILEDEF",110355661:"IFCPROPERTYTABLEVALUE",3650150729:"IFCPROPERTYSINGLEVALUE",3357820518:"IFCPROPERTYSETDEFINITION",941946838:"IFCPROPERTYREFERENCEVALUE",2752243245:"IFCPROPERTYLISTVALUE",4166981789:"IFCPROPERTYENUMERATEDVALUE",1680319473:"IFCPROPERTYDEFINITION",871118103:"IFCPROPERTYBOUNDEDVALUE",673634403:"IFCPRODUCTDEFINITIONSHAPE",179317114:"IFCPREDEFINEDPOINTMARKERSYMBOL",433424934:"IFCPREDEFINEDDIMENSIONSYMBOL",2559016684:"IFCPREDEFINEDCURVEFONT",759155922:"IFCPREDEFINEDCOLOUR",2775532180:"IFCPOLYGONALBOUNDEDHALFSPACE",2924175390:"IFCPOLYLOOP",1423911732:"IFCPOINTONSURFACE",4022376103:"IFCPOINTONCURVE",2067069095:"IFCPOINT",1663979128:"IFCPLANAREXTENT",2004835150:"IFCPLACEMENT",597895409:"IFCPIXELTEXTURE",3021840470:"IFCPHYSICALCOMPLEXQUANTITY",2519244187:"IFCPATH",2529465313:"IFCPARAMETERIZEDPROFILEDEF",1029017970:"IFCORIENTEDEDGE",2665983363:"IFCOPENSHELL",2833995503:"IFCONEDIRECTIONREPEATFACTOR",219451334:"IFCOBJECTDEFINITION",1430189142:"IFCMECHANICALCONCRETEMATERIALPROPERTIES",2022407955:"IFCMATERIALDEFINITIONREPRESENTATION",2347385850:"IFCMAPPEDITEM",1008929658:"IFCLOOP",2624227202:"IFCLOCALPLACEMENT",3422422726:"IFCLIGHTSOURCESPOT",1520743889:"IFCLIGHTSOURCEPOSITIONAL",4266656042:"IFCLIGHTSOURCEGONIOMETRIC",2604431987:"IFCLIGHTSOURCEDIRECTIONAL",125510826:"IFCLIGHTSOURCEAMBIENT",1402838566:"IFCLIGHTSOURCE",3741457305:"IFCIRREGULARTIMESERIES",3905492369:"IFCIMAGETEXTURE",2445078500:"IFCHYGROSCOPICMATERIALPROPERTIES",812098782:"IFCHALFSPACESOLID",178086475:"IFCGRIDPLACEMENT",3590301190:"IFCGEOMETRICSET",4142052618:"IFCGEOMETRICREPRESENTATIONSUBCONTEXT",2453401579:"IFCGEOMETRICREPRESENTATIONITEM",3448662350:"IFCGEOMETRICREPRESENTATIONCONTEXT",1446786286:"IFCGENERALPROFILEPROPERTIES",803998398:"IFCGENERALMATERIALPROPERTIES",3857492461:"IFCFUELPROPERTIES",738692330:"IFCFILLAREASTYLE",4219587988:"IFCFAILURECONNECTIONCONDITION",3008276851:"IFCFACESURFACE",803316827:"IFCFACEOUTERBOUND",1809719519:"IFCFACEBOUND",2556980723:"IFCFACE",1860660968:"IFCEXTENDEDMATERIALPROPERTIES",476780140:"IFCEDGECURVE",3900360178:"IFCEDGE",4170525392:"IFCDRAUGHTINGPREDEFINEDTEXTFONT",3732053477:"IFCDOCUMENTREFERENCE",1694125774:"IFCDIMENSIONPAIR",2273265877:"IFCDIMENSIONCALLOUTRELATIONSHIP",3632507154:"IFCDERIVEDPROFILEDEF",3800577675:"IFCCURVESTYLE",2889183280:"IFCCONVERSIONBASEDUNIT",3050246964:"IFCCONTEXTDEPENDENTUNIT",45288368:"IFCCONNECTIONPOINTECCENTRICITY",1981873012:"IFCCONNECTIONCURVEGEOMETRY",370225590:"IFCCONNECTEDFACESET",1485152156:"IFCCOMPOSITEPROFILEDEF",2542286263:"IFCCOMPLEXPROPERTY",776857604:"IFCCOLOURRGB",647927063:"IFCCLASSIFICATIONREFERENCE",3150382593:"IFCCENTERLINEPROFILEDEF",616511568:"IFCBLOBTEXTURE",2705031697:"IFCARBITRARYPROFILEDEFWITHVOIDS",1310608509:"IFCARBITRARYOPENPROFILEDEF",3798115385:"IFCARBITRARYCLOSEDPROFILEDEF",2297822566:"IFCANNOTATIONTEXTOCCURRENCE",3612888222:"IFCANNOTATIONSYMBOLOCCURRENCE",962685235:"IFCANNOTATIONSURFACEOCCURRENCE",2442683028:"IFCANNOTATIONOCCURRENCE",1065908215:"IFCWATERPROPERTIES",891718957:"IFCVIRTUALGRIDINTERSECTION",1907098498:"IFCVERTEXPOINT",3304826586:"IFCVERTEXBASEDTEXTUREMAP",2799835756:"IFCVERTEX",180925521:"IFCUNITASSIGNMENT",1735638870:"IFCTOPOLOGYREPRESENTATION",1377556343:"IFCTOPOLOGICALREPRESENTATIONITEM",581633288:"IFCTIMESERIESVALUE",1718945513:"IFCTIMESERIESREFERENCERELATIONSHIP",3101149627:"IFCTIMESERIES",3317419933:"IFCTHERMALMATERIALPROPERTIES",1210645708:"IFCTEXTUREVERTEX",2552916305:"IFCTEXTUREMAP",1742049831:"IFCTEXTURECOORDINATEGENERATOR",280115917:"IFCTEXTURECOORDINATE",1484833681:"IFCTEXTSTYLEWITHBOXCHARACTERISTICS",1640371178:"IFCTEXTSTYLETEXTMODEL",2636378356:"IFCTEXTSTYLEFORDEFINEDFONT",1983826977:"IFCTEXTSTYLEFONTMODEL",1447204868:"IFCTEXTSTYLE",912023232:"IFCTELECOMADDRESS",531007025:"IFCTABLEROW",985171141:"IFCTABLE",1290481447:"IFCSYMBOLSTYLE",626085974:"IFCSURFACETEXTURE",1351298697:"IFCSURFACESTYLEWITHTEXTURES",846575682:"IFCSURFACESTYLESHADING",1607154358:"IFCSURFACESTYLEREFRACTION",3303107099:"IFCSURFACESTYLELIGHTING",1300840506:"IFCSURFACESTYLE",3049322572:"IFCSTYLEDREPRESENTATION",3958052878:"IFCSTYLEDITEM",2830218821:"IFCSTYLEMODEL",3408363356:"IFCSTRUCTURALLOADTEMPERATURE",2525727697:"IFCSTRUCTURALLOADSTATIC",2162789131:"IFCSTRUCTURALLOAD",2273995522:"IFCSTRUCTURALCONNECTIONCONDITION",3692461612:"IFCSIMPLEPROPERTY",4240577450:"IFCSHAPEREPRESENTATION",3982875396:"IFCSHAPEMODEL",867548509:"IFCSHAPEASPECT",4165799628:"IFCSECTIONREINFORCEMENTPROPERTIES",2042790032:"IFCSECTIONPROPERTIES",448429030:"IFCSIUNIT",2341007311:"IFCROOT",3679540991:"IFCRIBPLATEPROFILEPROPERTIES",1660063152:"IFCREPRESENTATIONMAP",3008791417:"IFCREPRESENTATIONITEM",3377609919:"IFCREPRESENTATIONCONTEXT",1076942058:"IFCREPRESENTATION",1222501353:"IFCRELAXATION",1580146022:"IFCREINFORCEMENTBARPROPERTIES",2692823254:"IFCREFERENCESVALUEDOCUMENT",825690147:"IFCQUANTITYWEIGHT",2405470396:"IFCQUANTITYVOLUME",3252649465:"IFCQUANTITYTIME",931644368:"IFCQUANTITYLENGTH",2093928680:"IFCQUANTITYCOUNT",2044713172:"IFCQUANTITYAREA",3710013099:"IFCPROPERTYENUMERATION",148025276:"IFCPROPERTYDEPENDENCYRELATIONSHIP",3896028662:"IFCPROPERTYCONSTRAINTRELATIONSHIP",2598011224:"IFCPROPERTY",2802850158:"IFCPROFILEPROPERTIES",3958567839:"IFCPROFILEDEF",2267347899:"IFCPRODUCTSOFCOMBUSTIONPROPERTIES",2095639259:"IFCPRODUCTREPRESENTATION",2417041796:"IFCPRESENTATIONSTYLEASSIGNMENT",3119450353:"IFCPRESENTATIONSTYLE",1304840413:"IFCPRESENTATIONLAYERWITHSTYLE",2022622350:"IFCPRESENTATIONLAYERASSIGNMENT",1775413392:"IFCPREDEFINEDTEXTFONT",3213052703:"IFCPREDEFINEDTERMINATORSYMBOL",990879717:"IFCPREDEFINEDSYMBOL",3727388367:"IFCPREDEFINEDITEM",3355820592:"IFCPOSTALADDRESS",2226359599:"IFCPHYSICALSIMPLEQUANTITY",2483315170:"IFCPHYSICALQUANTITY",101040310:"IFCPERSONANDORGANIZATION",2077209135:"IFCPERSON",1207048766:"IFCOWNERHISTORY",1411181986:"IFCORGANIZATIONRELATIONSHIP",4251960020:"IFCORGANIZATION",1227763645:"IFCOPTICALMATERIALPROPERTIES",2251480897:"IFCOBJECTIVE",3701648758:"IFCOBJECTPLACEMENT",1918398963:"IFCNAMEDUNIT",2706619895:"IFCMONETARYUNIT",3368373690:"IFCMETRIC",677618848:"IFCMECHANICALSTEELMATERIALPROPERTIES",4256014907:"IFCMECHANICALMATERIALPROPERTIES",2597039031:"IFCMEASUREWITHUNIT",3265635763:"IFCMATERIALPROPERTIES",2199411900:"IFCMATERIALLIST",1303795690:"IFCMATERIALLAYERSETUSAGE",3303938423:"IFCMATERIALLAYERSET",248100487:"IFCMATERIALLAYER",1847130766:"IFCMATERIALCLASSIFICATIONRELATIONSHIP",1838606355:"IFCMATERIAL",30780891:"IFCLOCALTIME",1566485204:"IFCLIGHTINTENSITYDISTRIBUTION",4162380809:"IFCLIGHTDISTRIBUTIONDATA",3452421091:"IFCLIBRARYREFERENCE",2655187982:"IFCLIBRARYINFORMATION",3020489413:"IFCIRREGULARTIMESERIESVALUE",852622518:"IFCGRIDAXIS",3548104201:"IFCEXTERNALLYDEFINEDTEXTFONT",3207319532:"IFCEXTERNALLYDEFINEDSYMBOL",1040185647:"IFCEXTERNALLYDEFINEDSURFACESTYLE",2242383968:"IFCEXTERNALLYDEFINEDHATCHSTYLE",3200245327:"IFCEXTERNALREFERENCE",1648886627:"IFCENVIRONMENTALIMPACTVALUE",3796139169:"IFCDRAUGHTINGCALLOUTRELATIONSHIP",770865208:"IFCDOCUMENTINFORMATIONRELATIONSHIP",1154170062:"IFCDOCUMENTINFORMATION",1376555844:"IFCDOCUMENTELECTRONICFORMAT",2949456006:"IFCDIMENSIONALEXPONENTS",1045800335:"IFCDERIVEDUNITELEMENT",1765591967:"IFCDERIVEDUNIT",1072939445:"IFCDATEANDTIME",3510044353:"IFCCURVESTYLEFONTPATTERN",2367409068:"IFCCURVESTYLEFONTANDSCALING",1105321065:"IFCCURVESTYLEFONT",539742890:"IFCCURRENCYRELATIONSHIP",602808272:"IFCCOSTVALUE",1065062679:"IFCCOORDINATEDUNIVERSALTIMEOFFSET",347226245:"IFCCONSTRAINTRELATIONSHIP",613356794:"IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP",1658513725:"IFCCONSTRAINTAGGREGATIONRELATIONSHIP",1959218052:"IFCCONSTRAINT",2732653382:"IFCCONNECTIONSURFACEGEOMETRY",4257277454:"IFCCONNECTIONPORTGEOMETRY",2614616156:"IFCCONNECTIONPOINTGEOMETRY",2859738748:"IFCCONNECTIONGEOMETRY",3264961684:"IFCCOLOURSPECIFICATION",3639012971:"IFCCLASSIFICATIONNOTATIONFACET",938368621:"IFCCLASSIFICATIONNOTATION",1098599126:"IFCCLASSIFICATIONITEMRELATIONSHIP",1767535486:"IFCCLASSIFICATIONITEM",747523909:"IFCCLASSIFICATION",622194075:"IFCCALENDARDATE",2069777674:"IFCBOUNDARYNODECONDITIONWARPING",1387855156:"IFCBOUNDARYNODECONDITION",3367102660:"IFCBOUNDARYFACECONDITION",1560379544:"IFCBOUNDARYEDGECONDITION",4037036970:"IFCBOUNDARYCONDITION",3869604511:"IFCAPPROVALRELATIONSHIP",390851274:"IFCAPPROVALPROPERTYRELATIONSHIP",2080292479:"IFCAPPROVALACTORRELATIONSHIP",130549933:"IFCAPPROVAL",1110488051:"IFCAPPLIEDVALUERELATIONSHIP",411424972:"IFCAPPLIEDVALUE",639542469:"IFCAPPLICATION",618182010:"IFCADDRESS",3630933823:"IFCACTORROLE",599546466:"FILE_DESCRIPTION",1390159747:"FILE_NAME",1109904537:"FILE_SCHEMA"};class dt{static async getUnits(s){var n;const{IFCUNITASSIGNMENT:t}=b,e=await s.getAllPropertiesOfType(t);if(!e)return 1;const i=Object.keys(e),o=e[parseInt(i[0],10)];for(const r of o.Units){if(r.value===void 0||r.value===null)continue;const a=await s.getProperties(r.value);if(!a||!a.UnitType||!a.UnitType.value||a.UnitType.value!=="LENGTHUNIT")continue;let E=1,I=1;return a.Name.value==="METRE"&&(I=1),a.Name.value==="FOOT"&&(I=.3048),((n=a.Prefix)==null?void 0:n.value)==="MILLI"&&(E=.001),I*E}return 1}static async findItemByGuid(s,t){var i;const e=s.getAllPropertiesIDs();for(const o of e){const n=await s.getProperties(o);if(n&&((i=n.GlobalId)==null?void 0:i.value)===t)return n}return null}static async getRelationMap(s,t,e){var a;const o=e??(()=>{}),n={},r=s.getAllPropertiesIDs();for(const l of r){const E=await s.getProperties(l);if(!E)continue;const I=E.type===t,h=Object.keys(E).find(T=>T.startsWith("Relating")),d=Object.keys(E).find(T=>T.startsWith("Related"));if(!(I&&h&&d))continue;const p=await s.getProperties((a=E[h])==null?void 0:a.value),F=E[d];if(!p||!F||!(F&&Array.isArray(F)))continue;const A=F.map(T=>T.value);o(p.expressID,A),n[p.expressID]=A}return n}static async getQsetQuantities(s,t,e){const o=e??(()=>{}),n=await s.getProperties(t);return!n||n.type!==b.IFCELEMENTQUANTITY?null:(n.Quantities??[{}]).map(l=>(l.value&&o(l.value),l.value)).filter(l=>l!==null)}static async getPsetProps(s,t,e){const o=e??(()=>{}),n=await s.getProperties(t);return!n||n.type!==b.IFCPROPERTYSET?null:(n.HasProperties??[{}]).map(l=>(l.value&&o(l.value),l.value)).filter(l=>l!==null)}static async getPsetRel(s,t){var r;if(!await s.getProperties(t))return null;const i=await s.getAllPropertiesOfType(b.IFCRELDEFINESBYPROPERTIES);if(!i)return null;const o=Object.values(i);let n=null;for(const a of o)((r=a.RelatingPropertyDefinition)==null?void 0:r.value)===t&&(n=a.expressID);return n}static async getQsetRel(s,t){return dt.getPsetRel(s,t)}static async getEntityName(s,t){var n;const e=await s.getProperties(t);if(!e)return{key:null,name:null};const i=Object.keys(e).find(r=>r.endsWith("Name"))??null,o=i?(n=e[i])==null?void 0:n.value:null;return{key:i,name:o}}static async getQuantityValue(s,t){const e=await s.getProperties(t);if(!e)return{key:null,value:null};const i=Object.keys(e).find(n=>n.endsWith("Value"))??null;let o;return i===null||e[i]===void 0||e[i]===null?o=null:o=e[i].value,{key:i,value:o}}static isRel(s){return fi[s].startsWith("IFCREL")}static async attributeExists(s,t,e){const i=await s.getProperties(t);return i?Object.keys(i).includes(e):!1}static async groupEntitiesByType(s,t){var i;const e=new Map;for(const o of t){const n=await s.getProperties(o);if(!n)continue;const r=n.type;e.get(r)||e.set(r,new Set),(i=e.get(r))==null||i.add(o)}return e}}const fs=class fs extends st{constructor(t){super(t);f(this,"onDisposed",new U);f(this,"onFragmentsLoaded",new U);f(this,"onFragmentsDisposed",new U);f(this,"list",new Map);f(this,"groups",new Map);f(this,"enabled",!0);f(this,"baseCoordinationModel","");f(this,"_loader",new en.Serializer);this.components.add(fs.uuid,this)}get meshes(){const t=[];for(const[e,i]of this.list)t.push(i.mesh);return t}dispose(){for(const[t,e]of this.groups)e.dispose(!0);this.baseCoordinationModel="",this.groups.clear(),this.list.clear(),this.onFragmentsLoaded.reset(),this.onFragmentsDisposed.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}disposeGroup(t){const{uuid:e}=t,i=[];for(const o of t.items)i.push(o.id),this.list.delete(o.id);t.dispose(!0),this.groups.delete(t.uuid),this.onFragmentsDisposed.trigger({groupID:e,fragmentIDs:i})}load(t,e=!0){const i=this._loader.import(t);for(const o of i.items)o.group=i,this.list.set(o.id,o);return e&&this.coordinate([i]),this.groups.set(i.uuid,i),this.onFragmentsLoaded.trigger(i),i}export(t){return this._loader.export(t)}coordinate(t=Array.from(this.groups.values())){if(this.baseCoordinationModel.length===0){const o=t.pop();if(!o)return;this.baseCoordinationModel=o.uuid}if(!t.length)return;const i=this.groups.get(this.baseCoordinationModel);if(!i){console.log("No base model found for coordination!");return}for(const o of t)o!==i&&(o.position.set(0,0,0),o.rotation.set(0,0,0),o.scale.set(1,1,1),o.updateMatrix(),o.applyMatrix4(o.coordinationMatrix.clone().invert()),o.applyMatrix4(i.coordinationMatrix))}};f(fs,"uuid","fef46874-46a3-461b-8c44-2922ab77c806");let ut=fs;class dr extends st{constructor(t){super(t);f(this,"onFound",new U);f(this,"onDisposed",new U);f(this,"enabled",!0);f(this,"indexedModels",{});f(this,"_conditionFunctions");f(this,"_noHandleAttributes",["type"]);f(this,"onFragmentsDisposed",t=>{delete this.indexedModels[t.groupID]});this._conditionFunctions=this.getConditionFunctions(),t.get(ut).onFragmentsDisposed.add(this.onFragmentsDisposed)}dispose(){this.indexedModels={},this.onFound.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}async indexEntityRelations(t){const e={};await dt.getRelationMap(t,b.IFCRELDEFINESBYPROPERTIES,async(o,n)=>{e[o]||(e[o]=new Set);const r=[];await dt.getPsetProps(t,o,a=>{r.push(a),e[o].add(a),e[a]||(e[a]=new Set),e[a].add(o)});for(const a of n){e[o].add(a);for(const l of r)e[l].add(a);e[a]||(e[a]=new Set),e[a].add(a)}});const i=[b.IFCRELCONTAINEDINSPATIALSTRUCTURE,b.IFCRELDEFINESBYTYPE,b.IFCRELASSIGNSTOGROUP];for(const o of i)await dt.getRelationMap(t,o,async(n,r)=>{e[n]||(e[n]=new Set);for(const a of r)e[n].add(a),e[a]||(e[a]=new Set),e[a].add(a)});return this.indexedModels[t.uuid]=e,e}async find(t,e){const i=this.components.get(ut),o=e||i.groups.values(),n={};for(const a of o){let l=this.indexedModels[a.uuid];l||(l=await this.indexEntityRelations(a));let E=[];for(const[d,p]of t.entries()){const F=new Set,A=this.simpleQuery(a,p,F),T=[];for(const m of A){const O=l[m];if(O){T.push(m);for(const u of O)F.has(u)||T.push(u)}}E=p.operator==="AND"&&d>0?this.getCommonElements(E,T):[...E,...T]}const I=new Set;for(const[d]of a.data)E.includes(d)&&I.add(d);const h=new Set;for(const d of E)I.has(d)||h.add(d);n[a.uuid]={modelEntities:I,otherEntities:h}}const r=this.toFragmentMap(n);return this.onFound.trigger(r),r}toFragmentMap(t){const e=this.components.get(ut),i={};for(const o in t){const n=e.groups.get(o);if(!n)continue;const r=t[o].modelEntities;for(const a of r){const l=n.data.get(a);if(l)for(const E of l[0]){const I=n.keyFragments.get(E);if(!I)throw new Error("Fragment ID not found!");i[I]||(i[I]=new Set),i[I].add(a)}}}return i}simpleQuery(t,e,i){const o=t.getLocalProperties();if(!o)throw new Error("Model has no properties");let n={},r=0,a=[];for(const l of e.queries){let E=[];const I=l.operator==="AND"?n:o;if(l.condition){const d=this.getMatchingEntities(I,l,i);E=d.expressIDs,n={...n,...d.entities}}else E=[...this.simpleQuery(t,l,i)];a=r===0?E:this.combineArrays(a,E,l.operator??"AND"),r++}return new Set(a)}getMatchingEntities(t,e,i){const{attribute:o,condition:n}=e;let{value:r}=e;const a=!this._noHandleAttributes.includes(o),l=[],E=[];for(const I in t){const h=t[I];if(h===void 0)continue;const d=h[o];let p=a?d==null?void 0:d.value:d;if(p==null)continue;const F=typeof r,A=typeof p;F==="number"&&A==="string"?r=r.toString():F==="string"&&A==="number"&&(p=p.toString());let T=this._conditionFunctions[n](p,r);if(e.negateResult&&(T=!T),!T){e.negateResult&&i.add(h.expressID);continue}l.push(h.expressID),E.push(h)}return{expressIDs:l,entities:E,excludedItems:i}}combineArrays(t,e,i){return i?i==="AND"?this.arrayIntersection(t,e):this.arrayUnion(t,e):e}getCommonElements(...t){const e=[],i=new Map;for(const o of t){const n=new Set(o);for(const r of n)i.has(r)?i.set(r,i.get(r)+1):i.set(r,1)}for(const[o,n]of i)n===t.length&&e.push(o);return e}arrayIntersection(t,e){return t.filter(i=>e.includes(i))}arrayUnion(t,e){return[...t,...e]}getConditionFunctions(){return{is:(t,e)=>t===e,includes:(t,e)=>t.toString().includes(e.toString()),startsWith:(t,e)=>t.toString().startsWith(e.toString()),endsWith:(t,e)=>t.toString().endsWith(e.toString()),matches:(t,e)=>new RegExp(e.toString()).test(t.toString())}}}const Le=class Le extends st{constructor(t){super(t);f(this,"onDisposed",new U);f(this,"enabled",!0);f(this,"relationsToProcess",[b.IFCRELDEFINESBYPROPERTIES,b.IFCRELDEFINESBYTYPE,b.IFCRELASSOCIATESMATERIAL,b.IFCRELCONTAINEDINSPATIALSTRUCTURE,b.IFCRELASSOCIATESCLASSIFICATION,b.IFCRELASSIGNSTOGROUP]);f(this,"indexMap",{});f(this,"_propertiesManager",null);f(this,"onPropertiesManagerSet",new U);f(this,"onFragmentsDisposed",t=>{delete this.indexMap[t.groupID]});this.components.add(Le.uuid,this),t.get(ut).onFragmentsDisposed.add(this.onFragmentsDisposed)}set propertiesManager(t){this._propertiesManager||(this._propertiesManager=t,t&&(t.onElementToPset.add(async({model:e,psetID:i,elementID:o})=>{this.indexMap[e.uuid]&&this.setEntityIndex(e,o).add(i)}),this.onPropertiesManagerSet.trigger(t)))}get propertiesManager(){return this._propertiesManager}async dispose(){this.indexMap={},this.propertiesManager=null,this.onPropertiesManagerSet.reset(),this.components.get(ut).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(Le.uuid),this.onDisposed.reset()}async getProperties(t,e){if(!t.hasProperties)return null;const i=t.getLocalProperties();if(i===void 0)return null;const o=this.indexMap[t.uuid];if(!o)return null;const n=o[e],r=parseInt(e,10),a=await t.getProperties(r);if(!a)throw new Error("Properties not found!");const l=this.cloneProperty(a);if(!l)throw new Error("Properties not found!");const E=[l];if(n)for(const I of n){const h=await t.getProperties(I);if(!h)continue;const d=this.cloneProperty(h);d&&(this.getPsetProperties(d,i),this.getNestedPsets(d,i),E.push(d))}return E}getNestedPsets(t,e){if(t.HasPropertySets)for(const i of t.HasPropertySets){const o=i.value;i.value=this.cloneProperty(e[o]),this.getPsetProperties(i.value,e)}}getPsetProperties(t,e){if(t.HasProperties)for(const i of t.HasProperties){const o=i.value,n=this.cloneProperty(e[o]);i.value={...n}}}async process(t){if(!t.hasProperties)throw new Error("FragmentsGroup properties not found");this.indexMap[t.uuid]={};const e=[b.IFCPROPERTYSET,b.IFCELEMENTQUANTITY];for(const i of this.relationsToProcess)await dt.getRelationMap(t,i,async(o,n)=>{const r=await t.getProperties(o);if(r){e.includes(r.type)||this.setEntityIndex(t,o);for(const a of n)this.setEntityIndex(t,a).add(o)}})}setEntityIndex(t,e){return this.indexMap[t.uuid][e]||(this.indexMap[t.uuid][e]=new Set),this.indexMap[t.uuid][e]}cloneProperty(t,e={}){if(!t)return e;for(const i in t){const o=t[i],n=Array.isArray(o),r=typeof o=="object"&&!n&&o!==null;if(n){e[i]=[];const a=e[i];this.clonePropertyArray(o,a)}else if(r){e[i]={};const a=e[i];this.cloneProperty(o,a)}else e[i]=o}return e}clonePropertyArray(t,e){for(const i of t){const o=Array.isArray(i),n=typeof i=="object"&&!o&&i!==null;if(o){const r=[];e.push(r),this.clonePropertyArray(i,r)}else if(n){const r={};e.push(r),this.cloneProperty(i,r)}else e.push(i)}}};f(Le,"uuid","23a889ab-83b3-44a4-8bee-ead83438370b");let ai=Le;class ur{constructor(){f(this,"factor",1);f(this,"complement",1)}apply(s){const e=this.getScaleMatrix().multiply(s);s.copy(e)}setUp(s){var o;this.factor=1;const t=this.getLengthUnits(s);if(!t)return;const e=t==null,i=t.Name===void 0||t.Name===null;e||i||(t.Name.value==="FOOT"?this.factor=.3048:((o=t.Prefix)==null?void 0:o.value)==="MILLI"&&(this.complement=.001))}getLengthUnits(s){try{const e=s.GetLineIDsWithType(0,b.IFCUNITASSIGNMENT).get(0),i=s.GetLine(0,e);for(const o of i.Units){if(!o||o.value===null||o.value===void 0)continue;const n=s.GetLine(0,o.value);if(n.UnitType&&n.UnitType.value==="LENGTHUNIT")return n}return null}catch{return console.log("Could not get units"),null}}getScaleMatrix(){const s=this.factor;return new L.Matrix4().fromArray([s,0,0,0,0,s,0,0,0,0,s,0,0,0,0,1])}}class An{constructor(){f(this,"itemsByFloor",{});f(this,"_units",new ur)}setUp(s){this._units.setUp(s),this.cleanUp();try{const t=s.GetLineIDsWithType(0,b.IFCRELCONTAINEDINSPATIALSTRUCTURE),e=new Set,i=s.GetLineIDsWithType(0,b.IFCSPACE);for(let l=0;l<i.size();l++)e.add(i.get(l));const o=s.GetLineIDsWithType(0,b.IFCRELAGGREGATES),n=o.size();for(let l=0;l<n;l++){const E=o.get(l),I=s.GetLine(0,E);if(!I||!I.RelatingObject||!I.RelatedObjects)continue;const h=I.RelatingObject.value,d=I.RelatedObjects;for(const p of d){const F=p.value;e.has(F)&&(this.itemsByFloor[F]=h)}}const r={},a=t.size();for(let l=0;l<a;l++){const E=t.get(l),I=s.GetLine(0,E);if(!I||!I.RelatingStructure||!I.RelatedElements)continue;const h=I.RelatingStructure.value,d=I.RelatedElements;if(e.has(h))for(const p of d){r[h]||(r[h]=[]);const F=p.value;r[h].push(F)}else for(const p of d){const F=p.value;this.itemsByFloor[F]=h}}for(const l in r){const E=this.itemsByFloor[l];if(E!==void 0){const I=r[l];for(const h of I)this.itemsByFloor[h]=E}}for(let l=0;l<n;l++){const E=o.get(l),I=s.GetLine(0,E);if(!I||!I.RelatingObject||!I.RelatedObjects)continue;const h=I.RelatingObject.value,d=I.RelatedObjects;for(const p of d){const F=p.value,A=this.itemsByFloor[h];A!==void 0&&(this.itemsByFloor[F]=A)}}}catch{console.log("Could not get floors.")}}cleanUp(){this.itemsByFloor={}}}class Ci{constructor(){f(this,"includeProperties",!0);f(this,"optionalCategories",[b.IFCSPACE]);f(this,"coordinate",!0);f(this,"wasm",{path:"",absolute:!1,logLevel:b.LogLevel.LOG_LEVEL_OFF});f(this,"excludedCategories",new Set);f(this,"saveLocations",!1);f(this,"webIfc",{COORDINATE_TO_ORIGIN:!0,OPTIMIZE_PROFILES:!0});f(this,"autoSetWasm",!0);f(this,"customLocateFileHandler",null)}}class On{constructor(){f(this,"defLineMat",new L.LineBasicMaterial({color:16777215}))}read(s){const t=s.GetAllAlignments(0),e=s.GetAllCrossSections2D(0),i=s.GetAllCrossSections3D(0),o={IfcAlignment:t,IfcCrossSection2D:e,IfcCrossSection3D:i};return this.get(o)}get(s){if(s.IfcAlignment){const t=new Map;for(const e of s.IfcAlignment){const i=new Ht.Alignment;i.absolute=this.getCurves(e.curve3D,i),i.horizontal=this.getCurves(e.horizontal,i),i.vertical=this.getCurves(e.vertical,i),t.set(t.size,i)}return{alignments:t,coordinationMatrix:new L.Matrix4}}}getCurves(s,t){const e=[];let i=0;for(const o of s){const n={};if(o.data)for(const h of o.data){const[d,p]=h.split(": "),F=parseFloat(p);n[d]=F||p}const{points:r}=o,a=new Float32Array(r.length*3);for(let h=0;h<r.length;h++){const{x:d,y:p,z:F}=r[h];a[h*3]=d,a[h*3+1]=p,a[h*3+2]=F||0}const l=new L.BufferAttribute(a,3),E=new L.EdgesGeometry;E.setAttribute("position",l);const I=new Ht.CurveMesh(i,n,t,E,this.defLineMat);e.push(I.curve),i++}return e}}class Sn{get(s,t){let e="";const i=s.GetHeaderLine(0,t)||"";if(!i)return e;for(const o of i.arguments)if(o!=null)if(Array.isArray(o))for(const n of o)e+=`${n.value}|`;else e+=`${o.value}|`;return e}}const Pe=class Pe extends st{constructor(t){super(t);f(this,"onIfcStartedLoading",new U);f(this,"onSetup",new U);f(this,"onDisposed",new U);f(this,"settings",new Ci);f(this,"enabled",!0);f(this,"webIfc",new b.IfcAPI);f(this,"_material",new L.MeshLambertMaterial);f(this,"_spatialTree",new An);f(this,"_metaData",new Sn);f(this,"_fragmentInstances",new Map);f(this,"_civil",new On);f(this,"_propertyExporter",new Rn);f(this,"_visitedFragments",new Map);f(this,"_materialT",new L.MeshLambertMaterial({transparent:!0,opacity:.5}));this.components.add(Pe.uuid,this),this.settings.excludedCategories.add(b.IFCOPENINGELEMENT)}dispose(){this.webIfc=null,this.onDisposed.trigger(Pe.uuid),this.onDisposed.reset()}async setup(t){this.settings={...this.settings,...t},this.settings.autoSetWasm&&await this.autoSetWasm(),this.onSetup.trigger()}async load(t,e=!0){const i=performance.now();this.onIfcStartedLoading.trigger(),await this.readIfcFile(t);const o=await this.getAllGeometries(),n=await this._propertyExporter.export(this.webIfc,0);o.setLocalProperties(n),this.cleanUp();const r=this.components.get(ut);r.groups.set(o.uuid,o);for(const a of o.items)r.list.set(a.id,a),a.mesh.uuid=a.id,a.group=o;return r.onFragmentsLoaded.trigger(o),e&&r.coordinate([o]),console.log(`Streaming the IFC took ${performance.now()-i} ms!`),o}async readIfcFile(t){const{path:e,absolute:i,logLevel:o}=this.settings.wasm;return this.webIfc.SetWasmPath(e,i),await this.webIfc.Init(),o&&this.webIfc.SetLogLevel(o),this.webIfc.OpenModel(t,this.settings.webIfc)}async getAllGeometries(){this._spatialTree.setUp(this.webIfc);const t=this.webIfc.GetIfcEntityList(0),e=new Ht.FragmentsGroup,{FILE_NAME:i,FILE_DESCRIPTION:o}=b;e.ifcMetadata={name:this._metaData.get(this.webIfc,i),description:this._metaData.get(this.webIfc,o),schema:this.webIfc.GetModelSchema(0)||"IFC2X3",maxExpressID:this.webIfc.GetMaxExpressID(0)};const n=[];for(const a of t){if(!this.webIfc.IsIfcElement(a)&&a!==b.IFCSPACE||this.settings.excludedCategories.has(a))continue;const l=this.webIfc.GetLineIDsWithType(0,a),E=l.size();for(let I=0;I<E;I++){const h=l.get(I);n.push(h);const d=this._spatialTree.itemsByFloor[h]||0;e.data.set(h,[[],[d,a]])}}this._spatialTree.cleanUp(),this.webIfc.StreamMeshes(0,n,a=>{this.getMesh(a,e)});for(const a of this._visitedFragments){const{index:l,fragment:E}=a[1];e.keyFragments.set(l,E.id)}for(const a of e.items){const l=this._fragmentInstances.get(a.id);if(!l)throw new Error("Fragment not found!");const E=[];for(const[I,h]of l)E.push(h);a.add(E)}const r=this.webIfc.GetCoordinationMatrix(0);return e.coordinationMatrix.fromArray(r),e.civilData=this._civil.read(this.webIfc),e}cleanUp(){this.webIfc=null,this.webIfc=new b.IfcAPI,this._visitedFragments.clear(),this._fragmentInstances.clear()}getMesh(t,e){const i=t.geometries.size(),o=t.expressID;for(let n=0;n<i;n++){const r=t.geometries.get(n),{x:a,y:l,z:E,w:I}=r.color,h=I!==1,{geometryExpressID:d}=r,p=`${d}-${h}`;if(!this._visitedFragments.has(p)){const R=this.getGeometry(this.webIfc,d),S=h?this._materialT:this._material,g=new Ht.Fragment(R,S,1);e.add(g.mesh),e.items.push(g);const _=this._visitedFragments.size;this._visitedFragments.set(p,{index:_,fragment:g})}const F=new L.Color().setRGB(a,l,E,"srgb"),A=new L.Matrix4;A.fromArray(r.flatTransformation);const T=this._visitedFragments.get(p);if(T===void 0)throw new Error("Error getting geometry data for streaming!");const m=e.data.get(o);if(!m)throw new Error("Data not found!");m[0].push(T.index);const{fragment:O}=T;this._fragmentInstances.has(O.id)||this._fragmentInstances.set(O.id,new Map);const u=this._fragmentInstances.get(O.id);if(!u)throw new Error("Instances not found!");if(u.has(o)){const R=u.get(o);if(!R)throw new Error("Instance not found!");R.transforms.push(A),R.colors&&R.colors.push(F)}else u.set(o,{id:o,transforms:[A],colors:[F]})}}getGeometry(t,e){const i=t.GetGeometry(0,e),o=t.GetIndexArray(i.GetIndexData(),i.GetIndexDataSize()),n=t.GetVertexArray(i.GetVertexData(),i.GetVertexDataSize()),r=new Float32Array(n.length/2),a=new Float32Array(n.length/2);for(let h=0;h<n.length;h+=6)r[h/2]=n[h],r[h/2+1]=n[h+1],r[h/2+2]=n[h+2],a[h/2]=n[h+3],a[h/2+1]=n[h+4],a[h/2+2]=n[h+5];const l=new L.BufferGeometry,E=new L.BufferAttribute(r,3),I=new L.BufferAttribute(a,3);return l.setAttribute("position",E),l.setAttribute("normal",I),l.setIndex(Array.from(o)),i.delete(),l}async autoSetWasm(){const t=await fetch(`https://unpkg.com/openbim-components@${ls.release}/package.json`);if(!t.ok){console.warn("Couldn't get openbim-components package.json. Set wasm settings manually.");return}const e=await t.json();if(!("web-ifc"in e.peerDependencies))console.warn("Couldn't get web-ifc from peer dependencies in openbim-components. Set wasm settings manually.");else{const i=e.peerDependencies["web-ifc"];this.settings.wasm.path=`https://unpkg.com/web-ifc@${i}/`,this.settings.wasm.absolute=!0}}};f(Pe,"uuid","a659add7-1418-4771-a0d6-7d4d438e4624");let Es=Pe;const Mt=class Mt extends st{constructor(t){super(t);f(this,"onDisposed",new U);f(this,"onRequestFile",new U);f(this,"ifcToExport",null);f(this,"onElementToPset",new U);f(this,"onPropToPset",new U);f(this,"onPsetRemoved",new U);f(this,"onDataChanged",new U);f(this,"wasm",{path:"/",absolute:!1});f(this,"enabled",!0);f(this,"attributeListeners",{});f(this,"selectedModel");f(this,"_changeMap",{});this.components.add(Mt.uuid,this)}get(){return this._changeMap}dispose(){this.selectedModel=void 0,this.attributeListeners={},this._changeMap={},this.onElementToPset.reset(),this.onPropToPset.reset(),this.onPsetRemoved.reset(),this.onDataChanged.reset(),this.onDisposed.trigger(Mt.uuid),this.onDisposed.reset()}increaseMaxID(t){return t.ifcMetadata.maxExpressID++,t.ifcMetadata.maxExpressID}static getIFCSchema(t){const e=t.ifcMetadata.schema;if(!e)throw new Error("IFC Schema not found");return e}newGUID(t){const e=Mt.getIFCSchema(t);return new b[e].IfcGloballyUniqueId(oe.create())}async getOwnerHistory(t){const e=await t.getAllPropertiesOfType(b.IFCOWNERHISTORY);if(!e)throw new Error("No OwnerHistory was found.");const i=Object.keys(e).map(r=>parseInt(r,10)),o=e[i[0]],n=new b.Handle(o.expressID);return{ownerHistory:o,ownerHistoryHandle:n}}registerChange(t,...e){this._changeMap[t.uuid]||(this._changeMap[t.uuid]=new Set);for(const i of e)this._changeMap[t.uuid].add(i),this.onDataChanged.trigger({model:t,expressID:i})}async setData(t,...e){for(const i of e){const o=i.expressID;o&&(await t.setProperties(o,i),this.registerChange(t,o))}}async newPset(t,e,i){const o=Mt.getIFCSchema(t),{ownerHistoryHandle:n}=await this.getOwnerHistory(t),r=this.newGUID(t),a=new b[o].IfcLabel(e),l=i?new b[o].IfcText(i):null,E=new b[o].IfcPropertySet(r,n,a,l,[]);E.expressID=this.increaseMaxID(t);const I=this.newGUID(t),h=new b[o].IfcRelDefinesByProperties(I,n,null,null,[],new b.Handle(E.expressID));return h.expressID=this.increaseMaxID(t),await this.setData(t,E,h),{pset:E,rel:h}}async removePset(t,...e){for(const i of e){const o=await t.getProperties(i);if((o==null?void 0:o.type)!==b.IFCPROPERTYSET)continue;const n=await dt.getPsetRel(t,i);if(n&&(await t.setProperties(n,null),this.registerChange(t,n)),o){for(const r of o.HasProperties)await t.setProperties(r.value,null);await t.setProperties(i,null),this.onPsetRemoved.trigger({model:t,psetID:i}),this.registerChange(t,i)}}}async newSingleProperty(t,e,i,o){const n=Mt.getIFCSchema(t),r=new b[n].IfcIdentifier(i),a=new b[n][e](o),l=new b[n].IfcPropertySingleValue(r,null,a,null);return l.expressID=this.increaseMaxID(t),await this.setData(t,l),l}newSingleStringProperty(t,e,i,o){return this.newSingleProperty(t,e,i,o)}newSingleNumericProperty(t,e,i,o){return this.newSingleProperty(t,e,i,o)}newSingleBooleanProperty(t,e,i,o){return this.newSingleProperty(t,e,i,o)}async removePsetProp(t,e,i){const o=await t.getProperties(e),n=await t.getProperties(i);!o||!n||o.type===b.IFCPROPERTYSET&&n&&(o.HasProperties=o.HasProperties.filter(r=>r.value!==i),await t.setProperties(i,null),this.registerChange(t,e,i))}async addElementToPset(t,e,...i){const o=await dt.getPsetRel(t,e);if(!o)return;const n=await t.getProperties(o);if(n){for(const r of i){const a=new b.Handle(r);n.RelatedObjects.push(a),this.onElementToPset.trigger({model:t,psetID:e,elementID:r})}this.registerChange(t,e)}}async addPropToPset(t,e,...i){const o=await t.getProperties(e);if(o){for(const n of i){if(o.HasProperties.includes(n))continue;const r=new b.Handle(n);o.HasProperties.push(r),this.onPropToPset.trigger({model:t,psetID:e,propID:n})}this.registerChange(t,e)}}async saveToIfc(t,e){const i=this.components.get(Es),o=i.webIfc,n=await i.readIfcFile(e),r=this._changeMap[t.uuid]??[];for(const l of r){const E=await t.getProperties(l);if(E)try{o.WriteLine(n,E)}catch{}else try{o.DeleteLine(n,l)}catch{}}const a=o.SaveModel(n);return i.webIfc.CloseModel(n),i.cleanUp(),a}async setAttributeListener(t,e,i){this.attributeListeners[t.uuid]||(this.attributeListeners[t.uuid]={});const o=this.attributeListeners[t.uuid][e]?this.attributeListeners[t.uuid][e][i]:null;if(o)return o;const n=await t.getProperties(e);if(!n)throw new Error(`Entity with expressID ${e} doesn't exists.`);const r=n[i];if(Array.isArray(r)||!r)throw new Error(`Attribute ${i} is array or null, and it can't have a listener.`);const a=r.value;if(a===void 0||a==null)throw new Error(`Attribute ${i} has a badly defined handle.`);const l=new U;return Object.defineProperty(n[i],"value",{get(){return this._value},async set(E){this._value=E,l.trigger(E)}}),n[i].value=a,this.attributeListeners[t.uuid][e]||(this.attributeListeners[t.uuid][e]={}),this.attributeListeners[t.uuid][e][i]=l,l}};f(Mt,"uuid","58c2d9f0-183c-48d6-a402-dfcf5b9a34df");let ci=Mt;const Cs=class Cs extends st{constructor(t){super(t);f(this,"enabled",!0);f(this,"_groupSystems",{});f(this,"onDisposed",new U);f(this,"onFragmentsDisposed",t=>{const{groupID:e,fragmentIDs:i}=t;for(const o in this._groupSystems){const n=this._groupSystems[o],r=Object.keys(n);if(r.includes(e))delete n[e],Object.values(n).length===0&&delete this._groupSystems[o];else for(const a of r){const l=n[a];for(const E of i)delete l[E];Object.values(l).length===0&&delete n[a]}}});t.add(Cs.uuid,this),t.get(ut).onFragmentsDisposed.add(this.onFragmentsDisposed)}get(){return this._groupSystems}dispose(){this._groupSystems={},this.components.get(ut).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(),this.onDisposed.reset()}remove(t){for(const e in this._groupSystems){const i=this._groupSystems[e];for(const o in i){const n=i[o];delete n[t]}}}find(t){const e=this.components.get(ut);if(!t){const r={};for(const[a,l]of e.list)r[a]=new Set(l.ids);return r}const i=Object.keys(t).length,o={};for(const r in t){const a=t[r];if(!this._groupSystems[r]){console.warn(`Classification ${r} does not exist.`);continue}for(const l of a){const E=this._groupSystems[r][l];if(E)for(const I in E){o[I]||(o[I]=new Map);for(const h of E[I]){const d=o[I].get(h);d===void 0?o[I].set(h,1):o[I].set(h,d+1)}}}}const n={};for(const r in o){const a=o[r];for(const[l,E]of a){if(E===void 0)throw new Error("Malformed fragments map!");E===i&&(n[r]||(n[r]=new Set),n[r].add(l))}}return n}byModel(t,e){this._groupSystems.model||(this._groupSystems.model={});const i=this._groupSystems.model;i[t]||(i[t]={});const o=i[t];for(const[n,r]of e.data){const a=r[0];for(const l of a){const E=e.keyFragments.get(l);E&&(o[E]||(o[E]=new Set),o[E].add(n))}}}async byPredefinedType(t){var o;this._groupSystems.predefinedTypes||(this._groupSystems.predefinedTypes={});const e=this._groupSystems.predefinedTypes,i=t.getAllPropertiesIDs();for(const n of i){const r=await t.getProperties(n);if(!r)continue;const a=String((o=r.PredefinedType)==null?void 0:o.value).toUpperCase();e[a]||(e[a]={});const l=e[a];for(const[E,I]of t.data){const h=I[0];for(const d of h){const p=t.keyFragments.get(d);if(!p)throw new Error("Fragment ID not found!");l[p]||(l[p]=new Set),l[p].add(r.expressID)}}}}byEntity(t){this._groupSystems.entities||(this._groupSystems.entities={});for(const[e,i]of t.data){const n=i[1][1],r=fi[n];this.saveItem(t,"entities",r,e)}}byStorey(t){for(const[e,i]of t.data){const r=i[1][0].toString();this.saveItem(t,"storeys",r,e)}}async byIfcRel(t,e,i){dt.isRel(e)&&await dt.getRelationMap(t,e,async(o,n)=>{const{name:r}=await dt.getEntityName(t,o);for(const a of n)this.saveItem(t,i,r??"NO REL NAME",a)})}saveItem(t,e,i,o){this._groupSystems[e]||(this._groupSystems[e]={});const n=t.data.get(o);if(n)for(const r of n[0]){const a=t.keyFragments.get(r);if(a){const l=this._groupSystems[e];l[i]||(l[i]={}),l[i][a]||(l[i][a]=new Set),l[i][a].add(o)}}}};f(Cs,"uuid","e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");let li=Cs;class gn extends Ci{constructor(){super(...arguments);f(this,"minGeometrySize",10);f(this,"minAssetsSize",1e3)}}class _n extends Ci{constructor(){super(...arguments);f(this,"propertiesSize",100)}}class Nn extends st{constructor(){super(...arguments);f(this,"onPropertiesStreamed",new U);f(this,"onProgress",new U);f(this,"onIndicesStreamed",new U);f(this,"onDisposed",new U);f(this,"enabled",!0);f(this,"settings",new _n);f(this,"webIfc",new b.IfcAPI)}async dispose(){this.onIndicesStreamed.reset(),this.onPropertiesStreamed.reset(),this.webIfc=null,this.onDisposed.reset()}async streamFromBuffer(t){const e=performance.now();await this.readIfcFile(t),await this.streamAllProperties(),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-e} ms!`)}async streamFromCallBack(t){const e=performance.now();await this.streamIfcFile(t),await this.streamAllProperties(),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-e} ms!`)}async readIfcFile(t){const{path:e,absolute:i,logLevel:o}=this.settings.wasm;this.webIfc.SetWasmPath(e,i),await this.webIfc.Init(),o&&this.webIfc.SetLogLevel(o),this.webIfc.OpenModel(t,this.settings.webIfc)}async streamIfcFile(t){const{path:e,absolute:i,logLevel:o}=this.settings.wasm;this.webIfc.SetWasmPath(e,i),await this.webIfc.Init(),o&&this.webIfc.SetLogLevel(o),this.webIfc.OpenModelFromCallback(t,this.settings.webIfc)}async streamAllProperties(){const{propertiesSize:t}=this.settings,e=new Set(this.webIfc.GetIfcEntityList(0)),i=[b.IFCRELDEFINESBYPROPERTIES,b.IFCRELDEFINESBYTYPE,b.IFCRELASSOCIATESMATERIAL,b.IFCRELCONTAINEDINSPATIALSTRUCTURE,b.IFCRELASSOCIATESCLASSIFICATION,b.IFCRELASSIGNSTOGROUP],o=new Map,n=new Set([b.IFCPROJECT,b.IFCSITE,b.IFCBUILDING,b.IFCBUILDINGSTOREY,b.IFCSPACE]);for(const E of n)e.add(E);let r=.01,a=0;for(const E of e){if(a++,mn.has(E))continue;const I=n.has(E),h=this.webIfc.GetLineIDsWithType(0,E),d=h.size();let p=0;for(let A=0;A<d-t;A+=t){const T={};for(let m=0;m<t;m++){p++;const O=h.get(A+m);try{const u=this.webIfc.GetLine(0,O,I);i.includes(E)&&this.getIndices(u,O,o),T[u.expressID]=u}catch{console.log(`Could not get property: ${O}`)}}await this.onPropertiesStreamed.trigger({type:E,data:T})}if(p!==d){const A={};for(let T=p;T<d;T++){const m=h.get(T);try{const O=this.webIfc.GetLine(0,m,I);i.includes(E)&&this.getIndices(O,m,o),A[O.expressID]=O}catch{console.log(`Could not get property: ${m}`)}}await this.onPropertiesStreamed.trigger({type:E,data:A})}const F=a/e.size;F>r&&(r+=.01,r=Math.max(r,F),await this.onProgress.trigger(Math.round(r*100)/100))}const l=[];for(const[E,I]of o)l.push([E,...I]);await this.onIndicesStreamed.trigger(l)}getIndices(t,e,i){const o=t.RelatedObjects||t.RelatedElements;if(!o){console.log(`Related objects not found: ${e}`);return}const n=t.RelatingType||t.RelatingMaterial||t.RelatingStructure||t.RelatingPropertyDefinition||t.RelatingGroup||t.RelatingClassification;if(!n){console.log(`Relating object not found: ${e}`);return}if(!Array.isArray(o)||n.value===void 0)return;const r=n.value;for(const a of o){if(a.value===void 0||a.value===null)continue;const l=a.value;i.has(l)||i.set(l,new Set),i.get(l).add(r)}}cleanUp(){this.webIfc=null,this.webIfc=new b.IfcAPI}}f(Nn,"uuid","88d2c89c-ce32-47d7-8cb6-d51e4b311a0b");const ps=class ps extends st{constructor(t){super(t);f(this,"onGeometryStreamed",new U);f(this,"onAssetStreamed",new U);f(this,"onProgress",new U);f(this,"onIfcLoaded",new U);f(this,"onDisposed",new U);f(this,"settings",new gn);f(this,"enabled",!0);f(this,"webIfc",new b.IfcAPI);f(this,"_spatialTree",new An);f(this,"_metaData",new Sn);f(this,"_visitedGeometries",new Map);f(this,"_streamSerializer",new Ht.StreamSerializer);f(this,"_geometries",new Map);f(this,"_geometryCount",0);f(this,"_civil",new On);f(this,"_groupSerializer",new Ht.Serializer);f(this,"_assets",[]);f(this,"_meshesWithHoles",new Set);this.components.add(ps.uuid,this),this.settings.excludedCategories.add(b.IFCOPENINGELEMENT)}dispose(){this.onIfcLoaded.reset(),this.onGeometryStreamed.reset(),this.onAssetStreamed.reset(),this.webIfc=null,this.onDisposed.trigger(),this.onDisposed.reset()}async streamFromBuffer(t){const e=performance.now();await this.readIfcFile(t),await this.streamAllGeometries(),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-e} ms!`)}async streamFromCallBack(t){const e=performance.now();await this.streamIfcFile(t),await this.streamAllGeometries(),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-e} ms!`)}async readIfcFile(t){const{path:e,absolute:i,logLevel:o}=this.settings.wasm;this.webIfc.SetWasmPath(e,i),await this.webIfc.Init(),o&&this.webIfc.SetLogLevel(o),this.webIfc.OpenModel(t,this.settings.webIfc)}async streamIfcFile(t){const{path:e,absolute:i,logLevel:o}=this.settings.wasm;this.webIfc.SetWasmPath(e,i),await this.webIfc.Init(),o&&this.webIfc.SetLogLevel(o),this.webIfc.OpenModelFromCallback(t,this.settings.webIfc)}async streamAllGeometries(){const{minGeometrySize:t,minAssetsSize:e}=this.settings;this._spatialTree.setUp(this.webIfc);const i=this.webIfc.GetIfcEntityList(0),o=[[]],n=new Ht.FragmentsGroup,{FILE_NAME:r,FILE_DESCRIPTION:a}=b;n.ifcMetadata={name:this._metaData.get(this.webIfc,r),description:this._metaData.get(this.webIfc,a),schema:this.webIfc.GetModelSchema(0)||"IFC2X3",maxExpressID:this.webIfc.GetMaxExpressID(0)};let l=0,E=0;for(const m of i){if(!this.webIfc.IsIfcElement(m)&&m!==b.IFCSPACE||this.settings.excludedCategories.has(m))continue;const O=this.webIfc.GetLineIDsWithType(0,m),u=O.size();for(let R=0;R<u;R++){l>t&&(l=0,E++,o.push([]));const S=O.get(R);o[E].push(S);const g=this._spatialTree.itemsByFloor[S]||0;n.data.set(S,[[],[g,m]]),l++}}this._spatialTree.cleanUp();let I=.01,h=0;for(const m of o){h++,this.webIfc.StreamMeshes(0,m,u=>{this.getMesh(this.webIfc,u,n)}),this._geometryCount>t&&await this.streamGeometries(),this._assets.length>e&&await this.streamAssets();const O=h/o.length;O>I&&(I+=.01,I=Math.max(I,O),this.onProgress.trigger(Math.round(I*100)/100))}this._geometryCount&&await this.streamGeometries(),this._assets.length&&await this.streamAssets();const{opaque:d,transparent:p}=n.geometryIDs;for(const[m,{index:O,uuid:u}]of this._visitedGeometries)n.keyFragments.set(O,u),(m>1?d:p).set(m,O);const F=n.data.keys();for(const m of F){const[O]=n.data.get(m);O.length||n.data.delete(m)}const A=this.webIfc.GetCoordinationMatrix(0);n.coordinationMatrix.fromArray(A),n.civilData=this._civil.read(this.webIfc);const T=this._groupSerializer.export(n);this.onIfcLoaded.trigger(T),n.dispose(!0)}cleanUp(){this.webIfc=null,this.webIfc=new b.IfcAPI,this._visitedGeometries.clear(),this._geometries.clear(),this._assets=[],this._meshesWithHoles.clear()}getMesh(t,e,i){const o=e.geometries.size(),n=e.expressID,r={id:n,geometries:[]};e.expressID===664833&&console.log("Heyyy");for(let a=0;a<o;a++){const l=e.geometries.get(a),E=l.geometryExpressID,I=l.color.w===1?1:-1,h=E*I;if(!this._visitedGeometries.has(h)){this._visitedGeometries.has(E)||this.getGeometry(t,E);const R=this._visitedGeometries.size,S=L.MathUtils.generateUUID();this._visitedGeometries.set(h,{uuid:S,index:R})}const d=this._visitedGeometries.get(h);if(d===void 0)throw new Error("Error getting geometry data for streaming!");const p=i.data.get(n);if(!p)throw new Error("Data not found!");p[0].push(d.index);const{x:F,y:A,z:T,w:m}=l.color,O=[F,A,T,m],u=l.flatTransformation;r.geometries.push({color:O,geometryID:E,transformation:u})}this._assets.push(r)}getGeometry(t,e){const i=t.GetGeometry(0,e),o=t.GetIndexArray(i.GetIndexData(),i.GetIndexDataSize()),n=t.GetVertexArray(i.GetVertexData(),i.GetVertexDataSize()),r=new Float32Array(n.length/2),a=new Float32Array(n.length/2);for(let d=0;d<n.length;d+=6)r[d/2]=n[d],r[d/2+1]=n[d+1],r[d/2+2]=n[d+2],a[d/2]=n[d+3],a[d/2+1]=n[d+4],a[d/2+2]=n[d+5];const l=hn(r),E=new Float32Array(l.transformation.elements),I=[l.center.x,l.center.y,l.center.z];let h=!1;for(let d=0;d<r.length-2;d+=3){const p=r[d],F=r[d+1],A=r[d+2],T=a[d],m=a[d+1],O=a[d+2];if(En(I,[p,F,A],[T,m,O])){h=!0;break}}this._geometries.set(e,{position:r,normal:a,index:o,boundingBox:E,hasHoles:h}),i.delete(),this._geometryCount++}async streamAssets(){await this.onAssetStreamed.trigger(this._assets),this._assets=null,this._assets=[]}async streamGeometries(){let t=this._streamSerializer.export(this._geometries),e={};for(const[i,{boundingBox:o,hasHoles:n}]of this._geometries)e[i]={boundingBox:o,hasHoles:n};this.onGeometryStreamed.trigger({data:e,buffer:t}),e=null,t=null,this._geometries.clear(),this._geometryCount=0}};f(ps,"uuid","d9999a00-e1f5-4d3f-8cfe-c56e08609764");let hi=ps;exports.Base=Rs;exports.BaseCamera=an;exports.BaseRenderer=cn;exports.BaseScene=ln;exports.BaseWorldItem=Fs;exports.Clipper=ii;exports.Component=st;exports.Components=ls;exports.CullerRenderer=pn;exports.Cullers=oi;exports.Disposer=_t;exports.Event=U;exports.FragmentBoundingBox=ri;exports.FragmentClassifier=li;exports.FragmentIfcLoader=Es;exports.FragmentIfcStreamConverter=hi;exports.FragmentManager=ut;exports.FragmentPropsStreamConverter=Nn;exports.Grids=fn;exports.IfcCategories=Ir;exports.IfcCategoryMap=fi;exports.IfcElements=Fn;exports.IfcJsonExporter=Rn;exports.IfcPropertiesFinder=dr;exports.IfcPropertiesIndexer=ai;exports.IfcPropertiesManager=ci;exports.IfcPropertiesUtils=dt;exports.IfcStreamingSettings=gn;exports.Materials=ni;exports.MaterialsUtils=si;exports.MeshCullerRenderer=Tn;exports.PropertiesStreamingSettings=_n;exports.Raycasters=Me;exports.SimpleCamera=De;exports.SimplePlane=As;exports.SimpleRenderer=jo;exports.SimpleScene=qo;exports.SimpleWorld=In;exports.UUID=oe;exports.Worlds=hs;exports.isPointInFrontOfPlane=En;exports.obbFromPoints=hn;exports.readPixelsAsync=Cn;