diff --git a/examples/AngleMeasurement/index.html b/examples/AngleMeasurement/index.html index b3acc2a4..81760b02 100644 --- a/examples/AngleMeasurement/index.html +++ b/examples/AngleMeasurement/index.html @@ -58,9 +58,9 @@ - - - + + + diff --git a/examples/AreaMeasurement/index.html b/examples/AreaMeasurement/index.html index fc50719d..d127b1b8 100644 --- a/examples/AreaMeasurement/index.html +++ b/examples/AreaMeasurement/index.html @@ -58,11 +58,11 @@ - + - - + + diff --git a/examples/BCFTopics/index.html b/examples/BCFTopics/index.html index 9504cf0f..6f9e0da0 100644 --- a/examples/BCFTopics/index.html +++ b/examples/BCFTopics/index.html @@ -58,11 +58,11 @@ } - + - - + + diff --git a/examples/BoundingBoxer/index.html b/examples/BoundingBoxer/index.html index 34bdb5c7..c16701cf 100644 --- a/examples/BoundingBoxer/index.html +++ b/examples/BoundingBoxer/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/Civil3DNavigator/index.html b/examples/Civil3DNavigator/index.html index df29346b..1d0b61f9 100644 --- a/examples/Civil3DNavigator/index.html +++ b/examples/Civil3DNavigator/index.html @@ -58,11 +58,11 @@ - - + + - + diff --git a/examples/CivilCrossSectionNavigator/index.html b/examples/CivilCrossSectionNavigator/index.html index 233a9e3a..8668a571 100644 --- a/examples/CivilCrossSectionNavigator/index.html +++ b/examples/CivilCrossSectionNavigator/index.html @@ -76,11 +76,11 @@ - - + + - - + + diff --git a/examples/CivilElevationNavigator/index.html b/examples/CivilElevationNavigator/index.html index 2c16be41..f2a4f8ed 100644 --- a/examples/CivilElevationNavigator/index.html +++ b/examples/CivilElevationNavigator/index.html @@ -77,11 +77,11 @@ - - - + + + - + diff --git a/examples/CivilPlanNavigator/index.html b/examples/CivilPlanNavigator/index.html index 2be2dc42..931f5862 100644 --- a/examples/CivilPlanNavigator/index.html +++ b/examples/CivilPlanNavigator/index.html @@ -66,11 +66,11 @@ - - - + + + - + diff --git a/examples/Classifier/index.html b/examples/Classifier/index.html index 1232f130..2e6a2362 100644 --- a/examples/Classifier/index.html +++ b/examples/Classifier/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/ClipEdges/index.html b/examples/ClipEdges/index.html index f9cde6a5..d74ba857 100644 --- a/examples/ClipEdges/index.html +++ b/examples/ClipEdges/index.html @@ -58,12 +58,12 @@ - + - - + + diff --git a/examples/Clipper/index.html b/examples/Clipper/index.html index 3082ecf7..92f4bcce 100644 --- a/examples/Clipper/index.html +++ b/examples/Clipper/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/Cullers/index.html b/examples/Cullers/index.html index e461bb76..6feb76c5 100644 --- a/examples/Cullers/index.html +++ b/examples/Cullers/index.html @@ -58,10 +58,10 @@ - + - + diff --git a/examples/EdgeMeasurement/index.html b/examples/EdgeMeasurement/index.html index 1fff8443..ff24703b 100644 --- a/examples/EdgeMeasurement/index.html +++ b/examples/EdgeMeasurement/index.html @@ -58,11 +58,11 @@ - + - - + + diff --git a/examples/Exploder/index.html b/examples/Exploder/index.html index a79cf6eb..05738be5 100644 --- a/examples/Exploder/index.html +++ b/examples/Exploder/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/FaceMeasurement/index.html b/examples/FaceMeasurement/index.html index be0d5ebe..949f0f96 100644 --- a/examples/FaceMeasurement/index.html +++ b/examples/FaceMeasurement/index.html @@ -58,11 +58,11 @@ - + - - + + diff --git a/examples/FragmentsManager/index.html b/examples/FragmentsManager/index.html index 0243afa4..fb5a5551 100644 --- a/examples/FragmentsManager/index.html +++ b/examples/FragmentsManager/index.html @@ -58,10 +58,10 @@ - + - + diff --git a/examples/Grids/index.html b/examples/Grids/index.html index f53423d6..f2afa840 100644 --- a/examples/Grids/index.html +++ b/examples/Grids/index.html @@ -64,10 +64,10 @@ - + - + diff --git a/examples/Hider/index.html b/examples/Hider/index.html index c8bd7ded..6dd7234d 100644 --- a/examples/Hider/index.html +++ b/examples/Hider/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/Highlighter/index.html b/examples/Highlighter/index.html index 09e2c60e..e12b74f1 100644 --- a/examples/Highlighter/index.html +++ b/examples/Highlighter/index.html @@ -58,9 +58,9 @@ - - - + + + diff --git a/examples/IDSSpecifications/index.html b/examples/IDSSpecifications/index.html index ac481538..98cc4639 100644 --- a/examples/IDSSpecifications/index.html +++ b/examples/IDSSpecifications/index.html @@ -40,9 +40,9 @@ } - + - + diff --git a/examples/IfcFinder/index.html b/examples/IfcFinder/index.html index cc2a2c41..ebcde340 100644 --- a/examples/IfcFinder/index.html +++ b/examples/IfcFinder/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/IfcGeometryTiler/index.html b/examples/IfcGeometryTiler/index.html index a9ad2d4e..e7c3f0c1 100644 --- a/examples/IfcGeometryTiler/index.html +++ b/examples/IfcGeometryTiler/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/IfcIsolator/index.html b/examples/IfcIsolator/index.html index 4fc6826d..b1a6bc0e 100644 --- a/examples/IfcIsolator/index.html +++ b/examples/IfcIsolator/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/IfcJsonExporter/index.html b/examples/IfcJsonExporter/index.html index 966fcbcf..9f860b7a 100644 --- a/examples/IfcJsonExporter/index.html +++ b/examples/IfcJsonExporter/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/IfcLoader/index.html b/examples/IfcLoader/index.html index 6c6520cc..8763a04b 100644 --- a/examples/IfcLoader/index.html +++ b/examples/IfcLoader/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/IfcPropertiesManager/index.html b/examples/IfcPropertiesManager/index.html index 16faf852..e646b46b 100644 --- a/examples/IfcPropertiesManager/index.html +++ b/examples/IfcPropertiesManager/index.html @@ -6,8 +6,8 @@ Ifc Properties Manager - - + + diff --git a/examples/IfcPropertiesTiler/index.html b/examples/IfcPropertiesTiler/index.html index 7827fa87..7c4e7759 100644 --- a/examples/IfcPropertiesTiler/index.html +++ b/examples/IfcPropertiesTiler/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/IfcRelationsIndexer/index.html b/examples/IfcRelationsIndexer/index.html index 72a1f50d..4dc7fb97 100644 --- a/examples/IfcRelationsIndexer/index.html +++ b/examples/IfcRelationsIndexer/index.html @@ -58,12 +58,12 @@ - + - - + + diff --git a/examples/IfcStreamer/index.html b/examples/IfcStreamer/index.html index a78ebc25..5838d450 100644 --- a/examples/IfcStreamer/index.html +++ b/examples/IfcStreamer/index.html @@ -58,11 +58,11 @@ - + - - + + diff --git a/examples/LengthMeasurement/index.html b/examples/LengthMeasurement/index.html index e342f8eb..ef09e4a5 100644 --- a/examples/LengthMeasurement/index.html +++ b/examples/LengthMeasurement/index.html @@ -58,12 +58,12 @@ - + - + - + diff --git a/examples/Marker/index.html b/examples/Marker/index.html index 07f10ac4..541f3732 100644 --- a/examples/Marker/index.html +++ b/examples/Marker/index.html @@ -58,9 +58,9 @@ - - - + + + diff --git a/examples/MeasurementUtils/index.html b/examples/MeasurementUtils/index.html index 2dfbac36..5bc870a4 100644 --- a/examples/MeasurementUtils/index.html +++ b/examples/MeasurementUtils/index.html @@ -58,10 +58,10 @@ - + - + diff --git a/examples/MiniMap/index.html b/examples/MiniMap/index.html index ad159a05..b45c8db5 100644 --- a/examples/MiniMap/index.html +++ b/examples/MiniMap/index.html @@ -64,11 +64,11 @@ - + - + diff --git a/examples/OrthoPerspectiveCamera/index.html b/examples/OrthoPerspectiveCamera/index.html index 6aedd6b6..52e785c6 100644 --- a/examples/OrthoPerspectiveCamera/index.html +++ b/examples/OrthoPerspectiveCamera/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/Plans/index.html b/examples/Plans/index.html index 1599280e..b935f9fe 100644 --- a/examples/Plans/index.html +++ b/examples/Plans/index.html @@ -58,9 +58,9 @@ - - - + + + diff --git a/examples/PostproductionRenderer/index.html b/examples/PostproductionRenderer/index.html index f256c237..b1e2d821 100644 --- a/examples/PostproductionRenderer/index.html +++ b/examples/PostproductionRenderer/index.html @@ -58,12 +58,12 @@ - + - - + + diff --git a/examples/Raycasters/index.html b/examples/Raycasters/index.html index 9ecee573..87a6092a 100644 --- a/examples/Raycasters/index.html +++ b/examples/Raycasters/index.html @@ -58,10 +58,10 @@ - + - + diff --git a/examples/Sections/index.html b/examples/Sections/index.html index 53982170..4f15669c 100644 --- a/examples/Sections/index.html +++ b/examples/Sections/index.html @@ -58,12 +58,12 @@ - - + + - + diff --git a/examples/ShadowDropper/index.html b/examples/ShadowDropper/index.html index a5b676d2..e4de9e54 100644 --- a/examples/ShadowDropper/index.html +++ b/examples/ShadowDropper/index.html @@ -58,12 +58,12 @@ - - + + - + diff --git a/examples/ShadowedScene/index.html b/examples/ShadowedScene/index.html index 97a66a7d..3c92b74f 100644 --- a/examples/ShadowedScene/index.html +++ b/examples/ShadowedScene/index.html @@ -64,10 +64,10 @@ - + - + diff --git a/examples/Viewpoints/index.html b/examples/Viewpoints/index.html index 0e61d76a..94da7e62 100644 --- a/examples/Viewpoints/index.html +++ b/examples/Viewpoints/index.html @@ -58,11 +58,11 @@ } - + - - + + diff --git a/examples/VolumeMeasurement/index.html b/examples/VolumeMeasurement/index.html index 364006b9..6de1b2eb 100644 --- a/examples/VolumeMeasurement/index.html +++ b/examples/VolumeMeasurement/index.html @@ -58,11 +58,11 @@ - + - - + + diff --git a/examples/Worlds/index.html b/examples/Worlds/index.html index 69c62260..3f4f4ec5 100644 --- a/examples/Worlds/index.html +++ b/examples/Worlds/index.html @@ -58,11 +58,11 @@ - + - + diff --git a/examples/assets/angleMeasurement.js b/examples/assets/angleMeasurement.js index dcf4e958..b9efb336 100644 --- a/examples/assets/angleMeasurement.js +++ b/examples/assets/angleMeasurement.js @@ -1 +1 @@ -import{B as c,M as d,a as l}from"./web-ifc-api-CpQ3aV8c.js";import{C as m,T as i,s as w,x as p,L as b}from"./index-B03kGVBW.js";import{b as u,o as f}from"./index-lUHwa_Wd.js";import{S as g}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const a=document.getElementById("container"),o=new m,y=o.get(i),e=y.create();e.scene=new w(o);e.renderer=new u(o,a);e.camera=new p(o);o.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const h=o.get(b);h.create(e);e.scene.three.background=null;const k=new c(3,3,3),x=new d({color:"#6528D7"}),s=new l(k,x);s.position.set(0,1.5,0);e.scene.three.add(s);e.meshes.add(s);const n=o.get(f);n.world=e;n.enabled=!0;a.ondblclick=()=>n.create();window.onkeydown=r=>{(r.code==="Delete"||r.code==="Backspace")&&n.deleteAll()};const t=new g;t.showPanel(2);document.body.append(t.dom);t.dom.style.left="0px";t.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>t.begin());e.renderer.onAfterUpdate.add(()=>t.end()); +import{B as d,M as c,a as l}from"./web-ifc-api-nU1-R_1k.js";import{C as m,W as i,S as p,a as w,G as u}from"./index-C8rcJyf0.js";import{L as b,l as f}from"./index-BdoCSKf7.js";import{S as g}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),o=new m,y=o.get(i),e=y.create();e.scene=new p(o);e.renderer=new b(o,r);e.camera=new w(o);o.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const S=o.get(u);S.create(e);e.scene.three.background=null;const h=new d(3,3,3),k=new c({color:"#6528D7"}),s=new l(h,k);s.position.set(0,1.5,0);e.scene.three.add(s);e.meshes.add(s);const t=o.get(f);t.world=e;t.enabled=!0;r.ondblclick=()=>t.create();window.onkeydown=a=>{(a.code==="Delete"||a.code==="Backspace")&&t.deleteAll()};const n=new g;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); diff --git a/examples/assets/areaMeasurement.js b/examples/assets/areaMeasurement.js index 033dfae4..826e25b7 100644 --- a/examples/assets/areaMeasurement.js +++ b/examples/assets/areaMeasurement.js @@ -1 +1 @@ -import{B as c,M as d,a as m}from"./web-ifc-api-CpQ3aV8c.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,T as w,s as p,x as u,L as b}from"./index-B03kGVBW.js";import{b as f,r as g}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";const s=document.getElementById("container"),t=new l,y=t.get(w),e=y.create();e.scene=new p(t);e.renderer=new f(t,s);e.camera=new u(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const h=t.get(b);h.create(e);e.scene.three.background=null;const x=new c(3,3,3),k=new d({color:"#6528D7"}),r=new m(x,k);r.position.set(0,1.5,0);e.scene.three.add(r);e.meshes.add(r);const o=t.get(g);o.world=e;o.enabled=!0;s.ondblclick=()=>o.create();s.oncontextmenu=()=>o.endCreation();window.onkeydown=a=>{(a.code==="Delete"||a.code==="Backspace")&&o.deleteAll()};const n=new i;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); +import{B as c,M as d,a as m}from"./web-ifc-api-nU1-R_1k.js";import{S as l}from"./stats.min-GTpOrGrX.js";import{C as i,W as p,S as w,a as u,G as b}from"./index-C8rcJyf0.js";import{L as f,c as g}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";const s=document.getElementById("container"),n=new i,y=n.get(p),e=y.create();e.scene=new w(n);e.renderer=new f(n,s);e.camera=new u(n);n.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const S=n.get(b);S.create(e);e.scene.three.background=null;const h=new c(3,3,3),k=new d({color:"#6528D7"}),a=new m(h,k);a.position.set(0,1.5,0);e.scene.three.add(a);e.meshes.add(a);const t=n.get(g);t.world=e;t.enabled=!0;s.ondblclick=()=>t.create();s.oncontextmenu=()=>t.endCreation();window.onkeydown=r=>{(r.code==="Delete"||r.code==="Backspace")&&t.deleteAll()};const o=new l;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end()); diff --git a/examples/assets/bCFTopics.js b/examples/assets/bCFTopics.js index 68f8b611..1f2bf35c 100644 --- a/examples/assets/bCFTopics.js +++ b/examples/assets/bCFTopics.js @@ -1,4 +1,4 @@ -import"./web-ifc-api-CpQ3aV8c.js";import{T as p,z as d,m as u}from"./index-BEvRfOoQ.js";import{C as f,W as w,S as b,I as g,B as h,V as y,T as C}from"./index-B_pEH4rh.js";import{S as v,a as T,G as S}from"./index-BqrBcJfH.js";import"./_commonjsHelpers-Cpj98o6Y.js";p.init();const l=document.createElement("bim-viewport"),t=new f,I=t.get(w),o=I.create();o.scene=new v(t);o.scene.setup();o.renderer=new T(t,l);o.camera=new b(t);const B=t.get(S);B.create(o);t.init();o.camera.controls.setLookAt(12,6,8,0,2,-2);const r=t.get(g);await r.setup();const L=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),U=await L.arrayBuffer(),k=new Uint8Array(U),D=await r.load(k);o.scene.three.add(D);const i=t.get(h);i.setup({author:"signed.user@mail.com",types:new Set([...i.config.types,"Information","Coordination"]),statuses:new Set(["Active","In Progress","Done","In Review","Closed"]),users:new Set(["juan.hoyos4@gmail.com"])});const F=t.get(y);i.list.onItemSet.add(({value:e})=>{const n=F.create(o,{title:e.title});e.viewpoints.add(n.guid),e.comments.onItemSet.add(({value:a})=>{a.viewpoint=n})});const s=i.create({title:"Missing information",description:"It seems these elements are badly defined.",dueDate:new Date("08-01-2020"),type:"Clash",priority:"Major",stage:"Design",labels:new Set(["Architecture","Cost Estimation"]),assignedTo:"juan.hoyos@thatopen.com"});C.default={title:"Custom Default Title",type:"Custom Default Topic Type",status:"Custom Default Topic Status",priority:"Custom Default Priority"};const E=s.createComment("What if we talk about this next meeting?"),R=s.createComment("Hi there! I agree.");i.list.onItemUpdated.add(({value:e})=>{console.log(`Topic ${e.title} was updated!`)});s.title="Updated Title";s.set({title:"New Title"});s.comments.onItemUpdated.add(({value:e})=>{console.log("The following comment has been updated:",e)});E.comment="What if we talk about this next meeting with all partners?";R.comment="Will tell you tomorrow when is more convenient!";const j=async()=>{const e=await i.export(),n=new File([e],"topics.bcf"),a=document.createElement("a");a.href=URL.createObjectURL(n),a.download=n.name,a.click(),URL.revokeObjectURL(a.href)},x=()=>{const e=document.createElement("input");e.multiple=!1,e.accept=".bcf",e.type="file",e.addEventListener("change",async()=>{var c;const n=(c=e.files)==null?void 0:c[0];if(!n)return;const a=await n.arrayBuffer();i.load(new Uint8Array(a),o)}),e.click()},A=d.create(()=>u` +import"./web-ifc-api-nU1-R_1k.js";import{T as p,z as d,m as u}from"./index-BEvRfOoQ.js";import{C as f,W as w,S as b,I as g,B as h,V as y,T as C}from"./index-BboVOtPt.js";import{S as v,a as T,G as S}from"./index-BvJCnCKo.js";import"./_commonjsHelpers-Cpj98o6Y.js";p.init();const l=document.createElement("bim-viewport"),t=new f,I=t.get(w),o=I.create();o.scene=new v(t);o.scene.setup();o.renderer=new T(t,l);o.camera=new b(t);const B=t.get(S);B.create(o);t.init();o.camera.controls.setLookAt(12,6,8,0,2,-2);const r=t.get(g);await r.setup();const L=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),U=await L.arrayBuffer(),k=new Uint8Array(U),D=await r.load(k);o.scene.three.add(D);const i=t.get(h);i.setup({author:"signed.user@mail.com",types:new Set([...i.config.types,"Information","Coordination"]),statuses:new Set(["Active","In Progress","Done","In Review","Closed"]),users:new Set(["juan.hoyos4@gmail.com"])});const F=t.get(y);i.list.onItemSet.add(({value:e})=>{const n=F.create(o,{title:e.title});e.viewpoints.add(n.guid),e.comments.onItemSet.add(({value:a})=>{a.viewpoint=n})});const s=i.create({title:"Missing information",description:"It seems these elements are badly defined.",dueDate:new Date("08-01-2020"),type:"Clash",priority:"Major",stage:"Design",labels:new Set(["Architecture","Cost Estimation"]),assignedTo:"juan.hoyos@thatopen.com"});C.default={title:"Custom Default Title",type:"Custom Default Topic Type",status:"Custom Default Topic Status",priority:"Custom Default Priority"};const E=s.createComment("What if we talk about this next meeting?"),R=s.createComment("Hi there! I agree.");i.list.onItemUpdated.add(({value:e})=>{console.log(`Topic ${e.title} was updated!`)});s.title="Updated Title";s.set({title:"New Title"});s.comments.onItemUpdated.add(({value:e})=>{console.log("The following comment has been updated:",e)});E.comment="What if we talk about this next meeting with all partners?";R.comment="Will tell you tomorrow when is more convenient!";const j=async()=>{const e=await i.export(),n=new File([e],"topics.bcf"),a=document.createElement("a");a.href=URL.createObjectURL(n),a.download=n.name,a.click(),URL.revokeObjectURL(a.href)},x=()=>{const e=document.createElement("input");e.multiple=!1,e.accept=".bcf",e.type="file",e.addEventListener("change",async()=>{var c;const n=(c=e.files)==null?void 0:c[0];if(!n)return;const a=await n.arrayBuffer();i.load(new Uint8Array(a),o)}),e.click()},A=d.create(()=>u` diff --git a/examples/assets/boundingBoxer.js b/examples/assets/boundingBoxer.js index 1b979626..56f002b3 100644 --- a/examples/assets/boundingBoxer.js +++ b/examples/assets/boundingBoxer.js @@ -1,16 +1,16 @@ -import"./web-ifc-api-CpQ3aV8c.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{T as l,z as a,m as r}from"./index-BEvRfOoQ.js";import{C as d,T as m,s as p,g as b,x as u,L as g,a as f,D as h}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const w=document.getElementById("container"),t=new d,y=t.get(m),e=y.create();e.scene=new p(t);e.renderer=new b(t,w);e.camera=new u(t);t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const x=t.get(g);x.create(e);e.scene.three.background=null;const B=t.get(f),T=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),L=await T.arrayBuffer(),v=new Uint8Array(L),c=B.load(v);e.scene.three.add(c);const s=t.get(h);s.add(c);const k=s.getMesh();s.reset();const n=new i;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());l.init();const o=a.create(()=>r` +import"./web-ifc-api-nU1-R_1k.js";import{S as c}from"./stats.min-GTpOrGrX.js";import{T as l,z as a,m as r}from"./index-BEvRfOoQ.js";import{C as d,W as m,S as p,d as b,a as u,G as g,F as f,q as w}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const h=document.getElementById("container"),t=new d,B=t.get(m),e=B.create();e.scene=new p(t);e.renderer=new b(t,h);e.camera=new u(t);t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const y=t.get(g);y.create(e);e.scene.three.background=null;const S=t.get(f),x=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),v=await x.arrayBuffer(),k=new Uint8Array(v),i=S.load(k);e.scene.three.add(i);const s=t.get(w);s.add(i);const C=s.getMesh();s.reset();const n=new c;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());l.init();const o=a.create(()=>r` + @click="${()=>{e.camera.controls.fitToSphere(C,!0)}}"> - `);document.body.append(o);const z=a.create(()=>r` + `);document.body.append(o);const L=a.create(()=>r` - `);document.body.append(z); + `);document.body.append(L); diff --git a/examples/assets/civil3DNavigator.js b/examples/assets/civil3DNavigator.js index 1ce7fa8e..d1116f22 100644 --- a/examples/assets/civil3DNavigator.js +++ b/examples/assets/civil3DNavigator.js @@ -1 +1 @@ -import{s as i,S as p}from"./web-ifc-api-CpQ3aV8c.js";import{C as l,T as m,s as h,x as f,L as g,a as u,O as w}from"./index-B03kGVBW.js";import{S as y}from"./stats.min-GTpOrGrX.js";import{G as b,i as L}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";const d=document.getElementById("container"),t=new l,S=t.get(m),e=S.create();e.scene=new h(t);e.renderer=new b(t,d);e.camera=new f(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);d.appendChild(e.renderer.three2D.domElement);const U=t.get(g);U.create(e);e.scene.three.background=null;const x=t.get(u),T=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),v=await T.arrayBuffer(),A=new Uint8Array(v),r=await x.load(A);e.scene.three.add(r);const B=await fetch("https://thatopen.github.io/engine_components/resources/road.json");r.setLocalProperties(await B.json());const a=t.get(L);a.world=e;a.draw(r);const C=t.get(w),s=C.create(e);s.threshold=10;for(const o of r.children)o instanceof i&&s.add(o);s.needsUpdate=!0;e.camera.controls.addEventListener("sleep",()=>{s.needsUpdate=!0});const c=new p(void 0,20);a.onHighlight.add(({point:o})=>{c.center.copy(o),e.camera.controls.fitToSphere(c,!0)});const n=new y;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); +import{s as i,S as l}from"./web-ifc-api-nU1-R_1k.js";import{C as p,W as m,S as h,a as f,G as g,F as u,b as w}from"./index-C8rcJyf0.js";import{S}from"./stats.min-GTpOrGrX.js";import{j as b,o as y}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";const d=document.getElementById("container"),t=new p,C=t.get(m),e=C.create();e.scene=new h(t);e.renderer=new b(t,d);e.camera=new f(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);d.appendChild(e.renderer.three2D.domElement);const U=t.get(g);U.create(e);e.scene.three.background=null;const j=t.get(u),v=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),A=await v.arrayBuffer(),B=new Uint8Array(A),r=await j.load(B);e.scene.three.add(r);const E=await fetch("https://thatopen.github.io/engine_components/resources/road.json");r.setLocalProperties(await E.json());const a=t.get(y);a.world=e;a.draw(r);const I=t.get(w),s=I.create(e);s.threshold=10;for(const o of r.children)o instanceof i&&s.add(o);s.needsUpdate=!0;e.camera.controls.addEventListener("sleep",()=>{s.needsUpdate=!0});const c=new l(void 0,20);a.onHighlight.add(({point:o})=>{c.center.copy(o),e.camera.controls.fitToSphere(c,!0)});const n=new S;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); diff --git a/examples/assets/civilCrossSectionNavigator.js b/examples/assets/civilCrossSectionNavigator.js index 20d9eddf..a232ae5e 100644 --- a/examples/assets/civilCrossSectionNavigator.js +++ b/examples/assets/civilCrossSectionNavigator.js @@ -1 +1 @@ -import{C as B,L as M}from"./web-ifc-api-CpQ3aV8c.js";import{C as E,T as L,s as S,w as k,L as A,a as C,B as D}from"./index-B03kGVBW.js";import{T}from"./index-BEvRfOoQ.js";import{w as v}from"./index-fOrz5L1Y.js";import{S as x}from"./stats.min-GTpOrGrX.js";import{G as I,g as P,i as U,n as j,A as G}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";T.init();v.init();const y=document.getElementById("container"),e=new E,H=e.get(L),t=H.create();t.scene=new S(e);t.renderer=new I(e,y);t.camera=new k(e);e.init();t.scene.setup();t.camera.controls.setLookAt(5,5,5,0,0,0);y.appendChild(t.renderer.three2D.domElement);const N=e.get(A);N.create(t);t.scene.three.background=null;const b=e.get(C),W=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),_=await W.arrayBuffer(),z=new Uint8Array(_),d=b.load(z);t.scene.three.add(d);const F=await fetch("https://thatopen.github.io/engine_components/resources/road.json");d.setLocalProperties(await F.json());const w=document.getElementById("scene-2d-left");w.components=e;if(!w.world)throw new Error("World not found!");const c=e.get(P);c.world=w.world;await c.draw(d);const l=e.get(U);l.world=t;l.draw(d);const g=document.getElementById("scene-2d-right");g.components=e;if(!g.world)throw new Error("World not found!");const f=e.get(j);f.world=g.world;f.world3D=t;c.onMarkerChange.add(({alignment:o,percentage:n,type:r,curve:s})=>{if(l.setMarker(o,n,r),r==="select"){const i=s.alignment.absolute[s.index].mesh,m=o.getPointAt(n,"absolute");f.set(i,m)}});c.onHighlight.add(({mesh:o})=>{l.highlighter.select(o);const n=o.curve.index,r=o.curve.alignment.absolute[n];r.mesh.geometry.computeBoundingSphere();const s=r.mesh.geometry.boundingSphere;s&&t.camera.controls.fitToSphere(s,!0)});c.onMarkerHidden.add(({type:o})=>{l.hideMarker(o)});const h=e.get(D);h.byEntity(d);const R=h.list,p=e.get(G),u=p.styles.list;for(const o in R.entities){const n=h.find({entities:[o]}),r=new B(Math.random(),Math.random(),Math.random()),s=new M({color:r});p.styles.create(o,new Set,g.world,s);for(const i in n){const m=b.list.get(i);m&&(u[o].fragments[i]=new Set(n[i]),u[o].meshes.add(m.mesh))}}p.update(!0);const a=new x;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>a.begin());t.renderer.onAfterUpdate.add(()=>a.end()); +import{C as M,L as S}from"./web-ifc-api-nU1-R_1k.js";import{C as v,W as C,S as B,O as E,G as k,F as D,c as x}from"./index-C8rcJyf0.js";import{T as I}from"./index-BEvRfOoQ.js";import{w as L}from"./index-DGT5XDSa.js";import{S as j}from"./stats.min-GTpOrGrX.js";import{j as A,n as P,o as W,b as F,v as T}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";I.init();L.init();const y=document.getElementById("container"),e=new v,U=e.get(C),t=U.create();t.scene=new B(e);t.renderer=new A(e,y);t.camera=new E(e);e.init();t.scene.setup();t.camera.controls.setLookAt(5,5,5,0,0,0);y.appendChild(t.renderer.three2D.domElement);const G=e.get(k);G.create(t);t.scene.three.background=null;const b=e.get(D),H=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),N=await H.arrayBuffer(),O=new Uint8Array(N),d=b.load(O);t.scene.three.add(d);const _=await fetch("https://thatopen.github.io/engine_components/resources/road.json");d.setLocalProperties(await _.json());const f=document.getElementById("scene-2d-left");f.components=e;if(!f.world)throw new Error("World not found!");const c=e.get(P);c.world=f.world;await c.draw(d);const l=e.get(W);l.world=t;l.draw(d);const g=document.getElementById("scene-2d-right");g.components=e;if(!g.world)throw new Error("World not found!");const p=e.get(F);p.world=g.world;p.world3D=t;c.onMarkerChange.add(({alignment:o,percentage:n,type:r,curve:s})=>{if(l.setMarker(o,n,r),r==="select"){const i=s.alignment.absolute[s.index].mesh,m=o.getPointAt(n,"absolute");p.set(i,m)}});c.onHighlight.add(({mesh:o})=>{l.highlighter.select(o);const n=o.curve.index,r=o.curve.alignment.absolute[n];r.mesh.geometry.computeBoundingSphere();const s=r.mesh.geometry.boundingSphere;s&&t.camera.controls.fitToSphere(s,!0)});c.onMarkerHidden.add(({type:o})=>{l.hideMarker(o)});const h=e.get(x);h.byEntity(d);const z=h.list,w=e.get(T),u=w.styles.list;for(const o in z.entities){const n=h.find({entities:[o]}),r=new M(Math.random(),Math.random(),Math.random()),s=new S({color:r});w.styles.create(o,new Set,g.world,s);for(const i in n){const m=b.list.get(i);m&&(u[o].fragments[i]=new Set(n[i]),u[o].meshes.add(m.mesh))}}w.update(!0);const a=new j;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>a.begin());t.renderer.onAfterUpdate.add(()=>a.end()); diff --git a/examples/assets/civilElevationNavigator.js b/examples/assets/civilElevationNavigator.js index cb6f87ba..4c03e4bd 100644 --- a/examples/assets/civilElevationNavigator.js +++ b/examples/assets/civilElevationNavigator.js @@ -1 +1 @@ -import"./web-ifc-api-CpQ3aV8c.js";import{C as y,T as S,s as b,w as B,L as T,a as k}from"./index-B03kGVBW.js";import{G as E,i as A,g as C,s as I}from"./index-lUHwa_Wd.js";import{T as L}from"./index-BEvRfOoQ.js";import{w as M}from"./index-fOrz5L1Y.js";import{S as x}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";L.init();M.init();const f=document.getElementById("container"),t=new y,D=t.get(S),e=D.create();e.scene=new b(t);e.renderer=new E(t,f);e.camera=new B(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);f.appendChild(e.renderer.three2D.domElement);const U=t.get(T);U.create(e);e.scene.three.background=null;const z=t.get(k),G=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),N=await G.arrayBuffer(),P=new Uint8Array(N),c=z.load(P);e.scene.three.add(c);const i=t.get(A);i.world=e;i.draw(c);const g=document.getElementById("scene-2d-left");g.components=t;if(!g.world)throw new Error("World not found!");const l=new C(t);l.world=g.world;l.draw(c);const s=document.getElementById("scene-2d-right");s.components=t;if(!s.world)throw new Error("World not found!");const a=t.get(I);a.world=s.world;a.draw(c);l.onMarkerChange.add(({alignment:r,percentage:d})=>{a.setMarker(r,d,"hover"),i.setMarker(r,d,"hover")});l.onHighlight.add(({mesh:r,point:d})=>{const{index:v,alignment:h}=r.curve,m=h.getPercentageAt(d,"horizontal");if(m===null)return;const{curve:n}=h.getCurveAt(m,"vertical");if(a.highlighter.select(n.mesh),a.setMarker(n.alignment,m,"select"),s.world){n.mesh.geometry.boundingSphere||n.mesh.geometry.computeBoundingSphere();const u=n.mesh.geometry.boundingSphere.clone();u.radius*=1.5,s.world.camera.controls.fitToSphere(u,!0)}i.highlighter.select(r);const w=r.curve.alignment.absolute[v];w.mesh.geometry.computeBoundingSphere();const p=w.mesh.geometry.boundingSphere;p&&e.camera.controls.fitToSphere(p,!0)});const o=new x;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end()); +import"./web-ifc-api-nU1-R_1k.js";import{C as y,W as S,S as b,O as B,G as k,F as C}from"./index-C8rcJyf0.js";import{j as E,o as A,n as M,r as I}from"./index-BdoCSKf7.js";import{T}from"./index-BEvRfOoQ.js";import{w as W}from"./index-DGT5XDSa.js";import{S as x}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";T.init();W.init();const f=document.getElementById("container"),t=new y,D=t.get(S),e=D.create();e.scene=new b(t);e.renderer=new E(t,f);e.camera=new B(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);f.appendChild(e.renderer.three2D.domElement);const P=t.get(k);P.create(e);e.scene.three.background=null;const U=t.get(C),j=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),z=await j.arrayBuffer(),F=new Uint8Array(z),c=U.load(F);e.scene.three.add(c);const i=t.get(A);i.world=e;i.draw(c);const g=document.getElementById("scene-2d-left");g.components=t;if(!g.world)throw new Error("World not found!");const l=new M(t);l.world=g.world;l.draw(c);const a=document.getElementById("scene-2d-right");a.components=t;if(!a.world)throw new Error("World not found!");const s=t.get(I);s.world=a.world;s.draw(c);l.onMarkerChange.add(({alignment:r,percentage:d})=>{s.setMarker(r,d,"hover"),i.setMarker(r,d,"hover")});l.onHighlight.add(({mesh:r,point:d})=>{const{index:v,alignment:h}=r.curve,m=h.getPercentageAt(d,"horizontal");if(m===null)return;const{curve:n}=h.getCurveAt(m,"vertical");if(s.highlighter.select(n.mesh),s.setMarker(n.alignment,m,"select"),a.world){n.mesh.geometry.boundingSphere||n.mesh.geometry.computeBoundingSphere();const w=n.mesh.geometry.boundingSphere.clone();w.radius*=1.5,a.world.camera.controls.fitToSphere(w,!0)}i.highlighter.select(r);const p=r.curve.alignment.absolute[v];p.mesh.geometry.computeBoundingSphere();const u=p.mesh.geometry.boundingSphere;u&&e.camera.controls.fitToSphere(u,!0)});const o=new x;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end()); diff --git a/examples/assets/civilPlanNavigator.js b/examples/assets/civilPlanNavigator.js index 672b27f2..c1f1f411 100644 --- a/examples/assets/civilPlanNavigator.js +++ b/examples/assets/civilPlanNavigator.js @@ -1 +1 @@ -import"./web-ifc-api-CpQ3aV8c.js";import{C as g,T as p,s as w,w as u,L as h,a as f}from"./index-B03kGVBW.js";import{G as y,i as b,g as T}from"./index-lUHwa_Wd.js";import{T as v}from"./index-BEvRfOoQ.js";import{w as B}from"./index-fOrz5L1Y.js";import{S}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";v.init();B.init();const i=document.getElementById("container"),t=new g,x=t.get(p),e=x.create();e.scene=new w(t);e.renderer=new y(t,i);e.camera=new u(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);i.appendChild(e.renderer.three2D.domElement);const A=t.get(h);A.create(e);e.scene.three.background=null;const C=t.get(f),E=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),I=await E.arrayBuffer(),L=new Uint8Array(I),r=C.load(L);e.scene.three.add(r);const a=t.get(b);a.world=e;a.draw(r);const m=document.getElementById("scene-2d"),s=t.get(T);m.components=t;s.world=m.world;await s.draw(r);s.onHighlight.add(({mesh:o})=>{a.highlighter.select(o);const l=o.curve.index,d=o.curve.alignment.absolute[l];d.mesh.geometry.computeBoundingSphere();const c=d.mesh.geometry.boundingSphere;c&&e.camera.controls.fitToSphere(c,!0)});const n=new S;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); +import"./web-ifc-api-nU1-R_1k.js";import{C as p,W as g,S as h,O as w,G as f,F as u}from"./index-C8rcJyf0.js";import{j as y,o as S,n as b}from"./index-BdoCSKf7.js";import{T as v}from"./index-BEvRfOoQ.js";import{w as B}from"./index-DGT5XDSa.js";import{S as x}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";v.init();B.init();const i=document.getElementById("container"),t=new p,C=t.get(g),e=C.create();e.scene=new h(t);e.renderer=new y(t,i);e.camera=new w(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);i.appendChild(e.renderer.three2D.domElement);const A=t.get(f);A.create(e);e.scene.three.background=null;const E=t.get(u),I=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),T=await I.arrayBuffer(),U=new Uint8Array(T),r=E.load(U);e.scene.three.add(r);const a=t.get(S);a.world=e;a.draw(r);const m=document.getElementById("scene-2d"),s=t.get(b);m.components=t;s.world=m.world;await s.draw(r);s.onHighlight.add(({mesh:o})=>{a.highlighter.select(o);const l=o.curve.index,d=o.curve.alignment.absolute[l];d.mesh.geometry.computeBoundingSphere();const c=d.mesh.geometry.boundingSphere;c&&e.camera.controls.fitToSphere(c,!0)});const n=new x;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); diff --git a/examples/assets/classifier.js b/examples/assets/classifier.js index c299426a..e3b5808e 100644 --- a/examples/assets/classifier.js +++ b/examples/assets/classifier.js @@ -1,25 +1,25 @@ -import{ag as m,C as u}from"./web-ifc-api-CpQ3aV8c.js";import{S as p}from"./stats.min-GTpOrGrX.js";import{T as d,z as a,m as c}from"./index-BEvRfOoQ.js";import{C as b,T as C,s as f,g,x as w,L as I,a as L,B as h}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const y=document.getElementById("container"),s=new b,T=s.get(C),t=T.create();t.scene=new f(s);t.renderer=new g(s,y);t.camera=new w(s);s.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const A=s.get(I);A.create(t);t.scene.three.background=null;const E=new L(s),F=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),R=await F.arrayBuffer(),S=new Uint8Array(R),i=E.load(S);t.scene.three.add(i);const B=await fetch("https://thatopen.github.io/engine_components/resources/small.json");i.setLocalProperties(await B.json());const o=s.get(h);o.byEntity(i);o.byIfcRel(i,m,"storeys");o.byModel(i.uuid,i);const N=o.find({entities:["IFCWALLSTANDARDCASE"]}),$=o.find({entities:["IFCSLAB"]}),U=o.find({entities:["IFCMEMBER","IFCPLATE"]}),v=o.find({entities:["IFCFURNISHINGELEMENT"]}),D=o.find({entities:["IFCDOOR"]}),k=o.find({models:[i.uuid]}),l=new p;l.showPanel(2);document.body.append(l.dom);l.dom.style.left="0px";l.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>l.begin());t.renderer.onAfterUpdate.add(()=>l.end());d.init();const e=new u,r=a.create(()=>c` +import{ag as m,C as p}from"./web-ifc-api-nU1-R_1k.js";import{S as d}from"./stats.min-GTpOrGrX.js";import{T as u,z as a,m as c}from"./index-BEvRfOoQ.js";import{C as b,W as C,S as f,d as g,a as w,G as I,F as S,c as y}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const h=document.getElementById("container"),s=new b,A=s.get(C),t=A.create();t.scene=new f(s);t.renderer=new g(s,h);t.camera=new w(s);s.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const E=s.get(I);E.create(t);t.scene.three.background=null;const L=new S(s),F=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),R=await F.arrayBuffer(),T=new Uint8Array(R),i=L.load(T);t.scene.three.add(i);const N=await fetch("https://thatopen.github.io/engine_components/resources/small.json");i.setLocalProperties(await N.json());const o=s.get(y);o.byEntity(i);o.byIfcRel(i,m,"storeys");o.byModel(i.uuid,i);const $=o.find({entities:["IFCWALLSTANDARDCASE"]}),U=o.find({entities:["IFCSLAB"]}),v=o.find({entities:["IFCMEMBER","IFCPLATE"]}),B=o.find({entities:["IFCFURNISHINGELEMENT"]}),D=o.find({entities:["IFCDOOR"]}),M=o.find({models:[i.uuid]}),l=new d;l.showPanel(2);document.body.append(l.dom);l.dom.style.left="0px";l.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>l.begin());t.renderer.onAfterUpdate.add(()=>l.end());u.init();const e=new p,r=a.create(()=>c` + @input="${({target:n})=>{e.set(n.color),o.setColor($,e)}}"> + @input="${({target:n})=>{e.set(n.color),o.setColor(U,e)}}"> + @input="${({target:n})=>{e.set(n.color),o.setColor(v,e)}}"> + @input="${({target:n})=>{e.set(n.color),o.setColor(B,e)}}"> + @click="${()=>{o.resetColor(M)}}"> - `);document.body.append(r);const x=a.create(()=>c` + `);document.body.append(r);const W=a.create(()=>c` - `);document.body.append(x); + `);document.body.append(W); diff --git a/examples/assets/clipEdges.js b/examples/assets/clipEdges.js index 61e03f0b..afef61c2 100644 --- a/examples/assets/clipEdges.js +++ b/examples/assets/clipEdges.js @@ -1,4 +1,4 @@ -import{B as M,M as y,a as d,b as c,L as b}from"./web-ifc-api-CpQ3aV8c.js";import{S as f}from"./stats.min-GTpOrGrX.js";import{T as x,z as m,m as p}from"./index-BEvRfOoQ.js";import{C as k,T as v,s as L,x as P,L as B,c as C,N as I}from"./index-B03kGVBW.js";import{b as $,A as z,f as D}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";const u=document.getElementById("container"),o=new k,T=o.get(v),e=T.create();e.scene=new L(o);e.renderer=new $(o,u);e.camera=new P(o);e.renderer.postproduction.enabled=!0;e.renderer.postproduction.customEffects.outlineEnabled=!0;o.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const A=o.get(B),h=A.create(e);h.config.color.setHex(6710886);e.renderer.postproduction.customEffects.excludedMeshes.push(h.three);e.scene.three.background=null;const g=new M(3,3,3),w=new y({color:"#6528D7"}),a=new d(g,w);a.position.set(-2,1.5,0);e.scene.three.add(a);e.meshes.add(a);const l=new d(g,w);l.position.set(2,1.5,0);e.scene.three.add(l);e.meshes.add(l);const E=o.get(C);E.get(e);const n=o.get(I);n.enabled=!0;const r=o.get(z);n.Type=D;const S=new c({color:"lightblue",side:2}),O=new b({color:"blue"}),F=new c({color:"blue",opacity:.5,side:2,transparent:!0});r.styles.create("Red lines",new Set([a]),e,O,S,F);const G=new c({color:"salmon",side:2}),N=new b({color:"red"}),R=new c({color:"red",opacity:.5,side:2,transparent:!0});r.styles.create("Blue lines",new Set([l]),e,N,G,R);u.ondblclick=()=>{n.enabled&&n.create(e)};window.onkeydown=t=>{(t.code==="Delete"||t.code==="Backspace")&&n.enabled&&n.delete(e)};const s=new f;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());x.init();const i=m.create(()=>p` +import{B as M,M as y,a as d,b as c,L as b}from"./web-ifc-api-nU1-R_1k.js";import{S as f}from"./stats.min-GTpOrGrX.js";import{T as k,z as m,m as p}from"./index-BEvRfOoQ.js";import{C as v,W as x,S as C,a as L,G as P,R as S,e as B}from"./index-C8rcJyf0.js";import{L as I,v as $,a as z}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";const u=document.getElementById("container"),o=new v,D=o.get(x),e=D.create();e.scene=new C(o);e.renderer=new I(o,u);e.camera=new L(o);e.renderer.postproduction.enabled=!0;e.renderer.postproduction.customEffects.outlineEnabled=!0;o.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const E=o.get(P),h=E.create(e);h.config.color.setHex(6710886);e.renderer.postproduction.customEffects.excludedMeshes.push(h.three);e.scene.three.background=null;const g=new M(3,3,3),w=new y({color:"#6528D7"}),a=new d(g,w);a.position.set(-2,1.5,0);e.scene.three.add(a);e.meshes.add(a);const l=new d(g,w);l.position.set(2,1.5,0);e.scene.three.add(l);e.meshes.add(l);const G=o.get(S);G.get(e);const n=o.get(B);n.enabled=!0;const r=o.get($);n.Type=z;const R=new c({color:"lightblue",side:2}),T=new b({color:"blue"}),W=new c({color:"blue",opacity:.5,side:2,transparent:!0});r.styles.create("Red lines",new Set([a]),e,T,R,W);const A=new c({color:"salmon",side:2}),O=new b({color:"red"}),F=new c({color:"red",opacity:.5,side:2,transparent:!0});r.styles.create("Blue lines",new Set([l]),e,O,A,F);u.ondblclick=()=>{n.enabled&&n.create(e)};window.onkeydown=t=>{(t.code==="Delete"||t.code==="Backspace")&&n.enabled&&n.delete(e)};const s=new f;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());k.init();const i=m.create(()=>p` diff --git a/examples/assets/clipper.js b/examples/assets/clipper.js index e6c382ac..f2d4a9b5 100644 --- a/examples/assets/clipper.js +++ b/examples/assets/clipper.js @@ -1,4 +1,4 @@ -import{B as r,M as m,a as d,C as p}from"./web-ifc-api-CpQ3aV8c.js";import{S as u}from"./stats.min-GTpOrGrX.js";import{T as h,z as s,m as c}from"./index-BEvRfOoQ.js";import{C as g,T as f,s as k,g as w,x as y,c as x,N as v}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const b=document.getElementById("container"),o=new g,M=o.get(f),e=M.create();e.scene=new k(o);e.renderer=new w(o,b);e.camera=new y(o);o.init();e.camera.controls.setLookAt(10,10,10,0,0,0);e.scene.setup();e.scene.three.background=null;const C=new r(3,3,3),$=new m({color:"#6528D7"}),a=new d(C,$);a.position.set(0,1.5,0);e.scene.three.add(a);e.meshes.add(a);const P=o.get(x);P.get(e);const t=o.get(v);t.enabled=!0;b.ondblclick=()=>{t.enabled&&t.create(e)};window.onkeydown=n=>{(n.code==="Delete"||n.code==="Backspace")&&t.enabled&&t.delete(e)};const l=new u;l.showPanel(2);document.body.append(l.dom);l.dom.style.left="0px";l.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>l.begin());e.renderer.onAfterUpdate.add(()=>l.end());h.init();const i=s.create(()=>c` +import{B as b,M as m,a as p,C as d}from"./web-ifc-api-nU1-R_1k.js";import{S as u}from"./stats.min-GTpOrGrX.js";import{T as h,z as s,m as c}from"./index-BEvRfOoQ.js";import{C as g,W as f,S as k,d as w,a as y,R as C,e as v}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new g,M=t.get(f),e=M.create();e.scene=new k(t);e.renderer=new w(t,r);e.camera=new y(t);t.init();e.camera.controls.setLookAt(10,10,10,0,0,0);e.scene.setup();e.scene.three.background=null;const x=new b(3,3,3),S=new m({color:"#6528D7"}),a=new p(x,S);a.position.set(0,1.5,0);e.scene.three.add(a);e.meshes.add(a);const $=t.get(C);$.get(e);const o=t.get(v);o.enabled=!0;r.ondblclick=()=>{o.enabled&&o.create(e)};window.onkeydown=n=>{(n.code==="Delete"||n.code==="Backspace")&&o.enabled&&o.delete(e)};const l=new u;l.showPanel(2);document.body.append(l.dom);l.dom.style.left="0px";l.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>l.begin());e.renderer.onAfterUpdate.add(()=>l.end());h.init();const i=s.create(()=>c` @@ -10,31 +10,31 @@ import{B as r,M as m,a as d,C as p}from"./web-ifc-api-CpQ3aV8c.js";import{S as u + @change="${({target:n})=>{o.config.enabled=n.value}}"> + @change="${({target:n})=>{o.config.visible=n.value}}"> + @input="${({target:n})=>{o.config.color=new d(n.color)}}"> + @change="${({target:n})=>{o.config.opacity=n.value}}"> + @change="${({target:n})=>{o.config.size=n.value}}"> + @click="${()=>{o.deleteAll()}}"> - `);document.body.append(i);const z=s.create(()=>c` + `);document.body.append(i);const P=s.create(()=>c` - `);document.body.append(z); + `);document.body.append(P); diff --git a/examples/assets/cullers.js b/examples/assets/cullers.js index 7a67a5cb..2ddd9ca2 100644 --- a/examples/assets/cullers.js +++ b/examples/assets/cullers.js @@ -1 +1 @@ -import{B as c,af as i,a as l}from"./web-ifc-api-CpQ3aV8c.js";import{S as m}from"./stats.min-GTpOrGrX.js";import{C as p,T as u,s as g,g as f,x as y,L as b,O as w}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const h=document.getElementById("container"),t=new p,x=t.get(u),e=x.create();e.scene=new g(t);e.renderer=new f(t,h);e.camera=new y(t);t.init();e.camera.controls.setLookAt(13,13,13,0,0,0);e.scene.setup();const L=t.get(b);L.create(e);e.scene.three.background=null;const M=t.get(w),o=M.create(e);o.threshold=200;o.config.renderDebugFrame=!0;const s=o.renderer.domElement;document.body.appendChild(s);s.style.position="fixed";s.style.left="0";s.style.bottom="0";s.style.visibility="collapse";const B=new c(2,2,2),C=new i({color:"#6528D7"});function d(a){return Math.random()*a}function U(){for(let a=0;a<300;a++){const n=new l(B,C);n.position.x=d(10),n.position.y=d(10),n.position.z=d(10),n.updateMatrix(),e.scene.three.add(n),o.add(n)}}U();o.needsUpdate=!0;e.camera.controls.addEventListener("controlend",()=>{o.needsUpdate=!0});const r=new m;r.showPanel(2);document.body.append(r.dom);r.dom.style.left="0px";r.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>r.begin());e.renderer.onAfterUpdate.add(()=>r.end()); +import{B as c,af as l,a as i}from"./web-ifc-api-nU1-R_1k.js";import{S as m}from"./stats.min-GTpOrGrX.js";import{C as p,W as u,S as b,d as f,a as g,G as y,b as w}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const h=document.getElementById("container"),t=new p,S=t.get(u),e=S.create();e.scene=new b(t);e.renderer=new f(t,h);e.camera=new g(t);t.init();e.camera.controls.setLookAt(13,13,13,0,0,0);e.scene.setup();const x=t.get(y);x.create(e);e.scene.three.background=null;const C=t.get(w),o=C.create(e);o.threshold=200;o.config.renderDebugFrame=!0;const s=o.renderer.domElement;document.body.appendChild(s);s.style.position="fixed";s.style.left="0";s.style.bottom="0";s.style.visibility="collapse";const M=new c(2,2,2),B=new l({color:"#6528D7"});function d(a){return Math.random()*a}function U(){for(let a=0;a<300;a++){const n=new i(M,B);n.position.x=d(10),n.position.y=d(10),n.position.z=d(10),n.updateMatrix(),e.scene.three.add(n),o.add(n)}}U();o.needsUpdate=!0;e.camera.controls.addEventListener("controlend",()=>{o.needsUpdate=!0});const r=new m;r.showPanel(2);document.body.append(r.dom);r.dom.style.left="0px";r.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>r.begin());e.renderer.onAfterUpdate.add(()=>r.end()); diff --git a/examples/assets/edgeMeasurement.js b/examples/assets/edgeMeasurement.js index 003dc492..c8f0357d 100644 --- a/examples/assets/edgeMeasurement.js +++ b/examples/assets/edgeMeasurement.js @@ -1 +1 @@ -import{a as c}from"./web-ifc-api-CpQ3aV8c.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,T as m,s as f,x as w,L as p,a as g}from"./index-B03kGVBW.js";import{b as h,c as u}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,y=t.get(m),e=y.create();e.scene=new f(t);e.renderer=new h(t,r);e.camera=new w(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const b=t.get(p);b.create(e);e.scene.three.background=null;const L=new g(t),k=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),x=await k.arrayBuffer(),A=new Uint8Array(x),d=L.load(A);e.scene.three.add(d);for(const o of d.children)o instanceof c&&e.meshes.add(o);const n=t.get(u);n.world=e;n.enabled=!0;r.ondblclick=()=>n.create();let a;window.addEventListener("keydown",o=>{o.code==="KeyO"?n.delete():o.code==="KeyS"?(a=n.get(),n.deleteAll()):o.code==="KeyL"&&a&&n.set(a)});const s=new i;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end()); +import{a as c}from"./web-ifc-api-nU1-R_1k.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,W as m,S as f,a as p,G as w,F as g}from"./index-C8rcJyf0.js";import{L as h,f as u}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,y=t.get(m),e=y.create();e.scene=new f(t);e.renderer=new h(t,r);e.camera=new p(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const b=t.get(w);b.create(e);e.scene.three.background=null;const S=new g(t),L=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),k=await L.arrayBuffer(),A=new Uint8Array(k),d=S.load(A);e.scene.three.add(d);for(const o of d.children)o instanceof c&&e.meshes.add(o);const n=t.get(u);n.world=e;n.enabled=!0;r.ondblclick=()=>n.create();let a;window.addEventListener("keydown",o=>{o.code==="KeyO"?n.delete():o.code==="KeyS"?(a=n.get(),n.deleteAll()):o.code==="KeyL"&&a&&n.set(a)});const s=new i;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end()); diff --git a/examples/assets/exploder.js b/examples/assets/exploder.js index e4eec9f2..42a17df8 100644 --- a/examples/assets/exploder.js +++ b/examples/assets/exploder.js @@ -1,15 +1,15 @@ -import{ab as l}from"./web-ifc-api-CpQ3aV8c.js";import{S as m}from"./stats.min-GTpOrGrX.js";import{T as p,z as a,m as i}from"./index-BEvRfOoQ.js";import{C as d,T as b,s as u,g,x as h,L as f,a as w,G as x,X as y,B as L}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const S=document.getElementById("container"),e=new d,T=e.get(b),t=T.create();t.scene=new u(e);t.renderer=new g(e,S);t.camera=new h(e);e.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const v=e.get(f);v.create(t);t.scene.three.background=null;const B=new w(e),k=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),I=await k.arrayBuffer(),C=new Uint8Array(I),o=B.load(C);t.scene.three.add(o);const E=await fetch("https://thatopen.github.io/engine_components/resources/small.json");o.setLocalProperties(await E.json());const r=e.get(x),U=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),j=r.getRelationsMapFromJSON(await U.text());r.setRelationMap(o,j);const z=e.get(y),A=e.get(L);await A.bySpatialStructure(o,{isolate:new Set([l])});const s=new m;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>s.begin());t.renderer.onAfterUpdate.add(()=>s.end());p.init();const n=a.create(()=>i` +import{ab as l}from"./web-ifc-api-nU1-R_1k.js";import{S as m}from"./stats.min-GTpOrGrX.js";import{T as p,z as a,m as r}from"./index-BEvRfOoQ.js";import{C as d,W as b,S as u,d as g,a as f,G as h,F as w,g as S,E as x,c as y}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const I=document.getElementById("container"),e=new d,v=e.get(b),t=v.create();t.scene=new u(e);t.renderer=new g(e,I);t.camera=new f(e);e.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const C=e.get(h);C.create(t);t.scene.three.background=null;const E=new w(e),L=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),k=await L.arrayBuffer(),F=new Uint8Array(k),s=E.load(F);t.scene.three.add(s);const R=await fetch("https://thatopen.github.io/engine_components/resources/small.json");s.setLocalProperties(await R.json());const i=e.get(S),B=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),T=i.getRelationsMapFromJSON(await B.text());i.setRelationMap(s,T);const U=e.get(x),j=e.get(y);await j.bySpatialStructure(s,{isolate:new Set([l])});const n=new m;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>n.begin());t.renderer.onAfterUpdate.add(()=>n.end());p.init();const o=a.create(()=>r` + @change="${({target:c})=>{U.set(c.value)}}"> - `);document.body.append(n);const F=a.create(()=>i` + `);document.body.append(o);const z=a.create(()=>r` + @click="${()=>{o.classList.contains("options-menu-visible")?o.classList.remove("options-menu-visible"):o.classList.add("options-menu-visible")}}"> - `);document.body.append(F); + `);document.body.append(z); diff --git a/examples/assets/faceMeasurement.js b/examples/assets/faceMeasurement.js index 7d440df2..f4314b09 100644 --- a/examples/assets/faceMeasurement.js +++ b/examples/assets/faceMeasurement.js @@ -1 +1 @@ -import{a as c}from"./web-ifc-api-CpQ3aV8c.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,T as m,s as f,x as w,L as p,a as g}from"./index-B03kGVBW.js";import{b as h,l as u}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,y=t.get(m),e=y.create();e.scene=new f(t);e.renderer=new h(t,r);e.camera=new w(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const b=t.get(p);b.create(e);e.scene.three.background=null;const L=new g(t),k=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),x=await k.arrayBuffer(),A=new Uint8Array(x),d=L.load(A);e.scene.three.add(d);for(const o of d.children)o instanceof c&&e.meshes.add(o);const n=t.get(u);n.world=e;n.enabled=!0;r.ondblclick=()=>n.create();let a;window.addEventListener("keydown",o=>{o.code==="KeyO"?n.delete():o.code==="KeyS"?(a=n.get(),n.deleteAll()):o.code==="KeyL"&&a&&n.set(a)});const s=new i;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end()); +import{a as c}from"./web-ifc-api-nU1-R_1k.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,W as m,S as f,a as p,G as w,F as g}from"./index-C8rcJyf0.js";import{L as u,u as h}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,y=t.get(m),e=y.create();e.scene=new f(t);e.renderer=new u(t,r);e.camera=new p(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const b=t.get(w);b.create(e);e.scene.three.background=null;const S=new g(t),L=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),k=await L.arrayBuffer(),A=new Uint8Array(k),d=S.load(A);e.scene.three.add(d);for(const o of d.children)o instanceof c&&e.meshes.add(o);const n=t.get(h);n.world=e;n.enabled=!0;r.ondblclick=()=>n.create();let a;window.addEventListener("keydown",o=>{o.code==="KeyO"?n.delete():o.code==="KeyS"?(a=n.get(),n.deleteAll()):o.code==="KeyL"&&a&&n.set(a)});const s=new i;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end()); diff --git a/examples/assets/fragmentsManager.js b/examples/assets/fragmentsManager.js index 0b3f4ef9..fd2bc27a 100644 --- a/examples/assets/fragmentsManager.js +++ b/examples/assets/fragmentsManager.js @@ -1,26 +1,26 @@ -import"./web-ifc-api-CpQ3aV8c.js";import{S as u}from"./stats.min-GTpOrGrX.js";import{C as p,T as b,s as g,g as f,x as w,L as h,a as y}from"./index-B03kGVBW.js";import{T as L,z as l,m}from"./index-BEvRfOoQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";const k=document.getElementById("container"),n=new p,x=n.get(b),e=x.create();e.scene=new g(n);e.renderer=new f(n,k);e.camera=new w(n);n.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const v=n.get(h);v.create(e);e.scene.three.background=null;const s=n.get(y);let d="";async function T(){if(s.groups.size)return;const t=await(await fetch("https://thatopen.github.io/engine_components/resources/small.frag")).arrayBuffer(),c=new Uint8Array(t),r=s.load(c);e.scene.three.add(r),d=r.uuid}function z(o){const t=document.createElement("a");t.href=URL.createObjectURL(o),t.download=o.name,document.body.appendChild(t),t.click(),t.remove()}function F(){if(!s.groups.size)return;const o=s.groups.get(d);if(!o)return;const t=s.export(o),c=new Blob([t]),r=new File([c],"small.frag");z(r)}function U(){s.dispose()}const a=new u;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>a.begin());e.renderer.onAfterUpdate.add(()=>a.end());L.init();const i=l.create(()=>m` +import"./web-ifc-api-nU1-R_1k.js";import{S as p}from"./stats.min-GTpOrGrX.js";import{C as u,W as b,S as g,d as f,a as w,G as h,F as y}from"./index-C8rcJyf0.js";import{T as k,z as l,m}from"./index-BEvRfOoQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";const F=document.getElementById("container"),n=new u,L=n.get(b),e=L.create();e.scene=new g(n);e.renderer=new f(n,F);e.camera=new w(n);n.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const S=n.get(h);S.create(e);e.scene.three.background=null;const s=n.get(y);let d="";async function v(){if(s.groups.size)return;const t=await(await fetch("https://thatopen.github.io/engine_components/resources/small.frag")).arrayBuffer(),c=new Uint8Array(t),r=s.load(c);e.scene.three.add(r),d=r.uuid}function x(o){const t=document.createElement("a");t.href=URL.createObjectURL(o),t.download=o.name,document.body.appendChild(t),t.click(),t.remove()}function z(){if(!s.groups.size)return;const o=s.groups.get(d);if(!o)return;const t=s.export(o),c=new Blob([t]),r=new File([c],"small.frag");x(r)}function C(){s.dispose()}const a=new p;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>a.begin());e.renderer.onAfterUpdate.add(()=>a.end());k.init();const i=l.create(()=>m` + @click="${()=>{v()}}"> + @click="${()=>{C()}}"> + @click="${()=>{z()}}"> - `);document.body.append(i);const B=l.create(()=>m` + `);document.body.append(i);const U=l.create(()=>m` - `);document.body.append(B); + `);document.body.append(U); diff --git a/examples/assets/grids.js b/examples/assets/grids.js index 601feaf3..152aee5c 100644 --- a/examples/assets/grids.js +++ b/examples/assets/grids.js @@ -1,31 +1,31 @@ -import{a as c,B as l,b as m,C as b}from"./web-ifc-api-CpQ3aV8c.js";import{S as d}from"./stats.min-GTpOrGrX.js";import{C as p,T as u,s as g,g as h,x as f,L as w}from"./index-B03kGVBW.js";import{T as v,z as a,m as r}from"./index-BEvRfOoQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";const y=document.getElementById("container"),o=new p,x=o.get(u),e=x.create();e.scene=new g(o);e.renderer=new h(o,y);e.camera=new f(o);o.init();const z=new c(new l,new m({color:"red"}));e.scene.three.add(z);e.scene.three.background=null;const C=o.get(w),i=C.create(e);console.log(i);v.init();const t=a.create(()=>r` +import{a as l,B as c,b as m,C as d}from"./web-ifc-api-nU1-R_1k.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{C as p,W as u,S as g,d as f,a as h,G as w}from"./index-C8rcJyf0.js";import{T as v,z as r,m as a}from"./index-BEvRfOoQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";const y=document.getElementById("container"),o=new p,S=o.get(u),e=S.create();e.scene=new g(o);e.renderer=new f(o,y);e.camera=new h(o);o.init();const G=new l(new c,new m({color:"red"}));e.scene.three.add(G);e.scene.three.background=null;const x=o.get(w),s=x.create(e);console.log(s);v.init();const t=r.create(()=>a` + @change="${({target:n})=>{s.config.visible=n.value}}"> + @input="${({target:n})=>{s.config.color=new d(n.color)}}"> + @change="${({target:n})=>{s.config.primarySize=n.value}}"> + @change="${({target:n})=>{s.config.secondarySize=n.value}}"> - `);document.body.append(t);const G=a.create(()=>r` + `);document.body.append(t);const z=r.create(()=>a` - `);document.body.append(G);const s=new d;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end()); + `);document.body.append(z);const i=new b;i.showPanel(2);document.body.append(i.dom);i.dom.style.left="0px";i.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>i.begin());e.renderer.onAfterUpdate.add(()=>i.end()); diff --git a/examples/assets/hider.js b/examples/assets/hider.js index b14aae99..d225f0e4 100644 --- a/examples/assets/hider.js +++ b/examples/assets/hider.js @@ -1,4 +1,4 @@ -import{ab as S}from"./web-ifc-api-CpQ3aV8c.js";import{S as k}from"./stats.min-GTpOrGrX.js";import{T as x,z as r,m as l}from"./index-BEvRfOoQ.js";import{C,T as L,s as v,g as F,x as T,L as B,a as I,G as j,d as $,B as E}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const M=document.getElementById("container"),e=new C,N=e.get(L),t=N.create();t.scene=new v(e);t.renderer=new F(e,M);t.camera=new T(e);e.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const O=e.get(B);O.create(t);t.scene.three.background=null;const b=e.get(I),U=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),_=await U.arrayBuffer(),z=new Uint8Array(_),i=b.load(z);t.scene.three.add(i);const A=await fetch("https://thatopen.github.io/engine_components/resources/small.json");i.setLocalProperties(await A.json());const d=e.get(j),G=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),R=d.getRelationsMapFromJSON(await G.text());d.setRelationMap(i,R);const g=e.get($),o=e.get(E);o.byEntity(i);await o.bySpatialStructure(i,{isolate:new Set([S])});const a=new k;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>a.begin());t.renderer.onAfterUpdate.add(()=>a.end());x.init();const f={},q=Object.keys(o.list.spatialStructures);for(const n of q)f[n]=!0;const h={},D=Object.keys(o.list.entities);for(const n of D)h[n]=!0;const s=r.create(()=>l` +import{ab as y}from"./web-ifc-api-nU1-R_1k.js";import{S as k}from"./stats.min-GTpOrGrX.js";import{T as x,z as r,m as l}from"./index-BEvRfOoQ.js";import{C,W as F,S as I,d as v,a as L,G as j,F as M,g as R,H as $,c as B}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const E=document.getElementById("container"),e=new C,N=e.get(F),t=N.create();t.scene=new I(e);t.renderer=new v(e,E);t.camera=new L(e);e.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const O=e.get(j);O.create(t);t.scene.three.background=null;const b=e.get(M),T=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),U=await T.arrayBuffer(),_=new Uint8Array(U),i=b.load(_);t.scene.three.add(i);const z=await fetch("https://thatopen.github.io/engine_components/resources/small.json");i.setLocalProperties(await z.json());const d=e.get(R),A=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),G=d.getRelationsMapFromJSON(await A.text());d.setRelationMap(i,G);const f=e.get($),o=e.get(B);o.byEntity(i);await o.bySpatialStructure(i,{isolate:new Set([y])});const a=new k;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>a.begin());t.renderer.onAfterUpdate.add(()=>a.end());x.init();const g={},H=Object.keys(o.list.spatialStructures);for(const n of H)g[n]=!0;const h={},q=Object.keys(o.list.entities);for(const n of q)h[n]=!0;const s=r.create(()=>l` @@ -9,16 +9,16 @@ import{ab as S}from"./web-ifc-api-CpQ3aV8c.js";import{S as k}from"./stats.min-GT - `);document.body.append(s);const P=s.querySelector("bim-panel-section[name='Floors']"),H=s.querySelector("bim-panel-section[name='Categories']");for(const n in f){const m=r.create(()=>l` + `);document.body.append(s);const D=s.querySelector("bim-panel-section[name='Floors']"),P=s.querySelector("bim-panel-section[name='Categories']");for(const n in g){const m=r.create(()=>l` + @change="${({target:p})=>{const c=o.list.spatialStructures[n];if(c&&c.id!==null)for(const[J,u]of b.groups){const S=d.getEntityChildren(u,c.id),w=u.getFragmentMap(S);f.set(p.value,w)}}}"> - `);P.append(m)}for(const n in h){const m=r.create(()=>l` + `);D.append(m)}for(const n in h){const m=r.create(()=>l` + @change="${({target:p})=>{const c=o.find({entities:[n]});f.set(p.value,c)}}"> - `);H.append(m)}const J=r.create(()=>l` + `);P.append(m)}const W=r.create(()=>l` - `);document.body.append(J); + `);document.body.append(W); diff --git a/examples/assets/highlighter.js b/examples/assets/highlighter.js index 2c426fc6..0c4a12e8 100644 --- a/examples/assets/highlighter.js +++ b/examples/assets/highlighter.js @@ -1 +1 @@ -import{b as a}from"./web-ifc-api-CpQ3aV8c.js";import{C as d,T as c,s as i,x as l,L as m,a as p}from"./index-B03kGVBW.js";import{b as u,d as f,V as g}from"./index-lUHwa_Wd.js";import{S as w}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const h=document.getElementById("container"),t=new d,b=t.get(c),e=b.create();e.scene=new i(t);e.renderer=new u(t,h);e.camera=new l(t);t.init();e.renderer.postproduction.enabled=!0;e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const x=t.get(m),y=x.create(e);e.renderer.postproduction.customEffects.excludedMeshes.push(y.three);e.scene.three.background=null;const B=new p(t),L=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),T=await L.arrayBuffer(),k=new Uint8Array(T),v=B.load(k);e.scene.three.add(v);const r=t.get(f);r.setup({world:e});r.zoomToSelection=!0;const n=t.get(g);n.world=e;n.enabled=!0;n.create("example",new a({color:12382500,transparent:!0,opacity:.5}));r.events.select.onHighlight.add(s=>{n.clear("example"),n.add("example",s)});r.events.select.onClear.add(()=>{n.clear("example")});const o=new w;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end());window.addEventListener("keydown",s=>{s.code==="KeyP"&&t.dispose()}); +import{b as s}from"./web-ifc-api-nU1-R_1k.js";import{C as c,W as d,S as l,a as i,G as m,F as p}from"./index-C8rcJyf0.js";import{L as u,p as g,Y as f}from"./index-BdoCSKf7.js";import{S as h}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const w=document.getElementById("container"),t=new c,b=t.get(d),e=b.create();e.scene=new l(t);e.renderer=new u(t,w);e.camera=new i(t);t.init();e.renderer.postproduction.enabled=!0;e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const x=t.get(m),y=x.create(e);e.renderer.postproduction.customEffects.excludedMeshes.push(y.three);e.scene.three.background=null;const S=new p(t),B=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),C=await B.arrayBuffer(),M=new Uint8Array(C),A=S.load(M);e.scene.three.add(A);const o=t.get(g);o.setup({world:e});o.zoomToSelection=!0;const n=t.get(f);n.world=e;n.enabled=!0;n.create("example",new s({color:12382500,transparent:!0,opacity:.5}));o.events.select.onHighlight.add(a=>{n.clear("example"),n.add("example",a)});o.events.select.onClear.add(()=>{n.clear("example")});const r=new h;r.showPanel(2);document.body.append(r.dom);r.dom.style.left="0px";r.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>r.begin());e.renderer.onAfterUpdate.add(()=>r.end()); diff --git a/examples/assets/iDSSpecifications.js b/examples/assets/iDSSpecifications.js index 96f3c1d8..bda54185 100644 --- a/examples/assets/iDSSpecifications.js +++ b/examples/assets/iDSSpecifications.js @@ -1 +1 @@ -import"./web-ifc-api-CpQ3aV8c.js";import{C as s,I as a,a as o,b as n,c as p}from"./index-B_pEH4rh.js";import"./_commonjsHelpers-Cpj98o6Y.js";const e=new s,r=e.get(a);await r.setup();const t=e.get(o),i=await fetch("/resources/specs.ids"),c=await i.text(),m=t.load(c);console.log(t,m);new n(e,{type:"enumeration",parameter:["IFCSLAB","IFCWALL"]});const l=new p(e,{type:"simple",parameter:"Pset_SlabCommon"},{type:"simple",parameter:"IsExternal"});l.value={type:"simple",parameter:!1}; +import"./web-ifc-api-nU1-R_1k.js";import{C as s,I as a,a as o,b as n,c as p}from"./index-BboVOtPt.js";import"./_commonjsHelpers-Cpj98o6Y.js";const e=new s,r=e.get(a);await r.setup();const t=e.get(o),i=await fetch("/resources/specs.ids"),c=await i.text(),m=t.load(c);console.log(t,m);new n(e,{type:"enumeration",parameter:["IFCSLAB","IFCWALL"]});const l=new p(e,{type:"simple",parameter:"Pset_SlabCommon"},{type:"simple",parameter:"IsExternal"});l.value={type:"simple",parameter:!1}; diff --git a/examples/assets/ifcFinder.js b/examples/assets/ifcFinder.js index 7bdd67a7..326590a7 100644 --- a/examples/assets/ifcFinder.js +++ b/examples/assets/ifcFinder.js @@ -1,8 +1,8 @@ -import"./web-ifc-api-CpQ3aV8c.js";import{T as w,z as r,m as i}from"./index-BEvRfOoQ.js";import{S as h}from"./stats.min-GTpOrGrX.js";import{C as v,T as x,s as F,g as R,x as C,L as I,a as L,G as T,W as $,e as k,A,d as B}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const S=document.getElementById("container"),e=new v,U=e.get(x),t=U.create();t.scene=new F(e);t.renderer=new R(e,S);t.camera=new C(e);e.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const z=e.get(I);z.create(t);t.scene.three.background=null;const E=new L(e),G=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),W=await G.arrayBuffer(),_=new Uint8Array(W),c=E.load(_);t.scene.three.add(c);const m=e.get(T),j=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),M=m.getRelationsMapFromJSON(await j.text());m.setRelationMap(c,M);const N=e.get($),n=N.create(),O=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),b=new File([await O.arrayBuffer()],"example"),u=new k(e,{name:"category",inclusive:!1,rules:[]});n.add(u);const p={type:"category",value:/IfcWallStandardCase/};u.rules.push(p);const d={type:"property",name:/.*/,value:/yeso/},g=new A(e,{name:"property",inclusive:!1,rules:[d]});n.add(g);await n.update(c.uuid,b);const P=n.items,o=e.get(B);o.set(!1);o.set(!0,P);const s=new h;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>s.begin());t.renderer.onAfterUpdate.add(()=>s.end());w.init();const f=r.create(()=>i` - +import"./web-ifc-api-nU1-R_1k.js";import{T as w,z as r,m as i}from"./index-BEvRfOoQ.js";import{S as h}from"./stats.min-GTpOrGrX.js";import{C as v,W as x,S as F,d as I,a as R,G as S,F as C,g as $,l as k,m as B,n as L,H as Q}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const U=document.getElementById("container"),e=new v,z=e.get(x),t=z.create();t.scene=new F(e);t.renderer=new I(e,U);t.camera=new R(e);e.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const A=e.get(S);A.create(t);t.scene.three.background=null;const E=new C(e),G=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),M=await G.arrayBuffer(),P=new Uint8Array(M),c=E.load(P);t.scene.three.add(c);const m=e.get($),T=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),W=m.getRelationsMapFromJSON(await T.text());m.setRelationMap(c,W);const _=e.get(k),n=_.create(),j=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),b=new File([await j.arrayBuffer()],"example"),p=new B(e,{name:"category",inclusive:!1,rules:[]});n.add(p);const u={type:"category",value:/IfcWallStandardCase/};p.rules.push(u);const d={type:"property",name:/.*/,value:/yeso/},g=new L(e,{name:"property",inclusive:!1,rules:[d]});n.add(g);await n.update(c.uuid,b);const H=n.items,o=e.get(Q);o.set(!1);o.set(!0,H);const a=new h;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>a.begin());t.renderer.onAfterUpdate.add(()=>a.end());w.init();const f=r.create(()=>i` + `),y=r.create(()=>i` - `),Q=async()=>{u.clear(),g.clear(),p.value=new RegExp(f.value),d.value=new RegExp(y.value),await n.update(c.uuid,b);const l=n.items;if(console.log(l),Object.keys(l).length===0){alert("No items found!");return}o.set(!1),o.set(!0,l)},a=r.create(()=>i` + `),N=async()=>{p.clear(),g.clear(),u.value=new RegExp(f.value),d.value=new RegExp(y.value),await n.update(c.uuid,b);const l=n.items;if(console.log(l),Object.keys(l).length===0){alert("No items found!");return}o.set(!1),o.set(!0,l)},s=r.create(()=>i` @@ -11,14 +11,14 @@ import"./web-ifc-api-CpQ3aV8c.js";import{T as w,z as r,m as i}from"./index-BEvRf ${y} + @click="${async()=>{await N()}}"> - `);document.body.append(a);const q=r.create(()=>i` + `);document.body.append(s);const O=r.create(()=>i` + @click="${()=>{s.classList.contains("options-menu-visible")?s.classList.remove("options-menu-visible"):s.classList.add("options-menu-visible")}}"> - `);document.body.append(q); + `);document.body.append(O); diff --git a/examples/assets/ifcGeometryTiler.js b/examples/assets/ifcGeometryTiler.js index 05e5b7ce..9fb78460 100644 --- a/examples/assets/ifcGeometryTiler.js +++ b/examples/assets/ifcGeometryTiler.js @@ -1,16 +1,16 @@ -import"./web-ifc-api-CpQ3aV8c.js";import{S as w}from"./stats.min-GTpOrGrX.js";import{T as h,z as b,m as g}from"./index-BEvRfOoQ.js";import{C as y,T as L,s as F,g as B,x as I,L as S,a as T,$ as U}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const k=document.getElementById("container"),a=new y,v=a.get(L),t=v.create();t.scene=new F(a);t.renderer=new B(a,k);t.camera=new I(a);a.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const A=a.get(S);A.create(t);t.scene.three.background=null;const D=new T(a),x=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),z=await x.arrayBuffer(),C=new Uint8Array(z),$=D.load(C);t.scene.three.add($);const i=a.get(U),R={path:"https://unpkg.com/web-ifc@0.0.57/",absolute:!0};i.settings.wasm=R;i.settings.minGeometrySize=20;i.settings.minAssetsSize=1e3;let l=[],f={},u=1;i.onGeometryStreamed.add(e=>{const{buffer:s,data:n}=e,o=`small.ifc-processed-geometries-${u}`;for(const c in n){const p=n[c];p.geometryFile=o,f[c]=p}l.push({name:o,bits:[s]}),u++});let d=[];i.onAssetStreamed.add(e=>{d=[...d,...e]});i.onIfcLoaded.add(e=>{l.push({name:"small.ifc-processed-global",bits:[e]})});function j(e,...s){const n=new File(s,e),o=document.createElement("a"),c=URL.createObjectURL(n);o.href=c,o.download=n.name,o.click(),URL.revokeObjectURL(c)}async function G(e){for(const{name:s,bits:n}of e)j(s,...n),await new Promise(o=>{setTimeout(o,100)})}i.onProgress.add(e=>{e===1&&setTimeout(async()=>{const s={geometries:f,assets:d,globalDataFileId:"small.ifc-processed-global"};l.push({name:"small.ifc-processed.json",bits:[JSON.stringify(s)]}),await G(l),d=[],f={},l=[],u=1})});async function O(){const s=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),n=new Uint8Array(s);await i.streamFromBuffer(n)}const r=new w;r.showPanel(2);document.body.append(r.dom);r.dom.style.left="0px";r.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>r.begin());t.renderer.onAfterUpdate.add(()=>r.end());h.init();const m=b.create(()=>g` +import"./web-ifc-api-nU1-R_1k.js";import{S as w}from"./stats.min-GTpOrGrX.js";import{T as y,z as b,m as g}from"./index-BEvRfOoQ.js";import{C as h,W as F,S,d as L,a as I,G as B,F as U,p as k}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const v=document.getElementById("container"),a=new h,A=a.get(F),t=A.create();t.scene=new S(a);t.renderer=new L(a,v);t.camera=new I(a);a.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const C=a.get(B);C.create(t);t.scene.three.background=null;const D=new U(a),G=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),T=await G.arrayBuffer(),z=new Uint8Array(T),R=D.load(z);t.scene.three.add(R);const r=a.get(k),j={path:"https://unpkg.com/web-ifc@0.0.66/",absolute:!0};r.settings.wasm=j;r.settings.minGeometrySize=20;r.settings.minAssetsSize=1e3;let l=[],f={},p=1;r.onGeometryStreamed.add(e=>{const{buffer:s,data:n}=e,o=`small.ifc-processed-geometries-${p}`;for(const c in n){const u=n[c];u.geometryFile=o,f[c]=u}l.push({name:o,bits:[s]}),p++});let d=[];r.onAssetStreamed.add(e=>{d=[...d,...e]});r.onIfcLoaded.add(e=>{l.push({name:"small.ifc-processed-global",bits:[e]})});function x(e,...s){const n=new File(s,e),o=document.createElement("a"),c=URL.createObjectURL(n);o.href=c,o.download=n.name,o.click(),URL.revokeObjectURL(c)}async function O(e){for(const{name:s,bits:n}of e)x(s,...n),await new Promise(o=>{setTimeout(o,100)})}r.onProgress.add(e=>{e===1&&setTimeout(async()=>{const s={geometries:f,assets:d,globalDataFileId:"small.ifc-processed-global"};l.push({name:"small.ifc-processed.json",bits:[JSON.stringify(s)]}),await O(l),d=[],f={},l=[],p=1})});async function P(){const s=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),n=new Uint8Array(s);await r.streamFromBuffer(n)}const i=new w;i.showPanel(2);document.body.append(i.dom);i.dom.style.left="0px";i.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>i.begin());t.renderer.onAfterUpdate.add(()=>i.end());y.init();const m=b.create(()=>g` + @click="${()=>{P()}}"> - `);document.body.append(m);const P=b.create(()=>g` + `);document.body.append(m);const $=b.create(()=>g` - `);document.body.append(P); + `);document.body.append($); diff --git a/examples/assets/ifcIsolator.js b/examples/assets/ifcIsolator.js index ea2128d0..f273f238 100644 --- a/examples/assets/ifcIsolator.js +++ b/examples/assets/ifcIsolator.js @@ -1,20 +1,20 @@ -import{ae as p}from"./web-ifc-api-CpQ3aV8c.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{T as u,z as m,m as d}from"./index-BEvRfOoQ.js";import{C as f,T as w,s as g,g as I,x as h,L,b as y,k}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const v=document.getElementById("container"),t=new f,x=t.get(w),e=x.create();e.scene=new g(t);e.renderer=new I(t,v);e.camera=new h(t);t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const C=t.get(L);C.create(e);e.scene.three.background=null;const i=t.get(y);await i.setup();i.settings.webIfc.COORDINATE_TO_ORIGIN=!0;async function T(){const c=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),s=new Uint8Array(c),n=await i.load(s);n.name="example",e.scene.three.add(n)}const U=t.get(k),r=new p;r.SetWasmPath("https://unpkg.com/web-ifc@0.0.57/",!0);await r.Init();const O=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),R=await O.arrayBuffer(),o=new b;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end());u.init();const a=m.create(()=>d` +import{ae as p}from"./web-ifc-api-nU1-R_1k.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{T as f,z as m,m as d}from"./index-BEvRfOoQ.js";import{C as u,W as w,S as I,d as g,a as h,G as y,I as L,k}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const C=document.getElementById("container"),t=new u,S=t.get(w),e=S.create();e.scene=new I(t);e.renderer=new g(t,C);e.camera=new h(t);t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const v=t.get(y);v.create(e);e.scene.three.background=null;const i=t.get(L);await i.setup();i.settings.webIfc.COORDINATE_TO_ORIGIN=!0;async function R(){const c=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),a=new Uint8Array(c),n=await i.load(a);n.name="example",e.scene.three.add(n)}const U=t.get(k),r=new p;r.SetWasmPath("https://unpkg.com/web-ifc@0.0.66/",!0);await r.Init();const O=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),x=await O.arrayBuffer(),o=new b;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end());f.init();const s=m.create(()=>d` + @click="${()=>{R()}}"> + @click="${async()=>{const l=await U.splitIfc(r,x,[6518]),c=new File([new Blob([l])],"isolated.ifc"),a=URL.createObjectURL(c),n=document.createElement("a");n.download="isolated.ifc",n.href=a,n.click(),URL.revokeObjectURL(a),n.remove()}}"> - `);document.body.append(a);const A=m.create(()=>d` + `);document.body.append(s);const A=m.create(()=>d` + @click="${()=>{s.classList.contains("options-menu-visible")?s.classList.remove("options-menu-visible"):s.classList.add("options-menu-visible")}}"> `);document.body.append(A); diff --git a/examples/assets/ifcJsonExporter.js b/examples/assets/ifcJsonExporter.js index 3acad929..64b0c75f 100644 --- a/examples/assets/ifcJsonExporter.js +++ b/examples/assets/ifcJsonExporter.js @@ -1,16 +1,16 @@ -import{ae as d}from"./web-ifc-api-CpQ3aV8c.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{T as f,z as c,m as i}from"./index-BEvRfOoQ.js";import{C as u,T as g,s as w,g as h,x as y,L as x,a as L,y as k}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const I=document.getElementById("container"),t=new u,U=t.get(g),e=U.create();e.scene=new w(t);e.renderer=new h(t,I);e.camera=new y(t);t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const v=t.get(x);v.create(e);e.scene.three.background=null;const B=new L(t),O=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),S=await O.arrayBuffer(),T=new Uint8Array(S),A=B.load(T);e.scene.three.add(A);const j=t.get(k),a=new d;a.SetWasmPath("https://unpkg.com/web-ifc@0.0.57/",!0);await a.Init();const z=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),C=await z.arrayBuffer(),E=new Uint8Array(C),F=a.OpenModel(E),n=new b;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());f.init();const s=c.create(()=>i` +import{ae as d}from"./web-ifc-api-nU1-R_1k.js";import{S as f}from"./stats.min-GTpOrGrX.js";import{T as b,z as i,m as c}from"./index-BEvRfOoQ.js";import{C as u,W as g,S as w,d as h,a as y,G as S,F as x,j as I}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const k=document.getElementById("container"),t=new u,L=t.get(g),e=L.create();e.scene=new w(t);e.renderer=new h(t,k);e.camera=new y(t);t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const U=t.get(S);U.create(e);e.scene.three.background=null;const v=new x(t),B=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),F=await B.arrayBuffer(),O=new Uint8Array(F),j=v.load(O);e.scene.three.add(j);const A=t.get(I),a=new d;a.SetWasmPath("https://unpkg.com/web-ifc@0.0.66/",!0);await a.Init();const C=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),E=await C.arrayBuffer(),R=new Uint8Array(E),z=a.OpenModel(R),n=new f;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());b.init();const s=i.create(()=>c` + @click="${async()=>{const l=await A.export(a,z),p=JSON.stringify(l),m=new File([new Blob([p])],"properties.json"),r=URL.createObjectURL(m),o=document.createElement("a");o.download="properties.json",o.href=r,o.click(),URL.revokeObjectURL(r),o.remove()}}"> - `);document.body.append(s);const R=c.create(()=>i` + `);document.body.append(s);const J=i.create(()=>c` - `);document.body.append(R); + `);document.body.append(J); diff --git a/examples/assets/ifcLoader.js b/examples/assets/ifcLoader.js index 6b7b6994..ccf35022 100644 --- a/examples/assets/ifcLoader.js +++ b/examples/assets/ifcLoader.js @@ -1,10 +1,10 @@ -import{bp as b,bq as u,br as f}from"./web-ifc-api-CpQ3aV8c.js";import{T as g,z as m,m as p}from"./index-BEvRfOoQ.js";import{S as w}from"./stats.min-GTpOrGrX.js";import{C as I,T as C,s as L,g as y,x as F,L as h,a as x,b as N}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const E=document.getElementById("container"),o=new I,O=o.get(C),t=O.create();t.scene=new L(o);t.renderer=new y(o,E);t.camera=new F(o);o.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const R=o.get(h);R.create(t);t.scene.three.background=null;const a=o.get(x),c=o.get(N);await c.setup();const T=[b,u,f];for(const e of T)c.settings.excludedCategories.add(e);c.settings.webIfc.COORDINATE_TO_ORIGIN=!0;async function k(){const n=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),r=new Uint8Array(n),l=await c.load(r);l.name="example",t.scene.three.add(l)}a.onFragmentsLoaded.add(e=>{console.log(e)});function d(e){const n=document.createElement("a");n.href=URL.createObjectURL(e),n.download=e.name,document.body.appendChild(n),n.click(),n.remove()}async function v(){if(!a.groups.size)return;const e=Array.from(a.groups.values())[0],n=a.export(e);d(new File([new Blob([n])],"small.frag"));const r=e.getLocalProperties();r&&d(new File([JSON.stringify(r)],"small.json"))}function A(){a.dispose()}const s=new w;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>s.begin());t.renderer.onAfterUpdate.add(()=>s.end());g.init();const i=m.create(()=>p` +import{bp as b,bq as u,br as f}from"./web-ifc-api-nU1-R_1k.js";import{T as g,z as m,m as p}from"./index-BEvRfOoQ.js";import{S as w}from"./stats.min-GTpOrGrX.js";import{C as I,W as C,S as y,d as F,a as L,G as N,F as R,I as h}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const E=document.getElementById("container"),o=new I,O=o.get(C),t=O.create();t.scene=new y(o);t.renderer=new F(o,E);t.camera=new L(o);o.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const x=o.get(N);x.create(t);t.scene.three.background=null;const a=o.get(R),c=o.get(h);await c.setup();const k=[b,u,f];for(const e of k)c.settings.excludedCategories.add(e);c.settings.webIfc.COORDINATE_TO_ORIGIN=!0;async function S(){const n=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),r=new Uint8Array(n),l=await c.load(r);l.name="example",t.scene.three.add(l)}a.onFragmentsLoaded.add(e=>{console.log(e)});function d(e){const n=document.createElement("a");n.href=URL.createObjectURL(e),n.download=e.name,document.body.appendChild(n),n.click(),n.remove()}async function v(){if(!a.groups.size)return;const e=Array.from(a.groups.values())[0],n=a.export(e);d(new File([new Blob([n])],"small.frag"));const r=e.getLocalProperties();r&&d(new File([JSON.stringify(r)],"small.json"))}function A(){a.dispose()}const s=new w;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>s.begin());t.renderer.onAfterUpdate.add(()=>s.end());g.init();const i=m.create(()=>p` + @click="${()=>{S()}}"> - `);document.body.append(i);const B=m.create(()=>p` + `);document.body.append(i);const T=m.create(()=>p` - `);document.body.append(B); + `);document.body.append(T); diff --git a/examples/assets/ifcPropertiesManager.js b/examples/assets/ifcPropertiesManager.js index fcf85e95..326832fd 100644 --- a/examples/assets/ifcPropertiesManager.js +++ b/examples/assets/ifcPropertiesManager.js @@ -1 +1 @@ -import{bo as t,aE as d,as as m}from"./web-ifc-api-CpQ3aV8c.js";import{C as p,b as u,P as I,o as y,G as P}from"./index-B03kGVBW.js";const s=new p,c=s.get(u);await c.setup();const g=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),b=await g.arrayBuffer(),l=new Uint8Array(b),e=await c.load(l),a=s.get(I),{handle:E}=await a.getOwnerHistory(e),r=new t.IfcPropertySet(new t.IfcGloballyUniqueId(y.create()),E,new t.IfcLabel("Custom Property Set"),null,[]);await a.setData(e,r);const f=new t.IfcPropertySingleValue(new t.IfcIdentifier("Custom Property"),null,new t.IfcText("Custom Property Text Value"),null);await a.setData(e,f);r.HasProperties.push(new d(f.expressID));const h=s.get(P);h.addEntitiesRelation(e,r.expressID,{type:m,inv:"DefinesOcurrence"},186);const n=await e.getProperties(186);n&&(n.Name?n.Name.value="New Wall Name":n.Name=new t.IfcIdentifier("New Wall Name"),await a.setData(e,n));await e.setProperties(243,null);a.registerChange(e,243);const L=document.getElementById("download-btn");L.addEventListener("click",async()=>{const w=await a.saveToIfc(e,l),i=new File([w],"small-modified.ifc"),o=document.createElement("a");o.href=URL.createObjectURL(i),o.download=i.name,o.click(),URL.revokeObjectURL(o.href)}); +import{bo as t,aE as d,as as m}from"./web-ifc-api-nU1-R_1k.js";import{C as p,I,i as u,U as y,g}from"./index-C8rcJyf0.js";const s=new p,c=s.get(I);await c.setup();const P=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),E=await P.arrayBuffer(),l=new Uint8Array(E),e=await c.load(l),a=s.get(u),{handle:b}=await a.getOwnerHistory(e),r=new t.IfcPropertySet(new t.IfcGloballyUniqueId(y.create()),b,new t.IfcLabel("Custom Property Set"),null,[]);await a.setData(e,r);const f=new t.IfcPropertySingleValue(new t.IfcIdentifier("Custom Property"),null,new t.IfcText("Custom Property Text Value"),null);await a.setData(e,f);r.HasProperties.push(new d(f.expressID));const h=s.get(g);h.addEntitiesRelation(e,r.expressID,{type:m,inv:"DefinesOcurrence"},186);const n=await e.getProperties(186);n&&(n.Name?n.Name.value="New Wall Name":n.Name=new t.IfcIdentifier("New Wall Name"),await a.setData(e,n));await e.setProperties(243,null);a.registerChange(e,243);const L=document.getElementById("download-btn");L.addEventListener("click",async()=>{const w=await a.saveToIfc(e,l),i=new File([w],"small-modified.ifc"),o=document.createElement("a");o.href=URL.createObjectURL(i),o.download=i.name,o.click(),URL.revokeObjectURL(o.href)}); diff --git a/examples/assets/ifcPropertiesTiler.js b/examples/assets/ifcPropertiesTiler.js index 6f48c44c..a25b3a70 100644 --- a/examples/assets/ifcPropertiesTiler.js +++ b/examples/assets/ifcPropertiesTiler.js @@ -1,4 +1,4 @@ -import"./web-ifc-api-CpQ3aV8c.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{T as g,z as f,m as u}from"./index-BEvRfOoQ.js";import{C as w,T as y,s as h,g as B,x as L,L as F,a as x,f as S,G as T}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const U=document.getElementById("container"),n=new w,k=n.get(y),s=k.create();s.scene=new h(n);s.renderer=new B(n,U);s.camera=new L(n);n.init();s.camera.controls.setLookAt(12,6,8,0,0,-10);s.scene.setup();const v=n.get(F);v.create(s);s.scene.three.background=null;const I=new x(n),R=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),z=await R.arrayBuffer(),A=new Uint8Array(z),P=I.load(A);s.scene.three.add(P);function j(e,o){const t=new File([o],e),a=document.createElement("a"),p=URL.createObjectURL(t);a.href=p,a.download=t.name,a.click(),URL.revokeObjectURL(p)}async function C(e){for(const{name:o,bits:t}of e)j(o,t),await new Promise(a=>{setTimeout(a,100)})}const c=n.get(S);c.settings.wasm={path:"https://unpkg.com/web-ifc@0.0.57/",absolute:!0};const r={types:{},ids:{},indexesFile:"small.ifc-processed-properties-indexes"};let l=0;const d=[];c.onPropertiesStreamed.add(async e=>{r.types[e.type]||(r.types[e.type]=[]),r.types[e.type].push(l);for(const a in e.data)r.ids[a]=l;const o=`small.ifc-processed-properties-${l}`,t=new Blob([JSON.stringify(e.data)]);d.push({bits:t,name:o}),l++});c.onProgress.add(async e=>{console.log(e)});c.onIndicesStreamed.add(async e=>{d.push({name:"small.ifc-processed-properties.json",bits:new Blob([JSON.stringify(r)])});const t=n.get(T).serializeRelations(e);d.push({name:"small.ifc-processed-properties-indexes",bits:new Blob([t])}),await C(d)});async function O(){const o=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),t=new Uint8Array(o);await c.streamFromBuffer(t)}const i=new b;i.showPanel(2);document.body.append(i.dom);i.dom.style.left="0px";i.dom.style.zIndex="unset";s.renderer.onBeforeUpdate.add(()=>i.begin());s.renderer.onAfterUpdate.add(()=>i.end());g.init();const m=f.create(()=>u` +import"./web-ifc-api-nU1-R_1k.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{T as g,z as f,m as u}from"./index-BEvRfOoQ.js";import{C as w,W as y,S as h,d as S,a as B,G as F,F as I,o as L,g as R}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const U=document.getElementById("container"),s=new w,k=s.get(y),n=k.create();n.scene=new h(s);n.renderer=new S(s,U);n.camera=new B(s);s.init();n.camera.controls.setLookAt(12,6,8,0,0,-10);n.scene.setup();const x=s.get(F);x.create(n);n.scene.three.background=null;const v=new I(s),P=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),T=await P.arrayBuffer(),z=new Uint8Array(T),A=v.load(z);n.scene.three.add(A);function C(e,o){const t=new File([o],e),a=document.createElement("a"),p=URL.createObjectURL(t);a.href=p,a.download=t.name,a.click(),URL.revokeObjectURL(p)}async function j(e){for(const{name:o,bits:t}of e)C(o,t),await new Promise(a=>{setTimeout(a,100)})}const c=s.get(L);c.settings.wasm={path:"https://unpkg.com/web-ifc@0.0.66/",absolute:!0};const r={types:{},ids:{},indexesFile:"small.ifc-processed-properties-indexes"};let l=0;const d=[];c.onPropertiesStreamed.add(async e=>{r.types[e.type]||(r.types[e.type]=[]),r.types[e.type].push(l);for(const a in e.data)r.ids[a]=l;const o=`small.ifc-processed-properties-${l}`,t=new Blob([JSON.stringify(e.data)]);d.push({bits:t,name:o}),l++});c.onProgress.add(async e=>{console.log(e)});c.onIndicesStreamed.add(async e=>{d.push({name:"small.ifc-processed-properties.json",bits:new Blob([JSON.stringify(r)])});const t=s.get(R).serializeRelations(e);d.push({name:"small.ifc-processed-properties-indexes",bits:new Blob([t])}),await j(d)});async function O(){const o=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),t=new Uint8Array(o);await c.streamFromBuffer(t)}const i=new b;i.showPanel(2);document.body.append(i.dom);i.dom.style.left="0px";i.dom.style.zIndex="unset";n.renderer.onBeforeUpdate.add(()=>i.begin());n.renderer.onAfterUpdate.add(()=>i.end());g.init();const m=f.create(()=>u` diff --git a/examples/assets/ifcRelationsIndexer.js b/examples/assets/ifcRelationsIndexer.js index e35a64f5..99e16423 100644 --- a/examples/assets/ifcRelationsIndexer.js +++ b/examples/assets/ifcRelationsIndexer.js @@ -1,4 +1,4 @@ -import{aF as D,bm as r,aE as L,bn as P,as as I}from"./web-ifc-api-CpQ3aV8c.js";import{S as x}from"./stats.min-GTpOrGrX.js";import{T as U,z as w,m as g}from"./index-BEvRfOoQ.js";import{C,W as O,S as F,I as v,d as A,e as k,f as y,U as B}from"./index-B_pEH4rh.js";import{S as M,a as N,G as j}from"./index-BqrBcJfH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const T=document.getElementById("container"),s=new C,W=s.get(O),a=W.create();a.scene=new M(s);a.renderer=new N(s,T);a.camera=new F(s);s.init();a.camera.controls.setLookAt(12,6,8,0,0,-10);a.scene.setup();const $=s.get(j);$.create(a);a.scene.three.background=null;const R=s.get(v);await R.setup();const z=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),G=await z.arrayBuffer(),S=new Uint8Array(G),e=await R.load(S);a.scene.three.add(e);const t=s.get(A);await t.process(e);const u=t.getEntityRelations(e,6518,"IsDefinedBy");if(u)for(const n of u){const i=await e.getProperties(n);console.log(i),await k.getPsetProps(e,n,async l=>{const o=await e.getProperties(l);console.log(o)})}const H=(n,i)=>{const l=new File([n],i),o=document.createElement("a");o.href=URL.createObjectURL(l),o.download=l.name,o.click(),URL.revokeObjectURL(o.href)},J=t.serializeModelRelations(e);console.log(J);const V=t.serializeAllRelations();delete t.relationMaps[e.uuid];const Y=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),_=t.getRelationsMapFromJSON(await Y.text());t.setRelationMap(e,_);const p=t.getEntityRelations(e,6518,"ContainedInStructure");if(p&&p[0]){const n=await e.getProperties(p[0]);console.log(n)}const q=t.getEntitiesWithRelation(e,"ContainedInStructure",138);console.log(`IfcBuildingStorey 138 has the following IfcElement: ${[...q]}`);const X=t.getEntitiesWithRelation(e,"ContainsElements",186);console.log(`IfcElement 186 is located inside IfcBuildingStorey ${[...X][0]}`);const K=t.getEntitiesWithRelation(e,"IsDefinedBy",303);console.log(`${[...K]} are defined by IfcPropertySet 303`);const m=s.get(y),b=await m.getEntityRef(e,D),E=new r.IfcPropertySingleValue(new r.IfcIdentifier("Property Name"),null,new r.IfcLabel("Property Value"),null);await m.setData(e,E);const f=new r.IfcPropertySet(new r.IfcGloballyUniqueId(B.create()),b?b[0]:null,new r.IfcLabel("My New Pset!"),null,[new L(E.expressID)]);await m.setData(e,f);const h=await e.getAllPropertiesOfType(P),Q=Object.values(h).map(n=>n.expressID);t.addEntitiesRelation(e,f.expressID,{type:I,inv:"DefinesOcurrence"},...Q);for(const n in h)t.addEntitiesRelation(e,Number(n),{type:I,inv:"IsDefinedBy"},f.expressID);const c=new x;c.showPanel(2);document.body.append(c.dom);c.dom.style.left="0px";c.dom.style.zIndex="unset";a.renderer.onBeforeUpdate.add(()=>c.begin());a.renderer.onAfterUpdate.add(()=>c.end());U.init();const d=w.create(()=>g` +import{aF as D,bm as r,aE as L,bn as P,as as I}from"./web-ifc-api-nU1-R_1k.js";import{S as x}from"./stats.min-GTpOrGrX.js";import{T as U,z as w,m as g}from"./index-BEvRfOoQ.js";import{C,W as O,S as F,I as v,d as A,e as k,f as y,U as B}from"./index-BboVOtPt.js";import{S as M,a as N,G as j}from"./index-BvJCnCKo.js";import"./_commonjsHelpers-Cpj98o6Y.js";const T=document.getElementById("container"),s=new C,W=s.get(O),a=W.create();a.scene=new M(s);a.renderer=new N(s,T);a.camera=new F(s);s.init();a.camera.controls.setLookAt(12,6,8,0,0,-10);a.scene.setup();const $=s.get(j);$.create(a);a.scene.three.background=null;const R=s.get(v);await R.setup();const z=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),G=await z.arrayBuffer(),S=new Uint8Array(G),e=await R.load(S);a.scene.three.add(e);const t=s.get(A);await t.process(e);const u=t.getEntityRelations(e,6518,"IsDefinedBy");if(u)for(const n of u){const i=await e.getProperties(n);console.log(i),await k.getPsetProps(e,n,async l=>{const o=await e.getProperties(l);console.log(o)})}const H=(n,i)=>{const l=new File([n],i),o=document.createElement("a");o.href=URL.createObjectURL(l),o.download=l.name,o.click(),URL.revokeObjectURL(o.href)},J=t.serializeModelRelations(e);console.log(J);const V=t.serializeAllRelations();delete t.relationMaps[e.uuid];const Y=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),_=t.getRelationsMapFromJSON(await Y.text());t.setRelationMap(e,_);const p=t.getEntityRelations(e,6518,"ContainedInStructure");if(p&&p[0]){const n=await e.getProperties(p[0]);console.log(n)}const q=t.getEntitiesWithRelation(e,"ContainedInStructure",138);console.log(`IfcBuildingStorey 138 has the following IfcElement: ${[...q]}`);const X=t.getEntitiesWithRelation(e,"ContainsElements",186);console.log(`IfcElement 186 is located inside IfcBuildingStorey ${[...X][0]}`);const K=t.getEntitiesWithRelation(e,"IsDefinedBy",303);console.log(`${[...K]} are defined by IfcPropertySet 303`);const m=s.get(y),b=await m.getEntityRef(e,D),E=new r.IfcPropertySingleValue(new r.IfcIdentifier("Property Name"),null,new r.IfcLabel("Property Value"),null);await m.setData(e,E);const f=new r.IfcPropertySet(new r.IfcGloballyUniqueId(B.create()),b?b[0]:null,new r.IfcLabel("My New Pset!"),null,[new L(E.expressID)]);await m.setData(e,f);const h=await e.getAllPropertiesOfType(P),Q=Object.values(h).map(n=>n.expressID);t.addEntitiesRelation(e,f.expressID,{type:I,inv:"DefinesOcurrence"},...Q);for(const n in h)t.addEntitiesRelation(e,Number(n),{type:I,inv:"IsDefinedBy"},f.expressID);const c=new x;c.showPanel(2);document.body.append(c.dom);c.dom.style.left="0px";c.dom.style.zIndex="unset";a.renderer.onBeforeUpdate.add(()=>c.begin());a.renderer.onAfterUpdate.add(()=>c.end());U.init();const d=w.create(()=>g` diff --git a/examples/assets/ifcStreamer.js b/examples/assets/ifcStreamer.js index 2160ace2..7f56ef1d 100644 --- a/examples/assets/ifcStreamer.js +++ b/examples/assets/ifcStreamer.js @@ -1 +1 @@ -import"./web-ifc-api-CpQ3aV8c.js";import{S as d}from"./stats.min-GTpOrGrX.js";import{C as l,T as m,s as p,g as u,x as g,L as h}from"./index-B03kGVBW.js";import{h as w}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";const f=document.getElementById("container"),o=new l,y=o.get(m),e=y.create();e.scene=new p(o);e.renderer=new u(o,f);e.camera=new g(o);o.init();e.scene.setup();e.camera.controls.setLookAt(12,6,8,0,0,-10);const b=o.get(h);b.create(e);e.scene.three.background=null;const t=o.get(w);t.world=e;t.url="https://thatopen.github.io/engine_components/resources/streaming/";async function x(a,r){const c=await(await fetch(a)).json();let n;n=await(await fetch(r)).json();const i=await t.load(c,!0,n);console.log(i)}await x("https://thatopen.github.io/engine_components/resources/streaming/small.ifc-processed.json","https://thatopen.github.io/engine_components/resources/streaming/small.ifc-processed-properties.json");e.camera.controls.addEventListener("sleep",()=>{t.culler.needsUpdate=!0});t.useCache=!0;t.culler.threshold=10;t.culler.maxHiddenTime=1e3;t.culler.maxLostTime=3e3;const s=new d;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end()); +import"./web-ifc-api-nU1-R_1k.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,W as m,S as p,d as u,a as w,G as g}from"./index-C8rcJyf0.js";import{d as h}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";const f=document.getElementById("container"),o=new l,y=o.get(m),e=y.create();e.scene=new p(o);e.renderer=new u(o,f);e.camera=new w(o);o.init();e.scene.setup();e.camera.controls.setLookAt(12,6,8,0,0,-10);const S=o.get(g);S.create(e);e.scene.three.background=null;const t=o.get(h);t.world=e;t.url="https://thatopen.github.io/engine_components/resources/streaming/";async function b(r,s){const c=await(await fetch(r)).json();let a;a=await(await fetch(s)).json();const d=await t.load(c,!0,a);console.log(d)}await b("https://thatopen.github.io/engine_components/resources/streaming/small.ifc-processed.json","https://thatopen.github.io/engine_components/resources/streaming/small.ifc-processed-properties.json");e.camera.controls.addEventListener("sleep",()=>{t.culler.needsUpdate=!0});t.useCache=!0;t.culler.threshold=10;t.culler.maxHiddenTime=1e3;t.culler.maxLostTime=3e3;const n=new i;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end()); diff --git a/examples/assets/index-B03kGVBW.js b/examples/assets/index-B03kGVBW.js deleted file mode 100644 index 81a6ba6f..00000000 --- a/examples/assets/index-B03kGVBW.js +++ /dev/null @@ -1,310 +0,0 @@ -import{V as U,p as He,t as ds,u as it,T as rs,S as wi,v as Pe,w as _a,q as Bs,o as Ys,x as wa,y as zs,z as ar,n as Ee,W as Ai,H as Pi,J as Vs,b as cs,s as Vt,K as Vi,C as Ue,N as vn,Q as Gt,P as Mn,U as Oi,X as Pa,Y as st,Z as va,_ as Ma,$ as vi,a0 as ao,a as se,O as yi,L as lo,a1 as xe,B as Me,a2 as lr,a3 as Zs,a4 as Ft,a5 as Cs,a6 as Da,a7 as ba,a8 as Bt,I as Dn,a9 as bn,aa as Un,ab as xn,ac as zt,ad as Ua,ae as hs,af as cr,f as xa,ag as Mi,ah as Di,ai as Ba,aj as Ya,ak as Va,al as Ga,am as za,an as co,ao as ho,ap as Bn,aq as Yn,ar as Vn,as as ks,at as Gn,au as zn,av as kn,aw as Hn,ax as Wn,ay as Xn,az as Zn,aA as jn,aB as $n,aC as Us,aD as ht,d as as,e as mi,aE as Nt,aF as ka,aG as Ha,aH as Wa,aI as Xa,aJ as Za,aK as ja,aL as $a,aM as qa,aN as Qa,aO as Ni,aP as Ka,aQ as Ja,g as It,aR as Ht,aS as el,aT as tl,aU as hr,aV as ur,D as uo,A as sl,b8 as dr,ba as il,bc as nl,bs as rl,E as ol}from"./web-ifc-api-CpQ3aV8c.js";var al=Object.defineProperty,ll=(l,e,t)=>e in l?al(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t,p=(l,e,t)=>(ll(l,typeof e!="symbol"?e+"":e,t),t);const Io=0,cl=1,hl=2,Ir=2,Gi=1.25,Er=1,Ri=6*4+4+4,bi=65535,ul=Math.pow(2,-24),zi=Symbol("SKIP_GENERATION");function dl(l){return l.index?l.index.count:l.attributes.position.count}function Is(l){return dl(l)/3}function Il(l,e=ArrayBuffer){return l>65535?new Uint32Array(new e(4*l)):new Uint16Array(new e(2*l))}function El(l,e){if(!l.index){const t=l.attributes.position.count,s=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i=Il(t,s);l.setIndex(new Ys(i,1));for(let n=0;no-a);for(let o=0;on.offset-r.offset),s=t[t.length-1];s.count=Math.min(e-s.offset,s.count);let i=0;return t.forEach(({count:n})=>i+=n),e!==i}function Oe(l,e,t){return t.min.x=e[l],t.min.y=e[l+1],t.min.z=e[l+2],t.max.x=e[l+3],t.max.y=e[l+4],t.max.z=e[l+5],t}function pl(l){l[0]=l[1]=l[2]=1/0,l[3]=l[4]=l[5]=-1/0}function fr(l){let e=-1,t=-1/0;for(let s=0;s<3;s++){const i=l[s+3]-l[s];i>t&&(t=i,e=s)}return e}function pr(l,e){e.set(l)}function Cr(l,e,t){let s,i;for(let n=0;n<3;n++){const r=n+3;s=l[n],i=e[n],t[n]=si?s:i}}function js(l,e,t){for(let s=0;s<3;s++){const i=e[l+2*s],n=e[l+2*s+1],r=i-n,o=i+n;rt[s+3]&&(t[s+3]=o)}}function Ts(l){const e=l[3]-l[0],t=l[4]-l[1],s=l[5]-l[2];return 2*(e*t+t*s+s*e)}function ki(l,e,t,s,i=null){let n=1/0,r=1/0,o=1/0,a=-1/0,c=-1/0,h=-1/0,d=1/0,I=1/0,u=1/0,f=-1/0,E=-1/0,T=-1/0;const C=i!==null;for(let R=e*6,A=(e+t)*6;Ra&&(a=y),C&&mf&&(f=m);const P=l[R+2],_=l[R+3],M=P-_,B=P+_;Mc&&(c=B),C&&PE&&(E=P);const O=l[R+4],v=l[R+5],F=O-v,b=O+v;Fh&&(h=b),C&&OT&&(T=O)}s[0]=n,s[1]=r,s[2]=o,s[3]=a,s[4]=c,s[5]=h,C&&(i[0]=d,i[1]=I,i[2]=u,i[3]=f,i[4]=E,i[5]=T)}function Cl(l,e,t,s){let i=1/0,n=1/0,r=1/0,o=-1/0,a=-1/0,c=-1/0;for(let h=e*6,d=(e+t)*6;ho&&(o=I);const u=l[h+2];ua&&(a=u);const f=l[h+4];fc&&(c=f)}s[0]=i,s[1]=n,s[2]=r,s[3]=o,s[4]=a,s[5]=c}function Tl(l,e){pl(e);const t=l.attributes.position,s=l.index?l.index.array:null,i=Is(l),n=new Float32Array(i*6),r=t.normalized,o=t.array,a=t.offset||0;let c=3;t.isInterleavedBufferAttribute&&(c=t.data.stride);const h=["getX","getY","getZ"];for(let d=0;dN&&(N=A),m>N&&(N=m);const y=(N-S)/2,P=C*2;n[u+P+0]=S+y,n[u+P+1]=y+(Math.abs(S)+y)*ul,Se[C+3]&&(e[C+3]=N)}}return n}const Et=32,ml=(l,e)=>l.candidate-e.candidate,St=new Array(Et).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),$s=new Float32Array(6);function Rl(l,e,t,s,i,n){let r=-1,o=0;if(n===Io)r=fr(e),r!==-1&&(o=(e[r]+e[r+3])/2);else if(n===cl)r=fr(l),r!==-1&&(o=gl(t,s,i,r));else if(n===hl){const a=Ts(l);let c=Gi*i;const h=s*6,d=(s+i)*6;for(let I=0;I<3;I++){const u=e[I],f=(e[I+3]-u)/Et;if(i=S.candidate?js(R,t,S.rightCacheBounds):(js(R,t,S.leftCacheBounds),S.count++)}}for(let R=0;R=Et&&(R=Et-1);const A=St[R];A.count++,js(C,t,A.bounds)}const E=St[Et-1];pr(E.bounds,E.rightCacheBounds);for(let C=Et-2;C>=0;C--){const R=St[C],A=St[C+1];Cr(R.bounds,A.rightCacheBounds,R.rightCacheBounds)}let T=0;for(let C=0;C=a;)o--;if(r=a;)o--;if(r2**16,i=s?4:2,n=e?new SharedArrayBuffer(t*i):new ArrayBuffer(t*i),r=s?new Uint32Array(n):new Uint16Array(n);for(let o=0,a=r.length;o=i&&(d=!0,n&&(console.warn(`MeshBVH: Max depth of ${i} reached when generating BVH. Consider increasing maxDepth.`),console.warn(t))),N<=r||P>=i)return R(S+N),m.offset=S,m.count=N,m;const _=Rl(m.boundingData,y,f,S,N,o);if(_.axis===-1)return R(S+N),m.offset=S,m.count=N,m;const M=E(h,s,f,S,N,_);if(M===S||M===S+N)R(S+N),m.offset=S,m.count=N;else{m.splitAxis=_.axis;const B=new qs,O=S,v=M-S;m.left=B,B.boundingData=new Float32Array(6),ki(f,O,v,B.boundingData,u),A(B,O,v,u,P+1);const F=new qs,b=M,j=N-v;m.right=F,F.boundingData=new Float32Array(6),ki(f,b,j,F.boundingData,u),A(F,b,j,u,P+1)}return m}}function yl(l,e){const t=l.geometry;e.indirect&&(l._indirectBuffer=Al(t,e.useSharedArrayBuffer),fl(t)&&!e.verbose&&console.warn('MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),l._indirectBuffer||El(t,e);const s=Ol(l,e);let i,n,r;const o=[],a=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let d=0;dMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return n[u+6]=m/4,m=h(m,R),n[u+7]=A,m}}}class Rt{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let s=1/0,i=-1/0;for(let n=0,r=e.length;ni?o:i}this.min=s,this.max=i}setFromPoints(e,t){let s=1/0,i=-1/0;for(let n=0,r=t.length;ni?a:i}this.min=s,this.max=i}isSeparated(e){return this.min>e.max||e.min>this.max}}Rt.prototype.setFromBox=function(){const l=new U;return function(e,t){const s=t.min,i=t.max;let n=1/0,r=-1/0;for(let o=0;o<=1;o++)for(let a=0;a<=1;a++)for(let c=0;c<=1;c++){l.x=s.x*o+i.x*(1-o),l.y=s.y*a+i.y*(1-a),l.z=s.z*c+i.z*(1-c);const h=e.dot(l);n=Math.min(h,n),r=Math.max(h,r)}this.min=n,this.max=r}}();const Nl=function(){const l=new U,e=new U,t=new U;return function(s,i,n){const r=s.start,o=l,a=i.start,c=e;t.subVectors(r,a),l.subVectors(s.end,s.start),e.subVectors(i.end,i.start);const h=t.dot(c),d=c.dot(o),I=c.dot(c),u=t.dot(o),f=o.dot(o)*I-d*d;let E,T;f!==0?E=(h*d-u*I)/f:E=0,T=(h+E*d)/I,n.x=E,n.y=T}}(),qn=function(){const l=new He,e=new U,t=new U;return function(s,i,n,r){Nl(s,i,l);let o=l.x,a=l.y;if(o>=0&&o<=1&&a>=0&&a<=1){s.at(o,n),i.at(a,r);return}else if(o>=0&&o<=1){a<0?i.at(0,r):i.at(1,r),s.closestPointToPoint(r,!0,n);return}else if(a>=0&&a<=1){o<0?s.at(0,n):s.at(1,n),i.closestPointToPoint(n,!0,r);return}else{let c;o<0?c=s.start:c=s.end;let h;a<0?h=i.start:h=i.end;const d=e,I=t;if(s.closestPointToPoint(h,!0,e),i.closestPointToPoint(c,!0,t),d.distanceToSquared(h)<=I.distanceToSquared(c)){n.copy(d),r.copy(h);return}else{n.copy(c),r.copy(I);return}}}}(),Ll=function(){const l=new U,e=new U,t=new ds,s=new it;return function(i,n){const{radius:r,center:o}=i,{a,b:c,c:h}=n;if(s.start=a,s.end=c,s.closestPointToPoint(o,!0,l).distanceTo(o)<=r||(s.start=a,s.end=h,s.closestPointToPoint(o,!0,l).distanceTo(o)<=r)||(s.start=c,s.end=h,s.closestPointToPoint(o,!0,l).distanceTo(o)<=r))return!0;const d=n.getPlane(t);if(Math.abs(d.distanceToPoint(o))<=r){const I=d.projectPoint(o,e);if(n.containsPoint(I))return!0}return!1}}(),_l=1e-15;function Hi(l){return Math.abs(l)<_l}class nt extends rs{constructor(...e){super(...e),this.isExtendedTriangle=!0,this.satAxes=new Array(4).fill().map(()=>new U),this.satBounds=new Array(4).fill().map(()=>new Rt),this.points=[this.a,this.b,this.c],this.sphere=new wi,this.plane=new ds,this.needsUpdate=!0}intersectsSphere(e){return Ll(e,this)}update(){const e=this.a,t=this.b,s=this.c,i=this.points,n=this.satAxes,r=this.satBounds,o=n[0],a=r[0];this.getNormal(o),a.setFromPoints(o,i);const c=n[1],h=r[1];c.subVectors(e,t),h.setFromPoints(c,i);const d=n[2],I=r[2];d.subVectors(t,s),I.setFromPoints(d,i);const u=n[3],f=r[3];u.subVectors(s,e),f.setFromPoints(u,i),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,e),this.needsUpdate=!1}}nt.prototype.closestPointToSegment=function(){const l=new U,e=new U,t=new it;return function(s,i=null,n=null){const{start:r,end:o}=s,a=this.points;let c,h=1/0;for(let d=0;d<3;d++){const I=(d+1)%3;t.start.copy(a[d]),t.end.copy(a[I]),qn(t,s,l,e),c=l.distanceToSquared(e),c=2){(m===1?C.start:C.end).copy(u),A=2;break}if(A++,A===2&&m===-1)break}}return A}return function(E,T=null,C=!1){this.needsUpdate&&this.update(),E.isExtendedTriangle?E.needsUpdate&&E.update():(l.copy(E),l.update(),E=l);const R=this.plane,A=E.plane;if(Math.abs(R.normal.dot(A.normal))>1-1e-10){const m=this.satBounds,S=this.satAxes;t[0]=E.a,t[1]=E.b,t[2]=E.c;for(let P=0;P<4;P++){const _=m[P],M=S[P];if(s.setFromPoints(M,t),_.isSeparated(s))return!1}const N=E.satBounds,y=E.satAxes;e[0]=this.a,e[1]=this.b,e[2]=this.c;for(let P=0;P<4;P++){const _=N[P],M=y[P];if(s.setFromPoints(M,e),_.isSeparated(s))return!1}for(let P=0;P<4;P++){const _=S[P];for(let M=0;M<4;M++){const B=y[M];if(n.crossVectors(_,B),s.setFromPoints(n,e),i.setFromPoints(n,t),s.isSeparated(i))return!1}}return T&&(C||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),T.start.set(0,0,0),T.end.set(0,0,0)),!0}else{const m=f(this,A,d);if(m===1&&E.containsPoint(d.end))return T&&(T.start.copy(d.end),T.end.copy(d.end)),!0;if(m!==2)return!1;const S=f(E,R,I);if(S===1&&this.containsPoint(I.end))return T&&(T.start.copy(I.end),T.end.copy(I.end)),!0;if(S!==2)return!1;if(d.delta(o),I.delta(a),o.dot(a)<0){let O=I.start;I.start=I.end,I.end=O}const N=d.start.dot(o),y=d.end.dot(o),P=I.start.dot(o),_=I.end.dot(o),M=y0?T.start.copy(d.start):T.start.copy(I.start),c.subVectors(d.end,I.end),c.dot(o)<0?T.end.copy(d.end):T.end.copy(I.end)),!0)}}}();nt.prototype.distanceToPoint=function(){const l=new U;return function(e){return this.closestPointToPoint(e,l),e.distanceTo(l)}}();nt.prototype.distanceToTriangle=function(){const l=new U,e=new U,t=["a","b","c"],s=new it,i=new it;return function(n,r=null,o=null){const a=r||o?s:null;if(this.intersectsTriangle(n,a))return(r||o)&&(r&&a.getCenter(r),o&&a.getCenter(o)),0;let c=1/0;for(let h=0;h<3;h++){let d;const I=t[h],u=n[I];this.closestPointToPoint(u,l),d=u.distanceToSquared(l),dnew U),this.satAxes=new Array(3).fill().map(()=>new U),this.satBounds=new Array(3).fill().map(()=>new Rt),this.alignedSatBounds=new Array(3).fill().map(()=>new Rt),this.needsUpdate=!1,e&&this.min.copy(e),t&&this.max.copy(t),s&&this.matrix.copy(s)}set(e,t,s){this.min.copy(e),this.max.copy(t),this.matrix.copy(s),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}Ve.prototype.update=function(){return function(){const l=this.matrix,e=this.min,t=this.max,s=this.points;for(let a=0;a<=1;a++)for(let c=0;c<=1;c++)for(let h=0;h<=1;h++){const d=1*a|2*c|4*h,I=s[d];I.x=a?t.x:e.x,I.y=c?t.y:e.y,I.z=h?t.z:e.z,I.applyMatrix4(l)}const i=this.satBounds,n=this.satAxes,r=s[0];for(let a=0;a<3;a++){const c=n[a],h=i[a],d=1<new it),t=new Array(12).fill().map(()=>new it),s=new U,i=new U;return function(n,r=0,o=null,a=null){if(this.needsUpdate&&this.update(),this.intersectsBox(n))return(o||a)&&(n.getCenter(i),this.closestPointToPoint(i,s),n.closestPointToPoint(s,i),o&&o.copy(s),a&&a.copy(i)),0;const c=r*r,h=n.min,d=n.max,I=this.points;let u=1/0;for(let E=0;E<8;E++){const T=I[E];i.copy(T).clamp(h,d);const C=T.distanceToSquared(i);if(Cnew nt)}}const je=new wl;function ze(l,e){return e[l+15]===65535}function ke(l,e){return e[l+6]}function $e(l,e){return e[l+14]}function qe(l){return l+8}function Qe(l,e){return e[l+6]}function po(l,e){return e[l+7]}class Pl{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const e=[];let t=null;this.setBuffer=s=>{t&&e.push(t),t=s,this.float32Array=new Float32Array(s),this.uint16Array=new Uint16Array(s),this.uint32Array=new Uint32Array(s)},this.clearBuffer=()=>{t=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,e.length!==0&&this.setBuffer(e.pop())}}}const ge=new Pl;let _t,os;const Wt=[],Qs=new Qn(()=>new Pe);function vl(l,e,t,s,i,n){_t=Qs.getPrimitive(),os=Qs.getPrimitive(),Wt.push(_t,os),ge.setBuffer(l._roots[e]);const r=cn(0,l.geometry,t,s,i,n);ge.clearBuffer(),Qs.releasePrimitive(_t),Qs.releasePrimitive(os),Wt.pop(),Wt.pop();const o=Wt.length;return o>0&&(os=Wt[o-1],_t=Wt[o-2]),r}function cn(l,e,t,s,i=null,n=0,r=0){const{float32Array:o,uint16Array:a,uint32Array:c}=ge;let h=l*2;if(ze(h,a)){const d=ke(l,c),I=$e(h,a);return Oe(l,o,_t),s(d,I,!1,r,n+l,_t)}else{let d=function(B){const{uint16Array:O,uint32Array:v}=ge;let F=B*2;for(;!ze(F,O);)B=qe(B),F=B*2;return ke(B,v)},I=function(B){const{uint16Array:O,uint32Array:v}=ge;let F=B*2;for(;!ze(F,O);)B=Qe(B,v),F=B*2;return ke(B,v)+$e(F,O)};const u=qe(l),f=Qe(l,c);let E=u,T=f,C,R,A,m;if(i&&(A=_t,m=os,Oe(E,o,A),Oe(T,o,m),C=i(A),R=i(m),R(ms.copy(e).clamp(h.min,h.max),ms.distanceToSquared(e)),intersectsBounds:(h,d,I)=>I{h.closestPointToPoint(e,ms);const I=e.distanceToSquared(ms);return I0&&c.normal.multiplyScalar(-1));const h={a:n,b:r,c:o,normal:new U,materialIndex:0};rs.getNormal(Xt,Zt,jt,h.normal),c.face=h,c.faceIndex=n}return c}function Ui(l,e,t,s,i){const n=s*3;let r=n+0,o=n+1,a=n+2;const c=l.index;l.index&&(r=c.getX(r),o=c.getX(o),a=c.getX(a));const{position:h,normal:d,uv:I,uv1:u}=l.attributes,f=bl(t,h,d,I,u,r,o,a,e);return f?(f.faceIndex=s,i&&i.push(f),f):null}function _e(l,e,t,s){const i=l.a,n=l.b,r=l.c;let o=e,a=e+1,c=e+2;t&&(o=t.getX(o),a=t.getX(a),c=t.getX(c)),i.x=s.getX(o),i.y=s.getY(o),i.z=s.getZ(o),n.x=s.getX(a),n.y=s.getY(a),n.z=s.getZ(a),r.x=s.getX(c),r.y=s.getY(c),r.z=s.getZ(c)}function Ul(l,e,t,s,i,n){const{geometry:r,_indirectBuffer:o}=l;for(let a=s,c=s+i;aS&&(S=B),ON&&(N=O),vy&&(y=v)}return a[I+0]!==R||a[I+1]!==A||a[I+2]!==m||a[I+3]!==S||a[I+4]!==N||a[I+5]!==y?(a[I+0]=R,a[I+1]=A,a[I+2]=m,a[I+3]=S,a[I+4]=N,a[I+5]=y,!0):!1}else{const T=I+8,C=r[I+6],R=T+u,A=C+u;let m=f,S=!1,N=!1;e?m||(S=e.has(R),N=e.has(A),m=!S&&!N):(S=!0,N=!0);const y=m||S,P=m||N;let _=!1;y&&(_=d(T,u,m));let M=!1;P&&(M=d(C,u,m));const B=_||M;if(B)for(let O=0;O<3;O++){const v=T+O,F=C+O,b=a[v],j=a[v+3],z=a[F],J=a[F+3];a[I+O]=bJ?j:J}return B}}}const gr=new Pe;function vt(l,e,t,s){return Oe(l,e,gr),t.intersectBox(gr,s)}function Vl(l,e,t,s,i,n){const{geometry:r,_indirectBuffer:o}=l;for(let a=s,c=s+i;a=0;let d,I;h?(d=qe(l),I=Qe(l,r)):(d=Qe(l,r),I=qe(l));const u=vt(d,i,s,Sr)?un(d,e,t,s):null;if(u){const E=u.point[c];if(h?E<=i[I+a]:E>=i[I+a+3])return u}const f=vt(I,i,s,Sr)?un(I,e,t,s):null;return u&&f?u.distance<=f.distance?u:f:u||f||null}}const si=new Pe,$t=new nt,qt=new nt,Rs=new Ee,Ar=new Ve,ii=new Ve;function Xl(l,e,t,s){ge.setBuffer(l._roots[e]);const i=dn(0,l,t,s);return ge.clearBuffer(),i}function dn(l,e,t,s,i=null){const{float32Array:n,uint16Array:r,uint32Array:o}=ge;let a=l*2;if(i===null&&(t.boundingBox||t.computeBoundingBox(),Ar.set(t.boundingBox.min,t.boundingBox.max,s),i=Ar),ze(a,r)){const c=e.geometry,h=c.index,d=c.attributes.position,I=t.index,u=t.attributes.position,f=ke(l,o),E=$e(a,r);if(Rs.copy(s).invert(),t.boundsTree)return Oe(l,n,ii),ii.matrix.copy(Rs),ii.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:T=>ii.intersectsBox(T),intersectsTriangle:T=>{T.a.applyMatrix4(s),T.b.applyMatrix4(s),T.c.applyMatrix4(s),T.needsUpdate=!0;for(let C=f*3,R=(E+f)*3;CXi.distanceToBox(S),intersectsBounds:(S,N,y)=>y{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:y=>gs.distanceToBox(y),intersectsBounds:(y,P,_)=>_{for(let _=y,M=y+P;_S&&(S=v),FN&&(N=F),by&&(y=b)}}return a[I+0]!==R||a[I+1]!==A||a[I+2]!==m||a[I+3]!==S||a[I+4]!==N||a[I+5]!==y?(a[I+0]=R,a[I+1]=A,a[I+2]=m,a[I+3]=S,a[I+4]=N,a[I+5]=y,!0):!1}else{const T=I+8,C=r[I+6],R=T+u,A=C+u;let m=f,S=!1,N=!1;e?m||(S=e.has(R),N=e.has(A),m=!S&&!N):(S=!0,N=!0);const y=m||S,P=m||N;let _=!1;y&&(_=d(T,u,m));let M=!1;P&&(M=d(C,u,m));const B=_||M;if(B)for(let O=0;O<3;O++){const v=T+O,F=C+O,b=a[v],j=a[v+3],z=a[F],J=a[F+3];a[I+O]=bJ?j:J}return B}}}const Or=new U;function Jl(l,e,t,s,i){ge.setBuffer(l._roots[e]),In(0,l,t,s,i),ge.clearBuffer()}function In(l,e,t,s,i){const{float32Array:n,uint16Array:r,uint32Array:o}=ge,a=l*2;if(ze(a,r)){const c=ke(l,o),h=$e(a,r);Vl(e,t,s,c,h,i)}else{const c=qe(l);vt(c,n,s,Or)&&In(c,e,t,s,i);const h=Qe(l,o);vt(h,n,s,Or)&&In(h,e,t,s,i)}}const yr=new U,ec=["x","y","z"];function tc(l,e,t,s){ge.setBuffer(l._roots[e]);const i=En(0,l,t,s);return ge.clearBuffer(),i}function En(l,e,t,s){const{float32Array:i,uint16Array:n,uint32Array:r}=ge;let o=l*2;if(ze(o,n)){const a=ke(l,r),c=$e(o,n);return Gl(e,t,s,a,c)}else{const a=po(l,r),c=ec[a],h=s.direction[c]>=0;let d,I;h?(d=qe(l),I=Qe(l,r)):(d=Qe(l,r),I=qe(l));const u=vt(d,i,s,yr)?En(d,e,t,s):null;if(u){const E=u.point[c];if(h?E<=i[I+a]:E>=i[I+a+3])return u}const f=vt(I,i,s,yr)?En(I,e,t,s):null;return u&&f?u.distance<=f.distance?u:f:u||f||null}}const ri=new Pe,Qt=new nt,Kt=new nt,Fs=new Ee,Nr=new Ve,oi=new Ve;function sc(l,e,t,s){ge.setBuffer(l._roots[e]);const i=fn(0,l,t,s);return ge.clearBuffer(),i}function fn(l,e,t,s,i=null){const{float32Array:n,uint16Array:r,uint32Array:o}=ge;let a=l*2;if(i===null&&(t.boundingBox||t.computeBoundingBox(),Nr.set(t.boundingBox.min,t.boundingBox.max,s),i=Nr),ze(a,r)){const c=e.geometry,h=c.index,d=c.attributes.position,I=t.index,u=t.attributes.position,f=ke(l,o),E=$e(a,r);if(Fs.copy(s).invert(),t.boundsTree)return Oe(l,n,oi),oi.matrix.copy(Fs),oi.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:T=>oi.intersectsBox(T),intersectsTriangle:T=>{T.a.applyMatrix4(s),T.b.applyMatrix4(s),T.c.applyMatrix4(s),T.needsUpdate=!0;for(let C=f,R=E+f;CZi.distanceToBox(S),intersectsBounds:(S,N,y)=>y{if(e.boundsTree){const y=e.boundsTree;return y.shapecast({boundsTraverseOrder:P=>Ss.distanceToBox(P),intersectsBounds:(P,_,M)=>M{for(let M=P,B=P+_;Mnew Pe),Jt=new Pe,es=new Pe,ji=new Pe,$i=new Pe;let qi=!1;function cc(l,e,t,s){if(qi)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");qi=!0;const i=l._roots,n=e._roots;let r,o=0,a=0;const c=new Ee().copy(t).invert();for(let h=0,d=i.length;ha.slice()),index:r.array.slice(),indirectBuffer:n?n.slice():null}:o={roots:i,index:r.array,indirectBuffer:n},o}static deserialize(e,t,s={}){s={setIndex:!0,indirect:!!e.indirectBuffer,...s};const{index:i,roots:n,indirectBuffer:r}=e,o=new Kn(t,{...s,[zi]:!0});if(o._roots=n,o._indirectBuffer=r||null,s.setIndex){const a=t.getIndex();if(a===null){const c=new Ys(e.index,1,!1);t.setIndex(c)}else a.array!==i&&(a.array.set(i),a.needsUpdate=!0)}return o}get indirect(){return!!this._indirectBuffer}constructor(e,t={}){if(e.isBufferGeometry){if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(t=Object.assign({strategy:Io,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,indirect:!1,[zi]:!1},t),t.useSharedArrayBuffer&&!lc())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=e,this._roots=null,this._indirectBuffer=null,t[zi]||(yl(this,t),!e.boundingBox&&t.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new Pe)));const{_indirectBuffer:s}=this;this.resolveTriangleIndex=t.indirect?i=>s[i]:i=>i}refit(e=null){return(this.indirect?Kl:Yl)(this,e)}traverse(e,t=0){const s=this._roots[t],i=new Uint32Array(s),n=new Uint16Array(s);r(0);function r(o,a=0){const c=o*2,h=n[c+15]===bi;if(h){const d=i[o+6],I=n[c+14];e(a,h,new Float32Array(s,o*4,6),d,I)}else{const d=o+Ri/4,I=i[o+6],u=i[o+7];e(a,h,new Float32Array(s,o*4,6),u)||(r(d,a+1),r(I,a+1))}}}raycast(e,t=ar){const s=this._roots,i=this.geometry,n=[],r=t.isMaterial,o=Array.isArray(t),a=i.groups,c=r?t.side:t,h=this.indirect?Jl:kl;for(let d=0,I=s.length;dd(I,u,f,E,T)?!0:s(I,u,this,o,f,E,t)}else r||(o?r=(d,I,u,f)=>s(d,I,this,o,u,f,t):r=(d,I,u)=>u);let a=!1,c=0;const h=this._roots;for(let d=0,I=h.length;d{const E=this.resolveTriangleIndex(f);_e(r,E*3,o,a)}:f=>{_e(r,f*3,o,a)},h=je.getPrimitive(),d=e.geometry.index,I=e.geometry.attributes.position,u=e.indirect?f=>{const E=e.resolveTriangleIndex(f);_e(h,E*3,d,I)}:f=>{_e(h,f*3,d,I)};if(n){const f=(E,T,C,R,A,m,S,N)=>{for(let y=C,P=C+R;yli.intersectsBox(s),intersectsTriangle:s=>li.intersectsTriangle(s)})}intersectsSphere(e){return this.shapecast({intersectsBounds:t=>e.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(e)})}closestPointToGeometry(e,t,s={},i={},n=0,r=1/0){return(this.indirect?ac:Ql)(this,e,t,s,i,n,r)}closestPointToPoint(e,t={},s=0,i=1/0){return Ml(this,e,t,s,i)}getBoundingBox(e){return e.makeEmpty(),this._roots.forEach(t=>{Oe(0,new Float32Array(t),Lr),e.union(Lr)}),e}}function _r(l,e,t){return l===null||(l.point.applyMatrix4(e.matrixWorld),l.distance=l.point.distanceTo(t.ray.origin),l.object=e,l.distancet.far)?null:l}const Qi=new ol,wr=new Ee,hc=se.prototype.raycast;function uc(l,e){if(this.geometry.boundsTree){if(this.material===void 0)return;wr.copy(this.matrixWorld).invert(),Qi.copy(l.ray).applyMatrix4(wr);const t=this.geometry.boundsTree;if(l.firstHitOnly===!0){const s=_r(t.raycastFirst(Qi,this.material),this,l);s&&e.push(s)}else{const s=t.raycast(Qi,this.material);for(let i=0,n=s.length;i{const t=this.handlers.slice(0);for(const s of t)s(e)}),p(this,"handlers",[])}add(e){this.handlers.push(e)}remove(e){this.handlers=this.handlers.filter(t=>t!==e)}reset(){this.handlers.length=0}}class wt{constructor(){p(this,"trigger",async e=>{const t=this.handlers.slice(0);for(const s of t)await s(e)}),p(this,"handlers",[])}add(e){this.handlers.push(e)}remove(e){this.handlers=this.handlers.filter(t=>t!==e)}reset(){this.handlers.length=0}}class Jn{constructor(e){p(this,"isDisposeable",()=>"dispose"in this&&"onDisposed"in this),p(this,"isResizeable",()=>"resize"in this&&"getSize"in this),p(this,"isUpdateable",()=>"onAfterUpdate"in this&&"onBeforeUpdate"in this&&"update"in this),p(this,"isHideable",()=>"visible"in this),p(this,"isConfigurable",()=>"setup"in this&&"config"in this&&"onSetup"in this),this.components=e}}class Fe extends Jn{}class er extends Jn{constructor(e){super(e),p(this,"worlds",new Map),p(this,"onWorldChanged",new $),p(this,"currentWorld",null),this.onWorldChanged.add(({world:t,action:s})=>{s==="removed"&&this.worlds.delete(t.uuid)})}}class Ec extends er{constructor(){super(...arguments),p(this,"hasCameraControls",()=>"controls"in this)}}class fc extends er{constructor(){super(...arguments),p(this,"onAfterUpdate",new $),p(this,"onBeforeUpdate",new $),p(this,"onDisposed",new $),p(this,"onResize",new $),p(this,"onClippingPlanesUpdated",new $),p(this,"clippingPlanes",[])}updateClippingPlanes(){this.onClippingPlanesUpdated.trigger()}setPlane(e,t,s){t.isLocal=s;const i=this.clippingPlanes.indexOf(t);e&&i===-1?this.clippingPlanes.push(t):!e&&i>-1&&this.clippingPlanes.splice(i,1),this.three.clippingPlanes=this.clippingPlanes.filter(n=>!n.isLocal)}}const Co=class pn extends Fe{constructor(e){super(e),p(this,"_disposedComponents",new Set),p(this,"enabled",!0),e.add(pn.uuid,this)}get(){return this._disposedComponents}destroy(e,t=!0,s=!0){e.removeFromParent();const i=e;i.dispose&&i.dispose(),this.disposeGeometryAndMaterials(e,t),s&&i.children&&i.children.length&&this.disposeChildren(i),e.children.length=0}disposeGeometry(e){e.boundsTree&&e.disposeBoundsTree&&e.disposeBoundsTree(),e.dispose()}disposeGeometryAndMaterials(e,t){const s=e;s.geometry&&this.disposeGeometry(s.geometry),t&&s.material&&pn.disposeMaterial(s),s.material=[],s.geometry=null}disposeChildren(e){for(const t of e.children)this.destroy(t)}static disposeMaterial(e){if(e.material)if(Array.isArray(e.material))for(const t of e.material)t.dispose();else e.material.dispose()}};p(Co,"uuid","76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe");let us=Co;class pc extends er{constructor(e){super(e),p(this,"onDisposed",new $),p(this,"directionalLights",new Map),p(this,"ambientLights",new Map)}dispose(){const e=this.components.get(us);for(const t of this.three.children){const s=t;s.geometry&&e.destroy(s)}this.deleteAllLights(),this.three.children=[],this.onDisposed.trigger(),this.onDisposed.reset()}deleteAllLights(){for(const[,e]of this.directionalLights)e.removeFromParent(),e.target.removeFromParent(),e.dispose();this.directionalLights.clear();for(const[,e]of this.ambientLights)e.removeFromParent(),e.dispose();this.ambientLights.clear()}}class Pt extends Set{constructor(e){super(e),p(this,"onItemAdded",new $),p(this,"onItemDeleted",new $),p(this,"onCleared",new $),p(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}add(...e){for(const t of e)this.has(t)||!this.guard(t)||(super.add(t),this.onItemAdded||(this.onItemAdded=new $),this.onItemAdded.trigger(t));return this}delete(e){const t=super.delete(e);return t&&this.onItemDeleted.trigger(),t}dispose(){this.clear(),this.onItemAdded.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class rt extends Map{constructor(e){super(e),p(this,"onItemSet",new $),p(this,"onItemUpdated",new $),p(this,"onItemDeleted",new $),p(this,"onCleared",new $),p(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}set(e,t){const s=this.has(e);if(!(this.guard??(()=>!0))(e,t))return this;const i=super.set(e,t);return s?(this.onItemUpdated||(this.onItemUpdated=new $),this.onItemUpdated.trigger({key:e,value:t})):(this.onItemSet||(this.onItemSet=new $),this.onItemSet.trigger({key:e,value:t})),i}delete(e){const t=super.delete(e);return t&&this.onItemDeleted.trigger(e),t}dispose(){this.clear(),this.onItemSet.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}const gi=0,Cc=1,Tc=new U,Pr=new it,Ki=new ds,vr=new U,ci=new rs;class mc{constructor(){this.tolerance=-1,this.faces=[],this.newFaces=[],this.assigned=new Mr,this.unassigned=new Mr,this.vertices=[]}setFromPoints(e){if(e.length>=4){this.makeEmpty();for(let t=0,s=e.length;tthis.tolerance)return!1;return!0}intersectRay(e,t){const s=this.faces;let i=-1/0,n=1/0;for(let r=0,o=s.length;r0&&h>=0)return null;const d=h!==0?-c/h:0;if(!(d<=0)&&(h>0?n=Math.min(d,n):i=Math.max(d,i),i>n))return null}return i!==-1/0?e.at(i,t):e.at(n,t),t}intersectsRay(e){return this.intersectRay(e,Tc)!==null}makeEmpty(){return this.faces=[],this.vertices=[],this}addVertexToFace(e,t){return e.face=t,t.outside===null?this.assigned.append(e):this.assigned.insertBefore(t.outside,e),t.outside=e,this}removeVertexFromFace(e,t){return e===t.outside&&(e.next!==null&&e.next.face===t?t.outside=e.next:t.outside=null),this.assigned.remove(e),this}removeAllVerticesFromFace(e){if(e.outside!==null){const t=e.outside;let s=e.outside;for(;s.next!==null&&s.next.face===e;)s=s.next;return this.assigned.removeSubList(t,s),t.prev=s.next=null,e.outside=null,t}}deleteFaceVertices(e,t){const s=this.removeAllVerticesFromFace(e);if(s!==void 0)if(t===void 0)this.unassigned.appendChain(s);else{let i=s;do{const n=i.next;t.distanceToPoint(i.point)>this.tolerance?this.addVertexToFace(i,t):this.unassigned.append(i),i=n}while(i!==null)}return this}resolveUnassignedPoints(e){if(this.unassigned.isEmpty()===!1){let t=this.unassigned.first();do{const s=t.next;let i=this.tolerance,n=null;for(let r=0;ri&&(i=a,n=o),i>1e3*this.tolerance)break}}n!==null&&this.addVertexToFace(t,n),t=s}while(t!==null)}return this}computeExtremes(){const e=new U,t=new U,s=[],i=[];for(let n=0;n<3;n++)s[n]=i[n]=this.vertices[0];e.copy(this.vertices[0].point),t.copy(this.vertices[0].point);for(let n=0,r=this.vertices.length;nt.getComponent(c)&&(t.setComponent(c,a.getComponent(c)),i[c]=o)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(e.x),Math.abs(t.x))+Math.max(Math.abs(e.y),Math.abs(t.y))+Math.max(Math.abs(e.z),Math.abs(t.z))),{min:s,max:i}}computeInitialHull(){const e=this.vertices,t=this.computeExtremes(),s=t.min,i=t.max;let n=0,r=0;for(let I=0;I<3;I++){const u=i[I].point.getComponent(I)-s[I].point.getComponent(I);u>n&&(n=u,r=I)}const o=s[r],a=i[r];let c,h;n=0,Pr.set(o.point,a.point);for(let I=0,u=this.vertices.length;In&&(n=E,c=f)}}n=-1,Ki.setFromCoplanarPoints(o.point,a.point,c.point);for(let I=0,u=this.vertices.length;In&&(n=E,h=f)}}const d=[];if(Ki.distanceToPoint(h.point)<0){d.push(tt.create(o,a,c),tt.create(h,a,o),tt.create(h,c,a),tt.create(h,o,c));for(let I=0;I<3;I++){const u=(I+1)%3;d[I+1].getEdge(2).setTwin(d[0].getEdge(u)),d[I+1].getEdge(1).setTwin(d[u+1].getEdge(0))}}else{d.push(tt.create(o,c,a),tt.create(h,o,a),tt.create(h,a,c),tt.create(h,c,o));for(let I=0;I<3;I++){const u=(I+1)%3;d[I+1].getEdge(2).setTwin(d[0].getEdge((3-I)%3)),d[I+1].getEdge(0).setTwin(d[u+1].getEdge(1))}}for(let I=0;I<4;I++)this.faces.push(d[I]);for(let I=0,u=e.length;In&&(n=C,E=this.faces[T])}E!==null&&this.addVertexToFace(f,E)}}return this}reindexFaces(){const e=[];for(let t=0;tt&&(t=n,e=i),i=i.next}while(i!==null&&i.face===s);return e}}computeHorizon(e,t,s,i){this.deleteFaceVertices(s),s.mark=Cc;let n;t===null?n=t=s.getEdge(0):n=t.next;do{const r=n.twin,o=r.face;o.mark===gi&&(o.distanceToPoint(e)>this.tolerance?this.computeHorizon(e,r,o,i):i.push(n)),n=n.next}while(n!==t);return this}addAdjoiningFace(e,t){const s=tt.create(e,t.tail(),t.head());return this.faces.push(s),s.getEdge(-1).setTwin(t.twin),s.getEdge(0)}addNewFaces(e,t){this.newFaces=[];let s=null,i=null;for(let n=0;n0;)t=t.next,e--;for(;e<0;)t=t.prev,e++;return t}compute(){const e=this.edge.tail(),t=this.edge.head(),s=this.edge.next.head();return ci.set(e.point,t.point,s.point),ci.getNormal(this.normal),ci.getMidpoint(this.midpoint),this.area=ci.getArea(),this.constant=this.normal.dot(this.midpoint),this}distanceToPoint(e){return this.normal.dot(e)-this.constant}}class Ji{constructor(e,t){this.vertex=e,this.prev=null,this.next=null,this.twin=null,this.face=t}head(){return this.vertex}tail(){return this.prev?this.prev.vertex:null}length(){const e=this.head(),t=this.tail();return t!==null?t.point.distanceTo(e.point):-1}lengthSquared(){const e=this.head(),t=this.tail();return t!==null?t.point.distanceToSquared(e.point):-1}setTwin(e){return this.twin=e,e.twin=this,this}}class Rc{constructor(e){this.point=e,this.prev=null,this.next=null,this.face=null}}class Mr{constructor(){this.head=null,this.tail=null}first(){return this.head}last(){return this.tail}clear(){return this.head=this.tail=null,this}insertBefore(e,t){return t.prev=e.prev,t.next=e,t.prev===null?this.head=t:t.prev.next=t,e.prev=t,this}insertAfter(e,t){return t.prev=e,t.next=e.next,t.next===null?this.tail=t:t.next.prev=t,e.next=t,this}append(e){return this.head===null?this.head=e:this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e,this}appendChain(e){for(this.head===null?this.head=e:this.tail.next=e,e.prev=this.tail;e.next!==null;)e=e.next;return this.tail=e,this}remove(e){return e.prev===null?this.head=e.next:e.prev.next=e.next,e.next===null?this.tail=e.prev:e.next.prev=e.prev,this}removeSubList(e,t){return e.prev===null?this.head=t.next:e.prev.next=t.next,t.next===null?this.tail=e.prev:t.next.prev=e.prev,this}isEmpty(){return this.head===null}}const Cn=[2,2,1],Tn=[1,0,0];function ut(l,e){return l*3+e}function gc(l){const e=l.elements;let t=0;for(let s=0;s<9;s++)t+=e[s]*e[s];return Math.sqrt(t)}function Fc(l){const e=l.elements;let t=0;for(let s=0;s<3;s++){const i=e[ut(Cn[s],Tn[s])];t+=2*i*i}return Math.sqrt(t)}function Sc(l,e){let t=0,s=1;const i=l.elements;for(let c=0;c<3;c++){const h=Math.abs(i[ut(Cn[c],Tn[c])]);h>t&&(t=h,s=c)}let n=1,r=0;const o=Tn[s],a=Cn[s];if(Math.abs(i[ut(a,o)])>Number.EPSILON){const c=i[ut(a,a)],h=i[ut(o,o)],d=i[ut(a,o)],I=(c-h)/2/d;let u;I<0?u=-1/(-I+Math.sqrt(1+I*I)):u=1/(I+Math.sqrt(1+I*I)),n=1/Math.sqrt(1+u*u),r=u*n}return e.identity(),e.elements[ut(o,o)]=n,e.elements[ut(a,a)]=n,e.elements[ut(a,o)]=r,e.elements[ut(o,a)]=-r,e}function Ac(l,e){let t=0,s=0;const i=10;e.unitary.identity(),e.diagonal.copy(l);const n=e.unitary,r=e.diagonal,o=new Bt,a=new Bt,c=Number.EPSILON*gc(r);for(;sc;)Sc(r,o),a.copy(o).transpose(),r.multiply(o),r.premultiply(a),n.multiply(o),++t>2&&(s++,t=0);return e}function Oc(l){const e=[];for(let re=0;re>8&255]+we._lut[e>>16&255]+we._lut[e>>24&255]}-${we._lut[t&255]}${we._lut[t>>8&255]}-${we._lut[t>>16&15|64]}${we._lut[t>>24&255]}-${we._lut[s&63|128]}${we._lut[s>>8&255]}-${we._lut[s>>16&255]}${we._lut[s>>24&255]}${we._lut[i&255]}${we._lut[i>>8&255]}${we._lut[i>>16&255]}${we._lut[i>>24&255]}`.toLowerCase()}static validate(e){if(!we._pattern.test(e))throw new Error(`${e} is not a valid UUID v4. - -- If you're the tool creator, you can take one from https://www.uuidgenerator.net/. - -- If you're using a platform tool, verify the uuid isn't misspelled or contact the tool creator.`)}};p(mn,"_pattern",/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/),p(mn,"_lut",["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"]);let gt=mn;const To=class mo{constructor(){p(this,"onDisposed",new $),p(this,"list",new Map),p(this,"enabled",!1),p(this,"_clock"),p(this,"onInit",new $),p(this,"update",()=>{if(!this.enabled)return;const e=this._clock.getDelta();for(const[t,s]of this.list)s.enabled&&s.isUpdateable()&&s.update(e);requestAnimationFrame(this.update)}),this._clock=new _a,mo.setupBVH()}add(e,t){if(this.list.has(e))throw new Error("You're trying to add a component that already exists in the components instance. Use Components.get() instead.");gt.validate(e),this.list.set(e,t)}get(e){const t=e.uuid;if(!this.list.has(t)){const s=new e(this);return this.list.has(t)||this.add(t,s),s}return this.list.get(t)}init(){this.enabled=!0,this._clock.start(),this.update(),this.onInit.trigger()}dispose(){this.enabled=!1;for(const[e,t]of this.list)t.enabled=!1,t.isDisposeable()&&t.dispose();this._clock.stop(),this.onDisposed.trigger(),this.onDisposed.reset()}static setupBVH(){Bs.prototype.computeBoundsTree=dc,Bs.prototype.disposeBoundsTree=Ic,se.prototype.raycast=uc}};p(To,"release","2.3.18");let Ro=To;class yc extends Jn{constructor(){super(...arguments),p(this,"meshes",new Set),p(this,"onAfterUpdate",new $),p(this,"onBeforeUpdate",new $),p(this,"onDisposed",new $),p(this,"isDisposing",!1),p(this,"enabled",!0),p(this,"uuid",gt.create()),p(this,"name"),p(this,"_scene"),p(this,"_camera"),p(this,"_renderer",null)}get scene(){if(!this._scene)throw new Error("No scene initialized!");return this._scene}set scene(e){this._scene=e,e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"})}get camera(){if(!this._camera)throw new Error("No camera initialized!");return this._camera}set camera(e){this._camera=e,e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"})}get renderer(){return this._renderer}set renderer(e){this._renderer=e,e&&(e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"}))}update(e){this.enabled&&(!this._scene||!this._camera||(this.scene.currentWorld=this,this.camera.currentWorld=this,this.renderer&&(this.renderer.currentWorld=this),this.onBeforeUpdate.trigger(),this.scene.isUpdateable()&&this.scene.update(e),this.camera.isUpdateable()&&this.camera.update(e),this.renderer&&this.renderer.update(e),this.onAfterUpdate.trigger()))}dispose(e=!0){if(this.enabled=!1,this.isDisposing=!0,this.scene.onWorldChanged.trigger({world:this,action:"removed"}),this.camera.onWorldChanged.trigger({world:this,action:"removed"}),this.renderer&&this.renderer.onWorldChanged.trigger({world:this,action:"removed"}),e){const t=this.components.get(us);this.scene.dispose(),this.camera.isDisposeable()&&this.camera.dispose(),this.renderer&&this.renderer.dispose();for(const s of this.meshes)t.destroy(s);this.meshes.clear()}this._scene=null,this._camera=null,this._renderer=null,this.components.get(No).list.delete(this.uuid),this.onDisposed.trigger(),this.onDisposed.reset()}}class kt{constructor(e,t,s,i){p(this,"_component"),p(this,"name"),p(this,"uuid"),this._component=e,this.name=s,this.uuid=i??gt.create(),t.get(Hs).list.set(this.uuid,this)}get controls(){const e={};for(const t in this._config){const s=this._config[t];e[t]=this.copyEntry(s)}return e}copyEntry(e){if(e.type==="Boolean"){const t=e;return{type:t.type,value:t.value}}if(e.type==="Color"){const t=e;return{type:t.type,value:t.value.clone()}}if(e.type==="Text"){const t=e;return{type:t.type,value:t.value}}if(e.type==="Number"){const t=e;return{type:t.type,value:t.value,min:t.min,max:t.max,interpolable:t.interpolable}}if(e.type==="Select"){const t=e;return{type:t.type,value:t.value,multiple:t.multiple,options:new Set(t.options)}}if(e.type==="Vector3"){const t=e;return{type:t.type,value:t.value.clone()}}if(e.type==="TextSet"){const t=e;return{type:t.type,value:new Set(t.value)}}if(e.type==="None"){const t=e;return{type:t.type,value:t.value}}throw new Error("Invalid entry!")}}const go=class Fo extends Fe{constructor(e){super(e),p(this,"list",new rt),p(this,"enabled",!0),e.add(Fo.uuid,this)}};p(go,"uuid","b8c764e0-6b24-4e77-9a32-35fa728ee5b4");let Hs=go;class Nc{constructor(e,t){p(this,"_list"),p(this,"_scene"),this._list=e,this._scene=t}get color(){return this._list.directionalLight.color.value}set color(e){this._list.directionalLight.color.value=e;for(const[,t]of this._scene.directionalLights)t.color.copy(e)}get intensity(){return this._list.directionalLight.intensity.value}set intensity(e){this._list.directionalLight.intensity.value=e;for(const[,t]of this._scene.directionalLights)t.intensity=e}get position(){return this._list.directionalLight.position.value.clone()}set position(e){this._list.directionalLight.position.value=e;for(const[,t]of this._scene.directionalLights)t.position.copy(e)}}class Lc{constructor(e,t){p(this,"_list"),p(this,"_scene"),this._list=e,this._scene=t}get color(){return this._list.ambientLight.color.value}set color(e){this._list.ambientLight.color.value=e;for(const[,t]of this._scene.ambientLights)t.color.copy(e)}get intensity(){return this._list.ambientLight.intensity.value}set intensity(e){this._list.ambientLight.intensity.value=e;for(const[,t]of this._scene.ambientLights)t.intensity=e}}class _c extends kt{constructor(){super(...arguments),p(this,"_config",{backgroundColor:{value:new Ue,type:"Color"},ambientLight:{color:{type:"Color",value:new Ue},intensity:{type:"Number",interpolable:!0,min:0,max:10,value:2}},directionalLight:{color:{type:"Color",value:new Ue},intensity:{type:"Number",interpolable:!0,min:0,max:10,value:2},position:{type:"Vector3",value:new U}}}),p(this,"ambientLight",new Lc(this._config,this._component)),p(this,"directionalLight",new Nc(this._config,this._component))}get backgroundColor(){return this._config.backgroundColor.value}set backgroundColor(e){this._config.backgroundColor.value=e,this._component.three.background=e}}class wc extends pc{constructor(e){super(e),p(this,"onSetup",new $),p(this,"isSetup",!1),p(this,"three"),p(this,"config",new _c(this,this.components,"Scene")),p(this,"_defaultConfig",{backgroundColor:new Ue(2107698),directionalLight:{color:new Ue("white"),intensity:1.5,position:new U(5,10,3)},ambientLight:{color:new Ue("white"),intensity:1}}),this.three=new Pi,this.three.background=new Ue(2107698)}setup(e){const t={...this._defaultConfig,...e};this.config.backgroundColor=t.backgroundColor;const s=t.ambientLight;this.config.ambientLight.color=s.color,this.config.ambientLight.intensity=s.intensity;const i=t.directionalLight;this.config.directionalLight.color=i.color,this.config.directionalLight.intensity=i.intensity,this.config.directionalLight.position=i.position,this.deleteAllLights();const{color:n,intensity:r}=this.config.directionalLight,o=new uo(n,r);o.position.copy(i.position);const{color:a,intensity:c}=this.config.directionalLight,h=new sl(a,c);this.three.add(o,h),this.directionalLights.set(o.uuid,o),this.ambientLights.set(h.uuid,h),this.isSetup=!0,this.onSetup.trigger()}dispose(){super.dispose(),this.components.get(Hs).list.delete(this.config.uuid)}}class xu extends fc{constructor(e,t,s){super(e),p(this,"enabled",!0),p(this,"container"),p(this,"three"),p(this,"_canvas"),p(this,"_parameters"),p(this,"_resizeObserver",null),p(this,"onContainerUpdated",new $),p(this,"_resizing",!1),p(this,"resize",r=>{if(this._resizing)return;this._resizing=!0,this.onContainerUpdated.trigger();const o=r?r.x:this.container.clientWidth,a=r?r.y:this.container.clientHeight;this.three.setSize(o,a),this.onResize.trigger(new He(o,a)),this._resizing=!1}),p(this,"resizeEvent",()=>{this.resize()}),p(this,"onContextLost",r=>{r.preventDefault(),this.enabled=!1}),p(this,"onContextBack",()=>{this.three.setRenderTarget(null),this.three.dispose(),this.three=new Vs({canvas:this._canvas,antialias:!0,alpha:!0,...this._parameters}),this.enabled=!0}),this.container=t,this._parameters=s,this.three=new Vs({antialias:!0,alpha:!0,...s}),this.three.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.setupRenderer(),this.setupEvents(!0),this.resize(),this._canvas=this.three.domElement;const i=this.three.getContext(),{canvas:n}=i;n.addEventListener("webglcontextlost",this.onContextLost,!1),n.addEventListener("webglcontextrestored",this.onContextBack,!1)}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger(this);const e=this.currentWorld.scene.three,t=this.currentWorld.camera.three;this.three.render(e,t),this.onAfterUpdate.trigger(this)}dispose(){this.enabled=!1,this.setupEvents(!1),this.three.domElement.remove(),this.three.forceContextLoss(),this.three.dispose(),this.onResize.reset(),this.onAfterUpdate.reset(),this.onBeforeUpdate.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}getSize(){return new He(this.three.domElement.clientWidth,this.three.domElement.clientHeight)}setupEvents(e){const t=this.three.domElement.parentElement;if(!t)throw new Error("This renderer needs to have an HTML container!");this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),window.removeEventListener("resize",this.resizeEvent),e&&(this._resizeObserver=new ResizeObserver(this.resizeEvent),this._resizeObserver.observe(t),window.addEventListener("resize",this.resizeEvent))}setupRenderer(){this.three.localClippingEnabled=!0,this.container&&this.container.appendChild(this.three.domElement),this.onContainerUpdated.trigger()}}/*! - * camera-controls - * https://github.com/yomotsu/camera-controls - * (c) 2017 @yomotsu - * Released under the MIT License. - */const le={LEFT:1,RIGHT:2,MIDDLE:4},k=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),ts={NONE:0,IN:1,OUT:-1};function Mt(l){return l.isPerspectiveCamera}function Ot(l){return l.isOrthographicCamera}const ss=Math.PI*2,br=Math.PI/2,So=1e-5,As=Math.PI/180;function et(l,e,t){return Math.max(e,Math.min(t,l))}function me(l,e=So){return Math.abs(l)0==u>h&&(u=h,t.value=(u-h)/n),u}function xr(l,e,t,s,i=1/0,n,r){s=Math.max(1e-4,s);const o=2/s,a=o*n,c=1/(1+a+.48*a*a+.235*a*a*a);let h=e.x,d=e.y,I=e.z,u=l.x-h,f=l.y-d,E=l.z-I;const T=h,C=d,R=I,A=i*s,m=A*A,S=u*u+f*f+E*E;if(S>m){const b=Math.sqrt(S);u=u/b*A,f=f/b*A,E=E/b*A}h=l.x-u,d=l.y-f,I=l.z-E;const N=(t.x+o*u)*n,y=(t.y+o*f)*n,P=(t.z+o*E)*n;t.x=(t.x-o*N)*c,t.y=(t.y-o*y)*c,t.z=(t.z-o*P)*c,r.x=h+(u+N)*c,r.y=d+(f+y)*c,r.z=I+(E+P)*c;const _=T-l.x,M=C-l.y,B=R-l.z,O=r.x-T,v=r.y-C,F=r.z-R;return _*O+M*v+B*F>0&&(r.x=T,r.y=C,r.z=R,t.x=(r.x-T)/n,t.y=(r.y-C)/n,t.z=(r.z-R)/n),r}function en(l,e){e.set(0,0),l.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=l.length,e.y/=l.length}function tn(l,e){return Ot(l)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class Pc{constructor(){this._listeners={}}addEventListener(e,t){const s=this._listeners;s[e]===void 0&&(s[e]=[]),s[e].indexOf(t)===-1&&s[e].push(t)}hasEventListener(e,t){const s=this._listeners;return s[e]!==void 0&&s[e].indexOf(t)!==-1}removeEventListener(e,t){const s=this._listeners[e];if(s!==void 0){const i=s.indexOf(t);i!==-1&&s.splice(i,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const t=this._listeners[e.type];if(t!==void 0){e.target=this;const s=t.slice(0);for(let i=0,n=s.length;i{},this._enabled=!0,this._state=k.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=ts.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new ae.Vector3,this._focalOffsetVelocity=new ae.Vector3,this._zoomVelocity={value:0},this._truckInternal=(m,S,N)=>{let y,P;if(Mt(this._camera)){const _=ce.copy(this._camera.position).sub(this._target),M=this._camera.getEffectiveFOV()*As,B=_.length()*Math.tan(M*.5);y=this.truckSpeed*m*B/this._elementRect.height,P=this.truckSpeed*S*B/this._elementRect.height}else if(Ot(this._camera)){const _=this._camera;y=m*(_.right-_.left)/_.zoom/this._elementRect.width,P=S*(_.top-_.bottom)/_.zoom/this._elementRect.height}else return;this.verticalDragToForward?(N?this.setFocalOffset(this._focalOffsetEnd.x+y,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(y,0,!0),this.forward(-P,!0)):N?this.setFocalOffset(this._focalOffsetEnd.x+y,this._focalOffsetEnd.y+P,this._focalOffsetEnd.z,!0):this.truck(y,P,!0)},this._rotateInternal=(m,S)=>{const N=ss*this.azimuthRotateSpeed*m/this._elementRect.height,y=ss*this.polarRotateSpeed*S/this._elementRect.height;this.rotate(N,y,!0)},this._dollyInternal=(m,S,N)=>{const y=Math.pow(.95,-m*this.dollySpeed),P=this._sphericalEnd.radius,_=this._sphericalEnd.radius*y,M=et(_,this.minDistance,this.maxDistance),B=M-_;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(_,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(B,!0),this._dollyToNoClamp(M,!0)):this._dollyToNoClamp(M,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?_:M)-P,this._dollyControlCoord.set(S,N)),this._lastDollyDirection=Math.sign(-m)},this._zoomInternal=(m,S,N)=>{const y=Math.pow(.95,m*this.dollySpeed),P=this._zoom,_=this._zoom*y;this.zoomTo(_,!0),this.dollyToCursor&&(this._changedZoom+=_-P,this._dollyControlCoord.set(S,N))},typeof ae>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new ae.Quaternion().setFromUnitVectors(this._camera.up,di),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=k.NONE,this._target=new ae.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new ae.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new ae.Spherical().setFromVector3(ce.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new ae.Vector3,new ae.Vector3,new ae.Vector3,new ae.Vector3],this._updateNearPlaneCorners(),this._boundary=new ae.Box3(new ae.Vector3(-1/0,-1/0,-1/0),new ae.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new ae.Vector2,this.mouseButtons={left:k.ROTATE,middle:k.DOLLY,right:k.TRUCK,wheel:Mt(this._camera)?k.DOLLY:Ot(this._camera)?k.ZOOM:k.NONE},this.touches={one:k.TOUCH_ROTATE,two:Mt(this._camera)?k.TOUCH_DOLLY_TRUCK:Ot(this._camera)?k.TOUCH_ZOOM_TRUCK:k.NONE,three:k.TOUCH_TRUCK};const s=new ae.Vector2,i=new ae.Vector2,n=new ae.Vector2,r=m=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const y=this._domElement.getBoundingClientRect(),P=m.clientX/y.width,_=m.clientY/y.height;if(Pthis._interactiveArea.right||_this._interactiveArea.bottom)return}const S=m.pointerType!=="mouse"?null:(m.buttons&le.LEFT)===le.LEFT?le.LEFT:(m.buttons&le.MIDDLE)===le.MIDDLE?le.MIDDLE:(m.buttons&le.RIGHT)===le.RIGHT?le.RIGHT:null;if(S!==null){const y=this._findPointerByMouseButton(S);y&&this._disposePointer(y)}if((m.buttons&le.LEFT)===le.LEFT&&this._lockedPointer)return;const N={pointerId:m.pointerId,clientX:m.clientX,clientY:m.clientY,deltaX:0,deltaY:0,mouseButton:S};this._activePointers.push(N),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",h),this._isDragging=!0,E(m)},o=m=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const y=this._domElement.getBoundingClientRect(),P=m.clientX/y.width,_=m.clientY/y.height;if(Pthis._interactiveArea.right||_this._interactiveArea.bottom)return}const S=(m.buttons&le.LEFT)===le.LEFT?le.LEFT:(m.buttons&le.MIDDLE)===le.MIDDLE?le.MIDDLE:(m.buttons&le.RIGHT)===le.RIGHT?le.RIGHT:null;if(S!==null){const y=this._findPointerByMouseButton(S);y&&this._disposePointer(y)}const N={pointerId:1,clientX:m.clientX,clientY:m.clientY,deltaX:0,deltaY:0,mouseButton:(m.buttons&le.LEFT)===le.LEFT?le.LEFT:(m.buttons&le.MIDDLE)===le.LEFT?le.MIDDLE:(m.buttons&le.RIGHT)===le.LEFT?le.RIGHT:null};this._activePointers.push(N),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.addEventListener("mousemove",c),this._domElement.ownerDocument.addEventListener("mouseup",d),this._isDragging=!0,E(m)},a=m=>{m.cancelable&&m.preventDefault();const S=m.pointerId,N=this._lockedPointer||this._findPointerById(S);if(N){if(N.clientX=m.clientX,N.clientY=m.clientY,N.deltaX=m.movementX,N.deltaY=m.movementY,this._state=0,m.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(m.buttons&le.LEFT)===le.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(m.buttons&le.MIDDLE)===le.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(m.buttons&le.RIGHT)===le.RIGHT&&(this._state=this._state|this.mouseButtons.right);T()}},c=m=>{const S=this._lockedPointer||this._findPointerById(1);S&&(S.clientX=m.clientX,S.clientY=m.clientY,S.deltaX=m.movementX,S.deltaY=m.movementY,this._state=0,(this._lockedPointer||(m.buttons&le.LEFT)===le.LEFT)&&(this._state=this._state|this.mouseButtons.left),(m.buttons&le.MIDDLE)===le.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(m.buttons&le.RIGHT)===le.RIGHT&&(this._state=this._state|this.mouseButtons.right),T())},h=m=>{const S=this._findPointerById(m.pointerId);if(!(S&&S===this._lockedPointer)){if(S&&this._disposePointer(S),m.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=k.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=k.NONE;C()}},d=()=>{const m=this._findPointerById(1);m&&m===this._lockedPointer||(m&&this._disposePointer(m),this._state=k.NONE,C())};let I=-1;const u=m=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===k.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const _=this._domElement.getBoundingClientRect(),M=m.clientX/_.width,B=m.clientY/_.height;if(Mthis._interactiveArea.right||Bthis._interactiveArea.bottom)return}if(m.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===k.ROTATE||this.mouseButtons.wheel===k.TRUCK){const _=performance.now();I-_<1e3&&this._getClientRect(this._elementRect),I=_}const S=Mc?-1:-3,N=m.deltaMode===1?m.deltaY/S:m.deltaY/(S*10),y=this.dollyToCursor?(m.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,P=this.dollyToCursor?(m.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case k.ROTATE:{this._rotateInternal(m.deltaX,m.deltaY),this._isUserControllingRotate=!0;break}case k.TRUCK:{this._truckInternal(m.deltaX,m.deltaY,!1),this._isUserControllingTruck=!0;break}case k.OFFSET:{this._truckInternal(m.deltaX,m.deltaY,!0),this._isUserControllingOffset=!0;break}case k.DOLLY:{this._dollyInternal(-N,y,P),this._isUserControllingDolly=!0;break}case k.ZOOM:{this._zoomInternal(-N,y,P),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},f=m=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===be.ACTION.NONE){const S=m instanceof PointerEvent?m.pointerId:0,N=this._findPointerById(S);N&&this._disposePointer(N),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("mouseup",d);return}m.preventDefault()}},E=m=>{if(this._enabled){if(en(this._activePointers,Ge),this._getClientRect(this._elementRect),s.copy(Ge),i.copy(Ge),this._activePointers.length>=2){const S=Ge.x-this._activePointers[1].clientX,N=Ge.y-this._activePointers[1].clientY,y=Math.sqrt(S*S+N*N);n.set(0,y);const P=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,_=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(P,_)}if(this._state=0,!m)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in m&&m.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(m.buttons&le.LEFT)===le.LEFT&&(this._state=this._state|this.mouseButtons.left),(m.buttons&le.MIDDLE)===le.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(m.buttons&le.RIGHT)===le.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&k.ROTATE)===k.ROTATE||(this._state&k.TOUCH_ROTATE)===k.TOUCH_ROTATE||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&k.TRUCK)===k.TRUCK||(this._state&k.TOUCH_TRUCK)===k.TOUCH_TRUCK||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&k.DOLLY)===k.DOLLY||(this._state&k.TOUCH_DOLLY)===k.TOUCH_DOLLY||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&k.ZOOM)===k.ZOOM||(this._state&k.TOUCH_ZOOM)===k.TOUCH_ZOOM||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&k.OFFSET)===k.OFFSET||(this._state&k.TOUCH_OFFSET)===k.TOUCH_OFFSET||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})}},T=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,en(this._activePointers,Ge);const m=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,S=m?-m.deltaX:i.x-Ge.x,N=m?-m.deltaY:i.y-Ge.y;if(i.copy(Ge),((this._state&k.ROTATE)===k.ROTATE||(this._state&k.TOUCH_ROTATE)===k.TOUCH_ROTATE||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(S,N),this._isUserControllingRotate=!0),(this._state&k.DOLLY)===k.DOLLY||(this._state&k.ZOOM)===k.ZOOM){const y=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,P=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0,_=this.dollyDragInverted?-1:1;(this._state&k.DOLLY)===k.DOLLY?(this._dollyInternal(_*N*ui,y,P),this._isUserControllingDolly=!0):(this._zoomInternal(_*N*ui,y,P),this._isUserControllingZoom=!0)}if((this._state&k.TOUCH_DOLLY)===k.TOUCH_DOLLY||(this._state&k.TOUCH_ZOOM)===k.TOUCH_ZOOM||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE){const y=Ge.x-this._activePointers[1].clientX,P=Ge.y-this._activePointers[1].clientY,_=Math.sqrt(y*y+P*P),M=n.y-_;n.set(0,_);const B=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,O=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&k.TOUCH_DOLLY)===k.TOUCH_DOLLY||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET?(this._dollyInternal(M*ui,B,O),this._isUserControllingDolly=!0):(this._zoomInternal(M*ui,B,O),this._isUserControllingZoom=!0)}((this._state&k.TRUCK)===k.TRUCK||(this._state&k.TOUCH_TRUCK)===k.TOUCH_TRUCK||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(S,N,!1),this._isUserControllingTruck=!0),((this._state&k.OFFSET)===k.OFFSET||(this._state&k.TOUCH_OFFSET)===k.TOUCH_OFFSET||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(S,N,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},C=()=>{en(this._activePointers,Ge),i.copy(Ge),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mouseup",d),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",R),this._domElement.ownerDocument.addEventListener("pointerlockerror",A),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",h),E())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",R),this._domElement.ownerDocument.removeEventListener("pointerlockerror",A))};const R=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},A=()=>{this.unlockPointer()};this._addAllEventListeners=m=>{this._domElement=m,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",r),Dc&&this._domElement.addEventListener("mousedown",o),this._domElement.addEventListener("pointercancel",h),this._domElement.addEventListener("wheel",u,{passive:!1}),this._domElement.addEventListener("contextmenu",f)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",r),this._domElement.removeEventListener("mousedown",o),this._domElement.removeEventListener("pointercancel",h),this._domElement.removeEventListener("wheel",u,{passive:!1}),this._domElement.removeEventListener("contextmenu",f),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.removeEventListener("pointerlockchange",R),this._domElement.ownerDocument.removeEventListener("pointerlockerror",A))},this.cancel=()=>{this._state!==k.NONE&&(this._state=k.NONE,this._activePointers.length=0,C())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=et(e.width,0,1),this._interactiveArea.height=et(e.height,0,1),this._interactiveArea.x=et(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=et(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,s=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,s)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,s=!1){this._isUserControllingRotate=!1;const i=et(e,this.minAzimuthAngle,this.maxAzimuthAngle),n=et(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=i,this._sphericalEnd.phi=n,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,s||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const r=!s||fe(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&fe(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(r)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=ts.NONE,this._changedDolly=0,this._dollyToNoClamp(et(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const s=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const n=this._collisionTest(),r=fe(n,this._spherical.radius);if(!(s>e)&&r)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,n)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const i=!t||fe(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(i)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(Ns).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const s=!t||fe(this._target.x,this._targetEnd.x,this.restThreshold)&&fe(this._target.y,this._targetEnd.y,this.restThreshold)&&fe(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(s)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=et(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const s=!t||fe(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(s)}pan(e,t,s=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,s)}truck(e,t,s=!1){this._camera.updateMatrix(),at.setFromMatrixColumn(this._camera.matrix,0),lt.setFromMatrixColumn(this._camera.matrix,1),at.multiplyScalar(e),lt.multiplyScalar(-t);const i=ce.copy(at).add(lt),n=Ie.copy(this._targetEnd).add(i);return this.moveTo(n.x,n.y,n.z,s)}forward(e,t=!1){ce.setFromMatrixColumn(this._camera.matrix,0),ce.crossVectors(this._camera.up,ce),ce.multiplyScalar(e);const s=Ie.copy(this._targetEnd).add(ce);return this.moveTo(s.x,s.y,s.z,t)}elevate(e,t=!1){return ce.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+ce.x,this._targetEnd.y+ce.y,this._targetEnd.z+ce.z,t)}moveTo(e,t,s,i=!1){this._isUserControllingTruck=!1;const n=ce.set(e,t,s).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,n,this.boundaryFriction),this._needsUpdate=!0,i||this._target.copy(this._targetEnd);const r=!i||fe(this._target.x,this._targetEnd.x,this.restThreshold)&&fe(this._target.y,this._targetEnd.y,this.restThreshold)&&fe(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}lookInDirectionOf(e,t,s,i=!1){const n=ce.set(e,t,s).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(n.x,n.y,n.z,i)}fitToBox(e,t,{cover:s=!1,paddingLeft:i=0,paddingRight:n=0,paddingBottom:r=0,paddingTop:o=0}={}){const a=[],c=e.isBox3?ns.copy(e):ns.setFromObject(e);c.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const h=Ur(this._sphericalEnd.theta,br),d=Ur(this._sphericalEnd.phi,br);a.push(this.rotateTo(h,d,t));const I=ce.setFromSpherical(this._sphericalEnd).normalize(),u=zr.setFromUnitVectors(I,sn),f=fe(Math.abs(I.y),1);f&&u.multiply(rn.setFromAxisAngle(di,h)),u.multiply(this._yAxisUpSpaceInverse);const E=Gr.makeEmpty();Ie.copy(c.min).applyQuaternion(u),E.expandByPoint(Ie),Ie.copy(c.min).setX(c.max.x).applyQuaternion(u),E.expandByPoint(Ie),Ie.copy(c.min).setY(c.max.y).applyQuaternion(u),E.expandByPoint(Ie),Ie.copy(c.max).setZ(c.min.z).applyQuaternion(u),E.expandByPoint(Ie),Ie.copy(c.min).setZ(c.max.z).applyQuaternion(u),E.expandByPoint(Ie),Ie.copy(c.max).setY(c.min.y).applyQuaternion(u),E.expandByPoint(Ie),Ie.copy(c.max).setX(c.min.x).applyQuaternion(u),E.expandByPoint(Ie),Ie.copy(c.max).applyQuaternion(u),E.expandByPoint(Ie),E.min.x-=i,E.min.y-=r,E.max.x+=n,E.max.y+=o,u.setFromUnitVectors(sn,I),f&&u.premultiply(rn.invert()),u.premultiply(this._yAxisUpSpace);const T=E.getSize(ce),C=E.getCenter(Ie).applyQuaternion(u);if(Mt(this._camera)){const R=this.getDistanceToFitBox(T.x,T.y,T.z,s);a.push(this.moveTo(C.x,C.y,C.z,t)),a.push(this.dollyTo(R,t)),a.push(this.setFocalOffset(0,0,0,t))}else if(Ot(this._camera)){const R=this._camera,A=R.right-R.left,m=R.top-R.bottom,S=s?Math.max(A/T.x,m/T.y):Math.min(A/T.x,m/T.y);a.push(this.moveTo(C.x,C.y,C.z,t)),a.push(this.zoomTo(S,t)),a.push(this.setFocalOffset(0,0,0,t))}return Promise.all(a)}fitToSphere(e,t){const s=[],i=e instanceof ae.Sphere?nn.copy(e):be.createBoundingSphere(e,nn);if(s.push(this.moveTo(i.center.x,i.center.y,i.center.z,t)),Mt(this._camera)){const n=this.getDistanceToFitSphere(i.radius);s.push(this.dollyTo(n,t))}else if(Ot(this._camera)){const n=this._camera.right-this._camera.left,r=this._camera.top-this._camera.bottom,o=2*i.radius,a=Math.min(n/o,r/o);s.push(this.zoomTo(a,t))}return s.push(this.setFocalOffset(0,0,0,t)),Promise.all(s)}setLookAt(e,t,s,i,n,r,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=ts.NONE,this._changedDolly=0;const a=Ie.set(i,n,r),c=ce.set(e,t,s);this._targetEnd.copy(a),this._sphericalEnd.setFromVector3(c.sub(a).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const h=!o||fe(this._target.x,this._targetEnd.x,this.restThreshold)&&fe(this._target.y,this._targetEnd.y,this.restThreshold)&&fe(this._target.z,this._targetEnd.z,this.restThreshold)&&fe(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&fe(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&fe(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(h)}lerpLookAt(e,t,s,i,n,r,o,a,c,h,d,I,u,f=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=ts.NONE,this._changedDolly=0;const E=ce.set(i,n,r),T=Ie.set(e,t,s);Ze.setFromVector3(T.sub(E).applyQuaternion(this._yAxisUpSpace));const C=is.set(h,d,I),R=Ie.set(o,a,c);Ls.setFromVector3(R.sub(C).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(E.lerp(C,u));const A=Ls.theta-Ze.theta,m=Ls.phi-Ze.phi,S=Ls.radius-Ze.radius;this._sphericalEnd.set(Ze.radius+S*u,Ze.phi+m*u,Ze.theta+A*u),this.normalizeRotations(),this._needsUpdate=!0,f||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const N=!f||fe(this._target.x,this._targetEnd.x,this.restThreshold)&&fe(this._target.y,this._targetEnd.y,this.restThreshold)&&fe(this._target.z,this._targetEnd.z,this.restThreshold)&&fe(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&fe(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&fe(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(N)}setPosition(e,t,s,i=!1){return this.setLookAt(e,t,s,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,i)}setTarget(e,t,s,i=!1){const n=this.getPosition(ce),r=this.setLookAt(n.x,n.y,n.z,e,t,s,i);return this._sphericalEnd.phi=et(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),r}setFocalOffset(e,t,s,i=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,s),this._needsUpdate=!0,i||this._focalOffset.copy(this._focalOffsetEnd);const n=!i||fe(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&fe(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&fe(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}setOrbitPoint(e,t,s){this._camera.updateMatrixWorld(),at.setFromMatrixColumn(this._camera.matrixWorldInverse,0),lt.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Dt.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const i=ce.set(e,t,s),n=i.distanceTo(this._camera.position),r=i.sub(this._camera.position);at.multiplyScalar(r.x),lt.multiplyScalar(r.y),Dt.multiplyScalar(r.z),ce.copy(at).add(lt).add(Dt),ce.z=ce.z+n,this.dollyTo(n,!1),this.setFocalOffset(-ce.x,ce.y,-ce.z,!1),this.moveTo(e,t,s,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,s,i){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new ae.Vector4,typeof e=="number"?this._viewport.set(e,t,s,i):this._viewport.copy(e)}getDistanceToFitBox(e,t,s,i=!1){if(tn(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const n=e/t,r=this._camera.getEffectiveFOV()*As,o=this._camera.aspect;return((i?n>o:nt.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,s){const i=t.lengthSq();if(i===0)return e;const n=Ie.copy(t).add(e),r=this._boundary.clampPoint(n,is).sub(n),o=r.lengthSq();if(o===0)return e.add(t);if(o===i)return e;if(s===0)return e.add(t).add(r);{const a=1+s*o/t.dot(r);return e.add(Ie.copy(t).multiplyScalar(a)).add(r.multiplyScalar(1-s))}}_updateNearPlaneCorners(){if(Mt(this._camera)){const e=this._camera,t=e.near,s=e.getEffectiveFOV()*As,i=Math.tan(s*.5)*t,n=i*e.aspect;this._nearPlaneCorners[0].set(-n,-i,0),this._nearPlaneCorners[1].set(n,-i,0),this._nearPlaneCorners[2].set(n,i,0),this._nearPlaneCorners[3].set(-n,i,0)}else if(Ot(this._camera)){const e=this._camera,t=1/e.zoom,s=e.left*t,i=e.right*t,n=e.top*t,r=e.bottom*t;this._nearPlaneCorners[0].set(s,n,0),this._nearPlaneCorners[1].set(i,n,0),this._nearPlaneCorners[2].set(i,r,0),this._nearPlaneCorners[3].set(s,r,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||tn(this._camera,"_collisionTest"))return e;const t=this._getTargetDirection(Ns);on.lookAt(Br,t,this._camera.up);for(let s=0;s<4;s++){const i=Ie.copy(this._nearPlaneCorners[s]);i.applyMatrix4(on);const n=is.addVectors(this._target,i);Ii.set(n,t),Ii.far=this._spherical.radius+1;const r=Ii.intersectObjects(this.colliderMeshes);r.length!==0&&r[0].distance{const s=()=>{this.removeEventListener("rest",s),t()};this.addEventListener("rest",s)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new ae.Sphere){const s=t,i=s.center;ns.makeEmpty(),e.traverseVisible(r=>{r.isMesh&&ns.expandByObject(r)}),ns.getCenter(i);let n=0;return e.traverseVisible(r=>{if(!r.isMesh)return;const o=r,a=o.geometry.clone();a.applyMatrix4(o.matrixWorld);const c=a.attributes.position;for(let h=0,d=c.count;h{var t;if(!(!this.currentWorld||!this.currentWorld.renderer)){if(this.three instanceof Gt){this.onAspectUpdated.trigger();return}if((t=this.currentWorld.renderer)!=null&&t.isResizeable()){const s=this.currentWorld.renderer.getSize();this.three.aspect=s.width/s.height,this.three.updateProjectionMatrix(),this.onAspectUpdated.trigger()}}}),this.three=this.setupCamera(),this.setupEvents(!0),this.onWorldChanged.add(({action:t,world:s})=>{if(t==="added"){const i=this.newCameraControls();this._allControls.set(s.uuid,i)}if(t==="removed"){const i=this._allControls.get(s.uuid);i&&(i.dispose(),this._allControls.delete(s.uuid))}})}get controls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");const e=this._allControls.get(this.currentWorld.uuid);if(!e)throw new Error("Controls not found!");return e}get enabled(){return this.currentWorld===null?!1:this.controls.enabled}set enabled(e){this.currentWorld!==null&&(this.controls.enabled=e)}dispose(){this.setupEvents(!1),this.onAspectUpdated.reset(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.three.removeFromParent(),this.onDisposed.trigger(),this.onDisposed.reset();for(const[e,t]of this._allControls)t.dispose()}update(e){this.enabled&&(this.onBeforeUpdate.trigger(this),this.controls.update(e),this.onAfterUpdate.trigger(this))}setupCamera(){const e=window.innerWidth/window.innerHeight,t=new Mn(60,e,1,1e3);return t.position.set(50,50,50),t.lookAt(new U(0,0,0)),t}newCameraControls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");if(!this.currentWorld.renderer)throw new Error("This camera needs a renderer to work!");be.install({THREE:Gs.getSubsetOfThree()});const{domElement:e}=this.currentWorld.renderer.three,t=new be(this.three,e);return t.smoothTime=.2,t.dollyToCursor=!0,t.infinityDolly=!0,t.minDistance=6,t}setupEvents(e){e?window.addEventListener("resize",this.updateAspect):window.removeEventListener("resize",this.updateAspect)}static getSubsetOfThree(){return{MOUSE:Ma,Vector2:He,Vector3:U,Vector4:va,Quaternion:st,Matrix4:Ee,Spherical:Pa,Box3:Pe,Sphere:wi,Raycaster:vn,MathUtils:Oi}}}const Oo=class yo extends Fe{constructor(e){super(e),p(this,"onAfterUpdate",new $),p(this,"onBeforeUpdate",new $),p(this,"onDisposed",new $),p(this,"list",new rt),p(this,"enabled",!0),e.add(yo.uuid,this)}create(){const e=new yc(this.components),t=e.uuid;if(this.list.has(t))throw new Error("There is already a world with this name!");return this.list.set(t,e),e}delete(e){if(!this.list.has(e.uuid))throw new Error("The provided world is not found in the list!");this.list.delete(e.uuid),e.dispose()}dispose(){this.enabled=!1;for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}update(e){if(this.enabled)for(const[t,s]of this.list)s.update(e)}};p(Oo,"uuid","fdb61dc4-2ec1-4966-b83d-54ea795fad4a");let No=Oo;function bc(l,e,t,s){return new Promise((i,n)=>{function r(){const o=l.clientWaitSync(e,t,0);if(o===l.WAIT_FAILED){n();return}if(o===l.TIMEOUT_EXPIRED){setTimeout(r,s);return}i()}r()})}async function Uc(l,e,t,s,i,n,r){const o=l.fenceSync(l.SYNC_GPU_COMMANDS_COMPLETE,0);l.flush(),await bc(l,o,0,10),l.deleteSync(o),l.bindBuffer(e,t),l.getBufferSubData(e,s,i,n,r),l.bindBuffer(e,null)}async function Lo(l,e,t,s,i,n,r,o){const a=l.createBuffer();return l.bindBuffer(l.PIXEL_PACK_BUFFER,a),l.bufferData(l.PIXEL_PACK_BUFFER,o.byteLength,l.STREAM_READ),l.readPixels(e,t,s,i,n,r,0),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),await Uc(l,l.PIXEL_PACK_BUFFER,a,0,o),l.deleteBuffer(a),o}class xc extends kt{constructor(){super(...arguments),p(this,"_config",{enabled:{value:!0,type:"Boolean"},width:{type:"Number",interpolable:!0,value:512,min:32,max:1024},height:{type:"Number",interpolable:!0,value:512,min:32,max:1024},autoUpdate:{value:!0,type:"Boolean"},renderDebugFrame:{value:!1,type:"Boolean"},updateInterval:{type:"Number",interpolable:!0,value:1,min:0,max:1},threshold:{type:"Number",interpolable:!0,value:100,min:1,max:512}}),p(this,"_interval",null)}get enabled(){return this._config.enabled.value}set enabled(e){this._config.enabled.value=e,this._component.enabled=e}get width(){return this._config.width.value}set width(e){this.setWidthHeight(e,this.height)}get height(){return this._config.height.value}set height(e){this.setWidthHeight(this.width,e)}get autoUpdate(){return this._config.autoUpdate.value}set autoUpdate(e){this.setAutoAndInterval(e,this.updateInterval)}get updateInterval(){return this._config.updateInterval.value}set updateInterval(e){this.setAutoAndInterval(this.autoUpdate,e)}get renderDebugFrame(){return this._config.renderDebugFrame.value}set renderDebugFrame(e){this._config.renderDebugFrame.value=e}get threshold(){return this._config.threshold.value}set threshold(e){this._config.threshold.value=e}setWidthHeight(e,t){if(e<=0||t<=0)throw new Error("The width and height of the culler renderer must be more than 0!");this._config.width.value=e,this._config.height.value=t,this.resetRenderTarget()}setAutoAndInterval(e,t){if(t<=0)throw new Error("The updateInterval of the culler renderer must be more than 0!");this._config.autoUpdate.value=e,this._config.updateInterval.value=t,this.resetInterval(e)}resetRenderTarget(){this._component.renderTarget.dispose(),this._component.renderTarget=new Ai(this.width,this.height),this._component.bufferSize=this.width*this.height*4,this._component.buffer=new Uint8Array(this._component.bufferSize)}resetInterval(e){this._interval!==null&&window.clearInterval(this._interval),e&&(this._interval=window.setInterval(async()=>{this._component.preventUpdate||await this._component.updateVisibility()},this.updateInterval))}}class Bc{constructor(e,t){if(p(this,"onSetup",new $),p(this,"onDisposed",new $),p(this,"onViewUpdated",new wt),p(this,"enabled",!0),p(this,"needsUpdate",!1),p(this,"components"),p(this,"renderTarget",new Ai),p(this,"bufferSize",1),p(this,"buffer",new Uint8Array),p(this,"preventUpdate",!1),p(this,"config"),p(this,"isSetup",!1),p(this,"world"),p(this,"renderer"),p(this,"_defaultConfig",{enabled:!0,height:512,width:512,updateInterval:1e3,autoUpdate:!0,renderDebugFrame:!1,threshold:100}),p(this,"worker"),p(this,"scene",new Pi),p(this,"_availableColor",1),p(this,"_isWorkerBusy",!1),p(this,"updateVisibility",async n=>{if(!this.enabled||!this.needsUpdate&&!n||this._isWorkerBusy)return;this._isWorkerBusy=!0;const r=this.world.camera.three;r.updateMatrix();const{width:o,height:a}=this.config;this.renderer.setSize(o,a),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,r);const c=this.renderer.getContext();await Lo(c,0,0,o,a,c.RGBA,c.UNSIGNED_BYTE,this.buffer),this.renderer.setRenderTarget(null),this.config.renderDebugFrame&&this.renderer.render(this.scene,r),this.worker.postMessage({buffer:this.buffer}),this.needsUpdate=!1}),!t.renderer)throw new Error("The given world must have a renderer!");this.components=e,this.config=new xc(this,this.components,"Culler renderer"),this.world=t,this.renderer=new Vs,this.renderer.clippingPlanes=t.renderer.clippingPlanes;const s=` - addEventListener("message", (event) => { - const { buffer } = event.data; - const colors = new Map(); - for (let i = 0; i < buffer.length; i += 4) { - const r = buffer[i]; - const g = buffer[i + 1]; - const b = buffer[i + 2]; - const code = "" + r + "-" + g + "-" + b; - if(colors.has(code)) { - colors.set(code, colors.get(code) + 1); - } else { - colors.set(code, 1); - } - } - postMessage({ colors }); - }); - `,i=new Blob([s],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(i)),this.setup()}dispose(){this.enabled=!1,this.config.autoUpdate=!1,this.components.get(Hs).list.delete(this.config.uuid);for(const e of this.scene.children)e.removeFromParent();this.onViewUpdated.reset(),this.worker.terminate(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.renderTarget.dispose(),this.buffer=null,this.onDisposed.reset()}setup(e){const t={...this._defaultConfig,...e},{width:s,height:i}=t;this.config.setWidthHeight(s,i);const{updateInterval:n,autoUpdate:r}=t;this.config.setAutoAndInterval(r,n),this.config.threshold=t.threshold,this.isSetup=!0,this.onSetup.trigger()}getAvailableColor(){let e=BigInt(this._availableColor.toString());const t=[];do t.unshift(Number(e%256n)),e/=256n;while(e);for(;t.length!==3;)t.unshift(0);const[s,i,n]=t,r=`${s}-${i}-${n}`;return{r:s,g:i,b:n,code:r}}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--}}class Yc extends Bc{constructor(e,t){super(e,t),p(this,"onViewUpdated",new $),p(this,"colorMeshes",new Map),p(this,"_colorCodeMeshMap",new Map),p(this,"_meshIDColorCodeMap",new Map),p(this,"_currentVisibleMeshes",new Set),p(this,"_recentlyHiddenMeshes",new Set),p(this,"_transparentMat",new cs({transparent:!0,opacity:0})),p(this,"handleWorkerMessage",async s=>{if(this.preventUpdate)return;const i=s.data.colors;this._recentlyHiddenMeshes=new Set(this._currentVisibleMeshes),this._currentVisibleMeshes.clear();for(const[n,r]of i){if(r{for(const n of s)n.visible=!0;for(const n of i)n.visible=!1})}get threshold(){return this.config.threshold}set threshold(e){this.config.threshold=e}dispose(){super.dispose(),this._currentVisibleMeshes.clear(),this._recentlyHiddenMeshes.clear(),this._meshIDColorCodeMap.clear(),this._transparentMat.dispose(),this._colorCodeMeshMap.clear();const e=this.components.get(us);for(const t in this.colorMeshes){const s=this.colorMeshes.get(t);s&&e.destroy(s,!0)}this.colorMeshes.clear()}add(e){if(!this.enabled)return;if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const t=e instanceof Vt,{geometry:s,material:i}=e,{colorMaterial:n,code:r}=this.getAvailableMaterial();let o;if(Array.isArray(i)){let h=!0;const d=[];for(const I of i)Dr.isTransparent(I)?d.push(this._transparentMat):(h=!1,d.push(n));if(h){n.dispose(),this.preventUpdate=!1;return}o=d}else if(Dr.isTransparent(i)){n.dispose(),this.preventUpdate=!1;return}else o=n;this._colorCodeMeshMap.set(r,e),this._meshIDColorCodeMap.set(e.uuid,r);const a=t?e.count:1,c=new Vt(s,o,a);t?c.instanceMatrix=e.instanceMatrix:c.setMatrixAt(0,new Ee),e.visible=!1,e.updateWorldMatrix(!0,!1),c.applyMatrix4(e.matrixWorld),c.updateMatrix(),this.scene.add(c),this.colorMeshes.set(e.uuid,c),this.increaseColor(),this.preventUpdate=!1}remove(e){if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const t=this.components.get(us);this._currentVisibleMeshes.delete(e),this._recentlyHiddenMeshes.delete(e);const s=this.colorMeshes.get(e.uuid),i=this._meshIDColorCodeMap.get(e.uuid);if(!s||!i){this.preventUpdate=!1;return}this._colorCodeMeshMap.delete(i),this._meshIDColorCodeMap.delete(e.uuid),this.colorMeshes.delete(e.uuid),s.geometry=void 0,s.material=[],t.destroy(s,!0),this._recentlyHiddenMeshes.delete(e),this._currentVisibleMeshes.delete(e),this.preventUpdate=!1}updateInstanced(e){for(const t of e){const s=this.colorMeshes.get(t.uuid);s&&(s.count=t.count)}}getAvailableMaterial(){const{r:e,g:t,b:s,code:i}=this.getAvailableColor(),n=Vi.enabled;Vi.enabled=!1;const r=new Ue(`rgb(${e}, ${t}, ${s})`);if(!this.world.renderer)throw new Error("Renderer not found in the world!");const o=this.world.renderer.clippingPlanes,a=new cs({color:r,clippingPlanes:o,side:zs});return Vi.enabled=n,{colorMaterial:a,code:i}}}const _o=class Rn extends Fe{constructor(e){super(e),p(this,"onDisposed",new $),p(this,"_enabled",!0),p(this,"list",new Map),e.add(Rn.uuid,this)}get enabled(){return this._enabled}set enabled(e){this._enabled=e;for(const[t,s]of this.list)s.enabled=e}create(e){if(this.list.has(e.uuid))return this.list.get(e.uuid);const t=new Yc(this.components,e);return this.list.set(e.uuid,t),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){this.enabled=!1,this.onDisposed.trigger(Rn.uuid),this.onDisposed.reset();for(const[e,t]of this.list)t.dispose();this.list.clear()}updateInstanced(e){for(const[,t]of this.list)t.updateInstanced(e)}};p(_o,"uuid","69f2a50d-c266-44fc-b1bd-fa4d34be89e6");let Vc=_o;class Gc{constructor(e,t){if(p(this,"onDisposed",new $),p(this,"onDistanceComputed",new $),p(this,"excludedObjects",new Set),p(this,"enabled",!0),p(this,"renderDebugFrame",!1),p(this,"components"),p(this,"scene",new Pi),p(this,"camera",new Gt(-1,1,1,-1,0,1)),p(this,"depthMaterial"),p(this,"world"),p(this,"renderer"),p(this,"worker"),p(this,"_width",512),p(this,"_height",512),p(this,"_postQuad"),p(this,"tempRT"),p(this,"resultRT"),p(this,"bufferSize"),p(this,"_buffer"),p(this,"_isWorkerBusy",!1),p(this,"compute",async()=>{if(!this.enabled||this.world.isDisposing||this._isWorkerBusy)return;this._isWorkerBusy=!0,this.world.camera.three.updateMatrix(),this.renderer.setSize(this._width,this._height),this.renderer.setRenderTarget(this.tempRT);const o="visibilityBeforeDistanceCheck";for(const c of this.excludedObjects)c.userData[o]=c.visible,c.visible=!1;this.renderer.render(this.world.scene.three,this.world.camera.three);for(const c of this.excludedObjects)c.userData[o]!==void 0&&(c.visible=c.userData[o]);this.depthMaterial.uniforms.tDiffuse.value=this.tempRT.texture,this.depthMaterial.uniforms.tDepth.value=this.tempRT.depthTexture,this.renderer.setRenderTarget(this.resultRT),this.renderer.render(this.scene,this.camera);const a=this.renderer.getContext();try{await Lo(a,0,0,this._width,this._height,a.RGBA,a.UNSIGNED_BYTE,this._buffer)}catch{this.renderer.setRenderTarget(null),this._isWorkerBusy=!1;return}this.renderer.setRenderTarget(null),this.renderDebugFrame&&this.renderer.render(this.scene,this.camera),this.worker.postMessage({buffer:this._buffer})}),p(this,"handleWorkerMessage",o=>{if(!this.enabled||this.world.isDisposing)return;const a=o.data.colors;let c=Number.MAX_VALUE;for(const u of a)u!==0&&u - -varying vec2 vUv; -uniform sampler2D tDiffuse; -uniform sampler2D tDepth; -uniform float cameraNear; -uniform float cameraFar; - - -float readDepth( sampler2D depthSampler, vec2 coord ) { - float fragCoordZ = texture2D( depthSampler, coord ).x; - float viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar ); - return viewZToOrthographicDepth( viewZ, cameraNear, cameraFar ); -} - -void main() { - //vec3 diffuse = texture2D( tDiffuse, vUv ).rgb; - float depth = readDepth( tDepth, vUv ); - - gl_FragColor.rgb = 1.0 - vec3( depth ); - gl_FragColor.a = 1.0; -} - `,uniforms:{cameraNear:{value:s.near},cameraFar:{value:s.far},tDiffuse:{value:null},tDepth:{value:null}}});const i=new vi(2,2);this._postQuad=new se(i,this.depthMaterial),this.scene.add(this._postQuad),this.renderer.clippingPlanes=t.renderer.clippingPlanes;const n=` - addEventListener("message", (event) => { - const { buffer } = event.data; - const colors = new Set(); - for (let i = 0; i < buffer.length; i += 4) { - const r = buffer[i]; - colors.add(r); - } - postMessage({ colors }); - }); - `,r=new Blob([n],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(r)),this.worker.addEventListener("message",this.handleWorkerMessage)}dispose(){this.enabled=!1,this.onDistanceComputed.reset(),this.worker.terminate(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.tempRT.dispose(),this.resultRT.dispose();const e=[...this.scene.children];this.excludedObjects.clear();for(const t of e)t.removeFromParent();this._postQuad.geometry.dispose(),this._postQuad.removeFromParent(),this._buffer=null,this.onDisposed.reset()}}class Bu extends wc{constructor(){super(...arguments),p(this,"_distanceRenderer"),p(this,"autoBias",!0),p(this,"_defaultShadowConfig",{cascade:1,resolution:512}),p(this,"_lightsWithShadow",new Map),p(this,"_isComputingShadows",!1),p(this,"_shadowsEnabled",!0),p(this,"_bias",0),p(this,"recomputeShadows",e=>{if(!this._shadowsEnabled)return;if(this.autoBias&&(this.bias=e/-1e5),e*=1.5,!this.currentWorld)throw new Error("A world needs to be assigned to the scene before computing shadows!");if(!this._lightsWithShadow.size)throw new Error("No shadows found!");const t=this.currentWorld.camera.three;if(!(t instanceof Mn)&&!(t instanceof Gt))throw new Error("Invalid camera type!");const s=new U;t.getWorldDirection(s);let i=e;const n=new U;n.copy(this.config.directionalLight.position),n.normalize();for(const[r,o]of this._lightsWithShadow){const a=this.directionalLights.get(o);if(!a)throw new Error("Light not found.");const c=new U;c.copy(s);const h=r===this._lightsWithShadow.size-1,d=h?i/2:i*2/3;c.multiplyScalar(d),c.add(t.position);const I=i-d,u=new U;u.copy(n),u.multiplyScalar(I),a.target.position.copy(c),a.position.copy(c),a.position.add(u),a.shadow.camera.right=I,a.shadow.camera.left=-I,a.shadow.camera.top=I,a.shadow.camera.bottom=-I,a.shadow.camera.far=I*2,a.shadow.camera.updateProjectionMatrix(),a.shadow.camera.updateMatrix(),h||(i/=3)}this._isComputingShadows=!1})}get bias(){return this._bias}set bias(e){this._bias=e;for(const[,t]of this._lightsWithShadow){const s=this.directionalLights.get(t);s&&(s.shadow.bias=e)}}get shadowsEnabled(){return this._shadowsEnabled}set shadowsEnabled(e){this._shadowsEnabled=e;for(const[,t]of this.directionalLights)t.castShadow=e}get distanceRenderer(){if(!this._distanceRenderer)throw new Error("You must set up this component before accessing the distance renderer!");return this._distanceRenderer}setup(e){super.setup(e);const t={...this._defaultConfig,...this._defaultShadowConfig,...e};if(t.cascade<=0)throw new Error("Config.shadows.cascade must be a natural number greater than 0!");if(t.cascade>1)throw new Error("Multiple shadows not supported yet!");if(!this.currentWorld)throw new Error("A world needs to be assigned to the scene before setting it up!");for(const[,s]of this.directionalLights)s.target.removeFromParent(),s.removeFromParent(),s.dispose();this.directionalLights.clear(),this._distanceRenderer||(this._distanceRenderer=new Gc(this.components,this.currentWorld),this._distanceRenderer.onDistanceComputed.add(this.recomputeShadows)),this._lightsWithShadow.clear();for(let s=0;s{this._event=t}),this.dom=e,this.setupEvents(!0)}get position(){if(this._event){const e=this.dom.getBoundingClientRect();this._position.x=this.getPositionX(e,this._event),this._position.y=this.getPositionY(e,this._event)}return this._position}dispose(){this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset()}getPositionY(e,t){return-((this.getDataObject(t).clientY-e.top)/(e.bottom-e.top))*2+1}getPositionX(e,t){return(this.getDataObject(t).clientX-e.left)/(e.right-e.left)*2-1}getDataObject(e){return e instanceof MouseEvent?e:e.touches[0]}setupEvents(e){e?(this.dom.addEventListener("pointermove",this.updateMouseInfo),this.dom.addEventListener("touchstart",this.updateMouseInfo)):(this.dom.removeEventListener("pointermove",this.updateMouseInfo),this.dom.removeEventListener("touchstart",this.updateMouseInfo))}}class kc{constructor(e,t){p(this,"enabled",!0),p(this,"components"),p(this,"onDisposed",new $),p(this,"mouse"),p(this,"three",new vn),p(this,"world");const s=t.renderer;if(!s)throw new Error("A renderer is needed for the raycaster to work!");this.world=t,this.mouse=new zc(s.three.domElement),this.components=e}dispose(){this.mouse.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}castRay(e=Array.from(this.world.meshes)){if(!this.world)throw new Error("A world is needed to cast rays!");const t=this.world.camera.three;return this.three.setFromCamera(this.mouse.position,t),this.intersect(e)}castRayFromVector(e,t,s=Array.from(this.world.meshes)){return this.three.set(e,t),this.intersect(s)}intersect(e=Array.from(this.world.meshes)){const t=this.three.intersectObjects(e),s=this.filterClippingPlanes(t);return s.length>0?s[0]:null}filterClippingPlanes(e){if(!this.world.renderer)throw new Error("Renderer not found!");const t=this.world.renderer.three;if(!t.clippingPlanes)return e;const s=t.clippingPlanes;return e.length<=0||!s||(s==null?void 0:s.length)<=0?e:e.filter(i=>s.every(n=>n.distanceToPoint(i.point)>0))}}const wo=class Po extends Fe{constructor(e){super(e),p(this,"enabled",!0),p(this,"list",new Map),p(this,"onDisposed",new $),e.add(Po.uuid,this)}get(e){if(this.list.has(e.uuid))return this.list.get(e.uuid);const t=new kc(this.components,e);return this.list.set(e.uuid,t),e.onDisposed.add(()=>{this.delete(e)}),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}};p(wo,"uuid","d5d8bdf0-db25-4952-b951-b643af207ace");let gn=wo;class Hc extends kt{constructor(){super(...arguments),p(this,"_config",{visible:{value:!0,type:"Boolean"},color:{value:new Ue,type:"Color"},primarySize:{type:"Number",interpolable:!0,value:1,min:0,max:1e3},secondarySize:{type:"Number",interpolable:!0,value:10,min:0,max:1e3},distance:{type:"Number",interpolable:!0,value:500,min:0,max:500}})}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e,this._component.visible=e}get color(){return this._config.color.value}set color(e){this._config.color.value=e,this._component.material.uniforms.uColor.value=e,this._component.material.uniformsNeedUpdate=!0}get primarySize(){return this._config.primarySize.value}set primarySize(e){this._config.primarySize.value=e,this._component.material.uniforms.uSize1.value=e,this._component.material.uniformsNeedUpdate=!0}get secondarySize(){return this._config.secondarySize.value}set secondarySize(e){this._config.secondarySize.value=e,this._component.material.uniforms.uSize2.value=e,this._component.material.uniformsNeedUpdate=!0}get distance(){return this._config.distance.value}set distance(e){this._config.distance.value=e,this._component.material.uniforms.uDistance.value=e,this._component.material.uniformsNeedUpdate=!0}}class Wc{constructor(e,t){p(this,"onDisposed",new $),p(this,"onSetup",new $),p(this,"isSetup",!1),p(this,"world"),p(this,"components"),p(this,"config"),p(this,"_defaultConfig",{visible:!0,color:new Ue(12303291),primarySize:1,secondarySize:10,distance:500}),p(this,"three"),p(this,"_fade",3),p(this,"updateZoom",()=>{this.world.camera instanceof Gs&&(this.material.uniforms.uZoom.value=this.world.camera.three.zoom)}),this.world=t;const{color:s,primarySize:i,secondarySize:n,distance:r}=this._defaultConfig;this.components=e,this.config=new Hc(this,this.components,"Grid");const o=new vi(2,2,1,1),a=new ao({side:zs,uniforms:{uSize1:{value:i},uSize2:{value:n},uColor:{value:s},uDistance:{value:r},uFade:{value:this._fade},uZoom:{value:1}},transparent:!0,vertexShader:` - - varying vec3 worldPosition; - - uniform float uDistance; - - void main() { - - vec3 pos = position.xzy * uDistance; - pos.xz += cameraPosition.xz; - - worldPosition = pos; - - gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0); - - } - `,fragmentShader:` - - varying vec3 worldPosition; - - uniform float uZoom; - uniform float uFade; - uniform float uSize1; - uniform float uSize2; - uniform vec3 uColor; - uniform float uDistance; - - - - float getGrid(float size) { - - vec2 r = worldPosition.xz / size; - - - vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r); - float line = min(grid.x, grid.y); - - - return 1.0 - min(line, 1.0); - } - - void main() { - - - float d = 1.0 - min(distance(cameraPosition.xz, worldPosition.xz) / uDistance, 1.0); - - float g1 = getGrid(uSize1); - float g2 = getGrid(uSize2); - - // Ortho camera fades the grid away when zooming out - float minZoom = step(0.2, uZoom); - float zoomFactor = pow(min(uZoom, 1.), 2.) * minZoom; - - gl_FragColor = vec4(uColor.rgb, mix(g2, g1, g1) * pow(d, uFade)); - gl_FragColor.a = mix(0.5 * gl_FragColor.a, gl_FragColor.a, g2) * zoomFactor; - - if ( gl_FragColor.a <= 0.0 ) discard; - - - } - - `,extensions:{derivatives:!0}});this.three=new se(o,a),this.three.frustumCulled=!1,t.scene.three.add(this.three),this.setupEvents(!0)}get visible(){return this.three.visible}set visible(e){e?this.world.scene.three.add(this.three):this.three.removeFromParent()}get material(){return this.three.material}get fade(){return this._fade===3}set fade(e){this._fade=e?3:0,this.material.uniforms.uFade.value=this._fade}setup(e){const t={...this._defaultConfig,...e};this.config.visible=!0,this.config.color=t.color,this.config.primarySize=t.primarySize,this.config.secondarySize=t.secondarySize,this.config.distance=t.distance,this.isSetup=!0,this.onSetup.trigger()}dispose(){this.setupEvents(!1),this.components.get(Hs).list.delete(this.config.uuid),this.components.get(us).destroy(this.three),this.onDisposed.trigger(),this.onDisposed.reset(),this.world=null,this.components=null}setupEvents(e){if(this.world.isDisposing||!(this.world.camera instanceof Gs))return;const t=this.world.camera.controls;e?t.addEventListener("update",this.updateZoom):t.removeEventListener("update",this.updateZoom)}}const vo=class Mo extends Fe{constructor(e){super(e),p(this,"list",new Map),p(this,"onDisposed",new $),p(this,"enabled",!0),e.add(Mo.uuid,this)}create(e){if(this.list.has(e.uuid))throw new Error("This world already has a grid!");const t=new Wc(this.components,e);return this.list.set(e.uuid,t),e.onDisposed.add(()=>{this.delete(e)}),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}};p(vo,"uuid","d1e814d5-b81c-4452-87a2-f039375e0489");let Yu=vo;const bt=new vn,De=new U,At=new U,Ae=new st,kr={X:new U(1,0,0),Y:new U(0,1,0),Z:new U(0,0,1)},an={type:"change"},Hr={type:"mouseDown"},Wr={type:"mouseUp",mode:null},Xr={type:"objectChange"};class Xc extends yi{constructor(e,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 s=new Kc;this._gizmo=s,this.add(s);const i=new Jc;this._plane=i,this.add(i);const n=this;function r(R,A){let m=A;Object.defineProperty(n,R,{get:function(){return m!==void 0?m:A},set:function(S){m!==S&&(m=S,i[R]=S,s[R]=S,n.dispatchEvent({type:R+"-changed",value:S}),n.dispatchEvent(an))}}),n[R]=A,i[R]=A,s[R]=A}r("camera",e),r("object",void 0),r("enabled",!0),r("axis",null),r("mode","translate"),r("translationSnap",null),r("rotationSnap",null),r("scaleSnap",null),r("space","world"),r("size",1),r("dragging",!1),r("showX",!0),r("showY",!0),r("showZ",!0);const o=new U,a=new U,c=new st,h=new st,d=new U,I=new st,u=new U,f=new U,E=new U,T=0,C=new U;r("worldPosition",o),r("worldPositionStart",a),r("worldQuaternion",c),r("worldQuaternionStart",h),r("cameraPosition",d),r("cameraQuaternion",I),r("pointStart",u),r("pointEnd",f),r("rotationAxis",E),r("rotationAngle",T),r("eye",C),this._offset=new U,this._startNorm=new U,this._endNorm=new U,this._cameraScale=new U,this._parentPosition=new U,this._parentQuaternion=new st,this._parentQuaternionInv=new st,this._parentScale=new U,this._worldScaleStart=new U,this._worldQuaternionInv=new st,this._worldScale=new U,this._positionStart=new U,this._quaternionStart=new st,this._scaleStart=new U,this._getPointer=Zc.bind(this),this._onPointerDown=$c.bind(this),this._onPointerHover=jc.bind(this),this._onPointerMove=qc.bind(this),this._onPointerUp=Qc.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(e){if(this.object===void 0||this.dragging===!0)return;bt.setFromCamera(e,this.camera);const t=ln(this._gizmo.picker[this.mode],bt);t?this.axis=t.object.name:this.axis=null}pointerDown(e){if(!(this.object===void 0||this.dragging===!0||e.button!==0)&&this.axis!==null){bt.setFromCamera(e,this.camera);const t=ln(this._plane,bt,!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,Hr.mode=this.mode,this.dispatchEvent(Hr)}}pointerMove(e){const t=this.axis,s=this.mode,i=this.object;let n=this.space;if(s==="scale"?n="local":(t==="E"||t==="XYZE"||t==="XYZ")&&(n="world"),i===void 0||t===null||this.dragging===!1||e.button!==-1)return;bt.setFromCamera(e,this.camera);const r=ln(this._plane,bt,!0);if(r){if(this.pointEnd.copy(r.point).sub(this.worldPositionStart),s==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),n==="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),n==="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&&(n==="local"&&(i.position.applyQuaternion(Ae.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)),n==="world"&&(i.parent&&i.position.add(De.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(De.setFromMatrixPosition(i.parent.matrixWorld))));else if(s==="scale"){if(t.search("XYZ")!==-1){let o=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(o*=-1),At.set(o,o,o)}else De.copy(this.pointStart),At.copy(this.pointEnd),De.applyQuaternion(this._worldQuaternionInv),At.applyQuaternion(this._worldQuaternionInv),At.divide(De),t.search("X")===-1&&(At.x=1),t.search("Y")===-1&&(At.y=1),t.search("Z")===-1&&(At.z=1);i.scale.copy(this._scaleStart).multiply(At),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(s==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const o=20/this.worldPosition.distanceTo(De.setFromMatrixPosition(this.camera.matrixWorld));let a=!1;t==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(De.copy(this.rotationAxis).cross(this.eye))*o):(t==="X"||t==="Y"||t==="Z")&&(this.rotationAxis.copy(kr[t]),De.copy(kr[t]),n==="local"&&De.applyQuaternion(this.worldQuaternion),De.cross(this.eye),De.length()===0?a=!0:this.rotationAngle=this._offset.dot(De.normalize())*o),(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),n==="local"&&t!=="E"&&t!=="XYZE"?(i.quaternion.copy(this._quaternionStart),i.quaternion.multiply(Ae.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),i.quaternion.copy(Ae.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),i.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(an),this.dispatchEvent(Xr)}}pointerUp(e){e.button===0&&(this.dragging&&this.axis!==null&&(Wr.mode=this.mode,this.dispatchEvent(Wr)),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(e){e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()})}attach(e){return this.object=e,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(an),this.dispatchEvent(Xr),this.pointStart.copy(this.pointEnd))}getRaycaster(){return bt}getMode(){return this.mode}setMode(e){this.mode=e}setTranslationSnap(e){this.translationSnap=e}setRotationSnap(e){this.rotationSnap=e}setScaleSnap(e){this.scaleSnap=e}setSize(e){this.size=e}setSpace(e){this.space=e}}function Zc(l){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:l.button};{const e=this.domElement.getBoundingClientRect();return{x:(l.clientX-e.left)/e.width*2-1,y:-(l.clientY-e.top)/e.height*2+1,button:l.button}}}function jc(l){if(this.enabled)switch(l.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(l));break}}function $c(l){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(l.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(l)),this.pointerDown(this._getPointer(l)))}function qc(l){this.enabled&&this.pointerMove(this._getPointer(l))}function Qc(l){this.enabled&&(this.domElement.releasePointerCapture(l.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(l)))}function ln(l,e,t){const s=e.intersectObject(l,!0);for(let i=0;i.9&&(n.visible=!1)),this.axis==="Y"&&(Ae.setFromEuler(Ei.set(0,0,Math.PI/2)),n.quaternion.copy(t).multiply(Ae),Math.abs(Ce.copy(Ut).applyQuaternion(t).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Z"&&(Ae.setFromEuler(Ei.set(0,Math.PI/2,0)),n.quaternion.copy(t).multiply(Ae),Math.abs(Ce.copy(Ds).applyQuaternion(t).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="XYZE"&&(Ae.setFromEuler(Ei.set(0,Math.PI/2,0)),Ce.copy(this.rotationAxis),n.quaternion.setFromRotationMatrix(jr.lookAt(Zr,Ce,Ut)),n.quaternion.multiply(Ae),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),De.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),De.applyQuaternion(this.worldQuaternionStart.clone().invert()),n.scale.copy(De),n.visible=this.dragging):(n.quaternion.copy(t),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(t),this.mode==="translate"||this.mode==="scale"?(n.name==="X"&&Math.abs(Ce.copy(Ms).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Y"&&Math.abs(Ce.copy(Ut).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Z"&&Math.abs(Ce.copy(Ds).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XY"&&Math.abs(Ce.copy(Ds).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="YZ"&&Math.abs(Ce.copy(Ms).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XZ"&&Math.abs(Ce.copy(Ut).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1)):this.mode==="rotate"&&(fi.copy(t),Ce.copy(this.eye).applyQuaternion(Ae.copy(t).invert()),n.name.search("E")!==-1&&n.quaternion.setFromRotationMatrix(jr.lookAt(this.eye,Zr,Ut)),n.name==="X"&&(Ae.setFromAxisAngle(Ms,Math.atan2(-Ce.y,Ce.z)),Ae.multiplyQuaternions(fi,Ae),n.quaternion.copy(Ae)),n.name==="Y"&&(Ae.setFromAxisAngle(Ut,Math.atan2(Ce.x,Ce.z)),Ae.multiplyQuaternions(fi,Ae),n.quaternion.copy(Ae)),n.name==="Z"&&(Ae.setFromAxisAngle(Ds,Math.atan2(Ce.y,Ce.x)),Ae.multiplyQuaternions(fi,Ae),n.quaternion.copy(Ae))),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(o){return n.name===o}))&&(n.material.color.setHex(16776960),n.material.opacity=1)}super.updateMatrixWorld(e)}}class Jc extends se{constructor(){super(new vi(1e5,1e5,2,2),new cs({visible:!1,wireframe:!0,side:zs,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(e){let t=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(t="local"),pi.copy(Ms).applyQuaternion(t==="local"?this.worldQuaternion:Fi),_s.copy(Ut).applyQuaternion(t==="local"?this.worldQuaternion:Fi),ws.copy(Ds).applyQuaternion(t==="local"?this.worldQuaternion:Fi),Ce.copy(_s),this.mode){case"translate":case"scale":switch(this.axis){case"X":Ce.copy(this.eye).cross(pi),ct.copy(pi).cross(Ce);break;case"Y":Ce.copy(this.eye).cross(_s),ct.copy(_s).cross(Ce);break;case"Z":Ce.copy(this.eye).cross(ws),ct.copy(ws).cross(Ce);break;case"XY":ct.copy(ws);break;case"YZ":ct.copy(pi);break;case"XZ":Ce.copy(ws),ct.copy(_s);break;case"XYZ":case"E":ct.set(0,0,0);break}break;case"rotate":default:ct.set(0,0,0)}ct.length()===0?this.quaternion.copy(this.cameraQuaternion):($r.lookAt(De.set(0,0,0),ct,Ce),this.quaternion.setFromRotationMatrix($r)),super.updateMatrixWorld(e)}}class tr{constructor(e,t,s,i,n,r=5,o=!0){if(p(this,"onDraggingStarted",new $),p(this,"onDraggingEnded",new $),p(this,"onDisposed",new $),p(this,"normal"),p(this,"origin"),p(this,"three",new ds),p(this,"components"),p(this,"world"),p(this,"type","default"),p(this,"_helper"),p(this,"_visible",!0),p(this,"_enabled",!0),p(this,"_controlsActive",!1),p(this,"_arrowBoundBox",new se),p(this,"_planeMesh"),p(this,"_controls"),p(this,"_hiddenMaterial",new cs({visible:!1})),p(this,"update",()=>{this._enabled&&this.three.setFromNormalAndCoplanarPoint(this.normal,this._helper.position)}),p(this,"changeDrag",a=>{this._visible=!a.value,this.preventCameraMovement(),this.notifyDraggingChanged(a)}),this.components=e,this.world=t,!t.renderer)throw new Error("The given world must have a renderer!");this.normal=i,this.origin=s,t.renderer.setPlane(!0,this.three),this._planeMesh=tr.newPlaneMesh(r,n),this._helper=this.newHelper(),this._controls=this.newTransformControls(),this.three.setFromNormalAndCoplanarPoint(i,s),o&&this.toggleControls(!0)}get enabled(){return this._enabled}set enabled(e){if(!this.world.isDisposing){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");this._enabled=e,this.world.renderer.setPlane(e,this.three)}}get visible(){return this._visible}set visible(e){this._visible=e,this._controls.visible=e,this._helper.visible=e,this.toggleControls(e)}get meshes(){return[this._planeMesh,this._arrowBoundBox]}get planeMaterial(){return this._planeMesh.material}set planeMaterial(e){this._planeMesh.material=e}get size(){return this._planeMesh.scale.x}set size(e){this._planeMesh.scale.set(e,e,e)}get helper(){return this._helper}setFromNormalAndCoplanarPoint(e,t){this.reset(),this.normal.equals(e)||(this.normal.copy(e),this._helper.lookAt(e)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix(),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 e=new U(1,0,0),t=new U;this.normal.equals(e)||(this.normal.copy(e),this._helper.lookAt(e)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix()}toggleControls(e){if(e){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=e}newTransformControls(){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");const e=this.world.camera.three,t=this.world.renderer.three.domElement,s=new Xc(e,t);return this.initializeControls(s),this.world.scene.three.add(s),s}initializeControls(e){e.attach(this._helper),e.showX=!1,e.showY=!1,e.setSpace("local"),this.createArrowBoundingBox(),e.children[0].children[0].add(this._arrowBoundBox)}createArrowBoundingBox(){this._arrowBoundBox.geometry=new xe(.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(e){e.value?this.onDraggingStarted.trigger():this.onDraggingEnded.trigger()}preventCameraMovement(){this.world.camera.enabled=this._visible}newHelper(){const e=new yi;return e.lookAt(this.normal),e.position.copy(this.origin),this._planeMesh.position.z+=.01,e.add(this._planeMesh),this.world.scene.three.add(e),e}static newPlaneMesh(e,t){const s=new vi(1),i=new se(s,t);return i.scale.set(e,e,e),i}}class eh extends kt{constructor(){super(...arguments),p(this,"_config",{enabled:{value:!0,type:"Boolean"},visible:{value:!0,type:"Boolean"},color:{value:new Ue,type:"Color"},opacity:{type:"Number",interpolable:!0,value:1,min:0,max:1},size:{type:"Number",interpolable:!0,value:2,min:0,max:100}})}get enabled(){return this._config.enabled.value}set enabled(e){this._config.enabled.value=e,this._component.enabled=e}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e,this._component.visible=e}get color(){return this._config.color.value}set color(e){this._config.color.value=e,this._component.material.color.copy(e)}get opacity(){return this._config.opacity.value}set opacity(e){this._config.opacity.value=e,this._component.material.opacity=e}get size(){return this._config.size.value}set size(e){this._config.size.value=e,this._component.size=e}}const Do=class Si extends Fe{constructor(e){super(e),p(this,"onSetup",new $),p(this,"onBeforeDrag",new $),p(this,"onAfterDrag",new $),p(this,"onBeforeCreate",new $),p(this,"onBeforeCancel",new $),p(this,"onAfterCancel",new $),p(this,"onBeforeDelete",new $),p(this,"onAfterCreate",new $),p(this,"onAfterDelete",new $),p(this,"onDisposed",new $),p(this,"isSetup",!1),p(this,"orthogonalY",!1),p(this,"toleranceOrthogonalY",.7),p(this,"Type",tr),p(this,"list",[]),p(this,"config",new eh(this,this.components,"Clipper",Si.uuid)),p(this,"_defaultConfig",{color:new Ue(12255487),opacity:.2,size:2}),p(this,"_material",new cs({color:12255487,side:zs,transparent:!0,opacity:.2})),p(this,"_size",5),p(this,"_enabled",!1),p(this,"_visible",!0),p(this,"_onStartDragging",()=>{this.onBeforeDrag.trigger()}),p(this,"_onEndDragging",()=>{this.onAfterDrag.trigger()}),this.components.add(Si.uuid,this)}get enabled(){return this._enabled}set enabled(e){this._enabled=e;for(const t of this.list)t.enabled=e;this.updateMaterialsAndPlanes()}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}get material(){return this._material}set material(e){this._material=e;for(const t of this.list)t.planeMaterial=e}get size(){return this._size}set size(e){this._size=e;for(const t of this.list)t.size=e}dispose(){this._enabled=!1,this.components.get(Hs).list.delete(this.config.uuid);for(const e of this.list)e.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(Si.uuid),this.onDisposed.reset()}create(e){const t=this.components.get(gn).get(e).castRay();return t?this.createPlaneFromIntersection(e,t):null}createFromNormalAndCoplanarPoint(e,t,s){const i=this.newPlane(e,s,t);return this.updateMaterialsAndPlanes(),i}delete(e,t){t||(t=this.pickPlane(e)),t&&this.deletePlane(t)}deleteAll(e){const t=[...this.list];for(const s of t)if(!e||e.has(s.type)){this.delete(s.world,s);const i=this.list.indexOf(s);i!==-1&&this.list.splice(i,1)}}setup(e){const t={...this._defaultConfig,...e};this.config.color=t.color,this.config.opacity=t.opacity,this.config.size=t.size,this.isSetup=!0,this.onSetup.trigger()}deletePlane(e){const t=this.list.indexOf(e);if(t!==-1){if(this.list.splice(t,1),!e.world.renderer)throw new Error("Renderer not found for this plane's world!");e.world.renderer.setPlane(!1,e.three),e.dispose(),this.updateMaterialsAndPlanes(),this.onAfterDelete.trigger(e)}}pickPlane(e){const t=this.components.get(gn).get(e),s=this.getAllPlaneMeshes(),i=t.castRay(s);if(i){const n=i.object;return this.list.find(r=>r.meshes.includes(n))}}getAllPlaneMeshes(){const e=[];for(const t of this.list)e.push(...t.meshes);return e}createPlaneFromIntersection(e,t){var s;if(!e.renderer)throw new Error("The given world must have a renderer!");const i=t.point.distanceTo(new U(0,0,0)),n=(s=t.face)==null?void 0:s.normal;if(!i||!n)return null;const r=this.getWorldNormal(t,n),o=this.newPlane(e,t.point,r.negate());return o.visible=this._visible,o.size=this._size,e.renderer.setPlane(!0,o.three),this.updateMaterialsAndPlanes(),o}getWorldNormal(e,t){const s=e.object;let i=e.object.matrixWorld.clone();if(s instanceof Vt&&e.instanceId!==void 0){const o=new Ee;s.getMatrixAt(e.instanceId,o),i=o.multiply(i)}const n=new Bt().getNormalMatrix(i),r=t.clone().applyMatrix3(n).normalize();return this.normalizePlaneDirectionY(r),r}normalizePlaneDirectionY(e){this.orthogonalY&&(e.y>this.toleranceOrthogonalY&&(e.x=0,e.y=1,e.z=0),e.y<-this.toleranceOrthogonalY&&(e.x=0,e.y=-1,e.z=0))}newPlane(e,t,s){const i=new this.Type(this.components,e,t,s,this._material);return i.onDraggingStarted.add(this._onStartDragging),i.onDraggingEnded.add(this._onEndDragging),this.list.push(i),this.onAfterCreate.trigger(i),i}updateMaterialsAndPlanes(){const e=this.components.get(No);for(const[t,s]of e.list){if(!s.renderer)continue;s.renderer.updateClippingPlanes();const{clippingPlanes:i}=s.renderer;for(const n of s.meshes)if(n.material)if(Array.isArray(n.material))for(const r of n.material)r.clippingPlanes=i;else n.material.clippingPlanes=i}}};p(Do,"uuid","66290bc5-18c4-4cd1-9379-2e17a0617611");let th=Do;class sh{constructor(e){p(this,"enabled",!1),p(this,"id","FirstPerson"),this.camera=e}set(e){if(this.enabled=e,e){if(this.camera.projection.current!=="Perspective"){this.camera.set("Orbit");return}this.setupFirstPersonCamera()}}setupFirstPersonCamera(){const e=this.camera.controls,t=new U;e.distance--,e.getPosition(t),e.minDistance=1,e.maxDistance=1,e.distance=1,e.moveTo(t.x,t.y,t.z),e.truckSpeed=50,e.mouseButtons.wheel=be.ACTION.DOLLY,e.touches.two=be.ACTION.TOUCH_ZOOM_TRUCK}}class ih{constructor(e){p(this,"enabled",!0),p(this,"id","Orbit"),this.camera=e,this.activateOrbitControls()}set(e){this.enabled=e,e&&this.activateOrbitControls()}activateOrbitControls(){const e=this.camera.controls;e.minDistance=1,e.maxDistance=300;const t=new U;e.getPosition(t);const s=t.length();e.distance=s,e.truckSpeed=2;const{rotation:i}=this.camera.three,n=new U(0,0,-1).applyEuler(i),r=t.addScaledVector(n,s);e.moveTo(r.x,r.y,r.z)}}class nh{constructor(e){p(this,"enabled",!1),p(this,"id","Plan"),p(this,"mouseAction1"),p(this,"mouseAction2"),p(this,"mouseInitialized",!1),p(this,"defaultAzimuthSpeed"),p(this,"defaultPolarSpeed"),this.camera=e,this.defaultAzimuthSpeed=e.controls.azimuthRotateSpeed,this.defaultPolarSpeed=e.controls.polarRotateSpeed}set(e){this.enabled=e;const t=this.camera.controls;t.azimuthRotateSpeed=e?0:this.defaultAzimuthSpeed,t.polarRotateSpeed=e?0:this.defaultPolarSpeed,this.mouseInitialized||(this.mouseAction1=t.touches.one,this.mouseAction2=t.touches.two,this.mouseInitialized=!0),e?(t.mouseButtons.left=be.ACTION.TRUCK,t.touches.one=be.ACTION.TOUCH_TRUCK,t.touches.two=be.ACTION.TOUCH_ZOOM):(t.mouseButtons.left=be.ACTION.ROTATE,t.touches.one=this.mouseAction1,t.touches.two=this.mouseAction2)}}class rh{constructor(e){p(this,"onChanged",new $),p(this,"current","Perspective"),p(this,"camera"),p(this,"matchOrthoDistanceEnabled",!1),p(this,"_component"),p(this,"_previousDistance",-1),this._component=e,this.camera=e.three}async set(e){this.current!==e&&(e==="Orthographic"?this.setOrthoCamera():await this.setPerspectiveCamera(),this.onChanged.trigger(this.camera))}async toggle(){const e=this.current==="Perspective"?"Orthographic":"Perspective";await this.set(e)}setOrthoCamera(){if(this._component.mode===null||this._component.mode.id==="FirstPerson")return;this._previousDistance=this._component.controls.distance,this._component.controls.distance=200;const e=this.getPerspectiveDims();if(!e)return;const{width:t,height:s}=e;this.setupOrthoCamera(s,t),this.camera=this._component.threeOrtho,this.current="Orthographic"}getPerspectiveDims(){const e=this._component.currentWorld;if(!e||!e.renderer)return null;const t=new U;this._component.threePersp.getWorldDirection(t);const s=new U;this._component.controls.getTarget(s);const i=s.clone().sub(this._component.threePersp.position).dot(t),n=e.renderer.getSize(),r=n.x/n.y,o=this._component.threePersp,a=i*2*Math.atan(o.fov*(Math.PI/180)/2);return{width:a*r,height:a}}setupOrthoCamera(e,t){this._component.controls.mouseButtons.wheel=be.ACTION.ZOOM,this._component.controls.mouseButtons.middle=be.ACTION.ZOOM;const s=this._component.threePersp,i=this._component.threeOrtho;i.zoom=1,i.left=t/-2,i.right=t/2,i.top=e/2,i.bottom=e/-2,i.updateProjectionMatrix(),i.position.copy(s.position),i.quaternion.copy(s.quaternion),this._component.controls.camera=i}getDistance(){const e=this._component.threePersp,t=this._component.threeOrtho;return(t.top-t.bottom)/t.zoom/(2*Math.atan(e.fov*(Math.PI/180)/2))}async setPerspectiveCamera(){this._component.controls.mouseButtons.wheel=be.ACTION.DOLLY,this._component.controls.mouseButtons.middle=be.ACTION.DOLLY;const e=this._component.threePersp,t=this._component.threeOrtho;e.position.copy(t.position),e.quaternion.copy(t.quaternion),this._component.controls.mouseButtons.wheel=be.ACTION.DOLLY,this.matchOrthoDistanceEnabled?this._component.controls.distance=this.getDistance():this._component.controls.distance=this._previousDistance,await this._component.controls.zoomTo(1),e.updateProjectionMatrix(),this._component.controls.camera=e,this.camera=e,this.current="Perspective"}}class oh extends Gs{constructor(e){super(e),p(this,"projection"),p(this,"threeOrtho"),p(this,"threePersp"),p(this,"_userInputButtons",{}),p(this,"_frustumSize",50),p(this,"_navigationModes",new Map),p(this,"_mode",null),p(this,"previousSize",null),this.threePersp=this.three,this.threeOrtho=this.newOrthoCamera(),this.projection=new rh(this),this.onAspectUpdated.add(()=>{this.setOrthoPerspCameraAspect()}),this.projection.onChanged.add(t=>{this.three=t,this.updateAspect()}),this.onWorldChanged.add(({action:t})=>{t==="added"&&(this._navigationModes.clear(),this._navigationModes.set("Orbit",new ih(this)),this._navigationModes.set("FirstPerson",new sh(this)),this._navigationModes.set("Plan",new nh(this)),this._mode=this._navigationModes.get("Orbit"),this.mode.set(!0,{preventTargetAdjustment:!0}),this.currentWorld&&this.currentWorld.renderer&&(this.previousSize=this.currentWorld.renderer.getSize().clone()))})}get mode(){if(!this._mode)throw new Error("Mode not found, camera not initialized");return this._mode}dispose(){super.dispose(),this.threeOrtho.removeFromParent()}set(e){if(this.mode!==null&&this.mode.id!==e){if(this.mode.set(!1),!this._navigationModes.has(e))throw new Error("The specified mode does not exist!");this._mode=this._navigationModes.get(e),this.mode.set(!0)}}async fit(e,t=1.5){if(!this.enabled)return;const s=Number.MAX_VALUE,i=Number.MIN_VALUE,n=new U(s,s,s),r=new U(i,i,i);for(const I of e){const u=new Pe().setFromObject(I);u.min.xr.x&&(r.x=u.max.x),u.max.y>r.y&&(r.y=u.max.y),u.max.z>r.z&&(r.z=u.max.z)}const o=new Pe(n,r),a=new U;o.getSize(a);const c=new U;o.getCenter(c);const h=Math.max(a.x,a.y,a.z)*t,d=new wi(c,h);await this.controls.fitToSphere(d,!0)}setUserInput(e){e?this.enableUserInput():this.disableUserInput()}disableUserInput(){this._userInputButtons.left=this.controls.mouseButtons.left,this._userInputButtons.right=this.controls.mouseButtons.right,this._userInputButtons.middle=this.controls.mouseButtons.middle,this._userInputButtons.wheel=this.controls.mouseButtons.wheel,this.controls.mouseButtons.left=0,this.controls.mouseButtons.right=0,this.controls.mouseButtons.middle=0,this.controls.mouseButtons.wheel=0}enableUserInput(){Object.keys(this._userInputButtons).length!==0&&(this.controls.mouseButtons.left=this._userInputButtons.left,this.controls.mouseButtons.right=this._userInputButtons.right,this.controls.mouseButtons.middle=this._userInputButtons.middle,this.controls.mouseButtons.wheel=this._userInputButtons.wheel)}newOrthoCamera(){const e=window.innerWidth/window.innerHeight;return new Gt(this._frustumSize*e/-2,this._frustumSize*e/2,this._frustumSize/2,this._frustumSize/-2,.1,1e3)}setOrthoPerspCameraAspect(){if(!this.currentWorld||!this.currentWorld.renderer||!this.previousSize)return;const e=this.currentWorld.renderer.getSize(),t=this.threeOrtho.top,s=this.threeOrtho.right,i=e.y/this.previousSize.y,n=e.x/this.previousSize.x,r=t*i,o=s*n;this.threeOrtho.left=-o,this.threeOrtho.right=o,this.threeOrtho.top=r,this.threeOrtho.bottom=-r,this.threeOrtho.updateProjectionMatrix(),this.previousSize.copy(e)}}const qr=new Map([[Di,{forRelated:"Decomposes",forRelating:"IsDecomposedBy"}],[Bn,{forRelated:"HasAssociations",forRelating:"AssociatedTo"}],[Yn,{forRelated:"HasAssociations",forRelating:"ClassificationForObjects"}],[Vn,{forRelated:"HasAssignments",forRelating:"IsGroupedBy"}],[ks,{forRelated:"IsDefinedBy",forRelating:"DefinesOcurrence"}],[Gn,{forRelated:"IsTypedBy",forRelating:"Types"}],[zn,{forRelated:"IsDefinedBy",forRelating:"Defines"}],[Mi,{forRelated:"ContainedInStructure",forRelating:"ContainsElements"}],[kn,{forRelated:"AssignedToFlowElement",forRelating:"HasControlElements"}],[Hn,{forRelated:"ConnectedFrom",forRelating:"ConnectedTo"}],[Wn,{forRelated:"HasAssignments",forRelating:"ReferencedBy"}],[Xn,{forRelated:"HasContext",forRelating:"Declares"}],[Zn,{forRelated:"HasAssignments",forRelating:"Controls"}],[jn,{forRelated:"Nests",forRelating:"IsNestedBy"}],[$n,{forRelated:"HasAssociations",forRelating:"DocumentRefForObjects"}]]),_i={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 ls{static async getUnits(e){var t,s,i;const{IFCUNITASSIGNMENT:n}=ht,r=await e.getAllPropertiesOfType(n);if(!r)return 1;const o=Object.keys(r),a=r[parseInt(o[0],10)];for(const c of a.Units){if(c.value===void 0||c.value===null)continue;const h=await e.getProperties(c.value);if(!h||!h.UnitType||!h.UnitType.value||h.UnitType.value!=="LENGTHUNIT")continue;let d=1,I=1;return h.Name.value==="METRE"&&(I=1),h.Name.value==="FOOT"&&(I=.3048),((t=h.Prefix)==null?void 0:t.value)==="MILLI"?d=.001:((s=h.Prefix)==null?void 0:s.value)==="CENTI"?d=.01:((i=h.Prefix)==null?void 0:i.value)==="DECI"&&(d=.1),I*d}return 1}static async findItemByGuid(e,t){var s;const i=e.getAllPropertiesIDs();for(const n of i){const r=await e.getProperties(n);if(r&&((s=r.GlobalId)==null?void 0:s.value)===t)return r}return null}static async getRelationMap(e,t,s){var i;const n=s??(async()=>{}),r={},o=e.getAllPropertiesIDs();for(const a of o){const c=await e.getProperties(a);if(!c)continue;const h=c.type===t,d=Object.keys(c).find(T=>T.startsWith("Relating")),I=Object.keys(c).find(T=>T.startsWith("Related"));if(!(h&&d&&I))continue;const u=await e.getProperties((i=c[d])==null?void 0:i.value),f=c[I];if(!u||!f||!(f&&Array.isArray(f)))continue;const E=f.map(T=>T.value);await n(u.expressID,E),r[u.expressID]=E}return r}static async getQsetQuantities(e,t,s){const i=s??(()=>{}),n=await e.getProperties(t);return!n||n.type!==mi?null:(n.Quantities??[{}]).map(r=>(r.value&&i(r.value),r.value)).filter(r=>r!==null)}static async getPsetProps(e,t,s){const i=s??(()=>{}),n=await e.getProperties(t);return!n||n.type!==as?null:(n.HasProperties??[{}]).map(r=>(r.value&&i(r.value),r.value)).filter(r=>r!==null)}static async getPsetRel(e,t){var s;if(!await e.getProperties(t))return null;const i=await e.getAllPropertiesOfType(ks);if(!i)return null;const n=Object.values(i);let r=null;for(const o of n)((s=o.RelatingPropertyDefinition)==null?void 0:s.value)===t&&(r=o.expressID);return r}static async getQsetRel(e,t){return ls.getPsetRel(e,t)}static async getEntityName(e,t){var s;const i=await e.getProperties(t);if(!i)return{key:null,name:null};const n=Object.keys(i).find(o=>o.endsWith("Name"))??null,r=n?(s=i[n])==null?void 0:s.value:null;return{key:n,name:r}}static async getQuantityValue(e,t){const s=await e.getProperties(t);if(!s)return{key:null,value:null};const i=Object.keys(s).find(r=>r.endsWith("Value"))??null;let n;return i===null||s[i]===void 0||s[i]===null?n=null:n=s[i].value,{key:i,value:n}}static isRel(e){return _i[e].startsWith("IFCREL")}static async attributeExists(e,t,s){const i=await e.getProperties(t);return i?Object.keys(i).includes(s):!1}static async groupEntitiesByType(e,t){var s;const i=new Map;for(const n of t){const r=await e.getProperties(n);if(!r)continue;const o=r.type;i.get(o)||i.set(o,new Set),(s=i.get(o))==null||s.add(n)}return i}}const ah={IFCURIREFERENCE:"IfcUriReference",IFCTIME:"IfcTime",IFCTEMPERATURERATEOFCHANGEMEASURE:"IfcTemperatureRateOfChangeMeasure",IFCSOUNDPRESSURELEVELMEASURE:"IfcSoundPressureLevelMeasure",IFCSOUNDPOWERLEVELMEASURE:"IfcSoundPowerLevelMeasure",IFCPROPERTYSETDEFINITIONSET:"IfcPropertySetDefinitionSet",IFCPOSITIVEINTEGER:"IfcPositiveInteger",IFCNONNEGATIVELENGTHMEASURE:"IfcNonNegativeLengthMeasure",IFCLINEINDEX:"IfcLineIndex",IFCLANGUAGEID:"IfcLanguageId",IFCDURATION:"IfcDuration",IFCDAYINWEEKNUMBER:"IfcDayInWeekNumber",IFCDATETIME:"IfcDateTime",IFCDATE:"IfcDate",IFCCARDINALPOINTREFERENCE:"IfcCardinalPointReference",IFCBINARY:"IfcBinary",IFCAREADENSITYMEASURE:"IfcAreaDensityMeasure",IFCARCINDEX:"IfcArcIndex",IFCYEARNUMBER:"IfcYearNumber",IFCWARPINGMOMENTMEASURE:"IfcWarpingMomentMeasure",IFCWARPINGCONSTANTMEASURE:"IfcWarpingConstantMeasure",IFCVOLUMETRICFLOWRATEMEASURE:"IfcVolumetricFlowRateMeasure",IFCVOLUMEMEASURE:"IfcVolumeMeasure",IFCVAPORPERMEABILITYMEASURE:"IfcVaporPermeabilityMeasure",IFCTORQUEMEASURE:"IfcTorqueMeasure",IFCTIMESTAMP:"IfcTimestamp",IFCTIMEMEASURE:"IfcTimeMeasure",IFCTHERMODYNAMICTEMPERATUREMEASURE:"IfcThermodynamicTemperatureMeasure",IFCTHERMALTRANSMITTANCEMEASURE:"IfcThermalTransmittanceMeasure",IFCTHERMALRESISTANCEMEASURE:"IfcThermalResistanceMeasure",IFCTHERMALEXPANSIONCOEFFICIENTMEASURE:"IfcThermalExpansionCoefficientMeasure",IFCTHERMALCONDUCTIVITYMEASURE:"IfcThermalConductivityMeasure",IFCTHERMALADMITTANCEMEASURE:"IfcThermalAdmittanceMeasure",IFCTEXTTRANSFORMATION:"IfcTextTransformation",IFCTEXTFONTNAME:"IfcTextFontName",IFCTEXTDECORATION:"IfcTextDecoration",IFCTEXTALIGNMENT:"IfcTextAlignment",IFCTEXT:"IfcText",IFCTEMPERATUREGRADIENTMEASURE:"IfcTemperatureGradientMeasure",IFCSPECULARROUGHNESS:"IfcSpecularRoughness",IFCSPECULAREXPONENT:"IfcSpecularExponent",IFCSPECIFICHEATCAPACITYMEASURE:"IfcSpecificHeatCapacityMeasure",IFCSOUNDPRESSUREMEASURE:"IfcSoundPressureMeasure",IFCSOUNDPOWERMEASURE:"IfcSoundPowerMeasure",IFCSOLIDANGLEMEASURE:"IfcSolidAngleMeasure",IFCSHEARMODULUSMEASURE:"IfcShearModulusMeasure",IFCSECTIONALAREAINTEGRALMEASURE:"IfcSectionalAreaIntegralMeasure",IFCSECTIONMODULUSMEASURE:"IfcSectionModulusMeasure",IFCSECONDINMINUTE:"IfcSecondInMinute",IFCROTATIONALSTIFFNESSMEASURE:"IfcRotationalStiffnessMeasure",IFCROTATIONALMASSMEASURE:"IfcRotationalMassMeasure",IFCROTATIONALFREQUENCYMEASURE:"IfcRotationalFrequencyMeasure",IFCREAL:"IfcReal",IFCRATIOMEASURE:"IfcRatioMeasure",IFCRADIOACTIVITYMEASURE:"IfcRadioactivityMeasure",IFCPRESSUREMEASURE:"IfcPressureMeasure",IFCPRESENTABLETEXT:"IfcPresentableText",IFCPOWERMEASURE:"IfcPowerMeasure",IFCPOSITIVERATIOMEASURE:"IfcPositiveRatioMeasure",IFCPOSITIVEPLANEANGLEMEASURE:"IfcPositivePlaneAngleMeasure",IFCPOSITIVELENGTHMEASURE:"IfcPositiveLengthMeasure",IFCPLANEANGLEMEASURE:"IfcPlaneAngleMeasure",IFCPLANARFORCEMEASURE:"IfcPlanarForceMeasure",IFCPARAMETERVALUE:"IfcParameterValue",IFCPHMEASURE:"IfcPhMeasure",IFCNUMERICMEASURE:"IfcNumericMeasure",IFCNORMALISEDRATIOMEASURE:"IfcNormalisedRatioMeasure",IFCMONTHINYEARNUMBER:"IfcMonthInYearNumber",IFCMONETARYMEASURE:"IfcMonetaryMeasure",IFCMOMENTOFINERTIAMEASURE:"IfcMomentOfInertiaMeasure",IFCMOLECULARWEIGHTMEASURE:"IfcMolecularWeightMeasure",IFCMOISTUREDIFFUSIVITYMEASURE:"IfcMoistureDiffusivityMeasure",IFCMODULUSOFSUBGRADEREACTIONMEASURE:"IfcModulusOfSubgradeReactionMeasure",IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE:"IfcModulusOfRotationalSubgradeReactionMeasure",IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE:"IfcModulusOfLinearSubgradeReactionMeasure",IFCMODULUSOFELASTICITYMEASURE:"IfcModulusOfElasticityMeasure",IFCMINUTEINHOUR:"IfcMinuteInHour",IFCMASSPERLENGTHMEASURE:"IfcMassPerLengthMeasure",IFCMASSMEASURE:"IfcMassMeasure",IFCMASSFLOWRATEMEASURE:"IfcMassFlowRateMeasure",IFCMASSDENSITYMEASURE:"IfcMassDensityMeasure",IFCMAGNETICFLUXMEASURE:"IfcMagneticFluxMeasure",IFCMAGNETICFLUXDENSITYMEASURE:"IfcMagneticFluxDensityMeasure",IFCLUMINOUSINTENSITYMEASURE:"IfcLuminousIntensityMeasure",IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE:"IfcLuminousIntensityDistributionMeasure",IFCLUMINOUSFLUXMEASURE:"IfcLuminousFluxMeasure",IFCLOGICAL:"IfcLogical",IFCLINEARVELOCITYMEASURE:"IfcLinearVelocityMeasure",IFCLINEARSTIFFNESSMEASURE:"IfcLinearStiffnessMeasure",IFCLINEARMOMENTMEASURE:"IfcLinearMomentMeasure",IFCLINEARFORCEMEASURE:"IfcLinearForceMeasure",IFCLENGTHMEASURE:"IfcLengthMeasure",IFCLABEL:"IfcLabel",IFCKINEMATICVISCOSITYMEASURE:"IfcKinematicViscosityMeasure",IFCISOTHERMALMOISTURECAPACITYMEASURE:"IfcIsothermalMoistureCapacityMeasure",IFCIONCONCENTRATIONMEASURE:"IfcIonConcentrationMeasure",IFCINTEGERCOUNTRATEMEASURE:"IfcIntegerCountRateMeasure",IFCINTEGER:"IfcInteger",IFCINDUCTANCEMEASURE:"IfcInductanceMeasure",IFCILLUMINANCEMEASURE:"IfcIlluminanceMeasure",IFCIDENTIFIER:"IfcIdentifier",IFCHOURINDAY:"IfcHourInDay",IFCHEATINGVALUEMEASURE:"IfcHeatingValueMeasure",IFCHEATFLUXDENSITYMEASURE:"IfcHeatFluxDensityMeasure",IFCGLOBALLYUNIQUEID:"IfcGloballyUniqueId",IFCFREQUENCYMEASURE:"IfcFrequencyMeasure",IFCFORCEMEASURE:"IfcForceMeasure",IFCFONTWEIGHT:"IfcFontWeight",IFCFONTVARIANT:"IfcFontVariant",IFCFONTSTYLE:"IfcFontStyle",IFCENERGYMEASURE:"IfcEnergyMeasure",IFCELECTRICVOLTAGEMEASURE:"IfcElectricVoltageMeasure",IFCELECTRICRESISTANCEMEASURE:"IfcElectricResistanceMeasure",IFCELECTRICCURRENTMEASURE:"IfcElectricCurrentMeasure",IFCELECTRICCONDUCTANCEMEASURE:"IfcElectricConductanceMeasure",IFCELECTRICCHARGEMEASURE:"IfcElectricChargeMeasure",IFCELECTRICCAPACITANCEMEASURE:"IfcElectricCapacitanceMeasure",IFCDYNAMICVISCOSITYMEASURE:"IfcDynamicViscosityMeasure",IFCDOSEEQUIVALENTMEASURE:"IfcDoseEquivalentMeasure",IFCDIMENSIONCOUNT:"IfcDimensionCount",IFCDESCRIPTIVEMEASURE:"IfcDescriptiveMeasure",IFCDAYLIGHTSAVINGHOUR:"IfcDaylightSavingHour",IFCDAYINMONTHNUMBER:"IfcDayInMonthNumber",IFCCURVATUREMEASURE:"IfcCurvatureMeasure",IFCCOUNTMEASURE:"IfcCountMeasure",IFCCONTEXTDEPENDENTMEASURE:"IfcContextDependentMeasure",IFCCOMPOUNDPLANEANGLEMEASURE:"IfcCompoundPlaneAngleMeasure",IFCCOMPLEXNUMBER:"IfcComplexNumber",IFCBOXALIGNMENT:"IfcBoxAlignment",IFCBOOLEAN:"IfcBoolean",IFCAREAMEASURE:"IfcAreaMeasure",IFCANGULARVELOCITYMEASURE:"IfcAngularVelocityMeasure",IFCAMOUNTOFSUBSTANCEMEASURE:"IfcAmountOfSubstanceMeasure",IFCACCELERATIONMEASURE:"IfcAccelerationMeasure",IFCABSORBEDDOSEMEASURE:"IfcAbsorbedDoseMeasure",IFCGEOSLICE:"IfcGeoSlice",IFCGEOMODEL:"IfcGeoModel",IFCELECTRICFLOWTREATMENTDEVICE:"IfcElectricFlowTreatmentDevice",IFCDISTRIBUTIONBOARD:"IfcDistributionBoard",IFCCONVEYORSEGMENT:"IfcConveyorSegment",IFCCAISSONFOUNDATION:"IfcCaissonFoundation",IFCBOREHOLE:"IfcBorehole",IFCBEARING:"IfcBearing",IFCALIGNMENT:"IfcAlignment",IFCTRACKELEMENT:"IfcTrackElement",IFCSIGNAL:"IfcSignal",IFCREINFORCEDSOIL:"IfcReinforcedSoil",IFCRAIL:"IfcRail",IFCPAVEMENT:"IfcPavement",IFCNAVIGATIONELEMENT:"IfcNavigationElement",IFCMOORINGDEVICE:"IfcMooringDevice",IFCMOBILETELECOMMUNICATIONSAPPLIANCE:"IfcMobileTelecommunicationsAppliance",IFCLIQUIDTERMINAL:"IfcLiquidTerminal",IFCLINEARPOSITIONINGELEMENT:"IfcLinearPositioningElement",IFCKERB:"IfcKerb",IFCGEOTECHNICALASSEMBLY:"IfcGeotechnicalAssembly",IFCELECTRICFLOWTREATMENTDEVICETYPE:"IfcElectricFlowTreatmentDeviceType",IFCEARTHWORKSFILL:"IfcEarthworksFill",IFCEARTHWORKSELEMENT:"IfcEarthworksElement",IFCEARTHWORKSCUT:"IfcEarthworksCut",IFCDISTRIBUTIONBOARDTYPE:"IfcDistributionBoardType",IFCDEEPFOUNDATION:"IfcDeepFoundation",IFCCOURSE:"IfcCourse",IFCCONVEYORSEGMENTTYPE:"IfcConveyorSegmentType",IFCCAISSONFOUNDATIONTYPE:"IfcCaissonFoundationType",IFCBUILTSYSTEM:"IfcBuiltSystem",IFCBUILTELEMENT:"IfcBuiltElement",IFCBRIDGEPART:"IfcBridgePart",IFCBRIDGE:"IfcBridge",IFCBEARINGTYPE:"IfcBearingType",IFCALIGNMENTVERTICAL:"IfcAlignmentVertical",IFCALIGNMENTSEGMENT:"IfcAlignmentSegment",IFCALIGNMENTHORIZONTAL:"IfcAlignmentHorizontal",IFCALIGNMENTCANT:"IfcAlignmentCant",IFCVIBRATIONDAMPERTYPE:"IfcVibrationDamperType",IFCVIBRATIONDAMPER:"IfcVibrationDamper",IFCVEHICLE:"IfcVehicle",IFCTRANSPORTATIONDEVICE:"IfcTransportationDevice",IFCTRACKELEMENTTYPE:"IfcTrackElementType",IFCTENDONCONDUITTYPE:"IfcTendonConduitType",IFCTENDONCONDUIT:"IfcTendonConduit",IFCSINESPIRAL:"IfcSineSpiral",IFCSIGNALTYPE:"IfcSignalType",IFCSIGNTYPE:"IfcSignType",IFCSIGN:"IfcSign",IFCSEVENTHORDERPOLYNOMIALSPIRAL:"IfcSeventhOrderPolynomialSpiral",IFCSEGMENTEDREFERENCECURVE:"IfcSegmentedReferenceCurve",IFCSECONDORDERPOLYNOMIALSPIRAL:"IfcSecondOrderPolynomialSpiral",IFCROADPART:"IfcRoadPart",IFCROAD:"IfcRoad",IFCRELADHERESTOELEMENT:"IfcRelAdheresToElement",IFCREFERENT:"IfcReferent",IFCRAILWAYPART:"IfcRailwayPart",IFCRAILWAY:"IfcRailway",IFCRAILTYPE:"IfcRailType",IFCPOSITIONINGELEMENT:"IfcPositioningElement",IFCPAVEMENTTYPE:"IfcPavementType",IFCNAVIGATIONELEMENTTYPE:"IfcNavigationElementType",IFCMOORINGDEVICETYPE:"IfcMooringDeviceType",IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE:"IfcMobileTelecommunicationsApplianceType",IFCMARINEPART:"IfcMarinePart",IFCMARINEFACILITY:"IfcMarineFacility",IFCLIQUIDTERMINALTYPE:"IfcLiquidTerminalType",IFCLINEARELEMENT:"IfcLinearElement",IFCKERBTYPE:"IfcKerbType",IFCIMPACTPROTECTIONDEVICETYPE:"IfcImpactProtectionDeviceType",IFCIMPACTPROTECTIONDEVICE:"IfcImpactProtectionDevice",IFCGRADIENTCURVE:"IfcGradientCurve",IFCGEOTECHNICALSTRATUM:"IfcGeotechnicalStratum",IFCGEOTECHNICALELEMENT:"IfcGeotechnicalElement",IFCFACILITYPARTCOMMON:"IfcFacilityPartCommon",IFCFACILITYPART:"IfcFacilityPart",IFCFACILITY:"IfcFacility",IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID:"IfcDirectrixDerivedReferenceSweptAreaSolid",IFCDEEPFOUNDATIONTYPE:"IfcDeepFoundationType",IFCCOURSETYPE:"IfcCourseType",IFCCOSINESPIRAL:"IfcCosineSpiral",IFCCLOTHOID:"IfcClothoid",IFCBUILTELEMENTTYPE:"IfcBuiltElementType",IFCVEHICLETYPE:"IfcVehicleType",IFCTRIANGULATEDIRREGULARNETWORK:"IfcTriangulatedIrregularNetwork",IFCTRANSPORTATIONDEVICETYPE:"IfcTransportationDeviceType",IFCTHIRDORDERPOLYNOMIALSPIRAL:"IfcThirdOrderPolynomialSpiral",IFCSPIRAL:"IfcSpiral",IFCSECTIONEDSURFACE:"IfcSectionedSurface",IFCSECTIONEDSOLIDHORIZONTAL:"IfcSectionedSolidHorizontal",IFCSECTIONEDSOLID:"IfcSectionedSolid",IFCRELPOSITIONS:"IfcRelPositions",IFCRELASSOCIATESPROFILEDEF:"IfcRelAssociatesProfileDef",IFCPOLYNOMIALCURVE:"IfcPolynomialCurve",IFCOFFSETCURVEBYDISTANCES:"IfcOffsetCurveByDistances",IFCOFFSETCURVE:"IfcOffsetCurve",IFCINDEXEDPOLYGONALTEXTUREMAP:"IfcIndexedPolygonalTextureMap",IFCDIRECTRIXCURVESWEPTAREASOLID:"IfcDirectrixCurveSweptAreaSolid",IFCCURVESEGMENT:"IfcCurveSegment",IFCAXIS2PLACEMENTLINEAR:"IfcAxis2PlacementLinear",IFCSEGMENT:"IfcSegment",IFCPOINTBYDISTANCEEXPRESSION:"IfcPointByDistanceExpression",IFCOPENCROSSPROFILEDEF:"IfcOpenCrossProfileDef",IFCLINEARPLACEMENT:"IfcLinearPlacement",IFCALIGNMENTHORIZONTALSEGMENT:"IfcAlignmentHorizontalSegment",IFCALIGNMENTCANTSEGMENT:"IfcAlignmentCantSegment",IFCTEXTURECOORDINATEINDICESWITHVOIDS:"IfcTextureCoordinateIndicesWithVoids",IFCTEXTURECOORDINATEINDICES:"IfcTextureCoordinateIndices",IFCQUANTITYNUMBER:"IfcQuantityNumber",IFCALIGNMENTVERTICALSEGMENT:"IfcAlignmentVerticalSegment",IFCALIGNMENTPARAMETERSEGMENT:"IfcAlignmentParameterSegment",IFCCONTROLLER:"IfcController",IFCALARM:"IfcAlarm",IFCACTUATOR:"IfcActuator",IFCUNITARYCONTROLELEMENT:"IfcUnitaryControlElement",IFCSENSOR:"IfcSensor",IFCPROTECTIVEDEVICETRIPPINGUNIT:"IfcProtectiveDeviceTrippingUnit",IFCFLOWINSTRUMENT:"IfcFlowInstrument",IFCFIRESUPPRESSIONTERMINAL:"IfcFireSuppressionTerminal",IFCFILTER:"IfcFilter",IFCFAN:"IfcFan",IFCELECTRICTIMECONTROL:"IfcElectricTimeControl",IFCELECTRICMOTOR:"IfcElectricMotor",IFCELECTRICGENERATOR:"IfcElectricGenerator",IFCELECTRICFLOWSTORAGEDEVICE:"IfcElectricFlowStorageDevice",IFCELECTRICDISTRIBUTIONBOARD:"IfcElectricDistributionBoard",IFCELECTRICAPPLIANCE:"IfcElectricAppliance",IFCDUCTSILENCER:"IfcDuctSilencer",IFCDUCTSEGMENT:"IfcDuctSegment",IFCDUCTFITTING:"IfcDuctFitting",IFCDISTRIBUTIONCIRCUIT:"IfcDistributionCircuit",IFCDAMPER:"IfcDamper",IFCCOOLINGTOWER:"IfcCoolingTower",IFCCOOLEDBEAM:"IfcCooledBeam",IFCCONDENSER:"IfcCondenser",IFCCOMPRESSOR:"IfcCompressor",IFCCOMMUNICATIONSAPPLIANCE:"IfcCommunicationsAppliance",IFCCOIL:"IfcCoil",IFCCHILLER:"IfcChiller",IFCCABLESEGMENT:"IfcCableSegment",IFCCABLEFITTING:"IfcCableFitting",IFCCABLECARRIERSEGMENT:"IfcCableCarrierSegment",IFCCABLECARRIERFITTING:"IfcCableCarrierFitting",IFCBURNER:"IfcBurner",IFCBOILER:"IfcBoiler",IFCBEAMSTANDARDCASE:"IfcBeamStandardCase",IFCAUDIOVISUALAPPLIANCE:"IfcAudioVisualAppliance",IFCAIRTOAIRHEATRECOVERY:"IfcAirToAirHeatRecovery",IFCAIRTERMINALBOX:"IfcAirTerminalBox",IFCAIRTERMINAL:"IfcAirTerminal",IFCWINDOWSTANDARDCASE:"IfcWindowStandardCase",IFCWASTETERMINAL:"IfcWasteTerminal",IFCWALLELEMENTEDCASE:"IfcWallElementedCase",IFCVALVE:"IfcValve",IFCUNITARYEQUIPMENT:"IfcUnitaryEquipment",IFCUNITARYCONTROLELEMENTTYPE:"IfcUnitaryControlElementType",IFCTUBEBUNDLE:"IfcTubeBundle",IFCTRANSFORMER:"IfcTransformer",IFCTANK:"IfcTank",IFCSWITCHINGDEVICE:"IfcSwitchingDevice",IFCSTRUCTURALLOADCASE:"IfcStructuralLoadCase",IFCSTACKTERMINAL:"IfcStackTerminal",IFCSPACEHEATER:"IfcSpaceHeater",IFCSOLARDEVICE:"IfcSolarDevice",IFCSLABSTANDARDCASE:"IfcSlabStandardCase",IFCSLABELEMENTEDCASE:"IfcSlabElementedCase",IFCSHADINGDEVICE:"IfcShadingDevice",IFCSANITARYTERMINAL:"IfcSanitaryTerminal",IFCREINFORCINGBARTYPE:"IfcReinforcingBarType",IFCRATIONALBSPLINECURVEWITHKNOTS:"IfcRationalBSplineCurveWithKnots",IFCPUMP:"IfcPump",IFCPROTECTIVEDEVICETRIPPINGUNITTYPE:"IfcProtectiveDeviceTrippingUnitType",IFCPROTECTIVEDEVICE:"IfcProtectiveDevice",IFCPLATESTANDARDCASE:"IfcPlateStandardCase",IFCPIPESEGMENT:"IfcPipeSegment",IFCPIPEFITTING:"IfcPipeFitting",IFCOUTLET:"IfcOutlet",IFCOUTERBOUNDARYCURVE:"IfcOuterBoundaryCurve",IFCMOTORCONNECTION:"IfcMotorConnection",IFCMEMBERSTANDARDCASE:"IfcMemberStandardCase",IFCMEDICALDEVICE:"IfcMedicalDevice",IFCLIGHTFIXTURE:"IfcLightFixture",IFCLAMP:"IfcLamp",IFCJUNCTIONBOX:"IfcJunctionBox",IFCINTERCEPTOR:"IfcInterceptor",IFCHUMIDIFIER:"IfcHumidifier",IFCHEATEXCHANGER:"IfcHeatExchanger",IFCFLOWMETER:"IfcFlowMeter",IFCEXTERNALSPATIALELEMENT:"IfcExternalSpatialElement",IFCEVAPORATOR:"IfcEvaporator",IFCEVAPORATIVECOOLER:"IfcEvaporativeCooler",IFCENGINE:"IfcEngine",IFCELECTRICDISTRIBUTIONBOARDTYPE:"IfcElectricDistributionBoardType",IFCDOORSTANDARDCASE:"IfcDoorStandardCase",IFCDISTRIBUTIONSYSTEM:"IfcDistributionSystem",IFCCOMMUNICATIONSAPPLIANCETYPE:"IfcCommunicationsApplianceType",IFCCOLUMNSTANDARDCASE:"IfcColumnStandardCase",IFCCIVILELEMENT:"IfcCivilElement",IFCCHIMNEY:"IfcChimney",IFCCABLEFITTINGTYPE:"IfcCableFittingType",IFCBURNERTYPE:"IfcBurnerType",IFCBUILDINGSYSTEM:"IfcBuildingSystem",IFCBUILDINGELEMENTPARTTYPE:"IfcBuildingElementPartType",IFCBOUNDARYCURVE:"IfcBoundaryCurve",IFCBSPLINECURVEWITHKNOTS:"IfcBSplineCurveWithKnots",IFCAUDIOVISUALAPPLIANCETYPE:"IfcAudioVisualApplianceType",IFCWORKCALENDAR:"IfcWorkCalendar",IFCWINDOWTYPE:"IfcWindowType",IFCVOIDINGFEATURE:"IfcVoidingFeature",IFCVIBRATIONISOLATOR:"IfcVibrationIsolator",IFCTENDONTYPE:"IfcTendonType",IFCTENDONANCHORTYPE:"IfcTendonAnchorType",IFCSYSTEMFURNITUREELEMENT:"IfcSystemFurnitureElement",IFCSURFACEFEATURE:"IfcSurfaceFeature",IFCSTRUCTURALSURFACEACTION:"IfcStructuralSurfaceAction",IFCSTRUCTURALCURVEREACTION:"IfcStructuralCurveReaction",IFCSTRUCTURALCURVEACTION:"IfcStructuralCurveAction",IFCSTAIRTYPE:"IfcStairType",IFCSOLARDEVICETYPE:"IfcSolarDeviceType",IFCSHADINGDEVICETYPE:"IfcShadingDeviceType",IFCSEAMCURVE:"IfcSeamCurve",IFCROOFTYPE:"IfcRoofType",IFCREINFORCINGMESHTYPE:"IfcReinforcingMeshType",IFCREINFORCINGELEMENTTYPE:"IfcReinforcingElementType",IFCRATIONALBSPLINESURFACEWITHKNOTS:"IfcRationalBSplineSurfaceWithKnots",IFCRAMPTYPE:"IfcRampType",IFCPOLYGONALFACESET:"IfcPolygonalFaceSet",IFCPILETYPE:"IfcPileType",IFCOPENINGSTANDARDCASE:"IfcOpeningStandardCase",IFCMEDICALDEVICETYPE:"IfcMedicalDeviceType",IFCINTERSECTIONCURVE:"IfcIntersectionCurve",IFCINTERCEPTORTYPE:"IfcInterceptorType",IFCINDEXEDPOLYCURVE:"IfcIndexedPolyCurve",IFCGEOGRAPHICELEMENT:"IfcGeographicElement",IFCFURNITURE:"IfcFurniture",IFCFOOTINGTYPE:"IfcFootingType",IFCEXTERNALSPATIALSTRUCTUREELEMENT:"IfcExternalSpatialStructureElement",IFCEVENT:"IfcEvent",IFCENGINETYPE:"IfcEngineType",IFCELEMENTASSEMBLYTYPE:"IfcElementAssemblyType",IFCDOORTYPE:"IfcDoorType",IFCCYLINDRICALSURFACE:"IfcCylindricalSurface",IFCCONSTRUCTIONPRODUCTRESOURCETYPE:"IfcConstructionProductResourceType",IFCCONSTRUCTIONMATERIALRESOURCETYPE:"IfcConstructionMaterialResourceType",IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE:"IfcConstructionEquipmentResourceType",IFCCOMPOSITECURVEONSURFACE:"IfcCompositeCurveOnSurface",IFCCOMPLEXPROPERTYTEMPLATE:"IfcComplexPropertyTemplate",IFCCIVILELEMENTTYPE:"IfcCivilElementType",IFCCHIMNEYTYPE:"IfcChimneyType",IFCBSPLINESURFACEWITHKNOTS:"IfcBSplineSurfaceWithKnots",IFCBSPLINESURFACE:"IfcBSplineSurface",IFCADVANCEDBREPWITHVOIDS:"IfcAdvancedBrepWithVoids",IFCADVANCEDBREP:"IfcAdvancedBrep",IFCTRIANGULATEDFACESET:"IfcTriangulatedFaceSet",IFCTOROIDALSURFACE:"IfcToroidalSurface",IFCTESSELLATEDFACESET:"IfcTessellatedFaceSet",IFCTASKTYPE:"IfcTaskType",IFCSURFACECURVE:"IfcSurfaceCurve",IFCSUBCONTRACTRESOURCETYPE:"IfcSubContractResourceType",IFCSTRUCTURALSURFACEREACTION:"IfcStructuralSurfaceReaction",IFCSPHERICALSURFACE:"IfcSphericalSurface",IFCSPATIALZONETYPE:"IfcSpatialZoneType",IFCSPATIALZONE:"IfcSpatialZone",IFCSPATIALELEMENTTYPE:"IfcSpatialElementType",IFCSPATIALELEMENT:"IfcSpatialElement",IFCSIMPLEPROPERTYTEMPLATE:"IfcSimplePropertyTemplate",IFCREVOLVEDAREASOLIDTAPERED:"IfcRevolvedAreaSolidTapered",IFCREPARAMETRISEDCOMPOSITECURVESEGMENT:"IfcReparametrisedCompositeCurveSegment",IFCRELSPACEBOUNDARY2NDLEVEL:"IfcRelSpaceBoundary2ndLevel",IFCRELSPACEBOUNDARY1STLEVEL:"IfcRelSpaceBoundary1stLevel",IFCRELINTERFERESELEMENTS:"IfcRelInterferesElements",IFCRELDEFINESBYTEMPLATE:"IfcRelDefinesByTemplate",IFCRELDEFINESBYOBJECT:"IfcRelDefinesByObject",IFCRELDECLARES:"IfcRelDeclares",IFCRELASSIGNSTOGROUPBYFACTOR:"IfcRelAssignsToGroupByFactor",IFCPROPERTYTEMPLATE:"IfcPropertyTemplate",IFCPROPERTYSETTEMPLATE:"IfcPropertySetTemplate",IFCPROJECTLIBRARY:"IfcProjectLibrary",IFCPROCEDURETYPE:"IfcProcedureType",IFCPREDEFINEDPROPERTYSET:"IfcPredefinedPropertySet",IFCPCURVE:"IfcPCurve",IFCLABORRESOURCETYPE:"IfcLaborResourceType",IFCINDEXEDPOLYGONALFACEWITHVOIDS:"IfcIndexedPolygonalFaceWithVoids",IFCINDEXEDPOLYGONALFACE:"IfcIndexedPolygonalFace",IFCGEOGRAPHICELEMENTTYPE:"IfcGeographicElementType",IFCFIXEDREFERENCESWEPTAREASOLID:"IfcFixedReferenceSweptAreaSolid",IFCEXTRUDEDAREASOLIDTAPERED:"IfcExtrudedAreaSolidTapered",IFCEVENTTYPE:"IfcEventType",IFCCURVEBOUNDEDSURFACE:"IfcCurveBoundedSurface",IFCCREWRESOURCETYPE:"IfcCrewResourceType",IFCCONTEXT:"IfcContext",IFCCONSTRUCTIONRESOURCETYPE:"IfcConstructionResourceType",IFCCARTESIANPOINTLIST3D:"IfcCartesianPointList3D",IFCCARTESIANPOINTLIST2D:"IfcCartesianPointList2D",IFCCARTESIANPOINTLIST:"IfcCartesianPointList",IFCADVANCEDFACE:"IfcAdvancedFace",IFCTYPERESOURCE:"IfcTypeResource",IFCTYPEPROCESS:"IfcTypeProcess",IFCTESSELLATEDITEM:"IfcTessellatedItem",IFCSWEPTDISKSOLIDPOLYGONAL:"IfcSweptDiskSolidPolygonal",IFCRESOURCETIME:"IfcResourceTime",IFCRESOURCECONSTRAINTRELATIONSHIP:"IfcResourceConstraintRelationship",IFCRESOURCEAPPROVALRELATIONSHIP:"IfcResourceApprovalRelationship",IFCQUANTITYSET:"IfcQuantitySet",IFCPROPERTYTEMPLATEDEFINITION:"IfcPropertyTemplateDefinition",IFCPREDEFINEDPROPERTIES:"IfcPredefinedProperties",IFCMIRROREDPROFILEDEF:"IfcMirroredProfileDef",IFCMATERIALRELATIONSHIP:"IfcMaterialRelationship",IFCMATERIALPROFILESETUSAGETAPERING:"IfcMaterialProfileSetUsageTapering",IFCMATERIALPROFILESETUSAGE:"IfcMaterialProfileSetUsage",IFCMATERIALCONSTITUENTSET:"IfcMaterialConstituentSet",IFCMATERIALCONSTITUENT:"IfcMaterialConstituent",IFCLAGTIME:"IfcLagTime",IFCINDEXEDTRIANGLETEXTUREMAP:"IfcIndexedTriangleTextureMap",IFCINDEXEDTEXTUREMAP:"IfcIndexedTextureMap",IFCINDEXEDCOLOURMAP:"IfcIndexedColourMap",IFCEXTERNALREFERENCERELATIONSHIP:"IfcExternalReferenceRelationship",IFCEXTENDEDPROPERTIES:"IfcExtendedProperties",IFCEVENTTIME:"IfcEventTime",IFCCONVERSIONBASEDUNITWITHOFFSET:"IfcConversionBasedUnitWithOffset",IFCCOLOURRGBLIST:"IfcColourRgbList",IFCWORKTIME:"IfcWorkTime",IFCTIMEPERIOD:"IfcTimePeriod",IFCTEXTUREVERTEXLIST:"IfcTextureVertexList",IFCTASKTIMERECURRING:"IfcTaskTimeRecurring",IFCTASKTIME:"IfcTaskTime",IFCTABLECOLUMN:"IfcTableColumn",IFCSURFACEREINFORCEMENTAREA:"IfcSurfaceReinforcementArea",IFCSTRUCTURALLOADORRESULT:"IfcStructuralLoadOrResult",IFCSTRUCTURALLOADCONFIGURATION:"IfcStructuralLoadConfiguration",IFCSCHEDULINGTIME:"IfcSchedulingTime",IFCRESOURCELEVELRELATIONSHIP:"IfcResourceLevelRelationship",IFCREFERENCE:"IfcReference",IFCRECURRENCEPATTERN:"IfcRecurrencePattern",IFCPROPERTYABSTRACTION:"IfcPropertyAbstraction",IFCPROJECTEDCRS:"IfcProjectedCrs",IFCPRESENTATIONITEM:"IfcPresentationItem",IFCMATERIALUSAGEDEFINITION:"IfcMaterialUsageDefinition",IFCMATERIALPROFILEWITHOFFSETS:"IfcMaterialProfileWithOffsets",IFCMATERIALPROFILESET:"IfcMaterialProfileSet",IFCMATERIALPROFILE:"IfcMaterialProfile",IFCMATERIALLAYERWITHOFFSETS:"IfcMaterialLayerWithOffsets",IFCMATERIALDEFINITION:"IfcMaterialDefinition",IFCMAPCONVERSION:"IfcMapConversion",IFCEXTERNALINFORMATION:"IfcExternalInformation",IFCCOORDINATEREFERENCESYSTEM:"IfcCoordinateReferenceSystem",IFCCOORDINATEOPERATION:"IfcCoordinateOperation",IFCCONNECTIONVOLUMEGEOMETRY:"IfcConnectionVolumeGeometry",IFCREINFORCINGBAR:"IfcReinforcingBar",IFCELECTRICDISTRIBUTIONPOINT:"IfcElectricDistributionPoint",IFCDISTRIBUTIONCONTROLELEMENT:"IfcDistributionControlElement",IFCDISTRIBUTIONCHAMBERELEMENT:"IfcDistributionChamberElement",IFCCONTROLLERTYPE:"IfcControllerType",IFCCHAMFEREDGEFEATURE:"IfcChamferEdgeFeature",IFCBEAM:"IfcBeam",IFCALARMTYPE:"IfcAlarmType",IFCACTUATORTYPE:"IfcActuatorType",IFCWINDOW:"IfcWindow",IFCWALLSTANDARDCASE:"IfcWallStandardCase",IFCWALL:"IfcWall",IFCVIBRATIONISOLATORTYPE:"IfcVibrationIsolatorType",IFCTENDONANCHOR:"IfcTendonAnchor",IFCTENDON:"IfcTendon",IFCSTRUCTURALANALYSISMODEL:"IfcStructuralAnalysisModel",IFCSTAIRFLIGHT:"IfcStairFlight",IFCSTAIR:"IfcStair",IFCSLAB:"IfcSlab",IFCSENSORTYPE:"IfcSensorType",IFCROUNDEDEDGEFEATURE:"IfcRoundedEdgeFeature",IFCROOF:"IfcRoof",IFCREINFORCINGMESH:"IfcReinforcingMesh",IFCREINFORCINGELEMENT:"IfcReinforcingElement",IFCRATIONALBEZIERCURVE:"IfcRationalBezierCurve",IFCRAMPFLIGHT:"IfcRampFlight",IFCRAMP:"IfcRamp",IFCRAILING:"IfcRailing",IFCPLATE:"IfcPlate",IFCPILE:"IfcPile",IFCMEMBER:"IfcMember",IFCFOOTING:"IfcFooting",IFCFLOWTREATMENTDEVICE:"IfcFlowTreatmentDevice",IFCFLOWTERMINAL:"IfcFlowTerminal",IFCFLOWSTORAGEDEVICE:"IfcFlowStorageDevice",IFCFLOWSEGMENT:"IfcFlowSegment",IFCFLOWMOVINGDEVICE:"IfcFlowMovingDevice",IFCFLOWINSTRUMENTTYPE:"IfcFlowInstrumentType",IFCFLOWFITTING:"IfcFlowFitting",IFCFLOWCONTROLLER:"IfcFlowController",IFCFIRESUPPRESSIONTERMINALTYPE:"IfcFireSuppressionTerminalType",IFCFILTERTYPE:"IfcFilterType",IFCFANTYPE:"IfcFanType",IFCENERGYCONVERSIONDEVICE:"IfcEnergyConversionDevice",IFCELECTRICALELEMENT:"IfcElectricalElement",IFCELECTRICALCIRCUIT:"IfcElectricalCircuit",IFCELECTRICTIMECONTROLTYPE:"IfcElectricTimeControlType",IFCELECTRICMOTORTYPE:"IfcElectricMotorType",IFCELECTRICHEATERTYPE:"IfcElectricHeaterType",IFCELECTRICGENERATORTYPE:"IfcElectricGeneratorType",IFCELECTRICFLOWSTORAGEDEVICETYPE:"IfcElectricFlowStorageDeviceType",IFCELECTRICAPPLIANCETYPE:"IfcElectricApplianceType",IFCEDGEFEATURE:"IfcEdgeFeature",IFCDUCTSILENCERTYPE:"IfcDuctSilencerType",IFCDUCTSEGMENTTYPE:"IfcDuctSegmentType",IFCDUCTFITTINGTYPE:"IfcDuctFittingType",IFCDOOR:"IfcDoor",IFCDISTRIBUTIONPORT:"IfcDistributionPort",IFCDISTRIBUTIONFLOWELEMENT:"IfcDistributionFlowElement",IFCDISTRIBUTIONELEMENT:"IfcDistributionElement",IFCDISTRIBUTIONCONTROLELEMENTTYPE:"IfcDistributionControlElementType",IFCDISTRIBUTIONCHAMBERELEMENTTYPE:"IfcDistributionChamberElementType",IFCDISCRETEACCESSORYTYPE:"IfcDiscreteAccessoryType",IFCDISCRETEACCESSORY:"IfcDiscreteAccessory",IFCDIAMETERDIMENSION:"IfcDiameterDimension",IFCDAMPERTYPE:"IfcDamperType",IFCCURTAINWALL:"IfcCurtainWall",IFCCOVERING:"IfcCovering",IFCCOOLINGTOWERTYPE:"IfcCoolingTowerType",IFCCOOLEDBEAMTYPE:"IfcCooledBeamType",IFCCONSTRUCTIONPRODUCTRESOURCE:"IfcConstructionProductResource",IFCCONSTRUCTIONMATERIALRESOURCE:"IfcConstructionMaterialResource",IFCCONSTRUCTIONEQUIPMENTRESOURCE:"IfcConstructionEquipmentResource",IFCCONDITIONCRITERION:"IfcConditionCriterion",IFCCONDITION:"IfcCondition",IFCCONDENSERTYPE:"IfcCondenserType",IFCCOMPRESSORTYPE:"IfcCompressorType",IFCCOLUMN:"IfcColumn",IFCCOILTYPE:"IfcCoilType",IFCCIRCLE:"IfcCircle",IFCCHILLERTYPE:"IfcChillerType",IFCCABLESEGMENTTYPE:"IfcCableSegmentType",IFCCABLECARRIERSEGMENTTYPE:"IfcCableCarrierSegmentType",IFCCABLECARRIERFITTINGTYPE:"IfcCableCarrierFittingType",IFCBUILDINGELEMENTPROXYTYPE:"IfcBuildingElementProxyType",IFCBUILDINGELEMENTPROXY:"IfcBuildingElementProxy",IFCBUILDINGELEMENTPART:"IfcBuildingElementPart",IFCBUILDINGELEMENTCOMPONENT:"IfcBuildingElementComponent",IFCBUILDINGELEMENT:"IfcBuildingElement",IFCBOILERTYPE:"IfcBoilerType",IFCBEZIERCURVE:"IfcBezierCurve",IFCBEAMTYPE:"IfcBeamType",IFCBSPLINECURVE:"IfcBSplineCurve",IFCASSET:"IfcAsset",IFCANGULARDIMENSION:"IfcAngularDimension",IFCAIRTOAIRHEATRECOVERYTYPE:"IfcAirToAirHeatRecoveryType",IFCAIRTERMINALTYPE:"IfcAirTerminalType",IFCAIRTERMINALBOXTYPE:"IfcAirTerminalBoxType",IFCACTIONREQUEST:"IfcActionRequest",IFC2DCOMPOSITECURVE:"Ifc2DCompositeCurve",IFCZONE:"IfcZone",IFCWORKSCHEDULE:"IfcWorkSchedule",IFCWORKPLAN:"IfcWorkPlan",IFCWORKCONTROL:"IfcWorkControl",IFCWASTETERMINALTYPE:"IfcWasteTerminalType",IFCWALLTYPE:"IfcWallType",IFCVIRTUALELEMENT:"IfcVirtualElement",IFCVALVETYPE:"IfcValveType",IFCUNITARYEQUIPMENTTYPE:"IfcUnitaryEquipmentType",IFCTUBEBUNDLETYPE:"IfcTubeBundleType",IFCTRIMMEDCURVE:"IfcTrimmedCurve",IFCTRANSPORTELEMENT:"IfcTransportElement",IFCTRANSFORMERTYPE:"IfcTransformerType",IFCTIMESERIESSCHEDULE:"IfcTimeSeriesSchedule",IFCTANKTYPE:"IfcTankType",IFCSYSTEM:"IfcSystem",IFCSWITCHINGDEVICETYPE:"IfcSwitchingDeviceType",IFCSUBCONTRACTRESOURCE:"IfcSubContractResource",IFCSTRUCTURALSURFACECONNECTION:"IfcStructuralSurfaceConnection",IFCSTRUCTURALRESULTGROUP:"IfcStructuralResultGroup",IFCSTRUCTURALPOINTREACTION:"IfcStructuralPointReaction",IFCSTRUCTURALPOINTCONNECTION:"IfcStructuralPointConnection",IFCSTRUCTURALPOINTACTION:"IfcStructuralPointAction",IFCSTRUCTURALPLANARACTIONVARYING:"IfcStructuralPlanarActionVarying",IFCSTRUCTURALPLANARACTION:"IfcStructuralPlanarAction",IFCSTRUCTURALLOADGROUP:"IfcStructuralLoadGroup",IFCSTRUCTURALLINEARACTIONVARYING:"IfcStructuralLinearActionVarying",IFCSTRUCTURALLINEARACTION:"IfcStructuralLinearAction",IFCSTRUCTURALCURVEMEMBERVARYING:"IfcStructuralCurveMemberVarying",IFCSTRUCTURALCURVEMEMBER:"IfcStructuralCurveMember",IFCSTRUCTURALCURVECONNECTION:"IfcStructuralCurveConnection",IFCSTRUCTURALCONNECTION:"IfcStructuralConnection",IFCSTRUCTURALACTION:"IfcStructuralAction",IFCSTAIRFLIGHTTYPE:"IfcStairFlightType",IFCSTACKTERMINALTYPE:"IfcStackTerminalType",IFCSPACETYPE:"IfcSpaceType",IFCSPACEPROGRAM:"IfcSpaceProgram",IFCSPACEHEATERTYPE:"IfcSpaceHeaterType",IFCSPACE:"IfcSpace",IFCSLABTYPE:"IfcSlabType",IFCSITE:"IfcSite",IFCSERVICELIFE:"IfcServiceLife",IFCSCHEDULETIMECONTROL:"IfcScheduleTimeControl",IFCSANITARYTERMINALTYPE:"IfcSanitaryTerminalType",IFCRELASSIGNSTASKS:"IfcRelAssignsTasks",IFCRELAGGREGATES:"IfcRelAggregates",IFCRAMPFLIGHTTYPE:"IfcRampFlightType",IFCRAILINGTYPE:"IfcRailingType",IFCRADIUSDIMENSION:"IfcRadiusDimension",IFCPUMPTYPE:"IfcPumpType",IFCPROTECTIVEDEVICETYPE:"IfcProtectiveDeviceType",IFCPROJECTIONELEMENT:"IfcProjectionElement",IFCPROJECTORDERRECORD:"IfcProjectOrderRecord",IFCPROJECTORDER:"IfcProjectOrder",IFCPROCEDURE:"IfcProcedure",IFCPORT:"IfcPort",IFCPOLYLINE:"IfcPolyline",IFCPLATETYPE:"IfcPlateType",IFCPIPESEGMENTTYPE:"IfcPipeSegmentType",IFCPIPEFITTINGTYPE:"IfcPipeFittingType",IFCPERMIT:"IfcPermit",IFCPERFORMANCEHISTORY:"IfcPerformanceHistory",IFCOUTLETTYPE:"IfcOutletType",IFCORDERACTION:"IfcOrderAction",IFCOPENINGELEMENT:"IfcOpeningElement",IFCOCCUPANT:"IfcOccupant",IFCMOVE:"IfcMove",IFCMOTORCONNECTIONTYPE:"IfcMotorConnectionType",IFCMEMBERTYPE:"IfcMemberType",IFCMECHANICALFASTENERTYPE:"IfcMechanicalFastenerType",IFCMECHANICALFASTENER:"IfcMechanicalFastener",IFCLINEARDIMENSION:"IfcLinearDimension",IFCLIGHTFIXTURETYPE:"IfcLightFixtureType",IFCLAMPTYPE:"IfcLampType",IFCLABORRESOURCE:"IfcLaborResource",IFCJUNCTIONBOXTYPE:"IfcJunctionBoxType",IFCINVENTORY:"IfcInventory",IFCHUMIDIFIERTYPE:"IfcHumidifierType",IFCHEATEXCHANGERTYPE:"IfcHeatExchangerType",IFCGROUP:"IfcGroup",IFCGRID:"IfcGrid",IFCGASTERMINALTYPE:"IfcGasTerminalType",IFCFURNITURESTANDARD:"IfcFurnitureStandard",IFCFURNISHINGELEMENT:"IfcFurnishingElement",IFCFLOWTREATMENTDEVICETYPE:"IfcFlowTreatmentDeviceType",IFCFLOWTERMINALTYPE:"IfcFlowTerminalType",IFCFLOWSTORAGEDEVICETYPE:"IfcFlowStorageDeviceType",IFCFLOWSEGMENTTYPE:"IfcFlowSegmentType",IFCFLOWMOVINGDEVICETYPE:"IfcFlowMovingDeviceType",IFCFLOWMETERTYPE:"IfcFlowMeterType",IFCFLOWFITTINGTYPE:"IfcFlowFittingType",IFCFLOWCONTROLLERTYPE:"IfcFlowControllerType",IFCFEATUREELEMENTSUBTRACTION:"IfcFeatureElementSubtraction",IFCFEATUREELEMENTADDITION:"IfcFeatureElementAddition",IFCFEATUREELEMENT:"IfcFeatureElement",IFCFASTENERTYPE:"IfcFastenerType",IFCFASTENER:"IfcFastener",IFCFACETEDBREPWITHVOIDS:"IfcFacetedBrepWithVoids",IFCFACETEDBREP:"IfcFacetedBrep",IFCEVAPORATORTYPE:"IfcEvaporatorType",IFCEVAPORATIVECOOLERTYPE:"IfcEvaporativeCoolerType",IFCEQUIPMENTSTANDARD:"IfcEquipmentStandard",IFCEQUIPMENTELEMENT:"IfcEquipmentElement",IFCENERGYCONVERSIONDEVICETYPE:"IfcEnergyConversionDeviceType",IFCELLIPSE:"IfcEllipse",IFCELEMENTCOMPONENTTYPE:"IfcElementComponentType",IFCELEMENTCOMPONENT:"IfcElementComponent",IFCELEMENTASSEMBLY:"IfcElementAssembly",IFCELEMENT:"IfcElement",IFCELECTRICALBASEPROPERTIES:"IfcElectricalBaseProperties",IFCDISTRIBUTIONFLOWELEMENTTYPE:"IfcDistributionFlowElementType",IFCDISTRIBUTIONELEMENTTYPE:"IfcDistributionElementType",IFCDIMENSIONCURVEDIRECTEDCALLOUT:"IfcDimensionCurveDirectedCallout",IFCCURTAINWALLTYPE:"IfcCurtainWallType",IFCCREWRESOURCE:"IfcCrewResource",IFCCOVERINGTYPE:"IfcCoveringType",IFCCOSTSCHEDULE:"IfcCostSchedule",IFCCOSTITEM:"IfcCostItem",IFCCONTROL:"IfcControl",IFCCONSTRUCTIONRESOURCE:"IfcConstructionResource",IFCCONIC:"IfcConic",IFCCOMPOSITECURVE:"IfcCompositeCurve",IFCCOLUMNTYPE:"IfcColumnType",IFCCIRCLEHOLLOWPROFILEDEF:"IfcCircleHollowProfileDef",IFCBUILDINGSTOREY:"IfcBuildingStorey",IFCBUILDINGELEMENTTYPE:"IfcBuildingElementType",IFCBUILDING:"IfcBuilding",IFCBOUNDEDCURVE:"IfcBoundedCurve",IFCBOOLEANCLIPPINGRESULT:"IfcBooleanClippingResult",IFCBLOCK:"IfcBlock",IFCASYMMETRICISHAPEPROFILEDEF:"IfcAsymmetricIShapeProfileDef",IFCANNOTATION:"IfcAnnotation",IFCACTOR:"IfcActor",IFCTRANSPORTELEMENTTYPE:"IfcTransportElementType",IFCTASK:"IfcTask",IFCSYSTEMFURNITUREELEMENTTYPE:"IfcSystemFurnitureElementType",IFCSURFACEOFREVOLUTION:"IfcSurfaceOfRevolution",IFCSURFACEOFLINEAREXTRUSION:"IfcSurfaceOfLinearExtrusion",IFCSURFACECURVESWEPTAREASOLID:"IfcSurfaceCurveSweptAreaSolid",IFCSTRUCTUREDDIMENSIONCALLOUT:"IfcStructuredDimensionCallout",IFCSTRUCTURALSURFACEMEMBERVARYING:"IfcStructuralSurfaceMemberVarying",IFCSTRUCTURALSURFACEMEMBER:"IfcStructuralSurfaceMember",IFCSTRUCTURALREACTION:"IfcStructuralReaction",IFCSTRUCTURALMEMBER:"IfcStructuralMember",IFCSTRUCTURALITEM:"IfcStructuralItem",IFCSTRUCTURALACTIVITY:"IfcStructuralActivity",IFCSPHERE:"IfcSphere",IFCSPATIALSTRUCTUREELEMENTTYPE:"IfcSpatialStructureElementType",IFCSPATIALSTRUCTUREELEMENT:"IfcSpatialStructureElement",IFCRIGHTCIRCULARCYLINDER:"IfcRightCircularCylinder",IFCRIGHTCIRCULARCONE:"IfcRightCircularCone",IFCREVOLVEDAREASOLID:"IfcRevolvedAreaSolid",IFCRESOURCE:"IfcResource",IFCRELVOIDSELEMENT:"IfcRelVoidsElement",IFCRELSPACEBOUNDARY:"IfcRelSpaceBoundary",IFCRELSERVICESBUILDINGS:"IfcRelServicesBuildings",IFCRELSEQUENCE:"IfcRelSequence",IFCRELSCHEDULESCOSTITEMS:"IfcRelSchedulesCostItems",IFCRELREFERENCEDINSPATIALSTRUCTURE:"IfcRelReferencedInSpatialStructure",IFCRELPROJECTSELEMENT:"IfcRelProjectsElement",IFCRELOVERRIDESPROPERTIES:"IfcRelOverridesProperties",IFCRELOCCUPIESSPACES:"IfcRelOccupiesSpaces",IFCRELNESTS:"IfcRelNests",IFCRELINTERACTIONREQUIREMENTS:"IfcRelInteractionRequirements",IFCRELFLOWCONTROLELEMENTS:"IfcRelFlowControlElements",IFCRELFILLSELEMENT:"IfcRelFillsElement",IFCRELDEFINESBYTYPE:"IfcRelDefinesByType",IFCRELDEFINESBYPROPERTIES:"IfcRelDefinesByProperties",IFCRELDEFINES:"IfcRelDefines",IFCRELDECOMPOSES:"IfcRelDecomposes",IFCRELCOVERSSPACES:"IfcRelCoversSpaces",IFCRELCOVERSBLDGELEMENTS:"IfcRelCoversBldgElements",IFCRELCONTAINEDINSPATIALSTRUCTURE:"IfcRelContainedInSpatialStructure",IFCRELCONNECTSWITHREALIZINGELEMENTS:"IfcRelConnectsWithRealizingElements",IFCRELCONNECTSWITHECCENTRICITY:"IfcRelConnectsWithEccentricity",IFCRELCONNECTSSTRUCTURALMEMBER:"IfcRelConnectsStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT:"IfcRelConnectsStructuralElement",IFCRELCONNECTSSTRUCTURALACTIVITY:"IfcRelConnectsStructuralActivity",IFCRELCONNECTSPORTS:"IfcRelConnectsPorts",IFCRELCONNECTSPORTTOELEMENT:"IfcRelConnectsPortToElement",IFCRELCONNECTSPATHELEMENTS:"IfcRelConnectsPathElements",IFCRELCONNECTSELEMENTS:"IfcRelConnectsElements",IFCRELCONNECTS:"IfcRelConnects",IFCRELASSOCIATESPROFILEPROPERTIES:"IfcRelAssociatesProfileProperties",IFCRELASSOCIATESMATERIAL:"IfcRelAssociatesMaterial",IFCRELASSOCIATESLIBRARY:"IfcRelAssociatesLibrary",IFCRELASSOCIATESDOCUMENT:"IfcRelAssociatesDocument",IFCRELASSOCIATESCONSTRAINT:"IfcRelAssociatesConstraint",IFCRELASSOCIATESCLASSIFICATION:"IfcRelAssociatesClassification",IFCRELASSOCIATESAPPROVAL:"IfcRelAssociatesApproval",IFCRELASSOCIATESAPPLIEDVALUE:"IfcRelAssociatesAppliedValue",IFCRELASSOCIATES:"IfcRelAssociates",IFCRELASSIGNSTORESOURCE:"IfcRelAssignsToResource",IFCRELASSIGNSTOPROJECTORDER:"IfcRelAssignsToProjectOrder",IFCRELASSIGNSTOPRODUCT:"IfcRelAssignsToProduct",IFCRELASSIGNSTOPROCESS:"IfcRelAssignsToProcess",IFCRELASSIGNSTOGROUP:"IfcRelAssignsToGroup",IFCRELASSIGNSTOCONTROL:"IfcRelAssignsToControl",IFCRELASSIGNSTOACTOR:"IfcRelAssignsToActor",IFCRELASSIGNS:"IfcRelAssigns",IFCRECTANGULARTRIMMEDSURFACE:"IfcRectangularTrimmedSurface",IFCRECTANGULARPYRAMID:"IfcRectangularPyramid",IFCRECTANGLEHOLLOWPROFILEDEF:"IfcRectangleHollowProfileDef",IFCPROXY:"IfcProxy",IFCPROPERTYSET:"IfcPropertySet",IFCPROJECTIONCURVE:"IfcProjectionCurve",IFCPROJECT:"IfcProject",IFCPRODUCT:"IfcProduct",IFCPROCESS:"IfcProcess",IFCPLANE:"IfcPlane",IFCPLANARBOX:"IfcPlanarBox",IFCPERMEABLECOVERINGPROPERTIES:"IfcPermeableCoveringProperties",IFCOFFSETCURVE3D:"IfcOffsetCurve3D",IFCOFFSETCURVE2D:"IfcOffsetCurve2D",IFCOBJECT:"IfcObject",IFCMANIFOLDSOLIDBREP:"IfcManifoldSolidBrep",IFCLINE:"IfcLine",IFCLSHAPEPROFILEDEF:"IfcLShapeProfileDef",IFCISHAPEPROFILEDEF:"IfcIShapeProfileDef",IFCGEOMETRICCURVESET:"IfcGeometricCurveSet",IFCFURNITURETYPE:"IfcFurnitureType",IFCFURNISHINGELEMENTTYPE:"IfcFurnishingElementType",IFCFLUIDFLOWPROPERTIES:"IfcFluidFlowProperties",IFCFILLAREASTYLETILES:"IfcFillAreaStyleTiles",IFCFILLAREASTYLETILESYMBOLWITHSTYLE:"IfcFillAreaStyleTileSymbolWithStyle",IFCFILLAREASTYLEHATCHING:"IfcFillAreaStyleHatching",IFCFACEBASEDSURFACEMODEL:"IfcFaceBasedSurfaceModel",IFCEXTRUDEDAREASOLID:"IfcExtrudedAreaSolid",IFCENERGYPROPERTIES:"IfcEnergyProperties",IFCELLIPSEPROFILEDEF:"IfcEllipseProfileDef",IFCELEMENTARYSURFACE:"IfcElementarySurface",IFCELEMENTTYPE:"IfcElementType",IFCELEMENTQUANTITY:"IfcElementQuantity",IFCEDGELOOP:"IfcEdgeLoop",IFCDRAUGHTINGPREDEFINEDCURVEFONT:"IfcDraughtingPredefinedCurveFont",IFCDRAUGHTINGPREDEFINEDCOLOUR:"IfcDraughtingPredefinedColour",IFCDRAUGHTINGCALLOUT:"IfcDraughtingCallout",IFCDOORSTYLE:"IfcDoorStyle",IFCDOORPANELPROPERTIES:"IfcDoorPanelProperties",IFCDOORLININGPROPERTIES:"IfcDoorLiningProperties",IFCDIRECTION:"IfcDirection",IFCDIMENSIONCURVETERMINATOR:"IfcDimensionCurveTerminator",IFCDIMENSIONCURVE:"IfcDimensionCurve",IFCDEFINEDSYMBOL:"IfcDefinedSymbol",IFCCURVEBOUNDEDPLANE:"IfcCurveBoundedPlane",IFCCURVE:"IfcCurve",IFCCSGSOLID:"IfcCsgSolid",IFCCSGPRIMITIVE3D:"IfcCsgPrimitive3D",IFCCRANERAILFSHAPEPROFILEDEF:"IfcCraneRailFShapeProfileDef",IFCCRANERAILASHAPEPROFILEDEF:"IfcCraneRailAShapeProfileDef",IFCCOMPOSITECURVESEGMENT:"IfcCompositeCurveSegment",IFCCLOSEDSHELL:"IfcClosedShell",IFCCIRCLEPROFILEDEF:"IfcCircleProfileDef",IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM:"IfcCartesianTransformationOperator3DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR3D:"IfcCartesianTransformationOperator3D",IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM:"IfcCartesianTransformationOperator2DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR2D:"IfcCartesianTransformationOperator2D",IFCCARTESIANTRANSFORMATIONOPERATOR:"IfcCartesianTransformationOperator",IFCCARTESIANPOINT:"IfcCartesianPoint",IFCCSHAPEPROFILEDEF:"IfcCShapeProfileDef",IFCBOXEDHALFSPACE:"IfcBoxedHalfSpace",IFCBOUNDINGBOX:"IfcBoundingBox",IFCBOUNDEDSURFACE:"IfcBoundedSurface",IFCBOOLEANRESULT:"IfcBooleanResult",IFCAXIS2PLACEMENT3D:"IfcAxis2Placement3D",IFCAXIS2PLACEMENT2D:"IfcAxis2Placement2D",IFCAXIS1PLACEMENT:"IfcAxis1Placement",IFCANNOTATIONSURFACE:"IfcAnnotationSurface",IFCANNOTATIONFILLAREAOCCURRENCE:"IfcAnnotationFillAreaOccurrence",IFCANNOTATIONFILLAREA:"IfcAnnotationFillArea",IFCANNOTATIONCURVEOCCURRENCE:"IfcAnnotationCurveOccurrence",IFCZSHAPEPROFILEDEF:"IfcZShapeProfileDef",IFCWINDOWSTYLE:"IfcWindowStyle",IFCWINDOWPANELPROPERTIES:"IfcWindowPanelProperties",IFCWINDOWLININGPROPERTIES:"IfcWindowLiningProperties",IFCVERTEXLOOP:"IfcVertexLoop",IFCVECTOR:"IfcVector",IFCUSHAPEPROFILEDEF:"IfcUShapeProfileDef",IFCTYPEPRODUCT:"IfcTypeProduct",IFCTYPEOBJECT:"IfcTypeObject",IFCTWODIRECTIONREPEATFACTOR:"IfcTwoDirectionRepeatFactor",IFCTRAPEZIUMPROFILEDEF:"IfcTrapeziumProfileDef",IFCTEXTLITERALWITHEXTENT:"IfcTextLiteralWithExtent",IFCTEXTLITERAL:"IfcTextLiteral",IFCTERMINATORSYMBOL:"IfcTerminatorSymbol",IFCTSHAPEPROFILEDEF:"IfcTShapeProfileDef",IFCSWEPTSURFACE:"IfcSweptSurface",IFCSWEPTDISKSOLID:"IfcSweptDiskSolid",IFCSWEPTAREASOLID:"IfcSweptAreaSolid",IFCSURFACESTYLERENDERING:"IfcSurfaceStyleRendering",IFCSURFACE:"IfcSurface",IFCSUBEDGE:"IfcSubedge",IFCSTRUCTURALSTEELPROFILEPROPERTIES:"IfcStructuralSteelProfileProperties",IFCSTRUCTURALPROFILEPROPERTIES:"IfcStructuralProfileProperties",IFCSTRUCTURALLOADSINGLEFORCEWARPING:"IfcStructuralLoadSingleForceWarping",IFCSTRUCTURALLOADSINGLEFORCE:"IfcStructuralLoadSingleForce",IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION:"IfcStructuralLoadSingleDisplacementDistortion",IFCSTRUCTURALLOADSINGLEDISPLACEMENT:"IfcStructuralLoadSingleDisplacement",IFCSTRUCTURALLOADPLANARFORCE:"IfcStructuralLoadPlanarForce",IFCSTRUCTURALLOADLINEARFORCE:"IfcStructuralLoadLinearForce",IFCSPACETHERMALLOADPROPERTIES:"IfcSpaceThermalLoadProperties",IFCSOUNDVALUE:"IfcSoundValue",IFCSOUNDPROPERTIES:"IfcSoundProperties",IFCSOLIDMODEL:"IfcSolidModel",IFCSLIPPAGECONNECTIONCONDITION:"IfcSlippageConnectionCondition",IFCSHELLBASEDSURFACEMODEL:"IfcShellBasedSurfaceModel",IFCSERVICELIFEFACTOR:"IfcServiceLifeFactor",IFCSECTIONEDSPINE:"IfcSectionedSpine",IFCROUNDEDRECTANGLEPROFILEDEF:"IfcRoundedRectangleProfileDef",IFCRELATIONSHIP:"IfcRelationship",IFCREINFORCEMENTDEFINITIONPROPERTIES:"IfcReinforcementDefinitionProperties",IFCREGULARTIMESERIES:"IfcRegularTimeSeries",IFCRECTANGLEPROFILEDEF:"IfcRectangleProfileDef",IFCPROPERTYTABLEVALUE:"IfcPropertyTableValue",IFCPROPERTYSINGLEVALUE:"IfcPropertySingleValue",IFCPROPERTYSETDEFINITION:"IfcPropertySetDefinition",IFCPROPERTYREFERENCEVALUE:"IfcPropertyReferenceValue",IFCPROPERTYLISTVALUE:"IfcPropertyListValue",IFCPROPERTYENUMERATEDVALUE:"IfcPropertyEnumeratedValue",IFCPROPERTYDEFINITION:"IfcPropertyDefinition",IFCPROPERTYBOUNDEDVALUE:"IfcPropertyBoundedValue",IFCPRODUCTDEFINITIONSHAPE:"IfcProductDefinitionShape",IFCPREDEFINEDPOINTMARKERSYMBOL:"IfcPredefinedPointMarkerSymbol",IFCPREDEFINEDDIMENSIONSYMBOL:"IfcPredefinedDimensionSymbol",IFCPREDEFINEDCURVEFONT:"IfcPredefinedCurveFont",IFCPREDEFINEDCOLOUR:"IfcPredefinedColour",IFCPOLYGONALBOUNDEDHALFSPACE:"IfcPolygonalBoundedHalfSpace",IFCPOLYLOOP:"IfcPolyLoop",IFCPOINTONSURFACE:"IfcPointOnSurface",IFCPOINTONCURVE:"IfcPointOnCurve",IFCPOINT:"IfcPoint",IFCPLANAREXTENT:"IfcPlanarExtent",IFCPLACEMENT:"IfcPlacement",IFCPIXELTEXTURE:"IfcPixelTexture",IFCPHYSICALCOMPLEXQUANTITY:"IfcPhysicalComplexQuantity",IFCPATH:"IfcPath",IFCPARAMETERIZEDPROFILEDEF:"IfcParameterizedProfileDef",IFCORIENTEDEDGE:"IfcOrientedEdge",IFCOPENSHELL:"IfcOpenShell",IFCONEDIRECTIONREPEATFACTOR:"IfcOneDirectionRepeatFactor",IFCOBJECTDEFINITION:"IfcObjectDefinition",IFCMECHANICALCONCRETEMATERIALPROPERTIES:"IfcMechanicalConcreteMaterialProperties",IFCMATERIALDEFINITIONREPRESENTATION:"IfcMaterialDefinitionRepresentation",IFCMAPPEDITEM:"IfcMappedItem",IFCLOOP:"IfcLoop",IFCLOCALPLACEMENT:"IfcLocalPlacement",IFCLIGHTSOURCESPOT:"IfcLightSourceSpot",IFCLIGHTSOURCEPOSITIONAL:"IfcLightSourcePositional",IFCLIGHTSOURCEGONIOMETRIC:"IfcLightSourceGoniometric",IFCLIGHTSOURCEDIRECTIONAL:"IfcLightSourceDirectional",IFCLIGHTSOURCEAMBIENT:"IfcLightSourceAmbient",IFCLIGHTSOURCE:"IfcLightSource",IFCIRREGULARTIMESERIES:"IfcIrregularTimeSeries",IFCIMAGETEXTURE:"IfcImageTexture",IFCHYGROSCOPICMATERIALPROPERTIES:"IfcHygroscopicMaterialProperties",IFCHALFSPACESOLID:"IfcHalfSpaceSolid",IFCGRIDPLACEMENT:"IfcGridPlacement",IFCGEOMETRICSET:"IfcGeometricSet",IFCGEOMETRICREPRESENTATIONSUBCONTEXT:"IfcGeometricRepresentationSubContext",IFCGEOMETRICREPRESENTATIONITEM:"IfcGeometricRepresentationItem",IFCGEOMETRICREPRESENTATIONCONTEXT:"IfcGeometricRepresentationContext",IFCGENERALPROFILEPROPERTIES:"IfcGeneralProfileProperties",IFCGENERALMATERIALPROPERTIES:"IfcGeneralMaterialProperties",IFCFUELPROPERTIES:"IfcFuelProperties",IFCFILLAREASTYLE:"IfcFillAreaStyle",IFCFAILURECONNECTIONCONDITION:"IfcFailureConnectionCondition",IFCFACESURFACE:"IfcFaceSurface",IFCFACEOUTERBOUND:"IfcFaceOuterBound",IFCFACEBOUND:"IfcFaceBound",IFCFACE:"IfcFace",IFCEXTENDEDMATERIALPROPERTIES:"IfcExtendedMaterialProperties",IFCEDGECURVE:"IfcEdgeCurve",IFCEDGE:"IfcEdge",IFCDRAUGHTINGPREDEFINEDTEXTFONT:"IfcDraughtingPredefinedTextFont",IFCDOCUMENTREFERENCE:"IfcDocumentReference",IFCDIMENSIONPAIR:"IfcDimensionPair",IFCDIMENSIONCALLOUTRELATIONSHIP:"IfcDimensionCalloutRelationship",IFCDERIVEDPROFILEDEF:"IfcDerivedProfileDef",IFCCURVESTYLE:"IfcCurveStyle",IFCCONVERSIONBASEDUNIT:"IfcConversionBasedUnit",IFCCONTEXTDEPENDENTUNIT:"IfcContextDependentUnit",IFCCONNECTIONPOINTECCENTRICITY:"IfcConnectionPointEccentricity",IFCCONNECTIONCURVEGEOMETRY:"IfcConnectionCurveGeometry",IFCCONNECTEDFACESET:"IfcConnectedFaceSet",IFCCOMPOSITEPROFILEDEF:"IfcCompositeProfileDef",IFCCOMPLEXPROPERTY:"IfcComplexProperty",IFCCOLOURRGB:"IfcColourRgb",IFCCLASSIFICATIONREFERENCE:"IfcClassificationReference",IFCCENTERLINEPROFILEDEF:"IfcCenterLineProfileDef",IFCBLOBTEXTURE:"IfcBlobTexture",IFCARBITRARYPROFILEDEFWITHVOIDS:"IfcArbitraryProfileDefWithVoids",IFCARBITRARYOPENPROFILEDEF:"IfcArbitraryOpenProfileDef",IFCARBITRARYCLOSEDPROFILEDEF:"IfcArbitraryClosedProfileDef",IFCANNOTATIONTEXTOCCURRENCE:"IfcAnnotationTextOccurrence",IFCANNOTATIONSYMBOLOCCURRENCE:"IfcAnnotationSymbolOccurrence",IFCANNOTATIONSURFACEOCCURRENCE:"IfcAnnotationSurfaceOccurrence",IFCANNOTATIONOCCURRENCE:"IfcAnnotationOccurrence",IFCWATERPROPERTIES:"IfcWaterProperties",IFCVIRTUALGRIDINTERSECTION:"IfcVirtualGridIntersection",IFCVERTEXPOINT:"IfcVertexPoint",IFCVERTEXBASEDTEXTUREMAP:"IfcVertexBasedTextureMap",IFCVERTEX:"IfcVertex",IFCUNITASSIGNMENT:"IfcUnitAssignment",IFCTOPOLOGYREPRESENTATION:"IfcTopologyRepresentation",IFCTOPOLOGICALREPRESENTATIONITEM:"IfcTopologicalRepresentationItem",IFCTIMESERIESVALUE:"IfcTimeSeriesValue",IFCTIMESERIESREFERENCERELATIONSHIP:"IfcTimeSeriesReferenceRelationship",IFCTIMESERIES:"IfcTimeSeries",IFCTHERMALMATERIALPROPERTIES:"IfcThermalMaterialProperties",IFCTEXTUREVERTEX:"IfcTextureVertex",IFCTEXTUREMAP:"IfcTextureMap",IFCTEXTURECOORDINATEGENERATOR:"IfcTextureCoordinateGenerator",IFCTEXTURECOORDINATE:"IfcTextureCoordinate",IFCTEXTSTYLEWITHBOXCHARACTERISTICS:"IfcTextStyleWithBoxCharacteristics",IFCTEXTSTYLETEXTMODEL:"IfcTextStyleTextModel",IFCTEXTSTYLEFORDEFINEDFONT:"IfcTextStyleForDefinedFont",IFCTEXTSTYLEFONTMODEL:"IfcTextStyleFontModel",IFCTEXTSTYLE:"IfcTextStyle",IFCTELECOMADDRESS:"IfcTelecomAddress",IFCTABLEROW:"IfcTableRow",IFCTABLE:"IfcTable",IFCSYMBOLSTYLE:"IfcSymbolStyle",IFCSURFACETEXTURE:"IfcSurfaceTexture",IFCSURFACESTYLEWITHTEXTURES:"IfcSurfaceStyleWithTextures",IFCSURFACESTYLESHADING:"IfcSurfaceStyleShading",IFCSURFACESTYLEREFRACTION:"IfcSurfaceStyleRefraction",IFCSURFACESTYLELIGHTING:"IfcSurfaceStyleLighting",IFCSURFACESTYLE:"IfcSurfaceStyle",IFCSTYLEDREPRESENTATION:"IfcStyledRepresentation",IFCSTYLEDITEM:"IfcStyledItem",IFCSTYLEMODEL:"IfcStyleModel",IFCSTRUCTURALLOADTEMPERATURE:"IfcStructuralLoadTemperature",IFCSTRUCTURALLOADSTATIC:"IfcStructuralLoadStatic",IFCSTRUCTURALLOAD:"IfcStructuralLoad",IFCSTRUCTURALCONNECTIONCONDITION:"IfcStructuralConnectionCondition",IFCSIMPLEPROPERTY:"IfcSimpleProperty",IFCSHAPEREPRESENTATION:"IfcShapeRepresentation",IFCSHAPEMODEL:"IfcShapeModel",IFCSHAPEASPECT:"IfcShapeAspect",IFCSECTIONREINFORCEMENTPROPERTIES:"IfcSectionReinforcementProperties",IFCSECTIONPROPERTIES:"IfcSectionProperties",IFCSIUNIT:"IfcSIUnit",IFCROOT:"IfcRoot",IFCRIBPLATEPROFILEPROPERTIES:"IfcRibPlateProfileProperties",IFCREPRESENTATIONMAP:"IfcRepresentationMap",IFCREPRESENTATIONITEM:"IfcRepresentationItem",IFCREPRESENTATIONCONTEXT:"IfcRepresentationContext",IFCREPRESENTATION:"IfcRepresentation",IFCRELAXATION:"IfcRelaxation",IFCREINFORCEMENTBARPROPERTIES:"IfcReinforcementBarProperties",IFCREFERENCESVALUEDOCUMENT:"IfcReferencesValueDocument",IFCQUANTITYWEIGHT:"IfcQuantityWeight",IFCQUANTITYVOLUME:"IfcQuantityVolume",IFCQUANTITYTIME:"IfcQuantityTime",IFCQUANTITYLENGTH:"IfcQuantityLength",IFCQUANTITYCOUNT:"IfcQuantityCount",IFCQUANTITYAREA:"IfcQuantityArea",IFCPROPERTYENUMERATION:"IfcPropertyEnumeration",IFCPROPERTYDEPENDENCYRELATIONSHIP:"IfcPropertyDependencyRelationship",IFCPROPERTYCONSTRAINTRELATIONSHIP:"IfcPropertyConstraintRelationship",IFCPROPERTY:"IfcProperty",IFCPROFILEPROPERTIES:"IfcProfileProperties",IFCPROFILEDEF:"IfcProfileDef",IFCPRODUCTSOFCOMBUSTIONPROPERTIES:"IfcProductsOfCombustionProperties",IFCPRODUCTREPRESENTATION:"IfcProductRepresentation",IFCPRESENTATIONSTYLEASSIGNMENT:"IfcPresentationStyleAssignment",IFCPRESENTATIONSTYLE:"IfcPresentationStyle",IFCPRESENTATIONLAYERWITHSTYLE:"IfcPresentationLayerWithStyle",IFCPRESENTATIONLAYERASSIGNMENT:"IfcPresentationLayerAssignment",IFCPREDEFINEDTEXTFONT:"IfcPredefinedTextFont",IFCPREDEFINEDTERMINATORSYMBOL:"IfcPredefinedTerminatorSymbol",IFCPREDEFINEDSYMBOL:"IfcPredefinedSymbol",IFCPREDEFINEDITEM:"IfcPredefinedItem",IFCPOSTALADDRESS:"IfcPostalAddress",IFCPHYSICALSIMPLEQUANTITY:"IfcPhysicalSimpleQuantity",IFCPHYSICALQUANTITY:"IfcPhysicalQuantity",IFCPERSONANDORGANIZATION:"IfcPersonAndOrganization",IFCPERSON:"IfcPerson",IFCOWNERHISTORY:"IfcOwnerHistory",IFCORGANIZATIONRELATIONSHIP:"IfcOrganizationRelationship",IFCORGANIZATION:"IfcOrganization",IFCOPTICALMATERIALPROPERTIES:"IfcOpticalMaterialProperties",IFCOBJECTIVE:"IfcObjective",IFCOBJECTPLACEMENT:"IfcObjectPlacement",IFCNAMEDUNIT:"IfcNamedUnit",IFCMONETARYUNIT:"IfcMonetaryUnit",IFCMETRIC:"IfcMetric",IFCMECHANICALSTEELMATERIALPROPERTIES:"IfcMechanicalSteelMaterialProperties",IFCMECHANICALMATERIALPROPERTIES:"IfcMechanicalMaterialProperties",IFCMEASUREWITHUNIT:"IfcMeasureWithUnit",IFCMATERIALPROPERTIES:"IfcMaterialProperties",IFCMATERIALLIST:"IfcMaterialList",IFCMATERIALLAYERSETUSAGE:"IfcMaterialLayerSetUsage",IFCMATERIALLAYERSET:"IfcMaterialLayerSet",IFCMATERIALLAYER:"IfcMaterialLayer",IFCMATERIALCLASSIFICATIONRELATIONSHIP:"IfcMaterialClassificationRelationship",IFCMATERIAL:"IfcMaterial",IFCLOCALTIME:"IfcLocalTime",IFCLIGHTINTENSITYDISTRIBUTION:"IfcLightIntensityDistribution",IFCLIGHTDISTRIBUTIONDATA:"IfcLightDistributionData",IFCLIBRARYREFERENCE:"IfcLibraryReference",IFCLIBRARYINFORMATION:"IfcLibraryInformation",IFCIRREGULARTIMESERIESVALUE:"IfcIrregularTimeSeriesValue",IFCGRIDAXIS:"IfcGridAxis",IFCEXTERNALLYDEFINEDTEXTFONT:"IfcExternallyDefinedTextFont",IFCEXTERNALLYDEFINEDSYMBOL:"IfcExternallyDefinedSymbol",IFCEXTERNALLYDEFINEDSURFACESTYLE:"IfcExternallyDefinedSurfaceStyle",IFCEXTERNALLYDEFINEDHATCHSTYLE:"IfcExternallyDefinedHatchStyle",IFCEXTERNALREFERENCE:"IfcExternalReference",IFCENVIRONMENTALIMPACTVALUE:"IfcEnvironmentalImpactValue",IFCDRAUGHTINGCALLOUTRELATIONSHIP:"IfcDraughtingCalloutRelationship",IFCDOCUMENTINFORMATIONRELATIONSHIP:"IfcDocumentInformationRelationship",IFCDOCUMENTINFORMATION:"IfcDocumentInformation",IFCDOCUMENTELECTRONICFORMAT:"IfcDocumentElectronicFormat",IFCDIMENSIONALEXPONENTS:"IfcDimensionalExponents",IFCDERIVEDUNITELEMENT:"IfcDerivedUnitElement",IFCDERIVEDUNIT:"IfcDerivedUnit",IFCDATEANDTIME:"IfcDateAndTime",IFCCURVESTYLEFONTPATTERN:"IfcCurveStyleFontPattern",IFCCURVESTYLEFONTANDSCALING:"IfcCurveStyleFontAndScaling",IFCCURVESTYLEFONT:"IfcCurveStyleFont",IFCCURRENCYRELATIONSHIP:"IfcCurrencyRelationship",IFCCOSTVALUE:"IfcCostValue",IFCCOORDINATEDUNIVERSALTIMEOFFSET:"IfcCoordinatedUniversalTimeOffset",IFCCONSTRAINTRELATIONSHIP:"IfcConstraintRelationship",IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP:"IfcConstraintClassificationRelationship",IFCCONSTRAINTAGGREGATIONRELATIONSHIP:"IfcConstraintAggregationRelationship",IFCCONSTRAINT:"IfcConstraint",IFCCONNECTIONSURFACEGEOMETRY:"IfcConnectionSurfaceGeometry",IFCCONNECTIONPORTGEOMETRY:"IfcConnectionPortGeometry",IFCCONNECTIONPOINTGEOMETRY:"IfcConnectionPointGeometry",IFCCONNECTIONGEOMETRY:"IfcConnectionGeometry",IFCCOLOURSPECIFICATION:"IfcColourSpecification",IFCCLASSIFICATIONNOTATIONFACET:"IfcClassificationNotationFacet",IFCCLASSIFICATIONNOTATION:"IfcClassificationNotation",IFCCLASSIFICATIONITEMRELATIONSHIP:"IfcClassificationItemRelationship",IFCCLASSIFICATIONITEM:"IfcClassificationItem",IFCCLASSIFICATION:"IfcClassification",IFCCALENDARDATE:"IfcCalendarDate",IFCBOUNDARYNODECONDITIONWARPING:"IfcBoundaryNodeConditionWarping",IFCBOUNDARYNODECONDITION:"IfcBoundaryNodeCondition",IFCBOUNDARYFACECONDITION:"IfcBoundaryFaceCondition",IFCBOUNDARYEDGECONDITION:"IfcBoundaryEdgeCondition",IFCBOUNDARYCONDITION:"IfcBoundaryCondition",IFCAPPROVALRELATIONSHIP:"IfcApprovalRelationship",IFCAPPROVALPROPERTYRELATIONSHIP:"IfcApprovalPropertyRelationship",IFCAPPROVALACTORRELATIONSHIP:"IfcApprovalActorRelationship",IFCAPPROVAL:"IfcApproval",IFCAPPLIEDVALUERELATIONSHIP:"IfcAppliedValueRelationship",IFCAPPLIEDVALUE:"IfcAppliedValue",IFCAPPLICATION:"IfcApplication",IFCADDRESS:"IfcAddress",IFCACTORROLE:"IfcActorRole"};class lh{constructor(){p(this,"factor",1),p(this,"complement",1)}apply(e){const t=this.getScaleMatrix().multiply(e);e.copy(t)}setUp(e){var t,s,i;this.factor=1;const n=this.getLengthUnits(e);if(!n)return;const r=n==null,o=n.Name===void 0||n.Name===null;r||o||(n.Name.value==="FOOT"&&(this.factor=.3048),((t=n.Prefix)==null?void 0:t.value)==="MILLI"?this.complement=.001:((s=n.Prefix)==null?void 0:s.value)==="CENTI"?this.complement=.01:((i=n.Prefix)==null?void 0:i.value)==="DECI"&&(this.complement=.01))}getLengthUnits(e){try{const t=e.GetLineIDsWithType(0,xa).get(0),s=e.GetLine(0,t);for(const i of s.Units){if(!i||i.value===null||i.value===void 0)continue;const n=e.GetLine(0,i.value);if(n.UnitType&&n.UnitType.value==="LENGTHUNIT")return n}return null}catch{return console.log("Could not get units"),null}}getScaleMatrix(){const e=this.factor;return new Ee().fromArray([e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1])}}class bo{constructor(){p(this,"itemsByFloor",{}),p(this,"_units",new lh)}setUp(e){this._units.setUp(e),this.cleanUp();try{const t=e.GetLineIDsWithType(0,Mi),s=new Set,i=e.GetLineIDsWithType(0,zt);for(let c=0;c0&&!r.has(n)||this.settings.excludedCategories.has(n))continue;const o=this.webIfc.GetLineIDsWithType(0,n),a=o.size();for(let c=0;c{this.getMesh(n,t)});for(const n of this._visitedFragments){const{index:r,fragment:o}=n[1];t.keyFragments.set(r,o.id)}for(const n of t.items){const r=this._fragmentInstances.get(n.id);if(!r)throw new Error("Fragment not found!");const o=[];for(const[a,c]of r)o.push(c);n.add(o)}const i=this.webIfc.GetCoordinationMatrix(0);return t.coordinationMatrix.fromArray(i),t.civilData=this._civil.read(this.webIfc),t}getMesh(e,t){const s=e.geometries.size(),i=e.expressID;for(let n=0;nr.value!==s),await e.setProperties(s,null),this.registerChange(e,t,s))}addElementToPset(e,t,...s){this.components.get(Ke).addEntitiesRelation(e,t,{type:ks,inv:"DefinesOcurrence"},...s)}async addPropToPset(e,t,...s){const i=await e.getProperties(t);if(i){for(const n of s){if(i.HasProperties.includes(n))continue;const r=new Nt(n);i.HasProperties.push(r),this.onPropToPset.trigger({model:e,psetID:t,propID:n})}this.registerChange(e,t)}}async createIfcRel(e,t,s,i){const n=dh[t];if(!n)throw new Error(`IfcPropertiesManager: ${n} is unsoported.`);const r=xt.getIFCSchema(e),o=uh[n],a=ht[r][n];if(!(o&&a))throw new Error(`IfcPropertiesManager: ${n} is unsoported.`);const c=[new ht[r].IfcGloballyUniqueId(gt.create())],{related:h,relating:d}=o,I=[...new Set(i)].map(E=>new Nt(E)),u=(E,T)=>{for(let C=E;CparseInt(r,10)),i=t[s[0]],n=new Nt(i.expressID);return{entity:i,handle:n}}registerChange(e,...t){this.changeMap[e.uuid]||(this.changeMap[e.uuid]=new Set);for(const s of t)this.changeMap[e.uuid].add(s),this.onDataChanged.trigger({model:e,expressID:s})}async newSingleProperty(e,t,s,i){const n=xt.getIFCSchema(e),r=new ht[n].IfcIdentifier(s),o=new ht[n][t](i),a=new ht[n].IfcPropertySingleValue(r,null,o,null);return a.expressID=this.getNewExpressID(e),await this.setData(e,a),a}};p(ko,"uuid","58c2d9f0-183c-48d6-a402-dfcf5b9a34df");let Ih=ko;const Ho=class Sn extends Fe{constructor(e){super(e),p(this,"onDisposed",new $),p(this,"onRelationsIndexed",new $),p(this,"relationMaps",{}),p(this,"enabled",!0),p(this,"_relToAttributesMap",qr),p(this,"_inverseAttributes",["IsDecomposedBy","Decomposes","AssociatedTo","HasAssociations","ClassificationForObjects","IsGroupedBy","HasAssignments","IsDefinedBy","DefinesOcurrence","IsTypedBy","Types","Defines","ContainedInStructure","ContainsElements","HasControlElements","AssignedToFlowElement","ConnectedTo","ConnectedFrom","ReferencedBy","Declares","HasContext","Controls","IsNestedBy","Nests","DocumentRefForObjects"]),p(this,"_ifcRels",[Di,Bn,Yn,Vn,ks,Gn,zn,Mi,kn,Hn,Wn,Xn,Zn,jn,$n]),p(this,"onFragmentsDisposed",t=>{delete this.relationMaps[t.groupID]}),p(this,"_changeMap",{}),p(this,"onEntitiesRelated",new $),this.components.add(Sn.uuid,this),e.get(Re).onFragmentsDisposed.add(this.onFragmentsDisposed)}indexRelations(e,t,s,i){const n=Object.keys(t).find(h=>h.startsWith("Relating")),r=Object.keys(t).find(h=>h.startsWith("Related"));if(!(n&&r))return;const o=t[n].value,a=t[r].map(h=>h.value),c=this.getEntityRelations(e,o,i);for(const h of a)c.push(h);for(const h of a)this.getEntityRelations(e,h,s).push(o)}getAttributeIndex(e){const t=this._inverseAttributes.indexOf(e);if(t===-1)throw new Error(`IfcRelationsIndexer: ${e} is not a valid IFC Inverse Attribute name or its not supported yet by this component.`);return t}setRelationMap(e,t){this.relationMaps[e.uuid]=t,this.onRelationsIndexed.trigger({modelID:e.uuid,relationsMap:t})}async process(e,t){if(!e.hasProperties)throw new Error("FragmentsGroup properties not found");let s=this.relationMaps[e.uuid];s||(s=new Map,this.relationMaps[e.uuid]=s);const i=e.getLocalProperties();if(!i)return s;const n=(t==null?void 0:t.relationsToProcess)??this._ifcRels;for(const[r,o]of Object.entries(i)){if(!n.includes(o.type))continue;const a=this._relToAttributesMap.get(o.type);if(!a)continue;const{forRelated:c,forRelating:h}=a;this.indexRelations(s,o,c,h)}return this.setRelationMap(e,s),s}async processFromWebIfc(e,t){const s=new Map;for(const i of this._ifcRels){const n=this._relToAttributesMap.get(i);if(!n)continue;const{forRelated:r,forRelating:o}=n,a=e.GetLineIDsWithType(t,i);for(let c=0;cT.startsWith("Related")),E=u.find(T=>T.startsWith("Relating"));if(!(f&&E))continue;I[f]=[...h].map(T=>new Nt(T)),I[E]=new Nt(a),await t.setData(i,I)}else{const I=await t.createIfcRel(i,r,a,[...h]);if(!I)continue;c.relID=I.expressID}}}}addEntitiesRelation(e,t,s,...i){const{type:n,inv:r}=s;let o=this.relationMaps[e.uuid];if(o||(o=new Map,this.relationMaps[e.uuid]=o),!this._ifcRels.includes(n))return;const a=qr.get(n);if(!a)return;const{forRelated:c,forRelating:h}=a;if(!(c===r||h===r))return;let d=this._changeMap[e.uuid];d||(d=new rt,this._changeMap[e.uuid]=d);const I=h===r?[t]:i,u=c===r?[t]:i;let f=d.get(n);f||(f=new rt,f.onItemSet.add(()=>this.onEntitiesRelated.trigger({invAttribute:r,relType:n,relatingIDs:I,relatedIDs:u})),f.onItemUpdated.add(()=>this.onEntitiesRelated.trigger({invAttribute:r,relType:n,relatingIDs:I,relatedIDs:u})),d.set(n,f));for(const E of I){let T=f.get(E);T||(T={related:new Pt},f.set(E,T)),T.related.add(...u)}for(const E of I)this.getEntityRelations(e,E,h).push(...u);for(const E of u)this.getEntityRelations(e,E,c).push(...I)}getEntityChildren(e,t,s=new Set){if(s.add(t),this.relationMaps[e.uuid]===void 0)throw new Error("The provided model has no indices. You have to generate them first.");const i=this.getEntityRelations(e,t,"IsDecomposedBy");if(i)for(const r of i)this.getEntityChildren(e,r,s);const n=this.getEntityRelations(e,t,"ContainsElements");if(n)for(const r of n)this.getEntityChildren(e,r,s);return s}};p(Ho,"uuid","23a889ab-83b3-44a4-8bee-ead83438370b");let Ke=Ho;const Wo=class Xo extends Fe{constructor(e){super(e),p(this,"onDisposed",new $),p(this,"onFragmentsLoaded",new $),p(this,"onFragmentsDisposed",new $),p(this,"list",new rt),p(this,"groups",new rt),p(this,"baseCoordinationModel",""),p(this,"baseCoordinationMatrix",new Ee),p(this,"enabled",!0),p(this,"_loader",new ho),this.components.add(Xo.uuid,this)}get meshes(){const e=[];for(const[t,s]of this.list)e.push(s.mesh);return e}dispose(){for(const[e,t]of this.groups)t.dispose(!0);this.baseCoordinationModel="",this.groups.clear(),this.list.clear(),this.onFragmentsLoaded.reset(),this.onFragmentsDisposed.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}disposeGroup(e){const{uuid:t}=e,s=[];for(const i of e.items)s.push(i.id),this.list.delete(i.id);e.dispose(!0),this.groups.delete(e.uuid),this.groups.size===0&&(this.baseCoordinationModel="",this.baseCoordinationMatrix=new Ee),this.onFragmentsDisposed.trigger({groupID:t,fragmentIDs:s})}load(e,t){const s={coordinate:!0,...t},{coordinate:i,name:n,properties:r,relationsMap:o}=s,a=this._loader.import(e);t&&(a.isStreamed=t.isStreamed||!1),n&&(a.name=n);for(const c of a.items)c.group=a,this.list.set(c.id,c);return i&&this.coordinate([a]),this.groups.set(a.uuid,a),r&&a.setLocalProperties(r),o&&this.components.get(Ke).setRelationMap(a,o),this.onFragmentsLoaded.trigger(a),a}export(e){return this._loader.export(e)}getModelIdMap(e){const t={};for(const s in e){const i=this.list.get(s);if(!(i&&i.group))continue;const n=i.group;n.uuid in t||(t[n.uuid]=new Set);const r=e[s];for(const o of r)t[n.uuid].add(o)}return t}modelIdToFragmentIdMap(e){let t={};for(const s in e){const i=this.groups.get(s);if(!i)continue;const n=e[s],r=i.getFragmentMap(n);t={...t,...r}}return t}guidToFragmentIdMap(e){const t={};for(const[s,i]of this.groups){s in t||(t[s]=new Set);for(const n of e){const r=i.globalToExpressIDs.get(n);r&&t[s].add(r)}}return this.modelIdToFragmentIdMap(t)}fragmentIdMapToGuids(e){const t=[],s=this.getModelIdMap(e);for(const i in s){const n=this.groups.get(i);if(!n)continue;const r=s[i];for(const o of r)for(const[a,c]of n.globalToExpressIDs.entries())if(c===o){t.push(a);break}}return t}coordinate(e=Array.from(this.groups.values())){if(this.baseCoordinationModel.length===0){const t=e.pop();if(!t)return;this.baseCoordinationModel=t.uuid,this.baseCoordinationMatrix=t.coordinationMatrix.clone()}if(e.length)for(const t of e)t.coordinationMatrix.equals(this.baseCoordinationMatrix)||(t.position.set(0,0,0),t.rotation.set(0,0,0),t.scale.set(1,1,1),t.updateMatrix(),this.applyBaseCoordinateSystem(t,t.coordinationMatrix))}applyBaseCoordinateSystem(e,t){t&&e.applyMatrix4(t.clone().invert()),e.applyMatrix4(this.baseCoordinationMatrix)}clone(e,t){const s=e.cloneGroup(t);this.groups.set(s.uuid,s);for(const i of s.items)this.list.set(i.id,i);return s}};p(Wo,"uuid","fef46874-46a3-461b-8c44-2922ab77c806");let Re=Wo;var Ci=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Eh(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function Ti(l){throw new Error('Could not dynamically require "'+l+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Zo={exports:{}};/*! - -JSZip v3.10.1 - A JavaScript class for generating and reading zip files - - -(c) 2009-2016 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. - -JSZip uses the library pako released under the MIT license : -https://github.com/nodeca/pako/blob/main/LICENSE -*/(function(l,e){(function(t){l.exports=t()})(function(){return function t(s,i,n){function r(c,h){if(!i[c]){if(!s[c]){var d=typeof Ti=="function"&&Ti;if(!h&&d)return d(c,!0);if(o)return o(c,!0);var I=new Error("Cannot find module '"+c+"'");throw I.code="MODULE_NOT_FOUND",I}var u=i[c]={exports:{}};s[c][0].call(u.exports,function(f){var E=s[c][1][f];return r(E||f)},u,u.exports,t,s,i,n)}return i[c].exports}for(var o=typeof Ti=="function"&&Ti,a=0;a>2,u=(3&c)<<4|h>>4,f=1>6:64,E=2>4,h=(15&I)<<4|(u=o.indexOf(a.charAt(E++)))>>2,d=(3&u)<<6|(f=o.indexOf(a.charAt(E++))),R[T++]=c,u!==64&&(R[T++]=h),f!==64&&(R[T++]=d);return R}},{"./support":30,"./utils":32}],2:[function(t,s,i){var n=t("./external"),r=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function c(h,d,I,u,f){this.compressedSize=h,this.uncompressedSize=d,this.crc32=I,this.compression=u,this.compressedContent=f}c.prototype={getContentWorker:function(){var h=new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),d=this;return h.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(h,d,I){return h.pipe(new o).pipe(new a("uncompressedSize")).pipe(d.compressWorker(I)).pipe(new a("compressedSize")).withStreamInfo("compression",d)},s.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,s,i){var n=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,s,i){var n=t("./utils"),r=function(){for(var o,a=[],c=0;c<256;c++){o=c;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;a[c]=o}return a}();s.exports=function(o,a){return o!==void 0&&o.length?n.getTypeOf(o)!=="string"?function(c,h,d,I){var u=r,f=I+d;c^=-1;for(var E=I;E>>8^u[255&(c^h[E])];return-1^c}(0|a,o,o.length,0):function(c,h,d,I){var u=r,f=I+d;c^=-1;for(var E=I;E>>8^u[255&(c^h.charCodeAt(E))];return-1^c}(0|a,o,o.length,0):0}},{"./utils":32}],5:[function(t,s,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(t,s,i){var n=null;n=typeof Promise<"u"?Promise:t("lie"),s.exports={Promise:n}},{lie:37}],7:[function(t,s,i){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",r=t("pako"),o=t("./utils"),a=t("./stream/GenericWorker"),c=n?"uint8array":"array";function h(d,I){a.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=I,this.meta={}}i.magic="\b\0",o.inherits(h,a),h.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(c,d.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(I){d.push({data:I,meta:d.meta})}},i.compressWorker=function(d){return new h("Deflate",d)},i.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,s,i){function n(u,f){var E,T="";for(E=0;E>>=8;return T}function r(u,f,E,T,C,R){var A,m,S=u.file,N=u.compression,y=R!==c.utf8encode,P=o.transformTo("string",R(S.name)),_=o.transformTo("string",c.utf8encode(S.name)),M=S.comment,B=o.transformTo("string",R(M)),O=o.transformTo("string",c.utf8encode(M)),v=_.length!==S.name.length,F=O.length!==M.length,b="",j="",z="",J=S.dir,X=S.date,ne={crc32:0,compressedSize:0,uncompressedSize:0};f&&!E||(ne.crc32=u.crc32,ne.compressedSize=u.compressedSize,ne.uncompressedSize=u.uncompressedSize);var V=0;f&&(V|=8),y||!v&&!F||(V|=2048);var Y=0,ie=0;J&&(Y|=16),C==="UNIX"?(ie=798,Y|=function(K,Se){var ye=K;return K||(ye=Se?16893:33204),(65535&ye)<<16}(S.unixPermissions,J)):(ie=20,Y|=function(K){return 63&(K||0)}(S.dosPermissions)),A=X.getUTCHours(),A<<=6,A|=X.getUTCMinutes(),A<<=5,A|=X.getUTCSeconds()/2,m=X.getUTCFullYear()-1980,m<<=4,m|=X.getUTCMonth()+1,m<<=5,m|=X.getUTCDate(),v&&(j=n(1,1)+n(h(P),4)+_,b+="up"+n(j.length,2)+j),F&&(z=n(1,1)+n(h(B),4)+O,b+="uc"+n(z.length,2)+z);var ee="";return ee+=` -\0`,ee+=n(V,2),ee+=N.magic,ee+=n(A,2),ee+=n(m,2),ee+=n(ne.crc32,4),ee+=n(ne.compressedSize,4),ee+=n(ne.uncompressedSize,4),ee+=n(P.length,2),ee+=n(b.length,2),{fileRecord:d.LOCAL_FILE_HEADER+ee+P+b,dirRecord:d.CENTRAL_FILE_HEADER+n(ie,2)+ee+n(B.length,2)+"\0\0\0\0"+n(Y,4)+n(T,4)+P+b+B}}var o=t("../utils"),a=t("../stream/GenericWorker"),c=t("../utf8"),h=t("../crc32"),d=t("../signature");function I(u,f,E,T){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=f,this.zipPlatform=E,this.encodeFileName=T,this.streamFiles=u,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(I,a),I.prototype.push=function(u){var f=u.meta.percent||0,E=this.entriesCount,T=this._sources.length;this.accumulate?this.contentBuffer.push(u):(this.bytesWritten+=u.data.length,a.prototype.push.call(this,{data:u.data,meta:{currentFile:this.currentFile,percent:E?(f+100*(E-T-1))/E:100}}))},I.prototype.openedSource=function(u){this.currentSourceOffset=this.bytesWritten,this.currentFile=u.file.name;var f=this.streamFiles&&!u.file.dir;if(f){var E=r(u,f,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},I.prototype.closedSource=function(u){this.accumulate=!1;var f=this.streamFiles&&!u.file.dir,E=r(u,f,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),f)this.push({data:function(T){return d.DATA_DESCRIPTOR+n(T.crc32,4)+n(T.compressedSize,4)+n(T.uncompressedSize,4)}(u),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},I.prototype.flush=function(){for(var u=this.bytesWritten,f=0;f=this.index;a--)c=(c<<8)+this.byteAt(a);return this.index+=o,c},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},s.exports=r},{"../utils":32}],19:[function(t,s,i){var n=t("./Uint8ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},s.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,s,i){var n=t("./DataReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},r.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},r.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},s.exports=r},{"../utils":32,"./DataReader":18}],21:[function(t,s,i){var n=t("./ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var a=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},s.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(t,s,i){var n=t("../utils"),r=t("../support"),o=t("./ArrayReader"),a=t("./StringReader"),c=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");s.exports=function(d){var I=n.getTypeOf(d);return n.checkSupport(I),I!=="string"||r.uint8array?I==="nodebuffer"?new c(d):r.uint8array?new h(n.transformTo("uint8array",d)):new o(n.transformTo("array",d)):new a(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,s,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,s,i){var n=t("./GenericWorker"),r=t("../utils");function o(a){n.call(this,"ConvertWorker to "+a),this.destType=a}r.inherits(o,n),o.prototype.processChunk=function(a){this.push({data:r.transformTo(this.destType,a.data),meta:a.meta})},s.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,s,i){var n=t("./GenericWorker"),r=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(a){this.streamInfo.crc32=r(a.data,this.streamInfo.crc32||0),this.push(a)},s.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,s,i){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}n.inherits(o,r),o.prototype.processChunk=function(a){if(a){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+a.data.length}r.prototype.processChunk.call(this,a)},s.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,s,i){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(h){c.dataIsReady=!0,c.data=h,c.max=h&&h.length||0,c.type=n.getTypeOf(h),c.isPaused||c._tickAndRepeat()},function(h){c.error(h)})}n.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":a=this.data.substring(this.index,c);break;case"uint8array":a=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":a=this.data.slice(this.index,c)}return this.index=c,this.push({data:a,meta:{percent:this.max?this.index/this.max*100:0}})},s.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,s,i){function n(r){this.name=r||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(r){this.emit("data",r)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(r){this.emit("error",r)}return!0},error:function(r){return!this.isFinished&&(this.isPaused?this.generatedError=r:(this.isFinished=!0,this.emit("error",r),this.previous&&this.previous.error(r),this.cleanUp()),!0)},on:function(r,o){return this._listeners[r].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(r,o){if(this._listeners[r])for(var a=0;a "+r:r}},s.exports=n},{}],29:[function(t,s,i){var n=t("../utils"),r=t("./ConvertWorker"),o=t("./GenericWorker"),a=t("../base64"),c=t("../support"),h=t("../external"),d=null;if(c.nodestream)try{d=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function I(f,E){return new h.Promise(function(T,C){var R=[],A=f._internalType,m=f._outputType,S=f._mimeType;f.on("data",function(N,y){R.push(N),E&&E(y)}).on("error",function(N){R=[],C(N)}).on("end",function(){try{var N=function(y,P,_){switch(y){case"blob":return n.newBlob(n.transformTo("arraybuffer",P),_);case"base64":return a.encode(P);default:return n.transformTo(y,P)}}(m,function(y,P){var _,M=0,B=null,O=0;for(_=0;_"u")i.blob=!1;else{var n=new ArrayBuffer(0);try{i.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),i.blob=r.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(t,s,i){for(var n=t("./utils"),r=t("./support"),o=t("./nodejsUtils"),a=t("./stream/GenericWorker"),c=new Array(256),h=0;h<256;h++)c[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;c[254]=c[254]=1;function d(){a.call(this,"utf-8 decode"),this.leftOver=null}function I(){a.call(this,"utf-8 encode")}i.utf8encode=function(u){return r.nodebuffer?o.newBufferFrom(u,"utf-8"):function(f){var E,T,C,R,A,m=f.length,S=0;for(R=0;R>>6:(T<65536?E[A++]=224|T>>>12:(E[A++]=240|T>>>18,E[A++]=128|T>>>12&63),E[A++]=128|T>>>6&63),E[A++]=128|63&T);return E}(u)},i.utf8decode=function(u){return r.nodebuffer?n.transformTo("nodebuffer",u).toString("utf-8"):function(f){var E,T,C,R,A=f.length,m=new Array(2*A);for(E=T=0;E>10&1023,m[T++]=56320|1023&C)}return m.length!==T&&(m.subarray?m=m.subarray(0,T):m.length=T),n.applyFromCharCode(m)}(u=n.transformTo(r.uint8array?"uint8array":"array",u))},n.inherits(d,a),d.prototype.processChunk=function(u){var f=n.transformTo(r.uint8array?"uint8array":"array",u.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var E=f;(f=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),f.set(E,this.leftOver.length)}else f=this.leftOver.concat(f);this.leftOver=null}var T=function(R,A){var m;for((A=A||R.length)>R.length&&(A=R.length),m=A-1;0<=m&&(192&R[m])==128;)m--;return m<0||m===0?A:m+c[R[m]]>A?m:A}(f),C=f;T!==f.length&&(r.uint8array?(C=f.subarray(0,T),this.leftOver=f.subarray(T,f.length)):(C=f.slice(0,T),this.leftOver=f.slice(T,f.length))),this.push({data:i.utf8decode(C),meta:u.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=d,n.inherits(I,a),I.prototype.processChunk=function(u){this.push({data:i.utf8encode(u.data),meta:u.meta})},i.Utf8EncodeWorker=I},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,s,i){var n=t("./support"),r=t("./base64"),o=t("./nodejsUtils"),a=t("./external");function c(E){return E}function h(E,T){for(var C=0;C>8;this.dir=!!(16&this.externalFileAttributes),u==0&&(this.dosPermissions=63&this.externalFileAttributes),u==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var u=n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=u.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=u.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=u.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=u.readInt(4))}},readExtraFields:function(u){var f,E,T,C=u.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});u.index+4>>6:(u<65536?I[T++]=224|u>>>12:(I[T++]=240|u>>>18,I[T++]=128|u>>>12&63),I[T++]=128|u>>>6&63),I[T++]=128|63&u);return I},i.buf2binstring=function(d){return h(d,d.length)},i.binstring2buf=function(d){for(var I=new n.Buf8(d.length),u=0,f=I.length;u>10&1023,R[f++]=56320|1023&E)}return h(R,f)},i.utf8border=function(d,I){var u;for((I=I||d.length)>d.length&&(I=d.length),u=I-1;0<=u&&(192&d[u])==128;)u--;return u<0||u===0?I:u+a[d[u]]>I?u:I}},{"./common":41}],43:[function(t,s,i){s.exports=function(n,r,o,a){for(var c=65535&n|0,h=n>>>16&65535|0,d=0;o!==0;){for(o-=d=2e3>>1:r>>>1;o[a]=r}return o}();s.exports=function(r,o,a,c){var h=n,d=c+a;r^=-1;for(var I=c;I>>8^h[255&(r^o[I])];return-1^r}},{}],46:[function(t,s,i){var n,r=t("../utils/common"),o=t("./trees"),a=t("./adler32"),c=t("./crc32"),h=t("./messages"),d=0,I=4,u=0,f=-2,E=-1,T=4,C=2,R=8,A=9,m=286,S=30,N=19,y=2*m+1,P=15,_=3,M=258,B=M+_+1,O=42,v=113,F=1,b=2,j=3,z=4;function J(g,H){return g.msg=h[H],H}function X(g){return(g<<1)-(4g.avail_out&&(G=g.avail_out),G!==0&&(r.arraySet(g.output,H.pending_buf,H.pending_out,G,g.next_out),g.next_out+=G,H.pending_out+=G,g.total_out+=G,g.avail_out-=G,H.pending-=G,H.pending===0&&(H.pending_out=0))}function Y(g,H){o._tr_flush_block(g,0<=g.block_start?g.block_start:-1,g.strstart-g.block_start,H),g.block_start=g.strstart,V(g.strm)}function ie(g,H){g.pending_buf[g.pending++]=H}function ee(g,H){g.pending_buf[g.pending++]=H>>>8&255,g.pending_buf[g.pending++]=255&H}function K(g,H){var G,w,L=g.max_chain_length,D=g.strstart,W=g.prev_length,Z=g.nice_match,x=g.strstart>g.w_size-B?g.strstart-(g.w_size-B):0,q=g.window,te=g.w_mask,Q=g.prev,oe=g.strstart+M,Te=q[D+W-1],de=q[D+W];g.prev_length>=g.good_match&&(L>>=2),Z>g.lookahead&&(Z=g.lookahead);do if(q[(G=H)+W]===de&&q[G+W-1]===Te&&q[G]===q[D]&&q[++G]===q[D+1]){D+=2,G++;do;while(q[++D]===q[++G]&&q[++D]===q[++G]&&q[++D]===q[++G]&&q[++D]===q[++G]&&q[++D]===q[++G]&&q[++D]===q[++G]&&q[++D]===q[++G]&&q[++D]===q[++G]&&Dx&&--L!=0);return W<=g.lookahead?W:g.lookahead}function Se(g){var H,G,w,L,D,W,Z,x,q,te,Q=g.w_size;do{if(L=g.window_size-g.lookahead-g.strstart,g.strstart>=Q+(Q-B)){for(r.arraySet(g.window,g.window,Q,Q,0),g.match_start-=Q,g.strstart-=Q,g.block_start-=Q,H=G=g.hash_size;w=g.head[--H],g.head[H]=Q<=w?w-Q:0,--G;);for(H=G=Q;w=g.prev[--H],g.prev[H]=Q<=w?w-Q:0,--G;);L+=Q}if(g.strm.avail_in===0)break;if(W=g.strm,Z=g.window,x=g.strstart+g.lookahead,q=L,te=void 0,te=W.avail_in,q=_)for(D=g.strstart-g.insert,g.ins_h=g.window[D],g.ins_h=(g.ins_h<=_&&(g.ins_h=(g.ins_h<=_)if(w=o._tr_tally(g,g.strstart-g.match_start,g.match_length-_),g.lookahead-=g.match_length,g.match_length<=g.max_lazy_match&&g.lookahead>=_){for(g.match_length--;g.strstart++,g.ins_h=(g.ins_h<=_&&(g.ins_h=(g.ins_h<=_&&g.match_length<=g.prev_length){for(L=g.strstart+g.lookahead-_,w=o._tr_tally(g,g.strstart-1-g.prev_match,g.prev_length-_),g.lookahead-=g.prev_length-1,g.prev_length-=2;++g.strstart<=L&&(g.ins_h=(g.ins_h<g.pending_buf_size-5&&(G=g.pending_buf_size-5);;){if(g.lookahead<=1){if(Se(g),g.lookahead===0&&H===d)return F;if(g.lookahead===0)break}g.strstart+=g.lookahead,g.lookahead=0;var w=g.block_start+G;if((g.strstart===0||g.strstart>=w)&&(g.lookahead=g.strstart-w,g.strstart=w,Y(g,!1),g.strm.avail_out===0)||g.strstart-g.block_start>=g.w_size-B&&(Y(g,!1),g.strm.avail_out===0))return F}return g.insert=0,H===I?(Y(g,!0),g.strm.avail_out===0?j:z):(g.strstart>g.block_start&&(Y(g,!1),g.strm.avail_out),F)}),new ue(4,4,8,4,ye),new ue(4,5,16,8,ye),new ue(4,6,32,32,ye),new ue(4,4,16,16,re),new ue(8,16,32,32,re),new ue(8,16,128,128,re),new ue(8,32,128,256,re),new ue(32,128,258,1024,re),new ue(32,258,258,4096,re)],i.deflateInit=function(g,H){return ve(g,H,R,15,8,0)},i.deflateInit2=ve,i.deflateReset=We,i.deflateResetKeep=pe,i.deflateSetHeader=function(g,H){return g&&g.state?g.state.wrap!==2?f:(g.state.gzhead=H,u):f},i.deflate=function(g,H){var G,w,L,D;if(!g||!g.state||5>8&255),ie(w,w.gzhead.time>>16&255),ie(w,w.gzhead.time>>24&255),ie(w,w.level===9?2:2<=w.strategy||w.level<2?4:0),ie(w,255&w.gzhead.os),w.gzhead.extra&&w.gzhead.extra.length&&(ie(w,255&w.gzhead.extra.length),ie(w,w.gzhead.extra.length>>8&255)),w.gzhead.hcrc&&(g.adler=c(g.adler,w.pending_buf,w.pending,0)),w.gzindex=0,w.status=69):(ie(w,0),ie(w,0),ie(w,0),ie(w,0),ie(w,0),ie(w,w.level===9?2:2<=w.strategy||w.level<2?4:0),ie(w,3),w.status=v);else{var W=R+(w.w_bits-8<<4)<<8;W|=(2<=w.strategy||w.level<2?0:w.level<6?1:w.level===6?2:3)<<6,w.strstart!==0&&(W|=32),W+=31-W%31,w.status=v,ee(w,W),w.strstart!==0&&(ee(w,g.adler>>>16),ee(w,65535&g.adler)),g.adler=1}if(w.status===69)if(w.gzhead.extra){for(L=w.pending;w.gzindex<(65535&w.gzhead.extra.length)&&(w.pending!==w.pending_buf_size||(w.gzhead.hcrc&&w.pending>L&&(g.adler=c(g.adler,w.pending_buf,w.pending-L,L)),V(g),L=w.pending,w.pending!==w.pending_buf_size));)ie(w,255&w.gzhead.extra[w.gzindex]),w.gzindex++;w.gzhead.hcrc&&w.pending>L&&(g.adler=c(g.adler,w.pending_buf,w.pending-L,L)),w.gzindex===w.gzhead.extra.length&&(w.gzindex=0,w.status=73)}else w.status=73;if(w.status===73)if(w.gzhead.name){L=w.pending;do{if(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>L&&(g.adler=c(g.adler,w.pending_buf,w.pending-L,L)),V(g),L=w.pending,w.pending===w.pending_buf_size)){D=1;break}D=w.gzindexL&&(g.adler=c(g.adler,w.pending_buf,w.pending-L,L)),D===0&&(w.gzindex=0,w.status=91)}else w.status=91;if(w.status===91)if(w.gzhead.comment){L=w.pending;do{if(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>L&&(g.adler=c(g.adler,w.pending_buf,w.pending-L,L)),V(g),L=w.pending,w.pending===w.pending_buf_size)){D=1;break}D=w.gzindexL&&(g.adler=c(g.adler,w.pending_buf,w.pending-L,L)),D===0&&(w.status=103)}else w.status=103;if(w.status===103&&(w.gzhead.hcrc?(w.pending+2>w.pending_buf_size&&V(g),w.pending+2<=w.pending_buf_size&&(ie(w,255&g.adler),ie(w,g.adler>>8&255),g.adler=0,w.status=v)):w.status=v),w.pending!==0){if(V(g),g.avail_out===0)return w.last_flush=-1,u}else if(g.avail_in===0&&X(H)<=X(G)&&H!==I)return J(g,-5);if(w.status===666&&g.avail_in!==0)return J(g,-5);if(g.avail_in!==0||w.lookahead!==0||H!==d&&w.status!==666){var Z=w.strategy===2?function(x,q){for(var te;;){if(x.lookahead===0&&(Se(x),x.lookahead===0)){if(q===d)return F;break}if(x.match_length=0,te=o._tr_tally(x,0,x.window[x.strstart]),x.lookahead--,x.strstart++,te&&(Y(x,!1),x.strm.avail_out===0))return F}return x.insert=0,q===I?(Y(x,!0),x.strm.avail_out===0?j:z):x.last_lit&&(Y(x,!1),x.strm.avail_out===0)?F:b}(w,H):w.strategy===3?function(x,q){for(var te,Q,oe,Te,de=x.window;;){if(x.lookahead<=M){if(Se(x),x.lookahead<=M&&q===d)return F;if(x.lookahead===0)break}if(x.match_length=0,x.lookahead>=_&&0x.lookahead&&(x.match_length=x.lookahead)}if(x.match_length>=_?(te=o._tr_tally(x,1,x.match_length-_),x.lookahead-=x.match_length,x.strstart+=x.match_length,x.match_length=0):(te=o._tr_tally(x,0,x.window[x.strstart]),x.lookahead--,x.strstart++),te&&(Y(x,!1),x.strm.avail_out===0))return F}return x.insert=0,q===I?(Y(x,!0),x.strm.avail_out===0?j:z):x.last_lit&&(Y(x,!1),x.strm.avail_out===0)?F:b}(w,H):n[w.level].func(w,H);if(Z!==j&&Z!==z||(w.status=666),Z===F||Z===j)return g.avail_out===0&&(w.last_flush=-1),u;if(Z===b&&(H===1?o._tr_align(w):H!==5&&(o._tr_stored_block(w,0,0,!1),H===3&&(ne(w.head),w.lookahead===0&&(w.strstart=0,w.block_start=0,w.insert=0))),V(g),g.avail_out===0))return w.last_flush=-1,u}return H!==I?u:w.wrap<=0?1:(w.wrap===2?(ie(w,255&g.adler),ie(w,g.adler>>8&255),ie(w,g.adler>>16&255),ie(w,g.adler>>24&255),ie(w,255&g.total_in),ie(w,g.total_in>>8&255),ie(w,g.total_in>>16&255),ie(w,g.total_in>>24&255)):(ee(w,g.adler>>>16),ee(w,65535&g.adler)),V(g),0=G.w_size&&(D===0&&(ne(G.head),G.strstart=0,G.block_start=0,G.insert=0),q=new r.Buf8(G.w_size),r.arraySet(q,H,te-G.w_size,G.w_size,0),H=q,te=G.w_size),W=g.avail_in,Z=g.next_in,x=g.input,g.avail_in=te,g.next_in=0,g.input=H,Se(G);G.lookahead>=_;){for(w=G.strstart,L=G.lookahead-(_-1);G.ins_h=(G.ins_h<>>=_=P>>>24,A-=_,(_=P>>>16&255)===0)b[h++]=65535&P;else{if(!(16&_)){if(!(64&_)){P=m[(65535&P)+(R&(1<<_)-1)];continue t}if(32&_){o.mode=12;break e}n.msg="invalid literal/length code",o.mode=30;break e}M=65535&P,(_&=15)&&(A<_&&(R+=F[a++]<>>=_,A-=_),A<15&&(R+=F[a++]<>>=_=P>>>24,A-=_,!(16&(_=P>>>16&255))){if(!(64&_)){P=S[(65535&P)+(R&(1<<_)-1)];continue s}n.msg="invalid distance code",o.mode=30;break e}if(B=65535&P,A<(_&=15)&&(R+=F[a++]<>>=_,A-=_,(_=h-d)>3,R&=(1<<(A-=M<<3))-1,n.next_in=a,n.next_out=h,n.avail_in=a>>24&255)+(O>>>8&65280)+((65280&O)<<8)+((255&O)<<24)}function R(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function A(O){var v;return O&&O.state?(v=O.state,O.total_in=O.total_out=v.total=0,O.msg="",v.wrap&&(O.adler=1&v.wrap),v.mode=f,v.last=0,v.havedict=0,v.dmax=32768,v.head=null,v.hold=0,v.bits=0,v.lencode=v.lendyn=new n.Buf32(E),v.distcode=v.distdyn=new n.Buf32(T),v.sane=1,v.back=-1,I):u}function m(O){var v;return O&&O.state?((v=O.state).wsize=0,v.whave=0,v.wnext=0,A(O)):u}function S(O,v){var F,b;return O&&O.state?(b=O.state,v<0?(F=0,v=-v):(F=1+(v>>4),v<48&&(v&=15)),v&&(v<8||15=z.wsize?(n.arraySet(z.window,v,F-z.wsize,z.wsize,0),z.wnext=0,z.whave=z.wsize):(b<(j=z.wsize-z.wnext)&&(j=b),n.arraySet(z.window,v,F-b,j,z.wnext),(b-=j)?(n.arraySet(z.window,v,F-b,b,0),z.wnext=b,z.whave=z.wsize):(z.wnext+=j,z.wnext===z.wsize&&(z.wnext=0),z.whave>>8&255,F.check=o(F.check,D,2,0),Y=V=0,F.mode=2;break}if(F.flags=0,F.head&&(F.head.done=!1),!(1&F.wrap)||(((255&V)<<8)+(V>>8))%31){O.msg="incorrect header check",F.mode=30;break}if((15&V)!=8){O.msg="unknown compression method",F.mode=30;break}if(Y-=4,g=8+(15&(V>>>=4)),F.wbits===0)F.wbits=g;else if(g>F.wbits){O.msg="invalid window size",F.mode=30;break}F.dmax=1<>8&1),512&F.flags&&(D[0]=255&V,D[1]=V>>>8&255,F.check=o(F.check,D,2,0)),Y=V=0,F.mode=3;case 3:for(;Y<32;){if(X===0)break e;X--,V+=b[z++]<>>8&255,D[2]=V>>>16&255,D[3]=V>>>24&255,F.check=o(F.check,D,4,0)),Y=V=0,F.mode=4;case 4:for(;Y<16;){if(X===0)break e;X--,V+=b[z++]<>8),512&F.flags&&(D[0]=255&V,D[1]=V>>>8&255,F.check=o(F.check,D,2,0)),Y=V=0,F.mode=5;case 5:if(1024&F.flags){for(;Y<16;){if(X===0)break e;X--,V+=b[z++]<>>8&255,F.check=o(F.check,D,2,0)),Y=V=0}else F.head&&(F.head.extra=null);F.mode=6;case 6:if(1024&F.flags&&(X<(K=F.length)&&(K=X),K&&(F.head&&(g=F.head.extra_len-F.length,F.head.extra||(F.head.extra=new Array(F.head.extra_len)),n.arraySet(F.head.extra,b,z,K,g)),512&F.flags&&(F.check=o(F.check,b,K,z)),X-=K,z+=K,F.length-=K),F.length))break e;F.length=0,F.mode=7;case 7:if(2048&F.flags){if(X===0)break e;for(K=0;g=b[z+K++],F.head&&g&&F.length<65536&&(F.head.name+=String.fromCharCode(g)),g&&K>9&1,F.head.done=!0),O.adler=F.check=0,F.mode=12;break;case 10:for(;Y<32;){if(X===0)break e;X--,V+=b[z++]<>>=7&Y,Y-=7&Y,F.mode=27;break}for(;Y<3;){if(X===0)break e;X--,V+=b[z++]<>>=1)){case 0:F.mode=14;break;case 1:if(M(F),F.mode=20,v!==6)break;V>>>=2,Y-=2;break e;case 2:F.mode=17;break;case 3:O.msg="invalid block type",F.mode=30}V>>>=2,Y-=2;break;case 14:for(V>>>=7&Y,Y-=7&Y;Y<32;){if(X===0)break e;X--,V+=b[z++]<>>16^65535)){O.msg="invalid stored block lengths",F.mode=30;break}if(F.length=65535&V,Y=V=0,F.mode=15,v===6)break e;case 15:F.mode=16;case 16:if(K=F.length){if(X>>=5,Y-=5,F.ndist=1+(31&V),V>>>=5,Y-=5,F.ncode=4+(15&V),V>>>=4,Y-=4,286>>=3,Y-=3}for(;F.have<19;)F.lens[W[F.have++]]=0;if(F.lencode=F.lendyn,F.lenbits=7,G={bits:F.lenbits},H=c(0,F.lens,0,19,F.lencode,0,F.work,G),F.lenbits=G.bits,H){O.msg="invalid code lengths set",F.mode=30;break}F.have=0,F.mode=19;case 19:for(;F.have>>16&255,he=65535&L,!((re=L>>>24)<=Y);){if(X===0)break e;X--,V+=b[z++]<>>=re,Y-=re,F.lens[F.have++]=he;else{if(he===16){for(w=re+2;Y>>=re,Y-=re,F.have===0){O.msg="invalid bit length repeat",F.mode=30;break}g=F.lens[F.have-1],K=3+(3&V),V>>>=2,Y-=2}else if(he===17){for(w=re+3;Y>>=re)),V>>>=3,Y-=3}else{for(w=re+7;Y>>=re)),V>>>=7,Y-=7}if(F.have+K>F.nlen+F.ndist){O.msg="invalid bit length repeat",F.mode=30;break}for(;K--;)F.lens[F.have++]=g}}if(F.mode===30)break;if(F.lens[256]===0){O.msg="invalid code -- missing end-of-block",F.mode=30;break}if(F.lenbits=9,G={bits:F.lenbits},H=c(h,F.lens,0,F.nlen,F.lencode,0,F.work,G),F.lenbits=G.bits,H){O.msg="invalid literal/lengths set",F.mode=30;break}if(F.distbits=6,F.distcode=F.distdyn,G={bits:F.distbits},H=c(d,F.lens,F.nlen,F.ndist,F.distcode,0,F.work,G),F.distbits=G.bits,H){O.msg="invalid distances set",F.mode=30;break}if(F.mode=20,v===6)break e;case 20:F.mode=21;case 21:if(6<=X&&258<=ne){O.next_out=J,O.avail_out=ne,O.next_in=z,O.avail_in=X,F.hold=V,F.bits=Y,a(O,ee),J=O.next_out,j=O.output,ne=O.avail_out,z=O.next_in,b=O.input,X=O.avail_in,V=F.hold,Y=F.bits,F.mode===12&&(F.back=-1);break}for(F.back=0;ue=(L=F.lencode[V&(1<>>16&255,he=65535&L,!((re=L>>>24)<=Y);){if(X===0)break e;X--,V+=b[z++]<>pe)])>>>16&255,he=65535&L,!(pe+(re=L>>>24)<=Y);){if(X===0)break e;X--,V+=b[z++]<>>=pe,Y-=pe,F.back+=pe}if(V>>>=re,Y-=re,F.back+=re,F.length=he,ue===0){F.mode=26;break}if(32&ue){F.back=-1,F.mode=12;break}if(64&ue){O.msg="invalid literal/length code",F.mode=30;break}F.extra=15&ue,F.mode=22;case 22:if(F.extra){for(w=F.extra;Y>>=F.extra,Y-=F.extra,F.back+=F.extra}F.was=F.length,F.mode=23;case 23:for(;ue=(L=F.distcode[V&(1<>>16&255,he=65535&L,!((re=L>>>24)<=Y);){if(X===0)break e;X--,V+=b[z++]<>pe)])>>>16&255,he=65535&L,!(pe+(re=L>>>24)<=Y);){if(X===0)break e;X--,V+=b[z++]<>>=pe,Y-=pe,F.back+=pe}if(V>>>=re,Y-=re,F.back+=re,64&ue){O.msg="invalid distance code",F.mode=30;break}F.offset=he,F.extra=15&ue,F.mode=24;case 24:if(F.extra){for(w=F.extra;Y>>=F.extra,Y-=F.extra,F.back+=F.extra}if(F.offset>F.dmax){O.msg="invalid distance too far back",F.mode=30;break}F.mode=25;case 25:if(ne===0)break e;if(K=ee-ne,F.offset>K){if((K=F.offset-K)>F.whave&&F.sane){O.msg="invalid distance too far back",F.mode=30;break}Se=K>F.wnext?(K-=F.wnext,F.wsize-K):F.wnext-K,K>F.length&&(K=F.length),ye=F.window}else ye=j,Se=J-F.offset,K=F.length;for(ney?(_=Se[ye+T[v]],Y[ie+T[v]]):(_=96,0),R=1<>J)+(A-=R)]=P<<24|_<<16|M|0,A!==0;);for(R=1<>=1;if(R!==0?(V&=R-1,V+=R):V=0,v++,--ee[O]==0){if(O===b)break;O=d[I+T[v]]}if(j>>7)]}function ie(L,D){L.pending_buf[L.pending++]=255&D,L.pending_buf[L.pending++]=D>>>8&255}function ee(L,D,W){L.bi_valid>C-W?(L.bi_buf|=D<>C-L.bi_valid,L.bi_valid+=W-C):(L.bi_buf|=D<>>=1,W<<=1,0<--D;);return W>>>1}function ye(L,D,W){var Z,x,q=new Array(T+1),te=0;for(Z=1;Z<=T;Z++)q[Z]=te=te+W[Z-1]<<1;for(x=0;x<=D;x++){var Q=L[2*x+1];Q!==0&&(L[2*x]=Se(q[Q]++,Q))}}function re(L){var D;for(D=0;D>1;1<=W;W--)pe(L,q,W);for(x=oe;W=L.heap[1],L.heap[1]=L.heap[L.heap_len--],pe(L,q,1),Z=L.heap[1],L.heap[--L.heap_max]=W,L.heap[--L.heap_max]=Z,q[2*x]=q[2*W]+q[2*Z],L.depth[x]=(L.depth[W]>=L.depth[Z]?L.depth[W]:L.depth[Z])+1,q[2*W+1]=q[2*Z+1]=x,L.heap[1]=x++,pe(L,q,1),2<=L.heap_len;);L.heap[--L.heap_max]=L.heap[1],function(de,Xe){var Es,ot,fs,Ne,Ws,Yi,dt=Xe.dyn_tree,rr=Xe.max_code,ya=Xe.stat_desc.static_tree,Na=Xe.stat_desc.has_stree,La=Xe.stat_desc.extra_bits,or=Xe.stat_desc.extra_base,ps=Xe.stat_desc.max_length,Xs=0;for(Ne=0;Ne<=T;Ne++)de.bl_count[Ne]=0;for(dt[2*de.heap[de.heap_max]+1]=0,Es=de.heap_max+1;Es>=7;x>>=1)if(1&Te&&Q.dyn_ltree[2*oe]!==0)return r;if(Q.dyn_ltree[18]!==0||Q.dyn_ltree[20]!==0||Q.dyn_ltree[26]!==0)return o;for(oe=32;oe>>3,(q=L.static_len+3+7>>>3)<=x&&(x=q)):x=q=W+5,W+4<=x&&D!==-1?w(L,D,W,Z):L.strategy===4||q===x?(ee(L,2+(Z?1:0),3),We(L,B,O)):(ee(L,4+(Z?1:0),3),function(Q,oe,Te,de){var Xe;for(ee(Q,oe-257,5),ee(Q,Te-1,5),ee(Q,de-4,4),Xe=0;Xe>>8&255,L.pending_buf[L.d_buf+2*L.last_lit+1]=255&D,L.pending_buf[L.l_buf+L.last_lit]=255&W,L.last_lit++,D===0?L.dyn_ltree[2*W]++:(L.matches++,D--,L.dyn_ltree[2*(F[W]+d+1)]++,L.dyn_dtree[2*Y(D)]++),L.last_lit===L.lit_bufsize-1},i._tr_align=function(L){ee(L,2,3),K(L,A,B),function(D){D.bi_valid===16?(ie(D,D.bi_buf),D.bi_buf=0,D.bi_valid=0):8<=D.bi_valid&&(D.pending_buf[D.pending++]=255&D.bi_buf,D.bi_buf>>=8,D.bi_valid-=8)}(L)}},{"../utils/common":41}],53:[function(t,s,i){s.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,s,i){(function(n){(function(r,o){if(!r.setImmediate){var a,c,h,d,I=1,u={},f=!1,E=r.document,T=Object.getPrototypeOf&&Object.getPrototypeOf(r);T=T&&T.setTimeout?T:r,a={}.toString.call(r.process)==="[object process]"?function(m){process.nextTick(function(){R(m)})}:function(){if(r.postMessage&&!r.importScripts){var m=!0,S=r.onmessage;return r.onmessage=function(){m=!1},r.postMessage("","*"),r.onmessage=S,m}}()?(d="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",A,!1):r.attachEvent("onmessage",A),function(m){r.postMessage(d+m,"*")}):r.MessageChannel?((h=new MessageChannel).port1.onmessage=function(m){R(m.data)},function(m){h.port2.postMessage(m)}):E&&"onreadystatechange"in E.createElement("script")?(c=E.documentElement,function(m){var S=E.createElement("script");S.onreadystatechange=function(){R(m),S.onreadystatechange=null,c.removeChild(S),S=null},c.appendChild(S)}):function(m){setTimeout(R,0,m)},T.setImmediate=function(m){typeof m!="function"&&(m=new Function(""+m));for(var S=new Array(arguments.length-1),N=0;N"u"?n===void 0?this:n:self)}).call(this,typeof Ci<"u"?Ci:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Zo);var fh=Zo.exports;const Qr=Eh(fh);var jo={},xi={};(function(l){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",s="["+e+"]["+t+"]*",i=new RegExp("^"+s+"$"),n=function(o,a){const c=[];let h=a.exec(o);for(;h;){const d=[];d.startIndex=a.lastIndex-h[0].length;const I=h.length;for(let u=0;u"u")};l.isExist=function(o){return typeof o<"u"},l.isEmptyObject=function(o){return Object.keys(o).length===0},l.merge=function(o,a,c){if(a){const h=Object.keys(a),d=h.length;for(let I=0;I"&&l[n]!==" "&&l[n]!==" "&&l[n]!==` -`&&l[n]!=="\r";n++)a+=l[n];if(a=a.trim(),a[a.length-1]==="/"&&(a=a.substring(0,a.length-1),n--),!Ah(a)){let d;return a.trim().length===0?d="Invalid space after '<'.":d="Tag '"+a+"' is an invalid name.",Le("InvalidTag",d,Be(l,n))}const c=mh(l,n);if(c===!1)return Le("InvalidAttr","Attributes for '"+a+"' have open quote.",Be(l,n));let h=c.value;if(n=c.index,h[h.length-1]==="/"){const d=n-h.length;h=h.substring(0,h.length-1);const I=to(h,e);if(I===!0)s=!0;else return Le(I.err.code,I.err.msg,Be(l,d+I.err.line))}else if(o)if(c.tagClosed){if(h.trim().length>0)return Le("InvalidTag","Closing tag '"+a+"' can't have attributes or invalid starting.",Be(l,r));if(t.length===0)return Le("InvalidTag","Closing tag '"+a+"' has not been opened.",Be(l,r));{const d=t.pop();if(a!==d.tagName){let I=Be(l,d.tagStartPos);return Le("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+I.line+", col "+I.col+") instead of closing tag '"+a+"'.",Be(l,r))}t.length==0&&(i=!0)}}else return Le("InvalidTag","Closing tag '"+a+"' doesn't have proper closing.",Be(l,n));else{const d=to(h,e);if(d!==!0)return Le(d.err.code,d.err.msg,Be(l,n-h.length+d.err.line));if(i===!0)return Le("InvalidXml","Multiple possible root nodes found.",Be(l,n));e.unpairedTags.indexOf(a)!==-1||t.push({tagName:a,tagStartPos:r}),s=!0}for(n++;n0)return Le("InvalidXml","Invalid '"+JSON.stringify(t.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Le("InvalidXml","Start tag expected.",1);return!0};function Kr(l){return l===" "||l===" "||l===` -`||l==="\r"}function Jr(l,e){const t=e;for(;e5&&s==="xml")return Le("InvalidXml","XML declaration allowed only at the start of the document.",Be(l,e));if(l[e]=="?"&&l[e+1]==">"){e++;break}else continue}return e}function eo(l,e){if(l.length>e+5&&l[e+1]==="-"&&l[e+2]==="-"){for(e+=3;e"){e+=2;break}}else if(l.length>e+8&&l[e+1]==="D"&&l[e+2]==="O"&&l[e+3]==="C"&&l[e+4]==="T"&&l[e+5]==="Y"&&l[e+6]==="P"&&l[e+7]==="E"){let t=1;for(e+=8;e"&&(t--,t===0))break}else if(l.length>e+9&&l[e+1]==="["&&l[e+2]==="C"&&l[e+3]==="D"&&l[e+4]==="A"&&l[e+5]==="T"&&l[e+6]==="A"&&l[e+7]==="["){for(e+=8;e"){e+=2;break}}return e}const Ch='"',Th="'";function mh(l,e){let t="",s="",i=!1;for(;e"&&s===""){i=!0;break}t+=l[e]}return s!==""?!1:{value:t,index:e,tagClosed:i}}const Rh=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function to(l,e){const t=ir.getAllMatches(l,Rh),s={};for(let i=0;i!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(l,e,t){return l}},Oh=function(l){return Object.assign({},$o,l)};nr.buildOptions=Oh;nr.defaultOptions=$o;class yh{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}var Nh=yh;const Lh=xi;function _h(l,e){const t={};if(l[e+3]==="O"&&l[e+4]==="C"&&l[e+5]==="T"&&l[e+6]==="Y"&&l[e+7]==="P"&&l[e+8]==="E"){e=e+9;let s=1,i=!1,n=!1,r="";for(;e"){if(n?l[e-1]==="-"&&l[e-2]==="-"&&(n=!1,s--):s--,s===0)break}else l[e]==="["?i=!0:r+=l[e];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:t,i:e}}function wh(l,e){let t="";for(;e0&&i&&t[2]!=="."||!e.leadingZeros&&n.length>0&&!i&&t[1]!==".")return l;{const a=Number(t),c=""+a;return c.search(/[eE]/)!==-1||o?e.eNotation?a:l:t.indexOf(".")!==-1?c==="0"&&r===""||c===r||i&&c==="-"+r?a:l:n?r===c||i+r===c?a:l:t===c||t===i+c?a:l}}else return l}}function zh(l){return l&&l.indexOf(".")!==-1&&(l=l.replace(/0+$/,""),l==="."?l="0":l[0]==="."?l="0"+l:l[l.length-1]==="."&&(l=l.substr(0,l.length-1))),l}var kh=Gh;const qo=xi,vs=Nh,Hh=xh,Wh=kh;let Xh=class{constructor(l){this.options=l,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=Zh,this.parseXml=Kh,this.parseTextData=jh,this.resolveNameSpace=$h,this.buildAttributesMap=Qh,this.isItStopNode=su,this.replaceEntitiesValue=eu,this.readStopNodeData=nu,this.saveTextToParentTag=tu,this.addChild=Jh}};function Zh(l){const e=Object.keys(l);for(let t=0;t0)){r||(l=this.replaceEntitiesValue(l));const o=this.options.tagValueProcessor(e,l,t,i,n);return o==null?l:typeof o!=typeof l||o!==l?o:this.options.trimValues?On(l,this.options.parseTagValue,this.options.numberParseOptions):l.trim()===l?On(l,this.options.parseTagValue,this.options.numberParseOptions):l}}function $h(l){if(this.options.removeNSPrefix){const e=l.split(":"),t=l.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(l=t+e[1])}return l}const qh=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Qh(l,e,t){if(!this.options.ignoreAttributes&&typeof l=="string"){const s=qo.getAllMatches(l,qh),i=s.length,n={};for(let r=0;r",n,"Closing Tag is not closed.");let o=l.substring(n+2,r).trim();if(this.options.removeNSPrefix){const h=o.indexOf(":");h!==-1&&(o=o.substr(h+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),t&&(s=this.saveTextToParentTag(s,t,i));const a=i.substring(i.lastIndexOf(".")+1);if(o&&this.options.unpairedTags.indexOf(o)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let c=0;a&&this.options.unpairedTags.indexOf(a)!==-1?(c=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=i.lastIndexOf("."),i=i.substring(0,c),t=this.tagsNodeStack.pop(),s="",n=r}else if(l[n+1]==="?"){let r=An(l,n,!1,"?>");if(!r)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,t,i),!(this.options.ignoreDeclaration&&r.tagName==="?xml"||this.options.ignorePiTags)){const o=new vs(r.tagName);o.add(this.options.textNodeName,""),r.tagName!==r.tagExp&&r.attrExpPresent&&(o[":@"]=this.buildAttributesMap(r.tagExp,i,r.tagName)),this.addChild(t,o,i)}n=r.closeIndex+1}else if(l.substr(n+1,3)==="!--"){const r=Yt(l,"-->",n+4,"Comment is not closed.");if(this.options.commentPropName){const o=l.substring(n+4,r-2);s=this.saveTextToParentTag(s,t,i),t.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}n=r}else if(l.substr(n+1,2)==="!D"){const r=Hh(l,n);this.docTypeEntities=r.entities,n=r.i}else if(l.substr(n+1,2)==="!["){const r=Yt(l,"]]>",n,"CDATA is not closed.")-2,o=l.substring(n+9,r);s=this.saveTextToParentTag(s,t,i);let a=this.parseTextData(o,t.tagname,i,!0,!1,!0,!0);a==null&&(a=""),this.options.cdataPropName?t.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):t.add(this.options.textNodeName,a),n=r+2}else{let r=An(l,n,this.options.removeNSPrefix),o=r.tagName;const a=r.rawTagName;let c=r.tagExp,h=r.attrExpPresent,d=r.closeIndex;this.options.transformTagName&&(o=this.options.transformTagName(o)),t&&s&&t.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,t,i,!1));const I=t;if(I&&this.options.unpairedTags.indexOf(I.tagname)!==-1&&(t=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),o!==e.tagname&&(i+=i?"."+o:o),this.isItStopNode(this.options.stopNodes,i,o)){let u="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)o[o.length-1]==="/"?(o=o.substr(0,o.length-1),i=i.substr(0,i.length-1),c=o):c=c.substr(0,c.length-1),n=r.closeIndex;else if(this.options.unpairedTags.indexOf(o)!==-1)n=r.closeIndex;else{const E=this.readStopNodeData(l,a,d+1);if(!E)throw new Error(`Unexpected end of ${a}`);n=E.i,u=E.tagContent}const f=new vs(o);o!==c&&h&&(f[":@"]=this.buildAttributesMap(c,i,o)),u&&(u=this.parseTextData(u,o,i,!0,h,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),f.add(this.options.textNodeName,u),this.addChild(t,f,i)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){o[o.length-1]==="/"?(o=o.substr(0,o.length-1),i=i.substr(0,i.length-1),c=o):c=c.substr(0,c.length-1),this.options.transformTagName&&(o=this.options.transformTagName(o));const u=new vs(o);o!==c&&h&&(u[":@"]=this.buildAttributesMap(c,i,o)),this.addChild(t,u,i),i=i.substr(0,i.lastIndexOf("."))}else{const u=new vs(o);this.tagsNodeStack.push(t),o!==c&&h&&(u[":@"]=this.buildAttributesMap(c,i,o)),this.addChild(t,u,i),t=u}s="",n=d}}else s+=l[n];return e.child};function Jh(l,e,t){const s=this.options.updateTag(e.tagname,t,e[":@"]);s===!1||(typeof s=="string"&&(e.tagname=s),l.addChild(e))}const eu=function(l){if(this.options.processEntities){for(let e in this.docTypeEntities){const t=this.docTypeEntities[e];l=l.replace(t.regx,t.val)}for(let e in this.lastEntities){const t=this.lastEntities[e];l=l.replace(t.regex,t.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const t=this.htmlEntities[e];l=l.replace(t.regex,t.val)}l=l.replace(this.ampEntity.regex,this.ampEntity.val)}return l};function tu(l,e,t,s){return l&&(s===void 0&&(s=Object.keys(e.child).length===0),l=this.parseTextData(l,e.tagname,t,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,s),l!==void 0&&l!==""&&e.add(this.options.textNodeName,l),l=""),l}function su(l,e,t){const s="*."+t;for(const i in l){const n=l[i];if(s===n||e===n)return!0}return!1}function iu(l,e,t=">"){let s,i="";for(let n=e;n",t,`${e} is not closed`);if(l.substring(t+2,n).trim()===e&&(i--,i===0))return{tagContent:l.substring(s,t),i:n};t=n}else if(l[t+1]==="?")t=Yt(l,"?>",t+1,"StopNode is not closed.");else if(l.substr(t+1,3)==="!--")t=Yt(l,"-->",t+3,"StopNode is not closed.");else if(l.substr(t+1,2)==="![")t=Yt(l,"]]>",t,"StopNode is not closed.")-2;else{const n=An(l,t,">");n&&((n&&n.tagName)===e&&n.tagExp[n.tagExp.length-1]!=="/"&&i++,t=n.closeIndex)}}function On(l,e,t){if(e&&typeof l=="string"){const s=l.trim();return s==="true"?!0:s==="false"?!1:Wh(l,t)}else return qo.isExist(l)?l:""}var ru=Xh,Qo={};function ou(l,e){return Ko(l,e)}function Ko(l,e,t){let s;const i={};for(let n=0;n0&&(i[e.textNodeName]=s):s!==void 0&&(i[e.textNodeName]=s),i}function au(l){const e=Object.keys(l);for(let t=0;t`);let t=null;this.modifiedDate&&(t=`${this.modifiedDate.toISOString()}`);let s=null;return this.modifiedAuthor&&(s=`${this.modifiedAuthor}`),` - - ${this.date.toISOString()} - ${this.author} - ${this.comment} - ${e??""} - ${s??""} - ${t??""} - - `}}const ea=class yt{constructor(e){p(this,"guid",gt.create()),p(this,"title",yt.default.title),p(this,"creationDate",new Date),p(this,"creationAuthor",""),p(this,"viewpoints",new Pt),p(this,"relatedTopics",new Pt),p(this,"comments",new rt),p(this,"customData",{}),p(this,"description"),p(this,"serverAssignedId"),p(this,"dueDate"),p(this,"modifiedAuthor"),p(this,"modifiedDate"),p(this,"index"),p(this,"_type",yt.default.type),p(this,"_status",yt.default.status),p(this,"_priority",yt.default.priority),p(this,"_stage",yt.default.stage),p(this,"_assignedTo",yt.default.assignedTo),p(this,"_labels",yt.default.labels??new Set),p(this,"_components"),this._components=e;const t=e.get(Ye);this.creationAuthor=t.config.author,this.relatedTopics.guard=s=>s!==this.guid}set type(e){const t=this._components.get(Ye),{strict:s,types:i}=t.config;(!s||i.has(e))&&(this._type=e)}get type(){return this._type}set status(e){const t=this._components.get(Ye),{strict:s,statuses:i}=t.config;(!s||i.has(e))&&(this._status=e)}get status(){return this._status}set priority(e){const t=this._components.get(Ye);if(e){const{strict:s,priorities:i}=t.config;if(!(!s||i.has(e)))return;this._priority=e}else this._priority=e}get priority(){return this._priority}set stage(e){const t=this._components.get(Ye);if(e){const{strict:s,stages:i}=t.config;if(!(!s||i.has(e)))return;this._stage=e}else this._stage=e}get stage(){return this._stage}set assignedTo(e){const t=this._components.get(Ye);if(e){const{strict:s,users:i}=t.config;if(!(!s||i.has(e)))return;this._assignedTo=e}else this._assignedTo=e}get assignedTo(){return this._assignedTo}set labels(e){const t=this._components.get(Ye),{strict:s,labels:i}=t.config;if(s){const n=new Set;for(const r of e)(!s||i.has(r))&&n.add(r);this._labels=n}else this._labels=e}get labels(){return this._labels}get _managerVersion(){return this._components.get(Ye).config.version}set(e){const t=e,s=this;for(const i in e){if(i==="guid")continue;const n=t[i];i in this&&(s[i]=n)}return this._components.get(Ye).list.set(this.guid,this),this}createComment(e,t){const s=new yn(this._components,e);return s.viewpoint=t,s.topic=this,this.comments.set(s.guid,s),s}createLabelTags(e=this._managerVersion){let t="Labels";e==="2.1"&&(t="Labels"),e==="3"&&(t="Label");let s=[...this.labels].map(i=>`<${t}>${i}`).join(` -`);for(const i in this.customData){const n=this.customData[i];typeof n=="string"&&(s+=` -<${t}>${n}`)}return e==="2.1"?s:e==="3"?s.length!==0?` -${s} -`:"":s}createCommentTags(e=this._managerVersion){const t=[...this.comments.values()].map(s=>s.serialize()).join(` -`);return e==="2.1"?t:e==="3"?t.length!==0?` -${t} -`:"":t}createViewpointTags(e=this._managerVersion){let t="Viewpoints";e==="2.1"&&(t="Viewpoints"),e==="3"&&(t="ViewPoint");const s=this._components.get(pt),i=[...this.viewpoints].map(n=>s.list.get(n)).filter(n=>n).map(n=>`<${t} Guid="${n.guid}"> - ${n.guid}.bcfv - ${n.guid}.jpeg - - `).join(` -`);return e==="2.1"?i:e==="3"?i.length!==0?` -${i} -`:"":i}createRelatedTopicTags(e=this._managerVersion){const t=[...this.relatedTopics].map(s=>` - `).join(` -`);return e==="2.1"?t:e==="3"?t.length!==0?` -${t} -`:"":t}serialize(){const e=this._managerVersion;let t=null;this.serverAssignedId&&(t=`ServerAssignedId="${this.serverAssignedId}"`);let s=null;this.priority&&(s=`${this.priority}`);let i=null;this.index&&e==="2.1"&&(i=`${this.index}`);let n=null;this.modifiedDate&&(n=`${this.modifiedDate.toISOString()}`);let r=null;this.modifiedAuthor&&(r=`${this.modifiedAuthor}`);let o=null;this.dueDate&&(o=`${this.dueDate.toISOString()}`);let a=null;this.assignedTo&&(a=`${this.assignedTo}`);let c=null;this.description&&(c=`${this.description}`);let h=null;this.stage&&(h=`${this.stage}`);const d=this.createCommentTags(e),I=this.createViewpointTags(e),u=this.createLabelTags(e),f=this.createRelatedTopicTags(e);return` - - - - ${this.title} - ${this.creationDate.toISOString()} - ${this.creationAuthor} - ${s??""} - ${i??""} - ${n??""} - ${r??""} - ${o??""} - ${a??""} - ${c??""} - ${h??""} - ${u} - ${f} - ${e==="3"?d:""} - ${e==="3"?I:""} - - ${e==="2.1"?d:""} - ${e==="2.1"?I:""} - - `}};p(ea,"default",{title:"BCF Topic",type:"Issue",status:"Active"});let so=ea;const Cu=(l,e)=>{if(e.trim()==="")return;const t=Ye.xmlParser.parse(e).Extensions;if(!t)return;const{Priorities:s,TopicStatuses:i,TopicTypes:n,Users:r}=t;if(s&&s.Priority){const o=Array.isArray(s.Priority)?s.Priority:[s.Priority];for(const a of o)l.config.priorities.add(a)}if(i&&i.TopicStatus){const o=Array.isArray(i.TopicStatus)?i.TopicStatus:[i.TopicStatus];for(const a of o)l.config.statuses.add(a)}if(n&&n.TopicType){const o=Array.isArray(n.TopicType)?n.TopicType:[n.TopicType];for(const a of o)l.config.types.add(a)}if(r&&r.User){const o=Array.isArray(r.User)?r.User:[r.User];for(const a of o)l.config.users.add(a)}};class Tu extends kt{constructor(){super(...arguments),p(this,"_config",{version:{type:"Select",options:new Set(["2.1","3"]),multiple:!1,value:""},author:{type:"Text",value:""},types:{type:"TextSet",value:new Set},statuses:{type:"TextSet",value:new Set},priorities:{type:"TextSet",value:new Set},labels:{type:"TextSet",value:new Set},stages:{type:"TextSet",value:new Set},users:{type:"TextSet",value:new Set},includeSelectionTag:{type:"Boolean",value:!1},updateExtensionsOnImport:{type:"Boolean",value:!1},strict:{type:"Boolean",value:!1},includeAllExtensionsOnExport:{type:"Boolean",value:!1},fallbackVersionOnImport:{type:"Select",multiple:!1,options:new Set(["2.1","3"]),value:""},ignoreIncompleteTopicsOnImport:{type:"Boolean",value:!1}})}get version(){return this._config.version.value}set version(e){this._config.version.value=e}get author(){return this._config.author.value}set author(e){this._config.author.value=e}get types(){return this._config.types.value}set types(e){this._config.types.value=e}get statuses(){return this._config.statuses.value}set statuses(e){this._config.statuses.value=e}get priorities(){return this._config.priorities.value}set priorities(e){this._config.priorities.value=e}get labels(){return this._config.labels.value}set labels(e){this._config.labels.value=e}get stages(){return this._config.stages.value}set stages(e){this._config.stages.value=e}get users(){return this._config.users.value}set users(e){this._config.users.value=e}get includeSelectionTag(){return this._config.includeSelectionTag.value}set includeSelectionTag(e){this._config.includeSelectionTag.value=e}get updateExtensionsOnImport(){return this._config.updateExtensionsOnImport.value}set updateExtensionsOnImport(e){this._config.updateExtensionsOnImport.value=e}get strict(){return this._config.strict.value}set strict(e){this._config.strict.value=e}get includeAllExtensionsOnExport(){return this._config.includeAllExtensionsOnExport.value}set includeAllExtensionsOnExport(e){this._config.includeAllExtensionsOnExport.value=e}get fallbackVersionOnImport(){return this._config.fallbackVersionOnImport.value}set fallbackVersionOnImport(e){this._config.fallbackVersionOnImport.value=e}get ignoreIncompleteTopicsOnImport(){return this._config.ignoreIncompleteTopicsOnImport.value}set ignoreIncompleteTopicsOnImport(e){this._config.ignoreIncompleteTopicsOnImport.value=e}}const Nn=class bs extends Fe{constructor(){super(...arguments),p(this,"enabled",!1),p(this,"_defaultConfig",{author:"jhon.doe@example.com",version:"2.1",types:new Set(["Clash","Failure","Fault","Inquiry","Issue","Remark","Request"]),statuses:new Set(["Active","In Progress","Done","In Review","Closed"]),priorities:new Set(["On hold","Minor","Normal","Major","Critical"]),labels:new Set,stages:new Set,users:new Set,includeSelectionTag:!1,updateExtensionsOnImport:!0,strict:!1,includeAllExtensionsOnExport:!0,fallbackVersionOnImport:"2.1",ignoreIncompleteTopicsOnImport:!1}),p(this,"config",new Tu(this,this.components,"BCF Topics",bs.uuid)),p(this,"list",new rt),p(this,"onSetup",new $),p(this,"isSetup",!1),p(this,"onBCFImported",new $),p(this,"onDisposed",new $)}setup(e){if(this.isSetup)return;const t={...this._defaultConfig,...e};this.config.version=t.version,this.config.author=t.author,this.config.types=t.types,this.config.statuses=t.statuses,this.config.priorities=t.priorities,this.config.labels=t.labels,this.config.stages=t.stages,this.config.users=t.users,this.config.includeSelectionTag=t.includeSelectionTag,this.config.updateExtensionsOnImport=t.updateExtensionsOnImport,this.config.strict=t.strict,this.config.includeAllExtensionsOnExport=t.includeAllExtensionsOnExport,this.config.fallbackVersionOnImport=t.fallbackVersionOnImport||"",this.config.ignoreIncompleteTopicsOnImport=t.ignoreIncompleteTopicsOnImport,this.isSetup=!0,this.enabled=!0,this.onSetup.trigger()}create(e){const t=new so(this.components);return e?(t.guid=e.guid??t.guid,t.set(e)):this.list.set(t.guid,t),t}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get usedTypes(){const e=[...this.list].map(([t,s])=>s.type);return new Set(e)}get usedStatuses(){const e=[...this.list].map(([t,s])=>s.status);return new Set(e)}get usedPriorities(){const e=[...this.list].map(([t,s])=>s.priority).filter(t=>t);return new Set(e)}get usedStages(){const e=[...this.list].map(([t,s])=>s.stage).filter(t=>t);return new Set(e)}get usedUsers(){const e=[];for(const[t,s]of this.list){e.push(s.creationAuthor),s.assignedTo&&e.push(s.assignedTo),s.modifiedAuthor&&e.push(s.modifiedAuthor);for(const[i,n]of s.comments)e.push(n.author),n.modifiedAuthor&&e.push(n.modifiedAuthor)}return new Set(e)}get usedLabels(){const e=[];for(const[t,s]of this.list)e.push(...s.labels);return new Set(e)}updateExtensions(){for(const[e,t]of this.list){for(const s of t.labels)this.config.labels.add(s);this.config.types.add(t.type),t.priority&&this.config.priorities.add(t.priority),t.stage&&this.config.stages.add(t.stage),this.config.statuses.add(t.status),this.config.users.add(t.creationAuthor),t.assignedTo&&this.config.users.add(t.assignedTo),t.modifiedAuthor&&this.config.users.add(t.modifiedAuthor);for(const[s,i]of t.comments)this.config.users.add(i.author),i.modifiedAuthor&&this.config.users.add(i.modifiedAuthor)}}updateViewpointReferences(){const e=this.components.get(pt);for(const[t,s]of this.list)for(const i of s.viewpoints)e.list.has(i)||s.viewpoints.delete(i)}async export(e=this.list.values()){const t=new Qr;t.file("bcf.version",` - - `),t.file("bcf.extensions",this.serializeExtensions());const s=await(await fetch("https://thatopen.github.io/engine_components/resources/favicon.ico")).arrayBuffer(),i=this.components.get(pt);for(const n of e){const r=t.folder(n.guid);r.file("markup.bcf",n.serialize());for(const o of n.viewpoints){const a=i.list.get(o);a&&(r.file(`${o}.jpeg`,s,{binary:!0}),r.file(`${o}.bcfv`,await a.serialize()))}}return await t.generateAsync({type:"blob"})}serializeExtensions(){const e=[...this.config.types].map(o=>`${o}`).join(` -`),t=[...this.config.statuses].map(o=>`${o}`).join(` -`),s=[...this.config.priorities].map(o=>`${o}`).join(` -`),i=[...this.config.labels].map(o=>`${o}`).join(` -`),n=[...this.config.stages].map(o=>`${o}`).join(` -`),r=[...this.config.users].map(o=>`${o}`).join(` -`);return` - - - ${e.length!==0?` -${e} -`:""} - ${t.length!==0?` -${t} -`:""} - ${s.length!==0?` -${s} -`:""} - ${i.length!==0?` -${i} -`:""} - ${n.length!==0?` -${n} -`:""} - ${r.length!==0?` -${r} -`:""} - - `}processMarkupComment(e){const{Guid:t,Date:s,Author:i,Comment:n,Viewpoint:r}=e;if(!(t&&s&&i&&(yn||r)))return null;const o=this.components.get(pt),a=new yn(this.components,n??"");return a.guid=t,a.date=new Date(s),a.author=i,a.viewpoint=r!=null&&r.Guid?o.list.get(r.Guid):void 0,a.modifiedAuthor=e.ModifiedAuthor,a.modifiedDate=e.ModifiedDate?new Date(e.ModifiedDate):void 0,a}getMarkupComments(e,t){var s;let i;if(t==="2.1"&&(i=e.Comment),t==="3"&&(i=(s=e.Topic.Comments)==null?void 0:s.Comment),!i)return[];i=Array.isArray(i)?i:[i];const n=i.map(r=>this.processMarkupComment(r)).filter(r=>r);return Array.isArray(n)?n:[n]}getMarkupLabels(e,t){var s;let i;return t==="2.1"&&(i=e.Topic.Labels),t==="3"&&(i=(s=e.Topic.Labels)==null?void 0:s.Label),i?Array.isArray(i)?i:[i]:[]}getMarkupViewpoints(e,t){var s;let i;return t==="2.1"&&(i=e.Viewpoints),t==="3"&&(i=(s=e.Topic.Viewpoints)==null?void 0:s.ViewPoint),i?(i=Array.isArray(i)?i:[i],i):[]}getMarkupRelatedTopics(e,t){var s;let i;return t==="2.1"&&(i=e.Topic.RelatedTopic),t==="3"&&(i=(s=e.Topic.RelatedTopics)==null?void 0:s.RelatedTopic),i?(Array.isArray(i)?i:[i]).map(n=>n.Guid):[]}async load(e,t){var s;const{fallbackVersionOnImport:i,ignoreIncompleteTopicsOnImport:n,updateExtensionsOnImport:r}=this.config,o=new Qr;await o.loadAsync(e);const a=Object.values(o.files);let c=i;const h=a.find(R=>R.name.endsWith(".version"));if(h){const R=await h.async("string"),A=bs.xmlParser.parse(R).Version.VersionId;c=String(A)}if(!(c&&(c==="2.1"||c==="3")))throw new Error(`BCFTopics: ${c} is not supported.`);const d=a.find(R=>R.name.endsWith(".extensions"));if(r&&d){const R=await d.async("string");Cu(this,R)}const I=[],u=this.components.get(pt),f=a.filter(R=>R.name.endsWith(".bcfv"));for(const R of f){const A=await R.async("string"),m=bs.xmlParser.parse(A).VisualizationInfo;if(!m){console.warn("Missing VisualizationInfo in Viewpoint");continue}const S={},{Guid:N,ClippingPlanes:y,Components:P,OrthogonalCamera:_,PerspectiveCamera:M}=m;if(N&&(S.guid=N),P){const{Selection:O,Visibility:v}=P;if(O&&O.Component){const b=Array.isArray(O.Component)?O.Component:[O.Component];S.selectionComponents=b.map(j=>j.IfcGuid).filter(j=>j)}if(v&&"DefaultVisibility"in v&&(S.defaultVisibility=v.DefaultVisibility),v&&v.Exceptions&&"Component"in v.Exceptions){const{Component:b}=v.Exceptions,j=Array.isArray(b)?b:[b];S.exceptionComponents=j.map(z=>z.IfcGuid).filter(z=>z)}let F;c==="2.1"&&(F=P.ViewSetupHints),c==="3"&&(F=(s=P.Visibility)==null?void 0:s.ViewSetupHints),F&&("OpeningsVisible"in F&&(S.openingsVisible=F.OpeningsVisible),"SpacesVisible"in F&&(S.spacesVisible=F.SpacesVisible),"SpaceBoundariesVisible"in F&&(S.spaceBoundariesVisible=F.SpaceBoundariesVisible))}if(_||M){const O=m.PerspectiveCamera??m.OrthogonalCamera,{CameraViewPoint:v,CameraDirection:F}=O,b=new U(Number(v.X),Number(v.Z),Number(-v.Y)),j=new U(Number(F.X),Number(F.Z),Number(-F.Y)),z={position:{x:b.x,y:b.y,z:b.z},direction:{x:j.x,y:j.y,z:j.z},aspectRatio:"AspectRatio"in O?O.AspectRatio:1};"ViewToWorldScale"in O&&(S.camera={...z,viewToWorldScale:O.ViewToWorldScale}),"FieldOfView"in O&&(S.camera={...z,fov:O.FieldOfView})}const B=new Ra(this.components,t,{data:S,setCamera:!1});if(P){const{Coloring:O}=P;if(O&&O.Color){const v=Array.isArray(O.Color)?O.Color:[O.Color];for(const F of v){const{Color:b,Component:j}=F,z=(Array.isArray(j)?j:[j]).map(J=>J.IfcGuid);B.componentColors.set(b,z)}}}if(I.push(B),y){const O=this.components.get(th),v=Array.isArray(y.ClippingPlane)?y.ClippingPlane:[y.ClippingPlane];for(const F of v){const{Location:b,Direction:j}=F;if(!(b&&j))continue;const z=new U(b.X,b.Z,-b.Y),J=new U(j.X,-j.Z,j.Y),X=O.createFromNormalAndCoplanarPoint(t,J,z);X.visible=!1,X.enabled=!1,B.clippingPlanes.add(X)}}}const E={},T=[],C=a.filter(R=>R.name.endsWith(".bcf"));for(const R of C){const A=await R.async("string"),m=bs.xmlParser.parse(A).Markup,S=m.Topic,{Guid:N,TopicType:y,TopicStatus:P,Title:_,CreationDate:M,CreationAuthor:B}=S;if(n&&!(N&&y&&P&&_&&M&&B))continue;const O=new so(this.components);O.guid=N??O.guid;const v=this.getMarkupRelatedTopics(m,c);E[O.guid]=new Set(v),O.type=y??O.type,O.status=P??O.status,O.title=_??O.title,O.creationDate=M?new Date(M):O.creationDate,O.creationAuthor=B??O.creationAuthor,O.serverAssignedId=S.ServerAssignedId,O.priority=S.Priority,O.index=S.Index,O.modifiedDate=S.ModifiedDate?new Date(S.ModifiedDate):void 0,O.modifiedAuthor=S.ModifiedAuthor,O.dueDate=S.DueDate?new Date(S.DueDate):void 0,O.assignedTo=S.AssignedTo,O.description=S.Description,O.stage=S.Stage;const F=this.getMarkupLabels(m,c);for(const z of F)O.labels.add(z);const b=this.getMarkupComments(m,c);for(const z of b)O.comments.set(z.guid,z);const j=this.getMarkupViewpoints(m,c);for(const z of j){if(!(z&&z.Guid))continue;const J=u.list.get(z.Guid);J&&O.viewpoints.add(J.guid)}this.list.set(O.guid,O),T.push(O)}for(const R in E){const A=this.list.get(R);if(!A)continue;const m=E[R];for(const S of m)A.relatedTopics.add(S)}return this.onBCFImported.trigger(T),{viewpoints:I,topics:T}}};p(Nn,"uuid","de977976-e4f6-4e4f-a01a-204727839802"),p(Nn,"xmlParser",new Jo.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let Ye=Nn;const ta=class ft extends Fe{constructor(e){super(e),p(this,"enabled",!0),p(this,"onDisposed",new $),p(this,"_absoluteMin"),p(this,"_absoluteMax"),p(this,"_meshes",[]),this.components.add(ft.uuid,this),this._absoluteMin=ft.newBound(!0),this._absoluteMax=ft.newBound(!1)}static getDimensions(e){const{min:t,max:s}=e,i=Math.abs(s.x-t.x),n=Math.abs(s.y-t.y),r=Math.abs(s.z-t.z),o=new U;return o.subVectors(s,t).divideScalar(2).add(t),{width:i,height:n,depth:r,center:o}}static newBound(e){const t=e?1:-1;return new U(t*Number.MAX_VALUE,t*Number.MAX_VALUE,t*Number.MAX_VALUE)}static getBounds(e,t,s){const i=s||this.newBound(!1),n=t||this.newBound(!0);for(const r of e)r.xi.x&&(i.x=r.x),r.y>i.y&&(i.y=r.y),r.z>i.z&&(i.z=r.z);return new Pe(t,s)}dispose(){const e=this.components.get(us);for(const t of this._meshes)e.destroy(t);this._meshes=[],this.onDisposed.trigger(ft.uuid),this.onDisposed.reset()}get(){const e=this._absoluteMin.clone(),t=this._absoluteMax.clone();return new Pe(e,t)}getSphere(){const e=this._absoluteMin.clone(),t=this._absoluteMax.clone(),s=Math.abs((t.x-e.x)/2),i=Math.abs((t.y-e.y)/2),n=Math.abs((t.z-e.z)/2),r=new U(e.x+s,e.y+i,e.z+n),o=r.distanceTo(e);return new wi(r,o)}getMesh(){const e=new Pe(this._absoluteMin,this._absoluteMax),t=ft.getDimensions(e),{width:s,height:i,depth:n,center:r}=t,o=new Me(s,i,n),a=new se(o);return this._meshes.push(a),a.position.copy(r),a}reset(){this._absoluteMin=ft.newBound(!0),this._absoluteMax=ft.newBound(!1)}add(e){for(const t of e.items)this.addMesh(t.mesh)}addMesh(e,t){if(!e.geometry.index)return;const s=ft.getFragmentBounds(e);e.updateMatrixWorld();const i=e.matrixWorld,n=new Ee,r=e instanceof Vt,o=new Set;if(e instanceof $a){t||(t=e.fragment.ids);for(const a of t){const c=e.fragment.getInstancesIDs(a);if(c)for(const h of c)o.add(h)}}else o.add(0);for(const a of o){const c=s.min.clone(),h=s.max.clone();r&&(e.getMatrixAt(a,n),c.applyMatrix4(n),h.applyMatrix4(n)),c.applyMatrix4(i),h.applyMatrix4(i),c.xthis._absoluteMax.x&&(this._absoluteMax.x=c.x),c.y>this._absoluteMax.y&&(this._absoluteMax.y=c.y),c.z>this._absoluteMax.z&&(this._absoluteMax.z=c.z),h.x>this._absoluteMax.x&&(this._absoluteMax.x=h.x),h.y>this._absoluteMax.y&&(this._absoluteMax.y=h.y),h.z>this._absoluteMax.z&&(this._absoluteMax.z=h.z),h.xr.x&&(r.x=h),d>r.y&&(r.y=d),I>r.z&&(r.z=I)}return new Pe(n,r)}};p(ta,"uuid","d1444724-dba6-4cdd-a0c7-68ee1450d166");let mu=ta;const sa=class ia extends Fe{constructor(e){super(e),p(this,"enabled",!0),e.add(ia.uuid,this)}async getIsolatedElements(e,t,s){const i=new Set;function n(a){if(i.has(a))return;const c=e.GetLine(t,a);if(c){i.add(a);for(const h in c){const d=c[h];d&&d.constructor.name==="Handle"&&d.value>0?n(d.value):Array.isArray(d)&&d.forEach(I=>{I&&I.constructor.name==="Handle"&&I.value>0&&n(I.value)})}}}for(const a of s)n(a);const r=[];for(const a of i)r.push(a);r.sort((a,c)=>a-c);const o=[];return r.forEach(a=>{const c=e.GetLine(t,a);o.push(c)}),o}async export(e,t,s){return s.forEach(i=>{e.WriteLine(t,i)}),e.SaveModel(t)}async splitIfc(e,t,s){const i=new Uint8Array(t),n=e.OpenModel(i),r=await this.getIsolatedElements(e,n,s),o=e.CreateModel({schema:qa.IFC2X3});return await this.export(e,o,r)}};p(sa,"uuid","6eb0ba2f-71c0-464e-bcec-2d7c335186b2");let Vu=sa;const na=class ra{constructor(e){p(this,"onProgress",new $),p(this,"inclusive",!1),p(this,"rules",[]),p(this,"ids",{}),p(this,"needsUpdate",new Map),p(this,"components"),this.components=e}static import(e,t){const s=ra.importers.get(t.type);return s?s(e,t):(console.warn("Invalid query data:.",t),null)}static importRules(e){const t=[];for(const s of e){const i={};for(const n in s){const r=s[n];r.regexp?i[n]=new RegExp(r.value):i[n]=r}t.push(i)}return t}static importIds(e){const t={};for(const s in e.ids)t[s]=new Set(e.ids[s]);return t}clear(e){if(e===void 0){this.ids={},this.needsUpdate.clear();return}delete this.ids[e],this.needsUpdate.delete(e)}addID(e,t){this.ids[e]||(this.ids[e]=new Set),this.ids[e].add(t)}getData(){const e={};for(const s in this.ids)e[s]=Array.from(this.ids[s]);const t=this.exportRules();return{name:this.name,inclusive:this.inclusive,type:"IfcFinderQuery",ids:e,rules:t}}exportRules(){const e=[];for(const t of this.rules){const s={};for(const i in t){const n=t[i];n instanceof RegExp?s[i]={regexp:!0,value:n.source}:s[i]=n}e.push(s)}return e}findInFile(e,t){return new Promise(s=>{const i=new FileReader,n=new TextDecoder("utf-8"),r=1e4*1024,o=1e3;let a=0;const c=/;/,h=()=>{if(a>=t.size){s();return}const d=Math.min(a+r+o,t.size),I=t.slice(a,d);i.readAsArrayBuffer(I)};i.onload=()=>{if(!(i.result instanceof ArrayBuffer))return;const d=new Uint8Array(i.result),I=n.decode(d).split(c);I.shift(),this.findInLines(e,I),this.onProgress.trigger(a/t.size),a+=r,h()},h()})}getIdFromLine(e){const t=e.slice(e.indexOf("#")+1,e.indexOf("="));return parseInt(t,10)}testRules(e){let t=null,s=null,i=null,n=!1;for(const r of this.rules){if(r.type==="category"){if(t===null&&(t=this.getCategoryFromLine(e),t===null)){if(this.inclusive)continue;break}if(!r.value.test(t)){if(this.inclusive)continue;n=!1;break}n=!0;continue}if(s===null&&(s=this.getAttributesFromLine(e),s===null)){if(this.inclusive)continue;n=!1;break}if(t===null&&(t=this.getCategoryFromLine(e),t===null)){if(this.inclusive)continue;n=!1;break}if(i===null&&(i=Object.keys(new Qa[t]),i=i.slice(2),i===null)){if(this.inclusive)continue;n=!1;break}if(r.type==="property"){const{name:o,value:a}=r;if(!a.test(e)){if(this.inclusive)continue;n=!1;break}let c=!1;for(let h=0;h"&&parseFloat(u)>a){h=!0;break}else if(c===">="&&parseFloat(u)>=a){h=!0;break}else if(c==="<="&&parseFloat(u)<=a){h=!0;break}}}if(h)n=!0;else if(!this.inclusive){n=!1;break}}}return n}getCategoryFromLine(e){const t=e.indexOf("=")+1,s=e.indexOf("("),i=e.slice(t,s).trim();return ah[i]||null}getAttributesFromLine(e){const t=/\((.*)\)/,s=e.match(t);if(!(s&&s[1]))return null;const i=/,(?![^()]*\))/g;return s[1].split(i).map(n=>n.trim())}};p(na,"importers",new Map);let Ct=na;class io{constructor(e){p(this,"list",new Map),p(this,"id",Oi.generateUUID()),p(this,"mode","intersect"),p(this,"_components"),this._components=e}get queries(){return new Set(this.list.values())}get items(){const e=[];for(const t of this.queries)e.push(t.items);return this.mode==="combine"?Ni.combine(e):Ni.intersect(e)}add(e){if(this.list.has(e.name))throw new Error(`This group already has a query with the name ${e.name}.`);this.list.set(e.name,e)}clear(e){for(const t of this.queries)t.clear(e)}import(e){this.mode=e.mode,this.id=e.id;for(const t in e.queries){const s=Ct.import(this._components,e.queries[t]);s&&this.list.set(t,s)}}export(){const e={};for(const[t,s]of this.list)e[t]=s.export();return{mode:this.mode,id:this.id,queries:e}}async update(e,t){for(const s of this.queries){const i=s.needsUpdate.get(e);(i===void 0||i)&&await s.update(e,t)}}}const oa=class aa extends Ct{constructor(e,t){super(e),p(this,"name"),this.name=t.name,this.rules=t.rules,this.inclusive=t.inclusive}get items(){const e=this.components.get(Re),t=[];for(const s in this.ids){const i=this.ids[s],n=e.groups.get(s);if(!n){console.warn(`Model ${s} not found!`);continue}const r=n.getFragmentMap(i);t.push(r)}return Ni.combine(t)}export(){const e=this.getData();return e.type=aa.type,e}async update(e,t){this.ids[e]=new Set,await this.findInFile(e,t),this.needsUpdate.set(e,!1)}findInLines(e,t){for(const s of t)if(this.testRules(s)){const i=this.getIdFromLine(s);this.addID(e,i)}}};p(oa,"type","IfcBasicQuery");let no=oa;Ct.importers.set(no.type,(l,e)=>{const t=new no(l,{name:e.name,rules:Ct.importRules(e.rules),inclusive:e.inclusive});return t.ids=Ct.importIds(e),t});const la=class ca extends Ct{constructor(e,t){super(e),p(this,"name"),p(this,"psets",[]),this.name=t.name,this.rules=t.rules,this.inclusive=t.inclusive}get items(){const e=this.components.get(Ke),t=this.components.get(Re),s=[];for(const i in this.ids){const n=t.groups.get(i);if(!n){console.log(`Model not found: ${i}.`);continue}const r=this.ids[i];for(const o of r){const a=e.getEntityRelations(i,o,"DefinesOcurrence");if(a){const c=n.getFragmentMap(a);s.push(c)}}}return Ni.combine(s)}export(){const e=this.getData();return e.type=ca.type,e}async update(e,t){await this.findInFile(e,t);const s=new Set;for(const i of this.psets){const n=this.getAttributesFromLine(i);if(n===null)continue;const r=n[4].replace("(","[").replace(")","]").replace(/#/g,""),o=JSON.parse(r);for(const a of o){const c=this.ids[e];if(c&&c.has(a)){const h=this.getIdFromLine(i);s.add(h);break}}}this.ids[e]=s,this.psets=[],this.needsUpdate.set(e,!1)}findInLines(e,t){for(const s of t){const i=this.getCategoryFromLine(s);if(i==="IfcPropertySet"){this.psets.push(s);continue}if(i==="IfcPropertySingleValue"&&this.testRules(s)){const n=this.getIdFromLine(s);this.addID(e,n)}}}};p(la,"type","IfcPropertyQuery");let ro=la;Ct.importers.set(ro.type,(l,e)=>{const t=new ro(l,{name:e.name,inclusive:e.inclusive,rules:Ct.importRules(e.rules)});return t.ids=Ct.importIds(e),t});const ha=class ua extends Fe{constructor(e){super(e),p(this,"enabled",!0),p(this,"list",new Map),e.add(ua.uuid,this)}get queries(){const e=new Set;for(const[,t]of this.list)for(const s of t.queries)e.add(s);return e}import(e){for(const t in e){const s=new io(this.components);s.import(e[t]),this.list.set(t,s)}}export(){const e={};for(const[t,s]of this.list)e[t]=s.export();return e}create(){const e=new io(this.components);return this.list.set(e.id,e),e}delete(e){this.list.delete(e)}clear(){this.list.clear()}};p(ha,"uuid","0da7ad77-f734-42ca-942f-a074adfd1e3a");let Gu=ha;const da=class Ia extends Fe{constructor(e){super(e),p(this,"enabled",!0),p(this,"list",{}),p(this,"onDisposed",new $),p(this,"onFragmentsDisposed",t=>{const{groupID:s,fragmentIDs:i}=t;for(const n in this.list){const r=this.list[n],o=Object.keys(r);if(o.includes(s))delete r[s],Object.values(r).length===0&&delete this.list[n];else for(const a of o){const c=r[a];for(const h of i)delete c.map[h];Object.values(c).length===0&&delete r[a]}}}),e.add(Ia.uuid,this),e.get(Re).onFragmentsDisposed.add(this.onFragmentsDisposed)}dispose(){this.list={},this.components.get(Re).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(),this.onDisposed.reset()}remove(e){for(const t in this.list){const s=this.list[t];for(const i in s){const n=s[i];delete n.map[e]}}}find(e){const t=this.components.get(Re);if(!e){const r={};for(const[o,a]of t.list)r[o]=new Set(a.ids);return r}const s=Object.keys(e).length,i={};for(const r in e){const o=e[r];if(!this.list[r]){console.warn(`Classification ${r} does not exist.`);continue}for(const a of o){const c=this.list[r][a];if(c)for(const h in c.map){i[h]||(i[h]=new Map);for(const d of c.map[h]){const I=i[h].get(d);I===void 0?i[h].set(d,1):i[h].set(d,I+1)}}}}const n={};for(const r in i){const o=i[r];for(const[a,c]of o){if(c===void 0)throw new Error("Malformed fragments map!");c===s&&(n[r]||(n[r]=new Set),n[r].add(a))}}return n}byModel(e,t){this.list.models||(this.list.models={});const s=this.list.models;s[e]||(s[e]={map:{},id:null,name:e});const i=s[e];for(const[n,r]of t.data){const o=r[0];for(const a of o){const c=t.keyFragments.get(a);c&&(i.map[c]||(i.map[c]=new Set),i.map[c].add(n))}}}async byPredefinedType(e){var t;this.list.predefinedTypes||(this.list.predefinedTypes={});const s=this.list.predefinedTypes,i=e.getAllPropertiesIDs();for(const n of i){const r=await e.getProperties(n);if(!r)continue;const o=String((t=r.PredefinedType)==null?void 0:t.value).toUpperCase();s[o]||(s[o]={map:{},id:null,name:o});const a=s[o];for(const[c,h]of e.data){const d=h[0];for(const I of d){const u=e.keyFragments.get(I);if(!u)throw new Error("Fragment ID not found!");a.map[u]||(a.map[u]=new Set),a.map[u].add(r.expressID)}}}}byEntity(e){this.list.entities||(this.list.entities={});for(const[t,s]of e.data){const i=s[1][1],n=_i[i];this.saveItem(e,"entities",n,t)}}async byIfcRel(e,t,s){ls.isRel(t)&&await ls.getRelationMap(e,t,async(i,n)=>{const{name:r}=await ls.getEntityName(e,i);for(const o of n)this.saveItem(e,s,r??"NO REL NAME",o)})}async bySpatialStructure(e,t={}){var s,i;const n=this.components.get(Ke),r=n.relationMaps[e.uuid];if(!r)throw new Error(`Classifier: model relations of ${e.name||e.uuid} have to exists to group by spatial structure.`);const o=t.systemName??"spatialStructures",a=t.useProperties===void 0||t.useProperties;for(const[c]of r){if(t.isolate){const u=e.data.get(c);if(!u)continue;const f=u[1][1];if(f===void 0||!t.isolate.has(f))continue}const h=n.getEntityRelations(e,c,"Decomposes");if(h)for(const u of h){let f=u.toString();if(a){const E=await e.getProperties(u);if(!E)continue;f=(s=E.Name)==null?void 0:s.value}this.saveItem(e,o,f,c,u)}const d=n.getEntityRelations(e,c,"ContainsElements");if(!d)continue;let I=c.toString();if(a){const u=await e.getProperties(c);if(!u)continue;I=(i=u.Name)==null?void 0:i.value}for(const u of d){this.saveItem(e,o,I,u,c);const f=n.getEntityRelations(e,Number(u),"IsDecomposedBy");if(f)for(const E of f)this.saveItem(e,o,I,E,c)}}}setColor(e,t,s=!1){const i=this.components.get(Re);for(const n in e){const r=i.list.get(n);if(!r)continue;const o=e[n];r.setColor(t,o,s)}}resetColor(e){const t=this.components.get(Re);for(const s in e){const i=t.list.get(s);if(!i)continue;const n=e[s];i.resetColor(n)}}saveItem(e,t,s,i,n=null){this.list[t]||(this.list[t]={});const r=e.data.get(i);if(r)for(const o of r[0]){const a=e.keyFragments.get(o);if(a){const c=this.list[t];c[s]||(c[s]={map:{},id:n,name:s}),c[s].map[a]||(c[s].map[a]=new Set),c[s].map[a].add(i)}}}};p(da,"uuid","e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");let Ln=da;const Ea=class fa extends Fe{constructor(e){super(e),p(this,"onDisposed",new $),p(this,"enabled",!0),p(this,"height",10),p(this,"groupName","spatialStructures"),p(this,"list",new Set),e.add(fa.uuid,this)}dispose(){this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}set(e){if(!this.enabled)return;const t=this.components.get(Ln),s=this.components.get(Re),i=e?1:-1;let n=0;const r=t.list[this.groupName],o=new Ee;for(const a in r){o.elements[13]=n*i*this.height;for(const c in r[a].map){const h=s.list.get(c),d=a+c,I=this.list.has(d);if(!h||e&&I||!e&&!I)continue;e?this.list.add(d):this.list.delete(d);const u=r[a].map[c];h.applyTransform(u,o),h.mesh.computeBoundingSphere(),h.mesh.computeBoundingBox()}n++}}};p(Ea,"uuid","d260618b-ce88-4c7d-826c-6debb91de3e2");let zu=Ea;const pa=class Ca extends Fe{constructor(e){super(e),p(this,"enabled",!0),this.components.add(Ca.uuid,this)}set(e,t){const s=this.components.get(Re);if(!t){for(const[i,n]of s.list)n&&(n.setVisibility(e),this.updateCulledVisibility(n));return}for(const i in t){const n=t[i],r=s.list.get(i);r&&(r.setVisibility(e,n),this.updateCulledVisibility(r))}}isolate(e){this.set(!1),this.set(!0,e)}updateCulledVisibility(e){const t=this.components.get(Vc);for(const[s,i]of t.list){const n=i.colorMeshes.get(e.id);n&&(n.count=e.mesh.count)}}};p(pa,"uuid","dd9ccf2d-8a21-4821-b7f6-2949add16a29");let Ru=pa;class gu extends sr{constructor(){super(...arguments),p(this,"minGeometrySize",10),p(this,"minAssetsSize",1e3),p(this,"maxTriangles",null)}}const Ta=class ma extends Fe{constructor(e){super(e),p(this,"onGeometryStreamed",new wt),p(this,"onAssetStreamed",new wt),p(this,"onProgress",new wt),p(this,"onIfcLoaded",new wt),p(this,"onDisposed",new $),p(this,"settings",new gu),p(this,"enabled",!0),p(this,"webIfc",new hs),p(this,"_nextAvailableID",0),p(this,"_splittedGeometries",new Map),p(this,"_spatialTree",new bo),p(this,"_metaData",new xo),p(this,"_visitedGeometries",new Map),p(this,"_streamSerializer",new Ka),p(this,"_geometries",new Map),p(this,"_geometryCount",0),p(this,"_civil",new Uo),p(this,"_groupSerializer",new ho),p(this,"_assets",[]),p(this,"_meshesWithHoles",new Set),this.components.add(ma.uuid,this),this.settings.excludedCategories.add(co)}dispose(){this.onIfcLoaded.reset(),this.onGeometryStreamed.reset(),this.onAssetStreamed.reset(),this.webIfc=null,this.onDisposed.trigger(),this.onDisposed.reset()}async streamFromBuffer(e){await this.readIfcFile(e),await this.streamAllGeometries(),this.cleanUp()}async streamFromCallBack(e){await this.streamIfcFile(e),await this.streamAllGeometries(),this.cleanUp()}async readIfcFile(e){const{path:t,absolute:s,logLevel:i}=this.settings.wasm;this.webIfc.SetWasmPath(t,s),await this.webIfc.Init(),i&&this.webIfc.SetLogLevel(i),this.webIfc.OpenModel(e,this.settings.webIfc),this._nextAvailableID=this.webIfc.GetMaxExpressID(0)}async streamIfcFile(e){const{path:t,absolute:s,logLevel:i}=this.settings.wasm;this.webIfc.SetWasmPath(t,s),await this.webIfc.Init(),i&&this.webIfc.SetLogLevel(i),this.webIfc.OpenModelFromCallback(e,this.settings.webIfc)}async streamAllGeometries(){const{minGeometrySize:e,minAssetsSize:t}=this.settings;this._spatialTree.setUp(this.webIfc);const s=this.webIfc.GetIfcEntityList(0),i=[[]],n=new Us;n.ifcMetadata={name:"",description:"",...this._metaData.getNameInfo(this.webIfc),...this._metaData.getDescriptionInfo(this.webIfc),schema:this.webIfc.GetModelSchema(0)||"IFC2X3",maxExpressID:this.webIfc.GetMaxExpressID(0)};let r=0,o=0;for(const f of s){if(!this.webIfc.IsIfcElement(f)&&f!==zt||this.settings.excludedCategories.has(f))continue;const E=this.webIfc.GetLineIDsWithType(0,f),T=E.size();for(let C=0;Ce&&(r=0,o++,i.push([]));const R=E.get(C);i[o].push(R);const A=this.webIfc.GetLine(0,R);if(A.GlobalId){const S=(A==null?void 0:A.GlobalId.value)||(A==null?void 0:A.GlobalId);n.globalToExpressIDs.set(S,R)}const m=this._spatialTree.itemsByFloor[R]||0;n.data.set(R,[[],[m,f]]),r++}}this._spatialTree.cleanUp();let a=.01,c=0;for(const f of i){c++,this.webIfc.StreamMeshes(0,f,T=>{this.getMesh(this.webIfc,T,n)}),this._geometryCount>this.settings.minGeometrySize&&await this.streamGeometries(),this._assets.length>t&&await this.streamAssets();const E=c/i.length;E>a&&(a+=.01,a=Math.max(a,E),await this.onProgress.trigger(Math.round(a*100)/100))}this._geometryCount&&await this.streamGeometries(),this._assets.length&&await this.streamAssets();const{opaque:h,transparent:d}=n.geometryIDs;for(const[f,{index:E,uuid:T}]of this._visitedGeometries)n.keyFragments.set(E,T),(f>1?h:d).set(f,E);Bo.get(n,this.webIfc);const I=this.webIfc.GetCoordinationMatrix(0);n.coordinationMatrix.fromArray(I),n.civilData=this._civil.read(this.webIfc);const u=this._groupSerializer.export(n);await this.onIfcLoaded.trigger(u),n.dispose(!0)}cleanUp(){try{this.webIfc.Dispose()}catch{}this.webIfc=null,this.webIfc=new hs,this._visitedGeometries.clear(),this._geometries.clear(),this._assets=[],this._meshesWithHoles.clear()}getMesh(e,t,s){const i=t.geometries.size(),n=t.expressID,r={id:n,geometries:[]};for(let o=0;oi&&(i=Math.round(i*100)/100,await this.onProgress.trigger(i),i+=.01)}await this.onProgress.trigger(1);const r=await this.components.get(Ke).processFromWebIfc(this.webIfc,0);await this.onIndicesStreamed.trigger(r)}cleanUp(){this.webIfc.Dispose(),this.webIfc=null,this.webIfc=new hs}}p(Su,"uuid","88d2c89c-ce32-47d7-8cb6-d51e4b311a0b");class Ra{constructor(e,t,s){p(this,"title"),p(this,"guid",gt.create()),p(this,"clippingPlanes",new Pt),p(this,"camera",{aspectRatio:1,fov:60,direction:{x:0,y:0,z:0},position:{x:0,y:0,z:0}}),p(this,"exceptionComponents",new Pt),p(this,"selectionComponents",new Pt),p(this,"componentColors",new rt),p(this,"spacesVisible",!1),p(this,"spaceBoundariesVisible",!1),p(this,"openingsVisible",!1),p(this,"defaultVisibility",!0),p(this,"_components"),p(this,"world");const i={setCamera:!0,...s},{data:n,setCamera:r}=i;this._components=e,this.world=t,n&&(this.guid=n.guid??this.guid,this.set(n)),r&&this.updateCamera()}get _selectionModelIdMap(){const e=this._components.get(Re),t={};for(const[s,i]of e.groups){s in t||(t[s]=new Set);for(const n of this.selectionComponents){const r=i.globalToExpressIDs.get(n);r&&t[s].add(r)}}return t}get _exceptionModelIdMap(){const e=this._components.get(Re),t={};for(const[s,i]of e.groups){s in t||(t[s]=new Set);for(const n of this.exceptionComponents){const r=i.globalToExpressIDs.get(n);r&&t[s].add(r)}}return t}get selection(){return this._components.get(Re).modelIdToFragmentIdMap(this._selectionModelIdMap)}get exception(){return this._components.get(Re).modelIdToFragmentIdMap(this._exceptionModelIdMap)}get projection(){return"fov"in this.camera?"Perspective":"Orthographic"}get position(){const e=this._components.get(Re),{position:t}=this.camera,{x:s,y:i,z:n}=t,r=new U(s,i,n);return e.applyBaseCoordinateSystem(r,new Ee),r}get direction(){const{direction:e}=this.camera,{x:t,y:s,z:i}=e;return new U(t,s,i)}get _managerVersion(){return this._components.get(Ye).config.version}get topics(){return[...this._components.get(Ye).list.values()].filter(e=>e.viewpoints.has(this.guid))}addComponentsFromMap(e){const t=this._components.get(Re).fragmentIdMapToGuids(e);this.selectionComponents.add(...t),this._components.get(pt).list.set(this.guid,this)}set(e){const t=e,s=this;for(const i in e){if(i==="guid")continue;const n=t[i];if(i==="selectionComponents"){this.selectionComponents.clear(),this.selectionComponents.add(...n);continue}if(i==="exceptionComponents"){this.exceptionComponents.clear(),this.exceptionComponents.add(...n);continue}i in this&&(s[i]=n)}return this._components.get(pt).list.set(this.guid,this),this}async go(e,t=!0){const{camera:s}=e??this.world;if(!s.hasCameraControls())throw new Error("Viewpoint: the world's camera need controls to set the viewpoint.");s instanceof oh&&s.projection.set(this.projection);const i=new U(this.camera.position.x,this.camera.position.y,this.camera.position.z),n=new U(this.camera.direction.x,this.camera.direction.y,this.camera.direction.z);if(i.equals(new U)&&n.equals(new U))return;const r=this.position,o=this.direction;let a={x:r.x+o.x*80,y:r.y+o.y*80,z:r.z+o.z*80};const c=this.selection;if(Object.keys(c).length===0){const h=this._components.get(gn).get(this.world).castRayFromVector(r,this.direction);h&&(a=h.point)}else{const h=this._components.get(mu);h.reset(),h.addFragmentIdMap(c),a=h.getSphere().center,h.reset()}await s.controls.setLookAt(r.x,r.y,r.z,a.x,a.y,a.z,t)}updateCamera(e){const{camera:t,renderer:s}=e??this.world;if(!s)throw new Error("Viewpoint: the world needs to have a renderer!");if(!t.hasCameraControls())throw new Error("Viewpoint: world's camera need camera controls!");const i=new U;t.controls.getPosition(i);const n=t.three,r=new U(0,0,-1).applyEuler(n.rotation),{width:o,height:a}=s.getSize();let c=o/a;Number.isNaN(c)&&(c=1);const h=this._components.get(Re);i.applyMatrix4(h.baseCoordinationMatrix.clone().invert());const d={aspectRatio:c,position:{x:i.x,y:i.y,z:i.z},direction:{x:r.x,y:r.y,z:r.z}};n instanceof Mn?this.camera={...d,fov:n.fov}:n instanceof Gt&&(this.camera={...d,viewToWorldScale:n.top-n.bottom}),this._components.get(pt).list.set(this.guid,this)}applyVisibility(){const e=this._components.get(Ru);e.set(this.defaultVisibility),e.set(!this.defaultVisibility,this.exception),e.set(!0,this.selection)}applyColors(){const e=this._components.get(pt),t=this._components.get(Re),s=this._components.get(Ln);for(const[i,n]of this.componentColors){const r=t.guidToFragmentIdMap(n);s.setColor(r,i,e.config.overwriteColors)}}resetColors(){const e=this._components.get(Re),t=this._components.get(Ln);for(const[s,i]of this.componentColors){const n=e.guidToFragmentIdMap(i);t.resetColor(n)}}async createComponentTags(e){var t,s;const i=this._components.get(Re),n=this._components.get(Ye);let r="";if(n.config.includeSelectionTag){const o=e==="selection"?this._selectionModelIdMap:this._exceptionModelIdMap;for(const a in o){const c=i.groups.get(a);if(!c)continue;const h=o[a];for(const d of h){const I=await c.getProperties(d);if(!I)continue;const u=(t=I.GlobalId)==null?void 0:t.value;if(!u)continue;const f=(s=I.Tag)==null?void 0:s.value;let E=null;f&&(E=`AuthoringToolId="${f}"`),r+=` -`}}}else r=[...this.selectionComponents].map(o=>``).join(` -`);return r}createColorTags(){let e="";for(const[t,s]of this.componentColors.entries()){const i=`#${t.getHexString()}`,n=s.map(r=>` -`).join(` -`);e+=` -${n} -`}return e.length!==0?` -${e} -`:""}async serialize(e=this._managerVersion){const t=this._components.get(Re),s=this.position;s.applyMatrix4(t.baseCoordinationMatrix.clone().invert());const i=this.direction;i.normalize();const n=new Ee().makeRotationX(Math.PI/2),r=i.clone().applyMatrix4(n);r.normalize();const o=` - ${s.x} - ${-s.z} - ${s.y} - `,a=` - ${i.x} - ${-i.z} - ${i.y} - `,c=` - ${r.x} - ${-r.z} - ${r.y} - `,h=`${this.camera.aspectRatio}`;let d="";"viewToWorld"in this.camera?d=` - ${o} - ${a} - ${c} - ${h} - ${this.camera.viewToWorld} - `:"fov"in this.camera&&(d=` - ${o} - ${a} - ${c} - ${h} - ${this.camera.fov} - `);const I=``,u=(await this.createComponentTags("selection")).trim(),f=(await this.createComponentTags("exception")).trim(),E=this.createColorTags();return` - - - ${e==="2.1"?I:""} - ${u.length!==0?`${u}`:""} - - ${e==="3"?I:""} - ${f.length!==0?`${f}`:""} - - ${E} - - ${d} - `}}class Au extends kt{constructor(){super(...arguments),p(this,"_config",{overwriteColors:{value:!1,type:"Boolean"}})}get overwriteColors(){return this._config.overwriteColors.value}set overwriteColors(e){this._config.overwriteColors.value=e}}const ga=class _n extends Fe{constructor(e){super(e),p(this,"enabled",!0),p(this,"list",new rt),p(this,"isSetup",!1),p(this,"onSetup",new $),p(this,"config",new Au(this,this.components,"Viewpoints",_n.uuid)),p(this,"onDisposed",new $),e.add(_n.uuid,this)}create(e,t){const s=new Ra(this.components,e,{data:t});return t||this.list.set(s.guid,s),s}setup(){}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}};p(ga,"uuid","ee867824-a796-408d-8aa0-4e5962a83c66");let pt=ga;class Ou extends kt{constructor(){super(...arguments),p(this,"_config",{visible:{value:!0,type:"Boolean"},lockRotation:{value:!0,type:"Boolean"},zoom:{type:"Number",interpolable:!0,value:.05,min:.001,max:5},frontOffset:{type:"Number",interpolable:!0,value:0,min:0,max:100},sizeX:{type:"Number",interpolable:!0,value:320,min:20,max:5e3},sizeY:{type:"Number",interpolable:!0,value:160,min:20,max:5e3},backgroundColor:{value:new Ue,type:"Color"}})}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e;const t=this._component.renderer.domElement.style;t.display=e?"block":"none"}get lockRotation(){return this._config.lockRotation.value}set lockRotation(e){this._config.lockRotation.value=e,this._component.lockRotation=e}get zoom(){return this._config.zoom.value}set zoom(e){this._config.zoom.value=e,this._component.zoom=e}get frontOffset(){return this._config.frontOffset.value}set frontOffset(e){this._config.frontOffset.value=e,this._component.frontOffset=e}get sizeX(){return this._config.sizeX.value}set sizeX(e){this._config.sizeX.value=e;const{sizeX:t,sizeY:s}=this._config,i=new He(t.value,s.value);this._component.resize(i)}get sizeY(){return this._config.sizeY.value}set sizeY(e){this._config.sizeY.value=e;const{sizeX:t,sizeY:s}=this._config,i=new He(t.value,s.value);this._component.resize(i)}get backgroundColor(){return this._config.backgroundColor.value}set backgroundColor(e){this._config.backgroundColor.value=e,this._component.backgroundColor=e}}class yu{constructor(e,t){if(p(this,"onDisposed",new $),p(this,"onAfterUpdate",new $),p(this,"onBeforeUpdate",new $),p(this,"onResize",new $),p(this,"onSetup",new $),p(this,"frontOffset",0),p(this,"overrideMaterial",new Ja),p(this,"backgroundColor",new Ue(395274)),p(this,"renderer"),p(this,"enabled",!0),p(this,"world"),p(this,"config"),p(this,"isSetup",!1),p(this,"_defaultConfig",{visible:!0,lockRotation:!1,zoom:.05,frontOffset:0,sizeX:320,sizeY:160,backgroundColor:new Ue(395274)}),p(this,"_lockRotation",!0),p(this,"_size",new He(320,160)),p(this,"_camera"),p(this,"_plane"),p(this,"_tempVector1",new U),p(this,"_tempVector2",new U),p(this,"_tempTarget",new U),p(this,"down",new U(0,-1,0)),p(this,"updatePlanes",()=>{if(!this.world.renderer)throw new Error("The given world must have a renderer!");const n=[],r=this.world.renderer.three;for(const o of r.clippingPlanes)n.push(o);n.push(this._plane),this.renderer.clippingPlanes=n}),this.world=e,!this.world.renderer)throw new Error("The given world must have a renderer!");this.renderer=new Vs,this.renderer.setSize(this._size.x,this._size.y);const s=1,i=this._size.x/this._size.y;this._camera=new Gt(s*i/-2,s*i/2,s/2,s/-2),this.world.renderer.onClippingPlanesUpdated.add(this.updatePlanes),this._camera.position.set(0,200,0),this._camera.zoom=.1,this._camera.rotation.x=-Math.PI/2,this._plane=new ds(this.down,200),this.updatePlanes(),this.config=new Ou(this,t,"MiniMap")}get lockRotation(){return this._lockRotation}set lockRotation(e){this._lockRotation=e,e&&(this._camera.rotation.z=0)}get zoom(){return this._camera.zoom}set zoom(e){this._camera.zoom=e,this._camera.updateProjectionMatrix()}dispose(){this.enabled=!1,this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.onResize.reset(),this.overrideMaterial.dispose(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get(){return this._camera}update(){if(!this.enabled)return;this.onBeforeUpdate.trigger();const e=this.world.scene.three,t=this.world.camera;if(!t.hasCameraControls())throw new Error("The given world must use camera controls!");if(!(e instanceof Pi))throw new Error("The given world must have a THREE.Scene as a root!");const s=t.controls;if(s.getPosition(this._tempVector1),this._camera.position.x=this._tempVector1.x,this._camera.position.z=this._tempVector1.z,this.frontOffset!==0&&(s.getTarget(this._tempVector2),this._tempVector2.sub(this._tempVector1),this._tempVector2.normalize().multiplyScalar(this.frontOffset),this._camera.position.x+=this._tempVector2.x,this._camera.position.z+=this._tempVector2.z),!this._lockRotation){s.getTarget(this._tempTarget);const n=Math.atan2(this._tempTarget.x-this._tempVector1.x,this._tempTarget.z-this._tempVector1.z);this._camera.rotation.z=n+Math.PI}this._plane.set(this.down,this._tempVector1.y);const i=e.background;e.background=this.backgroundColor,this.renderer.render(e,this._camera),e.background=i,this.onAfterUpdate.trigger()}getSize(){return this._size}resize(e=this._size){this._size.copy(e),this.renderer.setSize(e.x,e.y);const t=e.x/e.y,s=1;this._camera.left=s*t/-2,this._camera.right=s*t/2,this._camera.top=s/2,this._camera.bottom=-s/2,this._camera.updateProjectionMatrix(),this.onResize.trigger(e)}setup(e){const t={...this._defaultConfig,...e};this.config.visible=!0,this.config.lockRotation=t.lockRotation,this.config.zoom=t.zoom,this.config.frontOffset=t.frontOffset,this.config.sizeX=t.sizeX,this.config.sizeY=t.sizeY,this.config.backgroundColor=t.backgroundColor,this.isSetup=!0,this.onSetup.trigger()}}const Fa=class Sa extends Fe{constructor(e){super(e),p(this,"onAfterUpdate",new $),p(this,"onBeforeUpdate",new $),p(this,"onDisposed",new $),p(this,"onSetup",new $),p(this,"enabled",!0),p(this,"list",new Map),this.components.add(Sa.uuid,this)}create(e){if(this.list.has(e.uuid))throw new Error("This world already has a minimap!");const t=new yu(e,this.components);return this.list.set(e.uuid,t),t}delete(e){const t=this.list.get(e);t&&t.dispose(),this.list.delete(e)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}update(){for(const[e,t]of this.list)t.update()}};p(Fa,"uuid","39ad6aad-84c8-4adf-a1e0-7f25313a9e7f");let Hu=Fa;const Aa=class Oa extends Fe{constructor(e){super(e),p(this,"enabled",!0),e.add(Oa.uuid,this)}static distanceFromPointToLine(e,t,s,i=!1){const n=new it,r=new U;return n.set(t,s),n.closestPointToPoint(e,i,r),r.distanceTo(e)}getFace(e,t,s){if(!e.geometry.index)throw new Error("Geometry must be indexed!");const i=new Map,n=e.geometry.index.array,{plane:r}=this.getFaceData(t,s,e),o=[];for(let d=0;dm.id);if(!u.size){const m=a++;for(const{id:S}of I)c.set(S,m);h.set(m,{edges:new Set(f),indices:new Set([d])});continue}let E=null;const T=new Set,C=new Set(f);for(const[m,S]of u){E===null?E=S:S!==E&&T.add(S),c.delete(m);const{edges:N}=h.get(S);N.delete(m),C.delete(m)}if(E===null)throw new Error("Error computing face!");const R=h.get(E),{indices:A}=R;A.add(d);for(const m of C){c.set(m,E);const{edges:S}=R;S.add(m)}for(const m of T){const S=h.get(m),{edges:N,indices:y}=S,P=h.get(E),{edges:_,indices:M}=P;for(const B of N)_.add(B),c.set(B,E);for(const B of y)M.add(B);h.delete(m)}}for(const[d,{indices:I,edges:u}]of h)if(I.has(t)){const f=[];for(const E of u){const T=i.get(E);f.push(T)}return{edges:f,indices:I}}return null}getVerticesAndNormal(e,t,s){if(!e.geometry.index)throw new Error("Geometry must be indexed!");const i=e.geometry.index.array,n=e.geometry.attributes.position.array,r=e.geometry.attributes.normal.array,o=i[t*3]*3,a=i[t*3+1]*3,c=i[t*3+2]*3,h=new U(n[o],n[o+1],n[o+2]),d=new U(n[a],n[a+1],n[a+2]),I=new U(n[c],n[c+1],n[c+2]),u=new U(r[o],r[o+1],r[o+2]),f=new U(r[a],r[a+1],r[a+2]),E=new U(r[c],r[c+1],r[c+2]),T=(u.x+f.x+E.x)/3,C=(u.y+f.y+E.y)/3,R=(u.z+f.z+E.z)/3,A=new U(T,C,R);if(s!==void 0&&e instanceof Vt){const m=new Ee;e.getMatrixAt(s,m);const S=new Ee;S.extractRotation(m),A.applyMatrix4(S),h.applyMatrix4(m),d.applyMatrix4(m),I.applyMatrix4(m)}return{p1:h,p2:d,p3:I,faceNormal:A}}round(e){e.x=Math.trunc(e.x*1e3)/1e3,e.y=Math.trunc(e.y*1e3)/1e3,e.z=Math.trunc(e.z*1e3)/1e3}getVolumeFromFragments(e){const t=this.components.get(Re),s=new Ee,i=[];for(const r in e){const o=t.list.get(r);if(!o)continue;const a=e[r];let c=0;for(const I of a){const u=o.getInstancesIDs(I);u&&(c+=u.size)}const h=new Vt(o.mesh.geometry,void 0,c);let d=0;for(const I of a){const u=o.getInstancesIDs(I);if(u)for(const f of u)o.mesh.getMatrixAt(f,s),h.setMatrixAt(d++,s)}i.push(h)}const n=this.getVolumeFromMeshes(i);for(const r of i)r.geometry=null,r.material=[],r.dispose();return n}getVolumeFromMeshes(e){let t=0;for(const s of e)t+=this.getVolumeOfMesh(s);return t}getFaceData(e,t,s){const i=this.getVerticesAndNormal(s,e,t),{p1:n,p2:r,p3:o,faceNormal:a}=i;this.round(n),this.round(r),this.round(o),this.round(a);const c=[{id:`${n.x}|${n.y}|${n.z}`,value:n},{id:`${r.x}|${r.y}|${r.z}`,value:r},{id:`${o.x}|${o.y}|${o.z}`,value:o}];c.sort((R,A)=>R.idA.id?1:0);const[{id:h,value:d},{id:I,value:u},{id:f,value:E}]=c,T=[{id:`${h}|${I}`,distance:d.distanceTo(u),points:[d,u]},{id:`${I}|${f}`,distance:u.distanceTo(E),points:[u,E]},{id:`${h}|${f}`,distance:d.distanceTo(E),points:[d,E]}],C=new ds;return C.setFromNormalAndCoplanarPoint(a,n),C.constant=Math.round(C.constant*10)/10,{plane:C,edges:T}}getVolumeOfMesh(e){let t=0;const s=new U,i=new U,n=new U,{index:r}=e.geometry,o=e.geometry.attributes.position.array;if(!r)return console.warn("Geometry must be indexed to compute its volume!"),0;const a=[];if(e instanceof Vt)for(let h=0;h{const r={parameter:i,currentValue:t,requiredValue:s.parameter,pass:!1};n&&this.addCheckResult(r,n);let o=!1;if(s.type==="simple"&&(o=t===s.parameter),s.type==="enumeration"&&(o=s.parameter.includes(t)),s.type==="pattern"&&(o=new RegExp(s.parameter).test(String(t))),s.type==="length"){const{min:a,length:c,max:h}=s.parameter;c!==void 0&&(o=String(t).length===c),a!==void 0&&(o=String(t).length>=a),h!==void 0&&(o=String(t).length<=h)}if(s.type==="bounds"&&typeof t=="number"){const{min:a,minInclusive:c,max:h,maxInclusive:d}=s.parameter;let I=!0,u=!0;a!==void 0&&(I=c?t<=a:t=h:t>h),o=I&&u}return this.cardinality==="prohibited"&&(o=!o),this.cardinality==="optional"&&(o=!0),r.pass=o,r.pass}),p(this,"testResult",[]),this.components=e}addCheckResult(e,t){const s=t.findIndex(({parameter:i})=>i===e.parameter);s!==-1?t[s]=e:t.push(e)}saveResult(e,t){const{GlobalId:s}=e;if(!s)return;const{value:i}=s,n={expressID:i,pass:t,checks:[],cardinality:this.cardinality};this.testResult.push(n)}}const Tt=(l,e)=>{let t="";return e?(e.type==="simple"&&(t=`${e.parameter}`),e.type==="enumeration"&&(t=` - ${e.parameter.map(s=>``).join(`\r -`)} - `),e.type==="pattern"&&(t=` - - `),` - ${t} - `):t};class Nu extends Bi{constructor(e,t){super(e),p(this,"facetType","Attribute"),p(this,"name"),p(this,"value"),this.name=t}serialize(e){const t=Tt("Name",this.name),s=Tt("Value",this.value);let i="";return e==="requirement"&&(i+=`cardinality="${this.cardinality}"`,i+=this.instructions?`instructions="${this.instructions}"`:""),` - ${t} - ${s} -`}async getEntities(){return[]}async test(e){var t;this.testResult=[];for(const i in e){const n=Number(i),r=e[n],o=[],a={guid:(t=r.GlobalId)==null?void 0:t.value,expressID:n,pass:!1,checks:o,cardinality:this.cardinality};this.testResult.push(a);const c=Object.keys(r).filter(d=>{const I=this.evalRequirement(d,this.name,"Name"),u=r[d];return I&&u===null?this.cardinality==="optional"||this.cardinality==="prohibited":I&&(u==null?void 0:u.type)===3&&u.value===2||I&&Array.isArray(u)&&u.length===0||I&&(u==null?void 0:u.type)===1&&u.value.trim()===""?!1:I}),h=c.length>0;if(o.push({parameter:"Name",currentValue:h?c[0]:null,requiredValue:this.name.parameter,pass:this.cardinality==="prohibited"?!h:h}),this.value)if(c[0]){const d=r[c[0]];(d==null?void 0:d.type)===5?o.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"}):this.evalRequirement(d?d.value:null,this.value,"Value",o)}else o.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"});a.pass=o.every(({pass:d})=>d)}const s=[...this.testResult];return this.testResult=[],s}}class Lu extends Bi{constructor(e,t){super(e),p(this,"facetType","Classification"),p(this,"system"),p(this,"value"),p(this,"uri"),this.system=t}serialize(e){const t=Tt("System",this.system),s=Tt("Value",this.value);let i="";return e==="requirement"&&(i+=`cardinality="${this.cardinality}"`,i+=this.uri?`uri=${this.uri}`:"",i+=this.instructions?`instructions="${this.instructions}"`:""),` - ${t} - ${s} -`}async getEntities(e,t={}){var s;const i=[],n=await e.getAllPropertiesOfType(It),r=await e.getAllPropertiesOfType(Ht),o={...n,...r},a=[];for(const h in o){const d=Number(h),I=await e.getProperties(d);if(!I)continue;const u=(s=I.ReferencedSource)==null?void 0:s.value;if(!u)continue;const f=await e.getProperties(u);!f||!this.evalSystem(f)||!this.evalValue(I)||!this.evalURI(I)||a.push(d)}const c=this.components.get(Ke);for(const h of a){const d=c.getEntitiesWithRelation(e,"HasAssociations",h);for(const I of d){if(I in t)continue;const u=await e.getProperties(I);u&&(t[I]=u,i.push(I))}}return i}async test(e,t){var s;this.testResult=[];for(const n in e){const r=Number(n),o=e[r],a=[],c={guid:(s=o.GlobalId)==null?void 0:s.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(c);let h=!0;const d=await this.getSystems(t,r),I=d.map(u=>this.getSystemName(u)).filter(u=>u);for(const u of d){if(!this.evalSystem(u,a))continue;if(h=!1,!(this.value&&this.system))break;if(u.type!==It)continue;const f=!this.value||this.evalValue(u,a),E=!this.uri||this.evalURI(u,a);if(f&&E)break}h&&this.addCheckResult({parameter:"System",currentValue:I,requiredValue:this.system,pass:this.cardinality==="optional"},a),c.pass=a.every(({pass:u})=>u)}const i=[...this.testResult];return this.testResult=[],i}async processReferencedSource(e,t){var s;const i=(s=t.ReferencedSource)==null?void 0:s.value;if(!i)return null;const n=await e.getProperties(i);return n?(n.type===It&&(n.ReferencedSource=await this.processReferencedSource(e,n)),n):null}async getSystems(e,t){var s;const i=[],n=this.components.get(Ke),r=n.getEntityRelations(e,t,"HasAssociations");if(r)for(const d of r){const I=await e.getProperties(d);I&&(I.type===Ht&&i.push(I),I.type===It&&(I.ReferencedSource=await this.processReferencedSource(e,I),I.ReferencedSource&&i.push(I)))}const o=i.map(d=>{var I,u,f;return d.type===Ht?(I=d.Name)==null?void 0:I.value:d.type===It?(f=(u=d.ReferencedSource)==null?void 0:u.Name)==null?void 0:f.value:null}).filter(d=>d),a=n.getEntityRelations(e,t,"IsTypedBy");if(!(a&&a[0]))return i;const c=a[0],h=n.getEntityRelations(e,c,"HasAssociations");if(h)for(const d of h){const I=await e.getProperties(d);if(I){if(I.type===Ht){if(o.includes((s=I.Name)==null?void 0:s.value))continue;i.push(I)}I.type===It&&(I.ReferencedSource=await this.processReferencedSource(e,I),I.ReferencedSource&&i.push(I))}}return i}getSystemName(e){var t,s,i,n;if(e.type===Ht)return(t=e.Name)==null?void 0:t.value;if(e.type===It){if(((s=e.ReferencedSource)==null?void 0:s.type)===It)return this.getSystemName(e.ReferencedSource);if(((i=e.ReferencedSource)==null?void 0:i.type)===Ht)return(n=e.ReferencedSource.Name)==null?void 0:n.value}return null}getAllReferenceIdentifications(e){if(e.type!==It)return null;const t=[];if(e.Identification&&t.push(e.Identification.value),e.ReferencedSource){const s=this.getAllReferenceIdentifications(e.ReferencedSource);s&&t.push(...s)}return t}evalSystem(e,t){const s=this.getSystemName(e);return this.evalRequirement(s,this.system,"System",t)}evalValue(e,t){if(!this.value)return!0;const s=this.getAllReferenceIdentifications(e);if(!s)return!1;const i=s.find(n=>this.value?this.evalRequirement(n,this.value,"Value"):!1);return t&&this.addCheckResult({parameter:"Value",currentValue:i??null,requiredValue:this.value,pass:!!i},t),!!i}evalURI(e,t){var s;return this.uri?this.evalRequirement((s=e.Location)==null?void 0:s.value,{type:"simple",parameter:this.uri},"URI",t):!0}}class _u extends Bi{constructor(e,t){super(e),p(this,"facetType","Entity"),p(this,"name"),p(this,"predefinedType"),this.name=t}serialize(e){const t=Tt("Name",this.name),s=Tt("Name",this.predefinedType);let i="";return e==="requirement"&&(i+=`cardinality="${this.cardinality}"`,i+=this.instructions?`instructions="${this.instructions}"`:""),` - ${t} - ${s} -`}async getEntities(e,t={}){const s=Object.entries(_i),i=[];for(const[o]of s)await this.evalName({type:o})&&i.push(Number(o));let n={};for(const o of i){const a=await e.getAllPropertiesOfType(o);a&&(n={...n,...a})}if(!this.predefinedType){for(const o in n)o in t||(t[o]=n[o]);return Object.keys(n).map(Number)}const r=[];for(const o in n){const a=Number(o);if(a in t)continue;const c=n[a];await this.evalPredefinedType(e,c)&&(t[a]=c,r.push(a))}return r}async test(e,t){var s;this.testResult=[];for(const i in e){const n=Number(i),r=e[n],o=[],a={guid:(s=r.GlobalId)==null?void 0:s.value,expressID:n,pass:!1,checks:o,cardinality:this.cardinality};this.testResult.push(a),await this.evalName(r,o),await this.evalPredefinedType(t,r,o),a.pass=o.every(({pass:c})=>c)}return this.testResult}async evalName(e,t){const s=_i[e.type];return this.evalRequirement(s,this.name,"Name",t)}async evalPredefinedType(e,t,s){var i,n,r,o;if(!this.predefinedType)return null;const a=this.components.get(Ke),c=typeof this.predefinedType.parameter=="string"&&this.predefinedType.parameter==="USERDEFINED";let h=(i=t.PredefinedType)==null?void 0:i.value;if(h==="USERDEFINED"&&!c){const d=Object.keys(t).find(I=>/^((?!Predefined).)*Type$/.test(I));h=d?(n=t[d])==null?void 0:n.value:"USERDEFINED"}if(!h){const d=a.getEntityRelations(e,t.expressID,"IsTypedBy");if(d&&d[0]){const I=await e.getProperties(d[0]);if(I&&(h=(r=I.PredefinedType)==null?void 0:r.value,h==="USERDEFINED"&&!c)){const u=Object.keys(I).find(f=>/^((?!Predefined).)*Type$/.test(f));h=u?(o=I[u])==null?void 0:o.value:"USERDEFINED"}}}return this.evalRequirement(h,this.predefinedType,"PredefinedType",s)}}class wu extends Bi{constructor(e,t,s){super(e),p(this,"facetType","Property"),p(this,"propertySet"),p(this,"baseName"),p(this,"value"),p(this,"dataType"),p(this,"uri"),p(this,"_unsupportedTypes",[el,tl]),this.propertySet=t,this.baseName=s}serialize(e){const t=Tt("PropertySet",this.propertySet),s=Tt("BaseName",this.baseName),i=Tt("Value",this.value),n=this.dataType?`dataType=${this.dataType}`:"";let r="";return e==="requirement"&&(r+=`cardinality="${this.cardinality}"`,r+=this.uri?`uri=${this.uri}`:"",r+=this.instructions?`instructions="${this.instructions}"`:""),` - ${t} - ${s} - ${i} -`}async getEntities(e,t={}){var s,i;let n={};const r=await e.getAllPropertiesOfType(as);n={...n,...r};const o=await e.getAllPropertiesOfType(mi);if(n={...n,...o},Object.keys(n).length===0)return[];const a=[];for(const h in n){const d=Number(h),I=await e.getProperties(d);if(!I||((s=I.Name)==null?void 0:s.value)!==this.propertySet.parameter)continue;let u;if(I.type===as&&(u="HasProperties"),I.type===mi&&(u="Quantities"),!!u)for(const f of I[u]){const E=await e.getProperties(f.value);if(!(!E||((i=E.Name)==null?void 0:i.value)!==this.baseName.parameter)){if(this.value){const T=Object.keys(E).find(C=>C.endsWith("Value"));if(!T||E[T].value!==this.value.parameter)continue}a.push(d)}}}const c=this.components.get(Ke);for(const h of a){const d=c.getEntitiesWithRelation(e,"IsDefinedBy",h);for(const I of d){if(I in t)continue;const u=await e.getProperties(I);u&&(t[I]=u)}}return[]}async test(e,t){var s;this.testResult=[];for(const n in e){const r=Number(n),o=e[r],a=[],c={guid:(s=o.GlobalId)==null?void 0:s.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(c);const h=(await this.getPsets(t,r)).filter(d=>{var I;return this.evalRequirement(((I=d.Name)==null?void 0:I.value)??null,this.propertySet,"PropertySet")?(a.push({currentValue:d.Name.value,parameter:"PropertySet",pass:!0,requiredValue:this.propertySet.parameter}),!0):!1});if(h.length===0){a.push({currentValue:null,parameter:"PropertySet",pass:!1,requiredValue:this.propertySet.parameter});continue}for(const d of h){const I=this.getItemsAttrName(d.type);if(!I){a.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}const u=d[I].filter(f=>{var E;return this._unsupportedTypes.includes(f.type)||!this.evalRequirement(((E=f.Name)==null?void 0:E.value)??null,this.baseName,"BaseName")?!1:(a.push({currentValue:f.Name.value,parameter:"BaseName",pass:!0,requiredValue:this.baseName.parameter}),!0)});if(u.length===0){a.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}for(const f of u)this.evalValue(f,a),this.evalDataType(f,a),this.evalURI()}c.pass=a.every(({pass:d})=>d)}const i=[...this.testResult];return this.testResult=[],i}getItemsAttrName(e){let t;return e===as&&(t="HasProperties"),e===mi&&(t="Quantities"),t}getValueKey(e){return Object.keys(e).find(t=>t.endsWith("Value")||t.endsWith("Values"))}async getPsetProps(e,t,s){const i=structuredClone(t),n=[],r=i[s];if(!r)return n;for(const{value:o}of r){const a=await e.getProperties(o);a&&n.push(a)}return i[s]=n,i}async getTypePsets(e,t){const s=[],i=this.components.get(Ke).getEntityRelations(e,t,"IsTypedBy");if(!(i&&i[0]))return s;const n=await e.getProperties(i[0]);if(!(n&&"HasPropertySets"in n&&Array.isArray(n.HasPropertySets)))return s;for(const{value:r}of n.HasPropertySets){const o=await e.getProperties(r);if(!(o&&"HasProperties"in o&&Array.isArray(o.HasProperties)))continue;const a=await this.getPsetProps(e,o,"HasProperties");s.push(a)}return s}async getPsets(e,t){const s=await this.getTypePsets(e,t),i=this.components.get(Ke).getEntityRelations(e,t,"IsDefinedBy");if(!i)return s;for(const n of i){const r=await e.getProperties(n);if(!r)continue;const o=this.getItemsAttrName(r.type);if(!o)continue;const a=await this.getPsetProps(e,r,o);s.push(a)}return s}evalValue(e,t){const s=this.getValueKey(e),i=e[s];if(this.value){if(!i)return t==null||t.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:this.value.parameter}),!1;const n=structuredClone(this.value);if(i.name==="IFCLABEL"&&n.type==="simple"&&(n.parameter=String(n.parameter)),(e.type===hr||e.type===ur)&&Array.isArray(i)){const r=i.map(a=>a.value),o=i.find(a=>n?this.evalRequirement(a.value,n,"Value"):!1);return t==null||t.push({currentValue:r,pass:!!o,parameter:"Value",requiredValue:n.parameter}),!!o}return this.evalRequirement(i.value,n,"Value",t)}return s?i.type===3&&i.value===2?(t==null||t.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:null}),!1):i.type===1&&i.value.trim()===""?(t==null||t.push({parameter:"Value",currentValue:"",pass:!1,requiredValue:null}),!1):!0:!0}evalDataType(e,t){if(!this.dataType)return!0;const s=this.getValueKey(e),i=e[s];if(!i)return t==null||t.push({parameter:"DataType",currentValue:null,pass:!1,requiredValue:this.dataType}),!1;if((e.type===hr||e.type===ur)&&Array.isArray(i)&&i[0]){const n=i[0].name;return this.evalRequirement(n,{type:"simple",parameter:this.dataType},"DataType",t)}return this.evalRequirement(i.name,{type:"simple",parameter:this.dataType},"DataType",t)}evalURI(){return!0}}class Pu{constructor(e,t,s){p(this,"name"),p(this,"ifcVersion",new Set),p(this,"identifier",gt.create()),p(this,"description"),p(this,"instructions"),p(this,"requirementsDescription"),p(this,"applicability",new Pt),p(this,"requirements",new Pt),p(this,"components"),this.components=e,this.name=t;for(const i of s)this.ifcVersion.add(i)}set(e){const t=e,s=this;for(const i in e){if(i==="identifier")continue;const n=t[i];i in this&&(s[i]=n)}return this.components.get(bu).list.set(this.identifier,this),this}async test(e){let t=[];if(this.requirements.size===0)return t;const s={};for(const i of this.applicability)await i.getEntities(e,s);return t=await[...this.requirements][0].test(s,e),t}serialize(){const e=`name="${this.name}"`,t=this.identifier?`identifier="${this.identifier}"`:"",s=this.description?`description="${this.description}"`:"",i=this.instructions?`instructions="${this.instructions}"`:"";return` - - ${[...this.applicability].map(n=>n.serialize("applicability"))} - - - ${[...this.requirements].map(n=>n.serialize("requirement"))} - - `}}const mt=l=>{if(!l)return;const e={};if("simpleValue"in l&&(e.type="simple",e.parameter=l.simpleValue),"restriction"in l){const t=l.restriction;if("pattern"in t&&(e.type="pattern",e.parameter=t.pattern.value),"enumeration"in t){e.type="enumeration";const s=t.enumeration.map(({value:i})=>i);e.parameter=s}}if(e.parameter!==void 0)return e},oo=(l,e)=>{const t=[];for(const s of e){const i=s.name,n=mt(i);if(!n)continue;const r=new _u(l,n);s.cardinality&&(r.cardinality=s.cardinality),r.predefinedType=mt(s.predefinedType),r.instructions=s.instructions,t.push(r)}return t},vu=(l,e)=>{const t=[];for(const s of e){const i=s.name,n=mt(i);if(!n)continue;const r=new Nu(l,n);s.cardinality&&(r.cardinality=s.cardinality),r.value=mt(s.value),r.instructions=s.instructions,t.push(r)}return t},Mu=(l,e)=>{const t=[];for(const s of e){const i=s.system,n=mt(i);if(!n)continue;const r=new Lu(l,n);s.cardinality&&(r.cardinality=s.cardinality);const o=mt(s.value);(o==null?void 0:o.type)==="simple"&&(o.parameter=String(o.parameter)),(o==null?void 0:o.type)==="enumeration"&&Array.isArray(o.parameter)&&(o.parameter=o.parameter.map(String)),r.value=o,r.uri=s.uri,r.instructions=s.instructions,t.push(r)}return t},Du=(l,e)=>{const t=[];for(const s of e){const i=s.propertySet,n=s.baseName,r=mt(i),o=mt(n);if(!(o&&r))continue;const a=new wu(l,r,o);s.cardinality&&(a.cardinality=s.cardinality);const c=mt(s.value);(c==null?void 0:c.type)==="enumeration"&&Array.isArray(c.parameter)&&(c.parameter=c.parameter.map(String)),a.value=c,a.dataType=s.dataType,a.uri=s.uri,a.instructions=s.instructions,t.push(a)}return t},wn=class Pn extends Fe{constructor(e){super(e),p(this,"enabled",!0),p(this,"list",new rt),e.add(Pn.uuid,this)}getFragmentIdMap(e,t){const s=t.filter(o=>o.pass).map(o=>o.expressID),i=e.getFragmentMap(s),n=t.filter(o=>!o.pass).map(o=>o.expressID),r=e.getFragmentMap(n);return{pass:i,fail:r}}create(e,t,s){const i=new Pu(this.components,e,t);return s&&(i.identifier=s),this.list.set(i.identifier,i),i}load(e){const t=[],s=Pn.xmlParser.parse(e).ids,{specifications:i}=s;if(i&&i.specification){const n=Array.isArray(i.specification)?i.specification:[i.specification];for(const r of n){const{name:o,ifcVersion:a,description:c,instructions:h,identifier:d}=r;if(!(o&&a))continue;const I=[],u=[],{applicability:f,requirements:E}=r;if(f){const{maxOccurs:C,...R}=f,A=Array.isArray(R)?R:[R];for(const m of A)for(const S in m){const N=Array.isArray(m[S])?m[S]:[m[S]];if(S==="entity"){const y=oo(this.components,N);I.push(...y)}}}let T;if(E){const{maxOccurs:C,...R}=E;T=E.description;const A=Array.isArray(R)?R:[R];for(const m of A)for(const S in m){const N=Array.isArray(m[S])?m[S]:[m[S]];if(S==="entity"){const y=oo(this.components,N);u.push(...y)}if(S==="attribute"){const y=vu(this.components,N);u.push(...y)}if(S==="classification"){const y=Mu(this.components,N);u.push(...y)}if(S==="property"){const y=Du(this.components,N);u.push(...y)}}}if(I.length>0&&u.length>0){const C=this.create(o,a.split(/\s+/),d);C.description=c,C.instructions=h,C.requirementsDescription=T,C.applicability.add(...I),C.requirements.add(...u),t.push(C)}}}return t}export(e,t=this.list.values()){const s=t??this.list;return` - - - ${e.title} - ${e.copyright?`${e.copyright}`:""} - ${e.version?`${e.version}`:""} - ${e.description?`${e.description}`:""} - ${e.author?`${e.author}`:""} - ${e.date?`${e.date.toISOString().split("T")[0]}`:""} - ${e.purpose?`${e.purpose}`:""} - ${e.milestone?`${e.milestone}`:""} - - - ${[...s].map(i=>i.serialize()).join(` -`)} - -`}};p(wn,"uuid","9f0b9f78-9b2e-481a-b766-2fbfd01f342c"),p(wn,"xmlParser",new Jo.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let bu=wn;export{ku as $,ro as A,Ln as B,Ro as C,mu as D,Ke as G,yc as J,Yu as L,Ye as M,th as N,Vc as O,Ih as P,so as R,No as T,Gu as W,zu as X,Hu as Z,Re as a,hh as b,gn as c,Ru as d,no as e,Su as f,xu as g,Bu as h,pt as i,Wu as j,Vu as k,_i as m,gt as o,wc as s,oh as w,Gs as x,ch as y}; diff --git a/examples/assets/index-B_pEH4rh.js b/examples/assets/index-BboVOtPt.js similarity index 54% rename from examples/assets/index-B_pEH4rh.js rename to examples/assets/index-BboVOtPt.js index 74a150a5..ba30e111 100644 --- a/examples/assets/index-B_pEH4rh.js +++ b/examples/assets/index-BboVOtPt.js @@ -1,13 +1,13 @@ -var Po=Object.defineProperty;var Lo=(c,i,t)=>i in c?Po(c,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[i]=t;var S=(c,i,t)=>(Lo(c,typeof i!="symbol"?i+"":i,t),t);import{o as Ui,V as W,t as Un,u as pe,p as Le,T as Oi,S as Bs,n as Nt,v as Lt,x as _o,y as Ys,z as or,E as Mo,a as it,w as wo,q as bi,Q as bn,P as to,U as Do,N as vn,X as Uo,Y as Jt,Z as bo,_ as vo,W as eo,H as xo,J as Bo,b as si,s as Cs,K as js,C as Vs,O as Ts,L as io,a1 as vt,B as Dt,a2 as ar,a3 as ki,a4 as Re,a5 as li,a6 as Yo,a7 as Vo,$ as so,a8 as Go,ah as Gs,ap as xn,aq as Bn,ar as Yn,as as Bi,at as Vn,au as Gn,ag as ks,av as kn,aw as zn,ax as Hn,ay as Wn,az as Xn,aA as $n,aB as Zn,aD as le,e as Is,d as ei,f as ko,ac as Yi,ad as zo,ak as Ho,al as Wo,am as Xo,ai as $o,aj as Zo,I as no,a9 as ro,aa as oo,ab as ao,aG as jo,aH as qo,aI as Qo,aJ as Ko,ae as cr,af as lr,an as Jo,aC as Es,aK as ta,aE as Se,aF as ea,ao as ia,aL as sa,aN as na,aO as co,g as Ie,aR as xe,aS as ra,aT as oa,aU as ur,aV as fr}from"./web-ifc-api-CpQ3aV8c.js";import{c as zi,g as aa}from"./_commonjsHelpers-Cpj98o6Y.js";const lo=0,ca=1,la=2,hr=2,qs=1.25,Ir=1,ds=6*4+4+4,zs=65535,ua=Math.pow(2,-24),Qs=Symbol("SKIP_GENERATION");function fa(c){return c.index?c.index.count:c.attributes.position.count}function ri(c){return fa(c)/3}function ha(c,i=ArrayBuffer){return c>65535?new Uint32Array(new i(4*c)):new Uint16Array(new i(2*c))}function Ia(c,i){if(!c.index){const t=c.attributes.position.count,e=i.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,s=ha(t,e);c.setIndex(new Ui(s,1));for(let n=0;no-a);for(let o=0;on.offset-r.offset),e=t[t.length-1];e.count=Math.min(i-e.offset,e.count);let s=0;return t.forEach(({count:n})=>s+=n),i!==s}function Rt(c,i,t){return t.min.x=i[c],t.min.y=i[c+1],t.min.z=i[c+2],t.max.x=i[c+3],t.max.y=i[c+4],t.max.z=i[c+5],t}function da(c){c[0]=c[1]=c[2]=1/0,c[3]=c[4]=c[5]=-1/0}function Er(c){let i=-1,t=-1/0;for(let e=0;e<3;e++){const s=c[e+3]-c[e];s>t&&(t=s,i=e)}return i}function dr(c,i){i.set(c)}function pr(c,i,t){let e,s;for(let n=0;n<3;n++){const r=n+3;e=c[n],s=i[n],t[n]=es?e:s}}function Hi(c,i,t){for(let e=0;e<3;e++){const s=i[c+2*e],n=i[c+2*e+1],r=s-n,o=s+n;rt[e+3]&&(t[e+3]=o)}}function ui(c){const i=c[3]-c[0],t=c[4]-c[1],e=c[5]-c[2];return 2*(i*t+t*e+e*i)}function Ks(c,i,t,e,s=null){let n=1/0,r=1/0,o=1/0,a=-1/0,l=-1/0,u=-1/0,f=1/0,I=1/0,h=1/0,d=-1/0,E=-1/0,C=-1/0;const p=s!==null;for(let A=i*6,F=(i+t)*6;Aa&&(a=y),p&&Rd&&(d=R);const w=c[A+2],L=c[A+3],D=w-L,V=w+L;Dl&&(l=V),p&&wE&&(E=w);const O=c[A+4],M=c[A+5],T=O-M,U=O+M;Tu&&(u=U),p&&OC&&(C=O)}e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=l,e[5]=u,p&&(s[0]=f,s[1]=I,s[2]=h,s[3]=d,s[4]=E,s[5]=C)}function pa(c,i,t,e){let s=1/0,n=1/0,r=1/0,o=-1/0,a=-1/0,l=-1/0;for(let u=i*6,f=(i+t)*6;uo&&(o=I);const h=c[u+2];ha&&(a=h);const d=c[u+4];dl&&(l=d)}e[0]=s,e[1]=n,e[2]=r,e[3]=o,e[4]=a,e[5]=l}function Ca(c,i){da(i);const t=c.attributes.position,e=c.index?c.index.array:null,s=ri(c),n=new Float32Array(s*6),r=t.normalized,o=t.array,a=t.offset||0;let l=3;t.isInterleavedBufferAttribute&&(l=t.data.stride);const u=["getX","getY","getZ"];for(let f=0;fN&&(N=F),R>N&&(N=R);const y=(N-g)/2,w=p*2;n[h+w+0]=g+y,n[h+w+1]=y+(Math.abs(g)+y)*ua,gi[p+3]&&(i[p+3]=N)}}return n}const Ee=32,Ta=(c,i)=>c.candidate-i.candidate,Ae=new Array(Ee).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),Wi=new Float32Array(6);function ma(c,i,t,e,s,n){let r=-1,o=0;if(n===lo)r=Er(i),r!==-1&&(o=(i[r]+i[r+3])/2);else if(n===ca)r=Er(c),r!==-1&&(o=Ra(t,e,s,r));else if(n===la){const a=ui(c);let l=qs*s;const u=e*6,f=(e+s)*6;for(let I=0;I<3;I++){const h=i[I],C=(i[I+3]-h)/Ee;if(s=y.candidate?Hi(R,t,y.rightCacheBounds):(Hi(R,t,y.leftCacheBounds),y.count++)}}for(let R=0;R=Ee&&(N=Ee-1);const y=Ae[N];y.count++,Hi(F,t,y.bounds)}const p=Ae[Ee-1];dr(p.bounds,p.rightCacheBounds);for(let F=Ee-2;F>=0;F--){const R=Ae[F],g=Ae[F+1];pr(R.bounds,g.rightCacheBounds,R.rightCacheBounds)}let A=0;for(let F=0;F=a;)o--;if(r=a;)o--;if(r2**16,s=e?4:2,n=i?new SharedArrayBuffer(t*s):new ArrayBuffer(t*s),r=e?new Uint32Array(n):new Uint16Array(n);for(let o=0,a=r.length;o=s&&(f=!0,n&&(console.warn(`MeshBVH: Max depth of ${s} reached when generating BVH. Consider increasing maxDepth.`),console.warn(t))),N<=r||w>=s)return A(g+N),R.offset=g,R.count=N,R;const L=ma(R.boundingData,y,d,g,N,o);if(L.axis===-1)return A(g+N),R.offset=g,R.count=N,R;const D=E(u,e,d,g,N,L);if(D===g||D===g+N)A(g+N),R.offset=g,R.count=N;else{R.splitAxis=L.axis;const V=new Xi,O=g,M=D-g;R.left=V,V.boundingData=new Float32Array(6),Ks(d,O,M,V.boundingData,h),F(V,O,M,h,w+1);const T=new Xi,U=D,Z=N-M;R.right=T,T.boundingData=new Float32Array(6),Ks(d,U,Z,T.boundingData,h),F(T,U,Z,h,w+1)}return R}}function Oa(c,i){const t=c.geometry;i.indirect&&(c._indirectBuffer=ga(t,i.useSharedArrayBuffer),Ea(t)&&!i.verbose&&console.warn('MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),c._indirectBuffer||Ia(t,i);const e=Sa(c,i);let s,n,r;const o=[],a=i.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let f=0;fMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return n[h+6]=R/4,R=u(R,A),n[h+7]=F,R}}}class me{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(i,t){let e=1/0,s=-1/0;for(let n=0,r=i.length;ns?a:s}this.min=e,this.max=s}setFromPoints(i,t){let e=1/0,s=-1/0;for(let n=0,r=t.length;ns?a:s}this.min=e,this.max=s}isSeparated(i){return this.min>i.max||i.min>this.max}}me.prototype.setFromBox=function(){const c=new W;return function(t,e){const s=e.min,n=e.max;let r=1/0,o=-1/0;for(let a=0;a<=1;a++)for(let l=0;l<=1;l++)for(let u=0;u<=1;u++){c.x=s.x*a+n.x*(1-a),c.y=s.y*l+n.y*(1-l),c.z=s.z*u+n.z*(1-u);const f=t.dot(c);r=Math.min(f,r),o=Math.max(f,o)}this.min=r,this.max=o}}();const Na=function(){const c=new W,i=new W,t=new W;return function(s,n,r){const o=s.start,a=c,l=n.start,u=i;t.subVectors(o,l),c.subVectors(s.end,s.start),i.subVectors(n.end,n.start);const f=t.dot(u),I=u.dot(a),h=u.dot(u),d=t.dot(a),C=a.dot(a)*h-I*I;let p,A;C!==0?p=(f*I-d*h)/C:p=0,A=(f+p*I)/h,r.x=p,r.y=A}}(),jn=function(){const c=new Le,i=new W,t=new W;return function(s,n,r,o){Na(s,n,c);let a=c.x,l=c.y;if(a>=0&&a<=1&&l>=0&&l<=1){s.at(a,r),n.at(l,o);return}else if(a>=0&&a<=1){l<0?n.at(0,o):n.at(1,o),s.closestPointToPoint(o,!0,r);return}else if(l>=0&&l<=1){a<0?s.at(0,r):s.at(1,r),n.closestPointToPoint(r,!0,o);return}else{let u;a<0?u=s.start:u=s.end;let f;l<0?f=n.start:f=n.end;const I=i,h=t;if(s.closestPointToPoint(f,!0,i),n.closestPointToPoint(u,!0,t),I.distanceToSquared(f)<=h.distanceToSquared(u)){r.copy(I),o.copy(f);return}else{r.copy(u),o.copy(h);return}}}}(),ya=function(){const c=new W,i=new W,t=new Un,e=new pe;return function(n,r){const{radius:o,center:a}=n,{a:l,b:u,c:f}=r;if(e.start=l,e.end=u,e.closestPointToPoint(a,!0,c).distanceTo(a)<=o||(e.start=l,e.end=f,e.closestPointToPoint(a,!0,c).distanceTo(a)<=o)||(e.start=u,e.end=f,e.closestPointToPoint(a,!0,c).distanceTo(a)<=o))return!0;const E=r.getPlane(t);if(Math.abs(E.distanceToPoint(a))<=o){const p=E.projectPoint(a,i);if(r.containsPoint(p))return!0}return!1}}(),Pa=1e-15;function Js(c){return Math.abs(c)new W),this.satBounds=new Array(4).fill().map(()=>new me),this.points=[this.a,this.b,this.c],this.sphere=new Bs,this.plane=new Un,this.needsUpdate=!0}intersectsSphere(i){return ya(i,this)}update(){const i=this.a,t=this.b,e=this.c,s=this.points,n=this.satAxes,r=this.satBounds,o=n[0],a=r[0];this.getNormal(o),a.setFromPoints(o,s);const l=n[1],u=r[1];l.subVectors(i,t),u.setFromPoints(l,s);const f=n[2],I=r[2];f.subVectors(t,e),I.setFromPoints(f,s);const h=n[3],d=r[3];h.subVectors(e,i),d.setFromPoints(h,s),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,i),this.needsUpdate=!1}}ee.prototype.closestPointToSegment=function(){const c=new W,i=new W,t=new pe;return function(s,n=null,r=null){const{start:o,end:a}=s,l=this.points;let u,f=1/0;for(let I=0;I<3;I++){const h=(I+1)%3;t.start.copy(l[I]),t.end.copy(l[h]),jn(t,s,c,i),u=c.distanceToSquared(i),u=2){(R===1?p.start:p.end).copy(h),F=2;break}if(F++,F===2&&R===-1)break}}return F}return function(C,p=null,A=!1){this.needsUpdate&&this.update(),C.isExtendedTriangle?C.needsUpdate&&C.update():(c.copy(C),c.update(),C=c);const F=this.plane,R=C.plane;if(Math.abs(F.normal.dot(R.normal))>1-1e-10){const g=this.satBounds,N=this.satAxes;t[0]=C.a,t[1]=C.b,t[2]=C.c;for(let L=0;L<4;L++){const D=g[L],V=N[L];if(e.setFromPoints(V,t),D.isSeparated(e))return!1}const y=C.satBounds,w=C.satAxes;i[0]=this.a,i[1]=this.b,i[2]=this.c;for(let L=0;L<4;L++){const D=y[L],V=w[L];if(e.setFromPoints(V,i),D.isSeparated(e))return!1}for(let L=0;L<4;L++){const D=N[L];for(let V=0;V<4;V++){const O=w[V];if(n.crossVectors(D,O),e.setFromPoints(n,i),s.setFromPoints(n,t),e.isSeparated(s))return!1}}return p&&(A||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),p.start.set(0,0,0),p.end.set(0,0,0)),!0}else{const g=d(this,R,f);if(g===1&&C.containsPoint(f.end))return p&&(p.start.copy(f.end),p.end.copy(f.end)),!0;if(g!==2)return!1;const N=d(C,F,I);if(N===1&&this.containsPoint(I.end))return p&&(p.start.copy(I.end),p.end.copy(I.end)),!0;if(N!==2)return!1;if(f.delta(o),I.delta(a),o.dot(a)<0){let M=I.start;I.start=I.end,I.end=M}const y=f.start.dot(o),w=f.end.dot(o),L=I.start.dot(o),D=I.end.dot(o),V=w0?p.start.copy(f.start):p.start.copy(I.start),l.subVectors(f.end,I.end),l.dot(o)<0?p.end.copy(f.end):p.end.copy(I.end)),!0)}}}();ee.prototype.distanceToPoint=function(){const c=new W;return function(t){return this.closestPointToPoint(t,c),t.distanceTo(c)}}();ee.prototype.distanceToTriangle=function(){const c=new W,i=new W,t=["a","b","c"],e=new pe,s=new pe;return function(r,o=null,a=null){const l=o||a?e:null;if(this.intersectsTriangle(r,l))return(o||a)&&(o&&l.getCenter(o),a&&l.getCenter(a)),0;let u=1/0;for(let f=0;f<3;f++){let I;const h=t[f],d=r[h];this.closestPointToPoint(d,c),I=d.distanceToSquared(c),Inew W),this.satAxes=new Array(3).fill().map(()=>new W),this.satBounds=new Array(3).fill().map(()=>new me),this.alignedSatBounds=new Array(3).fill().map(()=>new me),this.needsUpdate=!1,i&&this.min.copy(i),t&&this.max.copy(t),e&&this.matrix.copy(e)}set(i,t,e){this.min.copy(i),this.max.copy(t),this.matrix.copy(e),this.needsUpdate=!0}copy(i){this.min.copy(i.min),this.max.copy(i.max),this.matrix.copy(i.matrix),this.needsUpdate=!0}}Bt.prototype.update=function(){return function(){const i=this.matrix,t=this.min,e=this.max,s=this.points;for(let l=0;l<=1;l++)for(let u=0;u<=1;u++)for(let f=0;f<=1;f++){const I=1*l|2*u|4*f,h=s[I];h.x=l?e.x:t.x,h.y=u?e.y:t.y,h.z=f?e.z:t.z,h.applyMatrix4(i)}const n=this.satBounds,r=this.satAxes,o=s[0];for(let l=0;l<3;l++){const u=r[l],f=n[l],I=1<new pe),t=new Array(12).fill().map(()=>new pe),e=new W,s=new W;return function(r,o=0,a=null,l=null){if(this.needsUpdate&&this.update(),this.intersectsBox(r))return(a||l)&&(r.getCenter(s),this.closestPointToPoint(s,e),r.closestPointToPoint(e,s),a&&a.copy(e),l&&l.copy(s)),0;const u=o*o,f=r.min,I=r.max,h=this.points;let d=1/0;for(let C=0;C<8;C++){const p=h[C];s.copy(p).clamp(f,I);const A=p.distanceToSquared(s);if(Anew ee)}}const Wt=new La;function Vt(c,i){return i[c+15]===65535}function Gt(c,i){return i[c+6]}function Xt(c,i){return i[c+14]}function $t(c){return c+8}function Zt(c,i){return i[c+6]}function ho(c,i){return i[c+7]}class _a{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const i=[];let t=null;this.setBuffer=e=>{t&&i.push(t),t=e,this.float32Array=new Float32Array(e),this.uint16Array=new Uint16Array(e),this.uint32Array=new Uint32Array(e)},this.clearBuffer=()=>{t=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,i.length!==0&&this.setBuffer(i.pop())}}}const Tt=new _a;let ye,Ke;const Be=[],$i=new qn(()=>new Lt);function Ma(c,i,t,e,s,n){ye=$i.getPrimitive(),Ke=$i.getPrimitive(),Be.push(ye,Ke),Tt.setBuffer(c._roots[i]);const r=pn(0,c.geometry,t,e,s,n);Tt.clearBuffer(),$i.releasePrimitive(ye),$i.releasePrimitive(Ke),Be.pop(),Be.pop();const o=Be.length;return o>0&&(Ke=Be[o-1],ye=Be[o-2]),r}function pn(c,i,t,e,s=null,n=0,r=0){const{float32Array:o,uint16Array:a,uint32Array:l}=Tt;let u=c*2;if(Vt(u,a)){const I=Gt(c,l),h=Xt(u,a);return Rt(c,o,ye),e(I,h,!1,r,n+c,ye)}else{let D=function(O){const{uint16Array:M,uint32Array:T}=Tt;let U=O*2;for(;!Vt(U,M);)O=$t(O),U=O*2;return Gt(O,T)},V=function(O){const{uint16Array:M,uint32Array:T}=Tt;let U=O*2;for(;!Vt(U,M);)O=Zt(O,T),U=O*2;return Gt(O,T)+Xt(U,M)};const I=$t(c),h=Zt(c,l);let d=I,E=h,C,p,A,F;if(s&&(A=ye,F=Ke,Rt(d,o,A),Rt(E,o,F),C=s(A),p=s(F),p(fi.copy(i).clamp(u.min,u.max),fi.distanceToSquared(i)),intersectsBounds:(u,f,I)=>I{u.closestPointToPoint(i,fi);const I=i.distanceToSquared(fi);return I0&&l.normal.multiplyScalar(-1));const u={a:n,b:r,c:o,normal:new W,materialIndex:0};Oi.getNormal(Ye,Ve,Ge,u.normal),l.face=u,l.faceIndex=n}return l}function Hs(c,i,t,e,s){const n=e*3;let r=n+0,o=n+1,a=n+2;const l=c.index;c.index&&(r=l.getX(r),o=l.getX(o),a=l.getX(a));const{position:u,normal:f,uv:I,uv1:h}=c.attributes,d=Ua(t,u,f,I,h,r,o,a,i);return d?(d.faceIndex=e,s&&s.push(d),d):null}function yt(c,i,t,e){const s=c.a,n=c.b,r=c.c;let o=i,a=i+1,l=i+2;t&&(o=t.getX(o),a=t.getX(a),l=t.getX(l)),s.x=e.getX(o),s.y=e.getY(o),s.z=e.getZ(o),n.x=e.getX(a),n.y=e.getY(a),n.z=e.getZ(a),r.x=e.getX(l),r.y=e.getY(l),r.z=e.getZ(l)}function ba(c,i,t,e,s,n){const{geometry:r,_indirectBuffer:o}=c;for(let a=e,l=e+s;aN&&(N=O),My&&(y=M),Tw&&(w=T)}return a[I+0]!==F||a[I+1]!==R||a[I+2]!==g||a[I+3]!==N||a[I+4]!==y||a[I+5]!==w?(a[I+0]=F,a[I+1]=R,a[I+2]=g,a[I+3]=N,a[I+4]=y,a[I+5]=w,!0):!1}else{const p=I+8,A=r[I+6],F=p+h,R=A+h;let g=d,N=!1,y=!1;i?g||(N=i.has(F),y=i.has(R),g=!N&&!y):(N=!0,y=!0);const w=g||N,L=g||y;let D=!1;w&&(D=f(p,h,g));let V=!1;L&&(V=f(A,h,g));const O=D||V;if(O)for(let M=0;M<3;M++){const T=p+M,U=A+M,Z=a[T],G=a[T+3],K=a[U],z=a[U+3];a[I+M]=Zz?G:z}return O}}}const Rr=new Lt;function _e(c,i,t,e){return Rt(c,i,Rr),t.intersectBox(Rr,e)}function Ya(c,i,t,e,s,n){const{geometry:r,_indirectBuffer:o}=c;for(let a=e,l=e+s;a=0;let h,d;I?(h=$t(c),d=Zt(c,r)):(h=Zt(c,r),d=$t(c));const C=_e(h,s,e,Fr)?Tn(h,i,t,e):null;if(C){const F=C.point[u];if(I?F<=s[d+l]:F>=s[d+l+3])return C}const A=_e(d,s,e,Fr)?Tn(d,i,t,e):null;return C&&A?C.distance<=A.distance?C:A:C||A||null}}const Ki=new Lt,ke=new ee,ze=new ee,hi=new Nt,gr=new Bt,Ji=new Bt;function Wa(c,i,t,e){Tt.setBuffer(c._roots[i]);const s=mn(0,c,t,e);return Tt.clearBuffer(),s}function mn(c,i,t,e,s=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Tt;let a=c*2;if(s===null&&(t.boundingBox||t.computeBoundingBox(),gr.set(t.boundingBox.min,t.boundingBox.max,e),s=gr),Vt(a,r)){const u=i.geometry,f=u.index,I=u.attributes.position,h=t.index,d=t.attributes.position,E=Gt(c,o),C=Xt(a,r);if(hi.copy(e).invert(),t.boundsTree)return Rt(c,n,Ji),Ji.matrix.copy(hi),Ji.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:A=>Ji.intersectsBox(A),intersectsTriangle:A=>{A.a.applyMatrix4(e),A.b.applyMatrix4(e),A.c.applyMatrix4(e),A.needsUpdate=!0;for(let F=E*3,R=(C+E)*3;Fen.distanceToBox(g),intersectsBounds:(g,N,y)=>y{if(i.boundsTree)return i.boundsTree.shapecast({boundsTraverseOrder:w=>Ii.distanceToBox(w),intersectsBounds:(w,L,D)=>D{for(let D=w,V=w+L;DN&&(N=T),Uy&&(y=U),Zw&&(w=Z)}}return a[I+0]!==F||a[I+1]!==R||a[I+2]!==g||a[I+3]!==N||a[I+4]!==y||a[I+5]!==w?(a[I+0]=F,a[I+1]=R,a[I+2]=g,a[I+3]=N,a[I+4]=y,a[I+5]=w,!0):!1}else{const p=I+8,A=r[I+6],F=p+h,R=A+h;let g=d,N=!1,y=!1;i?g||(N=i.has(F),y=i.has(R),g=!N&&!y):(N=!0,y=!0);const w=g||N,L=g||y;let D=!1;w&&(D=f(p,h,g));let V=!1;L&&(V=f(A,h,g));const O=D||V;if(O)for(let M=0;M<3;M++){const T=p+M,U=A+M,Z=a[T],G=a[T+3],K=a[U],z=a[U+3];a[I+M]=Zz?G:z}return O}}}const Sr=new W;function Ka(c,i,t,e,s){Tt.setBuffer(c._roots[i]),Rn(0,c,t,e,s),Tt.clearBuffer()}function Rn(c,i,t,e,s){const{float32Array:n,uint16Array:r,uint32Array:o}=Tt,a=c*2;if(Vt(a,r)){const u=Gt(c,o),f=Xt(a,r);Ya(i,t,e,u,f,s)}else{const u=$t(c);_e(u,n,e,Sr)&&Rn(u,i,t,e,s);const f=Zt(c,o);_e(f,n,e,Sr)&&Rn(f,i,t,e,s)}}const Or=new W,Ja=["x","y","z"];function tc(c,i,t,e){Tt.setBuffer(c._roots[i]);const s=An(0,c,t,e);return Tt.clearBuffer(),s}function An(c,i,t,e){const{float32Array:s,uint16Array:n,uint32Array:r}=Tt;let o=c*2;if(Vt(o,n)){const l=Gt(c,r),u=Xt(o,n);return Va(i,t,e,l,u)}else{const l=ho(c,r),u=Ja[l],I=e.direction[u]>=0;let h,d;I?(h=$t(c),d=Zt(c,r)):(h=Zt(c,r),d=$t(c));const C=_e(h,s,e,Or)?An(h,i,t,e):null;if(C){const F=C.point[u];if(I?F<=s[d+l]:F>=s[d+l+3])return C}const A=_e(d,s,e,Or)?An(d,i,t,e):null;return C&&A?C.distance<=A.distance?C:A:C||A||null}}const es=new Lt,He=new ee,We=new ee,Ei=new Nt,Nr=new Bt,is=new Bt;function ec(c,i,t,e){Tt.setBuffer(c._roots[i]);const s=Fn(0,c,t,e);return Tt.clearBuffer(),s}function Fn(c,i,t,e,s=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Tt;let a=c*2;if(s===null&&(t.boundingBox||t.computeBoundingBox(),Nr.set(t.boundingBox.min,t.boundingBox.max,e),s=Nr),Vt(a,r)){const u=i.geometry,f=u.index,I=u.attributes.position,h=t.index,d=t.attributes.position,E=Gt(c,o),C=Xt(a,r);if(Ei.copy(e).invert(),t.boundsTree)return Rt(c,n,is),is.matrix.copy(Ei),is.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:A=>is.intersectsBox(A),intersectsTriangle:A=>{A.a.applyMatrix4(e),A.b.applyMatrix4(e),A.c.applyMatrix4(e),A.needsUpdate=!0;for(let F=E,R=C+E;Fsn.distanceToBox(g),intersectsBounds:(g,N,y)=>y{if(i.boundsTree){const y=i.boundsTree;return y.shapecast({boundsTraverseOrder:w=>di.distanceToBox(w),intersectsBounds:(w,L,D)=>D{for(let D=w,V=w+L;Dnew Lt),Xe=new Lt,$e=new Lt,nn=new Lt,rn=new Lt;let on=!1;function cc(c,i,t,e){if(on)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");on=!0;const s=c._roots,n=i._roots;let r,o=0,a=0;const l=new Nt().copy(t).invert();for(let u=0,f=s.length;ua.slice()),index:r.array.slice(),indirectBuffer:n?n.slice():null}:o={roots:s,index:r.array,indirectBuffer:n},o}static deserialize(i,t,e={}){e={setIndex:!0,indirect:!!i.indirectBuffer,...e};const{index:s,roots:n,indirectBuffer:r}=i,o=new Qn(t,{...e,[Qs]:!0});if(o._roots=n,o._indirectBuffer=r||null,e.setIndex){const a=t.getIndex();if(a===null){const l=new Ui(i.index,1,!1);t.setIndex(l)}else a.array!==s&&(a.array.set(s),a.needsUpdate=!0)}return o}get indirect(){return!!this._indirectBuffer}constructor(i,t={}){if(i.isBufferGeometry){if(i.index&&i.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(t=Object.assign({strategy:lo,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,indirect:!1,[Qs]:!1},t),t.useSharedArrayBuffer&&!ac())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=i,this._roots=null,this._indirectBuffer=null,t[Qs]||(Oa(this,t),!i.boundingBox&&t.setBoundingBox&&(i.boundingBox=this.getBoundingBox(new Lt)));const{_indirectBuffer:e}=this;this.resolveTriangleIndex=t.indirect?s=>e[s]:s=>s}refit(i=null){return(this.indirect?Qa:Ba)(this,i)}traverse(i,t=0){const e=this._roots[t],s=new Uint32Array(e),n=new Uint16Array(e);r(0);function r(o,a=0){const l=o*2,u=n[l+15]===zs;if(u){const f=s[o+6],I=n[l+14];i(a,u,new Float32Array(e,o*4,6),f,I)}else{const f=o+ds/4,I=s[o+6],h=s[o+7];i(a,u,new Float32Array(e,o*4,6),h)||(r(f,a+1),r(I,a+1))}}}raycast(i,t=or){const e=this._roots,s=this.geometry,n=[],r=t.isMaterial,o=Array.isArray(t),a=s.groups,l=r?t.side:t,u=this.indirect?Ka:ka;for(let f=0,I=e.length;ff(I,h,d,E,C)?!0:e(I,h,this,o,d,E,t)}else r||(o?r=(f,I,h,d)=>e(f,I,this,o,h,d,t):r=(f,I,h)=>h);let a=!1,l=0;const u=this._roots;for(let f=0,I=u.length;f{const E=this.resolveTriangleIndex(d);yt(r,E*3,o,a)}:d=>{yt(r,d*3,o,a)},u=Wt.getPrimitive(),f=i.geometry.index,I=i.geometry.attributes.position,h=i.indirect?d=>{const E=i.resolveTriangleIndex(d);yt(u,E*3,f,I)}:d=>{yt(u,d*3,f,I)};if(n){const d=(E,C,p,A,F,R,g,N)=>{for(let y=p,w=p+A;yns.intersectsBox(e),intersectsTriangle:e=>ns.intersectsTriangle(e)})}intersectsSphere(i){return this.shapecast({intersectsBounds:t=>i.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(i)})}closestPointToGeometry(i,t,e={},s={},n=0,r=1/0){return(this.indirect?oc:qa)(this,i,t,e,s,n,r)}closestPointToPoint(i,t={},e=0,s=1/0){return wa(this,i,t,e,s)}getBoundingBox(i){return i.makeEmpty(),this._roots.forEach(e=>{Rt(0,new Float32Array(e),yr),i.union(yr)}),i}}function Pr(c,i,t){return c===null||(c.point.applyMatrix4(i.matrixWorld),c.distance=c.point.distanceTo(t.ray.origin),c.object=i,c.distancet.far)?null:c}const an=new Mo,Lr=new Nt,lc=it.prototype.raycast;function uc(c,i){if(this.geometry.boundsTree){if(this.material===void 0)return;Lr.copy(this.matrixWorld).invert(),an.copy(c.ray).applyMatrix4(Lr);const t=this.geometry.boundsTree;if(c.firstHitOnly===!0){const e=Pr(t.raycastFirst(an,this.material),this,c);e&&i.push(e)}else{const e=t.raycast(an,this.material);for(let s=0,n=e.length;s{const t=this.handlers.slice(0);for(const e of t)e(i)});S(this,"handlers",[])}add(i){this.handlers.push(i)}remove(i){this.handlers=this.handlers.filter(t=>t!==i)}reset(){this.handlers.length=0}}class Ic{constructor(){S(this,"trigger",async i=>{const t=this.handlers.slice(0);for(const e of t)await e(i)});S(this,"handlers",[])}add(i){this.handlers.push(i)}remove(i){this.handlers=this.handlers.filter(t=>t!==i)}reset(){this.handlers.length=0}}class Kn{constructor(i){S(this,"isDisposeable",()=>"dispose"in this&&"onDisposed"in this);S(this,"isResizeable",()=>"resize"in this&&"getSize"in this);S(this,"isUpdateable",()=>"onAfterUpdate"in this&&"onBeforeUpdate"in this&&"update"in this);S(this,"isHideable",()=>"visible"in this);S(this,"isConfigurable",()=>"setup"in this&&"config"in this&&"onSetup"in this);this.components=i}}class Mt extends Kn{}class Ec extends Kn{constructor(t){super(t);S(this,"worlds",new Map);S(this,"onWorldChanged",new tt);S(this,"currentWorld",null);this.onWorldChanged.add(({world:e,action:s})=>{s==="removed"&&this.worlds.delete(e.uuid)})}}class dc extends Ec{constructor(){super(...arguments);S(this,"hasCameraControls",()=>"controls"in this)}}const Li=class Li extends Mt{constructor(t){super(t);S(this,"_disposedComponents",new Set);S(this,"enabled",!0);t.add(Li.uuid,this)}get(){return this._disposedComponents}destroy(t,e=!0,s=!0){t.removeFromParent();const n=t;n.dispose&&n.dispose(),this.disposeGeometryAndMaterials(t,e),s&&n.children&&n.children.length&&this.disposeChildren(n),t.children.length=0}disposeGeometry(t){t.boundsTree&&t.disposeBoundsTree&&t.disposeBoundsTree(),t.dispose()}disposeGeometryAndMaterials(t,e){const s=t;s.geometry&&this.disposeGeometry(s.geometry),e&&s.material&&Li.disposeMaterial(s),s.material=[],s.geometry=null}disposeChildren(t){for(const e of t.children)this.destroy(e)}static disposeMaterial(t){if(t.material)if(Array.isArray(t.material))for(const e of t.material)e.dispose();else t.material.dispose()}};S(Li,"uuid","76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe");let ni=Li;class Pe extends Set{constructor(t){super(t);S(this,"onItemAdded",new tt);S(this,"onItemDeleted",new tt);S(this,"onCleared",new tt);S(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}add(...t){for(const e of t)this.has(e)||!this.guard(e)||(super.add(e),this.onItemAdded||(this.onItemAdded=new tt),this.onItemAdded.trigger(e));return this}delete(t){const e=super.delete(t);return e&&this.onItemDeleted.trigger(),e}dispose(){this.clear(),this.onItemAdded.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class ie extends Map{constructor(t){super(t);S(this,"onItemSet",new tt);S(this,"onItemUpdated",new tt);S(this,"onItemDeleted",new tt);S(this,"onCleared",new tt);S(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}set(t,e){const s=this.has(t);if(!(this.guard??(()=>!0))(t,e))return this;const o=super.set(t,e);return s?(this.onItemUpdated||(this.onItemUpdated=new tt),this.onItemUpdated.trigger({key:t,value:e})):(this.onItemSet||(this.onItemSet=new tt),this.onItemSet.trigger({key:t,value:e})),o}delete(t){const e=super.delete(t);return e&&this.onItemDeleted.trigger(t),e}dispose(){this.clear(),this.onItemSet.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class _r{static isTransparent(i){return i.transparent&&i.opacity<1}}const St=class St{static create(){const i=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,s=Math.random()*4294967295|0;return`${St._lut[i&255]+St._lut[i>>8&255]+St._lut[i>>16&255]+St._lut[i>>24&255]}-${St._lut[t&255]}${St._lut[t>>8&255]}-${St._lut[t>>16&15|64]}${St._lut[t>>24&255]}-${St._lut[e&63|128]}${St._lut[e>>8&255]}-${St._lut[e>>16&255]}${St._lut[e>>24&255]}${St._lut[s&255]}${St._lut[s>>8&255]}${St._lut[s>>16&255]}${St._lut[s>>24&255]}`.toLowerCase()}static validate(i){if(!St._pattern.test(i))throw new Error(`${i} is not a valid UUID v4. +var Lo=Object.defineProperty;var _o=(c,i,t)=>i in c?Lo(c,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[i]=t;var S=(c,i,t)=>(_o(c,typeof i!="symbol"?i+"":i,t),t);import{o as Ui,V as H,t as vn,u as pe,p as Le,T as Oi,S as Vs,n as Nt,v as Lt,x as Mo,y as Gs,z as cr,E as wo,a as it,w as Do,q as bi,C as Bi,Q as xn,P as io,U as Uo,N as Bn,X as bo,Y as Jt,Z as vo,_ as xo,W as so,H as Bo,J as Yo,b as si,s as Ts,K as qs,O as ms,L as no,a1 as vt,B as Dt,a2 as lr,a3 as zi,a4 as Re,a5 as li,a6 as Vo,a7 as Go,$ as ro,a8 as ko,ah as ks,ap as Yn,aq as Vn,ar as Gn,as as Yi,at as kn,au as zn,ag as zs,av as Hn,aw as Wn,ax as Xn,ay as $n,az as Zn,aA as jn,aB as qn,aD as le,e as Es,d as ei,f as zo,ac as Vi,ad as Ho,ak as Wo,al as Xo,am as $o,ai as Zo,aj as jo,I as oo,a9 as ao,aa as co,ab as lo,aG as qo,aH as Qo,aI as Ko,aJ as Jo,ae as ur,af as fr,an as ta,aC as ds,aK as ea,aE as Se,aF as ia,ao as sa,aL as na,aO as ra,aM as Rs,g as Ie,aR as xe,aS as oa,aT as aa,aU as hr,aV as Ir}from"./web-ifc-api-nU1-R_1k.js";import{c as Hi,g as ca}from"./_commonjsHelpers-Cpj98o6Y.js";const uo=0,la=1,ua=2,Er=2,Qs=1.25,dr=1,ps=6*4+4+4,Hs=65535,fa=Math.pow(2,-24),Ks=Symbol("SKIP_GENERATION");function ha(c){return c.index?c.index.count:c.attributes.position.count}function ri(c){return ha(c)/3}function Ia(c,i=ArrayBuffer){return c>65535?new Uint32Array(new i(4*c)):new Uint16Array(new i(2*c))}function Ea(c,i){if(!c.index){const t=c.attributes.position.count,e=i.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,s=Ia(t,e);c.setIndex(new Ui(s,1));for(let n=0;no-a);for(let o=0;on.offset-r.offset),e=t[t.length-1];e.count=Math.min(i-e.offset,e.count);let s=0;return t.forEach(({count:n})=>s+=n),i!==s}function Rt(c,i,t){return t.min.x=i[c],t.min.y=i[c+1],t.min.z=i[c+2],t.max.x=i[c+3],t.max.y=i[c+4],t.max.z=i[c+5],t}function pa(c){c[0]=c[1]=c[2]=1/0,c[3]=c[4]=c[5]=-1/0}function pr(c){let i=-1,t=-1/0;for(let e=0;e<3;e++){const s=c[e+3]-c[e];s>t&&(t=s,i=e)}return i}function Cr(c,i){i.set(c)}function Tr(c,i,t){let e,s;for(let n=0;n<3;n++){const r=n+3;e=c[n],s=i[n],t[n]=es?e:s}}function Wi(c,i,t){for(let e=0;e<3;e++){const s=i[c+2*e],n=i[c+2*e+1],r=s-n,o=s+n;rt[e+3]&&(t[e+3]=o)}}function ui(c){const i=c[3]-c[0],t=c[4]-c[1],e=c[5]-c[2];return 2*(i*t+t*e+e*i)}function Js(c,i,t,e,s=null){let n=1/0,r=1/0,o=1/0,a=-1/0,l=-1/0,u=-1/0,f=1/0,I=1/0,h=1/0,d=-1/0,E=-1/0,C=-1/0;const p=s!==null;for(let A=i*6,F=(i+t)*6;Aa&&(a=y),p&&Rd&&(d=R);const w=c[A+2],L=c[A+3],D=w-L,V=w+L;Dl&&(l=V),p&&wE&&(E=w);const O=c[A+4],M=c[A+5],T=O-M,U=O+M;Tu&&(u=U),p&&OC&&(C=O)}e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=l,e[5]=u,p&&(s[0]=f,s[1]=I,s[2]=h,s[3]=d,s[4]=E,s[5]=C)}function Ca(c,i,t,e){let s=1/0,n=1/0,r=1/0,o=-1/0,a=-1/0,l=-1/0;for(let u=i*6,f=(i+t)*6;uo&&(o=I);const h=c[u+2];ha&&(a=h);const d=c[u+4];dl&&(l=d)}e[0]=s,e[1]=n,e[2]=r,e[3]=o,e[4]=a,e[5]=l}function Ta(c,i){pa(i);const t=c.attributes.position,e=c.index?c.index.array:null,s=ri(c),n=new Float32Array(s*6),r=t.normalized,o=t.array,a=t.offset||0;let l=3;t.isInterleavedBufferAttribute&&(l=t.data.stride);const u=["getX","getY","getZ"];for(let f=0;fN&&(N=F),R>N&&(N=R);const y=(N-g)/2,w=p*2;n[h+w+0]=g+y,n[h+w+1]=y+(Math.abs(g)+y)*fa,gi[p+3]&&(i[p+3]=N)}}return n}const Ee=32,ma=(c,i)=>c.candidate-i.candidate,Ae=new Array(Ee).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),Xi=new Float32Array(6);function Ra(c,i,t,e,s,n){let r=-1,o=0;if(n===uo)r=pr(i),r!==-1&&(o=(i[r]+i[r+3])/2);else if(n===la)r=pr(c),r!==-1&&(o=Aa(t,e,s,r));else if(n===ua){const a=ui(c);let l=Qs*s;const u=e*6,f=(e+s)*6;for(let I=0;I<3;I++){const h=i[I],C=(i[I+3]-h)/Ee;if(s=y.candidate?Wi(R,t,y.rightCacheBounds):(Wi(R,t,y.leftCacheBounds),y.count++)}}for(let R=0;R=Ee&&(N=Ee-1);const y=Ae[N];y.count++,Wi(F,t,y.bounds)}const p=Ae[Ee-1];Cr(p.bounds,p.rightCacheBounds);for(let F=Ee-2;F>=0;F--){const R=Ae[F],g=Ae[F+1];Tr(R.bounds,g.rightCacheBounds,R.rightCacheBounds)}let A=0;for(let F=0;F=a;)o--;if(r=a;)o--;if(r2**16,s=e?4:2,n=i?new SharedArrayBuffer(t*s):new ArrayBuffer(t*s),r=e?new Uint32Array(n):new Uint16Array(n);for(let o=0,a=r.length;o=s&&(f=!0,n&&(console.warn(`MeshBVH: Max depth of ${s} reached when generating BVH. Consider increasing maxDepth.`),console.warn(t))),N<=r||w>=s)return A(g+N),R.offset=g,R.count=N,R;const L=Ra(R.boundingData,y,d,g,N,o);if(L.axis===-1)return A(g+N),R.offset=g,R.count=N,R;const D=E(u,e,d,g,N,L);if(D===g||D===g+N)A(g+N),R.offset=g,R.count=N;else{R.splitAxis=L.axis;const V=new $i,O=g,M=D-g;R.left=V,V.boundingData=new Float32Array(6),Js(d,O,M,V.boundingData,h),F(V,O,M,h,w+1);const T=new $i,U=D,Z=N-M;R.right=T,T.boundingData=new Float32Array(6),Js(d,U,Z,T.boundingData,h),F(T,U,Z,h,w+1)}return R}}function Na(c,i){const t=c.geometry;i.indirect&&(c._indirectBuffer=Sa(t,i.useSharedArrayBuffer),da(t)&&!i.verbose&&console.warn('MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),c._indirectBuffer||Ea(t,i);const e=Oa(c,i);let s,n,r;const o=[],a=i.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let f=0;fMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return n[h+6]=R/4,R=u(R,A),n[h+7]=F,R}}}class me{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(i,t){let e=1/0,s=-1/0;for(let n=0,r=i.length;ns?a:s}this.min=e,this.max=s}setFromPoints(i,t){let e=1/0,s=-1/0;for(let n=0,r=t.length;ns?a:s}this.min=e,this.max=s}isSeparated(i){return this.min>i.max||i.min>this.max}}me.prototype.setFromBox=function(){const c=new H;return function(t,e){const s=e.min,n=e.max;let r=1/0,o=-1/0;for(let a=0;a<=1;a++)for(let l=0;l<=1;l++)for(let u=0;u<=1;u++){c.x=s.x*a+n.x*(1-a),c.y=s.y*l+n.y*(1-l),c.z=s.z*u+n.z*(1-u);const f=t.dot(c);r=Math.min(f,r),o=Math.max(f,o)}this.min=r,this.max=o}}();const ya=function(){const c=new H,i=new H,t=new H;return function(s,n,r){const o=s.start,a=c,l=n.start,u=i;t.subVectors(o,l),c.subVectors(s.end,s.start),i.subVectors(n.end,n.start);const f=t.dot(u),I=u.dot(a),h=u.dot(u),d=t.dot(a),C=a.dot(a)*h-I*I;let p,A;C!==0?p=(f*I-d*h)/C:p=0,A=(f+p*I)/h,r.x=p,r.y=A}}(),Qn=function(){const c=new Le,i=new H,t=new H;return function(s,n,r,o){ya(s,n,c);let a=c.x,l=c.y;if(a>=0&&a<=1&&l>=0&&l<=1){s.at(a,r),n.at(l,o);return}else if(a>=0&&a<=1){l<0?n.at(0,o):n.at(1,o),s.closestPointToPoint(o,!0,r);return}else if(l>=0&&l<=1){a<0?s.at(0,r):s.at(1,r),n.closestPointToPoint(r,!0,o);return}else{let u;a<0?u=s.start:u=s.end;let f;l<0?f=n.start:f=n.end;const I=i,h=t;if(s.closestPointToPoint(f,!0,i),n.closestPointToPoint(u,!0,t),I.distanceToSquared(f)<=h.distanceToSquared(u)){r.copy(I),o.copy(f);return}else{r.copy(u),o.copy(h);return}}}}(),Pa=function(){const c=new H,i=new H,t=new vn,e=new pe;return function(n,r){const{radius:o,center:a}=n,{a:l,b:u,c:f}=r;if(e.start=l,e.end=u,e.closestPointToPoint(a,!0,c).distanceTo(a)<=o||(e.start=l,e.end=f,e.closestPointToPoint(a,!0,c).distanceTo(a)<=o)||(e.start=u,e.end=f,e.closestPointToPoint(a,!0,c).distanceTo(a)<=o))return!0;const E=r.getPlane(t);if(Math.abs(E.distanceToPoint(a))<=o){const p=E.projectPoint(a,i);if(r.containsPoint(p))return!0}return!1}}(),La=1e-15;function tn(c){return Math.abs(c)new H),this.satBounds=new Array(4).fill().map(()=>new me),this.points=[this.a,this.b,this.c],this.sphere=new Vs,this.plane=new vn,this.needsUpdate=!0}intersectsSphere(i){return Pa(i,this)}update(){const i=this.a,t=this.b,e=this.c,s=this.points,n=this.satAxes,r=this.satBounds,o=n[0],a=r[0];this.getNormal(o),a.setFromPoints(o,s);const l=n[1],u=r[1];l.subVectors(i,t),u.setFromPoints(l,s);const f=n[2],I=r[2];f.subVectors(t,e),I.setFromPoints(f,s);const h=n[3],d=r[3];h.subVectors(e,i),d.setFromPoints(h,s),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,i),this.needsUpdate=!1}}ee.prototype.closestPointToSegment=function(){const c=new H,i=new H,t=new pe;return function(s,n=null,r=null){const{start:o,end:a}=s,l=this.points;let u,f=1/0;for(let I=0;I<3;I++){const h=(I+1)%3;t.start.copy(l[I]),t.end.copy(l[h]),Qn(t,s,c,i),u=c.distanceToSquared(i),u=2){(R===1?p.start:p.end).copy(h),F=2;break}if(F++,F===2&&R===-1)break}}return F}return function(C,p=null,A=!1){this.needsUpdate&&this.update(),C.isExtendedTriangle?C.needsUpdate&&C.update():(c.copy(C),c.update(),C=c);const F=this.plane,R=C.plane;if(Math.abs(F.normal.dot(R.normal))>1-1e-10){const g=this.satBounds,N=this.satAxes;t[0]=C.a,t[1]=C.b,t[2]=C.c;for(let L=0;L<4;L++){const D=g[L],V=N[L];if(e.setFromPoints(V,t),D.isSeparated(e))return!1}const y=C.satBounds,w=C.satAxes;i[0]=this.a,i[1]=this.b,i[2]=this.c;for(let L=0;L<4;L++){const D=y[L],V=w[L];if(e.setFromPoints(V,i),D.isSeparated(e))return!1}for(let L=0;L<4;L++){const D=N[L];for(let V=0;V<4;V++){const O=w[V];if(n.crossVectors(D,O),e.setFromPoints(n,i),s.setFromPoints(n,t),e.isSeparated(s))return!1}}return p&&(A||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),p.start.set(0,0,0),p.end.set(0,0,0)),!0}else{const g=d(this,R,f);if(g===1&&C.containsPoint(f.end))return p&&(p.start.copy(f.end),p.end.copy(f.end)),!0;if(g!==2)return!1;const N=d(C,F,I);if(N===1&&this.containsPoint(I.end))return p&&(p.start.copy(I.end),p.end.copy(I.end)),!0;if(N!==2)return!1;if(f.delta(o),I.delta(a),o.dot(a)<0){let M=I.start;I.start=I.end,I.end=M}const y=f.start.dot(o),w=f.end.dot(o),L=I.start.dot(o),D=I.end.dot(o),V=w0?p.start.copy(f.start):p.start.copy(I.start),l.subVectors(f.end,I.end),l.dot(o)<0?p.end.copy(f.end):p.end.copy(I.end)),!0)}}}();ee.prototype.distanceToPoint=function(){const c=new H;return function(t){return this.closestPointToPoint(t,c),t.distanceTo(c)}}();ee.prototype.distanceToTriangle=function(){const c=new H,i=new H,t=["a","b","c"],e=new pe,s=new pe;return function(r,o=null,a=null){const l=o||a?e:null;if(this.intersectsTriangle(r,l))return(o||a)&&(o&&l.getCenter(o),a&&l.getCenter(a)),0;let u=1/0;for(let f=0;f<3;f++){let I;const h=t[f],d=r[h];this.closestPointToPoint(d,c),I=d.distanceToSquared(c),Inew H),this.satAxes=new Array(3).fill().map(()=>new H),this.satBounds=new Array(3).fill().map(()=>new me),this.alignedSatBounds=new Array(3).fill().map(()=>new me),this.needsUpdate=!1,i&&this.min.copy(i),t&&this.max.copy(t),e&&this.matrix.copy(e)}set(i,t,e){this.min.copy(i),this.max.copy(t),this.matrix.copy(e),this.needsUpdate=!0}copy(i){this.min.copy(i.min),this.max.copy(i.max),this.matrix.copy(i.matrix),this.needsUpdate=!0}}Bt.prototype.update=function(){return function(){const i=this.matrix,t=this.min,e=this.max,s=this.points;for(let l=0;l<=1;l++)for(let u=0;u<=1;u++)for(let f=0;f<=1;f++){const I=1*l|2*u|4*f,h=s[I];h.x=l?e.x:t.x,h.y=u?e.y:t.y,h.z=f?e.z:t.z,h.applyMatrix4(i)}const n=this.satBounds,r=this.satAxes,o=s[0];for(let l=0;l<3;l++){const u=r[l],f=n[l],I=1<new pe),t=new Array(12).fill().map(()=>new pe),e=new H,s=new H;return function(r,o=0,a=null,l=null){if(this.needsUpdate&&this.update(),this.intersectsBox(r))return(a||l)&&(r.getCenter(s),this.closestPointToPoint(s,e),r.closestPointToPoint(e,s),a&&a.copy(e),l&&l.copy(s)),0;const u=o*o,f=r.min,I=r.max,h=this.points;let d=1/0;for(let C=0;C<8;C++){const p=h[C];s.copy(p).clamp(f,I);const A=p.distanceToSquared(s);if(Anew ee)}}const Wt=new _a;function Vt(c,i){return i[c+15]===65535}function Gt(c,i){return i[c+6]}function Xt(c,i){return i[c+14]}function $t(c){return c+8}function Zt(c,i){return i[c+6]}function Io(c,i){return i[c+7]}class Ma{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const i=[];let t=null;this.setBuffer=e=>{t&&i.push(t),t=e,this.float32Array=new Float32Array(e),this.uint16Array=new Uint16Array(e),this.uint32Array=new Uint32Array(e)},this.clearBuffer=()=>{t=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,i.length!==0&&this.setBuffer(i.pop())}}}const Tt=new Ma;let ye,Ke;const Be=[],Zi=new Kn(()=>new Lt);function wa(c,i,t,e,s,n){ye=Zi.getPrimitive(),Ke=Zi.getPrimitive(),Be.push(ye,Ke),Tt.setBuffer(c._roots[i]);const r=Tn(0,c.geometry,t,e,s,n);Tt.clearBuffer(),Zi.releasePrimitive(ye),Zi.releasePrimitive(Ke),Be.pop(),Be.pop();const o=Be.length;return o>0&&(Ke=Be[o-1],ye=Be[o-2]),r}function Tn(c,i,t,e,s=null,n=0,r=0){const{float32Array:o,uint16Array:a,uint32Array:l}=Tt;let u=c*2;if(Vt(u,a)){const I=Gt(c,l),h=Xt(u,a);return Rt(c,o,ye),e(I,h,!1,r,n+c,ye)}else{let D=function(O){const{uint16Array:M,uint32Array:T}=Tt;let U=O*2;for(;!Vt(U,M);)O=$t(O),U=O*2;return Gt(O,T)},V=function(O){const{uint16Array:M,uint32Array:T}=Tt;let U=O*2;for(;!Vt(U,M);)O=Zt(O,T),U=O*2;return Gt(O,T)+Xt(U,M)};const I=$t(c),h=Zt(c,l);let d=I,E=h,C,p,A,F;if(s&&(A=ye,F=Ke,Rt(d,o,A),Rt(E,o,F),C=s(A),p=s(F),p(fi.copy(i).clamp(u.min,u.max),fi.distanceToSquared(i)),intersectsBounds:(u,f,I)=>I{u.closestPointToPoint(i,fi);const I=i.distanceToSquared(fi);return I0&&l.normal.multiplyScalar(-1));const u={a:n,b:r,c:o,normal:new H,materialIndex:0};Oi.getNormal(Ye,Ve,Ge,u.normal),l.face=u,l.faceIndex=n}return l}function Ws(c,i,t,e,s){const n=e*3;let r=n+0,o=n+1,a=n+2;const l=c.index;c.index&&(r=l.getX(r),o=l.getX(o),a=l.getX(a));const{position:u,normal:f,uv:I,uv1:h}=c.attributes,d=ba(t,u,f,I,h,r,o,a,i);return d?(d.faceIndex=e,s&&s.push(d),d):null}function yt(c,i,t,e){const s=c.a,n=c.b,r=c.c;let o=i,a=i+1,l=i+2;t&&(o=t.getX(o),a=t.getX(a),l=t.getX(l)),s.x=e.getX(o),s.y=e.getY(o),s.z=e.getZ(o),n.x=e.getX(a),n.y=e.getY(a),n.z=e.getZ(a),r.x=e.getX(l),r.y=e.getY(l),r.z=e.getZ(l)}function va(c,i,t,e,s,n){const{geometry:r,_indirectBuffer:o}=c;for(let a=e,l=e+s;aN&&(N=O),My&&(y=M),Tw&&(w=T)}return a[I+0]!==F||a[I+1]!==R||a[I+2]!==g||a[I+3]!==N||a[I+4]!==y||a[I+5]!==w?(a[I+0]=F,a[I+1]=R,a[I+2]=g,a[I+3]=N,a[I+4]=y,a[I+5]=w,!0):!1}else{const p=I+8,A=r[I+6],F=p+h,R=A+h;let g=d,N=!1,y=!1;i?g||(N=i.has(F),y=i.has(R),g=!N&&!y):(N=!0,y=!0);const w=g||N,L=g||y;let D=!1;w&&(D=f(p,h,g));let V=!1;L&&(V=f(A,h,g));const O=D||V;if(O)for(let M=0;M<3;M++){const T=p+M,U=A+M,Z=a[T],G=a[T+3],K=a[U],z=a[U+3];a[I+M]=Zz?G:z}return O}}}const Fr=new Lt;function _e(c,i,t,e){return Rt(c,i,Fr),t.intersectBox(Fr,e)}function Va(c,i,t,e,s,n){const{geometry:r,_indirectBuffer:o}=c;for(let a=e,l=e+s;a=0;let h,d;I?(h=$t(c),d=Zt(c,r)):(h=Zt(c,r),d=$t(c));const C=_e(h,s,e,Sr)?Rn(h,i,t,e):null;if(C){const F=C.point[u];if(I?F<=s[d+l]:F>=s[d+l+3])return C}const A=_e(d,s,e,Sr)?Rn(d,i,t,e):null;return C&&A?C.distance<=A.distance?C:A:C||A||null}}const Ji=new Lt,ke=new ee,ze=new ee,hi=new Nt,Or=new Bt,ts=new Bt;function Xa(c,i,t,e){Tt.setBuffer(c._roots[i]);const s=An(0,c,t,e);return Tt.clearBuffer(),s}function An(c,i,t,e,s=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Tt;let a=c*2;if(s===null&&(t.boundingBox||t.computeBoundingBox(),Or.set(t.boundingBox.min,t.boundingBox.max,e),s=Or),Vt(a,r)){const u=i.geometry,f=u.index,I=u.attributes.position,h=t.index,d=t.attributes.position,E=Gt(c,o),C=Xt(a,r);if(hi.copy(e).invert(),t.boundsTree)return Rt(c,n,ts),ts.matrix.copy(hi),ts.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:A=>ts.intersectsBox(A),intersectsTriangle:A=>{A.a.applyMatrix4(e),A.b.applyMatrix4(e),A.c.applyMatrix4(e),A.needsUpdate=!0;for(let F=E*3,R=(C+E)*3;Fsn.distanceToBox(g),intersectsBounds:(g,N,y)=>y{if(i.boundsTree)return i.boundsTree.shapecast({boundsTraverseOrder:w=>Ii.distanceToBox(w),intersectsBounds:(w,L,D)=>D{for(let D=w,V=w+L;DN&&(N=T),Uy&&(y=U),Zw&&(w=Z)}}return a[I+0]!==F||a[I+1]!==R||a[I+2]!==g||a[I+3]!==N||a[I+4]!==y||a[I+5]!==w?(a[I+0]=F,a[I+1]=R,a[I+2]=g,a[I+3]=N,a[I+4]=y,a[I+5]=w,!0):!1}else{const p=I+8,A=r[I+6],F=p+h,R=A+h;let g=d,N=!1,y=!1;i?g||(N=i.has(F),y=i.has(R),g=!N&&!y):(N=!0,y=!0);const w=g||N,L=g||y;let D=!1;w&&(D=f(p,h,g));let V=!1;L&&(V=f(A,h,g));const O=D||V;if(O)for(let M=0;M<3;M++){const T=p+M,U=A+M,Z=a[T],G=a[T+3],K=a[U],z=a[U+3];a[I+M]=Zz?G:z}return O}}}const Nr=new H;function Ja(c,i,t,e,s){Tt.setBuffer(c._roots[i]),Fn(0,c,t,e,s),Tt.clearBuffer()}function Fn(c,i,t,e,s){const{float32Array:n,uint16Array:r,uint32Array:o}=Tt,a=c*2;if(Vt(a,r)){const u=Gt(c,o),f=Xt(a,r);Va(i,t,e,u,f,s)}else{const u=$t(c);_e(u,n,e,Nr)&&Fn(u,i,t,e,s);const f=Zt(c,o);_e(f,n,e,Nr)&&Fn(f,i,t,e,s)}}const yr=new H,tc=["x","y","z"];function ec(c,i,t,e){Tt.setBuffer(c._roots[i]);const s=gn(0,c,t,e);return Tt.clearBuffer(),s}function gn(c,i,t,e){const{float32Array:s,uint16Array:n,uint32Array:r}=Tt;let o=c*2;if(Vt(o,n)){const l=Gt(c,r),u=Xt(o,n);return Ga(i,t,e,l,u)}else{const l=Io(c,r),u=tc[l],I=e.direction[u]>=0;let h,d;I?(h=$t(c),d=Zt(c,r)):(h=Zt(c,r),d=$t(c));const C=_e(h,s,e,yr)?gn(h,i,t,e):null;if(C){const F=C.point[u];if(I?F<=s[d+l]:F>=s[d+l+3])return C}const A=_e(d,s,e,yr)?gn(d,i,t,e):null;return C&&A?C.distance<=A.distance?C:A:C||A||null}}const is=new Lt,He=new ee,We=new ee,Ei=new Nt,Pr=new Bt,ss=new Bt;function ic(c,i,t,e){Tt.setBuffer(c._roots[i]);const s=Sn(0,c,t,e);return Tt.clearBuffer(),s}function Sn(c,i,t,e,s=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Tt;let a=c*2;if(s===null&&(t.boundingBox||t.computeBoundingBox(),Pr.set(t.boundingBox.min,t.boundingBox.max,e),s=Pr),Vt(a,r)){const u=i.geometry,f=u.index,I=u.attributes.position,h=t.index,d=t.attributes.position,E=Gt(c,o),C=Xt(a,r);if(Ei.copy(e).invert(),t.boundsTree)return Rt(c,n,ss),ss.matrix.copy(Ei),ss.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:A=>ss.intersectsBox(A),intersectsTriangle:A=>{A.a.applyMatrix4(e),A.b.applyMatrix4(e),A.c.applyMatrix4(e),A.needsUpdate=!0;for(let F=E,R=C+E;Fnn.distanceToBox(g),intersectsBounds:(g,N,y)=>y{if(i.boundsTree){const y=i.boundsTree;return y.shapecast({boundsTraverseOrder:w=>di.distanceToBox(w),intersectsBounds:(w,L,D)=>D{for(let D=w,V=w+L;Dnew Lt),Xe=new Lt,$e=new Lt,rn=new Lt,on=new Lt;let an=!1;function lc(c,i,t,e){if(an)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");an=!0;const s=c._roots,n=i._roots;let r,o=0,a=0;const l=new Nt().copy(t).invert();for(let u=0,f=s.length;ua.slice()),index:r.array.slice(),indirectBuffer:n?n.slice():null}:o={roots:s,index:r.array,indirectBuffer:n},o}static deserialize(i,t,e={}){e={setIndex:!0,indirect:!!i.indirectBuffer,...e};const{index:s,roots:n,indirectBuffer:r}=i,o=new Jn(t,{...e,[Ks]:!0});if(o._roots=n,o._indirectBuffer=r||null,e.setIndex){const a=t.getIndex();if(a===null){const l=new Ui(i.index,1,!1);t.setIndex(l)}else a.array!==s&&(a.array.set(s),a.needsUpdate=!0)}return o}get indirect(){return!!this._indirectBuffer}constructor(i,t={}){if(i.isBufferGeometry){if(i.index&&i.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(t=Object.assign({strategy:uo,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,indirect:!1,[Ks]:!1},t),t.useSharedArrayBuffer&&!cc())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=i,this._roots=null,this._indirectBuffer=null,t[Ks]||(Na(this,t),!i.boundingBox&&t.setBoundingBox&&(i.boundingBox=this.getBoundingBox(new Lt)));const{_indirectBuffer:e}=this;this.resolveTriangleIndex=t.indirect?s=>e[s]:s=>s}refit(i=null){return(this.indirect?Ka:Ya)(this,i)}traverse(i,t=0){const e=this._roots[t],s=new Uint32Array(e),n=new Uint16Array(e);r(0);function r(o,a=0){const l=o*2,u=n[l+15]===Hs;if(u){const f=s[o+6],I=n[l+14];i(a,u,new Float32Array(e,o*4,6),f,I)}else{const f=o+ps/4,I=s[o+6],h=s[o+7];i(a,u,new Float32Array(e,o*4,6),h)||(r(f,a+1),r(I,a+1))}}}raycast(i,t=cr){const e=this._roots,s=this.geometry,n=[],r=t.isMaterial,o=Array.isArray(t),a=s.groups,l=r?t.side:t,u=this.indirect?Ja:za;for(let f=0,I=e.length;ff(I,h,d,E,C)?!0:e(I,h,this,o,d,E,t)}else r||(o?r=(f,I,h,d)=>e(f,I,this,o,h,d,t):r=(f,I,h)=>h);let a=!1,l=0;const u=this._roots;for(let f=0,I=u.length;f{const E=this.resolveTriangleIndex(d);yt(r,E*3,o,a)}:d=>{yt(r,d*3,o,a)},u=Wt.getPrimitive(),f=i.geometry.index,I=i.geometry.attributes.position,h=i.indirect?d=>{const E=i.resolveTriangleIndex(d);yt(u,E*3,f,I)}:d=>{yt(u,d*3,f,I)};if(n){const d=(E,C,p,A,F,R,g,N)=>{for(let y=p,w=p+A;yrs.intersectsBox(e),intersectsTriangle:e=>rs.intersectsTriangle(e)})}intersectsSphere(i){return this.shapecast({intersectsBounds:t=>i.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(i)})}closestPointToGeometry(i,t,e={},s={},n=0,r=1/0){return(this.indirect?ac:Qa)(this,i,t,e,s,n,r)}closestPointToPoint(i,t={},e=0,s=1/0){return Da(this,i,t,e,s)}getBoundingBox(i){return i.makeEmpty(),this._roots.forEach(e=>{Rt(0,new Float32Array(e),Lr),i.union(Lr)}),i}}function _r(c,i,t){return c===null||(c.point.applyMatrix4(i.matrixWorld),c.distance=c.point.distanceTo(t.ray.origin),c.object=i,c.distancet.far)?null:c}const cn=new wo,Mr=new Nt,uc=it.prototype.raycast;function fc(c,i){if(this.geometry.boundsTree){if(this.material===void 0)return;Mr.copy(this.matrixWorld).invert(),cn.copy(c.ray).applyMatrix4(Mr);const t=this.geometry.boundsTree;if(c.firstHitOnly===!0){const e=_r(t.raycastFirst(cn,this.material),this,c);e&&i.push(e)}else{const e=t.raycast(cn,this.material);for(let s=0,n=e.length;s{if(!this.enabled)return;const t=this.handlers.slice(0);for(const e of t)e(i)});S(this,"handlers",[])}add(i){this.handlers.push(i)}remove(i){this.handlers=this.handlers.filter(t=>t!==i)}reset(){this.handlers.length=0}}class Ec{constructor(){S(this,"enabled",!0);S(this,"trigger",async i=>{if(!this.enabled)return;const t=this.handlers.slice(0);for(const e of t)await e(i)});S(this,"handlers",[])}add(i){this.handlers.push(i)}remove(i){this.handlers=this.handlers.filter(t=>t!==i)}reset(){this.handlers.length=0}}class tr{constructor(i){S(this,"isDisposeable",()=>"dispose"in this&&"onDisposed"in this);S(this,"isResizeable",()=>"resize"in this&&"getSize"in this);S(this,"isUpdateable",()=>"onAfterUpdate"in this&&"onBeforeUpdate"in this&&"update"in this);S(this,"isHideable",()=>"visible"in this);S(this,"isConfigurable",()=>"setup"in this&&"config"in this&&"onSetup"in this);this.components=i}}class Mt extends tr{}class dc extends tr{constructor(t){super(t);S(this,"worlds",new Map);S(this,"onWorldChanged",new tt);S(this,"currentWorld",null);this.onWorldChanged.add(({world:e,action:s})=>{s==="removed"&&this.worlds.delete(e.uuid)})}}class pc extends dc{constructor(){super(...arguments);S(this,"hasCameraControls",()=>"controls"in this)}}const Li=class Li extends Mt{constructor(t){super(t);S(this,"_disposedComponents",new Set);S(this,"enabled",!0);t.add(Li.uuid,this)}get(){return this._disposedComponents}destroy(t,e=!0,s=!0){t.removeFromParent();const n=t;n.dispose&&n.dispose(),this.disposeGeometryAndMaterials(t,e),s&&n.children&&n.children.length&&this.disposeChildren(n),t.children.length=0}disposeGeometry(t){t.boundsTree&&t.disposeBoundsTree&&t.disposeBoundsTree(),t.dispose()}disposeGeometryAndMaterials(t,e){const s=t;s.geometry&&this.disposeGeometry(s.geometry),e&&s.material&&Li.disposeMaterial(s),s.material=[],s.geometry=null}disposeChildren(t){for(const e of t.children)this.destroy(e)}static disposeMaterial(t){if(t.material)if(Array.isArray(t.material))for(const e of t.material)e.dispose();else t.material.dispose()}};S(Li,"uuid","76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe");let ni=Li;class Pe extends Set{constructor(t){super(t);S(this,"onItemAdded",new tt);S(this,"onItemDeleted",new tt);S(this,"onCleared",new tt);S(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}add(...t){for(const e of t)this.has(e)||!this.guard(e)||(super.add(e),this.onItemAdded||(this.onItemAdded=new tt),this.onItemAdded.trigger(e));return this}delete(t){const e=super.delete(t);return e&&this.onItemDeleted.trigger(),e}dispose(){this.clear(),this.onItemAdded.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class ie extends Map{constructor(t){super(t);S(this,"onItemSet",new tt);S(this,"onItemUpdated",new tt);S(this,"onItemDeleted",new tt);S(this,"onCleared",new tt);S(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}set(t,e){const s=this.has(t);if(!(this.guard??(()=>!0))(t,e))return this;const o=super.set(t,e);return s?(this.onItemUpdated||(this.onItemUpdated=new tt),this.onItemUpdated.trigger({key:t,value:e})):(this.onItemSet||(this.onItemSet=new tt),this.onItemSet.trigger({key:t,value:e})),o}delete(t){const e=super.delete(t);return e&&this.onItemDeleted.trigger(t),e}dispose(){this.clear(),this.onItemSet.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class ln{static isEntry(i){return new Set(["Boolean","Color","Text","Number","Select","Vector3","TextSet","None"]).has(i.type)}static copySchema(i,t={}){for(const e in i){const s=i[e];this.isEntry(s)?t[e]=this.copyEntry(s):(t[e]={},this.copySchema(s,t[e]))}return t}static copyEntry(i){if(i.type==="Boolean"){const t=i;return{type:t.type,value:t.value}}if(i.type==="Color"){const t=i;return{type:t.type,value:t.value.clone()}}if(i.type==="Text"){const t=i;return{type:t.type,value:t.value}}if(i.type==="Number"){const t=i;return{type:t.type,value:t.value,min:t.min,max:t.max,interpolable:t.interpolable}}if(i.type==="Select"){const t=i;return{type:t.type,value:t.value,multiple:t.multiple,options:new Set(t.options)}}if(i.type==="Vector3"){const t=i;return{type:t.type,value:t.value.clone()}}if(i.type==="TextSet"){const t=i;return{type:t.type,value:new Set(t.value)}}if(i.type==="None"){const t=i;return{type:t.type,value:t.value}}throw new Error("Invalid entry!")}}class wr{static isTransparent(i){return i.transparent&&i.opacity<1}}const St=class St{static create(){const i=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,s=Math.random()*4294967295|0;return`${St._lut[i&255]+St._lut[i>>8&255]+St._lut[i>>16&255]+St._lut[i>>24&255]}-${St._lut[t&255]}${St._lut[t>>8&255]}-${St._lut[t>>16&15|64]}${St._lut[t>>24&255]}-${St._lut[e&63|128]}${St._lut[e>>8&255]}-${St._lut[e>>16&255]}${St._lut[e>>24&255]}${St._lut[s&255]}${St._lut[s>>8&255]}${St._lut[s>>16&255]}${St._lut[s>>24&255]}`.toLowerCase()}static validate(i){if(!St._pattern.test(i))throw new Error(`${i} is not a valid UUID v4. - If you're the tool creator, you can take one from https://www.uuidgenerator.net/. -- If you're using a platform tool, verify the uuid isn't misspelled or contact the tool creator.`)}};S(St,"_pattern",/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/),S(St,"_lut",["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"]);let se=St;const ys=class ys{constructor(){S(this,"onDisposed",new tt);S(this,"list",new Map);S(this,"enabled",!1);S(this,"_clock");S(this,"onInit",new tt);S(this,"update",()=>{if(!this.enabled)return;const i=this._clock.getDelta();for(const[t,e]of this.list)e.enabled&&e.isUpdateable()&&e.update(i);requestAnimationFrame(this.update)});this._clock=new wo,ys.setupBVH()}add(i,t){if(this.list.has(i))throw new Error("You're trying to add a component that already exists in the components instance. Use Components.get() instead.");se.validate(i),this.list.set(i,t)}get(i){const t=i.uuid;if(!this.list.has(t)){const e=new i(this);return this.list.has(t)||this.add(t,e),e}return this.list.get(t)}init(){this.enabled=!0,this._clock.start(),this.update(),this.onInit.trigger()}dispose(){this.enabled=!1;for(const[i,t]of this.list)t.enabled=!1,t.isDisposeable()&&t.dispose();this._clock.stop(),this.onDisposed.trigger(),this.onDisposed.reset()}static setupBVH(){bi.prototype.computeBoundsTree=fc,bi.prototype.disposeBoundsTree=hc,it.prototype.raycast=uc}};S(ys,"release","2.3.18");let Rs=ys;class pc extends Kn{constructor(){super(...arguments);S(this,"meshes",new Set);S(this,"onAfterUpdate",new tt);S(this,"onBeforeUpdate",new tt);S(this,"onDisposed",new tt);S(this,"isDisposing",!1);S(this,"enabled",!0);S(this,"uuid",se.create());S(this,"name");S(this,"_scene");S(this,"_camera");S(this,"_renderer",null)}get scene(){if(!this._scene)throw new Error("No scene initialized!");return this._scene}set scene(t){this._scene=t,t.worlds.set(this.uuid,this),t.currentWorld=this,t.onWorldChanged.trigger({world:this,action:"added"})}get camera(){if(!this._camera)throw new Error("No camera initialized!");return this._camera}set camera(t){this._camera=t,t.worlds.set(this.uuid,this),t.currentWorld=this,t.onWorldChanged.trigger({world:this,action:"added"})}get renderer(){return this._renderer}set renderer(t){this._renderer=t,t&&(t.worlds.set(this.uuid,this),t.currentWorld=this,t.onWorldChanged.trigger({world:this,action:"added"}))}update(t){this.enabled&&(!this._scene||!this._camera||(this.scene.currentWorld=this,this.camera.currentWorld=this,this.renderer&&(this.renderer.currentWorld=this),this.onBeforeUpdate.trigger(),this.scene.isUpdateable()&&this.scene.update(t),this.camera.isUpdateable()&&this.camera.update(t),this.renderer&&this.renderer.update(t),this.onAfterUpdate.trigger()))}dispose(t=!0){if(this.enabled=!1,this.isDisposing=!0,this.scene.onWorldChanged.trigger({world:this,action:"removed"}),this.camera.onWorldChanged.trigger({world:this,action:"removed"}),this.renderer&&this.renderer.onWorldChanged.trigger({world:this,action:"removed"}),t){const s=this.components.get(ni);this.scene.dispose(),this.camera.isDisposeable()&&this.camera.dispose(),this.renderer&&this.renderer.dispose();for(const n of this.meshes)s.destroy(n);this.meshes.clear()}this._scene=null,this._camera=null,this._renderer=null,this.components.get(As).list.delete(this.uuid),this.onDisposed.trigger(),this.onDisposed.reset()}}class Ws{constructor(i,t,e,s){S(this,"_component");S(this,"name");S(this,"uuid");this._component=i,this.name=e,this.uuid=s??se.create(),t.get(vi).list.set(this.uuid,this)}get controls(){const i={};for(const t in this._config){const e=this._config[t];i[t]=this.copyEntry(e)}return i}copyEntry(i){if(i.type==="Boolean"){const t=i;return{type:t.type,value:t.value}}if(i.type==="Color"){const t=i;return{type:t.type,value:t.value.clone()}}if(i.type==="Text"){const t=i;return{type:t.type,value:t.value}}if(i.type==="Number"){const t=i;return{type:t.type,value:t.value,min:t.min,max:t.max,interpolable:t.interpolable}}if(i.type==="Select"){const t=i;return{type:t.type,value:t.value,multiple:t.multiple,options:new Set(t.options)}}if(i.type==="Vector3"){const t=i;return{type:t.type,value:t.value.clone()}}if(i.type==="TextSet"){const t=i;return{type:t.type,value:new Set(t.value)}}if(i.type==="None"){const t=i;return{type:t.type,value:t.value}}throw new Error("Invalid entry!")}}const Ps=class Ps extends Mt{constructor(t){super(t);S(this,"list",new ie);S(this,"enabled",!0);t.add(Ps.uuid,this)}};S(Ps,"uuid","b8c764e0-6b24-4e77-9a32-35fa728ee5b4");let vi=Ps;/*! +- If you're using a platform tool, verify the uuid isn't misspelled or contact the tool creator.`)}};S(St,"_pattern",/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/),S(St,"_lut",["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"]);let se=St;const Ls=class Ls{constructor(){S(this,"onDisposed",new tt);S(this,"list",new Map);S(this,"enabled",!1);S(this,"_clock");S(this,"onInit",new tt);S(this,"update",()=>{if(!this.enabled)return;const i=this._clock.getDelta();for(const[t,e]of this.list)e.enabled&&e.isUpdateable()&&e.update(i);requestAnimationFrame(this.update)});this._clock=new Do,Ls.setupBVH()}add(i,t){if(this.list.has(i))throw new Error("You're trying to add a component that already exists in the components instance. Use Components.get() instead.");se.validate(i),this.list.set(i,t)}get(i){const t=i.uuid;if(!this.list.has(t)){const e=new i(this);return this.list.has(t)||this.add(t,e),e}return this.list.get(t)}init(){this.enabled=!0,this._clock.start(),this.update(),this.onInit.trigger()}dispose(){this.enabled=!1;for(const[i,t]of this.list)t.enabled=!1,t.isDisposeable()&&t.dispose();this._clock.stop(),this.onDisposed.trigger(),this.onDisposed.reset()}static setupBVH(){bi.prototype.computeBoundsTree=hc,bi.prototype.disposeBoundsTree=Ic,it.prototype.raycast=fc}};S(Ls,"release","2.4.2");let Fs=Ls;class Cc extends tr{constructor(){super(...arguments);S(this,"meshes",new Set);S(this,"onAfterUpdate",new tt);S(this,"onBeforeUpdate",new tt);S(this,"onDisposed",new tt);S(this,"isDisposing",!1);S(this,"enabled",!0);S(this,"uuid",se.create());S(this,"name");S(this,"_scene");S(this,"_camera");S(this,"_renderer",null)}get scene(){if(!this._scene)throw new Error("No scene initialized!");return this._scene}set scene(t){this._scene=t,t.worlds.set(this.uuid,this),t.currentWorld=this,t.onWorldChanged.trigger({world:this,action:"added"})}get camera(){if(!this._camera)throw new Error("No camera initialized!");return this._camera}set camera(t){this._camera=t,t.worlds.set(this.uuid,this),t.currentWorld=this,t.onWorldChanged.trigger({world:this,action:"added"})}get renderer(){return this._renderer}set renderer(t){this._renderer=t,t&&(t.worlds.set(this.uuid,this),t.currentWorld=this,t.onWorldChanged.trigger({world:this,action:"added"}))}update(t){this.enabled&&(!this._scene||!this._camera||(this.scene.currentWorld=this,this.camera.currentWorld=this,this.renderer&&(this.renderer.currentWorld=this),this.onBeforeUpdate.trigger(),this.scene.isUpdateable()&&this.scene.update(t),this.camera.isUpdateable()&&this.camera.update(t),this.renderer&&this.renderer.update(t),this.onAfterUpdate.trigger()))}dispose(t=!0){if(this.enabled=!1,this.isDisposing=!0,this.scene.onWorldChanged.trigger({world:this,action:"removed"}),this.camera.onWorldChanged.trigger({world:this,action:"removed"}),this.renderer&&this.renderer.onWorldChanged.trigger({world:this,action:"removed"}),t){const s=this.components.get(ni);this.scene.dispose(),this.camera.isDisposeable()&&this.camera.dispose(),this.renderer&&this.renderer.dispose();for(const n of this.meshes)s.destroy(n);this.meshes.clear()}this._scene=null,this._camera=null,this._renderer=null,this.components.get(gs).list.delete(this.uuid),this.onDisposed.trigger(),this.onDisposed.reset()}}class Xs{constructor(i,t,e,s){S(this,"_component");S(this,"name");S(this,"uuid");this._component=i,this.name=e,this.uuid=s??se.create(),t.get(vi).list.set(this.uuid,this)}get controls(){return ln.copySchema(this._config)}set(i){for(const t in i)if(t in this){const e=t;this[e]=i[t].value}}export(i=this._config,t={}){for(const e in i){const s=i[e];if(ln.isEntry(s))if(s.type==="Color"){const{r,g:o,b:a}=s.value;t[e]={...s,value:{r,g:o,b:a}}}else if(s.type==="Vector3"){const{x:r,y:o,z:a}=s.value;t[e]={...s,value:{x:r,y:o,z:a}}}else if(s.type==="TextSet"){const r=Array.from(s.value);t[e]={...s,value:r}}else if(s.type==="Select"){const r=Array.from(s.options);t[e]={...s,options:r}}else t[e]={...s};else t[e]={},this.export(s,t[e])}return t}import(i,t={},e=!0){for(const s in i){const n=i[s];if(ln.isEntry(n))if(n.type==="Color"){const{r:o,g:a,b:l}=n.value;t[s]={...n,value:new Bi(o,a,l)}}else if(n.type==="Vector3"){const{x:o,y:a,z:l}=n.value;t[s]={...n,value:new H(o,a,l)}}else n.type==="TextSet"?t[s]={...n,value:new Set(n.value)}:n.type==="Select"?t[s]={...n,options:new Set(n.options)}:t[s]={...n};else t[s]={},this.import(n,t[s],!1)}e&&this.set(t)}}const _s=class _s extends Mt{constructor(t){super(t);S(this,"list",new ie);S(this,"enabled",!0);t.add(_s.uuid,this)}};S(_s,"uuid","b8c764e0-6b24-4e77-9a32-35fa728ee5b4");let vi=_s;/*! * camera-controls * https://github.com/yomotsu/camera-controls * (c) 2017 @yomotsu * Released under the MIT License. - */const at={LEFT:1,RIGHT:2,MIDDLE:4},k=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),Ze={NONE:0,IN:1,OUT:-1};function we(c){return c.isPerspectiveCamera}function ge(c){return c.isOrthographicCamera}const je=Math.PI*2,Mr=Math.PI/2,Io=1e-5,pi=Math.PI/180;function Qt(c,i,t){return Math.max(i,Math.min(t,c))}function pt(c,i=Io){return Math.abs(c)0==h>u&&(h=u,t.value=(h-u)/n),h}function Dr(c,i,t,e,s=1/0,n,r){e=Math.max(1e-4,e);const o=2/e,a=o*n,l=1/(1+a+.48*a*a+.235*a*a*a);let u=i.x,f=i.y,I=i.z,h=c.x-u,d=c.y-f,E=c.z-I;const C=u,p=f,A=I,F=s*e,R=F*F,g=h*h+d*d+E*E;if(g>R){const U=Math.sqrt(g);h=h/U*F,d=d/U*F,E=E/U*F}u=c.x-h,f=c.y-d,I=c.z-E;const N=(t.x+o*h)*n,y=(t.y+o*d)*n,w=(t.z+o*E)*n;t.x=(t.x-o*N)*l,t.y=(t.y-o*y)*l,t.z=(t.z-o*w)*l,r.x=u+(h+N)*l,r.y=f+(d+y)*l,r.z=I+(E+w)*l;const L=C-c.x,D=p-c.y,V=A-c.z,O=r.x-C,M=r.y-p,T=r.z-A;return L*O+D*M+V*T>0&&(r.x=C,r.y=p,r.z=A,t.x=(r.x-C)/n,t.y=(r.y-p)/n,t.z=(r.z-A)/n),r}function cn(c,i){i.set(0,0),c.forEach(t=>{i.x+=t.clientX,i.y+=t.clientY}),i.x/=c.length,i.y/=c.length}function ln(c,i){return ge(c)?(console.warn(`${i} is not supported in OrthographicCamera`),!0):!1}class Cc{constructor(){this._listeners={}}addEventListener(i,t){const e=this._listeners;e[i]===void 0&&(e[i]=[]),e[i].indexOf(t)===-1&&e[i].push(t)}hasEventListener(i,t){const e=this._listeners;return e[i]!==void 0&&e[i].indexOf(t)!==-1}removeEventListener(i,t){const s=this._listeners[i];if(s!==void 0){const n=s.indexOf(t);n!==-1&&s.splice(n,1)}}removeAllEventListeners(i){if(!i){this._listeners={};return}Array.isArray(this._listeners[i])&&(this._listeners[i].length=0)}dispatchEvent(i){const e=this._listeners[i.type];if(e!==void 0){i.target=this;const s=e.slice(0);for(let n=0,r=s.length;n{},this._enabled=!0,this._state=k.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=Ze.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new ot.Vector3,this._focalOffsetVelocity=new ot.Vector3,this._zoomVelocity={value:0},this._truckInternal=(R,g,N)=>{let y,w;if(we(this._camera)){const L=ct.copy(this._camera.position).sub(this._target),D=this._camera.getEffectiveFOV()*pi,V=L.length()*Math.tan(D*.5);y=this.truckSpeed*R*V/this._elementRect.height,w=this.truckSpeed*g*V/this._elementRect.height}else if(ge(this._camera)){const L=this._camera;y=R*(L.right-L.left)/L.zoom/this._elementRect.width,w=g*(L.top-L.bottom)/L.zoom/this._elementRect.height}else return;this.verticalDragToForward?(N?this.setFocalOffset(this._focalOffsetEnd.x+y,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(y,0,!0),this.forward(-w,!0)):N?this.setFocalOffset(this._focalOffsetEnd.x+y,this._focalOffsetEnd.y+w,this._focalOffsetEnd.z,!0):this.truck(y,w,!0)},this._rotateInternal=(R,g)=>{const N=je*this.azimuthRotateSpeed*R/this._elementRect.height,y=je*this.polarRotateSpeed*g/this._elementRect.height;this.rotate(N,y,!0)},this._dollyInternal=(R,g,N)=>{const y=Math.pow(.95,-R*this.dollySpeed),w=this._sphericalEnd.radius,L=this._sphericalEnd.radius*y,D=Qt(L,this.minDistance,this.maxDistance),V=D-L;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(L,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(V,!0),this._dollyToNoClamp(D,!0)):this._dollyToNoClamp(D,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?L:D)-w,this._dollyControlCoord.set(g,N)),this._lastDollyDirection=Math.sign(-R)},this._zoomInternal=(R,g,N)=>{const y=Math.pow(.95,R*this.dollySpeed),w=this._zoom,L=this._zoom*y;this.zoomTo(L,!0),this.dollyToCursor&&(this._changedZoom+=L-w,this._dollyControlCoord.set(g,N))},typeof ot>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=i,this._yAxisUpSpace=new ot.Quaternion().setFromUnitVectors(this._camera.up,as),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=k.NONE,this._target=new ot.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new ot.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new ot.Spherical().setFromVector3(ct.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new ot.Vector3,new ot.Vector3,new ot.Vector3,new ot.Vector3],this._updateNearPlaneCorners(),this._boundary=new ot.Box3(new ot.Vector3(-1/0,-1/0,-1/0),new ot.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new ot.Vector2,this.mouseButtons={left:k.ROTATE,middle:k.DOLLY,right:k.TRUCK,wheel:we(this._camera)?k.DOLLY:ge(this._camera)?k.ZOOM:k.NONE},this.touches={one:k.TOUCH_ROTATE,two:we(this._camera)?k.TOUCH_DOLLY_TRUCK:ge(this._camera)?k.TOUCH_ZOOM_TRUCK:k.NONE,three:k.TOUCH_TRUCK};const e=new ot.Vector2,s=new ot.Vector2,n=new ot.Vector2,r=R=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const y=this._domElement.getBoundingClientRect(),w=R.clientX/y.width,L=R.clientY/y.height;if(wthis._interactiveArea.right||Lthis._interactiveArea.bottom)return}const g=R.pointerType!=="mouse"?null:(R.buttons&at.LEFT)===at.LEFT?at.LEFT:(R.buttons&at.MIDDLE)===at.MIDDLE?at.MIDDLE:(R.buttons&at.RIGHT)===at.RIGHT?at.RIGHT:null;if(g!==null){const y=this._findPointerByMouseButton(g);y&&this._disposePointer(y)}if((R.buttons&at.LEFT)===at.LEFT&&this._lockedPointer)return;const N={pointerId:R.pointerId,clientX:R.clientX,clientY:R.clientY,deltaX:0,deltaY:0,mouseButton:g};this._activePointers.push(N),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),this._isDragging=!0,E(R)},o=R=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const y=this._domElement.getBoundingClientRect(),w=R.clientX/y.width,L=R.clientY/y.height;if(wthis._interactiveArea.right||Lthis._interactiveArea.bottom)return}const g=(R.buttons&at.LEFT)===at.LEFT?at.LEFT:(R.buttons&at.MIDDLE)===at.MIDDLE?at.MIDDLE:(R.buttons&at.RIGHT)===at.RIGHT?at.RIGHT:null;if(g!==null){const y=this._findPointerByMouseButton(g);y&&this._disposePointer(y)}const N={pointerId:1,clientX:R.clientX,clientY:R.clientY,deltaX:0,deltaY:0,mouseButton:(R.buttons&at.LEFT)===at.LEFT?at.LEFT:(R.buttons&at.MIDDLE)===at.LEFT?at.MIDDLE:(R.buttons&at.RIGHT)===at.LEFT?at.RIGHT:null};this._activePointers.push(N),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",f),this._domElement.ownerDocument.addEventListener("mousemove",l),this._domElement.ownerDocument.addEventListener("mouseup",f),this._isDragging=!0,E(R)},a=R=>{R.cancelable&&R.preventDefault();const g=R.pointerId,N=this._lockedPointer||this._findPointerById(g);if(N){if(N.clientX=R.clientX,N.clientY=R.clientY,N.deltaX=R.movementX,N.deltaY=R.movementY,this._state=0,R.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(R.buttons&at.LEFT)===at.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(R.buttons&at.MIDDLE)===at.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(R.buttons&at.RIGHT)===at.RIGHT&&(this._state=this._state|this.mouseButtons.right);C()}},l=R=>{const g=this._lockedPointer||this._findPointerById(1);g&&(g.clientX=R.clientX,g.clientY=R.clientY,g.deltaX=R.movementX,g.deltaY=R.movementY,this._state=0,(this._lockedPointer||(R.buttons&at.LEFT)===at.LEFT)&&(this._state=this._state|this.mouseButtons.left),(R.buttons&at.MIDDLE)===at.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(R.buttons&at.RIGHT)===at.RIGHT&&(this._state=this._state|this.mouseButtons.right),C())},u=R=>{const g=this._findPointerById(R.pointerId);if(!(g&&g===this._lockedPointer)){if(g&&this._disposePointer(g),R.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=k.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=k.NONE;p()}},f=()=>{const R=this._findPointerById(1);R&&R===this._lockedPointer||(R&&this._disposePointer(R),this._state=k.NONE,p())};let I=-1;const h=R=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===k.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const L=this._domElement.getBoundingClientRect(),D=R.clientX/L.width,V=R.clientY/L.height;if(Dthis._interactiveArea.right||Vthis._interactiveArea.bottom)return}if(R.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===k.ROTATE||this.mouseButtons.wheel===k.TRUCK){const L=performance.now();I-L<1e3&&this._getClientRect(this._elementRect),I=L}const g=mc?-1:-3,N=R.deltaMode===1?R.deltaY/g:R.deltaY/(g*10),y=this.dollyToCursor?(R.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,w=this.dollyToCursor?(R.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case k.ROTATE:{this._rotateInternal(R.deltaX,R.deltaY),this._isUserControllingRotate=!0;break}case k.TRUCK:{this._truckInternal(R.deltaX,R.deltaY,!1),this._isUserControllingTruck=!0;break}case k.OFFSET:{this._truckInternal(R.deltaX,R.deltaY,!0),this._isUserControllingOffset=!0;break}case k.DOLLY:{this._dollyInternal(-N,y,w),this._isUserControllingDolly=!0;break}case k.ZOOM:{this._zoomInternal(-N,y,w),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},d=R=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===bt.ACTION.NONE){const g=R instanceof PointerEvent?R.pointerId:(R instanceof MouseEvent,0),N=this._findPointerById(g);N&&this._disposePointer(N),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",f);return}R.preventDefault()}},E=R=>{if(!this._enabled)return;if(cn(this._activePointers,Yt),this._getClientRect(this._elementRect),e.copy(Yt),s.copy(Yt),this._activePointers.length>=2){const N=Yt.x-this._activePointers[1].clientX,y=Yt.y-this._activePointers[1].clientY,w=Math.sqrt(N*N+y*y);n.set(0,w);const L=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,D=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;s.set(L,D)}if(this._state=0,!R)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in R&&R.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(R.buttons&at.LEFT)===at.LEFT&&(this._state=this._state|this.mouseButtons.left),(R.buttons&at.MIDDLE)===at.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(R.buttons&at.RIGHT)===at.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&k.ROTATE)===k.ROTATE||(this._state&k.TOUCH_ROTATE)===k.TOUCH_ROTATE||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&k.TRUCK)===k.TRUCK||(this._state&k.TOUCH_TRUCK)===k.TOUCH_TRUCK||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&k.DOLLY)===k.DOLLY||(this._state&k.TOUCH_DOLLY)===k.TOUCH_DOLLY||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&k.ZOOM)===k.ZOOM||(this._state&k.TOUCH_ZOOM)===k.TOUCH_ZOOM||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&k.OFFSET)===k.OFFSET||(this._state&k.TOUCH_OFFSET)===k.TOUCH_OFFSET||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},C=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,cn(this._activePointers,Yt);const g=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,N=g?-g.deltaX:s.x-Yt.x,y=g?-g.deltaY:s.y-Yt.y;if(s.copy(Yt),((this._state&k.ROTATE)===k.ROTATE||(this._state&k.TOUCH_ROTATE)===k.TOUCH_ROTATE||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(N,y),this._isUserControllingRotate=!0),(this._state&k.DOLLY)===k.DOLLY||(this._state&k.ZOOM)===k.ZOOM){const w=this.dollyToCursor?(e.x-this._elementRect.x)/this._elementRect.width*2-1:0,L=this.dollyToCursor?(e.y-this._elementRect.y)/this._elementRect.height*-2+1:0,D=this.dollyDragInverted?-1:1;(this._state&k.DOLLY)===k.DOLLY?(this._dollyInternal(D*y*os,w,L),this._isUserControllingDolly=!0):(this._zoomInternal(D*y*os,w,L),this._isUserControllingZoom=!0)}if((this._state&k.TOUCH_DOLLY)===k.TOUCH_DOLLY||(this._state&k.TOUCH_ZOOM)===k.TOUCH_ZOOM||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE){const w=Yt.x-this._activePointers[1].clientX,L=Yt.y-this._activePointers[1].clientY,D=Math.sqrt(w*w+L*L),V=n.y-D;n.set(0,D);const O=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,M=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&k.TOUCH_DOLLY)===k.TOUCH_DOLLY||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET?(this._dollyInternal(V*os,O,M),this._isUserControllingDolly=!0):(this._zoomInternal(V*os,O,M),this._isUserControllingZoom=!0)}((this._state&k.TRUCK)===k.TRUCK||(this._state&k.TOUCH_TRUCK)===k.TOUCH_TRUCK||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(N,y,!1),this._isUserControllingTruck=!0),((this._state&k.OFFSET)===k.OFFSET||(this._state&k.TOUCH_OFFSET)===k.TOUCH_OFFSET||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(N,y,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},p=()=>{cn(this._activePointers,Yt),s.copy(Yt),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",f),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",A),this._domElement.ownerDocument.addEventListener("pointerlockerror",F),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),E())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",A),this._domElement.ownerDocument.removeEventListener("pointerlockerror",F))};const A=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},F=()=>{this.unlockPointer()};this._addAllEventListeners=R=>{this._domElement=R,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",r),Rc&&this._domElement.addEventListener("mousedown",o),this._domElement.addEventListener("pointercancel",u),this._domElement.addEventListener("wheel",h,{passive:!1}),this._domElement.addEventListener("contextmenu",d)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",r),this._domElement.removeEventListener("mousedown",o),this._domElement.removeEventListener("pointercancel",u),this._domElement.removeEventListener("wheel",h,{passive:!1}),this._domElement.removeEventListener("contextmenu",d),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",f),this._domElement.ownerDocument.removeEventListener("pointerlockchange",A),this._domElement.ownerDocument.removeEventListener("pointerlockerror",F))},this.cancel=()=>{this._state!==k.NONE&&(this._state=k.NONE,this._activePointers.length=0,p())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(i){this._camera=i,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(i){this._enabled=i,this._domElement&&(i?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(i){this._spherical.radius===i&&this._sphericalEnd.radius===i||(this._spherical.radius=i,this._sphericalEnd.radius=i,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(i){this._spherical.theta===i&&this._sphericalEnd.theta===i||(this._spherical.theta=i,this._sphericalEnd.theta=i,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(i){this._spherical.phi===i&&this._sphericalEnd.phi===i||(this._spherical.phi=i,this._sphericalEnd.phi=i,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(i){this._boundaryEnclosesCamera=i,this._needsUpdate=!0}set interactiveArea(i){this._interactiveArea.width=Qt(i.width,0,1),this._interactiveArea.height=Qt(i.height,0,1),this._interactiveArea.x=Qt(i.x,0,1-this._interactiveArea.width),this._interactiveArea.y=Qt(i.y,0,1-this._interactiveArea.height)}addEventListener(i,t){super.addEventListener(i,t)}removeEventListener(i,t){super.removeEventListener(i,t)}rotate(i,t,e=!1){return this.rotateTo(this._sphericalEnd.theta+i,this._sphericalEnd.phi+t,e)}rotateAzimuthTo(i,t=!1){return this.rotateTo(i,this._sphericalEnd.phi,t)}rotatePolarTo(i,t=!1){return this.rotateTo(this._sphericalEnd.theta,i,t)}rotateTo(i,t,e=!1){this._isUserControllingRotate=!1;const s=Qt(i,this.minAzimuthAngle,this.maxAzimuthAngle),n=Qt(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=s,this._sphericalEnd.phi=n,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,e||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const r=!e||It(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&It(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(r)}dolly(i,t=!1){return this.dollyTo(this._sphericalEnd.radius-i,t)}dollyTo(i,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=Ze.NONE,this._changedDolly=0,this._dollyToNoClamp(Qt(i,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(i,t=!1){const e=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const r=this._collisionTest(),o=It(r,this._spherical.radius);if(!(e>i)&&o)return Promise.resolve();this._sphericalEnd.radius=Math.min(i,r)}else this._sphericalEnd.radius=i;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const n=!t||It(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(n)}dollyInFixed(i,t=!1){this._targetEnd.add(this._getCameraDirection(mi).multiplyScalar(i)),t||this._target.copy(this._targetEnd);const e=!t||It(this._target.x,this._targetEnd.x,this.restThreshold)&&It(this._target.y,this._targetEnd.y,this.restThreshold)&&It(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(e)}zoom(i,t=!1){return this.zoomTo(this._zoomEnd+i,t)}zoomTo(i,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=Qt(i,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const e=!t||It(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(e)}pan(i,t,e=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(i,t,e)}truck(i,t,e=!1){this._camera.updateMatrix(),oe.setFromMatrixColumn(this._camera.matrix,0),ae.setFromMatrixColumn(this._camera.matrix,1),oe.multiplyScalar(i),ae.multiplyScalar(-t);const s=ct.copy(oe).add(ae),n=ft.copy(this._targetEnd).add(s);return this.moveTo(n.x,n.y,n.z,e)}forward(i,t=!1){ct.setFromMatrixColumn(this._camera.matrix,0),ct.crossVectors(this._camera.up,ct),ct.multiplyScalar(i);const e=ft.copy(this._targetEnd).add(ct);return this.moveTo(e.x,e.y,e.z,t)}elevate(i,t=!1){return ct.copy(this._camera.up).multiplyScalar(i),this.moveTo(this._targetEnd.x+ct.x,this._targetEnd.y+ct.y,this._targetEnd.z+ct.z,t)}moveTo(i,t,e,s=!1){this._isUserControllingTruck=!1;const n=ct.set(i,t,e).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,n,this.boundaryFriction),this._needsUpdate=!0,s||this._target.copy(this._targetEnd);const r=!s||It(this._target.x,this._targetEnd.x,this.restThreshold)&&It(this._target.y,this._targetEnd.y,this.restThreshold)&&It(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}lookInDirectionOf(i,t,e,s=!1){const o=ct.set(i,t,e).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(o.x,o.y,o.z,s)}fitToBox(i,t,{cover:e=!1,paddingLeft:s=0,paddingRight:n=0,paddingBottom:r=0,paddingTop:o=0}={}){const a=[],l=i.isBox3?Qe.copy(i):Qe.setFromObject(i);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const u=wr(this._sphericalEnd.theta,Mr),f=wr(this._sphericalEnd.phi,Mr);a.push(this.rotateTo(u,f,t));const I=ct.setFromSpherical(this._sphericalEnd).normalize(),h=Br.setFromUnitVectors(I,un),d=It(Math.abs(I.y),1);d&&h.multiply(hn.setFromAxisAngle(as,u)),h.multiply(this._yAxisUpSpaceInverse);const E=xr.makeEmpty();ft.copy(l.min).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.min).setX(l.max.x).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.min).setY(l.max.y).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.max).setZ(l.min.z).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.min).setZ(l.max.z).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.max).setY(l.min.y).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.max).setX(l.min.x).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.max).applyQuaternion(h),E.expandByPoint(ft),E.min.x-=s,E.min.y-=r,E.max.x+=n,E.max.y+=o,h.setFromUnitVectors(un,I),d&&h.premultiply(hn.invert()),h.premultiply(this._yAxisUpSpace);const C=E.getSize(ct),p=E.getCenter(ft).applyQuaternion(h);if(we(this._camera)){const A=this.getDistanceToFitBox(C.x,C.y,C.z,e);a.push(this.moveTo(p.x,p.y,p.z,t)),a.push(this.dollyTo(A,t)),a.push(this.setFocalOffset(0,0,0,t))}else if(ge(this._camera)){const A=this._camera,F=A.right-A.left,R=A.top-A.bottom,g=e?Math.max(F/C.x,R/C.y):Math.min(F/C.x,R/C.y);a.push(this.moveTo(p.x,p.y,p.z,t)),a.push(this.zoomTo(g,t)),a.push(this.setFocalOffset(0,0,0,t))}return Promise.all(a)}fitToSphere(i,t){const e=[],n=i instanceof ot.Sphere?fn.copy(i):bt.createBoundingSphere(i,fn);if(e.push(this.moveTo(n.center.x,n.center.y,n.center.z,t)),we(this._camera)){const r=this.getDistanceToFitSphere(n.radius);e.push(this.dollyTo(r,t))}else if(ge(this._camera)){const r=this._camera.right-this._camera.left,o=this._camera.top-this._camera.bottom,a=2*n.radius,l=Math.min(r/a,o/a);e.push(this.zoomTo(l,t))}return e.push(this.setFocalOffset(0,0,0,t)),Promise.all(e)}setLookAt(i,t,e,s,n,r,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Ze.NONE,this._changedDolly=0;const a=ft.set(s,n,r),l=ct.set(i,t,e);this._targetEnd.copy(a),this._sphericalEnd.setFromVector3(l.sub(a).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const u=!o||It(this._target.x,this._targetEnd.x,this.restThreshold)&&It(this._target.y,this._targetEnd.y,this.restThreshold)&&It(this._target.z,this._targetEnd.z,this.restThreshold)&&It(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&It(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&It(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(i,t,e,s,n,r,o,a,l,u,f,I,h,d=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Ze.NONE,this._changedDolly=0;const E=ct.set(s,n,r),C=ft.set(i,t,e);Ht.setFromVector3(C.sub(E).applyQuaternion(this._yAxisUpSpace));const p=qe.set(u,f,I),A=ft.set(o,a,l);Ri.setFromVector3(A.sub(p).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(E.lerp(p,h));const F=Ri.theta-Ht.theta,R=Ri.phi-Ht.phi,g=Ri.radius-Ht.radius;this._sphericalEnd.set(Ht.radius+g*h,Ht.phi+R*h,Ht.theta+F*h),this.normalizeRotations(),this._needsUpdate=!0,d||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const N=!d||It(this._target.x,this._targetEnd.x,this.restThreshold)&&It(this._target.y,this._targetEnd.y,this.restThreshold)&&It(this._target.z,this._targetEnd.z,this.restThreshold)&&It(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&It(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&It(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(N)}setPosition(i,t,e,s=!1){return this.setLookAt(i,t,e,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,s)}setTarget(i,t,e,s=!1){const n=this.getPosition(ct),r=this.setLookAt(n.x,n.y,n.z,i,t,e,s);return this._sphericalEnd.phi=Qt(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),r}setFocalOffset(i,t,e,s=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(i,t,e),this._needsUpdate=!0,s||this._focalOffset.copy(this._focalOffsetEnd);const n=!s||It(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&It(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&It(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}setOrbitPoint(i,t,e){this._camera.updateMatrixWorld(),oe.setFromMatrixColumn(this._camera.matrixWorldInverse,0),ae.setFromMatrixColumn(this._camera.matrixWorldInverse,1),De.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const s=ct.set(i,t,e),n=s.distanceTo(this._camera.position),r=s.sub(this._camera.position);oe.multiplyScalar(r.x),ae.multiplyScalar(r.y),De.multiplyScalar(r.z),ct.copy(oe).add(ae).add(De),ct.z=ct.z+n,this.dollyTo(n,!1),this.setFocalOffset(-ct.x,ct.y,-ct.z,!1),this.moveTo(i,t,e,!1)}setBoundary(i){if(!i){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(i),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(i,t,e,s){if(i===null){this._viewport=null;return}this._viewport=this._viewport||new ot.Vector4,typeof i=="number"?this._viewport.set(i,t,e,s):this._viewport.copy(i)}getDistanceToFitBox(i,t,e,s=!1){if(ln(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const n=i/t,r=this._camera.getEffectiveFOV()*pi,o=this._camera.aspect;return((s?n>o:nt.pointerId===i)}_findPointerByMouseButton(i){return this._activePointers.find(t=>t.mouseButton===i)}_disposePointer(i){this._activePointers.splice(this._activePointers.indexOf(i),1)}_encloseToBoundary(i,t,e){const s=t.lengthSq();if(s===0)return i;const n=ft.copy(t).add(i),o=this._boundary.clampPoint(n,qe).sub(n),a=o.lengthSq();if(a===0)return i.add(t);if(a===s)return i;if(e===0)return i.add(t).add(o);{const l=1+e*a/t.dot(o);return i.add(ft.copy(t).multiplyScalar(l)).add(o.multiplyScalar(1-e))}}_updateNearPlaneCorners(){if(we(this._camera)){const i=this._camera,t=i.near,e=i.getEffectiveFOV()*pi,s=Math.tan(e*.5)*t,n=s*i.aspect;this._nearPlaneCorners[0].set(-n,-s,0),this._nearPlaneCorners[1].set(n,-s,0),this._nearPlaneCorners[2].set(n,s,0),this._nearPlaneCorners[3].set(-n,s,0)}else if(ge(this._camera)){const i=this._camera,t=1/i.zoom,e=i.left*t,s=i.right*t,n=i.top*t,r=i.bottom*t;this._nearPlaneCorners[0].set(e,n,0),this._nearPlaneCorners[1].set(s,n,0),this._nearPlaneCorners[2].set(s,r,0),this._nearPlaneCorners[3].set(e,r,0)}}_collisionTest(){let i=1/0;if(!(this.colliderMeshes.length>=1)||ln(this._camera,"_collisionTest"))return i;const e=this._getTargetDirection(mi);In.lookAt(Ur,e,this._camera.up);for(let s=0;s<4;s++){const n=ft.copy(this._nearPlaneCorners[s]);n.applyMatrix4(In);const r=qe.addVectors(this._target,n);cs.set(r,e),cs.far=this._spherical.radius+1;const o=cs.intersectObjects(this.colliderMeshes);o.length!==0&&o[0].distance{const e=()=>{this.removeEventListener("rest",e),t()};this.addEventListener("rest",e)}))}_addAllEventListeners(i){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(i){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(i){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(i,t=new ot.Sphere){const e=t,s=e.center;Qe.makeEmpty(),i.traverseVisible(r=>{r.isMesh&&Qe.expandByObject(r)}),Qe.getCenter(s);let n=0;return i.traverseVisible(r=>{if(!r.isMesh)return;const o=r,a=o.geometry.clone();a.applyMatrix4(o.matrixWorld);const u=a.attributes.position;for(let f=0,I=u.count;f{var t;if(!(!this.currentWorld||!this.currentWorld.renderer)){if(this.three instanceof bn){this.onAspectUpdated.trigger();return}if((t=this.currentWorld.renderer)!=null&&t.isResizeable()){const e=this.currentWorld.renderer.getSize();this.three.aspect=e.width/e.height,this.three.updateProjectionMatrix(),this.onAspectUpdated.trigger()}}});this.three=this.setupCamera(),this.setupEvents(!0),this.onWorldChanged.add(({action:e,world:s})=>{if(e==="added"){const n=this.newCameraControls();this._allControls.set(s.uuid,n)}if(e==="removed"){const n=this._allControls.get(s.uuid);n&&(n.dispose(),this._allControls.delete(s.uuid))}})}get controls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");const t=this._allControls.get(this.currentWorld.uuid);if(!t)throw new Error("Controls not found!");return t}get enabled(){return this.currentWorld===null?!1:this.controls.enabled}set enabled(t){this.currentWorld!==null&&(this.controls.enabled=t)}dispose(){this.setupEvents(!1),this.onAspectUpdated.reset(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.three.removeFromParent(),this.onDisposed.trigger(),this.onDisposed.reset();for(const[t,e]of this._allControls)e.dispose()}update(t){this.enabled&&(this.onBeforeUpdate.trigger(this),this.controls.update(t),this.onAfterUpdate.trigger(this))}setupCamera(){const t=window.innerWidth/window.innerHeight,e=new to(60,t,1,1e3);return e.position.set(50,50,50),e.lookAt(new W(0,0,0)),e}newCameraControls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");if(!this.currentWorld.renderer)throw new Error("This camera needs a renderer to work!");bt.install({THREE:Jn.getSubsetOfThree()});const{domElement:t}=this.currentWorld.renderer.three,e=new bt(this.three,t);return e.smoothTime=.2,e.dollyToCursor=!0,e.infinityDolly=!0,e.minDistance=6,e}setupEvents(t){t?window.addEventListener("resize",this.updateAspect):window.removeEventListener("resize",this.updateAspect)}static getSubsetOfThree(){return{MOUSE:vo,Vector2:Le,Vector3:W,Vector4:bo,Quaternion:Jt,Matrix4:Nt,Spherical:Uo,Box3:Lt,Sphere:Bs,Raycaster:vn,MathUtils:Do}}}const Ls=class Ls extends Mt{constructor(t){super(t);S(this,"onAfterUpdate",new tt);S(this,"onBeforeUpdate",new tt);S(this,"onDisposed",new tt);S(this,"list",new ie);S(this,"enabled",!0);t.add(Ls.uuid,this)}create(){const t=new pc(this.components),e=t.uuid;if(this.list.has(e))throw new Error("There is already a world with this name!");return this.list.set(e,t),t}delete(t){if(!this.list.has(t.uuid))throw new Error("The provided world is not found in the list!");this.list.delete(t.uuid),t.dispose()}dispose(){this.enabled=!1;for(const[t,e]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger()}update(t){if(this.enabled)for(const[e,s]of this.list)s.update(t)}};S(Ls,"uuid","fdb61dc4-2ec1-4966-b83d-54ea795fad4a");let As=Ls;function Ac(c,i,t,e){return new Promise((s,n)=>{function r(){const o=c.clientWaitSync(i,t,0);if(o===c.WAIT_FAILED){n();return}if(o===c.TIMEOUT_EXPIRED){setTimeout(r,e);return}s()}r()})}async function Fc(c,i,t,e,s,n,r){const o=c.fenceSync(c.SYNC_GPU_COMMANDS_COMPLETE,0);c.flush(),await Ac(c,o,0,10),c.deleteSync(o),c.bindBuffer(i,t),c.getBufferSubData(i,e,s,n,r),c.bindBuffer(i,null)}async function gc(c,i,t,e,s,n,r,o){const a=c.createBuffer();return c.bindBuffer(c.PIXEL_PACK_BUFFER,a),c.bufferData(c.PIXEL_PACK_BUFFER,o.byteLength,c.STREAM_READ),c.readPixels(i,t,e,s,n,r,0),c.bindBuffer(c.PIXEL_PACK_BUFFER,null),await Fc(c,c.PIXEL_PACK_BUFFER,a,0,o),c.deleteBuffer(a),o}class Sc extends Ws{constructor(){super(...arguments);S(this,"_config",{enabled:{value:!0,type:"Boolean"},width:{type:"Number",interpolable:!0,value:512,min:32,max:1024},height:{type:"Number",interpolable:!0,value:512,min:32,max:1024},autoUpdate:{value:!0,type:"Boolean"},renderDebugFrame:{value:!1,type:"Boolean"},updateInterval:{type:"Number",interpolable:!0,value:1,min:0,max:1},threshold:{type:"Number",interpolable:!0,value:100,min:1,max:512}});S(this,"_interval",null)}get enabled(){return this._config.enabled.value}set enabled(t){this._config.enabled.value=t,this._component.enabled=t}get width(){return this._config.width.value}set width(t){this.setWidthHeight(t,this.height)}get height(){return this._config.height.value}set height(t){this.setWidthHeight(this.width,t)}get autoUpdate(){return this._config.autoUpdate.value}set autoUpdate(t){this.setAutoAndInterval(t,this.updateInterval)}get updateInterval(){return this._config.updateInterval.value}set updateInterval(t){this.setAutoAndInterval(this.autoUpdate,t)}get renderDebugFrame(){return this._config.renderDebugFrame.value}set renderDebugFrame(t){this._config.renderDebugFrame.value=t}get threshold(){return this._config.threshold.value}set threshold(t){this._config.threshold.value=t}setWidthHeight(t,e){if(t<=0||e<=0)throw new Error("The width and height of the culler renderer must be more than 0!");this._config.width.value=t,this._config.height.value=e,this.resetRenderTarget()}setAutoAndInterval(t,e){if(e<=0)throw new Error("The updateInterval of the culler renderer must be more than 0!");this._config.autoUpdate.value=t,this._config.updateInterval.value=e,this.resetInterval(t)}resetRenderTarget(){this._component.renderTarget.dispose(),this._component.renderTarget=new eo(this.width,this.height),this._component.bufferSize=this.width*this.height*4,this._component.buffer=new Uint8Array(this._component.bufferSize)}resetInterval(t){this._interval!==null&&window.clearInterval(this._interval),t&&(this._interval=window.setInterval(async()=>{this._component.preventUpdate||await this._component.updateVisibility()},this.updateInterval))}}class Oc{constructor(i,t){S(this,"onSetup",new tt);S(this,"onDisposed",new tt);S(this,"onViewUpdated",new Ic);S(this,"enabled",!0);S(this,"needsUpdate",!1);S(this,"components");S(this,"renderTarget",new eo);S(this,"bufferSize",1);S(this,"buffer",new Uint8Array);S(this,"preventUpdate",!1);S(this,"config");S(this,"isSetup",!1);S(this,"world");S(this,"renderer");S(this,"_defaultConfig",{enabled:!0,height:512,width:512,updateInterval:1e3,autoUpdate:!0,renderDebugFrame:!1,threshold:100});S(this,"worker");S(this,"scene",new xo);S(this,"_availableColor",1);S(this,"_isWorkerBusy",!1);S(this,"updateVisibility",async i=>{if(!this.enabled||!this.needsUpdate&&!i||this._isWorkerBusy)return;this._isWorkerBusy=!0;const t=this.world.camera.three;t.updateMatrix();const{width:e,height:s}=this.config;this.renderer.setSize(e,s),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,t);const n=this.renderer.getContext();await gc(n,0,0,e,s,n.RGBA,n.UNSIGNED_BYTE,this.buffer),this.renderer.setRenderTarget(null),this.config.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=i,this.config=new Sc(this,this.components,"Culler renderer"),this.world=t,this.renderer=new Bo,this.renderer.clippingPlanes=t.renderer.clippingPlanes;const e=` + */const at={LEFT:1,RIGHT:2,MIDDLE:4},k=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),Ze={NONE:0,IN:1,OUT:-1};function we(c){return c.isPerspectiveCamera}function ge(c){return c.isOrthographicCamera}const je=Math.PI*2,Dr=Math.PI/2,Eo=1e-5,pi=Math.PI/180;function Qt(c,i,t){return Math.max(i,Math.min(t,c))}function pt(c,i=Eo){return Math.abs(c)0==h>u&&(h=u,t.value=(h-u)/n),h}function br(c,i,t,e,s=1/0,n,r){e=Math.max(1e-4,e);const o=2/e,a=o*n,l=1/(1+a+.48*a*a+.235*a*a*a);let u=i.x,f=i.y,I=i.z,h=c.x-u,d=c.y-f,E=c.z-I;const C=u,p=f,A=I,F=s*e,R=F*F,g=h*h+d*d+E*E;if(g>R){const U=Math.sqrt(g);h=h/U*F,d=d/U*F,E=E/U*F}u=c.x-h,f=c.y-d,I=c.z-E;const N=(t.x+o*h)*n,y=(t.y+o*d)*n,w=(t.z+o*E)*n;t.x=(t.x-o*N)*l,t.y=(t.y-o*y)*l,t.z=(t.z-o*w)*l,r.x=u+(h+N)*l,r.y=f+(d+y)*l,r.z=I+(E+w)*l;const L=C-c.x,D=p-c.y,V=A-c.z,O=r.x-C,M=r.y-p,T=r.z-A;return L*O+D*M+V*T>0&&(r.x=C,r.y=p,r.z=A,t.x=(r.x-C)/n,t.y=(r.y-p)/n,t.z=(r.z-A)/n),r}function un(c,i){i.set(0,0),c.forEach(t=>{i.x+=t.clientX,i.y+=t.clientY}),i.x/=c.length,i.y/=c.length}function fn(c,i){return ge(c)?(console.warn(`${i} is not supported in OrthographicCamera`),!0):!1}class Tc{constructor(){this._listeners={}}addEventListener(i,t){const e=this._listeners;e[i]===void 0&&(e[i]=[]),e[i].indexOf(t)===-1&&e[i].push(t)}hasEventListener(i,t){const e=this._listeners;return e[i]!==void 0&&e[i].indexOf(t)!==-1}removeEventListener(i,t){const s=this._listeners[i];if(s!==void 0){const n=s.indexOf(t);n!==-1&&s.splice(n,1)}}removeAllEventListeners(i){if(!i){this._listeners={};return}Array.isArray(this._listeners[i])&&(this._listeners[i].length=0)}dispatchEvent(i){const e=this._listeners[i.type];if(e!==void 0){i.target=this;const s=e.slice(0);for(let n=0,r=s.length;n{},this._enabled=!0,this._state=k.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=Ze.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new ot.Vector3,this._focalOffsetVelocity=new ot.Vector3,this._zoomVelocity={value:0},this._truckInternal=(R,g,N)=>{let y,w;if(we(this._camera)){const L=ct.copy(this._camera.position).sub(this._target),D=this._camera.getEffectiveFOV()*pi,V=L.length()*Math.tan(D*.5);y=this.truckSpeed*R*V/this._elementRect.height,w=this.truckSpeed*g*V/this._elementRect.height}else if(ge(this._camera)){const L=this._camera;y=R*(L.right-L.left)/L.zoom/this._elementRect.width,w=g*(L.top-L.bottom)/L.zoom/this._elementRect.height}else return;this.verticalDragToForward?(N?this.setFocalOffset(this._focalOffsetEnd.x+y,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(y,0,!0),this.forward(-w,!0)):N?this.setFocalOffset(this._focalOffsetEnd.x+y,this._focalOffsetEnd.y+w,this._focalOffsetEnd.z,!0):this.truck(y,w,!0)},this._rotateInternal=(R,g)=>{const N=je*this.azimuthRotateSpeed*R/this._elementRect.height,y=je*this.polarRotateSpeed*g/this._elementRect.height;this.rotate(N,y,!0)},this._dollyInternal=(R,g,N)=>{const y=Math.pow(.95,-R*this.dollySpeed),w=this._sphericalEnd.radius,L=this._sphericalEnd.radius*y,D=Qt(L,this.minDistance,this.maxDistance),V=D-L;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(L,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(V,!0),this._dollyToNoClamp(D,!0)):this._dollyToNoClamp(D,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?L:D)-w,this._dollyControlCoord.set(g,N)),this._lastDollyDirection=Math.sign(-R)},this._zoomInternal=(R,g,N)=>{const y=Math.pow(.95,R*this.dollySpeed),w=this._zoom,L=this._zoom*y;this.zoomTo(L,!0),this.dollyToCursor&&(this._changedZoom+=L-w,this._dollyControlCoord.set(g,N))},typeof ot>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=i,this._yAxisUpSpace=new ot.Quaternion().setFromUnitVectors(this._camera.up,cs),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=k.NONE,this._target=new ot.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new ot.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new ot.Spherical().setFromVector3(ct.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new ot.Vector3,new ot.Vector3,new ot.Vector3,new ot.Vector3],this._updateNearPlaneCorners(),this._boundary=new ot.Box3(new ot.Vector3(-1/0,-1/0,-1/0),new ot.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new ot.Vector2,this.mouseButtons={left:k.ROTATE,middle:k.DOLLY,right:k.TRUCK,wheel:we(this._camera)?k.DOLLY:ge(this._camera)?k.ZOOM:k.NONE},this.touches={one:k.TOUCH_ROTATE,two:we(this._camera)?k.TOUCH_DOLLY_TRUCK:ge(this._camera)?k.TOUCH_ZOOM_TRUCK:k.NONE,three:k.TOUCH_TRUCK};const e=new ot.Vector2,s=new ot.Vector2,n=new ot.Vector2,r=R=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const y=this._domElement.getBoundingClientRect(),w=R.clientX/y.width,L=R.clientY/y.height;if(wthis._interactiveArea.right||Lthis._interactiveArea.bottom)return}const g=R.pointerType!=="mouse"?null:(R.buttons&at.LEFT)===at.LEFT?at.LEFT:(R.buttons&at.MIDDLE)===at.MIDDLE?at.MIDDLE:(R.buttons&at.RIGHT)===at.RIGHT?at.RIGHT:null;if(g!==null){const y=this._findPointerByMouseButton(g);y&&this._disposePointer(y)}if((R.buttons&at.LEFT)===at.LEFT&&this._lockedPointer)return;const N={pointerId:R.pointerId,clientX:R.clientX,clientY:R.clientY,deltaX:0,deltaY:0,mouseButton:g};this._activePointers.push(N),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),this._isDragging=!0,E(R)},o=R=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const y=this._domElement.getBoundingClientRect(),w=R.clientX/y.width,L=R.clientY/y.height;if(wthis._interactiveArea.right||Lthis._interactiveArea.bottom)return}const g=(R.buttons&at.LEFT)===at.LEFT?at.LEFT:(R.buttons&at.MIDDLE)===at.MIDDLE?at.MIDDLE:(R.buttons&at.RIGHT)===at.RIGHT?at.RIGHT:null;if(g!==null){const y=this._findPointerByMouseButton(g);y&&this._disposePointer(y)}const N={pointerId:1,clientX:R.clientX,clientY:R.clientY,deltaX:0,deltaY:0,mouseButton:(R.buttons&at.LEFT)===at.LEFT?at.LEFT:(R.buttons&at.MIDDLE)===at.LEFT?at.MIDDLE:(R.buttons&at.RIGHT)===at.LEFT?at.RIGHT:null};this._activePointers.push(N),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",f),this._domElement.ownerDocument.addEventListener("mousemove",l),this._domElement.ownerDocument.addEventListener("mouseup",f),this._isDragging=!0,E(R)},a=R=>{R.cancelable&&R.preventDefault();const g=R.pointerId,N=this._lockedPointer||this._findPointerById(g);if(N){if(N.clientX=R.clientX,N.clientY=R.clientY,N.deltaX=R.movementX,N.deltaY=R.movementY,this._state=0,R.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(R.buttons&at.LEFT)===at.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(R.buttons&at.MIDDLE)===at.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(R.buttons&at.RIGHT)===at.RIGHT&&(this._state=this._state|this.mouseButtons.right);C()}},l=R=>{const g=this._lockedPointer||this._findPointerById(1);g&&(g.clientX=R.clientX,g.clientY=R.clientY,g.deltaX=R.movementX,g.deltaY=R.movementY,this._state=0,(this._lockedPointer||(R.buttons&at.LEFT)===at.LEFT)&&(this._state=this._state|this.mouseButtons.left),(R.buttons&at.MIDDLE)===at.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(R.buttons&at.RIGHT)===at.RIGHT&&(this._state=this._state|this.mouseButtons.right),C())},u=R=>{const g=this._findPointerById(R.pointerId);if(!(g&&g===this._lockedPointer)){if(g&&this._disposePointer(g),R.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=k.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=k.NONE;p()}},f=()=>{const R=this._findPointerById(1);R&&R===this._lockedPointer||(R&&this._disposePointer(R),this._state=k.NONE,p())};let I=-1;const h=R=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===k.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const L=this._domElement.getBoundingClientRect(),D=R.clientX/L.width,V=R.clientY/L.height;if(Dthis._interactiveArea.right||Vthis._interactiveArea.bottom)return}if(R.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===k.ROTATE||this.mouseButtons.wheel===k.TRUCK){const L=performance.now();I-L<1e3&&this._getClientRect(this._elementRect),I=L}const g=Rc?-1:-3,N=R.deltaMode===1?R.deltaY/g:R.deltaY/(g*10),y=this.dollyToCursor?(R.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,w=this.dollyToCursor?(R.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case k.ROTATE:{this._rotateInternal(R.deltaX,R.deltaY),this._isUserControllingRotate=!0;break}case k.TRUCK:{this._truckInternal(R.deltaX,R.deltaY,!1),this._isUserControllingTruck=!0;break}case k.OFFSET:{this._truckInternal(R.deltaX,R.deltaY,!0),this._isUserControllingOffset=!0;break}case k.DOLLY:{this._dollyInternal(-N,y,w),this._isUserControllingDolly=!0;break}case k.ZOOM:{this._zoomInternal(-N,y,w),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},d=R=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===bt.ACTION.NONE){const g=R instanceof PointerEvent?R.pointerId:(R instanceof MouseEvent,0),N=this._findPointerById(g);N&&this._disposePointer(N),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",f);return}R.preventDefault()}},E=R=>{if(!this._enabled)return;if(un(this._activePointers,Yt),this._getClientRect(this._elementRect),e.copy(Yt),s.copy(Yt),this._activePointers.length>=2){const N=Yt.x-this._activePointers[1].clientX,y=Yt.y-this._activePointers[1].clientY,w=Math.sqrt(N*N+y*y);n.set(0,w);const L=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,D=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;s.set(L,D)}if(this._state=0,!R)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in R&&R.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(R.buttons&at.LEFT)===at.LEFT&&(this._state=this._state|this.mouseButtons.left),(R.buttons&at.MIDDLE)===at.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(R.buttons&at.RIGHT)===at.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&k.ROTATE)===k.ROTATE||(this._state&k.TOUCH_ROTATE)===k.TOUCH_ROTATE||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&k.TRUCK)===k.TRUCK||(this._state&k.TOUCH_TRUCK)===k.TOUCH_TRUCK||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&k.DOLLY)===k.DOLLY||(this._state&k.TOUCH_DOLLY)===k.TOUCH_DOLLY||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&k.ZOOM)===k.ZOOM||(this._state&k.TOUCH_ZOOM)===k.TOUCH_ZOOM||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&k.OFFSET)===k.OFFSET||(this._state&k.TOUCH_OFFSET)===k.TOUCH_OFFSET||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},C=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,un(this._activePointers,Yt);const g=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,N=g?-g.deltaX:s.x-Yt.x,y=g?-g.deltaY:s.y-Yt.y;if(s.copy(Yt),((this._state&k.ROTATE)===k.ROTATE||(this._state&k.TOUCH_ROTATE)===k.TOUCH_ROTATE||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(N,y),this._isUserControllingRotate=!0),(this._state&k.DOLLY)===k.DOLLY||(this._state&k.ZOOM)===k.ZOOM){const w=this.dollyToCursor?(e.x-this._elementRect.x)/this._elementRect.width*2-1:0,L=this.dollyToCursor?(e.y-this._elementRect.y)/this._elementRect.height*-2+1:0,D=this.dollyDragInverted?-1:1;(this._state&k.DOLLY)===k.DOLLY?(this._dollyInternal(D*y*as,w,L),this._isUserControllingDolly=!0):(this._zoomInternal(D*y*as,w,L),this._isUserControllingZoom=!0)}if((this._state&k.TOUCH_DOLLY)===k.TOUCH_DOLLY||(this._state&k.TOUCH_ZOOM)===k.TOUCH_ZOOM||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE){const w=Yt.x-this._activePointers[1].clientX,L=Yt.y-this._activePointers[1].clientY,D=Math.sqrt(w*w+L*L),V=n.y-D;n.set(0,D);const O=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,M=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&k.TOUCH_DOLLY)===k.TOUCH_DOLLY||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET?(this._dollyInternal(V*as,O,M),this._isUserControllingDolly=!0):(this._zoomInternal(V*as,O,M),this._isUserControllingZoom=!0)}((this._state&k.TRUCK)===k.TRUCK||(this._state&k.TOUCH_TRUCK)===k.TOUCH_TRUCK||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(N,y,!1),this._isUserControllingTruck=!0),((this._state&k.OFFSET)===k.OFFSET||(this._state&k.TOUCH_OFFSET)===k.TOUCH_OFFSET||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(N,y,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},p=()=>{un(this._activePointers,Yt),s.copy(Yt),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",f),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",A),this._domElement.ownerDocument.addEventListener("pointerlockerror",F),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),E())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",A),this._domElement.ownerDocument.removeEventListener("pointerlockerror",F))};const A=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},F=()=>{this.unlockPointer()};this._addAllEventListeners=R=>{this._domElement=R,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",r),Ac&&this._domElement.addEventListener("mousedown",o),this._domElement.addEventListener("pointercancel",u),this._domElement.addEventListener("wheel",h,{passive:!1}),this._domElement.addEventListener("contextmenu",d)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",r),this._domElement.removeEventListener("mousedown",o),this._domElement.removeEventListener("pointercancel",u),this._domElement.removeEventListener("wheel",h,{passive:!1}),this._domElement.removeEventListener("contextmenu",d),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",f),this._domElement.ownerDocument.removeEventListener("pointerlockchange",A),this._domElement.ownerDocument.removeEventListener("pointerlockerror",F))},this.cancel=()=>{this._state!==k.NONE&&(this._state=k.NONE,this._activePointers.length=0,p())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(i){this._camera=i,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(i){this._enabled=i,this._domElement&&(i?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(i){this._spherical.radius===i&&this._sphericalEnd.radius===i||(this._spherical.radius=i,this._sphericalEnd.radius=i,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(i){this._spherical.theta===i&&this._sphericalEnd.theta===i||(this._spherical.theta=i,this._sphericalEnd.theta=i,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(i){this._spherical.phi===i&&this._sphericalEnd.phi===i||(this._spherical.phi=i,this._sphericalEnd.phi=i,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(i){this._boundaryEnclosesCamera=i,this._needsUpdate=!0}set interactiveArea(i){this._interactiveArea.width=Qt(i.width,0,1),this._interactiveArea.height=Qt(i.height,0,1),this._interactiveArea.x=Qt(i.x,0,1-this._interactiveArea.width),this._interactiveArea.y=Qt(i.y,0,1-this._interactiveArea.height)}addEventListener(i,t){super.addEventListener(i,t)}removeEventListener(i,t){super.removeEventListener(i,t)}rotate(i,t,e=!1){return this.rotateTo(this._sphericalEnd.theta+i,this._sphericalEnd.phi+t,e)}rotateAzimuthTo(i,t=!1){return this.rotateTo(i,this._sphericalEnd.phi,t)}rotatePolarTo(i,t=!1){return this.rotateTo(this._sphericalEnd.theta,i,t)}rotateTo(i,t,e=!1){this._isUserControllingRotate=!1;const s=Qt(i,this.minAzimuthAngle,this.maxAzimuthAngle),n=Qt(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=s,this._sphericalEnd.phi=n,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,e||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const r=!e||It(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&It(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(r)}dolly(i,t=!1){return this.dollyTo(this._sphericalEnd.radius-i,t)}dollyTo(i,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=Ze.NONE,this._changedDolly=0,this._dollyToNoClamp(Qt(i,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(i,t=!1){const e=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const r=this._collisionTest(),o=It(r,this._spherical.radius);if(!(e>i)&&o)return Promise.resolve();this._sphericalEnd.radius=Math.min(i,r)}else this._sphericalEnd.radius=i;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const n=!t||It(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(n)}dollyInFixed(i,t=!1){this._targetEnd.add(this._getCameraDirection(mi).multiplyScalar(i)),t||this._target.copy(this._targetEnd);const e=!t||It(this._target.x,this._targetEnd.x,this.restThreshold)&&It(this._target.y,this._targetEnd.y,this.restThreshold)&&It(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(e)}zoom(i,t=!1){return this.zoomTo(this._zoomEnd+i,t)}zoomTo(i,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=Qt(i,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const e=!t||It(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(e)}pan(i,t,e=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(i,t,e)}truck(i,t,e=!1){this._camera.updateMatrix(),oe.setFromMatrixColumn(this._camera.matrix,0),ae.setFromMatrixColumn(this._camera.matrix,1),oe.multiplyScalar(i),ae.multiplyScalar(-t);const s=ct.copy(oe).add(ae),n=ft.copy(this._targetEnd).add(s);return this.moveTo(n.x,n.y,n.z,e)}forward(i,t=!1){ct.setFromMatrixColumn(this._camera.matrix,0),ct.crossVectors(this._camera.up,ct),ct.multiplyScalar(i);const e=ft.copy(this._targetEnd).add(ct);return this.moveTo(e.x,e.y,e.z,t)}elevate(i,t=!1){return ct.copy(this._camera.up).multiplyScalar(i),this.moveTo(this._targetEnd.x+ct.x,this._targetEnd.y+ct.y,this._targetEnd.z+ct.z,t)}moveTo(i,t,e,s=!1){this._isUserControllingTruck=!1;const n=ct.set(i,t,e).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,n,this.boundaryFriction),this._needsUpdate=!0,s||this._target.copy(this._targetEnd);const r=!s||It(this._target.x,this._targetEnd.x,this.restThreshold)&&It(this._target.y,this._targetEnd.y,this.restThreshold)&&It(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}lookInDirectionOf(i,t,e,s=!1){const o=ct.set(i,t,e).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(o.x,o.y,o.z,s)}fitToBox(i,t,{cover:e=!1,paddingLeft:s=0,paddingRight:n=0,paddingBottom:r=0,paddingTop:o=0}={}){const a=[],l=i.isBox3?Qe.copy(i):Qe.setFromObject(i);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const u=Ur(this._sphericalEnd.theta,Dr),f=Ur(this._sphericalEnd.phi,Dr);a.push(this.rotateTo(u,f,t));const I=ct.setFromSpherical(this._sphericalEnd).normalize(),h=Vr.setFromUnitVectors(I,hn),d=It(Math.abs(I.y),1);d&&h.multiply(En.setFromAxisAngle(cs,u)),h.multiply(this._yAxisUpSpaceInverse);const E=Yr.makeEmpty();ft.copy(l.min).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.min).setX(l.max.x).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.min).setY(l.max.y).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.max).setZ(l.min.z).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.min).setZ(l.max.z).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.max).setY(l.min.y).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.max).setX(l.min.x).applyQuaternion(h),E.expandByPoint(ft),ft.copy(l.max).applyQuaternion(h),E.expandByPoint(ft),E.min.x-=s,E.min.y-=r,E.max.x+=n,E.max.y+=o,h.setFromUnitVectors(hn,I),d&&h.premultiply(En.invert()),h.premultiply(this._yAxisUpSpace);const C=E.getSize(ct),p=E.getCenter(ft).applyQuaternion(h);if(we(this._camera)){const A=this.getDistanceToFitBox(C.x,C.y,C.z,e);a.push(this.moveTo(p.x,p.y,p.z,t)),a.push(this.dollyTo(A,t)),a.push(this.setFocalOffset(0,0,0,t))}else if(ge(this._camera)){const A=this._camera,F=A.right-A.left,R=A.top-A.bottom,g=e?Math.max(F/C.x,R/C.y):Math.min(F/C.x,R/C.y);a.push(this.moveTo(p.x,p.y,p.z,t)),a.push(this.zoomTo(g,t)),a.push(this.setFocalOffset(0,0,0,t))}return Promise.all(a)}fitToSphere(i,t){const e=[],n=i instanceof ot.Sphere?In.copy(i):bt.createBoundingSphere(i,In);if(e.push(this.moveTo(n.center.x,n.center.y,n.center.z,t)),we(this._camera)){const r=this.getDistanceToFitSphere(n.radius);e.push(this.dollyTo(r,t))}else if(ge(this._camera)){const r=this._camera.right-this._camera.left,o=this._camera.top-this._camera.bottom,a=2*n.radius,l=Math.min(r/a,o/a);e.push(this.zoomTo(l,t))}return e.push(this.setFocalOffset(0,0,0,t)),Promise.all(e)}setLookAt(i,t,e,s,n,r,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Ze.NONE,this._changedDolly=0;const a=ft.set(s,n,r),l=ct.set(i,t,e);this._targetEnd.copy(a),this._sphericalEnd.setFromVector3(l.sub(a).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const u=!o||It(this._target.x,this._targetEnd.x,this.restThreshold)&&It(this._target.y,this._targetEnd.y,this.restThreshold)&&It(this._target.z,this._targetEnd.z,this.restThreshold)&&It(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&It(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&It(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(i,t,e,s,n,r,o,a,l,u,f,I,h,d=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Ze.NONE,this._changedDolly=0;const E=ct.set(s,n,r),C=ft.set(i,t,e);Ht.setFromVector3(C.sub(E).applyQuaternion(this._yAxisUpSpace));const p=qe.set(u,f,I),A=ft.set(o,a,l);Ri.setFromVector3(A.sub(p).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(E.lerp(p,h));const F=Ri.theta-Ht.theta,R=Ri.phi-Ht.phi,g=Ri.radius-Ht.radius;this._sphericalEnd.set(Ht.radius+g*h,Ht.phi+R*h,Ht.theta+F*h),this.normalizeRotations(),this._needsUpdate=!0,d||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const N=!d||It(this._target.x,this._targetEnd.x,this.restThreshold)&&It(this._target.y,this._targetEnd.y,this.restThreshold)&&It(this._target.z,this._targetEnd.z,this.restThreshold)&&It(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&It(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&It(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(N)}setPosition(i,t,e,s=!1){return this.setLookAt(i,t,e,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,s)}setTarget(i,t,e,s=!1){const n=this.getPosition(ct),r=this.setLookAt(n.x,n.y,n.z,i,t,e,s);return this._sphericalEnd.phi=Qt(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),r}setFocalOffset(i,t,e,s=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(i,t,e),this._needsUpdate=!0,s||this._focalOffset.copy(this._focalOffsetEnd);const n=!s||It(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&It(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&It(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}setOrbitPoint(i,t,e){this._camera.updateMatrixWorld(),oe.setFromMatrixColumn(this._camera.matrixWorldInverse,0),ae.setFromMatrixColumn(this._camera.matrixWorldInverse,1),De.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const s=ct.set(i,t,e),n=s.distanceTo(this._camera.position),r=s.sub(this._camera.position);oe.multiplyScalar(r.x),ae.multiplyScalar(r.y),De.multiplyScalar(r.z),ct.copy(oe).add(ae).add(De),ct.z=ct.z+n,this.dollyTo(n,!1),this.setFocalOffset(-ct.x,ct.y,-ct.z,!1),this.moveTo(i,t,e,!1)}setBoundary(i){if(!i){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(i),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(i,t,e,s){if(i===null){this._viewport=null;return}this._viewport=this._viewport||new ot.Vector4,typeof i=="number"?this._viewport.set(i,t,e,s):this._viewport.copy(i)}getDistanceToFitBox(i,t,e,s=!1){if(fn(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const n=i/t,r=this._camera.getEffectiveFOV()*pi,o=this._camera.aspect;return((s?n>o:nt.pointerId===i)}_findPointerByMouseButton(i){return this._activePointers.find(t=>t.mouseButton===i)}_disposePointer(i){this._activePointers.splice(this._activePointers.indexOf(i),1)}_encloseToBoundary(i,t,e){const s=t.lengthSq();if(s===0)return i;const n=ft.copy(t).add(i),o=this._boundary.clampPoint(n,qe).sub(n),a=o.lengthSq();if(a===0)return i.add(t);if(a===s)return i;if(e===0)return i.add(t).add(o);{const l=1+e*a/t.dot(o);return i.add(ft.copy(t).multiplyScalar(l)).add(o.multiplyScalar(1-e))}}_updateNearPlaneCorners(){if(we(this._camera)){const i=this._camera,t=i.near,e=i.getEffectiveFOV()*pi,s=Math.tan(e*.5)*t,n=s*i.aspect;this._nearPlaneCorners[0].set(-n,-s,0),this._nearPlaneCorners[1].set(n,-s,0),this._nearPlaneCorners[2].set(n,s,0),this._nearPlaneCorners[3].set(-n,s,0)}else if(ge(this._camera)){const i=this._camera,t=1/i.zoom,e=i.left*t,s=i.right*t,n=i.top*t,r=i.bottom*t;this._nearPlaneCorners[0].set(e,n,0),this._nearPlaneCorners[1].set(s,n,0),this._nearPlaneCorners[2].set(s,r,0),this._nearPlaneCorners[3].set(e,r,0)}}_collisionTest(){let i=1/0;if(!(this.colliderMeshes.length>=1)||fn(this._camera,"_collisionTest"))return i;const e=this._getTargetDirection(mi);dn.lookAt(vr,e,this._camera.up);for(let s=0;s<4;s++){const n=ft.copy(this._nearPlaneCorners[s]);n.applyMatrix4(dn);const r=qe.addVectors(this._target,n);ls.set(r,e),ls.far=this._spherical.radius+1;const o=ls.intersectObjects(this.colliderMeshes);o.length!==0&&o[0].distance{const e=()=>{this.removeEventListener("rest",e),t()};this.addEventListener("rest",e)}))}_addAllEventListeners(i){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(i){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(i){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(i,t=new ot.Sphere){const e=t,s=e.center;Qe.makeEmpty(),i.traverseVisible(r=>{r.isMesh&&Qe.expandByObject(r)}),Qe.getCenter(s);let n=0;return i.traverseVisible(r=>{if(!r.isMesh)return;const o=r,a=o.geometry.clone();a.applyMatrix4(o.matrixWorld);const u=a.attributes.position;for(let f=0,I=u.count;f{var t;if(!(!this.currentWorld||!this.currentWorld.renderer)){if(this.three instanceof xn){this.onAspectUpdated.trigger();return}if((t=this.currentWorld.renderer)!=null&&t.isResizeable()){const e=this.currentWorld.renderer.getSize();this.three.aspect=e.width/e.height,this.three.updateProjectionMatrix(),this.onAspectUpdated.trigger()}}});this.three=this.setupCamera(),this.setupEvents(!0),this.onWorldChanged.add(({action:e,world:s})=>{if(e==="added"){const n=this.newCameraControls();this._allControls.set(s.uuid,n)}if(e==="removed"){const n=this._allControls.get(s.uuid);n&&(n.dispose(),this._allControls.delete(s.uuid))}})}get controls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");const t=this._allControls.get(this.currentWorld.uuid);if(!t)throw new Error("Controls not found!");return t}get enabled(){return this.currentWorld===null?!1:this.controls.enabled}set enabled(t){this.currentWorld!==null&&(this.controls.enabled=t)}dispose(){this.setupEvents(!1),this.onAspectUpdated.reset(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.three.removeFromParent(),this.onDisposed.trigger(),this.onDisposed.reset();for(const[t,e]of this._allControls)e.dispose()}update(t){this.enabled&&(this.onBeforeUpdate.trigger(this),this.controls.update(t),this.onAfterUpdate.trigger(this))}setupCamera(){const t=window.innerWidth/window.innerHeight,e=new io(60,t,1,1e3);return e.position.set(50,50,50),e.lookAt(new H(0,0,0)),e}newCameraControls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");if(!this.currentWorld.renderer)throw new Error("This camera needs a renderer to work!");bt.install({THREE:er.getSubsetOfThree()});const{domElement:t}=this.currentWorld.renderer.three,e=new bt(this.three,t);return e.smoothTime=.2,e.dollyToCursor=!0,e.infinityDolly=!0,e.minDistance=6,e}setupEvents(t){t?window.addEventListener("resize",this.updateAspect):window.removeEventListener("resize",this.updateAspect)}static getSubsetOfThree(){return{MOUSE:xo,Vector2:Le,Vector3:H,Vector4:vo,Quaternion:Jt,Matrix4:Nt,Spherical:bo,Box3:Lt,Sphere:Vs,Raycaster:Bn,MathUtils:Uo}}}const Ms=class Ms extends Mt{constructor(t){super(t);S(this,"onAfterUpdate",new tt);S(this,"onBeforeUpdate",new tt);S(this,"onDisposed",new tt);S(this,"list",new ie);S(this,"enabled",!0);t.add(Ms.uuid,this)}create(){const t=new Cc(this.components),e=t.uuid;if(this.list.has(e))throw new Error("There is already a world with this name!");return this.list.set(e,t),t}delete(t){if(!this.list.has(t.uuid))throw new Error("The provided world is not found in the list!");this.list.delete(t.uuid),t.dispose()}dispose(){this.enabled=!1;for(const[t,e]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger()}update(t){if(this.enabled)for(const[e,s]of this.list)s.update(t)}};S(Ms,"uuid","fdb61dc4-2ec1-4966-b83d-54ea795fad4a");let gs=Ms;function Fc(c,i,t,e){return new Promise((s,n)=>{function r(){const o=c.clientWaitSync(i,t,0);if(o===c.WAIT_FAILED){n();return}if(o===c.TIMEOUT_EXPIRED){setTimeout(r,e);return}s()}r()})}async function gc(c,i,t,e,s,n,r){const o=c.fenceSync(c.SYNC_GPU_COMMANDS_COMPLETE,0);c.flush(),await Fc(c,o,0,10),c.deleteSync(o),c.bindBuffer(i,t),c.getBufferSubData(i,e,s,n,r),c.bindBuffer(i,null)}async function Sc(c,i,t,e,s,n,r,o){const a=c.createBuffer();return c.bindBuffer(c.PIXEL_PACK_BUFFER,a),c.bufferData(c.PIXEL_PACK_BUFFER,o.byteLength,c.STREAM_READ),c.readPixels(i,t,e,s,n,r,0),c.bindBuffer(c.PIXEL_PACK_BUFFER,null),await gc(c,c.PIXEL_PACK_BUFFER,a,0,o),c.deleteBuffer(a),o}class Oc extends Xs{constructor(){super(...arguments);S(this,"_config",{enabled:{value:!0,type:"Boolean"},width:{type:"Number",interpolable:!0,value:512,min:32,max:1024},height:{type:"Number",interpolable:!0,value:512,min:32,max:1024},autoUpdate:{value:!0,type:"Boolean"},renderDebugFrame:{value:!1,type:"Boolean"},updateInterval:{type:"Number",interpolable:!0,value:1,min:0,max:1},threshold:{type:"Number",interpolable:!0,value:100,min:1,max:512}});S(this,"_interval",null)}get enabled(){return this._config.enabled.value}set enabled(t){this._config.enabled.value=t,this._component.enabled=t}get width(){return this._config.width.value}set width(t){this.setWidthHeight(t,this.height)}get height(){return this._config.height.value}set height(t){this.setWidthHeight(this.width,t)}get autoUpdate(){return this._config.autoUpdate.value}set autoUpdate(t){this.setAutoAndInterval(t,this.updateInterval)}get updateInterval(){return this._config.updateInterval.value}set updateInterval(t){this.setAutoAndInterval(this.autoUpdate,t)}get renderDebugFrame(){return this._config.renderDebugFrame.value}set renderDebugFrame(t){this._config.renderDebugFrame.value=t}get threshold(){return this._config.threshold.value}set threshold(t){this._config.threshold.value=t}setWidthHeight(t,e){if(t<=0||e<=0)throw new Error("The width and height of the culler renderer must be more than 0!");this._config.width.value=t,this._config.height.value=e,this.resetRenderTarget()}setAutoAndInterval(t,e){if(e<=0)throw new Error("The updateInterval of the culler renderer must be more than 0!");this._config.autoUpdate.value=t,this._config.updateInterval.value=e,this.resetInterval(t)}resetRenderTarget(){this._component.renderTarget.dispose(),this._component.renderTarget=new so(this.width,this.height),this._component.bufferSize=this.width*this.height*4,this._component.buffer=new Uint8Array(this._component.bufferSize)}resetInterval(t){this._interval!==null&&window.clearInterval(this._interval),t&&(this._interval=window.setInterval(async()=>{this._component.preventUpdate||await this._component.updateVisibility()},this.updateInterval))}}class Nc{constructor(i,t){S(this,"onSetup",new tt);S(this,"onDisposed",new tt);S(this,"onViewUpdated",new Ec);S(this,"enabled",!0);S(this,"needsUpdate",!1);S(this,"components");S(this,"renderTarget",new so);S(this,"bufferSize",1);S(this,"buffer",new Uint8Array);S(this,"preventUpdate",!1);S(this,"config");S(this,"isSetup",!1);S(this,"world");S(this,"renderer");S(this,"_defaultConfig",{enabled:!0,height:512,width:512,updateInterval:1e3,autoUpdate:!0,renderDebugFrame:!1,threshold:100});S(this,"worker");S(this,"scene",new Bo);S(this,"_availableColor",1);S(this,"_isWorkerBusy",!1);S(this,"updateVisibility",async i=>{if(!this.enabled||!this.needsUpdate&&!i||this._isWorkerBusy)return;this._isWorkerBusy=!0;const t=this.world.camera.three;t.updateMatrix();const{width:e,height:s}=this.config;this.renderer.setSize(e,s),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,t);const n=this.renderer.getContext();await Sc(n,0,0,e,s,n.RGBA,n.UNSIGNED_BYTE,this.buffer),this.renderer.setRenderTarget(null),this.config.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=i,this.config=new Oc(this,this.components,"Culler renderer"),this.world=t,this.renderer=new Yo,this.renderer.clippingPlanes=t.renderer.clippingPlanes;const e=` addEventListener("message", (event) => { const { buffer } = event.data; const colors = new Map(); @@ -24,7 +24,7 @@ var Po=Object.defineProperty;var Lo=(c,i,t)=>i in c?Po(c,i,{enumerable:!0,config } postMessage({ colors }); }); - `,s=new Blob([e],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(s)),this.setup()}dispose(){this.enabled=!1,this.config.autoUpdate=!1,this.components.get(vi).list.delete(this.config.uuid);for(const t of this.scene.children)t.removeFromParent();this.onViewUpdated.reset(),this.worker.terminate(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.renderTarget.dispose(),this.buffer=null,this.onDisposed.reset()}setup(i){const t={...this._defaultConfig,...i},{width:e,height:s}=t;this.config.setWidthHeight(e,s);const{updateInterval:n,autoUpdate:r}=t;this.config.setAutoAndInterval(r,n),this.config.threshold=t.threshold,this.isSetup=!0,this.onSetup.trigger()}getAvailableColor(){let i=BigInt(this._availableColor.toString());const t=[];do t.unshift(Number(i%256n)),i/=256n;while(i);for(;t.length!==3;)t.unshift(0);const[e,s,n]=t,r=`${e}-${s}-${n}`;return{r:e,g:s,b:n,code:r}}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--}}class Nc extends Oc{constructor(t,e){super(t,e);S(this,"onViewUpdated",new tt);S(this,"colorMeshes",new Map);S(this,"_colorCodeMeshMap",new Map);S(this,"_meshIDColorCodeMap",new Map);S(this,"_currentVisibleMeshes",new Set);S(this,"_recentlyHiddenMeshes",new Set);S(this,"_transparentMat",new si({transparent:!0,opacity:0}));S(this,"handleWorkerMessage",async t=>{if(this.preventUpdate)return;const e=t.data.colors;this._recentlyHiddenMeshes=new Set(this._currentVisibleMeshes),this._currentVisibleMeshes.clear();for(const[s,n]of e){if(n{for(const r of s)r.visible=!0;for(const r of n)r.visible=!1})}get threshold(){return this.config.threshold}set threshold(t){this.config.threshold=t}dispose(){super.dispose(),this._currentVisibleMeshes.clear(),this._recentlyHiddenMeshes.clear(),this._meshIDColorCodeMap.clear(),this._transparentMat.dispose(),this._colorCodeMeshMap.clear();const t=this.components.get(ni);for(const e in this.colorMeshes){const s=this.colorMeshes.get(e);s&&t.destroy(s,!0)}this.colorMeshes.clear()}add(t){if(!this.enabled)return;if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const e=t instanceof Cs,{geometry:s,material:n}=t,{colorMaterial:r,code:o}=this.getAvailableMaterial();let a;if(Array.isArray(n)){let f=!0;const I=[];for(const h of n)_r.isTransparent(h)?I.push(this._transparentMat):(f=!1,I.push(r));if(f){r.dispose(),this.preventUpdate=!1;return}a=I}else if(_r.isTransparent(n)){r.dispose(),this.preventUpdate=!1;return}else a=r;this._colorCodeMeshMap.set(o,t),this._meshIDColorCodeMap.set(t.uuid,o);const l=e?t.count:1,u=new Cs(s,a,l);e?u.instanceMatrix=t.instanceMatrix:u.setMatrixAt(0,new Nt),t.visible=!1,t.updateWorldMatrix(!0,!1),u.applyMatrix4(t.matrixWorld),u.updateMatrix(),this.scene.add(u),this.colorMeshes.set(t.uuid,u),this.increaseColor(),this.preventUpdate=!1}remove(t){if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const e=this.components.get(ni);this._currentVisibleMeshes.delete(t),this._recentlyHiddenMeshes.delete(t);const s=this.colorMeshes.get(t.uuid),n=this._meshIDColorCodeMap.get(t.uuid);if(!s||!n){this.preventUpdate=!1;return}this._colorCodeMeshMap.delete(n),this._meshIDColorCodeMap.delete(t.uuid),this.colorMeshes.delete(t.uuid),s.geometry=void 0,s.material=[],e.destroy(s,!0),this._recentlyHiddenMeshes.delete(t),this._currentVisibleMeshes.delete(t),this.preventUpdate=!1}updateInstanced(t){for(const e of t){const s=this.colorMeshes.get(e.uuid);s&&(s.count=e.count)}}getAvailableMaterial(){const{r:t,g:e,b:s,code:n}=this.getAvailableColor(),r=js.enabled;js.enabled=!1;const o=new Vs(`rgb(${t}, ${e}, ${s})`);if(!this.world.renderer)throw new Error("Renderer not found in the world!");const a=this.world.renderer.clippingPlanes,l=new si({color:o,clippingPlanes:a,side:Ys});return js.enabled=r,{colorMaterial:l,code:n}}}const _i=class _i extends Mt{constructor(t){super(t);S(this,"onDisposed",new tt);S(this,"_enabled",!0);S(this,"list",new Map);t.add(_i.uuid,this)}get enabled(){return this._enabled}set enabled(t){this._enabled=t;for(const[e,s]of this.list)s.enabled=t}create(t){if(this.list.has(t.uuid))return this.list.get(t.uuid);const e=new Nc(this.components,t);return this.list.set(t.uuid,e),e}delete(t){const e=this.list.get(t.uuid);e&&e.dispose(),this.list.delete(t.uuid)}dispose(){this.enabled=!1,this.onDisposed.trigger(_i.uuid),this.onDisposed.reset();for(const[t,e]of this.list)e.dispose();this.list.clear()}updateInstanced(t){for(const[,e]of this.list)e.updateInstanced(t)}};S(_i,"uuid","69f2a50d-c266-44fc-b1bd-fa4d34be89e6");let gn=_i;class yc{constructor(i){S(this,"_event");S(this,"_position",new Le);S(this,"onDisposed",new tt);S(this,"updateMouseInfo",i=>{this._event=i});this.dom=i,this.setupEvents(!0)}get position(){if(this._event){const i=this.dom.getBoundingClientRect();this._position.x=this.getPositionX(i,this._event),this._position.y=this.getPositionY(i,this._event)}return this._position}dispose(){this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset()}getPositionY(i,t){return-((this.getDataObject(t).clientY-i.top)/(i.bottom-i.top))*2+1}getPositionX(i,t){return(this.getDataObject(t).clientX-i.left)/(i.right-i.left)*2-1}getDataObject(i){return i instanceof MouseEvent?i:i.touches[0]}setupEvents(i){i?(this.dom.addEventListener("pointermove",this.updateMouseInfo),this.dom.addEventListener("touchstart",this.updateMouseInfo)):(this.dom.removeEventListener("pointermove",this.updateMouseInfo),this.dom.removeEventListener("touchstart",this.updateMouseInfo))}}class Pc{constructor(i,t){S(this,"enabled",!0);S(this,"components");S(this,"onDisposed",new tt);S(this,"mouse");S(this,"three",new vn);S(this,"world");const e=t.renderer;if(!e)throw new Error("A renderer is needed for the raycaster to work!");this.world=t,this.mouse=new yc(e.three.domElement),this.components=i}dispose(){this.mouse.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}castRay(i=Array.from(this.world.meshes)){if(!this.world)throw new Error("A world is needed to cast rays!");const t=this.world.camera.three;return this.three.setFromCamera(this.mouse.position,t),this.intersect(i)}castRayFromVector(i,t,e=Array.from(this.world.meshes)){return this.three.set(i,t),this.intersect(e)}intersect(i=Array.from(this.world.meshes)){const t=this.three.intersectObjects(i),e=this.filterClippingPlanes(t);return e.length>0?e[0]:null}filterClippingPlanes(i){if(!this.world.renderer)throw new Error("Renderer not found!");const t=this.world.renderer.three;if(!t.clippingPlanes)return i;const e=t.clippingPlanes;return i.length<=0||!e||(e==null?void 0:e.length)<=0?i:i.filter(s=>e.every(n=>n.distanceToPoint(s.point)>0))}}const _s=class _s extends Mt{constructor(t){super(t);S(this,"enabled",!0);S(this,"list",new Map);S(this,"onDisposed",new tt);t.add(_s.uuid,this)}get(t){if(this.list.has(t.uuid))return this.list.get(t.uuid);const e=new Pc(this.components,t);return this.list.set(t.uuid,e),t.onDisposed.add(()=>{this.delete(t)}),e}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()}};S(_s,"uuid","d5d8bdf0-db25-4952-b951-b643af207ace");let xi=_s;const Ue=new vn,Ut=new W,Fe=new W,mt=new Jt,Yr={X:new W(1,0,0),Y:new W(0,1,0),Z:new W(0,0,1)},En={type:"change"},Vr={type:"mouseDown"},Gr={type:"mouseUp",mode:null},kr={type:"objectChange"};class Lc extends Ts{constructor(i,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 bc;this._gizmo=e,this.add(e);const s=new vc;this._plane=s,this.add(s);const n=this;function r(A,F){let R=F;Object.defineProperty(n,A,{get:function(){return R!==void 0?R:F},set:function(g){R!==g&&(R=g,s[A]=g,e[A]=g,n.dispatchEvent({type:A+"-changed",value:g}),n.dispatchEvent(En))}}),n[A]=F,s[A]=F,e[A]=F}r("camera",i),r("object",void 0),r("enabled",!0),r("axis",null),r("mode","translate"),r("translationSnap",null),r("rotationSnap",null),r("scaleSnap",null),r("space","world"),r("size",1),r("dragging",!1),r("showX",!0),r("showY",!0),r("showZ",!0);const o=new W,a=new W,l=new Jt,u=new Jt,f=new W,I=new Jt,h=new W,d=new W,E=new W,C=0,p=new W;r("worldPosition",o),r("worldPositionStart",a),r("worldQuaternion",l),r("worldQuaternionStart",u),r("cameraPosition",f),r("cameraQuaternion",I),r("pointStart",h),r("pointEnd",d),r("rotationAxis",E),r("rotationAngle",C),r("eye",p),this._offset=new W,this._startNorm=new W,this._endNorm=new W,this._cameraScale=new W,this._parentPosition=new W,this._parentQuaternion=new Jt,this._parentQuaternionInv=new Jt,this._parentScale=new W,this._worldScaleStart=new W,this._worldQuaternionInv=new Jt,this._worldScale=new W,this._positionStart=new W,this._quaternionStart=new Jt,this._scaleStart=new W,this._getPointer=_c.bind(this),this._onPointerDown=wc.bind(this),this._onPointerHover=Mc.bind(this),this._onPointerMove=Dc.bind(this),this._onPointerUp=Uc.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(i){if(this.object===void 0||this.dragging===!0)return;Ue.setFromCamera(i,this.camera);const t=dn(this._gizmo.picker[this.mode],Ue);t?this.axis=t.object.name:this.axis=null}pointerDown(i){if(!(this.object===void 0||this.dragging===!0||i.button!==0)&&this.axis!==null){Ue.setFromCamera(i,this.camera);const t=dn(this._plane,Ue,!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,Vr.mode=this.mode,this.dispatchEvent(Vr)}}pointerMove(i){const t=this.axis,e=this.mode,s=this.object;let n=this.space;if(e==="scale"?n="local":(t==="E"||t==="XYZE"||t==="XYZ")&&(n="world"),s===void 0||t===null||this.dragging===!1||i.button!==-1)return;Ue.setFromCamera(i,this.camera);const r=dn(this._plane,Ue,!0);if(r){if(this.pointEnd.copy(r.point).sub(this.worldPositionStart),e==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),n==="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),n==="local"&&t!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),s.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(n==="local"&&(s.position.applyQuaternion(mt.copy(this._quaternionStart).invert()),t.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this._quaternionStart)),n==="world"&&(s.parent&&s.position.add(Ut.setFromMatrixPosition(s.parent.matrixWorld)),t.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(Ut.setFromMatrixPosition(s.parent.matrixWorld))));else if(e==="scale"){if(t.search("XYZ")!==-1){let o=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(o*=-1),Fe.set(o,o,o)}else Ut.copy(this.pointStart),Fe.copy(this.pointEnd),Ut.applyQuaternion(this._worldQuaternionInv),Fe.applyQuaternion(this._worldQuaternionInv),Fe.divide(Ut),t.search("X")===-1&&(Fe.x=1),t.search("Y")===-1&&(Fe.y=1),t.search("Z")===-1&&(Fe.z=1);s.scale.copy(this._scaleStart).multiply(Fe),this.scaleSnap&&(t.search("X")!==-1&&(s.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Y")!==-1&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Z")!==-1&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(e==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const o=20/this.worldPosition.distanceTo(Ut.setFromMatrixPosition(this.camera.matrixWorld));let a=!1;t==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(Ut.copy(this.rotationAxis).cross(this.eye))*o):(t==="X"||t==="Y"||t==="Z")&&(this.rotationAxis.copy(Yr[t]),Ut.copy(Yr[t]),n==="local"&&Ut.applyQuaternion(this.worldQuaternion),Ut.cross(this.eye),Ut.length()===0?a=!0:this.rotationAngle=this._offset.dot(Ut.normalize())*o),(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),n==="local"&&t!=="E"&&t!=="XYZE"?(s.quaternion.copy(this._quaternionStart),s.quaternion.multiply(mt.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),s.quaternion.copy(mt.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(En),this.dispatchEvent(kr)}}pointerUp(i){i.button===0&&(this.dragging&&this.axis!==null&&(Gr.mode=this.mode,this.dispatchEvent(Gr)),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(i){i.geometry&&i.geometry.dispose(),i.material&&i.material.dispose()})}attach(i){return this.object=i,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(En),this.dispatchEvent(kr),this.pointStart.copy(this.pointEnd))}getRaycaster(){return Ue}getMode(){return this.mode}setMode(i){this.mode=i}setTranslationSnap(i){this.translationSnap=i}setRotationSnap(i){this.rotationSnap=i}setScaleSnap(i){this.scaleSnap=i}setSize(i){this.size=i}setSpace(i){this.space=i}}function _c(c){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:c.button};{const i=this.domElement.getBoundingClientRect();return{x:(c.clientX-i.left)/i.width*2-1,y:-(c.clientY-i.top)/i.height*2+1,button:c.button}}}function Mc(c){if(this.enabled)switch(c.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(c));break}}function wc(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 Dc(c){this.enabled&&this.pointerMove(this._getPointer(c))}function Uc(c){this.enabled&&(this.domElement.releasePointerCapture(c.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(c)))}function dn(c,i,t){const e=i.intersectObject(c,!0);for(let s=0;s.9&&(r.visible=!1)),this.axis==="Y"&&(mt.setFromEuler(ls.set(0,0,Math.PI/2)),r.quaternion.copy(e).multiply(mt),Math.abs(Et.copy(be).applyQuaternion(e).dot(this.eye))>.9&&(r.visible=!1)),this.axis==="Z"&&(mt.setFromEuler(ls.set(0,Math.PI/2,0)),r.quaternion.copy(e).multiply(mt),Math.abs(Et.copy(yi).applyQuaternion(e).dot(this.eye))>.9&&(r.visible=!1)),this.axis==="XYZE"&&(mt.setFromEuler(ls.set(0,Math.PI/2,0)),Et.copy(this.rotationAxis),r.quaternion.setFromRotationMatrix(Hr.lookAt(zr,Et,be)),r.quaternion.multiply(mt),r.visible=this.dragging),this.axis==="E"&&(r.visible=!1)):r.name==="START"?(r.position.copy(this.worldPositionStart),r.visible=this.dragging):r.name==="END"?(r.position.copy(this.worldPosition),r.visible=this.dragging):r.name==="DELTA"?(r.position.copy(this.worldPositionStart),r.quaternion.copy(this.worldQuaternionStart),Ut.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),Ut.applyQuaternion(this.worldQuaternionStart.clone().invert()),r.scale.copy(Ut),r.visible=this.dragging):(r.quaternion.copy(e),this.dragging?r.position.copy(this.worldPositionStart):r.position.copy(this.worldPosition),this.axis&&(r.visible=this.axis.search(r.name)!==-1));continue}r.quaternion.copy(e),this.mode==="translate"||this.mode==="scale"?(r.name==="X"&&Math.abs(Et.copy(Ni).applyQuaternion(e).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="Y"&&Math.abs(Et.copy(be).applyQuaternion(e).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="Z"&&Math.abs(Et.copy(yi).applyQuaternion(e).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="XY"&&Math.abs(Et.copy(yi).applyQuaternion(e).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="YZ"&&Math.abs(Et.copy(Ni).applyQuaternion(e).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="XZ"&&Math.abs(Et.copy(be).applyQuaternion(e).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1)):this.mode==="rotate"&&(us.copy(e),Et.copy(this.eye).applyQuaternion(mt.copy(e).invert()),r.name.search("E")!==-1&&r.quaternion.setFromRotationMatrix(Hr.lookAt(this.eye,zr,be)),r.name==="X"&&(mt.setFromAxisAngle(Ni,Math.atan2(-Et.y,Et.z)),mt.multiplyQuaternions(us,mt),r.quaternion.copy(mt)),r.name==="Y"&&(mt.setFromAxisAngle(be,Math.atan2(Et.x,Et.z)),mt.multiplyQuaternions(us,mt),r.quaternion.copy(mt)),r.name==="Z"&&(mt.setFromAxisAngle(yi,Math.atan2(Et.y,Et.x)),mt.multiplyQuaternions(us,mt),r.quaternion.copy(mt))),r.visible=r.visible&&(r.name.indexOf("X")===-1||this.showX),r.visible=r.visible&&(r.name.indexOf("Y")===-1||this.showY),r.visible=r.visible&&(r.name.indexOf("Z")===-1||this.showZ),r.visible=r.visible&&(r.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),r.material._color=r.material._color||r.material.color.clone(),r.material._opacity=r.material._opacity||r.material.opacity,r.material.color.copy(r.material._color),r.material.opacity=r.material._opacity,this.enabled&&this.axis&&(r.name===this.axis||this.axis.split("").some(function(a){return r.name===a}))&&(r.material.color.setHex(16776960),r.material.opacity=1)}super.updateMatrixWorld(i)}}class vc extends it{constructor(){super(new so(1e5,1e5,2,2),new si({visible:!1,wireframe:!0,side:Ys,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(i){let t=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(t="local"),fs.copy(Ni).applyQuaternion(t==="local"?this.worldQuaternion:ps),Ai.copy(be).applyQuaternion(t==="local"?this.worldQuaternion:ps),Fi.copy(yi).applyQuaternion(t==="local"?this.worldQuaternion:ps),Et.copy(Ai),this.mode){case"translate":case"scale":switch(this.axis){case"X":Et.copy(this.eye).cross(fs),ce.copy(fs).cross(Et);break;case"Y":Et.copy(this.eye).cross(Ai),ce.copy(Ai).cross(Et);break;case"Z":Et.copy(this.eye).cross(Fi),ce.copy(Fi).cross(Et);break;case"XY":ce.copy(Fi);break;case"YZ":ce.copy(fs);break;case"XZ":Et.copy(Fi),ce.copy(Ai);break;case"XYZ":case"E":ce.set(0,0,0);break}break;case"rotate":default:ce.set(0,0,0)}ce.length()===0?this.quaternion.copy(this.cameraQuaternion):(Wr.lookAt(Ut.set(0,0,0),ce,Et),this.quaternion.setFromRotationMatrix(Wr)),super.updateMatrixWorld(i)}}class tr{constructor(i,t,e,s,n,r=5,o=!0){S(this,"onDraggingStarted",new tt);S(this,"onDraggingEnded",new tt);S(this,"onDisposed",new tt);S(this,"normal");S(this,"origin");S(this,"three",new Un);S(this,"components");S(this,"world");S(this,"type","default");S(this,"_helper");S(this,"_visible",!0);S(this,"_enabled",!0);S(this,"_controlsActive",!1);S(this,"_arrowBoundBox",new it);S(this,"_planeMesh");S(this,"_controls");S(this,"_hiddenMaterial",new si({visible:!1}));S(this,"update",()=>{this._enabled&&this.three.setFromNormalAndCoplanarPoint(this.normal,this._helper.position)});S(this,"changeDrag",i=>{this._visible=!i.value,this.preventCameraMovement(),this.notifyDraggingChanged(i)});if(this.components=i,this.world=t,!t.renderer)throw new Error("The given world must have a renderer!");this.normal=s,this.origin=e,t.renderer.setPlane(!0,this.three),this._planeMesh=tr.newPlaneMesh(r,n),this._helper=this.newHelper(),this._controls=this.newTransformControls(),this.three.setFromNormalAndCoplanarPoint(s,e),o&&this.toggleControls(!0)}get enabled(){return this._enabled}set enabled(i){if(!this.world.isDisposing){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");this._enabled=i,this.world.renderer.setPlane(i,this.three)}}get visible(){return this._visible}set visible(i){this._visible=i,this._controls.visible=i,this._helper.visible=i,this.toggleControls(i)}get meshes(){return[this._planeMesh,this._arrowBoundBox]}get planeMaterial(){return this._planeMesh.material}set planeMaterial(i){this._planeMesh.material=i}get size(){return this._planeMesh.scale.x}set size(i){this._planeMesh.scale.set(i,i,i)}get helper(){return this._helper}setFromNormalAndCoplanarPoint(i,t){this.reset(),this.normal.equals(i)||(this.normal.copy(i),this._helper.lookAt(i)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix(),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 i=new W(1,0,0),t=new W;this.normal.equals(i)||(this.normal.copy(i),this._helper.lookAt(i)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix()}toggleControls(i){if(i){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=i}newTransformControls(){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");const i=this.world.camera.three,t=this.world.renderer.three.domElement,e=new Lc(i,t);return this.initializeControls(e),this.world.scene.three.add(e),e}initializeControls(i){i.attach(this._helper),i.showX=!1,i.showY=!1,i.setSpace("local"),this.createArrowBoundingBox(),i.children[0].children[0].add(this._arrowBoundBox)}createArrowBoundingBox(){this._arrowBoundBox.geometry=new vt(.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(i){i.value?this.onDraggingStarted.trigger():this.onDraggingEnded.trigger()}preventCameraMovement(){this.world.camera.enabled=this._visible}newHelper(){const i=new Ts;return i.lookAt(this.normal),i.position.copy(this.origin),this._planeMesh.position.z+=.01,i.add(this._planeMesh),this.world.scene.three.add(i),i}static newPlaneMesh(i,t){const e=new so(1),s=new it(e,t);return s.scale.set(i,i,i),s}}class xc extends Ws{constructor(){super(...arguments);S(this,"_config",{enabled:{value:!0,type:"Boolean"},visible:{value:!0,type:"Boolean"},color:{value:new Vs,type:"Color"},opacity:{type:"Number",interpolable:!0,value:1,min:0,max:1},size:{type:"Number",interpolable:!0,value:2,min:0,max:100}})}get enabled(){return this._config.enabled.value}set enabled(t){this._config.enabled.value=t,this._component.enabled=t}get visible(){return this._config.visible.value}set visible(t){this._config.visible.value=t,this._component.visible=t}get color(){return this._config.color.value}set color(t){this._config.color.value=t,this._component.material.color.copy(t)}get opacity(){return this._config.opacity.value}set opacity(t){this._config.opacity.value=t,this._component.material.opacity=t}get size(){return this._config.size.value}set size(t){this._config.size.value=t,this._component.size=t}}const Je=class Je extends Mt{constructor(t){super(t);S(this,"onSetup",new tt);S(this,"onBeforeDrag",new tt);S(this,"onAfterDrag",new tt);S(this,"onBeforeCreate",new tt);S(this,"onBeforeCancel",new tt);S(this,"onAfterCancel",new tt);S(this,"onBeforeDelete",new tt);S(this,"onAfterCreate",new tt);S(this,"onAfterDelete",new tt);S(this,"onDisposed",new tt);S(this,"isSetup",!1);S(this,"orthogonalY",!1);S(this,"toleranceOrthogonalY",.7);S(this,"Type",tr);S(this,"list",[]);S(this,"config",new xc(this,this.components,"Clipper",Je.uuid));S(this,"_defaultConfig",{color:new Vs(12255487),opacity:.2,size:2});S(this,"_material",new si({color:12255487,side:Ys,transparent:!0,opacity:.2}));S(this,"_size",5);S(this,"_enabled",!1);S(this,"_visible",!0);S(this,"_onStartDragging",()=>{this.onBeforeDrag.trigger()});S(this,"_onEndDragging",()=>{this.onAfterDrag.trigger()});this.components.add(Je.uuid,this)}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}dispose(){this._enabled=!1,this.components.get(vi).list.delete(this.config.uuid);for(const e of this.list)e.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(Je.uuid),this.onDisposed.reset()}create(t){const n=this.components.get(xi).get(t).castRay();return n?this.createPlaneFromIntersection(t,n):null}createFromNormalAndCoplanarPoint(t,e,s){const n=this.newPlane(t,s,e);return this.updateMaterialsAndPlanes(),n}delete(t,e){e||(e=this.pickPlane(t)),e&&this.deletePlane(e)}deleteAll(t){const e=[...this.list];for(const s of e)if(!t||t.has(s.type)){this.delete(s.world,s);const n=this.list.indexOf(s);n!==-1&&this.list.splice(n,1)}}setup(t){const e={...this._defaultConfig,...t};this.config.color=e.color,this.config.opacity=e.opacity,this.config.size=e.size,this.isSetup=!0,this.onSetup.trigger()}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 s=this.components.get(xi).get(t),n=this.getAllPlaneMeshes(),r=s.castRay(n);if(r){const o=r.object;return this.list.find(a=>a.meshes.includes(o))}}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 s=e.point.distanceTo(new W(0,0,0)),n=(a=e.face)==null?void 0:a.normal;if(!s||!n)return null;const r=this.getWorldNormal(e,n),o=this.newPlane(t,e.point,r.negate());return o.visible=this._visible,o.size=this._size,t.renderer.setPlane(!0,o.three),this.updateMaterialsAndPlanes(),o}getWorldNormal(t,e){const s=t.object;let n=t.object.matrixWorld.clone();if(s instanceof Cs&&t.instanceId!==void 0){const l=new Nt;s.getMatrixAt(t.instanceId,l),n=l.multiply(n)}const o=new Go().getNormalMatrix(n),a=e.clone().applyMatrix3(o).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,s){const n=new this.Type(this.components,t,e,s,this._material);return n.onDraggingStarted.add(this._onStartDragging),n.onDraggingEnded.add(this._onEndDragging),this.list.push(n),this.onAfterCreate.trigger(n),n}updateMaterialsAndPlanes(){const t=this.components.get(As);for(const[e,s]of t.list){if(!s.renderer)continue;s.renderer.updateClippingPlanes();const{clippingPlanes:n}=s.renderer;for(const r of s.meshes)if(r.material)if(Array.isArray(r.material))for(const o of r.material)o.clippingPlanes=n;else r.material.clippingPlanes=n}}};S(Je,"uuid","66290bc5-18c4-4cd1-9379-2e17a0617611");let Sn=Je;class Bc{constructor(i){S(this,"enabled",!1);S(this,"id","FirstPerson");this.camera=i}set(i){if(this.enabled=i,i){if(this.camera.projection.current!=="Perspective"){this.camera.set("Orbit");return}this.setupFirstPersonCamera()}}setupFirstPersonCamera(){const i=this.camera.controls,t=new W;i.distance--,i.getPosition(t),i.minDistance=1,i.maxDistance=1,i.distance=1,i.moveTo(t.x,t.y,t.z),i.truckSpeed=50,i.mouseButtons.wheel=bt.ACTION.DOLLY,i.touches.two=bt.ACTION.TOUCH_ZOOM_TRUCK}}class Yc{constructor(i){S(this,"enabled",!0);S(this,"id","Orbit");this.camera=i,this.activateOrbitControls()}set(i){this.enabled=i,i&&this.activateOrbitControls()}activateOrbitControls(){const i=this.camera.controls;i.minDistance=1,i.maxDistance=300;const t=new W;i.getPosition(t);const e=t.length();i.distance=e,i.truckSpeed=2;const{rotation:s}=this.camera.three,n=new W(0,0,-1).applyEuler(s),r=t.addScaledVector(n,e);i.moveTo(r.x,r.y,r.z)}}class Vc{constructor(i){S(this,"enabled",!1);S(this,"id","Plan");S(this,"mouseAction1");S(this,"mouseAction2");S(this,"mouseInitialized",!1);S(this,"defaultAzimuthSpeed");S(this,"defaultPolarSpeed");this.camera=i,this.defaultAzimuthSpeed=i.controls.azimuthRotateSpeed,this.defaultPolarSpeed=i.controls.polarRotateSpeed}set(i){this.enabled=i;const t=this.camera.controls;t.azimuthRotateSpeed=i?0:this.defaultAzimuthSpeed,t.polarRotateSpeed=i?0:this.defaultPolarSpeed,this.mouseInitialized||(this.mouseAction1=t.touches.one,this.mouseAction2=t.touches.two,this.mouseInitialized=!0),i?(t.mouseButtons.left=bt.ACTION.TRUCK,t.touches.one=bt.ACTION.TOUCH_TRUCK,t.touches.two=bt.ACTION.TOUCH_ZOOM):(t.mouseButtons.left=bt.ACTION.ROTATE,t.touches.one=this.mouseAction1,t.touches.two=this.mouseAction2)}}class Gc{constructor(i){S(this,"onChanged",new tt);S(this,"current","Perspective");S(this,"camera");S(this,"matchOrthoDistanceEnabled",!1);S(this,"_component");S(this,"_previousDistance",-1);this._component=i,this.camera=i.three}async set(i){this.current!==i&&(i==="Orthographic"?this.setOrthoCamera():await this.setPerspectiveCamera(),this.onChanged.trigger(this.camera))}async toggle(){const t=this.current==="Perspective"?"Orthographic":"Perspective";await this.set(t)}setOrthoCamera(){if(this._component.mode===null||this._component.mode.id==="FirstPerson")return;this._previousDistance=this._component.controls.distance,this._component.controls.distance=200;const i=this.getPerspectiveDims();if(!i)return;const{width:t,height:e}=i;this.setupOrthoCamera(e,t),this.camera=this._component.threeOrtho,this.current="Orthographic"}getPerspectiveDims(){const i=this._component.currentWorld;if(!i||!i.renderer)return null;const t=new W;this._component.threePersp.getWorldDirection(t);const e=new W;this._component.controls.getTarget(e);const n=e.clone().sub(this._component.threePersp.position).dot(t),r=i.renderer.getSize(),o=r.x/r.y,a=this._component.threePersp,l=n*2*Math.atan(a.fov*(Math.PI/180)/2);return{width:l*o,height:l}}setupOrthoCamera(i,t){this._component.controls.mouseButtons.wheel=bt.ACTION.ZOOM,this._component.controls.mouseButtons.middle=bt.ACTION.ZOOM;const e=this._component.threePersp,s=this._component.threeOrtho;s.zoom=1,s.left=t/-2,s.right=t/2,s.top=i/2,s.bottom=i/-2,s.updateProjectionMatrix(),s.position.copy(e.position),s.quaternion.copy(e.quaternion),this._component.controls.camera=s}getDistance(){const i=this._component.threePersp,t=this._component.threeOrtho;return(t.top-t.bottom)/t.zoom/(2*Math.atan(i.fov*(Math.PI/180)/2))}async setPerspectiveCamera(){this._component.controls.mouseButtons.wheel=bt.ACTION.DOLLY,this._component.controls.mouseButtons.middle=bt.ACTION.DOLLY;const i=this._component.threePersp,t=this._component.threeOrtho;i.position.copy(t.position),i.quaternion.copy(t.quaternion),this._component.controls.mouseButtons.wheel=bt.ACTION.DOLLY,this.matchOrthoDistanceEnabled?this._component.controls.distance=this.getDistance():this._component.controls.distance=this._previousDistance,await this._component.controls.zoomTo(1),i.updateProjectionMatrix(),this._component.controls.camera=i,this.camera=i,this.current="Perspective"}}class kc extends Jn{constructor(t){super(t);S(this,"projection");S(this,"threeOrtho");S(this,"threePersp");S(this,"_userInputButtons",{});S(this,"_frustumSize",50);S(this,"_navigationModes",new Map);S(this,"_mode",null);S(this,"previousSize",null);this.threePersp=this.three,this.threeOrtho=this.newOrthoCamera(),this.projection=new Gc(this),this.onAspectUpdated.add(()=>{this.setOrthoPerspCameraAspect()}),this.projection.onChanged.add(e=>{this.three=e,this.updateAspect()}),this.onWorldChanged.add(({action:e})=>{e==="added"&&(this._navigationModes.clear(),this._navigationModes.set("Orbit",new Yc(this)),this._navigationModes.set("FirstPerson",new Bc(this)),this._navigationModes.set("Plan",new Vc(this)),this._mode=this._navigationModes.get("Orbit"),this.mode.set(!0,{preventTargetAdjustment:!0}),this.currentWorld&&this.currentWorld.renderer&&(this.previousSize=this.currentWorld.renderer.getSize().clone()))})}get mode(){if(!this._mode)throw new Error("Mode not found, camera not initialized");return this._mode}dispose(){super.dispose(),this.threeOrtho.removeFromParent()}set(t){if(this.mode!==null&&this.mode.id!==t){if(this.mode.set(!1),!this._navigationModes.has(t))throw new Error("The specified mode does not exist!");this._mode=this._navigationModes.get(t),this.mode.set(!0)}}async fit(t,e=1.5){if(!this.enabled)return;const s=Number.MAX_VALUE,n=Number.MIN_VALUE,r=new W(s,s,s),o=new W(n,n,n);for(const h of t){const d=new Lt().setFromObject(h);d.min.xo.x&&(o.x=d.max.x),d.max.y>o.y&&(o.y=d.max.y),d.max.z>o.z&&(o.z=d.max.z)}const a=new Lt(r,o),l=new W;a.getSize(l);const u=new W;a.getCenter(u);const f=Math.max(l.x,l.y,l.z)*e,I=new Bs(u,f);await this.controls.fitToSphere(I,!0)}setUserInput(t){t?this.enableUserInput():this.disableUserInput()}disableUserInput(){this._userInputButtons.left=this.controls.mouseButtons.left,this._userInputButtons.right=this.controls.mouseButtons.right,this._userInputButtons.middle=this.controls.mouseButtons.middle,this._userInputButtons.wheel=this.controls.mouseButtons.wheel,this.controls.mouseButtons.left=0,this.controls.mouseButtons.right=0,this.controls.mouseButtons.middle=0,this.controls.mouseButtons.wheel=0}enableUserInput(){Object.keys(this._userInputButtons).length!==0&&(this.controls.mouseButtons.left=this._userInputButtons.left,this.controls.mouseButtons.right=this._userInputButtons.right,this.controls.mouseButtons.middle=this._userInputButtons.middle,this.controls.mouseButtons.wheel=this._userInputButtons.wheel)}newOrthoCamera(){const t=window.innerWidth/window.innerHeight;return new bn(this._frustumSize*t/-2,this._frustumSize*t/2,this._frustumSize/2,this._frustumSize/-2,.1,1e3)}setOrthoPerspCameraAspect(){if(!this.currentWorld||!this.currentWorld.renderer||!this.previousSize)return;const t=this.currentWorld.renderer.getSize(),e=this.threeOrtho.top,s=this.threeOrtho.right,n=t.y/this.previousSize.y,r=t.x/this.previousSize.x,o=e*n,a=s*r;this.threeOrtho.left=-a,this.threeOrtho.right=a,this.threeOrtho.top=o,this.threeOrtho.bottom=-o,this.threeOrtho.updateProjectionMatrix(),this.previousSize.copy(t)}}const Xr=new Map([[Gs,{forRelated:"Decomposes",forRelating:"IsDecomposedBy"}],[xn,{forRelated:"HasAssociations",forRelating:"AssociatedTo"}],[Bn,{forRelated:"HasAssociations",forRelating:"ClassificationForObjects"}],[Yn,{forRelated:"HasAssignments",forRelating:"IsGroupedBy"}],[Bi,{forRelated:"IsDefinedBy",forRelating:"DefinesOcurrence"}],[Vn,{forRelated:"IsTypedBy",forRelating:"Types"}],[Gn,{forRelated:"IsDefinedBy",forRelating:"Defines"}],[ks,{forRelated:"ContainedInStructure",forRelating:"ContainsElements"}],[kn,{forRelated:"AssignedToFlowElement",forRelating:"HasControlElements"}],[zn,{forRelated:"ConnectedFrom",forRelating:"ConnectedTo"}],[Hn,{forRelated:"HasAssignments",forRelating:"ReferencedBy"}],[Wn,{forRelated:"HasContext",forRelating:"Declares"}],[Xn,{forRelated:"HasAssignments",forRelating:"Controls"}],[$n,{forRelated:"Nests",forRelating:"IsNestedBy"}],[Zn,{forRelated:"HasAssociations",forRelating:"DocumentRefForObjects"}]]),Fs={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 ii{static async getUnits(i){var r,o,a;const{IFCUNITASSIGNMENT:t}=le,e=await i.getAllPropertiesOfType(t);if(!e)return 1;const s=Object.keys(e),n=e[parseInt(s[0],10)];for(const l of n.Units){if(l.value===void 0||l.value===null)continue;const u=await i.getProperties(l.value);if(!u||!u.UnitType||!u.UnitType.value||u.UnitType.value!=="LENGTHUNIT")continue;let I=1,h=1;return u.Name.value==="METRE"&&(h=1),u.Name.value==="FOOT"&&(h=.3048),((r=u.Prefix)==null?void 0:r.value)==="MILLI"?I=.001:((o=u.Prefix)==null?void 0:o.value)==="CENTI"?I=.01:((a=u.Prefix)==null?void 0:a.value)==="DECI"&&(I=.1),h*I}return 1}static async findItemByGuid(i,t){var s;const e=i.getAllPropertiesIDs();for(const n of e){const r=await i.getProperties(n);if(r&&((s=r.GlobalId)==null?void 0:s.value)===t)return r}return null}static async getRelationMap(i,t,e){var a;const n=e??(async()=>{}),r={},o=i.getAllPropertiesIDs();for(const l of o){const u=await i.getProperties(l);if(!u)continue;const f=u.type===t,I=Object.keys(u).find(p=>p.startsWith("Relating")),h=Object.keys(u).find(p=>p.startsWith("Related"));if(!(f&&I&&h))continue;const d=await i.getProperties((a=u[I])==null?void 0:a.value),E=u[h];if(!d||!E||!(E&&Array.isArray(E)))continue;const C=E.map(p=>p.value);await n(d.expressID,C),r[d.expressID]=C}return r}static async getQsetQuantities(i,t,e){const n=e??(()=>{}),r=await i.getProperties(t);return!r||r.type!==Is?null:(r.Quantities??[{}]).map(l=>(l.value&&n(l.value),l.value)).filter(l=>l!==null)}static async getPsetProps(i,t,e){const n=e??(()=>{}),r=await i.getProperties(t);return!r||r.type!==ei?null:(r.HasProperties??[{}]).map(l=>(l.value&&n(l.value),l.value)).filter(l=>l!==null)}static async getPsetRel(i,t){var o;if(!await i.getProperties(t))return null;const s=await i.getAllPropertiesOfType(Bi);if(!s)return null;const n=Object.values(s);let r=null;for(const a of n)((o=a.RelatingPropertyDefinition)==null?void 0:o.value)===t&&(r=a.expressID);return r}static async getQsetRel(i,t){return ii.getPsetRel(i,t)}static async getEntityName(i,t){var r;const e=await i.getProperties(t);if(!e)return{key:null,name:null};const s=Object.keys(e).find(o=>o.endsWith("Name"))??null,n=s?(r=e[s])==null?void 0:r.value:null;return{key:s,name:n}}static async getQuantityValue(i,t){const e=await i.getProperties(t);if(!e)return{key:null,value:null};const s=Object.keys(e).find(r=>r.endsWith("Value"))??null;let n;return s===null||e[s]===void 0||e[s]===null?n=null:n=e[s].value,{key:s,value:n}}static isRel(i){return Fs[i].startsWith("IFCREL")}static async attributeExists(i,t,e){const s=await i.getProperties(t);return s?Object.keys(s).includes(e):!1}static async groupEntitiesByType(i,t){var s;const e=new Map;for(const n of t){const r=await i.getProperties(n);if(!r)continue;const o=r.type;e.get(o)||e.set(o,new Set),(s=e.get(o))==null||s.add(n)}return e}}const zc={IFCURIREFERENCE:"IfcUriReference",IFCTIME:"IfcTime",IFCTEMPERATURERATEOFCHANGEMEASURE:"IfcTemperatureRateOfChangeMeasure",IFCSOUNDPRESSURELEVELMEASURE:"IfcSoundPressureLevelMeasure",IFCSOUNDPOWERLEVELMEASURE:"IfcSoundPowerLevelMeasure",IFCPROPERTYSETDEFINITIONSET:"IfcPropertySetDefinitionSet",IFCPOSITIVEINTEGER:"IfcPositiveInteger",IFCNONNEGATIVELENGTHMEASURE:"IfcNonNegativeLengthMeasure",IFCLINEINDEX:"IfcLineIndex",IFCLANGUAGEID:"IfcLanguageId",IFCDURATION:"IfcDuration",IFCDAYINWEEKNUMBER:"IfcDayInWeekNumber",IFCDATETIME:"IfcDateTime",IFCDATE:"IfcDate",IFCCARDINALPOINTREFERENCE:"IfcCardinalPointReference",IFCBINARY:"IfcBinary",IFCAREADENSITYMEASURE:"IfcAreaDensityMeasure",IFCARCINDEX:"IfcArcIndex",IFCYEARNUMBER:"IfcYearNumber",IFCWARPINGMOMENTMEASURE:"IfcWarpingMomentMeasure",IFCWARPINGCONSTANTMEASURE:"IfcWarpingConstantMeasure",IFCVOLUMETRICFLOWRATEMEASURE:"IfcVolumetricFlowRateMeasure",IFCVOLUMEMEASURE:"IfcVolumeMeasure",IFCVAPORPERMEABILITYMEASURE:"IfcVaporPermeabilityMeasure",IFCTORQUEMEASURE:"IfcTorqueMeasure",IFCTIMESTAMP:"IfcTimestamp",IFCTIMEMEASURE:"IfcTimeMeasure",IFCTHERMODYNAMICTEMPERATUREMEASURE:"IfcThermodynamicTemperatureMeasure",IFCTHERMALTRANSMITTANCEMEASURE:"IfcThermalTransmittanceMeasure",IFCTHERMALRESISTANCEMEASURE:"IfcThermalResistanceMeasure",IFCTHERMALEXPANSIONCOEFFICIENTMEASURE:"IfcThermalExpansionCoefficientMeasure",IFCTHERMALCONDUCTIVITYMEASURE:"IfcThermalConductivityMeasure",IFCTHERMALADMITTANCEMEASURE:"IfcThermalAdmittanceMeasure",IFCTEXTTRANSFORMATION:"IfcTextTransformation",IFCTEXTFONTNAME:"IfcTextFontName",IFCTEXTDECORATION:"IfcTextDecoration",IFCTEXTALIGNMENT:"IfcTextAlignment",IFCTEXT:"IfcText",IFCTEMPERATUREGRADIENTMEASURE:"IfcTemperatureGradientMeasure",IFCSPECULARROUGHNESS:"IfcSpecularRoughness",IFCSPECULAREXPONENT:"IfcSpecularExponent",IFCSPECIFICHEATCAPACITYMEASURE:"IfcSpecificHeatCapacityMeasure",IFCSOUNDPRESSUREMEASURE:"IfcSoundPressureMeasure",IFCSOUNDPOWERMEASURE:"IfcSoundPowerMeasure",IFCSOLIDANGLEMEASURE:"IfcSolidAngleMeasure",IFCSHEARMODULUSMEASURE:"IfcShearModulusMeasure",IFCSECTIONALAREAINTEGRALMEASURE:"IfcSectionalAreaIntegralMeasure",IFCSECTIONMODULUSMEASURE:"IfcSectionModulusMeasure",IFCSECONDINMINUTE:"IfcSecondInMinute",IFCROTATIONALSTIFFNESSMEASURE:"IfcRotationalStiffnessMeasure",IFCROTATIONALMASSMEASURE:"IfcRotationalMassMeasure",IFCROTATIONALFREQUENCYMEASURE:"IfcRotationalFrequencyMeasure",IFCREAL:"IfcReal",IFCRATIOMEASURE:"IfcRatioMeasure",IFCRADIOACTIVITYMEASURE:"IfcRadioactivityMeasure",IFCPRESSUREMEASURE:"IfcPressureMeasure",IFCPRESENTABLETEXT:"IfcPresentableText",IFCPOWERMEASURE:"IfcPowerMeasure",IFCPOSITIVERATIOMEASURE:"IfcPositiveRatioMeasure",IFCPOSITIVEPLANEANGLEMEASURE:"IfcPositivePlaneAngleMeasure",IFCPOSITIVELENGTHMEASURE:"IfcPositiveLengthMeasure",IFCPLANEANGLEMEASURE:"IfcPlaneAngleMeasure",IFCPLANARFORCEMEASURE:"IfcPlanarForceMeasure",IFCPARAMETERVALUE:"IfcParameterValue",IFCPHMEASURE:"IfcPhMeasure",IFCNUMERICMEASURE:"IfcNumericMeasure",IFCNORMALISEDRATIOMEASURE:"IfcNormalisedRatioMeasure",IFCMONTHINYEARNUMBER:"IfcMonthInYearNumber",IFCMONETARYMEASURE:"IfcMonetaryMeasure",IFCMOMENTOFINERTIAMEASURE:"IfcMomentOfInertiaMeasure",IFCMOLECULARWEIGHTMEASURE:"IfcMolecularWeightMeasure",IFCMOISTUREDIFFUSIVITYMEASURE:"IfcMoistureDiffusivityMeasure",IFCMODULUSOFSUBGRADEREACTIONMEASURE:"IfcModulusOfSubgradeReactionMeasure",IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE:"IfcModulusOfRotationalSubgradeReactionMeasure",IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE:"IfcModulusOfLinearSubgradeReactionMeasure",IFCMODULUSOFELASTICITYMEASURE:"IfcModulusOfElasticityMeasure",IFCMINUTEINHOUR:"IfcMinuteInHour",IFCMASSPERLENGTHMEASURE:"IfcMassPerLengthMeasure",IFCMASSMEASURE:"IfcMassMeasure",IFCMASSFLOWRATEMEASURE:"IfcMassFlowRateMeasure",IFCMASSDENSITYMEASURE:"IfcMassDensityMeasure",IFCMAGNETICFLUXMEASURE:"IfcMagneticFluxMeasure",IFCMAGNETICFLUXDENSITYMEASURE:"IfcMagneticFluxDensityMeasure",IFCLUMINOUSINTENSITYMEASURE:"IfcLuminousIntensityMeasure",IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE:"IfcLuminousIntensityDistributionMeasure",IFCLUMINOUSFLUXMEASURE:"IfcLuminousFluxMeasure",IFCLOGICAL:"IfcLogical",IFCLINEARVELOCITYMEASURE:"IfcLinearVelocityMeasure",IFCLINEARSTIFFNESSMEASURE:"IfcLinearStiffnessMeasure",IFCLINEARMOMENTMEASURE:"IfcLinearMomentMeasure",IFCLINEARFORCEMEASURE:"IfcLinearForceMeasure",IFCLENGTHMEASURE:"IfcLengthMeasure",IFCLABEL:"IfcLabel",IFCKINEMATICVISCOSITYMEASURE:"IfcKinematicViscosityMeasure",IFCISOTHERMALMOISTURECAPACITYMEASURE:"IfcIsothermalMoistureCapacityMeasure",IFCIONCONCENTRATIONMEASURE:"IfcIonConcentrationMeasure",IFCINTEGERCOUNTRATEMEASURE:"IfcIntegerCountRateMeasure",IFCINTEGER:"IfcInteger",IFCINDUCTANCEMEASURE:"IfcInductanceMeasure",IFCILLUMINANCEMEASURE:"IfcIlluminanceMeasure",IFCIDENTIFIER:"IfcIdentifier",IFCHOURINDAY:"IfcHourInDay",IFCHEATINGVALUEMEASURE:"IfcHeatingValueMeasure",IFCHEATFLUXDENSITYMEASURE:"IfcHeatFluxDensityMeasure",IFCGLOBALLYUNIQUEID:"IfcGloballyUniqueId",IFCFREQUENCYMEASURE:"IfcFrequencyMeasure",IFCFORCEMEASURE:"IfcForceMeasure",IFCFONTWEIGHT:"IfcFontWeight",IFCFONTVARIANT:"IfcFontVariant",IFCFONTSTYLE:"IfcFontStyle",IFCENERGYMEASURE:"IfcEnergyMeasure",IFCELECTRICVOLTAGEMEASURE:"IfcElectricVoltageMeasure",IFCELECTRICRESISTANCEMEASURE:"IfcElectricResistanceMeasure",IFCELECTRICCURRENTMEASURE:"IfcElectricCurrentMeasure",IFCELECTRICCONDUCTANCEMEASURE:"IfcElectricConductanceMeasure",IFCELECTRICCHARGEMEASURE:"IfcElectricChargeMeasure",IFCELECTRICCAPACITANCEMEASURE:"IfcElectricCapacitanceMeasure",IFCDYNAMICVISCOSITYMEASURE:"IfcDynamicViscosityMeasure",IFCDOSEEQUIVALENTMEASURE:"IfcDoseEquivalentMeasure",IFCDIMENSIONCOUNT:"IfcDimensionCount",IFCDESCRIPTIVEMEASURE:"IfcDescriptiveMeasure",IFCDAYLIGHTSAVINGHOUR:"IfcDaylightSavingHour",IFCDAYINMONTHNUMBER:"IfcDayInMonthNumber",IFCCURVATUREMEASURE:"IfcCurvatureMeasure",IFCCOUNTMEASURE:"IfcCountMeasure",IFCCONTEXTDEPENDENTMEASURE:"IfcContextDependentMeasure",IFCCOMPOUNDPLANEANGLEMEASURE:"IfcCompoundPlaneAngleMeasure",IFCCOMPLEXNUMBER:"IfcComplexNumber",IFCBOXALIGNMENT:"IfcBoxAlignment",IFCBOOLEAN:"IfcBoolean",IFCAREAMEASURE:"IfcAreaMeasure",IFCANGULARVELOCITYMEASURE:"IfcAngularVelocityMeasure",IFCAMOUNTOFSUBSTANCEMEASURE:"IfcAmountOfSubstanceMeasure",IFCACCELERATIONMEASURE:"IfcAccelerationMeasure",IFCABSORBEDDOSEMEASURE:"IfcAbsorbedDoseMeasure",IFCGEOSLICE:"IfcGeoSlice",IFCGEOMODEL:"IfcGeoModel",IFCELECTRICFLOWTREATMENTDEVICE:"IfcElectricFlowTreatmentDevice",IFCDISTRIBUTIONBOARD:"IfcDistributionBoard",IFCCONVEYORSEGMENT:"IfcConveyorSegment",IFCCAISSONFOUNDATION:"IfcCaissonFoundation",IFCBOREHOLE:"IfcBorehole",IFCBEARING:"IfcBearing",IFCALIGNMENT:"IfcAlignment",IFCTRACKELEMENT:"IfcTrackElement",IFCSIGNAL:"IfcSignal",IFCREINFORCEDSOIL:"IfcReinforcedSoil",IFCRAIL:"IfcRail",IFCPAVEMENT:"IfcPavement",IFCNAVIGATIONELEMENT:"IfcNavigationElement",IFCMOORINGDEVICE:"IfcMooringDevice",IFCMOBILETELECOMMUNICATIONSAPPLIANCE:"IfcMobileTelecommunicationsAppliance",IFCLIQUIDTERMINAL:"IfcLiquidTerminal",IFCLINEARPOSITIONINGELEMENT:"IfcLinearPositioningElement",IFCKERB:"IfcKerb",IFCGEOTECHNICALASSEMBLY:"IfcGeotechnicalAssembly",IFCELECTRICFLOWTREATMENTDEVICETYPE:"IfcElectricFlowTreatmentDeviceType",IFCEARTHWORKSFILL:"IfcEarthworksFill",IFCEARTHWORKSELEMENT:"IfcEarthworksElement",IFCEARTHWORKSCUT:"IfcEarthworksCut",IFCDISTRIBUTIONBOARDTYPE:"IfcDistributionBoardType",IFCDEEPFOUNDATION:"IfcDeepFoundation",IFCCOURSE:"IfcCourse",IFCCONVEYORSEGMENTTYPE:"IfcConveyorSegmentType",IFCCAISSONFOUNDATIONTYPE:"IfcCaissonFoundationType",IFCBUILTSYSTEM:"IfcBuiltSystem",IFCBUILTELEMENT:"IfcBuiltElement",IFCBRIDGEPART:"IfcBridgePart",IFCBRIDGE:"IfcBridge",IFCBEARINGTYPE:"IfcBearingType",IFCALIGNMENTVERTICAL:"IfcAlignmentVertical",IFCALIGNMENTSEGMENT:"IfcAlignmentSegment",IFCALIGNMENTHORIZONTAL:"IfcAlignmentHorizontal",IFCALIGNMENTCANT:"IfcAlignmentCant",IFCVIBRATIONDAMPERTYPE:"IfcVibrationDamperType",IFCVIBRATIONDAMPER:"IfcVibrationDamper",IFCVEHICLE:"IfcVehicle",IFCTRANSPORTATIONDEVICE:"IfcTransportationDevice",IFCTRACKELEMENTTYPE:"IfcTrackElementType",IFCTENDONCONDUITTYPE:"IfcTendonConduitType",IFCTENDONCONDUIT:"IfcTendonConduit",IFCSINESPIRAL:"IfcSineSpiral",IFCSIGNALTYPE:"IfcSignalType",IFCSIGNTYPE:"IfcSignType",IFCSIGN:"IfcSign",IFCSEVENTHORDERPOLYNOMIALSPIRAL:"IfcSeventhOrderPolynomialSpiral",IFCSEGMENTEDREFERENCECURVE:"IfcSegmentedReferenceCurve",IFCSECONDORDERPOLYNOMIALSPIRAL:"IfcSecondOrderPolynomialSpiral",IFCROADPART:"IfcRoadPart",IFCROAD:"IfcRoad",IFCRELADHERESTOELEMENT:"IfcRelAdheresToElement",IFCREFERENT:"IfcReferent",IFCRAILWAYPART:"IfcRailwayPart",IFCRAILWAY:"IfcRailway",IFCRAILTYPE:"IfcRailType",IFCPOSITIONINGELEMENT:"IfcPositioningElement",IFCPAVEMENTTYPE:"IfcPavementType",IFCNAVIGATIONELEMENTTYPE:"IfcNavigationElementType",IFCMOORINGDEVICETYPE:"IfcMooringDeviceType",IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE:"IfcMobileTelecommunicationsApplianceType",IFCMARINEPART:"IfcMarinePart",IFCMARINEFACILITY:"IfcMarineFacility",IFCLIQUIDTERMINALTYPE:"IfcLiquidTerminalType",IFCLINEARELEMENT:"IfcLinearElement",IFCKERBTYPE:"IfcKerbType",IFCIMPACTPROTECTIONDEVICETYPE:"IfcImpactProtectionDeviceType",IFCIMPACTPROTECTIONDEVICE:"IfcImpactProtectionDevice",IFCGRADIENTCURVE:"IfcGradientCurve",IFCGEOTECHNICALSTRATUM:"IfcGeotechnicalStratum",IFCGEOTECHNICALELEMENT:"IfcGeotechnicalElement",IFCFACILITYPARTCOMMON:"IfcFacilityPartCommon",IFCFACILITYPART:"IfcFacilityPart",IFCFACILITY:"IfcFacility",IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID:"IfcDirectrixDerivedReferenceSweptAreaSolid",IFCDEEPFOUNDATIONTYPE:"IfcDeepFoundationType",IFCCOURSETYPE:"IfcCourseType",IFCCOSINESPIRAL:"IfcCosineSpiral",IFCCLOTHOID:"IfcClothoid",IFCBUILTELEMENTTYPE:"IfcBuiltElementType",IFCVEHICLETYPE:"IfcVehicleType",IFCTRIANGULATEDIRREGULARNETWORK:"IfcTriangulatedIrregularNetwork",IFCTRANSPORTATIONDEVICETYPE:"IfcTransportationDeviceType",IFCTHIRDORDERPOLYNOMIALSPIRAL:"IfcThirdOrderPolynomialSpiral",IFCSPIRAL:"IfcSpiral",IFCSECTIONEDSURFACE:"IfcSectionedSurface",IFCSECTIONEDSOLIDHORIZONTAL:"IfcSectionedSolidHorizontal",IFCSECTIONEDSOLID:"IfcSectionedSolid",IFCRELPOSITIONS:"IfcRelPositions",IFCRELASSOCIATESPROFILEDEF:"IfcRelAssociatesProfileDef",IFCPOLYNOMIALCURVE:"IfcPolynomialCurve",IFCOFFSETCURVEBYDISTANCES:"IfcOffsetCurveByDistances",IFCOFFSETCURVE:"IfcOffsetCurve",IFCINDEXEDPOLYGONALTEXTUREMAP:"IfcIndexedPolygonalTextureMap",IFCDIRECTRIXCURVESWEPTAREASOLID:"IfcDirectrixCurveSweptAreaSolid",IFCCURVESEGMENT:"IfcCurveSegment",IFCAXIS2PLACEMENTLINEAR:"IfcAxis2PlacementLinear",IFCSEGMENT:"IfcSegment",IFCPOINTBYDISTANCEEXPRESSION:"IfcPointByDistanceExpression",IFCOPENCROSSPROFILEDEF:"IfcOpenCrossProfileDef",IFCLINEARPLACEMENT:"IfcLinearPlacement",IFCALIGNMENTHORIZONTALSEGMENT:"IfcAlignmentHorizontalSegment",IFCALIGNMENTCANTSEGMENT:"IfcAlignmentCantSegment",IFCTEXTURECOORDINATEINDICESWITHVOIDS:"IfcTextureCoordinateIndicesWithVoids",IFCTEXTURECOORDINATEINDICES:"IfcTextureCoordinateIndices",IFCQUANTITYNUMBER:"IfcQuantityNumber",IFCALIGNMENTVERTICALSEGMENT:"IfcAlignmentVerticalSegment",IFCALIGNMENTPARAMETERSEGMENT:"IfcAlignmentParameterSegment",IFCCONTROLLER:"IfcController",IFCALARM:"IfcAlarm",IFCACTUATOR:"IfcActuator",IFCUNITARYCONTROLELEMENT:"IfcUnitaryControlElement",IFCSENSOR:"IfcSensor",IFCPROTECTIVEDEVICETRIPPINGUNIT:"IfcProtectiveDeviceTrippingUnit",IFCFLOWINSTRUMENT:"IfcFlowInstrument",IFCFIRESUPPRESSIONTERMINAL:"IfcFireSuppressionTerminal",IFCFILTER:"IfcFilter",IFCFAN:"IfcFan",IFCELECTRICTIMECONTROL:"IfcElectricTimeControl",IFCELECTRICMOTOR:"IfcElectricMotor",IFCELECTRICGENERATOR:"IfcElectricGenerator",IFCELECTRICFLOWSTORAGEDEVICE:"IfcElectricFlowStorageDevice",IFCELECTRICDISTRIBUTIONBOARD:"IfcElectricDistributionBoard",IFCELECTRICAPPLIANCE:"IfcElectricAppliance",IFCDUCTSILENCER:"IfcDuctSilencer",IFCDUCTSEGMENT:"IfcDuctSegment",IFCDUCTFITTING:"IfcDuctFitting",IFCDISTRIBUTIONCIRCUIT:"IfcDistributionCircuit",IFCDAMPER:"IfcDamper",IFCCOOLINGTOWER:"IfcCoolingTower",IFCCOOLEDBEAM:"IfcCooledBeam",IFCCONDENSER:"IfcCondenser",IFCCOMPRESSOR:"IfcCompressor",IFCCOMMUNICATIONSAPPLIANCE:"IfcCommunicationsAppliance",IFCCOIL:"IfcCoil",IFCCHILLER:"IfcChiller",IFCCABLESEGMENT:"IfcCableSegment",IFCCABLEFITTING:"IfcCableFitting",IFCCABLECARRIERSEGMENT:"IfcCableCarrierSegment",IFCCABLECARRIERFITTING:"IfcCableCarrierFitting",IFCBURNER:"IfcBurner",IFCBOILER:"IfcBoiler",IFCBEAMSTANDARDCASE:"IfcBeamStandardCase",IFCAUDIOVISUALAPPLIANCE:"IfcAudioVisualAppliance",IFCAIRTOAIRHEATRECOVERY:"IfcAirToAirHeatRecovery",IFCAIRTERMINALBOX:"IfcAirTerminalBox",IFCAIRTERMINAL:"IfcAirTerminal",IFCWINDOWSTANDARDCASE:"IfcWindowStandardCase",IFCWASTETERMINAL:"IfcWasteTerminal",IFCWALLELEMENTEDCASE:"IfcWallElementedCase",IFCVALVE:"IfcValve",IFCUNITARYEQUIPMENT:"IfcUnitaryEquipment",IFCUNITARYCONTROLELEMENTTYPE:"IfcUnitaryControlElementType",IFCTUBEBUNDLE:"IfcTubeBundle",IFCTRANSFORMER:"IfcTransformer",IFCTANK:"IfcTank",IFCSWITCHINGDEVICE:"IfcSwitchingDevice",IFCSTRUCTURALLOADCASE:"IfcStructuralLoadCase",IFCSTACKTERMINAL:"IfcStackTerminal",IFCSPACEHEATER:"IfcSpaceHeater",IFCSOLARDEVICE:"IfcSolarDevice",IFCSLABSTANDARDCASE:"IfcSlabStandardCase",IFCSLABELEMENTEDCASE:"IfcSlabElementedCase",IFCSHADINGDEVICE:"IfcShadingDevice",IFCSANITARYTERMINAL:"IfcSanitaryTerminal",IFCREINFORCINGBARTYPE:"IfcReinforcingBarType",IFCRATIONALBSPLINECURVEWITHKNOTS:"IfcRationalBSplineCurveWithKnots",IFCPUMP:"IfcPump",IFCPROTECTIVEDEVICETRIPPINGUNITTYPE:"IfcProtectiveDeviceTrippingUnitType",IFCPROTECTIVEDEVICE:"IfcProtectiveDevice",IFCPLATESTANDARDCASE:"IfcPlateStandardCase",IFCPIPESEGMENT:"IfcPipeSegment",IFCPIPEFITTING:"IfcPipeFitting",IFCOUTLET:"IfcOutlet",IFCOUTERBOUNDARYCURVE:"IfcOuterBoundaryCurve",IFCMOTORCONNECTION:"IfcMotorConnection",IFCMEMBERSTANDARDCASE:"IfcMemberStandardCase",IFCMEDICALDEVICE:"IfcMedicalDevice",IFCLIGHTFIXTURE:"IfcLightFixture",IFCLAMP:"IfcLamp",IFCJUNCTIONBOX:"IfcJunctionBox",IFCINTERCEPTOR:"IfcInterceptor",IFCHUMIDIFIER:"IfcHumidifier",IFCHEATEXCHANGER:"IfcHeatExchanger",IFCFLOWMETER:"IfcFlowMeter",IFCEXTERNALSPATIALELEMENT:"IfcExternalSpatialElement",IFCEVAPORATOR:"IfcEvaporator",IFCEVAPORATIVECOOLER:"IfcEvaporativeCooler",IFCENGINE:"IfcEngine",IFCELECTRICDISTRIBUTIONBOARDTYPE:"IfcElectricDistributionBoardType",IFCDOORSTANDARDCASE:"IfcDoorStandardCase",IFCDISTRIBUTIONSYSTEM:"IfcDistributionSystem",IFCCOMMUNICATIONSAPPLIANCETYPE:"IfcCommunicationsApplianceType",IFCCOLUMNSTANDARDCASE:"IfcColumnStandardCase",IFCCIVILELEMENT:"IfcCivilElement",IFCCHIMNEY:"IfcChimney",IFCCABLEFITTINGTYPE:"IfcCableFittingType",IFCBURNERTYPE:"IfcBurnerType",IFCBUILDINGSYSTEM:"IfcBuildingSystem",IFCBUILDINGELEMENTPARTTYPE:"IfcBuildingElementPartType",IFCBOUNDARYCURVE:"IfcBoundaryCurve",IFCBSPLINECURVEWITHKNOTS:"IfcBSplineCurveWithKnots",IFCAUDIOVISUALAPPLIANCETYPE:"IfcAudioVisualApplianceType",IFCWORKCALENDAR:"IfcWorkCalendar",IFCWINDOWTYPE:"IfcWindowType",IFCVOIDINGFEATURE:"IfcVoidingFeature",IFCVIBRATIONISOLATOR:"IfcVibrationIsolator",IFCTENDONTYPE:"IfcTendonType",IFCTENDONANCHORTYPE:"IfcTendonAnchorType",IFCSYSTEMFURNITUREELEMENT:"IfcSystemFurnitureElement",IFCSURFACEFEATURE:"IfcSurfaceFeature",IFCSTRUCTURALSURFACEACTION:"IfcStructuralSurfaceAction",IFCSTRUCTURALCURVEREACTION:"IfcStructuralCurveReaction",IFCSTRUCTURALCURVEACTION:"IfcStructuralCurveAction",IFCSTAIRTYPE:"IfcStairType",IFCSOLARDEVICETYPE:"IfcSolarDeviceType",IFCSHADINGDEVICETYPE:"IfcShadingDeviceType",IFCSEAMCURVE:"IfcSeamCurve",IFCROOFTYPE:"IfcRoofType",IFCREINFORCINGMESHTYPE:"IfcReinforcingMeshType",IFCREINFORCINGELEMENTTYPE:"IfcReinforcingElementType",IFCRATIONALBSPLINESURFACEWITHKNOTS:"IfcRationalBSplineSurfaceWithKnots",IFCRAMPTYPE:"IfcRampType",IFCPOLYGONALFACESET:"IfcPolygonalFaceSet",IFCPILETYPE:"IfcPileType",IFCOPENINGSTANDARDCASE:"IfcOpeningStandardCase",IFCMEDICALDEVICETYPE:"IfcMedicalDeviceType",IFCINTERSECTIONCURVE:"IfcIntersectionCurve",IFCINTERCEPTORTYPE:"IfcInterceptorType",IFCINDEXEDPOLYCURVE:"IfcIndexedPolyCurve",IFCGEOGRAPHICELEMENT:"IfcGeographicElement",IFCFURNITURE:"IfcFurniture",IFCFOOTINGTYPE:"IfcFootingType",IFCEXTERNALSPATIALSTRUCTUREELEMENT:"IfcExternalSpatialStructureElement",IFCEVENT:"IfcEvent",IFCENGINETYPE:"IfcEngineType",IFCELEMENTASSEMBLYTYPE:"IfcElementAssemblyType",IFCDOORTYPE:"IfcDoorType",IFCCYLINDRICALSURFACE:"IfcCylindricalSurface",IFCCONSTRUCTIONPRODUCTRESOURCETYPE:"IfcConstructionProductResourceType",IFCCONSTRUCTIONMATERIALRESOURCETYPE:"IfcConstructionMaterialResourceType",IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE:"IfcConstructionEquipmentResourceType",IFCCOMPOSITECURVEONSURFACE:"IfcCompositeCurveOnSurface",IFCCOMPLEXPROPERTYTEMPLATE:"IfcComplexPropertyTemplate",IFCCIVILELEMENTTYPE:"IfcCivilElementType",IFCCHIMNEYTYPE:"IfcChimneyType",IFCBSPLINESURFACEWITHKNOTS:"IfcBSplineSurfaceWithKnots",IFCBSPLINESURFACE:"IfcBSplineSurface",IFCADVANCEDBREPWITHVOIDS:"IfcAdvancedBrepWithVoids",IFCADVANCEDBREP:"IfcAdvancedBrep",IFCTRIANGULATEDFACESET:"IfcTriangulatedFaceSet",IFCTOROIDALSURFACE:"IfcToroidalSurface",IFCTESSELLATEDFACESET:"IfcTessellatedFaceSet",IFCTASKTYPE:"IfcTaskType",IFCSURFACECURVE:"IfcSurfaceCurve",IFCSUBCONTRACTRESOURCETYPE:"IfcSubContractResourceType",IFCSTRUCTURALSURFACEREACTION:"IfcStructuralSurfaceReaction",IFCSPHERICALSURFACE:"IfcSphericalSurface",IFCSPATIALZONETYPE:"IfcSpatialZoneType",IFCSPATIALZONE:"IfcSpatialZone",IFCSPATIALELEMENTTYPE:"IfcSpatialElementType",IFCSPATIALELEMENT:"IfcSpatialElement",IFCSIMPLEPROPERTYTEMPLATE:"IfcSimplePropertyTemplate",IFCREVOLVEDAREASOLIDTAPERED:"IfcRevolvedAreaSolidTapered",IFCREPARAMETRISEDCOMPOSITECURVESEGMENT:"IfcReparametrisedCompositeCurveSegment",IFCRELSPACEBOUNDARY2NDLEVEL:"IfcRelSpaceBoundary2ndLevel",IFCRELSPACEBOUNDARY1STLEVEL:"IfcRelSpaceBoundary1stLevel",IFCRELINTERFERESELEMENTS:"IfcRelInterferesElements",IFCRELDEFINESBYTEMPLATE:"IfcRelDefinesByTemplate",IFCRELDEFINESBYOBJECT:"IfcRelDefinesByObject",IFCRELDECLARES:"IfcRelDeclares",IFCRELASSIGNSTOGROUPBYFACTOR:"IfcRelAssignsToGroupByFactor",IFCPROPERTYTEMPLATE:"IfcPropertyTemplate",IFCPROPERTYSETTEMPLATE:"IfcPropertySetTemplate",IFCPROJECTLIBRARY:"IfcProjectLibrary",IFCPROCEDURETYPE:"IfcProcedureType",IFCPREDEFINEDPROPERTYSET:"IfcPredefinedPropertySet",IFCPCURVE:"IfcPCurve",IFCLABORRESOURCETYPE:"IfcLaborResourceType",IFCINDEXEDPOLYGONALFACEWITHVOIDS:"IfcIndexedPolygonalFaceWithVoids",IFCINDEXEDPOLYGONALFACE:"IfcIndexedPolygonalFace",IFCGEOGRAPHICELEMENTTYPE:"IfcGeographicElementType",IFCFIXEDREFERENCESWEPTAREASOLID:"IfcFixedReferenceSweptAreaSolid",IFCEXTRUDEDAREASOLIDTAPERED:"IfcExtrudedAreaSolidTapered",IFCEVENTTYPE:"IfcEventType",IFCCURVEBOUNDEDSURFACE:"IfcCurveBoundedSurface",IFCCREWRESOURCETYPE:"IfcCrewResourceType",IFCCONTEXT:"IfcContext",IFCCONSTRUCTIONRESOURCETYPE:"IfcConstructionResourceType",IFCCARTESIANPOINTLIST3D:"IfcCartesianPointList3D",IFCCARTESIANPOINTLIST2D:"IfcCartesianPointList2D",IFCCARTESIANPOINTLIST:"IfcCartesianPointList",IFCADVANCEDFACE:"IfcAdvancedFace",IFCTYPERESOURCE:"IfcTypeResource",IFCTYPEPROCESS:"IfcTypeProcess",IFCTESSELLATEDITEM:"IfcTessellatedItem",IFCSWEPTDISKSOLIDPOLYGONAL:"IfcSweptDiskSolidPolygonal",IFCRESOURCETIME:"IfcResourceTime",IFCRESOURCECONSTRAINTRELATIONSHIP:"IfcResourceConstraintRelationship",IFCRESOURCEAPPROVALRELATIONSHIP:"IfcResourceApprovalRelationship",IFCQUANTITYSET:"IfcQuantitySet",IFCPROPERTYTEMPLATEDEFINITION:"IfcPropertyTemplateDefinition",IFCPREDEFINEDPROPERTIES:"IfcPredefinedProperties",IFCMIRROREDPROFILEDEF:"IfcMirroredProfileDef",IFCMATERIALRELATIONSHIP:"IfcMaterialRelationship",IFCMATERIALPROFILESETUSAGETAPERING:"IfcMaterialProfileSetUsageTapering",IFCMATERIALPROFILESETUSAGE:"IfcMaterialProfileSetUsage",IFCMATERIALCONSTITUENTSET:"IfcMaterialConstituentSet",IFCMATERIALCONSTITUENT:"IfcMaterialConstituent",IFCLAGTIME:"IfcLagTime",IFCINDEXEDTRIANGLETEXTUREMAP:"IfcIndexedTriangleTextureMap",IFCINDEXEDTEXTUREMAP:"IfcIndexedTextureMap",IFCINDEXEDCOLOURMAP:"IfcIndexedColourMap",IFCEXTERNALREFERENCERELATIONSHIP:"IfcExternalReferenceRelationship",IFCEXTENDEDPROPERTIES:"IfcExtendedProperties",IFCEVENTTIME:"IfcEventTime",IFCCONVERSIONBASEDUNITWITHOFFSET:"IfcConversionBasedUnitWithOffset",IFCCOLOURRGBLIST:"IfcColourRgbList",IFCWORKTIME:"IfcWorkTime",IFCTIMEPERIOD:"IfcTimePeriod",IFCTEXTUREVERTEXLIST:"IfcTextureVertexList",IFCTASKTIMERECURRING:"IfcTaskTimeRecurring",IFCTASKTIME:"IfcTaskTime",IFCTABLECOLUMN:"IfcTableColumn",IFCSURFACEREINFORCEMENTAREA:"IfcSurfaceReinforcementArea",IFCSTRUCTURALLOADORRESULT:"IfcStructuralLoadOrResult",IFCSTRUCTURALLOADCONFIGURATION:"IfcStructuralLoadConfiguration",IFCSCHEDULINGTIME:"IfcSchedulingTime",IFCRESOURCELEVELRELATIONSHIP:"IfcResourceLevelRelationship",IFCREFERENCE:"IfcReference",IFCRECURRENCEPATTERN:"IfcRecurrencePattern",IFCPROPERTYABSTRACTION:"IfcPropertyAbstraction",IFCPROJECTEDCRS:"IfcProjectedCrs",IFCPRESENTATIONITEM:"IfcPresentationItem",IFCMATERIALUSAGEDEFINITION:"IfcMaterialUsageDefinition",IFCMATERIALPROFILEWITHOFFSETS:"IfcMaterialProfileWithOffsets",IFCMATERIALPROFILESET:"IfcMaterialProfileSet",IFCMATERIALPROFILE:"IfcMaterialProfile",IFCMATERIALLAYERWITHOFFSETS:"IfcMaterialLayerWithOffsets",IFCMATERIALDEFINITION:"IfcMaterialDefinition",IFCMAPCONVERSION:"IfcMapConversion",IFCEXTERNALINFORMATION:"IfcExternalInformation",IFCCOORDINATEREFERENCESYSTEM:"IfcCoordinateReferenceSystem",IFCCOORDINATEOPERATION:"IfcCoordinateOperation",IFCCONNECTIONVOLUMEGEOMETRY:"IfcConnectionVolumeGeometry",IFCREINFORCINGBAR:"IfcReinforcingBar",IFCELECTRICDISTRIBUTIONPOINT:"IfcElectricDistributionPoint",IFCDISTRIBUTIONCONTROLELEMENT:"IfcDistributionControlElement",IFCDISTRIBUTIONCHAMBERELEMENT:"IfcDistributionChamberElement",IFCCONTROLLERTYPE:"IfcControllerType",IFCCHAMFEREDGEFEATURE:"IfcChamferEdgeFeature",IFCBEAM:"IfcBeam",IFCALARMTYPE:"IfcAlarmType",IFCACTUATORTYPE:"IfcActuatorType",IFCWINDOW:"IfcWindow",IFCWALLSTANDARDCASE:"IfcWallStandardCase",IFCWALL:"IfcWall",IFCVIBRATIONISOLATORTYPE:"IfcVibrationIsolatorType",IFCTENDONANCHOR:"IfcTendonAnchor",IFCTENDON:"IfcTendon",IFCSTRUCTURALANALYSISMODEL:"IfcStructuralAnalysisModel",IFCSTAIRFLIGHT:"IfcStairFlight",IFCSTAIR:"IfcStair",IFCSLAB:"IfcSlab",IFCSENSORTYPE:"IfcSensorType",IFCROUNDEDEDGEFEATURE:"IfcRoundedEdgeFeature",IFCROOF:"IfcRoof",IFCREINFORCINGMESH:"IfcReinforcingMesh",IFCREINFORCINGELEMENT:"IfcReinforcingElement",IFCRATIONALBEZIERCURVE:"IfcRationalBezierCurve",IFCRAMPFLIGHT:"IfcRampFlight",IFCRAMP:"IfcRamp",IFCRAILING:"IfcRailing",IFCPLATE:"IfcPlate",IFCPILE:"IfcPile",IFCMEMBER:"IfcMember",IFCFOOTING:"IfcFooting",IFCFLOWTREATMENTDEVICE:"IfcFlowTreatmentDevice",IFCFLOWTERMINAL:"IfcFlowTerminal",IFCFLOWSTORAGEDEVICE:"IfcFlowStorageDevice",IFCFLOWSEGMENT:"IfcFlowSegment",IFCFLOWMOVINGDEVICE:"IfcFlowMovingDevice",IFCFLOWINSTRUMENTTYPE:"IfcFlowInstrumentType",IFCFLOWFITTING:"IfcFlowFitting",IFCFLOWCONTROLLER:"IfcFlowController",IFCFIRESUPPRESSIONTERMINALTYPE:"IfcFireSuppressionTerminalType",IFCFILTERTYPE:"IfcFilterType",IFCFANTYPE:"IfcFanType",IFCENERGYCONVERSIONDEVICE:"IfcEnergyConversionDevice",IFCELECTRICALELEMENT:"IfcElectricalElement",IFCELECTRICALCIRCUIT:"IfcElectricalCircuit",IFCELECTRICTIMECONTROLTYPE:"IfcElectricTimeControlType",IFCELECTRICMOTORTYPE:"IfcElectricMotorType",IFCELECTRICHEATERTYPE:"IfcElectricHeaterType",IFCELECTRICGENERATORTYPE:"IfcElectricGeneratorType",IFCELECTRICFLOWSTORAGEDEVICETYPE:"IfcElectricFlowStorageDeviceType",IFCELECTRICAPPLIANCETYPE:"IfcElectricApplianceType",IFCEDGEFEATURE:"IfcEdgeFeature",IFCDUCTSILENCERTYPE:"IfcDuctSilencerType",IFCDUCTSEGMENTTYPE:"IfcDuctSegmentType",IFCDUCTFITTINGTYPE:"IfcDuctFittingType",IFCDOOR:"IfcDoor",IFCDISTRIBUTIONPORT:"IfcDistributionPort",IFCDISTRIBUTIONFLOWELEMENT:"IfcDistributionFlowElement",IFCDISTRIBUTIONELEMENT:"IfcDistributionElement",IFCDISTRIBUTIONCONTROLELEMENTTYPE:"IfcDistributionControlElementType",IFCDISTRIBUTIONCHAMBERELEMENTTYPE:"IfcDistributionChamberElementType",IFCDISCRETEACCESSORYTYPE:"IfcDiscreteAccessoryType",IFCDISCRETEACCESSORY:"IfcDiscreteAccessory",IFCDIAMETERDIMENSION:"IfcDiameterDimension",IFCDAMPERTYPE:"IfcDamperType",IFCCURTAINWALL:"IfcCurtainWall",IFCCOVERING:"IfcCovering",IFCCOOLINGTOWERTYPE:"IfcCoolingTowerType",IFCCOOLEDBEAMTYPE:"IfcCooledBeamType",IFCCONSTRUCTIONPRODUCTRESOURCE:"IfcConstructionProductResource",IFCCONSTRUCTIONMATERIALRESOURCE:"IfcConstructionMaterialResource",IFCCONSTRUCTIONEQUIPMENTRESOURCE:"IfcConstructionEquipmentResource",IFCCONDITIONCRITERION:"IfcConditionCriterion",IFCCONDITION:"IfcCondition",IFCCONDENSERTYPE:"IfcCondenserType",IFCCOMPRESSORTYPE:"IfcCompressorType",IFCCOLUMN:"IfcColumn",IFCCOILTYPE:"IfcCoilType",IFCCIRCLE:"IfcCircle",IFCCHILLERTYPE:"IfcChillerType",IFCCABLESEGMENTTYPE:"IfcCableSegmentType",IFCCABLECARRIERSEGMENTTYPE:"IfcCableCarrierSegmentType",IFCCABLECARRIERFITTINGTYPE:"IfcCableCarrierFittingType",IFCBUILDINGELEMENTPROXYTYPE:"IfcBuildingElementProxyType",IFCBUILDINGELEMENTPROXY:"IfcBuildingElementProxy",IFCBUILDINGELEMENTPART:"IfcBuildingElementPart",IFCBUILDINGELEMENTCOMPONENT:"IfcBuildingElementComponent",IFCBUILDINGELEMENT:"IfcBuildingElement",IFCBOILERTYPE:"IfcBoilerType",IFCBEZIERCURVE:"IfcBezierCurve",IFCBEAMTYPE:"IfcBeamType",IFCBSPLINECURVE:"IfcBSplineCurve",IFCASSET:"IfcAsset",IFCANGULARDIMENSION:"IfcAngularDimension",IFCAIRTOAIRHEATRECOVERYTYPE:"IfcAirToAirHeatRecoveryType",IFCAIRTERMINALTYPE:"IfcAirTerminalType",IFCAIRTERMINALBOXTYPE:"IfcAirTerminalBoxType",IFCACTIONREQUEST:"IfcActionRequest",IFC2DCOMPOSITECURVE:"Ifc2DCompositeCurve",IFCZONE:"IfcZone",IFCWORKSCHEDULE:"IfcWorkSchedule",IFCWORKPLAN:"IfcWorkPlan",IFCWORKCONTROL:"IfcWorkControl",IFCWASTETERMINALTYPE:"IfcWasteTerminalType",IFCWALLTYPE:"IfcWallType",IFCVIRTUALELEMENT:"IfcVirtualElement",IFCVALVETYPE:"IfcValveType",IFCUNITARYEQUIPMENTTYPE:"IfcUnitaryEquipmentType",IFCTUBEBUNDLETYPE:"IfcTubeBundleType",IFCTRIMMEDCURVE:"IfcTrimmedCurve",IFCTRANSPORTELEMENT:"IfcTransportElement",IFCTRANSFORMERTYPE:"IfcTransformerType",IFCTIMESERIESSCHEDULE:"IfcTimeSeriesSchedule",IFCTANKTYPE:"IfcTankType",IFCSYSTEM:"IfcSystem",IFCSWITCHINGDEVICETYPE:"IfcSwitchingDeviceType",IFCSUBCONTRACTRESOURCE:"IfcSubContractResource",IFCSTRUCTURALSURFACECONNECTION:"IfcStructuralSurfaceConnection",IFCSTRUCTURALRESULTGROUP:"IfcStructuralResultGroup",IFCSTRUCTURALPOINTREACTION:"IfcStructuralPointReaction",IFCSTRUCTURALPOINTCONNECTION:"IfcStructuralPointConnection",IFCSTRUCTURALPOINTACTION:"IfcStructuralPointAction",IFCSTRUCTURALPLANARACTIONVARYING:"IfcStructuralPlanarActionVarying",IFCSTRUCTURALPLANARACTION:"IfcStructuralPlanarAction",IFCSTRUCTURALLOADGROUP:"IfcStructuralLoadGroup",IFCSTRUCTURALLINEARACTIONVARYING:"IfcStructuralLinearActionVarying",IFCSTRUCTURALLINEARACTION:"IfcStructuralLinearAction",IFCSTRUCTURALCURVEMEMBERVARYING:"IfcStructuralCurveMemberVarying",IFCSTRUCTURALCURVEMEMBER:"IfcStructuralCurveMember",IFCSTRUCTURALCURVECONNECTION:"IfcStructuralCurveConnection",IFCSTRUCTURALCONNECTION:"IfcStructuralConnection",IFCSTRUCTURALACTION:"IfcStructuralAction",IFCSTAIRFLIGHTTYPE:"IfcStairFlightType",IFCSTACKTERMINALTYPE:"IfcStackTerminalType",IFCSPACETYPE:"IfcSpaceType",IFCSPACEPROGRAM:"IfcSpaceProgram",IFCSPACEHEATERTYPE:"IfcSpaceHeaterType",IFCSPACE:"IfcSpace",IFCSLABTYPE:"IfcSlabType",IFCSITE:"IfcSite",IFCSERVICELIFE:"IfcServiceLife",IFCSCHEDULETIMECONTROL:"IfcScheduleTimeControl",IFCSANITARYTERMINALTYPE:"IfcSanitaryTerminalType",IFCRELASSIGNSTASKS:"IfcRelAssignsTasks",IFCRELAGGREGATES:"IfcRelAggregates",IFCRAMPFLIGHTTYPE:"IfcRampFlightType",IFCRAILINGTYPE:"IfcRailingType",IFCRADIUSDIMENSION:"IfcRadiusDimension",IFCPUMPTYPE:"IfcPumpType",IFCPROTECTIVEDEVICETYPE:"IfcProtectiveDeviceType",IFCPROJECTIONELEMENT:"IfcProjectionElement",IFCPROJECTORDERRECORD:"IfcProjectOrderRecord",IFCPROJECTORDER:"IfcProjectOrder",IFCPROCEDURE:"IfcProcedure",IFCPORT:"IfcPort",IFCPOLYLINE:"IfcPolyline",IFCPLATETYPE:"IfcPlateType",IFCPIPESEGMENTTYPE:"IfcPipeSegmentType",IFCPIPEFITTINGTYPE:"IfcPipeFittingType",IFCPERMIT:"IfcPermit",IFCPERFORMANCEHISTORY:"IfcPerformanceHistory",IFCOUTLETTYPE:"IfcOutletType",IFCORDERACTION:"IfcOrderAction",IFCOPENINGELEMENT:"IfcOpeningElement",IFCOCCUPANT:"IfcOccupant",IFCMOVE:"IfcMove",IFCMOTORCONNECTIONTYPE:"IfcMotorConnectionType",IFCMEMBERTYPE:"IfcMemberType",IFCMECHANICALFASTENERTYPE:"IfcMechanicalFastenerType",IFCMECHANICALFASTENER:"IfcMechanicalFastener",IFCLINEARDIMENSION:"IfcLinearDimension",IFCLIGHTFIXTURETYPE:"IfcLightFixtureType",IFCLAMPTYPE:"IfcLampType",IFCLABORRESOURCE:"IfcLaborResource",IFCJUNCTIONBOXTYPE:"IfcJunctionBoxType",IFCINVENTORY:"IfcInventory",IFCHUMIDIFIERTYPE:"IfcHumidifierType",IFCHEATEXCHANGERTYPE:"IfcHeatExchangerType",IFCGROUP:"IfcGroup",IFCGRID:"IfcGrid",IFCGASTERMINALTYPE:"IfcGasTerminalType",IFCFURNITURESTANDARD:"IfcFurnitureStandard",IFCFURNISHINGELEMENT:"IfcFurnishingElement",IFCFLOWTREATMENTDEVICETYPE:"IfcFlowTreatmentDeviceType",IFCFLOWTERMINALTYPE:"IfcFlowTerminalType",IFCFLOWSTORAGEDEVICETYPE:"IfcFlowStorageDeviceType",IFCFLOWSEGMENTTYPE:"IfcFlowSegmentType",IFCFLOWMOVINGDEVICETYPE:"IfcFlowMovingDeviceType",IFCFLOWMETERTYPE:"IfcFlowMeterType",IFCFLOWFITTINGTYPE:"IfcFlowFittingType",IFCFLOWCONTROLLERTYPE:"IfcFlowControllerType",IFCFEATUREELEMENTSUBTRACTION:"IfcFeatureElementSubtraction",IFCFEATUREELEMENTADDITION:"IfcFeatureElementAddition",IFCFEATUREELEMENT:"IfcFeatureElement",IFCFASTENERTYPE:"IfcFastenerType",IFCFASTENER:"IfcFastener",IFCFACETEDBREPWITHVOIDS:"IfcFacetedBrepWithVoids",IFCFACETEDBREP:"IfcFacetedBrep",IFCEVAPORATORTYPE:"IfcEvaporatorType",IFCEVAPORATIVECOOLERTYPE:"IfcEvaporativeCoolerType",IFCEQUIPMENTSTANDARD:"IfcEquipmentStandard",IFCEQUIPMENTELEMENT:"IfcEquipmentElement",IFCENERGYCONVERSIONDEVICETYPE:"IfcEnergyConversionDeviceType",IFCELLIPSE:"IfcEllipse",IFCELEMENTCOMPONENTTYPE:"IfcElementComponentType",IFCELEMENTCOMPONENT:"IfcElementComponent",IFCELEMENTASSEMBLY:"IfcElementAssembly",IFCELEMENT:"IfcElement",IFCELECTRICALBASEPROPERTIES:"IfcElectricalBaseProperties",IFCDISTRIBUTIONFLOWELEMENTTYPE:"IfcDistributionFlowElementType",IFCDISTRIBUTIONELEMENTTYPE:"IfcDistributionElementType",IFCDIMENSIONCURVEDIRECTEDCALLOUT:"IfcDimensionCurveDirectedCallout",IFCCURTAINWALLTYPE:"IfcCurtainWallType",IFCCREWRESOURCE:"IfcCrewResource",IFCCOVERINGTYPE:"IfcCoveringType",IFCCOSTSCHEDULE:"IfcCostSchedule",IFCCOSTITEM:"IfcCostItem",IFCCONTROL:"IfcControl",IFCCONSTRUCTIONRESOURCE:"IfcConstructionResource",IFCCONIC:"IfcConic",IFCCOMPOSITECURVE:"IfcCompositeCurve",IFCCOLUMNTYPE:"IfcColumnType",IFCCIRCLEHOLLOWPROFILEDEF:"IfcCircleHollowProfileDef",IFCBUILDINGSTOREY:"IfcBuildingStorey",IFCBUILDINGELEMENTTYPE:"IfcBuildingElementType",IFCBUILDING:"IfcBuilding",IFCBOUNDEDCURVE:"IfcBoundedCurve",IFCBOOLEANCLIPPINGRESULT:"IfcBooleanClippingResult",IFCBLOCK:"IfcBlock",IFCASYMMETRICISHAPEPROFILEDEF:"IfcAsymmetricIShapeProfileDef",IFCANNOTATION:"IfcAnnotation",IFCACTOR:"IfcActor",IFCTRANSPORTELEMENTTYPE:"IfcTransportElementType",IFCTASK:"IfcTask",IFCSYSTEMFURNITUREELEMENTTYPE:"IfcSystemFurnitureElementType",IFCSURFACEOFREVOLUTION:"IfcSurfaceOfRevolution",IFCSURFACEOFLINEAREXTRUSION:"IfcSurfaceOfLinearExtrusion",IFCSURFACECURVESWEPTAREASOLID:"IfcSurfaceCurveSweptAreaSolid",IFCSTRUCTUREDDIMENSIONCALLOUT:"IfcStructuredDimensionCallout",IFCSTRUCTURALSURFACEMEMBERVARYING:"IfcStructuralSurfaceMemberVarying",IFCSTRUCTURALSURFACEMEMBER:"IfcStructuralSurfaceMember",IFCSTRUCTURALREACTION:"IfcStructuralReaction",IFCSTRUCTURALMEMBER:"IfcStructuralMember",IFCSTRUCTURALITEM:"IfcStructuralItem",IFCSTRUCTURALACTIVITY:"IfcStructuralActivity",IFCSPHERE:"IfcSphere",IFCSPATIALSTRUCTUREELEMENTTYPE:"IfcSpatialStructureElementType",IFCSPATIALSTRUCTUREELEMENT:"IfcSpatialStructureElement",IFCRIGHTCIRCULARCYLINDER:"IfcRightCircularCylinder",IFCRIGHTCIRCULARCONE:"IfcRightCircularCone",IFCREVOLVEDAREASOLID:"IfcRevolvedAreaSolid",IFCRESOURCE:"IfcResource",IFCRELVOIDSELEMENT:"IfcRelVoidsElement",IFCRELSPACEBOUNDARY:"IfcRelSpaceBoundary",IFCRELSERVICESBUILDINGS:"IfcRelServicesBuildings",IFCRELSEQUENCE:"IfcRelSequence",IFCRELSCHEDULESCOSTITEMS:"IfcRelSchedulesCostItems",IFCRELREFERENCEDINSPATIALSTRUCTURE:"IfcRelReferencedInSpatialStructure",IFCRELPROJECTSELEMENT:"IfcRelProjectsElement",IFCRELOVERRIDESPROPERTIES:"IfcRelOverridesProperties",IFCRELOCCUPIESSPACES:"IfcRelOccupiesSpaces",IFCRELNESTS:"IfcRelNests",IFCRELINTERACTIONREQUIREMENTS:"IfcRelInteractionRequirements",IFCRELFLOWCONTROLELEMENTS:"IfcRelFlowControlElements",IFCRELFILLSELEMENT:"IfcRelFillsElement",IFCRELDEFINESBYTYPE:"IfcRelDefinesByType",IFCRELDEFINESBYPROPERTIES:"IfcRelDefinesByProperties",IFCRELDEFINES:"IfcRelDefines",IFCRELDECOMPOSES:"IfcRelDecomposes",IFCRELCOVERSSPACES:"IfcRelCoversSpaces",IFCRELCOVERSBLDGELEMENTS:"IfcRelCoversBldgElements",IFCRELCONTAINEDINSPATIALSTRUCTURE:"IfcRelContainedInSpatialStructure",IFCRELCONNECTSWITHREALIZINGELEMENTS:"IfcRelConnectsWithRealizingElements",IFCRELCONNECTSWITHECCENTRICITY:"IfcRelConnectsWithEccentricity",IFCRELCONNECTSSTRUCTURALMEMBER:"IfcRelConnectsStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT:"IfcRelConnectsStructuralElement",IFCRELCONNECTSSTRUCTURALACTIVITY:"IfcRelConnectsStructuralActivity",IFCRELCONNECTSPORTS:"IfcRelConnectsPorts",IFCRELCONNECTSPORTTOELEMENT:"IfcRelConnectsPortToElement",IFCRELCONNECTSPATHELEMENTS:"IfcRelConnectsPathElements",IFCRELCONNECTSELEMENTS:"IfcRelConnectsElements",IFCRELCONNECTS:"IfcRelConnects",IFCRELASSOCIATESPROFILEPROPERTIES:"IfcRelAssociatesProfileProperties",IFCRELASSOCIATESMATERIAL:"IfcRelAssociatesMaterial",IFCRELASSOCIATESLIBRARY:"IfcRelAssociatesLibrary",IFCRELASSOCIATESDOCUMENT:"IfcRelAssociatesDocument",IFCRELASSOCIATESCONSTRAINT:"IfcRelAssociatesConstraint",IFCRELASSOCIATESCLASSIFICATION:"IfcRelAssociatesClassification",IFCRELASSOCIATESAPPROVAL:"IfcRelAssociatesApproval",IFCRELASSOCIATESAPPLIEDVALUE:"IfcRelAssociatesAppliedValue",IFCRELASSOCIATES:"IfcRelAssociates",IFCRELASSIGNSTORESOURCE:"IfcRelAssignsToResource",IFCRELASSIGNSTOPROJECTORDER:"IfcRelAssignsToProjectOrder",IFCRELASSIGNSTOPRODUCT:"IfcRelAssignsToProduct",IFCRELASSIGNSTOPROCESS:"IfcRelAssignsToProcess",IFCRELASSIGNSTOGROUP:"IfcRelAssignsToGroup",IFCRELASSIGNSTOCONTROL:"IfcRelAssignsToControl",IFCRELASSIGNSTOACTOR:"IfcRelAssignsToActor",IFCRELASSIGNS:"IfcRelAssigns",IFCRECTANGULARTRIMMEDSURFACE:"IfcRectangularTrimmedSurface",IFCRECTANGULARPYRAMID:"IfcRectangularPyramid",IFCRECTANGLEHOLLOWPROFILEDEF:"IfcRectangleHollowProfileDef",IFCPROXY:"IfcProxy",IFCPROPERTYSET:"IfcPropertySet",IFCPROJECTIONCURVE:"IfcProjectionCurve",IFCPROJECT:"IfcProject",IFCPRODUCT:"IfcProduct",IFCPROCESS:"IfcProcess",IFCPLANE:"IfcPlane",IFCPLANARBOX:"IfcPlanarBox",IFCPERMEABLECOVERINGPROPERTIES:"IfcPermeableCoveringProperties",IFCOFFSETCURVE3D:"IfcOffsetCurve3D",IFCOFFSETCURVE2D:"IfcOffsetCurve2D",IFCOBJECT:"IfcObject",IFCMANIFOLDSOLIDBREP:"IfcManifoldSolidBrep",IFCLINE:"IfcLine",IFCLSHAPEPROFILEDEF:"IfcLShapeProfileDef",IFCISHAPEPROFILEDEF:"IfcIShapeProfileDef",IFCGEOMETRICCURVESET:"IfcGeometricCurveSet",IFCFURNITURETYPE:"IfcFurnitureType",IFCFURNISHINGELEMENTTYPE:"IfcFurnishingElementType",IFCFLUIDFLOWPROPERTIES:"IfcFluidFlowProperties",IFCFILLAREASTYLETILES:"IfcFillAreaStyleTiles",IFCFILLAREASTYLETILESYMBOLWITHSTYLE:"IfcFillAreaStyleTileSymbolWithStyle",IFCFILLAREASTYLEHATCHING:"IfcFillAreaStyleHatching",IFCFACEBASEDSURFACEMODEL:"IfcFaceBasedSurfaceModel",IFCEXTRUDEDAREASOLID:"IfcExtrudedAreaSolid",IFCENERGYPROPERTIES:"IfcEnergyProperties",IFCELLIPSEPROFILEDEF:"IfcEllipseProfileDef",IFCELEMENTARYSURFACE:"IfcElementarySurface",IFCELEMENTTYPE:"IfcElementType",IFCELEMENTQUANTITY:"IfcElementQuantity",IFCEDGELOOP:"IfcEdgeLoop",IFCDRAUGHTINGPREDEFINEDCURVEFONT:"IfcDraughtingPredefinedCurveFont",IFCDRAUGHTINGPREDEFINEDCOLOUR:"IfcDraughtingPredefinedColour",IFCDRAUGHTINGCALLOUT:"IfcDraughtingCallout",IFCDOORSTYLE:"IfcDoorStyle",IFCDOORPANELPROPERTIES:"IfcDoorPanelProperties",IFCDOORLININGPROPERTIES:"IfcDoorLiningProperties",IFCDIRECTION:"IfcDirection",IFCDIMENSIONCURVETERMINATOR:"IfcDimensionCurveTerminator",IFCDIMENSIONCURVE:"IfcDimensionCurve",IFCDEFINEDSYMBOL:"IfcDefinedSymbol",IFCCURVEBOUNDEDPLANE:"IfcCurveBoundedPlane",IFCCURVE:"IfcCurve",IFCCSGSOLID:"IfcCsgSolid",IFCCSGPRIMITIVE3D:"IfcCsgPrimitive3D",IFCCRANERAILFSHAPEPROFILEDEF:"IfcCraneRailFShapeProfileDef",IFCCRANERAILASHAPEPROFILEDEF:"IfcCraneRailAShapeProfileDef",IFCCOMPOSITECURVESEGMENT:"IfcCompositeCurveSegment",IFCCLOSEDSHELL:"IfcClosedShell",IFCCIRCLEPROFILEDEF:"IfcCircleProfileDef",IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM:"IfcCartesianTransformationOperator3DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR3D:"IfcCartesianTransformationOperator3D",IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM:"IfcCartesianTransformationOperator2DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR2D:"IfcCartesianTransformationOperator2D",IFCCARTESIANTRANSFORMATIONOPERATOR:"IfcCartesianTransformationOperator",IFCCARTESIANPOINT:"IfcCartesianPoint",IFCCSHAPEPROFILEDEF:"IfcCShapeProfileDef",IFCBOXEDHALFSPACE:"IfcBoxedHalfSpace",IFCBOUNDINGBOX:"IfcBoundingBox",IFCBOUNDEDSURFACE:"IfcBoundedSurface",IFCBOOLEANRESULT:"IfcBooleanResult",IFCAXIS2PLACEMENT3D:"IfcAxis2Placement3D",IFCAXIS2PLACEMENT2D:"IfcAxis2Placement2D",IFCAXIS1PLACEMENT:"IfcAxis1Placement",IFCANNOTATIONSURFACE:"IfcAnnotationSurface",IFCANNOTATIONFILLAREAOCCURRENCE:"IfcAnnotationFillAreaOccurrence",IFCANNOTATIONFILLAREA:"IfcAnnotationFillArea",IFCANNOTATIONCURVEOCCURRENCE:"IfcAnnotationCurveOccurrence",IFCZSHAPEPROFILEDEF:"IfcZShapeProfileDef",IFCWINDOWSTYLE:"IfcWindowStyle",IFCWINDOWPANELPROPERTIES:"IfcWindowPanelProperties",IFCWINDOWLININGPROPERTIES:"IfcWindowLiningProperties",IFCVERTEXLOOP:"IfcVertexLoop",IFCVECTOR:"IfcVector",IFCUSHAPEPROFILEDEF:"IfcUShapeProfileDef",IFCTYPEPRODUCT:"IfcTypeProduct",IFCTYPEOBJECT:"IfcTypeObject",IFCTWODIRECTIONREPEATFACTOR:"IfcTwoDirectionRepeatFactor",IFCTRAPEZIUMPROFILEDEF:"IfcTrapeziumProfileDef",IFCTEXTLITERALWITHEXTENT:"IfcTextLiteralWithExtent",IFCTEXTLITERAL:"IfcTextLiteral",IFCTERMINATORSYMBOL:"IfcTerminatorSymbol",IFCTSHAPEPROFILEDEF:"IfcTShapeProfileDef",IFCSWEPTSURFACE:"IfcSweptSurface",IFCSWEPTDISKSOLID:"IfcSweptDiskSolid",IFCSWEPTAREASOLID:"IfcSweptAreaSolid",IFCSURFACESTYLERENDERING:"IfcSurfaceStyleRendering",IFCSURFACE:"IfcSurface",IFCSUBEDGE:"IfcSubedge",IFCSTRUCTURALSTEELPROFILEPROPERTIES:"IfcStructuralSteelProfileProperties",IFCSTRUCTURALPROFILEPROPERTIES:"IfcStructuralProfileProperties",IFCSTRUCTURALLOADSINGLEFORCEWARPING:"IfcStructuralLoadSingleForceWarping",IFCSTRUCTURALLOADSINGLEFORCE:"IfcStructuralLoadSingleForce",IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION:"IfcStructuralLoadSingleDisplacementDistortion",IFCSTRUCTURALLOADSINGLEDISPLACEMENT:"IfcStructuralLoadSingleDisplacement",IFCSTRUCTURALLOADPLANARFORCE:"IfcStructuralLoadPlanarForce",IFCSTRUCTURALLOADLINEARFORCE:"IfcStructuralLoadLinearForce",IFCSPACETHERMALLOADPROPERTIES:"IfcSpaceThermalLoadProperties",IFCSOUNDVALUE:"IfcSoundValue",IFCSOUNDPROPERTIES:"IfcSoundProperties",IFCSOLIDMODEL:"IfcSolidModel",IFCSLIPPAGECONNECTIONCONDITION:"IfcSlippageConnectionCondition",IFCSHELLBASEDSURFACEMODEL:"IfcShellBasedSurfaceModel",IFCSERVICELIFEFACTOR:"IfcServiceLifeFactor",IFCSECTIONEDSPINE:"IfcSectionedSpine",IFCROUNDEDRECTANGLEPROFILEDEF:"IfcRoundedRectangleProfileDef",IFCRELATIONSHIP:"IfcRelationship",IFCREINFORCEMENTDEFINITIONPROPERTIES:"IfcReinforcementDefinitionProperties",IFCREGULARTIMESERIES:"IfcRegularTimeSeries",IFCRECTANGLEPROFILEDEF:"IfcRectangleProfileDef",IFCPROPERTYTABLEVALUE:"IfcPropertyTableValue",IFCPROPERTYSINGLEVALUE:"IfcPropertySingleValue",IFCPROPERTYSETDEFINITION:"IfcPropertySetDefinition",IFCPROPERTYREFERENCEVALUE:"IfcPropertyReferenceValue",IFCPROPERTYLISTVALUE:"IfcPropertyListValue",IFCPROPERTYENUMERATEDVALUE:"IfcPropertyEnumeratedValue",IFCPROPERTYDEFINITION:"IfcPropertyDefinition",IFCPROPERTYBOUNDEDVALUE:"IfcPropertyBoundedValue",IFCPRODUCTDEFINITIONSHAPE:"IfcProductDefinitionShape",IFCPREDEFINEDPOINTMARKERSYMBOL:"IfcPredefinedPointMarkerSymbol",IFCPREDEFINEDDIMENSIONSYMBOL:"IfcPredefinedDimensionSymbol",IFCPREDEFINEDCURVEFONT:"IfcPredefinedCurveFont",IFCPREDEFINEDCOLOUR:"IfcPredefinedColour",IFCPOLYGONALBOUNDEDHALFSPACE:"IfcPolygonalBoundedHalfSpace",IFCPOLYLOOP:"IfcPolyLoop",IFCPOINTONSURFACE:"IfcPointOnSurface",IFCPOINTONCURVE:"IfcPointOnCurve",IFCPOINT:"IfcPoint",IFCPLANAREXTENT:"IfcPlanarExtent",IFCPLACEMENT:"IfcPlacement",IFCPIXELTEXTURE:"IfcPixelTexture",IFCPHYSICALCOMPLEXQUANTITY:"IfcPhysicalComplexQuantity",IFCPATH:"IfcPath",IFCPARAMETERIZEDPROFILEDEF:"IfcParameterizedProfileDef",IFCORIENTEDEDGE:"IfcOrientedEdge",IFCOPENSHELL:"IfcOpenShell",IFCONEDIRECTIONREPEATFACTOR:"IfcOneDirectionRepeatFactor",IFCOBJECTDEFINITION:"IfcObjectDefinition",IFCMECHANICALCONCRETEMATERIALPROPERTIES:"IfcMechanicalConcreteMaterialProperties",IFCMATERIALDEFINITIONREPRESENTATION:"IfcMaterialDefinitionRepresentation",IFCMAPPEDITEM:"IfcMappedItem",IFCLOOP:"IfcLoop",IFCLOCALPLACEMENT:"IfcLocalPlacement",IFCLIGHTSOURCESPOT:"IfcLightSourceSpot",IFCLIGHTSOURCEPOSITIONAL:"IfcLightSourcePositional",IFCLIGHTSOURCEGONIOMETRIC:"IfcLightSourceGoniometric",IFCLIGHTSOURCEDIRECTIONAL:"IfcLightSourceDirectional",IFCLIGHTSOURCEAMBIENT:"IfcLightSourceAmbient",IFCLIGHTSOURCE:"IfcLightSource",IFCIRREGULARTIMESERIES:"IfcIrregularTimeSeries",IFCIMAGETEXTURE:"IfcImageTexture",IFCHYGROSCOPICMATERIALPROPERTIES:"IfcHygroscopicMaterialProperties",IFCHALFSPACESOLID:"IfcHalfSpaceSolid",IFCGRIDPLACEMENT:"IfcGridPlacement",IFCGEOMETRICSET:"IfcGeometricSet",IFCGEOMETRICREPRESENTATIONSUBCONTEXT:"IfcGeometricRepresentationSubContext",IFCGEOMETRICREPRESENTATIONITEM:"IfcGeometricRepresentationItem",IFCGEOMETRICREPRESENTATIONCONTEXT:"IfcGeometricRepresentationContext",IFCGENERALPROFILEPROPERTIES:"IfcGeneralProfileProperties",IFCGENERALMATERIALPROPERTIES:"IfcGeneralMaterialProperties",IFCFUELPROPERTIES:"IfcFuelProperties",IFCFILLAREASTYLE:"IfcFillAreaStyle",IFCFAILURECONNECTIONCONDITION:"IfcFailureConnectionCondition",IFCFACESURFACE:"IfcFaceSurface",IFCFACEOUTERBOUND:"IfcFaceOuterBound",IFCFACEBOUND:"IfcFaceBound",IFCFACE:"IfcFace",IFCEXTENDEDMATERIALPROPERTIES:"IfcExtendedMaterialProperties",IFCEDGECURVE:"IfcEdgeCurve",IFCEDGE:"IfcEdge",IFCDRAUGHTINGPREDEFINEDTEXTFONT:"IfcDraughtingPredefinedTextFont",IFCDOCUMENTREFERENCE:"IfcDocumentReference",IFCDIMENSIONPAIR:"IfcDimensionPair",IFCDIMENSIONCALLOUTRELATIONSHIP:"IfcDimensionCalloutRelationship",IFCDERIVEDPROFILEDEF:"IfcDerivedProfileDef",IFCCURVESTYLE:"IfcCurveStyle",IFCCONVERSIONBASEDUNIT:"IfcConversionBasedUnit",IFCCONTEXTDEPENDENTUNIT:"IfcContextDependentUnit",IFCCONNECTIONPOINTECCENTRICITY:"IfcConnectionPointEccentricity",IFCCONNECTIONCURVEGEOMETRY:"IfcConnectionCurveGeometry",IFCCONNECTEDFACESET:"IfcConnectedFaceSet",IFCCOMPOSITEPROFILEDEF:"IfcCompositeProfileDef",IFCCOMPLEXPROPERTY:"IfcComplexProperty",IFCCOLOURRGB:"IfcColourRgb",IFCCLASSIFICATIONREFERENCE:"IfcClassificationReference",IFCCENTERLINEPROFILEDEF:"IfcCenterLineProfileDef",IFCBLOBTEXTURE:"IfcBlobTexture",IFCARBITRARYPROFILEDEFWITHVOIDS:"IfcArbitraryProfileDefWithVoids",IFCARBITRARYOPENPROFILEDEF:"IfcArbitraryOpenProfileDef",IFCARBITRARYCLOSEDPROFILEDEF:"IfcArbitraryClosedProfileDef",IFCANNOTATIONTEXTOCCURRENCE:"IfcAnnotationTextOccurrence",IFCANNOTATIONSYMBOLOCCURRENCE:"IfcAnnotationSymbolOccurrence",IFCANNOTATIONSURFACEOCCURRENCE:"IfcAnnotationSurfaceOccurrence",IFCANNOTATIONOCCURRENCE:"IfcAnnotationOccurrence",IFCWATERPROPERTIES:"IfcWaterProperties",IFCVIRTUALGRIDINTERSECTION:"IfcVirtualGridIntersection",IFCVERTEXPOINT:"IfcVertexPoint",IFCVERTEXBASEDTEXTUREMAP:"IfcVertexBasedTextureMap",IFCVERTEX:"IfcVertex",IFCUNITASSIGNMENT:"IfcUnitAssignment",IFCTOPOLOGYREPRESENTATION:"IfcTopologyRepresentation",IFCTOPOLOGICALREPRESENTATIONITEM:"IfcTopologicalRepresentationItem",IFCTIMESERIESVALUE:"IfcTimeSeriesValue",IFCTIMESERIESREFERENCERELATIONSHIP:"IfcTimeSeriesReferenceRelationship",IFCTIMESERIES:"IfcTimeSeries",IFCTHERMALMATERIALPROPERTIES:"IfcThermalMaterialProperties",IFCTEXTUREVERTEX:"IfcTextureVertex",IFCTEXTUREMAP:"IfcTextureMap",IFCTEXTURECOORDINATEGENERATOR:"IfcTextureCoordinateGenerator",IFCTEXTURECOORDINATE:"IfcTextureCoordinate",IFCTEXTSTYLEWITHBOXCHARACTERISTICS:"IfcTextStyleWithBoxCharacteristics",IFCTEXTSTYLETEXTMODEL:"IfcTextStyleTextModel",IFCTEXTSTYLEFORDEFINEDFONT:"IfcTextStyleForDefinedFont",IFCTEXTSTYLEFONTMODEL:"IfcTextStyleFontModel",IFCTEXTSTYLE:"IfcTextStyle",IFCTELECOMADDRESS:"IfcTelecomAddress",IFCTABLEROW:"IfcTableRow",IFCTABLE:"IfcTable",IFCSYMBOLSTYLE:"IfcSymbolStyle",IFCSURFACETEXTURE:"IfcSurfaceTexture",IFCSURFACESTYLEWITHTEXTURES:"IfcSurfaceStyleWithTextures",IFCSURFACESTYLESHADING:"IfcSurfaceStyleShading",IFCSURFACESTYLEREFRACTION:"IfcSurfaceStyleRefraction",IFCSURFACESTYLELIGHTING:"IfcSurfaceStyleLighting",IFCSURFACESTYLE:"IfcSurfaceStyle",IFCSTYLEDREPRESENTATION:"IfcStyledRepresentation",IFCSTYLEDITEM:"IfcStyledItem",IFCSTYLEMODEL:"IfcStyleModel",IFCSTRUCTURALLOADTEMPERATURE:"IfcStructuralLoadTemperature",IFCSTRUCTURALLOADSTATIC:"IfcStructuralLoadStatic",IFCSTRUCTURALLOAD:"IfcStructuralLoad",IFCSTRUCTURALCONNECTIONCONDITION:"IfcStructuralConnectionCondition",IFCSIMPLEPROPERTY:"IfcSimpleProperty",IFCSHAPEREPRESENTATION:"IfcShapeRepresentation",IFCSHAPEMODEL:"IfcShapeModel",IFCSHAPEASPECT:"IfcShapeAspect",IFCSECTIONREINFORCEMENTPROPERTIES:"IfcSectionReinforcementProperties",IFCSECTIONPROPERTIES:"IfcSectionProperties",IFCSIUNIT:"IfcSIUnit",IFCROOT:"IfcRoot",IFCRIBPLATEPROFILEPROPERTIES:"IfcRibPlateProfileProperties",IFCREPRESENTATIONMAP:"IfcRepresentationMap",IFCREPRESENTATIONITEM:"IfcRepresentationItem",IFCREPRESENTATIONCONTEXT:"IfcRepresentationContext",IFCREPRESENTATION:"IfcRepresentation",IFCRELAXATION:"IfcRelaxation",IFCREINFORCEMENTBARPROPERTIES:"IfcReinforcementBarProperties",IFCREFERENCESVALUEDOCUMENT:"IfcReferencesValueDocument",IFCQUANTITYWEIGHT:"IfcQuantityWeight",IFCQUANTITYVOLUME:"IfcQuantityVolume",IFCQUANTITYTIME:"IfcQuantityTime",IFCQUANTITYLENGTH:"IfcQuantityLength",IFCQUANTITYCOUNT:"IfcQuantityCount",IFCQUANTITYAREA:"IfcQuantityArea",IFCPROPERTYENUMERATION:"IfcPropertyEnumeration",IFCPROPERTYDEPENDENCYRELATIONSHIP:"IfcPropertyDependencyRelationship",IFCPROPERTYCONSTRAINTRELATIONSHIP:"IfcPropertyConstraintRelationship",IFCPROPERTY:"IfcProperty",IFCPROFILEPROPERTIES:"IfcProfileProperties",IFCPROFILEDEF:"IfcProfileDef",IFCPRODUCTSOFCOMBUSTIONPROPERTIES:"IfcProductsOfCombustionProperties",IFCPRODUCTREPRESENTATION:"IfcProductRepresentation",IFCPRESENTATIONSTYLEASSIGNMENT:"IfcPresentationStyleAssignment",IFCPRESENTATIONSTYLE:"IfcPresentationStyle",IFCPRESENTATIONLAYERWITHSTYLE:"IfcPresentationLayerWithStyle",IFCPRESENTATIONLAYERASSIGNMENT:"IfcPresentationLayerAssignment",IFCPREDEFINEDTEXTFONT:"IfcPredefinedTextFont",IFCPREDEFINEDTERMINATORSYMBOL:"IfcPredefinedTerminatorSymbol",IFCPREDEFINEDSYMBOL:"IfcPredefinedSymbol",IFCPREDEFINEDITEM:"IfcPredefinedItem",IFCPOSTALADDRESS:"IfcPostalAddress",IFCPHYSICALSIMPLEQUANTITY:"IfcPhysicalSimpleQuantity",IFCPHYSICALQUANTITY:"IfcPhysicalQuantity",IFCPERSONANDORGANIZATION:"IfcPersonAndOrganization",IFCPERSON:"IfcPerson",IFCOWNERHISTORY:"IfcOwnerHistory",IFCORGANIZATIONRELATIONSHIP:"IfcOrganizationRelationship",IFCORGANIZATION:"IfcOrganization",IFCOPTICALMATERIALPROPERTIES:"IfcOpticalMaterialProperties",IFCOBJECTIVE:"IfcObjective",IFCOBJECTPLACEMENT:"IfcObjectPlacement",IFCNAMEDUNIT:"IfcNamedUnit",IFCMONETARYUNIT:"IfcMonetaryUnit",IFCMETRIC:"IfcMetric",IFCMECHANICALSTEELMATERIALPROPERTIES:"IfcMechanicalSteelMaterialProperties",IFCMECHANICALMATERIALPROPERTIES:"IfcMechanicalMaterialProperties",IFCMEASUREWITHUNIT:"IfcMeasureWithUnit",IFCMATERIALPROPERTIES:"IfcMaterialProperties",IFCMATERIALLIST:"IfcMaterialList",IFCMATERIALLAYERSETUSAGE:"IfcMaterialLayerSetUsage",IFCMATERIALLAYERSET:"IfcMaterialLayerSet",IFCMATERIALLAYER:"IfcMaterialLayer",IFCMATERIALCLASSIFICATIONRELATIONSHIP:"IfcMaterialClassificationRelationship",IFCMATERIAL:"IfcMaterial",IFCLOCALTIME:"IfcLocalTime",IFCLIGHTINTENSITYDISTRIBUTION:"IfcLightIntensityDistribution",IFCLIGHTDISTRIBUTIONDATA:"IfcLightDistributionData",IFCLIBRARYREFERENCE:"IfcLibraryReference",IFCLIBRARYINFORMATION:"IfcLibraryInformation",IFCIRREGULARTIMESERIESVALUE:"IfcIrregularTimeSeriesValue",IFCGRIDAXIS:"IfcGridAxis",IFCEXTERNALLYDEFINEDTEXTFONT:"IfcExternallyDefinedTextFont",IFCEXTERNALLYDEFINEDSYMBOL:"IfcExternallyDefinedSymbol",IFCEXTERNALLYDEFINEDSURFACESTYLE:"IfcExternallyDefinedSurfaceStyle",IFCEXTERNALLYDEFINEDHATCHSTYLE:"IfcExternallyDefinedHatchStyle",IFCEXTERNALREFERENCE:"IfcExternalReference",IFCENVIRONMENTALIMPACTVALUE:"IfcEnvironmentalImpactValue",IFCDRAUGHTINGCALLOUTRELATIONSHIP:"IfcDraughtingCalloutRelationship",IFCDOCUMENTINFORMATIONRELATIONSHIP:"IfcDocumentInformationRelationship",IFCDOCUMENTINFORMATION:"IfcDocumentInformation",IFCDOCUMENTELECTRONICFORMAT:"IfcDocumentElectronicFormat",IFCDIMENSIONALEXPONENTS:"IfcDimensionalExponents",IFCDERIVEDUNITELEMENT:"IfcDerivedUnitElement",IFCDERIVEDUNIT:"IfcDerivedUnit",IFCDATEANDTIME:"IfcDateAndTime",IFCCURVESTYLEFONTPATTERN:"IfcCurveStyleFontPattern",IFCCURVESTYLEFONTANDSCALING:"IfcCurveStyleFontAndScaling",IFCCURVESTYLEFONT:"IfcCurveStyleFont",IFCCURRENCYRELATIONSHIP:"IfcCurrencyRelationship",IFCCOSTVALUE:"IfcCostValue",IFCCOORDINATEDUNIVERSALTIMEOFFSET:"IfcCoordinatedUniversalTimeOffset",IFCCONSTRAINTRELATIONSHIP:"IfcConstraintRelationship",IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP:"IfcConstraintClassificationRelationship",IFCCONSTRAINTAGGREGATIONRELATIONSHIP:"IfcConstraintAggregationRelationship",IFCCONSTRAINT:"IfcConstraint",IFCCONNECTIONSURFACEGEOMETRY:"IfcConnectionSurfaceGeometry",IFCCONNECTIONPORTGEOMETRY:"IfcConnectionPortGeometry",IFCCONNECTIONPOINTGEOMETRY:"IfcConnectionPointGeometry",IFCCONNECTIONGEOMETRY:"IfcConnectionGeometry",IFCCOLOURSPECIFICATION:"IfcColourSpecification",IFCCLASSIFICATIONNOTATIONFACET:"IfcClassificationNotationFacet",IFCCLASSIFICATIONNOTATION:"IfcClassificationNotation",IFCCLASSIFICATIONITEMRELATIONSHIP:"IfcClassificationItemRelationship",IFCCLASSIFICATIONITEM:"IfcClassificationItem",IFCCLASSIFICATION:"IfcClassification",IFCCALENDARDATE:"IfcCalendarDate",IFCBOUNDARYNODECONDITIONWARPING:"IfcBoundaryNodeConditionWarping",IFCBOUNDARYNODECONDITION:"IfcBoundaryNodeCondition",IFCBOUNDARYFACECONDITION:"IfcBoundaryFaceCondition",IFCBOUNDARYEDGECONDITION:"IfcBoundaryEdgeCondition",IFCBOUNDARYCONDITION:"IfcBoundaryCondition",IFCAPPROVALRELATIONSHIP:"IfcApprovalRelationship",IFCAPPROVALPROPERTYRELATIONSHIP:"IfcApprovalPropertyRelationship",IFCAPPROVALACTORRELATIONSHIP:"IfcApprovalActorRelationship",IFCAPPROVAL:"IfcApproval",IFCAPPLIEDVALUERELATIONSHIP:"IfcAppliedValueRelationship",IFCAPPLIEDVALUE:"IfcAppliedValue",IFCAPPLICATION:"IfcApplication",IFCADDRESS:"IfcAddress",IFCACTORROLE:"IfcActorRole"};class Hc{constructor(){S(this,"factor",1);S(this,"complement",1)}apply(i){const e=this.getScaleMatrix().multiply(i);i.copy(e)}setUp(i){var n,r,o;this.factor=1;const t=this.getLengthUnits(i);if(!t)return;const e=t==null,s=t.Name===void 0||t.Name===null;e||s||(t.Name.value==="FOOT"&&(this.factor=.3048),((n=t.Prefix)==null?void 0:n.value)==="MILLI"?this.complement=.001:((r=t.Prefix)==null?void 0:r.value)==="CENTI"?this.complement=.01:((o=t.Prefix)==null?void 0:o.value)==="DECI"&&(this.complement=.01))}getLengthUnits(i){try{const e=i.GetLineIDsWithType(0,ko).get(0),s=i.GetLine(0,e);for(const n of s.Units){if(!n||n.value===null||n.value===void 0)continue;const r=i.GetLine(0,n.value);if(r.UnitType&&r.UnitType.value==="LENGTHUNIT")return r}return null}catch{return console.log("Could not get units"),null}}getScaleMatrix(){const i=this.factor;return new Nt().fromArray([i,0,0,0,0,i,0,0,0,0,i,0,0,0,0,1])}}class Wc{constructor(){S(this,"itemsByFloor",{});S(this,"_units",new Hc)}setUp(i){this._units.setUp(i),this.cleanUp();try{const t=i.GetLineIDsWithType(0,ks),e=new Set,s=i.GetLineIDsWithType(0,Yi);for(let l=0;l0&&!o.has(r))continue;if(this.settings.excludedCategories.has(r))continue;const a=this.webIfc.GetLineIDsWithType(0,r),l=a.size();for(let u=0;u{this.getMesh(r,e)});for(const r of this._visitedFragments){const{index:o,fragment:a}=r[1];e.keyFragments.set(o,a.id)}for(const r of e.items){const o=this._fragmentInstances.get(r.id);if(!o)throw new Error("Fragment not found!");const a=[];for(const[l,u]of o)a.push(u);r.add(a)}const n=this.webIfc.GetCoordinationMatrix(0);return e.coordinationMatrix.fromArray(n),e.civilData=this._civil.read(this.webIfc),e}getMesh(t,e){const s=t.geometries.size(),n=t.expressID;for(let r=0;ro.value!==s),await t.setProperties(s,null),this.registerChange(t,e,s))}addElementToPset(t,e,...s){this.components.get(kt).addEntitiesRelation(t,e,{type:Bi,inv:"DefinesOcurrence"},...s)}async addPropToPset(t,e,...s){const n=await t.getProperties(e);if(n){for(const r of s){if(n.HasProperties.includes(r))continue;const o=new Se(r);n.HasProperties.push(o),this.onPropToPset.trigger({model:t,psetID:e,propID:r})}this.registerChange(t,e)}}async createIfcRel(t,e,s,n){const r=Kc[e];if(!r)throw new Error(`IfcPropertiesManager: ${r} is unsoported.`);const o=de.getIFCSchema(t),a=Qc[r],l=le[o][r];if(!(a&&l))throw new Error(`IfcPropertiesManager: ${r} is unsoported.`);const u=[new le[o].IfcGloballyUniqueId(se.create())],{related:f,relating:I}=a,d=[...new Set(n)].map(p=>new Se(p)),E=(p,A)=>{for(let F=p;FparseInt(o,10)),n=e[s[0]],r=new Se(n.expressID);return{entity:n,handle:r}}registerChange(t,...e){this.changeMap[t.uuid]||(this.changeMap[t.uuid]=new Set);for(const s of e)this.changeMap[t.uuid].add(s),this.onDataChanged.trigger({model:t,expressID:s})}async newSingleProperty(t,e,s,n){const r=de.getIFCSchema(t),o=new le[r].IfcIdentifier(s),a=new le[r][e](n),l=new le[r].IfcPropertySingleValue(o,null,a,null);return l.expressID=this.getNewExpressID(t),await this.setData(t,l),l}};S(de,"uuid","58c2d9f0-183c-48d6-a402-dfcf5b9a34df");let yn=de;const wi=class wi extends Mt{constructor(t){super(t);S(this,"onDisposed",new tt);S(this,"onRelationsIndexed",new tt);S(this,"relationMaps",{});S(this,"enabled",!0);S(this,"_relToAttributesMap",Xr);S(this,"_inverseAttributes",["IsDecomposedBy","Decomposes","AssociatedTo","HasAssociations","ClassificationForObjects","IsGroupedBy","HasAssignments","IsDefinedBy","DefinesOcurrence","IsTypedBy","Types","Defines","ContainedInStructure","ContainsElements","HasControlElements","AssignedToFlowElement","ConnectedTo","ConnectedFrom","ReferencedBy","Declares","HasContext","Controls","IsNestedBy","Nests","DocumentRefForObjects"]);S(this,"_ifcRels",[Gs,xn,Bn,Yn,Bi,Vn,Gn,ks,kn,zn,Hn,Wn,Xn,$n,Zn]);S(this,"onFragmentsDisposed",t=>{delete this.relationMaps[t.groupID]});S(this,"_changeMap",{});S(this,"onEntitiesRelated",new tt);this.components.add(wi.uuid,this),t.get(Ct).onFragmentsDisposed.add(this.onFragmentsDisposed)}indexRelations(t,e,s,n){const r=Object.keys(e).find(f=>f.startsWith("Relating")),o=Object.keys(e).find(f=>f.startsWith("Related"));if(!(r&&o))return;const a=e[r].value,l=e[o].map(f=>f.value),u=this.getEntityRelations(t,a,n);for(const f of l)u.push(f);for(const f of l)this.getEntityRelations(t,f,s).push(a)}getAttributeIndex(t){const e=this._inverseAttributes.indexOf(t);if(e===-1)throw new Error(`IfcRelationsIndexer: ${t} is not a valid IFC Inverse Attribute name or its not supported yet by this component.`);return e}setRelationMap(t,e){this.relationMaps[t.uuid]=e,this.onRelationsIndexed.trigger({modelID:t.uuid,relationsMap:e})}async process(t,e){if(!t.hasProperties)throw new Error("FragmentsGroup properties not found");let s=this.relationMaps[t.uuid];s||(s=new Map,this.relationMaps[t.uuid]=s);const n=t.getLocalProperties();if(!n)return s;const r=(e==null?void 0:e.relationsToProcess)??this._ifcRels;for(const[o,a]of Object.entries(n)){if(!r.includes(a.type))continue;const l=this._relToAttributesMap.get(a.type);if(!l)continue;const{forRelated:u,forRelating:f}=l;this.indexRelations(s,a,u,f)}return this.setRelationMap(t,s),s}async processFromWebIfc(t,e){const s=new Map;for(const n of this._ifcRels){const r=this._relToAttributesMap.get(n);if(!r)continue;const{forRelated:o,forRelating:a}=r,l=t.GetLineIDsWithType(e,n);for(let u=0;up.startsWith("Related")),C=d.find(p=>p.startsWith("Relating"));if(!(E&&C))continue;h[E]=[...f].map(p=>new Se(p)),h[C]=new Se(l),await e.setData(n,h)}else{const h=await e.createIfcRel(n,o,l,[...f]);if(!h)continue;u.relID=h.expressID}}}}addEntitiesRelation(t,e,s,...n){const{type:r,inv:o}=s;let a=this.relationMaps[t.uuid];if(a||(a=new Map,this.relationMaps[t.uuid]=a),!this._ifcRels.includes(r))return;const l=Xr.get(r);if(!l)return;const{forRelated:u,forRelating:f}=l;if(!(u===o||f===o))return;let I=this._changeMap[t.uuid];I||(I=new ie,this._changeMap[t.uuid]=I);const h=f===o?[e]:n,d=u===o?[e]:n;let E=I.get(r);E||(E=new ie,E.onItemSet.add(()=>this.onEntitiesRelated.trigger({invAttribute:o,relType:r,relatingIDs:h,relatedIDs:d})),E.onItemUpdated.add(()=>this.onEntitiesRelated.trigger({invAttribute:o,relType:r,relatingIDs:h,relatedIDs:d})),I.set(r,E));for(const C of h){let p=E.get(C);p||(p={related:new Pe},E.set(C,p)),p.related.add(...d)}for(const C of h)this.getEntityRelations(t,C,f).push(...d);for(const C of d)this.getEntityRelations(t,C,u).push(...h)}getEntityChildren(t,e,s=new Set){if(s.add(e),this.relationMaps[t.uuid]===void 0)throw new Error("The provided model has no indices. You have to generate them first.");const r=this.getEntityRelations(t,e,"IsDecomposedBy");if(r)for(const a of r)this.getEntityChildren(t,a,s);const o=this.getEntityRelations(t,e,"ContainsElements");if(o)for(const a of o)this.getEntityChildren(t,a,s);return s}};S(wi,"uuid","23a889ab-83b3-44a4-8bee-ead83438370b");let kt=wi;const ws=class ws extends Mt{constructor(t){super(t);S(this,"onDisposed",new tt);S(this,"onFragmentsLoaded",new tt);S(this,"onFragmentsDisposed",new tt);S(this,"list",new ie);S(this,"groups",new ie);S(this,"baseCoordinationModel","");S(this,"baseCoordinationMatrix",new Nt);S(this,"enabled",!0);S(this,"_loader",new ia);this.components.add(ws.uuid,this)}get meshes(){const t=[];for(const[e,s]of this.list)t.push(s.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,s=[];for(const n of t.items)s.push(n.id),this.list.delete(n.id);t.dispose(!0),this.groups.delete(t.uuid),this.groups.size===0&&(this.baseCoordinationModel="",this.baseCoordinationMatrix=new Nt),this.onFragmentsDisposed.trigger({groupID:e,fragmentIDs:s})}load(t,e){const n={...{coordinate:!0},...e},{coordinate:r,name:o,properties:a,relationsMap:l}=n,u=this._loader.import(t);e&&(u.isStreamed=e.isStreamed||!1),o&&(u.name=o);for(const f of u.items)f.group=u,this.list.set(f.id,f);return r&&this.coordinate([u]),this.groups.set(u.uuid,u),a&&u.setLocalProperties(a),l&&this.components.get(kt).setRelationMap(u,l),this.onFragmentsLoaded.trigger(u),u}export(t){return this._loader.export(t)}getModelIdMap(t){const e={};for(const s in t){const n=this.list.get(s);if(!(n&&n.group))continue;const r=n.group;r.uuid in e||(e[r.uuid]=new Set);const o=t[s];for(const a of o)e[r.uuid].add(a)}return e}modelIdToFragmentIdMap(t){let e={};for(const s in t){const n=this.groups.get(s);if(!n)continue;const r=t[s],o=n.getFragmentMap(r);e={...e,...o}}return e}guidToFragmentIdMap(t){const e={};for(const[n,r]of this.groups){n in e||(e[n]=new Set);for(const o of t){const a=r.globalToExpressIDs.get(o);a&&e[n].add(a)}}return this.modelIdToFragmentIdMap(e)}fragmentIdMapToGuids(t){const e=[],s=this.getModelIdMap(t);for(const n in s){const r=this.groups.get(n);if(!r)continue;const o=s[n];for(const a of o)for(const[l,u]of r.globalToExpressIDs.entries())if(u===a){e.push(l);break}}return e}coordinate(t=Array.from(this.groups.values())){if(this.baseCoordinationModel.length===0){const s=t.pop();if(!s)return;this.baseCoordinationModel=s.uuid,this.baseCoordinationMatrix=s.coordinationMatrix.clone()}if(t.length)for(const s of t)s.coordinationMatrix.equals(this.baseCoordinationMatrix)||(s.position.set(0,0,0),s.rotation.set(0,0,0),s.scale.set(1,1,1),s.updateMatrix(),this.applyBaseCoordinateSystem(s,s.coordinationMatrix))}applyBaseCoordinateSystem(t,e){e&&t.applyMatrix4(e.clone().invert()),t.applyMatrix4(this.baseCoordinationMatrix)}clone(t,e){const s=t.cloneGroup(e);this.groups.set(s.uuid,s);for(const n of s.items)this.list.set(n.id,n);return s}};S(ws,"uuid","fef46874-46a3-461b-8c44-2922ab77c806");let Ct=ws;function hs(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var po={exports:{}};/*! + `,s=new Blob([e],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(s)),this.setup()}dispose(){this.enabled=!1,this.config.autoUpdate=!1,this.components.get(vi).list.delete(this.config.uuid);for(const t of this.scene.children)t.removeFromParent();this.onViewUpdated.reset(),this.worker.terminate(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.renderTarget.dispose(),this.buffer=null,this.onDisposed.reset()}setup(i){const t={...this._defaultConfig,...i},{width:e,height:s}=t;this.config.setWidthHeight(e,s);const{updateInterval:n,autoUpdate:r}=t;this.config.setAutoAndInterval(r,n),this.config.threshold=t.threshold,this.isSetup=!0,this.onSetup.trigger()}getAvailableColor(){let i=BigInt(this._availableColor.toString());const t=[];do t.unshift(Number(i%256n)),i/=256n;while(i);for(;t.length!==3;)t.unshift(0);const[e,s,n]=t,r=`${e}-${s}-${n}`;return{r:e,g:s,b:n,code:r}}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--}}class yc extends Nc{constructor(t,e){super(t,e);S(this,"onViewUpdated",new tt);S(this,"colorMeshes",new Map);S(this,"_colorCodeMeshMap",new Map);S(this,"_meshIDColorCodeMap",new Map);S(this,"_currentVisibleMeshes",new Set);S(this,"_recentlyHiddenMeshes",new Set);S(this,"_transparentMat",new si({transparent:!0,opacity:0}));S(this,"handleWorkerMessage",async t=>{if(this.preventUpdate)return;const e=t.data.colors;this._recentlyHiddenMeshes=new Set(this._currentVisibleMeshes),this._currentVisibleMeshes.clear();for(const[s,n]of e){if(n{for(const r of s)r.visible=!0;for(const r of n)r.visible=!1})}get threshold(){return this.config.threshold}set threshold(t){this.config.threshold=t}dispose(){super.dispose(),this._currentVisibleMeshes.clear(),this._recentlyHiddenMeshes.clear(),this._meshIDColorCodeMap.clear(),this._transparentMat.dispose(),this._colorCodeMeshMap.clear();const t=this.components.get(ni);for(const e in this.colorMeshes){const s=this.colorMeshes.get(e);s&&t.destroy(s,!0)}this.colorMeshes.clear()}add(t){if(!this.enabled)return;if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const e=t instanceof Ts,{geometry:s,material:n}=t,{colorMaterial:r,code:o}=this.getAvailableMaterial();let a;if(Array.isArray(n)){let f=!0;const I=[];for(const h of n)wr.isTransparent(h)?I.push(this._transparentMat):(f=!1,I.push(r));if(f){r.dispose(),this.preventUpdate=!1;return}a=I}else if(wr.isTransparent(n)){r.dispose(),this.preventUpdate=!1;return}else a=r;this._colorCodeMeshMap.set(o,t),this._meshIDColorCodeMap.set(t.uuid,o);const l=e?t.count:1,u=new Ts(s,a,l);e?u.instanceMatrix=t.instanceMatrix:u.setMatrixAt(0,new Nt),t.visible=!1,t.updateWorldMatrix(!0,!1),u.applyMatrix4(t.matrixWorld),u.updateMatrix(),this.scene.add(u),this.colorMeshes.set(t.uuid,u),this.increaseColor(),this.preventUpdate=!1}remove(t){if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const e=this.components.get(ni);this._currentVisibleMeshes.delete(t),this._recentlyHiddenMeshes.delete(t);const s=this.colorMeshes.get(t.uuid),n=this._meshIDColorCodeMap.get(t.uuid);if(!s||!n){this.preventUpdate=!1;return}this._colorCodeMeshMap.delete(n),this._meshIDColorCodeMap.delete(t.uuid),this.colorMeshes.delete(t.uuid),s.geometry=void 0,s.material=[],e.destroy(s,!0),this._recentlyHiddenMeshes.delete(t),this._currentVisibleMeshes.delete(t),this.preventUpdate=!1}updateInstanced(t){for(const e of t){const s=this.colorMeshes.get(e.uuid);s&&(s.count=e.count)}}getAvailableMaterial(){const{r:t,g:e,b:s,code:n}=this.getAvailableColor(),r=qs.enabled;qs.enabled=!1;const o=new Bi(`rgb(${t}, ${e}, ${s})`);if(!this.world.renderer)throw new Error("Renderer not found in the world!");const a=this.world.renderer.clippingPlanes,l=new si({color:o,clippingPlanes:a,side:Gs});return qs.enabled=r,{colorMaterial:l,code:n}}}const _i=class _i extends Mt{constructor(t){super(t);S(this,"onDisposed",new tt);S(this,"_enabled",!0);S(this,"list",new Map);t.add(_i.uuid,this)}get enabled(){return this._enabled}set enabled(t){this._enabled=t;for(const[e,s]of this.list)s.enabled=t}create(t){if(this.list.has(t.uuid))return this.list.get(t.uuid);const e=new yc(this.components,t);return this.list.set(t.uuid,e),e}delete(t){const e=this.list.get(t.uuid);e&&e.dispose(),this.list.delete(t.uuid)}dispose(){this.enabled=!1,this.onDisposed.trigger(_i.uuid),this.onDisposed.reset();for(const[t,e]of this.list)e.dispose();this.list.clear()}updateInstanced(t){for(const[,e]of this.list)e.updateInstanced(t)}};S(_i,"uuid","69f2a50d-c266-44fc-b1bd-fa4d34be89e6");let On=_i;class Pc{constructor(i){S(this,"_event");S(this,"_position",new Le);S(this,"onDisposed",new tt);S(this,"updateMouseInfo",i=>{this._event=i});this.dom=i,this.setupEvents(!0)}get position(){if(this._event){const i=this.dom.getBoundingClientRect();this._position.x=this.getPositionX(i,this._event),this._position.y=this.getPositionY(i,this._event)}return this._position}dispose(){this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset()}getPositionY(i,t){return-((this.getDataObject(t).clientY-i.top)/(i.bottom-i.top))*2+1}getPositionX(i,t){return(this.getDataObject(t).clientX-i.left)/(i.right-i.left)*2-1}getDataObject(i){return i instanceof MouseEvent?i:i.touches[0]}setupEvents(i){i?(this.dom.addEventListener("pointermove",this.updateMouseInfo),this.dom.addEventListener("touchstart",this.updateMouseInfo)):(this.dom.removeEventListener("pointermove",this.updateMouseInfo),this.dom.removeEventListener("touchstart",this.updateMouseInfo))}}class Lc{constructor(i,t){S(this,"enabled",!0);S(this,"components");S(this,"onDisposed",new tt);S(this,"mouse");S(this,"three",new Bn);S(this,"world");const e=t.renderer;if(!e)throw new Error("A renderer is needed for the raycaster to work!");this.world=t,this.mouse=new Pc(e.three.domElement),this.components=i}dispose(){this.mouse.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}castRay(i=Array.from(this.world.meshes),t=this.mouse.position){if(!this.world)throw new Error("A world is needed to cast rays!");const e=this.world.camera.three;return this.three.setFromCamera(t,e),this.intersect(i)}castRayFromVector(i,t,e=Array.from(this.world.meshes)){return this.three.set(i,t),this.intersect(e)}intersect(i=Array.from(this.world.meshes)){const t=this.three.intersectObjects(i),e=this.filterClippingPlanes(t);return e.length>0?e[0]:null}filterClippingPlanes(i){if(!this.world.renderer)throw new Error("Renderer not found!");const t=this.world.renderer.three;if(!t.clippingPlanes)return i;const e=t.clippingPlanes;return i.length<=0||!e||(e==null?void 0:e.length)<=0?i:i.filter(s=>e.every(n=>n.distanceToPoint(s.point)>0))}}const ws=class ws extends Mt{constructor(t){super(t);S(this,"enabled",!0);S(this,"list",new Map);S(this,"onDisposed",new tt);t.add(ws.uuid,this)}get(t){if(this.list.has(t.uuid))return this.list.get(t.uuid);const e=new Lc(this.components,t);return this.list.set(t.uuid,e),t.onDisposed.add(()=>{this.delete(t)}),e}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()}};S(ws,"uuid","d5d8bdf0-db25-4952-b951-b643af207ace");let xi=ws;const Ue=new Bn,Ut=new H,Fe=new H,mt=new Jt,Gr={X:new H(1,0,0),Y:new H(0,1,0),Z:new H(0,0,1)},pn={type:"change"},kr={type:"mouseDown"},zr={type:"mouseUp",mode:null},Hr={type:"objectChange"};class _c extends ms{constructor(i,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 vc;this._gizmo=e,this.add(e);const s=new xc;this._plane=s,this.add(s);const n=this;function r(A,F){let R=F;Object.defineProperty(n,A,{get:function(){return R!==void 0?R:F},set:function(g){R!==g&&(R=g,s[A]=g,e[A]=g,n.dispatchEvent({type:A+"-changed",value:g}),n.dispatchEvent(pn))}}),n[A]=F,s[A]=F,e[A]=F}r("camera",i),r("object",void 0),r("enabled",!0),r("axis",null),r("mode","translate"),r("translationSnap",null),r("rotationSnap",null),r("scaleSnap",null),r("space","world"),r("size",1),r("dragging",!1),r("showX",!0),r("showY",!0),r("showZ",!0);const o=new H,a=new H,l=new Jt,u=new Jt,f=new H,I=new Jt,h=new H,d=new H,E=new H,C=0,p=new H;r("worldPosition",o),r("worldPositionStart",a),r("worldQuaternion",l),r("worldQuaternionStart",u),r("cameraPosition",f),r("cameraQuaternion",I),r("pointStart",h),r("pointEnd",d),r("rotationAxis",E),r("rotationAngle",C),r("eye",p),this._offset=new H,this._startNorm=new H,this._endNorm=new H,this._cameraScale=new H,this._parentPosition=new H,this._parentQuaternion=new Jt,this._parentQuaternionInv=new Jt,this._parentScale=new H,this._worldScaleStart=new H,this._worldQuaternionInv=new Jt,this._worldScale=new H,this._positionStart=new H,this._quaternionStart=new Jt,this._scaleStart=new H,this._getPointer=Mc.bind(this),this._onPointerDown=Dc.bind(this),this._onPointerHover=wc.bind(this),this._onPointerMove=Uc.bind(this),this._onPointerUp=bc.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(i){if(this.object===void 0||this.dragging===!0)return;Ue.setFromCamera(i,this.camera);const t=Cn(this._gizmo.picker[this.mode],Ue);t?this.axis=t.object.name:this.axis=null}pointerDown(i){if(!(this.object===void 0||this.dragging===!0||i.button!==0)&&this.axis!==null){Ue.setFromCamera(i,this.camera);const t=Cn(this._plane,Ue,!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,kr.mode=this.mode,this.dispatchEvent(kr)}}pointerMove(i){const t=this.axis,e=this.mode,s=this.object;let n=this.space;if(e==="scale"?n="local":(t==="E"||t==="XYZE"||t==="XYZ")&&(n="world"),s===void 0||t===null||this.dragging===!1||i.button!==-1)return;Ue.setFromCamera(i,this.camera);const r=Cn(this._plane,Ue,!0);if(r){if(this.pointEnd.copy(r.point).sub(this.worldPositionStart),e==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),n==="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),n==="local"&&t!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),s.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(n==="local"&&(s.position.applyQuaternion(mt.copy(this._quaternionStart).invert()),t.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this._quaternionStart)),n==="world"&&(s.parent&&s.position.add(Ut.setFromMatrixPosition(s.parent.matrixWorld)),t.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(Ut.setFromMatrixPosition(s.parent.matrixWorld))));else if(e==="scale"){if(t.search("XYZ")!==-1){let o=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(o*=-1),Fe.set(o,o,o)}else Ut.copy(this.pointStart),Fe.copy(this.pointEnd),Ut.applyQuaternion(this._worldQuaternionInv),Fe.applyQuaternion(this._worldQuaternionInv),Fe.divide(Ut),t.search("X")===-1&&(Fe.x=1),t.search("Y")===-1&&(Fe.y=1),t.search("Z")===-1&&(Fe.z=1);s.scale.copy(this._scaleStart).multiply(Fe),this.scaleSnap&&(t.search("X")!==-1&&(s.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Y")!==-1&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Z")!==-1&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(e==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const o=20/this.worldPosition.distanceTo(Ut.setFromMatrixPosition(this.camera.matrixWorld));let a=!1;t==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(Ut.copy(this.rotationAxis).cross(this.eye))*o):(t==="X"||t==="Y"||t==="Z")&&(this.rotationAxis.copy(Gr[t]),Ut.copy(Gr[t]),n==="local"&&Ut.applyQuaternion(this.worldQuaternion),Ut.cross(this.eye),Ut.length()===0?a=!0:this.rotationAngle=this._offset.dot(Ut.normalize())*o),(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),n==="local"&&t!=="E"&&t!=="XYZE"?(s.quaternion.copy(this._quaternionStart),s.quaternion.multiply(mt.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),s.quaternion.copy(mt.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(pn),this.dispatchEvent(Hr)}}pointerUp(i){i.button===0&&(this.dragging&&this.axis!==null&&(zr.mode=this.mode,this.dispatchEvent(zr)),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(i){i.geometry&&i.geometry.dispose(),i.material&&i.material.dispose()})}attach(i){return this.object=i,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(pn),this.dispatchEvent(Hr),this.pointStart.copy(this.pointEnd))}getRaycaster(){return Ue}getMode(){return this.mode}setMode(i){this.mode=i}setTranslationSnap(i){this.translationSnap=i}setRotationSnap(i){this.rotationSnap=i}setScaleSnap(i){this.scaleSnap=i}setSize(i){this.size=i}setSpace(i){this.space=i}}function Mc(c){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:c.button};{const i=this.domElement.getBoundingClientRect();return{x:(c.clientX-i.left)/i.width*2-1,y:-(c.clientY-i.top)/i.height*2+1,button:c.button}}}function wc(c){if(this.enabled)switch(c.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(c));break}}function Dc(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 Uc(c){this.enabled&&this.pointerMove(this._getPointer(c))}function bc(c){this.enabled&&(this.domElement.releasePointerCapture(c.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(c)))}function Cn(c,i,t){const e=i.intersectObject(c,!0);for(let s=0;s.9&&(r.visible=!1)),this.axis==="Y"&&(mt.setFromEuler(us.set(0,0,Math.PI/2)),r.quaternion.copy(e).multiply(mt),Math.abs(Et.copy(be).applyQuaternion(e).dot(this.eye))>.9&&(r.visible=!1)),this.axis==="Z"&&(mt.setFromEuler(us.set(0,Math.PI/2,0)),r.quaternion.copy(e).multiply(mt),Math.abs(Et.copy(yi).applyQuaternion(e).dot(this.eye))>.9&&(r.visible=!1)),this.axis==="XYZE"&&(mt.setFromEuler(us.set(0,Math.PI/2,0)),Et.copy(this.rotationAxis),r.quaternion.setFromRotationMatrix(Xr.lookAt(Wr,Et,be)),r.quaternion.multiply(mt),r.visible=this.dragging),this.axis==="E"&&(r.visible=!1)):r.name==="START"?(r.position.copy(this.worldPositionStart),r.visible=this.dragging):r.name==="END"?(r.position.copy(this.worldPosition),r.visible=this.dragging):r.name==="DELTA"?(r.position.copy(this.worldPositionStart),r.quaternion.copy(this.worldQuaternionStart),Ut.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),Ut.applyQuaternion(this.worldQuaternionStart.clone().invert()),r.scale.copy(Ut),r.visible=this.dragging):(r.quaternion.copy(e),this.dragging?r.position.copy(this.worldPositionStart):r.position.copy(this.worldPosition),this.axis&&(r.visible=this.axis.search(r.name)!==-1));continue}r.quaternion.copy(e),this.mode==="translate"||this.mode==="scale"?(r.name==="X"&&Math.abs(Et.copy(Ni).applyQuaternion(e).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="Y"&&Math.abs(Et.copy(be).applyQuaternion(e).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="Z"&&Math.abs(Et.copy(yi).applyQuaternion(e).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="XY"&&Math.abs(Et.copy(yi).applyQuaternion(e).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="YZ"&&Math.abs(Et.copy(Ni).applyQuaternion(e).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="XZ"&&Math.abs(Et.copy(be).applyQuaternion(e).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1)):this.mode==="rotate"&&(fs.copy(e),Et.copy(this.eye).applyQuaternion(mt.copy(e).invert()),r.name.search("E")!==-1&&r.quaternion.setFromRotationMatrix(Xr.lookAt(this.eye,Wr,be)),r.name==="X"&&(mt.setFromAxisAngle(Ni,Math.atan2(-Et.y,Et.z)),mt.multiplyQuaternions(fs,mt),r.quaternion.copy(mt)),r.name==="Y"&&(mt.setFromAxisAngle(be,Math.atan2(Et.x,Et.z)),mt.multiplyQuaternions(fs,mt),r.quaternion.copy(mt)),r.name==="Z"&&(mt.setFromAxisAngle(yi,Math.atan2(Et.y,Et.x)),mt.multiplyQuaternions(fs,mt),r.quaternion.copy(mt))),r.visible=r.visible&&(r.name.indexOf("X")===-1||this.showX),r.visible=r.visible&&(r.name.indexOf("Y")===-1||this.showY),r.visible=r.visible&&(r.name.indexOf("Z")===-1||this.showZ),r.visible=r.visible&&(r.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),r.material._color=r.material._color||r.material.color.clone(),r.material._opacity=r.material._opacity||r.material.opacity,r.material.color.copy(r.material._color),r.material.opacity=r.material._opacity,this.enabled&&this.axis&&(r.name===this.axis||this.axis.split("").some(function(a){return r.name===a}))&&(r.material.color.setHex(16776960),r.material.opacity=1)}super.updateMatrixWorld(i)}}class xc extends it{constructor(){super(new ro(1e5,1e5,2,2),new si({visible:!1,wireframe:!0,side:Gs,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(i){let t=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(t="local"),hs.copy(Ni).applyQuaternion(t==="local"?this.worldQuaternion:Cs),Ai.copy(be).applyQuaternion(t==="local"?this.worldQuaternion:Cs),Fi.copy(yi).applyQuaternion(t==="local"?this.worldQuaternion:Cs),Et.copy(Ai),this.mode){case"translate":case"scale":switch(this.axis){case"X":Et.copy(this.eye).cross(hs),ce.copy(hs).cross(Et);break;case"Y":Et.copy(this.eye).cross(Ai),ce.copy(Ai).cross(Et);break;case"Z":Et.copy(this.eye).cross(Fi),ce.copy(Fi).cross(Et);break;case"XY":ce.copy(Fi);break;case"YZ":ce.copy(hs);break;case"XZ":Et.copy(Fi),ce.copy(Ai);break;case"XYZ":case"E":ce.set(0,0,0);break}break;case"rotate":default:ce.set(0,0,0)}ce.length()===0?this.quaternion.copy(this.cameraQuaternion):($r.lookAt(Ut.set(0,0,0),ce,Et),this.quaternion.setFromRotationMatrix($r)),super.updateMatrixWorld(i)}}class ir{constructor(i,t,e,s,n,r=5,o=!0){S(this,"onDraggingStarted",new tt);S(this,"onDraggingEnded",new tt);S(this,"onDisposed",new tt);S(this,"normal");S(this,"origin");S(this,"three",new vn);S(this,"components");S(this,"world");S(this,"type","default");S(this,"_helper");S(this,"_visible",!0);S(this,"_enabled",!0);S(this,"_controlsActive",!1);S(this,"_arrowBoundBox",new it);S(this,"_planeMesh");S(this,"_controls");S(this,"_hiddenMaterial",new si({visible:!1}));S(this,"update",()=>{this._enabled&&this.three.setFromNormalAndCoplanarPoint(this.normal,this._helper.position)});S(this,"changeDrag",i=>{this._visible=!i.value,this.preventCameraMovement(),this.notifyDraggingChanged(i)});if(this.components=i,this.world=t,!t.renderer)throw new Error("The given world must have a renderer!");this.normal=s,this.origin=e,t.renderer.setPlane(!0,this.three),this._planeMesh=ir.newPlaneMesh(r,n),this._helper=this.newHelper(),this._controls=this.newTransformControls(),this.three.setFromNormalAndCoplanarPoint(s,e),o&&this.toggleControls(!0)}get enabled(){return this._enabled}set enabled(i){if(!this.world.isDisposing){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");this._enabled=i,this.world.renderer.setPlane(i,this.three)}}get visible(){return this._visible}set visible(i){this._visible=i,this._controls.visible=i,this._helper.visible=i,this.toggleControls(i)}get meshes(){return[this._planeMesh,this._arrowBoundBox]}get planeMaterial(){return this._planeMesh.material}set planeMaterial(i){this._planeMesh.material=i}get size(){return this._planeMesh.scale.x}set size(i){this._planeMesh.scale.set(i,i,i)}get helper(){return this._helper}setFromNormalAndCoplanarPoint(i,t){this.reset(),this.normal.equals(i)||(this.normal.copy(i),this._helper.lookAt(i)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix(),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 i=new H(1,0,0),t=new H;this.normal.equals(i)||(this.normal.copy(i),this._helper.lookAt(i)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix()}toggleControls(i){if(i){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=i}newTransformControls(){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");const i=this.world.camera.three,t=this.world.renderer.three.domElement,e=new _c(i,t);return this.initializeControls(e),this.world.scene.three.add(e),e}initializeControls(i){i.attach(this._helper),i.showX=!1,i.showY=!1,i.setSpace("local"),this.createArrowBoundingBox(),i.children[0].children[0].add(this._arrowBoundBox)}createArrowBoundingBox(){this._arrowBoundBox.geometry=new vt(.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(i){i.value?this.onDraggingStarted.trigger():this.onDraggingEnded.trigger()}preventCameraMovement(){this.world.camera.enabled=this._visible}newHelper(){const i=new ms;return i.lookAt(this.normal),i.position.copy(this.origin),this._planeMesh.position.z+=.01,i.add(this._planeMesh),this.world.scene.three.add(i),i}static newPlaneMesh(i,t){const e=new ro(1),s=new it(e,t);return s.scale.set(i,i,i),s}}class Bc extends Xs{constructor(){super(...arguments);S(this,"_config",{enabled:{value:!0,type:"Boolean"},visible:{value:!0,type:"Boolean"},color:{value:new Bi,type:"Color"},opacity:{type:"Number",interpolable:!0,value:1,min:0,max:1},size:{type:"Number",interpolable:!0,value:2,min:0,max:100}})}get enabled(){return this._config.enabled.value}set enabled(t){this._config.enabled.value=t,this._component.enabled=t}get visible(){return this._config.visible.value}set visible(t){this._config.visible.value=t,this._component.visible=t}get color(){return this._config.color.value}set color(t){this._config.color.value=t,this._component.material.color.copy(t)}get opacity(){return this._config.opacity.value}set opacity(t){this._config.opacity.value=t,this._component.material.opacity=t}get size(){return this._config.size.value}set size(t){this._config.size.value=t,this._component.size=t}}const Je=class Je extends Mt{constructor(t){super(t);S(this,"onSetup",new tt);S(this,"onBeforeDrag",new tt);S(this,"onAfterDrag",new tt);S(this,"onBeforeCreate",new tt);S(this,"onBeforeCancel",new tt);S(this,"onAfterCancel",new tt);S(this,"onBeforeDelete",new tt);S(this,"onAfterCreate",new tt);S(this,"onAfterDelete",new tt);S(this,"onDisposed",new tt);S(this,"isSetup",!1);S(this,"orthogonalY",!1);S(this,"toleranceOrthogonalY",.7);S(this,"Type",ir);S(this,"list",[]);S(this,"config",new Bc(this,this.components,"Clipper",Je.uuid));S(this,"_defaultConfig",{color:new Bi(12255487),opacity:.2,size:2});S(this,"_material",new si({color:12255487,side:Gs,transparent:!0,opacity:.2}));S(this,"_size",5);S(this,"_enabled",!1);S(this,"_visible",!0);S(this,"_onStartDragging",()=>{this.onBeforeDrag.trigger()});S(this,"_onEndDragging",()=>{this.onAfterDrag.trigger()});this.components.add(Je.uuid,this)}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}dispose(){this._enabled=!1,this.components.get(vi).list.delete(this.config.uuid);for(const e of this.list)e.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(Je.uuid),this.onDisposed.reset()}create(t){const n=this.components.get(xi).get(t).castRay();return n?this.createPlaneFromIntersection(t,n):null}createFromNormalAndCoplanarPoint(t,e,s){const n=this.newPlane(t,s,e);return this.updateMaterialsAndPlanes(),n}delete(t,e){e||(e=this.pickPlane(t)),e&&this.deletePlane(e)}deleteAll(t){const e=[...this.list];for(const s of e)if(!t||t.has(s.type)){this.delete(s.world,s);const n=this.list.indexOf(s);n!==-1&&this.list.splice(n,1)}}setup(t){const e={...this._defaultConfig,...t};this.config.color=e.color,this.config.opacity=e.opacity,this.config.size=e.size,this.isSetup=!0,this.onSetup.trigger()}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 s=this.components.get(xi).get(t),n=this.getAllPlaneMeshes(),r=s.castRay(n);if(r){const o=r.object;return this.list.find(a=>a.meshes.includes(o))}}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 s=e.point.distanceTo(new H(0,0,0)),n=(a=e.face)==null?void 0:a.normal;if(!s||!n)return null;const r=this.getWorldNormal(e,n),o=this.newPlane(t,e.point,r.negate());return o.visible=this._visible,o.size=this._size,t.renderer.setPlane(!0,o.three),this.updateMaterialsAndPlanes(),o}getWorldNormal(t,e){const s=t.object;let n=t.object.matrixWorld.clone();if(s instanceof Ts&&t.instanceId!==void 0){const l=new Nt;s.getMatrixAt(t.instanceId,l),n=l.multiply(n)}const o=new ko().getNormalMatrix(n),a=e.clone().applyMatrix3(o).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,s){const n=new this.Type(this.components,t,e,s,this._material);return n.onDraggingStarted.add(this._onStartDragging),n.onDraggingEnded.add(this._onEndDragging),this.list.push(n),this.onAfterCreate.trigger(n),n}updateMaterialsAndPlanes(){const t=this.components.get(gs);for(const[e,s]of t.list){if(!s.renderer)continue;s.renderer.updateClippingPlanes();const{clippingPlanes:n}=s.renderer;for(const r of s.meshes)if(r.material)if(Array.isArray(r.material))for(const o of r.material)o.clippingPlanes=n;else r.material.clippingPlanes=n}}};S(Je,"uuid","66290bc5-18c4-4cd1-9379-2e17a0617611");let Nn=Je;class Yc{constructor(i){S(this,"enabled",!1);S(this,"id","FirstPerson");this.camera=i}set(i){if(this.enabled=i,i){if(this.camera.projection.current!=="Perspective"){this.camera.set("Orbit");return}this.setupFirstPersonCamera()}}setupFirstPersonCamera(){const i=this.camera.controls,t=new H;i.distance--,i.getPosition(t),i.minDistance=1,i.maxDistance=1,i.distance=1,i.moveTo(t.x,t.y,t.z),i.truckSpeed=50,i.mouseButtons.wheel=bt.ACTION.DOLLY,i.touches.two=bt.ACTION.TOUCH_ZOOM_TRUCK}}class Vc{constructor(i){S(this,"enabled",!0);S(this,"id","Orbit");this.camera=i,this.activateOrbitControls()}set(i){this.enabled=i,i&&this.activateOrbitControls()}activateOrbitControls(){const i=this.camera.controls;i.minDistance=1,i.maxDistance=300;const t=new H;i.getPosition(t);const e=t.length();i.distance=e,i.truckSpeed=2;const{rotation:s}=this.camera.three,n=new H(0,0,-1).applyEuler(s),r=t.addScaledVector(n,e);i.moveTo(r.x,r.y,r.z)}}class Gc{constructor(i){S(this,"enabled",!1);S(this,"id","Plan");S(this,"mouseAction1");S(this,"mouseAction2");S(this,"mouseInitialized",!1);S(this,"defaultAzimuthSpeed");S(this,"defaultPolarSpeed");this.camera=i,this.defaultAzimuthSpeed=i.controls.azimuthRotateSpeed,this.defaultPolarSpeed=i.controls.polarRotateSpeed}set(i){this.enabled=i;const t=this.camera.controls;t.azimuthRotateSpeed=i?0:this.defaultAzimuthSpeed,t.polarRotateSpeed=i?0:this.defaultPolarSpeed,this.mouseInitialized||(this.mouseAction1=t.touches.one,this.mouseAction2=t.touches.two,this.mouseInitialized=!0),i?(t.mouseButtons.left=bt.ACTION.TRUCK,t.touches.one=bt.ACTION.TOUCH_TRUCK,t.touches.two=bt.ACTION.TOUCH_ZOOM):(t.mouseButtons.left=bt.ACTION.ROTATE,t.touches.one=this.mouseAction1,t.touches.two=this.mouseAction2)}}class kc{constructor(i){S(this,"onChanged",new tt);S(this,"current","Perspective");S(this,"camera");S(this,"matchOrthoDistanceEnabled",!1);S(this,"_component");S(this,"_previousDistance",-1);this._component=i,this.camera=i.three}async set(i){this.current!==i&&(i==="Orthographic"?this.setOrthoCamera():await this.setPerspectiveCamera(),this.onChanged.trigger(this.camera))}async toggle(){const t=this.current==="Perspective"?"Orthographic":"Perspective";await this.set(t)}setOrthoCamera(){if(this._component.mode===null||this._component.mode.id==="FirstPerson")return;this._previousDistance=this._component.controls.distance,this._component.controls.distance=200;const i=this.getPerspectiveDims();if(!i)return;const{width:t,height:e}=i;this.setupOrthoCamera(e,t),this.camera=this._component.threeOrtho,this.current="Orthographic"}getPerspectiveDims(){const i=this._component.currentWorld;if(!i||!i.renderer)return null;const t=new H;this._component.threePersp.getWorldDirection(t);const e=new H;this._component.controls.getTarget(e);const n=e.clone().sub(this._component.threePersp.position).dot(t),r=i.renderer.getSize(),o=r.x/r.y,a=this._component.threePersp,l=n*2*Math.atan(a.fov*(Math.PI/180)/2);return{width:l*o,height:l}}setupOrthoCamera(i,t){this._component.controls.mouseButtons.wheel=bt.ACTION.ZOOM,this._component.controls.mouseButtons.middle=bt.ACTION.ZOOM;const e=this._component.threePersp,s=this._component.threeOrtho;s.zoom=1,s.left=t/-2,s.right=t/2,s.top=i/2,s.bottom=i/-2,s.updateProjectionMatrix(),s.position.copy(e.position),s.quaternion.copy(e.quaternion),this._component.controls.camera=s}getDistance(){const i=this._component.threePersp,t=this._component.threeOrtho;return(t.top-t.bottom)/t.zoom/(2*Math.atan(i.fov*(Math.PI/180)/2))}async setPerspectiveCamera(){this._component.controls.mouseButtons.wheel=bt.ACTION.DOLLY,this._component.controls.mouseButtons.middle=bt.ACTION.DOLLY;const i=this._component.threePersp,t=this._component.threeOrtho;i.position.copy(t.position),i.quaternion.copy(t.quaternion),this._component.controls.mouseButtons.wheel=bt.ACTION.DOLLY,this.matchOrthoDistanceEnabled?this._component.controls.distance=this.getDistance():this._component.controls.distance=this._previousDistance,await this._component.controls.zoomTo(1),i.updateProjectionMatrix(),this._component.controls.camera=i,this.camera=i,this.current="Perspective"}}class zc extends er{constructor(t){super(t);S(this,"projection");S(this,"threeOrtho");S(this,"threePersp");S(this,"_userInputButtons",{});S(this,"_frustumSize",50);S(this,"_navigationModes",new Map);S(this,"_mode",null);S(this,"previousSize",null);this.threePersp=this.three,this.threeOrtho=this.newOrthoCamera(),this.projection=new kc(this),this.onAspectUpdated.add(()=>{this.setOrthoPerspCameraAspect()}),this.projection.onChanged.add(e=>{this.three=e,this.updateAspect()}),this.onWorldChanged.add(({action:e})=>{e==="added"&&(this._navigationModes.clear(),this._navigationModes.set("Orbit",new Vc(this)),this._navigationModes.set("FirstPerson",new Yc(this)),this._navigationModes.set("Plan",new Gc(this)),this._mode=this._navigationModes.get("Orbit"),this.mode.set(!0,{preventTargetAdjustment:!0}),this.currentWorld&&this.currentWorld.renderer&&(this.previousSize=this.currentWorld.renderer.getSize().clone()))})}get mode(){if(!this._mode)throw new Error("Mode not found, camera not initialized");return this._mode}dispose(){super.dispose(),this.threeOrtho.removeFromParent()}set(t){if(this.mode!==null&&this.mode.id!==t){if(this.mode.set(!1),!this._navigationModes.has(t))throw new Error("The specified mode does not exist!");this._mode=this._navigationModes.get(t),this.mode.set(!0)}}async fit(t,e=1.5){if(!this.enabled)return;const s=Number.MAX_VALUE,n=Number.MIN_VALUE,r=new H(s,s,s),o=new H(n,n,n);for(const h of t){const d=new Lt().setFromObject(h);d.min.xo.x&&(o.x=d.max.x),d.max.y>o.y&&(o.y=d.max.y),d.max.z>o.z&&(o.z=d.max.z)}const a=new Lt(r,o),l=new H;a.getSize(l);const u=new H;a.getCenter(u);const f=Math.max(l.x,l.y,l.z)*e,I=new Vs(u,f);await this.controls.fitToSphere(I,!0)}setUserInput(t){t?this.enableUserInput():this.disableUserInput()}disableUserInput(){this._userInputButtons.left=this.controls.mouseButtons.left,this._userInputButtons.right=this.controls.mouseButtons.right,this._userInputButtons.middle=this.controls.mouseButtons.middle,this._userInputButtons.wheel=this.controls.mouseButtons.wheel,this.controls.mouseButtons.left=0,this.controls.mouseButtons.right=0,this.controls.mouseButtons.middle=0,this.controls.mouseButtons.wheel=0}enableUserInput(){Object.keys(this._userInputButtons).length!==0&&(this.controls.mouseButtons.left=this._userInputButtons.left,this.controls.mouseButtons.right=this._userInputButtons.right,this.controls.mouseButtons.middle=this._userInputButtons.middle,this.controls.mouseButtons.wheel=this._userInputButtons.wheel)}newOrthoCamera(){const t=window.innerWidth/window.innerHeight;return new xn(this._frustumSize*t/-2,this._frustumSize*t/2,this._frustumSize/2,this._frustumSize/-2,.1,1e3)}setOrthoPerspCameraAspect(){if(!this.currentWorld||!this.currentWorld.renderer||!this.previousSize)return;const t=this.currentWorld.renderer.getSize(),e=this.threeOrtho.top,s=this.threeOrtho.right,n=t.y/this.previousSize.y,r=t.x/this.previousSize.x,o=e*n,a=s*r;this.threeOrtho.left=-a,this.threeOrtho.right=a,this.threeOrtho.top=o,this.threeOrtho.bottom=-o,this.threeOrtho.updateProjectionMatrix(),this.previousSize.copy(t)}}const Zr=new Map([[ks,{forRelated:"Decomposes",forRelating:"IsDecomposedBy"}],[Yn,{forRelated:"HasAssociations",forRelating:"AssociatedTo"}],[Vn,{forRelated:"HasAssociations",forRelating:"ClassificationForObjects"}],[Gn,{forRelated:"HasAssignments",forRelating:"IsGroupedBy"}],[Yi,{forRelated:"IsDefinedBy",forRelating:"DefinesOcurrence"}],[kn,{forRelated:"IsTypedBy",forRelating:"Types"}],[zn,{forRelated:"IsDefinedBy",forRelating:"Defines"}],[zs,{forRelated:"ContainedInStructure",forRelating:"ContainsElements"}],[Hn,{forRelated:"AssignedToFlowElement",forRelating:"HasControlElements"}],[Wn,{forRelated:"ConnectedFrom",forRelating:"ConnectedTo"}],[Xn,{forRelated:"HasAssignments",forRelating:"ReferencedBy"}],[$n,{forRelated:"HasContext",forRelating:"Declares"}],[Zn,{forRelated:"HasAssignments",forRelating:"Controls"}],[jn,{forRelated:"Nests",forRelating:"IsNestedBy"}],[qn,{forRelated:"HasAssociations",forRelating:"DocumentRefForObjects"}]]),Ss={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 ii{static async getUnits(i){var r,o,a;const{IFCUNITASSIGNMENT:t}=le,e=await i.getAllPropertiesOfType(t);if(!e)return 1;const s=Object.keys(e),n=e[parseInt(s[0],10)];for(const l of n.Units){if(l.value===void 0||l.value===null)continue;const u=await i.getProperties(l.value);if(!u||!u.UnitType||!u.UnitType.value||u.UnitType.value!=="LENGTHUNIT")continue;let I=1,h=1;return u.Name.value==="METRE"&&(h=1),u.Name.value==="FOOT"&&(h=.3048),((r=u.Prefix)==null?void 0:r.value)==="MILLI"?I=.001:((o=u.Prefix)==null?void 0:o.value)==="CENTI"?I=.01:((a=u.Prefix)==null?void 0:a.value)==="DECI"&&(I=.1),h*I}return 1}static async findItemByGuid(i,t){var s;const e=i.getAllPropertiesIDs();for(const n of e){const r=await i.getProperties(n);if(r&&((s=r.GlobalId)==null?void 0:s.value)===t)return r}return null}static async getRelationMap(i,t,e){var a;const n=e??(async()=>{}),r={},o=i.getAllPropertiesIDs();for(const l of o){const u=await i.getProperties(l);if(!u)continue;const f=u.type===t,I=Object.keys(u).find(p=>p.startsWith("Relating")),h=Object.keys(u).find(p=>p.startsWith("Related"));if(!(f&&I&&h))continue;const d=await i.getProperties((a=u[I])==null?void 0:a.value),E=u[h];if(!d||!E||!(E&&Array.isArray(E)))continue;const C=E.map(p=>p.value);await n(d.expressID,C),r[d.expressID]=C}return r}static async getQsetQuantities(i,t,e){const n=e??(()=>{}),r=await i.getProperties(t);return!r||r.type!==Es?null:(r.Quantities??[{}]).map(l=>(l.value&&n(l.value),l.value)).filter(l=>l!==null)}static async getPsetProps(i,t,e){const n=e??(()=>{}),r=await i.getProperties(t);return!r||r.type!==ei?null:(r.HasProperties??[{}]).map(l=>(l.value&&n(l.value),l.value)).filter(l=>l!==null)}static async getPsetRel(i,t){var o;if(!await i.getProperties(t))return null;const s=await i.getAllPropertiesOfType(Yi);if(!s)return null;const n=Object.values(s);let r=null;for(const a of n)((o=a.RelatingPropertyDefinition)==null?void 0:o.value)===t&&(r=a.expressID);return r}static async getQsetRel(i,t){return ii.getPsetRel(i,t)}static async getEntityName(i,t){var r;const e=await i.getProperties(t);if(!e)return{key:null,name:null};const s=Object.keys(e).find(o=>o.endsWith("Name"))??null,n=s?(r=e[s])==null?void 0:r.value:null;return{key:s,name:n}}static async getQuantityValue(i,t){const e=await i.getProperties(t);if(!e)return{key:null,value:null};const s=Object.keys(e).find(r=>r.endsWith("Value"))??null;let n;return s===null||e[s]===void 0||e[s]===null?n=null:n=e[s].value,{key:s,value:n}}static isRel(i){return Ss[i].startsWith("IFCREL")}static async attributeExists(i,t,e){const s=await i.getProperties(t);return s?Object.keys(s).includes(e):!1}static async groupEntitiesByType(i,t){var s;const e=new Map;for(const n of t){const r=await i.getProperties(n);if(!r)continue;const o=r.type;e.get(o)||e.set(o,new Set),(s=e.get(o))==null||s.add(n)}return e}}const Hc={IFCURIREFERENCE:"IfcUriReference",IFCTIME:"IfcTime",IFCTEMPERATURERATEOFCHANGEMEASURE:"IfcTemperatureRateOfChangeMeasure",IFCSOUNDPRESSURELEVELMEASURE:"IfcSoundPressureLevelMeasure",IFCSOUNDPOWERLEVELMEASURE:"IfcSoundPowerLevelMeasure",IFCPROPERTYSETDEFINITIONSET:"IfcPropertySetDefinitionSet",IFCPOSITIVEINTEGER:"IfcPositiveInteger",IFCNONNEGATIVELENGTHMEASURE:"IfcNonNegativeLengthMeasure",IFCLINEINDEX:"IfcLineIndex",IFCLANGUAGEID:"IfcLanguageId",IFCDURATION:"IfcDuration",IFCDAYINWEEKNUMBER:"IfcDayInWeekNumber",IFCDATETIME:"IfcDateTime",IFCDATE:"IfcDate",IFCCARDINALPOINTREFERENCE:"IfcCardinalPointReference",IFCBINARY:"IfcBinary",IFCAREADENSITYMEASURE:"IfcAreaDensityMeasure",IFCARCINDEX:"IfcArcIndex",IFCYEARNUMBER:"IfcYearNumber",IFCWARPINGMOMENTMEASURE:"IfcWarpingMomentMeasure",IFCWARPINGCONSTANTMEASURE:"IfcWarpingConstantMeasure",IFCVOLUMETRICFLOWRATEMEASURE:"IfcVolumetricFlowRateMeasure",IFCVOLUMEMEASURE:"IfcVolumeMeasure",IFCVAPORPERMEABILITYMEASURE:"IfcVaporPermeabilityMeasure",IFCTORQUEMEASURE:"IfcTorqueMeasure",IFCTIMESTAMP:"IfcTimestamp",IFCTIMEMEASURE:"IfcTimeMeasure",IFCTHERMODYNAMICTEMPERATUREMEASURE:"IfcThermodynamicTemperatureMeasure",IFCTHERMALTRANSMITTANCEMEASURE:"IfcThermalTransmittanceMeasure",IFCTHERMALRESISTANCEMEASURE:"IfcThermalResistanceMeasure",IFCTHERMALEXPANSIONCOEFFICIENTMEASURE:"IfcThermalExpansionCoefficientMeasure",IFCTHERMALCONDUCTIVITYMEASURE:"IfcThermalConductivityMeasure",IFCTHERMALADMITTANCEMEASURE:"IfcThermalAdmittanceMeasure",IFCTEXTTRANSFORMATION:"IfcTextTransformation",IFCTEXTFONTNAME:"IfcTextFontName",IFCTEXTDECORATION:"IfcTextDecoration",IFCTEXTALIGNMENT:"IfcTextAlignment",IFCTEXT:"IfcText",IFCTEMPERATUREGRADIENTMEASURE:"IfcTemperatureGradientMeasure",IFCSPECULARROUGHNESS:"IfcSpecularRoughness",IFCSPECULAREXPONENT:"IfcSpecularExponent",IFCSPECIFICHEATCAPACITYMEASURE:"IfcSpecificHeatCapacityMeasure",IFCSOUNDPRESSUREMEASURE:"IfcSoundPressureMeasure",IFCSOUNDPOWERMEASURE:"IfcSoundPowerMeasure",IFCSOLIDANGLEMEASURE:"IfcSolidAngleMeasure",IFCSHEARMODULUSMEASURE:"IfcShearModulusMeasure",IFCSECTIONALAREAINTEGRALMEASURE:"IfcSectionalAreaIntegralMeasure",IFCSECTIONMODULUSMEASURE:"IfcSectionModulusMeasure",IFCSECONDINMINUTE:"IfcSecondInMinute",IFCROTATIONALSTIFFNESSMEASURE:"IfcRotationalStiffnessMeasure",IFCROTATIONALMASSMEASURE:"IfcRotationalMassMeasure",IFCROTATIONALFREQUENCYMEASURE:"IfcRotationalFrequencyMeasure",IFCREAL:"IfcReal",IFCRATIOMEASURE:"IfcRatioMeasure",IFCRADIOACTIVITYMEASURE:"IfcRadioactivityMeasure",IFCPRESSUREMEASURE:"IfcPressureMeasure",IFCPRESENTABLETEXT:"IfcPresentableText",IFCPOWERMEASURE:"IfcPowerMeasure",IFCPOSITIVERATIOMEASURE:"IfcPositiveRatioMeasure",IFCPOSITIVEPLANEANGLEMEASURE:"IfcPositivePlaneAngleMeasure",IFCPOSITIVELENGTHMEASURE:"IfcPositiveLengthMeasure",IFCPLANEANGLEMEASURE:"IfcPlaneAngleMeasure",IFCPLANARFORCEMEASURE:"IfcPlanarForceMeasure",IFCPARAMETERVALUE:"IfcParameterValue",IFCPHMEASURE:"IfcPhMeasure",IFCNUMERICMEASURE:"IfcNumericMeasure",IFCNORMALISEDRATIOMEASURE:"IfcNormalisedRatioMeasure",IFCMONTHINYEARNUMBER:"IfcMonthInYearNumber",IFCMONETARYMEASURE:"IfcMonetaryMeasure",IFCMOMENTOFINERTIAMEASURE:"IfcMomentOfInertiaMeasure",IFCMOLECULARWEIGHTMEASURE:"IfcMolecularWeightMeasure",IFCMOISTUREDIFFUSIVITYMEASURE:"IfcMoistureDiffusivityMeasure",IFCMODULUSOFSUBGRADEREACTIONMEASURE:"IfcModulusOfSubgradeReactionMeasure",IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE:"IfcModulusOfRotationalSubgradeReactionMeasure",IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE:"IfcModulusOfLinearSubgradeReactionMeasure",IFCMODULUSOFELASTICITYMEASURE:"IfcModulusOfElasticityMeasure",IFCMINUTEINHOUR:"IfcMinuteInHour",IFCMASSPERLENGTHMEASURE:"IfcMassPerLengthMeasure",IFCMASSMEASURE:"IfcMassMeasure",IFCMASSFLOWRATEMEASURE:"IfcMassFlowRateMeasure",IFCMASSDENSITYMEASURE:"IfcMassDensityMeasure",IFCMAGNETICFLUXMEASURE:"IfcMagneticFluxMeasure",IFCMAGNETICFLUXDENSITYMEASURE:"IfcMagneticFluxDensityMeasure",IFCLUMINOUSINTENSITYMEASURE:"IfcLuminousIntensityMeasure",IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE:"IfcLuminousIntensityDistributionMeasure",IFCLUMINOUSFLUXMEASURE:"IfcLuminousFluxMeasure",IFCLOGICAL:"IfcLogical",IFCLINEARVELOCITYMEASURE:"IfcLinearVelocityMeasure",IFCLINEARSTIFFNESSMEASURE:"IfcLinearStiffnessMeasure",IFCLINEARMOMENTMEASURE:"IfcLinearMomentMeasure",IFCLINEARFORCEMEASURE:"IfcLinearForceMeasure",IFCLENGTHMEASURE:"IfcLengthMeasure",IFCLABEL:"IfcLabel",IFCKINEMATICVISCOSITYMEASURE:"IfcKinematicViscosityMeasure",IFCISOTHERMALMOISTURECAPACITYMEASURE:"IfcIsothermalMoistureCapacityMeasure",IFCIONCONCENTRATIONMEASURE:"IfcIonConcentrationMeasure",IFCINTEGERCOUNTRATEMEASURE:"IfcIntegerCountRateMeasure",IFCINTEGER:"IfcInteger",IFCINDUCTANCEMEASURE:"IfcInductanceMeasure",IFCILLUMINANCEMEASURE:"IfcIlluminanceMeasure",IFCIDENTIFIER:"IfcIdentifier",IFCHOURINDAY:"IfcHourInDay",IFCHEATINGVALUEMEASURE:"IfcHeatingValueMeasure",IFCHEATFLUXDENSITYMEASURE:"IfcHeatFluxDensityMeasure",IFCGLOBALLYUNIQUEID:"IfcGloballyUniqueId",IFCFREQUENCYMEASURE:"IfcFrequencyMeasure",IFCFORCEMEASURE:"IfcForceMeasure",IFCFONTWEIGHT:"IfcFontWeight",IFCFONTVARIANT:"IfcFontVariant",IFCFONTSTYLE:"IfcFontStyle",IFCENERGYMEASURE:"IfcEnergyMeasure",IFCELECTRICVOLTAGEMEASURE:"IfcElectricVoltageMeasure",IFCELECTRICRESISTANCEMEASURE:"IfcElectricResistanceMeasure",IFCELECTRICCURRENTMEASURE:"IfcElectricCurrentMeasure",IFCELECTRICCONDUCTANCEMEASURE:"IfcElectricConductanceMeasure",IFCELECTRICCHARGEMEASURE:"IfcElectricChargeMeasure",IFCELECTRICCAPACITANCEMEASURE:"IfcElectricCapacitanceMeasure",IFCDYNAMICVISCOSITYMEASURE:"IfcDynamicViscosityMeasure",IFCDOSEEQUIVALENTMEASURE:"IfcDoseEquivalentMeasure",IFCDIMENSIONCOUNT:"IfcDimensionCount",IFCDESCRIPTIVEMEASURE:"IfcDescriptiveMeasure",IFCDAYLIGHTSAVINGHOUR:"IfcDaylightSavingHour",IFCDAYINMONTHNUMBER:"IfcDayInMonthNumber",IFCCURVATUREMEASURE:"IfcCurvatureMeasure",IFCCOUNTMEASURE:"IfcCountMeasure",IFCCONTEXTDEPENDENTMEASURE:"IfcContextDependentMeasure",IFCCOMPOUNDPLANEANGLEMEASURE:"IfcCompoundPlaneAngleMeasure",IFCCOMPLEXNUMBER:"IfcComplexNumber",IFCBOXALIGNMENT:"IfcBoxAlignment",IFCBOOLEAN:"IfcBoolean",IFCAREAMEASURE:"IfcAreaMeasure",IFCANGULARVELOCITYMEASURE:"IfcAngularVelocityMeasure",IFCAMOUNTOFSUBSTANCEMEASURE:"IfcAmountOfSubstanceMeasure",IFCACCELERATIONMEASURE:"IfcAccelerationMeasure",IFCABSORBEDDOSEMEASURE:"IfcAbsorbedDoseMeasure",IFCGEOSLICE:"IfcGeoSlice",IFCGEOMODEL:"IfcGeoModel",IFCELECTRICFLOWTREATMENTDEVICE:"IfcElectricFlowTreatmentDevice",IFCDISTRIBUTIONBOARD:"IfcDistributionBoard",IFCCONVEYORSEGMENT:"IfcConveyorSegment",IFCCAISSONFOUNDATION:"IfcCaissonFoundation",IFCBOREHOLE:"IfcBorehole",IFCBEARING:"IfcBearing",IFCALIGNMENT:"IfcAlignment",IFCTRACKELEMENT:"IfcTrackElement",IFCSIGNAL:"IfcSignal",IFCREINFORCEDSOIL:"IfcReinforcedSoil",IFCRAIL:"IfcRail",IFCPAVEMENT:"IfcPavement",IFCNAVIGATIONELEMENT:"IfcNavigationElement",IFCMOORINGDEVICE:"IfcMooringDevice",IFCMOBILETELECOMMUNICATIONSAPPLIANCE:"IfcMobileTelecommunicationsAppliance",IFCLIQUIDTERMINAL:"IfcLiquidTerminal",IFCLINEARPOSITIONINGELEMENT:"IfcLinearPositioningElement",IFCKERB:"IfcKerb",IFCGEOTECHNICALASSEMBLY:"IfcGeotechnicalAssembly",IFCELECTRICFLOWTREATMENTDEVICETYPE:"IfcElectricFlowTreatmentDeviceType",IFCEARTHWORKSFILL:"IfcEarthworksFill",IFCEARTHWORKSELEMENT:"IfcEarthworksElement",IFCEARTHWORKSCUT:"IfcEarthworksCut",IFCDISTRIBUTIONBOARDTYPE:"IfcDistributionBoardType",IFCDEEPFOUNDATION:"IfcDeepFoundation",IFCCOURSE:"IfcCourse",IFCCONVEYORSEGMENTTYPE:"IfcConveyorSegmentType",IFCCAISSONFOUNDATIONTYPE:"IfcCaissonFoundationType",IFCBUILTSYSTEM:"IfcBuiltSystem",IFCBUILTELEMENT:"IfcBuiltElement",IFCBRIDGEPART:"IfcBridgePart",IFCBRIDGE:"IfcBridge",IFCBEARINGTYPE:"IfcBearingType",IFCALIGNMENTVERTICAL:"IfcAlignmentVertical",IFCALIGNMENTSEGMENT:"IfcAlignmentSegment",IFCALIGNMENTHORIZONTAL:"IfcAlignmentHorizontal",IFCALIGNMENTCANT:"IfcAlignmentCant",IFCVIBRATIONDAMPERTYPE:"IfcVibrationDamperType",IFCVIBRATIONDAMPER:"IfcVibrationDamper",IFCVEHICLE:"IfcVehicle",IFCTRANSPORTATIONDEVICE:"IfcTransportationDevice",IFCTRACKELEMENTTYPE:"IfcTrackElementType",IFCTENDONCONDUITTYPE:"IfcTendonConduitType",IFCTENDONCONDUIT:"IfcTendonConduit",IFCSINESPIRAL:"IfcSineSpiral",IFCSIGNALTYPE:"IfcSignalType",IFCSIGNTYPE:"IfcSignType",IFCSIGN:"IfcSign",IFCSEVENTHORDERPOLYNOMIALSPIRAL:"IfcSeventhOrderPolynomialSpiral",IFCSEGMENTEDREFERENCECURVE:"IfcSegmentedReferenceCurve",IFCSECONDORDERPOLYNOMIALSPIRAL:"IfcSecondOrderPolynomialSpiral",IFCROADPART:"IfcRoadPart",IFCROAD:"IfcRoad",IFCRELADHERESTOELEMENT:"IfcRelAdheresToElement",IFCREFERENT:"IfcReferent",IFCRAILWAYPART:"IfcRailwayPart",IFCRAILWAY:"IfcRailway",IFCRAILTYPE:"IfcRailType",IFCPOSITIONINGELEMENT:"IfcPositioningElement",IFCPAVEMENTTYPE:"IfcPavementType",IFCNAVIGATIONELEMENTTYPE:"IfcNavigationElementType",IFCMOORINGDEVICETYPE:"IfcMooringDeviceType",IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE:"IfcMobileTelecommunicationsApplianceType",IFCMARINEPART:"IfcMarinePart",IFCMARINEFACILITY:"IfcMarineFacility",IFCLIQUIDTERMINALTYPE:"IfcLiquidTerminalType",IFCLINEARELEMENT:"IfcLinearElement",IFCKERBTYPE:"IfcKerbType",IFCIMPACTPROTECTIONDEVICETYPE:"IfcImpactProtectionDeviceType",IFCIMPACTPROTECTIONDEVICE:"IfcImpactProtectionDevice",IFCGRADIENTCURVE:"IfcGradientCurve",IFCGEOTECHNICALSTRATUM:"IfcGeotechnicalStratum",IFCGEOTECHNICALELEMENT:"IfcGeotechnicalElement",IFCFACILITYPARTCOMMON:"IfcFacilityPartCommon",IFCFACILITYPART:"IfcFacilityPart",IFCFACILITY:"IfcFacility",IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID:"IfcDirectrixDerivedReferenceSweptAreaSolid",IFCDEEPFOUNDATIONTYPE:"IfcDeepFoundationType",IFCCOURSETYPE:"IfcCourseType",IFCCOSINESPIRAL:"IfcCosineSpiral",IFCCLOTHOID:"IfcClothoid",IFCBUILTELEMENTTYPE:"IfcBuiltElementType",IFCVEHICLETYPE:"IfcVehicleType",IFCTRIANGULATEDIRREGULARNETWORK:"IfcTriangulatedIrregularNetwork",IFCTRANSPORTATIONDEVICETYPE:"IfcTransportationDeviceType",IFCTHIRDORDERPOLYNOMIALSPIRAL:"IfcThirdOrderPolynomialSpiral",IFCSPIRAL:"IfcSpiral",IFCSECTIONEDSURFACE:"IfcSectionedSurface",IFCSECTIONEDSOLIDHORIZONTAL:"IfcSectionedSolidHorizontal",IFCSECTIONEDSOLID:"IfcSectionedSolid",IFCRELPOSITIONS:"IfcRelPositions",IFCRELASSOCIATESPROFILEDEF:"IfcRelAssociatesProfileDef",IFCPOLYNOMIALCURVE:"IfcPolynomialCurve",IFCOFFSETCURVEBYDISTANCES:"IfcOffsetCurveByDistances",IFCOFFSETCURVE:"IfcOffsetCurve",IFCINDEXEDPOLYGONALTEXTUREMAP:"IfcIndexedPolygonalTextureMap",IFCDIRECTRIXCURVESWEPTAREASOLID:"IfcDirectrixCurveSweptAreaSolid",IFCCURVESEGMENT:"IfcCurveSegment",IFCAXIS2PLACEMENTLINEAR:"IfcAxis2PlacementLinear",IFCSEGMENT:"IfcSegment",IFCPOINTBYDISTANCEEXPRESSION:"IfcPointByDistanceExpression",IFCOPENCROSSPROFILEDEF:"IfcOpenCrossProfileDef",IFCLINEARPLACEMENT:"IfcLinearPlacement",IFCALIGNMENTHORIZONTALSEGMENT:"IfcAlignmentHorizontalSegment",IFCALIGNMENTCANTSEGMENT:"IfcAlignmentCantSegment",IFCTEXTURECOORDINATEINDICESWITHVOIDS:"IfcTextureCoordinateIndicesWithVoids",IFCTEXTURECOORDINATEINDICES:"IfcTextureCoordinateIndices",IFCQUANTITYNUMBER:"IfcQuantityNumber",IFCALIGNMENTVERTICALSEGMENT:"IfcAlignmentVerticalSegment",IFCALIGNMENTPARAMETERSEGMENT:"IfcAlignmentParameterSegment",IFCCONTROLLER:"IfcController",IFCALARM:"IfcAlarm",IFCACTUATOR:"IfcActuator",IFCUNITARYCONTROLELEMENT:"IfcUnitaryControlElement",IFCSENSOR:"IfcSensor",IFCPROTECTIVEDEVICETRIPPINGUNIT:"IfcProtectiveDeviceTrippingUnit",IFCFLOWINSTRUMENT:"IfcFlowInstrument",IFCFIRESUPPRESSIONTERMINAL:"IfcFireSuppressionTerminal",IFCFILTER:"IfcFilter",IFCFAN:"IfcFan",IFCELECTRICTIMECONTROL:"IfcElectricTimeControl",IFCELECTRICMOTOR:"IfcElectricMotor",IFCELECTRICGENERATOR:"IfcElectricGenerator",IFCELECTRICFLOWSTORAGEDEVICE:"IfcElectricFlowStorageDevice",IFCELECTRICDISTRIBUTIONBOARD:"IfcElectricDistributionBoard",IFCELECTRICAPPLIANCE:"IfcElectricAppliance",IFCDUCTSILENCER:"IfcDuctSilencer",IFCDUCTSEGMENT:"IfcDuctSegment",IFCDUCTFITTING:"IfcDuctFitting",IFCDISTRIBUTIONCIRCUIT:"IfcDistributionCircuit",IFCDAMPER:"IfcDamper",IFCCOOLINGTOWER:"IfcCoolingTower",IFCCOOLEDBEAM:"IfcCooledBeam",IFCCONDENSER:"IfcCondenser",IFCCOMPRESSOR:"IfcCompressor",IFCCOMMUNICATIONSAPPLIANCE:"IfcCommunicationsAppliance",IFCCOIL:"IfcCoil",IFCCHILLER:"IfcChiller",IFCCABLESEGMENT:"IfcCableSegment",IFCCABLEFITTING:"IfcCableFitting",IFCCABLECARRIERSEGMENT:"IfcCableCarrierSegment",IFCCABLECARRIERFITTING:"IfcCableCarrierFitting",IFCBURNER:"IfcBurner",IFCBOILER:"IfcBoiler",IFCBEAMSTANDARDCASE:"IfcBeamStandardCase",IFCAUDIOVISUALAPPLIANCE:"IfcAudioVisualAppliance",IFCAIRTOAIRHEATRECOVERY:"IfcAirToAirHeatRecovery",IFCAIRTERMINALBOX:"IfcAirTerminalBox",IFCAIRTERMINAL:"IfcAirTerminal",IFCWINDOWSTANDARDCASE:"IfcWindowStandardCase",IFCWASTETERMINAL:"IfcWasteTerminal",IFCWALLELEMENTEDCASE:"IfcWallElementedCase",IFCVALVE:"IfcValve",IFCUNITARYEQUIPMENT:"IfcUnitaryEquipment",IFCUNITARYCONTROLELEMENTTYPE:"IfcUnitaryControlElementType",IFCTUBEBUNDLE:"IfcTubeBundle",IFCTRANSFORMER:"IfcTransformer",IFCTANK:"IfcTank",IFCSWITCHINGDEVICE:"IfcSwitchingDevice",IFCSTRUCTURALLOADCASE:"IfcStructuralLoadCase",IFCSTACKTERMINAL:"IfcStackTerminal",IFCSPACEHEATER:"IfcSpaceHeater",IFCSOLARDEVICE:"IfcSolarDevice",IFCSLABSTANDARDCASE:"IfcSlabStandardCase",IFCSLABELEMENTEDCASE:"IfcSlabElementedCase",IFCSHADINGDEVICE:"IfcShadingDevice",IFCSANITARYTERMINAL:"IfcSanitaryTerminal",IFCREINFORCINGBARTYPE:"IfcReinforcingBarType",IFCRATIONALBSPLINECURVEWITHKNOTS:"IfcRationalBSplineCurveWithKnots",IFCPUMP:"IfcPump",IFCPROTECTIVEDEVICETRIPPINGUNITTYPE:"IfcProtectiveDeviceTrippingUnitType",IFCPROTECTIVEDEVICE:"IfcProtectiveDevice",IFCPLATESTANDARDCASE:"IfcPlateStandardCase",IFCPIPESEGMENT:"IfcPipeSegment",IFCPIPEFITTING:"IfcPipeFitting",IFCOUTLET:"IfcOutlet",IFCOUTERBOUNDARYCURVE:"IfcOuterBoundaryCurve",IFCMOTORCONNECTION:"IfcMotorConnection",IFCMEMBERSTANDARDCASE:"IfcMemberStandardCase",IFCMEDICALDEVICE:"IfcMedicalDevice",IFCLIGHTFIXTURE:"IfcLightFixture",IFCLAMP:"IfcLamp",IFCJUNCTIONBOX:"IfcJunctionBox",IFCINTERCEPTOR:"IfcInterceptor",IFCHUMIDIFIER:"IfcHumidifier",IFCHEATEXCHANGER:"IfcHeatExchanger",IFCFLOWMETER:"IfcFlowMeter",IFCEXTERNALSPATIALELEMENT:"IfcExternalSpatialElement",IFCEVAPORATOR:"IfcEvaporator",IFCEVAPORATIVECOOLER:"IfcEvaporativeCooler",IFCENGINE:"IfcEngine",IFCELECTRICDISTRIBUTIONBOARDTYPE:"IfcElectricDistributionBoardType",IFCDOORSTANDARDCASE:"IfcDoorStandardCase",IFCDISTRIBUTIONSYSTEM:"IfcDistributionSystem",IFCCOMMUNICATIONSAPPLIANCETYPE:"IfcCommunicationsApplianceType",IFCCOLUMNSTANDARDCASE:"IfcColumnStandardCase",IFCCIVILELEMENT:"IfcCivilElement",IFCCHIMNEY:"IfcChimney",IFCCABLEFITTINGTYPE:"IfcCableFittingType",IFCBURNERTYPE:"IfcBurnerType",IFCBUILDINGSYSTEM:"IfcBuildingSystem",IFCBUILDINGELEMENTPARTTYPE:"IfcBuildingElementPartType",IFCBOUNDARYCURVE:"IfcBoundaryCurve",IFCBSPLINECURVEWITHKNOTS:"IfcBSplineCurveWithKnots",IFCAUDIOVISUALAPPLIANCETYPE:"IfcAudioVisualApplianceType",IFCWORKCALENDAR:"IfcWorkCalendar",IFCWINDOWTYPE:"IfcWindowType",IFCVOIDINGFEATURE:"IfcVoidingFeature",IFCVIBRATIONISOLATOR:"IfcVibrationIsolator",IFCTENDONTYPE:"IfcTendonType",IFCTENDONANCHORTYPE:"IfcTendonAnchorType",IFCSYSTEMFURNITUREELEMENT:"IfcSystemFurnitureElement",IFCSURFACEFEATURE:"IfcSurfaceFeature",IFCSTRUCTURALSURFACEACTION:"IfcStructuralSurfaceAction",IFCSTRUCTURALCURVEREACTION:"IfcStructuralCurveReaction",IFCSTRUCTURALCURVEACTION:"IfcStructuralCurveAction",IFCSTAIRTYPE:"IfcStairType",IFCSOLARDEVICETYPE:"IfcSolarDeviceType",IFCSHADINGDEVICETYPE:"IfcShadingDeviceType",IFCSEAMCURVE:"IfcSeamCurve",IFCROOFTYPE:"IfcRoofType",IFCREINFORCINGMESHTYPE:"IfcReinforcingMeshType",IFCREINFORCINGELEMENTTYPE:"IfcReinforcingElementType",IFCRATIONALBSPLINESURFACEWITHKNOTS:"IfcRationalBSplineSurfaceWithKnots",IFCRAMPTYPE:"IfcRampType",IFCPOLYGONALFACESET:"IfcPolygonalFaceSet",IFCPILETYPE:"IfcPileType",IFCOPENINGSTANDARDCASE:"IfcOpeningStandardCase",IFCMEDICALDEVICETYPE:"IfcMedicalDeviceType",IFCINTERSECTIONCURVE:"IfcIntersectionCurve",IFCINTERCEPTORTYPE:"IfcInterceptorType",IFCINDEXEDPOLYCURVE:"IfcIndexedPolyCurve",IFCGEOGRAPHICELEMENT:"IfcGeographicElement",IFCFURNITURE:"IfcFurniture",IFCFOOTINGTYPE:"IfcFootingType",IFCEXTERNALSPATIALSTRUCTUREELEMENT:"IfcExternalSpatialStructureElement",IFCEVENT:"IfcEvent",IFCENGINETYPE:"IfcEngineType",IFCELEMENTASSEMBLYTYPE:"IfcElementAssemblyType",IFCDOORTYPE:"IfcDoorType",IFCCYLINDRICALSURFACE:"IfcCylindricalSurface",IFCCONSTRUCTIONPRODUCTRESOURCETYPE:"IfcConstructionProductResourceType",IFCCONSTRUCTIONMATERIALRESOURCETYPE:"IfcConstructionMaterialResourceType",IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE:"IfcConstructionEquipmentResourceType",IFCCOMPOSITECURVEONSURFACE:"IfcCompositeCurveOnSurface",IFCCOMPLEXPROPERTYTEMPLATE:"IfcComplexPropertyTemplate",IFCCIVILELEMENTTYPE:"IfcCivilElementType",IFCCHIMNEYTYPE:"IfcChimneyType",IFCBSPLINESURFACEWITHKNOTS:"IfcBSplineSurfaceWithKnots",IFCBSPLINESURFACE:"IfcBSplineSurface",IFCADVANCEDBREPWITHVOIDS:"IfcAdvancedBrepWithVoids",IFCADVANCEDBREP:"IfcAdvancedBrep",IFCTRIANGULATEDFACESET:"IfcTriangulatedFaceSet",IFCTOROIDALSURFACE:"IfcToroidalSurface",IFCTESSELLATEDFACESET:"IfcTessellatedFaceSet",IFCTASKTYPE:"IfcTaskType",IFCSURFACECURVE:"IfcSurfaceCurve",IFCSUBCONTRACTRESOURCETYPE:"IfcSubContractResourceType",IFCSTRUCTURALSURFACEREACTION:"IfcStructuralSurfaceReaction",IFCSPHERICALSURFACE:"IfcSphericalSurface",IFCSPATIALZONETYPE:"IfcSpatialZoneType",IFCSPATIALZONE:"IfcSpatialZone",IFCSPATIALELEMENTTYPE:"IfcSpatialElementType",IFCSPATIALELEMENT:"IfcSpatialElement",IFCSIMPLEPROPERTYTEMPLATE:"IfcSimplePropertyTemplate",IFCREVOLVEDAREASOLIDTAPERED:"IfcRevolvedAreaSolidTapered",IFCREPARAMETRISEDCOMPOSITECURVESEGMENT:"IfcReparametrisedCompositeCurveSegment",IFCRELSPACEBOUNDARY2NDLEVEL:"IfcRelSpaceBoundary2ndLevel",IFCRELSPACEBOUNDARY1STLEVEL:"IfcRelSpaceBoundary1stLevel",IFCRELINTERFERESELEMENTS:"IfcRelInterferesElements",IFCRELDEFINESBYTEMPLATE:"IfcRelDefinesByTemplate",IFCRELDEFINESBYOBJECT:"IfcRelDefinesByObject",IFCRELDECLARES:"IfcRelDeclares",IFCRELASSIGNSTOGROUPBYFACTOR:"IfcRelAssignsToGroupByFactor",IFCPROPERTYTEMPLATE:"IfcPropertyTemplate",IFCPROPERTYSETTEMPLATE:"IfcPropertySetTemplate",IFCPROJECTLIBRARY:"IfcProjectLibrary",IFCPROCEDURETYPE:"IfcProcedureType",IFCPREDEFINEDPROPERTYSET:"IfcPredefinedPropertySet",IFCPCURVE:"IfcPCurve",IFCLABORRESOURCETYPE:"IfcLaborResourceType",IFCINDEXEDPOLYGONALFACEWITHVOIDS:"IfcIndexedPolygonalFaceWithVoids",IFCINDEXEDPOLYGONALFACE:"IfcIndexedPolygonalFace",IFCGEOGRAPHICELEMENTTYPE:"IfcGeographicElementType",IFCFIXEDREFERENCESWEPTAREASOLID:"IfcFixedReferenceSweptAreaSolid",IFCEXTRUDEDAREASOLIDTAPERED:"IfcExtrudedAreaSolidTapered",IFCEVENTTYPE:"IfcEventType",IFCCURVEBOUNDEDSURFACE:"IfcCurveBoundedSurface",IFCCREWRESOURCETYPE:"IfcCrewResourceType",IFCCONTEXT:"IfcContext",IFCCONSTRUCTIONRESOURCETYPE:"IfcConstructionResourceType",IFCCARTESIANPOINTLIST3D:"IfcCartesianPointList3D",IFCCARTESIANPOINTLIST2D:"IfcCartesianPointList2D",IFCCARTESIANPOINTLIST:"IfcCartesianPointList",IFCADVANCEDFACE:"IfcAdvancedFace",IFCTYPERESOURCE:"IfcTypeResource",IFCTYPEPROCESS:"IfcTypeProcess",IFCTESSELLATEDITEM:"IfcTessellatedItem",IFCSWEPTDISKSOLIDPOLYGONAL:"IfcSweptDiskSolidPolygonal",IFCRESOURCETIME:"IfcResourceTime",IFCRESOURCECONSTRAINTRELATIONSHIP:"IfcResourceConstraintRelationship",IFCRESOURCEAPPROVALRELATIONSHIP:"IfcResourceApprovalRelationship",IFCQUANTITYSET:"IfcQuantitySet",IFCPROPERTYTEMPLATEDEFINITION:"IfcPropertyTemplateDefinition",IFCPREDEFINEDPROPERTIES:"IfcPredefinedProperties",IFCMIRROREDPROFILEDEF:"IfcMirroredProfileDef",IFCMATERIALRELATIONSHIP:"IfcMaterialRelationship",IFCMATERIALPROFILESETUSAGETAPERING:"IfcMaterialProfileSetUsageTapering",IFCMATERIALPROFILESETUSAGE:"IfcMaterialProfileSetUsage",IFCMATERIALCONSTITUENTSET:"IfcMaterialConstituentSet",IFCMATERIALCONSTITUENT:"IfcMaterialConstituent",IFCLAGTIME:"IfcLagTime",IFCINDEXEDTRIANGLETEXTUREMAP:"IfcIndexedTriangleTextureMap",IFCINDEXEDTEXTUREMAP:"IfcIndexedTextureMap",IFCINDEXEDCOLOURMAP:"IfcIndexedColourMap",IFCEXTERNALREFERENCERELATIONSHIP:"IfcExternalReferenceRelationship",IFCEXTENDEDPROPERTIES:"IfcExtendedProperties",IFCEVENTTIME:"IfcEventTime",IFCCONVERSIONBASEDUNITWITHOFFSET:"IfcConversionBasedUnitWithOffset",IFCCOLOURRGBLIST:"IfcColourRgbList",IFCWORKTIME:"IfcWorkTime",IFCTIMEPERIOD:"IfcTimePeriod",IFCTEXTUREVERTEXLIST:"IfcTextureVertexList",IFCTASKTIMERECURRING:"IfcTaskTimeRecurring",IFCTASKTIME:"IfcTaskTime",IFCTABLECOLUMN:"IfcTableColumn",IFCSURFACEREINFORCEMENTAREA:"IfcSurfaceReinforcementArea",IFCSTRUCTURALLOADORRESULT:"IfcStructuralLoadOrResult",IFCSTRUCTURALLOADCONFIGURATION:"IfcStructuralLoadConfiguration",IFCSCHEDULINGTIME:"IfcSchedulingTime",IFCRESOURCELEVELRELATIONSHIP:"IfcResourceLevelRelationship",IFCREFERENCE:"IfcReference",IFCRECURRENCEPATTERN:"IfcRecurrencePattern",IFCPROPERTYABSTRACTION:"IfcPropertyAbstraction",IFCPROJECTEDCRS:"IfcProjectedCrs",IFCPRESENTATIONITEM:"IfcPresentationItem",IFCMATERIALUSAGEDEFINITION:"IfcMaterialUsageDefinition",IFCMATERIALPROFILEWITHOFFSETS:"IfcMaterialProfileWithOffsets",IFCMATERIALPROFILESET:"IfcMaterialProfileSet",IFCMATERIALPROFILE:"IfcMaterialProfile",IFCMATERIALLAYERWITHOFFSETS:"IfcMaterialLayerWithOffsets",IFCMATERIALDEFINITION:"IfcMaterialDefinition",IFCMAPCONVERSION:"IfcMapConversion",IFCEXTERNALINFORMATION:"IfcExternalInformation",IFCCOORDINATEREFERENCESYSTEM:"IfcCoordinateReferenceSystem",IFCCOORDINATEOPERATION:"IfcCoordinateOperation",IFCCONNECTIONVOLUMEGEOMETRY:"IfcConnectionVolumeGeometry",IFCREINFORCINGBAR:"IfcReinforcingBar",IFCELECTRICDISTRIBUTIONPOINT:"IfcElectricDistributionPoint",IFCDISTRIBUTIONCONTROLELEMENT:"IfcDistributionControlElement",IFCDISTRIBUTIONCHAMBERELEMENT:"IfcDistributionChamberElement",IFCCONTROLLERTYPE:"IfcControllerType",IFCCHAMFEREDGEFEATURE:"IfcChamferEdgeFeature",IFCBEAM:"IfcBeam",IFCALARMTYPE:"IfcAlarmType",IFCACTUATORTYPE:"IfcActuatorType",IFCWINDOW:"IfcWindow",IFCWALLSTANDARDCASE:"IfcWallStandardCase",IFCWALL:"IfcWall",IFCVIBRATIONISOLATORTYPE:"IfcVibrationIsolatorType",IFCTENDONANCHOR:"IfcTendonAnchor",IFCTENDON:"IfcTendon",IFCSTRUCTURALANALYSISMODEL:"IfcStructuralAnalysisModel",IFCSTAIRFLIGHT:"IfcStairFlight",IFCSTAIR:"IfcStair",IFCSLAB:"IfcSlab",IFCSENSORTYPE:"IfcSensorType",IFCROUNDEDEDGEFEATURE:"IfcRoundedEdgeFeature",IFCROOF:"IfcRoof",IFCREINFORCINGMESH:"IfcReinforcingMesh",IFCREINFORCINGELEMENT:"IfcReinforcingElement",IFCRATIONALBEZIERCURVE:"IfcRationalBezierCurve",IFCRAMPFLIGHT:"IfcRampFlight",IFCRAMP:"IfcRamp",IFCRAILING:"IfcRailing",IFCPLATE:"IfcPlate",IFCPILE:"IfcPile",IFCMEMBER:"IfcMember",IFCFOOTING:"IfcFooting",IFCFLOWTREATMENTDEVICE:"IfcFlowTreatmentDevice",IFCFLOWTERMINAL:"IfcFlowTerminal",IFCFLOWSTORAGEDEVICE:"IfcFlowStorageDevice",IFCFLOWSEGMENT:"IfcFlowSegment",IFCFLOWMOVINGDEVICE:"IfcFlowMovingDevice",IFCFLOWINSTRUMENTTYPE:"IfcFlowInstrumentType",IFCFLOWFITTING:"IfcFlowFitting",IFCFLOWCONTROLLER:"IfcFlowController",IFCFIRESUPPRESSIONTERMINALTYPE:"IfcFireSuppressionTerminalType",IFCFILTERTYPE:"IfcFilterType",IFCFANTYPE:"IfcFanType",IFCENERGYCONVERSIONDEVICE:"IfcEnergyConversionDevice",IFCELECTRICALELEMENT:"IfcElectricalElement",IFCELECTRICALCIRCUIT:"IfcElectricalCircuit",IFCELECTRICTIMECONTROLTYPE:"IfcElectricTimeControlType",IFCELECTRICMOTORTYPE:"IfcElectricMotorType",IFCELECTRICHEATERTYPE:"IfcElectricHeaterType",IFCELECTRICGENERATORTYPE:"IfcElectricGeneratorType",IFCELECTRICFLOWSTORAGEDEVICETYPE:"IfcElectricFlowStorageDeviceType",IFCELECTRICAPPLIANCETYPE:"IfcElectricApplianceType",IFCEDGEFEATURE:"IfcEdgeFeature",IFCDUCTSILENCERTYPE:"IfcDuctSilencerType",IFCDUCTSEGMENTTYPE:"IfcDuctSegmentType",IFCDUCTFITTINGTYPE:"IfcDuctFittingType",IFCDOOR:"IfcDoor",IFCDISTRIBUTIONPORT:"IfcDistributionPort",IFCDISTRIBUTIONFLOWELEMENT:"IfcDistributionFlowElement",IFCDISTRIBUTIONELEMENT:"IfcDistributionElement",IFCDISTRIBUTIONCONTROLELEMENTTYPE:"IfcDistributionControlElementType",IFCDISTRIBUTIONCHAMBERELEMENTTYPE:"IfcDistributionChamberElementType",IFCDISCRETEACCESSORYTYPE:"IfcDiscreteAccessoryType",IFCDISCRETEACCESSORY:"IfcDiscreteAccessory",IFCDIAMETERDIMENSION:"IfcDiameterDimension",IFCDAMPERTYPE:"IfcDamperType",IFCCURTAINWALL:"IfcCurtainWall",IFCCOVERING:"IfcCovering",IFCCOOLINGTOWERTYPE:"IfcCoolingTowerType",IFCCOOLEDBEAMTYPE:"IfcCooledBeamType",IFCCONSTRUCTIONPRODUCTRESOURCE:"IfcConstructionProductResource",IFCCONSTRUCTIONMATERIALRESOURCE:"IfcConstructionMaterialResource",IFCCONSTRUCTIONEQUIPMENTRESOURCE:"IfcConstructionEquipmentResource",IFCCONDITIONCRITERION:"IfcConditionCriterion",IFCCONDITION:"IfcCondition",IFCCONDENSERTYPE:"IfcCondenserType",IFCCOMPRESSORTYPE:"IfcCompressorType",IFCCOLUMN:"IfcColumn",IFCCOILTYPE:"IfcCoilType",IFCCIRCLE:"IfcCircle",IFCCHILLERTYPE:"IfcChillerType",IFCCABLESEGMENTTYPE:"IfcCableSegmentType",IFCCABLECARRIERSEGMENTTYPE:"IfcCableCarrierSegmentType",IFCCABLECARRIERFITTINGTYPE:"IfcCableCarrierFittingType",IFCBUILDINGELEMENTPROXYTYPE:"IfcBuildingElementProxyType",IFCBUILDINGELEMENTPROXY:"IfcBuildingElementProxy",IFCBUILDINGELEMENTPART:"IfcBuildingElementPart",IFCBUILDINGELEMENTCOMPONENT:"IfcBuildingElementComponent",IFCBUILDINGELEMENT:"IfcBuildingElement",IFCBOILERTYPE:"IfcBoilerType",IFCBEZIERCURVE:"IfcBezierCurve",IFCBEAMTYPE:"IfcBeamType",IFCBSPLINECURVE:"IfcBSplineCurve",IFCASSET:"IfcAsset",IFCANGULARDIMENSION:"IfcAngularDimension",IFCAIRTOAIRHEATRECOVERYTYPE:"IfcAirToAirHeatRecoveryType",IFCAIRTERMINALTYPE:"IfcAirTerminalType",IFCAIRTERMINALBOXTYPE:"IfcAirTerminalBoxType",IFCACTIONREQUEST:"IfcActionRequest",IFC2DCOMPOSITECURVE:"Ifc2DCompositeCurve",IFCZONE:"IfcZone",IFCWORKSCHEDULE:"IfcWorkSchedule",IFCWORKPLAN:"IfcWorkPlan",IFCWORKCONTROL:"IfcWorkControl",IFCWASTETERMINALTYPE:"IfcWasteTerminalType",IFCWALLTYPE:"IfcWallType",IFCVIRTUALELEMENT:"IfcVirtualElement",IFCVALVETYPE:"IfcValveType",IFCUNITARYEQUIPMENTTYPE:"IfcUnitaryEquipmentType",IFCTUBEBUNDLETYPE:"IfcTubeBundleType",IFCTRIMMEDCURVE:"IfcTrimmedCurve",IFCTRANSPORTELEMENT:"IfcTransportElement",IFCTRANSFORMERTYPE:"IfcTransformerType",IFCTIMESERIESSCHEDULE:"IfcTimeSeriesSchedule",IFCTANKTYPE:"IfcTankType",IFCSYSTEM:"IfcSystem",IFCSWITCHINGDEVICETYPE:"IfcSwitchingDeviceType",IFCSUBCONTRACTRESOURCE:"IfcSubContractResource",IFCSTRUCTURALSURFACECONNECTION:"IfcStructuralSurfaceConnection",IFCSTRUCTURALRESULTGROUP:"IfcStructuralResultGroup",IFCSTRUCTURALPOINTREACTION:"IfcStructuralPointReaction",IFCSTRUCTURALPOINTCONNECTION:"IfcStructuralPointConnection",IFCSTRUCTURALPOINTACTION:"IfcStructuralPointAction",IFCSTRUCTURALPLANARACTIONVARYING:"IfcStructuralPlanarActionVarying",IFCSTRUCTURALPLANARACTION:"IfcStructuralPlanarAction",IFCSTRUCTURALLOADGROUP:"IfcStructuralLoadGroup",IFCSTRUCTURALLINEARACTIONVARYING:"IfcStructuralLinearActionVarying",IFCSTRUCTURALLINEARACTION:"IfcStructuralLinearAction",IFCSTRUCTURALCURVEMEMBERVARYING:"IfcStructuralCurveMemberVarying",IFCSTRUCTURALCURVEMEMBER:"IfcStructuralCurveMember",IFCSTRUCTURALCURVECONNECTION:"IfcStructuralCurveConnection",IFCSTRUCTURALCONNECTION:"IfcStructuralConnection",IFCSTRUCTURALACTION:"IfcStructuralAction",IFCSTAIRFLIGHTTYPE:"IfcStairFlightType",IFCSTACKTERMINALTYPE:"IfcStackTerminalType",IFCSPACETYPE:"IfcSpaceType",IFCSPACEPROGRAM:"IfcSpaceProgram",IFCSPACEHEATERTYPE:"IfcSpaceHeaterType",IFCSPACE:"IfcSpace",IFCSLABTYPE:"IfcSlabType",IFCSITE:"IfcSite",IFCSERVICELIFE:"IfcServiceLife",IFCSCHEDULETIMECONTROL:"IfcScheduleTimeControl",IFCSANITARYTERMINALTYPE:"IfcSanitaryTerminalType",IFCRELASSIGNSTASKS:"IfcRelAssignsTasks",IFCRELAGGREGATES:"IfcRelAggregates",IFCRAMPFLIGHTTYPE:"IfcRampFlightType",IFCRAILINGTYPE:"IfcRailingType",IFCRADIUSDIMENSION:"IfcRadiusDimension",IFCPUMPTYPE:"IfcPumpType",IFCPROTECTIVEDEVICETYPE:"IfcProtectiveDeviceType",IFCPROJECTIONELEMENT:"IfcProjectionElement",IFCPROJECTORDERRECORD:"IfcProjectOrderRecord",IFCPROJECTORDER:"IfcProjectOrder",IFCPROCEDURE:"IfcProcedure",IFCPORT:"IfcPort",IFCPOLYLINE:"IfcPolyline",IFCPLATETYPE:"IfcPlateType",IFCPIPESEGMENTTYPE:"IfcPipeSegmentType",IFCPIPEFITTINGTYPE:"IfcPipeFittingType",IFCPERMIT:"IfcPermit",IFCPERFORMANCEHISTORY:"IfcPerformanceHistory",IFCOUTLETTYPE:"IfcOutletType",IFCORDERACTION:"IfcOrderAction",IFCOPENINGELEMENT:"IfcOpeningElement",IFCOCCUPANT:"IfcOccupant",IFCMOVE:"IfcMove",IFCMOTORCONNECTIONTYPE:"IfcMotorConnectionType",IFCMEMBERTYPE:"IfcMemberType",IFCMECHANICALFASTENERTYPE:"IfcMechanicalFastenerType",IFCMECHANICALFASTENER:"IfcMechanicalFastener",IFCLINEARDIMENSION:"IfcLinearDimension",IFCLIGHTFIXTURETYPE:"IfcLightFixtureType",IFCLAMPTYPE:"IfcLampType",IFCLABORRESOURCE:"IfcLaborResource",IFCJUNCTIONBOXTYPE:"IfcJunctionBoxType",IFCINVENTORY:"IfcInventory",IFCHUMIDIFIERTYPE:"IfcHumidifierType",IFCHEATEXCHANGERTYPE:"IfcHeatExchangerType",IFCGROUP:"IfcGroup",IFCGRID:"IfcGrid",IFCGASTERMINALTYPE:"IfcGasTerminalType",IFCFURNITURESTANDARD:"IfcFurnitureStandard",IFCFURNISHINGELEMENT:"IfcFurnishingElement",IFCFLOWTREATMENTDEVICETYPE:"IfcFlowTreatmentDeviceType",IFCFLOWTERMINALTYPE:"IfcFlowTerminalType",IFCFLOWSTORAGEDEVICETYPE:"IfcFlowStorageDeviceType",IFCFLOWSEGMENTTYPE:"IfcFlowSegmentType",IFCFLOWMOVINGDEVICETYPE:"IfcFlowMovingDeviceType",IFCFLOWMETERTYPE:"IfcFlowMeterType",IFCFLOWFITTINGTYPE:"IfcFlowFittingType",IFCFLOWCONTROLLERTYPE:"IfcFlowControllerType",IFCFEATUREELEMENTSUBTRACTION:"IfcFeatureElementSubtraction",IFCFEATUREELEMENTADDITION:"IfcFeatureElementAddition",IFCFEATUREELEMENT:"IfcFeatureElement",IFCFASTENERTYPE:"IfcFastenerType",IFCFASTENER:"IfcFastener",IFCFACETEDBREPWITHVOIDS:"IfcFacetedBrepWithVoids",IFCFACETEDBREP:"IfcFacetedBrep",IFCEVAPORATORTYPE:"IfcEvaporatorType",IFCEVAPORATIVECOOLERTYPE:"IfcEvaporativeCoolerType",IFCEQUIPMENTSTANDARD:"IfcEquipmentStandard",IFCEQUIPMENTELEMENT:"IfcEquipmentElement",IFCENERGYCONVERSIONDEVICETYPE:"IfcEnergyConversionDeviceType",IFCELLIPSE:"IfcEllipse",IFCELEMENTCOMPONENTTYPE:"IfcElementComponentType",IFCELEMENTCOMPONENT:"IfcElementComponent",IFCELEMENTASSEMBLY:"IfcElementAssembly",IFCELEMENT:"IfcElement",IFCELECTRICALBASEPROPERTIES:"IfcElectricalBaseProperties",IFCDISTRIBUTIONFLOWELEMENTTYPE:"IfcDistributionFlowElementType",IFCDISTRIBUTIONELEMENTTYPE:"IfcDistributionElementType",IFCDIMENSIONCURVEDIRECTEDCALLOUT:"IfcDimensionCurveDirectedCallout",IFCCURTAINWALLTYPE:"IfcCurtainWallType",IFCCREWRESOURCE:"IfcCrewResource",IFCCOVERINGTYPE:"IfcCoveringType",IFCCOSTSCHEDULE:"IfcCostSchedule",IFCCOSTITEM:"IfcCostItem",IFCCONTROL:"IfcControl",IFCCONSTRUCTIONRESOURCE:"IfcConstructionResource",IFCCONIC:"IfcConic",IFCCOMPOSITECURVE:"IfcCompositeCurve",IFCCOLUMNTYPE:"IfcColumnType",IFCCIRCLEHOLLOWPROFILEDEF:"IfcCircleHollowProfileDef",IFCBUILDINGSTOREY:"IfcBuildingStorey",IFCBUILDINGELEMENTTYPE:"IfcBuildingElementType",IFCBUILDING:"IfcBuilding",IFCBOUNDEDCURVE:"IfcBoundedCurve",IFCBOOLEANCLIPPINGRESULT:"IfcBooleanClippingResult",IFCBLOCK:"IfcBlock",IFCASYMMETRICISHAPEPROFILEDEF:"IfcAsymmetricIShapeProfileDef",IFCANNOTATION:"IfcAnnotation",IFCACTOR:"IfcActor",IFCTRANSPORTELEMENTTYPE:"IfcTransportElementType",IFCTASK:"IfcTask",IFCSYSTEMFURNITUREELEMENTTYPE:"IfcSystemFurnitureElementType",IFCSURFACEOFREVOLUTION:"IfcSurfaceOfRevolution",IFCSURFACEOFLINEAREXTRUSION:"IfcSurfaceOfLinearExtrusion",IFCSURFACECURVESWEPTAREASOLID:"IfcSurfaceCurveSweptAreaSolid",IFCSTRUCTUREDDIMENSIONCALLOUT:"IfcStructuredDimensionCallout",IFCSTRUCTURALSURFACEMEMBERVARYING:"IfcStructuralSurfaceMemberVarying",IFCSTRUCTURALSURFACEMEMBER:"IfcStructuralSurfaceMember",IFCSTRUCTURALREACTION:"IfcStructuralReaction",IFCSTRUCTURALMEMBER:"IfcStructuralMember",IFCSTRUCTURALITEM:"IfcStructuralItem",IFCSTRUCTURALACTIVITY:"IfcStructuralActivity",IFCSPHERE:"IfcSphere",IFCSPATIALSTRUCTUREELEMENTTYPE:"IfcSpatialStructureElementType",IFCSPATIALSTRUCTUREELEMENT:"IfcSpatialStructureElement",IFCRIGHTCIRCULARCYLINDER:"IfcRightCircularCylinder",IFCRIGHTCIRCULARCONE:"IfcRightCircularCone",IFCREVOLVEDAREASOLID:"IfcRevolvedAreaSolid",IFCRESOURCE:"IfcResource",IFCRELVOIDSELEMENT:"IfcRelVoidsElement",IFCRELSPACEBOUNDARY:"IfcRelSpaceBoundary",IFCRELSERVICESBUILDINGS:"IfcRelServicesBuildings",IFCRELSEQUENCE:"IfcRelSequence",IFCRELSCHEDULESCOSTITEMS:"IfcRelSchedulesCostItems",IFCRELREFERENCEDINSPATIALSTRUCTURE:"IfcRelReferencedInSpatialStructure",IFCRELPROJECTSELEMENT:"IfcRelProjectsElement",IFCRELOVERRIDESPROPERTIES:"IfcRelOverridesProperties",IFCRELOCCUPIESSPACES:"IfcRelOccupiesSpaces",IFCRELNESTS:"IfcRelNests",IFCRELINTERACTIONREQUIREMENTS:"IfcRelInteractionRequirements",IFCRELFLOWCONTROLELEMENTS:"IfcRelFlowControlElements",IFCRELFILLSELEMENT:"IfcRelFillsElement",IFCRELDEFINESBYTYPE:"IfcRelDefinesByType",IFCRELDEFINESBYPROPERTIES:"IfcRelDefinesByProperties",IFCRELDEFINES:"IfcRelDefines",IFCRELDECOMPOSES:"IfcRelDecomposes",IFCRELCOVERSSPACES:"IfcRelCoversSpaces",IFCRELCOVERSBLDGELEMENTS:"IfcRelCoversBldgElements",IFCRELCONTAINEDINSPATIALSTRUCTURE:"IfcRelContainedInSpatialStructure",IFCRELCONNECTSWITHREALIZINGELEMENTS:"IfcRelConnectsWithRealizingElements",IFCRELCONNECTSWITHECCENTRICITY:"IfcRelConnectsWithEccentricity",IFCRELCONNECTSSTRUCTURALMEMBER:"IfcRelConnectsStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT:"IfcRelConnectsStructuralElement",IFCRELCONNECTSSTRUCTURALACTIVITY:"IfcRelConnectsStructuralActivity",IFCRELCONNECTSPORTS:"IfcRelConnectsPorts",IFCRELCONNECTSPORTTOELEMENT:"IfcRelConnectsPortToElement",IFCRELCONNECTSPATHELEMENTS:"IfcRelConnectsPathElements",IFCRELCONNECTSELEMENTS:"IfcRelConnectsElements",IFCRELCONNECTS:"IfcRelConnects",IFCRELASSOCIATESPROFILEPROPERTIES:"IfcRelAssociatesProfileProperties",IFCRELASSOCIATESMATERIAL:"IfcRelAssociatesMaterial",IFCRELASSOCIATESLIBRARY:"IfcRelAssociatesLibrary",IFCRELASSOCIATESDOCUMENT:"IfcRelAssociatesDocument",IFCRELASSOCIATESCONSTRAINT:"IfcRelAssociatesConstraint",IFCRELASSOCIATESCLASSIFICATION:"IfcRelAssociatesClassification",IFCRELASSOCIATESAPPROVAL:"IfcRelAssociatesApproval",IFCRELASSOCIATESAPPLIEDVALUE:"IfcRelAssociatesAppliedValue",IFCRELASSOCIATES:"IfcRelAssociates",IFCRELASSIGNSTORESOURCE:"IfcRelAssignsToResource",IFCRELASSIGNSTOPROJECTORDER:"IfcRelAssignsToProjectOrder",IFCRELASSIGNSTOPRODUCT:"IfcRelAssignsToProduct",IFCRELASSIGNSTOPROCESS:"IfcRelAssignsToProcess",IFCRELASSIGNSTOGROUP:"IfcRelAssignsToGroup",IFCRELASSIGNSTOCONTROL:"IfcRelAssignsToControl",IFCRELASSIGNSTOACTOR:"IfcRelAssignsToActor",IFCRELASSIGNS:"IfcRelAssigns",IFCRECTANGULARTRIMMEDSURFACE:"IfcRectangularTrimmedSurface",IFCRECTANGULARPYRAMID:"IfcRectangularPyramid",IFCRECTANGLEHOLLOWPROFILEDEF:"IfcRectangleHollowProfileDef",IFCPROXY:"IfcProxy",IFCPROPERTYSET:"IfcPropertySet",IFCPROJECTIONCURVE:"IfcProjectionCurve",IFCPROJECT:"IfcProject",IFCPRODUCT:"IfcProduct",IFCPROCESS:"IfcProcess",IFCPLANE:"IfcPlane",IFCPLANARBOX:"IfcPlanarBox",IFCPERMEABLECOVERINGPROPERTIES:"IfcPermeableCoveringProperties",IFCOFFSETCURVE3D:"IfcOffsetCurve3D",IFCOFFSETCURVE2D:"IfcOffsetCurve2D",IFCOBJECT:"IfcObject",IFCMANIFOLDSOLIDBREP:"IfcManifoldSolidBrep",IFCLINE:"IfcLine",IFCLSHAPEPROFILEDEF:"IfcLShapeProfileDef",IFCISHAPEPROFILEDEF:"IfcIShapeProfileDef",IFCGEOMETRICCURVESET:"IfcGeometricCurveSet",IFCFURNITURETYPE:"IfcFurnitureType",IFCFURNISHINGELEMENTTYPE:"IfcFurnishingElementType",IFCFLUIDFLOWPROPERTIES:"IfcFluidFlowProperties",IFCFILLAREASTYLETILES:"IfcFillAreaStyleTiles",IFCFILLAREASTYLETILESYMBOLWITHSTYLE:"IfcFillAreaStyleTileSymbolWithStyle",IFCFILLAREASTYLEHATCHING:"IfcFillAreaStyleHatching",IFCFACEBASEDSURFACEMODEL:"IfcFaceBasedSurfaceModel",IFCEXTRUDEDAREASOLID:"IfcExtrudedAreaSolid",IFCENERGYPROPERTIES:"IfcEnergyProperties",IFCELLIPSEPROFILEDEF:"IfcEllipseProfileDef",IFCELEMENTARYSURFACE:"IfcElementarySurface",IFCELEMENTTYPE:"IfcElementType",IFCELEMENTQUANTITY:"IfcElementQuantity",IFCEDGELOOP:"IfcEdgeLoop",IFCDRAUGHTINGPREDEFINEDCURVEFONT:"IfcDraughtingPredefinedCurveFont",IFCDRAUGHTINGPREDEFINEDCOLOUR:"IfcDraughtingPredefinedColour",IFCDRAUGHTINGCALLOUT:"IfcDraughtingCallout",IFCDOORSTYLE:"IfcDoorStyle",IFCDOORPANELPROPERTIES:"IfcDoorPanelProperties",IFCDOORLININGPROPERTIES:"IfcDoorLiningProperties",IFCDIRECTION:"IfcDirection",IFCDIMENSIONCURVETERMINATOR:"IfcDimensionCurveTerminator",IFCDIMENSIONCURVE:"IfcDimensionCurve",IFCDEFINEDSYMBOL:"IfcDefinedSymbol",IFCCURVEBOUNDEDPLANE:"IfcCurveBoundedPlane",IFCCURVE:"IfcCurve",IFCCSGSOLID:"IfcCsgSolid",IFCCSGPRIMITIVE3D:"IfcCsgPrimitive3D",IFCCRANERAILFSHAPEPROFILEDEF:"IfcCraneRailFShapeProfileDef",IFCCRANERAILASHAPEPROFILEDEF:"IfcCraneRailAShapeProfileDef",IFCCOMPOSITECURVESEGMENT:"IfcCompositeCurveSegment",IFCCLOSEDSHELL:"IfcClosedShell",IFCCIRCLEPROFILEDEF:"IfcCircleProfileDef",IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM:"IfcCartesianTransformationOperator3DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR3D:"IfcCartesianTransformationOperator3D",IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM:"IfcCartesianTransformationOperator2DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR2D:"IfcCartesianTransformationOperator2D",IFCCARTESIANTRANSFORMATIONOPERATOR:"IfcCartesianTransformationOperator",IFCCARTESIANPOINT:"IfcCartesianPoint",IFCCSHAPEPROFILEDEF:"IfcCShapeProfileDef",IFCBOXEDHALFSPACE:"IfcBoxedHalfSpace",IFCBOUNDINGBOX:"IfcBoundingBox",IFCBOUNDEDSURFACE:"IfcBoundedSurface",IFCBOOLEANRESULT:"IfcBooleanResult",IFCAXIS2PLACEMENT3D:"IfcAxis2Placement3D",IFCAXIS2PLACEMENT2D:"IfcAxis2Placement2D",IFCAXIS1PLACEMENT:"IfcAxis1Placement",IFCANNOTATIONSURFACE:"IfcAnnotationSurface",IFCANNOTATIONFILLAREAOCCURRENCE:"IfcAnnotationFillAreaOccurrence",IFCANNOTATIONFILLAREA:"IfcAnnotationFillArea",IFCANNOTATIONCURVEOCCURRENCE:"IfcAnnotationCurveOccurrence",IFCZSHAPEPROFILEDEF:"IfcZShapeProfileDef",IFCWINDOWSTYLE:"IfcWindowStyle",IFCWINDOWPANELPROPERTIES:"IfcWindowPanelProperties",IFCWINDOWLININGPROPERTIES:"IfcWindowLiningProperties",IFCVERTEXLOOP:"IfcVertexLoop",IFCVECTOR:"IfcVector",IFCUSHAPEPROFILEDEF:"IfcUShapeProfileDef",IFCTYPEPRODUCT:"IfcTypeProduct",IFCTYPEOBJECT:"IfcTypeObject",IFCTWODIRECTIONREPEATFACTOR:"IfcTwoDirectionRepeatFactor",IFCTRAPEZIUMPROFILEDEF:"IfcTrapeziumProfileDef",IFCTEXTLITERALWITHEXTENT:"IfcTextLiteralWithExtent",IFCTEXTLITERAL:"IfcTextLiteral",IFCTERMINATORSYMBOL:"IfcTerminatorSymbol",IFCTSHAPEPROFILEDEF:"IfcTShapeProfileDef",IFCSWEPTSURFACE:"IfcSweptSurface",IFCSWEPTDISKSOLID:"IfcSweptDiskSolid",IFCSWEPTAREASOLID:"IfcSweptAreaSolid",IFCSURFACESTYLERENDERING:"IfcSurfaceStyleRendering",IFCSURFACE:"IfcSurface",IFCSUBEDGE:"IfcSubedge",IFCSTRUCTURALSTEELPROFILEPROPERTIES:"IfcStructuralSteelProfileProperties",IFCSTRUCTURALPROFILEPROPERTIES:"IfcStructuralProfileProperties",IFCSTRUCTURALLOADSINGLEFORCEWARPING:"IfcStructuralLoadSingleForceWarping",IFCSTRUCTURALLOADSINGLEFORCE:"IfcStructuralLoadSingleForce",IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION:"IfcStructuralLoadSingleDisplacementDistortion",IFCSTRUCTURALLOADSINGLEDISPLACEMENT:"IfcStructuralLoadSingleDisplacement",IFCSTRUCTURALLOADPLANARFORCE:"IfcStructuralLoadPlanarForce",IFCSTRUCTURALLOADLINEARFORCE:"IfcStructuralLoadLinearForce",IFCSPACETHERMALLOADPROPERTIES:"IfcSpaceThermalLoadProperties",IFCSOUNDVALUE:"IfcSoundValue",IFCSOUNDPROPERTIES:"IfcSoundProperties",IFCSOLIDMODEL:"IfcSolidModel",IFCSLIPPAGECONNECTIONCONDITION:"IfcSlippageConnectionCondition",IFCSHELLBASEDSURFACEMODEL:"IfcShellBasedSurfaceModel",IFCSERVICELIFEFACTOR:"IfcServiceLifeFactor",IFCSECTIONEDSPINE:"IfcSectionedSpine",IFCROUNDEDRECTANGLEPROFILEDEF:"IfcRoundedRectangleProfileDef",IFCRELATIONSHIP:"IfcRelationship",IFCREINFORCEMENTDEFINITIONPROPERTIES:"IfcReinforcementDefinitionProperties",IFCREGULARTIMESERIES:"IfcRegularTimeSeries",IFCRECTANGLEPROFILEDEF:"IfcRectangleProfileDef",IFCPROPERTYTABLEVALUE:"IfcPropertyTableValue",IFCPROPERTYSINGLEVALUE:"IfcPropertySingleValue",IFCPROPERTYSETDEFINITION:"IfcPropertySetDefinition",IFCPROPERTYREFERENCEVALUE:"IfcPropertyReferenceValue",IFCPROPERTYLISTVALUE:"IfcPropertyListValue",IFCPROPERTYENUMERATEDVALUE:"IfcPropertyEnumeratedValue",IFCPROPERTYDEFINITION:"IfcPropertyDefinition",IFCPROPERTYBOUNDEDVALUE:"IfcPropertyBoundedValue",IFCPRODUCTDEFINITIONSHAPE:"IfcProductDefinitionShape",IFCPREDEFINEDPOINTMARKERSYMBOL:"IfcPredefinedPointMarkerSymbol",IFCPREDEFINEDDIMENSIONSYMBOL:"IfcPredefinedDimensionSymbol",IFCPREDEFINEDCURVEFONT:"IfcPredefinedCurveFont",IFCPREDEFINEDCOLOUR:"IfcPredefinedColour",IFCPOLYGONALBOUNDEDHALFSPACE:"IfcPolygonalBoundedHalfSpace",IFCPOLYLOOP:"IfcPolyLoop",IFCPOINTONSURFACE:"IfcPointOnSurface",IFCPOINTONCURVE:"IfcPointOnCurve",IFCPOINT:"IfcPoint",IFCPLANAREXTENT:"IfcPlanarExtent",IFCPLACEMENT:"IfcPlacement",IFCPIXELTEXTURE:"IfcPixelTexture",IFCPHYSICALCOMPLEXQUANTITY:"IfcPhysicalComplexQuantity",IFCPATH:"IfcPath",IFCPARAMETERIZEDPROFILEDEF:"IfcParameterizedProfileDef",IFCORIENTEDEDGE:"IfcOrientedEdge",IFCOPENSHELL:"IfcOpenShell",IFCONEDIRECTIONREPEATFACTOR:"IfcOneDirectionRepeatFactor",IFCOBJECTDEFINITION:"IfcObjectDefinition",IFCMECHANICALCONCRETEMATERIALPROPERTIES:"IfcMechanicalConcreteMaterialProperties",IFCMATERIALDEFINITIONREPRESENTATION:"IfcMaterialDefinitionRepresentation",IFCMAPPEDITEM:"IfcMappedItem",IFCLOOP:"IfcLoop",IFCLOCALPLACEMENT:"IfcLocalPlacement",IFCLIGHTSOURCESPOT:"IfcLightSourceSpot",IFCLIGHTSOURCEPOSITIONAL:"IfcLightSourcePositional",IFCLIGHTSOURCEGONIOMETRIC:"IfcLightSourceGoniometric",IFCLIGHTSOURCEDIRECTIONAL:"IfcLightSourceDirectional",IFCLIGHTSOURCEAMBIENT:"IfcLightSourceAmbient",IFCLIGHTSOURCE:"IfcLightSource",IFCIRREGULARTIMESERIES:"IfcIrregularTimeSeries",IFCIMAGETEXTURE:"IfcImageTexture",IFCHYGROSCOPICMATERIALPROPERTIES:"IfcHygroscopicMaterialProperties",IFCHALFSPACESOLID:"IfcHalfSpaceSolid",IFCGRIDPLACEMENT:"IfcGridPlacement",IFCGEOMETRICSET:"IfcGeometricSet",IFCGEOMETRICREPRESENTATIONSUBCONTEXT:"IfcGeometricRepresentationSubContext",IFCGEOMETRICREPRESENTATIONITEM:"IfcGeometricRepresentationItem",IFCGEOMETRICREPRESENTATIONCONTEXT:"IfcGeometricRepresentationContext",IFCGENERALPROFILEPROPERTIES:"IfcGeneralProfileProperties",IFCGENERALMATERIALPROPERTIES:"IfcGeneralMaterialProperties",IFCFUELPROPERTIES:"IfcFuelProperties",IFCFILLAREASTYLE:"IfcFillAreaStyle",IFCFAILURECONNECTIONCONDITION:"IfcFailureConnectionCondition",IFCFACESURFACE:"IfcFaceSurface",IFCFACEOUTERBOUND:"IfcFaceOuterBound",IFCFACEBOUND:"IfcFaceBound",IFCFACE:"IfcFace",IFCEXTENDEDMATERIALPROPERTIES:"IfcExtendedMaterialProperties",IFCEDGECURVE:"IfcEdgeCurve",IFCEDGE:"IfcEdge",IFCDRAUGHTINGPREDEFINEDTEXTFONT:"IfcDraughtingPredefinedTextFont",IFCDOCUMENTREFERENCE:"IfcDocumentReference",IFCDIMENSIONPAIR:"IfcDimensionPair",IFCDIMENSIONCALLOUTRELATIONSHIP:"IfcDimensionCalloutRelationship",IFCDERIVEDPROFILEDEF:"IfcDerivedProfileDef",IFCCURVESTYLE:"IfcCurveStyle",IFCCONVERSIONBASEDUNIT:"IfcConversionBasedUnit",IFCCONTEXTDEPENDENTUNIT:"IfcContextDependentUnit",IFCCONNECTIONPOINTECCENTRICITY:"IfcConnectionPointEccentricity",IFCCONNECTIONCURVEGEOMETRY:"IfcConnectionCurveGeometry",IFCCONNECTEDFACESET:"IfcConnectedFaceSet",IFCCOMPOSITEPROFILEDEF:"IfcCompositeProfileDef",IFCCOMPLEXPROPERTY:"IfcComplexProperty",IFCCOLOURRGB:"IfcColourRgb",IFCCLASSIFICATIONREFERENCE:"IfcClassificationReference",IFCCENTERLINEPROFILEDEF:"IfcCenterLineProfileDef",IFCBLOBTEXTURE:"IfcBlobTexture",IFCARBITRARYPROFILEDEFWITHVOIDS:"IfcArbitraryProfileDefWithVoids",IFCARBITRARYOPENPROFILEDEF:"IfcArbitraryOpenProfileDef",IFCARBITRARYCLOSEDPROFILEDEF:"IfcArbitraryClosedProfileDef",IFCANNOTATIONTEXTOCCURRENCE:"IfcAnnotationTextOccurrence",IFCANNOTATIONSYMBOLOCCURRENCE:"IfcAnnotationSymbolOccurrence",IFCANNOTATIONSURFACEOCCURRENCE:"IfcAnnotationSurfaceOccurrence",IFCANNOTATIONOCCURRENCE:"IfcAnnotationOccurrence",IFCWATERPROPERTIES:"IfcWaterProperties",IFCVIRTUALGRIDINTERSECTION:"IfcVirtualGridIntersection",IFCVERTEXPOINT:"IfcVertexPoint",IFCVERTEXBASEDTEXTUREMAP:"IfcVertexBasedTextureMap",IFCVERTEX:"IfcVertex",IFCUNITASSIGNMENT:"IfcUnitAssignment",IFCTOPOLOGYREPRESENTATION:"IfcTopologyRepresentation",IFCTOPOLOGICALREPRESENTATIONITEM:"IfcTopologicalRepresentationItem",IFCTIMESERIESVALUE:"IfcTimeSeriesValue",IFCTIMESERIESREFERENCERELATIONSHIP:"IfcTimeSeriesReferenceRelationship",IFCTIMESERIES:"IfcTimeSeries",IFCTHERMALMATERIALPROPERTIES:"IfcThermalMaterialProperties",IFCTEXTUREVERTEX:"IfcTextureVertex",IFCTEXTUREMAP:"IfcTextureMap",IFCTEXTURECOORDINATEGENERATOR:"IfcTextureCoordinateGenerator",IFCTEXTURECOORDINATE:"IfcTextureCoordinate",IFCTEXTSTYLEWITHBOXCHARACTERISTICS:"IfcTextStyleWithBoxCharacteristics",IFCTEXTSTYLETEXTMODEL:"IfcTextStyleTextModel",IFCTEXTSTYLEFORDEFINEDFONT:"IfcTextStyleForDefinedFont",IFCTEXTSTYLEFONTMODEL:"IfcTextStyleFontModel",IFCTEXTSTYLE:"IfcTextStyle",IFCTELECOMADDRESS:"IfcTelecomAddress",IFCTABLEROW:"IfcTableRow",IFCTABLE:"IfcTable",IFCSYMBOLSTYLE:"IfcSymbolStyle",IFCSURFACETEXTURE:"IfcSurfaceTexture",IFCSURFACESTYLEWITHTEXTURES:"IfcSurfaceStyleWithTextures",IFCSURFACESTYLESHADING:"IfcSurfaceStyleShading",IFCSURFACESTYLEREFRACTION:"IfcSurfaceStyleRefraction",IFCSURFACESTYLELIGHTING:"IfcSurfaceStyleLighting",IFCSURFACESTYLE:"IfcSurfaceStyle",IFCSTYLEDREPRESENTATION:"IfcStyledRepresentation",IFCSTYLEDITEM:"IfcStyledItem",IFCSTYLEMODEL:"IfcStyleModel",IFCSTRUCTURALLOADTEMPERATURE:"IfcStructuralLoadTemperature",IFCSTRUCTURALLOADSTATIC:"IfcStructuralLoadStatic",IFCSTRUCTURALLOAD:"IfcStructuralLoad",IFCSTRUCTURALCONNECTIONCONDITION:"IfcStructuralConnectionCondition",IFCSIMPLEPROPERTY:"IfcSimpleProperty",IFCSHAPEREPRESENTATION:"IfcShapeRepresentation",IFCSHAPEMODEL:"IfcShapeModel",IFCSHAPEASPECT:"IfcShapeAspect",IFCSECTIONREINFORCEMENTPROPERTIES:"IfcSectionReinforcementProperties",IFCSECTIONPROPERTIES:"IfcSectionProperties",IFCSIUNIT:"IfcSIUnit",IFCROOT:"IfcRoot",IFCRIBPLATEPROFILEPROPERTIES:"IfcRibPlateProfileProperties",IFCREPRESENTATIONMAP:"IfcRepresentationMap",IFCREPRESENTATIONITEM:"IfcRepresentationItem",IFCREPRESENTATIONCONTEXT:"IfcRepresentationContext",IFCREPRESENTATION:"IfcRepresentation",IFCRELAXATION:"IfcRelaxation",IFCREINFORCEMENTBARPROPERTIES:"IfcReinforcementBarProperties",IFCREFERENCESVALUEDOCUMENT:"IfcReferencesValueDocument",IFCQUANTITYWEIGHT:"IfcQuantityWeight",IFCQUANTITYVOLUME:"IfcQuantityVolume",IFCQUANTITYTIME:"IfcQuantityTime",IFCQUANTITYLENGTH:"IfcQuantityLength",IFCQUANTITYCOUNT:"IfcQuantityCount",IFCQUANTITYAREA:"IfcQuantityArea",IFCPROPERTYENUMERATION:"IfcPropertyEnumeration",IFCPROPERTYDEPENDENCYRELATIONSHIP:"IfcPropertyDependencyRelationship",IFCPROPERTYCONSTRAINTRELATIONSHIP:"IfcPropertyConstraintRelationship",IFCPROPERTY:"IfcProperty",IFCPROFILEPROPERTIES:"IfcProfileProperties",IFCPROFILEDEF:"IfcProfileDef",IFCPRODUCTSOFCOMBUSTIONPROPERTIES:"IfcProductsOfCombustionProperties",IFCPRODUCTREPRESENTATION:"IfcProductRepresentation",IFCPRESENTATIONSTYLEASSIGNMENT:"IfcPresentationStyleAssignment",IFCPRESENTATIONSTYLE:"IfcPresentationStyle",IFCPRESENTATIONLAYERWITHSTYLE:"IfcPresentationLayerWithStyle",IFCPRESENTATIONLAYERASSIGNMENT:"IfcPresentationLayerAssignment",IFCPREDEFINEDTEXTFONT:"IfcPredefinedTextFont",IFCPREDEFINEDTERMINATORSYMBOL:"IfcPredefinedTerminatorSymbol",IFCPREDEFINEDSYMBOL:"IfcPredefinedSymbol",IFCPREDEFINEDITEM:"IfcPredefinedItem",IFCPOSTALADDRESS:"IfcPostalAddress",IFCPHYSICALSIMPLEQUANTITY:"IfcPhysicalSimpleQuantity",IFCPHYSICALQUANTITY:"IfcPhysicalQuantity",IFCPERSONANDORGANIZATION:"IfcPersonAndOrganization",IFCPERSON:"IfcPerson",IFCOWNERHISTORY:"IfcOwnerHistory",IFCORGANIZATIONRELATIONSHIP:"IfcOrganizationRelationship",IFCORGANIZATION:"IfcOrganization",IFCOPTICALMATERIALPROPERTIES:"IfcOpticalMaterialProperties",IFCOBJECTIVE:"IfcObjective",IFCOBJECTPLACEMENT:"IfcObjectPlacement",IFCNAMEDUNIT:"IfcNamedUnit",IFCMONETARYUNIT:"IfcMonetaryUnit",IFCMETRIC:"IfcMetric",IFCMECHANICALSTEELMATERIALPROPERTIES:"IfcMechanicalSteelMaterialProperties",IFCMECHANICALMATERIALPROPERTIES:"IfcMechanicalMaterialProperties",IFCMEASUREWITHUNIT:"IfcMeasureWithUnit",IFCMATERIALPROPERTIES:"IfcMaterialProperties",IFCMATERIALLIST:"IfcMaterialList",IFCMATERIALLAYERSETUSAGE:"IfcMaterialLayerSetUsage",IFCMATERIALLAYERSET:"IfcMaterialLayerSet",IFCMATERIALLAYER:"IfcMaterialLayer",IFCMATERIALCLASSIFICATIONRELATIONSHIP:"IfcMaterialClassificationRelationship",IFCMATERIAL:"IfcMaterial",IFCLOCALTIME:"IfcLocalTime",IFCLIGHTINTENSITYDISTRIBUTION:"IfcLightIntensityDistribution",IFCLIGHTDISTRIBUTIONDATA:"IfcLightDistributionData",IFCLIBRARYREFERENCE:"IfcLibraryReference",IFCLIBRARYINFORMATION:"IfcLibraryInformation",IFCIRREGULARTIMESERIESVALUE:"IfcIrregularTimeSeriesValue",IFCGRIDAXIS:"IfcGridAxis",IFCEXTERNALLYDEFINEDTEXTFONT:"IfcExternallyDefinedTextFont",IFCEXTERNALLYDEFINEDSYMBOL:"IfcExternallyDefinedSymbol",IFCEXTERNALLYDEFINEDSURFACESTYLE:"IfcExternallyDefinedSurfaceStyle",IFCEXTERNALLYDEFINEDHATCHSTYLE:"IfcExternallyDefinedHatchStyle",IFCEXTERNALREFERENCE:"IfcExternalReference",IFCENVIRONMENTALIMPACTVALUE:"IfcEnvironmentalImpactValue",IFCDRAUGHTINGCALLOUTRELATIONSHIP:"IfcDraughtingCalloutRelationship",IFCDOCUMENTINFORMATIONRELATIONSHIP:"IfcDocumentInformationRelationship",IFCDOCUMENTINFORMATION:"IfcDocumentInformation",IFCDOCUMENTELECTRONICFORMAT:"IfcDocumentElectronicFormat",IFCDIMENSIONALEXPONENTS:"IfcDimensionalExponents",IFCDERIVEDUNITELEMENT:"IfcDerivedUnitElement",IFCDERIVEDUNIT:"IfcDerivedUnit",IFCDATEANDTIME:"IfcDateAndTime",IFCCURVESTYLEFONTPATTERN:"IfcCurveStyleFontPattern",IFCCURVESTYLEFONTANDSCALING:"IfcCurveStyleFontAndScaling",IFCCURVESTYLEFONT:"IfcCurveStyleFont",IFCCURRENCYRELATIONSHIP:"IfcCurrencyRelationship",IFCCOSTVALUE:"IfcCostValue",IFCCOORDINATEDUNIVERSALTIMEOFFSET:"IfcCoordinatedUniversalTimeOffset",IFCCONSTRAINTRELATIONSHIP:"IfcConstraintRelationship",IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP:"IfcConstraintClassificationRelationship",IFCCONSTRAINTAGGREGATIONRELATIONSHIP:"IfcConstraintAggregationRelationship",IFCCONSTRAINT:"IfcConstraint",IFCCONNECTIONSURFACEGEOMETRY:"IfcConnectionSurfaceGeometry",IFCCONNECTIONPORTGEOMETRY:"IfcConnectionPortGeometry",IFCCONNECTIONPOINTGEOMETRY:"IfcConnectionPointGeometry",IFCCONNECTIONGEOMETRY:"IfcConnectionGeometry",IFCCOLOURSPECIFICATION:"IfcColourSpecification",IFCCLASSIFICATIONNOTATIONFACET:"IfcClassificationNotationFacet",IFCCLASSIFICATIONNOTATION:"IfcClassificationNotation",IFCCLASSIFICATIONITEMRELATIONSHIP:"IfcClassificationItemRelationship",IFCCLASSIFICATIONITEM:"IfcClassificationItem",IFCCLASSIFICATION:"IfcClassification",IFCCALENDARDATE:"IfcCalendarDate",IFCBOUNDARYNODECONDITIONWARPING:"IfcBoundaryNodeConditionWarping",IFCBOUNDARYNODECONDITION:"IfcBoundaryNodeCondition",IFCBOUNDARYFACECONDITION:"IfcBoundaryFaceCondition",IFCBOUNDARYEDGECONDITION:"IfcBoundaryEdgeCondition",IFCBOUNDARYCONDITION:"IfcBoundaryCondition",IFCAPPROVALRELATIONSHIP:"IfcApprovalRelationship",IFCAPPROVALPROPERTYRELATIONSHIP:"IfcApprovalPropertyRelationship",IFCAPPROVALACTORRELATIONSHIP:"IfcApprovalActorRelationship",IFCAPPROVAL:"IfcApproval",IFCAPPLIEDVALUERELATIONSHIP:"IfcAppliedValueRelationship",IFCAPPLIEDVALUE:"IfcAppliedValue",IFCAPPLICATION:"IfcApplication",IFCADDRESS:"IfcAddress",IFCACTORROLE:"IfcActorRole"};class Wc{constructor(){S(this,"factor",1);S(this,"complement",1)}apply(i){const e=this.getScaleMatrix().multiply(i);i.copy(e)}setUp(i){var n,r,o;this.factor=1;const t=this.getLengthUnits(i);if(!t)return;const e=t==null,s=t.Name===void 0||t.Name===null;e||s||(t.Name.value==="FOOT"&&(this.factor=.3048),((n=t.Prefix)==null?void 0:n.value)==="MILLI"?this.complement=.001:((r=t.Prefix)==null?void 0:r.value)==="CENTI"?this.complement=.01:((o=t.Prefix)==null?void 0:o.value)==="DECI"&&(this.complement=.01))}getLengthUnits(i){try{const e=i.GetLineIDsWithType(0,zo).get(0),s=i.GetLine(0,e);for(const n of s.Units){if(!n||n.value===null||n.value===void 0)continue;const r=i.GetLine(0,n.value);if(r.UnitType&&r.UnitType.value==="LENGTHUNIT")return r}return null}catch{return console.log("Could not get units"),null}}getScaleMatrix(){const i=this.factor;return new Nt().fromArray([i,0,0,0,0,i,0,0,0,0,i,0,0,0,0,1])}}class Xc{constructor(){S(this,"itemsByFloor",{});S(this,"_units",new Wc)}setUp(i){this._units.setUp(i),this.cleanUp();try{const t=i.GetLineIDsWithType(0,zs),e=new Set,s=i.GetLineIDsWithType(0,Vi);for(let l=0;l0&&!o.has(r))continue;if(this.settings.excludedCategories.has(r))continue;const a=this.webIfc.GetLineIDsWithType(0,r),l=a.size();for(let u=0;u{this.getMesh(r,e)});for(const r of this._visitedFragments){const{index:o,fragment:a}=r[1];e.keyFragments.set(o,a.id)}for(const r of e.items){const o=this._fragmentInstances.get(r.id);if(!o)throw new Error("Fragment not found!");const a=[];for(const[l,u]of o)a.push(u);r.add(a)}const n=this.webIfc.GetCoordinationMatrix(0);return e.coordinationMatrix.fromArray(n),e.civilData=this._civil.read(this.webIfc),e}getMesh(t,e){const s=t.geometries.size(),n=t.expressID;for(let r=0;ro.value!==s),await t.setProperties(s,null),this.registerChange(t,e,s))}addElementToPset(t,e,...s){this.components.get(kt).addEntitiesRelation(t,e,{type:Yi,inv:"DefinesOcurrence"},...s)}async addPropToPset(t,e,...s){const n=await t.getProperties(e);if(n){for(const r of s){if(n.HasProperties.includes(r))continue;const o=new Se(r);n.HasProperties.push(o),this.onPropToPset.trigger({model:t,psetID:e,propID:r})}this.registerChange(t,e)}}async createIfcRel(t,e,s,n){const r=Jc[e];if(!r)throw new Error(`IfcPropertiesManager: ${r} is unsoported.`);const o=de.getIFCSchema(t),a=Kc[r],l=le[o][r];if(!(a&&l))throw new Error(`IfcPropertiesManager: ${r} is unsoported.`);const u=[new le[o].IfcGloballyUniqueId(se.create())],{related:f,relating:I}=a,d=[...new Set(n)].map(p=>new Se(p)),E=(p,A)=>{for(let F=p;FparseInt(o,10)),n=e[s[0]],r=new Se(n.expressID);return{entity:n,handle:r}}registerChange(t,...e){this.changeMap[t.uuid]||(this.changeMap[t.uuid]=new Set);for(const s of e)this.changeMap[t.uuid].add(s),this.onDataChanged.trigger({model:t,expressID:s})}async newSingleProperty(t,e,s,n){const r=de.getIFCSchema(t),o=new le[r].IfcIdentifier(s),a=new le[r][e](n),l=new le[r].IfcPropertySingleValue(o,null,a,null);return l.expressID=this.getNewExpressID(t),await this.setData(t,l),l}};S(de,"uuid","58c2d9f0-183c-48d6-a402-dfcf5b9a34df");let Ln=de;const wi=class wi extends Mt{constructor(t){super(t);S(this,"onDisposed",new tt);S(this,"onRelationsIndexed",new tt);S(this,"relationMaps",{});S(this,"enabled",!0);S(this,"_relToAttributesMap",Zr);S(this,"_inverseAttributes",["IsDecomposedBy","Decomposes","AssociatedTo","HasAssociations","ClassificationForObjects","IsGroupedBy","HasAssignments","IsDefinedBy","DefinesOcurrence","IsTypedBy","Types","Defines","ContainedInStructure","ContainsElements","HasControlElements","AssignedToFlowElement","ConnectedTo","ConnectedFrom","ReferencedBy","Declares","HasContext","Controls","IsNestedBy","Nests","DocumentRefForObjects"]);S(this,"_ifcRels",[ks,Yn,Vn,Gn,Yi,kn,zn,zs,Hn,Wn,Xn,$n,Zn,jn,qn]);S(this,"onFragmentsDisposed",t=>{delete this.relationMaps[t.groupID]});S(this,"_changeMap",{});S(this,"onEntitiesRelated",new tt);this.components.add(wi.uuid,this),t.get(Ct).onFragmentsDisposed.add(this.onFragmentsDisposed)}indexRelations(t,e,s,n){const r=Object.keys(e).find(f=>f.startsWith("Relating")),o=Object.keys(e).find(f=>f.startsWith("Related"));if(!(r&&o))return;const a=e[r].value,l=e[o].map(f=>f.value),u=this.getEntityRelations(t,a,n);for(const f of l)u.push(f);for(const f of l)this.getEntityRelations(t,f,s).push(a)}getAttributeIndex(t){const e=this._inverseAttributes.indexOf(t);if(e===-1)throw new Error(`IfcRelationsIndexer: ${t} is not a valid IFC Inverse Attribute name or its not supported yet by this component.`);return e}setRelationMap(t,e){this.relationMaps[t.uuid]=e,this.onRelationsIndexed.trigger({modelID:t.uuid,relationsMap:e})}async process(t,e){if(!t.hasProperties)throw new Error("FragmentsGroup properties not found");let s=this.relationMaps[t.uuid];s||(s=new Map,this.relationMaps[t.uuid]=s);const n=t.getLocalProperties();if(!n)return s;const r=(e==null?void 0:e.relationsToProcess)??this._ifcRels;for(const[o,a]of Object.entries(n)){if(!r.includes(a.type))continue;const l=this._relToAttributesMap.get(a.type);if(!l)continue;const{forRelated:u,forRelating:f}=l;this.indexRelations(s,a,u,f)}return this.setRelationMap(t,s),s}async processFromWebIfc(t,e){const s=new Map;for(const n of this._ifcRels){const r=this._relToAttributesMap.get(n);if(!r)continue;const{forRelated:o,forRelating:a}=r,l=t.GetLineIDsWithType(e,n);for(let u=0;up.startsWith("Related")),C=d.find(p=>p.startsWith("Relating"));if(!(E&&C))continue;h[E]=[...f].map(p=>new Se(p)),h[C]=new Se(l),await e.setData(n,h)}else{const h=await e.createIfcRel(n,o,l,[...f]);if(!h)continue;u.relID=h.expressID}}}}addEntitiesRelation(t,e,s,...n){const{type:r,inv:o}=s;let a=this.relationMaps[t.uuid];if(a||(a=new Map,this.relationMaps[t.uuid]=a),!this._ifcRels.includes(r))return;const l=Zr.get(r);if(!l)return;const{forRelated:u,forRelating:f}=l;if(!(u===o||f===o))return;let I=this._changeMap[t.uuid];I||(I=new ie,this._changeMap[t.uuid]=I);const h=f===o?[e]:n,d=u===o?[e]:n;let E=I.get(r);E||(E=new ie,E.onItemSet.add(()=>this.onEntitiesRelated.trigger({invAttribute:o,relType:r,relatingIDs:h,relatedIDs:d})),E.onItemUpdated.add(()=>this.onEntitiesRelated.trigger({invAttribute:o,relType:r,relatingIDs:h,relatedIDs:d})),I.set(r,E));for(const C of h){let p=E.get(C);p||(p={related:new Pe},E.set(C,p)),p.related.add(...d)}for(const C of h)this.getEntityRelations(t,C,f).push(...d);for(const C of d)this.getEntityRelations(t,C,u).push(...h)}getEntityChildren(t,e,s=new Set){if(s.add(e),this.relationMaps[t.uuid]===void 0)throw new Error("The provided model has no indices. You have to generate them first.");const r=this.getEntityRelations(t,e,"IsDecomposedBy");if(r)for(const a of r)this.getEntityChildren(t,a,s);const o=this.getEntityRelations(t,e,"ContainsElements");if(o)for(const a of o)this.getEntityChildren(t,a,s);return s}};S(wi,"uuid","23a889ab-83b3-44a4-8bee-ead83438370b");let kt=wi;const Us=class Us extends Mt{constructor(t){super(t);S(this,"onDisposed",new tt);S(this,"onFragmentsLoaded",new tt);S(this,"onFragmentsDisposed",new tt);S(this,"list",new ie);S(this,"groups",new ie);S(this,"baseCoordinationModel","");S(this,"baseCoordinationMatrix",new Nt);S(this,"enabled",!0);S(this,"_loader",new sa);this.components.add(Us.uuid,this)}get meshes(){const t=[];for(const[e,s]of this.list)t.push(s.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,s=[];for(const n of t.items)s.push(n.id),this.list.delete(n.id);t.dispose(!0),this.groups.delete(t.uuid),this.groups.size===0&&(this.baseCoordinationModel="",this.baseCoordinationMatrix=new Nt),this.onFragmentsDisposed.trigger({groupID:e,fragmentIDs:s})}load(t,e){const n={...{coordinate:!0},...e},{coordinate:r,name:o,properties:a,relationsMap:l}=n,u=this._loader.import(t);e&&(u.isStreamed=e.isStreamed||!1),o&&(u.name=o);for(const f of u.items)f.group=u,this.list.set(f.id,f);return r&&this.coordinate([u]),this.groups.set(u.uuid,u),a&&u.setLocalProperties(a),l&&this.components.get(kt).setRelationMap(u,l),this.onFragmentsLoaded.trigger(u),u}export(t){return this._loader.export(t)}getModelIdMap(t){const e={};for(const s in t){const n=this.list.get(s);if(!(n&&n.group))continue;const r=n.group;r.uuid in e||(e[r.uuid]=new Set);const o=t[s];for(const a of o)e[r.uuid].add(a)}return e}modelIdToFragmentIdMap(t){let e={};for(const s in t){const n=this.groups.get(s);if(!n)continue;const r=t[s],o=n.getFragmentMap(r);e={...e,...o}}return e}guidToFragmentIdMap(t){const e={};for(const[n,r]of this.groups){n in e||(e[n]=new Set);for(const o of t){const a=r.globalToExpressIDs.get(o);a&&e[n].add(a)}}return this.modelIdToFragmentIdMap(e)}fragmentIdMapToGuids(t){const e=[],s=this.getModelIdMap(t);for(const n in s){const r=this.groups.get(n);if(!r)continue;const o=s[n];for(const a of o)for(const[l,u]of r.globalToExpressIDs.entries())if(u===a){e.push(l);break}}return e}coordinate(t=Array.from(this.groups.values())){if(this.baseCoordinationModel.length===0){const s=t.pop();if(!s)return;this.baseCoordinationModel=s.uuid,this.baseCoordinationMatrix=s.coordinationMatrix.clone()}if(t.length)for(const s of t)s.coordinationMatrix.equals(this.baseCoordinationMatrix)||(s.position.set(0,0,0),s.rotation.set(0,0,0),s.scale.set(1,1,1),s.updateMatrix(),this.applyBaseCoordinateSystem(s,s.coordinationMatrix))}applyBaseCoordinateSystem(t,e){e&&t.applyMatrix4(e.clone().invert()),t.applyMatrix4(this.baseCoordinationMatrix)}clone(t,e){const s=t.cloneGroup(e);this.groups.set(s.uuid,s);for(const n of s.items)this.list.set(n.id,n);return s}};S(Us,"uuid","fef46874-46a3-461b-8c44-2922ab77c806");let Ct=Us;function Is(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Co={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files @@ -34,14 +34,14 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE -*/(function(c,i){(function(t){c.exports=t()})(function(){return function t(e,s,n){function r(l,u){if(!s[l]){if(!e[l]){var f=typeof hs=="function"&&hs;if(!u&&f)return f(l,!0);if(o)return o(l,!0);var I=new Error("Cannot find module '"+l+"'");throw I.code="MODULE_NOT_FOUND",I}var h=s[l]={exports:{}};e[l][0].call(h.exports,function(d){var E=e[l][1][d];return r(E||d)},h,h.exports,t,e,s,n)}return s[l].exports}for(var o=typeof hs=="function"&&hs,a=0;a>2,h=(3&l)<<4|u>>4,d=1>6:64,E=2>4,u=(15&I)<<4|(h=o.indexOf(a.charAt(E++)))>>2,f=(3&h)<<6|(d=o.indexOf(a.charAt(E++))),A[C++]=l,h!==64&&(A[C++]=u),d!==64&&(A[C++]=f);return A}},{"./support":30,"./utils":32}],2:[function(t,e,s){var n=t("./external"),r=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function l(u,f,I,h,d){this.compressedSize=u,this.uncompressedSize=f,this.crc32=I,this.compression=h,this.compressedContent=d}l.prototype={getContentWorker:function(){var u=new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),f=this;return u.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(u,f,I){return u.pipe(new o).pipe(new a("uncompressedSize")).pipe(f.compressWorker(I)).pipe(new a("compressedSize")).withStreamInfo("compression",f)},e.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,s){var n=t("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},s.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,s){var n=t("./utils"),r=function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var u=0;u<8;u++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a}();e.exports=function(o,a){return o!==void 0&&o.length?n.getTypeOf(o)!=="string"?function(l,u,f,I){var h=r,d=I+f;l^=-1;for(var E=I;E>>8^h[255&(l^u[E])];return-1^l}(0|a,o,o.length,0):function(l,u,f,I){var h=r,d=I+f;l^=-1;for(var E=I;E>>8^h[255&(l^u.charCodeAt(E))];return-1^l}(0|a,o,o.length,0):0}},{"./utils":32}],5:[function(t,e,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(t,e,s){var n=null;n=typeof Promise<"u"?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,s){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",r=t("pako"),o=t("./utils"),a=t("./stream/GenericWorker"),l=n?"uint8array":"array";function u(f,I){a.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=I,this.meta={}}s.magic="\b\0",o.inherits(u,a),u.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(l,f.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(I){f.push({data:I,meta:f.meta})}},s.compressWorker=function(f){return new u("Deflate",f)},s.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,s){function n(h,d){var E,C="";for(E=0;E>>=8;return C}function r(h,d,E,C,p,A){var F,R,g=h.file,N=h.compression,y=A!==l.utf8encode,w=o.transformTo("string",A(g.name)),L=o.transformTo("string",l.utf8encode(g.name)),D=g.comment,V=o.transformTo("string",A(D)),O=o.transformTo("string",l.utf8encode(D)),M=L.length!==g.name.length,T=O.length!==D.length,U="",Z="",G="",K=g.dir,z=g.date,st={crc32:0,compressedSize:0,uncompressedSize:0};d&&!E||(st.crc32=h.crc32,st.compressedSize=h.compressedSize,st.uncompressedSize=h.uncompressedSize);var B=0;d&&(B|=8),y||!M&&!T||(B|=2048);var x=0,nt=0;K&&(x|=16),p==="UNIX"?(nt=798,x|=function(Q,At){var wt=Q;return Q||(wt=At?16893:33204),(65535&wt)<<16}(g.unixPermissions,K)):(nt=20,x|=function(Q){return 63&(Q||0)}(g.dosPermissions)),F=z.getUTCHours(),F<<=6,F|=z.getUTCMinutes(),F<<=5,F|=z.getUTCSeconds()/2,R=z.getUTCFullYear()-1980,R<<=4,R|=z.getUTCMonth()+1,R<<=5,R|=z.getUTCDate(),M&&(Z=n(1,1)+n(u(w),4)+L,U+="up"+n(Z.length,2)+Z),T&&(G=n(1,1)+n(u(V),4)+O,U+="uc"+n(G.length,2)+G);var J="";return J+=` -\0`,J+=n(B,2),J+=N.magic,J+=n(F,2),J+=n(R,2),J+=n(st.crc32,4),J+=n(st.compressedSize,4),J+=n(st.uncompressedSize,4),J+=n(w.length,2),J+=n(U.length,2),{fileRecord:f.LOCAL_FILE_HEADER+J+w+U,dirRecord:f.CENTRAL_FILE_HEADER+n(nt,2)+J+n(V.length,2)+"\0\0\0\0"+n(x,4)+n(C,4)+w+U+V}}var o=t("../utils"),a=t("../stream/GenericWorker"),l=t("../utf8"),u=t("../crc32"),f=t("../signature");function I(h,d,E,C){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=d,this.zipPlatform=E,this.encodeFileName=C,this.streamFiles=h,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(I,a),I.prototype.push=function(h){var d=h.meta.percent||0,E=this.entriesCount,C=this._sources.length;this.accumulate?this.contentBuffer.push(h):(this.bytesWritten+=h.data.length,a.prototype.push.call(this,{data:h.data,meta:{currentFile:this.currentFile,percent:E?(d+100*(E-C-1))/E:100}}))},I.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var d=this.streamFiles&&!h.file.dir;if(d){var E=r(h,d,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},I.prototype.closedSource=function(h){this.accumulate=!1;var d=this.streamFiles&&!h.file.dir,E=r(h,d,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),d)this.push({data:function(C){return f.DATA_DESCRIPTOR+n(C.crc32,4)+n(C.compressedSize,4)+n(C.uncompressedSize,4)}(h),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},I.prototype.flush=function(){for(var h=this.bytesWritten,d=0;d=this.index;a--)l=(l<<8)+this.byteAt(a);return this.index+=o,l},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},e.exports=r},{"../utils":32}],19:[function(t,e,s){var n=t("./Uint8ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},e.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,s){var n=t("./DataReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},r.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},r.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},e.exports=r},{"../utils":32,"./DataReader":18}],21:[function(t,e,s){var n=t("./ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var a=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},e.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,s){var n=t("../utils"),r=t("../support"),o=t("./ArrayReader"),a=t("./StringReader"),l=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(f){var I=n.getTypeOf(f);return n.checkSupport(I),I!=="string"||r.uint8array?I==="nodebuffer"?new l(f):r.uint8array?new u(n.transformTo("uint8array",f)):new o(n.transformTo("array",f)):new a(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,e,s){var n=t("./GenericWorker"),r=t("../utils");function o(a){n.call(this,"ConvertWorker to "+a),this.destType=a}r.inherits(o,n),o.prototype.processChunk=function(a){this.push({data:r.transformTo(this.destType,a.data),meta:a.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,s){var n=t("./GenericWorker"),r=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(a){this.streamInfo.crc32=r(a.data,this.streamInfo.crc32||0),this.push(a)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,s){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}n.inherits(o,r),o.prototype.processChunk=function(a){if(a){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+a.data.length}r.prototype.processChunk.call(this,a)},e.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,s){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataWorker");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(u){l.dataIsReady=!0,l.data=u,l.max=u&&u.length||0,l.type=n.getTypeOf(u),l.isPaused||l._tickAndRepeat()},function(u){l.error(u)})}n.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=null,l=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":a=this.data.substring(this.index,l);break;case"uint8array":a=this.data.subarray(this.index,l);break;case"array":case"nodebuffer":a=this.data.slice(this.index,l)}return this.index=l,this.push({data:a,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,s){function n(r){this.name=r||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(r){this.emit("data",r)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(r){this.emit("error",r)}return!0},error:function(r){return!this.isFinished&&(this.isPaused?this.generatedError=r:(this.isFinished=!0,this.emit("error",r),this.previous&&this.previous.error(r),this.cleanUp()),!0)},on:function(r,o){return this._listeners[r].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(r,o){if(this._listeners[r])for(var a=0;a "+r:r}},e.exports=n},{}],29:[function(t,e,s){var n=t("../utils"),r=t("./ConvertWorker"),o=t("./GenericWorker"),a=t("../base64"),l=t("../support"),u=t("../external"),f=null;if(l.nodestream)try{f=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function I(d,E){return new u.Promise(function(C,p){var A=[],F=d._internalType,R=d._outputType,g=d._mimeType;d.on("data",function(N,y){A.push(N),E&&E(y)}).on("error",function(N){A=[],p(N)}).on("end",function(){try{var N=function(y,w,L){switch(y){case"blob":return n.newBlob(n.transformTo("arraybuffer",w),L);case"base64":return a.encode(w);default:return n.transformTo(y,w)}}(R,function(y,w){var L,D=0,V=null,O=0;for(L=0;L"u")s.blob=!1;else{var n=new ArrayBuffer(0);try{s.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),s.blob=r.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!t("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,s){for(var n=t("./utils"),r=t("./support"),o=t("./nodejsUtils"),a=t("./stream/GenericWorker"),l=new Array(256),u=0;u<256;u++)l[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;l[254]=l[254]=1;function f(){a.call(this,"utf-8 decode"),this.leftOver=null}function I(){a.call(this,"utf-8 encode")}s.utf8encode=function(h){return r.nodebuffer?o.newBufferFrom(h,"utf-8"):function(d){var E,C,p,A,F,R=d.length,g=0;for(A=0;A>>6:(C<65536?E[F++]=224|C>>>12:(E[F++]=240|C>>>18,E[F++]=128|C>>>12&63),E[F++]=128|C>>>6&63),E[F++]=128|63&C);return E}(h)},s.utf8decode=function(h){return r.nodebuffer?n.transformTo("nodebuffer",h).toString("utf-8"):function(d){var E,C,p,A,F=d.length,R=new Array(2*F);for(E=C=0;E>10&1023,R[C++]=56320|1023&p)}return R.length!==C&&(R.subarray?R=R.subarray(0,C):R.length=C),n.applyFromCharCode(R)}(h=n.transformTo(r.uint8array?"uint8array":"array",h))},n.inherits(f,a),f.prototype.processChunk=function(h){var d=n.transformTo(r.uint8array?"uint8array":"array",h.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var E=d;(d=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),d.set(E,this.leftOver.length)}else d=this.leftOver.concat(d);this.leftOver=null}var C=function(A,F){var R;for((F=F||A.length)>A.length&&(F=A.length),R=F-1;0<=R&&(192&A[R])==128;)R--;return R<0||R===0?F:R+l[A[R]]>F?R:F}(d),p=d;C!==d.length&&(r.uint8array?(p=d.subarray(0,C),this.leftOver=d.subarray(C,d.length)):(p=d.slice(0,C),this.leftOver=d.slice(C,d.length))),this.push({data:s.utf8decode(p),meta:h.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,n.inherits(I,a),I.prototype.processChunk=function(h){this.push({data:s.utf8encode(h.data),meta:h.meta})},s.Utf8EncodeWorker=I},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,s){var n=t("./support"),r=t("./base64"),o=t("./nodejsUtils"),a=t("./external");function l(E){return E}function u(E,C){for(var p=0;p>8;this.dir=!!(16&this.externalFileAttributes),h==0&&(this.dosPermissions=63&this.externalFileAttributes),h==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var h=n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=h.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=h.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=h.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=h.readInt(4))}},readExtraFields:function(h){var d,E,C,p=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4>>6:(h<65536?I[C++]=224|h>>>12:(I[C++]=240|h>>>18,I[C++]=128|h>>>12&63),I[C++]=128|h>>>6&63),I[C++]=128|63&h);return I},s.buf2binstring=function(f){return u(f,f.length)},s.binstring2buf=function(f){for(var I=new n.Buf8(f.length),h=0,d=I.length;h>10&1023,A[d++]=56320|1023&E)}return u(A,d)},s.utf8border=function(f,I){var h;for((I=I||f.length)>f.length&&(I=f.length),h=I-1;0<=h&&(192&f[h])==128;)h--;return h<0||h===0?I:h+a[f[h]]>I?h:I}},{"./common":41}],43:[function(t,e,s){e.exports=function(n,r,o,a){for(var l=65535&n|0,u=n>>>16&65535|0,f=0;o!==0;){for(o-=f=2e3>>1:r>>>1;o[a]=r}return o}();e.exports=function(r,o,a,l){var u=n,f=l+a;r^=-1;for(var I=l;I>>8^u[255&(r^o[I])];return-1^r}},{}],46:[function(t,e,s){var n,r=t("../utils/common"),o=t("./trees"),a=t("./adler32"),l=t("./crc32"),u=t("./messages"),f=0,I=4,h=0,d=-2,E=-1,C=4,p=2,A=8,F=9,R=286,g=30,N=19,y=2*R+1,w=15,L=3,D=258,V=D+L+1,O=42,M=113,T=1,U=2,Z=3,G=4;function K(m,H){return m.msg=u[H],H}function z(m){return(m<<1)-(4m.avail_out&&(Y=m.avail_out),Y!==0&&(r.arraySet(m.output,H.pending_buf,H.pending_out,Y,m.next_out),m.next_out+=Y,H.pending_out+=Y,m.total_out+=Y,m.avail_out-=Y,H.pending-=Y,H.pending===0&&(H.pending_out=0))}function x(m,H){o._tr_flush_block(m,0<=m.block_start?m.block_start:-1,m.strstart-m.block_start,H),m.block_start=m.strstart,B(m.strm)}function nt(m,H){m.pending_buf[m.pending++]=H}function J(m,H){m.pending_buf[m.pending++]=H>>>8&255,m.pending_buf[m.pending++]=255&H}function Q(m,H){var Y,_,P=m.max_chain_length,b=m.strstart,X=m.prev_length,$=m.nice_match,v=m.strstart>m.w_size-V?m.strstart-(m.w_size-V):0,j=m.window,et=m.w_mask,q=m.prev,rt=m.strstart+D,dt=j[b+X-1],ut=j[b+X];m.prev_length>=m.good_match&&(P>>=2),$>m.lookahead&&($=m.lookahead);do if(j[(Y=H)+X]===ut&&j[Y+X-1]===dt&&j[Y]===j[b]&&j[++Y]===j[b+1]){b+=2,Y++;do;while(j[++b]===j[++Y]&&j[++b]===j[++Y]&&j[++b]===j[++Y]&&j[++b]===j[++Y]&&j[++b]===j[++Y]&&j[++b]===j[++Y]&&j[++b]===j[++Y]&&j[++b]===j[++Y]&&bv&&--P!=0);return X<=m.lookahead?X:m.lookahead}function At(m){var H,Y,_,P,b,X,$,v,j,et,q=m.w_size;do{if(P=m.window_size-m.lookahead-m.strstart,m.strstart>=q+(q-V)){for(r.arraySet(m.window,m.window,q,q,0),m.match_start-=q,m.strstart-=q,m.block_start-=q,H=Y=m.hash_size;_=m.head[--H],m.head[H]=q<=_?_-q:0,--Y;);for(H=Y=q;_=m.prev[--H],m.prev[H]=q<=_?_-q:0,--Y;);P+=q}if(m.strm.avail_in===0)break;if(X=m.strm,$=m.window,v=m.strstart+m.lookahead,j=P,et=void 0,et=X.avail_in,j=L)for(b=m.strstart-m.insert,m.ins_h=m.window[b],m.ins_h=(m.ins_h<=L&&(m.ins_h=(m.ins_h<=L)if(_=o._tr_tally(m,m.strstart-m.match_start,m.match_length-L),m.lookahead-=m.match_length,m.match_length<=m.max_lazy_match&&m.lookahead>=L){for(m.match_length--;m.strstart++,m.ins_h=(m.ins_h<=L&&(m.ins_h=(m.ins_h<=L&&m.match_length<=m.prev_length){for(P=m.strstart+m.lookahead-L,_=o._tr_tally(m,m.strstart-1-m.prev_match,m.prev_length-L),m.lookahead-=m.prev_length-1,m.prev_length-=2;++m.strstart<=P&&(m.ins_h=(m.ins_h<m.pending_buf_size-5&&(Y=m.pending_buf_size-5);;){if(m.lookahead<=1){if(At(m),m.lookahead===0&&H===f)return T;if(m.lookahead===0)break}m.strstart+=m.lookahead,m.lookahead=0;var _=m.block_start+Y;if((m.strstart===0||m.strstart>=_)&&(m.lookahead=m.strstart-_,m.strstart=_,x(m,!1),m.strm.avail_out===0)||m.strstart-m.block_start>=m.w_size-V&&(x(m,!1),m.strm.avail_out===0))return T}return m.insert=0,H===I?(x(m,!0),m.strm.avail_out===0?Z:G):(m.strstart>m.block_start&&(x(m,!1),m.strm.avail_out),T)}),new ht(4,4,8,4,wt),new ht(4,5,16,8,wt),new ht(4,6,32,32,wt),new ht(4,4,16,16,lt),new ht(8,16,32,32,lt),new ht(8,16,128,128,lt),new ht(8,32,128,256,lt),new ht(32,128,258,1024,lt),new ht(32,258,258,4096,lt)],s.deflateInit=function(m,H){return jt(m,H,A,15,8,0)},s.deflateInit2=jt,s.deflateReset=ne,s.deflateResetKeep=Ft,s.deflateSetHeader=function(m,H){return m&&m.state?m.state.wrap!==2?d:(m.state.gzhead=H,h):d},s.deflate=function(m,H){var Y,_,P,b;if(!m||!m.state||5>8&255),nt(_,_.gzhead.time>>16&255),nt(_,_.gzhead.time>>24&255),nt(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),nt(_,255&_.gzhead.os),_.gzhead.extra&&_.gzhead.extra.length&&(nt(_,255&_.gzhead.extra.length),nt(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(m.adler=l(m.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=69):(nt(_,0),nt(_,0),nt(_,0),nt(_,0),nt(_,0),nt(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),nt(_,3),_.status=M);else{var X=A+(_.w_bits-8<<4)<<8;X|=(2<=_.strategy||_.level<2?0:_.level<6?1:_.level===6?2:3)<<6,_.strstart!==0&&(X|=32),X+=31-X%31,_.status=M,J(_,X),_.strstart!==0&&(J(_,m.adler>>>16),J(_,65535&m.adler)),m.adler=1}if(_.status===69)if(_.gzhead.extra){for(P=_.pending;_.gzindex<(65535&_.gzhead.extra.length)&&(_.pending!==_.pending_buf_size||(_.gzhead.hcrc&&_.pending>P&&(m.adler=l(m.adler,_.pending_buf,_.pending-P,P)),B(m),P=_.pending,_.pending!==_.pending_buf_size));)nt(_,255&_.gzhead.extra[_.gzindex]),_.gzindex++;_.gzhead.hcrc&&_.pending>P&&(m.adler=l(m.adler,_.pending_buf,_.pending-P,P)),_.gzindex===_.gzhead.extra.length&&(_.gzindex=0,_.status=73)}else _.status=73;if(_.status===73)if(_.gzhead.name){P=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>P&&(m.adler=l(m.adler,_.pending_buf,_.pending-P,P)),B(m),P=_.pending,_.pending===_.pending_buf_size)){b=1;break}b=_.gzindex<_.gzhead.name.length?255&_.gzhead.name.charCodeAt(_.gzindex++):0,nt(_,b)}while(b!==0);_.gzhead.hcrc&&_.pending>P&&(m.adler=l(m.adler,_.pending_buf,_.pending-P,P)),b===0&&(_.gzindex=0,_.status=91)}else _.status=91;if(_.status===91)if(_.gzhead.comment){P=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>P&&(m.adler=l(m.adler,_.pending_buf,_.pending-P,P)),B(m),P=_.pending,_.pending===_.pending_buf_size)){b=1;break}b=_.gzindex<_.gzhead.comment.length?255&_.gzhead.comment.charCodeAt(_.gzindex++):0,nt(_,b)}while(b!==0);_.gzhead.hcrc&&_.pending>P&&(m.adler=l(m.adler,_.pending_buf,_.pending-P,P)),b===0&&(_.status=103)}else _.status=103;if(_.status===103&&(_.gzhead.hcrc?(_.pending+2>_.pending_buf_size&&B(m),_.pending+2<=_.pending_buf_size&&(nt(_,255&m.adler),nt(_,m.adler>>8&255),m.adler=0,_.status=M)):_.status=M),_.pending!==0){if(B(m),m.avail_out===0)return _.last_flush=-1,h}else if(m.avail_in===0&&z(H)<=z(Y)&&H!==I)return K(m,-5);if(_.status===666&&m.avail_in!==0)return K(m,-5);if(m.avail_in!==0||_.lookahead!==0||H!==f&&_.status!==666){var $=_.strategy===2?function(v,j){for(var et;;){if(v.lookahead===0&&(At(v),v.lookahead===0)){if(j===f)return T;break}if(v.match_length=0,et=o._tr_tally(v,0,v.window[v.strstart]),v.lookahead--,v.strstart++,et&&(x(v,!1),v.strm.avail_out===0))return T}return v.insert=0,j===I?(x(v,!0),v.strm.avail_out===0?Z:G):v.last_lit&&(x(v,!1),v.strm.avail_out===0)?T:U}(_,H):_.strategy===3?function(v,j){for(var et,q,rt,dt,ut=v.window;;){if(v.lookahead<=D){if(At(v),v.lookahead<=D&&j===f)return T;if(v.lookahead===0)break}if(v.match_length=0,v.lookahead>=L&&0v.lookahead&&(v.match_length=v.lookahead)}if(v.match_length>=L?(et=o._tr_tally(v,1,v.match_length-L),v.lookahead-=v.match_length,v.strstart+=v.match_length,v.match_length=0):(et=o._tr_tally(v,0,v.window[v.strstart]),v.lookahead--,v.strstart++),et&&(x(v,!1),v.strm.avail_out===0))return T}return v.insert=0,j===I?(x(v,!0),v.strm.avail_out===0?Z:G):v.last_lit&&(x(v,!1),v.strm.avail_out===0)?T:U}(_,H):n[_.level].func(_,H);if($!==Z&&$!==G||(_.status=666),$===T||$===Z)return m.avail_out===0&&(_.last_flush=-1),h;if($===U&&(H===1?o._tr_align(_):H!==5&&(o._tr_stored_block(_,0,0,!1),H===3&&(st(_.head),_.lookahead===0&&(_.strstart=0,_.block_start=0,_.insert=0))),B(m),m.avail_out===0))return _.last_flush=-1,h}return H!==I?h:_.wrap<=0?1:(_.wrap===2?(nt(_,255&m.adler),nt(_,m.adler>>8&255),nt(_,m.adler>>16&255),nt(_,m.adler>>24&255),nt(_,255&m.total_in),nt(_,m.total_in>>8&255),nt(_,m.total_in>>16&255),nt(_,m.total_in>>24&255)):(J(_,m.adler>>>16),J(_,65535&m.adler)),B(m),0<_.wrap&&(_.wrap=-_.wrap),_.pending!==0?h:1)},s.deflateEnd=function(m){var H;return m&&m.state?(H=m.state.status)!==O&&H!==69&&H!==73&&H!==91&&H!==103&&H!==M&&H!==666?K(m,d):(m.state=null,H===M?K(m,-3):h):d},s.deflateSetDictionary=function(m,H){var Y,_,P,b,X,$,v,j,et=H.length;if(!m||!m.state||(b=(Y=m.state).wrap)===2||b===1&&Y.status!==O||Y.lookahead)return d;for(b===1&&(m.adler=a(m.adler,H,et,0)),Y.wrap=0,et>=Y.w_size&&(b===0&&(st(Y.head),Y.strstart=0,Y.block_start=0,Y.insert=0),j=new r.Buf8(Y.w_size),r.arraySet(j,H,et-Y.w_size,Y.w_size,0),H=j,et=Y.w_size),X=m.avail_in,$=m.next_in,v=m.input,m.avail_in=et,m.next_in=0,m.input=H,At(Y);Y.lookahead>=L;){for(_=Y.strstart,P=Y.lookahead-(L-1);Y.ins_h=(Y.ins_h<>>=L=w>>>24,F-=L,(L=w>>>16&255)===0)U[u++]=65535&w;else{if(!(16&L)){if(!(64&L)){w=R[(65535&w)+(A&(1<>>=L,F-=L),F<15&&(A+=T[a++]<>>=L=w>>>24,F-=L,!(16&(L=w>>>16&255))){if(!(64&L)){w=g[(65535&w)+(A&(1<>>=L,F-=L,(L=u-f)>3,A&=(1<<(F-=D<<3))-1,n.next_in=a,n.next_out=u,n.avail_in=a>>24&255)+(O>>>8&65280)+((65280&O)<<8)+((255&O)<<24)}function A(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function F(O){var M;return O&&O.state?(M=O.state,O.total_in=O.total_out=M.total=0,O.msg="",M.wrap&&(O.adler=1&M.wrap),M.mode=d,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new n.Buf32(E),M.distcode=M.distdyn=new n.Buf32(C),M.sane=1,M.back=-1,I):h}function R(O){var M;return O&&O.state?((M=O.state).wsize=0,M.whave=0,M.wnext=0,F(O)):h}function g(O,M){var T,U;return O&&O.state?(U=O.state,M<0?(T=0,M=-M):(T=1+(M>>4),M<48&&(M&=15)),M&&(M<8||15=G.wsize?(n.arraySet(G.window,M,T-G.wsize,G.wsize,0),G.wnext=0,G.whave=G.wsize):(U<(Z=G.wsize-G.wnext)&&(Z=U),n.arraySet(G.window,M,T-U,Z,G.wnext),(U-=Z)?(n.arraySet(G.window,M,T-U,U,0),G.wnext=U,G.whave=G.wsize):(G.wnext+=Z,G.wnext===G.wsize&&(G.wnext=0),G.whave>>8&255,T.check=o(T.check,b,2,0),x=B=0,T.mode=2;break}if(T.flags=0,T.head&&(T.head.done=!1),!(1&T.wrap)||(((255&B)<<8)+(B>>8))%31){O.msg="incorrect header check",T.mode=30;break}if((15&B)!=8){O.msg="unknown compression method",T.mode=30;break}if(x-=4,m=8+(15&(B>>>=4)),T.wbits===0)T.wbits=m;else if(m>T.wbits){O.msg="invalid window size",T.mode=30;break}T.dmax=1<>8&1),512&T.flags&&(b[0]=255&B,b[1]=B>>>8&255,T.check=o(T.check,b,2,0)),x=B=0,T.mode=3;case 3:for(;x<32;){if(z===0)break t;z--,B+=U[G++]<>>8&255,b[2]=B>>>16&255,b[3]=B>>>24&255,T.check=o(T.check,b,4,0)),x=B=0,T.mode=4;case 4:for(;x<16;){if(z===0)break t;z--,B+=U[G++]<>8),512&T.flags&&(b[0]=255&B,b[1]=B>>>8&255,T.check=o(T.check,b,2,0)),x=B=0,T.mode=5;case 5:if(1024&T.flags){for(;x<16;){if(z===0)break t;z--,B+=U[G++]<>>8&255,T.check=o(T.check,b,2,0)),x=B=0}else T.head&&(T.head.extra=null);T.mode=6;case 6:if(1024&T.flags&&(z<(Q=T.length)&&(Q=z),Q&&(T.head&&(m=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),n.arraySet(T.head.extra,U,G,Q,m)),512&T.flags&&(T.check=o(T.check,U,Q,G)),z-=Q,G+=Q,T.length-=Q),T.length))break t;T.length=0,T.mode=7;case 7:if(2048&T.flags){if(z===0)break t;for(Q=0;m=U[G+Q++],T.head&&m&&T.length<65536&&(T.head.name+=String.fromCharCode(m)),m&&Q>9&1,T.head.done=!0),O.adler=T.check=0,T.mode=12;break;case 10:for(;x<32;){if(z===0)break t;z--,B+=U[G++]<>>=7&x,x-=7&x,T.mode=27;break}for(;x<3;){if(z===0)break t;z--,B+=U[G++]<>>=1)){case 0:T.mode=14;break;case 1:if(D(T),T.mode=20,M!==6)break;B>>>=2,x-=2;break t;case 2:T.mode=17;break;case 3:O.msg="invalid block type",T.mode=30}B>>>=2,x-=2;break;case 14:for(B>>>=7&x,x-=7&x;x<32;){if(z===0)break t;z--,B+=U[G++]<>>16^65535)){O.msg="invalid stored block lengths",T.mode=30;break}if(T.length=65535&B,x=B=0,T.mode=15,M===6)break t;case 15:T.mode=16;case 16:if(Q=T.length){if(z>>=5,x-=5,T.ndist=1+(31&B),B>>>=5,x-=5,T.ncode=4+(15&B),B>>>=4,x-=4,286>>=3,x-=3}for(;T.have<19;)T.lens[X[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,Y={bits:T.lenbits},H=l(0,T.lens,0,19,T.lencode,0,T.work,Y),T.lenbits=Y.bits,H){O.msg="invalid code lengths set",T.mode=30;break}T.have=0,T.mode=19;case 19:for(;T.have>>16&255,Pt=65535&P,!((lt=P>>>24)<=x);){if(z===0)break t;z--,B+=U[G++]<>>=lt,x-=lt,T.lens[T.have++]=Pt;else{if(Pt===16){for(_=lt+2;x<_;){if(z===0)break t;z--,B+=U[G++]<>>=lt,x-=lt,T.have===0){O.msg="invalid bit length repeat",T.mode=30;break}m=T.lens[T.have-1],Q=3+(3&B),B>>>=2,x-=2}else if(Pt===17){for(_=lt+3;x<_;){if(z===0)break t;z--,B+=U[G++]<>>=lt)),B>>>=3,x-=3}else{for(_=lt+7;x<_;){if(z===0)break t;z--,B+=U[G++]<>>=lt)),B>>>=7,x-=7}if(T.have+Q>T.nlen+T.ndist){O.msg="invalid bit length repeat",T.mode=30;break}for(;Q--;)T.lens[T.have++]=m}}if(T.mode===30)break;if(T.lens[256]===0){O.msg="invalid code -- missing end-of-block",T.mode=30;break}if(T.lenbits=9,Y={bits:T.lenbits},H=l(u,T.lens,0,T.nlen,T.lencode,0,T.work,Y),T.lenbits=Y.bits,H){O.msg="invalid literal/lengths set",T.mode=30;break}if(T.distbits=6,T.distcode=T.distdyn,Y={bits:T.distbits},H=l(f,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,Y),T.distbits=Y.bits,H){O.msg="invalid distances set",T.mode=30;break}if(T.mode=20,M===6)break t;case 20:T.mode=21;case 21:if(6<=z&&258<=st){O.next_out=K,O.avail_out=st,O.next_in=G,O.avail_in=z,T.hold=B,T.bits=x,a(O,J),K=O.next_out,Z=O.output,st=O.avail_out,G=O.next_in,U=O.input,z=O.avail_in,B=T.hold,x=T.bits,T.mode===12&&(T.back=-1);break}for(T.back=0;ht=(P=T.lencode[B&(1<>>16&255,Pt=65535&P,!((lt=P>>>24)<=x);){if(z===0)break t;z--,B+=U[G++]<>Ft)])>>>16&255,Pt=65535&P,!(Ft+(lt=P>>>24)<=x);){if(z===0)break t;z--,B+=U[G++]<>>=Ft,x-=Ft,T.back+=Ft}if(B>>>=lt,x-=lt,T.back+=lt,T.length=Pt,ht===0){T.mode=26;break}if(32&ht){T.back=-1,T.mode=12;break}if(64&ht){O.msg="invalid literal/length code",T.mode=30;break}T.extra=15&ht,T.mode=22;case 22:if(T.extra){for(_=T.extra;x<_;){if(z===0)break t;z--,B+=U[G++]<>>=T.extra,x-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=23;case 23:for(;ht=(P=T.distcode[B&(1<>>16&255,Pt=65535&P,!((lt=P>>>24)<=x);){if(z===0)break t;z--,B+=U[G++]<>Ft)])>>>16&255,Pt=65535&P,!(Ft+(lt=P>>>24)<=x);){if(z===0)break t;z--,B+=U[G++]<>>=Ft,x-=Ft,T.back+=Ft}if(B>>>=lt,x-=lt,T.back+=lt,64&ht){O.msg="invalid distance code",T.mode=30;break}T.offset=Pt,T.extra=15&ht,T.mode=24;case 24:if(T.extra){for(_=T.extra;x<_;){if(z===0)break t;z--,B+=U[G++]<>>=T.extra,x-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){O.msg="invalid distance too far back",T.mode=30;break}T.mode=25;case 25:if(st===0)break t;if(Q=J-st,T.offset>Q){if((Q=T.offset-Q)>T.whave&&T.sane){O.msg="invalid distance too far back",T.mode=30;break}At=Q>T.wnext?(Q-=T.wnext,T.wsize-Q):T.wnext-Q,Q>T.length&&(Q=T.length),wt=T.window}else wt=Z,At=K-T.offset,Q=T.length;for(sty?(L=At[wt+C[M]],x[nt+C[M]]):(L=96,0),A=1<>K)+(F-=A)]=w<<24|L<<16|D|0,F!==0;);for(A=1<>=1;if(A!==0?(B&=A-1,B+=A):B=0,M++,--J[O]==0){if(O===U)break;O=f[I+C[M]]}if(Z>>7)]}function nt(P,b){P.pending_buf[P.pending++]=255&b,P.pending_buf[P.pending++]=b>>>8&255}function J(P,b,X){P.bi_valid>p-X?(P.bi_buf|=b<>p-P.bi_valid,P.bi_valid+=X-p):(P.bi_buf|=b<>>=1,X<<=1,0<--b;);return X>>>1}function wt(P,b,X){var $,v,j=new Array(C+1),et=0;for($=1;$<=C;$++)j[$]=et=et+X[$-1]<<1;for(v=0;v<=b;v++){var q=P[2*v+1];q!==0&&(P[2*v]=At(j[q]++,q))}}function lt(P){var b;for(b=0;b>1;1<=X;X--)Ft(P,j,X);for(v=rt;X=P.heap[1],P.heap[1]=P.heap[P.heap_len--],Ft(P,j,1),$=P.heap[1],P.heap[--P.heap_max]=X,P.heap[--P.heap_max]=$,j[2*v]=j[2*X]+j[2*$],P.depth[v]=(P.depth[X]>=P.depth[$]?P.depth[X]:P.depth[$])+1,j[2*X+1]=j[2*$+1]=v,P.heap[1]=v++,Ft(P,j,1),2<=P.heap_len;);P.heap[--P.heap_max]=P.heap[1],function(ut,zt){var oi,re,ai,gt,Vi,Zs,he=zt.dyn_tree,nr=zt.max_code,Oo=zt.stat_desc.static_tree,No=zt.stat_desc.has_stree,yo=zt.stat_desc.extra_bits,rr=zt.stat_desc.extra_base,ci=zt.stat_desc.max_length,Gi=0;for(gt=0;gt<=C;gt++)ut.bl_count[gt]=0;for(he[2*ut.heap[ut.heap_max]+1]=0,oi=ut.heap_max+1;oi>=7;v>>=1)if(1&dt&&q.dyn_ltree[2*rt]!==0)return r;if(q.dyn_ltree[18]!==0||q.dyn_ltree[20]!==0||q.dyn_ltree[26]!==0)return o;for(rt=32;rt>>3,(j=P.static_len+3+7>>>3)<=v&&(v=j)):v=j=X+5,X+4<=v&&b!==-1?_(P,b,X,$):P.strategy===4||j===v?(J(P,2+($?1:0),3),ne(P,V,O)):(J(P,4+($?1:0),3),function(q,rt,dt,ut){var zt;for(J(q,rt-257,5),J(q,dt-1,5),J(q,ut-4,4),zt=0;zt>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&b,P.pending_buf[P.l_buf+P.last_lit]=255&X,P.last_lit++,b===0?P.dyn_ltree[2*X]++:(P.matches++,b--,P.dyn_ltree[2*(T[X]+f+1)]++,P.dyn_dtree[2*x(b)]++),P.last_lit===P.lit_bufsize-1},s._tr_align=function(P){J(P,2,3),Q(P,F,V),function(b){b.bi_valid===16?(nt(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}(P)}},{"../utils/common":41}],53:[function(t,e,s){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,s){(function(n){(function(r,o){if(!r.setImmediate){var a,l,u,f,I=1,h={},d=!1,E=r.document,C=Object.getPrototypeOf&&Object.getPrototypeOf(r);C=C&&C.setTimeout?C:r,a={}.toString.call(r.process)==="[object process]"?function(R){process.nextTick(function(){A(R)})}:function(){if(r.postMessage&&!r.importScripts){var R=!0,g=r.onmessage;return r.onmessage=function(){R=!1},r.postMessage("","*"),r.onmessage=g,R}}()?(f="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",F,!1):r.attachEvent("onmessage",F),function(R){r.postMessage(f+R,"*")}):r.MessageChannel?((u=new MessageChannel).port1.onmessage=function(R){A(R.data)},function(R){u.port2.postMessage(R)}):E&&"onreadystatechange"in E.createElement("script")?(l=E.documentElement,function(R){var g=E.createElement("script");g.onreadystatechange=function(){A(R),g.onreadystatechange=null,l.removeChild(g),g=null},l.appendChild(g)}):function(R){setTimeout(A,0,R)},C.setImmediate=function(R){typeof R!="function"&&(R=new Function(""+R));for(var g=new Array(arguments.length-1),N=0;N"u"?n===void 0?this:n:self)}).call(this,typeof zi<"u"?zi:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(po);var Jc=po.exports;const $r=aa(Jc);var er={},Xs={};(function(c){const i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",e="["+i+"]["+t+"]*",s=new RegExp("^"+e+"$"),n=function(o,a){const l=[];let u=a.exec(o);for(;u;){const f=[];f.startIndex=a.lastIndex-u[0].length;const I=u.length;for(let h=0;h"u")};c.isExist=function(o){return typeof o<"u"},c.isEmptyObject=function(o){return Object.keys(o).length===0},c.merge=function(o,a,l){if(a){const u=Object.keys(a),f=u.length;for(let I=0;I"&&c[n]!==" "&&c[n]!==" "&&c[n]!==` -`&&c[n]!=="\r";n++)a+=c[n];if(a=a.trim(),a[a.length-1]==="/"&&(a=a.substring(0,a.length-1),n--),!cl(a)){let f;return a.trim().length===0?f="Invalid space after '<'.":f="Tag '"+a+"' is an invalid name.",Ot("InvalidTag",f,xt(c,n))}const l=sl(c,n);if(l===!1)return Ot("InvalidAttr","Attributes for '"+a+"' have open quote.",xt(c,n));let u=l.value;if(n=l.index,u[u.length-1]==="/"){const f=n-u.length;u=u.substring(0,u.length-1);const I=Qr(u,i);if(I===!0)e=!0;else return Ot(I.err.code,I.err.msg,xt(c,f+I.err.line))}else if(o)if(l.tagClosed){if(u.trim().length>0)return Ot("InvalidTag","Closing tag '"+a+"' can't have attributes or invalid starting.",xt(c,r));if(t.length===0)return Ot("InvalidTag","Closing tag '"+a+"' has not been opened.",xt(c,r));{const f=t.pop();if(a!==f.tagName){let I=xt(c,f.tagStartPos);return Ot("InvalidTag","Expected closing tag '"+f.tagName+"' (opened in line "+I.line+", col "+I.col+") instead of closing tag '"+a+"'.",xt(c,r))}t.length==0&&(s=!0)}}else return Ot("InvalidTag","Closing tag '"+a+"' doesn't have proper closing.",xt(c,n));else{const f=Qr(u,i);if(f!==!0)return Ot(f.err.code,f.err.msg,xt(c,n-u.length+f.err.line));if(s===!0)return Ot("InvalidXml","Multiple possible root nodes found.",xt(c,n));i.unpairedTags.indexOf(a)!==-1||t.push({tagName:a,tagStartPos:r}),e=!0}for(n++;n0)return Ot("InvalidXml","Invalid '"+JSON.stringify(t.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Ot("InvalidXml","Start tag expected.",1);return!0};function Zr(c){return c===" "||c===" "||c===` -`||c==="\r"}function jr(c,i){const t=i;for(;i5&&e==="xml")return Ot("InvalidXml","XML declaration allowed only at the start of the document.",xt(c,i));if(c[i]=="?"&&c[i+1]==">"){i++;break}else continue}return i}function qr(c,i){if(c.length>i+5&&c[i+1]==="-"&&c[i+2]==="-"){for(i+=3;i"){i+=2;break}}else if(c.length>i+8&&c[i+1]==="D"&&c[i+2]==="O"&&c[i+3]==="C"&&c[i+4]==="T"&&c[i+5]==="Y"&&c[i+6]==="P"&&c[i+7]==="E"){let t=1;for(i+=8;i"&&(t--,t===0))break}else if(c.length>i+9&&c[i+1]==="["&&c[i+2]==="C"&&c[i+3]==="D"&&c[i+4]==="A"&&c[i+5]==="T"&&c[i+6]==="A"&&c[i+7]==="["){for(i+=8;i"){i+=2;break}}return i}const el='"',il="'";function sl(c,i){let t="",e="",s=!1;for(;i"&&e===""){s=!0;break}t+=c[i]}return e!==""?!1:{value:t,index:i,tagClosed:s}}const nl=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Qr(c,i){const t=ir.getAllMatches(c,nl),e={};for(let s=0;s!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(c,i,t){return c}},ll=function(c){return Object.assign({},Co,c)};sr.buildOptions=ll;sr.defaultOptions=Co;class ul{constructor(i){this.tagname=i,this.child=[],this[":@"]={}}add(i,t){i==="__proto__"&&(i="#__proto__"),this.child.push({[i]:t})}addChild(i){i.tagname==="__proto__"&&(i.tagname="#__proto__"),i[":@"]&&Object.keys(i[":@"]).length>0?this.child.push({[i.tagname]:i.child,":@":i[":@"]}):this.child.push({[i.tagname]:i.child})}}var fl=ul;const hl=Xs;function Il(c,i){const t={};if(c[i+3]==="O"&&c[i+4]==="C"&&c[i+5]==="T"&&c[i+6]==="Y"&&c[i+7]==="P"&&c[i+8]==="E"){i=i+9;let e=1,s=!1,n=!1,r="";for(;i"){if(n?c[i-1]==="-"&&c[i-2]==="-"&&(n=!1,e--):e--,e===0)break}else c[i]==="["?s=!0:r+=c[i];if(e!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:t,i}}function El(c,i){let t="";for(;i0&&s&&t[2]!==".")return c;if(!i.leadingZeros&&n.length>0&&!s&&t[1]!==".")return c;{const a=Number(t),l=""+a;return l.search(/[eE]/)!==-1||o?i.eNotation?a:c:t.indexOf(".")!==-1?l==="0"&&r===""||l===r||s&&l==="-"+r?a:c:n?r===l||s+r===l?a:c:t===l||t===s+l?a:c}}else return c}}function Nl(c){return c&&c.indexOf(".")!==-1&&(c=c.replace(/0+$/,""),c==="."?c="0":c[0]==="."?c="0"+c:c[c.length-1]==="."&&(c=c.substr(0,c.length-1))),c}var yl=Ol;const To=Xs,Si=fl,Pl=Al,Ll=yl;let _l=class{constructor(i){this.options=i,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=Ml,this.parseXml=vl,this.parseTextData=wl,this.resolveNameSpace=Dl,this.buildAttributesMap=bl,this.isItStopNode=Vl,this.replaceEntitiesValue=Bl,this.readStopNodeData=kl,this.saveTextToParentTag=Yl,this.addChild=xl}};function Ml(c){const i=Object.keys(c);for(let t=0;t0)){r||(c=this.replaceEntitiesValue(c));const o=this.options.tagValueProcessor(i,c,t,s,n);return o==null?c:typeof o!=typeof c||o!==c?o:this.options.trimValues?Ln(c,this.options.parseTagValue,this.options.numberParseOptions):c.trim()===c?Ln(c,this.options.parseTagValue,this.options.numberParseOptions):c}}function Dl(c){if(this.options.removeNSPrefix){const i=c.split(":"),t=c.charAt(0)==="/"?"/":"";if(i[0]==="xmlns")return"";i.length===2&&(c=t+i[1])}return c}const Ul=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function bl(c,i,t){if(!this.options.ignoreAttributes&&typeof c=="string"){const e=To.getAllMatches(c,Ul),s=e.length,n={};for(let r=0;r",n,"Closing Tag is not closed.");let a=c.substring(n+2,o).trim();if(this.options.removeNSPrefix){const f=a.indexOf(":");f!==-1&&(a=a.substr(f+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),t&&(e=this.saveTextToParentTag(e,t,s));const l=s.substring(s.lastIndexOf(".")+1);if(a&&this.options.unpairedTags.indexOf(a)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let u=0;l&&this.options.unpairedTags.indexOf(l)!==-1?(u=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=s.lastIndexOf("."),s=s.substring(0,u),t=this.tagsNodeStack.pop(),e="",n=o}else if(c[n+1]==="?"){let o=Pn(c,n,!1,"?>");if(!o)throw new Error("Pi Tag is not closed.");if(e=this.saveTextToParentTag(e,t,s),!(this.options.ignoreDeclaration&&o.tagName==="?xml"||this.options.ignorePiTags)){const a=new Si(o.tagName);a.add(this.options.textNodeName,""),o.tagName!==o.tagExp&&o.attrExpPresent&&(a[":@"]=this.buildAttributesMap(o.tagExp,s,o.tagName)),this.addChild(t,a,s)}n=o.closeIndex+1}else if(c.substr(n+1,3)==="!--"){const o=ve(c,"-->",n+4,"Comment is not closed.");if(this.options.commentPropName){const a=c.substring(n+4,o-2);e=this.saveTextToParentTag(e,t,s),t.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}n=o}else if(c.substr(n+1,2)==="!D"){const o=Pl(c,n);this.docTypeEntities=o.entities,n=o.i}else if(c.substr(n+1,2)==="!["){const o=ve(c,"]]>",n,"CDATA is not closed.")-2,a=c.substring(n+9,o);e=this.saveTextToParentTag(e,t,s);let l=this.parseTextData(a,t.tagname,s,!0,!1,!0,!0);l==null&&(l=""),this.options.cdataPropName?t.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]):t.add(this.options.textNodeName,l),n=o+2}else{let o=Pn(c,n,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let u=o.tagExp,f=o.attrExpPresent,I=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),t&&e&&t.tagname!=="!xml"&&(e=this.saveTextToParentTag(e,t,s,!1));const h=t;if(h&&this.options.unpairedTags.indexOf(h.tagname)!==-1&&(t=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),a!==i.tagname&&(s+=s?"."+a:a),this.isItStopNode(this.options.stopNodes,s,a)){let d="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)a[a.length-1]==="/"?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),n=o.closeIndex;else if(this.options.unpairedTags.indexOf(a)!==-1)n=o.closeIndex;else{const C=this.readStopNodeData(c,l,I+1);if(!C)throw new Error(`Unexpected end of ${l}`);n=C.i,d=C.tagContent}const E=new Si(a);a!==u&&f&&(E[":@"]=this.buildAttributesMap(u,s,a)),d&&(d=this.parseTextData(d,a,s,!0,f,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),E.add(this.options.textNodeName,d),this.addChild(t,E,s)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){a[a.length-1]==="/"?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const d=new Si(a);a!==u&&f&&(d[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(t,d,s),s=s.substr(0,s.lastIndexOf("."))}else{const d=new Si(a);this.tagsNodeStack.push(t),a!==u&&f&&(d[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(t,d,s),t=d}e="",n=I}}else e+=c[n];return i.child};function xl(c,i,t){const e=this.options.updateTag(i.tagname,t,i[":@"]);e===!1||(typeof e=="string"&&(i.tagname=e),c.addChild(i))}const Bl=function(c){if(this.options.processEntities){for(let i in this.docTypeEntities){const t=this.docTypeEntities[i];c=c.replace(t.regx,t.val)}for(let i in this.lastEntities){const t=this.lastEntities[i];c=c.replace(t.regex,t.val)}if(this.options.htmlEntities)for(let i in this.htmlEntities){const t=this.htmlEntities[i];c=c.replace(t.regex,t.val)}c=c.replace(this.ampEntity.regex,this.ampEntity.val)}return c};function Yl(c,i,t,e){return c&&(e===void 0&&(e=Object.keys(i.child).length===0),c=this.parseTextData(c,i.tagname,t,!1,i[":@"]?Object.keys(i[":@"]).length!==0:!1,e),c!==void 0&&c!==""&&i.add(this.options.textNodeName,c),c=""),c}function Vl(c,i,t){const e="*."+t;for(const s in c){const n=c[s];if(e===n||i===n)return!0}return!1}function Gl(c,i,t=">"){let e,s="";for(let n=i;n",t,`${i} is not closed`);if(c.substring(t+2,n).trim()===i&&(s--,s===0))return{tagContent:c.substring(e,t),i:n};t=n}else if(c[t+1]==="?")t=ve(c,"?>",t+1,"StopNode is not closed.");else if(c.substr(t+1,3)==="!--")t=ve(c,"-->",t+3,"StopNode is not closed.");else if(c.substr(t+1,2)==="![")t=ve(c,"]]>",t,"StopNode is not closed.")-2;else{const n=Pn(c,t,">");n&&((n&&n.tagName)===i&&n.tagExp[n.tagExp.length-1]!=="/"&&s++,t=n.closeIndex)}}function Ln(c,i,t){if(i&&typeof c=="string"){const e=c.trim();return e==="true"?!0:e==="false"?!1:Ll(c,t)}else return To.isExist(c)?c:""}var zl=_l,mo={};function Hl(c,i){return Ro(c,i)}function Ro(c,i,t){let e;const s={};for(let n=0;n0&&(s[i.textNodeName]=e):e!==void 0&&(s[i.textNodeName]=e),s}function Wl(c){const i=Object.keys(c);for(let t=0;t0&&(t=tu),Ao(c,i,"",t)}function Ao(c,i,t,e){let s="",n=!1;for(let r=0;r`,n=!1;continue}else if(a===i.commentPropName){s+=e+``,n=!0;continue}else if(a[0]==="?"){const d=Kr(o[":@"],i),E=a==="?xml"?"":e;let C=o[a][0][i.textNodeName];C=C.length!==0?" "+C:"",s+=E+`<${a}${C}${d}?>`,n=!0;continue}let u=e;u!==""&&(u+=i.indentBy);const f=Kr(o[":@"],i),I=e+`<${a}${f}`,h=Ao(o[a],i,l,u);i.unpairedTags.indexOf(a)!==-1?i.suppressUnpairedNode?s+=I+">":s+=I+"/>":(!h||h.length===0)&&i.suppressEmptyNode?s+=I+"/>":h&&h.endsWith(">")?s+=I+`>${h}${e}`:(s+=I+">",h&&e!==""&&(h.includes("/>")||h.includes("`),n=!0}return s}function iu(c){const i=Object.keys(c);for(let t=0;t0&&i.processEntities)for(let t=0;t","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Me(c){this.options=Object.assign({},ou,c),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=lu),this.processTextOrObjNode=au,this.options.format?(this.indentate=cu,this.tagEndChar=`> +*/(function(c,i){(function(t){c.exports=t()})(function(){return function t(e,s,n){function r(l,u){if(!s[l]){if(!e[l]){var f=typeof Is=="function"&&Is;if(!u&&f)return f(l,!0);if(o)return o(l,!0);var I=new Error("Cannot find module '"+l+"'");throw I.code="MODULE_NOT_FOUND",I}var h=s[l]={exports:{}};e[l][0].call(h.exports,function(d){var E=e[l][1][d];return r(E||d)},h,h.exports,t,e,s,n)}return s[l].exports}for(var o=typeof Is=="function"&&Is,a=0;a>2,h=(3&l)<<4|u>>4,d=1>6:64,E=2>4,u=(15&I)<<4|(h=o.indexOf(a.charAt(E++)))>>2,f=(3&h)<<6|(d=o.indexOf(a.charAt(E++))),A[C++]=l,h!==64&&(A[C++]=u),d!==64&&(A[C++]=f);return A}},{"./support":30,"./utils":32}],2:[function(t,e,s){var n=t("./external"),r=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function l(u,f,I,h,d){this.compressedSize=u,this.uncompressedSize=f,this.crc32=I,this.compression=h,this.compressedContent=d}l.prototype={getContentWorker:function(){var u=new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),f=this;return u.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(u,f,I){return u.pipe(new o).pipe(new a("uncompressedSize")).pipe(f.compressWorker(I)).pipe(new a("compressedSize")).withStreamInfo("compression",f)},e.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,s){var n=t("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},s.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,s){var n=t("./utils"),r=function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var u=0;u<8;u++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a}();e.exports=function(o,a){return o!==void 0&&o.length?n.getTypeOf(o)!=="string"?function(l,u,f,I){var h=r,d=I+f;l^=-1;for(var E=I;E>>8^h[255&(l^u[E])];return-1^l}(0|a,o,o.length,0):function(l,u,f,I){var h=r,d=I+f;l^=-1;for(var E=I;E>>8^h[255&(l^u.charCodeAt(E))];return-1^l}(0|a,o,o.length,0):0}},{"./utils":32}],5:[function(t,e,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(t,e,s){var n=null;n=typeof Promise<"u"?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,s){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",r=t("pako"),o=t("./utils"),a=t("./stream/GenericWorker"),l=n?"uint8array":"array";function u(f,I){a.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=I,this.meta={}}s.magic="\b\0",o.inherits(u,a),u.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(l,f.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(I){f.push({data:I,meta:f.meta})}},s.compressWorker=function(f){return new u("Deflate",f)},s.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,s){function n(h,d){var E,C="";for(E=0;E>>=8;return C}function r(h,d,E,C,p,A){var F,R,g=h.file,N=h.compression,y=A!==l.utf8encode,w=o.transformTo("string",A(g.name)),L=o.transformTo("string",l.utf8encode(g.name)),D=g.comment,V=o.transformTo("string",A(D)),O=o.transformTo("string",l.utf8encode(D)),M=L.length!==g.name.length,T=O.length!==D.length,U="",Z="",G="",K=g.dir,z=g.date,st={crc32:0,compressedSize:0,uncompressedSize:0};d&&!E||(st.crc32=h.crc32,st.compressedSize=h.compressedSize,st.uncompressedSize=h.uncompressedSize);var B=0;d&&(B|=8),y||!M&&!T||(B|=2048);var x=0,nt=0;K&&(x|=16),p==="UNIX"?(nt=798,x|=function(Q,At){var wt=Q;return Q||(wt=At?16893:33204),(65535&wt)<<16}(g.unixPermissions,K)):(nt=20,x|=function(Q){return 63&(Q||0)}(g.dosPermissions)),F=z.getUTCHours(),F<<=6,F|=z.getUTCMinutes(),F<<=5,F|=z.getUTCSeconds()/2,R=z.getUTCFullYear()-1980,R<<=4,R|=z.getUTCMonth()+1,R<<=5,R|=z.getUTCDate(),M&&(Z=n(1,1)+n(u(w),4)+L,U+="up"+n(Z.length,2)+Z),T&&(G=n(1,1)+n(u(V),4)+O,U+="uc"+n(G.length,2)+G);var J="";return J+=` +\0`,J+=n(B,2),J+=N.magic,J+=n(F,2),J+=n(R,2),J+=n(st.crc32,4),J+=n(st.compressedSize,4),J+=n(st.uncompressedSize,4),J+=n(w.length,2),J+=n(U.length,2),{fileRecord:f.LOCAL_FILE_HEADER+J+w+U,dirRecord:f.CENTRAL_FILE_HEADER+n(nt,2)+J+n(V.length,2)+"\0\0\0\0"+n(x,4)+n(C,4)+w+U+V}}var o=t("../utils"),a=t("../stream/GenericWorker"),l=t("../utf8"),u=t("../crc32"),f=t("../signature");function I(h,d,E,C){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=d,this.zipPlatform=E,this.encodeFileName=C,this.streamFiles=h,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(I,a),I.prototype.push=function(h){var d=h.meta.percent||0,E=this.entriesCount,C=this._sources.length;this.accumulate?this.contentBuffer.push(h):(this.bytesWritten+=h.data.length,a.prototype.push.call(this,{data:h.data,meta:{currentFile:this.currentFile,percent:E?(d+100*(E-C-1))/E:100}}))},I.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var d=this.streamFiles&&!h.file.dir;if(d){var E=r(h,d,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},I.prototype.closedSource=function(h){this.accumulate=!1;var d=this.streamFiles&&!h.file.dir,E=r(h,d,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),d)this.push({data:function(C){return f.DATA_DESCRIPTOR+n(C.crc32,4)+n(C.compressedSize,4)+n(C.uncompressedSize,4)}(h),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},I.prototype.flush=function(){for(var h=this.bytesWritten,d=0;d=this.index;a--)l=(l<<8)+this.byteAt(a);return this.index+=o,l},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},e.exports=r},{"../utils":32}],19:[function(t,e,s){var n=t("./Uint8ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},e.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,s){var n=t("./DataReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},r.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},r.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},e.exports=r},{"../utils":32,"./DataReader":18}],21:[function(t,e,s){var n=t("./ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var a=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},e.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,s){var n=t("../utils"),r=t("../support"),o=t("./ArrayReader"),a=t("./StringReader"),l=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(f){var I=n.getTypeOf(f);return n.checkSupport(I),I!=="string"||r.uint8array?I==="nodebuffer"?new l(f):r.uint8array?new u(n.transformTo("uint8array",f)):new o(n.transformTo("array",f)):new a(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,e,s){var n=t("./GenericWorker"),r=t("../utils");function o(a){n.call(this,"ConvertWorker to "+a),this.destType=a}r.inherits(o,n),o.prototype.processChunk=function(a){this.push({data:r.transformTo(this.destType,a.data),meta:a.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,s){var n=t("./GenericWorker"),r=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(a){this.streamInfo.crc32=r(a.data,this.streamInfo.crc32||0),this.push(a)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,s){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}n.inherits(o,r),o.prototype.processChunk=function(a){if(a){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+a.data.length}r.prototype.processChunk.call(this,a)},e.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,s){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataWorker");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(u){l.dataIsReady=!0,l.data=u,l.max=u&&u.length||0,l.type=n.getTypeOf(u),l.isPaused||l._tickAndRepeat()},function(u){l.error(u)})}n.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=null,l=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":a=this.data.substring(this.index,l);break;case"uint8array":a=this.data.subarray(this.index,l);break;case"array":case"nodebuffer":a=this.data.slice(this.index,l)}return this.index=l,this.push({data:a,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,s){function n(r){this.name=r||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(r){this.emit("data",r)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(r){this.emit("error",r)}return!0},error:function(r){return!this.isFinished&&(this.isPaused?this.generatedError=r:(this.isFinished=!0,this.emit("error",r),this.previous&&this.previous.error(r),this.cleanUp()),!0)},on:function(r,o){return this._listeners[r].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(r,o){if(this._listeners[r])for(var a=0;a "+r:r}},e.exports=n},{}],29:[function(t,e,s){var n=t("../utils"),r=t("./ConvertWorker"),o=t("./GenericWorker"),a=t("../base64"),l=t("../support"),u=t("../external"),f=null;if(l.nodestream)try{f=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function I(d,E){return new u.Promise(function(C,p){var A=[],F=d._internalType,R=d._outputType,g=d._mimeType;d.on("data",function(N,y){A.push(N),E&&E(y)}).on("error",function(N){A=[],p(N)}).on("end",function(){try{var N=function(y,w,L){switch(y){case"blob":return n.newBlob(n.transformTo("arraybuffer",w),L);case"base64":return a.encode(w);default:return n.transformTo(y,w)}}(R,function(y,w){var L,D=0,V=null,O=0;for(L=0;L"u")s.blob=!1;else{var n=new ArrayBuffer(0);try{s.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),s.blob=r.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!t("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,s){for(var n=t("./utils"),r=t("./support"),o=t("./nodejsUtils"),a=t("./stream/GenericWorker"),l=new Array(256),u=0;u<256;u++)l[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;l[254]=l[254]=1;function f(){a.call(this,"utf-8 decode"),this.leftOver=null}function I(){a.call(this,"utf-8 encode")}s.utf8encode=function(h){return r.nodebuffer?o.newBufferFrom(h,"utf-8"):function(d){var E,C,p,A,F,R=d.length,g=0;for(A=0;A>>6:(C<65536?E[F++]=224|C>>>12:(E[F++]=240|C>>>18,E[F++]=128|C>>>12&63),E[F++]=128|C>>>6&63),E[F++]=128|63&C);return E}(h)},s.utf8decode=function(h){return r.nodebuffer?n.transformTo("nodebuffer",h).toString("utf-8"):function(d){var E,C,p,A,F=d.length,R=new Array(2*F);for(E=C=0;E>10&1023,R[C++]=56320|1023&p)}return R.length!==C&&(R.subarray?R=R.subarray(0,C):R.length=C),n.applyFromCharCode(R)}(h=n.transformTo(r.uint8array?"uint8array":"array",h))},n.inherits(f,a),f.prototype.processChunk=function(h){var d=n.transformTo(r.uint8array?"uint8array":"array",h.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var E=d;(d=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),d.set(E,this.leftOver.length)}else d=this.leftOver.concat(d);this.leftOver=null}var C=function(A,F){var R;for((F=F||A.length)>A.length&&(F=A.length),R=F-1;0<=R&&(192&A[R])==128;)R--;return R<0||R===0?F:R+l[A[R]]>F?R:F}(d),p=d;C!==d.length&&(r.uint8array?(p=d.subarray(0,C),this.leftOver=d.subarray(C,d.length)):(p=d.slice(0,C),this.leftOver=d.slice(C,d.length))),this.push({data:s.utf8decode(p),meta:h.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,n.inherits(I,a),I.prototype.processChunk=function(h){this.push({data:s.utf8encode(h.data),meta:h.meta})},s.Utf8EncodeWorker=I},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,s){var n=t("./support"),r=t("./base64"),o=t("./nodejsUtils"),a=t("./external");function l(E){return E}function u(E,C){for(var p=0;p>8;this.dir=!!(16&this.externalFileAttributes),h==0&&(this.dosPermissions=63&this.externalFileAttributes),h==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var h=n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=h.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=h.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=h.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=h.readInt(4))}},readExtraFields:function(h){var d,E,C,p=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4>>6:(h<65536?I[C++]=224|h>>>12:(I[C++]=240|h>>>18,I[C++]=128|h>>>12&63),I[C++]=128|h>>>6&63),I[C++]=128|63&h);return I},s.buf2binstring=function(f){return u(f,f.length)},s.binstring2buf=function(f){for(var I=new n.Buf8(f.length),h=0,d=I.length;h>10&1023,A[d++]=56320|1023&E)}return u(A,d)},s.utf8border=function(f,I){var h;for((I=I||f.length)>f.length&&(I=f.length),h=I-1;0<=h&&(192&f[h])==128;)h--;return h<0||h===0?I:h+a[f[h]]>I?h:I}},{"./common":41}],43:[function(t,e,s){e.exports=function(n,r,o,a){for(var l=65535&n|0,u=n>>>16&65535|0,f=0;o!==0;){for(o-=f=2e3>>1:r>>>1;o[a]=r}return o}();e.exports=function(r,o,a,l){var u=n,f=l+a;r^=-1;for(var I=l;I>>8^u[255&(r^o[I])];return-1^r}},{}],46:[function(t,e,s){var n,r=t("../utils/common"),o=t("./trees"),a=t("./adler32"),l=t("./crc32"),u=t("./messages"),f=0,I=4,h=0,d=-2,E=-1,C=4,p=2,A=8,F=9,R=286,g=30,N=19,y=2*R+1,w=15,L=3,D=258,V=D+L+1,O=42,M=113,T=1,U=2,Z=3,G=4;function K(m,W){return m.msg=u[W],W}function z(m){return(m<<1)-(4m.avail_out&&(Y=m.avail_out),Y!==0&&(r.arraySet(m.output,W.pending_buf,W.pending_out,Y,m.next_out),m.next_out+=Y,W.pending_out+=Y,m.total_out+=Y,m.avail_out-=Y,W.pending-=Y,W.pending===0&&(W.pending_out=0))}function x(m,W){o._tr_flush_block(m,0<=m.block_start?m.block_start:-1,m.strstart-m.block_start,W),m.block_start=m.strstart,B(m.strm)}function nt(m,W){m.pending_buf[m.pending++]=W}function J(m,W){m.pending_buf[m.pending++]=W>>>8&255,m.pending_buf[m.pending++]=255&W}function Q(m,W){var Y,_,P=m.max_chain_length,b=m.strstart,X=m.prev_length,$=m.nice_match,v=m.strstart>m.w_size-V?m.strstart-(m.w_size-V):0,j=m.window,et=m.w_mask,q=m.prev,rt=m.strstart+D,dt=j[b+X-1],ut=j[b+X];m.prev_length>=m.good_match&&(P>>=2),$>m.lookahead&&($=m.lookahead);do if(j[(Y=W)+X]===ut&&j[Y+X-1]===dt&&j[Y]===j[b]&&j[++Y]===j[b+1]){b+=2,Y++;do;while(j[++b]===j[++Y]&&j[++b]===j[++Y]&&j[++b]===j[++Y]&&j[++b]===j[++Y]&&j[++b]===j[++Y]&&j[++b]===j[++Y]&&j[++b]===j[++Y]&&j[++b]===j[++Y]&&bv&&--P!=0);return X<=m.lookahead?X:m.lookahead}function At(m){var W,Y,_,P,b,X,$,v,j,et,q=m.w_size;do{if(P=m.window_size-m.lookahead-m.strstart,m.strstart>=q+(q-V)){for(r.arraySet(m.window,m.window,q,q,0),m.match_start-=q,m.strstart-=q,m.block_start-=q,W=Y=m.hash_size;_=m.head[--W],m.head[W]=q<=_?_-q:0,--Y;);for(W=Y=q;_=m.prev[--W],m.prev[W]=q<=_?_-q:0,--Y;);P+=q}if(m.strm.avail_in===0)break;if(X=m.strm,$=m.window,v=m.strstart+m.lookahead,j=P,et=void 0,et=X.avail_in,j=L)for(b=m.strstart-m.insert,m.ins_h=m.window[b],m.ins_h=(m.ins_h<=L&&(m.ins_h=(m.ins_h<=L)if(_=o._tr_tally(m,m.strstart-m.match_start,m.match_length-L),m.lookahead-=m.match_length,m.match_length<=m.max_lazy_match&&m.lookahead>=L){for(m.match_length--;m.strstart++,m.ins_h=(m.ins_h<=L&&(m.ins_h=(m.ins_h<=L&&m.match_length<=m.prev_length){for(P=m.strstart+m.lookahead-L,_=o._tr_tally(m,m.strstart-1-m.prev_match,m.prev_length-L),m.lookahead-=m.prev_length-1,m.prev_length-=2;++m.strstart<=P&&(m.ins_h=(m.ins_h<m.pending_buf_size-5&&(Y=m.pending_buf_size-5);;){if(m.lookahead<=1){if(At(m),m.lookahead===0&&W===f)return T;if(m.lookahead===0)break}m.strstart+=m.lookahead,m.lookahead=0;var _=m.block_start+Y;if((m.strstart===0||m.strstart>=_)&&(m.lookahead=m.strstart-_,m.strstart=_,x(m,!1),m.strm.avail_out===0)||m.strstart-m.block_start>=m.w_size-V&&(x(m,!1),m.strm.avail_out===0))return T}return m.insert=0,W===I?(x(m,!0),m.strm.avail_out===0?Z:G):(m.strstart>m.block_start&&(x(m,!1),m.strm.avail_out),T)}),new ht(4,4,8,4,wt),new ht(4,5,16,8,wt),new ht(4,6,32,32,wt),new ht(4,4,16,16,lt),new ht(8,16,32,32,lt),new ht(8,16,128,128,lt),new ht(8,32,128,256,lt),new ht(32,128,258,1024,lt),new ht(32,258,258,4096,lt)],s.deflateInit=function(m,W){return jt(m,W,A,15,8,0)},s.deflateInit2=jt,s.deflateReset=ne,s.deflateResetKeep=Ft,s.deflateSetHeader=function(m,W){return m&&m.state?m.state.wrap!==2?d:(m.state.gzhead=W,h):d},s.deflate=function(m,W){var Y,_,P,b;if(!m||!m.state||5>8&255),nt(_,_.gzhead.time>>16&255),nt(_,_.gzhead.time>>24&255),nt(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),nt(_,255&_.gzhead.os),_.gzhead.extra&&_.gzhead.extra.length&&(nt(_,255&_.gzhead.extra.length),nt(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(m.adler=l(m.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=69):(nt(_,0),nt(_,0),nt(_,0),nt(_,0),nt(_,0),nt(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),nt(_,3),_.status=M);else{var X=A+(_.w_bits-8<<4)<<8;X|=(2<=_.strategy||_.level<2?0:_.level<6?1:_.level===6?2:3)<<6,_.strstart!==0&&(X|=32),X+=31-X%31,_.status=M,J(_,X),_.strstart!==0&&(J(_,m.adler>>>16),J(_,65535&m.adler)),m.adler=1}if(_.status===69)if(_.gzhead.extra){for(P=_.pending;_.gzindex<(65535&_.gzhead.extra.length)&&(_.pending!==_.pending_buf_size||(_.gzhead.hcrc&&_.pending>P&&(m.adler=l(m.adler,_.pending_buf,_.pending-P,P)),B(m),P=_.pending,_.pending!==_.pending_buf_size));)nt(_,255&_.gzhead.extra[_.gzindex]),_.gzindex++;_.gzhead.hcrc&&_.pending>P&&(m.adler=l(m.adler,_.pending_buf,_.pending-P,P)),_.gzindex===_.gzhead.extra.length&&(_.gzindex=0,_.status=73)}else _.status=73;if(_.status===73)if(_.gzhead.name){P=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>P&&(m.adler=l(m.adler,_.pending_buf,_.pending-P,P)),B(m),P=_.pending,_.pending===_.pending_buf_size)){b=1;break}b=_.gzindex<_.gzhead.name.length?255&_.gzhead.name.charCodeAt(_.gzindex++):0,nt(_,b)}while(b!==0);_.gzhead.hcrc&&_.pending>P&&(m.adler=l(m.adler,_.pending_buf,_.pending-P,P)),b===0&&(_.gzindex=0,_.status=91)}else _.status=91;if(_.status===91)if(_.gzhead.comment){P=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>P&&(m.adler=l(m.adler,_.pending_buf,_.pending-P,P)),B(m),P=_.pending,_.pending===_.pending_buf_size)){b=1;break}b=_.gzindex<_.gzhead.comment.length?255&_.gzhead.comment.charCodeAt(_.gzindex++):0,nt(_,b)}while(b!==0);_.gzhead.hcrc&&_.pending>P&&(m.adler=l(m.adler,_.pending_buf,_.pending-P,P)),b===0&&(_.status=103)}else _.status=103;if(_.status===103&&(_.gzhead.hcrc?(_.pending+2>_.pending_buf_size&&B(m),_.pending+2<=_.pending_buf_size&&(nt(_,255&m.adler),nt(_,m.adler>>8&255),m.adler=0,_.status=M)):_.status=M),_.pending!==0){if(B(m),m.avail_out===0)return _.last_flush=-1,h}else if(m.avail_in===0&&z(W)<=z(Y)&&W!==I)return K(m,-5);if(_.status===666&&m.avail_in!==0)return K(m,-5);if(m.avail_in!==0||_.lookahead!==0||W!==f&&_.status!==666){var $=_.strategy===2?function(v,j){for(var et;;){if(v.lookahead===0&&(At(v),v.lookahead===0)){if(j===f)return T;break}if(v.match_length=0,et=o._tr_tally(v,0,v.window[v.strstart]),v.lookahead--,v.strstart++,et&&(x(v,!1),v.strm.avail_out===0))return T}return v.insert=0,j===I?(x(v,!0),v.strm.avail_out===0?Z:G):v.last_lit&&(x(v,!1),v.strm.avail_out===0)?T:U}(_,W):_.strategy===3?function(v,j){for(var et,q,rt,dt,ut=v.window;;){if(v.lookahead<=D){if(At(v),v.lookahead<=D&&j===f)return T;if(v.lookahead===0)break}if(v.match_length=0,v.lookahead>=L&&0v.lookahead&&(v.match_length=v.lookahead)}if(v.match_length>=L?(et=o._tr_tally(v,1,v.match_length-L),v.lookahead-=v.match_length,v.strstart+=v.match_length,v.match_length=0):(et=o._tr_tally(v,0,v.window[v.strstart]),v.lookahead--,v.strstart++),et&&(x(v,!1),v.strm.avail_out===0))return T}return v.insert=0,j===I?(x(v,!0),v.strm.avail_out===0?Z:G):v.last_lit&&(x(v,!1),v.strm.avail_out===0)?T:U}(_,W):n[_.level].func(_,W);if($!==Z&&$!==G||(_.status=666),$===T||$===Z)return m.avail_out===0&&(_.last_flush=-1),h;if($===U&&(W===1?o._tr_align(_):W!==5&&(o._tr_stored_block(_,0,0,!1),W===3&&(st(_.head),_.lookahead===0&&(_.strstart=0,_.block_start=0,_.insert=0))),B(m),m.avail_out===0))return _.last_flush=-1,h}return W!==I?h:_.wrap<=0?1:(_.wrap===2?(nt(_,255&m.adler),nt(_,m.adler>>8&255),nt(_,m.adler>>16&255),nt(_,m.adler>>24&255),nt(_,255&m.total_in),nt(_,m.total_in>>8&255),nt(_,m.total_in>>16&255),nt(_,m.total_in>>24&255)):(J(_,m.adler>>>16),J(_,65535&m.adler)),B(m),0<_.wrap&&(_.wrap=-_.wrap),_.pending!==0?h:1)},s.deflateEnd=function(m){var W;return m&&m.state?(W=m.state.status)!==O&&W!==69&&W!==73&&W!==91&&W!==103&&W!==M&&W!==666?K(m,d):(m.state=null,W===M?K(m,-3):h):d},s.deflateSetDictionary=function(m,W){var Y,_,P,b,X,$,v,j,et=W.length;if(!m||!m.state||(b=(Y=m.state).wrap)===2||b===1&&Y.status!==O||Y.lookahead)return d;for(b===1&&(m.adler=a(m.adler,W,et,0)),Y.wrap=0,et>=Y.w_size&&(b===0&&(st(Y.head),Y.strstart=0,Y.block_start=0,Y.insert=0),j=new r.Buf8(Y.w_size),r.arraySet(j,W,et-Y.w_size,Y.w_size,0),W=j,et=Y.w_size),X=m.avail_in,$=m.next_in,v=m.input,m.avail_in=et,m.next_in=0,m.input=W,At(Y);Y.lookahead>=L;){for(_=Y.strstart,P=Y.lookahead-(L-1);Y.ins_h=(Y.ins_h<>>=L=w>>>24,F-=L,(L=w>>>16&255)===0)U[u++]=65535&w;else{if(!(16&L)){if(!(64&L)){w=R[(65535&w)+(A&(1<>>=L,F-=L),F<15&&(A+=T[a++]<>>=L=w>>>24,F-=L,!(16&(L=w>>>16&255))){if(!(64&L)){w=g[(65535&w)+(A&(1<>>=L,F-=L,(L=u-f)>3,A&=(1<<(F-=D<<3))-1,n.next_in=a,n.next_out=u,n.avail_in=a>>24&255)+(O>>>8&65280)+((65280&O)<<8)+((255&O)<<24)}function A(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function F(O){var M;return O&&O.state?(M=O.state,O.total_in=O.total_out=M.total=0,O.msg="",M.wrap&&(O.adler=1&M.wrap),M.mode=d,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new n.Buf32(E),M.distcode=M.distdyn=new n.Buf32(C),M.sane=1,M.back=-1,I):h}function R(O){var M;return O&&O.state?((M=O.state).wsize=0,M.whave=0,M.wnext=0,F(O)):h}function g(O,M){var T,U;return O&&O.state?(U=O.state,M<0?(T=0,M=-M):(T=1+(M>>4),M<48&&(M&=15)),M&&(M<8||15=G.wsize?(n.arraySet(G.window,M,T-G.wsize,G.wsize,0),G.wnext=0,G.whave=G.wsize):(U<(Z=G.wsize-G.wnext)&&(Z=U),n.arraySet(G.window,M,T-U,Z,G.wnext),(U-=Z)?(n.arraySet(G.window,M,T-U,U,0),G.wnext=U,G.whave=G.wsize):(G.wnext+=Z,G.wnext===G.wsize&&(G.wnext=0),G.whave>>8&255,T.check=o(T.check,b,2,0),x=B=0,T.mode=2;break}if(T.flags=0,T.head&&(T.head.done=!1),!(1&T.wrap)||(((255&B)<<8)+(B>>8))%31){O.msg="incorrect header check",T.mode=30;break}if((15&B)!=8){O.msg="unknown compression method",T.mode=30;break}if(x-=4,m=8+(15&(B>>>=4)),T.wbits===0)T.wbits=m;else if(m>T.wbits){O.msg="invalid window size",T.mode=30;break}T.dmax=1<>8&1),512&T.flags&&(b[0]=255&B,b[1]=B>>>8&255,T.check=o(T.check,b,2,0)),x=B=0,T.mode=3;case 3:for(;x<32;){if(z===0)break t;z--,B+=U[G++]<>>8&255,b[2]=B>>>16&255,b[3]=B>>>24&255,T.check=o(T.check,b,4,0)),x=B=0,T.mode=4;case 4:for(;x<16;){if(z===0)break t;z--,B+=U[G++]<>8),512&T.flags&&(b[0]=255&B,b[1]=B>>>8&255,T.check=o(T.check,b,2,0)),x=B=0,T.mode=5;case 5:if(1024&T.flags){for(;x<16;){if(z===0)break t;z--,B+=U[G++]<>>8&255,T.check=o(T.check,b,2,0)),x=B=0}else T.head&&(T.head.extra=null);T.mode=6;case 6:if(1024&T.flags&&(z<(Q=T.length)&&(Q=z),Q&&(T.head&&(m=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),n.arraySet(T.head.extra,U,G,Q,m)),512&T.flags&&(T.check=o(T.check,U,Q,G)),z-=Q,G+=Q,T.length-=Q),T.length))break t;T.length=0,T.mode=7;case 7:if(2048&T.flags){if(z===0)break t;for(Q=0;m=U[G+Q++],T.head&&m&&T.length<65536&&(T.head.name+=String.fromCharCode(m)),m&&Q>9&1,T.head.done=!0),O.adler=T.check=0,T.mode=12;break;case 10:for(;x<32;){if(z===0)break t;z--,B+=U[G++]<>>=7&x,x-=7&x,T.mode=27;break}for(;x<3;){if(z===0)break t;z--,B+=U[G++]<>>=1)){case 0:T.mode=14;break;case 1:if(D(T),T.mode=20,M!==6)break;B>>>=2,x-=2;break t;case 2:T.mode=17;break;case 3:O.msg="invalid block type",T.mode=30}B>>>=2,x-=2;break;case 14:for(B>>>=7&x,x-=7&x;x<32;){if(z===0)break t;z--,B+=U[G++]<>>16^65535)){O.msg="invalid stored block lengths",T.mode=30;break}if(T.length=65535&B,x=B=0,T.mode=15,M===6)break t;case 15:T.mode=16;case 16:if(Q=T.length){if(z>>=5,x-=5,T.ndist=1+(31&B),B>>>=5,x-=5,T.ncode=4+(15&B),B>>>=4,x-=4,286>>=3,x-=3}for(;T.have<19;)T.lens[X[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,Y={bits:T.lenbits},W=l(0,T.lens,0,19,T.lencode,0,T.work,Y),T.lenbits=Y.bits,W){O.msg="invalid code lengths set",T.mode=30;break}T.have=0,T.mode=19;case 19:for(;T.have>>16&255,Pt=65535&P,!((lt=P>>>24)<=x);){if(z===0)break t;z--,B+=U[G++]<>>=lt,x-=lt,T.lens[T.have++]=Pt;else{if(Pt===16){for(_=lt+2;x<_;){if(z===0)break t;z--,B+=U[G++]<>>=lt,x-=lt,T.have===0){O.msg="invalid bit length repeat",T.mode=30;break}m=T.lens[T.have-1],Q=3+(3&B),B>>>=2,x-=2}else if(Pt===17){for(_=lt+3;x<_;){if(z===0)break t;z--,B+=U[G++]<>>=lt)),B>>>=3,x-=3}else{for(_=lt+7;x<_;){if(z===0)break t;z--,B+=U[G++]<>>=lt)),B>>>=7,x-=7}if(T.have+Q>T.nlen+T.ndist){O.msg="invalid bit length repeat",T.mode=30;break}for(;Q--;)T.lens[T.have++]=m}}if(T.mode===30)break;if(T.lens[256]===0){O.msg="invalid code -- missing end-of-block",T.mode=30;break}if(T.lenbits=9,Y={bits:T.lenbits},W=l(u,T.lens,0,T.nlen,T.lencode,0,T.work,Y),T.lenbits=Y.bits,W){O.msg="invalid literal/lengths set",T.mode=30;break}if(T.distbits=6,T.distcode=T.distdyn,Y={bits:T.distbits},W=l(f,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,Y),T.distbits=Y.bits,W){O.msg="invalid distances set",T.mode=30;break}if(T.mode=20,M===6)break t;case 20:T.mode=21;case 21:if(6<=z&&258<=st){O.next_out=K,O.avail_out=st,O.next_in=G,O.avail_in=z,T.hold=B,T.bits=x,a(O,J),K=O.next_out,Z=O.output,st=O.avail_out,G=O.next_in,U=O.input,z=O.avail_in,B=T.hold,x=T.bits,T.mode===12&&(T.back=-1);break}for(T.back=0;ht=(P=T.lencode[B&(1<>>16&255,Pt=65535&P,!((lt=P>>>24)<=x);){if(z===0)break t;z--,B+=U[G++]<>Ft)])>>>16&255,Pt=65535&P,!(Ft+(lt=P>>>24)<=x);){if(z===0)break t;z--,B+=U[G++]<>>=Ft,x-=Ft,T.back+=Ft}if(B>>>=lt,x-=lt,T.back+=lt,T.length=Pt,ht===0){T.mode=26;break}if(32&ht){T.back=-1,T.mode=12;break}if(64&ht){O.msg="invalid literal/length code",T.mode=30;break}T.extra=15&ht,T.mode=22;case 22:if(T.extra){for(_=T.extra;x<_;){if(z===0)break t;z--,B+=U[G++]<>>=T.extra,x-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=23;case 23:for(;ht=(P=T.distcode[B&(1<>>16&255,Pt=65535&P,!((lt=P>>>24)<=x);){if(z===0)break t;z--,B+=U[G++]<>Ft)])>>>16&255,Pt=65535&P,!(Ft+(lt=P>>>24)<=x);){if(z===0)break t;z--,B+=U[G++]<>>=Ft,x-=Ft,T.back+=Ft}if(B>>>=lt,x-=lt,T.back+=lt,64&ht){O.msg="invalid distance code",T.mode=30;break}T.offset=Pt,T.extra=15&ht,T.mode=24;case 24:if(T.extra){for(_=T.extra;x<_;){if(z===0)break t;z--,B+=U[G++]<>>=T.extra,x-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){O.msg="invalid distance too far back",T.mode=30;break}T.mode=25;case 25:if(st===0)break t;if(Q=J-st,T.offset>Q){if((Q=T.offset-Q)>T.whave&&T.sane){O.msg="invalid distance too far back",T.mode=30;break}At=Q>T.wnext?(Q-=T.wnext,T.wsize-Q):T.wnext-Q,Q>T.length&&(Q=T.length),wt=T.window}else wt=Z,At=K-T.offset,Q=T.length;for(sty?(L=At[wt+C[M]],x[nt+C[M]]):(L=96,0),A=1<>K)+(F-=A)]=w<<24|L<<16|D|0,F!==0;);for(A=1<>=1;if(A!==0?(B&=A-1,B+=A):B=0,M++,--J[O]==0){if(O===U)break;O=f[I+C[M]]}if(Z>>7)]}function nt(P,b){P.pending_buf[P.pending++]=255&b,P.pending_buf[P.pending++]=b>>>8&255}function J(P,b,X){P.bi_valid>p-X?(P.bi_buf|=b<>p-P.bi_valid,P.bi_valid+=X-p):(P.bi_buf|=b<>>=1,X<<=1,0<--b;);return X>>>1}function wt(P,b,X){var $,v,j=new Array(C+1),et=0;for($=1;$<=C;$++)j[$]=et=et+X[$-1]<<1;for(v=0;v<=b;v++){var q=P[2*v+1];q!==0&&(P[2*v]=At(j[q]++,q))}}function lt(P){var b;for(b=0;b>1;1<=X;X--)Ft(P,j,X);for(v=rt;X=P.heap[1],P.heap[1]=P.heap[P.heap_len--],Ft(P,j,1),$=P.heap[1],P.heap[--P.heap_max]=X,P.heap[--P.heap_max]=$,j[2*v]=j[2*X]+j[2*$],P.depth[v]=(P.depth[X]>=P.depth[$]?P.depth[X]:P.depth[$])+1,j[2*X+1]=j[2*$+1]=v,P.heap[1]=v++,Ft(P,j,1),2<=P.heap_len;);P.heap[--P.heap_max]=P.heap[1],function(ut,zt){var oi,re,ai,gt,Gi,js,he=zt.dyn_tree,or=zt.max_code,No=zt.stat_desc.static_tree,yo=zt.stat_desc.has_stree,Po=zt.stat_desc.extra_bits,ar=zt.stat_desc.extra_base,ci=zt.stat_desc.max_length,ki=0;for(gt=0;gt<=C;gt++)ut.bl_count[gt]=0;for(he[2*ut.heap[ut.heap_max]+1]=0,oi=ut.heap_max+1;oi>=7;v>>=1)if(1&dt&&q.dyn_ltree[2*rt]!==0)return r;if(q.dyn_ltree[18]!==0||q.dyn_ltree[20]!==0||q.dyn_ltree[26]!==0)return o;for(rt=32;rt>>3,(j=P.static_len+3+7>>>3)<=v&&(v=j)):v=j=X+5,X+4<=v&&b!==-1?_(P,b,X,$):P.strategy===4||j===v?(J(P,2+($?1:0),3),ne(P,V,O)):(J(P,4+($?1:0),3),function(q,rt,dt,ut){var zt;for(J(q,rt-257,5),J(q,dt-1,5),J(q,ut-4,4),zt=0;zt>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&b,P.pending_buf[P.l_buf+P.last_lit]=255&X,P.last_lit++,b===0?P.dyn_ltree[2*X]++:(P.matches++,b--,P.dyn_ltree[2*(T[X]+f+1)]++,P.dyn_dtree[2*x(b)]++),P.last_lit===P.lit_bufsize-1},s._tr_align=function(P){J(P,2,3),Q(P,F,V),function(b){b.bi_valid===16?(nt(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}(P)}},{"../utils/common":41}],53:[function(t,e,s){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,s){(function(n){(function(r,o){if(!r.setImmediate){var a,l,u,f,I=1,h={},d=!1,E=r.document,C=Object.getPrototypeOf&&Object.getPrototypeOf(r);C=C&&C.setTimeout?C:r,a={}.toString.call(r.process)==="[object process]"?function(R){process.nextTick(function(){A(R)})}:function(){if(r.postMessage&&!r.importScripts){var R=!0,g=r.onmessage;return r.onmessage=function(){R=!1},r.postMessage("","*"),r.onmessage=g,R}}()?(f="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",F,!1):r.attachEvent("onmessage",F),function(R){r.postMessage(f+R,"*")}):r.MessageChannel?((u=new MessageChannel).port1.onmessage=function(R){A(R.data)},function(R){u.port2.postMessage(R)}):E&&"onreadystatechange"in E.createElement("script")?(l=E.documentElement,function(R){var g=E.createElement("script");g.onreadystatechange=function(){A(R),g.onreadystatechange=null,l.removeChild(g),g=null},l.appendChild(g)}):function(R){setTimeout(A,0,R)},C.setImmediate=function(R){typeof R!="function"&&(R=new Function(""+R));for(var g=new Array(arguments.length-1),N=0;N"u"?n===void 0?this:n:self)}).call(this,typeof Hi<"u"?Hi:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Co);var tl=Co.exports;const jr=ca(tl);var sr={},$s={};(function(c){const i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",e="["+i+"]["+t+"]*",s=new RegExp("^"+e+"$"),n=function(o,a){const l=[];let u=a.exec(o);for(;u;){const f=[];f.startIndex=a.lastIndex-u[0].length;const I=u.length;for(let h=0;h"u")};c.isExist=function(o){return typeof o<"u"},c.isEmptyObject=function(o){return Object.keys(o).length===0},c.merge=function(o,a,l){if(a){const u=Object.keys(a),f=u.length;for(let I=0;I"&&c[n]!==" "&&c[n]!==" "&&c[n]!==` +`&&c[n]!=="\r";n++)a+=c[n];if(a=a.trim(),a[a.length-1]==="/"&&(a=a.substring(0,a.length-1),n--),!ll(a)){let f;return a.trim().length===0?f="Invalid space after '<'.":f="Tag '"+a+"' is an invalid name.",Ot("InvalidTag",f,xt(c,n))}const l=nl(c,n);if(l===!1)return Ot("InvalidAttr","Attributes for '"+a+"' have open quote.",xt(c,n));let u=l.value;if(n=l.index,u[u.length-1]==="/"){const f=n-u.length;u=u.substring(0,u.length-1);const I=Jr(u,i);if(I===!0)e=!0;else return Ot(I.err.code,I.err.msg,xt(c,f+I.err.line))}else if(o)if(l.tagClosed){if(u.trim().length>0)return Ot("InvalidTag","Closing tag '"+a+"' can't have attributes or invalid starting.",xt(c,r));if(t.length===0)return Ot("InvalidTag","Closing tag '"+a+"' has not been opened.",xt(c,r));{const f=t.pop();if(a!==f.tagName){let I=xt(c,f.tagStartPos);return Ot("InvalidTag","Expected closing tag '"+f.tagName+"' (opened in line "+I.line+", col "+I.col+") instead of closing tag '"+a+"'.",xt(c,r))}t.length==0&&(s=!0)}}else return Ot("InvalidTag","Closing tag '"+a+"' doesn't have proper closing.",xt(c,n));else{const f=Jr(u,i);if(f!==!0)return Ot(f.err.code,f.err.msg,xt(c,n-u.length+f.err.line));if(s===!0)return Ot("InvalidXml","Multiple possible root nodes found.",xt(c,n));i.unpairedTags.indexOf(a)!==-1||t.push({tagName:a,tagStartPos:r}),e=!0}for(n++;n0)return Ot("InvalidXml","Invalid '"+JSON.stringify(t.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Ot("InvalidXml","Start tag expected.",1);return!0};function qr(c){return c===" "||c===" "||c===` +`||c==="\r"}function Qr(c,i){const t=i;for(;i5&&e==="xml")return Ot("InvalidXml","XML declaration allowed only at the start of the document.",xt(c,i));if(c[i]=="?"&&c[i+1]==">"){i++;break}else continue}return i}function Kr(c,i){if(c.length>i+5&&c[i+1]==="-"&&c[i+2]==="-"){for(i+=3;i"){i+=2;break}}else if(c.length>i+8&&c[i+1]==="D"&&c[i+2]==="O"&&c[i+3]==="C"&&c[i+4]==="T"&&c[i+5]==="Y"&&c[i+6]==="P"&&c[i+7]==="E"){let t=1;for(i+=8;i"&&(t--,t===0))break}else if(c.length>i+9&&c[i+1]==="["&&c[i+2]==="C"&&c[i+3]==="D"&&c[i+4]==="A"&&c[i+5]==="T"&&c[i+6]==="A"&&c[i+7]==="["){for(i+=8;i"){i+=2;break}}return i}const il='"',sl="'";function nl(c,i){let t="",e="",s=!1;for(;i"&&e===""){s=!0;break}t+=c[i]}return e!==""?!1:{value:t,index:i,tagClosed:s}}const rl=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Jr(c,i){const t=nr.getAllMatches(c,rl),e={};for(let s=0;s!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(c,i,t){return c}},ul=function(c){return Object.assign({},To,c)};rr.buildOptions=ul;rr.defaultOptions=To;class fl{constructor(i){this.tagname=i,this.child=[],this[":@"]={}}add(i,t){i==="__proto__"&&(i="#__proto__"),this.child.push({[i]:t})}addChild(i){i.tagname==="__proto__"&&(i.tagname="#__proto__"),i[":@"]&&Object.keys(i[":@"]).length>0?this.child.push({[i.tagname]:i.child,":@":i[":@"]}):this.child.push({[i.tagname]:i.child})}}var hl=fl;const Il=$s;function El(c,i){const t={};if(c[i+3]==="O"&&c[i+4]==="C"&&c[i+5]==="T"&&c[i+6]==="Y"&&c[i+7]==="P"&&c[i+8]==="E"){i=i+9;let e=1,s=!1,n=!1,r="";for(;i"){if(n?c[i-1]==="-"&&c[i-2]==="-"&&(n=!1,e--):e--,e===0)break}else c[i]==="["?s=!0:r+=c[i];if(e!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:t,i}}function dl(c,i){let t="";for(;i0&&s&&t[2]!==".")return c;if(!i.leadingZeros&&n.length>0&&!s&&t[1]!==".")return c;{const a=Number(t),l=""+a;return l.search(/[eE]/)!==-1||o?i.eNotation?a:c:t.indexOf(".")!==-1?l==="0"&&r===""||l===r||s&&l==="-"+r?a:c:n?r===l||s+r===l?a:c:t===l||t===s+l?a:c}}else return c}}function yl(c){return c&&c.indexOf(".")!==-1&&(c=c.replace(/0+$/,""),c==="."?c="0":c[0]==="."?c="0"+c:c[c.length-1]==="."&&(c=c.substr(0,c.length-1))),c}var Pl=Nl;const mo=$s,Si=hl,Ll=Fl,_l=Pl;let Ml=class{constructor(i){this.options=i,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=wl,this.parseXml=xl,this.parseTextData=Dl,this.resolveNameSpace=Ul,this.buildAttributesMap=vl,this.isItStopNode=Gl,this.replaceEntitiesValue=Yl,this.readStopNodeData=zl,this.saveTextToParentTag=Vl,this.addChild=Bl}};function wl(c){const i=Object.keys(c);for(let t=0;t0)){r||(c=this.replaceEntitiesValue(c));const o=this.options.tagValueProcessor(i,c,t,s,n);return o==null?c:typeof o!=typeof c||o!==c?o:this.options.trimValues?Mn(c,this.options.parseTagValue,this.options.numberParseOptions):c.trim()===c?Mn(c,this.options.parseTagValue,this.options.numberParseOptions):c}}function Ul(c){if(this.options.removeNSPrefix){const i=c.split(":"),t=c.charAt(0)==="/"?"/":"";if(i[0]==="xmlns")return"";i.length===2&&(c=t+i[1])}return c}const bl=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function vl(c,i,t){if(!this.options.ignoreAttributes&&typeof c=="string"){const e=mo.getAllMatches(c,bl),s=e.length,n={};for(let r=0;r",n,"Closing Tag is not closed.");let a=c.substring(n+2,o).trim();if(this.options.removeNSPrefix){const f=a.indexOf(":");f!==-1&&(a=a.substr(f+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),t&&(e=this.saveTextToParentTag(e,t,s));const l=s.substring(s.lastIndexOf(".")+1);if(a&&this.options.unpairedTags.indexOf(a)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let u=0;l&&this.options.unpairedTags.indexOf(l)!==-1?(u=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=s.lastIndexOf("."),s=s.substring(0,u),t=this.tagsNodeStack.pop(),e="",n=o}else if(c[n+1]==="?"){let o=_n(c,n,!1,"?>");if(!o)throw new Error("Pi Tag is not closed.");if(e=this.saveTextToParentTag(e,t,s),!(this.options.ignoreDeclaration&&o.tagName==="?xml"||this.options.ignorePiTags)){const a=new Si(o.tagName);a.add(this.options.textNodeName,""),o.tagName!==o.tagExp&&o.attrExpPresent&&(a[":@"]=this.buildAttributesMap(o.tagExp,s,o.tagName)),this.addChild(t,a,s)}n=o.closeIndex+1}else if(c.substr(n+1,3)==="!--"){const o=ve(c,"-->",n+4,"Comment is not closed.");if(this.options.commentPropName){const a=c.substring(n+4,o-2);e=this.saveTextToParentTag(e,t,s),t.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}n=o}else if(c.substr(n+1,2)==="!D"){const o=Ll(c,n);this.docTypeEntities=o.entities,n=o.i}else if(c.substr(n+1,2)==="!["){const o=ve(c,"]]>",n,"CDATA is not closed.")-2,a=c.substring(n+9,o);e=this.saveTextToParentTag(e,t,s);let l=this.parseTextData(a,t.tagname,s,!0,!1,!0,!0);l==null&&(l=""),this.options.cdataPropName?t.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]):t.add(this.options.textNodeName,l),n=o+2}else{let o=_n(c,n,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let u=o.tagExp,f=o.attrExpPresent,I=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),t&&e&&t.tagname!=="!xml"&&(e=this.saveTextToParentTag(e,t,s,!1));const h=t;if(h&&this.options.unpairedTags.indexOf(h.tagname)!==-1&&(t=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),a!==i.tagname&&(s+=s?"."+a:a),this.isItStopNode(this.options.stopNodes,s,a)){let d="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)a[a.length-1]==="/"?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),n=o.closeIndex;else if(this.options.unpairedTags.indexOf(a)!==-1)n=o.closeIndex;else{const C=this.readStopNodeData(c,l,I+1);if(!C)throw new Error(`Unexpected end of ${l}`);n=C.i,d=C.tagContent}const E=new Si(a);a!==u&&f&&(E[":@"]=this.buildAttributesMap(u,s,a)),d&&(d=this.parseTextData(d,a,s,!0,f,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),E.add(this.options.textNodeName,d),this.addChild(t,E,s)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){a[a.length-1]==="/"?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const d=new Si(a);a!==u&&f&&(d[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(t,d,s),s=s.substr(0,s.lastIndexOf("."))}else{const d=new Si(a);this.tagsNodeStack.push(t),a!==u&&f&&(d[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(t,d,s),t=d}e="",n=I}}else e+=c[n];return i.child};function Bl(c,i,t){const e=this.options.updateTag(i.tagname,t,i[":@"]);e===!1||(typeof e=="string"&&(i.tagname=e),c.addChild(i))}const Yl=function(c){if(this.options.processEntities){for(let i in this.docTypeEntities){const t=this.docTypeEntities[i];c=c.replace(t.regx,t.val)}for(let i in this.lastEntities){const t=this.lastEntities[i];c=c.replace(t.regex,t.val)}if(this.options.htmlEntities)for(let i in this.htmlEntities){const t=this.htmlEntities[i];c=c.replace(t.regex,t.val)}c=c.replace(this.ampEntity.regex,this.ampEntity.val)}return c};function Vl(c,i,t,e){return c&&(e===void 0&&(e=Object.keys(i.child).length===0),c=this.parseTextData(c,i.tagname,t,!1,i[":@"]?Object.keys(i[":@"]).length!==0:!1,e),c!==void 0&&c!==""&&i.add(this.options.textNodeName,c),c=""),c}function Gl(c,i,t){const e="*."+t;for(const s in c){const n=c[s];if(e===n||i===n)return!0}return!1}function kl(c,i,t=">"){let e,s="";for(let n=i;n",t,`${i} is not closed`);if(c.substring(t+2,n).trim()===i&&(s--,s===0))return{tagContent:c.substring(e,t),i:n};t=n}else if(c[t+1]==="?")t=ve(c,"?>",t+1,"StopNode is not closed.");else if(c.substr(t+1,3)==="!--")t=ve(c,"-->",t+3,"StopNode is not closed.");else if(c.substr(t+1,2)==="![")t=ve(c,"]]>",t,"StopNode is not closed.")-2;else{const n=_n(c,t,">");n&&((n&&n.tagName)===i&&n.tagExp[n.tagExp.length-1]!=="/"&&s++,t=n.closeIndex)}}function Mn(c,i,t){if(i&&typeof c=="string"){const e=c.trim();return e==="true"?!0:e==="false"?!1:_l(c,t)}else return mo.isExist(c)?c:""}var Hl=Ml,Ro={};function Wl(c,i){return Ao(c,i)}function Ao(c,i,t){let e;const s={};for(let n=0;n0&&(s[i.textNodeName]=e):e!==void 0&&(s[i.textNodeName]=e),s}function Xl(c){const i=Object.keys(c);for(let t=0;t0&&(t=eu),Fo(c,i,"",t)}function Fo(c,i,t,e){let s="",n=!1;for(let r=0;r`,n=!1;continue}else if(a===i.commentPropName){s+=e+``,n=!0;continue}else if(a[0]==="?"){const d=to(o[":@"],i),E=a==="?xml"?"":e;let C=o[a][0][i.textNodeName];C=C.length!==0?" "+C:"",s+=E+`<${a}${C}${d}?>`,n=!0;continue}let u=e;u!==""&&(u+=i.indentBy);const f=to(o[":@"],i),I=e+`<${a}${f}`,h=Fo(o[a],i,l,u);i.unpairedTags.indexOf(a)!==-1?i.suppressUnpairedNode?s+=I+">":s+=I+"/>":(!h||h.length===0)&&i.suppressEmptyNode?s+=I+"/>":h&&h.endsWith(">")?s+=I+`>${h}${e}`:(s+=I+">",h&&e!==""&&(h.includes("/>")||h.includes("`),n=!0}return s}function su(c){const i=Object.keys(c);for(let t=0;t0&&i.processEntities)for(let t=0;t","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Me(c){this.options=Object.assign({},au,c),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=uu),this.processTextOrObjNode=cu,this.options.format?(this.indentate=lu,this.tagEndChar=`> `,this.newLine=` -`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}Me.prototype.build=function(c){return this.options.preserveOrder?ru(c,this.options):(Array.isArray(c)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(c={[this.options.arrayNodeName]:c}),this.j2x(c,0).val)};Me.prototype.j2x=function(c,i){let t="",e="";for(let s in c)if(Object.prototype.hasOwnProperty.call(c,s))if(typeof c[s]>"u")this.isAttribute(s)&&(e+="");else if(c[s]===null)this.isAttribute(s)?e+="":s[0]==="?"?e+=this.indentate(i)+"<"+s+"?"+this.tagEndChar:e+=this.indentate(i)+"<"+s+"/"+this.tagEndChar;else if(c[s]instanceof Date)e+=this.buildTextValNode(c[s],s,"",i);else if(typeof c[s]!="object"){const n=this.isAttribute(s);if(n)t+=this.buildAttrPairStr(n,""+c[s]);else if(s===this.options.textNodeName){let r=this.options.tagValueProcessor(s,""+c[s]);e+=this.replaceEntitiesValue(r)}else e+=this.buildTextValNode(c[s],s,"",i)}else if(Array.isArray(c[s])){const n=c[s].length;let r="",o="";for(let a=0;a"u"))if(l===null)s[0]==="?"?e+=this.indentate(i)+"<"+s+"?"+this.tagEndChar:e+=this.indentate(i)+"<"+s+"/"+this.tagEndChar;else if(typeof l=="object")if(this.options.oneListGroup){const u=this.j2x(l,i+1);r+=u.val,this.options.attributesGroupName&&l.hasOwnProperty(this.options.attributesGroupName)&&(o+=u.attrStr)}else r+=this.processTextOrObjNode(l,s,i);else if(this.options.oneListGroup){let u=this.options.tagValueProcessor(s,l);u=this.replaceEntitiesValue(u),r+=u}else r+=this.buildTextValNode(l,s,"",i)}this.options.oneListGroup&&(r=this.buildObjectNode(r,s,o,i)),e+=r}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const n=Object.keys(c[s]),r=n.length;for(let o=0;o"+c+s:this.options.commentPropName!==!1&&i===this.options.commentPropName&&n.length===0?this.indentate(e)+``+this.newLine:this.indentate(e)+"<"+i+t+n+this.tagEndChar+c+this.indentate(e)+s}};Me.prototype.closeTag=function(c){let i="";return this.options.unpairedTags.indexOf(c)!==-1?this.options.suppressUnpairedNode||(i="/"):this.options.suppressEmptyNode?i="/":i=`>`+this.newLine;if(this.options.commentPropName!==!1&&i===this.options.commentPropName)return this.indentate(e)+``+this.newLine;if(i[0]==="?")return this.indentate(e)+"<"+i+t+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(i,c);return s=this.replaceEntitiesValue(s),s===""?this.indentate(e)+"<"+i+t+this.closeTag(i)+this.tagEndChar:this.indentate(e)+"<"+i+t+">"+s+"0&&this.options.processEntities)for(let i=0;i`);let t=null;this.modifiedDate&&(t=`${this.modifiedDate.toISOString()}`);let e=null;return this.modifiedAuthor&&(e=`${this.modifiedAuthor}`),` +`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}Me.prototype.build=function(c){return this.options.preserveOrder?ou(c,this.options):(Array.isArray(c)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(c={[this.options.arrayNodeName]:c}),this.j2x(c,0).val)};Me.prototype.j2x=function(c,i){let t="",e="";for(let s in c)if(Object.prototype.hasOwnProperty.call(c,s))if(typeof c[s]>"u")this.isAttribute(s)&&(e+="");else if(c[s]===null)this.isAttribute(s)?e+="":s[0]==="?"?e+=this.indentate(i)+"<"+s+"?"+this.tagEndChar:e+=this.indentate(i)+"<"+s+"/"+this.tagEndChar;else if(c[s]instanceof Date)e+=this.buildTextValNode(c[s],s,"",i);else if(typeof c[s]!="object"){const n=this.isAttribute(s);if(n)t+=this.buildAttrPairStr(n,""+c[s]);else if(s===this.options.textNodeName){let r=this.options.tagValueProcessor(s,""+c[s]);e+=this.replaceEntitiesValue(r)}else e+=this.buildTextValNode(c[s],s,"",i)}else if(Array.isArray(c[s])){const n=c[s].length;let r="",o="";for(let a=0;a"u"))if(l===null)s[0]==="?"?e+=this.indentate(i)+"<"+s+"?"+this.tagEndChar:e+=this.indentate(i)+"<"+s+"/"+this.tagEndChar;else if(typeof l=="object")if(this.options.oneListGroup){const u=this.j2x(l,i+1);r+=u.val,this.options.attributesGroupName&&l.hasOwnProperty(this.options.attributesGroupName)&&(o+=u.attrStr)}else r+=this.processTextOrObjNode(l,s,i);else if(this.options.oneListGroup){let u=this.options.tagValueProcessor(s,l);u=this.replaceEntitiesValue(u),r+=u}else r+=this.buildTextValNode(l,s,"",i)}this.options.oneListGroup&&(r=this.buildObjectNode(r,s,o,i)),e+=r}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const n=Object.keys(c[s]),r=n.length;for(let o=0;o"+c+s:this.options.commentPropName!==!1&&i===this.options.commentPropName&&n.length===0?this.indentate(e)+``+this.newLine:this.indentate(e)+"<"+i+t+n+this.tagEndChar+c+this.indentate(e)+s}};Me.prototype.closeTag=function(c){let i="";return this.options.unpairedTags.indexOf(c)!==-1?this.options.suppressUnpairedNode||(i="/"):this.options.suppressEmptyNode?i="/":i=`>`+this.newLine;if(this.options.commentPropName!==!1&&i===this.options.commentPropName)return this.indentate(e)+``+this.newLine;if(i[0]==="?")return this.indentate(e)+"<"+i+t+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(i,c);return s=this.replaceEntitiesValue(s),s===""?this.indentate(e)+"<"+i+t+this.closeTag(i)+this.tagEndChar:this.indentate(e)+"<"+i+t+">"+s+"0&&this.options.processEntities)for(let i=0;i`);let t=null;this.modifiedDate&&(t=`${this.modifiedDate.toISOString()}`);let e=null;return this.modifiedAuthor&&(e=`${this.modifiedAuthor}`),` ${this.date.toISOString()} ${this.author} @@ -50,7 +50,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE ${e??""} ${t??""} - `}}const ue=class ue{constructor(i){S(this,"guid",se.create());S(this,"title",ue.default.title);S(this,"creationDate",new Date);S(this,"creationAuthor","");S(this,"viewpoints",new Pe);S(this,"relatedTopics",new Pe);S(this,"comments",new ie);S(this,"customData",{});S(this,"description");S(this,"serverAssignedId");S(this,"dueDate");S(this,"modifiedAuthor");S(this,"modifiedDate");S(this,"index");S(this,"_type",ue.default.type);S(this,"_status",ue.default.status);S(this,"_priority",ue.default.priority);S(this,"_stage",ue.default.stage);S(this,"_assignedTo",ue.default.assignedTo);S(this,"_labels",ue.default.labels??new Set);S(this,"_components");this._components=i;const t=i.get(_t);this.creationAuthor=t.config.author,this.relatedTopics.guard=e=>e!==this.guid}set type(i){const t=this._components.get(_t),{strict:e,types:s}=t.config;(!e||s.has(i))&&(this._type=i)}get type(){return this._type}set status(i){const t=this._components.get(_t),{strict:e,statuses:s}=t.config;(!e||s.has(i))&&(this._status=i)}get status(){return this._status}set priority(i){const t=this._components.get(_t);if(i){const{strict:e,priorities:s}=t.config;if(!(e?s.has(i):!0))return;this._priority=i}else this._priority=i}get priority(){return this._priority}set stage(i){const t=this._components.get(_t);if(i){const{strict:e,stages:s}=t.config;if(!(e?s.has(i):!0))return;this._stage=i}else this._stage=i}get stage(){return this._stage}set assignedTo(i){const t=this._components.get(_t);if(i){const{strict:e,users:s}=t.config;if(!(e?s.has(i):!0))return;this._assignedTo=i}else this._assignedTo=i}get assignedTo(){return this._assignedTo}set labels(i){const t=this._components.get(_t),{strict:e,labels:s}=t.config;if(e){const n=new Set;for(const r of i)(!e||s.has(r))&&n.add(r);this._labels=n}else this._labels=i}get labels(){return this._labels}get _managerVersion(){return this._components.get(_t).config.version}set(i){const t=i,e=this;for(const n in i){if(n==="guid")continue;const r=t[n];n in this&&(e[n]=r)}return this._components.get(_t).list.set(this.guid,this),this}createComment(i,t){const e=new _n(this._components,i);return e.viewpoint=t,e.topic=this,this.comments.set(e.guid,e),e}createLabelTags(i=this._managerVersion){let t="Labels";i==="2.1"&&(t="Labels"),i==="3"&&(t="Label");let e=[...this.labels].map(s=>`<${t}>${s}`).join(` + `}}const ue=class ue{constructor(i){S(this,"guid",se.create());S(this,"title",ue.default.title);S(this,"creationDate",new Date);S(this,"creationAuthor","");S(this,"viewpoints",new Pe);S(this,"relatedTopics",new Pe);S(this,"comments",new ie);S(this,"customData",{});S(this,"description");S(this,"serverAssignedId");S(this,"dueDate");S(this,"modifiedAuthor");S(this,"modifiedDate");S(this,"index");S(this,"_type",ue.default.type);S(this,"_status",ue.default.status);S(this,"_priority",ue.default.priority);S(this,"_stage",ue.default.stage);S(this,"_assignedTo",ue.default.assignedTo);S(this,"_labels",ue.default.labels??new Set);S(this,"_components");this._components=i;const t=i.get(_t);this.creationAuthor=t.config.author,this.relatedTopics.guard=e=>e!==this.guid}set type(i){const t=this._components.get(_t),{strict:e,types:s}=t.config;(!e||s.has(i))&&(this._type=i)}get type(){return this._type}set status(i){const t=this._components.get(_t),{strict:e,statuses:s}=t.config;(!e||s.has(i))&&(this._status=i)}get status(){return this._status}set priority(i){const t=this._components.get(_t);if(i){const{strict:e,priorities:s}=t.config;if(!(e?s.has(i):!0))return;this._priority=i}else this._priority=i}get priority(){return this._priority}set stage(i){const t=this._components.get(_t);if(i){const{strict:e,stages:s}=t.config;if(!(e?s.has(i):!0))return;this._stage=i}else this._stage=i}get stage(){return this._stage}set assignedTo(i){const t=this._components.get(_t);if(i){const{strict:e,users:s}=t.config;if(!(e?s.has(i):!0))return;this._assignedTo=i}else this._assignedTo=i}get assignedTo(){return this._assignedTo}set labels(i){const t=this._components.get(_t),{strict:e,labels:s}=t.config;if(e){const n=new Set;for(const r of i)(!e||s.has(r))&&n.add(r);this._labels=n}else this._labels=i}get labels(){return this._labels}get _managerVersion(){return this._components.get(_t).config.version}set(i){const t=i,e=this;for(const n in i){if(n==="guid")continue;const r=t[n];n in this&&(e[n]=r)}return this._components.get(_t).list.set(this.guid,this),this}createComment(i,t){const e=new wn(this._components,i);return e.viewpoint=t,e.topic=this,this.comments.set(e.guid,e),e}createLabelTags(i=this._managerVersion){let t="Labels";i==="2.1"&&(t="Labels"),i==="3"&&(t="Label");let e=[...this.labels].map(s=>`<${t}>${s}`).join(` `);for(const s in this.customData){const n=this.customData[s];typeof n=="string"&&(e+=` <${t}>${n}`)}return i==="2.1"?e:i==="3"?e.length!==0?` ${e} @@ -91,7 +91,7 @@ ${t} ${i==="2.1"?f:""} ${i==="2.1"?I:""} - `}};S(ue,"default",{title:"BCF Topic",type:"Issue",status:"Active"});let gs=ue;const Eu=(c,i)=>{if(i.trim()==="")return;const t=_t.xmlParser.parse(i).Extensions;if(!t)return;const{Priorities:e,TopicStatuses:s,TopicTypes:n,Users:r}=t;if(e&&e.Priority){const o=Array.isArray(e.Priority)?e.Priority:[e.Priority];for(const a of o)c.config.priorities.add(a)}if(s&&s.TopicStatus){const o=Array.isArray(s.TopicStatus)?s.TopicStatus:[s.TopicStatus];for(const a of o)c.config.statuses.add(a)}if(n&&n.TopicType){const o=Array.isArray(n.TopicType)?n.TopicType:[n.TopicType];for(const a of o)c.config.types.add(a)}if(r&&r.User){const o=Array.isArray(r.User)?r.User:[r.User];for(const a of o)c.config.users.add(a)}};class du extends Ws{constructor(){super(...arguments);S(this,"_config",{version:{type:"Select",options:new Set(["2.1","3"]),multiple:!1,value:""},author:{type:"Text",value:""},types:{type:"TextSet",value:new Set},statuses:{type:"TextSet",value:new Set},priorities:{type:"TextSet",value:new Set},labels:{type:"TextSet",value:new Set},stages:{type:"TextSet",value:new Set},users:{type:"TextSet",value:new Set},includeSelectionTag:{type:"Boolean",value:!1},updateExtensionsOnImport:{type:"Boolean",value:!1},strict:{type:"Boolean",value:!1},includeAllExtensionsOnExport:{type:"Boolean",value:!1},fallbackVersionOnImport:{type:"Select",multiple:!1,options:new Set(["2.1","3"]),value:""},ignoreIncompleteTopicsOnImport:{type:"Boolean",value:!1}})}get version(){return this._config.version.value}set version(t){this._config.version.value=t}get author(){return this._config.author.value}set author(t){this._config.author.value=t}get types(){return this._config.types.value}set types(t){this._config.types.value=t}get statuses(){return this._config.statuses.value}set statuses(t){this._config.statuses.value=t}get priorities(){return this._config.priorities.value}set priorities(t){this._config.priorities.value=t}get labels(){return this._config.labels.value}set labels(t){this._config.labels.value=t}get stages(){return this._config.stages.value}set stages(t){this._config.stages.value=t}get users(){return this._config.users.value}set users(t){this._config.users.value=t}get includeSelectionTag(){return this._config.includeSelectionTag.value}set includeSelectionTag(t){this._config.includeSelectionTag.value=t}get updateExtensionsOnImport(){return this._config.updateExtensionsOnImport.value}set updateExtensionsOnImport(t){this._config.updateExtensionsOnImport.value=t}get strict(){return this._config.strict.value}set strict(t){this._config.strict.value=t}get includeAllExtensionsOnExport(){return this._config.includeAllExtensionsOnExport.value}set includeAllExtensionsOnExport(t){this._config.includeAllExtensionsOnExport.value=t}get fallbackVersionOnImport(){return this._config.fallbackVersionOnImport.value}set fallbackVersionOnImport(t){this._config.fallbackVersionOnImport.value=t}get ignoreIncompleteTopicsOnImport(){return this._config.ignoreIncompleteTopicsOnImport.value}set ignoreIncompleteTopicsOnImport(t){this._config.ignoreIncompleteTopicsOnImport.value=t}}const Ne=class Ne extends Mt{constructor(){super(...arguments);S(this,"enabled",!1);S(this,"_defaultConfig",{author:"jhon.doe@example.com",version:"2.1",types:new Set(["Clash","Failure","Fault","Inquiry","Issue","Remark","Request"]),statuses:new Set(["Active","In Progress","Done","In Review","Closed"]),priorities:new Set(["On hold","Minor","Normal","Major","Critical"]),labels:new Set,stages:new Set,users:new Set,includeSelectionTag:!1,updateExtensionsOnImport:!0,strict:!1,includeAllExtensionsOnExport:!0,fallbackVersionOnImport:"2.1",ignoreIncompleteTopicsOnImport:!1});S(this,"config",new du(this,this.components,"BCF Topics",Ne.uuid));S(this,"list",new ie);S(this,"onSetup",new tt);S(this,"isSetup",!1);S(this,"onBCFImported",new tt);S(this,"onDisposed",new tt)}setup(t){if(this.isSetup)return;const e={...this._defaultConfig,...t};this.config.version=e.version,this.config.author=e.author,this.config.types=e.types,this.config.statuses=e.statuses,this.config.priorities=e.priorities,this.config.labels=e.labels,this.config.stages=e.stages,this.config.users=e.users,this.config.includeSelectionTag=e.includeSelectionTag,this.config.updateExtensionsOnImport=e.updateExtensionsOnImport,this.config.strict=e.strict,this.config.includeAllExtensionsOnExport=e.includeAllExtensionsOnExport,this.config.fallbackVersionOnImport=e.fallbackVersionOnImport||"",this.config.ignoreIncompleteTopicsOnImport=e.ignoreIncompleteTopicsOnImport,this.isSetup=!0,this.enabled=!0,this.onSetup.trigger()}create(t){const e=new gs(this.components);return t?(e.guid=t.guid??e.guid,e.set(t)):this.list.set(e.guid,e),e}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get usedTypes(){const t=[...this.list].map(([e,s])=>s.type);return new Set(t)}get usedStatuses(){const t=[...this.list].map(([e,s])=>s.status);return new Set(t)}get usedPriorities(){const t=[...this.list].map(([e,s])=>s.priority).filter(e=>e);return new Set(t)}get usedStages(){const t=[...this.list].map(([e,s])=>s.stage).filter(e=>e);return new Set(t)}get usedUsers(){const t=[];for(const[e,s]of this.list){t.push(s.creationAuthor),s.assignedTo&&t.push(s.assignedTo),s.modifiedAuthor&&t.push(s.modifiedAuthor);for(const[n,r]of s.comments)t.push(r.author),r.modifiedAuthor&&t.push(r.modifiedAuthor)}return new Set(t)}get usedLabels(){const t=[];for(const[e,s]of this.list)t.push(...s.labels);return new Set(t)}updateExtensions(){for(const[t,e]of this.list){for(const s of e.labels)this.config.labels.add(s);this.config.types.add(e.type),e.priority&&this.config.priorities.add(e.priority),e.stage&&this.config.stages.add(e.stage),this.config.statuses.add(e.status),this.config.users.add(e.creationAuthor),e.assignedTo&&this.config.users.add(e.assignedTo),e.modifiedAuthor&&this.config.users.add(e.modifiedAuthor);for(const[s,n]of e.comments)this.config.users.add(n.author),n.modifiedAuthor&&this.config.users.add(n.modifiedAuthor)}}updateViewpointReferences(){const t=this.components.get(te);for(const[e,s]of this.list)for(const n of s.viewpoints)t.list.has(n)||s.viewpoints.delete(n)}async export(t=this.list.values()){const e=new $r;e.file("bcf.version",` + `}};S(ue,"default",{title:"BCF Topic",type:"Issue",status:"Active"});let Os=ue;const du=(c,i)=>{if(i.trim()==="")return;const t=_t.xmlParser.parse(i).Extensions;if(!t)return;const{Priorities:e,TopicStatuses:s,TopicTypes:n,Users:r}=t;if(e&&e.Priority){const o=Array.isArray(e.Priority)?e.Priority:[e.Priority];for(const a of o)c.config.priorities.add(a)}if(s&&s.TopicStatus){const o=Array.isArray(s.TopicStatus)?s.TopicStatus:[s.TopicStatus];for(const a of o)c.config.statuses.add(a)}if(n&&n.TopicType){const o=Array.isArray(n.TopicType)?n.TopicType:[n.TopicType];for(const a of o)c.config.types.add(a)}if(r&&r.User){const o=Array.isArray(r.User)?r.User:[r.User];for(const a of o)c.config.users.add(a)}};class pu extends Xs{constructor(){super(...arguments);S(this,"_config",{version:{type:"Select",options:new Set(["2.1","3"]),multiple:!1,value:""},author:{type:"Text",value:""},types:{type:"TextSet",value:new Set},statuses:{type:"TextSet",value:new Set},priorities:{type:"TextSet",value:new Set},labels:{type:"TextSet",value:new Set},stages:{type:"TextSet",value:new Set},users:{type:"TextSet",value:new Set},includeSelectionTag:{type:"Boolean",value:!1},updateExtensionsOnImport:{type:"Boolean",value:!1},strict:{type:"Boolean",value:!1},includeAllExtensionsOnExport:{type:"Boolean",value:!1},fallbackVersionOnImport:{type:"Select",multiple:!1,options:new Set(["2.1","3"]),value:""},ignoreIncompleteTopicsOnImport:{type:"Boolean",value:!1}})}get version(){return this._config.version.value}set version(t){this._config.version.value=t}get author(){return this._config.author.value}set author(t){this._config.author.value=t}get types(){return this._config.types.value}set types(t){this._config.types.value=t}get statuses(){return this._config.statuses.value}set statuses(t){this._config.statuses.value=t}get priorities(){return this._config.priorities.value}set priorities(t){this._config.priorities.value=t}get labels(){return this._config.labels.value}set labels(t){this._config.labels.value=t}get stages(){return this._config.stages.value}set stages(t){this._config.stages.value=t}get users(){return this._config.users.value}set users(t){this._config.users.value=t}get includeSelectionTag(){return this._config.includeSelectionTag.value}set includeSelectionTag(t){this._config.includeSelectionTag.value=t}get updateExtensionsOnImport(){return this._config.updateExtensionsOnImport.value}set updateExtensionsOnImport(t){this._config.updateExtensionsOnImport.value=t}get strict(){return this._config.strict.value}set strict(t){this._config.strict.value=t}get includeAllExtensionsOnExport(){return this._config.includeAllExtensionsOnExport.value}set includeAllExtensionsOnExport(t){this._config.includeAllExtensionsOnExport.value=t}get fallbackVersionOnImport(){return this._config.fallbackVersionOnImport.value}set fallbackVersionOnImport(t){this._config.fallbackVersionOnImport.value=t}get ignoreIncompleteTopicsOnImport(){return this._config.ignoreIncompleteTopicsOnImport.value}set ignoreIncompleteTopicsOnImport(t){this._config.ignoreIncompleteTopicsOnImport.value=t}}const Ne=class Ne extends Mt{constructor(){super(...arguments);S(this,"enabled",!1);S(this,"_defaultConfig",{author:"jhon.doe@example.com",version:"2.1",types:new Set(["Clash","Failure","Fault","Inquiry","Issue","Remark","Request"]),statuses:new Set(["Active","In Progress","Done","In Review","Closed"]),priorities:new Set(["On hold","Minor","Normal","Major","Critical"]),labels:new Set,stages:new Set,users:new Set,includeSelectionTag:!1,updateExtensionsOnImport:!0,strict:!1,includeAllExtensionsOnExport:!0,fallbackVersionOnImport:"2.1",ignoreIncompleteTopicsOnImport:!1});S(this,"config",new pu(this,this.components,"BCF Topics",Ne.uuid));S(this,"list",new ie);S(this,"onSetup",new tt);S(this,"isSetup",!1);S(this,"onBCFImported",new tt);S(this,"onDisposed",new tt)}setup(t){if(this.isSetup)return;const e={...this._defaultConfig,...t};this.config.version=e.version,this.config.author=e.author,this.config.types=e.types,this.config.statuses=e.statuses,this.config.priorities=e.priorities,this.config.labels=e.labels,this.config.stages=e.stages,this.config.users=e.users,this.config.includeSelectionTag=e.includeSelectionTag,this.config.updateExtensionsOnImport=e.updateExtensionsOnImport,this.config.strict=e.strict,this.config.includeAllExtensionsOnExport=e.includeAllExtensionsOnExport,this.config.fallbackVersionOnImport=e.fallbackVersionOnImport||"",this.config.ignoreIncompleteTopicsOnImport=e.ignoreIncompleteTopicsOnImport,this.isSetup=!0,this.enabled=!0,this.onSetup.trigger()}create(t){const e=new Os(this.components);return t?(e.guid=t.guid??e.guid,e.set(t)):this.list.set(e.guid,e),e}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get usedTypes(){const t=[...this.list].map(([e,s])=>s.type);return new Set(t)}get usedStatuses(){const t=[...this.list].map(([e,s])=>s.status);return new Set(t)}get usedPriorities(){const t=[...this.list].map(([e,s])=>s.priority).filter(e=>e);return new Set(t)}get usedStages(){const t=[...this.list].map(([e,s])=>s.stage).filter(e=>e);return new Set(t)}get usedUsers(){const t=[];for(const[e,s]of this.list){t.push(s.creationAuthor),s.assignedTo&&t.push(s.assignedTo),s.modifiedAuthor&&t.push(s.modifiedAuthor);for(const[n,r]of s.comments)t.push(r.author),r.modifiedAuthor&&t.push(r.modifiedAuthor)}return new Set(t)}get usedLabels(){const t=[];for(const[e,s]of this.list)t.push(...s.labels);return new Set(t)}updateExtensions(){for(const[t,e]of this.list){for(const s of e.labels)this.config.labels.add(s);this.config.types.add(e.type),e.priority&&this.config.priorities.add(e.priority),e.stage&&this.config.stages.add(e.stage),this.config.statuses.add(e.status),this.config.users.add(e.creationAuthor),e.assignedTo&&this.config.users.add(e.assignedTo),e.modifiedAuthor&&this.config.users.add(e.modifiedAuthor);for(const[s,n]of e.comments)this.config.users.add(n.author),n.modifiedAuthor&&this.config.users.add(n.modifiedAuthor)}}updateViewpointReferences(){const t=this.components.get(te);for(const[e,s]of this.list)for(const n of s.viewpoints)t.list.has(n)||s.viewpoints.delete(n)}async export(t=this.list.values()){const e=new jr;e.file("bcf.version",` `),e.file("bcf.extensions",this.serializeExtensions());const n=await(await fetch("https://thatopen.github.io/engine_components/resources/favicon.ico")).arrayBuffer(),r=this.components.get(te);for(const a of t){const l=e.folder(a.guid);l.file("markup.bcf",a.serialize());for(const u of a.viewpoints){const f=r.list.get(u);f&&(l.file(`${u}.jpeg`,n,{binary:!0}),l.file(`${u}.bcfv`,await f.serialize()))}}return await e.generateAsync({type:"blob"})}serializeExtensions(){const t=[...this.config.types].map(a=>`${a}`).join(` @@ -122,7 +122,7 @@ ${r} ${o} `:""} - `}processMarkupComment(t){const{Guid:e,Date:s,Author:n,Comment:r,Viewpoint:o}=t;if(!(e&&s&&n&&(_n||o)))return null;const a=this.components.get(te),l=new _n(this.components,r??"");return l.guid=e,l.date=new Date(s),l.author=n,l.viewpoint=o!=null&&o.Guid?a.list.get(o.Guid):void 0,l.modifiedAuthor=t.ModifiedAuthor,l.modifiedDate=t.ModifiedDate?new Date(t.ModifiedDate):void 0,l}getMarkupComments(t,e){var o;let s;if(e==="2.1"&&(s=t.Comment),e==="3"&&(s=(o=t.Topic.Comments)==null?void 0:o.Comment),!s)return[];s=Array.isArray(s)?s:[s];const n=s.map(a=>this.processMarkupComment(a)).filter(a=>a);return Array.isArray(n)?n:[n]}getMarkupLabels(t,e){var r;let s;return e==="2.1"&&(s=t.Topic.Labels),e==="3"&&(s=(r=t.Topic.Labels)==null?void 0:r.Label),s?Array.isArray(s)?s:[s]:[]}getMarkupViewpoints(t,e){var n;let s;return e==="2.1"&&(s=t.Viewpoints),e==="3"&&(s=(n=t.Topic.Viewpoints)==null?void 0:n.ViewPoint),s?(s=Array.isArray(s)?s:[s],s):[]}getMarkupRelatedTopics(t,e){var r;let s;return e==="2.1"&&(s=t.Topic.RelatedTopic),e==="3"&&(s=(r=t.Topic.RelatedTopics)==null?void 0:r.RelatedTopic),s?(Array.isArray(s)?s:[s]).map(o=>o.Guid):[]}async load(t,e){var A;const{fallbackVersionOnImport:s,ignoreIncompleteTopicsOnImport:n,updateExtensionsOnImport:r}=this.config,o=new $r;await o.loadAsync(t);const a=Object.values(o.files);let l=s;const u=a.find(F=>F.name.endsWith(".version"));if(u){const F=await u.async("string"),R=Ne.xmlParser.parse(F).Version.VersionId;l=String(R)}if(!(l&&(l==="2.1"||l==="3")))throw new Error(`BCFTopics: ${l} is not supported.`);const f=a.find(F=>F.name.endsWith(".extensions"));if(r&&f){const F=await f.async("string");Eu(this,F)}const I=[],h=this.components.get(te),d=a.filter(F=>F.name.endsWith(".bcfv"));for(const F of d){const R=await F.async("string"),g=Ne.xmlParser.parse(R).VisualizationInfo;if(!g){console.warn("Missing VisualizationInfo in Viewpoint");continue}const N={},{Guid:y,ClippingPlanes:w,Components:L,OrthogonalCamera:D,PerspectiveCamera:V}=g;if(y&&(N.guid=y),L){const{Selection:M,Visibility:T}=L;if(M&&M.Component){const Z=Array.isArray(M.Component)?M.Component:[M.Component];N.selectionComponents=Z.map(G=>G.IfcGuid).filter(G=>G)}if(T&&"DefaultVisibility"in T&&(N.defaultVisibility=T.DefaultVisibility),T&&T.Exceptions&&"Component"in T.Exceptions){const{Component:Z}=T.Exceptions,G=Array.isArray(Z)?Z:[Z];N.exceptionComponents=G.map(K=>K.IfcGuid).filter(K=>K)}let U;l==="2.1"&&(U=L.ViewSetupHints),l==="3"&&(U=(A=L.Visibility)==null?void 0:A.ViewSetupHints),U&&("OpeningsVisible"in U&&(N.openingsVisible=U.OpeningsVisible),"SpacesVisible"in U&&(N.spacesVisible=U.SpacesVisible),"SpaceBoundariesVisible"in U&&(N.spaceBoundariesVisible=U.SpaceBoundariesVisible))}if(D||V){const M=g.PerspectiveCamera??g.OrthogonalCamera,{CameraViewPoint:T,CameraDirection:U}=M,Z=new W(Number(T.X),Number(T.Z),Number(-T.Y)),G=new W(Number(U.X),Number(U.Z),Number(-U.Y)),K={position:{x:Z.x,y:Z.y,z:Z.z},direction:{x:G.x,y:G.y,z:G.z},aspectRatio:"AspectRatio"in M?M.AspectRatio:1};"ViewToWorldScale"in M&&(N.camera={...K,viewToWorldScale:M.ViewToWorldScale}),"FieldOfView"in M&&(N.camera={...K,fov:M.FieldOfView})}const O=new So(this.components,e,{data:N,setCamera:!1});if(L){const{Coloring:M}=L;if(M&&M.Color){const T=Array.isArray(M.Color)?M.Color:[M.Color];for(const U of T){const{Color:Z,Component:G}=U,z=(Array.isArray(G)?G:[G]).map(st=>st.IfcGuid);O.componentColors.set(Z,z)}}}if(I.push(O),w){const M=this.components.get(Sn),T=Array.isArray(w.ClippingPlane)?w.ClippingPlane:[w.ClippingPlane];for(const U of T){const{Location:Z,Direction:G}=U;if(!(Z&&G))continue;const K=new W(Z.X,Z.Z,-Z.Y),z=new W(G.X,-G.Z,G.Y),st=M.createFromNormalAndCoplanarPoint(e,z,K);st.visible=!1,st.enabled=!1,O.clippingPlanes.add(st)}}}const E={},C=[],p=a.filter(F=>F.name.endsWith(".bcf"));for(const F of p){const R=await F.async("string"),g=Ne.xmlParser.parse(R).Markup,N=g.Topic,{Guid:y,TopicType:w,TopicStatus:L,Title:D,CreationDate:V,CreationAuthor:O}=N;if(n&&!(y&&w&&L&&D&&V&&O))continue;const M=new gs(this.components);M.guid=y??M.guid;const T=this.getMarkupRelatedTopics(g,l);E[M.guid]=new Set(T),M.type=w??M.type,M.status=L??M.status,M.title=D??M.title,M.creationDate=V?new Date(V):M.creationDate,M.creationAuthor=O??M.creationAuthor,M.serverAssignedId=N.ServerAssignedId,M.priority=N.Priority,M.index=N.Index,M.modifiedDate=N.ModifiedDate?new Date(N.ModifiedDate):void 0,M.modifiedAuthor=N.ModifiedAuthor,M.dueDate=N.DueDate?new Date(N.DueDate):void 0,M.assignedTo=N.AssignedTo,M.description=N.Description,M.stage=N.Stage;const U=this.getMarkupLabels(g,l);for(const K of U)M.labels.add(K);const Z=this.getMarkupComments(g,l);for(const K of Z)M.comments.set(K.guid,K);const G=this.getMarkupViewpoints(g,l);for(const K of G){if(!(K&&K.Guid))continue;const z=h.list.get(K.Guid);z&&M.viewpoints.add(z.guid)}this.list.set(M.guid,M),C.push(M)}for(const F in E){const R=this.list.get(F);if(!R)continue;const g=E[F];for(const N of g)R.relatedTopics.add(N)}return this.onBCFImported.trigger(C),{viewpoints:I,topics:C}}};S(Ne,"uuid","de977976-e4f6-4e4f-a01a-204727839802"),S(Ne,"xmlParser",new go.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let _t=Ne;const Kt=class Kt extends Mt{constructor(t){super(t);S(this,"enabled",!0);S(this,"onDisposed",new tt);S(this,"_absoluteMin");S(this,"_absoluteMax");S(this,"_meshes",[]);this.components.add(Kt.uuid,this),this._absoluteMin=Kt.newBound(!0),this._absoluteMax=Kt.newBound(!1)}static getDimensions(t){const{min:e,max:s}=t,n=Math.abs(s.x-e.x),r=Math.abs(s.y-e.y),o=Math.abs(s.z-e.z),a=new W;return a.subVectors(s,e).divideScalar(2).add(e),{width:n,height:r,depth:o,center:a}}static newBound(t){const e=t?1:-1;return new W(e*Number.MAX_VALUE,e*Number.MAX_VALUE,e*Number.MAX_VALUE)}static getBounds(t,e,s){const n=s||this.newBound(!1),r=e||this.newBound(!0);for(const o of t)o.xn.x&&(n.x=o.x),o.y>n.y&&(n.y=o.y),o.z>n.z&&(n.z=o.z);return new Lt(e,s)}dispose(){const t=this.components.get(ni);for(const e of this._meshes)t.destroy(e);this._meshes=[],this.onDisposed.trigger(Kt.uuid),this.onDisposed.reset()}get(){const t=this._absoluteMin.clone(),e=this._absoluteMax.clone();return new Lt(t,e)}getSphere(){const t=this._absoluteMin.clone(),e=this._absoluteMax.clone(),s=Math.abs((e.x-t.x)/2),n=Math.abs((e.y-t.y)/2),r=Math.abs((e.z-t.z)/2),o=new W(t.x+s,t.y+n,t.z+r),a=o.distanceTo(t);return new Bs(o,a)}getMesh(){const t=new Lt(this._absoluteMin,this._absoluteMax),e=Kt.getDimensions(t),{width:s,height:n,depth:r,center:o}=e,a=new Dt(s,n,r),l=new it(a);return this._meshes.push(l),l.position.copy(o),l}reset(){this._absoluteMin=Kt.newBound(!0),this._absoluteMax=Kt.newBound(!1)}add(t){for(const e of t.items)this.addMesh(e.mesh)}addMesh(t,e){if(!t.geometry.index)return;const s=Kt.getFragmentBounds(t);t.updateMatrixWorld();const n=t.matrixWorld,r=new Nt,o=t instanceof Cs,a=new Set;if(t instanceof sa){e||(e=t.fragment.ids);for(const l of e){const u=t.fragment.getInstancesIDs(l);if(u)for(const f of u)a.add(f)}}else a.add(0);for(const l of a){const u=s.min.clone(),f=s.max.clone();o&&(t.getMatrixAt(l,r),u.applyMatrix4(r),f.applyMatrix4(r)),u.applyMatrix4(n),f.applyMatrix4(n),u.xthis._absoluteMax.x&&(this._absoluteMax.x=u.x),u.y>this._absoluteMax.y&&(this._absoluteMax.y=u.y),u.z>this._absoluteMax.z&&(this._absoluteMax.z=u.z),f.x>this._absoluteMax.x&&(this._absoluteMax.x=f.x),f.y>this._absoluteMax.y&&(this._absoluteMax.y=f.y),f.z>this._absoluteMax.z&&(this._absoluteMax.z=f.z),f.xo.x&&(o.x=f),I>o.y&&(o.y=I),h>o.z&&(o.z=h)}return new Lt(r,o)}};S(Kt,"uuid","d1444724-dba6-4cdd-a0c7-68ee1450d166");let Mn=Kt;const Ds=class Ds{constructor(i){S(this,"onProgress",new tt);S(this,"inclusive",!1);S(this,"rules",[]);S(this,"ids",{});S(this,"needsUpdate",new Map);S(this,"components");this.components=i}static import(i,t){const e=Ds.importers.get(t.type);return e?e(i,t):(console.warn("Invalid query data:.",t),null)}static importRules(i){const t=[];for(const e of i){const s={};for(const n in e){const r=e[n];r.regexp?s[n]=new RegExp(r.value):s[n]=r}t.push(s)}return t}static importIds(i){const t={};for(const e in i.ids)t[e]=new Set(i.ids[e]);return t}clear(i){if(i===void 0){this.ids={},this.needsUpdate.clear();return}delete this.ids[i],this.needsUpdate.delete(i)}addID(i,t){this.ids[i]||(this.ids[i]=new Set),this.ids[i].add(t)}getData(){const i={};for(const e in this.ids)i[e]=Array.from(this.ids[e]);const t=this.exportRules();return{name:this.name,inclusive:this.inclusive,type:"IfcFinderQuery",ids:i,rules:t}}exportRules(){const i=[];for(const t of this.rules){const e={};for(const s in t){const n=t[s];n instanceof RegExp?e[s]={regexp:!0,value:n.source}:e[s]=n}i.push(e)}return i}findInFile(i,t){return new Promise(e=>{const s=new FileReader,n=new TextDecoder("utf-8"),r=1e4*1024,o=1e3;let a=0;const l=/;/,u=()=>{if(a>=t.size){e();return}const f=Math.min(a+r+o,t.size),I=t.slice(a,f);s.readAsArrayBuffer(I)};s.onload=()=>{if(!(s.result instanceof ArrayBuffer))return;const f=new Uint8Array(s.result),h=n.decode(f).split(l);h.shift(),this.findInLines(i,h),this.onProgress.trigger(a/t.size),a+=r,u()},u()})}getIdFromLine(i){const t=i.slice(i.indexOf("#")+1,i.indexOf("="));return parseInt(t,10)}testRules(i){let t=null,e=null,s=null,n=!1;for(const r of this.rules){if(r.type==="category"){if(t===null&&(t=this.getCategoryFromLine(i),t===null)){if(this.inclusive)continue;break}if(!r.value.test(t)){if(this.inclusive)continue;n=!1;break}n=!0;continue}if(e===null&&(e=this.getAttributesFromLine(i),e===null)){if(this.inclusive)continue;n=!1;break}if(t===null&&(t=this.getCategoryFromLine(i),t===null)){if(this.inclusive)continue;n=!1;break}if(s===null&&(s=Object.keys(new na[t]),s=s.slice(2),s===null)){if(this.inclusive)continue;n=!1;break}if(r.type==="property"){const{name:o,value:a}=r;if(!a.test(i)){if(this.inclusive)continue;n=!1;break}let l=!1;for(let u=0;u"&&parseFloat(h)>a){u=!0;break}else if(l===">="&&parseFloat(h)>=a){u=!0;break}else if(l==="<="&&parseFloat(h)<=a){u=!0;break}}}if(u)n=!0;else if(!this.inclusive){n=!1;break}}}return n}getCategoryFromLine(i){const t=i.indexOf("=")+1,e=i.indexOf("("),s=i.slice(t,e).trim(),n=zc[s];return n||null}getAttributesFromLine(i){const t=/\((.*)\)/,e=i.match(t);if(!(e&&e[1]))return null;const s=/,(?![^()]*\))/g;return e[1].split(s).map(r=>r.trim())}};S(Ds,"importers",new Map);let fe=Ds;const Us=class Us extends fe{constructor(t,e){super(t);S(this,"name");this.name=e.name,this.rules=e.rules,this.inclusive=e.inclusive}get items(){const t=this.components.get(Ct),e=[];for(const s in this.ids){const n=this.ids[s],r=t.groups.get(s);if(!r){console.warn(`Model ${s} not found!`);continue}const o=r.getFragmentMap(n);e.push(o)}return co.combine(e)}export(){const t=this.getData();return t.type=Us.type,t}async update(t,e){this.ids[t]=new Set,await this.findInFile(t,e),this.needsUpdate.set(t,!1)}findInLines(t,e){for(const s of e)if(this.testRules(s)){const r=this.getIdFromLine(s);this.addID(t,r)}}};S(Us,"type","IfcBasicQuery");let Ss=Us;fe.importers.set(Ss.type,(c,i)=>{const t=new Ss(c,{name:i.name,rules:fe.importRules(i.rules),inclusive:i.inclusive});return t.ids=fe.importIds(i),t});const bs=class bs extends fe{constructor(t,e){super(t);S(this,"name");S(this,"psets",[]);this.name=e.name,this.rules=e.rules,this.inclusive=e.inclusive}get items(){const t=this.components.get(kt),e=this.components.get(Ct),s=[];for(const n in this.ids){const r=e.groups.get(n);if(!r){console.log(`Model not found: ${n}.`);continue}const o=this.ids[n];for(const a of o){const l=t.getEntityRelations(n,a,"DefinesOcurrence");if(l){const u=r.getFragmentMap(l);s.push(u)}}}return co.combine(s)}export(){const t=this.getData();return t.type=bs.type,t}async update(t,e){await this.findInFile(t,e);const s=new Set;for(const n of this.psets){const r=this.getAttributesFromLine(n);if(r===null)continue;const o=r[4].replace("(","[").replace(")","]").replace(/#/g,""),a=JSON.parse(o);for(const l of a){const u=this.ids[t];if(u&&u.has(l)){const f=this.getIdFromLine(n);s.add(f);break}}}this.ids[t]=s,this.psets=[],this.needsUpdate.set(t,!1)}findInLines(t,e){for(const s of e){const n=this.getCategoryFromLine(s);if(n==="IfcPropertySet"){this.psets.push(s);continue}if(n!=="IfcPropertySingleValue")continue;if(this.testRules(s)){const o=this.getIdFromLine(s);this.addID(t,o)}}}};S(bs,"type","IfcPropertyQuery");let Os=bs;fe.importers.set(Os.type,(c,i)=>{const t=new Os(c,{name:i.name,inclusive:i.inclusive,rules:fe.importRules(i.rules)});return t.ids=fe.importIds(i),t});const vs=class vs extends Mt{constructor(t){super(t);S(this,"enabled",!0);S(this,"list",{});S(this,"onDisposed",new tt);S(this,"onFragmentsDisposed",t=>{const{groupID:e,fragmentIDs:s}=t;for(const n in this.list){const r=this.list[n],o=Object.keys(r);if(o.includes(e))delete r[e],Object.values(r).length===0&&delete this.list[n];else for(const a of o){const l=r[a];for(const u of s)delete l.map[u];Object.values(l).length===0&&delete r[a]}}});t.add(vs.uuid,this),t.get(Ct).onFragmentsDisposed.add(this.onFragmentsDisposed)}dispose(){this.list={},this.components.get(Ct).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(),this.onDisposed.reset()}remove(t){for(const e in this.list){const s=this.list[e];for(const n in s){const r=s[n];delete r.map[t]}}}find(t){const e=this.components.get(Ct);if(!t){const o={};for(const[a,l]of e.list)o[a]=new Set(l.ids);return o}const s=Object.keys(t).length,n={};for(const o in t){const a=t[o];if(!this.list[o]){console.warn(`Classification ${o} does not exist.`);continue}for(const l of a){const u=this.list[o][l];if(u)for(const f in u.map){n[f]||(n[f]=new Map);for(const I of u.map[f]){const h=n[f].get(I);h===void 0?n[f].set(I,1):n[f].set(I,h+1)}}}}const r={};for(const o in n){const a=n[o];for(const[l,u]of a){if(u===void 0)throw new Error("Malformed fragments map!");u===s&&(r[o]||(r[o]=new Set),r[o].add(l))}}return r}byModel(t,e){this.list.models||(this.list.models={});const s=this.list.models;s[t]||(s[t]={map:{},id:null,name:t});const n=s[t];for(const[r,o]of e.data){const a=o[0];for(const l of a){const u=e.keyFragments.get(l);u&&(n.map[u]||(n.map[u]=new Set),n.map[u].add(r))}}}async byPredefinedType(t){var n;this.list.predefinedTypes||(this.list.predefinedTypes={});const e=this.list.predefinedTypes,s=t.getAllPropertiesIDs();for(const r of s){const o=await t.getProperties(r);if(!o)continue;const a=String((n=o.PredefinedType)==null?void 0:n.value).toUpperCase();e[a]||(e[a]={map:{},id:null,name:a});const l=e[a];for(const[u,f]of t.data){const I=f[0];for(const h of I){const d=t.keyFragments.get(h);if(!d)throw new Error("Fragment ID not found!");l.map[d]||(l.map[d]=new Set),l.map[d].add(o.expressID)}}}}byEntity(t){this.list.entities||(this.list.entities={});for(const[e,s]of t.data){const r=s[1][1],o=Fs[r];this.saveItem(t,"entities",o,e)}}async byIfcRel(t,e,s){ii.isRel(e)&&await ii.getRelationMap(t,e,async(n,r)=>{const{name:o}=await ii.getEntityName(t,n);for(const a of r)this.saveItem(t,s,o??"NO REL NAME",a)})}async bySpatialStructure(t,e={}){var l,u;const s=this.components.get(kt),n=s.relationMaps[t.uuid];if(!n)throw new Error(`Classifier: model relations of ${t.name||t.uuid} have to exists to group by spatial structure.`);const r=e.systemName??"spatialStructures",a=e.useProperties===void 0||e.useProperties;for(const[f]of n){if(e.isolate){const E=t.data.get(f);if(!E)continue;const C=E[1][1];if(C===void 0||!e.isolate.has(C))continue}const I=s.getEntityRelations(t,f,"Decomposes");if(I)for(const E of I){let C=E.toString();if(a){const p=await t.getProperties(E);if(!p)continue;C=(l=p.Name)==null?void 0:l.value}this.saveItem(t,r,C,f,E)}const h=s.getEntityRelations(t,f,"ContainsElements");if(!h)continue;let d=f.toString();if(a){const E=await t.getProperties(f);if(!E)continue;d=(u=E.Name)==null?void 0:u.value}for(const E of h){this.saveItem(t,r,d,E,f);const C=s.getEntityRelations(t,Number(E),"IsDecomposedBy");if(C)for(const p of C)this.saveItem(t,r,d,p,f)}}}setColor(t,e,s=!1){const n=this.components.get(Ct);for(const r in t){const o=n.list.get(r);if(!o)continue;const a=t[r];o.setColor(e,a,s)}}resetColor(t){const e=this.components.get(Ct);for(const s in t){const n=e.list.get(s);if(!n)continue;const r=t[s];n.resetColor(r)}}saveItem(t,e,s,n,r=null){this.list[e]||(this.list[e]={});const o=t.data.get(n);if(o)for(const a of o[0]){const l=t.keyFragments.get(a);if(l){const u=this.list[e];u[s]||(u[s]={map:{},id:r,name:s}),u[s].map[l]||(u[s].map[l]=new Set),u[s].map[l].add(n)}}}};S(vs,"uuid","e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");let Ns=vs;const xs=class xs extends Mt{constructor(t){super(t);S(this,"enabled",!0);this.components.add(xs.uuid,this)}set(t,e){const s=this.components.get(Ct);if(!e){for(const[n,r]of s.list)r&&(r.setVisibility(t),this.updateCulledVisibility(r));return}for(const n in e){const r=e[n],o=s.list.get(n);o&&(o.setVisibility(t,r),this.updateCulledVisibility(o))}}isolate(t){this.set(!1),this.set(!0,t)}updateCulledVisibility(t){const e=this.components.get(gn);for(const[s,n]of e.list){const r=n.colorMeshes.get(t.id);r&&(r.count=t.mesh.count)}}};S(xs,"uuid","dd9ccf2d-8a21-4821-b7f6-2949add16a29");let wn=xs;class So{constructor(i,t,e){S(this,"title");S(this,"guid",se.create());S(this,"clippingPlanes",new Pe);S(this,"camera",{aspectRatio:1,fov:60,direction:{x:0,y:0,z:0},position:{x:0,y:0,z:0}});S(this,"exceptionComponents",new Pe);S(this,"selectionComponents",new Pe);S(this,"componentColors",new ie);S(this,"spacesVisible",!1);S(this,"spaceBoundariesVisible",!1);S(this,"openingsVisible",!1);S(this,"defaultVisibility",!0);S(this,"_components");S(this,"world");const s={setCamera:!0,...e},{data:n,setCamera:r}=s;this._components=i,this.world=t,n&&(this.guid=n.guid??this.guid,this.set(n)),r&&this.updateCamera()}get _selectionModelIdMap(){const i=this._components.get(Ct),t={};for(const[e,s]of i.groups){e in t||(t[e]=new Set);for(const n of this.selectionComponents){const r=s.globalToExpressIDs.get(n);r&&t[e].add(r)}}return t}get _exceptionModelIdMap(){const i=this._components.get(Ct),t={};for(const[e,s]of i.groups){e in t||(t[e]=new Set);for(const n of this.exceptionComponents){const r=s.globalToExpressIDs.get(n);r&&t[e].add(r)}}return t}get selection(){return this._components.get(Ct).modelIdToFragmentIdMap(this._selectionModelIdMap)}get exception(){return this._components.get(Ct).modelIdToFragmentIdMap(this._exceptionModelIdMap)}get projection(){return"fov"in this.camera?"Perspective":"Orthographic"}get position(){const i=this._components.get(Ct),{position:t}=this.camera,{x:e,y:s,z:n}=t,r=new W(e,s,n);return i.applyBaseCoordinateSystem(r,new Nt),r}get direction(){const{direction:i}=this.camera,{x:t,y:e,z:s}=i;return new W(t,e,s)}get _managerVersion(){return this._components.get(_t).config.version}get topics(){return[...this._components.get(_t).list.values()].filter(s=>s.viewpoints.has(this.guid))}addComponentsFromMap(i){const e=this._components.get(Ct).fragmentIdMapToGuids(i);this.selectionComponents.add(...e),this._components.get(te).list.set(this.guid,this)}set(i){const t=i,e=this;for(const n in i){if(n==="guid")continue;const r=t[n];if(n==="selectionComponents"){this.selectionComponents.clear(),this.selectionComponents.add(...r);continue}if(n==="exceptionComponents"){this.exceptionComponents.clear(),this.exceptionComponents.add(...r);continue}n in this&&(e[n]=r)}return this._components.get(te).list.set(this.guid,this),this}async go(i,t=!0){const{camera:e}=i??this.world;if(!e.hasCameraControls())throw new Error("Viewpoint: the world's camera need controls to set the viewpoint.");e instanceof kc&&e.projection.set(this.projection);const s=new W(this.camera.position.x,this.camera.position.y,this.camera.position.z),n=new W(this.camera.direction.x,this.camera.direction.y,this.camera.direction.z);if(s.equals(new W)&&n.equals(new W))return;const r=this.position,o=this.direction;let a={x:r.x+o.x*80,y:r.y+o.y*80,z:r.z+o.z*80};const l=this.selection;if(Object.keys(l).length===0){const I=this._components.get(xi).get(this.world).castRayFromVector(r,this.direction);I&&(a=I.point)}else{const u=this._components.get(Mn);u.reset(),u.addFragmentIdMap(l),a=u.getSphere().center,u.reset()}await e.controls.setLookAt(r.x,r.y,r.z,a.x,a.y,a.z,t)}updateCamera(i){const{camera:t,renderer:e}=i??this.world;if(!e)throw new Error("Viewpoint: the world needs to have a renderer!");if(!t.hasCameraControls())throw new Error("Viewpoint: world's camera need camera controls!");const s=new W;t.controls.getPosition(s);const n=t.three,r=new W(0,0,-1).applyEuler(n.rotation),{width:o,height:a}=e.getSize();let l=o/a;Number.isNaN(l)&&(l=1);const u=this._components.get(Ct);s.applyMatrix4(u.baseCoordinationMatrix.clone().invert());const f={aspectRatio:l,position:{x:s.x,y:s.y,z:s.z},direction:{x:r.x,y:r.y,z:r.z}};n instanceof to?this.camera={...f,fov:n.fov}:n instanceof bn&&(this.camera={...f,viewToWorldScale:n.top-n.bottom}),this._components.get(te).list.set(this.guid,this)}applyVisibility(){const i=this._components.get(wn);i.set(this.defaultVisibility),i.set(!this.defaultVisibility,this.exception),i.set(!0,this.selection)}applyColors(){const i=this._components.get(te),t=this._components.get(Ct),e=this._components.get(Ns);for(const[s,n]of this.componentColors){const r=t.guidToFragmentIdMap(n);e.setColor(r,s,i.config.overwriteColors)}}resetColors(){const i=this._components.get(Ct),t=this._components.get(Ns);for(const[e,s]of this.componentColors){const n=i.guidToFragmentIdMap(s);t.resetColor(n)}}async createComponentTags(i){var n,r;const t=this._components.get(Ct),e=this._components.get(_t);let s="";if(e.config.includeSelectionTag){const o=i==="selection"?this._selectionModelIdMap:this._exceptionModelIdMap;for(const a in o){const l=t.groups.get(a);if(!l)continue;const u=o[a];for(const f of u){const I=await l.getProperties(f);if(!I)continue;const h=(n=I.GlobalId)==null?void 0:n.value;if(!h)continue;const d=(r=I.Tag)==null?void 0:r.value;let E=null;d&&(E=`AuthoringToolId="${d}"`),s+=` + `}processMarkupComment(t){const{Guid:e,Date:s,Author:n,Comment:r,Viewpoint:o}=t;if(!(e&&s&&n&&(wn||o)))return null;const a=this.components.get(te),l=new wn(this.components,r??"");return l.guid=e,l.date=new Date(s),l.author=n,l.viewpoint=o!=null&&o.Guid?a.list.get(o.Guid):void 0,l.modifiedAuthor=t.ModifiedAuthor,l.modifiedDate=t.ModifiedDate?new Date(t.ModifiedDate):void 0,l}getMarkupComments(t,e){var o;let s;if(e==="2.1"&&(s=t.Comment),e==="3"&&(s=(o=t.Topic.Comments)==null?void 0:o.Comment),!s)return[];s=Array.isArray(s)?s:[s];const n=s.map(a=>this.processMarkupComment(a)).filter(a=>a);return Array.isArray(n)?n:[n]}getMarkupLabels(t,e){var r;let s;return e==="2.1"&&(s=t.Topic.Labels),e==="3"&&(s=(r=t.Topic.Labels)==null?void 0:r.Label),s?Array.isArray(s)?s:[s]:[]}getMarkupViewpoints(t,e){var n;let s;return e==="2.1"&&(s=t.Viewpoints),e==="3"&&(s=(n=t.Topic.Viewpoints)==null?void 0:n.ViewPoint),s?(s=Array.isArray(s)?s:[s],s):[]}getMarkupRelatedTopics(t,e){var r;let s;return e==="2.1"&&(s=t.Topic.RelatedTopic),e==="3"&&(s=(r=t.Topic.RelatedTopics)==null?void 0:r.RelatedTopic),s?(Array.isArray(s)?s:[s]).map(o=>o.Guid):[]}async load(t,e){var A;const{fallbackVersionOnImport:s,ignoreIncompleteTopicsOnImport:n,updateExtensionsOnImport:r}=this.config,o=new jr;await o.loadAsync(t);const a=Object.values(o.files);let l=s;const u=a.find(F=>F.name.endsWith(".version"));if(u){const F=await u.async("string"),R=Ne.xmlParser.parse(F).Version.VersionId;l=String(R)}if(!(l&&(l==="2.1"||l==="3")))throw new Error(`BCFTopics: ${l} is not supported.`);const f=a.find(F=>F.name.endsWith(".extensions"));if(r&&f){const F=await f.async("string");du(this,F)}const I=[],h=this.components.get(te),d=a.filter(F=>F.name.endsWith(".bcfv"));for(const F of d){const R=await F.async("string"),g=Ne.xmlParser.parse(R).VisualizationInfo;if(!g){console.warn("Missing VisualizationInfo in Viewpoint");continue}const N={},{Guid:y,ClippingPlanes:w,Components:L,OrthogonalCamera:D,PerspectiveCamera:V}=g;if(y&&(N.guid=y),L){const{Selection:M,Visibility:T}=L;if(M&&M.Component){const Z=Array.isArray(M.Component)?M.Component:[M.Component];N.selectionComponents=Z.map(G=>G.IfcGuid).filter(G=>G)}if(T&&"DefaultVisibility"in T&&(N.defaultVisibility=T.DefaultVisibility),T&&T.Exceptions&&"Component"in T.Exceptions){const{Component:Z}=T.Exceptions,G=Array.isArray(Z)?Z:[Z];N.exceptionComponents=G.map(K=>K.IfcGuid).filter(K=>K)}let U;l==="2.1"&&(U=L.ViewSetupHints),l==="3"&&(U=(A=L.Visibility)==null?void 0:A.ViewSetupHints),U&&("OpeningsVisible"in U&&(N.openingsVisible=U.OpeningsVisible),"SpacesVisible"in U&&(N.spacesVisible=U.SpacesVisible),"SpaceBoundariesVisible"in U&&(N.spaceBoundariesVisible=U.SpaceBoundariesVisible))}if(D||V){const M=g.PerspectiveCamera??g.OrthogonalCamera,{CameraViewPoint:T,CameraDirection:U}=M,Z=new H(Number(T.X),Number(T.Z),Number(-T.Y)),G=new H(Number(U.X),Number(U.Z),Number(-U.Y)),K={position:{x:Z.x,y:Z.y,z:Z.z},direction:{x:G.x,y:G.y,z:G.z},aspectRatio:"AspectRatio"in M?M.AspectRatio:1};"ViewToWorldScale"in M&&(N.camera={...K,viewToWorldScale:M.ViewToWorldScale}),"FieldOfView"in M&&(N.camera={...K,fov:M.FieldOfView})}const O=new Oo(this.components,e,{data:N,setCamera:!1});if(L){const{Coloring:M}=L;if(M&&M.Color){const T=Array.isArray(M.Color)?M.Color:[M.Color];for(const U of T){const{Color:Z,Component:G}=U,z=(Array.isArray(G)?G:[G]).map(st=>st.IfcGuid);O.componentColors.set(Z,z)}}}if(I.push(O),w){const M=this.components.get(Nn),T=Array.isArray(w.ClippingPlane)?w.ClippingPlane:[w.ClippingPlane];for(const U of T){const{Location:Z,Direction:G}=U;if(!(Z&&G))continue;const K=new H(Z.X,Z.Z,-Z.Y),z=new H(G.X,-G.Z,G.Y),st=M.createFromNormalAndCoplanarPoint(e,z,K);st.visible=!1,st.enabled=!1,O.clippingPlanes.add(st)}}}const E={},C=[],p=a.filter(F=>F.name.endsWith(".bcf"));for(const F of p){const R=await F.async("string"),g=Ne.xmlParser.parse(R).Markup,N=g.Topic,{Guid:y,TopicType:w,TopicStatus:L,Title:D,CreationDate:V,CreationAuthor:O}=N;if(n&&!(y&&w&&L&&D&&V&&O))continue;const M=new Os(this.components);M.guid=y??M.guid;const T=this.getMarkupRelatedTopics(g,l);E[M.guid]=new Set(T),M.type=w??M.type,M.status=L??M.status,M.title=D??M.title,M.creationDate=V?new Date(V):M.creationDate,M.creationAuthor=O??M.creationAuthor,M.serverAssignedId=N.ServerAssignedId,M.priority=N.Priority,M.index=N.Index,M.modifiedDate=N.ModifiedDate?new Date(N.ModifiedDate):void 0,M.modifiedAuthor=N.ModifiedAuthor,M.dueDate=N.DueDate?new Date(N.DueDate):void 0,M.assignedTo=N.AssignedTo,M.description=N.Description,M.stage=N.Stage;const U=this.getMarkupLabels(g,l);for(const K of U)M.labels.add(K);const Z=this.getMarkupComments(g,l);for(const K of Z)M.comments.set(K.guid,K);const G=this.getMarkupViewpoints(g,l);for(const K of G){if(!(K&&K.Guid))continue;const z=h.list.get(K.Guid);z&&M.viewpoints.add(z.guid)}this.list.set(M.guid,M),C.push(M)}for(const F in E){const R=this.list.get(F);if(!R)continue;const g=E[F];for(const N of g)R.relatedTopics.add(N)}return this.onBCFImported.trigger(C),{viewpoints:I,topics:C}}};S(Ne,"uuid","de977976-e4f6-4e4f-a01a-204727839802"),S(Ne,"xmlParser",new So.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let _t=Ne;const Kt=class Kt extends Mt{constructor(t){super(t);S(this,"enabled",!0);S(this,"onDisposed",new tt);S(this,"_absoluteMin");S(this,"_absoluteMax");S(this,"_meshes",[]);this.components.add(Kt.uuid,this),this._absoluteMin=Kt.newBound(!0),this._absoluteMax=Kt.newBound(!1)}static getDimensions(t){const{min:e,max:s}=t,n=Math.abs(s.x-e.x),r=Math.abs(s.y-e.y),o=Math.abs(s.z-e.z),a=new H;return a.subVectors(s,e).divideScalar(2).add(e),{width:n,height:r,depth:o,center:a}}static newBound(t){const e=t?1:-1;return new H(e*Number.MAX_VALUE,e*Number.MAX_VALUE,e*Number.MAX_VALUE)}static getBounds(t,e,s){const n=s||this.newBound(!1),r=e||this.newBound(!0);for(const o of t)o.xn.x&&(n.x=o.x),o.y>n.y&&(n.y=o.y),o.z>n.z&&(n.z=o.z);return new Lt(e,s)}dispose(){const t=this.components.get(ni);for(const e of this._meshes)t.destroy(e);this._meshes=[],this.onDisposed.trigger(Kt.uuid),this.onDisposed.reset()}get(){const t=this._absoluteMin.clone(),e=this._absoluteMax.clone();return new Lt(t,e)}getSphere(){const t=this._absoluteMin.clone(),e=this._absoluteMax.clone(),s=Math.abs((e.x-t.x)/2),n=Math.abs((e.y-t.y)/2),r=Math.abs((e.z-t.z)/2),o=new H(t.x+s,t.y+n,t.z+r),a=o.distanceTo(t);return new Vs(o,a)}getMesh(){const t=new Lt(this._absoluteMin,this._absoluteMax),e=Kt.getDimensions(t),{width:s,height:n,depth:r,center:o}=e,a=new Dt(s,n,r),l=new it(a);return this._meshes.push(l),l.position.copy(o),l}reset(){this._absoluteMin=Kt.newBound(!0),this._absoluteMax=Kt.newBound(!1)}add(t){for(const e of t.items)this.addMesh(e.mesh)}addMesh(t,e){if(!t.geometry.index)return;const s=Kt.getFragmentBounds(t);t.updateMatrixWorld();const n=t.matrixWorld,r=new Nt,o=t instanceof Ts,a=new Set;if(t instanceof na){e||(e=t.fragment.ids);for(const l of e){const u=t.fragment.getInstancesIDs(l);if(u)for(const f of u)a.add(f)}}else a.add(0);for(const l of a){const u=s.min.clone(),f=s.max.clone();o&&(t.getMatrixAt(l,r),u.applyMatrix4(r),f.applyMatrix4(r)),u.applyMatrix4(n),f.applyMatrix4(n),u.xthis._absoluteMax.x&&(this._absoluteMax.x=u.x),u.y>this._absoluteMax.y&&(this._absoluteMax.y=u.y),u.z>this._absoluteMax.z&&(this._absoluteMax.z=u.z),f.x>this._absoluteMax.x&&(this._absoluteMax.x=f.x),f.y>this._absoluteMax.y&&(this._absoluteMax.y=f.y),f.z>this._absoluteMax.z&&(this._absoluteMax.z=f.z),f.xo.x&&(o.x=f),I>o.y&&(o.y=I),h>o.z&&(o.z=h)}return new Lt(r,o)}};S(Kt,"uuid","d1444724-dba6-4cdd-a0c7-68ee1450d166");let Dn=Kt;const bs=class bs{constructor(i){S(this,"onProgress",new tt);S(this,"inclusive",!1);S(this,"rules",[]);S(this,"ids",{});S(this,"needsUpdate",new Map);S(this,"components");this.components=i}static import(i,t){const e=bs.importers.get(t.type);return e?e(i,t):(console.warn("Invalid query data:.",t),null)}static importRules(i){const t=[];for(const e of i){const s={};for(const n in e){const r=e[n];r.regexp?s[n]=new RegExp(r.value):s[n]=r}t.push(s)}return t}static importIds(i){const t={};for(const e in i.ids)t[e]=new Set(i.ids[e]);return t}clear(i){if(i===void 0){this.ids={},this.needsUpdate.clear();return}delete this.ids[i],this.needsUpdate.delete(i)}addID(i,t){this.ids[i]||(this.ids[i]=new Set),this.ids[i].add(t)}getData(){const i={};for(const e in this.ids)i[e]=Array.from(this.ids[e]);const t=this.exportRules();return{name:this.name,inclusive:this.inclusive,type:"IfcFinderQuery",ids:i,rules:t}}exportRules(){const i=[];for(const t of this.rules){const e={};for(const s in t){const n=t[s];n instanceof RegExp?e[s]={regexp:!0,value:n.source}:e[s]=n}i.push(e)}return i}findInFile(i,t){return new Promise(e=>{const s=new FileReader,n=new TextDecoder("utf-8"),r=1e4*1024,o=1e3;let a=0;const l=/;/,u=()=>{if(a>=t.size){e();return}const f=Math.min(a+r+o,t.size),I=t.slice(a,f);s.readAsArrayBuffer(I)};s.onload=()=>{if(!(s.result instanceof ArrayBuffer))return;const f=new Uint8Array(s.result),h=n.decode(f).split(l);h.shift(),this.findInLines(i,h),this.onProgress.trigger(a/t.size),a+=r,u()},u()})}getIdFromLine(i){const t=i.slice(i.indexOf("#")+1,i.indexOf("="));return parseInt(t,10)}testRules(i){let t=null,e=null,s=null,n=!1;for(const r of this.rules){if(r.type==="category"){if(t===null&&(t=this.getCategoryFromLine(i),t===null)){if(this.inclusive)continue;break}if(!r.value.test(t)){if(this.inclusive)continue;n=!1;break}n=!0;continue}if(e===null&&(e=this.getAttributesFromLine(i),e===null)){if(this.inclusive)continue;n=!1;break}if(t===null&&(t=this.getCategoryFromLine(i),t===null)){if(this.inclusive)continue;n=!1;break}if(s===null&&(s=Object.keys(new ra[t]),s=s.slice(2),s===null)){if(this.inclusive)continue;n=!1;break}if(r.type==="property"){const{name:o,value:a}=r;if(!a.test(i)){if(this.inclusive)continue;n=!1;break}let l=!1;for(let u=0;u"&&parseFloat(h)>a){u=!0;break}else if(l===">="&&parseFloat(h)>=a){u=!0;break}else if(l==="<="&&parseFloat(h)<=a){u=!0;break}}}if(u)n=!0;else if(!this.inclusive){n=!1;break}}}return n}getCategoryFromLine(i){const t=i.indexOf("=")+1,e=i.indexOf("("),s=i.slice(t,e).trim(),n=Hc[s];return n||null}getAttributesFromLine(i){const t=/\((.*)\)/,e=i.match(t);if(!(e&&e[1]))return null;const s=/,(?![^()]*\))/g;return e[1].split(s).map(r=>r.trim())}};S(bs,"importers",new Map);let fe=bs;const vs=class vs extends fe{constructor(t,e){super(t);S(this,"name");this.name=e.name,this.rules=e.rules,this.inclusive=e.inclusive}get items(){const t=this.components.get(Ct),e=[];for(const s in this.ids){const n=this.ids[s],r=t.groups.get(s);if(!r){console.warn(`Model ${s} not found!`);continue}const o=r.getFragmentMap(n);e.push(o)}return Rs.combine(e)}export(){const t=this.getData();return t.type=vs.type,t}async update(t,e){this.ids[t]=new Set,await this.findInFile(t,e),this.needsUpdate.set(t,!1)}findInLines(t,e){for(const s of e)if(this.testRules(s)){const r=this.getIdFromLine(s);this.addID(t,r)}}};S(vs,"type","IfcBasicQuery");let Ns=vs;fe.importers.set(Ns.type,(c,i)=>{const t=new Ns(c,{name:i.name,rules:fe.importRules(i.rules),inclusive:i.inclusive});return t.ids=fe.importIds(i),t});const xs=class xs extends fe{constructor(t,e){super(t);S(this,"name");S(this,"psets",[]);this.name=e.name,this.rules=e.rules,this.inclusive=e.inclusive}get items(){const t=this.components.get(kt),e=this.components.get(Ct),s=[];for(const n in this.ids){const r=e.groups.get(n);if(!r){console.log(`Model not found: ${n}.`);continue}const o=this.ids[n];for(const a of o){const l=t.getEntityRelations(n,a,"DefinesOcurrence");if(l){const u=r.getFragmentMap(l);s.push(u)}}}return Rs.combine(s)}export(){const t=this.getData();return t.type=xs.type,t}async update(t,e){await this.findInFile(t,e);const s=new Set;for(const n of this.psets){const r=this.getAttributesFromLine(n);if(r===null)continue;const o=r[4].replace("(","[").replace(")","]").replace(/#/g,""),a=JSON.parse(o);for(const l of a){const u=this.ids[t];if(u&&u.has(l)){const f=this.getIdFromLine(n);s.add(f);break}}}this.ids[t]=s,this.psets=[],this.needsUpdate.set(t,!1)}findInLines(t,e){for(const s of e){const n=this.getCategoryFromLine(s);if(n==="IfcPropertySet"){this.psets.push(s);continue}if(n!=="IfcPropertySingleValue")continue;if(this.testRules(s)){const o=this.getIdFromLine(s);this.addID(t,o)}}}};S(xs,"type","IfcPropertyQuery");let ys=xs;fe.importers.set(ys.type,(c,i)=>{const t=new ys(c,{name:i.name,inclusive:i.inclusive,rules:fe.importRules(i.rules)});return t.ids=fe.importIds(i),t});const Bs=class Bs extends Mt{constructor(t){super(t);S(this,"enabled",!0);S(this,"list",{});S(this,"onDisposed",new tt);S(this,"onFragmentsDisposed",t=>{const{groupID:e,fragmentIDs:s}=t;for(const n in this.list){const r=this.list[n],o=Object.keys(r);if(o.includes(e))delete r[e],Object.values(r).length===0&&delete this.list[n];else for(const a of o){const l=r[a];for(const u of s)delete l.map[u];Object.values(l).length===0&&delete r[a]}}});t.add(Bs.uuid,this),t.get(Ct).onFragmentsDisposed.add(this.onFragmentsDisposed)}dispose(){this.list={},this.components.get(Ct).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(),this.onDisposed.reset()}remove(t){for(const e in this.list){const s=this.list[e];for(const n in s){const r=s[n];delete r.map[t]}}}find(t){const e=this.components.get(Ct);if(!t){const o={};for(const[a,l]of e.list)o[a]=new Set(l.ids);return o}const s=Object.keys(t).length,n={};for(const o in t){const a=t[o];if(!this.list[o]){console.warn(`Classification ${o} does not exist.`);continue}for(const l of a){const u=this.list[o][l];if(u)for(const f in u.map){n[f]||(n[f]=new Map);for(const I of u.map[f]){const h=n[f].get(I);h===void 0?n[f].set(I,1):n[f].set(I,h+1)}}}}const r={};for(const o in n){const a=n[o];for(const[l,u]of a){if(u===void 0)throw new Error("Malformed fragments map!");u===s&&(r[o]||(r[o]=new Set),r[o].add(l))}}return r}byModel(t,e){this.list.models||(this.list.models={});const s=this.list.models;s[t]||(s[t]={map:{},id:null,name:t});const n=s[t];for(const[r,o]of e.data){const a=o[0];for(const l of a){const u=e.keyFragments.get(l);u&&(n.map[u]||(n.map[u]=new Set),n.map[u].add(r))}}}async byPredefinedType(t){var n;this.list.predefinedTypes||(this.list.predefinedTypes={});const e=this.list.predefinedTypes,s=t.getAllPropertiesIDs();for(const r of s){const o=await t.getProperties(r);if(!o)continue;const a=String((n=o.PredefinedType)==null?void 0:n.value).toUpperCase();e[a]||(e[a]={map:{},id:null,name:a});const l=e[a];for(const[u,f]of t.data){const I=f[0];for(const h of I){const d=t.keyFragments.get(h);if(!d)throw new Error("Fragment ID not found!");l.map[d]||(l.map[d]=new Set),l.map[d].add(o.expressID)}}}}byEntity(t){this.list.entities||(this.list.entities={});for(const[e,s]of t.data){const r=s[1][1],o=Ss[r];this.saveItem(t,"entities",o,e)}}async byIfcRel(t,e,s){ii.isRel(e)&&await ii.getRelationMap(t,e,async(n,r)=>{const{name:o}=await ii.getEntityName(t,n);for(const a of r)this.saveItem(t,s,o??"NO REL NAME",a)})}async bySpatialStructure(t,e={}){var l,u;const s=this.components.get(kt),n=s.relationMaps[t.uuid];if(!n)throw new Error(`Classifier: model relations of ${t.name||t.uuid} have to exists to group by spatial structure.`);const r=e.systemName??"spatialStructures",a=e.useProperties===void 0||e.useProperties;for(const[f]of n){if(e.isolate){const E=t.data.get(f);if(!E)continue;const C=E[1][1];if(C===void 0||!e.isolate.has(C))continue}const I=s.getEntityRelations(t,f,"Decomposes");if(I)for(const E of I){let C=E.toString();if(a){const p=await t.getProperties(E);if(!p)continue;C=(l=p.Name)==null?void 0:l.value}this.saveItem(t,r,C,f,E)}const h=s.getEntityRelations(t,f,"ContainsElements");if(!h)continue;let d=f.toString();if(a){const E=await t.getProperties(f);if(!E)continue;d=(u=E.Name)==null?void 0:u.value}for(const E of h){this.saveItem(t,r,d,E,f);const C=s.getEntityRelations(t,Number(E),"IsDecomposedBy");if(C)for(const p of C)this.saveItem(t,r,d,p,f)}}}setColor(t,e,s=!1){const n=this.components.get(Ct);for(const r in t){const o=n.list.get(r);if(!o)continue;const a=t[r];o.setColor(e,a,s)}}resetColor(t){const e=this.components.get(Ct);for(const s in t){const n=e.list.get(s);if(!n)continue;const r=t[s];n.resetColor(r)}}export(){const t={};for(const e in this.list){t[e]={};const s=this.list[e];for(const n in s){const r=s[n];t[e][n]={map:Rs.export(r.map),name:r.name,id:r.id}}}return t}import(t){for(const e in t){this.list[e]||(this.list[e]={});const s=t[e];for(const n in s){const r=s[n];this.list[e][n]={map:Rs.import(r.map),name:r.name,id:r.id}}}}saveItem(t,e,s,n,r=null){this.list[e]||(this.list[e]={});const o=t.data.get(n);if(o)for(const a of o[0]){const l=t.keyFragments.get(a);if(l){const u=this.list[e];u[s]||(u[s]={map:{},id:r,name:s}),u[s].map[l]||(u[s].map[l]=new Set),u[s].map[l].add(n)}}}};S(Bs,"uuid","e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");let Ps=Bs;const Ys=class Ys extends Mt{constructor(t){super(t);S(this,"enabled",!0);this.components.add(Ys.uuid,this)}set(t,e){const s=this.components.get(Ct);if(!e){for(const[n,r]of s.list)r&&(r.setVisibility(t),this.updateCulledVisibility(r));return}for(const n in e){const r=e[n],o=s.list.get(n);o&&(o.setVisibility(t,r),this.updateCulledVisibility(o))}}isolate(t){this.set(!1),this.set(!0,t)}updateCulledVisibility(t){const e=this.components.get(On);for(const[s,n]of e.list){const r=n.colorMeshes.get(t.id);r&&(r.count=t.mesh.count)}}};S(Ys,"uuid","dd9ccf2d-8a21-4821-b7f6-2949add16a29");let Un=Ys;class Oo{constructor(i,t,e){S(this,"title");S(this,"guid",se.create());S(this,"clippingPlanes",new Pe);S(this,"camera",{aspectRatio:1,fov:60,direction:{x:0,y:0,z:0},position:{x:0,y:0,z:0}});S(this,"exceptionComponents",new Pe);S(this,"selectionComponents",new Pe);S(this,"componentColors",new ie);S(this,"spacesVisible",!1);S(this,"spaceBoundariesVisible",!1);S(this,"openingsVisible",!1);S(this,"defaultVisibility",!0);S(this,"_components");S(this,"world");const s={setCamera:!0,...e},{data:n,setCamera:r}=s;this._components=i,this.world=t,n&&(this.guid=n.guid??this.guid,this.set(n)),r&&this.updateCamera()}get _selectionModelIdMap(){const i=this._components.get(Ct),t={};for(const[e,s]of i.groups){e in t||(t[e]=new Set);for(const n of this.selectionComponents){const r=s.globalToExpressIDs.get(n);r&&t[e].add(r)}}return t}get _exceptionModelIdMap(){const i=this._components.get(Ct),t={};for(const[e,s]of i.groups){e in t||(t[e]=new Set);for(const n of this.exceptionComponents){const r=s.globalToExpressIDs.get(n);r&&t[e].add(r)}}return t}get selection(){return this._components.get(Ct).modelIdToFragmentIdMap(this._selectionModelIdMap)}get exception(){return this._components.get(Ct).modelIdToFragmentIdMap(this._exceptionModelIdMap)}get projection(){return"fov"in this.camera?"Perspective":"Orthographic"}get position(){const i=this._components.get(Ct),{position:t}=this.camera,{x:e,y:s,z:n}=t,r=new H(e,s,n);return i.applyBaseCoordinateSystem(r,new Nt),r}get direction(){const{direction:i}=this.camera,{x:t,y:e,z:s}=i;return new H(t,e,s)}get _managerVersion(){return this._components.get(_t).config.version}get topics(){return[...this._components.get(_t).list.values()].filter(s=>s.viewpoints.has(this.guid))}addComponentsFromMap(i){const e=this._components.get(Ct).fragmentIdMapToGuids(i);this.selectionComponents.add(...e),this._components.get(te).list.set(this.guid,this)}set(i){const t=i,e=this;for(const n in i){if(n==="guid")continue;const r=t[n];if(n==="selectionComponents"){this.selectionComponents.clear(),this.selectionComponents.add(...r);continue}if(n==="exceptionComponents"){this.exceptionComponents.clear(),this.exceptionComponents.add(...r);continue}n in this&&(e[n]=r)}return this._components.get(te).list.set(this.guid,this),this}async go(i,t=!0){const{camera:e}=i??this.world;if(!e.hasCameraControls())throw new Error("Viewpoint: the world's camera need controls to set the viewpoint.");e instanceof zc&&e.projection.set(this.projection);const s=new H(this.camera.position.x,this.camera.position.y,this.camera.position.z),n=new H(this.camera.direction.x,this.camera.direction.y,this.camera.direction.z);if(s.equals(new H)&&n.equals(new H))return;const r=this.position,o=this.direction;let a={x:r.x+o.x*80,y:r.y+o.y*80,z:r.z+o.z*80};const l=this.selection;if(Object.keys(l).length===0){const I=this._components.get(xi).get(this.world).castRayFromVector(r,this.direction);I&&(a=I.point)}else{const u=this._components.get(Dn);u.reset(),u.addFragmentIdMap(l),a=u.getSphere().center,u.reset()}await e.controls.setLookAt(r.x,r.y,r.z,a.x,a.y,a.z,t)}updateCamera(i){const{camera:t,renderer:e}=i??this.world;if(!e)throw new Error("Viewpoint: the world needs to have a renderer!");if(!t.hasCameraControls())throw new Error("Viewpoint: world's camera need camera controls!");const s=new H;t.controls.getPosition(s);const n=t.three,r=new H(0,0,-1).applyEuler(n.rotation),{width:o,height:a}=e.getSize();let l=o/a;Number.isNaN(l)&&(l=1);const u=this._components.get(Ct);s.applyMatrix4(u.baseCoordinationMatrix.clone().invert());const f={aspectRatio:l,position:{x:s.x,y:s.y,z:s.z},direction:{x:r.x,y:r.y,z:r.z}};n instanceof io?this.camera={...f,fov:n.fov}:n instanceof xn&&(this.camera={...f,viewToWorldScale:n.top-n.bottom}),this._components.get(te).list.set(this.guid,this)}applyVisibility(){const i=this._components.get(Un);i.set(this.defaultVisibility),i.set(!this.defaultVisibility,this.exception),i.set(!0,this.selection)}applyColors(){const i=this._components.get(te),t=this._components.get(Ct),e=this._components.get(Ps);for(const[s,n]of this.componentColors){const r=t.guidToFragmentIdMap(n);e.setColor(r,s,i.config.overwriteColors)}}resetColors(){const i=this._components.get(Ct),t=this._components.get(Ps);for(const[e,s]of this.componentColors){const n=i.guidToFragmentIdMap(s);t.resetColor(n)}}async createComponentTags(i){var n,r;const t=this._components.get(Ct),e=this._components.get(_t);let s="";if(e.config.includeSelectionTag){const o=i==="selection"?this._selectionModelIdMap:this._exceptionModelIdMap;for(const a in o){const l=t.groups.get(a);if(!l)continue;const u=o[a];for(const f of u){const I=await l.getProperties(f);if(!I)continue;const h=(n=I.GlobalId)==null?void 0:n.value;if(!h)continue;const d=(r=I.Tag)==null?void 0:r.value;let E=null;d&&(E=`AuthoringToolId="${d}"`),s+=` `}}}else s=[...this.selectionComponents].map(o=>``).join(` `);return s}createColorTags(){let i="";for(const[t,e]of this.componentColors.entries()){const s=`#${t.getHexString()}`,n=e.map(r=>` `).join(` @@ -166,35 +166,35 @@ ${i} ${E} ${f} - `}}class pu extends Ws{constructor(){super(...arguments);S(this,"_config",{overwriteColors:{value:!1,type:"Boolean"}})}get overwriteColors(){return this._config.overwriteColors.value}set overwriteColors(t){this._config.overwriteColors.value=t}}const Di=class Di extends Mt{constructor(t){super(t);S(this,"enabled",!0);S(this,"list",new ie);S(this,"isSetup",!1);S(this,"onSetup",new tt);S(this,"config",new pu(this,this.components,"Viewpoints",Di.uuid));S(this,"onDisposed",new tt);t.add(Di.uuid,this)}create(t,e){const s=new So(this.components,t,{data:e});return e||this.list.set(s.guid,s),s}setup(){}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}};S(Di,"uuid","ee867824-a796-408d-8aa0-4e5962a83c66");let te=Di;class $s{constructor(i){S(this,"cardinality","required");S(this,"instructions");S(this,"evalRequirement",(i,t,e,s)=>{const n={parameter:e,currentValue:i,requiredValue:t.parameter,pass:!1};s&&this.addCheckResult(n,s);let r=!1;if(t.type==="simple"&&(r=i===t.parameter),t.type==="enumeration"&&(r=t.parameter.includes(i)),t.type==="pattern"&&(r=new RegExp(t.parameter).test(String(i))),t.type==="length"){const{min:o,length:a,max:l}=t.parameter;a!==void 0&&(r=String(i).length===a),o!==void 0&&(r=String(i).length>=o),l!==void 0&&(r=String(i).length<=l)}if(t.type==="bounds"&&typeof i=="number"){const{min:o,minInclusive:a,max:l,maxInclusive:u}=t.parameter;let f=!0,I=!0;o!==void 0&&(f=a?i<=o:i=l:i>l),r=f&&I}return this.cardinality==="prohibited"&&(r=!r),this.cardinality==="optional"&&(r=!0),n.pass=r,n.pass});S(this,"testResult",[]);this.components=i}addCheckResult(i,t){const e=t.findIndex(({parameter:s})=>s===i.parameter);e!==-1?t[e]=i:t.push(i)}saveResult(i,t){const{GlobalId:e}=i;if(!e)return;const{value:s}=e,n={expressID:s,pass:t,checks:[],cardinality:this.cardinality};this.testResult.push(n)}}const Ce=(c,i)=>{let t="";return i?(i.type==="simple"&&(t=`${i.parameter}`),i.type==="enumeration"&&(t=` + `}}class Cu extends Xs{constructor(){super(...arguments);S(this,"_config",{overwriteColors:{value:!1,type:"Boolean"}})}get overwriteColors(){return this._config.overwriteColors.value}set overwriteColors(t){this._config.overwriteColors.value=t}}const Di=class Di extends Mt{constructor(t){super(t);S(this,"enabled",!0);S(this,"list",new ie);S(this,"isSetup",!1);S(this,"onSetup",new tt);S(this,"config",new Cu(this,this.components,"Viewpoints",Di.uuid));S(this,"onDisposed",new tt);t.add(Di.uuid,this)}create(t,e){const s=new Oo(this.components,t,{data:e});return e||this.list.set(s.guid,s),s}setup(){}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}};S(Di,"uuid","ee867824-a796-408d-8aa0-4e5962a83c66");let te=Di;class Zs{constructor(i){S(this,"cardinality","required");S(this,"instructions");S(this,"evalRequirement",(i,t,e,s)=>{const n={parameter:e,currentValue:i,requiredValue:t.parameter,pass:!1};s&&this.addCheckResult(n,s);let r=!1;if(t.type==="simple"&&(r=i===t.parameter),t.type==="enumeration"&&(r=t.parameter.includes(i)),t.type==="pattern"&&(r=new RegExp(t.parameter).test(String(i))),t.type==="length"){const{min:o,length:a,max:l}=t.parameter;a!==void 0&&(r=String(i).length===a),o!==void 0&&(r=String(i).length>=o),l!==void 0&&(r=String(i).length<=l)}if(t.type==="bounds"&&typeof i=="number"){const{min:o,minInclusive:a,max:l,maxInclusive:u}=t.parameter;let f=!0,I=!0;o!==void 0&&(f=a?i<=o:i=l:i>l),r=f&&I}return this.cardinality==="prohibited"&&(r=!r),this.cardinality==="optional"&&(r=!0),n.pass=r,n.pass});S(this,"testResult",[]);this.components=i}addCheckResult(i,t){const e=t.findIndex(({parameter:s})=>s===i.parameter);e!==-1?t[e]=i:t.push(i)}saveResult(i,t){const{GlobalId:e}=i;if(!e)return;const{value:s}=e,n={expressID:s,pass:t,checks:[],cardinality:this.cardinality};this.testResult.push(n)}}const Ce=(c,i)=>{let t="";return i?(i.type==="simple"&&(t=`${i.parameter}`),i.type==="enumeration"&&(t=` ${i.parameter.map(n=>``).join(`\r `)} `),i.type==="pattern"&&(t=` `),` ${t} - `):t};class Cu extends $s{constructor(t,e){super(t);S(this,"facetType","Attribute");S(this,"name");S(this,"value");this.name=e}serialize(t){const e=Ce("Name",this.name),s=Ce("Value",this.value);let n="";return t==="requirement"&&(n+=`cardinality="${this.cardinality}"`,n+=this.instructions?`instructions="${this.instructions}"`:""),` + `):t};class Tu extends Zs{constructor(t,e){super(t);S(this,"facetType","Attribute");S(this,"name");S(this,"value");this.name=e}serialize(t){const e=Ce("Name",this.name),s=Ce("Value",this.value);let n="";return t==="requirement"&&(n+=`cardinality="${this.cardinality}"`,n+=this.instructions?`instructions="${this.instructions}"`:""),` ${e} ${s} -`}async getEntities(){return[]}async test(t){var s;this.testResult=[];for(const n in t){const r=Number(n),o=t[r],a=[],l={guid:(s=o.GlobalId)==null?void 0:s.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(l);const f=Object.keys(o).filter(h=>{const d=this.evalRequirement(h,this.name,"Name"),E=o[h];return d&&E===null?this.cardinality==="optional"||this.cardinality==="prohibited":d&&(E==null?void 0:E.type)===3&&E.value===2||d&&Array.isArray(E)&&E.length===0||d&&(E==null?void 0:E.type)===1&&E.value.trim()===""?!1:d}),I=f.length>0;if(a.push({parameter:"Name",currentValue:I?f[0]:null,requiredValue:this.name.parameter,pass:this.cardinality==="prohibited"?!I:I}),this.value)if(f[0]){const h=o[f[0]];(h==null?void 0:h.type)===5?a.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"}):this.evalRequirement(h?h.value:null,this.value,"Value",a)}else a.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"});l.pass=a.every(({pass:h})=>h)}const e=[...this.testResult];return this.testResult=[],e}}class Tu extends $s{constructor(t,e){super(t);S(this,"facetType","Classification");S(this,"system");S(this,"value");S(this,"uri");this.system=e}serialize(t){const e=Ce("System",this.system),s=Ce("Value",this.value);let n="";return t==="requirement"&&(n+=`cardinality="${this.cardinality}"`,n+=this.uri?`uri=${this.uri}`:"",n+=this.instructions?`instructions="${this.instructions}"`:""),` +`}async getEntities(){return[]}async test(t){var s;this.testResult=[];for(const n in t){const r=Number(n),o=t[r],a=[],l={guid:(s=o.GlobalId)==null?void 0:s.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(l);const f=Object.keys(o).filter(h=>{const d=this.evalRequirement(h,this.name,"Name"),E=o[h];return d&&E===null?this.cardinality==="optional"||this.cardinality==="prohibited":d&&(E==null?void 0:E.type)===3&&E.value===2||d&&Array.isArray(E)&&E.length===0||d&&(E==null?void 0:E.type)===1&&E.value.trim()===""?!1:d}),I=f.length>0;if(a.push({parameter:"Name",currentValue:I?f[0]:null,requiredValue:this.name.parameter,pass:this.cardinality==="prohibited"?!I:I}),this.value)if(f[0]){const h=o[f[0]];(h==null?void 0:h.type)===5?a.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"}):this.evalRequirement(h?h.value:null,this.value,"Value",a)}else a.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"});l.pass=a.every(({pass:h})=>h)}const e=[...this.testResult];return this.testResult=[],e}}class mu extends Zs{constructor(t,e){super(t);S(this,"facetType","Classification");S(this,"system");S(this,"value");S(this,"uri");this.system=e}serialize(t){const e=Ce("System",this.system),s=Ce("Value",this.value);let n="";return t==="requirement"&&(n+=`cardinality="${this.cardinality}"`,n+=this.uri?`uri=${this.uri}`:"",n+=this.instructions?`instructions="${this.instructions}"`:""),` ${e} ${s} -`}async getEntities(t,e={}){var u;const s=[],n=await t.getAllPropertiesOfType(Ie),r=await t.getAllPropertiesOfType(xe),o={...n,...r},a=[];for(const f in o){const I=Number(f),h=await t.getProperties(I);if(!h)continue;const d=(u=h.ReferencedSource)==null?void 0:u.value;if(!d)continue;const E=await t.getProperties(d);!E||!this.evalSystem(E)||!this.evalValue(h)||!this.evalURI(h)||a.push(I)}const l=this.components.get(kt);for(const f of a){const I=l.getEntitiesWithRelation(t,"HasAssociations",f);for(const h of I){if(h in e)continue;const d=await t.getProperties(h);d&&(e[h]=d,s.push(h))}}return s}async test(t,e){var n;this.testResult=[];for(const r in t){const o=Number(r),a=t[o],l=[],u={guid:(n=a.GlobalId)==null?void 0:n.value,expressID:o,pass:!1,checks:l,cardinality:this.cardinality};this.testResult.push(u);let f=!0;const I=await this.getSystems(e,o),h=I.map(d=>this.getSystemName(d)).filter(d=>d);for(const d of I){if(!this.evalSystem(d,l))continue;if(f=!1,!(this.value&&this.system))break;if(d.type!==Ie)continue;const C=!this.value||this.evalValue(d,l),p=!this.uri||this.evalURI(d,l);if(C&&p)break}f&&this.addCheckResult({parameter:"System",currentValue:h,requiredValue:this.system,pass:this.cardinality==="optional"},l),u.pass=l.every(({pass:d})=>d)}const s=[...this.testResult];return this.testResult=[],s}async processReferencedSource(t,e){var r;const s=(r=e.ReferencedSource)==null?void 0:r.value;if(!s)return null;const n=await t.getProperties(s);return n?(n.type===Ie&&(n.ReferencedSource=await this.processReferencedSource(t,n)),n):null}async getSystems(t,e){var f;const s=[],n=this.components.get(kt),r=n.getEntityRelations(t,e,"HasAssociations");if(r)for(const I of r){const h=await t.getProperties(I);h&&(h.type===xe&&s.push(h),h.type===Ie&&(h.ReferencedSource=await this.processReferencedSource(t,h),h.ReferencedSource&&s.push(h)))}const o=s.map(I=>{var h,d,E;return I.type===xe?(h=I.Name)==null?void 0:h.value:I.type===Ie?(E=(d=I.ReferencedSource)==null?void 0:d.Name)==null?void 0:E.value:null}).filter(I=>I),a=n.getEntityRelations(t,e,"IsTypedBy");if(!(a&&a[0]))return s;const l=a[0],u=n.getEntityRelations(t,l,"HasAssociations");if(u)for(const I of u){const h=await t.getProperties(I);if(h){if(h.type===xe){if(o.includes((f=h.Name)==null?void 0:f.value))continue;s.push(h)}h.type===Ie&&(h.ReferencedSource=await this.processReferencedSource(t,h),h.ReferencedSource&&s.push(h))}}return s}getSystemName(t){var e,s,n,r;if(t.type===xe)return(e=t.Name)==null?void 0:e.value;if(t.type===Ie){if(((s=t.ReferencedSource)==null?void 0:s.type)===Ie)return this.getSystemName(t.ReferencedSource);if(((n=t.ReferencedSource)==null?void 0:n.type)===xe)return(r=t.ReferencedSource.Name)==null?void 0:r.value}return null}getAllReferenceIdentifications(t){if(t.type!==Ie)return null;const e=[];if(t.Identification&&e.push(t.Identification.value),t.ReferencedSource){const s=this.getAllReferenceIdentifications(t.ReferencedSource);s&&e.push(...s)}return e}evalSystem(t,e){const s=this.getSystemName(t);return this.evalRequirement(s,this.system,"System",e)}evalValue(t,e){if(!this.value)return!0;const s=this.getAllReferenceIdentifications(t);if(!s)return!1;const n=s.find(r=>this.value?this.evalRequirement(r,this.value,"Value"):!1);return e&&this.addCheckResult({parameter:"Value",currentValue:n??null,requiredValue:this.value,pass:!!n},e),!!n}evalURI(t,e){var n;return this.uri?this.evalRequirement((n=t.Location)==null?void 0:n.value,{type:"simple",parameter:this.uri},"URI",e):!0}}class mu extends $s{constructor(t,e){super(t);S(this,"facetType","Entity");S(this,"name");S(this,"predefinedType");this.name=e}serialize(t){const e=Ce("Name",this.name),s=Ce("Name",this.predefinedType);let n="";return t==="requirement"&&(n+=`cardinality="${this.cardinality}"`,n+=this.instructions?`instructions="${this.instructions}"`:""),` +`}async getEntities(t,e={}){var u;const s=[],n=await t.getAllPropertiesOfType(Ie),r=await t.getAllPropertiesOfType(xe),o={...n,...r},a=[];for(const f in o){const I=Number(f),h=await t.getProperties(I);if(!h)continue;const d=(u=h.ReferencedSource)==null?void 0:u.value;if(!d)continue;const E=await t.getProperties(d);!E||!this.evalSystem(E)||!this.evalValue(h)||!this.evalURI(h)||a.push(I)}const l=this.components.get(kt);for(const f of a){const I=l.getEntitiesWithRelation(t,"HasAssociations",f);for(const h of I){if(h in e)continue;const d=await t.getProperties(h);d&&(e[h]=d,s.push(h))}}return s}async test(t,e){var n;this.testResult=[];for(const r in t){const o=Number(r),a=t[o],l=[],u={guid:(n=a.GlobalId)==null?void 0:n.value,expressID:o,pass:!1,checks:l,cardinality:this.cardinality};this.testResult.push(u);let f=!0;const I=await this.getSystems(e,o),h=I.map(d=>this.getSystemName(d)).filter(d=>d);for(const d of I){if(!this.evalSystem(d,l))continue;if(f=!1,!(this.value&&this.system))break;if(d.type!==Ie)continue;const C=!this.value||this.evalValue(d,l),p=!this.uri||this.evalURI(d,l);if(C&&p)break}f&&this.addCheckResult({parameter:"System",currentValue:h,requiredValue:this.system,pass:this.cardinality==="optional"},l),u.pass=l.every(({pass:d})=>d)}const s=[...this.testResult];return this.testResult=[],s}async processReferencedSource(t,e){var r;const s=(r=e.ReferencedSource)==null?void 0:r.value;if(!s)return null;const n=await t.getProperties(s);return n?(n.type===Ie&&(n.ReferencedSource=await this.processReferencedSource(t,n)),n):null}async getSystems(t,e){var f;const s=[],n=this.components.get(kt),r=n.getEntityRelations(t,e,"HasAssociations");if(r)for(const I of r){const h=await t.getProperties(I);h&&(h.type===xe&&s.push(h),h.type===Ie&&(h.ReferencedSource=await this.processReferencedSource(t,h),h.ReferencedSource&&s.push(h)))}const o=s.map(I=>{var h,d,E;return I.type===xe?(h=I.Name)==null?void 0:h.value:I.type===Ie?(E=(d=I.ReferencedSource)==null?void 0:d.Name)==null?void 0:E.value:null}).filter(I=>I),a=n.getEntityRelations(t,e,"IsTypedBy");if(!(a&&a[0]))return s;const l=a[0],u=n.getEntityRelations(t,l,"HasAssociations");if(u)for(const I of u){const h=await t.getProperties(I);if(h){if(h.type===xe){if(o.includes((f=h.Name)==null?void 0:f.value))continue;s.push(h)}h.type===Ie&&(h.ReferencedSource=await this.processReferencedSource(t,h),h.ReferencedSource&&s.push(h))}}return s}getSystemName(t){var e,s,n,r;if(t.type===xe)return(e=t.Name)==null?void 0:e.value;if(t.type===Ie){if(((s=t.ReferencedSource)==null?void 0:s.type)===Ie)return this.getSystemName(t.ReferencedSource);if(((n=t.ReferencedSource)==null?void 0:n.type)===xe)return(r=t.ReferencedSource.Name)==null?void 0:r.value}return null}getAllReferenceIdentifications(t){if(t.type!==Ie)return null;const e=[];if(t.Identification&&e.push(t.Identification.value),t.ReferencedSource){const s=this.getAllReferenceIdentifications(t.ReferencedSource);s&&e.push(...s)}return e}evalSystem(t,e){const s=this.getSystemName(t);return this.evalRequirement(s,this.system,"System",e)}evalValue(t,e){if(!this.value)return!0;const s=this.getAllReferenceIdentifications(t);if(!s)return!1;const n=s.find(r=>this.value?this.evalRequirement(r,this.value,"Value"):!1);return e&&this.addCheckResult({parameter:"Value",currentValue:n??null,requiredValue:this.value,pass:!!n},e),!!n}evalURI(t,e){var n;return this.uri?this.evalRequirement((n=t.Location)==null?void 0:n.value,{type:"simple",parameter:this.uri},"URI",e):!0}}class Ru extends Zs{constructor(t,e){super(t);S(this,"facetType","Entity");S(this,"name");S(this,"predefinedType");this.name=e}serialize(t){const e=Ce("Name",this.name),s=Ce("Name",this.predefinedType);let n="";return t==="requirement"&&(n+=`cardinality="${this.cardinality}"`,n+=this.instructions?`instructions="${this.instructions}"`:""),` ${e} ${s} -`}async getEntities(t,e={}){const s=Object.entries(Fs),n=[];for(const[a]of s)await this.evalName({type:a})&&n.push(Number(a));let r={};for(const a of n){const l=await t.getAllPropertiesOfType(a);l&&(r={...r,...l})}if(!this.predefinedType){for(const a in r)a in e||(e[a]=r[a]);return Object.keys(r).map(Number)}const o=[];for(const a in r){const l=Number(a);if(l in e)continue;const u=r[l];await this.evalPredefinedType(t,u)&&(e[l]=u,o.push(l))}return o}async test(t,e){var s;this.testResult=[];for(const n in t){const r=Number(n),o=t[r],a=[],l={guid:(s=o.GlobalId)==null?void 0:s.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(l),await this.evalName(o,a),await this.evalPredefinedType(e,o,a),l.pass=a.every(({pass:u})=>u)}return this.testResult}async evalName(t,e){const s=Fs[t.type];return this.evalRequirement(s,this.name,"Name",e)}async evalPredefinedType(t,e,s){var l,u,f,I;if(!this.predefinedType)return null;const n=this.components.get(kt),r=typeof this.predefinedType.parameter=="string"&&this.predefinedType.parameter==="USERDEFINED";let o=(l=e.PredefinedType)==null?void 0:l.value;if(o==="USERDEFINED"&&!r){const d=Object.keys(e).find(E=>/^((?!Predefined).)*Type$/.test(E));o=d?(u=e[d])==null?void 0:u.value:"USERDEFINED"}if(!o){const h=n.getEntityRelations(t,e.expressID,"IsTypedBy");if(h&&h[0]){const d=await t.getProperties(h[0]);if(d&&(o=(f=d.PredefinedType)==null?void 0:f.value,o==="USERDEFINED"&&!r)){const C=Object.keys(d).find(p=>/^((?!Predefined).)*Type$/.test(p));o=C?(I=d[C])==null?void 0:I.value:"USERDEFINED"}}}return this.evalRequirement(o,this.predefinedType,"PredefinedType",s)}}class Ru extends $s{constructor(t,e,s){super(t);S(this,"facetType","Property");S(this,"propertySet");S(this,"baseName");S(this,"value");S(this,"dataType");S(this,"uri");S(this,"_unsupportedTypes",[ra,oa]);this.propertySet=e,this.baseName=s}serialize(t){const e=Ce("PropertySet",this.propertySet),s=Ce("BaseName",this.baseName),n=Ce("Value",this.value),r=this.dataType?`dataType=${this.dataType}`:"";let o="";return t==="requirement"&&(o+=`cardinality="${this.cardinality}"`,o+=this.uri?`uri=${this.uri}`:"",o+=this.instructions?`instructions="${this.instructions}"`:""),` +`}async getEntities(t,e={}){const s=Object.entries(Ss),n=[];for(const[a]of s)await this.evalName({type:a})&&n.push(Number(a));let r={};for(const a of n){const l=await t.getAllPropertiesOfType(a);l&&(r={...r,...l})}if(!this.predefinedType){for(const a in r)a in e||(e[a]=r[a]);return Object.keys(r).map(Number)}const o=[];for(const a in r){const l=Number(a);if(l in e)continue;const u=r[l];await this.evalPredefinedType(t,u)&&(e[l]=u,o.push(l))}return o}async test(t,e){var s;this.testResult=[];for(const n in t){const r=Number(n),o=t[r],a=[],l={guid:(s=o.GlobalId)==null?void 0:s.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(l),await this.evalName(o,a),await this.evalPredefinedType(e,o,a),l.pass=a.every(({pass:u})=>u)}return this.testResult}async evalName(t,e){const s=Ss[t.type];return this.evalRequirement(s,this.name,"Name",e)}async evalPredefinedType(t,e,s){var l,u,f,I;if(!this.predefinedType)return null;const n=this.components.get(kt),r=typeof this.predefinedType.parameter=="string"&&this.predefinedType.parameter==="USERDEFINED";let o=(l=e.PredefinedType)==null?void 0:l.value;if(o==="USERDEFINED"&&!r){const d=Object.keys(e).find(E=>/^((?!Predefined).)*Type$/.test(E));o=d?(u=e[d])==null?void 0:u.value:"USERDEFINED"}if(!o){const h=n.getEntityRelations(t,e.expressID,"IsTypedBy");if(h&&h[0]){const d=await t.getProperties(h[0]);if(d&&(o=(f=d.PredefinedType)==null?void 0:f.value,o==="USERDEFINED"&&!r)){const C=Object.keys(d).find(p=>/^((?!Predefined).)*Type$/.test(p));o=C?(I=d[C])==null?void 0:I.value:"USERDEFINED"}}}return this.evalRequirement(o,this.predefinedType,"PredefinedType",s)}}class Au extends Zs{constructor(t,e,s){super(t);S(this,"facetType","Property");S(this,"propertySet");S(this,"baseName");S(this,"value");S(this,"dataType");S(this,"uri");S(this,"_unsupportedTypes",[oa,aa]);this.propertySet=e,this.baseName=s}serialize(t){const e=Ce("PropertySet",this.propertySet),s=Ce("BaseName",this.baseName),n=Ce("Value",this.value),r=this.dataType?`dataType=${this.dataType}`:"";let o="";return t==="requirement"&&(o+=`cardinality="${this.cardinality}"`,o+=this.uri?`uri=${this.uri}`:"",o+=this.instructions?`instructions="${this.instructions}"`:""),` ${e} ${s} ${n} -`}async getEntities(t,e={}){var l,u;let s={};const n=await t.getAllPropertiesOfType(ei);s={...s,...n};const r=await t.getAllPropertiesOfType(Is);if(s={...s,...r},Object.keys(s).length===0)return[];const o=[];for(const f in s){const I=Number(f),h=await t.getProperties(I);if(!h||!(((l=h.Name)==null?void 0:l.value)===this.propertySet.parameter))continue;let E;if(h.type===ei&&(E="HasProperties"),h.type===Is&&(E="Quantities"),!!E)for(const C of h[E]){const p=await t.getProperties(C.value);if(!(!p||!(((u=p.Name)==null?void 0:u.value)===this.baseName.parameter))){if(this.value){const F=Object.keys(p).find(g=>g.endsWith("Value"));if(!F||!(p[F].value===this.value.parameter))continue}o.push(I)}}}const a=this.components.get(kt);for(const f of o){const I=a.getEntitiesWithRelation(t,"IsDefinedBy",f);for(const h of I){if(h in e)continue;const d=await t.getProperties(h);d&&(e[h]=d)}}return[]}async test(t,e){var n;this.testResult=[];for(const r in t){const o=Number(r),a=t[o],l=[],u={guid:(n=a.GlobalId)==null?void 0:n.value,expressID:o,pass:!1,checks:l,cardinality:this.cardinality};this.testResult.push(u);const I=(await this.getPsets(e,o)).filter(h=>{var E;return this.evalRequirement(((E=h.Name)==null?void 0:E.value)??null,this.propertySet,"PropertySet")?(l.push({currentValue:h.Name.value,parameter:"PropertySet",pass:!0,requiredValue:this.propertySet.parameter}),!0):!1});if(I.length===0){l.push({currentValue:null,parameter:"PropertySet",pass:!1,requiredValue:this.propertySet.parameter});continue}for(const h of I){const d=this.getItemsAttrName(h.type);if(!d){l.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}const C=h[d].filter(p=>{var F;return this._unsupportedTypes.includes(p.type)||!this.evalRequirement(((F=p.Name)==null?void 0:F.value)??null,this.baseName,"BaseName")?!1:(l.push({currentValue:p.Name.value,parameter:"BaseName",pass:!0,requiredValue:this.baseName.parameter}),!0)});if(C.length===0){l.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}for(const p of C)this.evalValue(p,l),this.evalDataType(p,l),this.evalURI()}u.pass=l.every(({pass:h})=>h)}const s=[...this.testResult];return this.testResult=[],s}getItemsAttrName(t){let e;return t===ei&&(e="HasProperties"),t===Is&&(e="Quantities"),e}getValueKey(t){return Object.keys(t).find(e=>e.endsWith("Value")||e.endsWith("Values"))}async getPsetProps(t,e,s){const n=structuredClone(e),r=[],o=n[s];if(!o)return r;for(const{value:a}of o){const l=await t.getProperties(a);l&&r.push(l)}return n[s]=r,n}async getTypePsets(t,e){const s=[],r=this.components.get(kt).getEntityRelations(t,e,"IsTypedBy");if(!(r&&r[0]))return s;const o=await t.getProperties(r[0]);if(!(o&&"HasPropertySets"in o&&Array.isArray(o.HasPropertySets)))return s;for(const{value:a}of o.HasPropertySets){const l=await t.getProperties(a);if(!(l&&"HasProperties"in l&&Array.isArray(l.HasProperties)))continue;const u=await this.getPsetProps(t,l,"HasProperties");s.push(u)}return s}async getPsets(t,e){const s=await this.getTypePsets(t,e),r=this.components.get(kt).getEntityRelations(t,e,"IsDefinedBy");if(!r)return s;for(const o of r){const a=await t.getProperties(o);if(!a)continue;const l=this.getItemsAttrName(a.type);if(!l)continue;const u=await this.getPsetProps(t,a,l);s.push(u)}return s}evalValue(t,e){const s=this.getValueKey(t),n=t[s];if(this.value){if(!n)return e==null||e.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:this.value.parameter}),!1;const r=structuredClone(this.value);if(n.name==="IFCLABEL"&&r.type==="simple"&&(r.parameter=String(r.parameter)),(t.type===ur||t.type===fr)&&Array.isArray(n)){const a=n.map(u=>u.value),l=n.find(u=>r?this.evalRequirement(u.value,r,"Value"):!1);return e==null||e.push({currentValue:a,pass:!!l,parameter:"Value",requiredValue:r.parameter}),!!l}return this.evalRequirement(n.value,r,"Value",e)}return s?n.type===3&&n.value===2?(e==null||e.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:null}),!1):n.type===1&&n.value.trim()===""?(e==null||e.push({parameter:"Value",currentValue:"",pass:!1,requiredValue:null}),!1):!0:!0}evalDataType(t,e){if(!this.dataType)return!0;const s=this.getValueKey(t),n=t[s];if(!n)return e==null||e.push({parameter:"DataType",currentValue:null,pass:!1,requiredValue:this.dataType}),!1;if((t.type===ur||t.type===fr)&&Array.isArray(n)&&n[0]){const o=n[0].name;return this.evalRequirement(o,{type:"simple",parameter:this.dataType},"DataType",e)}return this.evalRequirement(n.name,{type:"simple",parameter:this.dataType},"DataType",e)}evalURI(){return!0}}class Au{constructor(i,t,e){S(this,"name");S(this,"ifcVersion",new Set);S(this,"identifier",se.create());S(this,"description");S(this,"instructions");S(this,"requirementsDescription");S(this,"applicability",new Pe);S(this,"requirements",new Pe);S(this,"components");this.components=i,this.name=t;for(const s of e)this.ifcVersion.add(s)}set(i){const t=i,e=this;for(const n in i){if(n==="identifier")continue;const r=t[n];n in this&&(e[n]=r)}return this.components.get(Dn).list.set(this.identifier,this),this}async test(i){let t=[];if(this.requirements.size===0)return t;const e={};for(const n of this.applicability)await n.getEntities(i,e);return t=await[...this.requirements][0].test(e,i),t}serialize(){const i=`name="${this.name}"`,t=this.identifier?`identifier="${this.identifier}"`:"",e=this.description?`description="${this.description}"`:"",s=this.instructions?`instructions="${this.instructions}"`:"";return` +`}async getEntities(t,e={}){var l,u;let s={};const n=await t.getAllPropertiesOfType(ei);s={...s,...n};const r=await t.getAllPropertiesOfType(Es);if(s={...s,...r},Object.keys(s).length===0)return[];const o=[];for(const f in s){const I=Number(f),h=await t.getProperties(I);if(!h||!(((l=h.Name)==null?void 0:l.value)===this.propertySet.parameter))continue;let E;if(h.type===ei&&(E="HasProperties"),h.type===Es&&(E="Quantities"),!!E)for(const C of h[E]){const p=await t.getProperties(C.value);if(!(!p||!(((u=p.Name)==null?void 0:u.value)===this.baseName.parameter))){if(this.value){const F=Object.keys(p).find(g=>g.endsWith("Value"));if(!F||!(p[F].value===this.value.parameter))continue}o.push(I)}}}const a=this.components.get(kt);for(const f of o){const I=a.getEntitiesWithRelation(t,"IsDefinedBy",f);for(const h of I){if(h in e)continue;const d=await t.getProperties(h);d&&(e[h]=d)}}return[]}async test(t,e){var n;this.testResult=[];for(const r in t){const o=Number(r),a=t[o],l=[],u={guid:(n=a.GlobalId)==null?void 0:n.value,expressID:o,pass:!1,checks:l,cardinality:this.cardinality};this.testResult.push(u);const I=(await this.getPsets(e,o)).filter(h=>{var E;return this.evalRequirement(((E=h.Name)==null?void 0:E.value)??null,this.propertySet,"PropertySet")?(l.push({currentValue:h.Name.value,parameter:"PropertySet",pass:!0,requiredValue:this.propertySet.parameter}),!0):!1});if(I.length===0){l.push({currentValue:null,parameter:"PropertySet",pass:!1,requiredValue:this.propertySet.parameter});continue}for(const h of I){const d=this.getItemsAttrName(h.type);if(!d){l.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}const C=h[d].filter(p=>{var F;return this._unsupportedTypes.includes(p.type)||!this.evalRequirement(((F=p.Name)==null?void 0:F.value)??null,this.baseName,"BaseName")?!1:(l.push({currentValue:p.Name.value,parameter:"BaseName",pass:!0,requiredValue:this.baseName.parameter}),!0)});if(C.length===0){l.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}for(const p of C)this.evalValue(p,l),this.evalDataType(p,l),this.evalURI()}u.pass=l.every(({pass:h})=>h)}const s=[...this.testResult];return this.testResult=[],s}getItemsAttrName(t){let e;return t===ei&&(e="HasProperties"),t===Es&&(e="Quantities"),e}getValueKey(t){return Object.keys(t).find(e=>e.endsWith("Value")||e.endsWith("Values"))}async getPsetProps(t,e,s){const n=structuredClone(e),r=[],o=n[s];if(!o)return r;for(const{value:a}of o){const l=await t.getProperties(a);l&&r.push(l)}return n[s]=r,n}async getTypePsets(t,e){const s=[],r=this.components.get(kt).getEntityRelations(t,e,"IsTypedBy");if(!(r&&r[0]))return s;const o=await t.getProperties(r[0]);if(!(o&&"HasPropertySets"in o&&Array.isArray(o.HasPropertySets)))return s;for(const{value:a}of o.HasPropertySets){const l=await t.getProperties(a);if(!(l&&"HasProperties"in l&&Array.isArray(l.HasProperties)))continue;const u=await this.getPsetProps(t,l,"HasProperties");s.push(u)}return s}async getPsets(t,e){const s=await this.getTypePsets(t,e),r=this.components.get(kt).getEntityRelations(t,e,"IsDefinedBy");if(!r)return s;for(const o of r){const a=await t.getProperties(o);if(!a)continue;const l=this.getItemsAttrName(a.type);if(!l)continue;const u=await this.getPsetProps(t,a,l);s.push(u)}return s}evalValue(t,e){const s=this.getValueKey(t),n=t[s];if(this.value){if(!n)return e==null||e.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:this.value.parameter}),!1;const r=structuredClone(this.value);if(n.name==="IFCLABEL"&&r.type==="simple"&&(r.parameter=String(r.parameter)),(t.type===hr||t.type===Ir)&&Array.isArray(n)){const a=n.map(u=>u.value),l=n.find(u=>r?this.evalRequirement(u.value,r,"Value"):!1);return e==null||e.push({currentValue:a,pass:!!l,parameter:"Value",requiredValue:r.parameter}),!!l}return this.evalRequirement(n.value,r,"Value",e)}return s?n.type===3&&n.value===2?(e==null||e.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:null}),!1):n.type===1&&n.value.trim()===""?(e==null||e.push({parameter:"Value",currentValue:"",pass:!1,requiredValue:null}),!1):!0:!0}evalDataType(t,e){if(!this.dataType)return!0;const s=this.getValueKey(t),n=t[s];if(!n)return e==null||e.push({parameter:"DataType",currentValue:null,pass:!1,requiredValue:this.dataType}),!1;if((t.type===hr||t.type===Ir)&&Array.isArray(n)&&n[0]){const o=n[0].name;return this.evalRequirement(o,{type:"simple",parameter:this.dataType},"DataType",e)}return this.evalRequirement(n.name,{type:"simple",parameter:this.dataType},"DataType",e)}evalURI(){return!0}}class Fu{constructor(i,t,e){S(this,"name");S(this,"ifcVersion",new Set);S(this,"identifier",se.create());S(this,"description");S(this,"instructions");S(this,"requirementsDescription");S(this,"applicability",new Pe);S(this,"requirements",new Pe);S(this,"components");this.components=i,this.name=t;for(const s of e)this.ifcVersion.add(s)}set(i){const t=i,e=this;for(const n in i){if(n==="identifier")continue;const r=t[n];n in this&&(e[n]=r)}return this.components.get(bn).list.set(this.identifier,this),this}async test(i){let t=[];if(this.requirements.size===0)return t;const e={};for(const n of this.applicability)await n.getEntities(i,e);return t=await[...this.requirements][0].test(e,i),t}serialize(){const i=`name="${this.name}"`,t=this.identifier?`identifier="${this.identifier}"`:"",e=this.description?`description="${this.description}"`:"",s=this.instructions?`instructions="${this.instructions}"`:"";return` ${[...this.applicability].map(r=>r.serialize("applicability"))} ${[...this.requirements].map(r=>r.serialize("requirement"))} - `}}const Te=c=>{if(!c)return;const i={};if("simpleValue"in c&&(i.type="simple",i.parameter=c.simpleValue),"restriction"in c){const t=c.restriction;if("pattern"in t&&(i.type="pattern",i.parameter=t.pattern.value),"enumeration"in t){i.type="enumeration";const e=t.enumeration.map(({value:s})=>s);i.parameter=e}}if(i.parameter!==void 0)return i},Jr=(c,i)=>{const t=[];for(const e of i){const s=e.name,n=Te(s);if(!n)continue;const r=new mu(c,n);e.cardinality&&(r.cardinality=e.cardinality),r.predefinedType=Te(e.predefinedType),r.instructions=e.instructions,t.push(r)}return t},Fu=(c,i)=>{const t=[];for(const e of i){const s=e.name,n=Te(s);if(!n)continue;const r=new Cu(c,n);e.cardinality&&(r.cardinality=e.cardinality),r.value=Te(e.value),r.instructions=e.instructions,t.push(r)}return t},gu=(c,i)=>{const t=[];for(const e of i){const s=e.system,n=Te(s);if(!n)continue;const r=new Tu(c,n);e.cardinality&&(r.cardinality=e.cardinality);const o=Te(e.value);(o==null?void 0:o.type)==="simple"&&(o.parameter=String(o.parameter)),(o==null?void 0:o.type)==="enumeration"&&Array.isArray(o.parameter)&&(o.parameter=o.parameter.map(String)),r.value=o,r.uri=e.uri,r.instructions=e.instructions,t.push(r)}return t},Su=(c,i)=>{const t=[];for(const e of i){const s=e.propertySet,n=e.baseName,r=Te(s),o=Te(n);if(!(o&&r))continue;const a=new Ru(c,r,o);e.cardinality&&(a.cardinality=e.cardinality);const l=Te(e.value);(l==null?void 0:l.type)==="enumeration"&&Array.isArray(l.parameter)&&(l.parameter=l.parameter.map(String)),a.value=l,a.dataType=e.dataType,a.uri=e.uri,a.instructions=e.instructions,t.push(a)}return t},ti=class ti extends Mt{constructor(t){super(t);S(this,"enabled",!0);S(this,"list",new ie);t.add(ti.uuid,this)}getFragmentIdMap(t,e){const n=e.filter(u=>u.pass).map(u=>u.expressID),r=t.getFragmentMap(n),a=e.filter(u=>!u.pass).map(u=>u.expressID),l=t.getFragmentMap(a);return{pass:r,fail:l}}create(t,e,s){const n=new Au(this.components,t,e);return s&&(n.identifier=s),this.list.set(n.identifier,n),n}load(t){const e=[],s=ti.xmlParser.parse(t).ids,{specifications:n}=s;if(n&&n.specification){const r=Array.isArray(n.specification)?n.specification:[n.specification];for(const o of r){const{name:a,ifcVersion:l,description:u,instructions:f,identifier:I}=o;if(!(a&&l))continue;const h=[],d=[],{applicability:E,requirements:C}=o;if(E){const{maxOccurs:A,...F}=E,R=Array.isArray(F)?F:[F];for(const g of R)for(const N in g){const y=Array.isArray(g[N])?g[N]:[g[N]];if(N==="entity"){const w=Jr(this.components,y);h.push(...w)}}}let p;if(C){const{maxOccurs:A,...F}=C;p=C.description;const R=Array.isArray(F)?F:[F];for(const g of R)for(const N in g){const y=Array.isArray(g[N])?g[N]:[g[N]];if(N==="entity"){const w=Jr(this.components,y);d.push(...w)}if(N==="attribute"){const w=Fu(this.components,y);d.push(...w)}if(N==="classification"){const w=gu(this.components,y);d.push(...w)}if(N==="property"){const w=Su(this.components,y);d.push(...w)}}}if(h.length>0&&d.length>0){const A=this.create(a,l.split(/\s+/),I);A.description=u,A.instructions=f,A.requirementsDescription=p,A.applicability.add(...h),A.requirements.add(...d),e.push(A)}}}return e}export(t,e=this.list.values()){const s=e??this.list;return` - + `}}const Te=c=>{if(!c)return;const i={};if("simpleValue"in c&&(i.type="simple",i.parameter=c.simpleValue),"restriction"in c){const t=c.restriction;if("pattern"in t&&(i.type="pattern",i.parameter=t.pattern.value),"enumeration"in t){i.type="enumeration";const e=t.enumeration.map(({value:s})=>s);i.parameter=e}}if(i.parameter!==void 0)return i},eo=(c,i)=>{const t=[];for(const e of i){const s=e.name,n=Te(s);if(!n)continue;const r=new Ru(c,n);e.cardinality&&(r.cardinality=e.cardinality),r.predefinedType=Te(e.predefinedType),r.instructions=e.instructions,t.push(r)}return t},gu=(c,i)=>{const t=[];for(const e of i){const s=e.name,n=Te(s);if(!n)continue;const r=new Tu(c,n);e.cardinality&&(r.cardinality=e.cardinality),r.value=Te(e.value),r.instructions=e.instructions,t.push(r)}return t},Su=(c,i)=>{const t=[];for(const e of i){const s=e.system,n=Te(s);if(!n)continue;const r=new mu(c,n);e.cardinality&&(r.cardinality=e.cardinality);const o=Te(e.value);(o==null?void 0:o.type)==="simple"&&(o.parameter=String(o.parameter)),(o==null?void 0:o.type)==="enumeration"&&Array.isArray(o.parameter)&&(o.parameter=o.parameter.map(String)),r.value=o,r.uri=e.uri,r.instructions=e.instructions,t.push(r)}return t},Ou=(c,i)=>{const t=[];for(const e of i){const s=e.propertySet,n=e.baseName,r=Te(s),o=Te(n);if(!(o&&r))continue;const a=new Au(c,r,o);e.cardinality&&(a.cardinality=e.cardinality);const l=Te(e.value);(l==null?void 0:l.type)==="enumeration"&&Array.isArray(l.parameter)&&(l.parameter=l.parameter.map(String)),a.value=l,a.dataType=e.dataType,a.uri=e.uri,a.instructions=e.instructions,t.push(a)}return t},ti=class ti extends Mt{constructor(t){super(t);S(this,"enabled",!0);S(this,"list",new ie);t.add(ti.uuid,this)}getFragmentIdMap(t,e){const n=e.filter(u=>u.pass).map(u=>u.expressID),r=t.getFragmentMap(n),a=e.filter(u=>!u.pass).map(u=>u.expressID),l=t.getFragmentMap(a);return{pass:r,fail:l}}create(t,e,s){const n=new Fu(this.components,t,e);return s&&(n.identifier=s),this.list.set(n.identifier,n),n}load(t){const e=[],s=ti.xmlParser.parse(t).ids,{specifications:n}=s;if(n&&n.specification){const r=Array.isArray(n.specification)?n.specification:[n.specification];for(const o of r){const{name:a,ifcVersion:l,description:u,instructions:f,identifier:I}=o;if(!(a&&l))continue;const h=[],d=[],{applicability:E,requirements:C}=o;if(E){const{maxOccurs:A,...F}=E,R=Array.isArray(F)?F:[F];for(const g of R)for(const N in g){const y=Array.isArray(g[N])?g[N]:[g[N]];if(N==="entity"){const w=eo(this.components,y);h.push(...w)}}}let p;if(C){const{maxOccurs:A,...F}=C;p=C.description;const R=Array.isArray(F)?F:[F];for(const g of R)for(const N in g){const y=Array.isArray(g[N])?g[N]:[g[N]];if(N==="entity"){const w=eo(this.components,y);d.push(...w)}if(N==="attribute"){const w=gu(this.components,y);d.push(...w)}if(N==="classification"){const w=Su(this.components,y);d.push(...w)}if(N==="property"){const w=Ou(this.components,y);d.push(...w)}}}if(h.length>0&&d.length>0){const A=this.create(a,l.split(/\s+/),I);A.description=u,A.instructions=f,A.requirementsDescription=p,A.applicability.add(...h),A.requirements.add(...d),e.push(A)}}}return e}export(t,e=this.list.values()){const s=e??this.list;return` + ${t.title} ${t.copyright?`${t.copyright}`:""} @@ -209,4 +209,4 @@ ${i} ${[...s].map(r=>r.serialize()).join(` `)} -`}};S(ti,"uuid","9f0b9f78-9b2e-481a-b766-2fbfd01f342c"),S(ti,"xmlParser",new go.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let Dn=ti;export{_t as B,Rs as C,ni as D,tt as E,Nn as I,Jn as S,gs as T,se as U,te as V,As as W,Dn as a,mu as b,Ru as c,kt as d,ii as e,yn as f,Ec as g,Ws as h,vi as i,Mt as j}; +`}};S(ti,"uuid","9f0b9f78-9b2e-481a-b766-2fbfd01f342c"),S(ti,"xmlParser",new So.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let bn=ti;export{_t as B,Fs as C,ni as D,tt as E,Pn as I,er as S,Os as T,se as U,te as V,gs as W,bn as a,Ru as b,Au as c,kt as d,ii as e,Ln as f,dc as g,Xs as h,vi as i,Mt as j}; diff --git a/examples/assets/index-lUHwa_Wd.js b/examples/assets/index-BdoCSKf7.js similarity index 63% rename from examples/assets/index-lUHwa_Wd.js rename to examples/assets/index-BdoCSKf7.js index b63710f6..33699eed 100644 --- a/examples/assets/index-lUHwa_Wd.js +++ b/examples/assets/index-BdoCSKf7.js @@ -1,13 +1,13 @@ -import{V as P,p as Se,t as ti,u as tt,T as hi,S as gi,v as Fe,a as ee,w as La,q as Ce,o as Je,x as Bc,y as As,z as So,n as ne,E as zc,W as Ot,H as Ci,J as Rn,b as st,s as It,K as _t,C as _e,N as Ln,Q as ii,P as Pa,U as Ii,X as kc,Y as at,Z as Xi,_ as Vc,$ as Pn,a0 as He,O as Yi,L as si,a1 as Xe,B as Be,a2 as Gi,a3 as Ps,a4 as De,a5 as $i,a6 as Yc,a7 as Ma,a8 as di,I as Xr,a9 as jr,aa as Zr,ab as Mn,ac as Ti,ad as Gc,ae as Hi,af as Sn,f as Hc,ag as Dn,ah as xn,ai as Wc,aj as Xc,ak as jc,al as Zc,am as Qc,an as Da,ao as xa,ap as Qr,aq as Kr,ar as qr,as as ys,at as Jr,au as $r,av as eo,aw as to,ax as io,ay as so,az as no,aA as ro,aB as oo,aC as qt,aD as Ft,d as Vi,e as un,aE as Zt,aF as Kc,aG as qc,aH as Jc,aI as $c,aJ as eh,aK as vn,aL as _a,aM as th,aN as ih,aO as wn,aP as Ua,aQ as Ba,g as Lt,aR as Ri,aS as sh,aT as nh,aU as vo,aV as wo,aW as fn,aX as pn,aY as ao,aZ as rh,a_ as pr,a$ as Bi,b0 as oh,b1 as ah,b2 as lh,b3 as ch,r as hh,b4 as lo,b5 as dh,b6 as uh,b7 as za,b8 as xt,b9 as es,ba as fh,bb as ph,bc as mh,bd as Ih,be as Eh,bf as Fo,bg as gh,bh as Ch,bi as Th,G as Fn,bj as Rh,bk as Sh,bl as vh}from"./web-ifc-api-CpQ3aV8c.js";var wh=Object.defineProperty,Fh=(c,e,t)=>e in c?wh(c,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[e]=t,F=(c,e,t)=>(Fh(c,typeof e!="symbol"?e+"":e,t),t),Ah=Object.defineProperty,yh=(c,e,t)=>e in c?Ah(c,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[e]=t,T=(c,e,t)=>(yh(c,typeof e!="symbol"?e+"":e,t),t);const ka=0,Oh=1,Nh=2,Ao=2,Wn=1.25,yo=1,mn=6*4+4+4,_n=65535,bh=Math.pow(2,-24),Xn=Symbol("SKIP_GENERATION");function Lh(c){return c.index?c.index.count:c.attributes.position.count}function ji(c){return Lh(c)/3}function Ph(c,e=ArrayBuffer){return c>65535?new Uint32Array(new e(4*c)):new Uint16Array(new e(2*c))}function Mh(c,e){if(!c.index){const t=c.attributes.position.count,i=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,s=Ph(t,i);c.setIndex(new Je(s,1));for(let n=0;no-a);for(let o=0;on.offset-r.offset),i=t[t.length-1];i.count=Math.min(e-i.offset,i.count);let s=0;return t.forEach(({count:n})=>s+=n),e!==s}function Ne(c,e,t){return t.min.x=e[c],t.min.y=e[c+1],t.min.z=e[c+2],t.max.x=e[c+3],t.max.y=e[c+4],t.max.z=e[c+5],t}function xh(c){c[0]=c[1]=c[2]=1/0,c[3]=c[4]=c[5]=-1/0}function Oo(c){let e=-1,t=-1/0;for(let i=0;i<3;i++){const s=c[i+3]-c[i];s>t&&(t=s,e=i)}return e}function No(c,e){e.set(c)}function bo(c,e,t){let i,s;for(let n=0;n<3;n++){const r=n+3;i=c[n],s=e[n],t[n]=is?i:s}}function Ms(c,e,t){for(let i=0;i<3;i++){const s=e[c+2*i],n=e[c+2*i+1],r=s-n,o=s+n;rt[i+3]&&(t[i+3]=o)}}function ts(c){const e=c[3]-c[0],t=c[4]-c[1],i=c[5]-c[2];return 2*(e*t+t*i+i*e)}function jn(c,e,t,i,s=null){let n=1/0,r=1/0,o=1/0,a=-1/0,l=-1/0,h=-1/0,d=1/0,u=1/0,f=1/0,m=-1/0,p=-1/0,I=-1/0;const E=s!==null;for(let g=e*6,v=(e+t)*6;ga&&(a=y),E&&Cm&&(m=C);const L=c[g+2],N=c[g+3],x=L-N,_=L+N;xl&&(l=_),E&&Lp&&(p=L);const A=c[g+4],D=c[g+5],R=A-D,B=A+D;Rh&&(h=B),E&&AI&&(I=A)}i[0]=n,i[1]=r,i[2]=o,i[3]=a,i[4]=l,i[5]=h,E&&(s[0]=d,s[1]=u,s[2]=f,s[3]=m,s[4]=p,s[5]=I)}function _h(c,e,t,i){let s=1/0,n=1/0,r=1/0,o=-1/0,a=-1/0,l=-1/0;for(let h=e*6,d=(e+t)*6;ho&&(o=u);const f=c[h+2];fa&&(a=f);const m=c[h+4];ml&&(l=m)}i[0]=s,i[1]=n,i[2]=r,i[3]=o,i[4]=a,i[5]=l}function Uh(c,e){xh(e);const t=c.attributes.position,i=c.index?c.index.array:null,s=ji(c),n=new Float32Array(s*6),r=t.normalized,o=t.array,a=t.offset||0;let l=3;t.isInterleavedBufferAttribute&&(l=t.data.stride);const h=["getX","getY","getZ"];for(let d=0;dO&&(O=v),C>O&&(O=C);const y=(O-w)/2,L=E*2;n[f+L+0]=w+y,n[f+L+1]=y+(Math.abs(w)+y)*bh,we[E+3]&&(e[E+3]=O)}}return n}const Pt=32,Bh=(c,e)=>c.candidate-e.candidate,Ht=new Array(Pt).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),Ds=new Float32Array(6);function zh(c,e,t,i,s,n){let r=-1,o=0;if(n===ka)r=Oo(e),r!==-1&&(o=(e[r]+e[r+3])/2);else if(n===Oh)r=Oo(c),r!==-1&&(o=kh(t,i,s,r));else if(n===Nh){const a=ts(c);let l=Wn*s;const h=i*6,d=(i+s)*6;for(let u=0;u<3;u++){const f=e[u],m=(e[u+3]-f)/Pt;if(s=w.candidate?Ms(g,t,w.rightCacheBounds):(Ms(g,t,w.leftCacheBounds),w.count++)}}for(let g=0;g=Pt&&(g=Pt-1);const v=Ht[g];v.count++,Ms(E,t,v.bounds)}const p=Ht[Pt-1];No(p.bounds,p.rightCacheBounds);for(let E=Pt-2;E>=0;E--){const g=Ht[E],v=Ht[E+1];bo(g.bounds,v.rightCacheBounds,g.rightCacheBounds)}let I=0;for(let E=0;E=a;)o--;if(r=a;)o--;if(r2**16,s=i?4:2,n=e?new SharedArrayBuffer(t*s):new ArrayBuffer(t*s),r=i?new Uint32Array(n):new Uint16Array(n);for(let o=0,a=r.length;o=s&&(d=!0,n&&(console.warn(`MeshBVH: Max depth of ${s} reached when generating BVH. Consider increasing maxDepth.`),console.warn(t))),O<=r||L>=s)return g(w+O),C.offset=w,C.count=O,C;const N=zh(C.boundingData,y,m,w,O,o);if(N.axis===-1)return g(w+O),C.offset=w,C.count=O,C;const x=p(h,i,m,w,O,N);if(x===w||x===w+O)g(w+O),C.offset=w,C.count=O;else{C.splitAxis=N.axis;const _=new xs,A=w,D=x-w;C.left=_,_.boundingData=new Float32Array(6),jn(m,A,D,_.boundingData,f),v(_,A,D,f,L+1);const R=new xs,B=x,W=O-D;C.right=R,R.boundingData=new Float32Array(6),jn(m,B,W,R.boundingData,f),v(R,B,W,f,L+1)}return C}}function Wh(c,e){const t=c.geometry;e.indirect&&(c._indirectBuffer=Gh(t,e.useSharedArrayBuffer),Dh(t)&&!e.verbose&&console.warn('MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),c._indirectBuffer||Mh(t,e);const i=Hh(c,e);let s,n,r;const o=[],a=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let d=0;dMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return n[f+6]=C/4,C=h(C,g),n[f+7]=v,C}}}class Yt{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let i=1/0,s=-1/0;for(let n=0,r=e.length;ns?o:s}this.min=i,this.max=s}setFromPoints(e,t){let i=1/0,s=-1/0;for(let n=0,r=t.length;ns?a:s}this.min=i,this.max=s}isSeparated(e){return this.min>e.max||e.min>this.max}}Yt.prototype.setFromBox=function(){const c=new P;return function(e,t){const i=t.min,s=t.max;let n=1/0,r=-1/0;for(let o=0;o<=1;o++)for(let a=0;a<=1;a++)for(let l=0;l<=1;l++){c.x=i.x*o+s.x*(1-o),c.y=i.y*a+s.y*(1-a),c.z=i.z*l+s.z*(1-l);const h=e.dot(c);n=Math.min(h,n),r=Math.max(h,r)}this.min=n,this.max=r}}();const Xh=function(){const c=new P,e=new P,t=new P;return function(i,s,n){const r=i.start,o=c,a=s.start,l=e;t.subVectors(r,a),c.subVectors(i.end,i.start),e.subVectors(s.end,s.start);const h=t.dot(l),d=l.dot(o),u=l.dot(l),f=t.dot(o),m=o.dot(o)*u-d*d;let p,I;m!==0?p=(h*d-f*u)/m:p=0,I=(h+p*d)/u,n.x=p,n.y=I}}(),co=function(){const c=new Se,e=new P,t=new P;return function(i,s,n,r){Xh(i,s,c);let o=c.x,a=c.y;if(o>=0&&o<=1&&a>=0&&a<=1){i.at(o,n),s.at(a,r);return}else if(o>=0&&o<=1){a<0?s.at(0,r):s.at(1,r),i.closestPointToPoint(r,!0,n);return}else if(a>=0&&a<=1){o<0?i.at(0,n):i.at(1,n),s.closestPointToPoint(n,!0,r);return}else{let l;o<0?l=i.start:l=i.end;let h;a<0?h=s.start:h=s.end;const d=e,u=t;if(i.closestPointToPoint(h,!0,e),s.closestPointToPoint(l,!0,t),d.distanceToSquared(h)<=u.distanceToSquared(l)){n.copy(d),r.copy(h);return}else{n.copy(l),r.copy(u);return}}}}(),jh=function(){const c=new P,e=new P,t=new ti,i=new tt;return function(s,n){const{radius:r,center:o}=s,{a,b:l,c:h}=n;if(i.start=a,i.end=l,i.closestPointToPoint(o,!0,c).distanceTo(o)<=r||(i.start=a,i.end=h,i.closestPointToPoint(o,!0,c).distanceTo(o)<=r)||(i.start=l,i.end=h,i.closestPointToPoint(o,!0,c).distanceTo(o)<=r))return!0;const d=n.getPlane(t);if(Math.abs(d.distanceToPoint(o))<=r){const u=d.projectPoint(o,e);if(n.containsPoint(u))return!0}return!1}}(),Zh=1e-15;function Zn(c){return Math.abs(c)new P),this.satBounds=new Array(4).fill().map(()=>new Yt),this.points=[this.a,this.b,this.c],this.sphere=new gi,this.plane=new ti,this.needsUpdate=!0}intersectsSphere(e){return jh(e,this)}update(){const e=this.a,t=this.b,i=this.c,s=this.points,n=this.satAxes,r=this.satBounds,o=n[0],a=r[0];this.getNormal(o),a.setFromPoints(o,s);const l=n[1],h=r[1];l.subVectors(e,t),h.setFromPoints(l,s);const d=n[2],u=r[2];d.subVectors(t,i),u.setFromPoints(d,s);const f=n[3],m=r[3];f.subVectors(i,e),m.setFromPoints(f,s),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,e),this.needsUpdate=!1}}Et.prototype.closestPointToSegment=function(){const c=new P,e=new P,t=new tt;return function(i,s=null,n=null){const{start:r,end:o}=i,a=this.points;let l,h=1/0;for(let d=0;d<3;d++){const u=(d+1)%3;t.start.copy(a[d]),t.end.copy(a[u]),co(t,i,c,e),l=c.distanceToSquared(e),l=2){(C===1?E.start:E.end).copy(f),v=2;break}if(v++,v===2&&C===-1)break}}return v}return function(p,I=null,E=!1){this.needsUpdate&&this.update(),p.isExtendedTriangle?p.needsUpdate&&p.update():(c.copy(p),c.update(),p=c);const g=this.plane,v=p.plane;if(Math.abs(g.normal.dot(v.normal))>1-1e-10){const C=this.satBounds,w=this.satAxes;t[0]=p.a,t[1]=p.b,t[2]=p.c;for(let L=0;L<4;L++){const N=C[L],x=w[L];if(i.setFromPoints(x,t),N.isSeparated(i))return!1}const O=p.satBounds,y=p.satAxes;e[0]=this.a,e[1]=this.b,e[2]=this.c;for(let L=0;L<4;L++){const N=O[L],x=y[L];if(i.setFromPoints(x,e),N.isSeparated(i))return!1}for(let L=0;L<4;L++){const N=w[L];for(let x=0;x<4;x++){const _=y[x];if(n.crossVectors(N,_),i.setFromPoints(n,e),s.setFromPoints(n,t),i.isSeparated(s))return!1}}return I&&(E||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),I.start.set(0,0,0),I.end.set(0,0,0)),!0}else{const C=m(this,v,d);if(C===1&&p.containsPoint(d.end))return I&&(I.start.copy(d.end),I.end.copy(d.end)),!0;if(C!==2)return!1;const w=m(p,g,u);if(w===1&&this.containsPoint(u.end))return I&&(I.start.copy(u.end),I.end.copy(u.end)),!0;if(w!==2)return!1;if(d.delta(o),u.delta(a),o.dot(a)<0){let A=u.start;u.start=u.end,u.end=A}const O=d.start.dot(o),y=d.end.dot(o),L=u.start.dot(o),N=u.end.dot(o),x=y0?I.start.copy(d.start):I.start.copy(u.start),l.subVectors(d.end,u.end),l.dot(o)<0?I.end.copy(d.end):I.end.copy(u.end)),!0)}}}();Et.prototype.distanceToPoint=function(){const c=new P;return function(e){return this.closestPointToPoint(e,c),e.distanceTo(c)}}();Et.prototype.distanceToTriangle=function(){const c=new P,e=new P,t=["a","b","c"],i=new tt,s=new tt;return function(n,r=null,o=null){const a=r||o?i:null;if(this.intersectsTriangle(n,a))return(r||o)&&(r&&a.getCenter(r),o&&a.getCenter(o)),0;let l=1/0;for(let h=0;h<3;h++){let d;const u=t[h],f=n[u];this.closestPointToPoint(f,c),d=f.distanceToSquared(c),dnew P),this.satAxes=new Array(3).fill().map(()=>new P),this.satBounds=new Array(3).fill().map(()=>new Yt),this.alignedSatBounds=new Array(3).fill().map(()=>new Yt),this.needsUpdate=!1,e&&this.min.copy(e),t&&this.max.copy(t),i&&this.matrix.copy(i)}set(e,t,i){this.min.copy(e),this.max.copy(t),this.matrix.copy(i),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}Qe.prototype.update=function(){return function(){const c=this.matrix,e=this.min,t=this.max,i=this.points;for(let a=0;a<=1;a++)for(let l=0;l<=1;l++)for(let h=0;h<=1;h++){const d=1*a|2*l|4*h,u=i[d];u.x=a?t.x:e.x,u.y=l?t.y:e.y,u.z=h?t.z:e.z,u.applyMatrix4(c)}const s=this.satBounds,n=this.satAxes,r=i[0];for(let a=0;a<3;a++){const l=n[a],h=s[a],d=1<new tt),t=new Array(12).fill().map(()=>new tt),i=new P,s=new P;return function(n,r=0,o=null,a=null){if(this.needsUpdate&&this.update(),this.intersectsBox(n))return(o||a)&&(n.getCenter(s),this.closestPointToPoint(s,i),n.closestPointToPoint(i,s),o&&o.copy(i),a&&a.copy(s)),0;const l=r*r,h=n.min,d=n.max,u=this.points;let f=1/0;for(let p=0;p<8;p++){const I=u[p];s.copy(I).clamp(h,d);const E=I.distanceToSquared(s);if(Enew Et)}}const lt=new Qh;function $e(c,e){return e[c+15]===65535}function et(c,e){return e[c+6]}function ct(c,e){return e[c+14]}function ht(c){return c+8}function dt(c,e){return e[c+6]}function Ga(c,e){return e[c+7]}class Kh{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const e=[];let t=null;this.setBuffer=i=>{t&&e.push(t),t=i,this.float32Array=new Float32Array(i),this.uint16Array=new Uint16Array(i),this.uint32Array=new Uint32Array(i)},this.clearBuffer=()=>{t=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,e.length!==0&&this.setBuffer(e.pop())}}}const Ae=new Kh;let Kt,zi;const Si=[],_s=new ho(()=>new Fe);function qh(c,e,t,i,s,n){Kt=_s.getPrimitive(),zi=_s.getPrimitive(),Si.push(Kt,zi),Ae.setBuffer(c._roots[e]);const r=mr(0,c.geometry,t,i,s,n);Ae.clearBuffer(),_s.releasePrimitive(Kt),_s.releasePrimitive(zi),Si.pop(),Si.pop();const o=Si.length;return o>0&&(zi=Si[o-1],Kt=Si[o-2]),r}function mr(c,e,t,i,s=null,n=0,r=0){const{float32Array:o,uint16Array:a,uint32Array:l}=Ae;let h=c*2;if($e(h,a)){const d=et(c,l),u=ct(h,a);return Ne(c,o,Kt),i(d,u,!1,r,n+c,Kt)}else{let d=function(_){const{uint16Array:A,uint32Array:D}=Ae;let R=_*2;for(;!$e(R,A);)_=ht(_),R=_*2;return et(_,D)},u=function(_){const{uint16Array:A,uint32Array:D}=Ae;let R=_*2;for(;!$e(R,A);)_=dt(_,D),R=_*2;return et(_,D)+ct(R,A)};const f=ht(c),m=dt(c,l);let p=f,I=m,E,g,v,C;if(s&&(v=Kt,C=zi,Ne(p,o,v),Ne(I,o,C),E=s(v),g=s(C),g(is.copy(e).clamp(h.min,h.max),is.distanceToSquared(e)),intersectsBounds:(h,d,u)=>u{h.closestPointToPoint(e,is);const u=e.distanceToSquared(is);return u0&&l.normal.multiplyScalar(-1));const h={a:n,b:r,c:o,normal:new P,materialIndex:0};hi.getNormal(vi,wi,Fi,h.normal),l.face=h,l.faceIndex=n}return l}function Un(c,e,t,i,s){const n=i*3;let r=n+0,o=n+1,a=n+2;const l=c.index;c.index&&(r=l.getX(r),o=l.getX(o),a=l.getX(a));const{position:h,normal:d,uv:u,uv1:f}=c.attributes,m=ed(t,h,d,u,f,r,o,a,e);return m?(m.faceIndex=i,s&&s.push(m),m):null}function xe(c,e,t,i){const s=c.a,n=c.b,r=c.c;let o=e,a=e+1,l=e+2;t&&(o=t.getX(o),a=t.getX(a),l=t.getX(l)),s.x=i.getX(o),s.y=i.getY(o),s.z=i.getZ(o),n.x=i.getX(a),n.y=i.getY(a),n.z=i.getZ(a),r.x=i.getX(l),r.y=i.getY(l),r.z=i.getZ(l)}function td(c,e,t,i,s,n){const{geometry:r,_indirectBuffer:o}=c;for(let a=i,l=i+s;aw&&(w=_),AO&&(O=A),Dy&&(y=D)}return a[u+0]!==g||a[u+1]!==v||a[u+2]!==C||a[u+3]!==w||a[u+4]!==O||a[u+5]!==y?(a[u+0]=g,a[u+1]=v,a[u+2]=C,a[u+3]=w,a[u+4]=O,a[u+5]=y,!0):!1}else{const I=u+8,E=r[u+6],g=I+f,v=E+f;let C=m,w=!1,O=!1;e?C||(w=e.has(g),O=e.has(v),C=!w&&!O):(w=!0,O=!0);const y=C||w,L=C||O;let N=!1;y&&(N=d(I,f,C));let x=!1;L&&(x=d(E,f,C));const _=N||x;if(_)for(let A=0;A<3;A++){const D=I+A,R=E+A,B=a[D],W=a[D+3],z=a[R],q=a[R+3];a[u+A]=Bq?W:q}return _}}}const Do=new Fe;function $t(c,e,t,i){return Ne(c,e,Do),t.intersectBox(Do,i)}function rd(c,e,t,i,s,n){const{geometry:r,_indirectBuffer:o}=c;for(let a=i,l=i+s;a=0;let d,u;h?(d=ht(c),u=dt(c,r)):(d=dt(c,r),u=ht(c));const f=$t(d,s,i,_o)?Er(d,e,t,i):null;if(f){const p=f.point[l];if(h?p<=s[u+a]:p>=s[u+a+3])return f}const m=$t(u,s,i,_o)?Er(u,e,t,i):null;return f&&m?f.distance<=m.distance?f:m:f||m||null}}const Vs=new Fe,Ai=new Et,yi=new Et,ss=new ne,Uo=new Qe,Ys=new Qe;function dd(c,e,t,i){Ae.setBuffer(c._roots[e]);const s=gr(0,c,t,i);return Ae.clearBuffer(),s}function gr(c,e,t,i,s=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Ae;let a=c*2;if(s===null&&(t.boundingBox||t.computeBoundingBox(),Uo.set(t.boundingBox.min,t.boundingBox.max,i),s=Uo),$e(a,r)){const l=e.geometry,h=l.index,d=l.attributes.position,u=t.index,f=t.attributes.position,m=et(c,o),p=ct(a,r);if(ss.copy(i).invert(),t.boundsTree)return Ne(c,n,Ys),Ys.matrix.copy(ss),Ys.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:I=>Ys.intersectsBox(I),intersectsTriangle:I=>{I.a.applyMatrix4(i),I.b.applyMatrix4(i),I.c.applyMatrix4(i),I.needsUpdate=!0;for(let E=m*3,g=(p+m)*3;EKn.distanceToBox(w),intersectsBounds:(w,O,y)=>y{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:y=>ns.distanceToBox(y),intersectsBounds:(y,L,N)=>N{for(let N=y,x=y+L;Nw&&(w=D),RO&&(O=R),By&&(y=B)}}return a[u+0]!==g||a[u+1]!==v||a[u+2]!==C||a[u+3]!==w||a[u+4]!==O||a[u+5]!==y?(a[u+0]=g,a[u+1]=v,a[u+2]=C,a[u+3]=w,a[u+4]=O,a[u+5]=y,!0):!1}else{const I=u+8,E=r[u+6],g=I+f,v=E+f;let C=m,w=!1,O=!1;e?C||(w=e.has(g),O=e.has(v),C=!w&&!O):(w=!0,O=!0);const y=C||w,L=C||O;let N=!1;y&&(N=d(I,f,C));let x=!1;L&&(x=d(E,f,C));const _=N||x;if(_)for(let A=0;A<3;A++){const D=I+A,R=E+A,B=a[D],W=a[D+3],z=a[R],q=a[R+3];a[u+A]=Bq?W:q}return _}}}const Bo=new P;function gd(c,e,t,i,s){Ae.setBuffer(c._roots[e]),Cr(0,c,t,i,s),Ae.clearBuffer()}function Cr(c,e,t,i,s){const{float32Array:n,uint16Array:r,uint32Array:o}=Ae,a=c*2;if($e(a,r)){const l=et(c,o),h=ct(a,r);rd(e,t,i,l,h,s)}else{const l=ht(c);$t(l,n,i,Bo)&&Cr(l,e,t,i,s);const h=dt(c,o);$t(h,n,i,Bo)&&Cr(h,e,t,i,s)}}const zo=new P,Cd=["x","y","z"];function Td(c,e,t,i){Ae.setBuffer(c._roots[e]);const s=Tr(0,c,t,i);return Ae.clearBuffer(),s}function Tr(c,e,t,i){const{float32Array:s,uint16Array:n,uint32Array:r}=Ae;let o=c*2;if($e(o,n)){const a=et(c,r),l=ct(o,n);return od(e,t,i,a,l)}else{const a=Ga(c,r),l=Cd[a],h=i.direction[l]>=0;let d,u;h?(d=ht(c),u=dt(c,r)):(d=dt(c,r),u=ht(c));const f=$t(d,s,i,zo)?Tr(d,e,t,i):null;if(f){const p=f.point[l];if(h?p<=s[u+a]:p>=s[u+a+3])return f}const m=$t(u,s,i,zo)?Tr(u,e,t,i):null;return f&&m?f.distance<=m.distance?f:m:f||m||null}}const Hs=new Fe,Oi=new Et,Ni=new Et,rs=new ne,ko=new Qe,Ws=new Qe;function Rd(c,e,t,i){Ae.setBuffer(c._roots[e]);const s=Rr(0,c,t,i);return Ae.clearBuffer(),s}function Rr(c,e,t,i,s=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Ae;let a=c*2;if(s===null&&(t.boundingBox||t.computeBoundingBox(),ko.set(t.boundingBox.min,t.boundingBox.max,i),s=ko),$e(a,r)){const l=e.geometry,h=l.index,d=l.attributes.position,u=t.index,f=t.attributes.position,m=et(c,o),p=ct(a,r);if(rs.copy(i).invert(),t.boundsTree)return Ne(c,n,Ws),Ws.matrix.copy(rs),Ws.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:I=>Ws.intersectsBox(I),intersectsTriangle:I=>{I.a.applyMatrix4(i),I.b.applyMatrix4(i),I.c.applyMatrix4(i),I.needsUpdate=!0;for(let E=m,g=p+m;Eqn.distanceToBox(w),intersectsBounds:(w,O,y)=>y{if(e.boundsTree){const y=e.boundsTree;return y.shapecast({boundsTraverseOrder:L=>os.distanceToBox(L),intersectsBounds:(L,N,x)=>x{for(let x=L,_=L+N;x<_;x++){const A=y.resolveTriangleIndex(x);xe(f,3*A,d,h),f.a.applyMatrix4(t),f.b.applyMatrix4(t),f.c.applyMatrix4(t),f.needsUpdate=!0;for(let D=w,R=w+O;Dnew Fe),bi=new Fe,Li=new Fe,Jn=new Fe,$n=new Fe;let er=!1;function Od(c,e,t,i){if(er)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");er=!0;const s=c._roots,n=e._roots;let r,o=0,a=0;const l=new ne().copy(t).invert();for(let h=0,d=s.length;ha.slice()),index:r.array.slice(),indirectBuffer:n?n.slice():null}:o={roots:s,index:r.array,indirectBuffer:n},o}static deserialize(e,t,i={}){i={setIndex:!0,indirect:!!e.indirectBuffer,...i};const{index:s,roots:n,indirectBuffer:r}=e,o=new uo(t,{...i,[Xn]:!0});if(o._roots=n,o._indirectBuffer=r||null,i.setIndex){const a=t.getIndex();if(a===null){const l=new Je(e.index,1,!1);t.setIndex(l)}else a.array!==s&&(a.array.set(s),a.needsUpdate=!0)}return o}get indirect(){return!!this._indirectBuffer}constructor(e,t={}){if(e.isBufferGeometry){if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(t=Object.assign({strategy:ka,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,indirect:!1,[Xn]:!1},t),t.useSharedArrayBuffer&&!yd())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=e,this._roots=null,this._indirectBuffer=null,t[Xn]||(Wh(this,t),!e.boundingBox&&t.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new Fe)));const{_indirectBuffer:i}=this;this.resolveTriangleIndex=t.indirect?s=>i[s]:s=>s}refit(e=null){return(this.indirect?Ed:nd)(this,e)}traverse(e,t=0){const i=this._roots[t],s=new Uint32Array(i),n=new Uint16Array(i);r(0);function r(o,a=0){const l=o*2,h=n[l+15]===_n;if(h){const d=s[o+6],u=n[l+14];e(a,h,new Float32Array(i,o*4,6),d,u)}else{const d=o+mn/4,u=s[o+6],f=s[o+7];e(a,h,new Float32Array(i,o*4,6),f)||(r(d,a+1),r(u,a+1))}}}raycast(e,t=So){const i=this._roots,s=this.geometry,n=[],r=t.isMaterial,o=Array.isArray(t),a=s.groups,l=r?t.side:t,h=this.indirect?gd:ld;for(let d=0,u=i.length;dd(u,f,m,p,I)?!0:i(u,f,this,o,m,p,t)}else r||(o?r=(d,u,f,m)=>i(d,u,this,o,f,m,t):r=(d,u,f)=>f);let a=!1,l=0;const h=this._roots;for(let d=0,u=h.length;d{const p=this.resolveTriangleIndex(m);xe(r,p*3,o,a)}:m=>{xe(r,m*3,o,a)},h=lt.getPrimitive(),d=e.geometry.index,u=e.geometry.attributes.position,f=e.indirect?m=>{const p=e.resolveTriangleIndex(m);xe(h,p*3,d,u)}:m=>{xe(h,m*3,d,u)};if(n){const m=(p,I,E,g,v,C,w,O)=>{for(let y=E,L=E+g;yjs.intersectsBox(i),intersectsTriangle:i=>js.intersectsTriangle(i)})}intersectsSphere(e){return this.shapecast({intersectsBounds:t=>e.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(e)})}closestPointToGeometry(e,t,i={},s={},n=0,r=1/0){return(this.indirect?Ad:Id)(this,e,t,i,s,n,r)}closestPointToPoint(e,t={},i=0,s=1/0){return Jh(this,e,t,i,s)}getBoundingBox(e){return e.makeEmpty(),this._roots.forEach(t=>{Ne(0,new Float32Array(t),Vo),e.union(Vo)}),e}}function Yo(c,e,t){return c===null||(c.point.applyMatrix4(e.matrixWorld),c.distance=c.point.distanceTo(t.ray.origin),c.object=e,c.distancet.far)?null:c}const tr=new zc,Go=new ne,Nd=ee.prototype.raycast;function bd(c,e){if(this.geometry.boundsTree){if(this.material===void 0)return;Go.copy(this.matrixWorld).invert(),tr.copy(c.ray).applyMatrix4(Go);const t=this.geometry.boundsTree;if(c.firstHitOnly===!0){const i=Yo(t.raycastFirst(tr,this.material),this,c);i&&e.push(i)}else{const i=t.raycast(tr,this.material);for(let s=0,n=i.length;s{const t=this.handlers.slice(0);for(const i of t)i(e)}),T(this,"handlers",[])}add(e){this.handlers.push(e)}remove(e){this.handlers=this.handlers.filter(t=>t!==e)}reset(){this.handlers.length=0}}class Ut{constructor(){T(this,"trigger",async e=>{const t=this.handlers.slice(0);for(const i of t)await i(e)}),T(this,"handlers",[])}add(e){this.handlers.push(e)}remove(e){this.handlers=this.handlers.filter(t=>t!==e)}reset(){this.handlers.length=0}}class fo{constructor(e){T(this,"isDisposeable",()=>"dispose"in this&&"onDisposed"in this),T(this,"isResizeable",()=>"resize"in this&&"getSize"in this),T(this,"isUpdateable",()=>"onAfterUpdate"in this&&"onBeforeUpdate"in this&&"update"in this),T(this,"isHideable",()=>"visible"in this),T(this,"isConfigurable",()=>"setup"in this&&"config"in this&&"onSetup"in this),this.components=e}}class de extends fo{}class Ha extends fo{constructor(e){super(e),T(this,"worlds",new Map),T(this,"onWorldChanged",new Y),T(this,"currentWorld",null),this.onWorldChanged.add(({world:t,action:i})=>{i==="removed"&&this.worlds.delete(t.uuid)})}}class Md extends Ha{constructor(){super(...arguments),T(this,"hasCameraControls",()=>"controls"in this)}}class Dd extends Ha{constructor(){super(...arguments),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onDisposed",new Y),T(this,"onResize",new Y),T(this,"onClippingPlanesUpdated",new Y),T(this,"clippingPlanes",[])}updateClippingPlanes(){this.onClippingPlanesUpdated.trigger()}setPlane(e,t,i){t.isLocal=i;const s=this.clippingPlanes.indexOf(t);e&&s===-1?this.clippingPlanes.push(t):!e&&s>-1&&this.clippingPlanes.splice(s,1),this.three.clippingPlanes=this.clippingPlanes.filter(n=>!n.isLocal)}}const Wa=class Sr extends de{constructor(e){super(e),T(this,"_disposedComponents",new Set),T(this,"enabled",!0),e.add(Sr.uuid,this)}get(){return this._disposedComponents}destroy(e,t=!0,i=!0){e.removeFromParent();const s=e;s.dispose&&s.dispose(),this.disposeGeometryAndMaterials(e,t),i&&s.children&&s.children.length&&this.disposeChildren(s),e.children.length=0}disposeGeometry(e){e.boundsTree&&e.disposeBoundsTree&&e.disposeBoundsTree(),e.dispose()}disposeGeometryAndMaterials(e,t){const i=e;i.geometry&&this.disposeGeometry(i.geometry),t&&i.material&&Sr.disposeMaterial(i),i.material=[],i.geometry=null}disposeChildren(e){for(const t of e.children)this.destroy(t)}static disposeMaterial(e){if(e.material)if(Array.isArray(e.material))for(const t of e.material)t.dispose();else e.material.dispose()}};T(Wa,"uuid","76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe");let Nt=Wa;class Jt extends Set{constructor(e){super(e),T(this,"onItemAdded",new Y),T(this,"onItemDeleted",new Y),T(this,"onCleared",new Y),T(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}add(...e){for(const t of e)this.has(t)||!this.guard(t)||(super.add(t),this.onItemAdded||(this.onItemAdded=new Y),this.onItemAdded.trigger(t));return this}delete(e){const t=super.delete(e);return t&&this.onItemDeleted.trigger(),t}dispose(){this.clear(),this.onItemAdded.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class gt extends Map{constructor(e){super(e),T(this,"onItemSet",new Y),T(this,"onItemUpdated",new Y),T(this,"onItemDeleted",new Y),T(this,"onCleared",new Y),T(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}set(e,t){const i=this.has(e);if(!(this.guard??(()=>!0))(e,t))return this;const s=super.set(e,t);return i?(this.onItemUpdated||(this.onItemUpdated=new Y),this.onItemUpdated.trigger({key:e,value:t})):(this.onItemSet||(this.onItemSet=new Y),this.onItemSet.trigger({key:e,value:t})),s}delete(e){const t=super.delete(e);return t&&this.onItemDeleted.trigger(e),t}dispose(){this.clear(),this.onItemSet.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}const In=0,xd=1,_d=new P,Ho=new tt,ir=new ti,Wo=new P,Zs=new hi;class Ud{constructor(){this.tolerance=-1,this.faces=[],this.newFaces=[],this.assigned=new Xo,this.unassigned=new Xo,this.vertices=[]}setFromPoints(e){if(e.length>=4){this.makeEmpty();for(let t=0,i=e.length;tthis.tolerance)return!1;return!0}intersectRay(e,t){const i=this.faces;let s=-1/0,n=1/0;for(let r=0,o=i.length;r0&&h>=0)return null;const d=h!==0?-l/h:0;if(!(d<=0)&&(h>0?n=Math.min(d,n):s=Math.max(d,s),s>n))return null}return s!==-1/0?e.at(s,t):e.at(n,t),t}intersectsRay(e){return this.intersectRay(e,_d)!==null}makeEmpty(){return this.faces=[],this.vertices=[],this}addVertexToFace(e,t){return e.face=t,t.outside===null?this.assigned.append(e):this.assigned.insertBefore(t.outside,e),t.outside=e,this}removeVertexFromFace(e,t){return e===t.outside&&(e.next!==null&&e.next.face===t?t.outside=e.next:t.outside=null),this.assigned.remove(e),this}removeAllVerticesFromFace(e){if(e.outside!==null){const t=e.outside;let i=e.outside;for(;i.next!==null&&i.next.face===e;)i=i.next;return this.assigned.removeSubList(t,i),t.prev=i.next=null,e.outside=null,t}}deleteFaceVertices(e,t){const i=this.removeAllVerticesFromFace(e);if(i!==void 0)if(t===void 0)this.unassigned.appendChain(i);else{let s=i;do{const n=s.next;t.distanceToPoint(s.point)>this.tolerance?this.addVertexToFace(s,t):this.unassigned.append(s),s=n}while(s!==null)}return this}resolveUnassignedPoints(e){if(this.unassigned.isEmpty()===!1){let t=this.unassigned.first();do{const i=t.next;let s=this.tolerance,n=null;for(let r=0;rs&&(s=a,n=o),s>1e3*this.tolerance)break}}n!==null&&this.addVertexToFace(t,n),t=i}while(t!==null)}return this}computeExtremes(){const e=new P,t=new P,i=[],s=[];for(let n=0;n<3;n++)i[n]=s[n]=this.vertices[0];e.copy(this.vertices[0].point),t.copy(this.vertices[0].point);for(let n=0,r=this.vertices.length;nt.getComponent(l)&&(t.setComponent(l,a.getComponent(l)),s[l]=o)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(e.x),Math.abs(t.x))+Math.max(Math.abs(e.y),Math.abs(t.y))+Math.max(Math.abs(e.z),Math.abs(t.z))),{min:i,max:s}}computeInitialHull(){const e=this.vertices,t=this.computeExtremes(),i=t.min,s=t.max;let n=0,r=0;for(let u=0;u<3;u++){const f=s[u].point.getComponent(u)-i[u].point.getComponent(u);f>n&&(n=f,r=u)}const o=i[r],a=s[r];let l,h;n=0,Ho.set(o.point,a.point);for(let u=0,f=this.vertices.length;un&&(n=p,l=m)}}n=-1,ir.setFromCoplanarPoints(o.point,a.point,l.point);for(let u=0,f=this.vertices.length;un&&(n=p,h=m)}}const d=[];if(ir.distanceToPoint(h.point)<0){d.push(mt.create(o,a,l),mt.create(h,a,o),mt.create(h,l,a),mt.create(h,o,l));for(let u=0;u<3;u++){const f=(u+1)%3;d[u+1].getEdge(2).setTwin(d[0].getEdge(f)),d[u+1].getEdge(1).setTwin(d[f+1].getEdge(0))}}else{d.push(mt.create(o,l,a),mt.create(h,o,a),mt.create(h,a,l),mt.create(h,l,o));for(let u=0;u<3;u++){const f=(u+1)%3;d[u+1].getEdge(2).setTwin(d[0].getEdge((3-u)%3)),d[u+1].getEdge(0).setTwin(d[f+1].getEdge(1))}}for(let u=0;u<4;u++)this.faces.push(d[u]);for(let u=0,f=e.length;un&&(n=E,p=this.faces[I])}p!==null&&this.addVertexToFace(m,p)}}return this}reindexFaces(){const e=[];for(let t=0;tt&&(t=n,e=s),s=s.next}while(s!==null&&s.face===i);return e}}computeHorizon(e,t,i,s){this.deleteFaceVertices(i),i.mark=xd;let n;t===null?n=t=i.getEdge(0):n=t.next;do{const r=n.twin,o=r.face;o.mark===In&&(o.distanceToPoint(e)>this.tolerance?this.computeHorizon(e,r,o,s):s.push(n)),n=n.next}while(n!==t);return this}addAdjoiningFace(e,t){const i=mt.create(e,t.tail(),t.head());return this.faces.push(i),i.getEdge(-1).setTwin(t.twin),i.getEdge(0)}addNewFaces(e,t){this.newFaces=[];let i=null,s=null;for(let n=0;n0;)t=t.next,e--;for(;e<0;)t=t.prev,e++;return t}compute(){const e=this.edge.tail(),t=this.edge.head(),i=this.edge.next.head();return Zs.set(e.point,t.point,i.point),Zs.getNormal(this.normal),Zs.getMidpoint(this.midpoint),this.area=Zs.getArea(),this.constant=this.normal.dot(this.midpoint),this}distanceToPoint(e){return this.normal.dot(e)-this.constant}}class sr{constructor(e,t){this.vertex=e,this.prev=null,this.next=null,this.twin=null,this.face=t}head(){return this.vertex}tail(){return this.prev?this.prev.vertex:null}length(){const e=this.head(),t=this.tail();return t!==null?t.point.distanceTo(e.point):-1}lengthSquared(){const e=this.head(),t=this.tail();return t!==null?t.point.distanceToSquared(e.point):-1}setTwin(e){return this.twin=e,e.twin=this,this}}class Bd{constructor(e){this.point=e,this.prev=null,this.next=null,this.face=null}}class Xo{constructor(){this.head=null,this.tail=null}first(){return this.head}last(){return this.tail}clear(){return this.head=this.tail=null,this}insertBefore(e,t){return t.prev=e.prev,t.next=e,t.prev===null?this.head=t:t.prev.next=t,e.prev=t,this}insertAfter(e,t){return t.prev=e,t.next=e.next,t.next===null?this.tail=t:t.next.prev=t,e.next=t,this}append(e){return this.head===null?this.head=e:this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e,this}appendChain(e){for(this.head===null?this.head=e:this.tail.next=e,e.prev=this.tail;e.next!==null;)e=e.next;return this.tail=e,this}remove(e){return e.prev===null?this.head=e.next:e.prev.next=e.next,e.next===null?this.tail=e.prev:e.next.prev=e.prev,this}removeSubList(e,t){return e.prev===null?this.head=t.next:e.prev.next=t.next,t.next===null?this.tail=e.prev:t.next.prev=e.prev,this}isEmpty(){return this.head===null}}const vr=[2,2,1],wr=[1,0,0];function At(c,e){return c*3+e}function zd(c){const e=c.elements;let t=0;for(let i=0;i<9;i++)t+=e[i]*e[i];return Math.sqrt(t)}function kd(c){const e=c.elements;let t=0;for(let i=0;i<3;i++){const s=e[At(vr[i],wr[i])];t+=2*s*s}return Math.sqrt(t)}function Vd(c,e){let t=0,i=1;const s=c.elements;for(let l=0;l<3;l++){const h=Math.abs(s[At(vr[l],wr[l])]);h>t&&(t=h,i=l)}let n=1,r=0;const o=wr[i],a=vr[i];if(Math.abs(s[At(a,o)])>Number.EPSILON){const l=s[At(a,a)],h=s[At(o,o)],d=s[At(a,o)],u=(l-h)/2/d;let f;u<0?f=-1/(-u+Math.sqrt(1+u*u)):f=1/(u+Math.sqrt(1+u*u)),n=1/Math.sqrt(1+f*f),r=f*n}return e.identity(),e.elements[At(o,o)]=n,e.elements[At(a,a)]=n,e.elements[At(a,o)]=r,e.elements[At(o,a)]=-r,e}function Yd(c,e){let t=0,i=0;const s=10;e.unitary.identity(),e.diagonal.copy(c);const n=e.unitary,r=e.diagonal,o=new di,a=new di,l=Number.EPSILON*zd(r);for(;il;)Vd(r,o),a.copy(o).transpose(),r.multiply(o),r.premultiply(a),n.multiply(o),++t>2&&(i++,t=0);return e}function Gd(c){const e=[];for(let ae=0;ae>8&255]+Ue._lut[e>>16&255]+Ue._lut[e>>24&255]}-${Ue._lut[t&255]}${Ue._lut[t>>8&255]}-${Ue._lut[t>>16&15|64]}${Ue._lut[t>>24&255]}-${Ue._lut[i&63|128]}${Ue._lut[i>>8&255]}-${Ue._lut[i>>16&255]}${Ue._lut[i>>24&255]}${Ue._lut[s&255]}${Ue._lut[s>>8&255]}${Ue._lut[s>>16&255]}${Ue._lut[s>>24&255]}`.toLowerCase()}static validate(e){if(!Ue._pattern.test(e))throw new Error(`${e} is not a valid UUID v4. +import{V as x,p as Se,t as ti,u as tt,T as hi,S as gi,v as ye,a as ee,w as xa,q as Ce,o as Je,x as kc,y as As,z as wo,n as ne,E as Vc,W as Ot,H as Ci,C as _e,J as Sn,b as st,s as It,K as _t,N as bn,Q as ii,P as Ma,U as Ii,X as Yc,Y as at,Z as Zi,_ as Gc,$ as xn,a0 as He,O as Yi,L as si,a1 as Xe,B as Be,a2 as Gi,a3 as Ms,a4 as Le,a5 as es,a6 as Hc,a7 as La,a8 as di,I as Hr,a9 as Wr,aa as Xr,ab as Mn,ac as Ti,ad as Wc,ae as Hi,af as wn,f as Xc,ag as Ln,ah as Dn,ai as Zc,aj as jc,ak as Qc,al as Kc,am as qc,an as Da,ao as _a,ap as Zr,aq as jr,ar as Qr,as as Os,at as Kr,au as qr,av as Jr,aw as $r,ax as eo,ay as to,az as io,aA as so,aB as no,aC as zt,aD as yt,d as Vi,e as fn,aE as Qt,aF as Jc,aG as $c,aH as eh,aI as th,aJ as ih,aK as vn,aL as Ua,aM as Wi,aN as sh,aO as nh,aP as Ba,aQ as za,g as bt,aR as Ri,aS as rh,aT as oh,aU as vo,aV as yo,aW as pn,aX as mn,aY as ro,aZ as ah,a_ as mr,a$ as Bi,b0 as lh,b1 as ch,b2 as hh,b3 as dh,r as uh,b4 as oo,b5 as fh,b6 as ph,b7 as ka,b8 as Dt,b9 as ts,ba as mh,bb as Ih,bc as Eh,bd as gh,be as Ch,bf as Fo,bg as Th,bh as Rh,bi as Sh,G as yn,bj as wh,bk as vh,bl as yh}from"./web-ifc-api-nU1-R_1k.js";var Fh=Object.defineProperty,Ah=(c,e,t)=>e in c?Fh(c,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[e]=t,y=(c,e,t)=>(Ah(c,typeof e!="symbol"?e+"":e,t),t),Oh=Object.defineProperty,Nh=(c,e,t)=>e in c?Oh(c,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[e]=t,T=(c,e,t)=>(Nh(c,typeof e!="symbol"?e+"":e,t),t);const Va=0,Ph=1,bh=2,Ao=2,Wn=1.25,Oo=1,In=6*4+4+4,_n=65535,xh=Math.pow(2,-24),Xn=Symbol("SKIP_GENERATION");function Mh(c){return c.index?c.index.count:c.attributes.position.count}function ji(c){return Mh(c)/3}function Lh(c,e=ArrayBuffer){return c>65535?new Uint32Array(new e(4*c)):new Uint16Array(new e(2*c))}function Dh(c,e){if(!c.index){const t=c.attributes.position.count,i=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,s=Lh(t,i);c.setIndex(new Je(s,1));for(let n=0;no-a);for(let o=0;on.offset-r.offset),i=t[t.length-1];i.count=Math.min(e-i.offset,i.count);let s=0;return t.forEach(({count:n})=>s+=n),e!==s}function Ne(c,e,t){return t.min.x=e[c],t.min.y=e[c+1],t.min.z=e[c+2],t.max.x=e[c+3],t.max.y=e[c+4],t.max.z=e[c+5],t}function Uh(c){c[0]=c[1]=c[2]=1/0,c[3]=c[4]=c[5]=-1/0}function No(c){let e=-1,t=-1/0;for(let i=0;i<3;i++){const s=c[i+3]-c[i];s>t&&(t=s,e=i)}return e}function Po(c,e){e.set(c)}function bo(c,e,t){let i,s;for(let n=0;n<3;n++){const r=n+3;i=c[n],s=e[n],t[n]=is?i:s}}function Ls(c,e,t){for(let i=0;i<3;i++){const s=e[c+2*i],n=e[c+2*i+1],r=s-n,o=s+n;rt[i+3]&&(t[i+3]=o)}}function is(c){const e=c[3]-c[0],t=c[4]-c[1],i=c[5]-c[2];return 2*(e*t+t*i+i*e)}function Zn(c,e,t,i,s=null){let n=1/0,r=1/0,o=1/0,a=-1/0,l=-1/0,h=-1/0,d=1/0,u=1/0,f=1/0,m=-1/0,p=-1/0,E=-1/0;const I=s!==null;for(let g=e*6,w=(e+t)*6;ga&&(a=A),I&&Cm&&(m=C);const b=c[g+2],N=c[g+3],D=b-N,_=b+N;Dl&&(l=_),I&&bp&&(p=b);const F=c[g+4],L=c[g+5],R=F-L,U=F+L;Rh&&(h=U),I&&FE&&(E=F)}i[0]=n,i[1]=r,i[2]=o,i[3]=a,i[4]=l,i[5]=h,I&&(s[0]=d,s[1]=u,s[2]=f,s[3]=m,s[4]=p,s[5]=E)}function Bh(c,e,t,i){let s=1/0,n=1/0,r=1/0,o=-1/0,a=-1/0,l=-1/0;for(let h=e*6,d=(e+t)*6;ho&&(o=u);const f=c[h+2];fa&&(a=f);const m=c[h+4];ml&&(l=m)}i[0]=s,i[1]=n,i[2]=r,i[3]=o,i[4]=a,i[5]=l}function zh(c,e){Uh(e);const t=c.attributes.position,i=c.index?c.index.array:null,s=ji(c),n=new Float32Array(s*6),r=t.normalized,o=t.array,a=t.offset||0;let l=3;t.isInterleavedBufferAttribute&&(l=t.data.stride);const h=["getX","getY","getZ"];for(let d=0;dO&&(O=w),C>O&&(O=C);const A=(O-v)/2,b=I*2;n[f+b+0]=v+A,n[f+b+1]=A+(Math.abs(v)+A)*xh,ve[I+3]&&(e[I+3]=O)}}return n}const xt=32,kh=(c,e)=>c.candidate-e.candidate,Wt=new Array(xt).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),Ds=new Float32Array(6);function Vh(c,e,t,i,s,n){let r=-1,o=0;if(n===Va)r=No(e),r!==-1&&(o=(e[r]+e[r+3])/2);else if(n===Ph)r=No(c),r!==-1&&(o=Yh(t,i,s,r));else if(n===bh){const a=is(c);let l=Wn*s;const h=i*6,d=(i+s)*6;for(let u=0;u<3;u++){const f=e[u],m=(e[u+3]-f)/xt;if(s=v.candidate?Ls(g,t,v.rightCacheBounds):(Ls(g,t,v.leftCacheBounds),v.count++)}}for(let g=0;g=xt&&(g=xt-1);const w=Wt[g];w.count++,Ls(I,t,w.bounds)}const p=Wt[xt-1];Po(p.bounds,p.rightCacheBounds);for(let I=xt-2;I>=0;I--){const g=Wt[I],w=Wt[I+1];bo(g.bounds,w.rightCacheBounds,g.rightCacheBounds)}let E=0;for(let I=0;I=a;)o--;if(r=a;)o--;if(r2**16,s=i?4:2,n=e?new SharedArrayBuffer(t*s):new ArrayBuffer(t*s),r=i?new Uint32Array(n):new Uint16Array(n);for(let o=0,a=r.length;o=s&&(d=!0,n&&(console.warn(`MeshBVH: Max depth of ${s} reached when generating BVH. Consider increasing maxDepth.`),console.warn(t))),O<=r||b>=s)return g(v+O),C.offset=v,C.count=O,C;const N=Vh(C.boundingData,A,m,v,O,o);if(N.axis===-1)return g(v+O),C.offset=v,C.count=O,C;const D=p(h,i,m,v,O,N);if(D===v||D===v+O)g(v+O),C.offset=v,C.count=O;else{C.splitAxis=N.axis;const _=new _s,F=v,L=D-v;C.left=_,_.boundingData=new Float32Array(6),Zn(m,F,L,_.boundingData,f),w(_,F,L,f,b+1);const R=new _s,U=D,W=O-L;C.right=R,R.boundingData=new Float32Array(6),Zn(m,U,W,R.boundingData,f),w(R,U,W,f,b+1)}return C}}function Zh(c,e){const t=c.geometry;e.indirect&&(c._indirectBuffer=Wh(t,e.useSharedArrayBuffer),_h(t)&&!e.verbose&&console.warn('MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),c._indirectBuffer||Dh(t,e);const i=Xh(c,e);let s,n,r;const o=[],a=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let d=0;dMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return n[f+6]=C/4,C=h(C,g),n[f+7]=w,C}}}class Gt{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let i=1/0,s=-1/0;for(let n=0,r=e.length;ns?o:s}this.min=i,this.max=s}setFromPoints(e,t){let i=1/0,s=-1/0;for(let n=0,r=t.length;ns?a:s}this.min=i,this.max=s}isSeparated(e){return this.min>e.max||e.min>this.max}}Gt.prototype.setFromBox=function(){const c=new x;return function(e,t){const i=t.min,s=t.max;let n=1/0,r=-1/0;for(let o=0;o<=1;o++)for(let a=0;a<=1;a++)for(let l=0;l<=1;l++){c.x=i.x*o+s.x*(1-o),c.y=i.y*a+s.y*(1-a),c.z=i.z*l+s.z*(1-l);const h=e.dot(c);n=Math.min(h,n),r=Math.max(h,r)}this.min=n,this.max=r}}();const jh=function(){const c=new x,e=new x,t=new x;return function(i,s,n){const r=i.start,o=c,a=s.start,l=e;t.subVectors(r,a),c.subVectors(i.end,i.start),e.subVectors(s.end,s.start);const h=t.dot(l),d=l.dot(o),u=l.dot(l),f=t.dot(o),m=o.dot(o)*u-d*d;let p,E;m!==0?p=(h*d-f*u)/m:p=0,E=(h+p*d)/u,n.x=p,n.y=E}}(),ao=function(){const c=new Se,e=new x,t=new x;return function(i,s,n,r){jh(i,s,c);let o=c.x,a=c.y;if(o>=0&&o<=1&&a>=0&&a<=1){i.at(o,n),s.at(a,r);return}else if(o>=0&&o<=1){a<0?s.at(0,r):s.at(1,r),i.closestPointToPoint(r,!0,n);return}else if(a>=0&&a<=1){o<0?i.at(0,n):i.at(1,n),s.closestPointToPoint(n,!0,r);return}else{let l;o<0?l=i.start:l=i.end;let h;a<0?h=s.start:h=s.end;const d=e,u=t;if(i.closestPointToPoint(h,!0,e),s.closestPointToPoint(l,!0,t),d.distanceToSquared(h)<=u.distanceToSquared(l)){n.copy(d),r.copy(h);return}else{n.copy(l),r.copy(u);return}}}}(),Qh=function(){const c=new x,e=new x,t=new ti,i=new tt;return function(s,n){const{radius:r,center:o}=s,{a,b:l,c:h}=n;if(i.start=a,i.end=l,i.closestPointToPoint(o,!0,c).distanceTo(o)<=r||(i.start=a,i.end=h,i.closestPointToPoint(o,!0,c).distanceTo(o)<=r)||(i.start=l,i.end=h,i.closestPointToPoint(o,!0,c).distanceTo(o)<=r))return!0;const d=n.getPlane(t);if(Math.abs(d.distanceToPoint(o))<=r){const u=d.projectPoint(o,e);if(n.containsPoint(u))return!0}return!1}}(),Kh=1e-15;function jn(c){return Math.abs(c)new x),this.satBounds=new Array(4).fill().map(()=>new Gt),this.points=[this.a,this.b,this.c],this.sphere=new gi,this.plane=new ti,this.needsUpdate=!0}intersectsSphere(e){return Qh(e,this)}update(){const e=this.a,t=this.b,i=this.c,s=this.points,n=this.satAxes,r=this.satBounds,o=n[0],a=r[0];this.getNormal(o),a.setFromPoints(o,s);const l=n[1],h=r[1];l.subVectors(e,t),h.setFromPoints(l,s);const d=n[2],u=r[2];d.subVectors(t,i),u.setFromPoints(d,s);const f=n[3],m=r[3];f.subVectors(i,e),m.setFromPoints(f,s),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,e),this.needsUpdate=!1}}Et.prototype.closestPointToSegment=function(){const c=new x,e=new x,t=new tt;return function(i,s=null,n=null){const{start:r,end:o}=i,a=this.points;let l,h=1/0;for(let d=0;d<3;d++){const u=(d+1)%3;t.start.copy(a[d]),t.end.copy(a[u]),ao(t,i,c,e),l=c.distanceToSquared(e),l=2){(C===1?I.start:I.end).copy(f),w=2;break}if(w++,w===2&&C===-1)break}}return w}return function(p,E=null,I=!1){this.needsUpdate&&this.update(),p.isExtendedTriangle?p.needsUpdate&&p.update():(c.copy(p),c.update(),p=c);const g=this.plane,w=p.plane;if(Math.abs(g.normal.dot(w.normal))>1-1e-10){const C=this.satBounds,v=this.satAxes;t[0]=p.a,t[1]=p.b,t[2]=p.c;for(let b=0;b<4;b++){const N=C[b],D=v[b];if(i.setFromPoints(D,t),N.isSeparated(i))return!1}const O=p.satBounds,A=p.satAxes;e[0]=this.a,e[1]=this.b,e[2]=this.c;for(let b=0;b<4;b++){const N=O[b],D=A[b];if(i.setFromPoints(D,e),N.isSeparated(i))return!1}for(let b=0;b<4;b++){const N=v[b];for(let D=0;D<4;D++){const _=A[D];if(n.crossVectors(N,_),i.setFromPoints(n,e),s.setFromPoints(n,t),i.isSeparated(s))return!1}}return E&&(I||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),E.start.set(0,0,0),E.end.set(0,0,0)),!0}else{const C=m(this,w,d);if(C===1&&p.containsPoint(d.end))return E&&(E.start.copy(d.end),E.end.copy(d.end)),!0;if(C!==2)return!1;const v=m(p,g,u);if(v===1&&this.containsPoint(u.end))return E&&(E.start.copy(u.end),E.end.copy(u.end)),!0;if(v!==2)return!1;if(d.delta(o),u.delta(a),o.dot(a)<0){let F=u.start;u.start=u.end,u.end=F}const O=d.start.dot(o),A=d.end.dot(o),b=u.start.dot(o),N=u.end.dot(o),D=A0?E.start.copy(d.start):E.start.copy(u.start),l.subVectors(d.end,u.end),l.dot(o)<0?E.end.copy(d.end):E.end.copy(u.end)),!0)}}}();Et.prototype.distanceToPoint=function(){const c=new x;return function(e){return this.closestPointToPoint(e,c),e.distanceTo(c)}}();Et.prototype.distanceToTriangle=function(){const c=new x,e=new x,t=["a","b","c"],i=new tt,s=new tt;return function(n,r=null,o=null){const a=r||o?i:null;if(this.intersectsTriangle(n,a))return(r||o)&&(r&&a.getCenter(r),o&&a.getCenter(o)),0;let l=1/0;for(let h=0;h<3;h++){let d;const u=t[h],f=n[u];this.closestPointToPoint(f,c),d=f.distanceToSquared(c),dnew x),this.satAxes=new Array(3).fill().map(()=>new x),this.satBounds=new Array(3).fill().map(()=>new Gt),this.alignedSatBounds=new Array(3).fill().map(()=>new Gt),this.needsUpdate=!1,e&&this.min.copy(e),t&&this.max.copy(t),i&&this.matrix.copy(i)}set(e,t,i){this.min.copy(e),this.max.copy(t),this.matrix.copy(i),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}Qe.prototype.update=function(){return function(){const c=this.matrix,e=this.min,t=this.max,i=this.points;for(let a=0;a<=1;a++)for(let l=0;l<=1;l++)for(let h=0;h<=1;h++){const d=1*a|2*l|4*h,u=i[d];u.x=a?t.x:e.x,u.y=l?t.y:e.y,u.z=h?t.z:e.z,u.applyMatrix4(c)}const s=this.satBounds,n=this.satAxes,r=i[0];for(let a=0;a<3;a++){const l=n[a],h=s[a],d=1<new tt),t=new Array(12).fill().map(()=>new tt),i=new x,s=new x;return function(n,r=0,o=null,a=null){if(this.needsUpdate&&this.update(),this.intersectsBox(n))return(o||a)&&(n.getCenter(s),this.closestPointToPoint(s,i),n.closestPointToPoint(i,s),o&&o.copy(i),a&&a.copy(s)),0;const l=r*r,h=n.min,d=n.max,u=this.points;let f=1/0;for(let p=0;p<8;p++){const E=u[p];s.copy(E).clamp(h,d);const I=E.distanceToSquared(s);if(Inew Et)}}const lt=new qh;function $e(c,e){return e[c+15]===65535}function et(c,e){return e[c+6]}function ct(c,e){return e[c+14]}function ht(c){return c+8}function dt(c,e){return e[c+6]}function Ha(c,e){return e[c+7]}class Jh{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const e=[];let t=null;this.setBuffer=i=>{t&&e.push(t),t=i,this.float32Array=new Float32Array(i),this.uint16Array=new Uint16Array(i),this.uint32Array=new Uint32Array(i)},this.clearBuffer=()=>{t=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,e.length!==0&&this.setBuffer(e.pop())}}}const Fe=new Jh;let qt,zi;const Si=[],Us=new lo(()=>new ye);function $h(c,e,t,i,s,n){qt=Us.getPrimitive(),zi=Us.getPrimitive(),Si.push(qt,zi),Fe.setBuffer(c._roots[e]);const r=Ir(0,c.geometry,t,i,s,n);Fe.clearBuffer(),Us.releasePrimitive(qt),Us.releasePrimitive(zi),Si.pop(),Si.pop();const o=Si.length;return o>0&&(zi=Si[o-1],qt=Si[o-2]),r}function Ir(c,e,t,i,s=null,n=0,r=0){const{float32Array:o,uint16Array:a,uint32Array:l}=Fe;let h=c*2;if($e(h,a)){const d=et(c,l),u=ct(h,a);return Ne(c,o,qt),i(d,u,!1,r,n+c,qt)}else{let d=function(_){const{uint16Array:F,uint32Array:L}=Fe;let R=_*2;for(;!$e(R,F);)_=ht(_),R=_*2;return et(_,L)},u=function(_){const{uint16Array:F,uint32Array:L}=Fe;let R=_*2;for(;!$e(R,F);)_=dt(_,L),R=_*2;return et(_,L)+ct(R,F)};const f=ht(c),m=dt(c,l);let p=f,E=m,I,g,w,C;if(s&&(w=qt,C=zi,Ne(p,o,w),Ne(E,o,C),I=s(w),g=s(C),g(ss.copy(e).clamp(h.min,h.max),ss.distanceToSquared(e)),intersectsBounds:(h,d,u)=>u{h.closestPointToPoint(e,ss);const u=e.distanceToSquared(ss);return u0&&l.normal.multiplyScalar(-1));const h={a:n,b:r,c:o,normal:new x,materialIndex:0};hi.getNormal(wi,vi,yi,h.normal),l.face=h,l.faceIndex=n}return l}function Un(c,e,t,i,s){const n=i*3;let r=n+0,o=n+1,a=n+2;const l=c.index;c.index&&(r=l.getX(r),o=l.getX(o),a=l.getX(a));const{position:h,normal:d,uv:u,uv1:f}=c.attributes,m=id(t,h,d,u,f,r,o,a,e);return m?(m.faceIndex=i,s&&s.push(m),m):null}function De(c,e,t,i){const s=c.a,n=c.b,r=c.c;let o=e,a=e+1,l=e+2;t&&(o=t.getX(o),a=t.getX(a),l=t.getX(l)),s.x=i.getX(o),s.y=i.getY(o),s.z=i.getZ(o),n.x=i.getX(a),n.y=i.getY(a),n.z=i.getZ(a),r.x=i.getX(l),r.y=i.getY(l),r.z=i.getZ(l)}function sd(c,e,t,i,s,n){const{geometry:r,_indirectBuffer:o}=c;for(let a=i,l=i+s;av&&(v=_),FO&&(O=F),LA&&(A=L)}return a[u+0]!==g||a[u+1]!==w||a[u+2]!==C||a[u+3]!==v||a[u+4]!==O||a[u+5]!==A?(a[u+0]=g,a[u+1]=w,a[u+2]=C,a[u+3]=v,a[u+4]=O,a[u+5]=A,!0):!1}else{const E=u+8,I=r[u+6],g=E+f,w=I+f;let C=m,v=!1,O=!1;e?C||(v=e.has(g),O=e.has(w),C=!v&&!O):(v=!0,O=!0);const A=C||v,b=C||O;let N=!1;A&&(N=d(E,f,C));let D=!1;b&&(D=d(I,f,C));const _=N||D;if(_)for(let F=0;F<3;F++){const L=E+F,R=I+F,U=a[L],W=a[L+3],z=a[R],q=a[R+3];a[u+F]=Uq?W:q}return _}}}const Do=new ye;function $t(c,e,t,i){return Ne(c,e,Do),t.intersectBox(Do,i)}function ad(c,e,t,i,s,n){const{geometry:r,_indirectBuffer:o}=c;for(let a=i,l=i+s;a=0;let d,u;h?(d=ht(c),u=dt(c,r)):(d=dt(c,r),u=ht(c));const f=$t(d,s,i,Uo)?gr(d,e,t,i):null;if(f){const p=f.point[l];if(h?p<=s[u+a]:p>=s[u+a+3])return f}const m=$t(u,s,i,Uo)?gr(u,e,t,i):null;return f&&m?f.distance<=m.distance?f:m:f||m||null}}const Ys=new ye,Fi=new Et,Ai=new Et,ns=new ne,Bo=new Qe,Gs=new Qe;function fd(c,e,t,i){Fe.setBuffer(c._roots[e]);const s=Cr(0,c,t,i);return Fe.clearBuffer(),s}function Cr(c,e,t,i,s=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Fe;let a=c*2;if(s===null&&(t.boundingBox||t.computeBoundingBox(),Bo.set(t.boundingBox.min,t.boundingBox.max,i),s=Bo),$e(a,r)){const l=e.geometry,h=l.index,d=l.attributes.position,u=t.index,f=t.attributes.position,m=et(c,o),p=ct(a,r);if(ns.copy(i).invert(),t.boundsTree)return Ne(c,n,Gs),Gs.matrix.copy(ns),Gs.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:E=>Gs.intersectsBox(E),intersectsTriangle:E=>{E.a.applyMatrix4(i),E.b.applyMatrix4(i),E.c.applyMatrix4(i),E.needsUpdate=!0;for(let I=m*3,g=(p+m)*3;IKn.distanceToBox(v),intersectsBounds:(v,O,A)=>A{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:A=>rs.distanceToBox(A),intersectsBounds:(A,b,N)=>N{for(let N=A,D=A+b;Nv&&(v=L),RO&&(O=R),UA&&(A=U)}}return a[u+0]!==g||a[u+1]!==w||a[u+2]!==C||a[u+3]!==v||a[u+4]!==O||a[u+5]!==A?(a[u+0]=g,a[u+1]=w,a[u+2]=C,a[u+3]=v,a[u+4]=O,a[u+5]=A,!0):!1}else{const E=u+8,I=r[u+6],g=E+f,w=I+f;let C=m,v=!1,O=!1;e?C||(v=e.has(g),O=e.has(w),C=!v&&!O):(v=!0,O=!0);const A=C||v,b=C||O;let N=!1;A&&(N=d(E,f,C));let D=!1;b&&(D=d(I,f,C));const _=N||D;if(_)for(let F=0;F<3;F++){const L=E+F,R=I+F,U=a[L],W=a[L+3],z=a[R],q=a[R+3];a[u+F]=Uq?W:q}return _}}}const zo=new x;function Td(c,e,t,i,s){Fe.setBuffer(c._roots[e]),Tr(0,c,t,i,s),Fe.clearBuffer()}function Tr(c,e,t,i,s){const{float32Array:n,uint16Array:r,uint32Array:o}=Fe,a=c*2;if($e(a,r)){const l=et(c,o),h=ct(a,r);ad(e,t,i,l,h,s)}else{const l=ht(c);$t(l,n,i,zo)&&Tr(l,e,t,i,s);const h=dt(c,o);$t(h,n,i,zo)&&Tr(h,e,t,i,s)}}const ko=new x,Rd=["x","y","z"];function Sd(c,e,t,i){Fe.setBuffer(c._roots[e]);const s=Rr(0,c,t,i);return Fe.clearBuffer(),s}function Rr(c,e,t,i){const{float32Array:s,uint16Array:n,uint32Array:r}=Fe;let o=c*2;if($e(o,n)){const a=et(c,r),l=ct(o,n);return ld(e,t,i,a,l)}else{const a=Ha(c,r),l=Rd[a],h=i.direction[l]>=0;let d,u;h?(d=ht(c),u=dt(c,r)):(d=dt(c,r),u=ht(c));const f=$t(d,s,i,ko)?Rr(d,e,t,i):null;if(f){const p=f.point[l];if(h?p<=s[u+a]:p>=s[u+a+3])return f}const m=$t(u,s,i,ko)?Rr(u,e,t,i):null;return f&&m?f.distance<=m.distance?f:m:f||m||null}}const Ws=new ye,Oi=new Et,Ni=new Et,os=new ne,Vo=new Qe,Xs=new Qe;function wd(c,e,t,i){Fe.setBuffer(c._roots[e]);const s=Sr(0,c,t,i);return Fe.clearBuffer(),s}function Sr(c,e,t,i,s=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Fe;let a=c*2;if(s===null&&(t.boundingBox||t.computeBoundingBox(),Vo.set(t.boundingBox.min,t.boundingBox.max,i),s=Vo),$e(a,r)){const l=e.geometry,h=l.index,d=l.attributes.position,u=t.index,f=t.attributes.position,m=et(c,o),p=ct(a,r);if(os.copy(i).invert(),t.boundsTree)return Ne(c,n,Xs),Xs.matrix.copy(os),Xs.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:E=>Xs.intersectsBox(E),intersectsTriangle:E=>{E.a.applyMatrix4(i),E.b.applyMatrix4(i),E.c.applyMatrix4(i),E.needsUpdate=!0;for(let I=m,g=p+m;Iqn.distanceToBox(v),intersectsBounds:(v,O,A)=>A{if(e.boundsTree){const A=e.boundsTree;return A.shapecast({boundsTraverseOrder:b=>as.distanceToBox(b),intersectsBounds:(b,N,D)=>D{for(let D=b,_=b+N;D<_;D++){const F=A.resolveTriangleIndex(D);De(f,3*F,d,h),f.a.applyMatrix4(t),f.b.applyMatrix4(t),f.c.applyMatrix4(t),f.needsUpdate=!0;for(let L=v,R=v+O;Lnew ye),Pi=new ye,bi=new ye,Jn=new ye,$n=new ye;let er=!1;function Pd(c,e,t,i){if(er)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");er=!0;const s=c._roots,n=e._roots;let r,o=0,a=0;const l=new ne().copy(t).invert();for(let h=0,d=s.length;ha.slice()),index:r.array.slice(),indirectBuffer:n?n.slice():null}:o={roots:s,index:r.array,indirectBuffer:n},o}static deserialize(e,t,i={}){i={setIndex:!0,indirect:!!e.indirectBuffer,...i};const{index:s,roots:n,indirectBuffer:r}=e,o=new co(t,{...i,[Xn]:!0});if(o._roots=n,o._indirectBuffer=r||null,i.setIndex){const a=t.getIndex();if(a===null){const l=new Je(e.index,1,!1);t.setIndex(l)}else a.array!==s&&(a.array.set(s),a.needsUpdate=!0)}return o}get indirect(){return!!this._indirectBuffer}constructor(e,t={}){if(e.isBufferGeometry){if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(t=Object.assign({strategy:Va,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,indirect:!1,[Xn]:!1},t),t.useSharedArrayBuffer&&!Nd())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=e,this._roots=null,this._indirectBuffer=null,t[Xn]||(Zh(this,t),!e.boundingBox&&t.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new ye)));const{_indirectBuffer:i}=this;this.resolveTriangleIndex=t.indirect?s=>i[s]:s=>s}refit(e=null){return(this.indirect?Cd:od)(this,e)}traverse(e,t=0){const i=this._roots[t],s=new Uint32Array(i),n=new Uint16Array(i);r(0);function r(o,a=0){const l=o*2,h=n[l+15]===_n;if(h){const d=s[o+6],u=n[l+14];e(a,h,new Float32Array(i,o*4,6),d,u)}else{const d=o+In/4,u=s[o+6],f=s[o+7];e(a,h,new Float32Array(i,o*4,6),f)||(r(d,a+1),r(u,a+1))}}}raycast(e,t=wo){const i=this._roots,s=this.geometry,n=[],r=t.isMaterial,o=Array.isArray(t),a=s.groups,l=r?t.side:t,h=this.indirect?Td:hd;for(let d=0,u=i.length;dd(u,f,m,p,E)?!0:i(u,f,this,o,m,p,t)}else r||(o?r=(d,u,f,m)=>i(d,u,this,o,f,m,t):r=(d,u,f)=>f);let a=!1,l=0;const h=this._roots;for(let d=0,u=h.length;d{const p=this.resolveTriangleIndex(m);De(r,p*3,o,a)}:m=>{De(r,m*3,o,a)},h=lt.getPrimitive(),d=e.geometry.index,u=e.geometry.attributes.position,f=e.indirect?m=>{const p=e.resolveTriangleIndex(m);De(h,p*3,d,u)}:m=>{De(h,m*3,d,u)};if(n){const m=(p,E,I,g,w,C,v,O)=>{for(let A=I,b=I+g;Ajs.intersectsBox(i),intersectsTriangle:i=>js.intersectsTriangle(i)})}intersectsSphere(e){return this.shapecast({intersectsBounds:t=>e.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(e)})}closestPointToGeometry(e,t,i={},s={},n=0,r=1/0){return(this.indirect?Od:gd)(this,e,t,i,s,n,r)}closestPointToPoint(e,t={},i=0,s=1/0){return ed(this,e,t,i,s)}getBoundingBox(e){return e.makeEmpty(),this._roots.forEach(t=>{Ne(0,new Float32Array(t),Yo),e.union(Yo)}),e}}function Go(c,e,t){return c===null||(c.point.applyMatrix4(e.matrixWorld),c.distance=c.point.distanceTo(t.ray.origin),c.object=e,c.distancet.far)?null:c}const tr=new Vc,Ho=new ne,bd=ee.prototype.raycast;function xd(c,e){if(this.geometry.boundsTree){if(this.material===void 0)return;Ho.copy(this.matrixWorld).invert(),tr.copy(c.ray).applyMatrix4(Ho);const t=this.geometry.boundsTree;if(c.firstHitOnly===!0){const i=Go(t.raycastFirst(tr,this.material),this,c);i&&e.push(i)}else{const i=t.raycast(tr,this.material);for(let s=0,n=i.length;s{if(!this.enabled)return;const e=this.handlers.slice(0);for(const t of e)t(c)}),T(this,"handlers",[])}add(c){this.handlers.push(c)}remove(c){this.handlers=this.handlers.filter(e=>e!==c)}reset(){this.handlers.length=0}};class Ut{constructor(){T(this,"enabled",!0),T(this,"trigger",async e=>{if(!this.enabled)return;const t=this.handlers.slice(0);for(const i of t)await i(e)}),T(this,"handlers",[])}add(e){this.handlers.push(e)}remove(e){this.handlers=this.handlers.filter(t=>t!==e)}reset(){this.handlers.length=0}}class ho{constructor(e){T(this,"isDisposeable",()=>"dispose"in this&&"onDisposed"in this),T(this,"isResizeable",()=>"resize"in this&&"getSize"in this),T(this,"isUpdateable",()=>"onAfterUpdate"in this&&"onBeforeUpdate"in this&&"update"in this),T(this,"isHideable",()=>"visible"in this),T(this,"isConfigurable",()=>"setup"in this&&"config"in this&&"onSetup"in this),this.components=e}}class de extends ho{}class Wa extends ho{constructor(e){super(e),T(this,"worlds",new Map),T(this,"onWorldChanged",new Y),T(this,"currentWorld",null),this.onWorldChanged.add(({world:t,action:i})=>{i==="removed"&&this.worlds.delete(t.uuid)})}}class Dd extends Wa{constructor(){super(...arguments),T(this,"hasCameraControls",()=>"controls"in this)}}class _d extends Wa{constructor(){super(...arguments),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onDisposed",new Y),T(this,"onResize",new Y),T(this,"onClippingPlanesUpdated",new Y),T(this,"clippingPlanes",[])}updateClippingPlanes(){this.onClippingPlanesUpdated.trigger()}setPlane(e,t,i){t.isLocal=i;const s=this.clippingPlanes.indexOf(t);e&&s===-1?this.clippingPlanes.push(t):!e&&s>-1&&this.clippingPlanes.splice(s,1),this.three.clippingPlanes=this.clippingPlanes.filter(n=>!n.isLocal)}}const Xa=class wr extends de{constructor(e){super(e),T(this,"_disposedComponents",new Set),T(this,"enabled",!0),e.add(wr.uuid,this)}get(){return this._disposedComponents}destroy(e,t=!0,i=!0){e.removeFromParent();const s=e;s.dispose&&s.dispose(),this.disposeGeometryAndMaterials(e,t),i&&s.children&&s.children.length&&this.disposeChildren(s),e.children.length=0}disposeGeometry(e){e.boundsTree&&e.disposeBoundsTree&&e.disposeBoundsTree(),e.dispose()}disposeGeometryAndMaterials(e,t){const i=e;i.geometry&&this.disposeGeometry(i.geometry),t&&i.material&&wr.disposeMaterial(i),i.material=[],i.geometry=null}disposeChildren(e){for(const t of e.children)this.destroy(t)}static disposeMaterial(e){if(e.material)if(Array.isArray(e.material))for(const t of e.material)t.dispose();else e.material.dispose()}};T(Xa,"uuid","76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe");let Nt=Xa;class Jt extends Set{constructor(e){super(e),T(this,"onItemAdded",new Y),T(this,"onItemDeleted",new Y),T(this,"onCleared",new Y),T(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}add(...e){for(const t of e)this.has(t)||!this.guard(t)||(super.add(t),this.onItemAdded||(this.onItemAdded=new Y),this.onItemAdded.trigger(t));return this}delete(e){const t=super.delete(e);return t&&this.onItemDeleted.trigger(),t}dispose(){this.clear(),this.onItemAdded.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class gt extends Map{constructor(e){super(e),T(this,"onItemSet",new Y),T(this,"onItemUpdated",new Y),T(this,"onItemDeleted",new Y),T(this,"onCleared",new Y),T(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}set(e,t){const i=this.has(e);if(!(this.guard??(()=>!0))(e,t))return this;const s=super.set(e,t);return i?(this.onItemUpdated||(this.onItemUpdated=new Y),this.onItemUpdated.trigger({key:e,value:t})):(this.onItemSet||(this.onItemSet=new Y),this.onItemSet.trigger({key:e,value:t})),s}delete(e){const t=super.delete(e);return t&&this.onItemDeleted.trigger(e),t}dispose(){this.clear(),this.onItemSet.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class ir{static isEntry(e){return new Set(["Boolean","Color","Text","Number","Select","Vector3","TextSet","None"]).has(e.type)}static copySchema(e,t={}){for(const i in e){const s=e[i];this.isEntry(s)?t[i]=this.copyEntry(s):(t[i]={},this.copySchema(s,t[i]))}return t}static copyEntry(e){if(e.type==="Boolean"){const t=e;return{type:t.type,value:t.value}}if(e.type==="Color"){const t=e;return{type:t.type,value:t.value.clone()}}if(e.type==="Text"){const t=e;return{type:t.type,value:t.value}}if(e.type==="Number"){const t=e;return{type:t.type,value:t.value,min:t.min,max:t.max,interpolable:t.interpolable}}if(e.type==="Select"){const t=e;return{type:t.type,value:t.value,multiple:t.multiple,options:new Set(t.options)}}if(e.type==="Vector3"){const t=e;return{type:t.type,value:t.value.clone()}}if(e.type==="TextSet"){const t=e;return{type:t.type,value:new Set(t.value)}}if(e.type==="None"){const t=e;return{type:t.type,value:t.value}}throw new Error("Invalid entry!")}}class Ud{constructor(){T(this,"list",new Set)}add(e){for(const t of e)this.list.add(t)}remove(e){for(const t of e)this.list.delete(t)}set(e){for(const t of this.list)t.enabled=e}reset(){for(const e of this.list)e.reset()}}const En=0,Bd=1,zd=new x,Wo=new tt,sr=new ti,Xo=new x,Qs=new hi;class kd{constructor(){this.tolerance=-1,this.faces=[],this.newFaces=[],this.assigned=new Zo,this.unassigned=new Zo,this.vertices=[]}setFromPoints(e){if(e.length>=4){this.makeEmpty();for(let t=0,i=e.length;tthis.tolerance)return!1;return!0}intersectRay(e,t){const i=this.faces;let s=-1/0,n=1/0;for(let r=0,o=i.length;r0&&h>=0)return null;const d=h!==0?-l/h:0;if(!(d<=0)&&(h>0?n=Math.min(d,n):s=Math.max(d,s),s>n))return null}return s!==-1/0?e.at(s,t):e.at(n,t),t}intersectsRay(e){return this.intersectRay(e,zd)!==null}makeEmpty(){return this.faces=[],this.vertices=[],this}addVertexToFace(e,t){return e.face=t,t.outside===null?this.assigned.append(e):this.assigned.insertBefore(t.outside,e),t.outside=e,this}removeVertexFromFace(e,t){return e===t.outside&&(e.next!==null&&e.next.face===t?t.outside=e.next:t.outside=null),this.assigned.remove(e),this}removeAllVerticesFromFace(e){if(e.outside!==null){const t=e.outside;let i=e.outside;for(;i.next!==null&&i.next.face===e;)i=i.next;return this.assigned.removeSubList(t,i),t.prev=i.next=null,e.outside=null,t}}deleteFaceVertices(e,t){const i=this.removeAllVerticesFromFace(e);if(i!==void 0)if(t===void 0)this.unassigned.appendChain(i);else{let s=i;do{const n=s.next;t.distanceToPoint(s.point)>this.tolerance?this.addVertexToFace(s,t):this.unassigned.append(s),s=n}while(s!==null)}return this}resolveUnassignedPoints(e){if(this.unassigned.isEmpty()===!1){let t=this.unassigned.first();do{const i=t.next;let s=this.tolerance,n=null;for(let r=0;rs&&(s=a,n=o),s>1e3*this.tolerance)break}}n!==null&&this.addVertexToFace(t,n),t=i}while(t!==null)}return this}computeExtremes(){const e=new x,t=new x,i=[],s=[];for(let n=0;n<3;n++)i[n]=s[n]=this.vertices[0];e.copy(this.vertices[0].point),t.copy(this.vertices[0].point);for(let n=0,r=this.vertices.length;nt.getComponent(l)&&(t.setComponent(l,a.getComponent(l)),s[l]=o)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(e.x),Math.abs(t.x))+Math.max(Math.abs(e.y),Math.abs(t.y))+Math.max(Math.abs(e.z),Math.abs(t.z))),{min:i,max:s}}computeInitialHull(){const e=this.vertices,t=this.computeExtremes(),i=t.min,s=t.max;let n=0,r=0;for(let u=0;u<3;u++){const f=s[u].point.getComponent(u)-i[u].point.getComponent(u);f>n&&(n=f,r=u)}const o=i[r],a=s[r];let l,h;n=0,Wo.set(o.point,a.point);for(let u=0,f=this.vertices.length;un&&(n=p,l=m)}}n=-1,sr.setFromCoplanarPoints(o.point,a.point,l.point);for(let u=0,f=this.vertices.length;un&&(n=p,h=m)}}const d=[];if(sr.distanceToPoint(h.point)<0){d.push(mt.create(o,a,l),mt.create(h,a,o),mt.create(h,l,a),mt.create(h,o,l));for(let u=0;u<3;u++){const f=(u+1)%3;d[u+1].getEdge(2).setTwin(d[0].getEdge(f)),d[u+1].getEdge(1).setTwin(d[f+1].getEdge(0))}}else{d.push(mt.create(o,l,a),mt.create(h,o,a),mt.create(h,a,l),mt.create(h,l,o));for(let u=0;u<3;u++){const f=(u+1)%3;d[u+1].getEdge(2).setTwin(d[0].getEdge((3-u)%3)),d[u+1].getEdge(0).setTwin(d[f+1].getEdge(1))}}for(let u=0;u<4;u++)this.faces.push(d[u]);for(let u=0,f=e.length;un&&(n=I,p=this.faces[E])}p!==null&&this.addVertexToFace(m,p)}}return this}reindexFaces(){const e=[];for(let t=0;tt&&(t=n,e=s),s=s.next}while(s!==null&&s.face===i);return e}}computeHorizon(e,t,i,s){this.deleteFaceVertices(i),i.mark=Bd;let n;t===null?n=t=i.getEdge(0):n=t.next;do{const r=n.twin,o=r.face;o.mark===En&&(o.distanceToPoint(e)>this.tolerance?this.computeHorizon(e,r,o,s):s.push(n)),n=n.next}while(n!==t);return this}addAdjoiningFace(e,t){const i=mt.create(e,t.tail(),t.head());return this.faces.push(i),i.getEdge(-1).setTwin(t.twin),i.getEdge(0)}addNewFaces(e,t){this.newFaces=[];let i=null,s=null;for(let n=0;n0;)t=t.next,e--;for(;e<0;)t=t.prev,e++;return t}compute(){const e=this.edge.tail(),t=this.edge.head(),i=this.edge.next.head();return Qs.set(e.point,t.point,i.point),Qs.getNormal(this.normal),Qs.getMidpoint(this.midpoint),this.area=Qs.getArea(),this.constant=this.normal.dot(this.midpoint),this}distanceToPoint(e){return this.normal.dot(e)-this.constant}}class nr{constructor(e,t){this.vertex=e,this.prev=null,this.next=null,this.twin=null,this.face=t}head(){return this.vertex}tail(){return this.prev?this.prev.vertex:null}length(){const e=this.head(),t=this.tail();return t!==null?t.point.distanceTo(e.point):-1}lengthSquared(){const e=this.head(),t=this.tail();return t!==null?t.point.distanceToSquared(e.point):-1}setTwin(e){return this.twin=e,e.twin=this,this}}class Vd{constructor(e){this.point=e,this.prev=null,this.next=null,this.face=null}}class Zo{constructor(){this.head=null,this.tail=null}first(){return this.head}last(){return this.tail}clear(){return this.head=this.tail=null,this}insertBefore(e,t){return t.prev=e.prev,t.next=e,t.prev===null?this.head=t:t.prev.next=t,e.prev=t,this}insertAfter(e,t){return t.prev=e,t.next=e.next,t.next===null?this.tail=t:t.next.prev=t,e.next=t,this}append(e){return this.head===null?this.head=e:this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e,this}appendChain(e){for(this.head===null?this.head=e:this.tail.next=e,e.prev=this.tail;e.next!==null;)e=e.next;return this.tail=e,this}remove(e){return e.prev===null?this.head=e.next:e.prev.next=e.next,e.next===null?this.tail=e.prev:e.next.prev=e.prev,this}removeSubList(e,t){return e.prev===null?this.head=t.next:e.prev.next=t.next,t.next===null?this.tail=e.prev:t.next.prev=e.prev,this}isEmpty(){return this.head===null}}const vr=[2,2,1],yr=[1,0,0];function Ft(c,e){return c*3+e}function Yd(c){const e=c.elements;let t=0;for(let i=0;i<9;i++)t+=e[i]*e[i];return Math.sqrt(t)}function Gd(c){const e=c.elements;let t=0;for(let i=0;i<3;i++){const s=e[Ft(vr[i],yr[i])];t+=2*s*s}return Math.sqrt(t)}function Hd(c,e){let t=0,i=1;const s=c.elements;for(let l=0;l<3;l++){const h=Math.abs(s[Ft(vr[l],yr[l])]);h>t&&(t=h,i=l)}let n=1,r=0;const o=yr[i],a=vr[i];if(Math.abs(s[Ft(a,o)])>Number.EPSILON){const l=s[Ft(a,a)],h=s[Ft(o,o)],d=s[Ft(a,o)],u=(l-h)/2/d;let f;u<0?f=-1/(-u+Math.sqrt(1+u*u)):f=1/(u+Math.sqrt(1+u*u)),n=1/Math.sqrt(1+f*f),r=f*n}return e.identity(),e.elements[Ft(o,o)]=n,e.elements[Ft(a,a)]=n,e.elements[Ft(a,o)]=r,e.elements[Ft(o,a)]=-r,e}function Wd(c,e){let t=0,i=0;const s=10;e.unitary.identity(),e.diagonal.copy(c);const n=e.unitary,r=e.diagonal,o=new di,a=new di,l=Number.EPSILON*Yd(r);for(;il;)Hd(r,o),a.copy(o).transpose(),r.multiply(o),r.premultiply(a),n.multiply(o),++t>2&&(i++,t=0);return e}function Xd(c){const e=[];for(let ae=0;ae>8&255]+Ue._lut[e>>16&255]+Ue._lut[e>>24&255]}-${Ue._lut[t&255]}${Ue._lut[t>>8&255]}-${Ue._lut[t>>16&15|64]}${Ue._lut[t>>24&255]}-${Ue._lut[i&63|128]}${Ue._lut[i>>8&255]}-${Ue._lut[i>>16&255]}${Ue._lut[i>>24&255]}${Ue._lut[s&255]}${Ue._lut[s>>8&255]}${Ue._lut[s>>16&255]}${Ue._lut[s>>24&255]}`.toLowerCase()}static validate(e){if(!Ue._pattern.test(e))throw new Error(`${e} is not a valid UUID v4. - If you're the tool creator, you can take one from https://www.uuidgenerator.net/. -- If you're using a platform tool, verify the uuid isn't misspelled or contact the tool creator.`)}};T(Fr,"_pattern",/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/),T(Fr,"_lut",["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"]);let Gt=Fr;class Hd extends de{constructor(e,t){super(e),T(this,"onDisposed",new Y),T(this,"onVertexFound",new Y),T(this,"onVertexLost",new Y),T(this,"onEnabled",new Y),T(this,"components"),T(this,"workingPlane",null),T(this,"_pickedPoint",null),T(this,"_config"),T(this,"_enabled",!1),this.components=e,this.config={snapDistance:.25,showOnlyVertex:!1,...t},this.enabled=!1}set enabled(e){this._enabled=e,e||(this._pickedPoint=null),this.onEnabled.trigger(e)}get enabled(){return this._enabled}set config(e){this._config={...this._config,...e}}get config(){return this._config}dispose(){this.onVertexFound.reset(),this.onVertexLost.reset(),this.components=null,this.onDisposed.trigger(),this.onDisposed.reset()}get(e){if(!this.enabled)return this._pickedPoint;const t=this.components.get(ut).get(e).castRay();if(!t)return this._pickedPoint!==null&&(this.onVertexLost.trigger(),this._pickedPoint=null),this._pickedPoint;const i=this.getClosestVertex(t);return i?!this.workingPlane||Math.abs(this.workingPlane.distanceToPoint(i))<.001?((this._pickedPoint===null||!this._pickedPoint.equals(i))&&(this._pickedPoint=i.clone(),this.onVertexFound.trigger(this._pickedPoint)),this._pickedPoint):(this._pickedPoint=null,this._pickedPoint):(this._pickedPoint!==null&&(this.onVertexLost.trigger(),this._pickedPoint=null),this._pickedPoint)}getClosestVertex(e){let t=new P,i=!1,s=Number.MAX_SAFE_INTEGER;const n=this.getVertices(e);if(n===null)return null;for(const r of n){if(!r)continue;const o=e.point.distanceTo(r);o>s||o>this._config.snapDistance||(i=!0,t=r,s=e.point.distanceTo(r))}return i?t:this.config.showOnlyVertex?null:e.point}getVertices(e){const t=e.object;if(!e.face||!t)return null;const i=t.geometry,s=new ne,{instanceId:n}=e,r=n!==void 0,o=t instanceof It;return o&&r&&t.getMatrixAt(n,s),[this.getVertex(e.face.a,i),this.getVertex(e.face.b,i),this.getVertex(e.face.c,i)].map(a=>(a&&(o&&r&&a.applyMatrix4(s),a.applyMatrix4(t.matrixWorld)),a))}getVertex(e,t){if(e===void 0)return null;const i=t.attributes.position;return new P(i.getX(e),i.getY(e),i.getZ(e))}}const Xa=class ja{constructor(){T(this,"onDisposed",new Y),T(this,"list",new Map),T(this,"enabled",!1),T(this,"_clock"),T(this,"onInit",new Y),T(this,"update",()=>{if(!this.enabled)return;const e=this._clock.getDelta();for(const[t,i]of this.list)i.enabled&&i.isUpdateable()&&i.update(e);requestAnimationFrame(this.update)}),this._clock=new La,ja.setupBVH()}add(e,t){if(this.list.has(e))throw new Error("You're trying to add a component that already exists in the components instance. Use Components.get() instead.");Gt.validate(e),this.list.set(e,t)}get(e){const t=e.uuid;if(!this.list.has(t)){const i=new e(this);return this.list.has(t)||this.add(t,i),i}return this.list.get(t)}init(){this.enabled=!0,this._clock.start(),this.update(),this.onInit.trigger()}dispose(){this.enabled=!1;for(const[e,t]of this.list)t.enabled=!1,t.isDisposeable()&&t.dispose();this._clock.stop(),this.onDisposed.trigger(),this.onDisposed.reset()}static setupBVH(){Ce.prototype.computeBoundsTree=Ld,Ce.prototype.disposeBoundsTree=Pd,ee.prototype.raycast=bd}};T(Xa,"release","2.3.18");let Za=Xa;class Wd extends fo{constructor(){super(...arguments),T(this,"meshes",new Set),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onDisposed",new Y),T(this,"isDisposing",!1),T(this,"enabled",!0),T(this,"uuid",Gt.create()),T(this,"name"),T(this,"_scene"),T(this,"_camera"),T(this,"_renderer",null)}get scene(){if(!this._scene)throw new Error("No scene initialized!");return this._scene}set scene(e){this._scene=e,e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"})}get camera(){if(!this._camera)throw new Error("No camera initialized!");return this._camera}set camera(e){this._camera=e,e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"})}get renderer(){return this._renderer}set renderer(e){this._renderer=e,e&&(e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"}))}update(e){this.enabled&&(!this._scene||!this._camera||(this.scene.currentWorld=this,this.camera.currentWorld=this,this.renderer&&(this.renderer.currentWorld=this),this.onBeforeUpdate.trigger(),this.scene.isUpdateable()&&this.scene.update(e),this.camera.isUpdateable()&&this.camera.update(e),this.renderer&&this.renderer.update(e),this.onAfterUpdate.trigger()))}dispose(e=!0){if(this.enabled=!1,this.isDisposing=!0,this.scene.onWorldChanged.trigger({world:this,action:"removed"}),this.camera.onWorldChanged.trigger({world:this,action:"removed"}),this.renderer&&this.renderer.onWorldChanged.trigger({world:this,action:"removed"}),e){const t=this.components.get(Nt);this.scene.dispose(),this.camera.isDisposeable()&&this.camera.dispose(),this.renderer&&this.renderer.dispose();for(const i of this.meshes)t.destroy(i);this.meshes.clear()}this._scene=null,this._camera=null,this._renderer=null,this.components.get(tl).list.delete(this.uuid),this.onDisposed.trigger(),this.onDisposed.reset()}}class Zi{constructor(e,t,i,s){T(this,"_component"),T(this,"name"),T(this,"uuid"),this._component=e,this.name=i,this.uuid=s??Gt.create(),t.get(Bn).list.set(this.uuid,this)}get controls(){const e={};for(const t in this._config){const i=this._config[t];e[t]=this.copyEntry(i)}return e}copyEntry(e){if(e.type==="Boolean"){const t=e;return{type:t.type,value:t.value}}if(e.type==="Color"){const t=e;return{type:t.type,value:t.value.clone()}}if(e.type==="Text"){const t=e;return{type:t.type,value:t.value}}if(e.type==="Number"){const t=e;return{type:t.type,value:t.value,min:t.min,max:t.max,interpolable:t.interpolable}}if(e.type==="Select"){const t=e;return{type:t.type,value:t.value,multiple:t.multiple,options:new Set(t.options)}}if(e.type==="Vector3"){const t=e;return{type:t.type,value:t.value.clone()}}if(e.type==="TextSet"){const t=e;return{type:t.type,value:new Set(t.value)}}if(e.type==="None"){const t=e;return{type:t.type,value:t.value}}throw new Error("Invalid entry!")}}const Qa=class Ka extends de{constructor(e){super(e),T(this,"list",new gt),T(this,"enabled",!0),e.add(Ka.uuid,this)}};T(Qa,"uuid","b8c764e0-6b24-4e77-9a32-35fa728ee5b4");let Bn=Qa;class Xd extends Dd{constructor(e,t,i){super(e),T(this,"enabled",!0),T(this,"container"),T(this,"three"),T(this,"_canvas"),T(this,"_parameters"),T(this,"_resizeObserver",null),T(this,"onContainerUpdated",new Y),T(this,"_resizing",!1),T(this,"resize",r=>{if(this._resizing)return;this._resizing=!0,this.onContainerUpdated.trigger();const o=r?r.x:this.container.clientWidth,a=r?r.y:this.container.clientHeight;this.three.setSize(o,a),this.onResize.trigger(new Se(o,a)),this._resizing=!1}),T(this,"resizeEvent",()=>{this.resize()}),T(this,"onContextLost",r=>{r.preventDefault(),this.enabled=!1}),T(this,"onContextBack",()=>{this.three.setRenderTarget(null),this.three.dispose(),this.three=new Rn({canvas:this._canvas,antialias:!0,alpha:!0,...this._parameters}),this.enabled=!0}),this.container=t,this._parameters=i,this.three=new Rn({antialias:!0,alpha:!0,...i}),this.three.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.setupRenderer(),this.setupEvents(!0),this.resize(),this._canvas=this.three.domElement;const s=this.three.getContext(),{canvas:n}=s;n.addEventListener("webglcontextlost",this.onContextLost,!1),n.addEventListener("webglcontextrestored",this.onContextBack,!1)}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger(this);const e=this.currentWorld.scene.three,t=this.currentWorld.camera.three;this.three.render(e,t),this.onAfterUpdate.trigger(this)}dispose(){this.enabled=!1,this.setupEvents(!1),this.three.domElement.remove(),this.three.forceContextLoss(),this.three.dispose(),this.onResize.reset(),this.onAfterUpdate.reset(),this.onBeforeUpdate.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}getSize(){return new Se(this.three.domElement.clientWidth,this.three.domElement.clientHeight)}setupEvents(e){const t=this.three.domElement.parentElement;if(!t)throw new Error("This renderer needs to have an HTML container!");this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),window.removeEventListener("resize",this.resizeEvent),e&&(this._resizeObserver=new ResizeObserver(this.resizeEvent),this._resizeObserver.observe(t),window.addEventListener("resize",this.resizeEvent))}setupRenderer(){this.three.localClippingEnabled=!0,this.container&&this.container.appendChild(this.three.domElement),this.onContainerUpdated.trigger()}}/*! +- If you're using a platform tool, verify the uuid isn't misspelled or contact the tool creator.`)}};T(uo,"_pattern",/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/);T(uo,"_lut",["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"]);let Ht=uo;class Zd extends de{constructor(e,t){super(e),T(this,"onDisposed",new Y),T(this,"onVertexFound",new Y),T(this,"onVertexLost",new Y),T(this,"onEnabled",new Y),T(this,"components"),T(this,"workingPlane",null),T(this,"_pickedPoint",null),T(this,"_config"),T(this,"_enabled",!1),this.components=e,this.config={snapDistance:.25,showOnlyVertex:!1,...t},this.enabled=!1}set enabled(e){this._enabled=e,e||(this._pickedPoint=null),this.onEnabled.trigger(e)}get enabled(){return this._enabled}set config(e){this._config={...this._config,...e}}get config(){return this._config}dispose(){this.onVertexFound.reset(),this.onVertexLost.reset(),this.components=null,this.onDisposed.trigger(),this.onDisposed.reset()}get(e){if(!this.enabled)return this._pickedPoint;const t=this.components.get(ut).get(e).castRay();if(!t)return this._pickedPoint!==null&&(this.onVertexLost.trigger(),this._pickedPoint=null),this._pickedPoint;const i=this.getClosestVertex(t);return i?!this.workingPlane||Math.abs(this.workingPlane.distanceToPoint(i))<.001?((this._pickedPoint===null||!this._pickedPoint.equals(i))&&(this._pickedPoint=i.clone(),this.onVertexFound.trigger(this._pickedPoint)),this._pickedPoint):(this._pickedPoint=null,this._pickedPoint):(this._pickedPoint!==null&&(this.onVertexLost.trigger(),this._pickedPoint=null),this._pickedPoint)}getClosestVertex(e){let t=new x,i=!1,s=Number.MAX_SAFE_INTEGER;const n=this.getVertices(e);if(n===null)return null;for(const r of n){if(!r)continue;const o=e.point.distanceTo(r);o>s||o>this._config.snapDistance||(i=!0,t=r,s=e.point.distanceTo(r))}return i?t:this.config.showOnlyVertex?null:e.point}getVertices(e){const t=e.object;if(!e.face||!t)return null;const i=t.geometry,s=new ne,{instanceId:n}=e,r=n!==void 0,o=t instanceof It;return o&&r&&t.getMatrixAt(n,s),[this.getVertex(e.face.a,i),this.getVertex(e.face.b,i),this.getVertex(e.face.c,i)].map(a=>(a&&(o&&r&&a.applyMatrix4(s),a.applyMatrix4(t.matrixWorld)),a))}getVertex(e,t){if(e===void 0)return null;const i=t.attributes.position;return new x(i.getX(e),i.getY(e),i.getZ(e))}}const Za=class ja{constructor(){T(this,"onDisposed",new Y),T(this,"list",new Map),T(this,"enabled",!1),T(this,"_clock"),T(this,"onInit",new Y),T(this,"update",()=>{if(!this.enabled)return;const e=this._clock.getDelta();for(const[t,i]of this.list)i.enabled&&i.isUpdateable()&&i.update(e);requestAnimationFrame(this.update)}),this._clock=new xa,ja.setupBVH()}add(e,t){if(this.list.has(e))throw new Error("You're trying to add a component that already exists in the components instance. Use Components.get() instead.");Ht.validate(e),this.list.set(e,t)}get(e){const t=e.uuid;if(!this.list.has(t)){const i=new e(this);return this.list.has(t)||this.add(t,i),i}return this.list.get(t)}init(){this.enabled=!0,this._clock.start(),this.update(),this.onInit.trigger()}dispose(){this.enabled=!1;for(const[e,t]of this.list)t.enabled=!1,t.isDisposeable()&&t.dispose();this._clock.stop(),this.onDisposed.trigger(),this.onDisposed.reset()}static setupBVH(){Ce.prototype.computeBoundsTree=Md,Ce.prototype.disposeBoundsTree=Ld,ee.prototype.raycast=xd}};T(Za,"release","2.4.2");let Qa=Za;class jd extends ho{constructor(){super(...arguments),T(this,"meshes",new Set),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onDisposed",new Y),T(this,"isDisposing",!1),T(this,"enabled",!0),T(this,"uuid",Ht.create()),T(this,"name"),T(this,"_scene"),T(this,"_camera"),T(this,"_renderer",null)}get scene(){if(!this._scene)throw new Error("No scene initialized!");return this._scene}set scene(e){this._scene=e,e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"})}get camera(){if(!this._camera)throw new Error("No camera initialized!");return this._camera}set camera(e){this._camera=e,e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"})}get renderer(){return this._renderer}set renderer(e){this._renderer=e,e&&(e.worlds.set(this.uuid,this),e.currentWorld=this,e.onWorldChanged.trigger({world:this,action:"added"}))}update(e){this.enabled&&(!this._scene||!this._camera||(this.scene.currentWorld=this,this.camera.currentWorld=this,this.renderer&&(this.renderer.currentWorld=this),this.onBeforeUpdate.trigger(),this.scene.isUpdateable()&&this.scene.update(e),this.camera.isUpdateable()&&this.camera.update(e),this.renderer&&this.renderer.update(e),this.onAfterUpdate.trigger()))}dispose(e=!0){if(this.enabled=!1,this.isDisposing=!0,this.scene.onWorldChanged.trigger({world:this,action:"removed"}),this.camera.onWorldChanged.trigger({world:this,action:"removed"}),this.renderer&&this.renderer.onWorldChanged.trigger({world:this,action:"removed"}),e){const t=this.components.get(Nt);this.scene.dispose(),this.camera.isDisposeable()&&this.camera.dispose(),this.renderer&&this.renderer.dispose();for(const i of this.meshes)t.destroy(i);this.meshes.clear()}this._scene=null,this._camera=null,this._renderer=null,this.components.get(il).list.delete(this.uuid),this.onDisposed.trigger(),this.onDisposed.reset()}}class Qi{constructor(e,t,i,s){T(this,"_component"),T(this,"name"),T(this,"uuid"),this._component=e,this.name=i,this.uuid=s??Ht.create(),t.get(Bn).list.set(this.uuid,this)}get controls(){return ir.copySchema(this._config)}set(e){for(const t in e)if(t in this){const i=t;this[i]=e[t].value}}export(e=this._config,t={}){for(const i in e){const s=e[i];if(ir.isEntry(s))if(s.type==="Color"){const{r:n,g:r,b:o}=s.value;t[i]={...s,value:{r:n,g:r,b:o}}}else if(s.type==="Vector3"){const{x:n,y:r,z:o}=s.value;t[i]={...s,value:{x:n,y:r,z:o}}}else if(s.type==="TextSet"){const n=Array.from(s.value);t[i]={...s,value:n}}else if(s.type==="Select"){const n=Array.from(s.options);t[i]={...s,options:n}}else t[i]={...s};else t[i]={},this.export(s,t[i])}return t}import(e,t={},i=!0){for(const s in e){const n=e[s];if(ir.isEntry(n))if(n.type==="Color"){const{r,g:o,b:a}=n.value;t[s]={...n,value:new _e(r,o,a)}}else if(n.type==="Vector3"){const{x:r,y:o,z:a}=n.value;t[s]={...n,value:new x(r,o,a)}}else n.type==="TextSet"?t[s]={...n,value:new Set(n.value)}:n.type==="Select"?t[s]={...n,options:new Set(n.options)}:t[s]={...n};else t[s]={},this.import(n,t[s],!1)}i&&this.set(t)}}const Ka=class qa extends de{constructor(e){super(e),T(this,"list",new gt),T(this,"enabled",!0),e.add(qa.uuid,this)}};T(Ka,"uuid","b8c764e0-6b24-4e77-9a32-35fa728ee5b4");let Bn=Ka;class Qd extends _d{constructor(e,t,i){super(e),T(this,"enabled",!0),T(this,"container"),T(this,"three"),T(this,"_canvas"),T(this,"_parameters"),T(this,"_resizeObserver",null),T(this,"onContainerUpdated",new Y),T(this,"_resizing",!1),T(this,"resize",r=>{if(this._resizing)return;this._resizing=!0,this.onContainerUpdated.trigger();const o=r?r.x:this.container.clientWidth,a=r?r.y:this.container.clientHeight;this.three.setSize(o,a),this.onResize.trigger(new Se(o,a)),this._resizing=!1}),T(this,"resizeEvent",()=>{this.resize()}),T(this,"onContextLost",r=>{r.preventDefault(),this.enabled=!1}),T(this,"onContextBack",()=>{this.three.setRenderTarget(null),this.three.dispose(),this.three=new Sn({canvas:this._canvas,antialias:!0,alpha:!0,...this._parameters}),this.enabled=!0}),this.container=t,this._parameters=i,this.three=new Sn({antialias:!0,alpha:!0,...i}),this.three.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.setupRenderer(),this.setupEvents(!0),this.resize(),this._canvas=this.three.domElement;const s=this.three.getContext(),{canvas:n}=s;n.addEventListener("webglcontextlost",this.onContextLost,!1),n.addEventListener("webglcontextrestored",this.onContextBack,!1)}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger(this);const e=this.currentWorld.scene.three,t=this.currentWorld.camera.three;this.three.render(e,t),this.onAfterUpdate.trigger(this)}dispose(){this.enabled=!1,this.setupEvents(!1),this.three.domElement.remove(),this.three.forceContextLoss(),this.three.dispose(),this.onResize.reset(),this.onAfterUpdate.reset(),this.onBeforeUpdate.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}getSize(){return new Se(this.three.domElement.clientWidth,this.three.domElement.clientHeight)}setupEvents(e){const t=this.three.domElement.parentElement;if(!t)throw new Error("This renderer needs to have an HTML container!");this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),window.removeEventListener("resize",this.resizeEvent),e&&(this._resizeObserver=new ResizeObserver(this.resizeEvent),this._resizeObserver.observe(t),window.addEventListener("resize",this.resizeEvent))}setupRenderer(){this.three.localClippingEnabled=!0,this.container&&this.container.appendChild(this.three.domElement),this.onContainerUpdated.trigger()}}/*! * camera-controls * https://github.com/yomotsu/camera-controls * (c) 2017 @yomotsu * Released under the MIT License. - */const he={LEFT:1,RIGHT:2,MIDDLE:4},j=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),Pi={NONE:0,IN:1,OUT:-1};function ni(c){return c.isPerspectiveCamera}function Xt(c){return c.isOrthographicCamera}const Mi=Math.PI*2,Zo=Math.PI/2,qa=1e-5,as=Math.PI/180;function pt(c,e,t){return Math.max(e,Math.min(t,c))}function we(c,e=qa){return Math.abs(c)0==f>h&&(f=h,t.value=(f-h)/n),f}function Ko(c,e,t,i,s=1/0,n,r){i=Math.max(1e-4,i);const o=2/i,a=o*n,l=1/(1+a+.48*a*a+.235*a*a*a);let h=e.x,d=e.y,u=e.z,f=c.x-h,m=c.y-d,p=c.z-u;const I=h,E=d,g=u,v=s*i,C=v*v,w=f*f+m*m+p*p;if(w>C){const B=Math.sqrt(w);f=f/B*v,m=m/B*v,p=p/B*v}h=c.x-f,d=c.y-m,u=c.z-p;const O=(t.x+o*f)*n,y=(t.y+o*m)*n,L=(t.z+o*p)*n;t.x=(t.x-o*O)*l,t.y=(t.y-o*y)*l,t.z=(t.z-o*L)*l,r.x=h+(f+O)*l,r.y=d+(m+y)*l,r.z=u+(p+L)*l;const N=I-c.x,x=E-c.y,_=g-c.z,A=r.x-I,D=r.y-E,R=r.z-g;return N*A+x*D+_*R>0&&(r.x=I,r.y=E,r.z=g,t.x=(r.x-I)/n,t.y=(r.y-E)/n,t.z=(r.z-g)/n),r}function nr(c,e){e.set(0,0),c.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=c.length,e.y/=c.length}function rr(c,e){return Xt(c)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class jd{constructor(){this._listeners={}}addEventListener(e,t){const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners[e];if(i!==void 0){const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const t=this._listeners[e.type];if(t!==void 0){e.target=this;const i=t.slice(0);for(let s=0,n=i.length;s{},this._enabled=!0,this._state=j.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=Pi.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new ce.Vector3,this._focalOffsetVelocity=new ce.Vector3,this._zoomVelocity={value:0},this._truckInternal=(C,w,O)=>{let y,L;if(ni(this._camera)){const N=fe.copy(this._camera.position).sub(this._target),x=this._camera.getEffectiveFOV()*as,_=N.length()*Math.tan(x*.5);y=this.truckSpeed*C*_/this._elementRect.height,L=this.truckSpeed*w*_/this._elementRect.height}else if(Xt(this._camera)){const N=this._camera;y=C*(N.right-N.left)/N.zoom/this._elementRect.width,L=w*(N.top-N.bottom)/N.zoom/this._elementRect.height}else return;this.verticalDragToForward?(O?this.setFocalOffset(this._focalOffsetEnd.x+y,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(y,0,!0),this.forward(-L,!0)):O?this.setFocalOffset(this._focalOffsetEnd.x+y,this._focalOffsetEnd.y+L,this._focalOffsetEnd.z,!0):this.truck(y,L,!0)},this._rotateInternal=(C,w)=>{const O=Mi*this.azimuthRotateSpeed*C/this._elementRect.height,y=Mi*this.polarRotateSpeed*w/this._elementRect.height;this.rotate(O,y,!0)},this._dollyInternal=(C,w,O)=>{const y=Math.pow(.95,-C*this.dollySpeed),L=this._sphericalEnd.radius,N=this._sphericalEnd.radius*y,x=pt(N,this.minDistance,this.maxDistance),_=x-N;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(N,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(_,!0),this._dollyToNoClamp(x,!0)):this._dollyToNoClamp(x,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?N:x)-L,this._dollyControlCoord.set(w,O)),this._lastDollyDirection=Math.sign(-C)},this._zoomInternal=(C,w,O)=>{const y=Math.pow(.95,C*this.dollySpeed),L=this._zoom,N=this._zoom*y;this.zoomTo(N,!0),this.dollyToCursor&&(this._changedZoom+=N-L,this._dollyControlCoord.set(w,O))},typeof ce>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new ce.Quaternion().setFromUnitVectors(this._camera.up,qs),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=j.NONE,this._target=new ce.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new ce.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new ce.Spherical().setFromVector3(fe.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new ce.Vector3,new ce.Vector3,new ce.Vector3,new ce.Vector3],this._updateNearPlaneCorners(),this._boundary=new ce.Box3(new ce.Vector3(-1/0,-1/0,-1/0),new ce.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new ce.Vector2,this.mouseButtons={left:j.ROTATE,middle:j.DOLLY,right:j.TRUCK,wheel:ni(this._camera)?j.DOLLY:Xt(this._camera)?j.ZOOM:j.NONE},this.touches={one:j.TOUCH_ROTATE,two:ni(this._camera)?j.TOUCH_DOLLY_TRUCK:Xt(this._camera)?j.TOUCH_ZOOM_TRUCK:j.NONE,three:j.TOUCH_TRUCK};const i=new ce.Vector2,s=new ce.Vector2,n=new ce.Vector2,r=C=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const y=this._domElement.getBoundingClientRect(),L=C.clientX/y.width,N=C.clientY/y.height;if(Lthis._interactiveArea.right||Nthis._interactiveArea.bottom)return}const w=C.pointerType!=="mouse"?null:(C.buttons&he.LEFT)===he.LEFT?he.LEFT:(C.buttons&he.MIDDLE)===he.MIDDLE?he.MIDDLE:(C.buttons&he.RIGHT)===he.RIGHT?he.RIGHT:null;if(w!==null){const y=this._findPointerByMouseButton(w);y&&this._disposePointer(y)}if((C.buttons&he.LEFT)===he.LEFT&&this._lockedPointer)return;const O={pointerId:C.pointerId,clientX:C.clientX,clientY:C.clientY,deltaX:0,deltaY:0,mouseButton:w};this._activePointers.push(O),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",h),this._isDragging=!0,p(C)},o=C=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const y=this._domElement.getBoundingClientRect(),L=C.clientX/y.width,N=C.clientY/y.height;if(Lthis._interactiveArea.right||Nthis._interactiveArea.bottom)return}const w=(C.buttons&he.LEFT)===he.LEFT?he.LEFT:(C.buttons&he.MIDDLE)===he.MIDDLE?he.MIDDLE:(C.buttons&he.RIGHT)===he.RIGHT?he.RIGHT:null;if(w!==null){const y=this._findPointerByMouseButton(w);y&&this._disposePointer(y)}const O={pointerId:1,clientX:C.clientX,clientY:C.clientY,deltaX:0,deltaY:0,mouseButton:(C.buttons&he.LEFT)===he.LEFT?he.LEFT:(C.buttons&he.MIDDLE)===he.LEFT?he.MIDDLE:(C.buttons&he.RIGHT)===he.LEFT?he.RIGHT:null};this._activePointers.push(O),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.addEventListener("mousemove",l),this._domElement.ownerDocument.addEventListener("mouseup",d),this._isDragging=!0,p(C)},a=C=>{C.cancelable&&C.preventDefault();const w=C.pointerId,O=this._lockedPointer||this._findPointerById(w);if(O){if(O.clientX=C.clientX,O.clientY=C.clientY,O.deltaX=C.movementX,O.deltaY=C.movementY,this._state=0,C.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(C.buttons&he.LEFT)===he.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(C.buttons&he.MIDDLE)===he.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(C.buttons&he.RIGHT)===he.RIGHT&&(this._state=this._state|this.mouseButtons.right);I()}},l=C=>{const w=this._lockedPointer||this._findPointerById(1);w&&(w.clientX=C.clientX,w.clientY=C.clientY,w.deltaX=C.movementX,w.deltaY=C.movementY,this._state=0,(this._lockedPointer||(C.buttons&he.LEFT)===he.LEFT)&&(this._state=this._state|this.mouseButtons.left),(C.buttons&he.MIDDLE)===he.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(C.buttons&he.RIGHT)===he.RIGHT&&(this._state=this._state|this.mouseButtons.right),I())},h=C=>{const w=this._findPointerById(C.pointerId);if(!(w&&w===this._lockedPointer)){if(w&&this._disposePointer(w),C.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=j.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=j.NONE;E()}},d=()=>{const C=this._findPointerById(1);C&&C===this._lockedPointer||(C&&this._disposePointer(C),this._state=j.NONE,E())};let u=-1;const f=C=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===j.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const N=this._domElement.getBoundingClientRect(),x=C.clientX/N.width,_=C.clientY/N.height;if(xthis._interactiveArea.right||_this._interactiveArea.bottom)return}if(C.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===j.ROTATE||this.mouseButtons.wheel===j.TRUCK){const N=performance.now();u-N<1e3&&this._getClientRect(this._elementRect),u=N}const w=Qd?-1:-3,O=C.deltaMode===1?C.deltaY/w:C.deltaY/(w*10),y=this.dollyToCursor?(C.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,L=this.dollyToCursor?(C.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case j.ROTATE:{this._rotateInternal(C.deltaX,C.deltaY),this._isUserControllingRotate=!0;break}case j.TRUCK:{this._truckInternal(C.deltaX,C.deltaY,!1),this._isUserControllingTruck=!0;break}case j.OFFSET:{this._truckInternal(C.deltaX,C.deltaY,!0),this._isUserControllingOffset=!0;break}case j.DOLLY:{this._dollyInternal(-O,y,L),this._isUserControllingDolly=!0;break}case j.ZOOM:{this._zoomInternal(-O,y,L),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},m=C=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===We.ACTION.NONE){const w=C instanceof PointerEvent?C.pointerId:0,O=this._findPointerById(w);O&&this._disposePointer(O),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",d);return}C.preventDefault()}},p=C=>{if(this._enabled){if(nr(this._activePointers,Ke),this._getClientRect(this._elementRect),i.copy(Ke),s.copy(Ke),this._activePointers.length>=2){const w=Ke.x-this._activePointers[1].clientX,O=Ke.y-this._activePointers[1].clientY,y=Math.sqrt(w*w+O*O);n.set(0,y);const L=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,N=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;s.set(L,N)}if(this._state=0,!C)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in C&&C.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(C.buttons&he.LEFT)===he.LEFT&&(this._state=this._state|this.mouseButtons.left),(C.buttons&he.MIDDLE)===he.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(C.buttons&he.RIGHT)===he.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&j.ROTATE)===j.ROTATE||(this._state&j.TOUCH_ROTATE)===j.TOUCH_ROTATE||(this._state&j.TOUCH_DOLLY_ROTATE)===j.TOUCH_DOLLY_ROTATE||(this._state&j.TOUCH_ZOOM_ROTATE)===j.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&j.TRUCK)===j.TRUCK||(this._state&j.TOUCH_TRUCK)===j.TOUCH_TRUCK||(this._state&j.TOUCH_DOLLY_TRUCK)===j.TOUCH_DOLLY_TRUCK||(this._state&j.TOUCH_ZOOM_TRUCK)===j.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&j.DOLLY)===j.DOLLY||(this._state&j.TOUCH_DOLLY)===j.TOUCH_DOLLY||(this._state&j.TOUCH_DOLLY_TRUCK)===j.TOUCH_DOLLY_TRUCK||(this._state&j.TOUCH_DOLLY_OFFSET)===j.TOUCH_DOLLY_OFFSET||(this._state&j.TOUCH_DOLLY_ROTATE)===j.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&j.ZOOM)===j.ZOOM||(this._state&j.TOUCH_ZOOM)===j.TOUCH_ZOOM||(this._state&j.TOUCH_ZOOM_TRUCK)===j.TOUCH_ZOOM_TRUCK||(this._state&j.TOUCH_ZOOM_OFFSET)===j.TOUCH_ZOOM_OFFSET||(this._state&j.TOUCH_ZOOM_ROTATE)===j.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&j.OFFSET)===j.OFFSET||(this._state&j.TOUCH_OFFSET)===j.TOUCH_OFFSET||(this._state&j.TOUCH_DOLLY_OFFSET)===j.TOUCH_DOLLY_OFFSET||(this._state&j.TOUCH_ZOOM_OFFSET)===j.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})}},I=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,nr(this._activePointers,Ke);const C=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,w=C?-C.deltaX:s.x-Ke.x,O=C?-C.deltaY:s.y-Ke.y;if(s.copy(Ke),((this._state&j.ROTATE)===j.ROTATE||(this._state&j.TOUCH_ROTATE)===j.TOUCH_ROTATE||(this._state&j.TOUCH_DOLLY_ROTATE)===j.TOUCH_DOLLY_ROTATE||(this._state&j.TOUCH_ZOOM_ROTATE)===j.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(w,O),this._isUserControllingRotate=!0),(this._state&j.DOLLY)===j.DOLLY||(this._state&j.ZOOM)===j.ZOOM){const y=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,L=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0,N=this.dollyDragInverted?-1:1;(this._state&j.DOLLY)===j.DOLLY?(this._dollyInternal(N*O*Ks,y,L),this._isUserControllingDolly=!0):(this._zoomInternal(N*O*Ks,y,L),this._isUserControllingZoom=!0)}if((this._state&j.TOUCH_DOLLY)===j.TOUCH_DOLLY||(this._state&j.TOUCH_ZOOM)===j.TOUCH_ZOOM||(this._state&j.TOUCH_DOLLY_TRUCK)===j.TOUCH_DOLLY_TRUCK||(this._state&j.TOUCH_ZOOM_TRUCK)===j.TOUCH_ZOOM_TRUCK||(this._state&j.TOUCH_DOLLY_OFFSET)===j.TOUCH_DOLLY_OFFSET||(this._state&j.TOUCH_ZOOM_OFFSET)===j.TOUCH_ZOOM_OFFSET||(this._state&j.TOUCH_DOLLY_ROTATE)===j.TOUCH_DOLLY_ROTATE||(this._state&j.TOUCH_ZOOM_ROTATE)===j.TOUCH_ZOOM_ROTATE){const y=Ke.x-this._activePointers[1].clientX,L=Ke.y-this._activePointers[1].clientY,N=Math.sqrt(y*y+L*L),x=n.y-N;n.set(0,N);const _=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,A=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&j.TOUCH_DOLLY)===j.TOUCH_DOLLY||(this._state&j.TOUCH_DOLLY_ROTATE)===j.TOUCH_DOLLY_ROTATE||(this._state&j.TOUCH_DOLLY_TRUCK)===j.TOUCH_DOLLY_TRUCK||(this._state&j.TOUCH_DOLLY_OFFSET)===j.TOUCH_DOLLY_OFFSET?(this._dollyInternal(x*Ks,_,A),this._isUserControllingDolly=!0):(this._zoomInternal(x*Ks,_,A),this._isUserControllingZoom=!0)}((this._state&j.TRUCK)===j.TRUCK||(this._state&j.TOUCH_TRUCK)===j.TOUCH_TRUCK||(this._state&j.TOUCH_DOLLY_TRUCK)===j.TOUCH_DOLLY_TRUCK||(this._state&j.TOUCH_ZOOM_TRUCK)===j.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(w,O,!1),this._isUserControllingTruck=!0),((this._state&j.OFFSET)===j.OFFSET||(this._state&j.TOUCH_OFFSET)===j.TOUCH_OFFSET||(this._state&j.TOUCH_DOLLY_OFFSET)===j.TOUCH_DOLLY_OFFSET||(this._state&j.TOUCH_ZOOM_OFFSET)===j.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(w,O,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},E=()=>{nr(this._activePointers,Ke),s.copy(Ke),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mouseup",d),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",g),this._domElement.ownerDocument.addEventListener("pointerlockerror",v),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",h),p())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",g),this._domElement.ownerDocument.removeEventListener("pointerlockerror",v))};const g=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},v=()=>{this.unlockPointer()};this._addAllEventListeners=C=>{this._domElement=C,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",r),Kd&&this._domElement.addEventListener("mousedown",o),this._domElement.addEventListener("pointercancel",h),this._domElement.addEventListener("wheel",f,{passive:!1}),this._domElement.addEventListener("contextmenu",m)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",r),this._domElement.removeEventListener("mousedown",o),this._domElement.removeEventListener("pointercancel",h),this._domElement.removeEventListener("wheel",f,{passive:!1}),this._domElement.removeEventListener("contextmenu",m),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.removeEventListener("pointerlockchange",g),this._domElement.ownerDocument.removeEventListener("pointerlockerror",v))},this.cancel=()=>{this._state!==j.NONE&&(this._state=j.NONE,this._activePointers.length=0,E())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=pt(e.width,0,1),this._interactiveArea.height=pt(e.height,0,1),this._interactiveArea.x=pt(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=pt(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,i=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,i)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,i=!1){this._isUserControllingRotate=!1;const s=pt(e,this.minAzimuthAngle,this.maxAzimuthAngle),n=pt(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=s,this._sphericalEnd.phi=n,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,i||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const r=!i||ge(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ge(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(r)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=Pi.NONE,this._changedDolly=0,this._dollyToNoClamp(pt(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const i=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const n=this._collisionTest(),r=ge(n,this._spherical.radius);if(!(i>e)&&r)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,n)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const s=!t||ge(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(s)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(hs).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const i=!t||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=pt(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const i=!t||ge(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(i)}pan(e,t,i=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,i)}truck(e,t,i=!1){this._camera.updateMatrix(),Tt.setFromMatrixColumn(this._camera.matrix,0),Rt.setFromMatrixColumn(this._camera.matrix,1),Tt.multiplyScalar(e),Rt.multiplyScalar(-t);const s=fe.copy(Tt).add(Rt),n=Ee.copy(this._targetEnd).add(s);return this.moveTo(n.x,n.y,n.z,i)}forward(e,t=!1){fe.setFromMatrixColumn(this._camera.matrix,0),fe.crossVectors(this._camera.up,fe),fe.multiplyScalar(e);const i=Ee.copy(this._targetEnd).add(fe);return this.moveTo(i.x,i.y,i.z,t)}elevate(e,t=!1){return fe.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+fe.x,this._targetEnd.y+fe.y,this._targetEnd.z+fe.z,t)}moveTo(e,t,i,s=!1){this._isUserControllingTruck=!1;const n=fe.set(e,t,i).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,n,this.boundaryFriction),this._needsUpdate=!0,s||this._target.copy(this._targetEnd);const r=!s||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}lookInDirectionOf(e,t,i,s=!1){const n=fe.set(e,t,i).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(n.x,n.y,n.z,s)}fitToBox(e,t,{cover:i=!1,paddingLeft:s=0,paddingRight:n=0,paddingBottom:r=0,paddingTop:o=0}={}){const a=[],l=e.isBox3?xi.copy(e):xi.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const h=Qo(this._sphericalEnd.theta,Zo),d=Qo(this._sphericalEnd.phi,Zo);a.push(this.rotateTo(h,d,t));const u=fe.setFromSpherical(this._sphericalEnd).normalize(),f=ta.setFromUnitVectors(u,or),m=ge(Math.abs(u.y),1);m&&f.multiply(lr.setFromAxisAngle(qs,h)),f.multiply(this._yAxisUpSpaceInverse);const p=ea.makeEmpty();Ee.copy(l.min).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.min).setX(l.max.x).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.min).setY(l.max.y).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.max).setZ(l.min.z).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.min).setZ(l.max.z).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.max).setY(l.min.y).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.max).setX(l.min.x).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.max).applyQuaternion(f),p.expandByPoint(Ee),p.min.x-=s,p.min.y-=r,p.max.x+=n,p.max.y+=o,f.setFromUnitVectors(or,u),m&&f.premultiply(lr.invert()),f.premultiply(this._yAxisUpSpace);const I=p.getSize(fe),E=p.getCenter(Ee).applyQuaternion(f);if(ni(this._camera)){const g=this.getDistanceToFitBox(I.x,I.y,I.z,i);a.push(this.moveTo(E.x,E.y,E.z,t)),a.push(this.dollyTo(g,t)),a.push(this.setFocalOffset(0,0,0,t))}else if(Xt(this._camera)){const g=this._camera,v=g.right-g.left,C=g.top-g.bottom,w=i?Math.max(v/I.x,C/I.y):Math.min(v/I.x,C/I.y);a.push(this.moveTo(E.x,E.y,E.z,t)),a.push(this.zoomTo(w,t)),a.push(this.setFocalOffset(0,0,0,t))}return Promise.all(a)}fitToSphere(e,t){const i=[],s=e instanceof ce.Sphere?ar.copy(e):We.createBoundingSphere(e,ar);if(i.push(this.moveTo(s.center.x,s.center.y,s.center.z,t)),ni(this._camera)){const n=this.getDistanceToFitSphere(s.radius);i.push(this.dollyTo(n,t))}else if(Xt(this._camera)){const n=this._camera.right-this._camera.left,r=this._camera.top-this._camera.bottom,o=2*s.radius,a=Math.min(n/o,r/o);i.push(this.zoomTo(a,t))}return i.push(this.setFocalOffset(0,0,0,t)),Promise.all(i)}setLookAt(e,t,i,s,n,r,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Pi.NONE,this._changedDolly=0;const a=Ee.set(s,n,r),l=fe.set(e,t,i);this._targetEnd.copy(a),this._sphericalEnd.setFromVector3(l.sub(a).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const h=!o||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold)&&ge(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ge(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&ge(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(h)}lerpLookAt(e,t,i,s,n,r,o,a,l,h,d,u,f,m=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Pi.NONE,this._changedDolly=0;const p=fe.set(s,n,r),I=Ee.set(e,t,i);ot.setFromVector3(I.sub(p).applyQuaternion(this._yAxisUpSpace));const E=Di.set(h,d,u),g=Ee.set(o,a,l);ds.setFromVector3(g.sub(E).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(p.lerp(E,f));const v=ds.theta-ot.theta,C=ds.phi-ot.phi,w=ds.radius-ot.radius;this._sphericalEnd.set(ot.radius+w*f,ot.phi+C*f,ot.theta+v*f),this.normalizeRotations(),this._needsUpdate=!0,m||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const O=!m||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold)&&ge(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ge(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&ge(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(O)}setPosition(e,t,i,s=!1){return this.setLookAt(e,t,i,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,s)}setTarget(e,t,i,s=!1){const n=this.getPosition(fe),r=this.setLookAt(n.x,n.y,n.z,e,t,i,s);return this._sphericalEnd.phi=pt(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),r}setFocalOffset(e,t,i,s=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,i),this._needsUpdate=!0,s||this._focalOffset.copy(this._focalOffsetEnd);const n=!s||ge(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&ge(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&ge(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}setOrbitPoint(e,t,i){this._camera.updateMatrixWorld(),Tt.setFromMatrixColumn(this._camera.matrixWorldInverse,0),Rt.setFromMatrixColumn(this._camera.matrixWorldInverse,1),ri.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const s=fe.set(e,t,i),n=s.distanceTo(this._camera.position),r=s.sub(this._camera.position);Tt.multiplyScalar(r.x),Rt.multiplyScalar(r.y),ri.multiplyScalar(r.z),fe.copy(Tt).add(Rt).add(ri),fe.z=fe.z+n,this.dollyTo(n,!1),this.setFocalOffset(-fe.x,fe.y,-fe.z,!1),this.moveTo(e,t,i,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,i,s){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new ce.Vector4,typeof e=="number"?this._viewport.set(e,t,i,s):this._viewport.copy(e)}getDistanceToFitBox(e,t,i,s=!1){if(rr(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const n=e/t,r=this._camera.getEffectiveFOV()*as,o=this._camera.aspect;return((s?n>o:nt.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,i){const s=t.lengthSq();if(s===0)return e;const n=Ee.copy(t).add(e),r=this._boundary.clampPoint(n,Di).sub(n),o=r.lengthSq();if(o===0)return e.add(t);if(o===s)return e;if(i===0)return e.add(t).add(r);{const a=1+i*o/t.dot(r);return e.add(Ee.copy(t).multiplyScalar(a)).add(r.multiplyScalar(1-i))}}_updateNearPlaneCorners(){if(ni(this._camera)){const e=this._camera,t=e.near,i=e.getEffectiveFOV()*as,s=Math.tan(i*.5)*t,n=s*e.aspect;this._nearPlaneCorners[0].set(-n,-s,0),this._nearPlaneCorners[1].set(n,-s,0),this._nearPlaneCorners[2].set(n,s,0),this._nearPlaneCorners[3].set(-n,s,0)}else if(Xt(this._camera)){const e=this._camera,t=1/e.zoom,i=e.left*t,s=e.right*t,n=e.top*t,r=e.bottom*t;this._nearPlaneCorners[0].set(i,n,0),this._nearPlaneCorners[1].set(s,n,0),this._nearPlaneCorners[2].set(s,r,0),this._nearPlaneCorners[3].set(i,r,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||rr(this._camera,"_collisionTest"))return e;const t=this._getTargetDirection(hs);cr.lookAt(qo,t,this._camera.up);for(let i=0;i<4;i++){const s=Ee.copy(this._nearPlaneCorners[i]);s.applyMatrix4(cr);const n=Di.addVectors(this._target,s);Js.set(n,t),Js.far=this._spherical.radius+1;const r=Js.intersectObjects(this.colliderMeshes);r.length!==0&&r[0].distance{const i=()=>{this.removeEventListener("rest",i),t()};this.addEventListener("rest",i)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new ce.Sphere){const i=t,s=i.center;xi.makeEmpty(),e.traverseVisible(r=>{r.isMesh&&xi.expandByObject(r)}),xi.getCenter(s);let n=0;return e.traverseVisible(r=>{if(!r.isMesh)return;const o=r,a=o.geometry.clone();a.applyMatrix4(o.matrixWorld);const l=a.attributes.position;for(let h=0,d=l.count;h{var t;if(!(!this.currentWorld||!this.currentWorld.renderer)){if(this.three instanceof ii){this.onAspectUpdated.trigger();return}if((t=this.currentWorld.renderer)!=null&&t.isResizeable()){const i=this.currentWorld.renderer.getSize();this.three.aspect=i.width/i.height,this.three.updateProjectionMatrix(),this.onAspectUpdated.trigger()}}}),this.three=this.setupCamera(),this.setupEvents(!0),this.onWorldChanged.add(({action:t,world:i})=>{if(t==="added"){const s=this.newCameraControls();this._allControls.set(i.uuid,s)}if(t==="removed"){const s=this._allControls.get(i.uuid);s&&(s.dispose(),this._allControls.delete(i.uuid))}})}get controls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");const e=this._allControls.get(this.currentWorld.uuid);if(!e)throw new Error("Controls not found!");return e}get enabled(){return this.currentWorld===null?!1:this.controls.enabled}set enabled(e){this.currentWorld!==null&&(this.controls.enabled=e)}dispose(){this.setupEvents(!1),this.onAspectUpdated.reset(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.three.removeFromParent(),this.onDisposed.trigger(),this.onDisposed.reset();for(const[e,t]of this._allControls)t.dispose()}update(e){this.enabled&&(this.onBeforeUpdate.trigger(this),this.controls.update(e),this.onAfterUpdate.trigger(this))}setupCamera(){const e=window.innerWidth/window.innerHeight,t=new Pa(60,e,1,1e3);return t.position.set(50,50,50),t.lookAt(new P(0,0,0)),t}newCameraControls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");if(!this.currentWorld.renderer)throw new Error("This camera needs a renderer to work!");We.install({THREE:Ss.getSubsetOfThree()});const{domElement:e}=this.currentWorld.renderer.three,t=new We(this.three,e);return t.smoothTime=.2,t.dollyToCursor=!0,t.infinityDolly=!0,t.minDistance=6,t}setupEvents(e){e?window.addEventListener("resize",this.updateAspect):window.removeEventListener("resize",this.updateAspect)}static getSubsetOfThree(){return{MOUSE:Vc,Vector2:Se,Vector3:P,Vector4:Xi,Quaternion:at,Matrix4:ne,Spherical:kc,Box3:Fe,Sphere:gi,Raycaster:Ln,MathUtils:Ii}}}const $a=class el extends de{constructor(e){super(e),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onDisposed",new Y),T(this,"list",new gt),T(this,"enabled",!0),e.add(el.uuid,this)}create(){const e=new Wd(this.components),t=e.uuid;if(this.list.has(t))throw new Error("There is already a world with this name!");return this.list.set(t,e),e}delete(e){if(!this.list.has(e.uuid))throw new Error("The provided world is not found in the list!");this.list.delete(e.uuid),e.dispose()}dispose(){this.enabled=!1;for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}update(e){if(this.enabled)for(const[t,i]of this.list)i.update(e)}};T($a,"uuid","fdb61dc4-2ec1-4966-b83d-54ea795fad4a");let tl=$a;function qd(c,e,t,i){return new Promise((s,n)=>{function r(){const o=c.clientWaitSync(e,t,0);if(o===c.WAIT_FAILED){n();return}if(o===c.TIMEOUT_EXPIRED){setTimeout(r,i);return}s()}r()})}async function Jd(c,e,t,i,s,n,r){const o=c.fenceSync(c.SYNC_GPU_COMMANDS_COMPLETE,0);c.flush(),await qd(c,o,0,10),c.deleteSync(o),c.bindBuffer(e,t),c.getBufferSubData(e,i,s,n,r),c.bindBuffer(e,null)}async function $d(c,e,t,i,s,n,r,o){const a=c.createBuffer();return c.bindBuffer(c.PIXEL_PACK_BUFFER,a),c.bufferData(c.PIXEL_PACK_BUFFER,o.byteLength,c.STREAM_READ),c.readPixels(e,t,i,s,n,r,0),c.bindBuffer(c.PIXEL_PACK_BUFFER,null),await Jd(c,c.PIXEL_PACK_BUFFER,a,0,o),c.deleteBuffer(a),o}class eu extends Zi{constructor(){super(...arguments),T(this,"_config",{enabled:{value:!0,type:"Boolean"},width:{type:"Number",interpolable:!0,value:512,min:32,max:1024},height:{type:"Number",interpolable:!0,value:512,min:32,max:1024},autoUpdate:{value:!0,type:"Boolean"},renderDebugFrame:{value:!1,type:"Boolean"},updateInterval:{type:"Number",interpolable:!0,value:1,min:0,max:1},threshold:{type:"Number",interpolable:!0,value:100,min:1,max:512}}),T(this,"_interval",null)}get enabled(){return this._config.enabled.value}set enabled(e){this._config.enabled.value=e,this._component.enabled=e}get width(){return this._config.width.value}set width(e){this.setWidthHeight(e,this.height)}get height(){return this._config.height.value}set height(e){this.setWidthHeight(this.width,e)}get autoUpdate(){return this._config.autoUpdate.value}set autoUpdate(e){this.setAutoAndInterval(e,this.updateInterval)}get updateInterval(){return this._config.updateInterval.value}set updateInterval(e){this.setAutoAndInterval(this.autoUpdate,e)}get renderDebugFrame(){return this._config.renderDebugFrame.value}set renderDebugFrame(e){this._config.renderDebugFrame.value=e}get threshold(){return this._config.threshold.value}set threshold(e){this._config.threshold.value=e}setWidthHeight(e,t){if(e<=0||t<=0)throw new Error("The width and height of the culler renderer must be more than 0!");this._config.width.value=e,this._config.height.value=t,this.resetRenderTarget()}setAutoAndInterval(e,t){if(t<=0)throw new Error("The updateInterval of the culler renderer must be more than 0!");this._config.autoUpdate.value=e,this._config.updateInterval.value=t,this.resetInterval(e)}resetRenderTarget(){this._component.renderTarget.dispose(),this._component.renderTarget=new Ot(this.width,this.height),this._component.bufferSize=this.width*this.height*4,this._component.buffer=new Uint8Array(this._component.bufferSize)}resetInterval(e){this._interval!==null&&window.clearInterval(this._interval),e&&(this._interval=window.setInterval(async()=>{this._component.preventUpdate||await this._component.updateVisibility()},this.updateInterval))}}class il{constructor(e,t){if(T(this,"onSetup",new Y),T(this,"onDisposed",new Y),T(this,"onViewUpdated",new Ut),T(this,"enabled",!0),T(this,"needsUpdate",!1),T(this,"components"),T(this,"renderTarget",new Ot),T(this,"bufferSize",1),T(this,"buffer",new Uint8Array),T(this,"preventUpdate",!1),T(this,"config"),T(this,"isSetup",!1),T(this,"world"),T(this,"renderer"),T(this,"_defaultConfig",{enabled:!0,height:512,width:512,updateInterval:1e3,autoUpdate:!0,renderDebugFrame:!1,threshold:100}),T(this,"worker"),T(this,"scene",new Ci),T(this,"_availableColor",1),T(this,"_isWorkerBusy",!1),T(this,"updateVisibility",async n=>{if(!this.enabled||!this.needsUpdate&&!n||this._isWorkerBusy)return;this._isWorkerBusy=!0;const r=this.world.camera.three;r.updateMatrix();const{width:o,height:a}=this.config;this.renderer.setSize(o,a),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,r);const l=this.renderer.getContext();await $d(l,0,0,o,a,l.RGBA,l.UNSIGNED_BYTE,this.buffer),this.renderer.setRenderTarget(null),this.config.renderDebugFrame&&this.renderer.render(this.scene,r),this.worker.postMessage({buffer:this.buffer}),this.needsUpdate=!1}),!t.renderer)throw new Error("The given world must have a renderer!");this.components=e,this.config=new eu(this,this.components,"Culler renderer"),this.world=t,this.renderer=new Rn,this.renderer.clippingPlanes=t.renderer.clippingPlanes;const i=` + */const he={LEFT:1,RIGHT:2,MIDDLE:4},Z=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),xi={NONE:0,IN:1,OUT:-1};function ni(c){return c.isPerspectiveCamera}function Zt(c){return c.isOrthographicCamera}const Mi=Math.PI*2,Qo=Math.PI/2,Ja=1e-5,ls=Math.PI/180;function pt(c,e,t){return Math.max(e,Math.min(t,c))}function ve(c,e=Ja){return Math.abs(c)0==f>h&&(f=h,t.value=(f-h)/n),f}function qo(c,e,t,i,s=1/0,n,r){i=Math.max(1e-4,i);const o=2/i,a=o*n,l=1/(1+a+.48*a*a+.235*a*a*a);let h=e.x,d=e.y,u=e.z,f=c.x-h,m=c.y-d,p=c.z-u;const E=h,I=d,g=u,w=s*i,C=w*w,v=f*f+m*m+p*p;if(v>C){const U=Math.sqrt(v);f=f/U*w,m=m/U*w,p=p/U*w}h=c.x-f,d=c.y-m,u=c.z-p;const O=(t.x+o*f)*n,A=(t.y+o*m)*n,b=(t.z+o*p)*n;t.x=(t.x-o*O)*l,t.y=(t.y-o*A)*l,t.z=(t.z-o*b)*l,r.x=h+(f+O)*l,r.y=d+(m+A)*l,r.z=u+(p+b)*l;const N=E-c.x,D=I-c.y,_=g-c.z,F=r.x-E,L=r.y-I,R=r.z-g;return N*F+D*L+_*R>0&&(r.x=E,r.y=I,r.z=g,t.x=(r.x-E)/n,t.y=(r.y-I)/n,t.z=(r.z-g)/n),r}function rr(c,e){e.set(0,0),c.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=c.length,e.y/=c.length}function or(c,e){return Zt(c)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class Kd{constructor(){this._listeners={}}addEventListener(e,t){const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners[e];if(i!==void 0){const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const t=this._listeners[e.type];if(t!==void 0){e.target=this;const i=t.slice(0);for(let s=0,n=i.length;s{},this._enabled=!0,this._state=Z.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=xi.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new ce.Vector3,this._focalOffsetVelocity=new ce.Vector3,this._zoomVelocity={value:0},this._truckInternal=(C,v,O)=>{let A,b;if(ni(this._camera)){const N=fe.copy(this._camera.position).sub(this._target),D=this._camera.getEffectiveFOV()*ls,_=N.length()*Math.tan(D*.5);A=this.truckSpeed*C*_/this._elementRect.height,b=this.truckSpeed*v*_/this._elementRect.height}else if(Zt(this._camera)){const N=this._camera;A=C*(N.right-N.left)/N.zoom/this._elementRect.width,b=v*(N.top-N.bottom)/N.zoom/this._elementRect.height}else return;this.verticalDragToForward?(O?this.setFocalOffset(this._focalOffsetEnd.x+A,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(A,0,!0),this.forward(-b,!0)):O?this.setFocalOffset(this._focalOffsetEnd.x+A,this._focalOffsetEnd.y+b,this._focalOffsetEnd.z,!0):this.truck(A,b,!0)},this._rotateInternal=(C,v)=>{const O=Mi*this.azimuthRotateSpeed*C/this._elementRect.height,A=Mi*this.polarRotateSpeed*v/this._elementRect.height;this.rotate(O,A,!0)},this._dollyInternal=(C,v,O)=>{const A=Math.pow(.95,-C*this.dollySpeed),b=this._sphericalEnd.radius,N=this._sphericalEnd.radius*A,D=pt(N,this.minDistance,this.maxDistance),_=D-N;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(N,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(_,!0),this._dollyToNoClamp(D,!0)):this._dollyToNoClamp(D,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?N:D)-b,this._dollyControlCoord.set(v,O)),this._lastDollyDirection=Math.sign(-C)},this._zoomInternal=(C,v,O)=>{const A=Math.pow(.95,C*this.dollySpeed),b=this._zoom,N=this._zoom*A;this.zoomTo(N,!0),this.dollyToCursor&&(this._changedZoom+=N-b,this._dollyControlCoord.set(v,O))},typeof ce>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new ce.Quaternion().setFromUnitVectors(this._camera.up,Js),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=Z.NONE,this._target=new ce.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new ce.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new ce.Spherical().setFromVector3(fe.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new ce.Vector3,new ce.Vector3,new ce.Vector3,new ce.Vector3],this._updateNearPlaneCorners(),this._boundary=new ce.Box3(new ce.Vector3(-1/0,-1/0,-1/0),new ce.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new ce.Vector2,this.mouseButtons={left:Z.ROTATE,middle:Z.DOLLY,right:Z.TRUCK,wheel:ni(this._camera)?Z.DOLLY:Zt(this._camera)?Z.ZOOM:Z.NONE},this.touches={one:Z.TOUCH_ROTATE,two:ni(this._camera)?Z.TOUCH_DOLLY_TRUCK:Zt(this._camera)?Z.TOUCH_ZOOM_TRUCK:Z.NONE,three:Z.TOUCH_TRUCK};const i=new ce.Vector2,s=new ce.Vector2,n=new ce.Vector2,r=C=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const A=this._domElement.getBoundingClientRect(),b=C.clientX/A.width,N=C.clientY/A.height;if(bthis._interactiveArea.right||Nthis._interactiveArea.bottom)return}const v=C.pointerType!=="mouse"?null:(C.buttons&he.LEFT)===he.LEFT?he.LEFT:(C.buttons&he.MIDDLE)===he.MIDDLE?he.MIDDLE:(C.buttons&he.RIGHT)===he.RIGHT?he.RIGHT:null;if(v!==null){const A=this._findPointerByMouseButton(v);A&&this._disposePointer(A)}if((C.buttons&he.LEFT)===he.LEFT&&this._lockedPointer)return;const O={pointerId:C.pointerId,clientX:C.clientX,clientY:C.clientY,deltaX:0,deltaY:0,mouseButton:v};this._activePointers.push(O),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",h),this._isDragging=!0,p(C)},o=C=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const A=this._domElement.getBoundingClientRect(),b=C.clientX/A.width,N=C.clientY/A.height;if(bthis._interactiveArea.right||Nthis._interactiveArea.bottom)return}const v=(C.buttons&he.LEFT)===he.LEFT?he.LEFT:(C.buttons&he.MIDDLE)===he.MIDDLE?he.MIDDLE:(C.buttons&he.RIGHT)===he.RIGHT?he.RIGHT:null;if(v!==null){const A=this._findPointerByMouseButton(v);A&&this._disposePointer(A)}const O={pointerId:1,clientX:C.clientX,clientY:C.clientY,deltaX:0,deltaY:0,mouseButton:(C.buttons&he.LEFT)===he.LEFT?he.LEFT:(C.buttons&he.MIDDLE)===he.LEFT?he.MIDDLE:(C.buttons&he.RIGHT)===he.LEFT?he.RIGHT:null};this._activePointers.push(O),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.addEventListener("mousemove",l),this._domElement.ownerDocument.addEventListener("mouseup",d),this._isDragging=!0,p(C)},a=C=>{C.cancelable&&C.preventDefault();const v=C.pointerId,O=this._lockedPointer||this._findPointerById(v);if(O){if(O.clientX=C.clientX,O.clientY=C.clientY,O.deltaX=C.movementX,O.deltaY=C.movementY,this._state=0,C.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(C.buttons&he.LEFT)===he.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(C.buttons&he.MIDDLE)===he.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(C.buttons&he.RIGHT)===he.RIGHT&&(this._state=this._state|this.mouseButtons.right);E()}},l=C=>{const v=this._lockedPointer||this._findPointerById(1);v&&(v.clientX=C.clientX,v.clientY=C.clientY,v.deltaX=C.movementX,v.deltaY=C.movementY,this._state=0,(this._lockedPointer||(C.buttons&he.LEFT)===he.LEFT)&&(this._state=this._state|this.mouseButtons.left),(C.buttons&he.MIDDLE)===he.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(C.buttons&he.RIGHT)===he.RIGHT&&(this._state=this._state|this.mouseButtons.right),E())},h=C=>{const v=this._findPointerById(C.pointerId);if(!(v&&v===this._lockedPointer)){if(v&&this._disposePointer(v),C.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=Z.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=Z.NONE;I()}},d=()=>{const C=this._findPointerById(1);C&&C===this._lockedPointer||(C&&this._disposePointer(C),this._state=Z.NONE,I())};let u=-1;const f=C=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===Z.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const N=this._domElement.getBoundingClientRect(),D=C.clientX/N.width,_=C.clientY/N.height;if(Dthis._interactiveArea.right||_this._interactiveArea.bottom)return}if(C.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===Z.ROTATE||this.mouseButtons.wheel===Z.TRUCK){const N=performance.now();u-N<1e3&&this._getClientRect(this._elementRect),u=N}const v=Jd?-1:-3,O=C.deltaMode===1?C.deltaY/v:C.deltaY/(v*10),A=this.dollyToCursor?(C.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,b=this.dollyToCursor?(C.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case Z.ROTATE:{this._rotateInternal(C.deltaX,C.deltaY),this._isUserControllingRotate=!0;break}case Z.TRUCK:{this._truckInternal(C.deltaX,C.deltaY,!1),this._isUserControllingTruck=!0;break}case Z.OFFSET:{this._truckInternal(C.deltaX,C.deltaY,!0),this._isUserControllingOffset=!0;break}case Z.DOLLY:{this._dollyInternal(-O,A,b),this._isUserControllingDolly=!0;break}case Z.ZOOM:{this._zoomInternal(-O,A,b),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},m=C=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===We.ACTION.NONE){const v=C instanceof PointerEvent?C.pointerId:0,O=this._findPointerById(v);O&&this._disposePointer(O),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",d);return}C.preventDefault()}},p=C=>{if(this._enabled){if(rr(this._activePointers,Ke),this._getClientRect(this._elementRect),i.copy(Ke),s.copy(Ke),this._activePointers.length>=2){const v=Ke.x-this._activePointers[1].clientX,O=Ke.y-this._activePointers[1].clientY,A=Math.sqrt(v*v+O*O);n.set(0,A);const b=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,N=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;s.set(b,N)}if(this._state=0,!C)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in C&&C.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(C.buttons&he.LEFT)===he.LEFT&&(this._state=this._state|this.mouseButtons.left),(C.buttons&he.MIDDLE)===he.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(C.buttons&he.RIGHT)===he.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&Z.ROTATE)===Z.ROTATE||(this._state&Z.TOUCH_ROTATE)===Z.TOUCH_ROTATE||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&Z.TRUCK)===Z.TRUCK||(this._state&Z.TOUCH_TRUCK)===Z.TOUCH_TRUCK||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&Z.DOLLY)===Z.DOLLY||(this._state&Z.TOUCH_DOLLY)===Z.TOUCH_DOLLY||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&Z.ZOOM)===Z.ZOOM||(this._state&Z.TOUCH_ZOOM)===Z.TOUCH_ZOOM||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&Z.OFFSET)===Z.OFFSET||(this._state&Z.TOUCH_OFFSET)===Z.TOUCH_OFFSET||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})}},E=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,rr(this._activePointers,Ke);const C=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,v=C?-C.deltaX:s.x-Ke.x,O=C?-C.deltaY:s.y-Ke.y;if(s.copy(Ke),((this._state&Z.ROTATE)===Z.ROTATE||(this._state&Z.TOUCH_ROTATE)===Z.TOUCH_ROTATE||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(v,O),this._isUserControllingRotate=!0),(this._state&Z.DOLLY)===Z.DOLLY||(this._state&Z.ZOOM)===Z.ZOOM){const A=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,b=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0,N=this.dollyDragInverted?-1:1;(this._state&Z.DOLLY)===Z.DOLLY?(this._dollyInternal(N*O*qs,A,b),this._isUserControllingDolly=!0):(this._zoomInternal(N*O*qs,A,b),this._isUserControllingZoom=!0)}if((this._state&Z.TOUCH_DOLLY)===Z.TOUCH_DOLLY||(this._state&Z.TOUCH_ZOOM)===Z.TOUCH_ZOOM||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_ZOOM_ROTATE)===Z.TOUCH_ZOOM_ROTATE){const A=Ke.x-this._activePointers[1].clientX,b=Ke.y-this._activePointers[1].clientY,N=Math.sqrt(A*A+b*b),D=n.y-N;n.set(0,N);const _=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,F=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&Z.TOUCH_DOLLY)===Z.TOUCH_DOLLY||(this._state&Z.TOUCH_DOLLY_ROTATE)===Z.TOUCH_DOLLY_ROTATE||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET?(this._dollyInternal(D*qs,_,F),this._isUserControllingDolly=!0):(this._zoomInternal(D*qs,_,F),this._isUserControllingZoom=!0)}((this._state&Z.TRUCK)===Z.TRUCK||(this._state&Z.TOUCH_TRUCK)===Z.TOUCH_TRUCK||(this._state&Z.TOUCH_DOLLY_TRUCK)===Z.TOUCH_DOLLY_TRUCK||(this._state&Z.TOUCH_ZOOM_TRUCK)===Z.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(v,O,!1),this._isUserControllingTruck=!0),((this._state&Z.OFFSET)===Z.OFFSET||(this._state&Z.TOUCH_OFFSET)===Z.TOUCH_OFFSET||(this._state&Z.TOUCH_DOLLY_OFFSET)===Z.TOUCH_DOLLY_OFFSET||(this._state&Z.TOUCH_ZOOM_OFFSET)===Z.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(v,O,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},I=()=>{rr(this._activePointers,Ke),s.copy(Ke),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mouseup",d),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",g),this._domElement.ownerDocument.addEventListener("pointerlockerror",w),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",h),p())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",g),this._domElement.ownerDocument.removeEventListener("pointerlockerror",w))};const g=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},w=()=>{this.unlockPointer()};this._addAllEventListeners=C=>{this._domElement=C,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",r),$d&&this._domElement.addEventListener("mousedown",o),this._domElement.addEventListener("pointercancel",h),this._domElement.addEventListener("wheel",f,{passive:!1}),this._domElement.addEventListener("contextmenu",m)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",r),this._domElement.removeEventListener("mousedown",o),this._domElement.removeEventListener("pointercancel",h),this._domElement.removeEventListener("wheel",f,{passive:!1}),this._domElement.removeEventListener("contextmenu",m),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.removeEventListener("pointerlockchange",g),this._domElement.ownerDocument.removeEventListener("pointerlockerror",w))},this.cancel=()=>{this._state!==Z.NONE&&(this._state=Z.NONE,this._activePointers.length=0,I())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=pt(e.width,0,1),this._interactiveArea.height=pt(e.height,0,1),this._interactiveArea.x=pt(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=pt(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,i=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,i)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,i=!1){this._isUserControllingRotate=!1;const s=pt(e,this.minAzimuthAngle,this.maxAzimuthAngle),n=pt(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=s,this._sphericalEnd.phi=n,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,i||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const r=!i||ge(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ge(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(r)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=xi.NONE,this._changedDolly=0,this._dollyToNoClamp(pt(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const i=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const n=this._collisionTest(),r=ge(n,this._spherical.radius);if(!(i>e)&&r)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,n)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const s=!t||ge(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(s)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(ds).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const i=!t||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=pt(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const i=!t||ge(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(i)}pan(e,t,i=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,i)}truck(e,t,i=!1){this._camera.updateMatrix(),Tt.setFromMatrixColumn(this._camera.matrix,0),Rt.setFromMatrixColumn(this._camera.matrix,1),Tt.multiplyScalar(e),Rt.multiplyScalar(-t);const s=fe.copy(Tt).add(Rt),n=Ee.copy(this._targetEnd).add(s);return this.moveTo(n.x,n.y,n.z,i)}forward(e,t=!1){fe.setFromMatrixColumn(this._camera.matrix,0),fe.crossVectors(this._camera.up,fe),fe.multiplyScalar(e);const i=Ee.copy(this._targetEnd).add(fe);return this.moveTo(i.x,i.y,i.z,t)}elevate(e,t=!1){return fe.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+fe.x,this._targetEnd.y+fe.y,this._targetEnd.z+fe.z,t)}moveTo(e,t,i,s=!1){this._isUserControllingTruck=!1;const n=fe.set(e,t,i).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,n,this.boundaryFriction),this._needsUpdate=!0,s||this._target.copy(this._targetEnd);const r=!s||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}lookInDirectionOf(e,t,i,s=!1){const n=fe.set(e,t,i).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(n.x,n.y,n.z,s)}fitToBox(e,t,{cover:i=!1,paddingLeft:s=0,paddingRight:n=0,paddingBottom:r=0,paddingTop:o=0}={}){const a=[],l=e.isBox3?Di.copy(e):Di.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const h=Ko(this._sphericalEnd.theta,Qo),d=Ko(this._sphericalEnd.phi,Qo);a.push(this.rotateTo(h,d,t));const u=fe.setFromSpherical(this._sphericalEnd).normalize(),f=ia.setFromUnitVectors(u,ar),m=ge(Math.abs(u.y),1);m&&f.multiply(cr.setFromAxisAngle(Js,h)),f.multiply(this._yAxisUpSpaceInverse);const p=ta.makeEmpty();Ee.copy(l.min).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.min).setX(l.max.x).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.min).setY(l.max.y).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.max).setZ(l.min.z).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.min).setZ(l.max.z).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.max).setY(l.min.y).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.max).setX(l.min.x).applyQuaternion(f),p.expandByPoint(Ee),Ee.copy(l.max).applyQuaternion(f),p.expandByPoint(Ee),p.min.x-=s,p.min.y-=r,p.max.x+=n,p.max.y+=o,f.setFromUnitVectors(ar,u),m&&f.premultiply(cr.invert()),f.premultiply(this._yAxisUpSpace);const E=p.getSize(fe),I=p.getCenter(Ee).applyQuaternion(f);if(ni(this._camera)){const g=this.getDistanceToFitBox(E.x,E.y,E.z,i);a.push(this.moveTo(I.x,I.y,I.z,t)),a.push(this.dollyTo(g,t)),a.push(this.setFocalOffset(0,0,0,t))}else if(Zt(this._camera)){const g=this._camera,w=g.right-g.left,C=g.top-g.bottom,v=i?Math.max(w/E.x,C/E.y):Math.min(w/E.x,C/E.y);a.push(this.moveTo(I.x,I.y,I.z,t)),a.push(this.zoomTo(v,t)),a.push(this.setFocalOffset(0,0,0,t))}return Promise.all(a)}fitToSphere(e,t){const i=[],s=e instanceof ce.Sphere?lr.copy(e):We.createBoundingSphere(e,lr);if(i.push(this.moveTo(s.center.x,s.center.y,s.center.z,t)),ni(this._camera)){const n=this.getDistanceToFitSphere(s.radius);i.push(this.dollyTo(n,t))}else if(Zt(this._camera)){const n=this._camera.right-this._camera.left,r=this._camera.top-this._camera.bottom,o=2*s.radius,a=Math.min(n/o,r/o);i.push(this.zoomTo(a,t))}return i.push(this.setFocalOffset(0,0,0,t)),Promise.all(i)}setLookAt(e,t,i,s,n,r,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=xi.NONE,this._changedDolly=0;const a=Ee.set(s,n,r),l=fe.set(e,t,i);this._targetEnd.copy(a),this._sphericalEnd.setFromVector3(l.sub(a).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const h=!o||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold)&&ge(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ge(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&ge(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(h)}lerpLookAt(e,t,i,s,n,r,o,a,l,h,d,u,f,m=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=xi.NONE,this._changedDolly=0;const p=fe.set(s,n,r),E=Ee.set(e,t,i);ot.setFromVector3(E.sub(p).applyQuaternion(this._yAxisUpSpace));const I=Li.set(h,d,u),g=Ee.set(o,a,l);us.setFromVector3(g.sub(I).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(p.lerp(I,f));const w=us.theta-ot.theta,C=us.phi-ot.phi,v=us.radius-ot.radius;this._sphericalEnd.set(ot.radius+v*f,ot.phi+C*f,ot.theta+w*f),this.normalizeRotations(),this._needsUpdate=!0,m||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const O=!m||ge(this._target.x,this._targetEnd.x,this.restThreshold)&&ge(this._target.y,this._targetEnd.y,this.restThreshold)&&ge(this._target.z,this._targetEnd.z,this.restThreshold)&&ge(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&ge(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&ge(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(O)}setPosition(e,t,i,s=!1){return this.setLookAt(e,t,i,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,s)}setTarget(e,t,i,s=!1){const n=this.getPosition(fe),r=this.setLookAt(n.x,n.y,n.z,e,t,i,s);return this._sphericalEnd.phi=pt(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),r}setFocalOffset(e,t,i,s=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,i),this._needsUpdate=!0,s||this._focalOffset.copy(this._focalOffsetEnd);const n=!s||ge(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&ge(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&ge(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}setOrbitPoint(e,t,i){this._camera.updateMatrixWorld(),Tt.setFromMatrixColumn(this._camera.matrixWorldInverse,0),Rt.setFromMatrixColumn(this._camera.matrixWorldInverse,1),ri.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const s=fe.set(e,t,i),n=s.distanceTo(this._camera.position),r=s.sub(this._camera.position);Tt.multiplyScalar(r.x),Rt.multiplyScalar(r.y),ri.multiplyScalar(r.z),fe.copy(Tt).add(Rt).add(ri),fe.z=fe.z+n,this.dollyTo(n,!1),this.setFocalOffset(-fe.x,fe.y,-fe.z,!1),this.moveTo(e,t,i,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,i,s){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new ce.Vector4,typeof e=="number"?this._viewport.set(e,t,i,s):this._viewport.copy(e)}getDistanceToFitBox(e,t,i,s=!1){if(or(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const n=e/t,r=this._camera.getEffectiveFOV()*ls,o=this._camera.aspect;return((s?n>o:nt.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,i){const s=t.lengthSq();if(s===0)return e;const n=Ee.copy(t).add(e),r=this._boundary.clampPoint(n,Li).sub(n),o=r.lengthSq();if(o===0)return e.add(t);if(o===s)return e;if(i===0)return e.add(t).add(r);{const a=1+i*o/t.dot(r);return e.add(Ee.copy(t).multiplyScalar(a)).add(r.multiplyScalar(1-i))}}_updateNearPlaneCorners(){if(ni(this._camera)){const e=this._camera,t=e.near,i=e.getEffectiveFOV()*ls,s=Math.tan(i*.5)*t,n=s*e.aspect;this._nearPlaneCorners[0].set(-n,-s,0),this._nearPlaneCorners[1].set(n,-s,0),this._nearPlaneCorners[2].set(n,s,0),this._nearPlaneCorners[3].set(-n,s,0)}else if(Zt(this._camera)){const e=this._camera,t=1/e.zoom,i=e.left*t,s=e.right*t,n=e.top*t,r=e.bottom*t;this._nearPlaneCorners[0].set(i,n,0),this._nearPlaneCorners[1].set(s,n,0),this._nearPlaneCorners[2].set(s,r,0),this._nearPlaneCorners[3].set(i,r,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||or(this._camera,"_collisionTest"))return e;const t=this._getTargetDirection(ds);hr.lookAt(Jo,t,this._camera.up);for(let i=0;i<4;i++){const s=Ee.copy(this._nearPlaneCorners[i]);s.applyMatrix4(hr);const n=Li.addVectors(this._target,s);$s.set(n,t),$s.far=this._spherical.radius+1;const r=$s.intersectObjects(this.colliderMeshes);r.length!==0&&r[0].distance{const i=()=>{this.removeEventListener("rest",i),t()};this.addEventListener("rest",i)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new ce.Sphere){const i=t,s=i.center;Di.makeEmpty(),e.traverseVisible(r=>{r.isMesh&&Di.expandByObject(r)}),Di.getCenter(s);let n=0;return e.traverseVisible(r=>{if(!r.isMesh)return;const o=r,a=o.geometry.clone();a.applyMatrix4(o.matrixWorld);const l=a.attributes.position;for(let h=0,d=l.count;h{var t;if(!(!this.currentWorld||!this.currentWorld.renderer)){if(this.three instanceof ii){this.onAspectUpdated.trigger();return}if((t=this.currentWorld.renderer)!=null&&t.isResizeable()){const i=this.currentWorld.renderer.getSize();this.three.aspect=i.width/i.height,this.three.updateProjectionMatrix(),this.onAspectUpdated.trigger()}}}),this.three=this.setupCamera(),this.setupEvents(!0),this.onWorldChanged.add(({action:t,world:i})=>{if(t==="added"){const s=this.newCameraControls();this._allControls.set(i.uuid,s)}if(t==="removed"){const s=this._allControls.get(i.uuid);s&&(s.dispose(),this._allControls.delete(i.uuid))}})}get controls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");const e=this._allControls.get(this.currentWorld.uuid);if(!e)throw new Error("Controls not found!");return e}get enabled(){return this.currentWorld===null?!1:this.controls.enabled}set enabled(e){this.currentWorld!==null&&(this.controls.enabled=e)}dispose(){this.setupEvents(!1),this.onAspectUpdated.reset(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.three.removeFromParent(),this.onDisposed.trigger(),this.onDisposed.reset();for(const[e,t]of this._allControls)t.dispose()}update(e){this.enabled&&(this.onBeforeUpdate.trigger(this),this.controls.update(e),this.onAfterUpdate.trigger(this))}setupCamera(){const e=window.innerWidth/window.innerHeight,t=new Ma(60,e,1,1e3);return t.position.set(50,50,50),t.lookAt(new x(0,0,0)),t}newCameraControls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");if(!this.currentWorld.renderer)throw new Error("This camera needs a renderer to work!");We.install({THREE:ws.getSubsetOfThree()});const{domElement:e}=this.currentWorld.renderer.three,t=new We(this.three,e);return t.smoothTime=.2,t.dollyToCursor=!0,t.infinityDolly=!0,t.minDistance=6,t}setupEvents(e){e?window.addEventListener("resize",this.updateAspect):window.removeEventListener("resize",this.updateAspect)}static getSubsetOfThree(){return{MOUSE:Gc,Vector2:Se,Vector3:x,Vector4:Zi,Quaternion:at,Matrix4:ne,Spherical:Yc,Box3:ye,Sphere:gi,Raycaster:bn,MathUtils:Ii}}}const el=class tl extends de{constructor(e){super(e),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onDisposed",new Y),T(this,"list",new gt),T(this,"enabled",!0),e.add(tl.uuid,this)}create(){const e=new jd(this.components),t=e.uuid;if(this.list.has(t))throw new Error("There is already a world with this name!");return this.list.set(t,e),e}delete(e){if(!this.list.has(e.uuid))throw new Error("The provided world is not found in the list!");this.list.delete(e.uuid),e.dispose()}dispose(){this.enabled=!1;for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}update(e){if(this.enabled)for(const[t,i]of this.list)i.update(e)}};T(el,"uuid","fdb61dc4-2ec1-4966-b83d-54ea795fad4a");let il=el;function eu(c,e,t,i){return new Promise((s,n)=>{function r(){const o=c.clientWaitSync(e,t,0);if(o===c.WAIT_FAILED){n();return}if(o===c.TIMEOUT_EXPIRED){setTimeout(r,i);return}s()}r()})}async function tu(c,e,t,i,s,n,r){const o=c.fenceSync(c.SYNC_GPU_COMMANDS_COMPLETE,0);c.flush(),await eu(c,o,0,10),c.deleteSync(o),c.bindBuffer(e,t),c.getBufferSubData(e,i,s,n,r),c.bindBuffer(e,null)}async function iu(c,e,t,i,s,n,r,o){const a=c.createBuffer();return c.bindBuffer(c.PIXEL_PACK_BUFFER,a),c.bufferData(c.PIXEL_PACK_BUFFER,o.byteLength,c.STREAM_READ),c.readPixels(e,t,i,s,n,r,0),c.bindBuffer(c.PIXEL_PACK_BUFFER,null),await tu(c,c.PIXEL_PACK_BUFFER,a,0,o),c.deleteBuffer(a),o}class su extends Qi{constructor(){super(...arguments),T(this,"_config",{enabled:{value:!0,type:"Boolean"},width:{type:"Number",interpolable:!0,value:512,min:32,max:1024},height:{type:"Number",interpolable:!0,value:512,min:32,max:1024},autoUpdate:{value:!0,type:"Boolean"},renderDebugFrame:{value:!1,type:"Boolean"},updateInterval:{type:"Number",interpolable:!0,value:1,min:0,max:1},threshold:{type:"Number",interpolable:!0,value:100,min:1,max:512}}),T(this,"_interval",null)}get enabled(){return this._config.enabled.value}set enabled(e){this._config.enabled.value=e,this._component.enabled=e}get width(){return this._config.width.value}set width(e){this.setWidthHeight(e,this.height)}get height(){return this._config.height.value}set height(e){this.setWidthHeight(this.width,e)}get autoUpdate(){return this._config.autoUpdate.value}set autoUpdate(e){this.setAutoAndInterval(e,this.updateInterval)}get updateInterval(){return this._config.updateInterval.value}set updateInterval(e){this.setAutoAndInterval(this.autoUpdate,e)}get renderDebugFrame(){return this._config.renderDebugFrame.value}set renderDebugFrame(e){this._config.renderDebugFrame.value=e}get threshold(){return this._config.threshold.value}set threshold(e){this._config.threshold.value=e}setWidthHeight(e,t){if(e<=0||t<=0)throw new Error("The width and height of the culler renderer must be more than 0!");this._config.width.value=e,this._config.height.value=t,this.resetRenderTarget()}setAutoAndInterval(e,t){if(t<=0)throw new Error("The updateInterval of the culler renderer must be more than 0!");this._config.autoUpdate.value=e,this._config.updateInterval.value=t,this.resetInterval(e)}resetRenderTarget(){this._component.renderTarget.dispose(),this._component.renderTarget=new Ot(this.width,this.height),this._component.bufferSize=this.width*this.height*4,this._component.buffer=new Uint8Array(this._component.bufferSize)}resetInterval(e){this._interval!==null&&window.clearInterval(this._interval),e&&(this._interval=window.setInterval(async()=>{this._component.preventUpdate||await this._component.updateVisibility()},this.updateInterval))}}class sl{constructor(e,t){if(T(this,"onSetup",new Y),T(this,"onDisposed",new Y),T(this,"onViewUpdated",new Ut),T(this,"enabled",!0),T(this,"needsUpdate",!1),T(this,"components"),T(this,"renderTarget",new Ot),T(this,"bufferSize",1),T(this,"buffer",new Uint8Array),T(this,"preventUpdate",!1),T(this,"config"),T(this,"isSetup",!1),T(this,"world"),T(this,"renderer"),T(this,"_defaultConfig",{enabled:!0,height:512,width:512,updateInterval:1e3,autoUpdate:!0,renderDebugFrame:!1,threshold:100}),T(this,"worker"),T(this,"scene",new Ci),T(this,"_availableColor",1),T(this,"_isWorkerBusy",!1),T(this,"updateVisibility",async n=>{if(!this.enabled||!this.needsUpdate&&!n||this._isWorkerBusy)return;this._isWorkerBusy=!0;const r=this.world.camera.three;r.updateMatrix();const{width:o,height:a}=this.config;this.renderer.setSize(o,a),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,r);const l=this.renderer.getContext();await iu(l,0,0,o,a,l.RGBA,l.UNSIGNED_BYTE,this.buffer),this.renderer.setRenderTarget(null),this.config.renderDebugFrame&&this.renderer.render(this.scene,r),this.worker.postMessage({buffer:this.buffer}),this.needsUpdate=!1}),!t.renderer)throw new Error("The given world must have a renderer!");this.components=e,this.config=new su(this,this.components,"Culler renderer"),this.world=t,this.renderer=new Sn,this.renderer.clippingPlanes=t.renderer.clippingPlanes;const i=` addEventListener("message", (event) => { const { buffer } = event.data; const colors = new Map(); @@ -24,7 +24,7 @@ import{V as P,p as Se,t as ti,u as tt,T as hi,S as gi,v as Fe,a as ee,w as La,q } postMessage({ colors }); }); - `,s=new Blob([i],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(s)),this.setup()}dispose(){this.enabled=!1,this.config.autoUpdate=!1,this.components.get(Bn).list.delete(this.config.uuid);for(const e of this.scene.children)e.removeFromParent();this.onViewUpdated.reset(),this.worker.terminate(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.renderTarget.dispose(),this.buffer=null,this.onDisposed.reset()}setup(e){const t={...this._defaultConfig,...e},{width:i,height:s}=t;this.config.setWidthHeight(i,s);const{updateInterval:n,autoUpdate:r}=t;this.config.setAutoAndInterval(r,n),this.config.threshold=t.threshold,this.isSetup=!0,this.onSetup.trigger()}getAvailableColor(){let e=BigInt(this._availableColor.toString());const t=[];do t.unshift(Number(e%256n)),e/=256n;while(e);for(;t.length!==3;)t.unshift(0);const[i,s,n]=t,r=`${i}-${s}-${n}`;return{r:i,g:s,b:n,code:r}}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--}}class tu extends il{constructor(e,t){super(e,t),T(this,"onViewUpdated",new Y),T(this,"colorMeshes",new Map),T(this,"_colorCodeMeshMap",new Map),T(this,"_meshIDColorCodeMap",new Map),T(this,"_currentVisibleMeshes",new Set),T(this,"_recentlyHiddenMeshes",new Set),T(this,"_transparentMat",new st({transparent:!0,opacity:0})),T(this,"handleWorkerMessage",async i=>{if(this.preventUpdate)return;const s=i.data.colors;this._recentlyHiddenMeshes=new Set(this._currentVisibleMeshes),this._currentVisibleMeshes.clear();for(const[n,r]of s){if(r{for(const n of i)n.visible=!0;for(const n of s)n.visible=!1})}get threshold(){return this.config.threshold}set threshold(e){this.config.threshold=e}dispose(){super.dispose(),this._currentVisibleMeshes.clear(),this._recentlyHiddenMeshes.clear(),this._meshIDColorCodeMap.clear(),this._transparentMat.dispose(),this._colorCodeMeshMap.clear();const e=this.components.get(Nt);for(const t in this.colorMeshes){const i=this.colorMeshes.get(t);i&&e.destroy(i,!0)}this.colorMeshes.clear()}add(e){if(!this.enabled)return;if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const t=e instanceof It,{geometry:i,material:s}=e,{colorMaterial:n,code:r}=this.getAvailableMaterial();let o;if(Array.isArray(s)){let h=!0;const d=[];for(const u of s)jo.isTransparent(u)?d.push(this._transparentMat):(h=!1,d.push(n));if(h){n.dispose(),this.preventUpdate=!1;return}o=d}else if(jo.isTransparent(s)){n.dispose(),this.preventUpdate=!1;return}else o=n;this._colorCodeMeshMap.set(r,e),this._meshIDColorCodeMap.set(e.uuid,r);const a=t?e.count:1,l=new It(i,o,a);t?l.instanceMatrix=e.instanceMatrix:l.setMatrixAt(0,new ne),e.visible=!1,e.updateWorldMatrix(!0,!1),l.applyMatrix4(e.matrixWorld),l.updateMatrix(),this.scene.add(l),this.colorMeshes.set(e.uuid,l),this.increaseColor(),this.preventUpdate=!1}remove(e){if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const t=this.components.get(Nt);this._currentVisibleMeshes.delete(e),this._recentlyHiddenMeshes.delete(e);const i=this.colorMeshes.get(e.uuid),s=this._meshIDColorCodeMap.get(e.uuid);if(!i||!s){this.preventUpdate=!1;return}this._colorCodeMeshMap.delete(s),this._meshIDColorCodeMap.delete(e.uuid),this.colorMeshes.delete(e.uuid),i.geometry=void 0,i.material=[],t.destroy(i,!0),this._recentlyHiddenMeshes.delete(e),this._currentVisibleMeshes.delete(e),this.preventUpdate=!1}updateInstanced(e){for(const t of e){const i=this.colorMeshes.get(t.uuid);i&&(i.count=t.count)}}getAvailableMaterial(){const{r:e,g:t,b:i,code:s}=this.getAvailableColor(),n=_t.enabled;_t.enabled=!1;const r=new _e(`rgb(${e}, ${t}, ${i})`);if(!this.world.renderer)throw new Error("Renderer not found in the world!");const o=this.world.renderer.clippingPlanes,a=new st({color:r,clippingPlanes:o,side:As});return _t.enabled=n,{colorMaterial:a,code:s}}}const sl=class Ar extends de{constructor(e){super(e),T(this,"onDisposed",new Y),T(this,"_enabled",!0),T(this,"list",new Map),e.add(Ar.uuid,this)}get enabled(){return this._enabled}set enabled(e){this._enabled=e;for(const[t,i]of this.list)i.enabled=e}create(e){if(this.list.has(e.uuid))return this.list.get(e.uuid);const t=new tu(this.components,e);return this.list.set(e.uuid,t),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){this.enabled=!1,this.onDisposed.trigger(Ar.uuid),this.onDisposed.reset();for(const[e,t]of this.list)t.dispose();this.list.clear()}updateInstanced(e){for(const[,t]of this.list)t.updateInstanced(e)}};T(sl,"uuid","69f2a50d-c266-44fc-b1bd-fa4d34be89e6");let iu=sl;class su{constructor(e){T(this,"_event"),T(this,"_position",new Se),T(this,"onDisposed",new Y),T(this,"updateMouseInfo",t=>{this._event=t}),this.dom=e,this.setupEvents(!0)}get position(){if(this._event){const e=this.dom.getBoundingClientRect();this._position.x=this.getPositionX(e,this._event),this._position.y=this.getPositionY(e,this._event)}return this._position}dispose(){this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset()}getPositionY(e,t){return-((this.getDataObject(t).clientY-e.top)/(e.bottom-e.top))*2+1}getPositionX(e,t){return(this.getDataObject(t).clientX-e.left)/(e.right-e.left)*2-1}getDataObject(e){return e instanceof MouseEvent?e:e.touches[0]}setupEvents(e){e?(this.dom.addEventListener("pointermove",this.updateMouseInfo),this.dom.addEventListener("touchstart",this.updateMouseInfo)):(this.dom.removeEventListener("pointermove",this.updateMouseInfo),this.dom.removeEventListener("touchstart",this.updateMouseInfo))}}class nu{constructor(e,t){T(this,"enabled",!0),T(this,"components"),T(this,"onDisposed",new Y),T(this,"mouse"),T(this,"three",new Ln),T(this,"world");const i=t.renderer;if(!i)throw new Error("A renderer is needed for the raycaster to work!");this.world=t,this.mouse=new su(i.three.domElement),this.components=e}dispose(){this.mouse.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}castRay(e=Array.from(this.world.meshes)){if(!this.world)throw new Error("A world is needed to cast rays!");const t=this.world.camera.three;return this.three.setFromCamera(this.mouse.position,t),this.intersect(e)}castRayFromVector(e,t,i=Array.from(this.world.meshes)){return this.three.set(e,t),this.intersect(i)}intersect(e=Array.from(this.world.meshes)){const t=this.three.intersectObjects(e),i=this.filterClippingPlanes(t);return i.length>0?i[0]:null}filterClippingPlanes(e){if(!this.world.renderer)throw new Error("Renderer not found!");const t=this.world.renderer.three;if(!t.clippingPlanes)return e;const i=t.clippingPlanes;return e.length<=0||!i||(i==null?void 0:i.length)<=0?e:e.filter(s=>i.every(n=>n.distanceToPoint(s.point)>0))}}const nl=class rl extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new Map),T(this,"onDisposed",new Y),e.add(rl.uuid,this)}get(e){if(this.list.has(e.uuid))return this.list.get(e.uuid);const t=new nu(this.components,e);return this.list.set(e.uuid,t),e.onDisposed.add(()=>{this.delete(e)}),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}};T(nl,"uuid","d5d8bdf0-db25-4952-b951-b643af207ace");let ut=nl;class ru extends Zi{constructor(){super(...arguments),T(this,"_config",{visible:{value:!0,type:"Boolean"},color:{value:new _e,type:"Color"},primarySize:{type:"Number",interpolable:!0,value:1,min:0,max:1e3},secondarySize:{type:"Number",interpolable:!0,value:10,min:0,max:1e3},distance:{type:"Number",interpolable:!0,value:500,min:0,max:500}})}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e,this._component.visible=e}get color(){return this._config.color.value}set color(e){this._config.color.value=e,this._component.material.uniforms.uColor.value=e,this._component.material.uniformsNeedUpdate=!0}get primarySize(){return this._config.primarySize.value}set primarySize(e){this._config.primarySize.value=e,this._component.material.uniforms.uSize1.value=e,this._component.material.uniformsNeedUpdate=!0}get secondarySize(){return this._config.secondarySize.value}set secondarySize(e){this._config.secondarySize.value=e,this._component.material.uniforms.uSize2.value=e,this._component.material.uniformsNeedUpdate=!0}get distance(){return this._config.distance.value}set distance(e){this._config.distance.value=e,this._component.material.uniforms.uDistance.value=e,this._component.material.uniformsNeedUpdate=!0}}class ou{constructor(e,t){T(this,"onDisposed",new Y),T(this,"onSetup",new Y),T(this,"isSetup",!1),T(this,"world"),T(this,"components"),T(this,"config"),T(this,"_defaultConfig",{visible:!0,color:new _e(12303291),primarySize:1,secondarySize:10,distance:500}),T(this,"three"),T(this,"_fade",3),T(this,"updateZoom",()=>{this.world.camera instanceof Ss&&(this.material.uniforms.uZoom.value=this.world.camera.three.zoom)}),this.world=t;const{color:i,primarySize:s,secondarySize:n,distance:r}=this._defaultConfig;this.components=e,this.config=new ru(this,this.components,"Grid");const o=new Pn(2,2,1,1),a=new He({side:As,uniforms:{uSize1:{value:s},uSize2:{value:n},uColor:{value:i},uDistance:{value:r},uFade:{value:this._fade},uZoom:{value:1}},transparent:!0,vertexShader:` + `,s=new Blob([i],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(s)),this.setup()}dispose(){this.enabled=!1,this.config.autoUpdate=!1,this.components.get(Bn).list.delete(this.config.uuid);for(const e of this.scene.children)e.removeFromParent();this.onViewUpdated.reset(),this.worker.terminate(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.renderTarget.dispose(),this.buffer=null,this.onDisposed.reset()}setup(e){const t={...this._defaultConfig,...e},{width:i,height:s}=t;this.config.setWidthHeight(i,s);const{updateInterval:n,autoUpdate:r}=t;this.config.setAutoAndInterval(r,n),this.config.threshold=t.threshold,this.isSetup=!0,this.onSetup.trigger()}getAvailableColor(){let e=BigInt(this._availableColor.toString());const t=[];do t.unshift(Number(e%256n)),e/=256n;while(e);for(;t.length!==3;)t.unshift(0);const[i,s,n]=t,r=`${i}-${s}-${n}`;return{r:i,g:s,b:n,code:r}}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--}}class nu extends sl{constructor(e,t){super(e,t),T(this,"onViewUpdated",new Y),T(this,"colorMeshes",new Map),T(this,"_colorCodeMeshMap",new Map),T(this,"_meshIDColorCodeMap",new Map),T(this,"_currentVisibleMeshes",new Set),T(this,"_recentlyHiddenMeshes",new Set),T(this,"_transparentMat",new st({transparent:!0,opacity:0})),T(this,"handleWorkerMessage",async i=>{if(this.preventUpdate)return;const s=i.data.colors;this._recentlyHiddenMeshes=new Set(this._currentVisibleMeshes),this._currentVisibleMeshes.clear();for(const[n,r]of s){if(r{for(const n of i)n.visible=!0;for(const n of s)n.visible=!1})}get threshold(){return this.config.threshold}set threshold(e){this.config.threshold=e}dispose(){super.dispose(),this._currentVisibleMeshes.clear(),this._recentlyHiddenMeshes.clear(),this._meshIDColorCodeMap.clear(),this._transparentMat.dispose(),this._colorCodeMeshMap.clear();const e=this.components.get(Nt);for(const t in this.colorMeshes){const i=this.colorMeshes.get(t);i&&e.destroy(i,!0)}this.colorMeshes.clear()}add(e){if(!this.enabled)return;if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const t=e instanceof It,{geometry:i,material:s}=e,{colorMaterial:n,code:r}=this.getAvailableMaterial();let o;if(Array.isArray(s)){let h=!0;const d=[];for(const u of s)jo.isTransparent(u)?d.push(this._transparentMat):(h=!1,d.push(n));if(h){n.dispose(),this.preventUpdate=!1;return}o=d}else if(jo.isTransparent(s)){n.dispose(),this.preventUpdate=!1;return}else o=n;this._colorCodeMeshMap.set(r,e),this._meshIDColorCodeMap.set(e.uuid,r);const a=t?e.count:1,l=new It(i,o,a);t?l.instanceMatrix=e.instanceMatrix:l.setMatrixAt(0,new ne),e.visible=!1,e.updateWorldMatrix(!0,!1),l.applyMatrix4(e.matrixWorld),l.updateMatrix(),this.scene.add(l),this.colorMeshes.set(e.uuid,l),this.increaseColor(),this.preventUpdate=!1}remove(e){if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const t=this.components.get(Nt);this._currentVisibleMeshes.delete(e),this._recentlyHiddenMeshes.delete(e);const i=this.colorMeshes.get(e.uuid),s=this._meshIDColorCodeMap.get(e.uuid);if(!i||!s){this.preventUpdate=!1;return}this._colorCodeMeshMap.delete(s),this._meshIDColorCodeMap.delete(e.uuid),this.colorMeshes.delete(e.uuid),i.geometry=void 0,i.material=[],t.destroy(i,!0),this._recentlyHiddenMeshes.delete(e),this._currentVisibleMeshes.delete(e),this.preventUpdate=!1}updateInstanced(e){for(const t of e){const i=this.colorMeshes.get(t.uuid);i&&(i.count=t.count)}}getAvailableMaterial(){const{r:e,g:t,b:i,code:s}=this.getAvailableColor(),n=_t.enabled;_t.enabled=!1;const r=new _e(`rgb(${e}, ${t}, ${i})`);if(!this.world.renderer)throw new Error("Renderer not found in the world!");const o=this.world.renderer.clippingPlanes,a=new st({color:r,clippingPlanes:o,side:As});return _t.enabled=n,{colorMaterial:a,code:s}}}const nl=class Fr extends de{constructor(e){super(e),T(this,"onDisposed",new Y),T(this,"_enabled",!0),T(this,"list",new Map),e.add(Fr.uuid,this)}get enabled(){return this._enabled}set enabled(e){this._enabled=e;for(const[t,i]of this.list)i.enabled=e}create(e){if(this.list.has(e.uuid))return this.list.get(e.uuid);const t=new nu(this.components,e);return this.list.set(e.uuid,t),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){this.enabled=!1,this.onDisposed.trigger(Fr.uuid),this.onDisposed.reset();for(const[e,t]of this.list)t.dispose();this.list.clear()}updateInstanced(e){for(const[,t]of this.list)t.updateInstanced(e)}};T(nl,"uuid","69f2a50d-c266-44fc-b1bd-fa4d34be89e6");let ru=nl;class ou{constructor(e){T(this,"_event"),T(this,"_position",new Se),T(this,"onDisposed",new Y),T(this,"updateMouseInfo",t=>{this._event=t}),this.dom=e,this.setupEvents(!0)}get position(){if(this._event){const e=this.dom.getBoundingClientRect();this._position.x=this.getPositionX(e,this._event),this._position.y=this.getPositionY(e,this._event)}return this._position}dispose(){this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset()}getPositionY(e,t){return-((this.getDataObject(t).clientY-e.top)/(e.bottom-e.top))*2+1}getPositionX(e,t){return(this.getDataObject(t).clientX-e.left)/(e.right-e.left)*2-1}getDataObject(e){return e instanceof MouseEvent?e:e.touches[0]}setupEvents(e){e?(this.dom.addEventListener("pointermove",this.updateMouseInfo),this.dom.addEventListener("touchstart",this.updateMouseInfo)):(this.dom.removeEventListener("pointermove",this.updateMouseInfo),this.dom.removeEventListener("touchstart",this.updateMouseInfo))}}class au{constructor(e,t){T(this,"enabled",!0),T(this,"components"),T(this,"onDisposed",new Y),T(this,"mouse"),T(this,"three",new bn),T(this,"world");const i=t.renderer;if(!i)throw new Error("A renderer is needed for the raycaster to work!");this.world=t,this.mouse=new ou(i.three.domElement),this.components=e}dispose(){this.mouse.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}castRay(e=Array.from(this.world.meshes),t=this.mouse.position){if(!this.world)throw new Error("A world is needed to cast rays!");const i=this.world.camera.three;return this.three.setFromCamera(t,i),this.intersect(e)}castRayFromVector(e,t,i=Array.from(this.world.meshes)){return this.three.set(e,t),this.intersect(i)}intersect(e=Array.from(this.world.meshes)){const t=this.three.intersectObjects(e),i=this.filterClippingPlanes(t);return i.length>0?i[0]:null}filterClippingPlanes(e){if(!this.world.renderer)throw new Error("Renderer not found!");const t=this.world.renderer.three;if(!t.clippingPlanes)return e;const i=t.clippingPlanes;return e.length<=0||!i||(i==null?void 0:i.length)<=0?e:e.filter(s=>i.every(n=>n.distanceToPoint(s.point)>0))}}const rl=class ol extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new Map),T(this,"onDisposed",new Y),e.add(ol.uuid,this)}get(e){if(this.list.has(e.uuid))return this.list.get(e.uuid);const t=new au(this.components,e);return this.list.set(e.uuid,t),e.onDisposed.add(()=>{this.delete(e)}),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}};T(rl,"uuid","d5d8bdf0-db25-4952-b951-b643af207ace");let ut=rl;class lu extends Qi{constructor(){super(...arguments),T(this,"_config",{visible:{value:!0,type:"Boolean"},color:{value:new _e,type:"Color"},primarySize:{type:"Number",interpolable:!0,value:1,min:0,max:1e3},secondarySize:{type:"Number",interpolable:!0,value:10,min:0,max:1e3},distance:{type:"Number",interpolable:!0,value:500,min:0,max:500}})}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e,this._component.visible=e}get color(){return this._config.color.value}set color(e){this._config.color.value=e,this._component.material.uniforms.uColor.value=e,this._component.material.uniformsNeedUpdate=!0}get primarySize(){return this._config.primarySize.value}set primarySize(e){this._config.primarySize.value=e,this._component.material.uniforms.uSize1.value=e,this._component.material.uniformsNeedUpdate=!0}get secondarySize(){return this._config.secondarySize.value}set secondarySize(e){this._config.secondarySize.value=e,this._component.material.uniforms.uSize2.value=e,this._component.material.uniformsNeedUpdate=!0}get distance(){return this._config.distance.value}set distance(e){this._config.distance.value=e,this._component.material.uniforms.uDistance.value=e,this._component.material.uniformsNeedUpdate=!0}}class cu{constructor(e,t){T(this,"onDisposed",new Y),T(this,"onSetup",new Y),T(this,"isSetup",!1),T(this,"world"),T(this,"components"),T(this,"config"),T(this,"_defaultConfig",{visible:!0,color:new _e(12303291),primarySize:1,secondarySize:10,distance:500}),T(this,"three"),T(this,"_fade",3),T(this,"updateZoom",()=>{this.world.camera instanceof ws&&(this.material.uniforms.uZoom.value=this.world.camera.three.zoom)}),this.world=t;const{color:i,primarySize:s,secondarySize:n,distance:r}=this._defaultConfig;this.components=e,this.config=new lu(this,this.components,"Grid");const o=new xn(2,2,1,1),a=new He({side:As,uniforms:{uSize1:{value:s},uSize2:{value:n},uColor:{value:i},uDistance:{value:r},uFade:{value:this._fade},uZoom:{value:1}},transparent:!0,vertexShader:` varying vec3 worldPosition; @@ -85,7 +85,7 @@ import{V as P,p as Se,t as ti,u as tt,T as hi,S as gi,v as Fe,a as ee,w as La,q } - `,extensions:{derivatives:!0}});this.three=new ee(o,a),this.three.frustumCulled=!1,t.scene.three.add(this.three),this.setupEvents(!0)}get visible(){return this.three.visible}set visible(e){e?this.world.scene.three.add(this.three):this.three.removeFromParent()}get material(){return this.three.material}get fade(){return this._fade===3}set fade(e){this._fade=e?3:0,this.material.uniforms.uFade.value=this._fade}setup(e){const t={...this._defaultConfig,...e};this.config.visible=!0,this.config.color=t.color,this.config.primarySize=t.primarySize,this.config.secondarySize=t.secondarySize,this.config.distance=t.distance,this.isSetup=!0,this.onSetup.trigger()}dispose(){this.setupEvents(!1),this.components.get(Bn).list.delete(this.config.uuid),this.components.get(Nt).destroy(this.three),this.onDisposed.trigger(),this.onDisposed.reset(),this.world=null,this.components=null}setupEvents(e){if(this.world.isDisposing||!(this.world.camera instanceof Ss))return;const t=this.world.camera.controls;e?t.addEventListener("update",this.updateZoom):t.removeEventListener("update",this.updateZoom)}}const au=class ol extends de{constructor(e){super(e),T(this,"list",new Map),T(this,"onDisposed",new Y),T(this,"enabled",!0),e.add(ol.uuid,this)}create(e){if(this.list.has(e.uuid))throw new Error("This world already has a grid!");const t=new ou(this.components,e);return this.list.set(e.uuid,t),e.onDisposed.add(()=>{this.delete(e)}),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}};T(au,"uuid","d1e814d5-b81c-4452-87a2-f039375e0489");const oi=new Ln,Ge=new P,Wt=new P,Oe=new at,ia={X:new P(1,0,0),Y:new P(0,1,0),Z:new P(0,0,1)},hr={type:"change"},sa={type:"mouseDown"},na={type:"mouseUp",mode:null},ra={type:"objectChange"};class lu extends Yi{constructor(e,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 i=new pu;this._gizmo=i,this.add(i);const s=new mu;this._plane=s,this.add(s);const n=this;function r(g,v){let C=v;Object.defineProperty(n,g,{get:function(){return C!==void 0?C:v},set:function(w){C!==w&&(C=w,s[g]=w,i[g]=w,n.dispatchEvent({type:g+"-changed",value:w}),n.dispatchEvent(hr))}}),n[g]=v,s[g]=v,i[g]=v}r("camera",e),r("object",void 0),r("enabled",!0),r("axis",null),r("mode","translate"),r("translationSnap",null),r("rotationSnap",null),r("scaleSnap",null),r("space","world"),r("size",1),r("dragging",!1),r("showX",!0),r("showY",!0),r("showZ",!0);const o=new P,a=new P,l=new at,h=new at,d=new P,u=new at,f=new P,m=new P,p=new P,I=0,E=new P;r("worldPosition",o),r("worldPositionStart",a),r("worldQuaternion",l),r("worldQuaternionStart",h),r("cameraPosition",d),r("cameraQuaternion",u),r("pointStart",f),r("pointEnd",m),r("rotationAxis",p),r("rotationAngle",I),r("eye",E),this._offset=new P,this._startNorm=new P,this._endNorm=new P,this._cameraScale=new P,this._parentPosition=new P,this._parentQuaternion=new at,this._parentQuaternionInv=new at,this._parentScale=new P,this._worldScaleStart=new P,this._worldQuaternionInv=new at,this._worldScale=new P,this._positionStart=new P,this._quaternionStart=new at,this._scaleStart=new P,this._getPointer=cu.bind(this),this._onPointerDown=du.bind(this),this._onPointerHover=hu.bind(this),this._onPointerMove=uu.bind(this),this._onPointerUp=fu.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(e){if(this.object===void 0||this.dragging===!0)return;oi.setFromCamera(e,this.camera);const t=dr(this._gizmo.picker[this.mode],oi);t?this.axis=t.object.name:this.axis=null}pointerDown(e){if(!(this.object===void 0||this.dragging===!0||e.button!==0)&&this.axis!==null){oi.setFromCamera(e,this.camera);const t=dr(this._plane,oi,!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,sa.mode=this.mode,this.dispatchEvent(sa)}}pointerMove(e){const t=this.axis,i=this.mode,s=this.object;let n=this.space;if(i==="scale"?n="local":(t==="E"||t==="XYZE"||t==="XYZ")&&(n="world"),s===void 0||t===null||this.dragging===!1||e.button!==-1)return;oi.setFromCamera(e,this.camera);const r=dr(this._plane,oi,!0);if(r){if(this.pointEnd.copy(r.point).sub(this.worldPositionStart),i==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),n==="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),n==="local"&&t!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),s.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(n==="local"&&(s.position.applyQuaternion(Oe.copy(this._quaternionStart).invert()),t.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this._quaternionStart)),n==="world"&&(s.parent&&s.position.add(Ge.setFromMatrixPosition(s.parent.matrixWorld)),t.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(Ge.setFromMatrixPosition(s.parent.matrixWorld))));else if(i==="scale"){if(t.search("XYZ")!==-1){let o=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(o*=-1),Wt.set(o,o,o)}else Ge.copy(this.pointStart),Wt.copy(this.pointEnd),Ge.applyQuaternion(this._worldQuaternionInv),Wt.applyQuaternion(this._worldQuaternionInv),Wt.divide(Ge),t.search("X")===-1&&(Wt.x=1),t.search("Y")===-1&&(Wt.y=1),t.search("Z")===-1&&(Wt.z=1);s.scale.copy(this._scaleStart).multiply(Wt),this.scaleSnap&&(t.search("X")!==-1&&(s.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Y")!==-1&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Z")!==-1&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(i==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const o=20/this.worldPosition.distanceTo(Ge.setFromMatrixPosition(this.camera.matrixWorld));let a=!1;t==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(Ge.copy(this.rotationAxis).cross(this.eye))*o):(t==="X"||t==="Y"||t==="Z")&&(this.rotationAxis.copy(ia[t]),Ge.copy(ia[t]),n==="local"&&Ge.applyQuaternion(this.worldQuaternion),Ge.cross(this.eye),Ge.length()===0?a=!0:this.rotationAngle=this._offset.dot(Ge.normalize())*o),(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),n==="local"&&t!=="E"&&t!=="XYZE"?(s.quaternion.copy(this._quaternionStart),s.quaternion.multiply(Oe.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),s.quaternion.copy(Oe.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(hr),this.dispatchEvent(ra)}}pointerUp(e){e.button===0&&(this.dragging&&this.axis!==null&&(na.mode=this.mode,this.dispatchEvent(na)),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(e){e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()})}attach(e){return this.object=e,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(hr),this.dispatchEvent(ra),this.pointStart.copy(this.pointEnd))}getRaycaster(){return oi}getMode(){return this.mode}setMode(e){this.mode=e}setTranslationSnap(e){this.translationSnap=e}setRotationSnap(e){this.rotationSnap=e}setScaleSnap(e){this.scaleSnap=e}setSize(e){this.size=e}setSpace(e){this.space=e}}function cu(c){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:c.button};{const e=this.domElement.getBoundingClientRect();return{x:(c.clientX-e.left)/e.width*2-1,y:-(c.clientY-e.top)/e.height*2+1,button:c.button}}}function hu(c){if(this.enabled)switch(c.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(c));break}}function du(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 uu(c){this.enabled&&this.pointerMove(this._getPointer(c))}function fu(c){this.enabled&&(this.domElement.releasePointerCapture(c.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(c)))}function dr(c,e,t){const i=e.intersectObject(c,!0);for(let s=0;s.9&&(n.visible=!1)),this.axis==="Y"&&(Oe.setFromEuler($s.set(0,0,Math.PI/2)),n.quaternion.copy(t).multiply(Oe),Math.abs(Re.copy(li).applyQuaternion(t).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Z"&&(Oe.setFromEuler($s.set(0,Math.PI/2,0)),n.quaternion.copy(t).multiply(Oe),Math.abs(Re.copy(gs).applyQuaternion(t).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="XYZE"&&(Oe.setFromEuler($s.set(0,Math.PI/2,0)),Re.copy(this.rotationAxis),n.quaternion.setFromRotationMatrix(aa.lookAt(oa,Re,li)),n.quaternion.multiply(Oe),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),Ge.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),Ge.applyQuaternion(this.worldQuaternionStart.clone().invert()),n.scale.copy(Ge),n.visible=this.dragging):(n.quaternion.copy(t),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(t),this.mode==="translate"||this.mode==="scale"?(n.name==="X"&&Math.abs(Re.copy(Es).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Y"&&Math.abs(Re.copy(li).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Z"&&Math.abs(Re.copy(gs).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XY"&&Math.abs(Re.copy(gs).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="YZ"&&Math.abs(Re.copy(Es).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XZ"&&Math.abs(Re.copy(li).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1)):this.mode==="rotate"&&(en.copy(t),Re.copy(this.eye).applyQuaternion(Oe.copy(t).invert()),n.name.search("E")!==-1&&n.quaternion.setFromRotationMatrix(aa.lookAt(this.eye,oa,li)),n.name==="X"&&(Oe.setFromAxisAngle(Es,Math.atan2(-Re.y,Re.z)),Oe.multiplyQuaternions(en,Oe),n.quaternion.copy(Oe)),n.name==="Y"&&(Oe.setFromAxisAngle(li,Math.atan2(Re.x,Re.z)),Oe.multiplyQuaternions(en,Oe),n.quaternion.copy(Oe)),n.name==="Z"&&(Oe.setFromAxisAngle(gs,Math.atan2(Re.y,Re.x)),Oe.multiplyQuaternions(en,Oe),n.quaternion.copy(Oe))),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(o){return n.name===o}))&&(n.material.color.setHex(16776960),n.material.opacity=1)}super.updateMatrixWorld(e)}}class mu extends ee{constructor(){super(new Pn(1e5,1e5,2,2),new st({visible:!1,wireframe:!0,side:As,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(e){let t=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(t="local"),tn.copy(Es).applyQuaternion(t==="local"?this.worldQuaternion:En),us.copy(li).applyQuaternion(t==="local"?this.worldQuaternion:En),fs.copy(gs).applyQuaternion(t==="local"?this.worldQuaternion:En),Re.copy(us),this.mode){case"translate":case"scale":switch(this.axis){case"X":Re.copy(this.eye).cross(tn),St.copy(tn).cross(Re);break;case"Y":Re.copy(this.eye).cross(us),St.copy(us).cross(Re);break;case"Z":Re.copy(this.eye).cross(fs),St.copy(fs).cross(Re);break;case"XY":St.copy(fs);break;case"YZ":St.copy(tn);break;case"XZ":Re.copy(fs),St.copy(us);break;case"XYZ":case"E":St.set(0,0,0);break}break;case"rotate":default:St.set(0,0,0)}St.length()===0?this.quaternion.copy(this.cameraQuaternion):(la.lookAt(Ge.set(0,0,0),St,Re),this.quaternion.setFromRotationMatrix(la)),super.updateMatrixWorld(e)}}class zn{constructor(e,t,i,s,n,r=5,o=!0){if(T(this,"onDraggingStarted",new Y),T(this,"onDraggingEnded",new Y),T(this,"onDisposed",new Y),T(this,"normal"),T(this,"origin"),T(this,"three",new ti),T(this,"components"),T(this,"world"),T(this,"type","default"),T(this,"_helper"),T(this,"_visible",!0),T(this,"_enabled",!0),T(this,"_controlsActive",!1),T(this,"_arrowBoundBox",new ee),T(this,"_planeMesh"),T(this,"_controls"),T(this,"_hiddenMaterial",new st({visible:!1})),T(this,"update",()=>{this._enabled&&this.three.setFromNormalAndCoplanarPoint(this.normal,this._helper.position)}),T(this,"changeDrag",a=>{this._visible=!a.value,this.preventCameraMovement(),this.notifyDraggingChanged(a)}),this.components=e,this.world=t,!t.renderer)throw new Error("The given world must have a renderer!");this.normal=s,this.origin=i,t.renderer.setPlane(!0,this.three),this._planeMesh=zn.newPlaneMesh(r,n),this._helper=this.newHelper(),this._controls=this.newTransformControls(),this.three.setFromNormalAndCoplanarPoint(s,i),o&&this.toggleControls(!0)}get enabled(){return this._enabled}set enabled(e){if(!this.world.isDisposing){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");this._enabled=e,this.world.renderer.setPlane(e,this.three)}}get visible(){return this._visible}set visible(e){this._visible=e,this._controls.visible=e,this._helper.visible=e,this.toggleControls(e)}get meshes(){return[this._planeMesh,this._arrowBoundBox]}get planeMaterial(){return this._planeMesh.material}set planeMaterial(e){this._planeMesh.material=e}get size(){return this._planeMesh.scale.x}set size(e){this._planeMesh.scale.set(e,e,e)}get helper(){return this._helper}setFromNormalAndCoplanarPoint(e,t){this.reset(),this.normal.equals(e)||(this.normal.copy(e),this._helper.lookAt(e)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix(),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 e=new P(1,0,0),t=new P;this.normal.equals(e)||(this.normal.copy(e),this._helper.lookAt(e)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix()}toggleControls(e){if(e){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=e}newTransformControls(){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");const e=this.world.camera.three,t=this.world.renderer.three.domElement,i=new lu(e,t);return this.initializeControls(i),this.world.scene.three.add(i),i}initializeControls(e){e.attach(this._helper),e.showX=!1,e.showY=!1,e.setSpace("local"),this.createArrowBoundingBox(),e.children[0].children[0].add(this._arrowBoundBox)}createArrowBoundingBox(){this._arrowBoundBox.geometry=new Xe(.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(e){e.value?this.onDraggingStarted.trigger():this.onDraggingEnded.trigger()}preventCameraMovement(){this.world.camera.enabled=this._visible}newHelper(){const e=new Yi;return e.lookAt(this.normal),e.position.copy(this.origin),this._planeMesh.position.z+=.01,e.add(this._planeMesh),this.world.scene.three.add(e),e}static newPlaneMesh(e,t){const i=new Pn(1),s=new ee(i,t);return s.scale.set(e,e,e),s}}class Iu extends Zi{constructor(){super(...arguments),T(this,"_config",{enabled:{value:!0,type:"Boolean"},visible:{value:!0,type:"Boolean"},color:{value:new _e,type:"Color"},opacity:{type:"Number",interpolable:!0,value:1,min:0,max:1},size:{type:"Number",interpolable:!0,value:2,min:0,max:100}})}get enabled(){return this._config.enabled.value}set enabled(e){this._config.enabled.value=e,this._component.enabled=e}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e,this._component.visible=e}get color(){return this._config.color.value}set color(e){this._config.color.value=e,this._component.material.color.copy(e)}get opacity(){return this._config.opacity.value}set opacity(e){this._config.opacity.value=e,this._component.material.opacity=e}get size(){return this._config.size.value}set size(e){this._config.size.value=e,this._component.size=e}}const al=class gn extends de{constructor(e){super(e),T(this,"onSetup",new Y),T(this,"onBeforeDrag",new Y),T(this,"onAfterDrag",new Y),T(this,"onBeforeCreate",new Y),T(this,"onBeforeCancel",new Y),T(this,"onAfterCancel",new Y),T(this,"onBeforeDelete",new Y),T(this,"onAfterCreate",new Y),T(this,"onAfterDelete",new Y),T(this,"onDisposed",new Y),T(this,"isSetup",!1),T(this,"orthogonalY",!1),T(this,"toleranceOrthogonalY",.7),T(this,"Type",zn),T(this,"list",[]),T(this,"config",new Iu(this,this.components,"Clipper",gn.uuid)),T(this,"_defaultConfig",{color:new _e(12255487),opacity:.2,size:2}),T(this,"_material",new st({color:12255487,side:As,transparent:!0,opacity:.2})),T(this,"_size",5),T(this,"_enabled",!1),T(this,"_visible",!0),T(this,"_onStartDragging",()=>{this.onBeforeDrag.trigger()}),T(this,"_onEndDragging",()=>{this.onAfterDrag.trigger()}),this.components.add(gn.uuid,this)}get enabled(){return this._enabled}set enabled(e){this._enabled=e;for(const t of this.list)t.enabled=e;this.updateMaterialsAndPlanes()}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}get material(){return this._material}set material(e){this._material=e;for(const t of this.list)t.planeMaterial=e}get size(){return this._size}set size(e){this._size=e;for(const t of this.list)t.size=e}dispose(){this._enabled=!1,this.components.get(Bn).list.delete(this.config.uuid);for(const e of this.list)e.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(gn.uuid),this.onDisposed.reset()}create(e){const t=this.components.get(ut).get(e).castRay();return t?this.createPlaneFromIntersection(e,t):null}createFromNormalAndCoplanarPoint(e,t,i){const s=this.newPlane(e,i,t);return this.updateMaterialsAndPlanes(),s}delete(e,t){t||(t=this.pickPlane(e)),t&&this.deletePlane(t)}deleteAll(e){const t=[...this.list];for(const i of t)if(!e||e.has(i.type)){this.delete(i.world,i);const s=this.list.indexOf(i);s!==-1&&this.list.splice(s,1)}}setup(e){const t={...this._defaultConfig,...e};this.config.color=t.color,this.config.opacity=t.opacity,this.config.size=t.size,this.isSetup=!0,this.onSetup.trigger()}deletePlane(e){const t=this.list.indexOf(e);if(t!==-1){if(this.list.splice(t,1),!e.world.renderer)throw new Error("Renderer not found for this plane's world!");e.world.renderer.setPlane(!1,e.three),e.dispose(),this.updateMaterialsAndPlanes(),this.onAfterDelete.trigger(e)}}pickPlane(e){const t=this.components.get(ut).get(e),i=this.getAllPlaneMeshes(),s=t.castRay(i);if(s){const n=s.object;return this.list.find(r=>r.meshes.includes(n))}}getAllPlaneMeshes(){const e=[];for(const t of this.list)e.push(...t.meshes);return e}createPlaneFromIntersection(e,t){var i;if(!e.renderer)throw new Error("The given world must have a renderer!");const s=t.point.distanceTo(new P(0,0,0)),n=(i=t.face)==null?void 0:i.normal;if(!s||!n)return null;const r=this.getWorldNormal(t,n),o=this.newPlane(e,t.point,r.negate());return o.visible=this._visible,o.size=this._size,e.renderer.setPlane(!0,o.three),this.updateMaterialsAndPlanes(),o}getWorldNormal(e,t){const i=e.object;let s=e.object.matrixWorld.clone();if(i instanceof It&&e.instanceId!==void 0){const o=new ne;i.getMatrixAt(e.instanceId,o),s=o.multiply(s)}const n=new di().getNormalMatrix(s),r=t.clone().applyMatrix3(n).normalize();return this.normalizePlaneDirectionY(r),r}normalizePlaneDirectionY(e){this.orthogonalY&&(e.y>this.toleranceOrthogonalY&&(e.x=0,e.y=1,e.z=0),e.y<-this.toleranceOrthogonalY&&(e.x=0,e.y=-1,e.z=0))}newPlane(e,t,i){const s=new this.Type(this.components,e,t,i,this._material);return s.onDraggingStarted.add(this._onStartDragging),s.onDraggingEnded.add(this._onEndDragging),this.list.push(s),this.onAfterCreate.trigger(s),s}updateMaterialsAndPlanes(){const e=this.components.get(tl);for(const[t,i]of e.list){if(!i.renderer)continue;i.renderer.updateClippingPlanes();const{clippingPlanes:s}=i.renderer;for(const n of i.meshes)if(n.material)if(Array.isArray(n.material))for(const r of n.material)r.clippingPlanes=s;else n.material.clippingPlanes=s}}};T(al,"uuid","66290bc5-18c4-4cd1-9379-2e17a0617611");let Wi=al;class Eu{constructor(e){T(this,"enabled",!1),T(this,"id","FirstPerson"),this.camera=e}set(e){if(this.enabled=e,e){if(this.camera.projection.current!=="Perspective"){this.camera.set("Orbit");return}this.setupFirstPersonCamera()}}setupFirstPersonCamera(){const e=this.camera.controls,t=new P;e.distance--,e.getPosition(t),e.minDistance=1,e.maxDistance=1,e.distance=1,e.moveTo(t.x,t.y,t.z),e.truckSpeed=50,e.mouseButtons.wheel=We.ACTION.DOLLY,e.touches.two=We.ACTION.TOUCH_ZOOM_TRUCK}}class gu{constructor(e){T(this,"enabled",!0),T(this,"id","Orbit"),this.camera=e,this.activateOrbitControls()}set(e){this.enabled=e,e&&this.activateOrbitControls()}activateOrbitControls(){const e=this.camera.controls;e.minDistance=1,e.maxDistance=300;const t=new P;e.getPosition(t);const i=t.length();e.distance=i,e.truckSpeed=2;const{rotation:s}=this.camera.three,n=new P(0,0,-1).applyEuler(s),r=t.addScaledVector(n,i);e.moveTo(r.x,r.y,r.z)}}class Cu{constructor(e){T(this,"enabled",!1),T(this,"id","Plan"),T(this,"mouseAction1"),T(this,"mouseAction2"),T(this,"mouseInitialized",!1),T(this,"defaultAzimuthSpeed"),T(this,"defaultPolarSpeed"),this.camera=e,this.defaultAzimuthSpeed=e.controls.azimuthRotateSpeed,this.defaultPolarSpeed=e.controls.polarRotateSpeed}set(e){this.enabled=e;const t=this.camera.controls;t.azimuthRotateSpeed=e?0:this.defaultAzimuthSpeed,t.polarRotateSpeed=e?0:this.defaultPolarSpeed,this.mouseInitialized||(this.mouseAction1=t.touches.one,this.mouseAction2=t.touches.two,this.mouseInitialized=!0),e?(t.mouseButtons.left=We.ACTION.TRUCK,t.touches.one=We.ACTION.TOUCH_TRUCK,t.touches.two=We.ACTION.TOUCH_ZOOM):(t.mouseButtons.left=We.ACTION.ROTATE,t.touches.one=this.mouseAction1,t.touches.two=this.mouseAction2)}}class Tu{constructor(e){T(this,"onChanged",new Y),T(this,"current","Perspective"),T(this,"camera"),T(this,"matchOrthoDistanceEnabled",!1),T(this,"_component"),T(this,"_previousDistance",-1),this._component=e,this.camera=e.three}async set(e){this.current!==e&&(e==="Orthographic"?this.setOrthoCamera():await this.setPerspectiveCamera(),this.onChanged.trigger(this.camera))}async toggle(){const e=this.current==="Perspective"?"Orthographic":"Perspective";await this.set(e)}setOrthoCamera(){if(this._component.mode===null||this._component.mode.id==="FirstPerson")return;this._previousDistance=this._component.controls.distance,this._component.controls.distance=200;const e=this.getPerspectiveDims();if(!e)return;const{width:t,height:i}=e;this.setupOrthoCamera(i,t),this.camera=this._component.threeOrtho,this.current="Orthographic"}getPerspectiveDims(){const e=this._component.currentWorld;if(!e||!e.renderer)return null;const t=new P;this._component.threePersp.getWorldDirection(t);const i=new P;this._component.controls.getTarget(i);const s=i.clone().sub(this._component.threePersp.position).dot(t),n=e.renderer.getSize(),r=n.x/n.y,o=this._component.threePersp,a=s*2*Math.atan(o.fov*(Math.PI/180)/2);return{width:a*r,height:a}}setupOrthoCamera(e,t){this._component.controls.mouseButtons.wheel=We.ACTION.ZOOM,this._component.controls.mouseButtons.middle=We.ACTION.ZOOM;const i=this._component.threePersp,s=this._component.threeOrtho;s.zoom=1,s.left=t/-2,s.right=t/2,s.top=e/2,s.bottom=e/-2,s.updateProjectionMatrix(),s.position.copy(i.position),s.quaternion.copy(i.quaternion),this._component.controls.camera=s}getDistance(){const e=this._component.threePersp,t=this._component.threeOrtho;return(t.top-t.bottom)/t.zoom/(2*Math.atan(e.fov*(Math.PI/180)/2))}async setPerspectiveCamera(){this._component.controls.mouseButtons.wheel=We.ACTION.DOLLY,this._component.controls.mouseButtons.middle=We.ACTION.DOLLY;const e=this._component.threePersp,t=this._component.threeOrtho;e.position.copy(t.position),e.quaternion.copy(t.quaternion),this._component.controls.mouseButtons.wheel=We.ACTION.DOLLY,this.matchOrthoDistanceEnabled?this._component.controls.distance=this.getDistance():this._component.controls.distance=this._previousDistance,await this._component.controls.zoomTo(1),e.updateProjectionMatrix(),this._component.controls.camera=e,this.camera=e,this.current="Perspective"}}class Ru extends Ss{constructor(e){super(e),T(this,"projection"),T(this,"threeOrtho"),T(this,"threePersp"),T(this,"_userInputButtons",{}),T(this,"_frustumSize",50),T(this,"_navigationModes",new Map),T(this,"_mode",null),T(this,"previousSize",null),this.threePersp=this.three,this.threeOrtho=this.newOrthoCamera(),this.projection=new Tu(this),this.onAspectUpdated.add(()=>{this.setOrthoPerspCameraAspect()}),this.projection.onChanged.add(t=>{this.three=t,this.updateAspect()}),this.onWorldChanged.add(({action:t})=>{t==="added"&&(this._navigationModes.clear(),this._navigationModes.set("Orbit",new gu(this)),this._navigationModes.set("FirstPerson",new Eu(this)),this._navigationModes.set("Plan",new Cu(this)),this._mode=this._navigationModes.get("Orbit"),this.mode.set(!0,{preventTargetAdjustment:!0}),this.currentWorld&&this.currentWorld.renderer&&(this.previousSize=this.currentWorld.renderer.getSize().clone()))})}get mode(){if(!this._mode)throw new Error("Mode not found, camera not initialized");return this._mode}dispose(){super.dispose(),this.threeOrtho.removeFromParent()}set(e){if(this.mode!==null&&this.mode.id!==e){if(this.mode.set(!1),!this._navigationModes.has(e))throw new Error("The specified mode does not exist!");this._mode=this._navigationModes.get(e),this.mode.set(!0)}}async fit(e,t=1.5){if(!this.enabled)return;const i=Number.MAX_VALUE,s=Number.MIN_VALUE,n=new P(i,i,i),r=new P(s,s,s);for(const u of e){const f=new Fe().setFromObject(u);f.min.xr.x&&(r.x=f.max.x),f.max.y>r.y&&(r.y=f.max.y),f.max.z>r.z&&(r.z=f.max.z)}const o=new Fe(n,r),a=new P;o.getSize(a);const l=new P;o.getCenter(l);const h=Math.max(a.x,a.y,a.z)*t,d=new gi(l,h);await this.controls.fitToSphere(d,!0)}setUserInput(e){e?this.enableUserInput():this.disableUserInput()}disableUserInput(){this._userInputButtons.left=this.controls.mouseButtons.left,this._userInputButtons.right=this.controls.mouseButtons.right,this._userInputButtons.middle=this.controls.mouseButtons.middle,this._userInputButtons.wheel=this.controls.mouseButtons.wheel,this.controls.mouseButtons.left=0,this.controls.mouseButtons.right=0,this.controls.mouseButtons.middle=0,this.controls.mouseButtons.wheel=0}enableUserInput(){Object.keys(this._userInputButtons).length!==0&&(this.controls.mouseButtons.left=this._userInputButtons.left,this.controls.mouseButtons.right=this._userInputButtons.right,this.controls.mouseButtons.middle=this._userInputButtons.middle,this.controls.mouseButtons.wheel=this._userInputButtons.wheel)}newOrthoCamera(){const e=window.innerWidth/window.innerHeight;return new ii(this._frustumSize*e/-2,this._frustumSize*e/2,this._frustumSize/2,this._frustumSize/-2,.1,1e3)}setOrthoPerspCameraAspect(){if(!this.currentWorld||!this.currentWorld.renderer||!this.previousSize)return;const e=this.currentWorld.renderer.getSize(),t=this.threeOrtho.top,i=this.threeOrtho.right,s=e.y/this.previousSize.y,n=e.x/this.previousSize.x,r=t*s,o=i*n;this.threeOrtho.left=-o,this.threeOrtho.right=o,this.threeOrtho.top=r,this.threeOrtho.bottom=-r,this.threeOrtho.updateProjectionMatrix(),this.previousSize.copy(e)}}const ca=new Map([[xn,{forRelated:"Decomposes",forRelating:"IsDecomposedBy"}],[Qr,{forRelated:"HasAssociations",forRelating:"AssociatedTo"}],[Kr,{forRelated:"HasAssociations",forRelating:"ClassificationForObjects"}],[qr,{forRelated:"HasAssignments",forRelating:"IsGroupedBy"}],[ys,{forRelated:"IsDefinedBy",forRelating:"DefinesOcurrence"}],[Jr,{forRelated:"IsTypedBy",forRelating:"Types"}],[$r,{forRelated:"IsDefinedBy",forRelating:"Defines"}],[Dn,{forRelated:"ContainedInStructure",forRelating:"ContainsElements"}],[eo,{forRelated:"AssignedToFlowElement",forRelating:"HasControlElements"}],[to,{forRelated:"ConnectedFrom",forRelating:"ConnectedTo"}],[io,{forRelated:"HasAssignments",forRelating:"ReferencedBy"}],[so,{forRelated:"HasContext",forRelating:"Declares"}],[no,{forRelated:"HasAssignments",forRelating:"Controls"}],[ro,{forRelated:"Nests",forRelating:"IsNestedBy"}],[oo,{forRelated:"HasAssociations",forRelating:"DocumentRefForObjects"}]]),yn={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 fi{static async getUnits(e){var t,i,s;const{IFCUNITASSIGNMENT:n}=Ft,r=await e.getAllPropertiesOfType(n);if(!r)return 1;const o=Object.keys(r),a=r[parseInt(o[0],10)];for(const l of a.Units){if(l.value===void 0||l.value===null)continue;const h=await e.getProperties(l.value);if(!h||!h.UnitType||!h.UnitType.value||h.UnitType.value!=="LENGTHUNIT")continue;let d=1,u=1;return h.Name.value==="METRE"&&(u=1),h.Name.value==="FOOT"&&(u=.3048),((t=h.Prefix)==null?void 0:t.value)==="MILLI"?d=.001:((i=h.Prefix)==null?void 0:i.value)==="CENTI"?d=.01:((s=h.Prefix)==null?void 0:s.value)==="DECI"&&(d=.1),u*d}return 1}static async findItemByGuid(e,t){var i;const s=e.getAllPropertiesIDs();for(const n of s){const r=await e.getProperties(n);if(r&&((i=r.GlobalId)==null?void 0:i.value)===t)return r}return null}static async getRelationMap(e,t,i){var s;const n=i??(async()=>{}),r={},o=e.getAllPropertiesIDs();for(const a of o){const l=await e.getProperties(a);if(!l)continue;const h=l.type===t,d=Object.keys(l).find(I=>I.startsWith("Relating")),u=Object.keys(l).find(I=>I.startsWith("Related"));if(!(h&&d&&u))continue;const f=await e.getProperties((s=l[d])==null?void 0:s.value),m=l[u];if(!f||!m||!(m&&Array.isArray(m)))continue;const p=m.map(I=>I.value);await n(f.expressID,p),r[f.expressID]=p}return r}static async getQsetQuantities(e,t,i){const s=i??(()=>{}),n=await e.getProperties(t);return!n||n.type!==un?null:(n.Quantities??[{}]).map(r=>(r.value&&s(r.value),r.value)).filter(r=>r!==null)}static async getPsetProps(e,t,i){const s=i??(()=>{}),n=await e.getProperties(t);return!n||n.type!==Vi?null:(n.HasProperties??[{}]).map(r=>(r.value&&s(r.value),r.value)).filter(r=>r!==null)}static async getPsetRel(e,t){var i;if(!await e.getProperties(t))return null;const s=await e.getAllPropertiesOfType(ys);if(!s)return null;const n=Object.values(s);let r=null;for(const o of n)((i=o.RelatingPropertyDefinition)==null?void 0:i.value)===t&&(r=o.expressID);return r}static async getQsetRel(e,t){return fi.getPsetRel(e,t)}static async getEntityName(e,t){var i;const s=await e.getProperties(t);if(!s)return{key:null,name:null};const n=Object.keys(s).find(o=>o.endsWith("Name"))??null,r=n?(i=s[n])==null?void 0:i.value:null;return{key:n,name:r}}static async getQuantityValue(e,t){const i=await e.getProperties(t);if(!i)return{key:null,value:null};const s=Object.keys(i).find(r=>r.endsWith("Value"))??null;let n;return s===null||i[s]===void 0||i[s]===null?n=null:n=i[s].value,{key:s,value:n}}static isRel(e){return yn[e].startsWith("IFCREL")}static async attributeExists(e,t,i){const s=await e.getProperties(t);return s?Object.keys(s).includes(i):!1}static async groupEntitiesByType(e,t){var i;const s=new Map;for(const n of t){const r=await e.getProperties(n);if(!r)continue;const o=r.type;s.get(o)||s.set(o,new Set),(i=s.get(o))==null||i.add(n)}return s}}const Su={IFCURIREFERENCE:"IfcUriReference",IFCTIME:"IfcTime",IFCTEMPERATURERATEOFCHANGEMEASURE:"IfcTemperatureRateOfChangeMeasure",IFCSOUNDPRESSURELEVELMEASURE:"IfcSoundPressureLevelMeasure",IFCSOUNDPOWERLEVELMEASURE:"IfcSoundPowerLevelMeasure",IFCPROPERTYSETDEFINITIONSET:"IfcPropertySetDefinitionSet",IFCPOSITIVEINTEGER:"IfcPositiveInteger",IFCNONNEGATIVELENGTHMEASURE:"IfcNonNegativeLengthMeasure",IFCLINEINDEX:"IfcLineIndex",IFCLANGUAGEID:"IfcLanguageId",IFCDURATION:"IfcDuration",IFCDAYINWEEKNUMBER:"IfcDayInWeekNumber",IFCDATETIME:"IfcDateTime",IFCDATE:"IfcDate",IFCCARDINALPOINTREFERENCE:"IfcCardinalPointReference",IFCBINARY:"IfcBinary",IFCAREADENSITYMEASURE:"IfcAreaDensityMeasure",IFCARCINDEX:"IfcArcIndex",IFCYEARNUMBER:"IfcYearNumber",IFCWARPINGMOMENTMEASURE:"IfcWarpingMomentMeasure",IFCWARPINGCONSTANTMEASURE:"IfcWarpingConstantMeasure",IFCVOLUMETRICFLOWRATEMEASURE:"IfcVolumetricFlowRateMeasure",IFCVOLUMEMEASURE:"IfcVolumeMeasure",IFCVAPORPERMEABILITYMEASURE:"IfcVaporPermeabilityMeasure",IFCTORQUEMEASURE:"IfcTorqueMeasure",IFCTIMESTAMP:"IfcTimestamp",IFCTIMEMEASURE:"IfcTimeMeasure",IFCTHERMODYNAMICTEMPERATUREMEASURE:"IfcThermodynamicTemperatureMeasure",IFCTHERMALTRANSMITTANCEMEASURE:"IfcThermalTransmittanceMeasure",IFCTHERMALRESISTANCEMEASURE:"IfcThermalResistanceMeasure",IFCTHERMALEXPANSIONCOEFFICIENTMEASURE:"IfcThermalExpansionCoefficientMeasure",IFCTHERMALCONDUCTIVITYMEASURE:"IfcThermalConductivityMeasure",IFCTHERMALADMITTANCEMEASURE:"IfcThermalAdmittanceMeasure",IFCTEXTTRANSFORMATION:"IfcTextTransformation",IFCTEXTFONTNAME:"IfcTextFontName",IFCTEXTDECORATION:"IfcTextDecoration",IFCTEXTALIGNMENT:"IfcTextAlignment",IFCTEXT:"IfcText",IFCTEMPERATUREGRADIENTMEASURE:"IfcTemperatureGradientMeasure",IFCSPECULARROUGHNESS:"IfcSpecularRoughness",IFCSPECULAREXPONENT:"IfcSpecularExponent",IFCSPECIFICHEATCAPACITYMEASURE:"IfcSpecificHeatCapacityMeasure",IFCSOUNDPRESSUREMEASURE:"IfcSoundPressureMeasure",IFCSOUNDPOWERMEASURE:"IfcSoundPowerMeasure",IFCSOLIDANGLEMEASURE:"IfcSolidAngleMeasure",IFCSHEARMODULUSMEASURE:"IfcShearModulusMeasure",IFCSECTIONALAREAINTEGRALMEASURE:"IfcSectionalAreaIntegralMeasure",IFCSECTIONMODULUSMEASURE:"IfcSectionModulusMeasure",IFCSECONDINMINUTE:"IfcSecondInMinute",IFCROTATIONALSTIFFNESSMEASURE:"IfcRotationalStiffnessMeasure",IFCROTATIONALMASSMEASURE:"IfcRotationalMassMeasure",IFCROTATIONALFREQUENCYMEASURE:"IfcRotationalFrequencyMeasure",IFCREAL:"IfcReal",IFCRATIOMEASURE:"IfcRatioMeasure",IFCRADIOACTIVITYMEASURE:"IfcRadioactivityMeasure",IFCPRESSUREMEASURE:"IfcPressureMeasure",IFCPRESENTABLETEXT:"IfcPresentableText",IFCPOWERMEASURE:"IfcPowerMeasure",IFCPOSITIVERATIOMEASURE:"IfcPositiveRatioMeasure",IFCPOSITIVEPLANEANGLEMEASURE:"IfcPositivePlaneAngleMeasure",IFCPOSITIVELENGTHMEASURE:"IfcPositiveLengthMeasure",IFCPLANEANGLEMEASURE:"IfcPlaneAngleMeasure",IFCPLANARFORCEMEASURE:"IfcPlanarForceMeasure",IFCPARAMETERVALUE:"IfcParameterValue",IFCPHMEASURE:"IfcPhMeasure",IFCNUMERICMEASURE:"IfcNumericMeasure",IFCNORMALISEDRATIOMEASURE:"IfcNormalisedRatioMeasure",IFCMONTHINYEARNUMBER:"IfcMonthInYearNumber",IFCMONETARYMEASURE:"IfcMonetaryMeasure",IFCMOMENTOFINERTIAMEASURE:"IfcMomentOfInertiaMeasure",IFCMOLECULARWEIGHTMEASURE:"IfcMolecularWeightMeasure",IFCMOISTUREDIFFUSIVITYMEASURE:"IfcMoistureDiffusivityMeasure",IFCMODULUSOFSUBGRADEREACTIONMEASURE:"IfcModulusOfSubgradeReactionMeasure",IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE:"IfcModulusOfRotationalSubgradeReactionMeasure",IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE:"IfcModulusOfLinearSubgradeReactionMeasure",IFCMODULUSOFELASTICITYMEASURE:"IfcModulusOfElasticityMeasure",IFCMINUTEINHOUR:"IfcMinuteInHour",IFCMASSPERLENGTHMEASURE:"IfcMassPerLengthMeasure",IFCMASSMEASURE:"IfcMassMeasure",IFCMASSFLOWRATEMEASURE:"IfcMassFlowRateMeasure",IFCMASSDENSITYMEASURE:"IfcMassDensityMeasure",IFCMAGNETICFLUXMEASURE:"IfcMagneticFluxMeasure",IFCMAGNETICFLUXDENSITYMEASURE:"IfcMagneticFluxDensityMeasure",IFCLUMINOUSINTENSITYMEASURE:"IfcLuminousIntensityMeasure",IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE:"IfcLuminousIntensityDistributionMeasure",IFCLUMINOUSFLUXMEASURE:"IfcLuminousFluxMeasure",IFCLOGICAL:"IfcLogical",IFCLINEARVELOCITYMEASURE:"IfcLinearVelocityMeasure",IFCLINEARSTIFFNESSMEASURE:"IfcLinearStiffnessMeasure",IFCLINEARMOMENTMEASURE:"IfcLinearMomentMeasure",IFCLINEARFORCEMEASURE:"IfcLinearForceMeasure",IFCLENGTHMEASURE:"IfcLengthMeasure",IFCLABEL:"IfcLabel",IFCKINEMATICVISCOSITYMEASURE:"IfcKinematicViscosityMeasure",IFCISOTHERMALMOISTURECAPACITYMEASURE:"IfcIsothermalMoistureCapacityMeasure",IFCIONCONCENTRATIONMEASURE:"IfcIonConcentrationMeasure",IFCINTEGERCOUNTRATEMEASURE:"IfcIntegerCountRateMeasure",IFCINTEGER:"IfcInteger",IFCINDUCTANCEMEASURE:"IfcInductanceMeasure",IFCILLUMINANCEMEASURE:"IfcIlluminanceMeasure",IFCIDENTIFIER:"IfcIdentifier",IFCHOURINDAY:"IfcHourInDay",IFCHEATINGVALUEMEASURE:"IfcHeatingValueMeasure",IFCHEATFLUXDENSITYMEASURE:"IfcHeatFluxDensityMeasure",IFCGLOBALLYUNIQUEID:"IfcGloballyUniqueId",IFCFREQUENCYMEASURE:"IfcFrequencyMeasure",IFCFORCEMEASURE:"IfcForceMeasure",IFCFONTWEIGHT:"IfcFontWeight",IFCFONTVARIANT:"IfcFontVariant",IFCFONTSTYLE:"IfcFontStyle",IFCENERGYMEASURE:"IfcEnergyMeasure",IFCELECTRICVOLTAGEMEASURE:"IfcElectricVoltageMeasure",IFCELECTRICRESISTANCEMEASURE:"IfcElectricResistanceMeasure",IFCELECTRICCURRENTMEASURE:"IfcElectricCurrentMeasure",IFCELECTRICCONDUCTANCEMEASURE:"IfcElectricConductanceMeasure",IFCELECTRICCHARGEMEASURE:"IfcElectricChargeMeasure",IFCELECTRICCAPACITANCEMEASURE:"IfcElectricCapacitanceMeasure",IFCDYNAMICVISCOSITYMEASURE:"IfcDynamicViscosityMeasure",IFCDOSEEQUIVALENTMEASURE:"IfcDoseEquivalentMeasure",IFCDIMENSIONCOUNT:"IfcDimensionCount",IFCDESCRIPTIVEMEASURE:"IfcDescriptiveMeasure",IFCDAYLIGHTSAVINGHOUR:"IfcDaylightSavingHour",IFCDAYINMONTHNUMBER:"IfcDayInMonthNumber",IFCCURVATUREMEASURE:"IfcCurvatureMeasure",IFCCOUNTMEASURE:"IfcCountMeasure",IFCCONTEXTDEPENDENTMEASURE:"IfcContextDependentMeasure",IFCCOMPOUNDPLANEANGLEMEASURE:"IfcCompoundPlaneAngleMeasure",IFCCOMPLEXNUMBER:"IfcComplexNumber",IFCBOXALIGNMENT:"IfcBoxAlignment",IFCBOOLEAN:"IfcBoolean",IFCAREAMEASURE:"IfcAreaMeasure",IFCANGULARVELOCITYMEASURE:"IfcAngularVelocityMeasure",IFCAMOUNTOFSUBSTANCEMEASURE:"IfcAmountOfSubstanceMeasure",IFCACCELERATIONMEASURE:"IfcAccelerationMeasure",IFCABSORBEDDOSEMEASURE:"IfcAbsorbedDoseMeasure",IFCGEOSLICE:"IfcGeoSlice",IFCGEOMODEL:"IfcGeoModel",IFCELECTRICFLOWTREATMENTDEVICE:"IfcElectricFlowTreatmentDevice",IFCDISTRIBUTIONBOARD:"IfcDistributionBoard",IFCCONVEYORSEGMENT:"IfcConveyorSegment",IFCCAISSONFOUNDATION:"IfcCaissonFoundation",IFCBOREHOLE:"IfcBorehole",IFCBEARING:"IfcBearing",IFCALIGNMENT:"IfcAlignment",IFCTRACKELEMENT:"IfcTrackElement",IFCSIGNAL:"IfcSignal",IFCREINFORCEDSOIL:"IfcReinforcedSoil",IFCRAIL:"IfcRail",IFCPAVEMENT:"IfcPavement",IFCNAVIGATIONELEMENT:"IfcNavigationElement",IFCMOORINGDEVICE:"IfcMooringDevice",IFCMOBILETELECOMMUNICATIONSAPPLIANCE:"IfcMobileTelecommunicationsAppliance",IFCLIQUIDTERMINAL:"IfcLiquidTerminal",IFCLINEARPOSITIONINGELEMENT:"IfcLinearPositioningElement",IFCKERB:"IfcKerb",IFCGEOTECHNICALASSEMBLY:"IfcGeotechnicalAssembly",IFCELECTRICFLOWTREATMENTDEVICETYPE:"IfcElectricFlowTreatmentDeviceType",IFCEARTHWORKSFILL:"IfcEarthworksFill",IFCEARTHWORKSELEMENT:"IfcEarthworksElement",IFCEARTHWORKSCUT:"IfcEarthworksCut",IFCDISTRIBUTIONBOARDTYPE:"IfcDistributionBoardType",IFCDEEPFOUNDATION:"IfcDeepFoundation",IFCCOURSE:"IfcCourse",IFCCONVEYORSEGMENTTYPE:"IfcConveyorSegmentType",IFCCAISSONFOUNDATIONTYPE:"IfcCaissonFoundationType",IFCBUILTSYSTEM:"IfcBuiltSystem",IFCBUILTELEMENT:"IfcBuiltElement",IFCBRIDGEPART:"IfcBridgePart",IFCBRIDGE:"IfcBridge",IFCBEARINGTYPE:"IfcBearingType",IFCALIGNMENTVERTICAL:"IfcAlignmentVertical",IFCALIGNMENTSEGMENT:"IfcAlignmentSegment",IFCALIGNMENTHORIZONTAL:"IfcAlignmentHorizontal",IFCALIGNMENTCANT:"IfcAlignmentCant",IFCVIBRATIONDAMPERTYPE:"IfcVibrationDamperType",IFCVIBRATIONDAMPER:"IfcVibrationDamper",IFCVEHICLE:"IfcVehicle",IFCTRANSPORTATIONDEVICE:"IfcTransportationDevice",IFCTRACKELEMENTTYPE:"IfcTrackElementType",IFCTENDONCONDUITTYPE:"IfcTendonConduitType",IFCTENDONCONDUIT:"IfcTendonConduit",IFCSINESPIRAL:"IfcSineSpiral",IFCSIGNALTYPE:"IfcSignalType",IFCSIGNTYPE:"IfcSignType",IFCSIGN:"IfcSign",IFCSEVENTHORDERPOLYNOMIALSPIRAL:"IfcSeventhOrderPolynomialSpiral",IFCSEGMENTEDREFERENCECURVE:"IfcSegmentedReferenceCurve",IFCSECONDORDERPOLYNOMIALSPIRAL:"IfcSecondOrderPolynomialSpiral",IFCROADPART:"IfcRoadPart",IFCROAD:"IfcRoad",IFCRELADHERESTOELEMENT:"IfcRelAdheresToElement",IFCREFERENT:"IfcReferent",IFCRAILWAYPART:"IfcRailwayPart",IFCRAILWAY:"IfcRailway",IFCRAILTYPE:"IfcRailType",IFCPOSITIONINGELEMENT:"IfcPositioningElement",IFCPAVEMENTTYPE:"IfcPavementType",IFCNAVIGATIONELEMENTTYPE:"IfcNavigationElementType",IFCMOORINGDEVICETYPE:"IfcMooringDeviceType",IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE:"IfcMobileTelecommunicationsApplianceType",IFCMARINEPART:"IfcMarinePart",IFCMARINEFACILITY:"IfcMarineFacility",IFCLIQUIDTERMINALTYPE:"IfcLiquidTerminalType",IFCLINEARELEMENT:"IfcLinearElement",IFCKERBTYPE:"IfcKerbType",IFCIMPACTPROTECTIONDEVICETYPE:"IfcImpactProtectionDeviceType",IFCIMPACTPROTECTIONDEVICE:"IfcImpactProtectionDevice",IFCGRADIENTCURVE:"IfcGradientCurve",IFCGEOTECHNICALSTRATUM:"IfcGeotechnicalStratum",IFCGEOTECHNICALELEMENT:"IfcGeotechnicalElement",IFCFACILITYPARTCOMMON:"IfcFacilityPartCommon",IFCFACILITYPART:"IfcFacilityPart",IFCFACILITY:"IfcFacility",IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID:"IfcDirectrixDerivedReferenceSweptAreaSolid",IFCDEEPFOUNDATIONTYPE:"IfcDeepFoundationType",IFCCOURSETYPE:"IfcCourseType",IFCCOSINESPIRAL:"IfcCosineSpiral",IFCCLOTHOID:"IfcClothoid",IFCBUILTELEMENTTYPE:"IfcBuiltElementType",IFCVEHICLETYPE:"IfcVehicleType",IFCTRIANGULATEDIRREGULARNETWORK:"IfcTriangulatedIrregularNetwork",IFCTRANSPORTATIONDEVICETYPE:"IfcTransportationDeviceType",IFCTHIRDORDERPOLYNOMIALSPIRAL:"IfcThirdOrderPolynomialSpiral",IFCSPIRAL:"IfcSpiral",IFCSECTIONEDSURFACE:"IfcSectionedSurface",IFCSECTIONEDSOLIDHORIZONTAL:"IfcSectionedSolidHorizontal",IFCSECTIONEDSOLID:"IfcSectionedSolid",IFCRELPOSITIONS:"IfcRelPositions",IFCRELASSOCIATESPROFILEDEF:"IfcRelAssociatesProfileDef",IFCPOLYNOMIALCURVE:"IfcPolynomialCurve",IFCOFFSETCURVEBYDISTANCES:"IfcOffsetCurveByDistances",IFCOFFSETCURVE:"IfcOffsetCurve",IFCINDEXEDPOLYGONALTEXTUREMAP:"IfcIndexedPolygonalTextureMap",IFCDIRECTRIXCURVESWEPTAREASOLID:"IfcDirectrixCurveSweptAreaSolid",IFCCURVESEGMENT:"IfcCurveSegment",IFCAXIS2PLACEMENTLINEAR:"IfcAxis2PlacementLinear",IFCSEGMENT:"IfcSegment",IFCPOINTBYDISTANCEEXPRESSION:"IfcPointByDistanceExpression",IFCOPENCROSSPROFILEDEF:"IfcOpenCrossProfileDef",IFCLINEARPLACEMENT:"IfcLinearPlacement",IFCALIGNMENTHORIZONTALSEGMENT:"IfcAlignmentHorizontalSegment",IFCALIGNMENTCANTSEGMENT:"IfcAlignmentCantSegment",IFCTEXTURECOORDINATEINDICESWITHVOIDS:"IfcTextureCoordinateIndicesWithVoids",IFCTEXTURECOORDINATEINDICES:"IfcTextureCoordinateIndices",IFCQUANTITYNUMBER:"IfcQuantityNumber",IFCALIGNMENTVERTICALSEGMENT:"IfcAlignmentVerticalSegment",IFCALIGNMENTPARAMETERSEGMENT:"IfcAlignmentParameterSegment",IFCCONTROLLER:"IfcController",IFCALARM:"IfcAlarm",IFCACTUATOR:"IfcActuator",IFCUNITARYCONTROLELEMENT:"IfcUnitaryControlElement",IFCSENSOR:"IfcSensor",IFCPROTECTIVEDEVICETRIPPINGUNIT:"IfcProtectiveDeviceTrippingUnit",IFCFLOWINSTRUMENT:"IfcFlowInstrument",IFCFIRESUPPRESSIONTERMINAL:"IfcFireSuppressionTerminal",IFCFILTER:"IfcFilter",IFCFAN:"IfcFan",IFCELECTRICTIMECONTROL:"IfcElectricTimeControl",IFCELECTRICMOTOR:"IfcElectricMotor",IFCELECTRICGENERATOR:"IfcElectricGenerator",IFCELECTRICFLOWSTORAGEDEVICE:"IfcElectricFlowStorageDevice",IFCELECTRICDISTRIBUTIONBOARD:"IfcElectricDistributionBoard",IFCELECTRICAPPLIANCE:"IfcElectricAppliance",IFCDUCTSILENCER:"IfcDuctSilencer",IFCDUCTSEGMENT:"IfcDuctSegment",IFCDUCTFITTING:"IfcDuctFitting",IFCDISTRIBUTIONCIRCUIT:"IfcDistributionCircuit",IFCDAMPER:"IfcDamper",IFCCOOLINGTOWER:"IfcCoolingTower",IFCCOOLEDBEAM:"IfcCooledBeam",IFCCONDENSER:"IfcCondenser",IFCCOMPRESSOR:"IfcCompressor",IFCCOMMUNICATIONSAPPLIANCE:"IfcCommunicationsAppliance",IFCCOIL:"IfcCoil",IFCCHILLER:"IfcChiller",IFCCABLESEGMENT:"IfcCableSegment",IFCCABLEFITTING:"IfcCableFitting",IFCCABLECARRIERSEGMENT:"IfcCableCarrierSegment",IFCCABLECARRIERFITTING:"IfcCableCarrierFitting",IFCBURNER:"IfcBurner",IFCBOILER:"IfcBoiler",IFCBEAMSTANDARDCASE:"IfcBeamStandardCase",IFCAUDIOVISUALAPPLIANCE:"IfcAudioVisualAppliance",IFCAIRTOAIRHEATRECOVERY:"IfcAirToAirHeatRecovery",IFCAIRTERMINALBOX:"IfcAirTerminalBox",IFCAIRTERMINAL:"IfcAirTerminal",IFCWINDOWSTANDARDCASE:"IfcWindowStandardCase",IFCWASTETERMINAL:"IfcWasteTerminal",IFCWALLELEMENTEDCASE:"IfcWallElementedCase",IFCVALVE:"IfcValve",IFCUNITARYEQUIPMENT:"IfcUnitaryEquipment",IFCUNITARYCONTROLELEMENTTYPE:"IfcUnitaryControlElementType",IFCTUBEBUNDLE:"IfcTubeBundle",IFCTRANSFORMER:"IfcTransformer",IFCTANK:"IfcTank",IFCSWITCHINGDEVICE:"IfcSwitchingDevice",IFCSTRUCTURALLOADCASE:"IfcStructuralLoadCase",IFCSTACKTERMINAL:"IfcStackTerminal",IFCSPACEHEATER:"IfcSpaceHeater",IFCSOLARDEVICE:"IfcSolarDevice",IFCSLABSTANDARDCASE:"IfcSlabStandardCase",IFCSLABELEMENTEDCASE:"IfcSlabElementedCase",IFCSHADINGDEVICE:"IfcShadingDevice",IFCSANITARYTERMINAL:"IfcSanitaryTerminal",IFCREINFORCINGBARTYPE:"IfcReinforcingBarType",IFCRATIONALBSPLINECURVEWITHKNOTS:"IfcRationalBSplineCurveWithKnots",IFCPUMP:"IfcPump",IFCPROTECTIVEDEVICETRIPPINGUNITTYPE:"IfcProtectiveDeviceTrippingUnitType",IFCPROTECTIVEDEVICE:"IfcProtectiveDevice",IFCPLATESTANDARDCASE:"IfcPlateStandardCase",IFCPIPESEGMENT:"IfcPipeSegment",IFCPIPEFITTING:"IfcPipeFitting",IFCOUTLET:"IfcOutlet",IFCOUTERBOUNDARYCURVE:"IfcOuterBoundaryCurve",IFCMOTORCONNECTION:"IfcMotorConnection",IFCMEMBERSTANDARDCASE:"IfcMemberStandardCase",IFCMEDICALDEVICE:"IfcMedicalDevice",IFCLIGHTFIXTURE:"IfcLightFixture",IFCLAMP:"IfcLamp",IFCJUNCTIONBOX:"IfcJunctionBox",IFCINTERCEPTOR:"IfcInterceptor",IFCHUMIDIFIER:"IfcHumidifier",IFCHEATEXCHANGER:"IfcHeatExchanger",IFCFLOWMETER:"IfcFlowMeter",IFCEXTERNALSPATIALELEMENT:"IfcExternalSpatialElement",IFCEVAPORATOR:"IfcEvaporator",IFCEVAPORATIVECOOLER:"IfcEvaporativeCooler",IFCENGINE:"IfcEngine",IFCELECTRICDISTRIBUTIONBOARDTYPE:"IfcElectricDistributionBoardType",IFCDOORSTANDARDCASE:"IfcDoorStandardCase",IFCDISTRIBUTIONSYSTEM:"IfcDistributionSystem",IFCCOMMUNICATIONSAPPLIANCETYPE:"IfcCommunicationsApplianceType",IFCCOLUMNSTANDARDCASE:"IfcColumnStandardCase",IFCCIVILELEMENT:"IfcCivilElement",IFCCHIMNEY:"IfcChimney",IFCCABLEFITTINGTYPE:"IfcCableFittingType",IFCBURNERTYPE:"IfcBurnerType",IFCBUILDINGSYSTEM:"IfcBuildingSystem",IFCBUILDINGELEMENTPARTTYPE:"IfcBuildingElementPartType",IFCBOUNDARYCURVE:"IfcBoundaryCurve",IFCBSPLINECURVEWITHKNOTS:"IfcBSplineCurveWithKnots",IFCAUDIOVISUALAPPLIANCETYPE:"IfcAudioVisualApplianceType",IFCWORKCALENDAR:"IfcWorkCalendar",IFCWINDOWTYPE:"IfcWindowType",IFCVOIDINGFEATURE:"IfcVoidingFeature",IFCVIBRATIONISOLATOR:"IfcVibrationIsolator",IFCTENDONTYPE:"IfcTendonType",IFCTENDONANCHORTYPE:"IfcTendonAnchorType",IFCSYSTEMFURNITUREELEMENT:"IfcSystemFurnitureElement",IFCSURFACEFEATURE:"IfcSurfaceFeature",IFCSTRUCTURALSURFACEACTION:"IfcStructuralSurfaceAction",IFCSTRUCTURALCURVEREACTION:"IfcStructuralCurveReaction",IFCSTRUCTURALCURVEACTION:"IfcStructuralCurveAction",IFCSTAIRTYPE:"IfcStairType",IFCSOLARDEVICETYPE:"IfcSolarDeviceType",IFCSHADINGDEVICETYPE:"IfcShadingDeviceType",IFCSEAMCURVE:"IfcSeamCurve",IFCROOFTYPE:"IfcRoofType",IFCREINFORCINGMESHTYPE:"IfcReinforcingMeshType",IFCREINFORCINGELEMENTTYPE:"IfcReinforcingElementType",IFCRATIONALBSPLINESURFACEWITHKNOTS:"IfcRationalBSplineSurfaceWithKnots",IFCRAMPTYPE:"IfcRampType",IFCPOLYGONALFACESET:"IfcPolygonalFaceSet",IFCPILETYPE:"IfcPileType",IFCOPENINGSTANDARDCASE:"IfcOpeningStandardCase",IFCMEDICALDEVICETYPE:"IfcMedicalDeviceType",IFCINTERSECTIONCURVE:"IfcIntersectionCurve",IFCINTERCEPTORTYPE:"IfcInterceptorType",IFCINDEXEDPOLYCURVE:"IfcIndexedPolyCurve",IFCGEOGRAPHICELEMENT:"IfcGeographicElement",IFCFURNITURE:"IfcFurniture",IFCFOOTINGTYPE:"IfcFootingType",IFCEXTERNALSPATIALSTRUCTUREELEMENT:"IfcExternalSpatialStructureElement",IFCEVENT:"IfcEvent",IFCENGINETYPE:"IfcEngineType",IFCELEMENTASSEMBLYTYPE:"IfcElementAssemblyType",IFCDOORTYPE:"IfcDoorType",IFCCYLINDRICALSURFACE:"IfcCylindricalSurface",IFCCONSTRUCTIONPRODUCTRESOURCETYPE:"IfcConstructionProductResourceType",IFCCONSTRUCTIONMATERIALRESOURCETYPE:"IfcConstructionMaterialResourceType",IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE:"IfcConstructionEquipmentResourceType",IFCCOMPOSITECURVEONSURFACE:"IfcCompositeCurveOnSurface",IFCCOMPLEXPROPERTYTEMPLATE:"IfcComplexPropertyTemplate",IFCCIVILELEMENTTYPE:"IfcCivilElementType",IFCCHIMNEYTYPE:"IfcChimneyType",IFCBSPLINESURFACEWITHKNOTS:"IfcBSplineSurfaceWithKnots",IFCBSPLINESURFACE:"IfcBSplineSurface",IFCADVANCEDBREPWITHVOIDS:"IfcAdvancedBrepWithVoids",IFCADVANCEDBREP:"IfcAdvancedBrep",IFCTRIANGULATEDFACESET:"IfcTriangulatedFaceSet",IFCTOROIDALSURFACE:"IfcToroidalSurface",IFCTESSELLATEDFACESET:"IfcTessellatedFaceSet",IFCTASKTYPE:"IfcTaskType",IFCSURFACECURVE:"IfcSurfaceCurve",IFCSUBCONTRACTRESOURCETYPE:"IfcSubContractResourceType",IFCSTRUCTURALSURFACEREACTION:"IfcStructuralSurfaceReaction",IFCSPHERICALSURFACE:"IfcSphericalSurface",IFCSPATIALZONETYPE:"IfcSpatialZoneType",IFCSPATIALZONE:"IfcSpatialZone",IFCSPATIALELEMENTTYPE:"IfcSpatialElementType",IFCSPATIALELEMENT:"IfcSpatialElement",IFCSIMPLEPROPERTYTEMPLATE:"IfcSimplePropertyTemplate",IFCREVOLVEDAREASOLIDTAPERED:"IfcRevolvedAreaSolidTapered",IFCREPARAMETRISEDCOMPOSITECURVESEGMENT:"IfcReparametrisedCompositeCurveSegment",IFCRELSPACEBOUNDARY2NDLEVEL:"IfcRelSpaceBoundary2ndLevel",IFCRELSPACEBOUNDARY1STLEVEL:"IfcRelSpaceBoundary1stLevel",IFCRELINTERFERESELEMENTS:"IfcRelInterferesElements",IFCRELDEFINESBYTEMPLATE:"IfcRelDefinesByTemplate",IFCRELDEFINESBYOBJECT:"IfcRelDefinesByObject",IFCRELDECLARES:"IfcRelDeclares",IFCRELASSIGNSTOGROUPBYFACTOR:"IfcRelAssignsToGroupByFactor",IFCPROPERTYTEMPLATE:"IfcPropertyTemplate",IFCPROPERTYSETTEMPLATE:"IfcPropertySetTemplate",IFCPROJECTLIBRARY:"IfcProjectLibrary",IFCPROCEDURETYPE:"IfcProcedureType",IFCPREDEFINEDPROPERTYSET:"IfcPredefinedPropertySet",IFCPCURVE:"IfcPCurve",IFCLABORRESOURCETYPE:"IfcLaborResourceType",IFCINDEXEDPOLYGONALFACEWITHVOIDS:"IfcIndexedPolygonalFaceWithVoids",IFCINDEXEDPOLYGONALFACE:"IfcIndexedPolygonalFace",IFCGEOGRAPHICELEMENTTYPE:"IfcGeographicElementType",IFCFIXEDREFERENCESWEPTAREASOLID:"IfcFixedReferenceSweptAreaSolid",IFCEXTRUDEDAREASOLIDTAPERED:"IfcExtrudedAreaSolidTapered",IFCEVENTTYPE:"IfcEventType",IFCCURVEBOUNDEDSURFACE:"IfcCurveBoundedSurface",IFCCREWRESOURCETYPE:"IfcCrewResourceType",IFCCONTEXT:"IfcContext",IFCCONSTRUCTIONRESOURCETYPE:"IfcConstructionResourceType",IFCCARTESIANPOINTLIST3D:"IfcCartesianPointList3D",IFCCARTESIANPOINTLIST2D:"IfcCartesianPointList2D",IFCCARTESIANPOINTLIST:"IfcCartesianPointList",IFCADVANCEDFACE:"IfcAdvancedFace",IFCTYPERESOURCE:"IfcTypeResource",IFCTYPEPROCESS:"IfcTypeProcess",IFCTESSELLATEDITEM:"IfcTessellatedItem",IFCSWEPTDISKSOLIDPOLYGONAL:"IfcSweptDiskSolidPolygonal",IFCRESOURCETIME:"IfcResourceTime",IFCRESOURCECONSTRAINTRELATIONSHIP:"IfcResourceConstraintRelationship",IFCRESOURCEAPPROVALRELATIONSHIP:"IfcResourceApprovalRelationship",IFCQUANTITYSET:"IfcQuantitySet",IFCPROPERTYTEMPLATEDEFINITION:"IfcPropertyTemplateDefinition",IFCPREDEFINEDPROPERTIES:"IfcPredefinedProperties",IFCMIRROREDPROFILEDEF:"IfcMirroredProfileDef",IFCMATERIALRELATIONSHIP:"IfcMaterialRelationship",IFCMATERIALPROFILESETUSAGETAPERING:"IfcMaterialProfileSetUsageTapering",IFCMATERIALPROFILESETUSAGE:"IfcMaterialProfileSetUsage",IFCMATERIALCONSTITUENTSET:"IfcMaterialConstituentSet",IFCMATERIALCONSTITUENT:"IfcMaterialConstituent",IFCLAGTIME:"IfcLagTime",IFCINDEXEDTRIANGLETEXTUREMAP:"IfcIndexedTriangleTextureMap",IFCINDEXEDTEXTUREMAP:"IfcIndexedTextureMap",IFCINDEXEDCOLOURMAP:"IfcIndexedColourMap",IFCEXTERNALREFERENCERELATIONSHIP:"IfcExternalReferenceRelationship",IFCEXTENDEDPROPERTIES:"IfcExtendedProperties",IFCEVENTTIME:"IfcEventTime",IFCCONVERSIONBASEDUNITWITHOFFSET:"IfcConversionBasedUnitWithOffset",IFCCOLOURRGBLIST:"IfcColourRgbList",IFCWORKTIME:"IfcWorkTime",IFCTIMEPERIOD:"IfcTimePeriod",IFCTEXTUREVERTEXLIST:"IfcTextureVertexList",IFCTASKTIMERECURRING:"IfcTaskTimeRecurring",IFCTASKTIME:"IfcTaskTime",IFCTABLECOLUMN:"IfcTableColumn",IFCSURFACEREINFORCEMENTAREA:"IfcSurfaceReinforcementArea",IFCSTRUCTURALLOADORRESULT:"IfcStructuralLoadOrResult",IFCSTRUCTURALLOADCONFIGURATION:"IfcStructuralLoadConfiguration",IFCSCHEDULINGTIME:"IfcSchedulingTime",IFCRESOURCELEVELRELATIONSHIP:"IfcResourceLevelRelationship",IFCREFERENCE:"IfcReference",IFCRECURRENCEPATTERN:"IfcRecurrencePattern",IFCPROPERTYABSTRACTION:"IfcPropertyAbstraction",IFCPROJECTEDCRS:"IfcProjectedCrs",IFCPRESENTATIONITEM:"IfcPresentationItem",IFCMATERIALUSAGEDEFINITION:"IfcMaterialUsageDefinition",IFCMATERIALPROFILEWITHOFFSETS:"IfcMaterialProfileWithOffsets",IFCMATERIALPROFILESET:"IfcMaterialProfileSet",IFCMATERIALPROFILE:"IfcMaterialProfile",IFCMATERIALLAYERWITHOFFSETS:"IfcMaterialLayerWithOffsets",IFCMATERIALDEFINITION:"IfcMaterialDefinition",IFCMAPCONVERSION:"IfcMapConversion",IFCEXTERNALINFORMATION:"IfcExternalInformation",IFCCOORDINATEREFERENCESYSTEM:"IfcCoordinateReferenceSystem",IFCCOORDINATEOPERATION:"IfcCoordinateOperation",IFCCONNECTIONVOLUMEGEOMETRY:"IfcConnectionVolumeGeometry",IFCREINFORCINGBAR:"IfcReinforcingBar",IFCELECTRICDISTRIBUTIONPOINT:"IfcElectricDistributionPoint",IFCDISTRIBUTIONCONTROLELEMENT:"IfcDistributionControlElement",IFCDISTRIBUTIONCHAMBERELEMENT:"IfcDistributionChamberElement",IFCCONTROLLERTYPE:"IfcControllerType",IFCCHAMFEREDGEFEATURE:"IfcChamferEdgeFeature",IFCBEAM:"IfcBeam",IFCALARMTYPE:"IfcAlarmType",IFCACTUATORTYPE:"IfcActuatorType",IFCWINDOW:"IfcWindow",IFCWALLSTANDARDCASE:"IfcWallStandardCase",IFCWALL:"IfcWall",IFCVIBRATIONISOLATORTYPE:"IfcVibrationIsolatorType",IFCTENDONANCHOR:"IfcTendonAnchor",IFCTENDON:"IfcTendon",IFCSTRUCTURALANALYSISMODEL:"IfcStructuralAnalysisModel",IFCSTAIRFLIGHT:"IfcStairFlight",IFCSTAIR:"IfcStair",IFCSLAB:"IfcSlab",IFCSENSORTYPE:"IfcSensorType",IFCROUNDEDEDGEFEATURE:"IfcRoundedEdgeFeature",IFCROOF:"IfcRoof",IFCREINFORCINGMESH:"IfcReinforcingMesh",IFCREINFORCINGELEMENT:"IfcReinforcingElement",IFCRATIONALBEZIERCURVE:"IfcRationalBezierCurve",IFCRAMPFLIGHT:"IfcRampFlight",IFCRAMP:"IfcRamp",IFCRAILING:"IfcRailing",IFCPLATE:"IfcPlate",IFCPILE:"IfcPile",IFCMEMBER:"IfcMember",IFCFOOTING:"IfcFooting",IFCFLOWTREATMENTDEVICE:"IfcFlowTreatmentDevice",IFCFLOWTERMINAL:"IfcFlowTerminal",IFCFLOWSTORAGEDEVICE:"IfcFlowStorageDevice",IFCFLOWSEGMENT:"IfcFlowSegment",IFCFLOWMOVINGDEVICE:"IfcFlowMovingDevice",IFCFLOWINSTRUMENTTYPE:"IfcFlowInstrumentType",IFCFLOWFITTING:"IfcFlowFitting",IFCFLOWCONTROLLER:"IfcFlowController",IFCFIRESUPPRESSIONTERMINALTYPE:"IfcFireSuppressionTerminalType",IFCFILTERTYPE:"IfcFilterType",IFCFANTYPE:"IfcFanType",IFCENERGYCONVERSIONDEVICE:"IfcEnergyConversionDevice",IFCELECTRICALELEMENT:"IfcElectricalElement",IFCELECTRICALCIRCUIT:"IfcElectricalCircuit",IFCELECTRICTIMECONTROLTYPE:"IfcElectricTimeControlType",IFCELECTRICMOTORTYPE:"IfcElectricMotorType",IFCELECTRICHEATERTYPE:"IfcElectricHeaterType",IFCELECTRICGENERATORTYPE:"IfcElectricGeneratorType",IFCELECTRICFLOWSTORAGEDEVICETYPE:"IfcElectricFlowStorageDeviceType",IFCELECTRICAPPLIANCETYPE:"IfcElectricApplianceType",IFCEDGEFEATURE:"IfcEdgeFeature",IFCDUCTSILENCERTYPE:"IfcDuctSilencerType",IFCDUCTSEGMENTTYPE:"IfcDuctSegmentType",IFCDUCTFITTINGTYPE:"IfcDuctFittingType",IFCDOOR:"IfcDoor",IFCDISTRIBUTIONPORT:"IfcDistributionPort",IFCDISTRIBUTIONFLOWELEMENT:"IfcDistributionFlowElement",IFCDISTRIBUTIONELEMENT:"IfcDistributionElement",IFCDISTRIBUTIONCONTROLELEMENTTYPE:"IfcDistributionControlElementType",IFCDISTRIBUTIONCHAMBERELEMENTTYPE:"IfcDistributionChamberElementType",IFCDISCRETEACCESSORYTYPE:"IfcDiscreteAccessoryType",IFCDISCRETEACCESSORY:"IfcDiscreteAccessory",IFCDIAMETERDIMENSION:"IfcDiameterDimension",IFCDAMPERTYPE:"IfcDamperType",IFCCURTAINWALL:"IfcCurtainWall",IFCCOVERING:"IfcCovering",IFCCOOLINGTOWERTYPE:"IfcCoolingTowerType",IFCCOOLEDBEAMTYPE:"IfcCooledBeamType",IFCCONSTRUCTIONPRODUCTRESOURCE:"IfcConstructionProductResource",IFCCONSTRUCTIONMATERIALRESOURCE:"IfcConstructionMaterialResource",IFCCONSTRUCTIONEQUIPMENTRESOURCE:"IfcConstructionEquipmentResource",IFCCONDITIONCRITERION:"IfcConditionCriterion",IFCCONDITION:"IfcCondition",IFCCONDENSERTYPE:"IfcCondenserType",IFCCOMPRESSORTYPE:"IfcCompressorType",IFCCOLUMN:"IfcColumn",IFCCOILTYPE:"IfcCoilType",IFCCIRCLE:"IfcCircle",IFCCHILLERTYPE:"IfcChillerType",IFCCABLESEGMENTTYPE:"IfcCableSegmentType",IFCCABLECARRIERSEGMENTTYPE:"IfcCableCarrierSegmentType",IFCCABLECARRIERFITTINGTYPE:"IfcCableCarrierFittingType",IFCBUILDINGELEMENTPROXYTYPE:"IfcBuildingElementProxyType",IFCBUILDINGELEMENTPROXY:"IfcBuildingElementProxy",IFCBUILDINGELEMENTPART:"IfcBuildingElementPart",IFCBUILDINGELEMENTCOMPONENT:"IfcBuildingElementComponent",IFCBUILDINGELEMENT:"IfcBuildingElement",IFCBOILERTYPE:"IfcBoilerType",IFCBEZIERCURVE:"IfcBezierCurve",IFCBEAMTYPE:"IfcBeamType",IFCBSPLINECURVE:"IfcBSplineCurve",IFCASSET:"IfcAsset",IFCANGULARDIMENSION:"IfcAngularDimension",IFCAIRTOAIRHEATRECOVERYTYPE:"IfcAirToAirHeatRecoveryType",IFCAIRTERMINALTYPE:"IfcAirTerminalType",IFCAIRTERMINALBOXTYPE:"IfcAirTerminalBoxType",IFCACTIONREQUEST:"IfcActionRequest",IFC2DCOMPOSITECURVE:"Ifc2DCompositeCurve",IFCZONE:"IfcZone",IFCWORKSCHEDULE:"IfcWorkSchedule",IFCWORKPLAN:"IfcWorkPlan",IFCWORKCONTROL:"IfcWorkControl",IFCWASTETERMINALTYPE:"IfcWasteTerminalType",IFCWALLTYPE:"IfcWallType",IFCVIRTUALELEMENT:"IfcVirtualElement",IFCVALVETYPE:"IfcValveType",IFCUNITARYEQUIPMENTTYPE:"IfcUnitaryEquipmentType",IFCTUBEBUNDLETYPE:"IfcTubeBundleType",IFCTRIMMEDCURVE:"IfcTrimmedCurve",IFCTRANSPORTELEMENT:"IfcTransportElement",IFCTRANSFORMERTYPE:"IfcTransformerType",IFCTIMESERIESSCHEDULE:"IfcTimeSeriesSchedule",IFCTANKTYPE:"IfcTankType",IFCSYSTEM:"IfcSystem",IFCSWITCHINGDEVICETYPE:"IfcSwitchingDeviceType",IFCSUBCONTRACTRESOURCE:"IfcSubContractResource",IFCSTRUCTURALSURFACECONNECTION:"IfcStructuralSurfaceConnection",IFCSTRUCTURALRESULTGROUP:"IfcStructuralResultGroup",IFCSTRUCTURALPOINTREACTION:"IfcStructuralPointReaction",IFCSTRUCTURALPOINTCONNECTION:"IfcStructuralPointConnection",IFCSTRUCTURALPOINTACTION:"IfcStructuralPointAction",IFCSTRUCTURALPLANARACTIONVARYING:"IfcStructuralPlanarActionVarying",IFCSTRUCTURALPLANARACTION:"IfcStructuralPlanarAction",IFCSTRUCTURALLOADGROUP:"IfcStructuralLoadGroup",IFCSTRUCTURALLINEARACTIONVARYING:"IfcStructuralLinearActionVarying",IFCSTRUCTURALLINEARACTION:"IfcStructuralLinearAction",IFCSTRUCTURALCURVEMEMBERVARYING:"IfcStructuralCurveMemberVarying",IFCSTRUCTURALCURVEMEMBER:"IfcStructuralCurveMember",IFCSTRUCTURALCURVECONNECTION:"IfcStructuralCurveConnection",IFCSTRUCTURALCONNECTION:"IfcStructuralConnection",IFCSTRUCTURALACTION:"IfcStructuralAction",IFCSTAIRFLIGHTTYPE:"IfcStairFlightType",IFCSTACKTERMINALTYPE:"IfcStackTerminalType",IFCSPACETYPE:"IfcSpaceType",IFCSPACEPROGRAM:"IfcSpaceProgram",IFCSPACEHEATERTYPE:"IfcSpaceHeaterType",IFCSPACE:"IfcSpace",IFCSLABTYPE:"IfcSlabType",IFCSITE:"IfcSite",IFCSERVICELIFE:"IfcServiceLife",IFCSCHEDULETIMECONTROL:"IfcScheduleTimeControl",IFCSANITARYTERMINALTYPE:"IfcSanitaryTerminalType",IFCRELASSIGNSTASKS:"IfcRelAssignsTasks",IFCRELAGGREGATES:"IfcRelAggregates",IFCRAMPFLIGHTTYPE:"IfcRampFlightType",IFCRAILINGTYPE:"IfcRailingType",IFCRADIUSDIMENSION:"IfcRadiusDimension",IFCPUMPTYPE:"IfcPumpType",IFCPROTECTIVEDEVICETYPE:"IfcProtectiveDeviceType",IFCPROJECTIONELEMENT:"IfcProjectionElement",IFCPROJECTORDERRECORD:"IfcProjectOrderRecord",IFCPROJECTORDER:"IfcProjectOrder",IFCPROCEDURE:"IfcProcedure",IFCPORT:"IfcPort",IFCPOLYLINE:"IfcPolyline",IFCPLATETYPE:"IfcPlateType",IFCPIPESEGMENTTYPE:"IfcPipeSegmentType",IFCPIPEFITTINGTYPE:"IfcPipeFittingType",IFCPERMIT:"IfcPermit",IFCPERFORMANCEHISTORY:"IfcPerformanceHistory",IFCOUTLETTYPE:"IfcOutletType",IFCORDERACTION:"IfcOrderAction",IFCOPENINGELEMENT:"IfcOpeningElement",IFCOCCUPANT:"IfcOccupant",IFCMOVE:"IfcMove",IFCMOTORCONNECTIONTYPE:"IfcMotorConnectionType",IFCMEMBERTYPE:"IfcMemberType",IFCMECHANICALFASTENERTYPE:"IfcMechanicalFastenerType",IFCMECHANICALFASTENER:"IfcMechanicalFastener",IFCLINEARDIMENSION:"IfcLinearDimension",IFCLIGHTFIXTURETYPE:"IfcLightFixtureType",IFCLAMPTYPE:"IfcLampType",IFCLABORRESOURCE:"IfcLaborResource",IFCJUNCTIONBOXTYPE:"IfcJunctionBoxType",IFCINVENTORY:"IfcInventory",IFCHUMIDIFIERTYPE:"IfcHumidifierType",IFCHEATEXCHANGERTYPE:"IfcHeatExchangerType",IFCGROUP:"IfcGroup",IFCGRID:"IfcGrid",IFCGASTERMINALTYPE:"IfcGasTerminalType",IFCFURNITURESTANDARD:"IfcFurnitureStandard",IFCFURNISHINGELEMENT:"IfcFurnishingElement",IFCFLOWTREATMENTDEVICETYPE:"IfcFlowTreatmentDeviceType",IFCFLOWTERMINALTYPE:"IfcFlowTerminalType",IFCFLOWSTORAGEDEVICETYPE:"IfcFlowStorageDeviceType",IFCFLOWSEGMENTTYPE:"IfcFlowSegmentType",IFCFLOWMOVINGDEVICETYPE:"IfcFlowMovingDeviceType",IFCFLOWMETERTYPE:"IfcFlowMeterType",IFCFLOWFITTINGTYPE:"IfcFlowFittingType",IFCFLOWCONTROLLERTYPE:"IfcFlowControllerType",IFCFEATUREELEMENTSUBTRACTION:"IfcFeatureElementSubtraction",IFCFEATUREELEMENTADDITION:"IfcFeatureElementAddition",IFCFEATUREELEMENT:"IfcFeatureElement",IFCFASTENERTYPE:"IfcFastenerType",IFCFASTENER:"IfcFastener",IFCFACETEDBREPWITHVOIDS:"IfcFacetedBrepWithVoids",IFCFACETEDBREP:"IfcFacetedBrep",IFCEVAPORATORTYPE:"IfcEvaporatorType",IFCEVAPORATIVECOOLERTYPE:"IfcEvaporativeCoolerType",IFCEQUIPMENTSTANDARD:"IfcEquipmentStandard",IFCEQUIPMENTELEMENT:"IfcEquipmentElement",IFCENERGYCONVERSIONDEVICETYPE:"IfcEnergyConversionDeviceType",IFCELLIPSE:"IfcEllipse",IFCELEMENTCOMPONENTTYPE:"IfcElementComponentType",IFCELEMENTCOMPONENT:"IfcElementComponent",IFCELEMENTASSEMBLY:"IfcElementAssembly",IFCELEMENT:"IfcElement",IFCELECTRICALBASEPROPERTIES:"IfcElectricalBaseProperties",IFCDISTRIBUTIONFLOWELEMENTTYPE:"IfcDistributionFlowElementType",IFCDISTRIBUTIONELEMENTTYPE:"IfcDistributionElementType",IFCDIMENSIONCURVEDIRECTEDCALLOUT:"IfcDimensionCurveDirectedCallout",IFCCURTAINWALLTYPE:"IfcCurtainWallType",IFCCREWRESOURCE:"IfcCrewResource",IFCCOVERINGTYPE:"IfcCoveringType",IFCCOSTSCHEDULE:"IfcCostSchedule",IFCCOSTITEM:"IfcCostItem",IFCCONTROL:"IfcControl",IFCCONSTRUCTIONRESOURCE:"IfcConstructionResource",IFCCONIC:"IfcConic",IFCCOMPOSITECURVE:"IfcCompositeCurve",IFCCOLUMNTYPE:"IfcColumnType",IFCCIRCLEHOLLOWPROFILEDEF:"IfcCircleHollowProfileDef",IFCBUILDINGSTOREY:"IfcBuildingStorey",IFCBUILDINGELEMENTTYPE:"IfcBuildingElementType",IFCBUILDING:"IfcBuilding",IFCBOUNDEDCURVE:"IfcBoundedCurve",IFCBOOLEANCLIPPINGRESULT:"IfcBooleanClippingResult",IFCBLOCK:"IfcBlock",IFCASYMMETRICISHAPEPROFILEDEF:"IfcAsymmetricIShapeProfileDef",IFCANNOTATION:"IfcAnnotation",IFCACTOR:"IfcActor",IFCTRANSPORTELEMENTTYPE:"IfcTransportElementType",IFCTASK:"IfcTask",IFCSYSTEMFURNITUREELEMENTTYPE:"IfcSystemFurnitureElementType",IFCSURFACEOFREVOLUTION:"IfcSurfaceOfRevolution",IFCSURFACEOFLINEAREXTRUSION:"IfcSurfaceOfLinearExtrusion",IFCSURFACECURVESWEPTAREASOLID:"IfcSurfaceCurveSweptAreaSolid",IFCSTRUCTUREDDIMENSIONCALLOUT:"IfcStructuredDimensionCallout",IFCSTRUCTURALSURFACEMEMBERVARYING:"IfcStructuralSurfaceMemberVarying",IFCSTRUCTURALSURFACEMEMBER:"IfcStructuralSurfaceMember",IFCSTRUCTURALREACTION:"IfcStructuralReaction",IFCSTRUCTURALMEMBER:"IfcStructuralMember",IFCSTRUCTURALITEM:"IfcStructuralItem",IFCSTRUCTURALACTIVITY:"IfcStructuralActivity",IFCSPHERE:"IfcSphere",IFCSPATIALSTRUCTUREELEMENTTYPE:"IfcSpatialStructureElementType",IFCSPATIALSTRUCTUREELEMENT:"IfcSpatialStructureElement",IFCRIGHTCIRCULARCYLINDER:"IfcRightCircularCylinder",IFCRIGHTCIRCULARCONE:"IfcRightCircularCone",IFCREVOLVEDAREASOLID:"IfcRevolvedAreaSolid",IFCRESOURCE:"IfcResource",IFCRELVOIDSELEMENT:"IfcRelVoidsElement",IFCRELSPACEBOUNDARY:"IfcRelSpaceBoundary",IFCRELSERVICESBUILDINGS:"IfcRelServicesBuildings",IFCRELSEQUENCE:"IfcRelSequence",IFCRELSCHEDULESCOSTITEMS:"IfcRelSchedulesCostItems",IFCRELREFERENCEDINSPATIALSTRUCTURE:"IfcRelReferencedInSpatialStructure",IFCRELPROJECTSELEMENT:"IfcRelProjectsElement",IFCRELOVERRIDESPROPERTIES:"IfcRelOverridesProperties",IFCRELOCCUPIESSPACES:"IfcRelOccupiesSpaces",IFCRELNESTS:"IfcRelNests",IFCRELINTERACTIONREQUIREMENTS:"IfcRelInteractionRequirements",IFCRELFLOWCONTROLELEMENTS:"IfcRelFlowControlElements",IFCRELFILLSELEMENT:"IfcRelFillsElement",IFCRELDEFINESBYTYPE:"IfcRelDefinesByType",IFCRELDEFINESBYPROPERTIES:"IfcRelDefinesByProperties",IFCRELDEFINES:"IfcRelDefines",IFCRELDECOMPOSES:"IfcRelDecomposes",IFCRELCOVERSSPACES:"IfcRelCoversSpaces",IFCRELCOVERSBLDGELEMENTS:"IfcRelCoversBldgElements",IFCRELCONTAINEDINSPATIALSTRUCTURE:"IfcRelContainedInSpatialStructure",IFCRELCONNECTSWITHREALIZINGELEMENTS:"IfcRelConnectsWithRealizingElements",IFCRELCONNECTSWITHECCENTRICITY:"IfcRelConnectsWithEccentricity",IFCRELCONNECTSSTRUCTURALMEMBER:"IfcRelConnectsStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT:"IfcRelConnectsStructuralElement",IFCRELCONNECTSSTRUCTURALACTIVITY:"IfcRelConnectsStructuralActivity",IFCRELCONNECTSPORTS:"IfcRelConnectsPorts",IFCRELCONNECTSPORTTOELEMENT:"IfcRelConnectsPortToElement",IFCRELCONNECTSPATHELEMENTS:"IfcRelConnectsPathElements",IFCRELCONNECTSELEMENTS:"IfcRelConnectsElements",IFCRELCONNECTS:"IfcRelConnects",IFCRELASSOCIATESPROFILEPROPERTIES:"IfcRelAssociatesProfileProperties",IFCRELASSOCIATESMATERIAL:"IfcRelAssociatesMaterial",IFCRELASSOCIATESLIBRARY:"IfcRelAssociatesLibrary",IFCRELASSOCIATESDOCUMENT:"IfcRelAssociatesDocument",IFCRELASSOCIATESCONSTRAINT:"IfcRelAssociatesConstraint",IFCRELASSOCIATESCLASSIFICATION:"IfcRelAssociatesClassification",IFCRELASSOCIATESAPPROVAL:"IfcRelAssociatesApproval",IFCRELASSOCIATESAPPLIEDVALUE:"IfcRelAssociatesAppliedValue",IFCRELASSOCIATES:"IfcRelAssociates",IFCRELASSIGNSTORESOURCE:"IfcRelAssignsToResource",IFCRELASSIGNSTOPROJECTORDER:"IfcRelAssignsToProjectOrder",IFCRELASSIGNSTOPRODUCT:"IfcRelAssignsToProduct",IFCRELASSIGNSTOPROCESS:"IfcRelAssignsToProcess",IFCRELASSIGNSTOGROUP:"IfcRelAssignsToGroup",IFCRELASSIGNSTOCONTROL:"IfcRelAssignsToControl",IFCRELASSIGNSTOACTOR:"IfcRelAssignsToActor",IFCRELASSIGNS:"IfcRelAssigns",IFCRECTANGULARTRIMMEDSURFACE:"IfcRectangularTrimmedSurface",IFCRECTANGULARPYRAMID:"IfcRectangularPyramid",IFCRECTANGLEHOLLOWPROFILEDEF:"IfcRectangleHollowProfileDef",IFCPROXY:"IfcProxy",IFCPROPERTYSET:"IfcPropertySet",IFCPROJECTIONCURVE:"IfcProjectionCurve",IFCPROJECT:"IfcProject",IFCPRODUCT:"IfcProduct",IFCPROCESS:"IfcProcess",IFCPLANE:"IfcPlane",IFCPLANARBOX:"IfcPlanarBox",IFCPERMEABLECOVERINGPROPERTIES:"IfcPermeableCoveringProperties",IFCOFFSETCURVE3D:"IfcOffsetCurve3D",IFCOFFSETCURVE2D:"IfcOffsetCurve2D",IFCOBJECT:"IfcObject",IFCMANIFOLDSOLIDBREP:"IfcManifoldSolidBrep",IFCLINE:"IfcLine",IFCLSHAPEPROFILEDEF:"IfcLShapeProfileDef",IFCISHAPEPROFILEDEF:"IfcIShapeProfileDef",IFCGEOMETRICCURVESET:"IfcGeometricCurveSet",IFCFURNITURETYPE:"IfcFurnitureType",IFCFURNISHINGELEMENTTYPE:"IfcFurnishingElementType",IFCFLUIDFLOWPROPERTIES:"IfcFluidFlowProperties",IFCFILLAREASTYLETILES:"IfcFillAreaStyleTiles",IFCFILLAREASTYLETILESYMBOLWITHSTYLE:"IfcFillAreaStyleTileSymbolWithStyle",IFCFILLAREASTYLEHATCHING:"IfcFillAreaStyleHatching",IFCFACEBASEDSURFACEMODEL:"IfcFaceBasedSurfaceModel",IFCEXTRUDEDAREASOLID:"IfcExtrudedAreaSolid",IFCENERGYPROPERTIES:"IfcEnergyProperties",IFCELLIPSEPROFILEDEF:"IfcEllipseProfileDef",IFCELEMENTARYSURFACE:"IfcElementarySurface",IFCELEMENTTYPE:"IfcElementType",IFCELEMENTQUANTITY:"IfcElementQuantity",IFCEDGELOOP:"IfcEdgeLoop",IFCDRAUGHTINGPREDEFINEDCURVEFONT:"IfcDraughtingPredefinedCurveFont",IFCDRAUGHTINGPREDEFINEDCOLOUR:"IfcDraughtingPredefinedColour",IFCDRAUGHTINGCALLOUT:"IfcDraughtingCallout",IFCDOORSTYLE:"IfcDoorStyle",IFCDOORPANELPROPERTIES:"IfcDoorPanelProperties",IFCDOORLININGPROPERTIES:"IfcDoorLiningProperties",IFCDIRECTION:"IfcDirection",IFCDIMENSIONCURVETERMINATOR:"IfcDimensionCurveTerminator",IFCDIMENSIONCURVE:"IfcDimensionCurve",IFCDEFINEDSYMBOL:"IfcDefinedSymbol",IFCCURVEBOUNDEDPLANE:"IfcCurveBoundedPlane",IFCCURVE:"IfcCurve",IFCCSGSOLID:"IfcCsgSolid",IFCCSGPRIMITIVE3D:"IfcCsgPrimitive3D",IFCCRANERAILFSHAPEPROFILEDEF:"IfcCraneRailFShapeProfileDef",IFCCRANERAILASHAPEPROFILEDEF:"IfcCraneRailAShapeProfileDef",IFCCOMPOSITECURVESEGMENT:"IfcCompositeCurveSegment",IFCCLOSEDSHELL:"IfcClosedShell",IFCCIRCLEPROFILEDEF:"IfcCircleProfileDef",IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM:"IfcCartesianTransformationOperator3DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR3D:"IfcCartesianTransformationOperator3D",IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM:"IfcCartesianTransformationOperator2DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR2D:"IfcCartesianTransformationOperator2D",IFCCARTESIANTRANSFORMATIONOPERATOR:"IfcCartesianTransformationOperator",IFCCARTESIANPOINT:"IfcCartesianPoint",IFCCSHAPEPROFILEDEF:"IfcCShapeProfileDef",IFCBOXEDHALFSPACE:"IfcBoxedHalfSpace",IFCBOUNDINGBOX:"IfcBoundingBox",IFCBOUNDEDSURFACE:"IfcBoundedSurface",IFCBOOLEANRESULT:"IfcBooleanResult",IFCAXIS2PLACEMENT3D:"IfcAxis2Placement3D",IFCAXIS2PLACEMENT2D:"IfcAxis2Placement2D",IFCAXIS1PLACEMENT:"IfcAxis1Placement",IFCANNOTATIONSURFACE:"IfcAnnotationSurface",IFCANNOTATIONFILLAREAOCCURRENCE:"IfcAnnotationFillAreaOccurrence",IFCANNOTATIONFILLAREA:"IfcAnnotationFillArea",IFCANNOTATIONCURVEOCCURRENCE:"IfcAnnotationCurveOccurrence",IFCZSHAPEPROFILEDEF:"IfcZShapeProfileDef",IFCWINDOWSTYLE:"IfcWindowStyle",IFCWINDOWPANELPROPERTIES:"IfcWindowPanelProperties",IFCWINDOWLININGPROPERTIES:"IfcWindowLiningProperties",IFCVERTEXLOOP:"IfcVertexLoop",IFCVECTOR:"IfcVector",IFCUSHAPEPROFILEDEF:"IfcUShapeProfileDef",IFCTYPEPRODUCT:"IfcTypeProduct",IFCTYPEOBJECT:"IfcTypeObject",IFCTWODIRECTIONREPEATFACTOR:"IfcTwoDirectionRepeatFactor",IFCTRAPEZIUMPROFILEDEF:"IfcTrapeziumProfileDef",IFCTEXTLITERALWITHEXTENT:"IfcTextLiteralWithExtent",IFCTEXTLITERAL:"IfcTextLiteral",IFCTERMINATORSYMBOL:"IfcTerminatorSymbol",IFCTSHAPEPROFILEDEF:"IfcTShapeProfileDef",IFCSWEPTSURFACE:"IfcSweptSurface",IFCSWEPTDISKSOLID:"IfcSweptDiskSolid",IFCSWEPTAREASOLID:"IfcSweptAreaSolid",IFCSURFACESTYLERENDERING:"IfcSurfaceStyleRendering",IFCSURFACE:"IfcSurface",IFCSUBEDGE:"IfcSubedge",IFCSTRUCTURALSTEELPROFILEPROPERTIES:"IfcStructuralSteelProfileProperties",IFCSTRUCTURALPROFILEPROPERTIES:"IfcStructuralProfileProperties",IFCSTRUCTURALLOADSINGLEFORCEWARPING:"IfcStructuralLoadSingleForceWarping",IFCSTRUCTURALLOADSINGLEFORCE:"IfcStructuralLoadSingleForce",IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION:"IfcStructuralLoadSingleDisplacementDistortion",IFCSTRUCTURALLOADSINGLEDISPLACEMENT:"IfcStructuralLoadSingleDisplacement",IFCSTRUCTURALLOADPLANARFORCE:"IfcStructuralLoadPlanarForce",IFCSTRUCTURALLOADLINEARFORCE:"IfcStructuralLoadLinearForce",IFCSPACETHERMALLOADPROPERTIES:"IfcSpaceThermalLoadProperties",IFCSOUNDVALUE:"IfcSoundValue",IFCSOUNDPROPERTIES:"IfcSoundProperties",IFCSOLIDMODEL:"IfcSolidModel",IFCSLIPPAGECONNECTIONCONDITION:"IfcSlippageConnectionCondition",IFCSHELLBASEDSURFACEMODEL:"IfcShellBasedSurfaceModel",IFCSERVICELIFEFACTOR:"IfcServiceLifeFactor",IFCSECTIONEDSPINE:"IfcSectionedSpine",IFCROUNDEDRECTANGLEPROFILEDEF:"IfcRoundedRectangleProfileDef",IFCRELATIONSHIP:"IfcRelationship",IFCREINFORCEMENTDEFINITIONPROPERTIES:"IfcReinforcementDefinitionProperties",IFCREGULARTIMESERIES:"IfcRegularTimeSeries",IFCRECTANGLEPROFILEDEF:"IfcRectangleProfileDef",IFCPROPERTYTABLEVALUE:"IfcPropertyTableValue",IFCPROPERTYSINGLEVALUE:"IfcPropertySingleValue",IFCPROPERTYSETDEFINITION:"IfcPropertySetDefinition",IFCPROPERTYREFERENCEVALUE:"IfcPropertyReferenceValue",IFCPROPERTYLISTVALUE:"IfcPropertyListValue",IFCPROPERTYENUMERATEDVALUE:"IfcPropertyEnumeratedValue",IFCPROPERTYDEFINITION:"IfcPropertyDefinition",IFCPROPERTYBOUNDEDVALUE:"IfcPropertyBoundedValue",IFCPRODUCTDEFINITIONSHAPE:"IfcProductDefinitionShape",IFCPREDEFINEDPOINTMARKERSYMBOL:"IfcPredefinedPointMarkerSymbol",IFCPREDEFINEDDIMENSIONSYMBOL:"IfcPredefinedDimensionSymbol",IFCPREDEFINEDCURVEFONT:"IfcPredefinedCurveFont",IFCPREDEFINEDCOLOUR:"IfcPredefinedColour",IFCPOLYGONALBOUNDEDHALFSPACE:"IfcPolygonalBoundedHalfSpace",IFCPOLYLOOP:"IfcPolyLoop",IFCPOINTONSURFACE:"IfcPointOnSurface",IFCPOINTONCURVE:"IfcPointOnCurve",IFCPOINT:"IfcPoint",IFCPLANAREXTENT:"IfcPlanarExtent",IFCPLACEMENT:"IfcPlacement",IFCPIXELTEXTURE:"IfcPixelTexture",IFCPHYSICALCOMPLEXQUANTITY:"IfcPhysicalComplexQuantity",IFCPATH:"IfcPath",IFCPARAMETERIZEDPROFILEDEF:"IfcParameterizedProfileDef",IFCORIENTEDEDGE:"IfcOrientedEdge",IFCOPENSHELL:"IfcOpenShell",IFCONEDIRECTIONREPEATFACTOR:"IfcOneDirectionRepeatFactor",IFCOBJECTDEFINITION:"IfcObjectDefinition",IFCMECHANICALCONCRETEMATERIALPROPERTIES:"IfcMechanicalConcreteMaterialProperties",IFCMATERIALDEFINITIONREPRESENTATION:"IfcMaterialDefinitionRepresentation",IFCMAPPEDITEM:"IfcMappedItem",IFCLOOP:"IfcLoop",IFCLOCALPLACEMENT:"IfcLocalPlacement",IFCLIGHTSOURCESPOT:"IfcLightSourceSpot",IFCLIGHTSOURCEPOSITIONAL:"IfcLightSourcePositional",IFCLIGHTSOURCEGONIOMETRIC:"IfcLightSourceGoniometric",IFCLIGHTSOURCEDIRECTIONAL:"IfcLightSourceDirectional",IFCLIGHTSOURCEAMBIENT:"IfcLightSourceAmbient",IFCLIGHTSOURCE:"IfcLightSource",IFCIRREGULARTIMESERIES:"IfcIrregularTimeSeries",IFCIMAGETEXTURE:"IfcImageTexture",IFCHYGROSCOPICMATERIALPROPERTIES:"IfcHygroscopicMaterialProperties",IFCHALFSPACESOLID:"IfcHalfSpaceSolid",IFCGRIDPLACEMENT:"IfcGridPlacement",IFCGEOMETRICSET:"IfcGeometricSet",IFCGEOMETRICREPRESENTATIONSUBCONTEXT:"IfcGeometricRepresentationSubContext",IFCGEOMETRICREPRESENTATIONITEM:"IfcGeometricRepresentationItem",IFCGEOMETRICREPRESENTATIONCONTEXT:"IfcGeometricRepresentationContext",IFCGENERALPROFILEPROPERTIES:"IfcGeneralProfileProperties",IFCGENERALMATERIALPROPERTIES:"IfcGeneralMaterialProperties",IFCFUELPROPERTIES:"IfcFuelProperties",IFCFILLAREASTYLE:"IfcFillAreaStyle",IFCFAILURECONNECTIONCONDITION:"IfcFailureConnectionCondition",IFCFACESURFACE:"IfcFaceSurface",IFCFACEOUTERBOUND:"IfcFaceOuterBound",IFCFACEBOUND:"IfcFaceBound",IFCFACE:"IfcFace",IFCEXTENDEDMATERIALPROPERTIES:"IfcExtendedMaterialProperties",IFCEDGECURVE:"IfcEdgeCurve",IFCEDGE:"IfcEdge",IFCDRAUGHTINGPREDEFINEDTEXTFONT:"IfcDraughtingPredefinedTextFont",IFCDOCUMENTREFERENCE:"IfcDocumentReference",IFCDIMENSIONPAIR:"IfcDimensionPair",IFCDIMENSIONCALLOUTRELATIONSHIP:"IfcDimensionCalloutRelationship",IFCDERIVEDPROFILEDEF:"IfcDerivedProfileDef",IFCCURVESTYLE:"IfcCurveStyle",IFCCONVERSIONBASEDUNIT:"IfcConversionBasedUnit",IFCCONTEXTDEPENDENTUNIT:"IfcContextDependentUnit",IFCCONNECTIONPOINTECCENTRICITY:"IfcConnectionPointEccentricity",IFCCONNECTIONCURVEGEOMETRY:"IfcConnectionCurveGeometry",IFCCONNECTEDFACESET:"IfcConnectedFaceSet",IFCCOMPOSITEPROFILEDEF:"IfcCompositeProfileDef",IFCCOMPLEXPROPERTY:"IfcComplexProperty",IFCCOLOURRGB:"IfcColourRgb",IFCCLASSIFICATIONREFERENCE:"IfcClassificationReference",IFCCENTERLINEPROFILEDEF:"IfcCenterLineProfileDef",IFCBLOBTEXTURE:"IfcBlobTexture",IFCARBITRARYPROFILEDEFWITHVOIDS:"IfcArbitraryProfileDefWithVoids",IFCARBITRARYOPENPROFILEDEF:"IfcArbitraryOpenProfileDef",IFCARBITRARYCLOSEDPROFILEDEF:"IfcArbitraryClosedProfileDef",IFCANNOTATIONTEXTOCCURRENCE:"IfcAnnotationTextOccurrence",IFCANNOTATIONSYMBOLOCCURRENCE:"IfcAnnotationSymbolOccurrence",IFCANNOTATIONSURFACEOCCURRENCE:"IfcAnnotationSurfaceOccurrence",IFCANNOTATIONOCCURRENCE:"IfcAnnotationOccurrence",IFCWATERPROPERTIES:"IfcWaterProperties",IFCVIRTUALGRIDINTERSECTION:"IfcVirtualGridIntersection",IFCVERTEXPOINT:"IfcVertexPoint",IFCVERTEXBASEDTEXTUREMAP:"IfcVertexBasedTextureMap",IFCVERTEX:"IfcVertex",IFCUNITASSIGNMENT:"IfcUnitAssignment",IFCTOPOLOGYREPRESENTATION:"IfcTopologyRepresentation",IFCTOPOLOGICALREPRESENTATIONITEM:"IfcTopologicalRepresentationItem",IFCTIMESERIESVALUE:"IfcTimeSeriesValue",IFCTIMESERIESREFERENCERELATIONSHIP:"IfcTimeSeriesReferenceRelationship",IFCTIMESERIES:"IfcTimeSeries",IFCTHERMALMATERIALPROPERTIES:"IfcThermalMaterialProperties",IFCTEXTUREVERTEX:"IfcTextureVertex",IFCTEXTUREMAP:"IfcTextureMap",IFCTEXTURECOORDINATEGENERATOR:"IfcTextureCoordinateGenerator",IFCTEXTURECOORDINATE:"IfcTextureCoordinate",IFCTEXTSTYLEWITHBOXCHARACTERISTICS:"IfcTextStyleWithBoxCharacteristics",IFCTEXTSTYLETEXTMODEL:"IfcTextStyleTextModel",IFCTEXTSTYLEFORDEFINEDFONT:"IfcTextStyleForDefinedFont",IFCTEXTSTYLEFONTMODEL:"IfcTextStyleFontModel",IFCTEXTSTYLE:"IfcTextStyle",IFCTELECOMADDRESS:"IfcTelecomAddress",IFCTABLEROW:"IfcTableRow",IFCTABLE:"IfcTable",IFCSYMBOLSTYLE:"IfcSymbolStyle",IFCSURFACETEXTURE:"IfcSurfaceTexture",IFCSURFACESTYLEWITHTEXTURES:"IfcSurfaceStyleWithTextures",IFCSURFACESTYLESHADING:"IfcSurfaceStyleShading",IFCSURFACESTYLEREFRACTION:"IfcSurfaceStyleRefraction",IFCSURFACESTYLELIGHTING:"IfcSurfaceStyleLighting",IFCSURFACESTYLE:"IfcSurfaceStyle",IFCSTYLEDREPRESENTATION:"IfcStyledRepresentation",IFCSTYLEDITEM:"IfcStyledItem",IFCSTYLEMODEL:"IfcStyleModel",IFCSTRUCTURALLOADTEMPERATURE:"IfcStructuralLoadTemperature",IFCSTRUCTURALLOADSTATIC:"IfcStructuralLoadStatic",IFCSTRUCTURALLOAD:"IfcStructuralLoad",IFCSTRUCTURALCONNECTIONCONDITION:"IfcStructuralConnectionCondition",IFCSIMPLEPROPERTY:"IfcSimpleProperty",IFCSHAPEREPRESENTATION:"IfcShapeRepresentation",IFCSHAPEMODEL:"IfcShapeModel",IFCSHAPEASPECT:"IfcShapeAspect",IFCSECTIONREINFORCEMENTPROPERTIES:"IfcSectionReinforcementProperties",IFCSECTIONPROPERTIES:"IfcSectionProperties",IFCSIUNIT:"IfcSIUnit",IFCROOT:"IfcRoot",IFCRIBPLATEPROFILEPROPERTIES:"IfcRibPlateProfileProperties",IFCREPRESENTATIONMAP:"IfcRepresentationMap",IFCREPRESENTATIONITEM:"IfcRepresentationItem",IFCREPRESENTATIONCONTEXT:"IfcRepresentationContext",IFCREPRESENTATION:"IfcRepresentation",IFCRELAXATION:"IfcRelaxation",IFCREINFORCEMENTBARPROPERTIES:"IfcReinforcementBarProperties",IFCREFERENCESVALUEDOCUMENT:"IfcReferencesValueDocument",IFCQUANTITYWEIGHT:"IfcQuantityWeight",IFCQUANTITYVOLUME:"IfcQuantityVolume",IFCQUANTITYTIME:"IfcQuantityTime",IFCQUANTITYLENGTH:"IfcQuantityLength",IFCQUANTITYCOUNT:"IfcQuantityCount",IFCQUANTITYAREA:"IfcQuantityArea",IFCPROPERTYENUMERATION:"IfcPropertyEnumeration",IFCPROPERTYDEPENDENCYRELATIONSHIP:"IfcPropertyDependencyRelationship",IFCPROPERTYCONSTRAINTRELATIONSHIP:"IfcPropertyConstraintRelationship",IFCPROPERTY:"IfcProperty",IFCPROFILEPROPERTIES:"IfcProfileProperties",IFCPROFILEDEF:"IfcProfileDef",IFCPRODUCTSOFCOMBUSTIONPROPERTIES:"IfcProductsOfCombustionProperties",IFCPRODUCTREPRESENTATION:"IfcProductRepresentation",IFCPRESENTATIONSTYLEASSIGNMENT:"IfcPresentationStyleAssignment",IFCPRESENTATIONSTYLE:"IfcPresentationStyle",IFCPRESENTATIONLAYERWITHSTYLE:"IfcPresentationLayerWithStyle",IFCPRESENTATIONLAYERASSIGNMENT:"IfcPresentationLayerAssignment",IFCPREDEFINEDTEXTFONT:"IfcPredefinedTextFont",IFCPREDEFINEDTERMINATORSYMBOL:"IfcPredefinedTerminatorSymbol",IFCPREDEFINEDSYMBOL:"IfcPredefinedSymbol",IFCPREDEFINEDITEM:"IfcPredefinedItem",IFCPOSTALADDRESS:"IfcPostalAddress",IFCPHYSICALSIMPLEQUANTITY:"IfcPhysicalSimpleQuantity",IFCPHYSICALQUANTITY:"IfcPhysicalQuantity",IFCPERSONANDORGANIZATION:"IfcPersonAndOrganization",IFCPERSON:"IfcPerson",IFCOWNERHISTORY:"IfcOwnerHistory",IFCORGANIZATIONRELATIONSHIP:"IfcOrganizationRelationship",IFCORGANIZATION:"IfcOrganization",IFCOPTICALMATERIALPROPERTIES:"IfcOpticalMaterialProperties",IFCOBJECTIVE:"IfcObjective",IFCOBJECTPLACEMENT:"IfcObjectPlacement",IFCNAMEDUNIT:"IfcNamedUnit",IFCMONETARYUNIT:"IfcMonetaryUnit",IFCMETRIC:"IfcMetric",IFCMECHANICALSTEELMATERIALPROPERTIES:"IfcMechanicalSteelMaterialProperties",IFCMECHANICALMATERIALPROPERTIES:"IfcMechanicalMaterialProperties",IFCMEASUREWITHUNIT:"IfcMeasureWithUnit",IFCMATERIALPROPERTIES:"IfcMaterialProperties",IFCMATERIALLIST:"IfcMaterialList",IFCMATERIALLAYERSETUSAGE:"IfcMaterialLayerSetUsage",IFCMATERIALLAYERSET:"IfcMaterialLayerSet",IFCMATERIALLAYER:"IfcMaterialLayer",IFCMATERIALCLASSIFICATIONRELATIONSHIP:"IfcMaterialClassificationRelationship",IFCMATERIAL:"IfcMaterial",IFCLOCALTIME:"IfcLocalTime",IFCLIGHTINTENSITYDISTRIBUTION:"IfcLightIntensityDistribution",IFCLIGHTDISTRIBUTIONDATA:"IfcLightDistributionData",IFCLIBRARYREFERENCE:"IfcLibraryReference",IFCLIBRARYINFORMATION:"IfcLibraryInformation",IFCIRREGULARTIMESERIESVALUE:"IfcIrregularTimeSeriesValue",IFCGRIDAXIS:"IfcGridAxis",IFCEXTERNALLYDEFINEDTEXTFONT:"IfcExternallyDefinedTextFont",IFCEXTERNALLYDEFINEDSYMBOL:"IfcExternallyDefinedSymbol",IFCEXTERNALLYDEFINEDSURFACESTYLE:"IfcExternallyDefinedSurfaceStyle",IFCEXTERNALLYDEFINEDHATCHSTYLE:"IfcExternallyDefinedHatchStyle",IFCEXTERNALREFERENCE:"IfcExternalReference",IFCENVIRONMENTALIMPACTVALUE:"IfcEnvironmentalImpactValue",IFCDRAUGHTINGCALLOUTRELATIONSHIP:"IfcDraughtingCalloutRelationship",IFCDOCUMENTINFORMATIONRELATIONSHIP:"IfcDocumentInformationRelationship",IFCDOCUMENTINFORMATION:"IfcDocumentInformation",IFCDOCUMENTELECTRONICFORMAT:"IfcDocumentElectronicFormat",IFCDIMENSIONALEXPONENTS:"IfcDimensionalExponents",IFCDERIVEDUNITELEMENT:"IfcDerivedUnitElement",IFCDERIVEDUNIT:"IfcDerivedUnit",IFCDATEANDTIME:"IfcDateAndTime",IFCCURVESTYLEFONTPATTERN:"IfcCurveStyleFontPattern",IFCCURVESTYLEFONTANDSCALING:"IfcCurveStyleFontAndScaling",IFCCURVESTYLEFONT:"IfcCurveStyleFont",IFCCURRENCYRELATIONSHIP:"IfcCurrencyRelationship",IFCCOSTVALUE:"IfcCostValue",IFCCOORDINATEDUNIVERSALTIMEOFFSET:"IfcCoordinatedUniversalTimeOffset",IFCCONSTRAINTRELATIONSHIP:"IfcConstraintRelationship",IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP:"IfcConstraintClassificationRelationship",IFCCONSTRAINTAGGREGATIONRELATIONSHIP:"IfcConstraintAggregationRelationship",IFCCONSTRAINT:"IfcConstraint",IFCCONNECTIONSURFACEGEOMETRY:"IfcConnectionSurfaceGeometry",IFCCONNECTIONPORTGEOMETRY:"IfcConnectionPortGeometry",IFCCONNECTIONPOINTGEOMETRY:"IfcConnectionPointGeometry",IFCCONNECTIONGEOMETRY:"IfcConnectionGeometry",IFCCOLOURSPECIFICATION:"IfcColourSpecification",IFCCLASSIFICATIONNOTATIONFACET:"IfcClassificationNotationFacet",IFCCLASSIFICATIONNOTATION:"IfcClassificationNotation",IFCCLASSIFICATIONITEMRELATIONSHIP:"IfcClassificationItemRelationship",IFCCLASSIFICATIONITEM:"IfcClassificationItem",IFCCLASSIFICATION:"IfcClassification",IFCCALENDARDATE:"IfcCalendarDate",IFCBOUNDARYNODECONDITIONWARPING:"IfcBoundaryNodeConditionWarping",IFCBOUNDARYNODECONDITION:"IfcBoundaryNodeCondition",IFCBOUNDARYFACECONDITION:"IfcBoundaryFaceCondition",IFCBOUNDARYEDGECONDITION:"IfcBoundaryEdgeCondition",IFCBOUNDARYCONDITION:"IfcBoundaryCondition",IFCAPPROVALRELATIONSHIP:"IfcApprovalRelationship",IFCAPPROVALPROPERTYRELATIONSHIP:"IfcApprovalPropertyRelationship",IFCAPPROVALACTORRELATIONSHIP:"IfcApprovalActorRelationship",IFCAPPROVAL:"IfcApproval",IFCAPPLIEDVALUERELATIONSHIP:"IfcAppliedValueRelationship",IFCAPPLIEDVALUE:"IfcAppliedValue",IFCAPPLICATION:"IfcApplication",IFCADDRESS:"IfcAddress",IFCACTORROLE:"IfcActorRole"};class vu{constructor(){T(this,"factor",1),T(this,"complement",1)}apply(e){const t=this.getScaleMatrix().multiply(e);e.copy(t)}setUp(e){var t,i,s;this.factor=1;const n=this.getLengthUnits(e);if(!n)return;const r=n==null,o=n.Name===void 0||n.Name===null;r||o||(n.Name.value==="FOOT"&&(this.factor=.3048),((t=n.Prefix)==null?void 0:t.value)==="MILLI"?this.complement=.001:((i=n.Prefix)==null?void 0:i.value)==="CENTI"?this.complement=.01:((s=n.Prefix)==null?void 0:s.value)==="DECI"&&(this.complement=.01))}getLengthUnits(e){try{const t=e.GetLineIDsWithType(0,Hc).get(0),i=e.GetLine(0,t);for(const s of i.Units){if(!s||s.value===null||s.value===void 0)continue;const n=e.GetLine(0,s.value);if(n.UnitType&&n.UnitType.value==="LENGTHUNIT")return n}return null}catch{return console.log("Could not get units"),null}}getScaleMatrix(){const e=this.factor;return new ne().fromArray([e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1])}}class ll{constructor(){T(this,"itemsByFloor",{}),T(this,"_units",new vu)}setUp(e){this._units.setUp(e),this.cleanUp();try{const t=e.GetLineIDsWithType(0,Dn),i=new Set,s=e.GetLineIDsWithType(0,Ti);for(let l=0;l0&&!r.has(n)||this.settings.excludedCategories.has(n))continue;const o=this.webIfc.GetLineIDsWithType(0,n),a=o.size();for(let l=0;l{this.getMesh(n,t)});for(const n of this._visitedFragments){const{index:r,fragment:o}=n[1];t.keyFragments.set(r,o.id)}for(const n of t.items){const r=this._fragmentInstances.get(n.id);if(!r)throw new Error("Fragment not found!");const o=[];for(const[a,l]of r)o.push(l);n.add(o)}const s=this.webIfc.GetCoordinationMatrix(0);return t.coordinationMatrix.fromArray(s),t.civilData=this._civil.read(this.webIfc),t}getMesh(e,t){const i=e.geometries.size(),s=e.expressID;for(let n=0;nr.value!==i),await e.setProperties(i,null),this.registerChange(e,t,i))}addElementToPset(e,t,...i){this.components.get(it).addEntitiesRelation(e,t,{type:ys,inv:"DefinesOcurrence"},...i)}async addPropToPset(e,t,...i){const s=await e.getProperties(t);if(s){for(const n of i){if(s.HasProperties.includes(n))continue;const r=new Zt(n);s.HasProperties.push(r),this.onPropToPset.trigger({model:e,psetID:t,propID:n})}this.registerChange(e,t)}}async createIfcRel(e,t,i,s){const n=yu[t];if(!n)throw new Error(`IfcPropertiesManager: ${n} is unsoported.`);const r=ci.getIFCSchema(e),o=Au[n],a=Ft[r][n];if(!(o&&a))throw new Error(`IfcPropertiesManager: ${n} is unsoported.`);const l=[new Ft[r].IfcGloballyUniqueId(Gt.create())],{related:h,relating:d}=o,u=[...new Set(s)].map(p=>new Zt(p)),f=(p,I)=>{for(let E=p;EparseInt(r,10)),s=t[i[0]],n=new Zt(s.expressID);return{entity:s,handle:n}}registerChange(e,...t){this.changeMap[e.uuid]||(this.changeMap[e.uuid]=new Set);for(const i of t)this.changeMap[e.uuid].add(i),this.onDataChanged.trigger({model:e,expressID:i})}async newSingleProperty(e,t,i,s){const n=ci.getIFCSchema(e),r=new Ft[n].IfcIdentifier(i),o=new Ft[n][t](s),a=new Ft[n].IfcPropertySingleValue(r,null,o,null);return a.expressID=this.getNewExpressID(e),await this.setData(e,a),a}};T(Il,"uuid","58c2d9f0-183c-48d6-a402-dfcf5b9a34df");let Ou=Il;const El=class Or extends de{constructor(e){super(e),T(this,"onDisposed",new Y),T(this,"onRelationsIndexed",new Y),T(this,"relationMaps",{}),T(this,"enabled",!0),T(this,"_relToAttributesMap",ca),T(this,"_inverseAttributes",["IsDecomposedBy","Decomposes","AssociatedTo","HasAssociations","ClassificationForObjects","IsGroupedBy","HasAssignments","IsDefinedBy","DefinesOcurrence","IsTypedBy","Types","Defines","ContainedInStructure","ContainsElements","HasControlElements","AssignedToFlowElement","ConnectedTo","ConnectedFrom","ReferencedBy","Declares","HasContext","Controls","IsNestedBy","Nests","DocumentRefForObjects"]),T(this,"_ifcRels",[xn,Qr,Kr,qr,ys,Jr,$r,Dn,eo,to,io,so,no,ro,oo]),T(this,"onFragmentsDisposed",t=>{delete this.relationMaps[t.groupID]}),T(this,"_changeMap",{}),T(this,"onEntitiesRelated",new Y),this.components.add(Or.uuid,this),e.get(ue).onFragmentsDisposed.add(this.onFragmentsDisposed)}indexRelations(e,t,i,s){const n=Object.keys(t).find(h=>h.startsWith("Relating")),r=Object.keys(t).find(h=>h.startsWith("Related"));if(!(n&&r))return;const o=t[n].value,a=t[r].map(h=>h.value),l=this.getEntityRelations(e,o,s);for(const h of a)l.push(h);for(const h of a)this.getEntityRelations(e,h,i).push(o)}getAttributeIndex(e){const t=this._inverseAttributes.indexOf(e);if(t===-1)throw new Error(`IfcRelationsIndexer: ${e} is not a valid IFC Inverse Attribute name or its not supported yet by this component.`);return t}setRelationMap(e,t){this.relationMaps[e.uuid]=t,this.onRelationsIndexed.trigger({modelID:e.uuid,relationsMap:t})}async process(e,t){if(!e.hasProperties)throw new Error("FragmentsGroup properties not found");let i=this.relationMaps[e.uuid];i||(i=new Map,this.relationMaps[e.uuid]=i);const s=e.getLocalProperties();if(!s)return i;const n=(t==null?void 0:t.relationsToProcess)??this._ifcRels;for(const[r,o]of Object.entries(s)){if(!n.includes(o.type))continue;const a=this._relToAttributesMap.get(o.type);if(!a)continue;const{forRelated:l,forRelating:h}=a;this.indexRelations(i,o,l,h)}return this.setRelationMap(e,i),i}async processFromWebIfc(e,t){const i=new Map;for(const s of this._ifcRels){const n=this._relToAttributesMap.get(s);if(!n)continue;const{forRelated:r,forRelating:o}=n,a=e.GetLineIDsWithType(t,s);for(let l=0;lI.startsWith("Related")),p=f.find(I=>I.startsWith("Relating"));if(!(m&&p))continue;u[m]=[...h].map(I=>new Zt(I)),u[p]=new Zt(a),await t.setData(s,u)}else{const u=await t.createIfcRel(s,r,a,[...h]);if(!u)continue;l.relID=u.expressID}}}}addEntitiesRelation(e,t,i,...s){const{type:n,inv:r}=i;let o=this.relationMaps[e.uuid];if(o||(o=new Map,this.relationMaps[e.uuid]=o),!this._ifcRels.includes(n))return;const a=ca.get(n);if(!a)return;const{forRelated:l,forRelating:h}=a;if(!(l===r||h===r))return;let d=this._changeMap[e.uuid];d||(d=new gt,this._changeMap[e.uuid]=d);const u=h===r?[t]:s,f=l===r?[t]:s;let m=d.get(n);m||(m=new gt,m.onItemSet.add(()=>this.onEntitiesRelated.trigger({invAttribute:r,relType:n,relatingIDs:u,relatedIDs:f})),m.onItemUpdated.add(()=>this.onEntitiesRelated.trigger({invAttribute:r,relType:n,relatingIDs:u,relatedIDs:f})),d.set(n,m));for(const p of u){let I=m.get(p);I||(I={related:new Jt},m.set(p,I)),I.related.add(...f)}for(const p of u)this.getEntityRelations(e,p,h).push(...f);for(const p of f)this.getEntityRelations(e,p,l).push(...u)}getEntityChildren(e,t,i=new Set){if(i.add(t),this.relationMaps[e.uuid]===void 0)throw new Error("The provided model has no indices. You have to generate them first.");const s=this.getEntityRelations(e,t,"IsDecomposedBy");if(s)for(const r of s)this.getEntityChildren(e,r,i);const n=this.getEntityRelations(e,t,"ContainsElements");if(n)for(const r of n)this.getEntityChildren(e,r,i);return i}};T(El,"uuid","23a889ab-83b3-44a4-8bee-ead83438370b");let it=El;const gl=class Cl extends de{constructor(e){super(e),T(this,"onDisposed",new Y),T(this,"onFragmentsLoaded",new Y),T(this,"onFragmentsDisposed",new Y),T(this,"list",new gt),T(this,"groups",new gt),T(this,"baseCoordinationModel",""),T(this,"baseCoordinationMatrix",new ne),T(this,"enabled",!0),T(this,"_loader",new xa),this.components.add(Cl.uuid,this)}get meshes(){const e=[];for(const[t,i]of this.list)e.push(i.mesh);return e}dispose(){for(const[e,t]of this.groups)t.dispose(!0);this.baseCoordinationModel="",this.groups.clear(),this.list.clear(),this.onFragmentsLoaded.reset(),this.onFragmentsDisposed.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}disposeGroup(e){const{uuid:t}=e,i=[];for(const s of e.items)i.push(s.id),this.list.delete(s.id);e.dispose(!0),this.groups.delete(e.uuid),this.groups.size===0&&(this.baseCoordinationModel="",this.baseCoordinationMatrix=new ne),this.onFragmentsDisposed.trigger({groupID:t,fragmentIDs:i})}load(e,t){const i={coordinate:!0,...t},{coordinate:s,name:n,properties:r,relationsMap:o}=i,a=this._loader.import(e);t&&(a.isStreamed=t.isStreamed||!1),n&&(a.name=n);for(const l of a.items)l.group=a,this.list.set(l.id,l);return s&&this.coordinate([a]),this.groups.set(a.uuid,a),r&&a.setLocalProperties(r),o&&this.components.get(it).setRelationMap(a,o),this.onFragmentsLoaded.trigger(a),a}export(e){return this._loader.export(e)}getModelIdMap(e){const t={};for(const i in e){const s=this.list.get(i);if(!(s&&s.group))continue;const n=s.group;n.uuid in t||(t[n.uuid]=new Set);const r=e[i];for(const o of r)t[n.uuid].add(o)}return t}modelIdToFragmentIdMap(e){let t={};for(const i in e){const s=this.groups.get(i);if(!s)continue;const n=e[i],r=s.getFragmentMap(n);t={...t,...r}}return t}guidToFragmentIdMap(e){const t={};for(const[i,s]of this.groups){i in t||(t[i]=new Set);for(const n of e){const r=s.globalToExpressIDs.get(n);r&&t[i].add(r)}}return this.modelIdToFragmentIdMap(t)}fragmentIdMapToGuids(e){const t=[],i=this.getModelIdMap(e);for(const s in i){const n=this.groups.get(s);if(!n)continue;const r=i[s];for(const o of r)for(const[a,l]of n.globalToExpressIDs.entries())if(l===o){t.push(a);break}}return t}coordinate(e=Array.from(this.groups.values())){if(this.baseCoordinationModel.length===0){const t=e.pop();if(!t)return;this.baseCoordinationModel=t.uuid,this.baseCoordinationMatrix=t.coordinationMatrix.clone()}if(e.length)for(const t of e)t.coordinationMatrix.equals(this.baseCoordinationMatrix)||(t.position.set(0,0,0),t.rotation.set(0,0,0),t.scale.set(1,1,1),t.updateMatrix(),this.applyBaseCoordinateSystem(t,t.coordinationMatrix))}applyBaseCoordinateSystem(e,t){t&&e.applyMatrix4(t.clone().invert()),e.applyMatrix4(this.baseCoordinationMatrix)}clone(e,t){const i=e.cloneGroup(t);this.groups.set(i.uuid,i);for(const s of i.items)this.list.set(s.id,s);return i}};T(gl,"uuid","fef46874-46a3-461b-8c44-2922ab77c806");let ue=gl;var sn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nu(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}function nn(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Tl={exports:{}};/*! + `,extensions:{derivatives:!0}});this.three=new ee(o,a),this.three.frustumCulled=!1,t.scene.three.add(this.three),this.setupEvents(!0)}get visible(){return this.three.visible}set visible(e){e?this.world.scene.three.add(this.three):this.three.removeFromParent()}get material(){return this.three.material}get fade(){return this._fade===3}set fade(e){this._fade=e?3:0,this.material.uniforms.uFade.value=this._fade}setup(e){const t={...this._defaultConfig,...e};this.config.visible=!0,this.config.color=t.color,this.config.primarySize=t.primarySize,this.config.secondarySize=t.secondarySize,this.config.distance=t.distance,this.isSetup=!0,this.onSetup.trigger()}dispose(){this.setupEvents(!1),this.components.get(Bn).list.delete(this.config.uuid),this.components.get(Nt).destroy(this.three),this.onDisposed.trigger(),this.onDisposed.reset(),this.world=null,this.components=null}setupEvents(e){if(this.world.isDisposing||!(this.world.camera instanceof ws))return;const t=this.world.camera.controls;e?t.addEventListener("update",this.updateZoom):t.removeEventListener("update",this.updateZoom)}}const hu=class al extends de{constructor(e){super(e),T(this,"list",new Map),T(this,"onDisposed",new Y),T(this,"enabled",!0),e.add(al.uuid,this)}create(e){if(this.list.has(e.uuid))throw new Error("This world already has a grid!");const t=new cu(this.components,e);return this.list.set(e.uuid,t),e.onDisposed.add(()=>{this.delete(e)}),t}delete(e){const t=this.list.get(e.uuid);t&&t.dispose(),this.list.delete(e.uuid)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}};T(hu,"uuid","d1e814d5-b81c-4452-87a2-f039375e0489");const oi=new bn,Ge=new x,Xt=new x,Oe=new at,sa={X:new x(1,0,0),Y:new x(0,1,0),Z:new x(0,0,1)},dr={type:"change"},na={type:"mouseDown"},ra={type:"mouseUp",mode:null},oa={type:"objectChange"};class du extends Yi{constructor(e,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 i=new Eu;this._gizmo=i,this.add(i);const s=new gu;this._plane=s,this.add(s);const n=this;function r(g,w){let C=w;Object.defineProperty(n,g,{get:function(){return C!==void 0?C:w},set:function(v){C!==v&&(C=v,s[g]=v,i[g]=v,n.dispatchEvent({type:g+"-changed",value:v}),n.dispatchEvent(dr))}}),n[g]=w,s[g]=w,i[g]=w}r("camera",e),r("object",void 0),r("enabled",!0),r("axis",null),r("mode","translate"),r("translationSnap",null),r("rotationSnap",null),r("scaleSnap",null),r("space","world"),r("size",1),r("dragging",!1),r("showX",!0),r("showY",!0),r("showZ",!0);const o=new x,a=new x,l=new at,h=new at,d=new x,u=new at,f=new x,m=new x,p=new x,E=0,I=new x;r("worldPosition",o),r("worldPositionStart",a),r("worldQuaternion",l),r("worldQuaternionStart",h),r("cameraPosition",d),r("cameraQuaternion",u),r("pointStart",f),r("pointEnd",m),r("rotationAxis",p),r("rotationAngle",E),r("eye",I),this._offset=new x,this._startNorm=new x,this._endNorm=new x,this._cameraScale=new x,this._parentPosition=new x,this._parentQuaternion=new at,this._parentQuaternionInv=new at,this._parentScale=new x,this._worldScaleStart=new x,this._worldQuaternionInv=new at,this._worldScale=new x,this._positionStart=new x,this._quaternionStart=new at,this._scaleStart=new x,this._getPointer=uu.bind(this),this._onPointerDown=pu.bind(this),this._onPointerHover=fu.bind(this),this._onPointerMove=mu.bind(this),this._onPointerUp=Iu.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(e){if(this.object===void 0||this.dragging===!0)return;oi.setFromCamera(e,this.camera);const t=ur(this._gizmo.picker[this.mode],oi);t?this.axis=t.object.name:this.axis=null}pointerDown(e){if(!(this.object===void 0||this.dragging===!0||e.button!==0)&&this.axis!==null){oi.setFromCamera(e,this.camera);const t=ur(this._plane,oi,!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,na.mode=this.mode,this.dispatchEvent(na)}}pointerMove(e){const t=this.axis,i=this.mode,s=this.object;let n=this.space;if(i==="scale"?n="local":(t==="E"||t==="XYZE"||t==="XYZ")&&(n="world"),s===void 0||t===null||this.dragging===!1||e.button!==-1)return;oi.setFromCamera(e,this.camera);const r=ur(this._plane,oi,!0);if(r){if(this.pointEnd.copy(r.point).sub(this.worldPositionStart),i==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),n==="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),n==="local"&&t!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),s.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(n==="local"&&(s.position.applyQuaternion(Oe.copy(this._quaternionStart).invert()),t.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this._quaternionStart)),n==="world"&&(s.parent&&s.position.add(Ge.setFromMatrixPosition(s.parent.matrixWorld)),t.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(Ge.setFromMatrixPosition(s.parent.matrixWorld))));else if(i==="scale"){if(t.search("XYZ")!==-1){let o=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(o*=-1),Xt.set(o,o,o)}else Ge.copy(this.pointStart),Xt.copy(this.pointEnd),Ge.applyQuaternion(this._worldQuaternionInv),Xt.applyQuaternion(this._worldQuaternionInv),Xt.divide(Ge),t.search("X")===-1&&(Xt.x=1),t.search("Y")===-1&&(Xt.y=1),t.search("Z")===-1&&(Xt.z=1);s.scale.copy(this._scaleStart).multiply(Xt),this.scaleSnap&&(t.search("X")!==-1&&(s.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Y")!==-1&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Z")!==-1&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(i==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const o=20/this.worldPosition.distanceTo(Ge.setFromMatrixPosition(this.camera.matrixWorld));let a=!1;t==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(Ge.copy(this.rotationAxis).cross(this.eye))*o):(t==="X"||t==="Y"||t==="Z")&&(this.rotationAxis.copy(sa[t]),Ge.copy(sa[t]),n==="local"&&Ge.applyQuaternion(this.worldQuaternion),Ge.cross(this.eye),Ge.length()===0?a=!0:this.rotationAngle=this._offset.dot(Ge.normalize())*o),(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),n==="local"&&t!=="E"&&t!=="XYZE"?(s.quaternion.copy(this._quaternionStart),s.quaternion.multiply(Oe.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),s.quaternion.copy(Oe.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(dr),this.dispatchEvent(oa)}}pointerUp(e){e.button===0&&(this.dragging&&this.axis!==null&&(ra.mode=this.mode,this.dispatchEvent(ra)),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(e){e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()})}attach(e){return this.object=e,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(dr),this.dispatchEvent(oa),this.pointStart.copy(this.pointEnd))}getRaycaster(){return oi}getMode(){return this.mode}setMode(e){this.mode=e}setTranslationSnap(e){this.translationSnap=e}setRotationSnap(e){this.rotationSnap=e}setScaleSnap(e){this.scaleSnap=e}setSize(e){this.size=e}setSpace(e){this.space=e}}function uu(c){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:c.button};{const e=this.domElement.getBoundingClientRect();return{x:(c.clientX-e.left)/e.width*2-1,y:-(c.clientY-e.top)/e.height*2+1,button:c.button}}}function fu(c){if(this.enabled)switch(c.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(c));break}}function pu(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 mu(c){this.enabled&&this.pointerMove(this._getPointer(c))}function Iu(c){this.enabled&&(this.domElement.releasePointerCapture(c.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(c)))}function ur(c,e,t){const i=e.intersectObject(c,!0);for(let s=0;s.9&&(n.visible=!1)),this.axis==="Y"&&(Oe.setFromEuler(en.set(0,0,Math.PI/2)),n.quaternion.copy(t).multiply(Oe),Math.abs(Re.copy(li).applyQuaternion(t).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Z"&&(Oe.setFromEuler(en.set(0,Math.PI/2,0)),n.quaternion.copy(t).multiply(Oe),Math.abs(Re.copy(Cs).applyQuaternion(t).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="XYZE"&&(Oe.setFromEuler(en.set(0,Math.PI/2,0)),Re.copy(this.rotationAxis),n.quaternion.setFromRotationMatrix(la.lookAt(aa,Re,li)),n.quaternion.multiply(Oe),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),Ge.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),Ge.applyQuaternion(this.worldQuaternionStart.clone().invert()),n.scale.copy(Ge),n.visible=this.dragging):(n.quaternion.copy(t),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(t),this.mode==="translate"||this.mode==="scale"?(n.name==="X"&&Math.abs(Re.copy(gs).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Y"&&Math.abs(Re.copy(li).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Z"&&Math.abs(Re.copy(Cs).applyQuaternion(t).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XY"&&Math.abs(Re.copy(Cs).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="YZ"&&Math.abs(Re.copy(gs).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XZ"&&Math.abs(Re.copy(li).applyQuaternion(t).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1)):this.mode==="rotate"&&(tn.copy(t),Re.copy(this.eye).applyQuaternion(Oe.copy(t).invert()),n.name.search("E")!==-1&&n.quaternion.setFromRotationMatrix(la.lookAt(this.eye,aa,li)),n.name==="X"&&(Oe.setFromAxisAngle(gs,Math.atan2(-Re.y,Re.z)),Oe.multiplyQuaternions(tn,Oe),n.quaternion.copy(Oe)),n.name==="Y"&&(Oe.setFromAxisAngle(li,Math.atan2(Re.x,Re.z)),Oe.multiplyQuaternions(tn,Oe),n.quaternion.copy(Oe)),n.name==="Z"&&(Oe.setFromAxisAngle(Cs,Math.atan2(Re.y,Re.x)),Oe.multiplyQuaternions(tn,Oe),n.quaternion.copy(Oe))),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(o){return n.name===o}))&&(n.material.color.setHex(16776960),n.material.opacity=1)}super.updateMatrixWorld(e)}}class gu extends ee{constructor(){super(new xn(1e5,1e5,2,2),new st({visible:!1,wireframe:!0,side:As,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(e){let t=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(t="local"),sn.copy(gs).applyQuaternion(t==="local"?this.worldQuaternion:gn),fs.copy(li).applyQuaternion(t==="local"?this.worldQuaternion:gn),ps.copy(Cs).applyQuaternion(t==="local"?this.worldQuaternion:gn),Re.copy(fs),this.mode){case"translate":case"scale":switch(this.axis){case"X":Re.copy(this.eye).cross(sn),St.copy(sn).cross(Re);break;case"Y":Re.copy(this.eye).cross(fs),St.copy(fs).cross(Re);break;case"Z":Re.copy(this.eye).cross(ps),St.copy(ps).cross(Re);break;case"XY":St.copy(ps);break;case"YZ":St.copy(sn);break;case"XZ":Re.copy(ps),St.copy(fs);break;case"XYZ":case"E":St.set(0,0,0);break}break;case"rotate":default:St.set(0,0,0)}St.length()===0?this.quaternion.copy(this.cameraQuaternion):(ca.lookAt(Ge.set(0,0,0),St,Re),this.quaternion.setFromRotationMatrix(ca)),super.updateMatrixWorld(e)}}class zn{constructor(e,t,i,s,n,r=5,o=!0){if(T(this,"onDraggingStarted",new Y),T(this,"onDraggingEnded",new Y),T(this,"onDisposed",new Y),T(this,"normal"),T(this,"origin"),T(this,"three",new ti),T(this,"components"),T(this,"world"),T(this,"type","default"),T(this,"_helper"),T(this,"_visible",!0),T(this,"_enabled",!0),T(this,"_controlsActive",!1),T(this,"_arrowBoundBox",new ee),T(this,"_planeMesh"),T(this,"_controls"),T(this,"_hiddenMaterial",new st({visible:!1})),T(this,"update",()=>{this._enabled&&this.three.setFromNormalAndCoplanarPoint(this.normal,this._helper.position)}),T(this,"changeDrag",a=>{this._visible=!a.value,this.preventCameraMovement(),this.notifyDraggingChanged(a)}),this.components=e,this.world=t,!t.renderer)throw new Error("The given world must have a renderer!");this.normal=s,this.origin=i,t.renderer.setPlane(!0,this.three),this._planeMesh=zn.newPlaneMesh(r,n),this._helper=this.newHelper(),this._controls=this.newTransformControls(),this.three.setFromNormalAndCoplanarPoint(s,i),o&&this.toggleControls(!0)}get enabled(){return this._enabled}set enabled(e){if(!this.world.isDisposing){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");this._enabled=e,this.world.renderer.setPlane(e,this.three)}}get visible(){return this._visible}set visible(e){this._visible=e,this._controls.visible=e,this._helper.visible=e,this.toggleControls(e)}get meshes(){return[this._planeMesh,this._arrowBoundBox]}get planeMaterial(){return this._planeMesh.material}set planeMaterial(e){this._planeMesh.material=e}get size(){return this._planeMesh.scale.x}set size(e){this._planeMesh.scale.set(e,e,e)}get helper(){return this._helper}setFromNormalAndCoplanarPoint(e,t){this.reset(),this.normal.equals(e)||(this.normal.copy(e),this._helper.lookAt(e)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix(),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 e=new x(1,0,0),t=new x;this.normal.equals(e)||(this.normal.copy(e),this._helper.lookAt(e)),this.origin.copy(t),this._helper.position.copy(t),this._helper.updateMatrix()}toggleControls(e){if(e){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=e}newTransformControls(){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");const e=this.world.camera.three,t=this.world.renderer.three.domElement,i=new du(e,t);return this.initializeControls(i),this.world.scene.three.add(i),i}initializeControls(e){e.attach(this._helper),e.showX=!1,e.showY=!1,e.setSpace("local"),this.createArrowBoundingBox(),e.children[0].children[0].add(this._arrowBoundBox)}createArrowBoundingBox(){this._arrowBoundBox.geometry=new Xe(.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(e){e.value?this.onDraggingStarted.trigger():this.onDraggingEnded.trigger()}preventCameraMovement(){this.world.camera.enabled=this._visible}newHelper(){const e=new Yi;return e.lookAt(this.normal),e.position.copy(this.origin),this._planeMesh.position.z+=.01,e.add(this._planeMesh),this.world.scene.three.add(e),e}static newPlaneMesh(e,t){const i=new xn(1),s=new ee(i,t);return s.scale.set(e,e,e),s}}class Cu extends Qi{constructor(){super(...arguments),T(this,"_config",{enabled:{value:!0,type:"Boolean"},visible:{value:!0,type:"Boolean"},color:{value:new _e,type:"Color"},opacity:{type:"Number",interpolable:!0,value:1,min:0,max:1},size:{type:"Number",interpolable:!0,value:2,min:0,max:100}})}get enabled(){return this._config.enabled.value}set enabled(e){this._config.enabled.value=e,this._component.enabled=e}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e,this._component.visible=e}get color(){return this._config.color.value}set color(e){this._config.color.value=e,this._component.material.color.copy(e)}get opacity(){return this._config.opacity.value}set opacity(e){this._config.opacity.value=e,this._component.material.opacity=e}get size(){return this._config.size.value}set size(e){this._config.size.value=e,this._component.size=e}}const ll=class Cn extends de{constructor(e){super(e),T(this,"onSetup",new Y),T(this,"onBeforeDrag",new Y),T(this,"onAfterDrag",new Y),T(this,"onBeforeCreate",new Y),T(this,"onBeforeCancel",new Y),T(this,"onAfterCancel",new Y),T(this,"onBeforeDelete",new Y),T(this,"onAfterCreate",new Y),T(this,"onAfterDelete",new Y),T(this,"onDisposed",new Y),T(this,"isSetup",!1),T(this,"orthogonalY",!1),T(this,"toleranceOrthogonalY",.7),T(this,"Type",zn),T(this,"list",[]),T(this,"config",new Cu(this,this.components,"Clipper",Cn.uuid)),T(this,"_defaultConfig",{color:new _e(12255487),opacity:.2,size:2}),T(this,"_material",new st({color:12255487,side:As,transparent:!0,opacity:.2})),T(this,"_size",5),T(this,"_enabled",!1),T(this,"_visible",!0),T(this,"_onStartDragging",()=>{this.onBeforeDrag.trigger()}),T(this,"_onEndDragging",()=>{this.onAfterDrag.trigger()}),this.components.add(Cn.uuid,this)}get enabled(){return this._enabled}set enabled(e){this._enabled=e;for(const t of this.list)t.enabled=e;this.updateMaterialsAndPlanes()}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}get material(){return this._material}set material(e){this._material=e;for(const t of this.list)t.planeMaterial=e}get size(){return this._size}set size(e){this._size=e;for(const t of this.list)t.size=e}dispose(){this._enabled=!1,this.components.get(Bn).list.delete(this.config.uuid);for(const e of this.list)e.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(Cn.uuid),this.onDisposed.reset()}create(e){const t=this.components.get(ut).get(e).castRay();return t?this.createPlaneFromIntersection(e,t):null}createFromNormalAndCoplanarPoint(e,t,i){const s=this.newPlane(e,i,t);return this.updateMaterialsAndPlanes(),s}delete(e,t){t||(t=this.pickPlane(e)),t&&this.deletePlane(t)}deleteAll(e){const t=[...this.list];for(const i of t)if(!e||e.has(i.type)){this.delete(i.world,i);const s=this.list.indexOf(i);s!==-1&&this.list.splice(s,1)}}setup(e){const t={...this._defaultConfig,...e};this.config.color=t.color,this.config.opacity=t.opacity,this.config.size=t.size,this.isSetup=!0,this.onSetup.trigger()}deletePlane(e){const t=this.list.indexOf(e);if(t!==-1){if(this.list.splice(t,1),!e.world.renderer)throw new Error("Renderer not found for this plane's world!");e.world.renderer.setPlane(!1,e.three),e.dispose(),this.updateMaterialsAndPlanes(),this.onAfterDelete.trigger(e)}}pickPlane(e){const t=this.components.get(ut).get(e),i=this.getAllPlaneMeshes(),s=t.castRay(i);if(s){const n=s.object;return this.list.find(r=>r.meshes.includes(n))}}getAllPlaneMeshes(){const e=[];for(const t of this.list)e.push(...t.meshes);return e}createPlaneFromIntersection(e,t){var i;if(!e.renderer)throw new Error("The given world must have a renderer!");const s=t.point.distanceTo(new x(0,0,0)),n=(i=t.face)==null?void 0:i.normal;if(!s||!n)return null;const r=this.getWorldNormal(t,n),o=this.newPlane(e,t.point,r.negate());return o.visible=this._visible,o.size=this._size,e.renderer.setPlane(!0,o.three),this.updateMaterialsAndPlanes(),o}getWorldNormal(e,t){const i=e.object;let s=e.object.matrixWorld.clone();if(i instanceof It&&e.instanceId!==void 0){const o=new ne;i.getMatrixAt(e.instanceId,o),s=o.multiply(s)}const n=new di().getNormalMatrix(s),r=t.clone().applyMatrix3(n).normalize();return this.normalizePlaneDirectionY(r),r}normalizePlaneDirectionY(e){this.orthogonalY&&(e.y>this.toleranceOrthogonalY&&(e.x=0,e.y=1,e.z=0),e.y<-this.toleranceOrthogonalY&&(e.x=0,e.y=-1,e.z=0))}newPlane(e,t,i){const s=new this.Type(this.components,e,t,i,this._material);return s.onDraggingStarted.add(this._onStartDragging),s.onDraggingEnded.add(this._onEndDragging),this.list.push(s),this.onAfterCreate.trigger(s),s}updateMaterialsAndPlanes(){const e=this.components.get(il);for(const[t,i]of e.list){if(!i.renderer)continue;i.renderer.updateClippingPlanes();const{clippingPlanes:s}=i.renderer;for(const n of i.meshes)if(n.material)if(Array.isArray(n.material))for(const r of n.material)r.clippingPlanes=s;else n.material.clippingPlanes=s}}};T(ll,"uuid","66290bc5-18c4-4cd1-9379-2e17a0617611");let Xi=ll;class Tu{constructor(e){T(this,"enabled",!1),T(this,"id","FirstPerson"),this.camera=e}set(e){if(this.enabled=e,e){if(this.camera.projection.current!=="Perspective"){this.camera.set("Orbit");return}this.setupFirstPersonCamera()}}setupFirstPersonCamera(){const e=this.camera.controls,t=new x;e.distance--,e.getPosition(t),e.minDistance=1,e.maxDistance=1,e.distance=1,e.moveTo(t.x,t.y,t.z),e.truckSpeed=50,e.mouseButtons.wheel=We.ACTION.DOLLY,e.touches.two=We.ACTION.TOUCH_ZOOM_TRUCK}}class Ru{constructor(e){T(this,"enabled",!0),T(this,"id","Orbit"),this.camera=e,this.activateOrbitControls()}set(e){this.enabled=e,e&&this.activateOrbitControls()}activateOrbitControls(){const e=this.camera.controls;e.minDistance=1,e.maxDistance=300;const t=new x;e.getPosition(t);const i=t.length();e.distance=i,e.truckSpeed=2;const{rotation:s}=this.camera.three,n=new x(0,0,-1).applyEuler(s),r=t.addScaledVector(n,i);e.moveTo(r.x,r.y,r.z)}}class Su{constructor(e){T(this,"enabled",!1),T(this,"id","Plan"),T(this,"mouseAction1"),T(this,"mouseAction2"),T(this,"mouseInitialized",!1),T(this,"defaultAzimuthSpeed"),T(this,"defaultPolarSpeed"),this.camera=e,this.defaultAzimuthSpeed=e.controls.azimuthRotateSpeed,this.defaultPolarSpeed=e.controls.polarRotateSpeed}set(e){this.enabled=e;const t=this.camera.controls;t.azimuthRotateSpeed=e?0:this.defaultAzimuthSpeed,t.polarRotateSpeed=e?0:this.defaultPolarSpeed,this.mouseInitialized||(this.mouseAction1=t.touches.one,this.mouseAction2=t.touches.two,this.mouseInitialized=!0),e?(t.mouseButtons.left=We.ACTION.TRUCK,t.touches.one=We.ACTION.TOUCH_TRUCK,t.touches.two=We.ACTION.TOUCH_ZOOM):(t.mouseButtons.left=We.ACTION.ROTATE,t.touches.one=this.mouseAction1,t.touches.two=this.mouseAction2)}}class wu{constructor(e){T(this,"onChanged",new Y),T(this,"current","Perspective"),T(this,"camera"),T(this,"matchOrthoDistanceEnabled",!1),T(this,"_component"),T(this,"_previousDistance",-1),this._component=e,this.camera=e.three}async set(e){this.current!==e&&(e==="Orthographic"?this.setOrthoCamera():await this.setPerspectiveCamera(),this.onChanged.trigger(this.camera))}async toggle(){const e=this.current==="Perspective"?"Orthographic":"Perspective";await this.set(e)}setOrthoCamera(){if(this._component.mode===null||this._component.mode.id==="FirstPerson")return;this._previousDistance=this._component.controls.distance,this._component.controls.distance=200;const e=this.getPerspectiveDims();if(!e)return;const{width:t,height:i}=e;this.setupOrthoCamera(i,t),this.camera=this._component.threeOrtho,this.current="Orthographic"}getPerspectiveDims(){const e=this._component.currentWorld;if(!e||!e.renderer)return null;const t=new x;this._component.threePersp.getWorldDirection(t);const i=new x;this._component.controls.getTarget(i);const s=i.clone().sub(this._component.threePersp.position).dot(t),n=e.renderer.getSize(),r=n.x/n.y,o=this._component.threePersp,a=s*2*Math.atan(o.fov*(Math.PI/180)/2);return{width:a*r,height:a}}setupOrthoCamera(e,t){this._component.controls.mouseButtons.wheel=We.ACTION.ZOOM,this._component.controls.mouseButtons.middle=We.ACTION.ZOOM;const i=this._component.threePersp,s=this._component.threeOrtho;s.zoom=1,s.left=t/-2,s.right=t/2,s.top=e/2,s.bottom=e/-2,s.updateProjectionMatrix(),s.position.copy(i.position),s.quaternion.copy(i.quaternion),this._component.controls.camera=s}getDistance(){const e=this._component.threePersp,t=this._component.threeOrtho;return(t.top-t.bottom)/t.zoom/(2*Math.atan(e.fov*(Math.PI/180)/2))}async setPerspectiveCamera(){this._component.controls.mouseButtons.wheel=We.ACTION.DOLLY,this._component.controls.mouseButtons.middle=We.ACTION.DOLLY;const e=this._component.threePersp,t=this._component.threeOrtho;e.position.copy(t.position),e.quaternion.copy(t.quaternion),this._component.controls.mouseButtons.wheel=We.ACTION.DOLLY,this.matchOrthoDistanceEnabled?this._component.controls.distance=this.getDistance():this._component.controls.distance=this._previousDistance,await this._component.controls.zoomTo(1),e.updateProjectionMatrix(),this._component.controls.camera=e,this.camera=e,this.current="Perspective"}}class vu extends ws{constructor(e){super(e),T(this,"projection"),T(this,"threeOrtho"),T(this,"threePersp"),T(this,"_userInputButtons",{}),T(this,"_frustumSize",50),T(this,"_navigationModes",new Map),T(this,"_mode",null),T(this,"previousSize",null),this.threePersp=this.three,this.threeOrtho=this.newOrthoCamera(),this.projection=new wu(this),this.onAspectUpdated.add(()=>{this.setOrthoPerspCameraAspect()}),this.projection.onChanged.add(t=>{this.three=t,this.updateAspect()}),this.onWorldChanged.add(({action:t})=>{t==="added"&&(this._navigationModes.clear(),this._navigationModes.set("Orbit",new Ru(this)),this._navigationModes.set("FirstPerson",new Tu(this)),this._navigationModes.set("Plan",new Su(this)),this._mode=this._navigationModes.get("Orbit"),this.mode.set(!0,{preventTargetAdjustment:!0}),this.currentWorld&&this.currentWorld.renderer&&(this.previousSize=this.currentWorld.renderer.getSize().clone()))})}get mode(){if(!this._mode)throw new Error("Mode not found, camera not initialized");return this._mode}dispose(){super.dispose(),this.threeOrtho.removeFromParent()}set(e){if(this.mode!==null&&this.mode.id!==e){if(this.mode.set(!1),!this._navigationModes.has(e))throw new Error("The specified mode does not exist!");this._mode=this._navigationModes.get(e),this.mode.set(!0)}}async fit(e,t=1.5){if(!this.enabled)return;const i=Number.MAX_VALUE,s=Number.MIN_VALUE,n=new x(i,i,i),r=new x(s,s,s);for(const u of e){const f=new ye().setFromObject(u);f.min.xr.x&&(r.x=f.max.x),f.max.y>r.y&&(r.y=f.max.y),f.max.z>r.z&&(r.z=f.max.z)}const o=new ye(n,r),a=new x;o.getSize(a);const l=new x;o.getCenter(l);const h=Math.max(a.x,a.y,a.z)*t,d=new gi(l,h);await this.controls.fitToSphere(d,!0)}setUserInput(e){e?this.enableUserInput():this.disableUserInput()}disableUserInput(){this._userInputButtons.left=this.controls.mouseButtons.left,this._userInputButtons.right=this.controls.mouseButtons.right,this._userInputButtons.middle=this.controls.mouseButtons.middle,this._userInputButtons.wheel=this.controls.mouseButtons.wheel,this.controls.mouseButtons.left=0,this.controls.mouseButtons.right=0,this.controls.mouseButtons.middle=0,this.controls.mouseButtons.wheel=0}enableUserInput(){Object.keys(this._userInputButtons).length!==0&&(this.controls.mouseButtons.left=this._userInputButtons.left,this.controls.mouseButtons.right=this._userInputButtons.right,this.controls.mouseButtons.middle=this._userInputButtons.middle,this.controls.mouseButtons.wheel=this._userInputButtons.wheel)}newOrthoCamera(){const e=window.innerWidth/window.innerHeight;return new ii(this._frustumSize*e/-2,this._frustumSize*e/2,this._frustumSize/2,this._frustumSize/-2,.1,1e3)}setOrthoPerspCameraAspect(){if(!this.currentWorld||!this.currentWorld.renderer||!this.previousSize)return;const e=this.currentWorld.renderer.getSize(),t=this.threeOrtho.top,i=this.threeOrtho.right,s=e.y/this.previousSize.y,n=e.x/this.previousSize.x,r=t*s,o=i*n;this.threeOrtho.left=-o,this.threeOrtho.right=o,this.threeOrtho.top=r,this.threeOrtho.bottom=-r,this.threeOrtho.updateProjectionMatrix(),this.previousSize.copy(e)}}const ha=new Map([[Dn,{forRelated:"Decomposes",forRelating:"IsDecomposedBy"}],[Zr,{forRelated:"HasAssociations",forRelating:"AssociatedTo"}],[jr,{forRelated:"HasAssociations",forRelating:"ClassificationForObjects"}],[Qr,{forRelated:"HasAssignments",forRelating:"IsGroupedBy"}],[Os,{forRelated:"IsDefinedBy",forRelating:"DefinesOcurrence"}],[Kr,{forRelated:"IsTypedBy",forRelating:"Types"}],[qr,{forRelated:"IsDefinedBy",forRelating:"Defines"}],[Ln,{forRelated:"ContainedInStructure",forRelating:"ContainsElements"}],[Jr,{forRelated:"AssignedToFlowElement",forRelating:"HasControlElements"}],[$r,{forRelated:"ConnectedFrom",forRelating:"ConnectedTo"}],[eo,{forRelated:"HasAssignments",forRelating:"ReferencedBy"}],[to,{forRelated:"HasContext",forRelating:"Declares"}],[io,{forRelated:"HasAssignments",forRelating:"Controls"}],[so,{forRelated:"Nests",forRelating:"IsNestedBy"}],[no,{forRelated:"HasAssociations",forRelating:"DocumentRefForObjects"}]]),An={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 fi{static async getUnits(e){var t,i,s;const{IFCUNITASSIGNMENT:n}=yt,r=await e.getAllPropertiesOfType(n);if(!r)return 1;const o=Object.keys(r),a=r[parseInt(o[0],10)];for(const l of a.Units){if(l.value===void 0||l.value===null)continue;const h=await e.getProperties(l.value);if(!h||!h.UnitType||!h.UnitType.value||h.UnitType.value!=="LENGTHUNIT")continue;let d=1,u=1;return h.Name.value==="METRE"&&(u=1),h.Name.value==="FOOT"&&(u=.3048),((t=h.Prefix)==null?void 0:t.value)==="MILLI"?d=.001:((i=h.Prefix)==null?void 0:i.value)==="CENTI"?d=.01:((s=h.Prefix)==null?void 0:s.value)==="DECI"&&(d=.1),u*d}return 1}static async findItemByGuid(e,t){var i;const s=e.getAllPropertiesIDs();for(const n of s){const r=await e.getProperties(n);if(r&&((i=r.GlobalId)==null?void 0:i.value)===t)return r}return null}static async getRelationMap(e,t,i){var s;const n=i??(async()=>{}),r={},o=e.getAllPropertiesIDs();for(const a of o){const l=await e.getProperties(a);if(!l)continue;const h=l.type===t,d=Object.keys(l).find(E=>E.startsWith("Relating")),u=Object.keys(l).find(E=>E.startsWith("Related"));if(!(h&&d&&u))continue;const f=await e.getProperties((s=l[d])==null?void 0:s.value),m=l[u];if(!f||!m||!(m&&Array.isArray(m)))continue;const p=m.map(E=>E.value);await n(f.expressID,p),r[f.expressID]=p}return r}static async getQsetQuantities(e,t,i){const s=i??(()=>{}),n=await e.getProperties(t);return!n||n.type!==fn?null:(n.Quantities??[{}]).map(r=>(r.value&&s(r.value),r.value)).filter(r=>r!==null)}static async getPsetProps(e,t,i){const s=i??(()=>{}),n=await e.getProperties(t);return!n||n.type!==Vi?null:(n.HasProperties??[{}]).map(r=>(r.value&&s(r.value),r.value)).filter(r=>r!==null)}static async getPsetRel(e,t){var i;if(!await e.getProperties(t))return null;const s=await e.getAllPropertiesOfType(Os);if(!s)return null;const n=Object.values(s);let r=null;for(const o of n)((i=o.RelatingPropertyDefinition)==null?void 0:i.value)===t&&(r=o.expressID);return r}static async getQsetRel(e,t){return fi.getPsetRel(e,t)}static async getEntityName(e,t){var i;const s=await e.getProperties(t);if(!s)return{key:null,name:null};const n=Object.keys(s).find(o=>o.endsWith("Name"))??null,r=n?(i=s[n])==null?void 0:i.value:null;return{key:n,name:r}}static async getQuantityValue(e,t){const i=await e.getProperties(t);if(!i)return{key:null,value:null};const s=Object.keys(i).find(r=>r.endsWith("Value"))??null;let n;return s===null||i[s]===void 0||i[s]===null?n=null:n=i[s].value,{key:s,value:n}}static isRel(e){return An[e].startsWith("IFCREL")}static async attributeExists(e,t,i){const s=await e.getProperties(t);return s?Object.keys(s).includes(i):!1}static async groupEntitiesByType(e,t){var i;const s=new Map;for(const n of t){const r=await e.getProperties(n);if(!r)continue;const o=r.type;s.get(o)||s.set(o,new Set),(i=s.get(o))==null||i.add(n)}return s}}const yu={IFCURIREFERENCE:"IfcUriReference",IFCTIME:"IfcTime",IFCTEMPERATURERATEOFCHANGEMEASURE:"IfcTemperatureRateOfChangeMeasure",IFCSOUNDPRESSURELEVELMEASURE:"IfcSoundPressureLevelMeasure",IFCSOUNDPOWERLEVELMEASURE:"IfcSoundPowerLevelMeasure",IFCPROPERTYSETDEFINITIONSET:"IfcPropertySetDefinitionSet",IFCPOSITIVEINTEGER:"IfcPositiveInteger",IFCNONNEGATIVELENGTHMEASURE:"IfcNonNegativeLengthMeasure",IFCLINEINDEX:"IfcLineIndex",IFCLANGUAGEID:"IfcLanguageId",IFCDURATION:"IfcDuration",IFCDAYINWEEKNUMBER:"IfcDayInWeekNumber",IFCDATETIME:"IfcDateTime",IFCDATE:"IfcDate",IFCCARDINALPOINTREFERENCE:"IfcCardinalPointReference",IFCBINARY:"IfcBinary",IFCAREADENSITYMEASURE:"IfcAreaDensityMeasure",IFCARCINDEX:"IfcArcIndex",IFCYEARNUMBER:"IfcYearNumber",IFCWARPINGMOMENTMEASURE:"IfcWarpingMomentMeasure",IFCWARPINGCONSTANTMEASURE:"IfcWarpingConstantMeasure",IFCVOLUMETRICFLOWRATEMEASURE:"IfcVolumetricFlowRateMeasure",IFCVOLUMEMEASURE:"IfcVolumeMeasure",IFCVAPORPERMEABILITYMEASURE:"IfcVaporPermeabilityMeasure",IFCTORQUEMEASURE:"IfcTorqueMeasure",IFCTIMESTAMP:"IfcTimestamp",IFCTIMEMEASURE:"IfcTimeMeasure",IFCTHERMODYNAMICTEMPERATUREMEASURE:"IfcThermodynamicTemperatureMeasure",IFCTHERMALTRANSMITTANCEMEASURE:"IfcThermalTransmittanceMeasure",IFCTHERMALRESISTANCEMEASURE:"IfcThermalResistanceMeasure",IFCTHERMALEXPANSIONCOEFFICIENTMEASURE:"IfcThermalExpansionCoefficientMeasure",IFCTHERMALCONDUCTIVITYMEASURE:"IfcThermalConductivityMeasure",IFCTHERMALADMITTANCEMEASURE:"IfcThermalAdmittanceMeasure",IFCTEXTTRANSFORMATION:"IfcTextTransformation",IFCTEXTFONTNAME:"IfcTextFontName",IFCTEXTDECORATION:"IfcTextDecoration",IFCTEXTALIGNMENT:"IfcTextAlignment",IFCTEXT:"IfcText",IFCTEMPERATUREGRADIENTMEASURE:"IfcTemperatureGradientMeasure",IFCSPECULARROUGHNESS:"IfcSpecularRoughness",IFCSPECULAREXPONENT:"IfcSpecularExponent",IFCSPECIFICHEATCAPACITYMEASURE:"IfcSpecificHeatCapacityMeasure",IFCSOUNDPRESSUREMEASURE:"IfcSoundPressureMeasure",IFCSOUNDPOWERMEASURE:"IfcSoundPowerMeasure",IFCSOLIDANGLEMEASURE:"IfcSolidAngleMeasure",IFCSHEARMODULUSMEASURE:"IfcShearModulusMeasure",IFCSECTIONALAREAINTEGRALMEASURE:"IfcSectionalAreaIntegralMeasure",IFCSECTIONMODULUSMEASURE:"IfcSectionModulusMeasure",IFCSECONDINMINUTE:"IfcSecondInMinute",IFCROTATIONALSTIFFNESSMEASURE:"IfcRotationalStiffnessMeasure",IFCROTATIONALMASSMEASURE:"IfcRotationalMassMeasure",IFCROTATIONALFREQUENCYMEASURE:"IfcRotationalFrequencyMeasure",IFCREAL:"IfcReal",IFCRATIOMEASURE:"IfcRatioMeasure",IFCRADIOACTIVITYMEASURE:"IfcRadioactivityMeasure",IFCPRESSUREMEASURE:"IfcPressureMeasure",IFCPRESENTABLETEXT:"IfcPresentableText",IFCPOWERMEASURE:"IfcPowerMeasure",IFCPOSITIVERATIOMEASURE:"IfcPositiveRatioMeasure",IFCPOSITIVEPLANEANGLEMEASURE:"IfcPositivePlaneAngleMeasure",IFCPOSITIVELENGTHMEASURE:"IfcPositiveLengthMeasure",IFCPLANEANGLEMEASURE:"IfcPlaneAngleMeasure",IFCPLANARFORCEMEASURE:"IfcPlanarForceMeasure",IFCPARAMETERVALUE:"IfcParameterValue",IFCPHMEASURE:"IfcPhMeasure",IFCNUMERICMEASURE:"IfcNumericMeasure",IFCNORMALISEDRATIOMEASURE:"IfcNormalisedRatioMeasure",IFCMONTHINYEARNUMBER:"IfcMonthInYearNumber",IFCMONETARYMEASURE:"IfcMonetaryMeasure",IFCMOMENTOFINERTIAMEASURE:"IfcMomentOfInertiaMeasure",IFCMOLECULARWEIGHTMEASURE:"IfcMolecularWeightMeasure",IFCMOISTUREDIFFUSIVITYMEASURE:"IfcMoistureDiffusivityMeasure",IFCMODULUSOFSUBGRADEREACTIONMEASURE:"IfcModulusOfSubgradeReactionMeasure",IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE:"IfcModulusOfRotationalSubgradeReactionMeasure",IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE:"IfcModulusOfLinearSubgradeReactionMeasure",IFCMODULUSOFELASTICITYMEASURE:"IfcModulusOfElasticityMeasure",IFCMINUTEINHOUR:"IfcMinuteInHour",IFCMASSPERLENGTHMEASURE:"IfcMassPerLengthMeasure",IFCMASSMEASURE:"IfcMassMeasure",IFCMASSFLOWRATEMEASURE:"IfcMassFlowRateMeasure",IFCMASSDENSITYMEASURE:"IfcMassDensityMeasure",IFCMAGNETICFLUXMEASURE:"IfcMagneticFluxMeasure",IFCMAGNETICFLUXDENSITYMEASURE:"IfcMagneticFluxDensityMeasure",IFCLUMINOUSINTENSITYMEASURE:"IfcLuminousIntensityMeasure",IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE:"IfcLuminousIntensityDistributionMeasure",IFCLUMINOUSFLUXMEASURE:"IfcLuminousFluxMeasure",IFCLOGICAL:"IfcLogical",IFCLINEARVELOCITYMEASURE:"IfcLinearVelocityMeasure",IFCLINEARSTIFFNESSMEASURE:"IfcLinearStiffnessMeasure",IFCLINEARMOMENTMEASURE:"IfcLinearMomentMeasure",IFCLINEARFORCEMEASURE:"IfcLinearForceMeasure",IFCLENGTHMEASURE:"IfcLengthMeasure",IFCLABEL:"IfcLabel",IFCKINEMATICVISCOSITYMEASURE:"IfcKinematicViscosityMeasure",IFCISOTHERMALMOISTURECAPACITYMEASURE:"IfcIsothermalMoistureCapacityMeasure",IFCIONCONCENTRATIONMEASURE:"IfcIonConcentrationMeasure",IFCINTEGERCOUNTRATEMEASURE:"IfcIntegerCountRateMeasure",IFCINTEGER:"IfcInteger",IFCINDUCTANCEMEASURE:"IfcInductanceMeasure",IFCILLUMINANCEMEASURE:"IfcIlluminanceMeasure",IFCIDENTIFIER:"IfcIdentifier",IFCHOURINDAY:"IfcHourInDay",IFCHEATINGVALUEMEASURE:"IfcHeatingValueMeasure",IFCHEATFLUXDENSITYMEASURE:"IfcHeatFluxDensityMeasure",IFCGLOBALLYUNIQUEID:"IfcGloballyUniqueId",IFCFREQUENCYMEASURE:"IfcFrequencyMeasure",IFCFORCEMEASURE:"IfcForceMeasure",IFCFONTWEIGHT:"IfcFontWeight",IFCFONTVARIANT:"IfcFontVariant",IFCFONTSTYLE:"IfcFontStyle",IFCENERGYMEASURE:"IfcEnergyMeasure",IFCELECTRICVOLTAGEMEASURE:"IfcElectricVoltageMeasure",IFCELECTRICRESISTANCEMEASURE:"IfcElectricResistanceMeasure",IFCELECTRICCURRENTMEASURE:"IfcElectricCurrentMeasure",IFCELECTRICCONDUCTANCEMEASURE:"IfcElectricConductanceMeasure",IFCELECTRICCHARGEMEASURE:"IfcElectricChargeMeasure",IFCELECTRICCAPACITANCEMEASURE:"IfcElectricCapacitanceMeasure",IFCDYNAMICVISCOSITYMEASURE:"IfcDynamicViscosityMeasure",IFCDOSEEQUIVALENTMEASURE:"IfcDoseEquivalentMeasure",IFCDIMENSIONCOUNT:"IfcDimensionCount",IFCDESCRIPTIVEMEASURE:"IfcDescriptiveMeasure",IFCDAYLIGHTSAVINGHOUR:"IfcDaylightSavingHour",IFCDAYINMONTHNUMBER:"IfcDayInMonthNumber",IFCCURVATUREMEASURE:"IfcCurvatureMeasure",IFCCOUNTMEASURE:"IfcCountMeasure",IFCCONTEXTDEPENDENTMEASURE:"IfcContextDependentMeasure",IFCCOMPOUNDPLANEANGLEMEASURE:"IfcCompoundPlaneAngleMeasure",IFCCOMPLEXNUMBER:"IfcComplexNumber",IFCBOXALIGNMENT:"IfcBoxAlignment",IFCBOOLEAN:"IfcBoolean",IFCAREAMEASURE:"IfcAreaMeasure",IFCANGULARVELOCITYMEASURE:"IfcAngularVelocityMeasure",IFCAMOUNTOFSUBSTANCEMEASURE:"IfcAmountOfSubstanceMeasure",IFCACCELERATIONMEASURE:"IfcAccelerationMeasure",IFCABSORBEDDOSEMEASURE:"IfcAbsorbedDoseMeasure",IFCGEOSLICE:"IfcGeoSlice",IFCGEOMODEL:"IfcGeoModel",IFCELECTRICFLOWTREATMENTDEVICE:"IfcElectricFlowTreatmentDevice",IFCDISTRIBUTIONBOARD:"IfcDistributionBoard",IFCCONVEYORSEGMENT:"IfcConveyorSegment",IFCCAISSONFOUNDATION:"IfcCaissonFoundation",IFCBOREHOLE:"IfcBorehole",IFCBEARING:"IfcBearing",IFCALIGNMENT:"IfcAlignment",IFCTRACKELEMENT:"IfcTrackElement",IFCSIGNAL:"IfcSignal",IFCREINFORCEDSOIL:"IfcReinforcedSoil",IFCRAIL:"IfcRail",IFCPAVEMENT:"IfcPavement",IFCNAVIGATIONELEMENT:"IfcNavigationElement",IFCMOORINGDEVICE:"IfcMooringDevice",IFCMOBILETELECOMMUNICATIONSAPPLIANCE:"IfcMobileTelecommunicationsAppliance",IFCLIQUIDTERMINAL:"IfcLiquidTerminal",IFCLINEARPOSITIONINGELEMENT:"IfcLinearPositioningElement",IFCKERB:"IfcKerb",IFCGEOTECHNICALASSEMBLY:"IfcGeotechnicalAssembly",IFCELECTRICFLOWTREATMENTDEVICETYPE:"IfcElectricFlowTreatmentDeviceType",IFCEARTHWORKSFILL:"IfcEarthworksFill",IFCEARTHWORKSELEMENT:"IfcEarthworksElement",IFCEARTHWORKSCUT:"IfcEarthworksCut",IFCDISTRIBUTIONBOARDTYPE:"IfcDistributionBoardType",IFCDEEPFOUNDATION:"IfcDeepFoundation",IFCCOURSE:"IfcCourse",IFCCONVEYORSEGMENTTYPE:"IfcConveyorSegmentType",IFCCAISSONFOUNDATIONTYPE:"IfcCaissonFoundationType",IFCBUILTSYSTEM:"IfcBuiltSystem",IFCBUILTELEMENT:"IfcBuiltElement",IFCBRIDGEPART:"IfcBridgePart",IFCBRIDGE:"IfcBridge",IFCBEARINGTYPE:"IfcBearingType",IFCALIGNMENTVERTICAL:"IfcAlignmentVertical",IFCALIGNMENTSEGMENT:"IfcAlignmentSegment",IFCALIGNMENTHORIZONTAL:"IfcAlignmentHorizontal",IFCALIGNMENTCANT:"IfcAlignmentCant",IFCVIBRATIONDAMPERTYPE:"IfcVibrationDamperType",IFCVIBRATIONDAMPER:"IfcVibrationDamper",IFCVEHICLE:"IfcVehicle",IFCTRANSPORTATIONDEVICE:"IfcTransportationDevice",IFCTRACKELEMENTTYPE:"IfcTrackElementType",IFCTENDONCONDUITTYPE:"IfcTendonConduitType",IFCTENDONCONDUIT:"IfcTendonConduit",IFCSINESPIRAL:"IfcSineSpiral",IFCSIGNALTYPE:"IfcSignalType",IFCSIGNTYPE:"IfcSignType",IFCSIGN:"IfcSign",IFCSEVENTHORDERPOLYNOMIALSPIRAL:"IfcSeventhOrderPolynomialSpiral",IFCSEGMENTEDREFERENCECURVE:"IfcSegmentedReferenceCurve",IFCSECONDORDERPOLYNOMIALSPIRAL:"IfcSecondOrderPolynomialSpiral",IFCROADPART:"IfcRoadPart",IFCROAD:"IfcRoad",IFCRELADHERESTOELEMENT:"IfcRelAdheresToElement",IFCREFERENT:"IfcReferent",IFCRAILWAYPART:"IfcRailwayPart",IFCRAILWAY:"IfcRailway",IFCRAILTYPE:"IfcRailType",IFCPOSITIONINGELEMENT:"IfcPositioningElement",IFCPAVEMENTTYPE:"IfcPavementType",IFCNAVIGATIONELEMENTTYPE:"IfcNavigationElementType",IFCMOORINGDEVICETYPE:"IfcMooringDeviceType",IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE:"IfcMobileTelecommunicationsApplianceType",IFCMARINEPART:"IfcMarinePart",IFCMARINEFACILITY:"IfcMarineFacility",IFCLIQUIDTERMINALTYPE:"IfcLiquidTerminalType",IFCLINEARELEMENT:"IfcLinearElement",IFCKERBTYPE:"IfcKerbType",IFCIMPACTPROTECTIONDEVICETYPE:"IfcImpactProtectionDeviceType",IFCIMPACTPROTECTIONDEVICE:"IfcImpactProtectionDevice",IFCGRADIENTCURVE:"IfcGradientCurve",IFCGEOTECHNICALSTRATUM:"IfcGeotechnicalStratum",IFCGEOTECHNICALELEMENT:"IfcGeotechnicalElement",IFCFACILITYPARTCOMMON:"IfcFacilityPartCommon",IFCFACILITYPART:"IfcFacilityPart",IFCFACILITY:"IfcFacility",IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID:"IfcDirectrixDerivedReferenceSweptAreaSolid",IFCDEEPFOUNDATIONTYPE:"IfcDeepFoundationType",IFCCOURSETYPE:"IfcCourseType",IFCCOSINESPIRAL:"IfcCosineSpiral",IFCCLOTHOID:"IfcClothoid",IFCBUILTELEMENTTYPE:"IfcBuiltElementType",IFCVEHICLETYPE:"IfcVehicleType",IFCTRIANGULATEDIRREGULARNETWORK:"IfcTriangulatedIrregularNetwork",IFCTRANSPORTATIONDEVICETYPE:"IfcTransportationDeviceType",IFCTHIRDORDERPOLYNOMIALSPIRAL:"IfcThirdOrderPolynomialSpiral",IFCSPIRAL:"IfcSpiral",IFCSECTIONEDSURFACE:"IfcSectionedSurface",IFCSECTIONEDSOLIDHORIZONTAL:"IfcSectionedSolidHorizontal",IFCSECTIONEDSOLID:"IfcSectionedSolid",IFCRELPOSITIONS:"IfcRelPositions",IFCRELASSOCIATESPROFILEDEF:"IfcRelAssociatesProfileDef",IFCPOLYNOMIALCURVE:"IfcPolynomialCurve",IFCOFFSETCURVEBYDISTANCES:"IfcOffsetCurveByDistances",IFCOFFSETCURVE:"IfcOffsetCurve",IFCINDEXEDPOLYGONALTEXTUREMAP:"IfcIndexedPolygonalTextureMap",IFCDIRECTRIXCURVESWEPTAREASOLID:"IfcDirectrixCurveSweptAreaSolid",IFCCURVESEGMENT:"IfcCurveSegment",IFCAXIS2PLACEMENTLINEAR:"IfcAxis2PlacementLinear",IFCSEGMENT:"IfcSegment",IFCPOINTBYDISTANCEEXPRESSION:"IfcPointByDistanceExpression",IFCOPENCROSSPROFILEDEF:"IfcOpenCrossProfileDef",IFCLINEARPLACEMENT:"IfcLinearPlacement",IFCALIGNMENTHORIZONTALSEGMENT:"IfcAlignmentHorizontalSegment",IFCALIGNMENTCANTSEGMENT:"IfcAlignmentCantSegment",IFCTEXTURECOORDINATEINDICESWITHVOIDS:"IfcTextureCoordinateIndicesWithVoids",IFCTEXTURECOORDINATEINDICES:"IfcTextureCoordinateIndices",IFCQUANTITYNUMBER:"IfcQuantityNumber",IFCALIGNMENTVERTICALSEGMENT:"IfcAlignmentVerticalSegment",IFCALIGNMENTPARAMETERSEGMENT:"IfcAlignmentParameterSegment",IFCCONTROLLER:"IfcController",IFCALARM:"IfcAlarm",IFCACTUATOR:"IfcActuator",IFCUNITARYCONTROLELEMENT:"IfcUnitaryControlElement",IFCSENSOR:"IfcSensor",IFCPROTECTIVEDEVICETRIPPINGUNIT:"IfcProtectiveDeviceTrippingUnit",IFCFLOWINSTRUMENT:"IfcFlowInstrument",IFCFIRESUPPRESSIONTERMINAL:"IfcFireSuppressionTerminal",IFCFILTER:"IfcFilter",IFCFAN:"IfcFan",IFCELECTRICTIMECONTROL:"IfcElectricTimeControl",IFCELECTRICMOTOR:"IfcElectricMotor",IFCELECTRICGENERATOR:"IfcElectricGenerator",IFCELECTRICFLOWSTORAGEDEVICE:"IfcElectricFlowStorageDevice",IFCELECTRICDISTRIBUTIONBOARD:"IfcElectricDistributionBoard",IFCELECTRICAPPLIANCE:"IfcElectricAppliance",IFCDUCTSILENCER:"IfcDuctSilencer",IFCDUCTSEGMENT:"IfcDuctSegment",IFCDUCTFITTING:"IfcDuctFitting",IFCDISTRIBUTIONCIRCUIT:"IfcDistributionCircuit",IFCDAMPER:"IfcDamper",IFCCOOLINGTOWER:"IfcCoolingTower",IFCCOOLEDBEAM:"IfcCooledBeam",IFCCONDENSER:"IfcCondenser",IFCCOMPRESSOR:"IfcCompressor",IFCCOMMUNICATIONSAPPLIANCE:"IfcCommunicationsAppliance",IFCCOIL:"IfcCoil",IFCCHILLER:"IfcChiller",IFCCABLESEGMENT:"IfcCableSegment",IFCCABLEFITTING:"IfcCableFitting",IFCCABLECARRIERSEGMENT:"IfcCableCarrierSegment",IFCCABLECARRIERFITTING:"IfcCableCarrierFitting",IFCBURNER:"IfcBurner",IFCBOILER:"IfcBoiler",IFCBEAMSTANDARDCASE:"IfcBeamStandardCase",IFCAUDIOVISUALAPPLIANCE:"IfcAudioVisualAppliance",IFCAIRTOAIRHEATRECOVERY:"IfcAirToAirHeatRecovery",IFCAIRTERMINALBOX:"IfcAirTerminalBox",IFCAIRTERMINAL:"IfcAirTerminal",IFCWINDOWSTANDARDCASE:"IfcWindowStandardCase",IFCWASTETERMINAL:"IfcWasteTerminal",IFCWALLELEMENTEDCASE:"IfcWallElementedCase",IFCVALVE:"IfcValve",IFCUNITARYEQUIPMENT:"IfcUnitaryEquipment",IFCUNITARYCONTROLELEMENTTYPE:"IfcUnitaryControlElementType",IFCTUBEBUNDLE:"IfcTubeBundle",IFCTRANSFORMER:"IfcTransformer",IFCTANK:"IfcTank",IFCSWITCHINGDEVICE:"IfcSwitchingDevice",IFCSTRUCTURALLOADCASE:"IfcStructuralLoadCase",IFCSTACKTERMINAL:"IfcStackTerminal",IFCSPACEHEATER:"IfcSpaceHeater",IFCSOLARDEVICE:"IfcSolarDevice",IFCSLABSTANDARDCASE:"IfcSlabStandardCase",IFCSLABELEMENTEDCASE:"IfcSlabElementedCase",IFCSHADINGDEVICE:"IfcShadingDevice",IFCSANITARYTERMINAL:"IfcSanitaryTerminal",IFCREINFORCINGBARTYPE:"IfcReinforcingBarType",IFCRATIONALBSPLINECURVEWITHKNOTS:"IfcRationalBSplineCurveWithKnots",IFCPUMP:"IfcPump",IFCPROTECTIVEDEVICETRIPPINGUNITTYPE:"IfcProtectiveDeviceTrippingUnitType",IFCPROTECTIVEDEVICE:"IfcProtectiveDevice",IFCPLATESTANDARDCASE:"IfcPlateStandardCase",IFCPIPESEGMENT:"IfcPipeSegment",IFCPIPEFITTING:"IfcPipeFitting",IFCOUTLET:"IfcOutlet",IFCOUTERBOUNDARYCURVE:"IfcOuterBoundaryCurve",IFCMOTORCONNECTION:"IfcMotorConnection",IFCMEMBERSTANDARDCASE:"IfcMemberStandardCase",IFCMEDICALDEVICE:"IfcMedicalDevice",IFCLIGHTFIXTURE:"IfcLightFixture",IFCLAMP:"IfcLamp",IFCJUNCTIONBOX:"IfcJunctionBox",IFCINTERCEPTOR:"IfcInterceptor",IFCHUMIDIFIER:"IfcHumidifier",IFCHEATEXCHANGER:"IfcHeatExchanger",IFCFLOWMETER:"IfcFlowMeter",IFCEXTERNALSPATIALELEMENT:"IfcExternalSpatialElement",IFCEVAPORATOR:"IfcEvaporator",IFCEVAPORATIVECOOLER:"IfcEvaporativeCooler",IFCENGINE:"IfcEngine",IFCELECTRICDISTRIBUTIONBOARDTYPE:"IfcElectricDistributionBoardType",IFCDOORSTANDARDCASE:"IfcDoorStandardCase",IFCDISTRIBUTIONSYSTEM:"IfcDistributionSystem",IFCCOMMUNICATIONSAPPLIANCETYPE:"IfcCommunicationsApplianceType",IFCCOLUMNSTANDARDCASE:"IfcColumnStandardCase",IFCCIVILELEMENT:"IfcCivilElement",IFCCHIMNEY:"IfcChimney",IFCCABLEFITTINGTYPE:"IfcCableFittingType",IFCBURNERTYPE:"IfcBurnerType",IFCBUILDINGSYSTEM:"IfcBuildingSystem",IFCBUILDINGELEMENTPARTTYPE:"IfcBuildingElementPartType",IFCBOUNDARYCURVE:"IfcBoundaryCurve",IFCBSPLINECURVEWITHKNOTS:"IfcBSplineCurveWithKnots",IFCAUDIOVISUALAPPLIANCETYPE:"IfcAudioVisualApplianceType",IFCWORKCALENDAR:"IfcWorkCalendar",IFCWINDOWTYPE:"IfcWindowType",IFCVOIDINGFEATURE:"IfcVoidingFeature",IFCVIBRATIONISOLATOR:"IfcVibrationIsolator",IFCTENDONTYPE:"IfcTendonType",IFCTENDONANCHORTYPE:"IfcTendonAnchorType",IFCSYSTEMFURNITUREELEMENT:"IfcSystemFurnitureElement",IFCSURFACEFEATURE:"IfcSurfaceFeature",IFCSTRUCTURALSURFACEACTION:"IfcStructuralSurfaceAction",IFCSTRUCTURALCURVEREACTION:"IfcStructuralCurveReaction",IFCSTRUCTURALCURVEACTION:"IfcStructuralCurveAction",IFCSTAIRTYPE:"IfcStairType",IFCSOLARDEVICETYPE:"IfcSolarDeviceType",IFCSHADINGDEVICETYPE:"IfcShadingDeviceType",IFCSEAMCURVE:"IfcSeamCurve",IFCROOFTYPE:"IfcRoofType",IFCREINFORCINGMESHTYPE:"IfcReinforcingMeshType",IFCREINFORCINGELEMENTTYPE:"IfcReinforcingElementType",IFCRATIONALBSPLINESURFACEWITHKNOTS:"IfcRationalBSplineSurfaceWithKnots",IFCRAMPTYPE:"IfcRampType",IFCPOLYGONALFACESET:"IfcPolygonalFaceSet",IFCPILETYPE:"IfcPileType",IFCOPENINGSTANDARDCASE:"IfcOpeningStandardCase",IFCMEDICALDEVICETYPE:"IfcMedicalDeviceType",IFCINTERSECTIONCURVE:"IfcIntersectionCurve",IFCINTERCEPTORTYPE:"IfcInterceptorType",IFCINDEXEDPOLYCURVE:"IfcIndexedPolyCurve",IFCGEOGRAPHICELEMENT:"IfcGeographicElement",IFCFURNITURE:"IfcFurniture",IFCFOOTINGTYPE:"IfcFootingType",IFCEXTERNALSPATIALSTRUCTUREELEMENT:"IfcExternalSpatialStructureElement",IFCEVENT:"IfcEvent",IFCENGINETYPE:"IfcEngineType",IFCELEMENTASSEMBLYTYPE:"IfcElementAssemblyType",IFCDOORTYPE:"IfcDoorType",IFCCYLINDRICALSURFACE:"IfcCylindricalSurface",IFCCONSTRUCTIONPRODUCTRESOURCETYPE:"IfcConstructionProductResourceType",IFCCONSTRUCTIONMATERIALRESOURCETYPE:"IfcConstructionMaterialResourceType",IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE:"IfcConstructionEquipmentResourceType",IFCCOMPOSITECURVEONSURFACE:"IfcCompositeCurveOnSurface",IFCCOMPLEXPROPERTYTEMPLATE:"IfcComplexPropertyTemplate",IFCCIVILELEMENTTYPE:"IfcCivilElementType",IFCCHIMNEYTYPE:"IfcChimneyType",IFCBSPLINESURFACEWITHKNOTS:"IfcBSplineSurfaceWithKnots",IFCBSPLINESURFACE:"IfcBSplineSurface",IFCADVANCEDBREPWITHVOIDS:"IfcAdvancedBrepWithVoids",IFCADVANCEDBREP:"IfcAdvancedBrep",IFCTRIANGULATEDFACESET:"IfcTriangulatedFaceSet",IFCTOROIDALSURFACE:"IfcToroidalSurface",IFCTESSELLATEDFACESET:"IfcTessellatedFaceSet",IFCTASKTYPE:"IfcTaskType",IFCSURFACECURVE:"IfcSurfaceCurve",IFCSUBCONTRACTRESOURCETYPE:"IfcSubContractResourceType",IFCSTRUCTURALSURFACEREACTION:"IfcStructuralSurfaceReaction",IFCSPHERICALSURFACE:"IfcSphericalSurface",IFCSPATIALZONETYPE:"IfcSpatialZoneType",IFCSPATIALZONE:"IfcSpatialZone",IFCSPATIALELEMENTTYPE:"IfcSpatialElementType",IFCSPATIALELEMENT:"IfcSpatialElement",IFCSIMPLEPROPERTYTEMPLATE:"IfcSimplePropertyTemplate",IFCREVOLVEDAREASOLIDTAPERED:"IfcRevolvedAreaSolidTapered",IFCREPARAMETRISEDCOMPOSITECURVESEGMENT:"IfcReparametrisedCompositeCurveSegment",IFCRELSPACEBOUNDARY2NDLEVEL:"IfcRelSpaceBoundary2ndLevel",IFCRELSPACEBOUNDARY1STLEVEL:"IfcRelSpaceBoundary1stLevel",IFCRELINTERFERESELEMENTS:"IfcRelInterferesElements",IFCRELDEFINESBYTEMPLATE:"IfcRelDefinesByTemplate",IFCRELDEFINESBYOBJECT:"IfcRelDefinesByObject",IFCRELDECLARES:"IfcRelDeclares",IFCRELASSIGNSTOGROUPBYFACTOR:"IfcRelAssignsToGroupByFactor",IFCPROPERTYTEMPLATE:"IfcPropertyTemplate",IFCPROPERTYSETTEMPLATE:"IfcPropertySetTemplate",IFCPROJECTLIBRARY:"IfcProjectLibrary",IFCPROCEDURETYPE:"IfcProcedureType",IFCPREDEFINEDPROPERTYSET:"IfcPredefinedPropertySet",IFCPCURVE:"IfcPCurve",IFCLABORRESOURCETYPE:"IfcLaborResourceType",IFCINDEXEDPOLYGONALFACEWITHVOIDS:"IfcIndexedPolygonalFaceWithVoids",IFCINDEXEDPOLYGONALFACE:"IfcIndexedPolygonalFace",IFCGEOGRAPHICELEMENTTYPE:"IfcGeographicElementType",IFCFIXEDREFERENCESWEPTAREASOLID:"IfcFixedReferenceSweptAreaSolid",IFCEXTRUDEDAREASOLIDTAPERED:"IfcExtrudedAreaSolidTapered",IFCEVENTTYPE:"IfcEventType",IFCCURVEBOUNDEDSURFACE:"IfcCurveBoundedSurface",IFCCREWRESOURCETYPE:"IfcCrewResourceType",IFCCONTEXT:"IfcContext",IFCCONSTRUCTIONRESOURCETYPE:"IfcConstructionResourceType",IFCCARTESIANPOINTLIST3D:"IfcCartesianPointList3D",IFCCARTESIANPOINTLIST2D:"IfcCartesianPointList2D",IFCCARTESIANPOINTLIST:"IfcCartesianPointList",IFCADVANCEDFACE:"IfcAdvancedFace",IFCTYPERESOURCE:"IfcTypeResource",IFCTYPEPROCESS:"IfcTypeProcess",IFCTESSELLATEDITEM:"IfcTessellatedItem",IFCSWEPTDISKSOLIDPOLYGONAL:"IfcSweptDiskSolidPolygonal",IFCRESOURCETIME:"IfcResourceTime",IFCRESOURCECONSTRAINTRELATIONSHIP:"IfcResourceConstraintRelationship",IFCRESOURCEAPPROVALRELATIONSHIP:"IfcResourceApprovalRelationship",IFCQUANTITYSET:"IfcQuantitySet",IFCPROPERTYTEMPLATEDEFINITION:"IfcPropertyTemplateDefinition",IFCPREDEFINEDPROPERTIES:"IfcPredefinedProperties",IFCMIRROREDPROFILEDEF:"IfcMirroredProfileDef",IFCMATERIALRELATIONSHIP:"IfcMaterialRelationship",IFCMATERIALPROFILESETUSAGETAPERING:"IfcMaterialProfileSetUsageTapering",IFCMATERIALPROFILESETUSAGE:"IfcMaterialProfileSetUsage",IFCMATERIALCONSTITUENTSET:"IfcMaterialConstituentSet",IFCMATERIALCONSTITUENT:"IfcMaterialConstituent",IFCLAGTIME:"IfcLagTime",IFCINDEXEDTRIANGLETEXTUREMAP:"IfcIndexedTriangleTextureMap",IFCINDEXEDTEXTUREMAP:"IfcIndexedTextureMap",IFCINDEXEDCOLOURMAP:"IfcIndexedColourMap",IFCEXTERNALREFERENCERELATIONSHIP:"IfcExternalReferenceRelationship",IFCEXTENDEDPROPERTIES:"IfcExtendedProperties",IFCEVENTTIME:"IfcEventTime",IFCCONVERSIONBASEDUNITWITHOFFSET:"IfcConversionBasedUnitWithOffset",IFCCOLOURRGBLIST:"IfcColourRgbList",IFCWORKTIME:"IfcWorkTime",IFCTIMEPERIOD:"IfcTimePeriod",IFCTEXTUREVERTEXLIST:"IfcTextureVertexList",IFCTASKTIMERECURRING:"IfcTaskTimeRecurring",IFCTASKTIME:"IfcTaskTime",IFCTABLECOLUMN:"IfcTableColumn",IFCSURFACEREINFORCEMENTAREA:"IfcSurfaceReinforcementArea",IFCSTRUCTURALLOADORRESULT:"IfcStructuralLoadOrResult",IFCSTRUCTURALLOADCONFIGURATION:"IfcStructuralLoadConfiguration",IFCSCHEDULINGTIME:"IfcSchedulingTime",IFCRESOURCELEVELRELATIONSHIP:"IfcResourceLevelRelationship",IFCREFERENCE:"IfcReference",IFCRECURRENCEPATTERN:"IfcRecurrencePattern",IFCPROPERTYABSTRACTION:"IfcPropertyAbstraction",IFCPROJECTEDCRS:"IfcProjectedCrs",IFCPRESENTATIONITEM:"IfcPresentationItem",IFCMATERIALUSAGEDEFINITION:"IfcMaterialUsageDefinition",IFCMATERIALPROFILEWITHOFFSETS:"IfcMaterialProfileWithOffsets",IFCMATERIALPROFILESET:"IfcMaterialProfileSet",IFCMATERIALPROFILE:"IfcMaterialProfile",IFCMATERIALLAYERWITHOFFSETS:"IfcMaterialLayerWithOffsets",IFCMATERIALDEFINITION:"IfcMaterialDefinition",IFCMAPCONVERSION:"IfcMapConversion",IFCEXTERNALINFORMATION:"IfcExternalInformation",IFCCOORDINATEREFERENCESYSTEM:"IfcCoordinateReferenceSystem",IFCCOORDINATEOPERATION:"IfcCoordinateOperation",IFCCONNECTIONVOLUMEGEOMETRY:"IfcConnectionVolumeGeometry",IFCREINFORCINGBAR:"IfcReinforcingBar",IFCELECTRICDISTRIBUTIONPOINT:"IfcElectricDistributionPoint",IFCDISTRIBUTIONCONTROLELEMENT:"IfcDistributionControlElement",IFCDISTRIBUTIONCHAMBERELEMENT:"IfcDistributionChamberElement",IFCCONTROLLERTYPE:"IfcControllerType",IFCCHAMFEREDGEFEATURE:"IfcChamferEdgeFeature",IFCBEAM:"IfcBeam",IFCALARMTYPE:"IfcAlarmType",IFCACTUATORTYPE:"IfcActuatorType",IFCWINDOW:"IfcWindow",IFCWALLSTANDARDCASE:"IfcWallStandardCase",IFCWALL:"IfcWall",IFCVIBRATIONISOLATORTYPE:"IfcVibrationIsolatorType",IFCTENDONANCHOR:"IfcTendonAnchor",IFCTENDON:"IfcTendon",IFCSTRUCTURALANALYSISMODEL:"IfcStructuralAnalysisModel",IFCSTAIRFLIGHT:"IfcStairFlight",IFCSTAIR:"IfcStair",IFCSLAB:"IfcSlab",IFCSENSORTYPE:"IfcSensorType",IFCROUNDEDEDGEFEATURE:"IfcRoundedEdgeFeature",IFCROOF:"IfcRoof",IFCREINFORCINGMESH:"IfcReinforcingMesh",IFCREINFORCINGELEMENT:"IfcReinforcingElement",IFCRATIONALBEZIERCURVE:"IfcRationalBezierCurve",IFCRAMPFLIGHT:"IfcRampFlight",IFCRAMP:"IfcRamp",IFCRAILING:"IfcRailing",IFCPLATE:"IfcPlate",IFCPILE:"IfcPile",IFCMEMBER:"IfcMember",IFCFOOTING:"IfcFooting",IFCFLOWTREATMENTDEVICE:"IfcFlowTreatmentDevice",IFCFLOWTERMINAL:"IfcFlowTerminal",IFCFLOWSTORAGEDEVICE:"IfcFlowStorageDevice",IFCFLOWSEGMENT:"IfcFlowSegment",IFCFLOWMOVINGDEVICE:"IfcFlowMovingDevice",IFCFLOWINSTRUMENTTYPE:"IfcFlowInstrumentType",IFCFLOWFITTING:"IfcFlowFitting",IFCFLOWCONTROLLER:"IfcFlowController",IFCFIRESUPPRESSIONTERMINALTYPE:"IfcFireSuppressionTerminalType",IFCFILTERTYPE:"IfcFilterType",IFCFANTYPE:"IfcFanType",IFCENERGYCONVERSIONDEVICE:"IfcEnergyConversionDevice",IFCELECTRICALELEMENT:"IfcElectricalElement",IFCELECTRICALCIRCUIT:"IfcElectricalCircuit",IFCELECTRICTIMECONTROLTYPE:"IfcElectricTimeControlType",IFCELECTRICMOTORTYPE:"IfcElectricMotorType",IFCELECTRICHEATERTYPE:"IfcElectricHeaterType",IFCELECTRICGENERATORTYPE:"IfcElectricGeneratorType",IFCELECTRICFLOWSTORAGEDEVICETYPE:"IfcElectricFlowStorageDeviceType",IFCELECTRICAPPLIANCETYPE:"IfcElectricApplianceType",IFCEDGEFEATURE:"IfcEdgeFeature",IFCDUCTSILENCERTYPE:"IfcDuctSilencerType",IFCDUCTSEGMENTTYPE:"IfcDuctSegmentType",IFCDUCTFITTINGTYPE:"IfcDuctFittingType",IFCDOOR:"IfcDoor",IFCDISTRIBUTIONPORT:"IfcDistributionPort",IFCDISTRIBUTIONFLOWELEMENT:"IfcDistributionFlowElement",IFCDISTRIBUTIONELEMENT:"IfcDistributionElement",IFCDISTRIBUTIONCONTROLELEMENTTYPE:"IfcDistributionControlElementType",IFCDISTRIBUTIONCHAMBERELEMENTTYPE:"IfcDistributionChamberElementType",IFCDISCRETEACCESSORYTYPE:"IfcDiscreteAccessoryType",IFCDISCRETEACCESSORY:"IfcDiscreteAccessory",IFCDIAMETERDIMENSION:"IfcDiameterDimension",IFCDAMPERTYPE:"IfcDamperType",IFCCURTAINWALL:"IfcCurtainWall",IFCCOVERING:"IfcCovering",IFCCOOLINGTOWERTYPE:"IfcCoolingTowerType",IFCCOOLEDBEAMTYPE:"IfcCooledBeamType",IFCCONSTRUCTIONPRODUCTRESOURCE:"IfcConstructionProductResource",IFCCONSTRUCTIONMATERIALRESOURCE:"IfcConstructionMaterialResource",IFCCONSTRUCTIONEQUIPMENTRESOURCE:"IfcConstructionEquipmentResource",IFCCONDITIONCRITERION:"IfcConditionCriterion",IFCCONDITION:"IfcCondition",IFCCONDENSERTYPE:"IfcCondenserType",IFCCOMPRESSORTYPE:"IfcCompressorType",IFCCOLUMN:"IfcColumn",IFCCOILTYPE:"IfcCoilType",IFCCIRCLE:"IfcCircle",IFCCHILLERTYPE:"IfcChillerType",IFCCABLESEGMENTTYPE:"IfcCableSegmentType",IFCCABLECARRIERSEGMENTTYPE:"IfcCableCarrierSegmentType",IFCCABLECARRIERFITTINGTYPE:"IfcCableCarrierFittingType",IFCBUILDINGELEMENTPROXYTYPE:"IfcBuildingElementProxyType",IFCBUILDINGELEMENTPROXY:"IfcBuildingElementProxy",IFCBUILDINGELEMENTPART:"IfcBuildingElementPart",IFCBUILDINGELEMENTCOMPONENT:"IfcBuildingElementComponent",IFCBUILDINGELEMENT:"IfcBuildingElement",IFCBOILERTYPE:"IfcBoilerType",IFCBEZIERCURVE:"IfcBezierCurve",IFCBEAMTYPE:"IfcBeamType",IFCBSPLINECURVE:"IfcBSplineCurve",IFCASSET:"IfcAsset",IFCANGULARDIMENSION:"IfcAngularDimension",IFCAIRTOAIRHEATRECOVERYTYPE:"IfcAirToAirHeatRecoveryType",IFCAIRTERMINALTYPE:"IfcAirTerminalType",IFCAIRTERMINALBOXTYPE:"IfcAirTerminalBoxType",IFCACTIONREQUEST:"IfcActionRequest",IFC2DCOMPOSITECURVE:"Ifc2DCompositeCurve",IFCZONE:"IfcZone",IFCWORKSCHEDULE:"IfcWorkSchedule",IFCWORKPLAN:"IfcWorkPlan",IFCWORKCONTROL:"IfcWorkControl",IFCWASTETERMINALTYPE:"IfcWasteTerminalType",IFCWALLTYPE:"IfcWallType",IFCVIRTUALELEMENT:"IfcVirtualElement",IFCVALVETYPE:"IfcValveType",IFCUNITARYEQUIPMENTTYPE:"IfcUnitaryEquipmentType",IFCTUBEBUNDLETYPE:"IfcTubeBundleType",IFCTRIMMEDCURVE:"IfcTrimmedCurve",IFCTRANSPORTELEMENT:"IfcTransportElement",IFCTRANSFORMERTYPE:"IfcTransformerType",IFCTIMESERIESSCHEDULE:"IfcTimeSeriesSchedule",IFCTANKTYPE:"IfcTankType",IFCSYSTEM:"IfcSystem",IFCSWITCHINGDEVICETYPE:"IfcSwitchingDeviceType",IFCSUBCONTRACTRESOURCE:"IfcSubContractResource",IFCSTRUCTURALSURFACECONNECTION:"IfcStructuralSurfaceConnection",IFCSTRUCTURALRESULTGROUP:"IfcStructuralResultGroup",IFCSTRUCTURALPOINTREACTION:"IfcStructuralPointReaction",IFCSTRUCTURALPOINTCONNECTION:"IfcStructuralPointConnection",IFCSTRUCTURALPOINTACTION:"IfcStructuralPointAction",IFCSTRUCTURALPLANARACTIONVARYING:"IfcStructuralPlanarActionVarying",IFCSTRUCTURALPLANARACTION:"IfcStructuralPlanarAction",IFCSTRUCTURALLOADGROUP:"IfcStructuralLoadGroup",IFCSTRUCTURALLINEARACTIONVARYING:"IfcStructuralLinearActionVarying",IFCSTRUCTURALLINEARACTION:"IfcStructuralLinearAction",IFCSTRUCTURALCURVEMEMBERVARYING:"IfcStructuralCurveMemberVarying",IFCSTRUCTURALCURVEMEMBER:"IfcStructuralCurveMember",IFCSTRUCTURALCURVECONNECTION:"IfcStructuralCurveConnection",IFCSTRUCTURALCONNECTION:"IfcStructuralConnection",IFCSTRUCTURALACTION:"IfcStructuralAction",IFCSTAIRFLIGHTTYPE:"IfcStairFlightType",IFCSTACKTERMINALTYPE:"IfcStackTerminalType",IFCSPACETYPE:"IfcSpaceType",IFCSPACEPROGRAM:"IfcSpaceProgram",IFCSPACEHEATERTYPE:"IfcSpaceHeaterType",IFCSPACE:"IfcSpace",IFCSLABTYPE:"IfcSlabType",IFCSITE:"IfcSite",IFCSERVICELIFE:"IfcServiceLife",IFCSCHEDULETIMECONTROL:"IfcScheduleTimeControl",IFCSANITARYTERMINALTYPE:"IfcSanitaryTerminalType",IFCRELASSIGNSTASKS:"IfcRelAssignsTasks",IFCRELAGGREGATES:"IfcRelAggregates",IFCRAMPFLIGHTTYPE:"IfcRampFlightType",IFCRAILINGTYPE:"IfcRailingType",IFCRADIUSDIMENSION:"IfcRadiusDimension",IFCPUMPTYPE:"IfcPumpType",IFCPROTECTIVEDEVICETYPE:"IfcProtectiveDeviceType",IFCPROJECTIONELEMENT:"IfcProjectionElement",IFCPROJECTORDERRECORD:"IfcProjectOrderRecord",IFCPROJECTORDER:"IfcProjectOrder",IFCPROCEDURE:"IfcProcedure",IFCPORT:"IfcPort",IFCPOLYLINE:"IfcPolyline",IFCPLATETYPE:"IfcPlateType",IFCPIPESEGMENTTYPE:"IfcPipeSegmentType",IFCPIPEFITTINGTYPE:"IfcPipeFittingType",IFCPERMIT:"IfcPermit",IFCPERFORMANCEHISTORY:"IfcPerformanceHistory",IFCOUTLETTYPE:"IfcOutletType",IFCORDERACTION:"IfcOrderAction",IFCOPENINGELEMENT:"IfcOpeningElement",IFCOCCUPANT:"IfcOccupant",IFCMOVE:"IfcMove",IFCMOTORCONNECTIONTYPE:"IfcMotorConnectionType",IFCMEMBERTYPE:"IfcMemberType",IFCMECHANICALFASTENERTYPE:"IfcMechanicalFastenerType",IFCMECHANICALFASTENER:"IfcMechanicalFastener",IFCLINEARDIMENSION:"IfcLinearDimension",IFCLIGHTFIXTURETYPE:"IfcLightFixtureType",IFCLAMPTYPE:"IfcLampType",IFCLABORRESOURCE:"IfcLaborResource",IFCJUNCTIONBOXTYPE:"IfcJunctionBoxType",IFCINVENTORY:"IfcInventory",IFCHUMIDIFIERTYPE:"IfcHumidifierType",IFCHEATEXCHANGERTYPE:"IfcHeatExchangerType",IFCGROUP:"IfcGroup",IFCGRID:"IfcGrid",IFCGASTERMINALTYPE:"IfcGasTerminalType",IFCFURNITURESTANDARD:"IfcFurnitureStandard",IFCFURNISHINGELEMENT:"IfcFurnishingElement",IFCFLOWTREATMENTDEVICETYPE:"IfcFlowTreatmentDeviceType",IFCFLOWTERMINALTYPE:"IfcFlowTerminalType",IFCFLOWSTORAGEDEVICETYPE:"IfcFlowStorageDeviceType",IFCFLOWSEGMENTTYPE:"IfcFlowSegmentType",IFCFLOWMOVINGDEVICETYPE:"IfcFlowMovingDeviceType",IFCFLOWMETERTYPE:"IfcFlowMeterType",IFCFLOWFITTINGTYPE:"IfcFlowFittingType",IFCFLOWCONTROLLERTYPE:"IfcFlowControllerType",IFCFEATUREELEMENTSUBTRACTION:"IfcFeatureElementSubtraction",IFCFEATUREELEMENTADDITION:"IfcFeatureElementAddition",IFCFEATUREELEMENT:"IfcFeatureElement",IFCFASTENERTYPE:"IfcFastenerType",IFCFASTENER:"IfcFastener",IFCFACETEDBREPWITHVOIDS:"IfcFacetedBrepWithVoids",IFCFACETEDBREP:"IfcFacetedBrep",IFCEVAPORATORTYPE:"IfcEvaporatorType",IFCEVAPORATIVECOOLERTYPE:"IfcEvaporativeCoolerType",IFCEQUIPMENTSTANDARD:"IfcEquipmentStandard",IFCEQUIPMENTELEMENT:"IfcEquipmentElement",IFCENERGYCONVERSIONDEVICETYPE:"IfcEnergyConversionDeviceType",IFCELLIPSE:"IfcEllipse",IFCELEMENTCOMPONENTTYPE:"IfcElementComponentType",IFCELEMENTCOMPONENT:"IfcElementComponent",IFCELEMENTASSEMBLY:"IfcElementAssembly",IFCELEMENT:"IfcElement",IFCELECTRICALBASEPROPERTIES:"IfcElectricalBaseProperties",IFCDISTRIBUTIONFLOWELEMENTTYPE:"IfcDistributionFlowElementType",IFCDISTRIBUTIONELEMENTTYPE:"IfcDistributionElementType",IFCDIMENSIONCURVEDIRECTEDCALLOUT:"IfcDimensionCurveDirectedCallout",IFCCURTAINWALLTYPE:"IfcCurtainWallType",IFCCREWRESOURCE:"IfcCrewResource",IFCCOVERINGTYPE:"IfcCoveringType",IFCCOSTSCHEDULE:"IfcCostSchedule",IFCCOSTITEM:"IfcCostItem",IFCCONTROL:"IfcControl",IFCCONSTRUCTIONRESOURCE:"IfcConstructionResource",IFCCONIC:"IfcConic",IFCCOMPOSITECURVE:"IfcCompositeCurve",IFCCOLUMNTYPE:"IfcColumnType",IFCCIRCLEHOLLOWPROFILEDEF:"IfcCircleHollowProfileDef",IFCBUILDINGSTOREY:"IfcBuildingStorey",IFCBUILDINGELEMENTTYPE:"IfcBuildingElementType",IFCBUILDING:"IfcBuilding",IFCBOUNDEDCURVE:"IfcBoundedCurve",IFCBOOLEANCLIPPINGRESULT:"IfcBooleanClippingResult",IFCBLOCK:"IfcBlock",IFCASYMMETRICISHAPEPROFILEDEF:"IfcAsymmetricIShapeProfileDef",IFCANNOTATION:"IfcAnnotation",IFCACTOR:"IfcActor",IFCTRANSPORTELEMENTTYPE:"IfcTransportElementType",IFCTASK:"IfcTask",IFCSYSTEMFURNITUREELEMENTTYPE:"IfcSystemFurnitureElementType",IFCSURFACEOFREVOLUTION:"IfcSurfaceOfRevolution",IFCSURFACEOFLINEAREXTRUSION:"IfcSurfaceOfLinearExtrusion",IFCSURFACECURVESWEPTAREASOLID:"IfcSurfaceCurveSweptAreaSolid",IFCSTRUCTUREDDIMENSIONCALLOUT:"IfcStructuredDimensionCallout",IFCSTRUCTURALSURFACEMEMBERVARYING:"IfcStructuralSurfaceMemberVarying",IFCSTRUCTURALSURFACEMEMBER:"IfcStructuralSurfaceMember",IFCSTRUCTURALREACTION:"IfcStructuralReaction",IFCSTRUCTURALMEMBER:"IfcStructuralMember",IFCSTRUCTURALITEM:"IfcStructuralItem",IFCSTRUCTURALACTIVITY:"IfcStructuralActivity",IFCSPHERE:"IfcSphere",IFCSPATIALSTRUCTUREELEMENTTYPE:"IfcSpatialStructureElementType",IFCSPATIALSTRUCTUREELEMENT:"IfcSpatialStructureElement",IFCRIGHTCIRCULARCYLINDER:"IfcRightCircularCylinder",IFCRIGHTCIRCULARCONE:"IfcRightCircularCone",IFCREVOLVEDAREASOLID:"IfcRevolvedAreaSolid",IFCRESOURCE:"IfcResource",IFCRELVOIDSELEMENT:"IfcRelVoidsElement",IFCRELSPACEBOUNDARY:"IfcRelSpaceBoundary",IFCRELSERVICESBUILDINGS:"IfcRelServicesBuildings",IFCRELSEQUENCE:"IfcRelSequence",IFCRELSCHEDULESCOSTITEMS:"IfcRelSchedulesCostItems",IFCRELREFERENCEDINSPATIALSTRUCTURE:"IfcRelReferencedInSpatialStructure",IFCRELPROJECTSELEMENT:"IfcRelProjectsElement",IFCRELOVERRIDESPROPERTIES:"IfcRelOverridesProperties",IFCRELOCCUPIESSPACES:"IfcRelOccupiesSpaces",IFCRELNESTS:"IfcRelNests",IFCRELINTERACTIONREQUIREMENTS:"IfcRelInteractionRequirements",IFCRELFLOWCONTROLELEMENTS:"IfcRelFlowControlElements",IFCRELFILLSELEMENT:"IfcRelFillsElement",IFCRELDEFINESBYTYPE:"IfcRelDefinesByType",IFCRELDEFINESBYPROPERTIES:"IfcRelDefinesByProperties",IFCRELDEFINES:"IfcRelDefines",IFCRELDECOMPOSES:"IfcRelDecomposes",IFCRELCOVERSSPACES:"IfcRelCoversSpaces",IFCRELCOVERSBLDGELEMENTS:"IfcRelCoversBldgElements",IFCRELCONTAINEDINSPATIALSTRUCTURE:"IfcRelContainedInSpatialStructure",IFCRELCONNECTSWITHREALIZINGELEMENTS:"IfcRelConnectsWithRealizingElements",IFCRELCONNECTSWITHECCENTRICITY:"IfcRelConnectsWithEccentricity",IFCRELCONNECTSSTRUCTURALMEMBER:"IfcRelConnectsStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT:"IfcRelConnectsStructuralElement",IFCRELCONNECTSSTRUCTURALACTIVITY:"IfcRelConnectsStructuralActivity",IFCRELCONNECTSPORTS:"IfcRelConnectsPorts",IFCRELCONNECTSPORTTOELEMENT:"IfcRelConnectsPortToElement",IFCRELCONNECTSPATHELEMENTS:"IfcRelConnectsPathElements",IFCRELCONNECTSELEMENTS:"IfcRelConnectsElements",IFCRELCONNECTS:"IfcRelConnects",IFCRELASSOCIATESPROFILEPROPERTIES:"IfcRelAssociatesProfileProperties",IFCRELASSOCIATESMATERIAL:"IfcRelAssociatesMaterial",IFCRELASSOCIATESLIBRARY:"IfcRelAssociatesLibrary",IFCRELASSOCIATESDOCUMENT:"IfcRelAssociatesDocument",IFCRELASSOCIATESCONSTRAINT:"IfcRelAssociatesConstraint",IFCRELASSOCIATESCLASSIFICATION:"IfcRelAssociatesClassification",IFCRELASSOCIATESAPPROVAL:"IfcRelAssociatesApproval",IFCRELASSOCIATESAPPLIEDVALUE:"IfcRelAssociatesAppliedValue",IFCRELASSOCIATES:"IfcRelAssociates",IFCRELASSIGNSTORESOURCE:"IfcRelAssignsToResource",IFCRELASSIGNSTOPROJECTORDER:"IfcRelAssignsToProjectOrder",IFCRELASSIGNSTOPRODUCT:"IfcRelAssignsToProduct",IFCRELASSIGNSTOPROCESS:"IfcRelAssignsToProcess",IFCRELASSIGNSTOGROUP:"IfcRelAssignsToGroup",IFCRELASSIGNSTOCONTROL:"IfcRelAssignsToControl",IFCRELASSIGNSTOACTOR:"IfcRelAssignsToActor",IFCRELASSIGNS:"IfcRelAssigns",IFCRECTANGULARTRIMMEDSURFACE:"IfcRectangularTrimmedSurface",IFCRECTANGULARPYRAMID:"IfcRectangularPyramid",IFCRECTANGLEHOLLOWPROFILEDEF:"IfcRectangleHollowProfileDef",IFCPROXY:"IfcProxy",IFCPROPERTYSET:"IfcPropertySet",IFCPROJECTIONCURVE:"IfcProjectionCurve",IFCPROJECT:"IfcProject",IFCPRODUCT:"IfcProduct",IFCPROCESS:"IfcProcess",IFCPLANE:"IfcPlane",IFCPLANARBOX:"IfcPlanarBox",IFCPERMEABLECOVERINGPROPERTIES:"IfcPermeableCoveringProperties",IFCOFFSETCURVE3D:"IfcOffsetCurve3D",IFCOFFSETCURVE2D:"IfcOffsetCurve2D",IFCOBJECT:"IfcObject",IFCMANIFOLDSOLIDBREP:"IfcManifoldSolidBrep",IFCLINE:"IfcLine",IFCLSHAPEPROFILEDEF:"IfcLShapeProfileDef",IFCISHAPEPROFILEDEF:"IfcIShapeProfileDef",IFCGEOMETRICCURVESET:"IfcGeometricCurveSet",IFCFURNITURETYPE:"IfcFurnitureType",IFCFURNISHINGELEMENTTYPE:"IfcFurnishingElementType",IFCFLUIDFLOWPROPERTIES:"IfcFluidFlowProperties",IFCFILLAREASTYLETILES:"IfcFillAreaStyleTiles",IFCFILLAREASTYLETILESYMBOLWITHSTYLE:"IfcFillAreaStyleTileSymbolWithStyle",IFCFILLAREASTYLEHATCHING:"IfcFillAreaStyleHatching",IFCFACEBASEDSURFACEMODEL:"IfcFaceBasedSurfaceModel",IFCEXTRUDEDAREASOLID:"IfcExtrudedAreaSolid",IFCENERGYPROPERTIES:"IfcEnergyProperties",IFCELLIPSEPROFILEDEF:"IfcEllipseProfileDef",IFCELEMENTARYSURFACE:"IfcElementarySurface",IFCELEMENTTYPE:"IfcElementType",IFCELEMENTQUANTITY:"IfcElementQuantity",IFCEDGELOOP:"IfcEdgeLoop",IFCDRAUGHTINGPREDEFINEDCURVEFONT:"IfcDraughtingPredefinedCurveFont",IFCDRAUGHTINGPREDEFINEDCOLOUR:"IfcDraughtingPredefinedColour",IFCDRAUGHTINGCALLOUT:"IfcDraughtingCallout",IFCDOORSTYLE:"IfcDoorStyle",IFCDOORPANELPROPERTIES:"IfcDoorPanelProperties",IFCDOORLININGPROPERTIES:"IfcDoorLiningProperties",IFCDIRECTION:"IfcDirection",IFCDIMENSIONCURVETERMINATOR:"IfcDimensionCurveTerminator",IFCDIMENSIONCURVE:"IfcDimensionCurve",IFCDEFINEDSYMBOL:"IfcDefinedSymbol",IFCCURVEBOUNDEDPLANE:"IfcCurveBoundedPlane",IFCCURVE:"IfcCurve",IFCCSGSOLID:"IfcCsgSolid",IFCCSGPRIMITIVE3D:"IfcCsgPrimitive3D",IFCCRANERAILFSHAPEPROFILEDEF:"IfcCraneRailFShapeProfileDef",IFCCRANERAILASHAPEPROFILEDEF:"IfcCraneRailAShapeProfileDef",IFCCOMPOSITECURVESEGMENT:"IfcCompositeCurveSegment",IFCCLOSEDSHELL:"IfcClosedShell",IFCCIRCLEPROFILEDEF:"IfcCircleProfileDef",IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM:"IfcCartesianTransformationOperator3DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR3D:"IfcCartesianTransformationOperator3D",IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM:"IfcCartesianTransformationOperator2DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR2D:"IfcCartesianTransformationOperator2D",IFCCARTESIANTRANSFORMATIONOPERATOR:"IfcCartesianTransformationOperator",IFCCARTESIANPOINT:"IfcCartesianPoint",IFCCSHAPEPROFILEDEF:"IfcCShapeProfileDef",IFCBOXEDHALFSPACE:"IfcBoxedHalfSpace",IFCBOUNDINGBOX:"IfcBoundingBox",IFCBOUNDEDSURFACE:"IfcBoundedSurface",IFCBOOLEANRESULT:"IfcBooleanResult",IFCAXIS2PLACEMENT3D:"IfcAxis2Placement3D",IFCAXIS2PLACEMENT2D:"IfcAxis2Placement2D",IFCAXIS1PLACEMENT:"IfcAxis1Placement",IFCANNOTATIONSURFACE:"IfcAnnotationSurface",IFCANNOTATIONFILLAREAOCCURRENCE:"IfcAnnotationFillAreaOccurrence",IFCANNOTATIONFILLAREA:"IfcAnnotationFillArea",IFCANNOTATIONCURVEOCCURRENCE:"IfcAnnotationCurveOccurrence",IFCZSHAPEPROFILEDEF:"IfcZShapeProfileDef",IFCWINDOWSTYLE:"IfcWindowStyle",IFCWINDOWPANELPROPERTIES:"IfcWindowPanelProperties",IFCWINDOWLININGPROPERTIES:"IfcWindowLiningProperties",IFCVERTEXLOOP:"IfcVertexLoop",IFCVECTOR:"IfcVector",IFCUSHAPEPROFILEDEF:"IfcUShapeProfileDef",IFCTYPEPRODUCT:"IfcTypeProduct",IFCTYPEOBJECT:"IfcTypeObject",IFCTWODIRECTIONREPEATFACTOR:"IfcTwoDirectionRepeatFactor",IFCTRAPEZIUMPROFILEDEF:"IfcTrapeziumProfileDef",IFCTEXTLITERALWITHEXTENT:"IfcTextLiteralWithExtent",IFCTEXTLITERAL:"IfcTextLiteral",IFCTERMINATORSYMBOL:"IfcTerminatorSymbol",IFCTSHAPEPROFILEDEF:"IfcTShapeProfileDef",IFCSWEPTSURFACE:"IfcSweptSurface",IFCSWEPTDISKSOLID:"IfcSweptDiskSolid",IFCSWEPTAREASOLID:"IfcSweptAreaSolid",IFCSURFACESTYLERENDERING:"IfcSurfaceStyleRendering",IFCSURFACE:"IfcSurface",IFCSUBEDGE:"IfcSubedge",IFCSTRUCTURALSTEELPROFILEPROPERTIES:"IfcStructuralSteelProfileProperties",IFCSTRUCTURALPROFILEPROPERTIES:"IfcStructuralProfileProperties",IFCSTRUCTURALLOADSINGLEFORCEWARPING:"IfcStructuralLoadSingleForceWarping",IFCSTRUCTURALLOADSINGLEFORCE:"IfcStructuralLoadSingleForce",IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION:"IfcStructuralLoadSingleDisplacementDistortion",IFCSTRUCTURALLOADSINGLEDISPLACEMENT:"IfcStructuralLoadSingleDisplacement",IFCSTRUCTURALLOADPLANARFORCE:"IfcStructuralLoadPlanarForce",IFCSTRUCTURALLOADLINEARFORCE:"IfcStructuralLoadLinearForce",IFCSPACETHERMALLOADPROPERTIES:"IfcSpaceThermalLoadProperties",IFCSOUNDVALUE:"IfcSoundValue",IFCSOUNDPROPERTIES:"IfcSoundProperties",IFCSOLIDMODEL:"IfcSolidModel",IFCSLIPPAGECONNECTIONCONDITION:"IfcSlippageConnectionCondition",IFCSHELLBASEDSURFACEMODEL:"IfcShellBasedSurfaceModel",IFCSERVICELIFEFACTOR:"IfcServiceLifeFactor",IFCSECTIONEDSPINE:"IfcSectionedSpine",IFCROUNDEDRECTANGLEPROFILEDEF:"IfcRoundedRectangleProfileDef",IFCRELATIONSHIP:"IfcRelationship",IFCREINFORCEMENTDEFINITIONPROPERTIES:"IfcReinforcementDefinitionProperties",IFCREGULARTIMESERIES:"IfcRegularTimeSeries",IFCRECTANGLEPROFILEDEF:"IfcRectangleProfileDef",IFCPROPERTYTABLEVALUE:"IfcPropertyTableValue",IFCPROPERTYSINGLEVALUE:"IfcPropertySingleValue",IFCPROPERTYSETDEFINITION:"IfcPropertySetDefinition",IFCPROPERTYREFERENCEVALUE:"IfcPropertyReferenceValue",IFCPROPERTYLISTVALUE:"IfcPropertyListValue",IFCPROPERTYENUMERATEDVALUE:"IfcPropertyEnumeratedValue",IFCPROPERTYDEFINITION:"IfcPropertyDefinition",IFCPROPERTYBOUNDEDVALUE:"IfcPropertyBoundedValue",IFCPRODUCTDEFINITIONSHAPE:"IfcProductDefinitionShape",IFCPREDEFINEDPOINTMARKERSYMBOL:"IfcPredefinedPointMarkerSymbol",IFCPREDEFINEDDIMENSIONSYMBOL:"IfcPredefinedDimensionSymbol",IFCPREDEFINEDCURVEFONT:"IfcPredefinedCurveFont",IFCPREDEFINEDCOLOUR:"IfcPredefinedColour",IFCPOLYGONALBOUNDEDHALFSPACE:"IfcPolygonalBoundedHalfSpace",IFCPOLYLOOP:"IfcPolyLoop",IFCPOINTONSURFACE:"IfcPointOnSurface",IFCPOINTONCURVE:"IfcPointOnCurve",IFCPOINT:"IfcPoint",IFCPLANAREXTENT:"IfcPlanarExtent",IFCPLACEMENT:"IfcPlacement",IFCPIXELTEXTURE:"IfcPixelTexture",IFCPHYSICALCOMPLEXQUANTITY:"IfcPhysicalComplexQuantity",IFCPATH:"IfcPath",IFCPARAMETERIZEDPROFILEDEF:"IfcParameterizedProfileDef",IFCORIENTEDEDGE:"IfcOrientedEdge",IFCOPENSHELL:"IfcOpenShell",IFCONEDIRECTIONREPEATFACTOR:"IfcOneDirectionRepeatFactor",IFCOBJECTDEFINITION:"IfcObjectDefinition",IFCMECHANICALCONCRETEMATERIALPROPERTIES:"IfcMechanicalConcreteMaterialProperties",IFCMATERIALDEFINITIONREPRESENTATION:"IfcMaterialDefinitionRepresentation",IFCMAPPEDITEM:"IfcMappedItem",IFCLOOP:"IfcLoop",IFCLOCALPLACEMENT:"IfcLocalPlacement",IFCLIGHTSOURCESPOT:"IfcLightSourceSpot",IFCLIGHTSOURCEPOSITIONAL:"IfcLightSourcePositional",IFCLIGHTSOURCEGONIOMETRIC:"IfcLightSourceGoniometric",IFCLIGHTSOURCEDIRECTIONAL:"IfcLightSourceDirectional",IFCLIGHTSOURCEAMBIENT:"IfcLightSourceAmbient",IFCLIGHTSOURCE:"IfcLightSource",IFCIRREGULARTIMESERIES:"IfcIrregularTimeSeries",IFCIMAGETEXTURE:"IfcImageTexture",IFCHYGROSCOPICMATERIALPROPERTIES:"IfcHygroscopicMaterialProperties",IFCHALFSPACESOLID:"IfcHalfSpaceSolid",IFCGRIDPLACEMENT:"IfcGridPlacement",IFCGEOMETRICSET:"IfcGeometricSet",IFCGEOMETRICREPRESENTATIONSUBCONTEXT:"IfcGeometricRepresentationSubContext",IFCGEOMETRICREPRESENTATIONITEM:"IfcGeometricRepresentationItem",IFCGEOMETRICREPRESENTATIONCONTEXT:"IfcGeometricRepresentationContext",IFCGENERALPROFILEPROPERTIES:"IfcGeneralProfileProperties",IFCGENERALMATERIALPROPERTIES:"IfcGeneralMaterialProperties",IFCFUELPROPERTIES:"IfcFuelProperties",IFCFILLAREASTYLE:"IfcFillAreaStyle",IFCFAILURECONNECTIONCONDITION:"IfcFailureConnectionCondition",IFCFACESURFACE:"IfcFaceSurface",IFCFACEOUTERBOUND:"IfcFaceOuterBound",IFCFACEBOUND:"IfcFaceBound",IFCFACE:"IfcFace",IFCEXTENDEDMATERIALPROPERTIES:"IfcExtendedMaterialProperties",IFCEDGECURVE:"IfcEdgeCurve",IFCEDGE:"IfcEdge",IFCDRAUGHTINGPREDEFINEDTEXTFONT:"IfcDraughtingPredefinedTextFont",IFCDOCUMENTREFERENCE:"IfcDocumentReference",IFCDIMENSIONPAIR:"IfcDimensionPair",IFCDIMENSIONCALLOUTRELATIONSHIP:"IfcDimensionCalloutRelationship",IFCDERIVEDPROFILEDEF:"IfcDerivedProfileDef",IFCCURVESTYLE:"IfcCurveStyle",IFCCONVERSIONBASEDUNIT:"IfcConversionBasedUnit",IFCCONTEXTDEPENDENTUNIT:"IfcContextDependentUnit",IFCCONNECTIONPOINTECCENTRICITY:"IfcConnectionPointEccentricity",IFCCONNECTIONCURVEGEOMETRY:"IfcConnectionCurveGeometry",IFCCONNECTEDFACESET:"IfcConnectedFaceSet",IFCCOMPOSITEPROFILEDEF:"IfcCompositeProfileDef",IFCCOMPLEXPROPERTY:"IfcComplexProperty",IFCCOLOURRGB:"IfcColourRgb",IFCCLASSIFICATIONREFERENCE:"IfcClassificationReference",IFCCENTERLINEPROFILEDEF:"IfcCenterLineProfileDef",IFCBLOBTEXTURE:"IfcBlobTexture",IFCARBITRARYPROFILEDEFWITHVOIDS:"IfcArbitraryProfileDefWithVoids",IFCARBITRARYOPENPROFILEDEF:"IfcArbitraryOpenProfileDef",IFCARBITRARYCLOSEDPROFILEDEF:"IfcArbitraryClosedProfileDef",IFCANNOTATIONTEXTOCCURRENCE:"IfcAnnotationTextOccurrence",IFCANNOTATIONSYMBOLOCCURRENCE:"IfcAnnotationSymbolOccurrence",IFCANNOTATIONSURFACEOCCURRENCE:"IfcAnnotationSurfaceOccurrence",IFCANNOTATIONOCCURRENCE:"IfcAnnotationOccurrence",IFCWATERPROPERTIES:"IfcWaterProperties",IFCVIRTUALGRIDINTERSECTION:"IfcVirtualGridIntersection",IFCVERTEXPOINT:"IfcVertexPoint",IFCVERTEXBASEDTEXTUREMAP:"IfcVertexBasedTextureMap",IFCVERTEX:"IfcVertex",IFCUNITASSIGNMENT:"IfcUnitAssignment",IFCTOPOLOGYREPRESENTATION:"IfcTopologyRepresentation",IFCTOPOLOGICALREPRESENTATIONITEM:"IfcTopologicalRepresentationItem",IFCTIMESERIESVALUE:"IfcTimeSeriesValue",IFCTIMESERIESREFERENCERELATIONSHIP:"IfcTimeSeriesReferenceRelationship",IFCTIMESERIES:"IfcTimeSeries",IFCTHERMALMATERIALPROPERTIES:"IfcThermalMaterialProperties",IFCTEXTUREVERTEX:"IfcTextureVertex",IFCTEXTUREMAP:"IfcTextureMap",IFCTEXTURECOORDINATEGENERATOR:"IfcTextureCoordinateGenerator",IFCTEXTURECOORDINATE:"IfcTextureCoordinate",IFCTEXTSTYLEWITHBOXCHARACTERISTICS:"IfcTextStyleWithBoxCharacteristics",IFCTEXTSTYLETEXTMODEL:"IfcTextStyleTextModel",IFCTEXTSTYLEFORDEFINEDFONT:"IfcTextStyleForDefinedFont",IFCTEXTSTYLEFONTMODEL:"IfcTextStyleFontModel",IFCTEXTSTYLE:"IfcTextStyle",IFCTELECOMADDRESS:"IfcTelecomAddress",IFCTABLEROW:"IfcTableRow",IFCTABLE:"IfcTable",IFCSYMBOLSTYLE:"IfcSymbolStyle",IFCSURFACETEXTURE:"IfcSurfaceTexture",IFCSURFACESTYLEWITHTEXTURES:"IfcSurfaceStyleWithTextures",IFCSURFACESTYLESHADING:"IfcSurfaceStyleShading",IFCSURFACESTYLEREFRACTION:"IfcSurfaceStyleRefraction",IFCSURFACESTYLELIGHTING:"IfcSurfaceStyleLighting",IFCSURFACESTYLE:"IfcSurfaceStyle",IFCSTYLEDREPRESENTATION:"IfcStyledRepresentation",IFCSTYLEDITEM:"IfcStyledItem",IFCSTYLEMODEL:"IfcStyleModel",IFCSTRUCTURALLOADTEMPERATURE:"IfcStructuralLoadTemperature",IFCSTRUCTURALLOADSTATIC:"IfcStructuralLoadStatic",IFCSTRUCTURALLOAD:"IfcStructuralLoad",IFCSTRUCTURALCONNECTIONCONDITION:"IfcStructuralConnectionCondition",IFCSIMPLEPROPERTY:"IfcSimpleProperty",IFCSHAPEREPRESENTATION:"IfcShapeRepresentation",IFCSHAPEMODEL:"IfcShapeModel",IFCSHAPEASPECT:"IfcShapeAspect",IFCSECTIONREINFORCEMENTPROPERTIES:"IfcSectionReinforcementProperties",IFCSECTIONPROPERTIES:"IfcSectionProperties",IFCSIUNIT:"IfcSIUnit",IFCROOT:"IfcRoot",IFCRIBPLATEPROFILEPROPERTIES:"IfcRibPlateProfileProperties",IFCREPRESENTATIONMAP:"IfcRepresentationMap",IFCREPRESENTATIONITEM:"IfcRepresentationItem",IFCREPRESENTATIONCONTEXT:"IfcRepresentationContext",IFCREPRESENTATION:"IfcRepresentation",IFCRELAXATION:"IfcRelaxation",IFCREINFORCEMENTBARPROPERTIES:"IfcReinforcementBarProperties",IFCREFERENCESVALUEDOCUMENT:"IfcReferencesValueDocument",IFCQUANTITYWEIGHT:"IfcQuantityWeight",IFCQUANTITYVOLUME:"IfcQuantityVolume",IFCQUANTITYTIME:"IfcQuantityTime",IFCQUANTITYLENGTH:"IfcQuantityLength",IFCQUANTITYCOUNT:"IfcQuantityCount",IFCQUANTITYAREA:"IfcQuantityArea",IFCPROPERTYENUMERATION:"IfcPropertyEnumeration",IFCPROPERTYDEPENDENCYRELATIONSHIP:"IfcPropertyDependencyRelationship",IFCPROPERTYCONSTRAINTRELATIONSHIP:"IfcPropertyConstraintRelationship",IFCPROPERTY:"IfcProperty",IFCPROFILEPROPERTIES:"IfcProfileProperties",IFCPROFILEDEF:"IfcProfileDef",IFCPRODUCTSOFCOMBUSTIONPROPERTIES:"IfcProductsOfCombustionProperties",IFCPRODUCTREPRESENTATION:"IfcProductRepresentation",IFCPRESENTATIONSTYLEASSIGNMENT:"IfcPresentationStyleAssignment",IFCPRESENTATIONSTYLE:"IfcPresentationStyle",IFCPRESENTATIONLAYERWITHSTYLE:"IfcPresentationLayerWithStyle",IFCPRESENTATIONLAYERASSIGNMENT:"IfcPresentationLayerAssignment",IFCPREDEFINEDTEXTFONT:"IfcPredefinedTextFont",IFCPREDEFINEDTERMINATORSYMBOL:"IfcPredefinedTerminatorSymbol",IFCPREDEFINEDSYMBOL:"IfcPredefinedSymbol",IFCPREDEFINEDITEM:"IfcPredefinedItem",IFCPOSTALADDRESS:"IfcPostalAddress",IFCPHYSICALSIMPLEQUANTITY:"IfcPhysicalSimpleQuantity",IFCPHYSICALQUANTITY:"IfcPhysicalQuantity",IFCPERSONANDORGANIZATION:"IfcPersonAndOrganization",IFCPERSON:"IfcPerson",IFCOWNERHISTORY:"IfcOwnerHistory",IFCORGANIZATIONRELATIONSHIP:"IfcOrganizationRelationship",IFCORGANIZATION:"IfcOrganization",IFCOPTICALMATERIALPROPERTIES:"IfcOpticalMaterialProperties",IFCOBJECTIVE:"IfcObjective",IFCOBJECTPLACEMENT:"IfcObjectPlacement",IFCNAMEDUNIT:"IfcNamedUnit",IFCMONETARYUNIT:"IfcMonetaryUnit",IFCMETRIC:"IfcMetric",IFCMECHANICALSTEELMATERIALPROPERTIES:"IfcMechanicalSteelMaterialProperties",IFCMECHANICALMATERIALPROPERTIES:"IfcMechanicalMaterialProperties",IFCMEASUREWITHUNIT:"IfcMeasureWithUnit",IFCMATERIALPROPERTIES:"IfcMaterialProperties",IFCMATERIALLIST:"IfcMaterialList",IFCMATERIALLAYERSETUSAGE:"IfcMaterialLayerSetUsage",IFCMATERIALLAYERSET:"IfcMaterialLayerSet",IFCMATERIALLAYER:"IfcMaterialLayer",IFCMATERIALCLASSIFICATIONRELATIONSHIP:"IfcMaterialClassificationRelationship",IFCMATERIAL:"IfcMaterial",IFCLOCALTIME:"IfcLocalTime",IFCLIGHTINTENSITYDISTRIBUTION:"IfcLightIntensityDistribution",IFCLIGHTDISTRIBUTIONDATA:"IfcLightDistributionData",IFCLIBRARYREFERENCE:"IfcLibraryReference",IFCLIBRARYINFORMATION:"IfcLibraryInformation",IFCIRREGULARTIMESERIESVALUE:"IfcIrregularTimeSeriesValue",IFCGRIDAXIS:"IfcGridAxis",IFCEXTERNALLYDEFINEDTEXTFONT:"IfcExternallyDefinedTextFont",IFCEXTERNALLYDEFINEDSYMBOL:"IfcExternallyDefinedSymbol",IFCEXTERNALLYDEFINEDSURFACESTYLE:"IfcExternallyDefinedSurfaceStyle",IFCEXTERNALLYDEFINEDHATCHSTYLE:"IfcExternallyDefinedHatchStyle",IFCEXTERNALREFERENCE:"IfcExternalReference",IFCENVIRONMENTALIMPACTVALUE:"IfcEnvironmentalImpactValue",IFCDRAUGHTINGCALLOUTRELATIONSHIP:"IfcDraughtingCalloutRelationship",IFCDOCUMENTINFORMATIONRELATIONSHIP:"IfcDocumentInformationRelationship",IFCDOCUMENTINFORMATION:"IfcDocumentInformation",IFCDOCUMENTELECTRONICFORMAT:"IfcDocumentElectronicFormat",IFCDIMENSIONALEXPONENTS:"IfcDimensionalExponents",IFCDERIVEDUNITELEMENT:"IfcDerivedUnitElement",IFCDERIVEDUNIT:"IfcDerivedUnit",IFCDATEANDTIME:"IfcDateAndTime",IFCCURVESTYLEFONTPATTERN:"IfcCurveStyleFontPattern",IFCCURVESTYLEFONTANDSCALING:"IfcCurveStyleFontAndScaling",IFCCURVESTYLEFONT:"IfcCurveStyleFont",IFCCURRENCYRELATIONSHIP:"IfcCurrencyRelationship",IFCCOSTVALUE:"IfcCostValue",IFCCOORDINATEDUNIVERSALTIMEOFFSET:"IfcCoordinatedUniversalTimeOffset",IFCCONSTRAINTRELATIONSHIP:"IfcConstraintRelationship",IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP:"IfcConstraintClassificationRelationship",IFCCONSTRAINTAGGREGATIONRELATIONSHIP:"IfcConstraintAggregationRelationship",IFCCONSTRAINT:"IfcConstraint",IFCCONNECTIONSURFACEGEOMETRY:"IfcConnectionSurfaceGeometry",IFCCONNECTIONPORTGEOMETRY:"IfcConnectionPortGeometry",IFCCONNECTIONPOINTGEOMETRY:"IfcConnectionPointGeometry",IFCCONNECTIONGEOMETRY:"IfcConnectionGeometry",IFCCOLOURSPECIFICATION:"IfcColourSpecification",IFCCLASSIFICATIONNOTATIONFACET:"IfcClassificationNotationFacet",IFCCLASSIFICATIONNOTATION:"IfcClassificationNotation",IFCCLASSIFICATIONITEMRELATIONSHIP:"IfcClassificationItemRelationship",IFCCLASSIFICATIONITEM:"IfcClassificationItem",IFCCLASSIFICATION:"IfcClassification",IFCCALENDARDATE:"IfcCalendarDate",IFCBOUNDARYNODECONDITIONWARPING:"IfcBoundaryNodeConditionWarping",IFCBOUNDARYNODECONDITION:"IfcBoundaryNodeCondition",IFCBOUNDARYFACECONDITION:"IfcBoundaryFaceCondition",IFCBOUNDARYEDGECONDITION:"IfcBoundaryEdgeCondition",IFCBOUNDARYCONDITION:"IfcBoundaryCondition",IFCAPPROVALRELATIONSHIP:"IfcApprovalRelationship",IFCAPPROVALPROPERTYRELATIONSHIP:"IfcApprovalPropertyRelationship",IFCAPPROVALACTORRELATIONSHIP:"IfcApprovalActorRelationship",IFCAPPROVAL:"IfcApproval",IFCAPPLIEDVALUERELATIONSHIP:"IfcAppliedValueRelationship",IFCAPPLIEDVALUE:"IfcAppliedValue",IFCAPPLICATION:"IfcApplication",IFCADDRESS:"IfcAddress",IFCACTORROLE:"IfcActorRole"};class Fu{constructor(){T(this,"factor",1),T(this,"complement",1)}apply(e){const t=this.getScaleMatrix().multiply(e);e.copy(t)}setUp(e){var t,i,s;this.factor=1;const n=this.getLengthUnits(e);if(!n)return;const r=n==null,o=n.Name===void 0||n.Name===null;r||o||(n.Name.value==="FOOT"&&(this.factor=.3048),((t=n.Prefix)==null?void 0:t.value)==="MILLI"?this.complement=.001:((i=n.Prefix)==null?void 0:i.value)==="CENTI"?this.complement=.01:((s=n.Prefix)==null?void 0:s.value)==="DECI"&&(this.complement=.01))}getLengthUnits(e){try{const t=e.GetLineIDsWithType(0,Xc).get(0),i=e.GetLine(0,t);for(const s of i.Units){if(!s||s.value===null||s.value===void 0)continue;const n=e.GetLine(0,s.value);if(n.UnitType&&n.UnitType.value==="LENGTHUNIT")return n}return null}catch{return console.log("Could not get units"),null}}getScaleMatrix(){const e=this.factor;return new ne().fromArray([e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1])}}class cl{constructor(){T(this,"itemsByFloor",{}),T(this,"_units",new Fu)}setUp(e){this._units.setUp(e),this.cleanUp();try{const t=e.GetLineIDsWithType(0,Ln),i=new Set,s=e.GetLineIDsWithType(0,Ti);for(let l=0;l0&&!r.has(n)||this.settings.excludedCategories.has(n))continue;const o=this.webIfc.GetLineIDsWithType(0,n),a=o.size();for(let l=0;l{this.getMesh(n,t)});for(const n of this._visitedFragments){const{index:r,fragment:o}=n[1];t.keyFragments.set(r,o.id)}for(const n of t.items){const r=this._fragmentInstances.get(n.id);if(!r)throw new Error("Fragment not found!");const o=[];for(const[a,l]of r)o.push(l);n.add(o)}const s=this.webIfc.GetCoordinationMatrix(0);return t.coordinationMatrix.fromArray(s),t.civilData=this._civil.read(this.webIfc),t}getMesh(e,t){const i=e.geometries.size(),s=e.expressID;for(let n=0;nr.value!==i),await e.setProperties(i,null),this.registerChange(e,t,i))}addElementToPset(e,t,...i){this.components.get(it).addEntitiesRelation(e,t,{type:Os,inv:"DefinesOcurrence"},...i)}async addPropToPset(e,t,...i){const s=await e.getProperties(t);if(s){for(const n of i){if(s.HasProperties.includes(n))continue;const r=new Qt(n);s.HasProperties.push(r),this.onPropToPset.trigger({model:e,psetID:t,propID:n})}this.registerChange(e,t)}}async createIfcRel(e,t,i,s){const n=Pu[t];if(!n)throw new Error(`IfcPropertiesManager: ${n} is unsoported.`);const r=ci.getIFCSchema(e),o=Nu[n],a=yt[r][n];if(!(o&&a))throw new Error(`IfcPropertiesManager: ${n} is unsoported.`);const l=[new yt[r].IfcGloballyUniqueId(Ht.create())],{related:h,relating:d}=o,u=[...new Set(s)].map(p=>new Qt(p)),f=(p,E)=>{for(let I=p;IparseInt(r,10)),s=t[i[0]],n=new Qt(s.expressID);return{entity:s,handle:n}}registerChange(e,...t){this.changeMap[e.uuid]||(this.changeMap[e.uuid]=new Set);for(const i of t)this.changeMap[e.uuid].add(i),this.onDataChanged.trigger({model:e,expressID:i})}async newSingleProperty(e,t,i,s){const n=ci.getIFCSchema(e),r=new yt[n].IfcIdentifier(i),o=new yt[n][t](s),a=new yt[n].IfcPropertySingleValue(r,null,o,null);return a.expressID=this.getNewExpressID(e),await this.setData(e,a),a}};T(El,"uuid","58c2d9f0-183c-48d6-a402-dfcf5b9a34df");let bu=El;const gl=class Or extends de{constructor(e){super(e),T(this,"onDisposed",new Y),T(this,"onRelationsIndexed",new Y),T(this,"relationMaps",{}),T(this,"enabled",!0),T(this,"_relToAttributesMap",ha),T(this,"_inverseAttributes",["IsDecomposedBy","Decomposes","AssociatedTo","HasAssociations","ClassificationForObjects","IsGroupedBy","HasAssignments","IsDefinedBy","DefinesOcurrence","IsTypedBy","Types","Defines","ContainedInStructure","ContainsElements","HasControlElements","AssignedToFlowElement","ConnectedTo","ConnectedFrom","ReferencedBy","Declares","HasContext","Controls","IsNestedBy","Nests","DocumentRefForObjects"]),T(this,"_ifcRels",[Dn,Zr,jr,Qr,Os,Kr,qr,Ln,Jr,$r,eo,to,io,so,no]),T(this,"onFragmentsDisposed",t=>{delete this.relationMaps[t.groupID]}),T(this,"_changeMap",{}),T(this,"onEntitiesRelated",new Y),this.components.add(Or.uuid,this),e.get(ue).onFragmentsDisposed.add(this.onFragmentsDisposed)}indexRelations(e,t,i,s){const n=Object.keys(t).find(h=>h.startsWith("Relating")),r=Object.keys(t).find(h=>h.startsWith("Related"));if(!(n&&r))return;const o=t[n].value,a=t[r].map(h=>h.value),l=this.getEntityRelations(e,o,s);for(const h of a)l.push(h);for(const h of a)this.getEntityRelations(e,h,i).push(o)}getAttributeIndex(e){const t=this._inverseAttributes.indexOf(e);if(t===-1)throw new Error(`IfcRelationsIndexer: ${e} is not a valid IFC Inverse Attribute name or its not supported yet by this component.`);return t}setRelationMap(e,t){this.relationMaps[e.uuid]=t,this.onRelationsIndexed.trigger({modelID:e.uuid,relationsMap:t})}async process(e,t){if(!e.hasProperties)throw new Error("FragmentsGroup properties not found");let i=this.relationMaps[e.uuid];i||(i=new Map,this.relationMaps[e.uuid]=i);const s=e.getLocalProperties();if(!s)return i;const n=(t==null?void 0:t.relationsToProcess)??this._ifcRels;for(const[r,o]of Object.entries(s)){if(!n.includes(o.type))continue;const a=this._relToAttributesMap.get(o.type);if(!a)continue;const{forRelated:l,forRelating:h}=a;this.indexRelations(i,o,l,h)}return this.setRelationMap(e,i),i}async processFromWebIfc(e,t){const i=new Map;for(const s of this._ifcRels){const n=this._relToAttributesMap.get(s);if(!n)continue;const{forRelated:r,forRelating:o}=n,a=e.GetLineIDsWithType(t,s);for(let l=0;lE.startsWith("Related")),p=f.find(E=>E.startsWith("Relating"));if(!(m&&p))continue;u[m]=[...h].map(E=>new Qt(E)),u[p]=new Qt(a),await t.setData(s,u)}else{const u=await t.createIfcRel(s,r,a,[...h]);if(!u)continue;l.relID=u.expressID}}}}addEntitiesRelation(e,t,i,...s){const{type:n,inv:r}=i;let o=this.relationMaps[e.uuid];if(o||(o=new Map,this.relationMaps[e.uuid]=o),!this._ifcRels.includes(n))return;const a=ha.get(n);if(!a)return;const{forRelated:l,forRelating:h}=a;if(!(l===r||h===r))return;let d=this._changeMap[e.uuid];d||(d=new gt,this._changeMap[e.uuid]=d);const u=h===r?[t]:s,f=l===r?[t]:s;let m=d.get(n);m||(m=new gt,m.onItemSet.add(()=>this.onEntitiesRelated.trigger({invAttribute:r,relType:n,relatingIDs:u,relatedIDs:f})),m.onItemUpdated.add(()=>this.onEntitiesRelated.trigger({invAttribute:r,relType:n,relatingIDs:u,relatedIDs:f})),d.set(n,m));for(const p of u){let E=m.get(p);E||(E={related:new Jt},m.set(p,E)),E.related.add(...f)}for(const p of u)this.getEntityRelations(e,p,h).push(...f);for(const p of f)this.getEntityRelations(e,p,l).push(...u)}getEntityChildren(e,t,i=new Set){if(i.add(t),this.relationMaps[e.uuid]===void 0)throw new Error("The provided model has no indices. You have to generate them first.");const s=this.getEntityRelations(e,t,"IsDecomposedBy");if(s)for(const r of s)this.getEntityChildren(e,r,i);const n=this.getEntityRelations(e,t,"ContainsElements");if(n)for(const r of n)this.getEntityChildren(e,r,i);return i}};T(gl,"uuid","23a889ab-83b3-44a4-8bee-ead83438370b");let it=gl;const Cl=class Tl extends de{constructor(e){super(e),T(this,"onDisposed",new Y),T(this,"onFragmentsLoaded",new Y),T(this,"onFragmentsDisposed",new Y),T(this,"list",new gt),T(this,"groups",new gt),T(this,"baseCoordinationModel",""),T(this,"baseCoordinationMatrix",new ne),T(this,"enabled",!0),T(this,"_loader",new _a),this.components.add(Tl.uuid,this)}get meshes(){const e=[];for(const[t,i]of this.list)e.push(i.mesh);return e}dispose(){for(const[e,t]of this.groups)t.dispose(!0);this.baseCoordinationModel="",this.groups.clear(),this.list.clear(),this.onFragmentsLoaded.reset(),this.onFragmentsDisposed.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}disposeGroup(e){const{uuid:t}=e,i=[];for(const s of e.items)i.push(s.id),this.list.delete(s.id);e.dispose(!0),this.groups.delete(e.uuid),this.groups.size===0&&(this.baseCoordinationModel="",this.baseCoordinationMatrix=new ne),this.onFragmentsDisposed.trigger({groupID:t,fragmentIDs:i})}load(e,t){const i={coordinate:!0,...t},{coordinate:s,name:n,properties:r,relationsMap:o}=i,a=this._loader.import(e);t&&(a.isStreamed=t.isStreamed||!1),n&&(a.name=n);for(const l of a.items)l.group=a,this.list.set(l.id,l);return s&&this.coordinate([a]),this.groups.set(a.uuid,a),r&&a.setLocalProperties(r),o&&this.components.get(it).setRelationMap(a,o),this.onFragmentsLoaded.trigger(a),a}export(e){return this._loader.export(e)}getModelIdMap(e){const t={};for(const i in e){const s=this.list.get(i);if(!(s&&s.group))continue;const n=s.group;n.uuid in t||(t[n.uuid]=new Set);const r=e[i];for(const o of r)t[n.uuid].add(o)}return t}modelIdToFragmentIdMap(e){let t={};for(const i in e){const s=this.groups.get(i);if(!s)continue;const n=e[i],r=s.getFragmentMap(n);t={...t,...r}}return t}guidToFragmentIdMap(e){const t={};for(const[i,s]of this.groups){i in t||(t[i]=new Set);for(const n of e){const r=s.globalToExpressIDs.get(n);r&&t[i].add(r)}}return this.modelIdToFragmentIdMap(t)}fragmentIdMapToGuids(e){const t=[],i=this.getModelIdMap(e);for(const s in i){const n=this.groups.get(s);if(!n)continue;const r=i[s];for(const o of r)for(const[a,l]of n.globalToExpressIDs.entries())if(l===o){t.push(a);break}}return t}coordinate(e=Array.from(this.groups.values())){if(this.baseCoordinationModel.length===0){const t=e.pop();if(!t)return;this.baseCoordinationModel=t.uuid,this.baseCoordinationMatrix=t.coordinationMatrix.clone()}if(e.length)for(const t of e)t.coordinationMatrix.equals(this.baseCoordinationMatrix)||(t.position.set(0,0,0),t.rotation.set(0,0,0),t.scale.set(1,1,1),t.updateMatrix(),this.applyBaseCoordinateSystem(t,t.coordinationMatrix))}applyBaseCoordinateSystem(e,t){t&&e.applyMatrix4(t.clone().invert()),e.applyMatrix4(this.baseCoordinationMatrix)}clone(e,t){const i=e.cloneGroup(t);this.groups.set(i.uuid,i);for(const s of i.items)this.list.set(s.id,s);return i}};T(Cl,"uuid","fef46874-46a3-461b-8c44-2922ab77c806");let ue=Cl;var nn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xu(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}function rn(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Rl={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files @@ -95,11 +95,11 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE -*/(function(c,e){(function(t){c.exports=t()})(function(){return function t(i,s,n){function r(l,h){if(!s[l]){if(!i[l]){var d=typeof nn=="function"&&nn;if(!h&&d)return d(l,!0);if(o)return o(l,!0);var u=new Error("Cannot find module '"+l+"'");throw u.code="MODULE_NOT_FOUND",u}var f=s[l]={exports:{}};i[l][0].call(f.exports,function(m){var p=i[l][1][m];return r(p||m)},f,f.exports,t,i,s,n)}return s[l].exports}for(var o=typeof nn=="function"&&nn,a=0;a>2,f=(3&l)<<4|h>>4,m=1>6:64,p=2>4,h=(15&u)<<4|(f=o.indexOf(a.charAt(p++)))>>2,d=(3&f)<<6|(m=o.indexOf(a.charAt(p++))),g[I++]=l,f!==64&&(g[I++]=h),m!==64&&(g[I++]=d);return g}},{"./support":30,"./utils":32}],2:[function(t,i,s){var n=t("./external"),r=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function l(h,d,u,f,m){this.compressedSize=h,this.uncompressedSize=d,this.crc32=u,this.compression=f,this.compressedContent=m}l.prototype={getContentWorker:function(){var h=new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),d=this;return h.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(h,d,u){return h.pipe(new o).pipe(new a("uncompressedSize")).pipe(d.compressWorker(u)).pipe(new a("compressedSize")).withStreamInfo("compression",d)},i.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,i,s){var n=t("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},s.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,i,s){var n=t("./utils"),r=function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a}();i.exports=function(o,a){return o!==void 0&&o.length?n.getTypeOf(o)!=="string"?function(l,h,d,u){var f=r,m=u+d;l^=-1;for(var p=u;p>>8^f[255&(l^h[p])];return-1^l}(0|a,o,o.length,0):function(l,h,d,u){var f=r,m=u+d;l^=-1;for(var p=u;p>>8^f[255&(l^h.charCodeAt(p))];return-1^l}(0|a,o,o.length,0):0}},{"./utils":32}],5:[function(t,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(t,i,s){var n=null;n=typeof Promise<"u"?Promise:t("lie"),i.exports={Promise:n}},{lie:37}],7:[function(t,i,s){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",r=t("pako"),o=t("./utils"),a=t("./stream/GenericWorker"),l=n?"uint8array":"array";function h(d,u){a.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=u,this.meta={}}s.magic="\b\0",o.inherits(h,a),h.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(l,d.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(u){d.push({data:u,meta:d.meta})}},s.compressWorker=function(d){return new h("Deflate",d)},s.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,i,s){function n(f,m){var p,I="";for(p=0;p>>=8;return I}function r(f,m,p,I,E,g){var v,C,w=f.file,O=f.compression,y=g!==l.utf8encode,L=o.transformTo("string",g(w.name)),N=o.transformTo("string",l.utf8encode(w.name)),x=w.comment,_=o.transformTo("string",g(x)),A=o.transformTo("string",l.utf8encode(x)),D=N.length!==w.name.length,R=A.length!==x.length,B="",W="",z="",q=w.dir,X=w.date,re={crc32:0,compressedSize:0,uncompressedSize:0};m&&!p||(re.crc32=f.crc32,re.compressedSize=f.compressedSize,re.uncompressedSize=f.uncompressedSize);var G=0;m&&(G|=8),y||!D&&!R||(G|=2048);var V=0,oe=0;q&&(V|=16),E==="UNIX"?(oe=798,V|=function(te,ye){var Le=te;return te||(Le=ye?16893:33204),(65535&Le)<<16}(w.unixPermissions,q)):(oe=20,V|=function(te){return 63&(te||0)}(w.dosPermissions)),v=X.getUTCHours(),v<<=6,v|=X.getUTCMinutes(),v<<=5,v|=X.getUTCSeconds()/2,C=X.getUTCFullYear()-1980,C<<=4,C|=X.getUTCMonth()+1,C<<=5,C|=X.getUTCDate(),D&&(W=n(1,1)+n(h(L),4)+N,B+="up"+n(W.length,2)+W),R&&(z=n(1,1)+n(h(_),4)+A,B+="uc"+n(z.length,2)+z);var ie="";return ie+=` -\0`,ie+=n(G,2),ie+=O.magic,ie+=n(v,2),ie+=n(C,2),ie+=n(re.crc32,4),ie+=n(re.compressedSize,4),ie+=n(re.uncompressedSize,4),ie+=n(L.length,2),ie+=n(B.length,2),{fileRecord:d.LOCAL_FILE_HEADER+ie+L+B,dirRecord:d.CENTRAL_FILE_HEADER+n(oe,2)+ie+n(_.length,2)+"\0\0\0\0"+n(V,4)+n(I,4)+L+B+_}}var o=t("../utils"),a=t("../stream/GenericWorker"),l=t("../utf8"),h=t("../crc32"),d=t("../signature");function u(f,m,p,I){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=p,this.encodeFileName=I,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(u,a),u.prototype.push=function(f){var m=f.meta.percent||0,p=this.entriesCount,I=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,a.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:p?(m+100*(p-I-1))/p:100}}))},u.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var m=this.streamFiles&&!f.file.dir;if(m){var p=r(f,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(f){this.accumulate=!1;var m=this.streamFiles&&!f.file.dir,p=r(f,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),m)this.push({data:function(I){return d.DATA_DESCRIPTOR+n(I.crc32,4)+n(I.compressedSize,4)+n(I.uncompressedSize,4)}(f),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var f=this.bytesWritten,m=0;m=this.index;a--)l=(l<<8)+this.byteAt(a);return this.index+=o,l},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},i.exports=r},{"../utils":32}],19:[function(t,i,s){var n=t("./Uint8ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,i,s){var n=t("./DataReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},r.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},r.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./DataReader":18}],21:[function(t,i,s){var n=t("./ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var a=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(t,i,s){var n=t("../utils"),r=t("../support"),o=t("./ArrayReader"),a=t("./StringReader"),l=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");i.exports=function(d){var u=n.getTypeOf(d);return n.checkSupport(u),u!=="string"||r.uint8array?u==="nodebuffer"?new l(d):r.uint8array?new h(n.transformTo("uint8array",d)):new o(n.transformTo("array",d)):new a(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,i,s){var n=t("./GenericWorker"),r=t("../utils");function o(a){n.call(this,"ConvertWorker to "+a),this.destType=a}r.inherits(o,n),o.prototype.processChunk=function(a){this.push({data:r.transformTo(this.destType,a.data),meta:a.meta})},i.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,i,s){var n=t("./GenericWorker"),r=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(a){this.streamInfo.crc32=r(a.data,this.streamInfo.crc32||0),this.push(a)},i.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,i,s){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}n.inherits(o,r),o.prototype.processChunk=function(a){if(a){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+a.data.length}r.prototype.processChunk.call(this,a)},i.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,i,s){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataWorker");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(h){l.dataIsReady=!0,l.data=h,l.max=h&&h.length||0,l.type=n.getTypeOf(h),l.isPaused||l._tickAndRepeat()},function(h){l.error(h)})}n.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=null,l=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":a=this.data.substring(this.index,l);break;case"uint8array":a=this.data.subarray(this.index,l);break;case"array":case"nodebuffer":a=this.data.slice(this.index,l)}return this.index=l,this.push({data:a,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,i,s){function n(r){this.name=r||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(r){this.emit("data",r)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(r){this.emit("error",r)}return!0},error:function(r){return!this.isFinished&&(this.isPaused?this.generatedError=r:(this.isFinished=!0,this.emit("error",r),this.previous&&this.previous.error(r),this.cleanUp()),!0)},on:function(r,o){return this._listeners[r].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(r,o){if(this._listeners[r])for(var a=0;a "+r:r}},i.exports=n},{}],29:[function(t,i,s){var n=t("../utils"),r=t("./ConvertWorker"),o=t("./GenericWorker"),a=t("../base64"),l=t("../support"),h=t("../external"),d=null;if(l.nodestream)try{d=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function u(m,p){return new h.Promise(function(I,E){var g=[],v=m._internalType,C=m._outputType,w=m._mimeType;m.on("data",function(O,y){g.push(O),p&&p(y)}).on("error",function(O){g=[],E(O)}).on("end",function(){try{var O=function(y,L,N){switch(y){case"blob":return n.newBlob(n.transformTo("arraybuffer",L),N);case"base64":return a.encode(L);default:return n.transformTo(y,L)}}(C,function(y,L){var N,x=0,_=null,A=0;for(N=0;N"u")s.blob=!1;else{var n=new ArrayBuffer(0);try{s.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),s.blob=r.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!t("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(t,i,s){for(var n=t("./utils"),r=t("./support"),o=t("./nodejsUtils"),a=t("./stream/GenericWorker"),l=new Array(256),h=0;h<256;h++)l[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;l[254]=l[254]=1;function d(){a.call(this,"utf-8 decode"),this.leftOver=null}function u(){a.call(this,"utf-8 encode")}s.utf8encode=function(f){return r.nodebuffer?o.newBufferFrom(f,"utf-8"):function(m){var p,I,E,g,v,C=m.length,w=0;for(g=0;g>>6:(I<65536?p[v++]=224|I>>>12:(p[v++]=240|I>>>18,p[v++]=128|I>>>12&63),p[v++]=128|I>>>6&63),p[v++]=128|63&I);return p}(f)},s.utf8decode=function(f){return r.nodebuffer?n.transformTo("nodebuffer",f).toString("utf-8"):function(m){var p,I,E,g,v=m.length,C=new Array(2*v);for(p=I=0;p>10&1023,C[I++]=56320|1023&E)}return C.length!==I&&(C.subarray?C=C.subarray(0,I):C.length=I),n.applyFromCharCode(C)}(f=n.transformTo(r.uint8array?"uint8array":"array",f))},n.inherits(d,a),d.prototype.processChunk=function(f){var m=n.transformTo(r.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var p=m;(m=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),m.set(p,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var I=function(g,v){var C;for((v=v||g.length)>g.length&&(v=g.length),C=v-1;0<=C&&(192&g[C])==128;)C--;return C<0||C===0?v:C+l[g[C]]>v?C:v}(m),E=m;I!==m.length&&(r.uint8array?(E=m.subarray(0,I),this.leftOver=m.subarray(I,m.length)):(E=m.slice(0,I),this.leftOver=m.slice(I,m.length))),this.push({data:s.utf8decode(E),meta:f.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,n.inherits(u,a),u.prototype.processChunk=function(f){this.push({data:s.utf8encode(f.data),meta:f.meta})},s.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,i,s){var n=t("./support"),r=t("./base64"),o=t("./nodejsUtils"),a=t("./external");function l(p){return p}function h(p,I){for(var E=0;E>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var m,p,I,E=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4>>6:(f<65536?u[I++]=224|f>>>12:(u[I++]=240|f>>>18,u[I++]=128|f>>>12&63),u[I++]=128|f>>>6&63),u[I++]=128|63&f);return u},s.buf2binstring=function(d){return h(d,d.length)},s.binstring2buf=function(d){for(var u=new n.Buf8(d.length),f=0,m=u.length;f>10&1023,g[m++]=56320|1023&p)}return h(g,m)},s.utf8border=function(d,u){var f;for((u=u||d.length)>d.length&&(u=d.length),f=u-1;0<=f&&(192&d[f])==128;)f--;return f<0||f===0?u:f+a[d[f]]>u?f:u}},{"./common":41}],43:[function(t,i,s){i.exports=function(n,r,o,a){for(var l=65535&n|0,h=n>>>16&65535|0,d=0;o!==0;){for(o-=d=2e3>>1:r>>>1;o[a]=r}return o}();i.exports=function(r,o,a,l){var h=n,d=l+a;r^=-1;for(var u=l;u>>8^h[255&(r^o[u])];return-1^r}},{}],46:[function(t,i,s){var n,r=t("../utils/common"),o=t("./trees"),a=t("./adler32"),l=t("./crc32"),h=t("./messages"),d=0,u=4,f=0,m=-2,p=-1,I=4,E=2,g=8,v=9,C=286,w=30,O=19,y=2*C+1,L=15,N=3,x=258,_=x+N+1,A=42,D=113,R=1,B=2,W=3,z=4;function q(S,Z){return S.msg=h[Z],Z}function X(S){return(S<<1)-(4S.avail_out&&(H=S.avail_out),H!==0&&(r.arraySet(S.output,Z.pending_buf,Z.pending_out,H,S.next_out),S.next_out+=H,Z.pending_out+=H,S.total_out+=H,S.avail_out-=H,Z.pending-=H,Z.pending===0&&(Z.pending_out=0))}function V(S,Z){o._tr_flush_block(S,0<=S.block_start?S.block_start:-1,S.strstart-S.block_start,Z),S.block_start=S.strstart,G(S.strm)}function oe(S,Z){S.pending_buf[S.pending++]=Z}function ie(S,Z){S.pending_buf[S.pending++]=Z>>>8&255,S.pending_buf[S.pending++]=255&Z}function te(S,Z){var H,M,b=S.max_chain_length,U=S.strstart,Q=S.prev_length,K=S.nice_match,k=S.strstart>S.w_size-_?S.strstart-(S.w_size-_):0,J=S.window,se=S.w_mask,$=S.prev,le=S.strstart+x,ve=J[U+Q-1],Ie=J[U+Q];S.prev_length>=S.good_match&&(b>>=2),K>S.lookahead&&(K=S.lookahead);do if(J[(H=Z)+Q]===Ie&&J[H+Q-1]===ve&&J[H]===J[U]&&J[++H]===J[U+1]){U+=2,H++;do;while(J[++U]===J[++H]&&J[++U]===J[++H]&&J[++U]===J[++H]&&J[++U]===J[++H]&&J[++U]===J[++H]&&J[++U]===J[++H]&&J[++U]===J[++H]&&J[++U]===J[++H]&&Uk&&--b!=0);return Q<=S.lookahead?Q:S.lookahead}function ye(S){var Z,H,M,b,U,Q,K,k,J,se,$=S.w_size;do{if(b=S.window_size-S.lookahead-S.strstart,S.strstart>=$+($-_)){for(r.arraySet(S.window,S.window,$,$,0),S.match_start-=$,S.strstart-=$,S.block_start-=$,Z=H=S.hash_size;M=S.head[--Z],S.head[Z]=$<=M?M-$:0,--H;);for(Z=H=$;M=S.prev[--Z],S.prev[Z]=$<=M?M-$:0,--H;);b+=$}if(S.strm.avail_in===0)break;if(Q=S.strm,K=S.window,k=S.strstart+S.lookahead,J=b,se=void 0,se=Q.avail_in,J=N)for(U=S.strstart-S.insert,S.ins_h=S.window[U],S.ins_h=(S.ins_h<=N&&(S.ins_h=(S.ins_h<=N)if(M=o._tr_tally(S,S.strstart-S.match_start,S.match_length-N),S.lookahead-=S.match_length,S.match_length<=S.max_lazy_match&&S.lookahead>=N){for(S.match_length--;S.strstart++,S.ins_h=(S.ins_h<=N&&(S.ins_h=(S.ins_h<=N&&S.match_length<=S.prev_length){for(b=S.strstart+S.lookahead-N,M=o._tr_tally(S,S.strstart-1-S.prev_match,S.prev_length-N),S.lookahead-=S.prev_length-1,S.prev_length-=2;++S.strstart<=b&&(S.ins_h=(S.ins_h<S.pending_buf_size-5&&(H=S.pending_buf_size-5);;){if(S.lookahead<=1){if(ye(S),S.lookahead===0&&Z===d)return R;if(S.lookahead===0)break}S.strstart+=S.lookahead,S.lookahead=0;var M=S.block_start+H;if((S.strstart===0||S.strstart>=M)&&(S.lookahead=S.strstart-M,S.strstart=M,V(S,!1),S.strm.avail_out===0)||S.strstart-S.block_start>=S.w_size-_&&(V(S,!1),S.strm.avail_out===0))return R}return S.insert=0,Z===u?(V(S,!0),S.strm.avail_out===0?W:z):(S.strstart>S.block_start&&(V(S,!1),S.strm.avail_out),R)}),new me(4,4,8,4,Le),new me(4,5,16,8,Le),new me(4,6,32,32,Le),new me(4,4,16,16,ae),new me(8,16,32,32,ae),new me(8,16,128,128,ae),new me(8,32,128,256,ae),new me(32,128,258,1024,ae),new me(32,258,258,4096,ae)],s.deflateInit=function(S,Z){return Ye(S,Z,g,15,8,0)},s.deflateInit2=Ye,s.deflateReset=nt,s.deflateResetKeep=Te,s.deflateSetHeader=function(S,Z){return S&&S.state?S.state.wrap!==2?m:(S.state.gzhead=Z,f):m},s.deflate=function(S,Z){var H,M,b,U;if(!S||!S.state||5>8&255),oe(M,M.gzhead.time>>16&255),oe(M,M.gzhead.time>>24&255),oe(M,M.level===9?2:2<=M.strategy||M.level<2?4:0),oe(M,255&M.gzhead.os),M.gzhead.extra&&M.gzhead.extra.length&&(oe(M,255&M.gzhead.extra.length),oe(M,M.gzhead.extra.length>>8&255)),M.gzhead.hcrc&&(S.adler=l(S.adler,M.pending_buf,M.pending,0)),M.gzindex=0,M.status=69):(oe(M,0),oe(M,0),oe(M,0),oe(M,0),oe(M,0),oe(M,M.level===9?2:2<=M.strategy||M.level<2?4:0),oe(M,3),M.status=D);else{var Q=g+(M.w_bits-8<<4)<<8;Q|=(2<=M.strategy||M.level<2?0:M.level<6?1:M.level===6?2:3)<<6,M.strstart!==0&&(Q|=32),Q+=31-Q%31,M.status=D,ie(M,Q),M.strstart!==0&&(ie(M,S.adler>>>16),ie(M,65535&S.adler)),S.adler=1}if(M.status===69)if(M.gzhead.extra){for(b=M.pending;M.gzindex<(65535&M.gzhead.extra.length)&&(M.pending!==M.pending_buf_size||(M.gzhead.hcrc&&M.pending>b&&(S.adler=l(S.adler,M.pending_buf,M.pending-b,b)),G(S),b=M.pending,M.pending!==M.pending_buf_size));)oe(M,255&M.gzhead.extra[M.gzindex]),M.gzindex++;M.gzhead.hcrc&&M.pending>b&&(S.adler=l(S.adler,M.pending_buf,M.pending-b,b)),M.gzindex===M.gzhead.extra.length&&(M.gzindex=0,M.status=73)}else M.status=73;if(M.status===73)if(M.gzhead.name){b=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>b&&(S.adler=l(S.adler,M.pending_buf,M.pending-b,b)),G(S),b=M.pending,M.pending===M.pending_buf_size)){U=1;break}U=M.gzindexb&&(S.adler=l(S.adler,M.pending_buf,M.pending-b,b)),U===0&&(M.gzindex=0,M.status=91)}else M.status=91;if(M.status===91)if(M.gzhead.comment){b=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>b&&(S.adler=l(S.adler,M.pending_buf,M.pending-b,b)),G(S),b=M.pending,M.pending===M.pending_buf_size)){U=1;break}U=M.gzindexb&&(S.adler=l(S.adler,M.pending_buf,M.pending-b,b)),U===0&&(M.status=103)}else M.status=103;if(M.status===103&&(M.gzhead.hcrc?(M.pending+2>M.pending_buf_size&&G(S),M.pending+2<=M.pending_buf_size&&(oe(M,255&S.adler),oe(M,S.adler>>8&255),S.adler=0,M.status=D)):M.status=D),M.pending!==0){if(G(S),S.avail_out===0)return M.last_flush=-1,f}else if(S.avail_in===0&&X(Z)<=X(H)&&Z!==u)return q(S,-5);if(M.status===666&&S.avail_in!==0)return q(S,-5);if(S.avail_in!==0||M.lookahead!==0||Z!==d&&M.status!==666){var K=M.strategy===2?function(k,J){for(var se;;){if(k.lookahead===0&&(ye(k),k.lookahead===0)){if(J===d)return R;break}if(k.match_length=0,se=o._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++,se&&(V(k,!1),k.strm.avail_out===0))return R}return k.insert=0,J===u?(V(k,!0),k.strm.avail_out===0?W:z):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?R:B}(M,Z):M.strategy===3?function(k,J){for(var se,$,le,ve,Ie=k.window;;){if(k.lookahead<=x){if(ye(k),k.lookahead<=x&&J===d)return R;if(k.lookahead===0)break}if(k.match_length=0,k.lookahead>=N&&0k.lookahead&&(k.match_length=k.lookahead)}if(k.match_length>=N?(se=o._tr_tally(k,1,k.match_length-N),k.lookahead-=k.match_length,k.strstart+=k.match_length,k.match_length=0):(se=o._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++),se&&(V(k,!1),k.strm.avail_out===0))return R}return k.insert=0,J===u?(V(k,!0),k.strm.avail_out===0?W:z):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?R:B}(M,Z):n[M.level].func(M,Z);if(K!==W&&K!==z||(M.status=666),K===R||K===W)return S.avail_out===0&&(M.last_flush=-1),f;if(K===B&&(Z===1?o._tr_align(M):Z!==5&&(o._tr_stored_block(M,0,0,!1),Z===3&&(re(M.head),M.lookahead===0&&(M.strstart=0,M.block_start=0,M.insert=0))),G(S),S.avail_out===0))return M.last_flush=-1,f}return Z!==u?f:M.wrap<=0?1:(M.wrap===2?(oe(M,255&S.adler),oe(M,S.adler>>8&255),oe(M,S.adler>>16&255),oe(M,S.adler>>24&255),oe(M,255&S.total_in),oe(M,S.total_in>>8&255),oe(M,S.total_in>>16&255),oe(M,S.total_in>>24&255)):(ie(M,S.adler>>>16),ie(M,65535&S.adler)),G(S),0=H.w_size&&(U===0&&(re(H.head),H.strstart=0,H.block_start=0,H.insert=0),J=new r.Buf8(H.w_size),r.arraySet(J,Z,se-H.w_size,H.w_size,0),Z=J,se=H.w_size),Q=S.avail_in,K=S.next_in,k=S.input,S.avail_in=se,S.next_in=0,S.input=Z,ye(H);H.lookahead>=N;){for(M=H.strstart,b=H.lookahead-(N-1);H.ins_h=(H.ins_h<>>=N=L>>>24,v-=N,(N=L>>>16&255)===0)B[h++]=65535&L;else{if(!(16&N)){if(!(64&N)){L=C[(65535&L)+(g&(1<>>=N,v-=N),v<15&&(g+=R[a++]<>>=N=L>>>24,v-=N,!(16&(N=L>>>16&255))){if(!(64&N)){L=w[(65535&L)+(g&(1<>>=N,v-=N,(N=h-d)<_){if(p<(N=_-N)&&o.sane){n.msg="invalid distance too far back",o.mode=30;break e}if(D=E,(A=0)===I){if(A+=m-N,N>3,g&=(1<<(v-=x<<3))-1,n.next_in=a,n.next_out=h,n.avail_in=a>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(A){var D;return A&&A.state?(D=A.state,A.total_in=A.total_out=D.total=0,A.msg="",D.wrap&&(A.adler=1&D.wrap),D.mode=m,D.last=0,D.havedict=0,D.dmax=32768,D.head=null,D.hold=0,D.bits=0,D.lencode=D.lendyn=new n.Buf32(p),D.distcode=D.distdyn=new n.Buf32(I),D.sane=1,D.back=-1,u):f}function C(A){var D;return A&&A.state?((D=A.state).wsize=0,D.whave=0,D.wnext=0,v(A)):f}function w(A,D){var R,B;return A&&A.state?(B=A.state,D<0?(R=0,D=-D):(R=1+(D>>4),D<48&&(D&=15)),D&&(D<8||15=z.wsize?(n.arraySet(z.window,D,R-z.wsize,z.wsize,0),z.wnext=0,z.whave=z.wsize):(B<(W=z.wsize-z.wnext)&&(W=B),n.arraySet(z.window,D,R-B,W,z.wnext),(B-=W)?(n.arraySet(z.window,D,R-B,B,0),z.wnext=B,z.whave=z.wsize):(z.wnext+=W,z.wnext===z.wsize&&(z.wnext=0),z.whave>>8&255,R.check=o(R.check,U,2,0),V=G=0,R.mode=2;break}if(R.flags=0,R.head&&(R.head.done=!1),!(1&R.wrap)||(((255&G)<<8)+(G>>8))%31){A.msg="incorrect header check",R.mode=30;break}if((15&G)!=8){A.msg="unknown compression method",R.mode=30;break}if(V-=4,S=8+(15&(G>>>=4)),R.wbits===0)R.wbits=S;else if(S>R.wbits){A.msg="invalid window size",R.mode=30;break}R.dmax=1<>8&1),512&R.flags&&(U[0]=255&G,U[1]=G>>>8&255,R.check=o(R.check,U,2,0)),V=G=0,R.mode=3;case 3:for(;V<32;){if(X===0)break e;X--,G+=B[z++]<>>8&255,U[2]=G>>>16&255,U[3]=G>>>24&255,R.check=o(R.check,U,4,0)),V=G=0,R.mode=4;case 4:for(;V<16;){if(X===0)break e;X--,G+=B[z++]<>8),512&R.flags&&(U[0]=255&G,U[1]=G>>>8&255,R.check=o(R.check,U,2,0)),V=G=0,R.mode=5;case 5:if(1024&R.flags){for(;V<16;){if(X===0)break e;X--,G+=B[z++]<>>8&255,R.check=o(R.check,U,2,0)),V=G=0}else R.head&&(R.head.extra=null);R.mode=6;case 6:if(1024&R.flags&&(X<(te=R.length)&&(te=X),te&&(R.head&&(S=R.head.extra_len-R.length,R.head.extra||(R.head.extra=new Array(R.head.extra_len)),n.arraySet(R.head.extra,B,z,te,S)),512&R.flags&&(R.check=o(R.check,B,te,z)),X-=te,z+=te,R.length-=te),R.length))break e;R.length=0,R.mode=7;case 7:if(2048&R.flags){if(X===0)break e;for(te=0;S=B[z+te++],R.head&&S&&R.length<65536&&(R.head.name+=String.fromCharCode(S)),S&&te>9&1,R.head.done=!0),A.adler=R.check=0,R.mode=12;break;case 10:for(;V<32;){if(X===0)break e;X--,G+=B[z++]<>>=7&V,V-=7&V,R.mode=27;break}for(;V<3;){if(X===0)break e;X--,G+=B[z++]<>>=1)){case 0:R.mode=14;break;case 1:if(x(R),R.mode=20,D!==6)break;G>>>=2,V-=2;break e;case 2:R.mode=17;break;case 3:A.msg="invalid block type",R.mode=30}G>>>=2,V-=2;break;case 14:for(G>>>=7&V,V-=7&V;V<32;){if(X===0)break e;X--,G+=B[z++]<>>16^65535)){A.msg="invalid stored block lengths",R.mode=30;break}if(R.length=65535&G,V=G=0,R.mode=15,D===6)break e;case 15:R.mode=16;case 16:if(te=R.length){if(X>>=5,V-=5,R.ndist=1+(31&G),G>>>=5,V-=5,R.ncode=4+(15&G),G>>>=4,V-=4,286>>=3,V-=3}for(;R.have<19;)R.lens[Q[R.have++]]=0;if(R.lencode=R.lendyn,R.lenbits=7,H={bits:R.lenbits},Z=l(0,R.lens,0,19,R.lencode,0,R.work,H),R.lenbits=H.bits,Z){A.msg="invalid code lengths set",R.mode=30;break}R.have=0,R.mode=19;case 19:for(;R.have>>16&255,pe=65535&b,!((ae=b>>>24)<=V);){if(X===0)break e;X--,G+=B[z++]<>>=ae,V-=ae,R.lens[R.have++]=pe;else{if(pe===16){for(M=ae+2;V>>=ae,V-=ae,R.have===0){A.msg="invalid bit length repeat",R.mode=30;break}S=R.lens[R.have-1],te=3+(3&G),G>>>=2,V-=2}else if(pe===17){for(M=ae+3;V>>=ae)),G>>>=3,V-=3}else{for(M=ae+7;V>>=ae)),G>>>=7,V-=7}if(R.have+te>R.nlen+R.ndist){A.msg="invalid bit length repeat",R.mode=30;break}for(;te--;)R.lens[R.have++]=S}}if(R.mode===30)break;if(R.lens[256]===0){A.msg="invalid code -- missing end-of-block",R.mode=30;break}if(R.lenbits=9,H={bits:R.lenbits},Z=l(h,R.lens,0,R.nlen,R.lencode,0,R.work,H),R.lenbits=H.bits,Z){A.msg="invalid literal/lengths set",R.mode=30;break}if(R.distbits=6,R.distcode=R.distdyn,H={bits:R.distbits},Z=l(d,R.lens,R.nlen,R.ndist,R.distcode,0,R.work,H),R.distbits=H.bits,Z){A.msg="invalid distances set",R.mode=30;break}if(R.mode=20,D===6)break e;case 20:R.mode=21;case 21:if(6<=X&&258<=re){A.next_out=q,A.avail_out=re,A.next_in=z,A.avail_in=X,R.hold=G,R.bits=V,a(A,ie),q=A.next_out,W=A.output,re=A.avail_out,z=A.next_in,B=A.input,X=A.avail_in,G=R.hold,V=R.bits,R.mode===12&&(R.back=-1);break}for(R.back=0;me=(b=R.lencode[G&(1<>>16&255,pe=65535&b,!((ae=b>>>24)<=V);){if(X===0)break e;X--,G+=B[z++]<>Te)])>>>16&255,pe=65535&b,!(Te+(ae=b>>>24)<=V);){if(X===0)break e;X--,G+=B[z++]<>>=Te,V-=Te,R.back+=Te}if(G>>>=ae,V-=ae,R.back+=ae,R.length=pe,me===0){R.mode=26;break}if(32&me){R.back=-1,R.mode=12;break}if(64&me){A.msg="invalid literal/length code",R.mode=30;break}R.extra=15&me,R.mode=22;case 22:if(R.extra){for(M=R.extra;V>>=R.extra,V-=R.extra,R.back+=R.extra}R.was=R.length,R.mode=23;case 23:for(;me=(b=R.distcode[G&(1<>>16&255,pe=65535&b,!((ae=b>>>24)<=V);){if(X===0)break e;X--,G+=B[z++]<>Te)])>>>16&255,pe=65535&b,!(Te+(ae=b>>>24)<=V);){if(X===0)break e;X--,G+=B[z++]<>>=Te,V-=Te,R.back+=Te}if(G>>>=ae,V-=ae,R.back+=ae,64&me){A.msg="invalid distance code",R.mode=30;break}R.offset=pe,R.extra=15&me,R.mode=24;case 24:if(R.extra){for(M=R.extra;V>>=R.extra,V-=R.extra,R.back+=R.extra}if(R.offset>R.dmax){A.msg="invalid distance too far back",R.mode=30;break}R.mode=25;case 25:if(re===0)break e;if(te=ie-re,R.offset>te){if((te=R.offset-te)>R.whave&&R.sane){A.msg="invalid distance too far back",R.mode=30;break}ye=te>R.wnext?(te-=R.wnext,R.wsize-te):R.wnext-te,te>R.length&&(te=R.length),Le=R.window}else Le=W,ye=q-R.offset,te=R.length;for(rey?(N=ye[Le+I[D]],V[oe+I[D]]):(N=96,0),g=1<>q)+(v-=g)]=L<<24|N<<16|x|0,v!==0;);for(g=1<>=1;if(g!==0?(G&=g-1,G+=g):G=0,D++,--ie[A]==0){if(A===B)break;A=d[u+I[D]]}if(W>>7)]}function oe(b,U){b.pending_buf[b.pending++]=255&U,b.pending_buf[b.pending++]=U>>>8&255}function ie(b,U,Q){b.bi_valid>E-Q?(b.bi_buf|=U<>E-b.bi_valid,b.bi_valid+=Q-E):(b.bi_buf|=U<>>=1,Q<<=1,0<--U;);return Q>>>1}function Le(b,U,Q){var K,k,J=new Array(I+1),se=0;for(K=1;K<=I;K++)J[K]=se=se+Q[K-1]<<1;for(k=0;k<=U;k++){var $=b[2*k+1];$!==0&&(b[2*k]=ye(J[$]++,$))}}function ae(b){var U;for(U=0;U>1;1<=Q;Q--)Te(b,J,Q);for(k=le;Q=b.heap[1],b.heap[1]=b.heap[b.heap_len--],Te(b,J,1),K=b.heap[1],b.heap[--b.heap_max]=Q,b.heap[--b.heap_max]=K,J[2*k]=J[2*Q]+J[2*K],b.depth[k]=(b.depth[Q]>=b.depth[K]?b.depth[Q]:b.depth[K])+1,J[2*Q+1]=J[2*K+1]=k,b.heap[1]=k++,Te(b,J,1),2<=b.heap_len;);b.heap[--b.heap_max]=b.heap[1],function(Ie,rt){var Ki,Ct,qi,Pe,bs,Hn,bt=rt.dyn_tree,To=rt.max_code,xc=rt.stat_desc.static_tree,_c=rt.stat_desc.has_stree,Uc=rt.stat_desc.extra_bits,Ro=rt.stat_desc.extra_base,Ji=rt.stat_desc.max_length,Ls=0;for(Pe=0;Pe<=I;Pe++)Ie.bl_count[Pe]=0;for(bt[2*Ie.heap[Ie.heap_max]+1]=0,Ki=Ie.heap_max+1;Ki>=7;k>>=1)if(1&ve&&$.dyn_ltree[2*le]!==0)return r;if($.dyn_ltree[18]!==0||$.dyn_ltree[20]!==0||$.dyn_ltree[26]!==0)return o;for(le=32;le>>3,(J=b.static_len+3+7>>>3)<=k&&(k=J)):k=J=Q+5,Q+4<=k&&U!==-1?M(b,U,Q,K):b.strategy===4||J===k?(ie(b,2+(K?1:0),3),nt(b,_,A)):(ie(b,4+(K?1:0),3),function($,le,ve,Ie){var rt;for(ie($,le-257,5),ie($,ve-1,5),ie($,Ie-4,4),rt=0;rt>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&U,b.pending_buf[b.l_buf+b.last_lit]=255&Q,b.last_lit++,U===0?b.dyn_ltree[2*Q]++:(b.matches++,U--,b.dyn_ltree[2*(R[Q]+d+1)]++,b.dyn_dtree[2*V(U)]++),b.last_lit===b.lit_bufsize-1},s._tr_align=function(b){ie(b,2,3),te(b,v,_),function(U){U.bi_valid===16?(oe(U,U.bi_buf),U.bi_buf=0,U.bi_valid=0):8<=U.bi_valid&&(U.pending_buf[U.pending++]=255&U.bi_buf,U.bi_buf>>=8,U.bi_valid-=8)}(b)}},{"../utils/common":41}],53:[function(t,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,i,s){(function(n){(function(r,o){if(!r.setImmediate){var a,l,h,d,u=1,f={},m=!1,p=r.document,I=Object.getPrototypeOf&&Object.getPrototypeOf(r);I=I&&I.setTimeout?I:r,a={}.toString.call(r.process)==="[object process]"?function(C){process.nextTick(function(){g(C)})}:function(){if(r.postMessage&&!r.importScripts){var C=!0,w=r.onmessage;return r.onmessage=function(){C=!1},r.postMessage("","*"),r.onmessage=w,C}}()?(d="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",v,!1):r.attachEvent("onmessage",v),function(C){r.postMessage(d+C,"*")}):r.MessageChannel?((h=new MessageChannel).port1.onmessage=function(C){g(C.data)},function(C){h.port2.postMessage(C)}):p&&"onreadystatechange"in p.createElement("script")?(l=p.documentElement,function(C){var w=p.createElement("script");w.onreadystatechange=function(){g(C),w.onreadystatechange=null,l.removeChild(w),w=null},l.appendChild(w)}):function(C){setTimeout(g,0,C)},I.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var w=new Array(arguments.length-1),O=0;O"u"?n===void 0?this:n:self)}).call(this,typeof sn<"u"?sn:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Tl);var bu=Tl.exports;const ha=Nu(bu);var Rl={},kn={};(function(c){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",i="["+e+"]["+t+"]*",s=new RegExp("^"+i+"$"),n=function(o,a){const l=[];let h=a.exec(o);for(;h;){const d=[];d.startIndex=a.lastIndex-h[0].length;const u=h.length;for(let f=0;f"u")};c.isExist=function(o){return typeof o<"u"},c.isEmptyObject=function(o){return Object.keys(o).length===0},c.merge=function(o,a,l){if(a){const h=Object.keys(a),d=h.length;for(let u=0;u"&&c[n]!==" "&&c[n]!==" "&&c[n]!==` -`&&c[n]!=="\r";n++)a+=c[n];if(a=a.trim(),a[a.length-1]==="/"&&(a=a.substring(0,a.length-1),n--),!zu(a)){let d;return a.trim().length===0?d="Invalid space after '<'.":d="Tag '"+a+"' is an invalid name.",Me("InvalidTag",d,je(c,n))}const l=Du(c,n);if(l===!1)return Me("InvalidAttr","Attributes for '"+a+"' have open quote.",je(c,n));let h=l.value;if(n=l.index,h[h.length-1]==="/"){const d=n-h.length;h=h.substring(0,h.length-1);const u=pa(h,e);if(u===!0)i=!0;else return Me(u.err.code,u.err.msg,je(c,d+u.err.line))}else if(o)if(l.tagClosed){if(h.trim().length>0)return Me("InvalidTag","Closing tag '"+a+"' can't have attributes or invalid starting.",je(c,r));if(t.length===0)return Me("InvalidTag","Closing tag '"+a+"' has not been opened.",je(c,r));{const d=t.pop();if(a!==d.tagName){let u=je(c,d.tagStartPos);return Me("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+u.line+", col "+u.col+") instead of closing tag '"+a+"'.",je(c,r))}t.length==0&&(s=!0)}}else return Me("InvalidTag","Closing tag '"+a+"' doesn't have proper closing.",je(c,n));else{const d=pa(h,e);if(d!==!0)return Me(d.err.code,d.err.msg,je(c,n-h.length+d.err.line));if(s===!0)return Me("InvalidXml","Multiple possible root nodes found.",je(c,n));e.unpairedTags.indexOf(a)!==-1||t.push({tagName:a,tagStartPos:r}),i=!0}for(n++;n0)return Me("InvalidXml","Invalid '"+JSON.stringify(t.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Me("InvalidXml","Start tag expected.",1);return!0};function da(c){return c===" "||c===" "||c===` -`||c==="\r"}function ua(c,e){const t=e;for(;e5&&i==="xml")return Me("InvalidXml","XML declaration allowed only at the start of the document.",je(c,e));if(c[e]=="?"&&c[e+1]==">"){e++;break}else continue}return e}function fa(c,e){if(c.length>e+5&&c[e+1]==="-"&&c[e+2]==="-"){for(e+=3;e"){e+=2;break}}else if(c.length>e+8&&c[e+1]==="D"&&c[e+2]==="O"&&c[e+3]==="C"&&c[e+4]==="T"&&c[e+5]==="Y"&&c[e+6]==="P"&&c[e+7]==="E"){let t=1;for(e+=8;e"&&(t--,t===0))break}else if(c.length>e+9&&c[e+1]==="["&&c[e+2]==="C"&&c[e+3]==="D"&&c[e+4]==="A"&&c[e+5]==="T"&&c[e+6]==="A"&&c[e+7]==="["){for(e+=8;e"){e+=2;break}}return e}const Pu='"',Mu="'";function Du(c,e){let t="",i="",s=!1;for(;e"&&i===""){s=!0;break}t+=c[e]}return i!==""?!1:{value:t,index:e,tagClosed:s}}const xu=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function pa(c,e){const t=mo.getAllMatches(c,xu),i={};for(let s=0;s!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(c,e,t){return c}},ku=function(c){return Object.assign({},Sl,c)};Io.buildOptions=ku;Io.defaultOptions=Sl;class Vu{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}var Yu=Vu;const Gu=kn;function Hu(c,e){const t={};if(c[e+3]==="O"&&c[e+4]==="C"&&c[e+5]==="T"&&c[e+6]==="Y"&&c[e+7]==="P"&&c[e+8]==="E"){e=e+9;let i=1,s=!1,n=!1,r="";for(;e"){if(n?c[e-1]==="-"&&c[e-2]==="-"&&(n=!1,i--):i--,i===0)break}else c[e]==="["?s=!0:r+=c[e];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:t,i:e}}function Wu(c,e){let t="";for(;e0&&s&&t[2]!=="."||!e.leadingZeros&&n.length>0&&!s&&t[1]!==".")return c;{const a=Number(t),l=""+a;return l.search(/[eE]/)!==-1||o?e.eNotation?a:c:t.indexOf(".")!==-1?l==="0"&&r===""||l===r||s&&l==="-"+r?a:c:n?r===l||s+r===l?a:c:t===l||t===s+l?a:c}}else return c}}function nf(c){return c&&c.indexOf(".")!==-1&&(c=c.replace(/0+$/,""),c==="."?c="0":c[0]==="."?c="0"+c:c[c.length-1]==="."&&(c=c.substr(0,c.length-1))),c}var rf=sf;const vl=kn,ms=Yu,of=Ju,af=rf;let lf=class{constructor(c){this.options=c,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=cf,this.parseXml=pf,this.parseTextData=hf,this.resolveNameSpace=df,this.buildAttributesMap=ff,this.isItStopNode=gf,this.replaceEntitiesValue=If,this.readStopNodeData=Tf,this.saveTextToParentTag=Ef,this.addChild=mf}};function cf(c){const e=Object.keys(c);for(let t=0;t0)){r||(c=this.replaceEntitiesValue(c));const o=this.options.tagValueProcessor(e,c,t,s,n);return o==null?c:typeof o!=typeof c||o!==c?o:this.options.trimValues?br(c,this.options.parseTagValue,this.options.numberParseOptions):c.trim()===c?br(c,this.options.parseTagValue,this.options.numberParseOptions):c}}function df(c){if(this.options.removeNSPrefix){const e=c.split(":"),t=c.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(c=t+e[1])}return c}const uf=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function ff(c,e,t){if(!this.options.ignoreAttributes&&typeof c=="string"){const i=vl.getAllMatches(c,uf),s=i.length,n={};for(let r=0;r",n,"Closing Tag is not closed.");let o=c.substring(n+2,r).trim();if(this.options.removeNSPrefix){const h=o.indexOf(":");h!==-1&&(o=o.substr(h+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),t&&(i=this.saveTextToParentTag(i,t,s));const a=s.substring(s.lastIndexOf(".")+1);if(o&&this.options.unpairedTags.indexOf(o)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;a&&this.options.unpairedTags.indexOf(a)!==-1?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),t=this.tagsNodeStack.pop(),i="",n=r}else if(c[n+1]==="?"){let r=Nr(c,n,!1,"?>");if(!r)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,t,s),!(this.options.ignoreDeclaration&&r.tagName==="?xml"||this.options.ignorePiTags)){const o=new ms(r.tagName);o.add(this.options.textNodeName,""),r.tagName!==r.tagExp&&r.attrExpPresent&&(o[":@"]=this.buildAttributesMap(r.tagExp,s,r.tagName)),this.addChild(t,o,s)}n=r.closeIndex+1}else if(c.substr(n+1,3)==="!--"){const r=ui(c,"-->",n+4,"Comment is not closed.");if(this.options.commentPropName){const o=c.substring(n+4,r-2);i=this.saveTextToParentTag(i,t,s),t.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}n=r}else if(c.substr(n+1,2)==="!D"){const r=of(c,n);this.docTypeEntities=r.entities,n=r.i}else if(c.substr(n+1,2)==="!["){const r=ui(c,"]]>",n,"CDATA is not closed.")-2,o=c.substring(n+9,r);i=this.saveTextToParentTag(i,t,s);let a=this.parseTextData(o,t.tagname,s,!0,!1,!0,!0);a==null&&(a=""),this.options.cdataPropName?t.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):t.add(this.options.textNodeName,a),n=r+2}else{let r=Nr(c,n,this.options.removeNSPrefix),o=r.tagName;const a=r.rawTagName;let l=r.tagExp,h=r.attrExpPresent,d=r.closeIndex;this.options.transformTagName&&(o=this.options.transformTagName(o)),t&&i&&t.tagname!=="!xml"&&(i=this.saveTextToParentTag(i,t,s,!1));const u=t;if(u&&this.options.unpairedTags.indexOf(u.tagname)!==-1&&(t=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),o!==e.tagname&&(s+=s?"."+o:o),this.isItStopNode(this.options.stopNodes,s,o)){let f="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)o[o.length-1]==="/"?(o=o.substr(0,o.length-1),s=s.substr(0,s.length-1),l=o):l=l.substr(0,l.length-1),n=r.closeIndex;else if(this.options.unpairedTags.indexOf(o)!==-1)n=r.closeIndex;else{const p=this.readStopNodeData(c,a,d+1);if(!p)throw new Error(`Unexpected end of ${a}`);n=p.i,f=p.tagContent}const m=new ms(o);o!==l&&h&&(m[":@"]=this.buildAttributesMap(l,s,o)),f&&(f=this.parseTextData(f,o,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),m.add(this.options.textNodeName,f),this.addChild(t,m,s)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){o[o.length-1]==="/"?(o=o.substr(0,o.length-1),s=s.substr(0,s.length-1),l=o):l=l.substr(0,l.length-1),this.options.transformTagName&&(o=this.options.transformTagName(o));const f=new ms(o);o!==l&&h&&(f[":@"]=this.buildAttributesMap(l,s,o)),this.addChild(t,f,s),s=s.substr(0,s.lastIndexOf("."))}else{const f=new ms(o);this.tagsNodeStack.push(t),o!==l&&h&&(f[":@"]=this.buildAttributesMap(l,s,o)),this.addChild(t,f,s),t=f}i="",n=d}}else i+=c[n];return e.child};function mf(c,e,t){const i=this.options.updateTag(e.tagname,t,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),c.addChild(e))}const If=function(c){if(this.options.processEntities){for(let e in this.docTypeEntities){const t=this.docTypeEntities[e];c=c.replace(t.regx,t.val)}for(let e in this.lastEntities){const t=this.lastEntities[e];c=c.replace(t.regex,t.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const t=this.htmlEntities[e];c=c.replace(t.regex,t.val)}c=c.replace(this.ampEntity.regex,this.ampEntity.val)}return c};function Ef(c,e,t,i){return c&&(i===void 0&&(i=Object.keys(e.child).length===0),c=this.parseTextData(c,e.tagname,t,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,i),c!==void 0&&c!==""&&e.add(this.options.textNodeName,c),c=""),c}function gf(c,e,t){const i="*."+t;for(const s in c){const n=c[s];if(i===n||e===n)return!0}return!1}function Cf(c,e,t=">"){let i,s="";for(let n=e;n",t,`${e} is not closed`);if(c.substring(t+2,n).trim()===e&&(s--,s===0))return{tagContent:c.substring(i,t),i:n};t=n}else if(c[t+1]==="?")t=ui(c,"?>",t+1,"StopNode is not closed.");else if(c.substr(t+1,3)==="!--")t=ui(c,"-->",t+3,"StopNode is not closed.");else if(c.substr(t+1,2)==="![")t=ui(c,"]]>",t,"StopNode is not closed.")-2;else{const n=Nr(c,t,">");n&&((n&&n.tagName)===e&&n.tagExp[n.tagExp.length-1]!=="/"&&s++,t=n.closeIndex)}}function br(c,e,t){if(e&&typeof c=="string"){const i=c.trim();return i==="true"?!0:i==="false"?!1:af(c,t)}else return vl.isExist(c)?c:""}var Rf=lf,wl={};function Sf(c,e){return Fl(c,e)}function Fl(c,e,t){let i;const s={};for(let n=0;n0&&(s[e.textNodeName]=i):i!==void 0&&(s[e.textNodeName]=i),s}function vf(c){const e=Object.keys(c);for(let t=0;t`);let t=null;this.modifiedDate&&(t=`${this.modifiedDate.toISOString()}`);let i=null;return this.modifiedAuthor&&(i=`${this.modifiedAuthor}`),` +*/(function(c,e){(function(t){c.exports=t()})(function(){return function t(i,s,n){function r(l,h){if(!s[l]){if(!i[l]){var d=typeof rn=="function"&&rn;if(!h&&d)return d(l,!0);if(o)return o(l,!0);var u=new Error("Cannot find module '"+l+"'");throw u.code="MODULE_NOT_FOUND",u}var f=s[l]={exports:{}};i[l][0].call(f.exports,function(m){var p=i[l][1][m];return r(p||m)},f,f.exports,t,i,s,n)}return s[l].exports}for(var o=typeof rn=="function"&&rn,a=0;a>2,f=(3&l)<<4|h>>4,m=1>6:64,p=2>4,h=(15&u)<<4|(f=o.indexOf(a.charAt(p++)))>>2,d=(3&f)<<6|(m=o.indexOf(a.charAt(p++))),g[E++]=l,f!==64&&(g[E++]=h),m!==64&&(g[E++]=d);return g}},{"./support":30,"./utils":32}],2:[function(t,i,s){var n=t("./external"),r=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function l(h,d,u,f,m){this.compressedSize=h,this.uncompressedSize=d,this.crc32=u,this.compression=f,this.compressedContent=m}l.prototype={getContentWorker:function(){var h=new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),d=this;return h.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(h,d,u){return h.pipe(new o).pipe(new a("uncompressedSize")).pipe(d.compressWorker(u)).pipe(new a("compressedSize")).withStreamInfo("compression",d)},i.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,i,s){var n=t("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},s.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,i,s){var n=t("./utils"),r=function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a}();i.exports=function(o,a){return o!==void 0&&o.length?n.getTypeOf(o)!=="string"?function(l,h,d,u){var f=r,m=u+d;l^=-1;for(var p=u;p>>8^f[255&(l^h[p])];return-1^l}(0|a,o,o.length,0):function(l,h,d,u){var f=r,m=u+d;l^=-1;for(var p=u;p>>8^f[255&(l^h.charCodeAt(p))];return-1^l}(0|a,o,o.length,0):0}},{"./utils":32}],5:[function(t,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(t,i,s){var n=null;n=typeof Promise<"u"?Promise:t("lie"),i.exports={Promise:n}},{lie:37}],7:[function(t,i,s){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",r=t("pako"),o=t("./utils"),a=t("./stream/GenericWorker"),l=n?"uint8array":"array";function h(d,u){a.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=u,this.meta={}}s.magic="\b\0",o.inherits(h,a),h.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(l,d.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(u){d.push({data:u,meta:d.meta})}},s.compressWorker=function(d){return new h("Deflate",d)},s.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,i,s){function n(f,m){var p,E="";for(p=0;p>>=8;return E}function r(f,m,p,E,I,g){var w,C,v=f.file,O=f.compression,A=g!==l.utf8encode,b=o.transformTo("string",g(v.name)),N=o.transformTo("string",l.utf8encode(v.name)),D=v.comment,_=o.transformTo("string",g(D)),F=o.transformTo("string",l.utf8encode(D)),L=N.length!==v.name.length,R=F.length!==D.length,U="",W="",z="",q=v.dir,X=v.date,re={crc32:0,compressedSize:0,uncompressedSize:0};m&&!p||(re.crc32=f.crc32,re.compressedSize=f.compressedSize,re.uncompressedSize=f.uncompressedSize);var G=0;m&&(G|=8),A||!L&&!R||(G|=2048);var V=0,oe=0;q&&(V|=16),I==="UNIX"?(oe=798,V|=function(te,Ae){var be=te;return te||(be=Ae?16893:33204),(65535&be)<<16}(v.unixPermissions,q)):(oe=20,V|=function(te){return 63&(te||0)}(v.dosPermissions)),w=X.getUTCHours(),w<<=6,w|=X.getUTCMinutes(),w<<=5,w|=X.getUTCSeconds()/2,C=X.getUTCFullYear()-1980,C<<=4,C|=X.getUTCMonth()+1,C<<=5,C|=X.getUTCDate(),L&&(W=n(1,1)+n(h(b),4)+N,U+="up"+n(W.length,2)+W),R&&(z=n(1,1)+n(h(_),4)+F,U+="uc"+n(z.length,2)+z);var ie="";return ie+=` +\0`,ie+=n(G,2),ie+=O.magic,ie+=n(w,2),ie+=n(C,2),ie+=n(re.crc32,4),ie+=n(re.compressedSize,4),ie+=n(re.uncompressedSize,4),ie+=n(b.length,2),ie+=n(U.length,2),{fileRecord:d.LOCAL_FILE_HEADER+ie+b+U,dirRecord:d.CENTRAL_FILE_HEADER+n(oe,2)+ie+n(_.length,2)+"\0\0\0\0"+n(V,4)+n(E,4)+b+U+_}}var o=t("../utils"),a=t("../stream/GenericWorker"),l=t("../utf8"),h=t("../crc32"),d=t("../signature");function u(f,m,p,E){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=p,this.encodeFileName=E,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(u,a),u.prototype.push=function(f){var m=f.meta.percent||0,p=this.entriesCount,E=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,a.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:p?(m+100*(p-E-1))/p:100}}))},u.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var m=this.streamFiles&&!f.file.dir;if(m){var p=r(f,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(f){this.accumulate=!1;var m=this.streamFiles&&!f.file.dir,p=r(f,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),m)this.push({data:function(E){return d.DATA_DESCRIPTOR+n(E.crc32,4)+n(E.compressedSize,4)+n(E.uncompressedSize,4)}(f),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var f=this.bytesWritten,m=0;m=this.index;a--)l=(l<<8)+this.byteAt(a);return this.index+=o,l},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},i.exports=r},{"../utils":32}],19:[function(t,i,s){var n=t("./Uint8ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,i,s){var n=t("./DataReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},r.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},r.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./DataReader":18}],21:[function(t,i,s){var n=t("./ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var a=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(t,i,s){var n=t("../utils"),r=t("../support"),o=t("./ArrayReader"),a=t("./StringReader"),l=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");i.exports=function(d){var u=n.getTypeOf(d);return n.checkSupport(u),u!=="string"||r.uint8array?u==="nodebuffer"?new l(d):r.uint8array?new h(n.transformTo("uint8array",d)):new o(n.transformTo("array",d)):new a(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,i,s){var n=t("./GenericWorker"),r=t("../utils");function o(a){n.call(this,"ConvertWorker to "+a),this.destType=a}r.inherits(o,n),o.prototype.processChunk=function(a){this.push({data:r.transformTo(this.destType,a.data),meta:a.meta})},i.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,i,s){var n=t("./GenericWorker"),r=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(a){this.streamInfo.crc32=r(a.data,this.streamInfo.crc32||0),this.push(a)},i.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,i,s){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}n.inherits(o,r),o.prototype.processChunk=function(a){if(a){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+a.data.length}r.prototype.processChunk.call(this,a)},i.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,i,s){var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataWorker");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(h){l.dataIsReady=!0,l.data=h,l.max=h&&h.length||0,l.type=n.getTypeOf(h),l.isPaused||l._tickAndRepeat()},function(h){l.error(h)})}n.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=null,l=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":a=this.data.substring(this.index,l);break;case"uint8array":a=this.data.subarray(this.index,l);break;case"array":case"nodebuffer":a=this.data.slice(this.index,l)}return this.index=l,this.push({data:a,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,i,s){function n(r){this.name=r||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(r){this.emit("data",r)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(r){this.emit("error",r)}return!0},error:function(r){return!this.isFinished&&(this.isPaused?this.generatedError=r:(this.isFinished=!0,this.emit("error",r),this.previous&&this.previous.error(r),this.cleanUp()),!0)},on:function(r,o){return this._listeners[r].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(r,o){if(this._listeners[r])for(var a=0;a "+r:r}},i.exports=n},{}],29:[function(t,i,s){var n=t("../utils"),r=t("./ConvertWorker"),o=t("./GenericWorker"),a=t("../base64"),l=t("../support"),h=t("../external"),d=null;if(l.nodestream)try{d=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function u(m,p){return new h.Promise(function(E,I){var g=[],w=m._internalType,C=m._outputType,v=m._mimeType;m.on("data",function(O,A){g.push(O),p&&p(A)}).on("error",function(O){g=[],I(O)}).on("end",function(){try{var O=function(A,b,N){switch(A){case"blob":return n.newBlob(n.transformTo("arraybuffer",b),N);case"base64":return a.encode(b);default:return n.transformTo(A,b)}}(C,function(A,b){var N,D=0,_=null,F=0;for(N=0;N"u")s.blob=!1;else{var n=new ArrayBuffer(0);try{s.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),s.blob=r.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!t("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(t,i,s){for(var n=t("./utils"),r=t("./support"),o=t("./nodejsUtils"),a=t("./stream/GenericWorker"),l=new Array(256),h=0;h<256;h++)l[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;l[254]=l[254]=1;function d(){a.call(this,"utf-8 decode"),this.leftOver=null}function u(){a.call(this,"utf-8 encode")}s.utf8encode=function(f){return r.nodebuffer?o.newBufferFrom(f,"utf-8"):function(m){var p,E,I,g,w,C=m.length,v=0;for(g=0;g>>6:(E<65536?p[w++]=224|E>>>12:(p[w++]=240|E>>>18,p[w++]=128|E>>>12&63),p[w++]=128|E>>>6&63),p[w++]=128|63&E);return p}(f)},s.utf8decode=function(f){return r.nodebuffer?n.transformTo("nodebuffer",f).toString("utf-8"):function(m){var p,E,I,g,w=m.length,C=new Array(2*w);for(p=E=0;p>10&1023,C[E++]=56320|1023&I)}return C.length!==E&&(C.subarray?C=C.subarray(0,E):C.length=E),n.applyFromCharCode(C)}(f=n.transformTo(r.uint8array?"uint8array":"array",f))},n.inherits(d,a),d.prototype.processChunk=function(f){var m=n.transformTo(r.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var p=m;(m=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),m.set(p,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var E=function(g,w){var C;for((w=w||g.length)>g.length&&(w=g.length),C=w-1;0<=C&&(192&g[C])==128;)C--;return C<0||C===0?w:C+l[g[C]]>w?C:w}(m),I=m;E!==m.length&&(r.uint8array?(I=m.subarray(0,E),this.leftOver=m.subarray(E,m.length)):(I=m.slice(0,E),this.leftOver=m.slice(E,m.length))),this.push({data:s.utf8decode(I),meta:f.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,n.inherits(u,a),u.prototype.processChunk=function(f){this.push({data:s.utf8encode(f.data),meta:f.meta})},s.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,i,s){var n=t("./support"),r=t("./base64"),o=t("./nodejsUtils"),a=t("./external");function l(p){return p}function h(p,E){for(var I=0;I>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var m,p,E,I=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4>>6:(f<65536?u[E++]=224|f>>>12:(u[E++]=240|f>>>18,u[E++]=128|f>>>12&63),u[E++]=128|f>>>6&63),u[E++]=128|63&f);return u},s.buf2binstring=function(d){return h(d,d.length)},s.binstring2buf=function(d){for(var u=new n.Buf8(d.length),f=0,m=u.length;f>10&1023,g[m++]=56320|1023&p)}return h(g,m)},s.utf8border=function(d,u){var f;for((u=u||d.length)>d.length&&(u=d.length),f=u-1;0<=f&&(192&d[f])==128;)f--;return f<0||f===0?u:f+a[d[f]]>u?f:u}},{"./common":41}],43:[function(t,i,s){i.exports=function(n,r,o,a){for(var l=65535&n|0,h=n>>>16&65535|0,d=0;o!==0;){for(o-=d=2e3>>1:r>>>1;o[a]=r}return o}();i.exports=function(r,o,a,l){var h=n,d=l+a;r^=-1;for(var u=l;u>>8^h[255&(r^o[u])];return-1^r}},{}],46:[function(t,i,s){var n,r=t("../utils/common"),o=t("./trees"),a=t("./adler32"),l=t("./crc32"),h=t("./messages"),d=0,u=4,f=0,m=-2,p=-1,E=4,I=2,g=8,w=9,C=286,v=30,O=19,A=2*C+1,b=15,N=3,D=258,_=D+N+1,F=42,L=113,R=1,U=2,W=3,z=4;function q(S,j){return S.msg=h[j],j}function X(S){return(S<<1)-(4S.avail_out&&(H=S.avail_out),H!==0&&(r.arraySet(S.output,j.pending_buf,j.pending_out,H,S.next_out),S.next_out+=H,j.pending_out+=H,S.total_out+=H,S.avail_out-=H,j.pending-=H,j.pending===0&&(j.pending_out=0))}function V(S,j){o._tr_flush_block(S,0<=S.block_start?S.block_start:-1,S.strstart-S.block_start,j),S.block_start=S.strstart,G(S.strm)}function oe(S,j){S.pending_buf[S.pending++]=j}function ie(S,j){S.pending_buf[S.pending++]=j>>>8&255,S.pending_buf[S.pending++]=255&j}function te(S,j){var H,M,P=S.max_chain_length,B=S.strstart,Q=S.prev_length,K=S.nice_match,k=S.strstart>S.w_size-_?S.strstart-(S.w_size-_):0,J=S.window,se=S.w_mask,$=S.prev,le=S.strstart+D,we=J[B+Q-1],Ie=J[B+Q];S.prev_length>=S.good_match&&(P>>=2),K>S.lookahead&&(K=S.lookahead);do if(J[(H=j)+Q]===Ie&&J[H+Q-1]===we&&J[H]===J[B]&&J[++H]===J[B+1]){B+=2,H++;do;while(J[++B]===J[++H]&&J[++B]===J[++H]&&J[++B]===J[++H]&&J[++B]===J[++H]&&J[++B]===J[++H]&&J[++B]===J[++H]&&J[++B]===J[++H]&&J[++B]===J[++H]&&Bk&&--P!=0);return Q<=S.lookahead?Q:S.lookahead}function Ae(S){var j,H,M,P,B,Q,K,k,J,se,$=S.w_size;do{if(P=S.window_size-S.lookahead-S.strstart,S.strstart>=$+($-_)){for(r.arraySet(S.window,S.window,$,$,0),S.match_start-=$,S.strstart-=$,S.block_start-=$,j=H=S.hash_size;M=S.head[--j],S.head[j]=$<=M?M-$:0,--H;);for(j=H=$;M=S.prev[--j],S.prev[j]=$<=M?M-$:0,--H;);P+=$}if(S.strm.avail_in===0)break;if(Q=S.strm,K=S.window,k=S.strstart+S.lookahead,J=P,se=void 0,se=Q.avail_in,J=N)for(B=S.strstart-S.insert,S.ins_h=S.window[B],S.ins_h=(S.ins_h<=N&&(S.ins_h=(S.ins_h<=N)if(M=o._tr_tally(S,S.strstart-S.match_start,S.match_length-N),S.lookahead-=S.match_length,S.match_length<=S.max_lazy_match&&S.lookahead>=N){for(S.match_length--;S.strstart++,S.ins_h=(S.ins_h<=N&&(S.ins_h=(S.ins_h<=N&&S.match_length<=S.prev_length){for(P=S.strstart+S.lookahead-N,M=o._tr_tally(S,S.strstart-1-S.prev_match,S.prev_length-N),S.lookahead-=S.prev_length-1,S.prev_length-=2;++S.strstart<=P&&(S.ins_h=(S.ins_h<S.pending_buf_size-5&&(H=S.pending_buf_size-5);;){if(S.lookahead<=1){if(Ae(S),S.lookahead===0&&j===d)return R;if(S.lookahead===0)break}S.strstart+=S.lookahead,S.lookahead=0;var M=S.block_start+H;if((S.strstart===0||S.strstart>=M)&&(S.lookahead=S.strstart-M,S.strstart=M,V(S,!1),S.strm.avail_out===0)||S.strstart-S.block_start>=S.w_size-_&&(V(S,!1),S.strm.avail_out===0))return R}return S.insert=0,j===u?(V(S,!0),S.strm.avail_out===0?W:z):(S.strstart>S.block_start&&(V(S,!1),S.strm.avail_out),R)}),new me(4,4,8,4,be),new me(4,5,16,8,be),new me(4,6,32,32,be),new me(4,4,16,16,ae),new me(8,16,32,32,ae),new me(8,16,128,128,ae),new me(8,32,128,256,ae),new me(32,128,258,1024,ae),new me(32,258,258,4096,ae)],s.deflateInit=function(S,j){return Ye(S,j,g,15,8,0)},s.deflateInit2=Ye,s.deflateReset=nt,s.deflateResetKeep=Te,s.deflateSetHeader=function(S,j){return S&&S.state?S.state.wrap!==2?m:(S.state.gzhead=j,f):m},s.deflate=function(S,j){var H,M,P,B;if(!S||!S.state||5>8&255),oe(M,M.gzhead.time>>16&255),oe(M,M.gzhead.time>>24&255),oe(M,M.level===9?2:2<=M.strategy||M.level<2?4:0),oe(M,255&M.gzhead.os),M.gzhead.extra&&M.gzhead.extra.length&&(oe(M,255&M.gzhead.extra.length),oe(M,M.gzhead.extra.length>>8&255)),M.gzhead.hcrc&&(S.adler=l(S.adler,M.pending_buf,M.pending,0)),M.gzindex=0,M.status=69):(oe(M,0),oe(M,0),oe(M,0),oe(M,0),oe(M,0),oe(M,M.level===9?2:2<=M.strategy||M.level<2?4:0),oe(M,3),M.status=L);else{var Q=g+(M.w_bits-8<<4)<<8;Q|=(2<=M.strategy||M.level<2?0:M.level<6?1:M.level===6?2:3)<<6,M.strstart!==0&&(Q|=32),Q+=31-Q%31,M.status=L,ie(M,Q),M.strstart!==0&&(ie(M,S.adler>>>16),ie(M,65535&S.adler)),S.adler=1}if(M.status===69)if(M.gzhead.extra){for(P=M.pending;M.gzindex<(65535&M.gzhead.extra.length)&&(M.pending!==M.pending_buf_size||(M.gzhead.hcrc&&M.pending>P&&(S.adler=l(S.adler,M.pending_buf,M.pending-P,P)),G(S),P=M.pending,M.pending!==M.pending_buf_size));)oe(M,255&M.gzhead.extra[M.gzindex]),M.gzindex++;M.gzhead.hcrc&&M.pending>P&&(S.adler=l(S.adler,M.pending_buf,M.pending-P,P)),M.gzindex===M.gzhead.extra.length&&(M.gzindex=0,M.status=73)}else M.status=73;if(M.status===73)if(M.gzhead.name){P=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>P&&(S.adler=l(S.adler,M.pending_buf,M.pending-P,P)),G(S),P=M.pending,M.pending===M.pending_buf_size)){B=1;break}B=M.gzindexP&&(S.adler=l(S.adler,M.pending_buf,M.pending-P,P)),B===0&&(M.gzindex=0,M.status=91)}else M.status=91;if(M.status===91)if(M.gzhead.comment){P=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>P&&(S.adler=l(S.adler,M.pending_buf,M.pending-P,P)),G(S),P=M.pending,M.pending===M.pending_buf_size)){B=1;break}B=M.gzindexP&&(S.adler=l(S.adler,M.pending_buf,M.pending-P,P)),B===0&&(M.status=103)}else M.status=103;if(M.status===103&&(M.gzhead.hcrc?(M.pending+2>M.pending_buf_size&&G(S),M.pending+2<=M.pending_buf_size&&(oe(M,255&S.adler),oe(M,S.adler>>8&255),S.adler=0,M.status=L)):M.status=L),M.pending!==0){if(G(S),S.avail_out===0)return M.last_flush=-1,f}else if(S.avail_in===0&&X(j)<=X(H)&&j!==u)return q(S,-5);if(M.status===666&&S.avail_in!==0)return q(S,-5);if(S.avail_in!==0||M.lookahead!==0||j!==d&&M.status!==666){var K=M.strategy===2?function(k,J){for(var se;;){if(k.lookahead===0&&(Ae(k),k.lookahead===0)){if(J===d)return R;break}if(k.match_length=0,se=o._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++,se&&(V(k,!1),k.strm.avail_out===0))return R}return k.insert=0,J===u?(V(k,!0),k.strm.avail_out===0?W:z):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?R:U}(M,j):M.strategy===3?function(k,J){for(var se,$,le,we,Ie=k.window;;){if(k.lookahead<=D){if(Ae(k),k.lookahead<=D&&J===d)return R;if(k.lookahead===0)break}if(k.match_length=0,k.lookahead>=N&&0k.lookahead&&(k.match_length=k.lookahead)}if(k.match_length>=N?(se=o._tr_tally(k,1,k.match_length-N),k.lookahead-=k.match_length,k.strstart+=k.match_length,k.match_length=0):(se=o._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++),se&&(V(k,!1),k.strm.avail_out===0))return R}return k.insert=0,J===u?(V(k,!0),k.strm.avail_out===0?W:z):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?R:U}(M,j):n[M.level].func(M,j);if(K!==W&&K!==z||(M.status=666),K===R||K===W)return S.avail_out===0&&(M.last_flush=-1),f;if(K===U&&(j===1?o._tr_align(M):j!==5&&(o._tr_stored_block(M,0,0,!1),j===3&&(re(M.head),M.lookahead===0&&(M.strstart=0,M.block_start=0,M.insert=0))),G(S),S.avail_out===0))return M.last_flush=-1,f}return j!==u?f:M.wrap<=0?1:(M.wrap===2?(oe(M,255&S.adler),oe(M,S.adler>>8&255),oe(M,S.adler>>16&255),oe(M,S.adler>>24&255),oe(M,255&S.total_in),oe(M,S.total_in>>8&255),oe(M,S.total_in>>16&255),oe(M,S.total_in>>24&255)):(ie(M,S.adler>>>16),ie(M,65535&S.adler)),G(S),0=H.w_size&&(B===0&&(re(H.head),H.strstart=0,H.block_start=0,H.insert=0),J=new r.Buf8(H.w_size),r.arraySet(J,j,se-H.w_size,H.w_size,0),j=J,se=H.w_size),Q=S.avail_in,K=S.next_in,k=S.input,S.avail_in=se,S.next_in=0,S.input=j,Ae(H);H.lookahead>=N;){for(M=H.strstart,P=H.lookahead-(N-1);H.ins_h=(H.ins_h<>>=N=b>>>24,w-=N,(N=b>>>16&255)===0)U[h++]=65535&b;else{if(!(16&N)){if(!(64&N)){b=C[(65535&b)+(g&(1<>>=N,w-=N),w<15&&(g+=R[a++]<>>=N=b>>>24,w-=N,!(16&(N=b>>>16&255))){if(!(64&N)){b=v[(65535&b)+(g&(1<>>=N,w-=N,(N=h-d)<_){if(p<(N=_-N)&&o.sane){n.msg="invalid distance too far back",o.mode=30;break e}if(L=I,(F=0)===E){if(F+=m-N,N>3,g&=(1<<(w-=D<<3))-1,n.next_in=a,n.next_out=h,n.avail_in=a>>24&255)+(F>>>8&65280)+((65280&F)<<8)+((255&F)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(F){var L;return F&&F.state?(L=F.state,F.total_in=F.total_out=L.total=0,F.msg="",L.wrap&&(F.adler=1&L.wrap),L.mode=m,L.last=0,L.havedict=0,L.dmax=32768,L.head=null,L.hold=0,L.bits=0,L.lencode=L.lendyn=new n.Buf32(p),L.distcode=L.distdyn=new n.Buf32(E),L.sane=1,L.back=-1,u):f}function C(F){var L;return F&&F.state?((L=F.state).wsize=0,L.whave=0,L.wnext=0,w(F)):f}function v(F,L){var R,U;return F&&F.state?(U=F.state,L<0?(R=0,L=-L):(R=1+(L>>4),L<48&&(L&=15)),L&&(L<8||15=z.wsize?(n.arraySet(z.window,L,R-z.wsize,z.wsize,0),z.wnext=0,z.whave=z.wsize):(U<(W=z.wsize-z.wnext)&&(W=U),n.arraySet(z.window,L,R-U,W,z.wnext),(U-=W)?(n.arraySet(z.window,L,R-U,U,0),z.wnext=U,z.whave=z.wsize):(z.wnext+=W,z.wnext===z.wsize&&(z.wnext=0),z.whave>>8&255,R.check=o(R.check,B,2,0),V=G=0,R.mode=2;break}if(R.flags=0,R.head&&(R.head.done=!1),!(1&R.wrap)||(((255&G)<<8)+(G>>8))%31){F.msg="incorrect header check",R.mode=30;break}if((15&G)!=8){F.msg="unknown compression method",R.mode=30;break}if(V-=4,S=8+(15&(G>>>=4)),R.wbits===0)R.wbits=S;else if(S>R.wbits){F.msg="invalid window size",R.mode=30;break}R.dmax=1<>8&1),512&R.flags&&(B[0]=255&G,B[1]=G>>>8&255,R.check=o(R.check,B,2,0)),V=G=0,R.mode=3;case 3:for(;V<32;){if(X===0)break e;X--,G+=U[z++]<>>8&255,B[2]=G>>>16&255,B[3]=G>>>24&255,R.check=o(R.check,B,4,0)),V=G=0,R.mode=4;case 4:for(;V<16;){if(X===0)break e;X--,G+=U[z++]<>8),512&R.flags&&(B[0]=255&G,B[1]=G>>>8&255,R.check=o(R.check,B,2,0)),V=G=0,R.mode=5;case 5:if(1024&R.flags){for(;V<16;){if(X===0)break e;X--,G+=U[z++]<>>8&255,R.check=o(R.check,B,2,0)),V=G=0}else R.head&&(R.head.extra=null);R.mode=6;case 6:if(1024&R.flags&&(X<(te=R.length)&&(te=X),te&&(R.head&&(S=R.head.extra_len-R.length,R.head.extra||(R.head.extra=new Array(R.head.extra_len)),n.arraySet(R.head.extra,U,z,te,S)),512&R.flags&&(R.check=o(R.check,U,te,z)),X-=te,z+=te,R.length-=te),R.length))break e;R.length=0,R.mode=7;case 7:if(2048&R.flags){if(X===0)break e;for(te=0;S=U[z+te++],R.head&&S&&R.length<65536&&(R.head.name+=String.fromCharCode(S)),S&&te>9&1,R.head.done=!0),F.adler=R.check=0,R.mode=12;break;case 10:for(;V<32;){if(X===0)break e;X--,G+=U[z++]<>>=7&V,V-=7&V,R.mode=27;break}for(;V<3;){if(X===0)break e;X--,G+=U[z++]<>>=1)){case 0:R.mode=14;break;case 1:if(D(R),R.mode=20,L!==6)break;G>>>=2,V-=2;break e;case 2:R.mode=17;break;case 3:F.msg="invalid block type",R.mode=30}G>>>=2,V-=2;break;case 14:for(G>>>=7&V,V-=7&V;V<32;){if(X===0)break e;X--,G+=U[z++]<>>16^65535)){F.msg="invalid stored block lengths",R.mode=30;break}if(R.length=65535&G,V=G=0,R.mode=15,L===6)break e;case 15:R.mode=16;case 16:if(te=R.length){if(X>>=5,V-=5,R.ndist=1+(31&G),G>>>=5,V-=5,R.ncode=4+(15&G),G>>>=4,V-=4,286>>=3,V-=3}for(;R.have<19;)R.lens[Q[R.have++]]=0;if(R.lencode=R.lendyn,R.lenbits=7,H={bits:R.lenbits},j=l(0,R.lens,0,19,R.lencode,0,R.work,H),R.lenbits=H.bits,j){F.msg="invalid code lengths set",R.mode=30;break}R.have=0,R.mode=19;case 19:for(;R.have>>16&255,pe=65535&P,!((ae=P>>>24)<=V);){if(X===0)break e;X--,G+=U[z++]<>>=ae,V-=ae,R.lens[R.have++]=pe;else{if(pe===16){for(M=ae+2;V>>=ae,V-=ae,R.have===0){F.msg="invalid bit length repeat",R.mode=30;break}S=R.lens[R.have-1],te=3+(3&G),G>>>=2,V-=2}else if(pe===17){for(M=ae+3;V>>=ae)),G>>>=3,V-=3}else{for(M=ae+7;V>>=ae)),G>>>=7,V-=7}if(R.have+te>R.nlen+R.ndist){F.msg="invalid bit length repeat",R.mode=30;break}for(;te--;)R.lens[R.have++]=S}}if(R.mode===30)break;if(R.lens[256]===0){F.msg="invalid code -- missing end-of-block",R.mode=30;break}if(R.lenbits=9,H={bits:R.lenbits},j=l(h,R.lens,0,R.nlen,R.lencode,0,R.work,H),R.lenbits=H.bits,j){F.msg="invalid literal/lengths set",R.mode=30;break}if(R.distbits=6,R.distcode=R.distdyn,H={bits:R.distbits},j=l(d,R.lens,R.nlen,R.ndist,R.distcode,0,R.work,H),R.distbits=H.bits,j){F.msg="invalid distances set",R.mode=30;break}if(R.mode=20,L===6)break e;case 20:R.mode=21;case 21:if(6<=X&&258<=re){F.next_out=q,F.avail_out=re,F.next_in=z,F.avail_in=X,R.hold=G,R.bits=V,a(F,ie),q=F.next_out,W=F.output,re=F.avail_out,z=F.next_in,U=F.input,X=F.avail_in,G=R.hold,V=R.bits,R.mode===12&&(R.back=-1);break}for(R.back=0;me=(P=R.lencode[G&(1<>>16&255,pe=65535&P,!((ae=P>>>24)<=V);){if(X===0)break e;X--,G+=U[z++]<>Te)])>>>16&255,pe=65535&P,!(Te+(ae=P>>>24)<=V);){if(X===0)break e;X--,G+=U[z++]<>>=Te,V-=Te,R.back+=Te}if(G>>>=ae,V-=ae,R.back+=ae,R.length=pe,me===0){R.mode=26;break}if(32&me){R.back=-1,R.mode=12;break}if(64&me){F.msg="invalid literal/length code",R.mode=30;break}R.extra=15&me,R.mode=22;case 22:if(R.extra){for(M=R.extra;V>>=R.extra,V-=R.extra,R.back+=R.extra}R.was=R.length,R.mode=23;case 23:for(;me=(P=R.distcode[G&(1<>>16&255,pe=65535&P,!((ae=P>>>24)<=V);){if(X===0)break e;X--,G+=U[z++]<>Te)])>>>16&255,pe=65535&P,!(Te+(ae=P>>>24)<=V);){if(X===0)break e;X--,G+=U[z++]<>>=Te,V-=Te,R.back+=Te}if(G>>>=ae,V-=ae,R.back+=ae,64&me){F.msg="invalid distance code",R.mode=30;break}R.offset=pe,R.extra=15&me,R.mode=24;case 24:if(R.extra){for(M=R.extra;V>>=R.extra,V-=R.extra,R.back+=R.extra}if(R.offset>R.dmax){F.msg="invalid distance too far back",R.mode=30;break}R.mode=25;case 25:if(re===0)break e;if(te=ie-re,R.offset>te){if((te=R.offset-te)>R.whave&&R.sane){F.msg="invalid distance too far back",R.mode=30;break}Ae=te>R.wnext?(te-=R.wnext,R.wsize-te):R.wnext-te,te>R.length&&(te=R.length),be=R.window}else be=W,Ae=q-R.offset,te=R.length;for(reA?(N=Ae[be+E[L]],V[oe+E[L]]):(N=96,0),g=1<>q)+(w-=g)]=b<<24|N<<16|D|0,w!==0;);for(g=1<>=1;if(g!==0?(G&=g-1,G+=g):G=0,L++,--ie[F]==0){if(F===U)break;F=d[u+E[L]]}if(W>>7)]}function oe(P,B){P.pending_buf[P.pending++]=255&B,P.pending_buf[P.pending++]=B>>>8&255}function ie(P,B,Q){P.bi_valid>I-Q?(P.bi_buf|=B<>I-P.bi_valid,P.bi_valid+=Q-I):(P.bi_buf|=B<>>=1,Q<<=1,0<--B;);return Q>>>1}function be(P,B,Q){var K,k,J=new Array(E+1),se=0;for(K=1;K<=E;K++)J[K]=se=se+Q[K-1]<<1;for(k=0;k<=B;k++){var $=P[2*k+1];$!==0&&(P[2*k]=Ae(J[$]++,$))}}function ae(P){var B;for(B=0;B>1;1<=Q;Q--)Te(P,J,Q);for(k=le;Q=P.heap[1],P.heap[1]=P.heap[P.heap_len--],Te(P,J,1),K=P.heap[1],P.heap[--P.heap_max]=Q,P.heap[--P.heap_max]=K,J[2*k]=J[2*Q]+J[2*K],P.depth[k]=(P.depth[Q]>=P.depth[K]?P.depth[Q]:P.depth[K])+1,J[2*Q+1]=J[2*K+1]=k,P.heap[1]=k++,Te(P,J,1),2<=P.heap_len;);P.heap[--P.heap_max]=P.heap[1],function(Ie,rt){var qi,Ct,Ji,xe,bs,Hn,Pt=rt.dyn_tree,Ro=rt.max_code,Uc=rt.stat_desc.static_tree,Bc=rt.stat_desc.has_stree,zc=rt.stat_desc.extra_bits,So=rt.stat_desc.extra_base,$i=rt.stat_desc.max_length,xs=0;for(xe=0;xe<=E;xe++)Ie.bl_count[xe]=0;for(Pt[2*Ie.heap[Ie.heap_max]+1]=0,qi=Ie.heap_max+1;qi>=7;k>>=1)if(1&we&&$.dyn_ltree[2*le]!==0)return r;if($.dyn_ltree[18]!==0||$.dyn_ltree[20]!==0||$.dyn_ltree[26]!==0)return o;for(le=32;le>>3,(J=P.static_len+3+7>>>3)<=k&&(k=J)):k=J=Q+5,Q+4<=k&&B!==-1?M(P,B,Q,K):P.strategy===4||J===k?(ie(P,2+(K?1:0),3),nt(P,_,F)):(ie(P,4+(K?1:0),3),function($,le,we,Ie){var rt;for(ie($,le-257,5),ie($,we-1,5),ie($,Ie-4,4),rt=0;rt>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&B,P.pending_buf[P.l_buf+P.last_lit]=255&Q,P.last_lit++,B===0?P.dyn_ltree[2*Q]++:(P.matches++,B--,P.dyn_ltree[2*(R[Q]+d+1)]++,P.dyn_dtree[2*V(B)]++),P.last_lit===P.lit_bufsize-1},s._tr_align=function(P){ie(P,2,3),te(P,w,_),function(B){B.bi_valid===16?(oe(B,B.bi_buf),B.bi_buf=0,B.bi_valid=0):8<=B.bi_valid&&(B.pending_buf[B.pending++]=255&B.bi_buf,B.bi_buf>>=8,B.bi_valid-=8)}(P)}},{"../utils/common":41}],53:[function(t,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,i,s){(function(n){(function(r,o){if(!r.setImmediate){var a,l,h,d,u=1,f={},m=!1,p=r.document,E=Object.getPrototypeOf&&Object.getPrototypeOf(r);E=E&&E.setTimeout?E:r,a={}.toString.call(r.process)==="[object process]"?function(C){process.nextTick(function(){g(C)})}:function(){if(r.postMessage&&!r.importScripts){var C=!0,v=r.onmessage;return r.onmessage=function(){C=!1},r.postMessage("","*"),r.onmessage=v,C}}()?(d="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",w,!1):r.attachEvent("onmessage",w),function(C){r.postMessage(d+C,"*")}):r.MessageChannel?((h=new MessageChannel).port1.onmessage=function(C){g(C.data)},function(C){h.port2.postMessage(C)}):p&&"onreadystatechange"in p.createElement("script")?(l=p.documentElement,function(C){var v=p.createElement("script");v.onreadystatechange=function(){g(C),v.onreadystatechange=null,l.removeChild(v),v=null},l.appendChild(v)}):function(C){setTimeout(g,0,C)},E.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var v=new Array(arguments.length-1),O=0;O"u"?n===void 0?this:n:self)}).call(this,typeof nn<"u"?nn:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Rl);var Mu=Rl.exports;const da=xu(Mu);var Sl={},kn={};(function(c){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",i="["+e+"]["+t+"]*",s=new RegExp("^"+i+"$"),n=function(o,a){const l=[];let h=a.exec(o);for(;h;){const d=[];d.startIndex=a.lastIndex-h[0].length;const u=h.length;for(let f=0;f"u")};c.isExist=function(o){return typeof o<"u"},c.isEmptyObject=function(o){return Object.keys(o).length===0},c.merge=function(o,a,l){if(a){const h=Object.keys(a),d=h.length;for(let u=0;u"&&c[n]!==" "&&c[n]!==" "&&c[n]!==` +`&&c[n]!=="\r";n++)a+=c[n];if(a=a.trim(),a[a.length-1]==="/"&&(a=a.substring(0,a.length-1),n--),!Yu(a)){let d;return a.trim().length===0?d="Invalid space after '<'.":d="Tag '"+a+"' is an invalid name.",Me("InvalidTag",d,Ze(c,n))}const l=Uu(c,n);if(l===!1)return Me("InvalidAttr","Attributes for '"+a+"' have open quote.",Ze(c,n));let h=l.value;if(n=l.index,h[h.length-1]==="/"){const d=n-h.length;h=h.substring(0,h.length-1);const u=ma(h,e);if(u===!0)i=!0;else return Me(u.err.code,u.err.msg,Ze(c,d+u.err.line))}else if(o)if(l.tagClosed){if(h.trim().length>0)return Me("InvalidTag","Closing tag '"+a+"' can't have attributes or invalid starting.",Ze(c,r));if(t.length===0)return Me("InvalidTag","Closing tag '"+a+"' has not been opened.",Ze(c,r));{const d=t.pop();if(a!==d.tagName){let u=Ze(c,d.tagStartPos);return Me("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+u.line+", col "+u.col+") instead of closing tag '"+a+"'.",Ze(c,r))}t.length==0&&(s=!0)}}else return Me("InvalidTag","Closing tag '"+a+"' doesn't have proper closing.",Ze(c,n));else{const d=ma(h,e);if(d!==!0)return Me(d.err.code,d.err.msg,Ze(c,n-h.length+d.err.line));if(s===!0)return Me("InvalidXml","Multiple possible root nodes found.",Ze(c,n));e.unpairedTags.indexOf(a)!==-1||t.push({tagName:a,tagStartPos:r}),i=!0}for(n++;n0)return Me("InvalidXml","Invalid '"+JSON.stringify(t.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Me("InvalidXml","Start tag expected.",1);return!0};function ua(c){return c===" "||c===" "||c===` +`||c==="\r"}function fa(c,e){const t=e;for(;e5&&i==="xml")return Me("InvalidXml","XML declaration allowed only at the start of the document.",Ze(c,e));if(c[e]=="?"&&c[e+1]==">"){e++;break}else continue}return e}function pa(c,e){if(c.length>e+5&&c[e+1]==="-"&&c[e+2]==="-"){for(e+=3;e"){e+=2;break}}else if(c.length>e+8&&c[e+1]==="D"&&c[e+2]==="O"&&c[e+3]==="C"&&c[e+4]==="T"&&c[e+5]==="Y"&&c[e+6]==="P"&&c[e+7]==="E"){let t=1;for(e+=8;e"&&(t--,t===0))break}else if(c.length>e+9&&c[e+1]==="["&&c[e+2]==="C"&&c[e+3]==="D"&&c[e+4]==="A"&&c[e+5]==="T"&&c[e+6]==="A"&&c[e+7]==="["){for(e+=8;e"){e+=2;break}}return e}const Du='"',_u="'";function Uu(c,e){let t="",i="",s=!1;for(;e"&&i===""){s=!0;break}t+=c[e]}return i!==""?!1:{value:t,index:e,tagClosed:s}}const Bu=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function ma(c,e){const t=po.getAllMatches(c,Bu),i={};for(let s=0;s!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(c,e,t){return c}},Gu=function(c){return Object.assign({},wl,c)};mo.buildOptions=Gu;mo.defaultOptions=wl;class Hu{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}var Wu=Hu;const Xu=kn;function Zu(c,e){const t={};if(c[e+3]==="O"&&c[e+4]==="C"&&c[e+5]==="T"&&c[e+6]==="Y"&&c[e+7]==="P"&&c[e+8]==="E"){e=e+9;let i=1,s=!1,n=!1,r="";for(;e"){if(n?c[e-1]==="-"&&c[e-2]==="-"&&(n=!1,i--):i--,i===0)break}else c[e]==="["?s=!0:r+=c[e];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:t,i:e}}function ju(c,e){let t="";for(;e0&&s&&t[2]!=="."||!e.leadingZeros&&n.length>0&&!s&&t[1]!==".")return c;{const a=Number(t),l=""+a;return l.search(/[eE]/)!==-1||o?e.eNotation?a:c:t.indexOf(".")!==-1?l==="0"&&r===""||l===r||s&&l==="-"+r?a:c:n?r===l||s+r===l?a:c:t===l||t===s+l?a:c}}else return c}}function af(c){return c&&c.indexOf(".")!==-1&&(c=c.replace(/0+$/,""),c==="."?c="0":c[0]==="."?c="0"+c:c[c.length-1]==="."&&(c=c.substr(0,c.length-1))),c}var lf=of;const vl=kn,Is=Wu,cf=tf,hf=lf;let df=class{constructor(c){this.options=c,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=uf,this.parseXml=Ef,this.parseTextData=ff,this.resolveNameSpace=pf,this.buildAttributesMap=If,this.isItStopNode=Rf,this.replaceEntitiesValue=Cf,this.readStopNodeData=wf,this.saveTextToParentTag=Tf,this.addChild=gf}};function uf(c){const e=Object.keys(c);for(let t=0;t0)){r||(c=this.replaceEntitiesValue(c));const o=this.options.tagValueProcessor(e,c,t,s,n);return o==null?c:typeof o!=typeof c||o!==c?o:this.options.trimValues?Pr(c,this.options.parseTagValue,this.options.numberParseOptions):c.trim()===c?Pr(c,this.options.parseTagValue,this.options.numberParseOptions):c}}function pf(c){if(this.options.removeNSPrefix){const e=c.split(":"),t=c.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(c=t+e[1])}return c}const mf=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function If(c,e,t){if(!this.options.ignoreAttributes&&typeof c=="string"){const i=vl.getAllMatches(c,mf),s=i.length,n={};for(let r=0;r",n,"Closing Tag is not closed.");let o=c.substring(n+2,r).trim();if(this.options.removeNSPrefix){const h=o.indexOf(":");h!==-1&&(o=o.substr(h+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),t&&(i=this.saveTextToParentTag(i,t,s));const a=s.substring(s.lastIndexOf(".")+1);if(o&&this.options.unpairedTags.indexOf(o)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;a&&this.options.unpairedTags.indexOf(a)!==-1?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),t=this.tagsNodeStack.pop(),i="",n=r}else if(c[n+1]==="?"){let r=Nr(c,n,!1,"?>");if(!r)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,t,s),!(this.options.ignoreDeclaration&&r.tagName==="?xml"||this.options.ignorePiTags)){const o=new Is(r.tagName);o.add(this.options.textNodeName,""),r.tagName!==r.tagExp&&r.attrExpPresent&&(o[":@"]=this.buildAttributesMap(r.tagExp,s,r.tagName)),this.addChild(t,o,s)}n=r.closeIndex+1}else if(c.substr(n+1,3)==="!--"){const r=ui(c,"-->",n+4,"Comment is not closed.");if(this.options.commentPropName){const o=c.substring(n+4,r-2);i=this.saveTextToParentTag(i,t,s),t.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}n=r}else if(c.substr(n+1,2)==="!D"){const r=cf(c,n);this.docTypeEntities=r.entities,n=r.i}else if(c.substr(n+1,2)==="!["){const r=ui(c,"]]>",n,"CDATA is not closed.")-2,o=c.substring(n+9,r);i=this.saveTextToParentTag(i,t,s);let a=this.parseTextData(o,t.tagname,s,!0,!1,!0,!0);a==null&&(a=""),this.options.cdataPropName?t.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):t.add(this.options.textNodeName,a),n=r+2}else{let r=Nr(c,n,this.options.removeNSPrefix),o=r.tagName;const a=r.rawTagName;let l=r.tagExp,h=r.attrExpPresent,d=r.closeIndex;this.options.transformTagName&&(o=this.options.transformTagName(o)),t&&i&&t.tagname!=="!xml"&&(i=this.saveTextToParentTag(i,t,s,!1));const u=t;if(u&&this.options.unpairedTags.indexOf(u.tagname)!==-1&&(t=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),o!==e.tagname&&(s+=s?"."+o:o),this.isItStopNode(this.options.stopNodes,s,o)){let f="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)o[o.length-1]==="/"?(o=o.substr(0,o.length-1),s=s.substr(0,s.length-1),l=o):l=l.substr(0,l.length-1),n=r.closeIndex;else if(this.options.unpairedTags.indexOf(o)!==-1)n=r.closeIndex;else{const p=this.readStopNodeData(c,a,d+1);if(!p)throw new Error(`Unexpected end of ${a}`);n=p.i,f=p.tagContent}const m=new Is(o);o!==l&&h&&(m[":@"]=this.buildAttributesMap(l,s,o)),f&&(f=this.parseTextData(f,o,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),m.add(this.options.textNodeName,f),this.addChild(t,m,s)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){o[o.length-1]==="/"?(o=o.substr(0,o.length-1),s=s.substr(0,s.length-1),l=o):l=l.substr(0,l.length-1),this.options.transformTagName&&(o=this.options.transformTagName(o));const f=new Is(o);o!==l&&h&&(f[":@"]=this.buildAttributesMap(l,s,o)),this.addChild(t,f,s),s=s.substr(0,s.lastIndexOf("."))}else{const f=new Is(o);this.tagsNodeStack.push(t),o!==l&&h&&(f[":@"]=this.buildAttributesMap(l,s,o)),this.addChild(t,f,s),t=f}i="",n=d}}else i+=c[n];return e.child};function gf(c,e,t){const i=this.options.updateTag(e.tagname,t,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),c.addChild(e))}const Cf=function(c){if(this.options.processEntities){for(let e in this.docTypeEntities){const t=this.docTypeEntities[e];c=c.replace(t.regx,t.val)}for(let e in this.lastEntities){const t=this.lastEntities[e];c=c.replace(t.regex,t.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const t=this.htmlEntities[e];c=c.replace(t.regex,t.val)}c=c.replace(this.ampEntity.regex,this.ampEntity.val)}return c};function Tf(c,e,t,i){return c&&(i===void 0&&(i=Object.keys(e.child).length===0),c=this.parseTextData(c,e.tagname,t,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,i),c!==void 0&&c!==""&&e.add(this.options.textNodeName,c),c=""),c}function Rf(c,e,t){const i="*."+t;for(const s in c){const n=c[s];if(i===n||e===n)return!0}return!1}function Sf(c,e,t=">"){let i,s="";for(let n=e;n",t,`${e} is not closed`);if(c.substring(t+2,n).trim()===e&&(s--,s===0))return{tagContent:c.substring(i,t),i:n};t=n}else if(c[t+1]==="?")t=ui(c,"?>",t+1,"StopNode is not closed.");else if(c.substr(t+1,3)==="!--")t=ui(c,"-->",t+3,"StopNode is not closed.");else if(c.substr(t+1,2)==="![")t=ui(c,"]]>",t,"StopNode is not closed.")-2;else{const n=Nr(c,t,">");n&&((n&&n.tagName)===e&&n.tagExp[n.tagExp.length-1]!=="/"&&s++,t=n.closeIndex)}}function Pr(c,e,t){if(e&&typeof c=="string"){const i=c.trim();return i==="true"?!0:i==="false"?!1:hf(c,t)}else return vl.isExist(c)?c:""}var vf=df,yl={};function yf(c,e){return Fl(c,e)}function Fl(c,e,t){let i;const s={};for(let n=0;n0&&(s[e.textNodeName]=i):i!==void 0&&(s[e.textNodeName]=i),s}function Ff(c){const e=Object.keys(c);for(let t=0;t`);let t=null;this.modifiedDate&&(t=`${this.modifiedDate.toISOString()}`);let i=null;return this.modifiedAuthor&&(i=`${this.modifiedAuthor}`),` ${this.date.toISOString()} ${this.author} @@ -108,7 +108,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE ${i??""} ${t??""} - `}}const yl=class jt{constructor(e){T(this,"guid",Gt.create()),T(this,"title",jt.default.title),T(this,"creationDate",new Date),T(this,"creationAuthor",""),T(this,"viewpoints",new Jt),T(this,"relatedTopics",new Jt),T(this,"comments",new gt),T(this,"customData",{}),T(this,"description"),T(this,"serverAssignedId"),T(this,"dueDate"),T(this,"modifiedAuthor"),T(this,"modifiedDate"),T(this,"index"),T(this,"_type",jt.default.type),T(this,"_status",jt.default.status),T(this,"_priority",jt.default.priority),T(this,"_stage",jt.default.stage),T(this,"_assignedTo",jt.default.assignedTo),T(this,"_labels",jt.default.labels??new Set),T(this,"_components"),this._components=e;const t=e.get(Ze);this.creationAuthor=t.config.author,this.relatedTopics.guard=i=>i!==this.guid}set type(e){const t=this._components.get(Ze),{strict:i,types:s}=t.config;(!i||s.has(e))&&(this._type=e)}get type(){return this._type}set status(e){const t=this._components.get(Ze),{strict:i,statuses:s}=t.config;(!i||s.has(e))&&(this._status=e)}get status(){return this._status}set priority(e){const t=this._components.get(Ze);if(e){const{strict:i,priorities:s}=t.config;if(!(!i||s.has(e)))return;this._priority=e}else this._priority=e}get priority(){return this._priority}set stage(e){const t=this._components.get(Ze);if(e){const{strict:i,stages:s}=t.config;if(!(!i||s.has(e)))return;this._stage=e}else this._stage=e}get stage(){return this._stage}set assignedTo(e){const t=this._components.get(Ze);if(e){const{strict:i,users:s}=t.config;if(!(!i||s.has(e)))return;this._assignedTo=e}else this._assignedTo=e}get assignedTo(){return this._assignedTo}set labels(e){const t=this._components.get(Ze),{strict:i,labels:s}=t.config;if(i){const n=new Set;for(const r of e)(!i||s.has(r))&&n.add(r);this._labels=n}else this._labels=e}get labels(){return this._labels}get _managerVersion(){return this._components.get(Ze).config.version}set(e){const t=e,i=this;for(const s in e){if(s==="guid")continue;const n=t[s];s in this&&(i[s]=n)}return this._components.get(Ze).list.set(this.guid,this),this}createComment(e,t){const i=new Lr(this._components,e);return i.viewpoint=t,i.topic=this,this.comments.set(i.guid,i),i}createLabelTags(e=this._managerVersion){let t="Labels";e==="2.1"&&(t="Labels"),e==="3"&&(t="Label");let i=[...this.labels].map(s=>`<${t}>${s}`).join(` + `}}const Ol=class jt{constructor(e){T(this,"guid",Ht.create()),T(this,"title",jt.default.title),T(this,"creationDate",new Date),T(this,"creationAuthor",""),T(this,"viewpoints",new Jt),T(this,"relatedTopics",new Jt),T(this,"comments",new gt),T(this,"customData",{}),T(this,"description"),T(this,"serverAssignedId"),T(this,"dueDate"),T(this,"modifiedAuthor"),T(this,"modifiedDate"),T(this,"index"),T(this,"_type",jt.default.type),T(this,"_status",jt.default.status),T(this,"_priority",jt.default.priority),T(this,"_stage",jt.default.stage),T(this,"_assignedTo",jt.default.assignedTo),T(this,"_labels",jt.default.labels??new Set),T(this,"_components"),this._components=e;const t=e.get(je);this.creationAuthor=t.config.author,this.relatedTopics.guard=i=>i!==this.guid}set type(e){const t=this._components.get(je),{strict:i,types:s}=t.config;(!i||s.has(e))&&(this._type=e)}get type(){return this._type}set status(e){const t=this._components.get(je),{strict:i,statuses:s}=t.config;(!i||s.has(e))&&(this._status=e)}get status(){return this._status}set priority(e){const t=this._components.get(je);if(e){const{strict:i,priorities:s}=t.config;if(!(!i||s.has(e)))return;this._priority=e}else this._priority=e}get priority(){return this._priority}set stage(e){const t=this._components.get(je);if(e){const{strict:i,stages:s}=t.config;if(!(!i||s.has(e)))return;this._stage=e}else this._stage=e}get stage(){return this._stage}set assignedTo(e){const t=this._components.get(je);if(e){const{strict:i,users:s}=t.config;if(!(!i||s.has(e)))return;this._assignedTo=e}else this._assignedTo=e}get assignedTo(){return this._assignedTo}set labels(e){const t=this._components.get(je),{strict:i,labels:s}=t.config;if(i){const n=new Set;for(const r of e)(!i||s.has(r))&&n.add(r);this._labels=n}else this._labels=e}get labels(){return this._labels}get _managerVersion(){return this._components.get(je).config.version}set(e){const t=e,i=this;for(const s in e){if(s==="guid")continue;const n=t[s];s in this&&(i[s]=n)}return this._components.get(je).list.set(this.guid,this),this}createComment(e,t){const i=new br(this._components,e);return i.viewpoint=t,i.topic=this,this.comments.set(i.guid,i),i}createLabelTags(e=this._managerVersion){let t="Labels";e==="2.1"&&(t="Labels"),e==="3"&&(t="Label");let i=[...this.labels].map(s=>`<${t}>${s}`).join(` `);for(const s in this.customData){const n=this.customData[s];typeof n=="string"&&(i+=` <${t}>${n}`)}return e==="2.1"?i:e==="3"?i.length!==0?` ${i} @@ -149,7 +149,7 @@ ${t} ${e==="2.1"?d:""} ${e==="2.1"?u:""} - `}};T(yl,"default",{title:"BCF Topic",type:"Issue",status:"Active"});let ma=yl;const Mf=(c,e)=>{if(e.trim()==="")return;const t=Ze.xmlParser.parse(e).Extensions;if(!t)return;const{Priorities:i,TopicStatuses:s,TopicTypes:n,Users:r}=t;if(i&&i.Priority){const o=Array.isArray(i.Priority)?i.Priority:[i.Priority];for(const a of o)c.config.priorities.add(a)}if(s&&s.TopicStatus){const o=Array.isArray(s.TopicStatus)?s.TopicStatus:[s.TopicStatus];for(const a of o)c.config.statuses.add(a)}if(n&&n.TopicType){const o=Array.isArray(n.TopicType)?n.TopicType:[n.TopicType];for(const a of o)c.config.types.add(a)}if(r&&r.User){const o=Array.isArray(r.User)?r.User:[r.User];for(const a of o)c.config.users.add(a)}};class Df extends Zi{constructor(){super(...arguments),T(this,"_config",{version:{type:"Select",options:new Set(["2.1","3"]),multiple:!1,value:""},author:{type:"Text",value:""},types:{type:"TextSet",value:new Set},statuses:{type:"TextSet",value:new Set},priorities:{type:"TextSet",value:new Set},labels:{type:"TextSet",value:new Set},stages:{type:"TextSet",value:new Set},users:{type:"TextSet",value:new Set},includeSelectionTag:{type:"Boolean",value:!1},updateExtensionsOnImport:{type:"Boolean",value:!1},strict:{type:"Boolean",value:!1},includeAllExtensionsOnExport:{type:"Boolean",value:!1},fallbackVersionOnImport:{type:"Select",multiple:!1,options:new Set(["2.1","3"]),value:""},ignoreIncompleteTopicsOnImport:{type:"Boolean",value:!1}})}get version(){return this._config.version.value}set version(e){this._config.version.value=e}get author(){return this._config.author.value}set author(e){this._config.author.value=e}get types(){return this._config.types.value}set types(e){this._config.types.value=e}get statuses(){return this._config.statuses.value}set statuses(e){this._config.statuses.value=e}get priorities(){return this._config.priorities.value}set priorities(e){this._config.priorities.value=e}get labels(){return this._config.labels.value}set labels(e){this._config.labels.value=e}get stages(){return this._config.stages.value}set stages(e){this._config.stages.value=e}get users(){return this._config.users.value}set users(e){this._config.users.value=e}get includeSelectionTag(){return this._config.includeSelectionTag.value}set includeSelectionTag(e){this._config.includeSelectionTag.value=e}get updateExtensionsOnImport(){return this._config.updateExtensionsOnImport.value}set updateExtensionsOnImport(e){this._config.updateExtensionsOnImport.value=e}get strict(){return this._config.strict.value}set strict(e){this._config.strict.value=e}get includeAllExtensionsOnExport(){return this._config.includeAllExtensionsOnExport.value}set includeAllExtensionsOnExport(e){this._config.includeAllExtensionsOnExport.value=e}get fallbackVersionOnImport(){return this._config.fallbackVersionOnImport.value}set fallbackVersionOnImport(e){this._config.fallbackVersionOnImport.value=e}get ignoreIncompleteTopicsOnImport(){return this._config.ignoreIncompleteTopicsOnImport.value}set ignoreIncompleteTopicsOnImport(e){this._config.ignoreIncompleteTopicsOnImport.value=e}}const Pr=class Cs extends de{constructor(){super(...arguments),T(this,"enabled",!1),T(this,"_defaultConfig",{author:"jhon.doe@example.com",version:"2.1",types:new Set(["Clash","Failure","Fault","Inquiry","Issue","Remark","Request"]),statuses:new Set(["Active","In Progress","Done","In Review","Closed"]),priorities:new Set(["On hold","Minor","Normal","Major","Critical"]),labels:new Set,stages:new Set,users:new Set,includeSelectionTag:!1,updateExtensionsOnImport:!0,strict:!1,includeAllExtensionsOnExport:!0,fallbackVersionOnImport:"2.1",ignoreIncompleteTopicsOnImport:!1}),T(this,"config",new Df(this,this.components,"BCF Topics",Cs.uuid)),T(this,"list",new gt),T(this,"onSetup",new Y),T(this,"isSetup",!1),T(this,"onBCFImported",new Y),T(this,"onDisposed",new Y)}setup(e){if(this.isSetup)return;const t={...this._defaultConfig,...e};this.config.version=t.version,this.config.author=t.author,this.config.types=t.types,this.config.statuses=t.statuses,this.config.priorities=t.priorities,this.config.labels=t.labels,this.config.stages=t.stages,this.config.users=t.users,this.config.includeSelectionTag=t.includeSelectionTag,this.config.updateExtensionsOnImport=t.updateExtensionsOnImport,this.config.strict=t.strict,this.config.includeAllExtensionsOnExport=t.includeAllExtensionsOnExport,this.config.fallbackVersionOnImport=t.fallbackVersionOnImport||"",this.config.ignoreIncompleteTopicsOnImport=t.ignoreIncompleteTopicsOnImport,this.isSetup=!0,this.enabled=!0,this.onSetup.trigger()}create(e){const t=new ma(this.components);return e?(t.guid=e.guid??t.guid,t.set(e)):this.list.set(t.guid,t),t}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get usedTypes(){const e=[...this.list].map(([t,i])=>i.type);return new Set(e)}get usedStatuses(){const e=[...this.list].map(([t,i])=>i.status);return new Set(e)}get usedPriorities(){const e=[...this.list].map(([t,i])=>i.priority).filter(t=>t);return new Set(e)}get usedStages(){const e=[...this.list].map(([t,i])=>i.stage).filter(t=>t);return new Set(e)}get usedUsers(){const e=[];for(const[t,i]of this.list){e.push(i.creationAuthor),i.assignedTo&&e.push(i.assignedTo),i.modifiedAuthor&&e.push(i.modifiedAuthor);for(const[s,n]of i.comments)e.push(n.author),n.modifiedAuthor&&e.push(n.modifiedAuthor)}return new Set(e)}get usedLabels(){const e=[];for(const[t,i]of this.list)e.push(...i.labels);return new Set(e)}updateExtensions(){for(const[e,t]of this.list){for(const i of t.labels)this.config.labels.add(i);this.config.types.add(t.type),t.priority&&this.config.priorities.add(t.priority),t.stage&&this.config.stages.add(t.stage),this.config.statuses.add(t.status),this.config.users.add(t.creationAuthor),t.assignedTo&&this.config.users.add(t.assignedTo),t.modifiedAuthor&&this.config.users.add(t.modifiedAuthor);for(const[i,s]of t.comments)this.config.users.add(s.author),s.modifiedAuthor&&this.config.users.add(s.modifiedAuthor)}}updateViewpointReferences(){const e=this.components.get(Bt);for(const[t,i]of this.list)for(const s of i.viewpoints)e.list.has(s)||i.viewpoints.delete(s)}async export(e=this.list.values()){const t=new ha;t.file("bcf.version",` + `}};T(Ol,"default",{title:"BCF Topic",type:"Issue",status:"Active"});let Ia=Ol;const _f=(c,e)=>{if(e.trim()==="")return;const t=je.xmlParser.parse(e).Extensions;if(!t)return;const{Priorities:i,TopicStatuses:s,TopicTypes:n,Users:r}=t;if(i&&i.Priority){const o=Array.isArray(i.Priority)?i.Priority:[i.Priority];for(const a of o)c.config.priorities.add(a)}if(s&&s.TopicStatus){const o=Array.isArray(s.TopicStatus)?s.TopicStatus:[s.TopicStatus];for(const a of o)c.config.statuses.add(a)}if(n&&n.TopicType){const o=Array.isArray(n.TopicType)?n.TopicType:[n.TopicType];for(const a of o)c.config.types.add(a)}if(r&&r.User){const o=Array.isArray(r.User)?r.User:[r.User];for(const a of o)c.config.users.add(a)}};class Uf extends Qi{constructor(){super(...arguments),T(this,"_config",{version:{type:"Select",options:new Set(["2.1","3"]),multiple:!1,value:""},author:{type:"Text",value:""},types:{type:"TextSet",value:new Set},statuses:{type:"TextSet",value:new Set},priorities:{type:"TextSet",value:new Set},labels:{type:"TextSet",value:new Set},stages:{type:"TextSet",value:new Set},users:{type:"TextSet",value:new Set},includeSelectionTag:{type:"Boolean",value:!1},updateExtensionsOnImport:{type:"Boolean",value:!1},strict:{type:"Boolean",value:!1},includeAllExtensionsOnExport:{type:"Boolean",value:!1},fallbackVersionOnImport:{type:"Select",multiple:!1,options:new Set(["2.1","3"]),value:""},ignoreIncompleteTopicsOnImport:{type:"Boolean",value:!1}})}get version(){return this._config.version.value}set version(e){this._config.version.value=e}get author(){return this._config.author.value}set author(e){this._config.author.value=e}get types(){return this._config.types.value}set types(e){this._config.types.value=e}get statuses(){return this._config.statuses.value}set statuses(e){this._config.statuses.value=e}get priorities(){return this._config.priorities.value}set priorities(e){this._config.priorities.value=e}get labels(){return this._config.labels.value}set labels(e){this._config.labels.value=e}get stages(){return this._config.stages.value}set stages(e){this._config.stages.value=e}get users(){return this._config.users.value}set users(e){this._config.users.value=e}get includeSelectionTag(){return this._config.includeSelectionTag.value}set includeSelectionTag(e){this._config.includeSelectionTag.value=e}get updateExtensionsOnImport(){return this._config.updateExtensionsOnImport.value}set updateExtensionsOnImport(e){this._config.updateExtensionsOnImport.value=e}get strict(){return this._config.strict.value}set strict(e){this._config.strict.value=e}get includeAllExtensionsOnExport(){return this._config.includeAllExtensionsOnExport.value}set includeAllExtensionsOnExport(e){this._config.includeAllExtensionsOnExport.value=e}get fallbackVersionOnImport(){return this._config.fallbackVersionOnImport.value}set fallbackVersionOnImport(e){this._config.fallbackVersionOnImport.value=e}get ignoreIncompleteTopicsOnImport(){return this._config.ignoreIncompleteTopicsOnImport.value}set ignoreIncompleteTopicsOnImport(e){this._config.ignoreIncompleteTopicsOnImport.value=e}}const Io=class Ts extends de{constructor(){super(...arguments),T(this,"enabled",!1),T(this,"_defaultConfig",{author:"jhon.doe@example.com",version:"2.1",types:new Set(["Clash","Failure","Fault","Inquiry","Issue","Remark","Request"]),statuses:new Set(["Active","In Progress","Done","In Review","Closed"]),priorities:new Set(["On hold","Minor","Normal","Major","Critical"]),labels:new Set,stages:new Set,users:new Set,includeSelectionTag:!1,updateExtensionsOnImport:!0,strict:!1,includeAllExtensionsOnExport:!0,fallbackVersionOnImport:"2.1",ignoreIncompleteTopicsOnImport:!1}),T(this,"config",new Uf(this,this.components,"BCF Topics",Ts.uuid)),T(this,"list",new gt),T(this,"onSetup",new Y),T(this,"isSetup",!1),T(this,"onBCFImported",new Y),T(this,"onDisposed",new Y)}setup(e){if(this.isSetup)return;const t={...this._defaultConfig,...e};this.config.version=t.version,this.config.author=t.author,this.config.types=t.types,this.config.statuses=t.statuses,this.config.priorities=t.priorities,this.config.labels=t.labels,this.config.stages=t.stages,this.config.users=t.users,this.config.includeSelectionTag=t.includeSelectionTag,this.config.updateExtensionsOnImport=t.updateExtensionsOnImport,this.config.strict=t.strict,this.config.includeAllExtensionsOnExport=t.includeAllExtensionsOnExport,this.config.fallbackVersionOnImport=t.fallbackVersionOnImport||"",this.config.ignoreIncompleteTopicsOnImport=t.ignoreIncompleteTopicsOnImport,this.isSetup=!0,this.enabled=!0,this.onSetup.trigger()}create(e){const t=new Ia(this.components);return e?(t.guid=e.guid??t.guid,t.set(e)):this.list.set(t.guid,t),t}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get usedTypes(){const e=[...this.list].map(([t,i])=>i.type);return new Set(e)}get usedStatuses(){const e=[...this.list].map(([t,i])=>i.status);return new Set(e)}get usedPriorities(){const e=[...this.list].map(([t,i])=>i.priority).filter(t=>t);return new Set(e)}get usedStages(){const e=[...this.list].map(([t,i])=>i.stage).filter(t=>t);return new Set(e)}get usedUsers(){const e=[];for(const[t,i]of this.list){e.push(i.creationAuthor),i.assignedTo&&e.push(i.assignedTo),i.modifiedAuthor&&e.push(i.modifiedAuthor);for(const[s,n]of i.comments)e.push(n.author),n.modifiedAuthor&&e.push(n.modifiedAuthor)}return new Set(e)}get usedLabels(){const e=[];for(const[t,i]of this.list)e.push(...i.labels);return new Set(e)}updateExtensions(){for(const[e,t]of this.list){for(const i of t.labels)this.config.labels.add(i);this.config.types.add(t.type),t.priority&&this.config.priorities.add(t.priority),t.stage&&this.config.stages.add(t.stage),this.config.statuses.add(t.status),this.config.users.add(t.creationAuthor),t.assignedTo&&this.config.users.add(t.assignedTo),t.modifiedAuthor&&this.config.users.add(t.modifiedAuthor);for(const[i,s]of t.comments)this.config.users.add(s.author),s.modifiedAuthor&&this.config.users.add(s.modifiedAuthor)}}updateViewpointReferences(){const e=this.components.get(Bt);for(const[t,i]of this.list)for(const s of i.viewpoints)e.list.has(s)||i.viewpoints.delete(s)}async export(e=this.list.values()){const t=new da;t.file("bcf.version",` `),t.file("bcf.extensions",this.serializeExtensions());const i=await(await fetch("https://thatopen.github.io/engine_components/resources/favicon.ico")).arrayBuffer(),s=this.components.get(Bt);for(const n of e){const r=t.folder(n.guid);r.file("markup.bcf",n.serialize());for(const o of n.viewpoints){const a=s.list.get(o);a&&(r.file(`${o}.jpeg`,i,{binary:!0}),r.file(`${o}.bcfv`,await a.serialize()))}}return await t.generateAsync({type:"blob"})}serializeExtensions(){const e=[...this.config.types].map(o=>`${o}`).join(` @@ -180,7 +180,7 @@ ${n} ${r} `:""} - `}processMarkupComment(e){const{Guid:t,Date:i,Author:s,Comment:n,Viewpoint:r}=e;if(!(t&&i&&s&&(Lr||r)))return null;const o=this.components.get(Bt),a=new Lr(this.components,n??"");return a.guid=t,a.date=new Date(i),a.author=s,a.viewpoint=r!=null&&r.Guid?o.list.get(r.Guid):void 0,a.modifiedAuthor=e.ModifiedAuthor,a.modifiedDate=e.ModifiedDate?new Date(e.ModifiedDate):void 0,a}getMarkupComments(e,t){var i;let s;if(t==="2.1"&&(s=e.Comment),t==="3"&&(s=(i=e.Topic.Comments)==null?void 0:i.Comment),!s)return[];s=Array.isArray(s)?s:[s];const n=s.map(r=>this.processMarkupComment(r)).filter(r=>r);return Array.isArray(n)?n:[n]}getMarkupLabels(e,t){var i;let s;return t==="2.1"&&(s=e.Topic.Labels),t==="3"&&(s=(i=e.Topic.Labels)==null?void 0:i.Label),s?Array.isArray(s)?s:[s]:[]}getMarkupViewpoints(e,t){var i;let s;return t==="2.1"&&(s=e.Viewpoints),t==="3"&&(s=(i=e.Topic.Viewpoints)==null?void 0:i.ViewPoint),s?(s=Array.isArray(s)?s:[s],s):[]}getMarkupRelatedTopics(e,t){var i;let s;return t==="2.1"&&(s=e.Topic.RelatedTopic),t==="3"&&(s=(i=e.Topic.RelatedTopics)==null?void 0:i.RelatedTopic),s?(Array.isArray(s)?s:[s]).map(n=>n.Guid):[]}async load(e,t){var i;const{fallbackVersionOnImport:s,ignoreIncompleteTopicsOnImport:n,updateExtensionsOnImport:r}=this.config,o=new ha;await o.loadAsync(e);const a=Object.values(o.files);let l=s;const h=a.find(g=>g.name.endsWith(".version"));if(h){const g=await h.async("string"),v=Cs.xmlParser.parse(g).Version.VersionId;l=String(v)}if(!(l&&(l==="2.1"||l==="3")))throw new Error(`BCFTopics: ${l} is not supported.`);const d=a.find(g=>g.name.endsWith(".extensions"));if(r&&d){const g=await d.async("string");Mf(this,g)}const u=[],f=this.components.get(Bt),m=a.filter(g=>g.name.endsWith(".bcfv"));for(const g of m){const v=await g.async("string"),C=Cs.xmlParser.parse(v).VisualizationInfo;if(!C){console.warn("Missing VisualizationInfo in Viewpoint");continue}const w={},{Guid:O,ClippingPlanes:y,Components:L,OrthogonalCamera:N,PerspectiveCamera:x}=C;if(O&&(w.guid=O),L){const{Selection:A,Visibility:D}=L;if(A&&A.Component){const B=Array.isArray(A.Component)?A.Component:[A.Component];w.selectionComponents=B.map(W=>W.IfcGuid).filter(W=>W)}if(D&&"DefaultVisibility"in D&&(w.defaultVisibility=D.DefaultVisibility),D&&D.Exceptions&&"Component"in D.Exceptions){const{Component:B}=D.Exceptions,W=Array.isArray(B)?B:[B];w.exceptionComponents=W.map(z=>z.IfcGuid).filter(z=>z)}let R;l==="2.1"&&(R=L.ViewSetupHints),l==="3"&&(R=(i=L.Visibility)==null?void 0:i.ViewSetupHints),R&&("OpeningsVisible"in R&&(w.openingsVisible=R.OpeningsVisible),"SpacesVisible"in R&&(w.spacesVisible=R.SpacesVisible),"SpaceBoundariesVisible"in R&&(w.spaceBoundariesVisible=R.SpaceBoundariesVisible))}if(N||x){const A=C.PerspectiveCamera??C.OrthogonalCamera,{CameraViewPoint:D,CameraDirection:R}=A,B=new P(Number(D.X),Number(D.Z),Number(-D.Y)),W=new P(Number(R.X),Number(R.Z),Number(-R.Y)),z={position:{x:B.x,y:B.y,z:B.z},direction:{x:W.x,y:W.y,z:W.z},aspectRatio:"AspectRatio"in A?A.AspectRatio:1};"ViewToWorldScale"in A&&(w.camera={...z,viewToWorldScale:A.ViewToWorldScale}),"FieldOfView"in A&&(w.camera={...z,fov:A.FieldOfView})}const _=new Gl(this.components,t,{data:w,setCamera:!1});if(L){const{Coloring:A}=L;if(A&&A.Color){const D=Array.isArray(A.Color)?A.Color:[A.Color];for(const R of D){const{Color:B,Component:W}=R,z=(Array.isArray(W)?W:[W]).map(q=>q.IfcGuid);_.componentColors.set(B,z)}}}if(u.push(_),y){const A=this.components.get(Wi),D=Array.isArray(y.ClippingPlane)?y.ClippingPlane:[y.ClippingPlane];for(const R of D){const{Location:B,Direction:W}=R;if(!(B&&W))continue;const z=new P(B.X,B.Z,-B.Y),q=new P(W.X,-W.Z,W.Y),X=A.createFromNormalAndCoplanarPoint(t,q,z);X.visible=!1,X.enabled=!1,_.clippingPlanes.add(X)}}}const p={},I=[],E=a.filter(g=>g.name.endsWith(".bcf"));for(const g of E){const v=await g.async("string"),C=Cs.xmlParser.parse(v).Markup,w=C.Topic,{Guid:O,TopicType:y,TopicStatus:L,Title:N,CreationDate:x,CreationAuthor:_}=w;if(n&&!(O&&y&&L&&N&&x&&_))continue;const A=new ma(this.components);A.guid=O??A.guid;const D=this.getMarkupRelatedTopics(C,l);p[A.guid]=new Set(D),A.type=y??A.type,A.status=L??A.status,A.title=N??A.title,A.creationDate=x?new Date(x):A.creationDate,A.creationAuthor=_??A.creationAuthor,A.serverAssignedId=w.ServerAssignedId,A.priority=w.Priority,A.index=w.Index,A.modifiedDate=w.ModifiedDate?new Date(w.ModifiedDate):void 0,A.modifiedAuthor=w.ModifiedAuthor,A.dueDate=w.DueDate?new Date(w.DueDate):void 0,A.assignedTo=w.AssignedTo,A.description=w.Description,A.stage=w.Stage;const R=this.getMarkupLabels(C,l);for(const z of R)A.labels.add(z);const B=this.getMarkupComments(C,l);for(const z of B)A.comments.set(z.guid,z);const W=this.getMarkupViewpoints(C,l);for(const z of W){if(!(z&&z.Guid))continue;const q=f.list.get(z.Guid);q&&A.viewpoints.add(q.guid)}this.list.set(A.guid,A),I.push(A)}for(const g in p){const v=this.list.get(g);if(!v)continue;const C=p[g];for(const w of C)v.relatedTopics.add(w)}return this.onBCFImported.trigger(I),{viewpoints:u,topics:I}}};T(Pr,"uuid","de977976-e4f6-4e4f-a01a-204727839802"),T(Pr,"xmlParser",new Al.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let Ze=Pr;const Ol=class Mt extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"onDisposed",new Y),T(this,"_absoluteMin"),T(this,"_absoluteMax"),T(this,"_meshes",[]),this.components.add(Mt.uuid,this),this._absoluteMin=Mt.newBound(!0),this._absoluteMax=Mt.newBound(!1)}static getDimensions(e){const{min:t,max:i}=e,s=Math.abs(i.x-t.x),n=Math.abs(i.y-t.y),r=Math.abs(i.z-t.z),o=new P;return o.subVectors(i,t).divideScalar(2).add(t),{width:s,height:n,depth:r,center:o}}static newBound(e){const t=e?1:-1;return new P(t*Number.MAX_VALUE,t*Number.MAX_VALUE,t*Number.MAX_VALUE)}static getBounds(e,t,i){const s=i||this.newBound(!1),n=t||this.newBound(!0);for(const r of e)r.xs.x&&(s.x=r.x),r.y>s.y&&(s.y=r.y),r.z>s.z&&(s.z=r.z);return new Fe(t,i)}dispose(){const e=this.components.get(Nt);for(const t of this._meshes)e.destroy(t);this._meshes=[],this.onDisposed.trigger(Mt.uuid),this.onDisposed.reset()}get(){const e=this._absoluteMin.clone(),t=this._absoluteMax.clone();return new Fe(e,t)}getSphere(){const e=this._absoluteMin.clone(),t=this._absoluteMax.clone(),i=Math.abs((t.x-e.x)/2),s=Math.abs((t.y-e.y)/2),n=Math.abs((t.z-e.z)/2),r=new P(e.x+i,e.y+s,e.z+n),o=r.distanceTo(e);return new gi(r,o)}getMesh(){const e=new Fe(this._absoluteMin,this._absoluteMax),t=Mt.getDimensions(e),{width:i,height:s,depth:n,center:r}=t,o=new Be(i,s,n),a=new ee(o);return this._meshes.push(a),a.position.copy(r),a}reset(){this._absoluteMin=Mt.newBound(!0),this._absoluteMax=Mt.newBound(!1)}add(e){for(const t of e.items)this.addMesh(t.mesh)}addMesh(e,t){if(!e.geometry.index)return;const i=Mt.getFragmentBounds(e);e.updateMatrixWorld();const s=e.matrixWorld,n=new ne,r=e instanceof It,o=new Set;if(e instanceof _a){t||(t=e.fragment.ids);for(const a of t){const l=e.fragment.getInstancesIDs(a);if(l)for(const h of l)o.add(h)}}else o.add(0);for(const a of o){const l=i.min.clone(),h=i.max.clone();r&&(e.getMatrixAt(a,n),l.applyMatrix4(n),h.applyMatrix4(n)),l.applyMatrix4(s),h.applyMatrix4(s),l.xthis._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),h.x>this._absoluteMax.x&&(this._absoluteMax.x=h.x),h.y>this._absoluteMax.y&&(this._absoluteMax.y=h.y),h.z>this._absoluteMax.z&&(this._absoluteMax.z=h.z),h.xr.x&&(r.x=h),d>r.y&&(r.y=d),u>r.z&&(r.z=u)}return new Fe(n,r)}};T(Ol,"uuid","d1444724-dba6-4cdd-a0c7-68ee1450d166");let On=Ol;const xf=class Nl extends de{constructor(e){super(e),T(this,"enabled",!0),e.add(Nl.uuid,this)}async getIsolatedElements(e,t,i){const s=new Set;function n(a){if(s.has(a))return;const l=e.GetLine(t,a);if(l){s.add(a);for(const h in l){const d=l[h];d&&d.constructor.name==="Handle"&&d.value>0?n(d.value):Array.isArray(d)&&d.forEach(u=>{u&&u.constructor.name==="Handle"&&u.value>0&&n(u.value)})}}}for(const a of i)n(a);const r=[];for(const a of s)r.push(a);r.sort((a,l)=>a-l);const o=[];return r.forEach(a=>{const l=e.GetLine(t,a);o.push(l)}),o}async export(e,t,i){return i.forEach(s=>{e.WriteLine(t,s)}),e.SaveModel(t)}async splitIfc(e,t,i){const s=new Uint8Array(t),n=e.OpenModel(s),r=await this.getIsolatedElements(e,n,i),o=e.CreateModel({schema:th.IFC2X3});return await this.export(e,o,r)}};T(xf,"uuid","6eb0ba2f-71c0-464e-bcec-2d7c335186b2");const bl=class Ll{constructor(e){T(this,"onProgress",new Y),T(this,"inclusive",!1),T(this,"rules",[]),T(this,"ids",{}),T(this,"needsUpdate",new Map),T(this,"components"),this.components=e}static import(e,t){const i=Ll.importers.get(t.type);return i?i(e,t):(console.warn("Invalid query data:.",t),null)}static importRules(e){const t=[];for(const i of e){const s={};for(const n in i){const r=i[n];r.regexp?s[n]=new RegExp(r.value):s[n]=r}t.push(s)}return t}static importIds(e){const t={};for(const i in e.ids)t[i]=new Set(e.ids[i]);return t}clear(e){if(e===void 0){this.ids={},this.needsUpdate.clear();return}delete this.ids[e],this.needsUpdate.delete(e)}addID(e,t){this.ids[e]||(this.ids[e]=new Set),this.ids[e].add(t)}getData(){const e={};for(const i in this.ids)e[i]=Array.from(this.ids[i]);const t=this.exportRules();return{name:this.name,inclusive:this.inclusive,type:"IfcFinderQuery",ids:e,rules:t}}exportRules(){const e=[];for(const t of this.rules){const i={};for(const s in t){const n=t[s];n instanceof RegExp?i[s]={regexp:!0,value:n.source}:i[s]=n}e.push(i)}return e}findInFile(e,t){return new Promise(i=>{const s=new FileReader,n=new TextDecoder("utf-8"),r=1e4*1024,o=1e3;let a=0;const l=/;/,h=()=>{if(a>=t.size){i();return}const d=Math.min(a+r+o,t.size),u=t.slice(a,d);s.readAsArrayBuffer(u)};s.onload=()=>{if(!(s.result instanceof ArrayBuffer))return;const d=new Uint8Array(s.result),u=n.decode(d).split(l);u.shift(),this.findInLines(e,u),this.onProgress.trigger(a/t.size),a+=r,h()},h()})}getIdFromLine(e){const t=e.slice(e.indexOf("#")+1,e.indexOf("="));return parseInt(t,10)}testRules(e){let t=null,i=null,s=null,n=!1;for(const r of this.rules){if(r.type==="category"){if(t===null&&(t=this.getCategoryFromLine(e),t===null)){if(this.inclusive)continue;break}if(!r.value.test(t)){if(this.inclusive)continue;n=!1;break}n=!0;continue}if(i===null&&(i=this.getAttributesFromLine(e),i===null)){if(this.inclusive)continue;n=!1;break}if(t===null&&(t=this.getCategoryFromLine(e),t===null)){if(this.inclusive)continue;n=!1;break}if(s===null&&(s=Object.keys(new ih[t]),s=s.slice(2),s===null)){if(this.inclusive)continue;n=!1;break}if(r.type==="property"){const{name:o,value:a}=r;if(!a.test(e)){if(this.inclusive)continue;n=!1;break}let l=!1;for(let h=0;h"&&parseFloat(f)>a){h=!0;break}else if(l===">="&&parseFloat(f)>=a){h=!0;break}else if(l==="<="&&parseFloat(f)<=a){h=!0;break}}}if(h)n=!0;else if(!this.inclusive){n=!1;break}}}return n}getCategoryFromLine(e){const t=e.indexOf("=")+1,i=e.indexOf("("),s=e.slice(t,i).trim();return Su[s]||null}getAttributesFromLine(e){const t=/\((.*)\)/,i=e.match(t);if(!(i&&i[1]))return null;const s=/,(?![^()]*\))/g;return i[1].split(s).map(n=>n.trim())}};T(bl,"importers",new Map);let zt=bl;class Ia{constructor(e){T(this,"list",new Map),T(this,"id",Ii.generateUUID()),T(this,"mode","intersect"),T(this,"_components"),this._components=e}get queries(){return new Set(this.list.values())}get items(){const e=[];for(const t of this.queries)e.push(t.items);return this.mode==="combine"?wn.combine(e):wn.intersect(e)}add(e){if(this.list.has(e.name))throw new Error(`This group already has a query with the name ${e.name}.`);this.list.set(e.name,e)}clear(e){for(const t of this.queries)t.clear(e)}import(e){this.mode=e.mode,this.id=e.id;for(const t in e.queries){const i=zt.import(this._components,e.queries[t]);i&&this.list.set(t,i)}}export(){const e={};for(const[t,i]of this.list)e[t]=i.export();return{mode:this.mode,id:this.id,queries:e}}async update(e,t){for(const i of this.queries){const s=i.needsUpdate.get(e);(s===void 0||s)&&await i.update(e,t)}}}const Pl=class Ml extends zt{constructor(e,t){super(e),T(this,"name"),this.name=t.name,this.rules=t.rules,this.inclusive=t.inclusive}get items(){const e=this.components.get(ue),t=[];for(const i in this.ids){const s=this.ids[i],n=e.groups.get(i);if(!n){console.warn(`Model ${i} not found!`);continue}const r=n.getFragmentMap(s);t.push(r)}return wn.combine(t)}export(){const e=this.getData();return e.type=Ml.type,e}async update(e,t){this.ids[e]=new Set,await this.findInFile(e,t),this.needsUpdate.set(e,!1)}findInLines(e,t){for(const i of t)if(this.testRules(i)){const s=this.getIdFromLine(i);this.addID(e,s)}}};T(Pl,"type","IfcBasicQuery");let Ea=Pl;zt.importers.set(Ea.type,(c,e)=>{const t=new Ea(c,{name:e.name,rules:zt.importRules(e.rules),inclusive:e.inclusive});return t.ids=zt.importIds(e),t});const Dl=class xl extends zt{constructor(e,t){super(e),T(this,"name"),T(this,"psets",[]),this.name=t.name,this.rules=t.rules,this.inclusive=t.inclusive}get items(){const e=this.components.get(it),t=this.components.get(ue),i=[];for(const s in this.ids){const n=t.groups.get(s);if(!n){console.log(`Model not found: ${s}.`);continue}const r=this.ids[s];for(const o of r){const a=e.getEntityRelations(s,o,"DefinesOcurrence");if(a){const l=n.getFragmentMap(a);i.push(l)}}}return wn.combine(i)}export(){const e=this.getData();return e.type=xl.type,e}async update(e,t){await this.findInFile(e,t);const i=new Set;for(const s of this.psets){const n=this.getAttributesFromLine(s);if(n===null)continue;const r=n[4].replace("(","[").replace(")","]").replace(/#/g,""),o=JSON.parse(r);for(const a of o){const l=this.ids[e];if(l&&l.has(a)){const h=this.getIdFromLine(s);i.add(h);break}}}this.ids[e]=i,this.psets=[],this.needsUpdate.set(e,!1)}findInLines(e,t){for(const i of t){const s=this.getCategoryFromLine(i);if(s==="IfcPropertySet"){this.psets.push(i);continue}if(s==="IfcPropertySingleValue"&&this.testRules(i)){const n=this.getIdFromLine(i);this.addID(e,n)}}}};T(Dl,"type","IfcPropertyQuery");let ga=Dl;zt.importers.set(ga.type,(c,e)=>{const t=new ga(c,{name:e.name,inclusive:e.inclusive,rules:zt.importRules(e.rules)});return t.ids=zt.importIds(e),t});const _f=class _l extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new Map),e.add(_l.uuid,this)}get queries(){const e=new Set;for(const[,t]of this.list)for(const i of t.queries)e.add(i);return e}import(e){for(const t in e){const i=new Ia(this.components);i.import(e[t]),this.list.set(t,i)}}export(){const e={};for(const[t,i]of this.list)e[t]=i.export();return e}create(){const e=new Ia(this.components);return this.list.set(e.id,e),e}delete(e){this.list.delete(e)}clear(){this.list.clear()}};T(_f,"uuid","0da7ad77-f734-42ca-942f-a074adfd1e3a");const Ul=class Bl extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",{}),T(this,"onDisposed",new Y),T(this,"onFragmentsDisposed",t=>{const{groupID:i,fragmentIDs:s}=t;for(const n in this.list){const r=this.list[n],o=Object.keys(r);if(o.includes(i))delete r[i],Object.values(r).length===0&&delete this.list[n];else for(const a of o){const l=r[a];for(const h of s)delete l.map[h];Object.values(l).length===0&&delete r[a]}}}),e.add(Bl.uuid,this),e.get(ue).onFragmentsDisposed.add(this.onFragmentsDisposed)}dispose(){this.list={},this.components.get(ue).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(),this.onDisposed.reset()}remove(e){for(const t in this.list){const i=this.list[t];for(const s in i){const n=i[s];delete n.map[e]}}}find(e){const t=this.components.get(ue);if(!e){const r={};for(const[o,a]of t.list)r[o]=new Set(a.ids);return r}const i=Object.keys(e).length,s={};for(const r in e){const o=e[r];if(!this.list[r]){console.warn(`Classification ${r} does not exist.`);continue}for(const a of o){const l=this.list[r][a];if(l)for(const h in l.map){s[h]||(s[h]=new Map);for(const d of l.map[h]){const u=s[h].get(d);u===void 0?s[h].set(d,1):s[h].set(d,u+1)}}}}const n={};for(const r in s){const o=s[r];for(const[a,l]of o){if(l===void 0)throw new Error("Malformed fragments map!");l===i&&(n[r]||(n[r]=new Set),n[r].add(a))}}return n}byModel(e,t){this.list.models||(this.list.models={});const i=this.list.models;i[e]||(i[e]={map:{},id:null,name:e});const s=i[e];for(const[n,r]of t.data){const o=r[0];for(const a of o){const l=t.keyFragments.get(a);l&&(s.map[l]||(s.map[l]=new Set),s.map[l].add(n))}}}async byPredefinedType(e){var t;this.list.predefinedTypes||(this.list.predefinedTypes={});const i=this.list.predefinedTypes,s=e.getAllPropertiesIDs();for(const n of s){const r=await e.getProperties(n);if(!r)continue;const o=String((t=r.PredefinedType)==null?void 0:t.value).toUpperCase();i[o]||(i[o]={map:{},id:null,name:o});const a=i[o];for(const[l,h]of e.data){const d=h[0];for(const u of d){const f=e.keyFragments.get(u);if(!f)throw new Error("Fragment ID not found!");a.map[f]||(a.map[f]=new Set),a.map[f].add(r.expressID)}}}}byEntity(e){this.list.entities||(this.list.entities={});for(const[t,i]of e.data){const s=i[1][1],n=yn[s];this.saveItem(e,"entities",n,t)}}async byIfcRel(e,t,i){fi.isRel(t)&&await fi.getRelationMap(e,t,async(s,n)=>{const{name:r}=await fi.getEntityName(e,s);for(const o of n)this.saveItem(e,i,r??"NO REL NAME",o)})}async bySpatialStructure(e,t={}){var i,s;const n=this.components.get(it),r=n.relationMaps[e.uuid];if(!r)throw new Error(`Classifier: model relations of ${e.name||e.uuid} have to exists to group by spatial structure.`);const o=t.systemName??"spatialStructures",a=t.useProperties===void 0||t.useProperties;for(const[l]of r){if(t.isolate){const f=e.data.get(l);if(!f)continue;const m=f[1][1];if(m===void 0||!t.isolate.has(m))continue}const h=n.getEntityRelations(e,l,"Decomposes");if(h)for(const f of h){let m=f.toString();if(a){const p=await e.getProperties(f);if(!p)continue;m=(i=p.Name)==null?void 0:i.value}this.saveItem(e,o,m,l,f)}const d=n.getEntityRelations(e,l,"ContainsElements");if(!d)continue;let u=l.toString();if(a){const f=await e.getProperties(l);if(!f)continue;u=(s=f.Name)==null?void 0:s.value}for(const f of d){this.saveItem(e,o,u,f,l);const m=n.getEntityRelations(e,Number(f),"IsDecomposedBy");if(m)for(const p of m)this.saveItem(e,o,u,p,l)}}}setColor(e,t,i=!1){const s=this.components.get(ue);for(const n in e){const r=s.list.get(n);if(!r)continue;const o=e[n];r.setColor(t,o,i)}}resetColor(e){const t=this.components.get(ue);for(const i in e){const s=t.list.get(i);if(!s)continue;const n=e[i];s.resetColor(n)}}saveItem(e,t,i,s,n=null){this.list[t]||(this.list[t]={});const r=e.data.get(s);if(r)for(const o of r[0]){const a=e.keyFragments.get(o);if(a){const l=this.list[t];l[i]||(l[i]={map:{},id:n,name:i}),l[i].map[a]||(l[i].map[a]=new Set),l[i].map[a].add(s)}}}};T(Ul,"uuid","e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");let Mr=Ul;const Uf=class zl extends de{constructor(e){super(e),T(this,"onDisposed",new Y),T(this,"enabled",!0),T(this,"height",10),T(this,"groupName","spatialStructures"),T(this,"list",new Set),e.add(zl.uuid,this)}dispose(){this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}set(e){if(!this.enabled)return;const t=this.components.get(Mr),i=this.components.get(ue),s=e?1:-1;let n=0;const r=t.list[this.groupName],o=new ne;for(const a in r){o.elements[13]=n*s*this.height;for(const l in r[a].map){const h=i.list.get(l),d=a+l,u=this.list.has(d);if(!h||e&&u||!e&&!u)continue;e?this.list.add(d):this.list.delete(d);const f=r[a].map[l];h.applyTransform(f,o),h.mesh.computeBoundingSphere(),h.mesh.computeBoundingBox()}n++}}};T(Uf,"uuid","d260618b-ce88-4c7d-826c-6debb91de3e2");const kl=class Vl extends de{constructor(e){super(e),T(this,"enabled",!0),this.components.add(Vl.uuid,this)}set(e,t){const i=this.components.get(ue);if(!t){for(const[s,n]of i.list)n&&(n.setVisibility(e),this.updateCulledVisibility(n));return}for(const s in t){const n=t[s],r=i.list.get(s);r&&(r.setVisibility(e,n),this.updateCulledVisibility(r))}}isolate(e){this.set(!1),this.set(!0,e)}updateCulledVisibility(e){const t=this.components.get(iu);for(const[i,s]of t.list){const n=s.colorMeshes.get(e.id);n&&(n.count=e.mesh.count)}}};T(kl,"uuid","dd9ccf2d-8a21-4821-b7f6-2949add16a29");let Bf=kl;class zf extends po{constructor(){super(...arguments),T(this,"minGeometrySize",10),T(this,"minAssetsSize",1e3),T(this,"maxTriangles",null)}}const kf=class Yl extends de{constructor(e){super(e),T(this,"onGeometryStreamed",new Ut),T(this,"onAssetStreamed",new Ut),T(this,"onProgress",new Ut),T(this,"onIfcLoaded",new Ut),T(this,"onDisposed",new Y),T(this,"settings",new zf),T(this,"enabled",!0),T(this,"webIfc",new Hi),T(this,"_nextAvailableID",0),T(this,"_splittedGeometries",new Map),T(this,"_spatialTree",new ll),T(this,"_metaData",new hl),T(this,"_visitedGeometries",new Map),T(this,"_streamSerializer",new Ua),T(this,"_geometries",new Map),T(this,"_geometryCount",0),T(this,"_civil",new cl),T(this,"_groupSerializer",new xa),T(this,"_assets",[]),T(this,"_meshesWithHoles",new Set),this.components.add(Yl.uuid,this),this.settings.excludedCategories.add(Da)}dispose(){this.onIfcLoaded.reset(),this.onGeometryStreamed.reset(),this.onAssetStreamed.reset(),this.webIfc=null,this.onDisposed.trigger(),this.onDisposed.reset()}async streamFromBuffer(e){await this.readIfcFile(e),await this.streamAllGeometries(),this.cleanUp()}async streamFromCallBack(e){await this.streamIfcFile(e),await this.streamAllGeometries(),this.cleanUp()}async readIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModel(e,this.settings.webIfc),this._nextAvailableID=this.webIfc.GetMaxExpressID(0)}async streamIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModelFromCallback(e,this.settings.webIfc)}async streamAllGeometries(){const{minGeometrySize:e,minAssetsSize:t}=this.settings;this._spatialTree.setUp(this.webIfc);const i=this.webIfc.GetIfcEntityList(0),s=[[]],n=new qt;n.ifcMetadata={name:"",description:"",...this._metaData.getNameInfo(this.webIfc),...this._metaData.getDescriptionInfo(this.webIfc),schema:this.webIfc.GetModelSchema(0)||"IFC2X3",maxExpressID:this.webIfc.GetMaxExpressID(0)};let r=0,o=0;for(const m of i){if(!this.webIfc.IsIfcElement(m)&&m!==Ti||this.settings.excludedCategories.has(m))continue;const p=this.webIfc.GetLineIDsWithType(0,m),I=p.size();for(let E=0;Ee&&(r=0,o++,s.push([]));const g=p.get(E);s[o].push(g);const v=this.webIfc.GetLine(0,g);if(v.GlobalId){const w=(v==null?void 0:v.GlobalId.value)||(v==null?void 0:v.GlobalId);n.globalToExpressIDs.set(w,g)}const C=this._spatialTree.itemsByFloor[g]||0;n.data.set(g,[[],[C,m]]),r++}}this._spatialTree.cleanUp();let a=.01,l=0;for(const m of s){l++,this.webIfc.StreamMeshes(0,m,I=>{this.getMesh(this.webIfc,I,n)}),this._geometryCount>this.settings.minGeometrySize&&await this.streamGeometries(),this._assets.length>t&&await this.streamAssets();const p=l/s.length;p>a&&(a+=.01,a=Math.max(a,p),await this.onProgress.trigger(Math.round(a*100)/100))}this._geometryCount&&await this.streamGeometries(),this._assets.length&&await this.streamAssets();const{opaque:h,transparent:d}=n.geometryIDs;for(const[m,{index:p,uuid:I}]of this._visitedGeometries)n.keyFragments.set(p,I),(m>1?h:d).set(m,p);dl.get(n,this.webIfc);const u=this.webIfc.GetCoordinationMatrix(0);n.coordinationMatrix.fromArray(u),n.civilData=this._civil.read(this.webIfc);const f=this._groupSerializer.export(n);await this.onIfcLoaded.trigger(f),n.dispose(!0)}cleanUp(){try{this.webIfc.Dispose()}catch{}this.webIfc=null,this.webIfc=new Hi,this._visitedGeometries.clear(),this._geometries.clear(),this._assets=[],this._meshesWithHoles.clear()}getMesh(e,t,i){const s=t.geometries.size(),n=t.expressID,r={id:n,geometries:[]};for(let o=0;os&&(s=Math.round(s*100)/100,await this.onProgress.trigger(s),s+=.01)}await this.onProgress.trigger(1);const r=await this.components.get(it).processFromWebIfc(this.webIfc,0);await this.onIndicesStreamed.trigger(r)}cleanUp(){this.webIfc.Dispose(),this.webIfc=null,this.webIfc=new Hi}}T(Yf,"uuid","88d2c89c-ce32-47d7-8cb6-d51e4b311a0b");class Gl{constructor(e,t,i){T(this,"title"),T(this,"guid",Gt.create()),T(this,"clippingPlanes",new Jt),T(this,"camera",{aspectRatio:1,fov:60,direction:{x:0,y:0,z:0},position:{x:0,y:0,z:0}}),T(this,"exceptionComponents",new Jt),T(this,"selectionComponents",new Jt),T(this,"componentColors",new gt),T(this,"spacesVisible",!1),T(this,"spaceBoundariesVisible",!1),T(this,"openingsVisible",!1),T(this,"defaultVisibility",!0),T(this,"_components"),T(this,"world");const s={setCamera:!0,...i},{data:n,setCamera:r}=s;this._components=e,this.world=t,n&&(this.guid=n.guid??this.guid,this.set(n)),r&&this.updateCamera()}get _selectionModelIdMap(){const e=this._components.get(ue),t={};for(const[i,s]of e.groups){i in t||(t[i]=new Set);for(const n of this.selectionComponents){const r=s.globalToExpressIDs.get(n);r&&t[i].add(r)}}return t}get _exceptionModelIdMap(){const e=this._components.get(ue),t={};for(const[i,s]of e.groups){i in t||(t[i]=new Set);for(const n of this.exceptionComponents){const r=s.globalToExpressIDs.get(n);r&&t[i].add(r)}}return t}get selection(){return this._components.get(ue).modelIdToFragmentIdMap(this._selectionModelIdMap)}get exception(){return this._components.get(ue).modelIdToFragmentIdMap(this._exceptionModelIdMap)}get projection(){return"fov"in this.camera?"Perspective":"Orthographic"}get position(){const e=this._components.get(ue),{position:t}=this.camera,{x:i,y:s,z:n}=t,r=new P(i,s,n);return e.applyBaseCoordinateSystem(r,new ne),r}get direction(){const{direction:e}=this.camera,{x:t,y:i,z:s}=e;return new P(t,i,s)}get _managerVersion(){return this._components.get(Ze).config.version}get topics(){return[...this._components.get(Ze).list.values()].filter(e=>e.viewpoints.has(this.guid))}addComponentsFromMap(e){const t=this._components.get(ue).fragmentIdMapToGuids(e);this.selectionComponents.add(...t),this._components.get(Bt).list.set(this.guid,this)}set(e){const t=e,i=this;for(const s in e){if(s==="guid")continue;const n=t[s];if(s==="selectionComponents"){this.selectionComponents.clear(),this.selectionComponents.add(...n);continue}if(s==="exceptionComponents"){this.exceptionComponents.clear(),this.exceptionComponents.add(...n);continue}s in this&&(i[s]=n)}return this._components.get(Bt).list.set(this.guid,this),this}async go(e,t=!0){const{camera:i}=e??this.world;if(!i.hasCameraControls())throw new Error("Viewpoint: the world's camera need controls to set the viewpoint.");i instanceof Ru&&i.projection.set(this.projection);const s=new P(this.camera.position.x,this.camera.position.y,this.camera.position.z),n=new P(this.camera.direction.x,this.camera.direction.y,this.camera.direction.z);if(s.equals(new P)&&n.equals(new P))return;const r=this.position,o=this.direction;let a={x:r.x+o.x*80,y:r.y+o.y*80,z:r.z+o.z*80};const l=this.selection;if(Object.keys(l).length===0){const h=this._components.get(ut).get(this.world).castRayFromVector(r,this.direction);h&&(a=h.point)}else{const h=this._components.get(On);h.reset(),h.addFragmentIdMap(l),a=h.getSphere().center,h.reset()}await i.controls.setLookAt(r.x,r.y,r.z,a.x,a.y,a.z,t)}updateCamera(e){const{camera:t,renderer:i}=e??this.world;if(!i)throw new Error("Viewpoint: the world needs to have a renderer!");if(!t.hasCameraControls())throw new Error("Viewpoint: world's camera need camera controls!");const s=new P;t.controls.getPosition(s);const n=t.three,r=new P(0,0,-1).applyEuler(n.rotation),{width:o,height:a}=i.getSize();let l=o/a;Number.isNaN(l)&&(l=1);const h=this._components.get(ue);s.applyMatrix4(h.baseCoordinationMatrix.clone().invert());const d={aspectRatio:l,position:{x:s.x,y:s.y,z:s.z},direction:{x:r.x,y:r.y,z:r.z}};n instanceof Pa?this.camera={...d,fov:n.fov}:n instanceof ii&&(this.camera={...d,viewToWorldScale:n.top-n.bottom}),this._components.get(Bt).list.set(this.guid,this)}applyVisibility(){const e=this._components.get(Bf);e.set(this.defaultVisibility),e.set(!this.defaultVisibility,this.exception),e.set(!0,this.selection)}applyColors(){const e=this._components.get(Bt),t=this._components.get(ue),i=this._components.get(Mr);for(const[s,n]of this.componentColors){const r=t.guidToFragmentIdMap(n);i.setColor(r,s,e.config.overwriteColors)}}resetColors(){const e=this._components.get(ue),t=this._components.get(Mr);for(const[i,s]of this.componentColors){const n=e.guidToFragmentIdMap(s);t.resetColor(n)}}async createComponentTags(e){var t,i;const s=this._components.get(ue),n=this._components.get(Ze);let r="";if(n.config.includeSelectionTag){const o=e==="selection"?this._selectionModelIdMap:this._exceptionModelIdMap;for(const a in o){const l=s.groups.get(a);if(!l)continue;const h=o[a];for(const d of h){const u=await l.getProperties(d);if(!u)continue;const f=(t=u.GlobalId)==null?void 0:t.value;if(!f)continue;const m=(i=u.Tag)==null?void 0:i.value;let p=null;m&&(p=`AuthoringToolId="${m}"`),r+=` + `}processMarkupComment(e){const{Guid:t,Date:i,Author:s,Comment:n,Viewpoint:r}=e;if(!(t&&i&&s&&(br||r)))return null;const o=this.components.get(Bt),a=new br(this.components,n??"");return a.guid=t,a.date=new Date(i),a.author=s,a.viewpoint=r!=null&&r.Guid?o.list.get(r.Guid):void 0,a.modifiedAuthor=e.ModifiedAuthor,a.modifiedDate=e.ModifiedDate?new Date(e.ModifiedDate):void 0,a}getMarkupComments(e,t){var i;let s;if(t==="2.1"&&(s=e.Comment),t==="3"&&(s=(i=e.Topic.Comments)==null?void 0:i.Comment),!s)return[];s=Array.isArray(s)?s:[s];const n=s.map(r=>this.processMarkupComment(r)).filter(r=>r);return Array.isArray(n)?n:[n]}getMarkupLabels(e,t){var i;let s;return t==="2.1"&&(s=e.Topic.Labels),t==="3"&&(s=(i=e.Topic.Labels)==null?void 0:i.Label),s?Array.isArray(s)?s:[s]:[]}getMarkupViewpoints(e,t){var i;let s;return t==="2.1"&&(s=e.Viewpoints),t==="3"&&(s=(i=e.Topic.Viewpoints)==null?void 0:i.ViewPoint),s?(s=Array.isArray(s)?s:[s],s):[]}getMarkupRelatedTopics(e,t){var i;let s;return t==="2.1"&&(s=e.Topic.RelatedTopic),t==="3"&&(s=(i=e.Topic.RelatedTopics)==null?void 0:i.RelatedTopic),s?(Array.isArray(s)?s:[s]).map(n=>n.Guid):[]}async load(e,t){var i;const{fallbackVersionOnImport:s,ignoreIncompleteTopicsOnImport:n,updateExtensionsOnImport:r}=this.config,o=new da;await o.loadAsync(e);const a=Object.values(o.files);let l=s;const h=a.find(g=>g.name.endsWith(".version"));if(h){const g=await h.async("string"),w=Ts.xmlParser.parse(g).Version.VersionId;l=String(w)}if(!(l&&(l==="2.1"||l==="3")))throw new Error(`BCFTopics: ${l} is not supported.`);const d=a.find(g=>g.name.endsWith(".extensions"));if(r&&d){const g=await d.async("string");_f(this,g)}const u=[],f=this.components.get(Bt),m=a.filter(g=>g.name.endsWith(".bcfv"));for(const g of m){const w=await g.async("string"),C=Ts.xmlParser.parse(w).VisualizationInfo;if(!C){console.warn("Missing VisualizationInfo in Viewpoint");continue}const v={},{Guid:O,ClippingPlanes:A,Components:b,OrthogonalCamera:N,PerspectiveCamera:D}=C;if(O&&(v.guid=O),b){const{Selection:F,Visibility:L}=b;if(F&&F.Component){const U=Array.isArray(F.Component)?F.Component:[F.Component];v.selectionComponents=U.map(W=>W.IfcGuid).filter(W=>W)}if(L&&"DefaultVisibility"in L&&(v.defaultVisibility=L.DefaultVisibility),L&&L.Exceptions&&"Component"in L.Exceptions){const{Component:U}=L.Exceptions,W=Array.isArray(U)?U:[U];v.exceptionComponents=W.map(z=>z.IfcGuid).filter(z=>z)}let R;l==="2.1"&&(R=b.ViewSetupHints),l==="3"&&(R=(i=b.Visibility)==null?void 0:i.ViewSetupHints),R&&("OpeningsVisible"in R&&(v.openingsVisible=R.OpeningsVisible),"SpacesVisible"in R&&(v.spacesVisible=R.SpacesVisible),"SpaceBoundariesVisible"in R&&(v.spaceBoundariesVisible=R.SpaceBoundariesVisible))}if(N||D){const F=C.PerspectiveCamera??C.OrthogonalCamera,{CameraViewPoint:L,CameraDirection:R}=F,U=new x(Number(L.X),Number(L.Z),Number(-L.Y)),W=new x(Number(R.X),Number(R.Z),Number(-R.Y)),z={position:{x:U.x,y:U.y,z:U.z},direction:{x:W.x,y:W.y,z:W.z},aspectRatio:"AspectRatio"in F?F.AspectRatio:1};"ViewToWorldScale"in F&&(v.camera={...z,viewToWorldScale:F.ViewToWorldScale}),"FieldOfView"in F&&(v.camera={...z,fov:F.FieldOfView})}const _=new Hl(this.components,t,{data:v,setCamera:!1});if(b){const{Coloring:F}=b;if(F&&F.Color){const L=Array.isArray(F.Color)?F.Color:[F.Color];for(const R of L){const{Color:U,Component:W}=R,z=(Array.isArray(W)?W:[W]).map(q=>q.IfcGuid);_.componentColors.set(U,z)}}}if(u.push(_),A){const F=this.components.get(Xi),L=Array.isArray(A.ClippingPlane)?A.ClippingPlane:[A.ClippingPlane];for(const R of L){const{Location:U,Direction:W}=R;if(!(U&&W))continue;const z=new x(U.X,U.Z,-U.Y),q=new x(W.X,-W.Z,W.Y),X=F.createFromNormalAndCoplanarPoint(t,q,z);X.visible=!1,X.enabled=!1,_.clippingPlanes.add(X)}}}const p={},E=[],I=a.filter(g=>g.name.endsWith(".bcf"));for(const g of I){const w=await g.async("string"),C=Ts.xmlParser.parse(w).Markup,v=C.Topic,{Guid:O,TopicType:A,TopicStatus:b,Title:N,CreationDate:D,CreationAuthor:_}=v;if(n&&!(O&&A&&b&&N&&D&&_))continue;const F=new Ia(this.components);F.guid=O??F.guid;const L=this.getMarkupRelatedTopics(C,l);p[F.guid]=new Set(L),F.type=A??F.type,F.status=b??F.status,F.title=N??F.title,F.creationDate=D?new Date(D):F.creationDate,F.creationAuthor=_??F.creationAuthor,F.serverAssignedId=v.ServerAssignedId,F.priority=v.Priority,F.index=v.Index,F.modifiedDate=v.ModifiedDate?new Date(v.ModifiedDate):void 0,F.modifiedAuthor=v.ModifiedAuthor,F.dueDate=v.DueDate?new Date(v.DueDate):void 0,F.assignedTo=v.AssignedTo,F.description=v.Description,F.stage=v.Stage;const R=this.getMarkupLabels(C,l);for(const z of R)F.labels.add(z);const U=this.getMarkupComments(C,l);for(const z of U)F.comments.set(z.guid,z);const W=this.getMarkupViewpoints(C,l);for(const z of W){if(!(z&&z.Guid))continue;const q=f.list.get(z.Guid);q&&F.viewpoints.add(q.guid)}this.list.set(F.guid,F),E.push(F)}for(const g in p){const w=this.list.get(g);if(!w)continue;const C=p[g];for(const v of C)w.relatedTopics.add(v)}return this.onBCFImported.trigger(E),{viewpoints:u,topics:E}}};T(Io,"uuid","de977976-e4f6-4e4f-a01a-204727839802");T(Io,"xmlParser",new Al.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let je=Io;const Nl=class Mt extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"onDisposed",new Y),T(this,"_absoluteMin"),T(this,"_absoluteMax"),T(this,"_meshes",[]),this.components.add(Mt.uuid,this),this._absoluteMin=Mt.newBound(!0),this._absoluteMax=Mt.newBound(!1)}static getDimensions(e){const{min:t,max:i}=e,s=Math.abs(i.x-t.x),n=Math.abs(i.y-t.y),r=Math.abs(i.z-t.z),o=new x;return o.subVectors(i,t).divideScalar(2).add(t),{width:s,height:n,depth:r,center:o}}static newBound(e){const t=e?1:-1;return new x(t*Number.MAX_VALUE,t*Number.MAX_VALUE,t*Number.MAX_VALUE)}static getBounds(e,t,i){const s=i||this.newBound(!1),n=t||this.newBound(!0);for(const r of e)r.xs.x&&(s.x=r.x),r.y>s.y&&(s.y=r.y),r.z>s.z&&(s.z=r.z);return new ye(t,i)}dispose(){const e=this.components.get(Nt);for(const t of this._meshes)e.destroy(t);this._meshes=[],this.onDisposed.trigger(Mt.uuid),this.onDisposed.reset()}get(){const e=this._absoluteMin.clone(),t=this._absoluteMax.clone();return new ye(e,t)}getSphere(){const e=this._absoluteMin.clone(),t=this._absoluteMax.clone(),i=Math.abs((t.x-e.x)/2),s=Math.abs((t.y-e.y)/2),n=Math.abs((t.z-e.z)/2),r=new x(e.x+i,e.y+s,e.z+n),o=r.distanceTo(e);return new gi(r,o)}getMesh(){const e=new ye(this._absoluteMin,this._absoluteMax),t=Mt.getDimensions(e),{width:i,height:s,depth:n,center:r}=t,o=new Be(i,s,n),a=new ee(o);return this._meshes.push(a),a.position.copy(r),a}reset(){this._absoluteMin=Mt.newBound(!0),this._absoluteMax=Mt.newBound(!1)}add(e){for(const t of e.items)this.addMesh(t.mesh)}addMesh(e,t){if(!e.geometry.index)return;const i=Mt.getFragmentBounds(e);e.updateMatrixWorld();const s=e.matrixWorld,n=new ne,r=e instanceof It,o=new Set;if(e instanceof Ua){t||(t=e.fragment.ids);for(const a of t){const l=e.fragment.getInstancesIDs(a);if(l)for(const h of l)o.add(h)}}else o.add(0);for(const a of o){const l=i.min.clone(),h=i.max.clone();r&&(e.getMatrixAt(a,n),l.applyMatrix4(n),h.applyMatrix4(n)),l.applyMatrix4(s),h.applyMatrix4(s),l.xthis._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),h.x>this._absoluteMax.x&&(this._absoluteMax.x=h.x),h.y>this._absoluteMax.y&&(this._absoluteMax.y=h.y),h.z>this._absoluteMax.z&&(this._absoluteMax.z=h.z),h.xr.x&&(r.x=h),d>r.y&&(r.y=d),u>r.z&&(r.z=u)}return new ye(n,r)}};T(Nl,"uuid","d1444724-dba6-4cdd-a0c7-68ee1450d166");let On=Nl;const Bf=class Pl extends de{constructor(e){super(e),T(this,"enabled",!0),e.add(Pl.uuid,this)}async getIsolatedElements(e,t,i){const s=new Set;function n(a){if(s.has(a))return;const l=e.GetLine(t,a);if(l){s.add(a);for(const h in l){const d=l[h];d&&d.constructor.name==="Handle"&&d.value>0?n(d.value):Array.isArray(d)&&d.forEach(u=>{u&&u.constructor.name==="Handle"&&u.value>0&&n(u.value)})}}}for(const a of i)n(a);const r=[];for(const a of s)r.push(a);r.sort((a,l)=>a-l);const o=[];return r.forEach(a=>{const l=e.GetLine(t,a);o.push(l)}),o}async export(e,t,i){return i.forEach(s=>{e.WriteLine(t,s)}),e.SaveModel(t)}async splitIfc(e,t,i){const s=new Uint8Array(t),n=e.OpenModel(s),r=await this.getIsolatedElements(e,n,i),o=e.CreateModel({schema:sh.IFC2X3});return await this.export(e,o,r)}};T(Bf,"uuid","6eb0ba2f-71c0-464e-bcec-2d7c335186b2");const bl=class xl{constructor(e){T(this,"onProgress",new Y),T(this,"inclusive",!1),T(this,"rules",[]),T(this,"ids",{}),T(this,"needsUpdate",new Map),T(this,"components"),this.components=e}static import(e,t){const i=xl.importers.get(t.type);return i?i(e,t):(console.warn("Invalid query data:.",t),null)}static importRules(e){const t=[];for(const i of e){const s={};for(const n in i){const r=i[n];r.regexp?s[n]=new RegExp(r.value):s[n]=r}t.push(s)}return t}static importIds(e){const t={};for(const i in e.ids)t[i]=new Set(e.ids[i]);return t}clear(e){if(e===void 0){this.ids={},this.needsUpdate.clear();return}delete this.ids[e],this.needsUpdate.delete(e)}addID(e,t){this.ids[e]||(this.ids[e]=new Set),this.ids[e].add(t)}getData(){const e={};for(const i in this.ids)e[i]=Array.from(this.ids[i]);const t=this.exportRules();return{name:this.name,inclusive:this.inclusive,type:"IfcFinderQuery",ids:e,rules:t}}exportRules(){const e=[];for(const t of this.rules){const i={};for(const s in t){const n=t[s];n instanceof RegExp?i[s]={regexp:!0,value:n.source}:i[s]=n}e.push(i)}return e}findInFile(e,t){return new Promise(i=>{const s=new FileReader,n=new TextDecoder("utf-8"),r=1e4*1024,o=1e3;let a=0;const l=/;/,h=()=>{if(a>=t.size){i();return}const d=Math.min(a+r+o,t.size),u=t.slice(a,d);s.readAsArrayBuffer(u)};s.onload=()=>{if(!(s.result instanceof ArrayBuffer))return;const d=new Uint8Array(s.result),u=n.decode(d).split(l);u.shift(),this.findInLines(e,u),this.onProgress.trigger(a/t.size),a+=r,h()},h()})}getIdFromLine(e){const t=e.slice(e.indexOf("#")+1,e.indexOf("="));return parseInt(t,10)}testRules(e){let t=null,i=null,s=null,n=!1;for(const r of this.rules){if(r.type==="category"){if(t===null&&(t=this.getCategoryFromLine(e),t===null)){if(this.inclusive)continue;break}if(!r.value.test(t)){if(this.inclusive)continue;n=!1;break}n=!0;continue}if(i===null&&(i=this.getAttributesFromLine(e),i===null)){if(this.inclusive)continue;n=!1;break}if(t===null&&(t=this.getCategoryFromLine(e),t===null)){if(this.inclusive)continue;n=!1;break}if(s===null&&(s=Object.keys(new nh[t]),s=s.slice(2),s===null)){if(this.inclusive)continue;n=!1;break}if(r.type==="property"){const{name:o,value:a}=r;if(!a.test(e)){if(this.inclusive)continue;n=!1;break}let l=!1;for(let h=0;h"&&parseFloat(f)>a){h=!0;break}else if(l===">="&&parseFloat(f)>=a){h=!0;break}else if(l==="<="&&parseFloat(f)<=a){h=!0;break}}}if(h)n=!0;else if(!this.inclusive){n=!1;break}}}return n}getCategoryFromLine(e){const t=e.indexOf("=")+1,i=e.indexOf("("),s=e.slice(t,i).trim();return yu[s]||null}getAttributesFromLine(e){const t=/\((.*)\)/,i=e.match(t);if(!(i&&i[1]))return null;const s=/,(?![^()]*\))/g;return i[1].split(s).map(n=>n.trim())}};T(bl,"importers",new Map);let kt=bl;class Ea{constructor(e){T(this,"list",new Map),T(this,"id",Ii.generateUUID()),T(this,"mode","intersect"),T(this,"_components"),this._components=e}get queries(){return new Set(this.list.values())}get items(){const e=[];for(const t of this.queries)e.push(t.items);return this.mode==="combine"?Wi.combine(e):Wi.intersect(e)}add(e){if(this.list.has(e.name))throw new Error(`This group already has a query with the name ${e.name}.`);this.list.set(e.name,e)}clear(e){for(const t of this.queries)t.clear(e)}import(e){this.mode=e.mode,this.id=e.id;for(const t in e.queries){const i=kt.import(this._components,e.queries[t]);i&&this.list.set(t,i)}}export(){const e={};for(const[t,i]of this.list)e[t]=i.export();return{mode:this.mode,id:this.id,queries:e}}async update(e,t){for(const i of this.queries){const s=i.needsUpdate.get(e);(s===void 0||s)&&await i.update(e,t)}}}const Ml=class Ll extends kt{constructor(e,t){super(e),T(this,"name"),this.name=t.name,this.rules=t.rules,this.inclusive=t.inclusive}get items(){const e=this.components.get(ue),t=[];for(const i in this.ids){const s=this.ids[i],n=e.groups.get(i);if(!n){console.warn(`Model ${i} not found!`);continue}const r=n.getFragmentMap(s);t.push(r)}return Wi.combine(t)}export(){const e=this.getData();return e.type=Ll.type,e}async update(e,t){this.ids[e]=new Set,await this.findInFile(e,t),this.needsUpdate.set(e,!1)}findInLines(e,t){for(const i of t)if(this.testRules(i)){const s=this.getIdFromLine(i);this.addID(e,s)}}};T(Ml,"type","IfcBasicQuery");let ga=Ml;kt.importers.set(ga.type,(c,e)=>{const t=new ga(c,{name:e.name,rules:kt.importRules(e.rules),inclusive:e.inclusive});return t.ids=kt.importIds(e),t});const Dl=class _l extends kt{constructor(e,t){super(e),T(this,"name"),T(this,"psets",[]),this.name=t.name,this.rules=t.rules,this.inclusive=t.inclusive}get items(){const e=this.components.get(it),t=this.components.get(ue),i=[];for(const s in this.ids){const n=t.groups.get(s);if(!n){console.log(`Model not found: ${s}.`);continue}const r=this.ids[s];for(const o of r){const a=e.getEntityRelations(s,o,"DefinesOcurrence");if(a){const l=n.getFragmentMap(a);i.push(l)}}}return Wi.combine(i)}export(){const e=this.getData();return e.type=_l.type,e}async update(e,t){await this.findInFile(e,t);const i=new Set;for(const s of this.psets){const n=this.getAttributesFromLine(s);if(n===null)continue;const r=n[4].replace("(","[").replace(")","]").replace(/#/g,""),o=JSON.parse(r);for(const a of o){const l=this.ids[e];if(l&&l.has(a)){const h=this.getIdFromLine(s);i.add(h);break}}}this.ids[e]=i,this.psets=[],this.needsUpdate.set(e,!1)}findInLines(e,t){for(const i of t){const s=this.getCategoryFromLine(i);if(s==="IfcPropertySet"){this.psets.push(i);continue}if(s==="IfcPropertySingleValue"&&this.testRules(i)){const n=this.getIdFromLine(i);this.addID(e,n)}}}};T(Dl,"type","IfcPropertyQuery");let Ca=Dl;kt.importers.set(Ca.type,(c,e)=>{const t=new Ca(c,{name:e.name,inclusive:e.inclusive,rules:kt.importRules(e.rules)});return t.ids=kt.importIds(e),t});const zf=class Ul extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new Map),e.add(Ul.uuid,this)}get queries(){const e=new Set;for(const[,t]of this.list)for(const i of t.queries)e.add(i);return e}import(e){for(const t in e){const i=new Ea(this.components);i.import(e[t]),this.list.set(t,i)}}export(){const e={};for(const[t,i]of this.list)e[t]=i.export();return e}create(){const e=new Ea(this.components);return this.list.set(e.id,e),e}delete(e){this.list.delete(e)}clear(){this.list.clear()}};T(zf,"uuid","0da7ad77-f734-42ca-942f-a074adfd1e3a");const Bl=class zl extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",{}),T(this,"onDisposed",new Y),T(this,"onFragmentsDisposed",t=>{const{groupID:i,fragmentIDs:s}=t;for(const n in this.list){const r=this.list[n],o=Object.keys(r);if(o.includes(i))delete r[i],Object.values(r).length===0&&delete this.list[n];else for(const a of o){const l=r[a];for(const h of s)delete l.map[h];Object.values(l).length===0&&delete r[a]}}}),e.add(zl.uuid,this),e.get(ue).onFragmentsDisposed.add(this.onFragmentsDisposed)}dispose(){this.list={},this.components.get(ue).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(),this.onDisposed.reset()}remove(e){for(const t in this.list){const i=this.list[t];for(const s in i){const n=i[s];delete n.map[e]}}}find(e){const t=this.components.get(ue);if(!e){const r={};for(const[o,a]of t.list)r[o]=new Set(a.ids);return r}const i=Object.keys(e).length,s={};for(const r in e){const o=e[r];if(!this.list[r]){console.warn(`Classification ${r} does not exist.`);continue}for(const a of o){const l=this.list[r][a];if(l)for(const h in l.map){s[h]||(s[h]=new Map);for(const d of l.map[h]){const u=s[h].get(d);u===void 0?s[h].set(d,1):s[h].set(d,u+1)}}}}const n={};for(const r in s){const o=s[r];for(const[a,l]of o){if(l===void 0)throw new Error("Malformed fragments map!");l===i&&(n[r]||(n[r]=new Set),n[r].add(a))}}return n}byModel(e,t){this.list.models||(this.list.models={});const i=this.list.models;i[e]||(i[e]={map:{},id:null,name:e});const s=i[e];for(const[n,r]of t.data){const o=r[0];for(const a of o){const l=t.keyFragments.get(a);l&&(s.map[l]||(s.map[l]=new Set),s.map[l].add(n))}}}async byPredefinedType(e){var t;this.list.predefinedTypes||(this.list.predefinedTypes={});const i=this.list.predefinedTypes,s=e.getAllPropertiesIDs();for(const n of s){const r=await e.getProperties(n);if(!r)continue;const o=String((t=r.PredefinedType)==null?void 0:t.value).toUpperCase();i[o]||(i[o]={map:{},id:null,name:o});const a=i[o];for(const[l,h]of e.data){const d=h[0];for(const u of d){const f=e.keyFragments.get(u);if(!f)throw new Error("Fragment ID not found!");a.map[f]||(a.map[f]=new Set),a.map[f].add(r.expressID)}}}}byEntity(e){this.list.entities||(this.list.entities={});for(const[t,i]of e.data){const s=i[1][1],n=An[s];this.saveItem(e,"entities",n,t)}}async byIfcRel(e,t,i){fi.isRel(t)&&await fi.getRelationMap(e,t,async(s,n)=>{const{name:r}=await fi.getEntityName(e,s);for(const o of n)this.saveItem(e,i,r??"NO REL NAME",o)})}async bySpatialStructure(e,t={}){var i,s;const n=this.components.get(it),r=n.relationMaps[e.uuid];if(!r)throw new Error(`Classifier: model relations of ${e.name||e.uuid} have to exists to group by spatial structure.`);const o=t.systemName??"spatialStructures",a=t.useProperties===void 0||t.useProperties;for(const[l]of r){if(t.isolate){const f=e.data.get(l);if(!f)continue;const m=f[1][1];if(m===void 0||!t.isolate.has(m))continue}const h=n.getEntityRelations(e,l,"Decomposes");if(h)for(const f of h){let m=f.toString();if(a){const p=await e.getProperties(f);if(!p)continue;m=(i=p.Name)==null?void 0:i.value}this.saveItem(e,o,m,l,f)}const d=n.getEntityRelations(e,l,"ContainsElements");if(!d)continue;let u=l.toString();if(a){const f=await e.getProperties(l);if(!f)continue;u=(s=f.Name)==null?void 0:s.value}for(const f of d){this.saveItem(e,o,u,f,l);const m=n.getEntityRelations(e,Number(f),"IsDecomposedBy");if(m)for(const p of m)this.saveItem(e,o,u,p,l)}}}setColor(e,t,i=!1){const s=this.components.get(ue);for(const n in e){const r=s.list.get(n);if(!r)continue;const o=e[n];r.setColor(t,o,i)}}resetColor(e){const t=this.components.get(ue);for(const i in e){const s=t.list.get(i);if(!s)continue;const n=e[i];s.resetColor(n)}}export(){const e={};for(const t in this.list){e[t]={};const i=this.list[t];for(const s in i){const n=i[s];e[t][s]={map:Wi.export(n.map),name:n.name,id:n.id}}}return e}import(e){for(const t in e){this.list[t]||(this.list[t]={});const i=e[t];for(const s in i){const n=i[s];this.list[t][s]={map:Wi.import(n.map),name:n.name,id:n.id}}}}saveItem(e,t,i,s,n=null){this.list[t]||(this.list[t]={});const r=e.data.get(s);if(r)for(const o of r[0]){const a=e.keyFragments.get(o);if(a){const l=this.list[t];l[i]||(l[i]={map:{},id:n,name:i}),l[i].map[a]||(l[i].map[a]=new Set),l[i].map[a].add(s)}}}};T(Bl,"uuid","e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");let xr=Bl;const kf=class kl extends de{constructor(e){super(e),T(this,"onDisposed",new Y),T(this,"enabled",!0),T(this,"height",10),T(this,"groupName","spatialStructures"),T(this,"list",new Set),e.add(kl.uuid,this)}dispose(){this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}set(e){if(!this.enabled)return;const t=this.components.get(xr),i=this.components.get(ue),s=e?1:-1;let n=0;const r=t.list[this.groupName],o=new ne;for(const a in r){o.elements[13]=n*s*this.height;for(const l in r[a].map){const h=i.list.get(l),d=a+l,u=this.list.has(d);if(!h||e&&u||!e&&!u)continue;e?this.list.add(d):this.list.delete(d);const f=r[a].map[l];h.applyTransform(f,o),h.mesh.computeBoundingSphere(),h.mesh.computeBoundingBox()}n++}}};T(kf,"uuid","d260618b-ce88-4c7d-826c-6debb91de3e2");const Vl=class Yl extends de{constructor(e){super(e),T(this,"enabled",!0),this.components.add(Yl.uuid,this)}set(e,t){const i=this.components.get(ue);if(!t){for(const[s,n]of i.list)n&&(n.setVisibility(e),this.updateCulledVisibility(n));return}for(const s in t){const n=t[s],r=i.list.get(s);r&&(r.setVisibility(e,n),this.updateCulledVisibility(r))}}isolate(e){this.set(!1),this.set(!0,e)}updateCulledVisibility(e){const t=this.components.get(ru);for(const[i,s]of t.list){const n=s.colorMeshes.get(e.id);n&&(n.count=e.mesh.count)}}};T(Vl,"uuid","dd9ccf2d-8a21-4821-b7f6-2949add16a29");let Vf=Vl;class Yf extends fo{constructor(){super(...arguments),T(this,"minGeometrySize",10),T(this,"minAssetsSize",1e3),T(this,"maxTriangles",null)}}const Gf=class Gl extends de{constructor(e){super(e),T(this,"onGeometryStreamed",new Ut),T(this,"onAssetStreamed",new Ut),T(this,"onProgress",new Ut),T(this,"onIfcLoaded",new Ut),T(this,"onDisposed",new Y),T(this,"settings",new Yf),T(this,"enabled",!0),T(this,"webIfc",new Hi),T(this,"_nextAvailableID",0),T(this,"_splittedGeometries",new Map),T(this,"_spatialTree",new cl),T(this,"_metaData",new dl),T(this,"_visitedGeometries",new Map),T(this,"_streamSerializer",new Ba),T(this,"_geometries",new Map),T(this,"_geometryCount",0),T(this,"_civil",new hl),T(this,"_groupSerializer",new _a),T(this,"_assets",[]),T(this,"_meshesWithHoles",new Set),this.components.add(Gl.uuid,this),this.settings.excludedCategories.add(Da)}dispose(){this.onIfcLoaded.reset(),this.onGeometryStreamed.reset(),this.onAssetStreamed.reset(),this.webIfc=null,this.onDisposed.trigger(),this.onDisposed.reset()}async streamFromBuffer(e){await this.readIfcFile(e),await this.streamAllGeometries(),this.cleanUp()}async streamFromCallBack(e){await this.streamIfcFile(e),await this.streamAllGeometries(),this.cleanUp()}async readIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModel(e,this.settings.webIfc),this._nextAvailableID=this.webIfc.GetMaxExpressID(0)}async streamIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModelFromCallback(e,this.settings.webIfc),this._nextAvailableID=this.webIfc.GetMaxExpressID(0)}async streamAllGeometries(){console.log("Converting geometries to tiles...");const{minGeometrySize:e,minAssetsSize:t}=this.settings;this._spatialTree.setUp(this.webIfc);const i=this.webIfc.GetIfcEntityList(0),s=[[]],n=new zt;n.ifcMetadata={name:"",description:"",...this._metaData.getNameInfo(this.webIfc),...this._metaData.getDescriptionInfo(this.webIfc),schema:this.webIfc.GetModelSchema(0)||"IFC2X3",maxExpressID:this.webIfc.GetMaxExpressID(0)};let r=0,o=0;for(const m of i){if(!this.webIfc.IsIfcElement(m)&&m!==Ti||this.settings.excludedCategories.has(m))continue;const p=this.webIfc.GetLineIDsWithType(0,m),E=p.size();for(let I=0;Ie&&(r=0,o++,s.push([]));const g=p.get(I);s[o].push(g);const w=this.webIfc.GetLine(0,g);if(w.GlobalId){const v=(w==null?void 0:w.GlobalId.value)||(w==null?void 0:w.GlobalId);n.globalToExpressIDs.set(v,g)}const C=this._spatialTree.itemsByFloor[g]||0;n.data.set(g,[[],[C,m]]),r++}}this._spatialTree.cleanUp();let a=.01,l=0;for(const m of s){l++,this.webIfc.StreamMeshes(0,m,E=>{this.getMesh(this.webIfc,E,n)}),this._geometryCount>this.settings.minGeometrySize&&await this.streamGeometries(),this._assets.length>t&&await this.streamAssets();const p=l/s.length;p>a&&(a+=.01,a=Math.max(a,p),await this.onProgress.trigger(Math.round(a*100)/100))}this._geometryCount&&await this.streamGeometries(),this._assets.length&&await this.streamAssets();const{opaque:h,transparent:d}=n.geometryIDs;for(const[m,{index:p,uuid:E}]of this._visitedGeometries)n.keyFragments.set(p,E),(m>1?h:d).set(m,p);ul.get(n,this.webIfc);const u=this.webIfc.GetCoordinationMatrix(0);n.coordinationMatrix.fromArray(u),n.civilData=this._civil.read(this.webIfc);const f=this._groupSerializer.export(n);await this.onIfcLoaded.trigger(f),n.dispose(!0)}cleanUp(){try{this.webIfc.Dispose()}catch{}this.webIfc=null,this.webIfc=new Hi,this._visitedGeometries.clear(),this._geometries.clear(),this._assets=[],this._meshesWithHoles.clear()}getMesh(e,t,i){const s=t.geometries.size(),n=t.expressID,r={id:n,geometries:[]};for(let o=0;othis.settings.minGeometrySize&&await this.outputGeometries(e);await this.outputGeometries(e),this._geometries.clear(),this._geometryCount=0}async outputGeometries(e){let t=this._streamSerializer.export(e),i={};for(const[s,{boundingBox:n,hasHoles:r}]of e)i[s]={boundingBox:n,hasHoles:r};await this.onGeometryStreamed.trigger({data:i,buffer:t}),i=null,t=null,e.clear()}registerGeometryData(e,t,i,s,n,r){const o=this._visitedGeometries.get(r);if(o===void 0)throw new Error("Error getting geometry data for streaming!");const a=e.data.get(t);if(!a)throw new Error("Data not found!");a[0].push(o.index);const{x:l,y:h,z:d,w:u}=i.color,f=[l,h,d,u],m=i.flatTransformation;s.geometries.push({color:f,geometryID:n,transformation:m})}};T(Gf,"uuid","d9999a00-e1f5-4d3f-8cfe-c56e08609764");class Hf extends fo{constructor(){super(...arguments),T(this,"propertiesSize",100)}}class Wf extends de{constructor(){super(...arguments),T(this,"onPropertiesStreamed",new Ut),T(this,"onProgress",new Ut),T(this,"onIndicesStreamed",new Ut),T(this,"onDisposed",new Y),T(this,"enabled",!0),T(this,"settings",new Hf),T(this,"webIfc",new Hi)}async dispose(){this.onIndicesStreamed.reset(),this.onPropertiesStreamed.reset(),this.webIfc=null,this.onDisposed.reset()}async streamFromBuffer(e){await this.readIfcFile(e),await this.streamAllProperties(),this.cleanUp()}async streamFromCallBack(e){await this.streamIfcFile(e),await this.streamAllProperties(),this.cleanUp()}async readIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModel(e,this.settings.webIfc)}async streamIfcFile(e){const{path:t,absolute:i,logLevel:s}=this.settings.wasm;this.webIfc.SetWasmPath(t,i),await this.webIfc.Init(),s&&this.webIfc.SetLogLevel(s),this.webIfc.OpenModelFromCallback(e,this.settings.webIfc)}async streamAllProperties(){const{propertiesSize:e}=this.settings,t=new Set(this.webIfc.GetIfcEntityList(0)),i=new Set([Hr,Wr,Xr,Mn,Ti]);for(const o of i)t.add(o);let s=.01,n=0;for(const o of t){if(n++,fl.has(o))continue;const a=i.has(o),l=this.webIfc.GetLineIDsWithType(0,o),h=l.size();let d=0;for(let u=0;us&&(s=Math.round(s*100)/100,await this.onProgress.trigger(s),s+=.01)}await this.onProgress.trigger(1);const r=await this.components.get(it).processFromWebIfc(this.webIfc,0);await this.onIndicesStreamed.trigger(r)}cleanUp(){this.webIfc.Dispose(),this.webIfc=null,this.webIfc=new Hi}}T(Wf,"uuid","88d2c89c-ce32-47d7-8cb6-d51e4b311a0b");class Hl{constructor(e,t,i){T(this,"title"),T(this,"guid",Ht.create()),T(this,"clippingPlanes",new Jt),T(this,"camera",{aspectRatio:1,fov:60,direction:{x:0,y:0,z:0},position:{x:0,y:0,z:0}}),T(this,"exceptionComponents",new Jt),T(this,"selectionComponents",new Jt),T(this,"componentColors",new gt),T(this,"spacesVisible",!1),T(this,"spaceBoundariesVisible",!1),T(this,"openingsVisible",!1),T(this,"defaultVisibility",!0),T(this,"_components"),T(this,"world");const s={setCamera:!0,...i},{data:n,setCamera:r}=s;this._components=e,this.world=t,n&&(this.guid=n.guid??this.guid,this.set(n)),r&&this.updateCamera()}get _selectionModelIdMap(){const e=this._components.get(ue),t={};for(const[i,s]of e.groups){i in t||(t[i]=new Set);for(const n of this.selectionComponents){const r=s.globalToExpressIDs.get(n);r&&t[i].add(r)}}return t}get _exceptionModelIdMap(){const e=this._components.get(ue),t={};for(const[i,s]of e.groups){i in t||(t[i]=new Set);for(const n of this.exceptionComponents){const r=s.globalToExpressIDs.get(n);r&&t[i].add(r)}}return t}get selection(){return this._components.get(ue).modelIdToFragmentIdMap(this._selectionModelIdMap)}get exception(){return this._components.get(ue).modelIdToFragmentIdMap(this._exceptionModelIdMap)}get projection(){return"fov"in this.camera?"Perspective":"Orthographic"}get position(){const e=this._components.get(ue),{position:t}=this.camera,{x:i,y:s,z:n}=t,r=new x(i,s,n);return e.applyBaseCoordinateSystem(r,new ne),r}get direction(){const{direction:e}=this.camera,{x:t,y:i,z:s}=e;return new x(t,i,s)}get _managerVersion(){return this._components.get(je).config.version}get topics(){return[...this._components.get(je).list.values()].filter(e=>e.viewpoints.has(this.guid))}addComponentsFromMap(e){const t=this._components.get(ue).fragmentIdMapToGuids(e);this.selectionComponents.add(...t),this._components.get(Bt).list.set(this.guid,this)}set(e){const t=e,i=this;for(const s in e){if(s==="guid")continue;const n=t[s];if(s==="selectionComponents"){this.selectionComponents.clear(),this.selectionComponents.add(...n);continue}if(s==="exceptionComponents"){this.exceptionComponents.clear(),this.exceptionComponents.add(...n);continue}s in this&&(i[s]=n)}return this._components.get(Bt).list.set(this.guid,this),this}async go(e,t=!0){const{camera:i}=e??this.world;if(!i.hasCameraControls())throw new Error("Viewpoint: the world's camera need controls to set the viewpoint.");i instanceof vu&&i.projection.set(this.projection);const s=new x(this.camera.position.x,this.camera.position.y,this.camera.position.z),n=new x(this.camera.direction.x,this.camera.direction.y,this.camera.direction.z);if(s.equals(new x)&&n.equals(new x))return;const r=this.position,o=this.direction;let a={x:r.x+o.x*80,y:r.y+o.y*80,z:r.z+o.z*80};const l=this.selection;if(Object.keys(l).length===0){const h=this._components.get(ut).get(this.world).castRayFromVector(r,this.direction);h&&(a=h.point)}else{const h=this._components.get(On);h.reset(),h.addFragmentIdMap(l),a=h.getSphere().center,h.reset()}await i.controls.setLookAt(r.x,r.y,r.z,a.x,a.y,a.z,t)}updateCamera(e){const{camera:t,renderer:i}=e??this.world;if(!i)throw new Error("Viewpoint: the world needs to have a renderer!");if(!t.hasCameraControls())throw new Error("Viewpoint: world's camera need camera controls!");const s=new x;t.controls.getPosition(s);const n=t.three,r=new x(0,0,-1).applyEuler(n.rotation),{width:o,height:a}=i.getSize();let l=o/a;Number.isNaN(l)&&(l=1);const h=this._components.get(ue);s.applyMatrix4(h.baseCoordinationMatrix.clone().invert());const d={aspectRatio:l,position:{x:s.x,y:s.y,z:s.z},direction:{x:r.x,y:r.y,z:r.z}};n instanceof Ma?this.camera={...d,fov:n.fov}:n instanceof ii&&(this.camera={...d,viewToWorldScale:n.top-n.bottom}),this._components.get(Bt).list.set(this.guid,this)}applyVisibility(){const e=this._components.get(Vf);e.set(this.defaultVisibility),e.set(!this.defaultVisibility,this.exception),e.set(!0,this.selection)}applyColors(){const e=this._components.get(Bt),t=this._components.get(ue),i=this._components.get(xr);for(const[s,n]of this.componentColors){const r=t.guidToFragmentIdMap(n);i.setColor(r,s,e.config.overwriteColors)}}resetColors(){const e=this._components.get(ue),t=this._components.get(xr);for(const[i,s]of this.componentColors){const n=e.guidToFragmentIdMap(s);t.resetColor(n)}}async createComponentTags(e){var t,i;const s=this._components.get(ue),n=this._components.get(je);let r="";if(n.config.includeSelectionTag){const o=e==="selection"?this._selectionModelIdMap:this._exceptionModelIdMap;for(const a in o){const l=s.groups.get(a);if(!l)continue;const h=o[a];for(const d of h){const u=await l.getProperties(d);if(!u)continue;const f=(t=u.GlobalId)==null?void 0:t.value;if(!f)continue;const m=(i=u.Tag)==null?void 0:i.value;let p=null;m&&(p=`AuthoringToolId="${m}"`),r+=` `}}}else r=[...this.selectionComponents].map(o=>``).join(` `);return r}createColorTags(){let e="";for(const[t,i]of this.componentColors.entries()){const s=`#${t.getHexString()}`,n=i.map(r=>` `).join(` @@ -224,35 +224,35 @@ ${e} ${p} ${d} - `}}class Gf extends Zi{constructor(){super(...arguments),T(this,"_config",{overwriteColors:{value:!1,type:"Boolean"}})}get overwriteColors(){return this._config.overwriteColors.value}set overwriteColors(e){this._config.overwriteColors.value=e}}const Hl=class Dr extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new gt),T(this,"isSetup",!1),T(this,"onSetup",new Y),T(this,"config",new Gf(this,this.components,"Viewpoints",Dr.uuid)),T(this,"onDisposed",new Y),e.add(Dr.uuid,this)}create(e,t){const i=new Gl(this.components,e,{data:t});return t||this.list.set(i.guid,i),i}setup(){}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}};T(Hl,"uuid","ee867824-a796-408d-8aa0-4e5962a83c66");let Bt=Hl;class Hf extends Zi{constructor(){super(...arguments),T(this,"_config",{visible:{value:!0,type:"Boolean"},lockRotation:{value:!0,type:"Boolean"},zoom:{type:"Number",interpolable:!0,value:.05,min:.001,max:5},frontOffset:{type:"Number",interpolable:!0,value:0,min:0,max:100},sizeX:{type:"Number",interpolable:!0,value:320,min:20,max:5e3},sizeY:{type:"Number",interpolable:!0,value:160,min:20,max:5e3},backgroundColor:{value:new _e,type:"Color"}})}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e;const t=this._component.renderer.domElement.style;t.display=e?"block":"none"}get lockRotation(){return this._config.lockRotation.value}set lockRotation(e){this._config.lockRotation.value=e,this._component.lockRotation=e}get zoom(){return this._config.zoom.value}set zoom(e){this._config.zoom.value=e,this._component.zoom=e}get frontOffset(){return this._config.frontOffset.value}set frontOffset(e){this._config.frontOffset.value=e,this._component.frontOffset=e}get sizeX(){return this._config.sizeX.value}set sizeX(e){this._config.sizeX.value=e;const{sizeX:t,sizeY:i}=this._config,s=new Se(t.value,i.value);this._component.resize(s)}get sizeY(){return this._config.sizeY.value}set sizeY(e){this._config.sizeY.value=e;const{sizeX:t,sizeY:i}=this._config,s=new Se(t.value,i.value);this._component.resize(s)}get backgroundColor(){return this._config.backgroundColor.value}set backgroundColor(e){this._config.backgroundColor.value=e,this._component.backgroundColor=e}}class Wf{constructor(e,t){if(T(this,"onDisposed",new Y),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onResize",new Y),T(this,"onSetup",new Y),T(this,"frontOffset",0),T(this,"overrideMaterial",new Ba),T(this,"backgroundColor",new _e(395274)),T(this,"renderer"),T(this,"enabled",!0),T(this,"world"),T(this,"config"),T(this,"isSetup",!1),T(this,"_defaultConfig",{visible:!0,lockRotation:!1,zoom:.05,frontOffset:0,sizeX:320,sizeY:160,backgroundColor:new _e(395274)}),T(this,"_lockRotation",!0),T(this,"_size",new Se(320,160)),T(this,"_camera"),T(this,"_plane"),T(this,"_tempVector1",new P),T(this,"_tempVector2",new P),T(this,"_tempTarget",new P),T(this,"down",new P(0,-1,0)),T(this,"updatePlanes",()=>{if(!this.world.renderer)throw new Error("The given world must have a renderer!");const n=[],r=this.world.renderer.three;for(const o of r.clippingPlanes)n.push(o);n.push(this._plane),this.renderer.clippingPlanes=n}),this.world=e,!this.world.renderer)throw new Error("The given world must have a renderer!");this.renderer=new Rn,this.renderer.setSize(this._size.x,this._size.y);const i=1,s=this._size.x/this._size.y;this._camera=new ii(i*s/-2,i*s/2,i/2,i/-2),this.world.renderer.onClippingPlanesUpdated.add(this.updatePlanes),this._camera.position.set(0,200,0),this._camera.zoom=.1,this._camera.rotation.x=-Math.PI/2,this._plane=new ti(this.down,200),this.updatePlanes(),this.config=new Hf(this,t,"MiniMap")}get lockRotation(){return this._lockRotation}set lockRotation(e){this._lockRotation=e,e&&(this._camera.rotation.z=0)}get zoom(){return this._camera.zoom}set zoom(e){this._camera.zoom=e,this._camera.updateProjectionMatrix()}dispose(){this.enabled=!1,this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.onResize.reset(),this.overrideMaterial.dispose(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get(){return this._camera}update(){if(!this.enabled)return;this.onBeforeUpdate.trigger();const e=this.world.scene.three,t=this.world.camera;if(!t.hasCameraControls())throw new Error("The given world must use camera controls!");if(!(e instanceof Ci))throw new Error("The given world must have a THREE.Scene as a root!");const i=t.controls;if(i.getPosition(this._tempVector1),this._camera.position.x=this._tempVector1.x,this._camera.position.z=this._tempVector1.z,this.frontOffset!==0&&(i.getTarget(this._tempVector2),this._tempVector2.sub(this._tempVector1),this._tempVector2.normalize().multiplyScalar(this.frontOffset),this._camera.position.x+=this._tempVector2.x,this._camera.position.z+=this._tempVector2.z),!this._lockRotation){i.getTarget(this._tempTarget);const n=Math.atan2(this._tempTarget.x-this._tempVector1.x,this._tempTarget.z-this._tempVector1.z);this._camera.rotation.z=n+Math.PI}this._plane.set(this.down,this._tempVector1.y);const s=e.background;e.background=this.backgroundColor,this.renderer.render(e,this._camera),e.background=s,this.onAfterUpdate.trigger()}getSize(){return this._size}resize(e=this._size){this._size.copy(e),this.renderer.setSize(e.x,e.y);const t=e.x/e.y,i=1;this._camera.left=i*t/-2,this._camera.right=i*t/2,this._camera.top=i/2,this._camera.bottom=-i/2,this._camera.updateProjectionMatrix(),this.onResize.trigger(e)}setup(e){const t={...this._defaultConfig,...e};this.config.visible=!0,this.config.lockRotation=t.lockRotation,this.config.zoom=t.zoom,this.config.frontOffset=t.frontOffset,this.config.sizeX=t.sizeX,this.config.sizeY=t.sizeY,this.config.backgroundColor=t.backgroundColor,this.isSetup=!0,this.onSetup.trigger()}}const Xf=class Wl extends de{constructor(e){super(e),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onDisposed",new Y),T(this,"onSetup",new Y),T(this,"enabled",!0),T(this,"list",new Map),this.components.add(Wl.uuid,this)}create(e){if(this.list.has(e.uuid))throw new Error("This world already has a minimap!");const t=new Wf(e,this.components);return this.list.set(e.uuid,t),t}delete(e){const t=this.list.get(e);t&&t.dispose(),this.list.delete(e)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}update(){for(const[e,t]of this.list)t.update()}};T(Xf,"uuid","39ad6aad-84c8-4adf-a1e0-7f25313a9e7f");const Xl=class jl extends de{constructor(e){super(e),T(this,"enabled",!0),e.add(jl.uuid,this)}static distanceFromPointToLine(e,t,i,s=!1){const n=new tt,r=new P;return n.set(t,i),n.closestPointToPoint(e,s,r),r.distanceTo(e)}getFace(e,t,i){if(!e.geometry.index)throw new Error("Geometry must be indexed!");const s=new Map,n=e.geometry.index.array,{plane:r}=this.getFaceData(t,i,e),o=[];for(let d=0;dC.id);if(!f.size){const C=a++;for(const{id:w}of u)l.set(w,C);h.set(C,{edges:new Set(m),indices:new Set([d])});continue}let p=null;const I=new Set,E=new Set(m);for(const[C,w]of f){p===null?p=w:w!==p&&I.add(w),l.delete(C);const{edges:O}=h.get(w);O.delete(C),E.delete(C)}if(p===null)throw new Error("Error computing face!");const g=h.get(p),{indices:v}=g;v.add(d);for(const C of E){l.set(C,p);const{edges:w}=g;w.add(C)}for(const C of I){const w=h.get(C),{edges:O,indices:y}=w,L=h.get(p),{edges:N,indices:x}=L;for(const _ of O)N.add(_),l.set(_,p);for(const _ of y)x.add(_);h.delete(C)}}for(const[d,{indices:u,edges:f}]of h)if(u.has(t)){const m=[];for(const p of f){const I=s.get(p);m.push(I)}return{edges:m,indices:u}}return null}getVerticesAndNormal(e,t,i){if(!e.geometry.index)throw new Error("Geometry must be indexed!");const s=e.geometry.index.array,n=e.geometry.attributes.position.array,r=e.geometry.attributes.normal.array,o=s[t*3]*3,a=s[t*3+1]*3,l=s[t*3+2]*3,h=new P(n[o],n[o+1],n[o+2]),d=new P(n[a],n[a+1],n[a+2]),u=new P(n[l],n[l+1],n[l+2]),f=new P(r[o],r[o+1],r[o+2]),m=new P(r[a],r[a+1],r[a+2]),p=new P(r[l],r[l+1],r[l+2]),I=(f.x+m.x+p.x)/3,E=(f.y+m.y+p.y)/3,g=(f.z+m.z+p.z)/3,v=new P(I,E,g);if(i!==void 0&&e instanceof It){const C=new ne;e.getMatrixAt(i,C);const w=new ne;w.extractRotation(C),v.applyMatrix4(w),h.applyMatrix4(C),d.applyMatrix4(C),u.applyMatrix4(C)}return{p1:h,p2:d,p3:u,faceNormal:v}}round(e){e.x=Math.trunc(e.x*1e3)/1e3,e.y=Math.trunc(e.y*1e3)/1e3,e.z=Math.trunc(e.z*1e3)/1e3}getVolumeFromFragments(e){const t=this.components.get(ue),i=new ne,s=[];for(const r in e){const o=t.list.get(r);if(!o)continue;const a=e[r];let l=0;for(const u of a){const f=o.getInstancesIDs(u);f&&(l+=f.size)}const h=new It(o.mesh.geometry,void 0,l);let d=0;for(const u of a){const f=o.getInstancesIDs(u);if(f)for(const m of f)o.mesh.getMatrixAt(m,i),h.setMatrixAt(d++,i)}s.push(h)}const n=this.getVolumeFromMeshes(s);for(const r of s)r.geometry=null,r.material=[],r.dispose();return n}getVolumeFromMeshes(e){let t=0;for(const i of e)t+=this.getVolumeOfMesh(i);return t}getFaceData(e,t,i){const s=this.getVerticesAndNormal(i,e,t),{p1:n,p2:r,p3:o,faceNormal:a}=s;this.round(n),this.round(r),this.round(o),this.round(a);const l=[{id:`${n.x}|${n.y}|${n.z}`,value:n},{id:`${r.x}|${r.y}|${r.z}`,value:r},{id:`${o.x}|${o.y}|${o.z}`,value:o}];l.sort((g,v)=>g.idv.id?1:0);const[{id:h,value:d},{id:u,value:f},{id:m,value:p}]=l,I=[{id:`${h}|${u}`,distance:d.distanceTo(f),points:[d,f]},{id:`${u}|${m}`,distance:f.distanceTo(p),points:[f,p]},{id:`${h}|${m}`,distance:d.distanceTo(p),points:[d,p]}],E=new ti;return E.setFromNormalAndCoplanarPoint(a,n),E.constant=Math.round(E.constant*10)/10,{plane:E,edges:I}}getVolumeOfMesh(e){let t=0;const i=new P,s=new P,n=new P,{index:r}=e.geometry,o=e.geometry.attributes.position.array;if(!r)return console.warn("Geometry must be indexed to compute its volume!"),0;const a=[];if(e instanceof It)for(let h=0;h{const r={parameter:s,currentValue:t,requiredValue:i.parameter,pass:!1};n&&this.addCheckResult(r,n);let o=!1;if(i.type==="simple"&&(o=t===i.parameter),i.type==="enumeration"&&(o=i.parameter.includes(t)),i.type==="pattern"&&(o=new RegExp(i.parameter).test(String(t))),i.type==="length"){const{min:a,length:l,max:h}=i.parameter;l!==void 0&&(o=String(t).length===l),a!==void 0&&(o=String(t).length>=a),h!==void 0&&(o=String(t).length<=h)}if(i.type==="bounds"&&typeof t=="number"){const{min:a,minInclusive:l,max:h,maxInclusive:d}=i.parameter;let u=!0,f=!0;a!==void 0&&(u=l?t<=a:t=h:t>h),o=u&&f}return this.cardinality==="prohibited"&&(o=!o),this.cardinality==="optional"&&(o=!0),r.pass=o,r.pass}),T(this,"testResult",[]),this.components=e}addCheckResult(e,t){const i=t.findIndex(({parameter:s})=>s===e.parameter);i!==-1?t[i]=e:t.push(e)}saveResult(e,t){const{GlobalId:i}=e;if(!i)return;const{value:s}=i,n={expressID:s,pass:t,checks:[],cardinality:this.cardinality};this.testResult.push(n)}}const kt=(c,e)=>{let t="";return e?(e.type==="simple"&&(t=`${e.parameter}`),e.type==="enumeration"&&(t=` + `}}class Xf extends Qi{constructor(){super(...arguments),T(this,"_config",{overwriteColors:{value:!1,type:"Boolean"}})}get overwriteColors(){return this._config.overwriteColors.value}set overwriteColors(e){this._config.overwriteColors.value=e}}const Wl=class Mr extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new gt),T(this,"isSetup",!1),T(this,"onSetup",new Y),T(this,"config",new Xf(this,this.components,"Viewpoints",Mr.uuid)),T(this,"onDisposed",new Y),e.add(Mr.uuid,this)}create(e,t){const i=new Hl(this.components,e,{data:t});return t||this.list.set(i.guid,i),i}setup(){}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}};T(Wl,"uuid","ee867824-a796-408d-8aa0-4e5962a83c66");let Bt=Wl;class Zf extends Qi{constructor(){super(...arguments),T(this,"_config",{visible:{value:!0,type:"Boolean"},lockRotation:{value:!0,type:"Boolean"},zoom:{type:"Number",interpolable:!0,value:.05,min:.001,max:5},frontOffset:{type:"Number",interpolable:!0,value:0,min:0,max:100},sizeX:{type:"Number",interpolable:!0,value:320,min:20,max:5e3},sizeY:{type:"Number",interpolable:!0,value:160,min:20,max:5e3},backgroundColor:{value:new _e,type:"Color"}})}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e;const t=this._component.renderer.domElement.style;t.display=e?"block":"none"}get lockRotation(){return this._config.lockRotation.value}set lockRotation(e){this._config.lockRotation.value=e,this._component.lockRotation=e}get zoom(){return this._config.zoom.value}set zoom(e){this._config.zoom.value=e,this._component.zoom=e}get frontOffset(){return this._config.frontOffset.value}set frontOffset(e){this._config.frontOffset.value=e,this._component.frontOffset=e}get sizeX(){return this._config.sizeX.value}set sizeX(e){this._config.sizeX.value=e;const{sizeX:t,sizeY:i}=this._config,s=new Se(t.value,i.value);this._component.resize(s)}get sizeY(){return this._config.sizeY.value}set sizeY(e){this._config.sizeY.value=e;const{sizeX:t,sizeY:i}=this._config,s=new Se(t.value,i.value);this._component.resize(s)}get backgroundColor(){return this._config.backgroundColor.value}set backgroundColor(e){this._config.backgroundColor.value=e,this._component.backgroundColor=e}}class jf{constructor(e,t){if(T(this,"onDisposed",new Y),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onResize",new Y),T(this,"onSetup",new Y),T(this,"frontOffset",0),T(this,"overrideMaterial",new za),T(this,"backgroundColor",new _e(395274)),T(this,"renderer"),T(this,"enabled",!0),T(this,"world"),T(this,"config"),T(this,"isSetup",!1),T(this,"_defaultConfig",{visible:!0,lockRotation:!1,zoom:.05,frontOffset:0,sizeX:320,sizeY:160,backgroundColor:new _e(395274)}),T(this,"_lockRotation",!0),T(this,"_size",new Se(320,160)),T(this,"_camera"),T(this,"_plane"),T(this,"_tempVector1",new x),T(this,"_tempVector2",new x),T(this,"_tempTarget",new x),T(this,"down",new x(0,-1,0)),T(this,"updatePlanes",()=>{if(!this.world.renderer)throw new Error("The given world must have a renderer!");const n=[],r=this.world.renderer.three;for(const o of r.clippingPlanes)n.push(o);n.push(this._plane),this.renderer.clippingPlanes=n}),this.world=e,!this.world.renderer)throw new Error("The given world must have a renderer!");this.renderer=new Sn,this.renderer.setSize(this._size.x,this._size.y);const i=1,s=this._size.x/this._size.y;this._camera=new ii(i*s/-2,i*s/2,i/2,i/-2),this.world.renderer.onClippingPlanesUpdated.add(this.updatePlanes),this._camera.position.set(0,200,0),this._camera.zoom=.1,this._camera.rotation.x=-Math.PI/2,this._plane=new ti(this.down,200),this.updatePlanes(),this.config=new Zf(this,t,"MiniMap")}get lockRotation(){return this._lockRotation}set lockRotation(e){this._lockRotation=e,e&&(this._camera.rotation.z=0)}get zoom(){return this._camera.zoom}set zoom(e){this._camera.zoom=e,this._camera.updateProjectionMatrix()}dispose(){this.enabled=!1,this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.onResize.reset(),this.overrideMaterial.dispose(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get(){return this._camera}update(){if(!this.enabled)return;this.onBeforeUpdate.trigger();const e=this.world.scene.three,t=this.world.camera;if(!t.hasCameraControls())throw new Error("The given world must use camera controls!");if(!(e instanceof Ci))throw new Error("The given world must have a THREE.Scene as a root!");const i=t.controls;if(i.getPosition(this._tempVector1),this._camera.position.x=this._tempVector1.x,this._camera.position.z=this._tempVector1.z,this.frontOffset!==0&&(i.getTarget(this._tempVector2),this._tempVector2.sub(this._tempVector1),this._tempVector2.normalize().multiplyScalar(this.frontOffset),this._camera.position.x+=this._tempVector2.x,this._camera.position.z+=this._tempVector2.z),!this._lockRotation){i.getTarget(this._tempTarget);const n=Math.atan2(this._tempTarget.x-this._tempVector1.x,this._tempTarget.z-this._tempVector1.z);this._camera.rotation.z=n+Math.PI}this._plane.set(this.down,this._tempVector1.y);const s=e.background;e.background=this.backgroundColor,this.renderer.render(e,this._camera),e.background=s,this.onAfterUpdate.trigger()}getSize(){return this._size}resize(e=this._size){this._size.copy(e),this.renderer.setSize(e.x,e.y);const t=e.x/e.y,i=1;this._camera.left=i*t/-2,this._camera.right=i*t/2,this._camera.top=i/2,this._camera.bottom=-i/2,this._camera.updateProjectionMatrix(),this.onResize.trigger(e)}setup(e){const t={...this._defaultConfig,...e};this.config.visible=!0,this.config.lockRotation=t.lockRotation,this.config.zoom=t.zoom,this.config.frontOffset=t.frontOffset,this.config.sizeX=t.sizeX,this.config.sizeY=t.sizeY,this.config.backgroundColor=t.backgroundColor,this.isSetup=!0,this.onSetup.trigger()}}const Qf=class Xl extends de{constructor(e){super(e),T(this,"onAfterUpdate",new Y),T(this,"onBeforeUpdate",new Y),T(this,"onDisposed",new Y),T(this,"onSetup",new Y),T(this,"enabled",!0),T(this,"list",new Map),this.components.add(Xl.uuid,this)}create(e){if(this.list.has(e.uuid))throw new Error("This world already has a minimap!");const t=new jf(e,this.components);return this.list.set(e.uuid,t),t}delete(e){const t=this.list.get(e);t&&t.dispose(),this.list.delete(e)}dispose(){for(const[e,t]of this.list)t.dispose();this.list.clear(),this.onDisposed.trigger()}update(){for(const[e,t]of this.list)t.update()}};T(Qf,"uuid","39ad6aad-84c8-4adf-a1e0-7f25313a9e7f");const Zl=class jl extends de{constructor(e){super(e),T(this,"enabled",!0),e.add(jl.uuid,this)}static distanceFromPointToLine(e,t,i,s=!1){const n=new tt,r=new x;return n.set(t,i),n.closestPointToPoint(e,s,r),r.distanceTo(e)}getFace(e,t,i){if(!e.geometry.index)throw new Error("Geometry must be indexed!");const s=new Map,n=e.geometry.index.array,{plane:r}=this.getFaceData(t,i,e),o=[];for(let d=0;dC.id);if(!f.size){const C=a++;for(const{id:v}of u)l.set(v,C);h.set(C,{edges:new Set(m),indices:new Set([d])});continue}let p=null;const E=new Set,I=new Set(m);for(const[C,v]of f){p===null?p=v:v!==p&&E.add(v),l.delete(C);const{edges:O}=h.get(v);O.delete(C),I.delete(C)}if(p===null)throw new Error("Error computing face!");const g=h.get(p),{indices:w}=g;w.add(d);for(const C of I){l.set(C,p);const{edges:v}=g;v.add(C)}for(const C of E){const v=h.get(C),{edges:O,indices:A}=v,b=h.get(p),{edges:N,indices:D}=b;for(const _ of O)N.add(_),l.set(_,p);for(const _ of A)D.add(_);h.delete(C)}}for(const[d,{indices:u,edges:f}]of h)if(u.has(t)){const m=[];for(const p of f){const E=s.get(p);m.push(E)}return{edges:m,indices:u}}return null}getVerticesAndNormal(e,t,i){if(!e.geometry.index)throw new Error("Geometry must be indexed!");const s=e.geometry.index.array,n=e.geometry.attributes.position.array,r=e.geometry.attributes.normal.array,o=s[t*3]*3,a=s[t*3+1]*3,l=s[t*3+2]*3,h=new x(n[o],n[o+1],n[o+2]),d=new x(n[a],n[a+1],n[a+2]),u=new x(n[l],n[l+1],n[l+2]),f=new x(r[o],r[o+1],r[o+2]),m=new x(r[a],r[a+1],r[a+2]),p=new x(r[l],r[l+1],r[l+2]),E=(f.x+m.x+p.x)/3,I=(f.y+m.y+p.y)/3,g=(f.z+m.z+p.z)/3,w=new x(E,I,g);if(i!==void 0&&e instanceof It){const C=new ne;e.getMatrixAt(i,C);const v=new ne;v.extractRotation(C),w.applyMatrix4(v),h.applyMatrix4(C),d.applyMatrix4(C),u.applyMatrix4(C)}return{p1:h,p2:d,p3:u,faceNormal:w}}round(e){e.x=Math.trunc(e.x*1e3)/1e3,e.y=Math.trunc(e.y*1e3)/1e3,e.z=Math.trunc(e.z*1e3)/1e3}getVolumeFromFragments(e){const t=this.components.get(ue),i=new ne,s=[];for(const r in e){const o=t.list.get(r);if(!o)continue;const a=e[r];let l=0;for(const u of a){const f=o.getInstancesIDs(u);f&&(l+=f.size)}const h=new It(o.mesh.geometry,void 0,l);let d=0;for(const u of a){const f=o.getInstancesIDs(u);if(f)for(const m of f)o.mesh.getMatrixAt(m,i),h.setMatrixAt(d++,i)}s.push(h)}const n=this.getVolumeFromMeshes(s);for(const r of s)r.geometry=null,r.material=[],r.dispose();return n}getVolumeFromMeshes(e){let t=0;for(const i of e)t+=this.getVolumeOfMesh(i);return t}getFaceData(e,t,i){const s=this.getVerticesAndNormal(i,e,t),{p1:n,p2:r,p3:o,faceNormal:a}=s;this.round(n),this.round(r),this.round(o),this.round(a);const l=[{id:`${n.x}|${n.y}|${n.z}`,value:n},{id:`${r.x}|${r.y}|${r.z}`,value:r},{id:`${o.x}|${o.y}|${o.z}`,value:o}];l.sort((g,w)=>g.idw.id?1:0);const[{id:h,value:d},{id:u,value:f},{id:m,value:p}]=l,E=[{id:`${h}|${u}`,distance:d.distanceTo(f),points:[d,f]},{id:`${u}|${m}`,distance:f.distanceTo(p),points:[f,p]},{id:`${h}|${m}`,distance:d.distanceTo(p),points:[d,p]}],I=new ti;return I.setFromNormalAndCoplanarPoint(a,n),I.constant=Math.round(I.constant*10)/10,{plane:I,edges:E}}getVolumeOfMesh(e){let t=0;const i=new x,s=new x,n=new x,{index:r}=e.geometry,o=e.geometry.attributes.position.array;if(!r)return console.warn("Geometry must be indexed to compute its volume!"),0;const a=[];if(e instanceof It)for(let h=0;h{const r={parameter:s,currentValue:t,requiredValue:i.parameter,pass:!1};n&&this.addCheckResult(r,n);let o=!1;if(i.type==="simple"&&(o=t===i.parameter),i.type==="enumeration"&&(o=i.parameter.includes(t)),i.type==="pattern"&&(o=new RegExp(i.parameter).test(String(t))),i.type==="length"){const{min:a,length:l,max:h}=i.parameter;l!==void 0&&(o=String(t).length===l),a!==void 0&&(o=String(t).length>=a),h!==void 0&&(o=String(t).length<=h)}if(i.type==="bounds"&&typeof t=="number"){const{min:a,minInclusive:l,max:h,maxInclusive:d}=i.parameter;let u=!0,f=!0;a!==void 0&&(u=l?t<=a:t=h:t>h),o=u&&f}return this.cardinality==="prohibited"&&(o=!o),this.cardinality==="optional"&&(o=!0),r.pass=o,r.pass}),T(this,"testResult",[]),this.components=e}addCheckResult(e,t){const i=t.findIndex(({parameter:s})=>s===e.parameter);i!==-1?t[i]=e:t.push(e)}saveResult(e,t){const{GlobalId:i}=e;if(!i)return;const{value:s}=i,n={expressID:s,pass:t,checks:[],cardinality:this.cardinality};this.testResult.push(n)}}const Vt=(c,e)=>{let t="";return e?(e.type==="simple"&&(t=`${e.parameter}`),e.type==="enumeration"&&(t=` ${e.parameter.map(i=>``).join(`\r `)} `),e.type==="pattern"&&(t=` `),` ${t} - `):t};class jf extends Vn{constructor(e,t){super(e),T(this,"facetType","Attribute"),T(this,"name"),T(this,"value"),this.name=t}serialize(e){const t=kt("Name",this.name),i=kt("Value",this.value);let s="";return e==="requirement"&&(s+=`cardinality="${this.cardinality}"`,s+=this.instructions?`instructions="${this.instructions}"`:""),` + `):t};class Kf extends Vn{constructor(e,t){super(e),T(this,"facetType","Attribute"),T(this,"name"),T(this,"value"),this.name=t}serialize(e){const t=Vt("Name",this.name),i=Vt("Value",this.value);let s="";return e==="requirement"&&(s+=`cardinality="${this.cardinality}"`,s+=this.instructions?`instructions="${this.instructions}"`:""),` ${t} ${i} -`}async getEntities(){return[]}async test(e){var t;this.testResult=[];for(const s in e){const n=Number(s),r=e[n],o=[],a={guid:(t=r.GlobalId)==null?void 0:t.value,expressID:n,pass:!1,checks:o,cardinality:this.cardinality};this.testResult.push(a);const l=Object.keys(r).filter(d=>{const u=this.evalRequirement(d,this.name,"Name"),f=r[d];return u&&f===null?this.cardinality==="optional"||this.cardinality==="prohibited":u&&(f==null?void 0:f.type)===3&&f.value===2||u&&Array.isArray(f)&&f.length===0||u&&(f==null?void 0:f.type)===1&&f.value.trim()===""?!1:u}),h=l.length>0;if(o.push({parameter:"Name",currentValue:h?l[0]:null,requiredValue:this.name.parameter,pass:this.cardinality==="prohibited"?!h:h}),this.value)if(l[0]){const d=r[l[0]];(d==null?void 0:d.type)===5?o.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"}):this.evalRequirement(d?d.value:null,this.value,"Value",o)}else o.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"});a.pass=o.every(({pass:d})=>d)}const i=[...this.testResult];return this.testResult=[],i}}class Zf extends Vn{constructor(e,t){super(e),T(this,"facetType","Classification"),T(this,"system"),T(this,"value"),T(this,"uri"),this.system=t}serialize(e){const t=kt("System",this.system),i=kt("Value",this.value);let s="";return e==="requirement"&&(s+=`cardinality="${this.cardinality}"`,s+=this.uri?`uri=${this.uri}`:"",s+=this.instructions?`instructions="${this.instructions}"`:""),` +`}async getEntities(){return[]}async test(e){var t;this.testResult=[];for(const s in e){const n=Number(s),r=e[n],o=[],a={guid:(t=r.GlobalId)==null?void 0:t.value,expressID:n,pass:!1,checks:o,cardinality:this.cardinality};this.testResult.push(a);const l=Object.keys(r).filter(d=>{const u=this.evalRequirement(d,this.name,"Name"),f=r[d];return u&&f===null?this.cardinality==="optional"||this.cardinality==="prohibited":u&&(f==null?void 0:f.type)===3&&f.value===2||u&&Array.isArray(f)&&f.length===0||u&&(f==null?void 0:f.type)===1&&f.value.trim()===""?!1:u}),h=l.length>0;if(o.push({parameter:"Name",currentValue:h?l[0]:null,requiredValue:this.name.parameter,pass:this.cardinality==="prohibited"?!h:h}),this.value)if(l[0]){const d=r[l[0]];(d==null?void 0:d.type)===5?o.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"}):this.evalRequirement(d?d.value:null,this.value,"Value",o)}else o.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"});a.pass=o.every(({pass:d})=>d)}const i=[...this.testResult];return this.testResult=[],i}}class qf extends Vn{constructor(e,t){super(e),T(this,"facetType","Classification"),T(this,"system"),T(this,"value"),T(this,"uri"),this.system=t}serialize(e){const t=Vt("System",this.system),i=Vt("Value",this.value);let s="";return e==="requirement"&&(s+=`cardinality="${this.cardinality}"`,s+=this.uri?`uri=${this.uri}`:"",s+=this.instructions?`instructions="${this.instructions}"`:""),` ${t} ${i} -`}async getEntities(e,t={}){var i;const s=[],n=await e.getAllPropertiesOfType(Lt),r=await e.getAllPropertiesOfType(Ri),o={...n,...r},a=[];for(const h in o){const d=Number(h),u=await e.getProperties(d);if(!u)continue;const f=(i=u.ReferencedSource)==null?void 0:i.value;if(!f)continue;const m=await e.getProperties(f);!m||!this.evalSystem(m)||!this.evalValue(u)||!this.evalURI(u)||a.push(d)}const l=this.components.get(it);for(const h of a){const d=l.getEntitiesWithRelation(e,"HasAssociations",h);for(const u of d){if(u in t)continue;const f=await e.getProperties(u);f&&(t[u]=f,s.push(u))}}return s}async test(e,t){var i;this.testResult=[];for(const n in e){const r=Number(n),o=e[r],a=[],l={guid:(i=o.GlobalId)==null?void 0:i.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(l);let h=!0;const d=await this.getSystems(t,r),u=d.map(f=>this.getSystemName(f)).filter(f=>f);for(const f of d){if(!this.evalSystem(f,a))continue;if(h=!1,!(this.value&&this.system))break;if(f.type!==Lt)continue;const m=!this.value||this.evalValue(f,a),p=!this.uri||this.evalURI(f,a);if(m&&p)break}h&&this.addCheckResult({parameter:"System",currentValue:u,requiredValue:this.system,pass:this.cardinality==="optional"},a),l.pass=a.every(({pass:f})=>f)}const s=[...this.testResult];return this.testResult=[],s}async processReferencedSource(e,t){var i;const s=(i=t.ReferencedSource)==null?void 0:i.value;if(!s)return null;const n=await e.getProperties(s);return n?(n.type===Lt&&(n.ReferencedSource=await this.processReferencedSource(e,n)),n):null}async getSystems(e,t){var i;const s=[],n=this.components.get(it),r=n.getEntityRelations(e,t,"HasAssociations");if(r)for(const d of r){const u=await e.getProperties(d);u&&(u.type===Ri&&s.push(u),u.type===Lt&&(u.ReferencedSource=await this.processReferencedSource(e,u),u.ReferencedSource&&s.push(u)))}const o=s.map(d=>{var u,f,m;return d.type===Ri?(u=d.Name)==null?void 0:u.value:d.type===Lt?(m=(f=d.ReferencedSource)==null?void 0:f.Name)==null?void 0:m.value:null}).filter(d=>d),a=n.getEntityRelations(e,t,"IsTypedBy");if(!(a&&a[0]))return s;const l=a[0],h=n.getEntityRelations(e,l,"HasAssociations");if(h)for(const d of h){const u=await e.getProperties(d);if(u){if(u.type===Ri){if(o.includes((i=u.Name)==null?void 0:i.value))continue;s.push(u)}u.type===Lt&&(u.ReferencedSource=await this.processReferencedSource(e,u),u.ReferencedSource&&s.push(u))}}return s}getSystemName(e){var t,i,s,n;if(e.type===Ri)return(t=e.Name)==null?void 0:t.value;if(e.type===Lt){if(((i=e.ReferencedSource)==null?void 0:i.type)===Lt)return this.getSystemName(e.ReferencedSource);if(((s=e.ReferencedSource)==null?void 0:s.type)===Ri)return(n=e.ReferencedSource.Name)==null?void 0:n.value}return null}getAllReferenceIdentifications(e){if(e.type!==Lt)return null;const t=[];if(e.Identification&&t.push(e.Identification.value),e.ReferencedSource){const i=this.getAllReferenceIdentifications(e.ReferencedSource);i&&t.push(...i)}return t}evalSystem(e,t){const i=this.getSystemName(e);return this.evalRequirement(i,this.system,"System",t)}evalValue(e,t){if(!this.value)return!0;const i=this.getAllReferenceIdentifications(e);if(!i)return!1;const s=i.find(n=>this.value?this.evalRequirement(n,this.value,"Value"):!1);return t&&this.addCheckResult({parameter:"Value",currentValue:s??null,requiredValue:this.value,pass:!!s},t),!!s}evalURI(e,t){var i;return this.uri?this.evalRequirement((i=e.Location)==null?void 0:i.value,{type:"simple",parameter:this.uri},"URI",t):!0}}class Qf extends Vn{constructor(e,t){super(e),T(this,"facetType","Entity"),T(this,"name"),T(this,"predefinedType"),this.name=t}serialize(e){const t=kt("Name",this.name),i=kt("Name",this.predefinedType);let s="";return e==="requirement"&&(s+=`cardinality="${this.cardinality}"`,s+=this.instructions?`instructions="${this.instructions}"`:""),` +`}async getEntities(e,t={}){var i;const s=[],n=await e.getAllPropertiesOfType(bt),r=await e.getAllPropertiesOfType(Ri),o={...n,...r},a=[];for(const h in o){const d=Number(h),u=await e.getProperties(d);if(!u)continue;const f=(i=u.ReferencedSource)==null?void 0:i.value;if(!f)continue;const m=await e.getProperties(f);!m||!this.evalSystem(m)||!this.evalValue(u)||!this.evalURI(u)||a.push(d)}const l=this.components.get(it);for(const h of a){const d=l.getEntitiesWithRelation(e,"HasAssociations",h);for(const u of d){if(u in t)continue;const f=await e.getProperties(u);f&&(t[u]=f,s.push(u))}}return s}async test(e,t){var i;this.testResult=[];for(const n in e){const r=Number(n),o=e[r],a=[],l={guid:(i=o.GlobalId)==null?void 0:i.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(l);let h=!0;const d=await this.getSystems(t,r),u=d.map(f=>this.getSystemName(f)).filter(f=>f);for(const f of d){if(!this.evalSystem(f,a))continue;if(h=!1,!(this.value&&this.system))break;if(f.type!==bt)continue;const m=!this.value||this.evalValue(f,a),p=!this.uri||this.evalURI(f,a);if(m&&p)break}h&&this.addCheckResult({parameter:"System",currentValue:u,requiredValue:this.system,pass:this.cardinality==="optional"},a),l.pass=a.every(({pass:f})=>f)}const s=[...this.testResult];return this.testResult=[],s}async processReferencedSource(e,t){var i;const s=(i=t.ReferencedSource)==null?void 0:i.value;if(!s)return null;const n=await e.getProperties(s);return n?(n.type===bt&&(n.ReferencedSource=await this.processReferencedSource(e,n)),n):null}async getSystems(e,t){var i;const s=[],n=this.components.get(it),r=n.getEntityRelations(e,t,"HasAssociations");if(r)for(const d of r){const u=await e.getProperties(d);u&&(u.type===Ri&&s.push(u),u.type===bt&&(u.ReferencedSource=await this.processReferencedSource(e,u),u.ReferencedSource&&s.push(u)))}const o=s.map(d=>{var u,f,m;return d.type===Ri?(u=d.Name)==null?void 0:u.value:d.type===bt?(m=(f=d.ReferencedSource)==null?void 0:f.Name)==null?void 0:m.value:null}).filter(d=>d),a=n.getEntityRelations(e,t,"IsTypedBy");if(!(a&&a[0]))return s;const l=a[0],h=n.getEntityRelations(e,l,"HasAssociations");if(h)for(const d of h){const u=await e.getProperties(d);if(u){if(u.type===Ri){if(o.includes((i=u.Name)==null?void 0:i.value))continue;s.push(u)}u.type===bt&&(u.ReferencedSource=await this.processReferencedSource(e,u),u.ReferencedSource&&s.push(u))}}return s}getSystemName(e){var t,i,s,n;if(e.type===Ri)return(t=e.Name)==null?void 0:t.value;if(e.type===bt){if(((i=e.ReferencedSource)==null?void 0:i.type)===bt)return this.getSystemName(e.ReferencedSource);if(((s=e.ReferencedSource)==null?void 0:s.type)===Ri)return(n=e.ReferencedSource.Name)==null?void 0:n.value}return null}getAllReferenceIdentifications(e){if(e.type!==bt)return null;const t=[];if(e.Identification&&t.push(e.Identification.value),e.ReferencedSource){const i=this.getAllReferenceIdentifications(e.ReferencedSource);i&&t.push(...i)}return t}evalSystem(e,t){const i=this.getSystemName(e);return this.evalRequirement(i,this.system,"System",t)}evalValue(e,t){if(!this.value)return!0;const i=this.getAllReferenceIdentifications(e);if(!i)return!1;const s=i.find(n=>this.value?this.evalRequirement(n,this.value,"Value"):!1);return t&&this.addCheckResult({parameter:"Value",currentValue:s??null,requiredValue:this.value,pass:!!s},t),!!s}evalURI(e,t){var i;return this.uri?this.evalRequirement((i=e.Location)==null?void 0:i.value,{type:"simple",parameter:this.uri},"URI",t):!0}}class Jf extends Vn{constructor(e,t){super(e),T(this,"facetType","Entity"),T(this,"name"),T(this,"predefinedType"),this.name=t}serialize(e){const t=Vt("Name",this.name),i=Vt("Name",this.predefinedType);let s="";return e==="requirement"&&(s+=`cardinality="${this.cardinality}"`,s+=this.instructions?`instructions="${this.instructions}"`:""),` ${t} ${i} -`}async getEntities(e,t={}){const i=Object.entries(yn),s=[];for(const[o]of i)await this.evalName({type:o})&&s.push(Number(o));let n={};for(const o of s){const a=await e.getAllPropertiesOfType(o);a&&(n={...n,...a})}if(!this.predefinedType){for(const o in n)o in t||(t[o]=n[o]);return Object.keys(n).map(Number)}const r=[];for(const o in n){const a=Number(o);if(a in t)continue;const l=n[a];await this.evalPredefinedType(e,l)&&(t[a]=l,r.push(a))}return r}async test(e,t){var i;this.testResult=[];for(const s in e){const n=Number(s),r=e[n],o=[],a={guid:(i=r.GlobalId)==null?void 0:i.value,expressID:n,pass:!1,checks:o,cardinality:this.cardinality};this.testResult.push(a),await this.evalName(r,o),await this.evalPredefinedType(t,r,o),a.pass=o.every(({pass:l})=>l)}return this.testResult}async evalName(e,t){const i=yn[e.type];return this.evalRequirement(i,this.name,"Name",t)}async evalPredefinedType(e,t,i){var s,n,r,o;if(!this.predefinedType)return null;const a=this.components.get(it),l=typeof this.predefinedType.parameter=="string"&&this.predefinedType.parameter==="USERDEFINED";let h=(s=t.PredefinedType)==null?void 0:s.value;if(h==="USERDEFINED"&&!l){const d=Object.keys(t).find(u=>/^((?!Predefined).)*Type$/.test(u));h=d?(n=t[d])==null?void 0:n.value:"USERDEFINED"}if(!h){const d=a.getEntityRelations(e,t.expressID,"IsTypedBy");if(d&&d[0]){const u=await e.getProperties(d[0]);if(u&&(h=(r=u.PredefinedType)==null?void 0:r.value,h==="USERDEFINED"&&!l)){const f=Object.keys(u).find(m=>/^((?!Predefined).)*Type$/.test(m));h=f?(o=u[f])==null?void 0:o.value:"USERDEFINED"}}}return this.evalRequirement(h,this.predefinedType,"PredefinedType",i)}}class Kf extends Vn{constructor(e,t,i){super(e),T(this,"facetType","Property"),T(this,"propertySet"),T(this,"baseName"),T(this,"value"),T(this,"dataType"),T(this,"uri"),T(this,"_unsupportedTypes",[sh,nh]),this.propertySet=t,this.baseName=i}serialize(e){const t=kt("PropertySet",this.propertySet),i=kt("BaseName",this.baseName),s=kt("Value",this.value),n=this.dataType?`dataType=${this.dataType}`:"";let r="";return e==="requirement"&&(r+=`cardinality="${this.cardinality}"`,r+=this.uri?`uri=${this.uri}`:"",r+=this.instructions?`instructions="${this.instructions}"`:""),` +`}async getEntities(e,t={}){const i=Object.entries(An),s=[];for(const[o]of i)await this.evalName({type:o})&&s.push(Number(o));let n={};for(const o of s){const a=await e.getAllPropertiesOfType(o);a&&(n={...n,...a})}if(!this.predefinedType){for(const o in n)o in t||(t[o]=n[o]);return Object.keys(n).map(Number)}const r=[];for(const o in n){const a=Number(o);if(a in t)continue;const l=n[a];await this.evalPredefinedType(e,l)&&(t[a]=l,r.push(a))}return r}async test(e,t){var i;this.testResult=[];for(const s in e){const n=Number(s),r=e[n],o=[],a={guid:(i=r.GlobalId)==null?void 0:i.value,expressID:n,pass:!1,checks:o,cardinality:this.cardinality};this.testResult.push(a),await this.evalName(r,o),await this.evalPredefinedType(t,r,o),a.pass=o.every(({pass:l})=>l)}return this.testResult}async evalName(e,t){const i=An[e.type];return this.evalRequirement(i,this.name,"Name",t)}async evalPredefinedType(e,t,i){var s,n,r,o;if(!this.predefinedType)return null;const a=this.components.get(it),l=typeof this.predefinedType.parameter=="string"&&this.predefinedType.parameter==="USERDEFINED";let h=(s=t.PredefinedType)==null?void 0:s.value;if(h==="USERDEFINED"&&!l){const d=Object.keys(t).find(u=>/^((?!Predefined).)*Type$/.test(u));h=d?(n=t[d])==null?void 0:n.value:"USERDEFINED"}if(!h){const d=a.getEntityRelations(e,t.expressID,"IsTypedBy");if(d&&d[0]){const u=await e.getProperties(d[0]);if(u&&(h=(r=u.PredefinedType)==null?void 0:r.value,h==="USERDEFINED"&&!l)){const f=Object.keys(u).find(m=>/^((?!Predefined).)*Type$/.test(m));h=f?(o=u[f])==null?void 0:o.value:"USERDEFINED"}}}return this.evalRequirement(h,this.predefinedType,"PredefinedType",i)}}class $f extends Vn{constructor(e,t,i){super(e),T(this,"facetType","Property"),T(this,"propertySet"),T(this,"baseName"),T(this,"value"),T(this,"dataType"),T(this,"uri"),T(this,"_unsupportedTypes",[rh,oh]),this.propertySet=t,this.baseName=i}serialize(e){const t=Vt("PropertySet",this.propertySet),i=Vt("BaseName",this.baseName),s=Vt("Value",this.value),n=this.dataType?`dataType=${this.dataType}`:"";let r="";return e==="requirement"&&(r+=`cardinality="${this.cardinality}"`,r+=this.uri?`uri=${this.uri}`:"",r+=this.instructions?`instructions="${this.instructions}"`:""),` ${t} ${i} ${s} -`}async getEntities(e,t={}){var i,s;let n={};const r=await e.getAllPropertiesOfType(Vi);n={...n,...r};const o=await e.getAllPropertiesOfType(un);if(n={...n,...o},Object.keys(n).length===0)return[];const a=[];for(const h in n){const d=Number(h),u=await e.getProperties(d);if(!u||((i=u.Name)==null?void 0:i.value)!==this.propertySet.parameter)continue;let f;if(u.type===Vi&&(f="HasProperties"),u.type===un&&(f="Quantities"),!!f)for(const m of u[f]){const p=await e.getProperties(m.value);if(!(!p||((s=p.Name)==null?void 0:s.value)!==this.baseName.parameter)){if(this.value){const I=Object.keys(p).find(E=>E.endsWith("Value"));if(!I||p[I].value!==this.value.parameter)continue}a.push(d)}}}const l=this.components.get(it);for(const h of a){const d=l.getEntitiesWithRelation(e,"IsDefinedBy",h);for(const u of d){if(u in t)continue;const f=await e.getProperties(u);f&&(t[u]=f)}}return[]}async test(e,t){var i;this.testResult=[];for(const n in e){const r=Number(n),o=e[r],a=[],l={guid:(i=o.GlobalId)==null?void 0:i.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(l);const h=(await this.getPsets(t,r)).filter(d=>{var u;return this.evalRequirement(((u=d.Name)==null?void 0:u.value)??null,this.propertySet,"PropertySet")?(a.push({currentValue:d.Name.value,parameter:"PropertySet",pass:!0,requiredValue:this.propertySet.parameter}),!0):!1});if(h.length===0){a.push({currentValue:null,parameter:"PropertySet",pass:!1,requiredValue:this.propertySet.parameter});continue}for(const d of h){const u=this.getItemsAttrName(d.type);if(!u){a.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}const f=d[u].filter(m=>{var p;return this._unsupportedTypes.includes(m.type)||!this.evalRequirement(((p=m.Name)==null?void 0:p.value)??null,this.baseName,"BaseName")?!1:(a.push({currentValue:m.Name.value,parameter:"BaseName",pass:!0,requiredValue:this.baseName.parameter}),!0)});if(f.length===0){a.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}for(const m of f)this.evalValue(m,a),this.evalDataType(m,a),this.evalURI()}l.pass=a.every(({pass:d})=>d)}const s=[...this.testResult];return this.testResult=[],s}getItemsAttrName(e){let t;return e===Vi&&(t="HasProperties"),e===un&&(t="Quantities"),t}getValueKey(e){return Object.keys(e).find(t=>t.endsWith("Value")||t.endsWith("Values"))}async getPsetProps(e,t,i){const s=structuredClone(t),n=[],r=s[i];if(!r)return n;for(const{value:o}of r){const a=await e.getProperties(o);a&&n.push(a)}return s[i]=n,s}async getTypePsets(e,t){const i=[],s=this.components.get(it).getEntityRelations(e,t,"IsTypedBy");if(!(s&&s[0]))return i;const n=await e.getProperties(s[0]);if(!(n&&"HasPropertySets"in n&&Array.isArray(n.HasPropertySets)))return i;for(const{value:r}of n.HasPropertySets){const o=await e.getProperties(r);if(!(o&&"HasProperties"in o&&Array.isArray(o.HasProperties)))continue;const a=await this.getPsetProps(e,o,"HasProperties");i.push(a)}return i}async getPsets(e,t){const i=await this.getTypePsets(e,t),s=this.components.get(it).getEntityRelations(e,t,"IsDefinedBy");if(!s)return i;for(const n of s){const r=await e.getProperties(n);if(!r)continue;const o=this.getItemsAttrName(r.type);if(!o)continue;const a=await this.getPsetProps(e,r,o);i.push(a)}return i}evalValue(e,t){const i=this.getValueKey(e),s=e[i];if(this.value){if(!s)return t==null||t.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:this.value.parameter}),!1;const n=structuredClone(this.value);if(s.name==="IFCLABEL"&&n.type==="simple"&&(n.parameter=String(n.parameter)),(e.type===vo||e.type===wo)&&Array.isArray(s)){const r=s.map(a=>a.value),o=s.find(a=>n?this.evalRequirement(a.value,n,"Value"):!1);return t==null||t.push({currentValue:r,pass:!!o,parameter:"Value",requiredValue:n.parameter}),!!o}return this.evalRequirement(s.value,n,"Value",t)}return i?s.type===3&&s.value===2?(t==null||t.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:null}),!1):s.type===1&&s.value.trim()===""?(t==null||t.push({parameter:"Value",currentValue:"",pass:!1,requiredValue:null}),!1):!0:!0}evalDataType(e,t){if(!this.dataType)return!0;const i=this.getValueKey(e),s=e[i];if(!s)return t==null||t.push({parameter:"DataType",currentValue:null,pass:!1,requiredValue:this.dataType}),!1;if((e.type===vo||e.type===wo)&&Array.isArray(s)&&s[0]){const n=s[0].name;return this.evalRequirement(n,{type:"simple",parameter:this.dataType},"DataType",t)}return this.evalRequirement(s.name,{type:"simple",parameter:this.dataType},"DataType",t)}evalURI(){return!0}}class qf{constructor(e,t,i){T(this,"name"),T(this,"ifcVersion",new Set),T(this,"identifier",Gt.create()),T(this,"description"),T(this,"instructions"),T(this,"requirementsDescription"),T(this,"applicability",new Jt),T(this,"requirements",new Jt),T(this,"components"),this.components=e,this.name=t;for(const s of i)this.ifcVersion.add(s)}set(e){const t=e,i=this;for(const s in e){if(s==="identifier")continue;const n=t[s];s in this&&(i[s]=n)}return this.components.get(tp).list.set(this.identifier,this),this}async test(e){let t=[];if(this.requirements.size===0)return t;const i={};for(const s of this.applicability)await s.getEntities(e,i);return t=await[...this.requirements][0].test(i,e),t}serialize(){const e=`name="${this.name}"`,t=this.identifier?`identifier="${this.identifier}"`:"",i=this.description?`description="${this.description}"`:"",s=this.instructions?`instructions="${this.instructions}"`:"";return` +`}async getEntities(e,t={}){var i,s;let n={};const r=await e.getAllPropertiesOfType(Vi);n={...n,...r};const o=await e.getAllPropertiesOfType(fn);if(n={...n,...o},Object.keys(n).length===0)return[];const a=[];for(const h in n){const d=Number(h),u=await e.getProperties(d);if(!u||((i=u.Name)==null?void 0:i.value)!==this.propertySet.parameter)continue;let f;if(u.type===Vi&&(f="HasProperties"),u.type===fn&&(f="Quantities"),!!f)for(const m of u[f]){const p=await e.getProperties(m.value);if(!(!p||((s=p.Name)==null?void 0:s.value)!==this.baseName.parameter)){if(this.value){const E=Object.keys(p).find(I=>I.endsWith("Value"));if(!E||p[E].value!==this.value.parameter)continue}a.push(d)}}}const l=this.components.get(it);for(const h of a){const d=l.getEntitiesWithRelation(e,"IsDefinedBy",h);for(const u of d){if(u in t)continue;const f=await e.getProperties(u);f&&(t[u]=f)}}return[]}async test(e,t){var i;this.testResult=[];for(const n in e){const r=Number(n),o=e[r],a=[],l={guid:(i=o.GlobalId)==null?void 0:i.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(l);const h=(await this.getPsets(t,r)).filter(d=>{var u;return this.evalRequirement(((u=d.Name)==null?void 0:u.value)??null,this.propertySet,"PropertySet")?(a.push({currentValue:d.Name.value,parameter:"PropertySet",pass:!0,requiredValue:this.propertySet.parameter}),!0):!1});if(h.length===0){a.push({currentValue:null,parameter:"PropertySet",pass:!1,requiredValue:this.propertySet.parameter});continue}for(const d of h){const u=this.getItemsAttrName(d.type);if(!u){a.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}const f=d[u].filter(m=>{var p;return this._unsupportedTypes.includes(m.type)||!this.evalRequirement(((p=m.Name)==null?void 0:p.value)??null,this.baseName,"BaseName")?!1:(a.push({currentValue:m.Name.value,parameter:"BaseName",pass:!0,requiredValue:this.baseName.parameter}),!0)});if(f.length===0){a.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}for(const m of f)this.evalValue(m,a),this.evalDataType(m,a),this.evalURI()}l.pass=a.every(({pass:d})=>d)}const s=[...this.testResult];return this.testResult=[],s}getItemsAttrName(e){let t;return e===Vi&&(t="HasProperties"),e===fn&&(t="Quantities"),t}getValueKey(e){return Object.keys(e).find(t=>t.endsWith("Value")||t.endsWith("Values"))}async getPsetProps(e,t,i){const s=structuredClone(t),n=[],r=s[i];if(!r)return n;for(const{value:o}of r){const a=await e.getProperties(o);a&&n.push(a)}return s[i]=n,s}async getTypePsets(e,t){const i=[],s=this.components.get(it).getEntityRelations(e,t,"IsTypedBy");if(!(s&&s[0]))return i;const n=await e.getProperties(s[0]);if(!(n&&"HasPropertySets"in n&&Array.isArray(n.HasPropertySets)))return i;for(const{value:r}of n.HasPropertySets){const o=await e.getProperties(r);if(!(o&&"HasProperties"in o&&Array.isArray(o.HasProperties)))continue;const a=await this.getPsetProps(e,o,"HasProperties");i.push(a)}return i}async getPsets(e,t){const i=await this.getTypePsets(e,t),s=this.components.get(it).getEntityRelations(e,t,"IsDefinedBy");if(!s)return i;for(const n of s){const r=await e.getProperties(n);if(!r)continue;const o=this.getItemsAttrName(r.type);if(!o)continue;const a=await this.getPsetProps(e,r,o);i.push(a)}return i}evalValue(e,t){const i=this.getValueKey(e),s=e[i];if(this.value){if(!s)return t==null||t.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:this.value.parameter}),!1;const n=structuredClone(this.value);if(s.name==="IFCLABEL"&&n.type==="simple"&&(n.parameter=String(n.parameter)),(e.type===vo||e.type===yo)&&Array.isArray(s)){const r=s.map(a=>a.value),o=s.find(a=>n?this.evalRequirement(a.value,n,"Value"):!1);return t==null||t.push({currentValue:r,pass:!!o,parameter:"Value",requiredValue:n.parameter}),!!o}return this.evalRequirement(s.value,n,"Value",t)}return i?s.type===3&&s.value===2?(t==null||t.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:null}),!1):s.type===1&&s.value.trim()===""?(t==null||t.push({parameter:"Value",currentValue:"",pass:!1,requiredValue:null}),!1):!0:!0}evalDataType(e,t){if(!this.dataType)return!0;const i=this.getValueKey(e),s=e[i];if(!s)return t==null||t.push({parameter:"DataType",currentValue:null,pass:!1,requiredValue:this.dataType}),!1;if((e.type===vo||e.type===yo)&&Array.isArray(s)&&s[0]){const n=s[0].name;return this.evalRequirement(n,{type:"simple",parameter:this.dataType},"DataType",t)}return this.evalRequirement(s.name,{type:"simple",parameter:this.dataType},"DataType",t)}evalURI(){return!0}}class ep{constructor(e,t,i){T(this,"name"),T(this,"ifcVersion",new Set),T(this,"identifier",Ht.create()),T(this,"description"),T(this,"instructions"),T(this,"requirementsDescription"),T(this,"applicability",new Jt),T(this,"requirements",new Jt),T(this,"components"),this.components=e,this.name=t;for(const s of i)this.ifcVersion.add(s)}set(e){const t=e,i=this;for(const s in e){if(s==="identifier")continue;const n=t[s];s in this&&(i[s]=n)}return this.components.get(np).list.set(this.identifier,this),this}async test(e){let t=[];if(this.requirements.size===0)return t;const i={};for(const s of this.applicability)await s.getEntities(e,i);return t=await[...this.requirements][0].test(i,e),t}serialize(){const e=`name="${this.name}"`,t=this.identifier?`identifier="${this.identifier}"`:"",i=this.description?`description="${this.description}"`:"",s=this.instructions?`instructions="${this.instructions}"`:"";return` ${[...this.applicability].map(n=>n.serialize("applicability"))} ${[...this.requirements].map(n=>n.serialize("requirement"))} - `}}const Vt=c=>{if(!c)return;const e={};if("simpleValue"in c&&(e.type="simple",e.parameter=c.simpleValue),"restriction"in c){const t=c.restriction;if("pattern"in t&&(e.type="pattern",e.parameter=t.pattern.value),"enumeration"in t){e.type="enumeration";const i=t.enumeration.map(({value:s})=>s);e.parameter=i}}if(e.parameter!==void 0)return e},Ca=(c,e)=>{const t=[];for(const i of e){const s=i.name,n=Vt(s);if(!n)continue;const r=new Qf(c,n);i.cardinality&&(r.cardinality=i.cardinality),r.predefinedType=Vt(i.predefinedType),r.instructions=i.instructions,t.push(r)}return t},Jf=(c,e)=>{const t=[];for(const i of e){const s=i.name,n=Vt(s);if(!n)continue;const r=new jf(c,n);i.cardinality&&(r.cardinality=i.cardinality),r.value=Vt(i.value),r.instructions=i.instructions,t.push(r)}return t},$f=(c,e)=>{const t=[];for(const i of e){const s=i.system,n=Vt(s);if(!n)continue;const r=new Zf(c,n);i.cardinality&&(r.cardinality=i.cardinality);const o=Vt(i.value);(o==null?void 0:o.type)==="simple"&&(o.parameter=String(o.parameter)),(o==null?void 0:o.type)==="enumeration"&&Array.isArray(o.parameter)&&(o.parameter=o.parameter.map(String)),r.value=o,r.uri=i.uri,r.instructions=i.instructions,t.push(r)}return t},ep=(c,e)=>{const t=[];for(const i of e){const s=i.propertySet,n=i.baseName,r=Vt(s),o=Vt(n);if(!(o&&r))continue;const a=new Kf(c,r,o);i.cardinality&&(a.cardinality=i.cardinality);const l=Vt(i.value);(l==null?void 0:l.type)==="enumeration"&&Array.isArray(l.parameter)&&(l.parameter=l.parameter.map(String)),a.value=l,a.dataType=i.dataType,a.uri=i.uri,a.instructions=i.instructions,t.push(a)}return t},xr=class _r extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new gt),e.add(_r.uuid,this)}getFragmentIdMap(e,t){const i=t.filter(o=>o.pass).map(o=>o.expressID),s=e.getFragmentMap(i),n=t.filter(o=>!o.pass).map(o=>o.expressID),r=e.getFragmentMap(n);return{pass:s,fail:r}}create(e,t,i){const s=new qf(this.components,e,t);return i&&(s.identifier=i),this.list.set(s.identifier,s),s}load(e){const t=[],i=_r.xmlParser.parse(e).ids,{specifications:s}=i;if(s&&s.specification){const n=Array.isArray(s.specification)?s.specification:[s.specification];for(const r of n){const{name:o,ifcVersion:a,description:l,instructions:h,identifier:d}=r;if(!(o&&a))continue;const u=[],f=[],{applicability:m,requirements:p}=r;if(m){const{maxOccurs:E,...g}=m,v=Array.isArray(g)?g:[g];for(const C of v)for(const w in C){const O=Array.isArray(C[w])?C[w]:[C[w]];if(w==="entity"){const y=Ca(this.components,O);u.push(...y)}}}let I;if(p){const{maxOccurs:E,...g}=p;I=p.description;const v=Array.isArray(g)?g:[g];for(const C of v)for(const w in C){const O=Array.isArray(C[w])?C[w]:[C[w]];if(w==="entity"){const y=Ca(this.components,O);f.push(...y)}if(w==="attribute"){const y=Jf(this.components,O);f.push(...y)}if(w==="classification"){const y=$f(this.components,O);f.push(...y)}if(w==="property"){const y=ep(this.components,O);f.push(...y)}}}if(u.length>0&&f.length>0){const E=this.create(o,a.split(/\s+/),d);E.description=l,E.instructions=h,E.requirementsDescription=I,E.applicability.add(...u),E.requirements.add(...f),t.push(E)}}}return t}export(e,t=this.list.values()){const i=t??this.list;return` - + `}}const Yt=c=>{if(!c)return;const e={};if("simpleValue"in c&&(e.type="simple",e.parameter=c.simpleValue),"restriction"in c){const t=c.restriction;if("pattern"in t&&(e.type="pattern",e.parameter=t.pattern.value),"enumeration"in t){e.type="enumeration";const i=t.enumeration.map(({value:s})=>s);e.parameter=i}}if(e.parameter!==void 0)return e},Ta=(c,e)=>{const t=[];for(const i of e){const s=i.name,n=Yt(s);if(!n)continue;const r=new Jf(c,n);i.cardinality&&(r.cardinality=i.cardinality),r.predefinedType=Yt(i.predefinedType),r.instructions=i.instructions,t.push(r)}return t},tp=(c,e)=>{const t=[];for(const i of e){const s=i.name,n=Yt(s);if(!n)continue;const r=new Kf(c,n);i.cardinality&&(r.cardinality=i.cardinality),r.value=Yt(i.value),r.instructions=i.instructions,t.push(r)}return t},ip=(c,e)=>{const t=[];for(const i of e){const s=i.system,n=Yt(s);if(!n)continue;const r=new qf(c,n);i.cardinality&&(r.cardinality=i.cardinality);const o=Yt(i.value);(o==null?void 0:o.type)==="simple"&&(o.parameter=String(o.parameter)),(o==null?void 0:o.type)==="enumeration"&&Array.isArray(o.parameter)&&(o.parameter=o.parameter.map(String)),r.value=o,r.uri=i.uri,r.instructions=i.instructions,t.push(r)}return t},sp=(c,e)=>{const t=[];for(const i of e){const s=i.propertySet,n=i.baseName,r=Yt(s),o=Yt(n);if(!(o&&r))continue;const a=new $f(c,r,o);i.cardinality&&(a.cardinality=i.cardinality);const l=Yt(i.value);(l==null?void 0:l.type)==="enumeration"&&Array.isArray(l.parameter)&&(l.parameter=l.parameter.map(String)),a.value=l,a.dataType=i.dataType,a.uri=i.uri,a.instructions=i.instructions,t.push(a)}return t},Eo=class Lr extends de{constructor(e){super(e),T(this,"enabled",!0),T(this,"list",new gt),e.add(Lr.uuid,this)}getFragmentIdMap(e,t){const i=t.filter(o=>o.pass).map(o=>o.expressID),s=e.getFragmentMap(i),n=t.filter(o=>!o.pass).map(o=>o.expressID),r=e.getFragmentMap(n);return{pass:s,fail:r}}create(e,t,i){const s=new ep(this.components,e,t);return i&&(s.identifier=i),this.list.set(s.identifier,s),s}load(e){const t=[],i=Lr.xmlParser.parse(e).ids,{specifications:s}=i;if(s&&s.specification){const n=Array.isArray(s.specification)?s.specification:[s.specification];for(const r of n){const{name:o,ifcVersion:a,description:l,instructions:h,identifier:d}=r;if(!(o&&a))continue;const u=[],f=[],{applicability:m,requirements:p}=r;if(m){const{maxOccurs:I,...g}=m,w=Array.isArray(g)?g:[g];for(const C of w)for(const v in C){const O=Array.isArray(C[v])?C[v]:[C[v]];if(v==="entity"){const A=Ta(this.components,O);u.push(...A)}}}let E;if(p){const{maxOccurs:I,...g}=p;E=p.description;const w=Array.isArray(g)?g:[g];for(const C of w)for(const v in C){const O=Array.isArray(C[v])?C[v]:[C[v]];if(v==="entity"){const A=Ta(this.components,O);f.push(...A)}if(v==="attribute"){const A=tp(this.components,O);f.push(...A)}if(v==="classification"){const A=ip(this.components,O);f.push(...A)}if(v==="property"){const A=sp(this.components,O);f.push(...A)}}}if(u.length>0&&f.length>0){const I=this.create(o,a.split(/\s+/),d);I.description=l,I.instructions=h,I.requirementsDescription=E,I.applicability.add(...u),I.requirements.add(...f),t.push(I)}}}return t}export(e,t=this.list.values()){const i=t??this.list;return` + ${e.title} ${e.copyright?`${e.copyright}`:""} @@ -267,7 +267,7 @@ ${e} ${[...i].map(s=>s.serialize()).join(` `)} -`}};T(xr,"uuid","9f0b9f78-9b2e-481a-b766-2fbfd01f342c"),T(xr,"xmlParser",new Al.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let tp=xr;const Ta=new Fe,rn=new P;class Zl extends rh{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new Gi(e,3)),this.setAttribute("uv",new Gi(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,i=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),i.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new pr(t,6,1);return this.setAttribute("instanceStart",new Bi(i,3,0)),this.setAttribute("instanceEnd",new Bi(i,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new pr(t,6,1);return this.setAttribute("instanceColorStart",new Bi(i,3,0)),this.setAttribute("instanceColorEnd",new Bi(i,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new oh(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Fe);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),Ta.setFromBufferAttribute(t),this.boundingBox.union(Ta))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new gi),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let s=0;for(let n=0,r=e.count;n`}};T(Eo,"uuid","9f0b9f78-9b2e-481a-b766-2fbfd01f342c");T(Eo,"xmlParser",new Al.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let np=Eo;const Ra=new ye,on=new x;class Ql extends ah{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new Gi(e,3)),this.setAttribute("uv",new Gi(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,i=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),i.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new mr(t,6,1);return this.setAttribute("instanceStart",new Bi(i,3,0)),this.setAttribute("instanceEnd",new Bi(i,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const i=new mr(t,6,1);return this.setAttribute("instanceColorStart",new Bi(i,3,0)),this.setAttribute("instanceColorEnd",new Bi(i,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new lh(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ye);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),Ra.setFromBufferAttribute(t),this.boundingBox.union(Ra))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new gi),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let s=0;for(let n=0,r=e.count;n #include #include @@ -637,7 +637,7 @@ ${e} #include } - `};class Os extends He{constructor(e){super({type:"LineMaterial",uniforms:ao.clone(pn.line.uniforms),vertexShader:pn.line.vertexShader,fragmentShader:pn.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1))}}const Ra=new P,Sa=new P,ze=new Xi,ke=new Xi,vt=new Xi,ur=new P,fr=new ne,Ve=new tt,va=new P,on=new Fe,an=new gi,wt=new Xi;let yt,mi;function wa(c,e,t){return wt.set(0,0,-e,1).applyMatrix4(c.projectionMatrix),wt.multiplyScalar(1/wt.w),wt.x=mi/t.width,wt.y=mi/t.height,wt.applyMatrix4(c.projectionMatrixInverse),wt.multiplyScalar(1/wt.w),Math.abs(Math.max(wt.x,wt.y))}function ip(c,e){const t=c.matrixWorld,i=c.geometry,s=i.attributes.instanceStart,n=i.attributes.instanceEnd,r=Math.min(i.instanceCount,s.count);for(let o=0,a=r;oh&&ke.z>h)continue;if(ze.z>h){const E=ze.z-ke.z,g=(ze.z-h)/E;ze.lerp(ke,g)}else if(ke.z>h){const E=ke.z-ze.z,g=(ke.z-h)/E;ke.lerp(ze,g)}ze.applyMatrix4(i),ke.applyMatrix4(i),ze.multiplyScalar(1/ze.w),ke.multiplyScalar(1/ke.w),ze.x*=s.x/2,ze.y*=s.y/2,ke.x*=s.x/2,ke.y*=s.y/2,Ve.start.copy(ze),Ve.start.z=0,Ve.end.copy(ke),Ve.end.z=0;const f=Ve.closestPointToPointParameter(ur,!0);Ve.at(f,va);const m=Ii.lerp(ze.z,ke.z,f),p=m>=-1&&m<=1,I=ur.distanceTo(va)t.geometry.attributes.position.count&&(t.geometry.dispose(),t.geometry=new Nn),t.geometry.setPositions(r),s&&t.geometry.setColors(o),i.geometry.setFromPoints(a)}newCurve(e,t,i){const s=new Nn,n=new Os({color:t,linewidth:e,vertexColors:i,worldUnits:!1,depthTest:!1}),r=new Ql(s,n);return this.scene.add(r),r}newPoints(e,t){const i=new Ce,s=new Je(new Float32Array,3);i.setAttribute("position",s);const n=new ah({size:e,color:t,sizeAttenuation:!1,depthTest:!1}),r=new lh(i,n);return r.frustumCulled=!1,this.scene.add(r),r}};F(Kl,"settings",{colors:{LINE:[213/255,0/255,255/255],CIRCULARARC:[0/255,46,255/255],CLOTHOID:[0/255,255/255,0/255],PARABOLICARC:[0/255,255/255,72/255],CONSTANTGRADIENT:[213/255,0/255,255/255]}});let Jl=Kl;class rp extends Yi{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new Se(.5,.5),this.addEventListener("removed",function(){this.traverse(function(t){t.element instanceof Element&&t.element.parentNode!==null&&t.element.parentNode.removeChild(t.element)})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const _i=new P,Fa=new ne,Aa=new ne,ya=new P,Oa=new P;class op{constructor(e={}){const t=this;let i,s,n,r;const o={objects:new WeakMap},a=e.element!==void 0?e.element:document.createElement("div");a.style.overflow="hidden",this.domElement=a,this.getSize=function(){return{width:i,height:s}},this.render=function(f,m){f.matrixWorldAutoUpdate===!0&&f.updateMatrixWorld(),m.parent===null&&m.matrixWorldAutoUpdate===!0&&m.updateMatrixWorld(),Fa.copy(m.matrixWorldInverse),Aa.multiplyMatrices(m.projectionMatrix,Fa),l(f,f,m),u(f)},this.setSize=function(f,m){i=f,s=m,n=i/2,r=s/2,a.style.width=f+"px",a.style.height=m+"px"};function l(f,m,p){if(f.isCSS2DObject){_i.setFromMatrixPosition(f.matrixWorld),_i.applyMatrix4(Aa);const I=f.visible===!0&&_i.z>=-1&&_i.z<=1&&f.layers.test(p.layers)===!0;if(f.element.style.display=I===!0?"":"none",I===!0){f.onBeforeRender(t,m,p);const g=f.element;g.style.transform="translate("+-100*f.center.x+"%,"+-100*f.center.y+"%)translate("+(_i.x*n+n)+"px,"+(-_i.y*r+r)+"px)",g.parentNode!==a&&a.appendChild(g),f.onAfterRender(t,m,p)}const E={distanceToCameraSquared:h(p,f)};o.objects.set(f,E)}for(let I=0,E=f.children.length;I{if(this.onBeforeUpdate.trigger(this),!this.enabled||!this.currentWorld)return;const s=this.currentWorld.scene.three,n=this.currentWorld.camera.three;s instanceof Ci&&this.three2D.render(s,n)}),this.onDisposed.add(()=>{this.three2D.domElement.remove()}),this.onResize.add(({x:s,y:n})=>{this.three2D.setSize(s,n)}),this.setupHtmlRenderer(),this.resize()}setupHtmlRenderer(){this.three2D.domElement.style.position="absolute",this.three2D.domElement.style.top="0px",this.three2D.domElement.style.pointerEvents="none",this.container&&this.container.appendChild(this.three2D.domElement)}}const $l=class ec extends de{constructor(e){super(e),F(this,"onDisposed",new Y),F(this,"enabled",!0),F(this,"threshold",50),F(this,"autoCluster",!0),F(this,"list",new Map),F(this,"clusterLabels",new Set),F(this,"currentKeys",new Set),F(this,"_color","white"),F(this,"_markerKey",0),F(this,"_clusterKey",0),F(this,"_worldEvents",new Map),F(this,"_setupWorlds",new Set),e.add(ec.uuid,this)}get color(){return this._color}set color(e){this._color=e;for(const[t,i]of this.list)for(const[s,n]of i)n.label.three.element.style.color=e}create(e,t,i,s=!1){this.setupEvents(e,!0);const n=this._markerKey.toString(),r=this.getWorldMarkerList(e);if(r.has(n))return;const o=document.createElement("span");o.innerHTML=t,o.style.color=this._color;const a=new qe(e,o);return a.three.position.copy(i),r.set(n,{key:n,label:a,merged:!1,static:s}),this._markerKey++,n}delete(e){for(const[t,i]of this.list){const s=i.get(e);s&&s.label.dispose(),i.delete(e)}}getWorldMarkerList(e){return this.list.has(e.uuid)||this.list.set(e.uuid,new Map),this.list.get(e.uuid)}dispose(e){for(const[t,i]of this.list){const s=[...i.keys()];for(const n of s){const r=i.get(n);e&&r.type!==e||(r.label.dispose(),i.delete(n))}}if(!e){this.list.clear(),this._markerKey=0;for(const t of this.clusterLabels)t.label.dispose();this.clusterLabels.clear(),this._clusterKey=0,this.currentKeys.clear()}this.onDisposed.trigger()}setupEvents(e,t){if(t&&this._setupWorlds.has(e.uuid)||!e.camera.hasCameraControls())return;const i=this.getWorldEvent(e);e.camera.controls.removeEventListener("sleep",i),e.camera.controls.removeEventListener("rest",i),t&&(e.camera.controls.addEventListener("sleep",i),e.camera.controls.addEventListener("rest",i))}cluster(e){if(!this.autoCluster)return;this.resetMarkers();const t=this.list.get(e.uuid);if(t){for(const[i,s]of t)if(!s.merged&&!s.static){this.currentKeys.clear();for(const[n,r]of t)r.static||s.key!==r.key&&!r.merged&&this.distance(s.label,r.label)0){this.currentKeys.add(s.key),s.merged=!0;const n=Array.from(this.currentKeys),r=this.getAveragePositionFromLabels(n),o=new qe(s.label.world,this.createClusterElement(this._clusterKey.toString())),{element:a}=o.three;a.textContent=n.length.toString(),o.three.position.copy(r),this.clusterLabels.add({key:this._clusterKey.toString(),markerKeys:n,label:o}),this._clusterKey++}}this.removeMergeMarkers(e)}}getWorldEvent(e){if(!this._worldEvents.has(e.uuid)){const t=()=>{this.cluster(e)};this._worldEvents.set(e.uuid,t)}return this._worldEvents.get(e.uuid)}resetMarkers(){for(const[e,t]of this.list)for(const[i,s]of t)s.merged=!1;for(const e of this.clusterLabels)e.label.dispose();this.clusterLabels.clear(),this._clusterKey=0}removeMergeMarkers(e){const t=this.list.get(e.uuid);if(t){for(const[i,s]of t)s.merged?s.label.dispose():s.label.world.scene.three.add(s.label.three);for(const i of this.clusterLabels)if(i.markerKeys.length===1){for(const[s,n]of this.list){const r=n.get(i.markerKeys[0]);r&&(r.label.world.scene.three.add(r.label.three),r.merged=!1)}i.label.dispose(),this.clusterLabels.delete(i)}}}getAveragePositionFromLabels(e){const t=e.map(i=>{for(const[s,n]of this.list){const r=n.get(i);if(r)return r.label.three.position}return new P});return t.reduce((i,s)=>i.add(s),new P).divideScalar(t.length)}createClusterElement(e){const t=document.createElement("div");return t.textContent=e,t.style.color="#000000",t.style.background="#FFFFFF",t.style.fontSize="1.2rem",t.style.fontWeight="500",t.style.pointerEvents="auto",t.style.borderRadius="50%",t.style.padding="5px 11px",t.style.textAlign="center",t.style.cursor="pointer",t.addEventListener("pointerdown",()=>{this.navigateToCluster(e)}),t.addEventListener("pointerover",()=>{t.style.background="#BCF124"}),t.addEventListener("pointerout",()=>{t.style.background="#FFFFFF"}),t}getScreenPosition(e){const t=new P;if(!e.world.renderer)throw new Error("Renderer not found!");const i=e.three.position.clone();i.project(e.world.camera.three);const s=e.world.renderer.getSize();return t.x=i.x*s.x/2+s.x/2,t.y=-(i.y*s.y/2)+s.y/2,t}distance(e,t){const i=this.getScreenPosition(e),s=this.getScreenPosition(t),n=i.x-s.x,r=i.y-s.y,o=Math.sqrt(n*n+r*r)*.5;return o===0?this.threshold+1:o}navigateToCluster(e){const t=[],i=Array.from(this.clusterLabels).find(l=>l.key===e);if(!i)return;const s=i.label.world.camera;if(!s.hasCameraControls()){console.warn("Zoom to clusters only supported with Camera Controls!");return}for(const l of i.markerKeys)for(const[h,d]of this.list){const u=d.get(l);if(u){const{x:f,y:m,z:p}=u.label.three.position;t.push(f,m,p)}}i.label.dispose(),this.clusterLabels.delete(i);const n=new Ce,r=new Float32Array(t),o=new Je(r,3);n.setAttribute("position",o);const a=new ee(n);a.geometry.computeBoundingSphere(),a.geometry.boundingSphere&&s.controls.fitToSphere(a,!0),n.dispose(),a.clear(),t.length=0}};F($l,"uuid","4079eb91-79b0-4ede-bcf2-15b837129236");let ai=$l;function lp(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var Eo={exports:{}};Eo.exports=Yn;Eo.exports.default=Yn;function Yn(c,e,t){t=t||2;var i=e&&e.length,s=i?e[0]*t:c.length,n=tc(c,0,s,t,!0),r=[];if(!n||n.next===n.prev)return r;var o,a,l,h,d,u,f;if(i&&(n=fp(c,e,n,t)),c.length>80*t){o=l=c[0],a=h=c[1];for(var m=t;ml&&(l=d),u>h&&(h=u);f=Math.max(l-o,h-a),f=f!==0?32767/f:0}return vs(n,r,t,o,a,f,0),r}function tc(c,e,t,i,s){var n,r;if(s===zr(c,e,t,i)>0)for(n=e;n=e;n-=i)r=Na(n,c[n],c[n+1],r);return r&&Gn(r,r.next)&&(Fs(r),r=r.next),r}function Ei(c,e){if(!c)return c;e||(e=c);var t=c,i;do if(i=!1,!t.steiner&&(Gn(t,t.next)||be(t.prev,t,t.next)===0)){if(Fs(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function vs(c,e,t,i,s,n,r){if(c){!r&&n&&gp(c,i,s,n);for(var o=c,a,l;c.prev!==c.next;){if(a=c.prev,l=c.next,n?hp(c,i,s,n):cp(c)){e.push(a.i/t|0),e.push(c.i/t|0),e.push(l.i/t|0),Fs(c),c=l.next,o=l.next;continue}if(c=l,c===o){r?r===1?(c=dp(Ei(c),e,t),vs(c,e,t,i,s,n,2)):r===2&&up(c,e,t,i,s,n):vs(Ei(c),e,t,i,s,n,1);break}}}}function cp(c){var e=c.prev,t=c,i=c.next;if(be(e,t,i)>=0)return!1;for(var s=e.x,n=t.x,r=i.x,o=e.y,a=t.y,l=i.y,h=sn?s>r?s:r:n>r?n:r,f=o>a?o>l?o:l:a>l?a:l,m=i.next;m!==e;){if(m.x>=h&&m.x<=u&&m.y>=d&&m.y<=f&&ki(s,o,n,a,r,l,m.x,m.y)&&be(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function hp(c,e,t,i){var s=c.prev,n=c,r=c.next;if(be(s,n,r)>=0)return!1;for(var o=s.x,a=n.x,l=r.x,h=s.y,d=n.y,u=r.y,f=oa?o>l?o:l:a>l?a:l,I=h>d?h>u?h:u:d>u?d:u,E=Ur(f,m,e,t,i),g=Ur(p,I,e,t,i),v=c.prevZ,C=c.nextZ;v&&v.z>=E&&C&&C.z<=g;){if(v.x>=f&&v.x<=p&&v.y>=m&&v.y<=I&&v!==s&&v!==r&&ki(o,h,a,d,l,u,v.x,v.y)&&be(v.prev,v,v.next)>=0||(v=v.prevZ,C.x>=f&&C.x<=p&&C.y>=m&&C.y<=I&&C!==s&&C!==r&&ki(o,h,a,d,l,u,C.x,C.y)&&be(C.prev,C,C.next)>=0))return!1;C=C.nextZ}for(;v&&v.z>=E;){if(v.x>=f&&v.x<=p&&v.y>=m&&v.y<=I&&v!==s&&v!==r&&ki(o,h,a,d,l,u,v.x,v.y)&&be(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;C&&C.z<=g;){if(C.x>=f&&C.x<=p&&C.y>=m&&C.y<=I&&C!==s&&C!==r&&ki(o,h,a,d,l,u,C.x,C.y)&&be(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function dp(c,e,t){var i=c;do{var s=i.prev,n=i.next.next;!Gn(s,n)&&ic(s,i,i.next,n)&&ws(s,n)&&ws(n,s)&&(e.push(s.i/t|0),e.push(i.i/t|0),e.push(n.i/t|0),Fs(i),Fs(i.next),i=c=n),i=i.next}while(i!==c);return Ei(i)}function up(c,e,t,i,s,n){var r=c;do{for(var o=r.next.next;o!==r.prev;){if(r.i!==o.i&&Rp(r,o)){var a=sc(r,o);r=Ei(r,r.next),a=Ei(a,a.next),vs(r,e,t,i,s,n,0),vs(a,e,t,i,s,n,0);return}o=o.next}r=r.next}while(r!==c)}function fp(c,e,t,i){var s=[],n,r,o,a,l;for(n=0,r=e.length;n=t.next.y&&t.next.y!==t.y){var o=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>n&&(n=o,r=t.x=t.x&&t.x>=l&&i!==t.x&&ki(sr.x||t.x===r.x&&Ep(r,t)))&&(r=t,d=u)),t=t.next;while(t!==a);return r}function Ep(c,e){return be(c.prev,c,e.prev)<0&&be(e.next,c,c.next)<0}function gp(c,e,t,i){var s=c;do s.z===0&&(s.z=Ur(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==c);s.prevZ.nextZ=null,s.prevZ=null,Cp(s)}function Cp(c){var e,t,i,s,n,r,o,a,l=1;do{for(t=c,c=null,n=null,r=0;t;){for(r++,i=t,o=0,e=0;e0||a>0&&i;)o!==0&&(a===0||!i||t.z<=i.z)?(s=t,t=t.nextZ,o--):(s=i,i=i.nextZ,a--),n?n.nextZ=s:c=s,s.prevZ=n,n=s;t=i}n.nextZ=null,l*=2}while(r>1);return c}function Ur(c,e,t,i,s){return c=(c-t)*s|0,e=(e-i)*s|0,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,c|e<<1}function Tp(c){var e=c,t=c;do(e.x=(c-r)*(n-o)&&(c-r)*(i-o)>=(t-r)*(e-o)&&(t-r)*(n-o)>=(s-r)*(i-o)}function Rp(c,e){return c.next.i!==e.i&&c.prev.i!==e.i&&!Sp(c,e)&&(ws(c,e)&&ws(e,c)&&vp(c,e)&&(be(c.prev,c,e.prev)||be(c,e.prev,e))||Gn(c,e)&&be(c.prev,c,c.next)>0&&be(e.prev,e,e.next)>0)}function be(c,e,t){return(e.y-c.y)*(t.x-e.x)-(e.x-c.x)*(t.y-e.y)}function Gn(c,e){return c.x===e.x&&c.y===e.y}function ic(c,e,t,i){var s=cn(be(c,e,t)),n=cn(be(c,e,i)),r=cn(be(t,i,c)),o=cn(be(t,i,e));return!!(s!==n&&r!==o||s===0&&ln(c,t,e)||n===0&&ln(c,i,e)||r===0&&ln(t,c,i)||o===0&&ln(t,e,i))}function ln(c,e,t){return e.x<=Math.max(c.x,t.x)&&e.x>=Math.min(c.x,t.x)&&e.y<=Math.max(c.y,t.y)&&e.y>=Math.min(c.y,t.y)}function cn(c){return c>0?1:c<0?-1:0}function Sp(c,e){var t=c;do{if(t.i!==c.i&&t.next.i!==c.i&&t.i!==e.i&&t.next.i!==e.i&&ic(t,t.next,c,e))return!0;t=t.next}while(t!==c);return!1}function ws(c,e){return be(c.prev,c,c.next)<0?be(c,e,c.next)>=0&&be(c,c.prev,e)>=0:be(c,e,c.prev)<0||be(c,c.next,e)<0}function vp(c,e){var t=c,i=!1,s=(c.x+e.x)/2,n=(c.y+e.y)/2;do t.y>n!=t.next.y>n&&t.next.y!==t.y&&s<(t.next.x-t.x)*(n-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==c);return i}function sc(c,e){var t=new Br(c.i,c.x,c.y),i=new Br(e.i,e.x,e.y),s=c.next,n=e.prev;return c.next=e,e.prev=c,t.next=s,s.prev=t,i.next=t,t.prev=i,n.next=i,i.prev=n,i}function Na(c,e,t,i){var s=new Br(c,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function Fs(c){c.next.prev=c.prev,c.prev.next=c.next,c.prevZ&&(c.prevZ.nextZ=c.nextZ),c.nextZ&&(c.nextZ.prevZ=c.prevZ)}function Br(c,e,t){this.i=c,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Yn.deviation=function(c,e,t,i){var s=e&&e.length,n=s?e[0]*t:c.length,r=Math.abs(zr(c,0,n,t));if(s)for(var o=0,a=e.length;o0&&(i+=c[s-1].length,t.holes.push(i))}return t};var wp=Eo.exports;const Fp=lp(wp),Ap={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:` + `};class Ns extends He{constructor(e){super({type:"LineMaterial",uniforms:ro.clone(mn.line.uniforms),vertexShader:mn.line.vertexShader,fragmentShader:mn.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1))}}const Sa=new x,wa=new x,ze=new Zi,ke=new Zi,wt=new Zi,fr=new x,pr=new ne,Ve=new tt,va=new x,an=new ye,ln=new gi,vt=new Zi;let At,mi;function ya(c,e,t){return vt.set(0,0,-e,1).applyMatrix4(c.projectionMatrix),vt.multiplyScalar(1/vt.w),vt.x=mi/t.width,vt.y=mi/t.height,vt.applyMatrix4(c.projectionMatrixInverse),vt.multiplyScalar(1/vt.w),Math.abs(Math.max(vt.x,vt.y))}function rp(c,e){const t=c.matrixWorld,i=c.geometry,s=i.attributes.instanceStart,n=i.attributes.instanceEnd,r=Math.min(i.instanceCount,s.count);for(let o=0,a=r;oh&&ke.z>h)continue;if(ze.z>h){const I=ze.z-ke.z,g=(ze.z-h)/I;ze.lerp(ke,g)}else if(ke.z>h){const I=ke.z-ze.z,g=(ke.z-h)/I;ke.lerp(ze,g)}ze.applyMatrix4(i),ke.applyMatrix4(i),ze.multiplyScalar(1/ze.w),ke.multiplyScalar(1/ke.w),ze.x*=s.x/2,ze.y*=s.y/2,ke.x*=s.x/2,ke.y*=s.y/2,Ve.start.copy(ze),Ve.start.z=0,Ve.end.copy(ke),Ve.end.z=0;const f=Ve.closestPointToPointParameter(fr,!0);Ve.at(f,va);const m=Ii.lerp(ze.z,ke.z,f),p=m>=-1&&m<=1,E=fr.distanceTo(va)t.geometry.attributes.position.count&&(t.geometry.dispose(),t.geometry=new Nn),t.geometry.setPositions(r),s&&t.geometry.setColors(o),i.geometry.setFromPoints(a)}newCurve(e,t,i){const s=new Nn,n=new Ns({color:t,linewidth:e,vertexColors:i,worldUnits:!1,depthTest:!1}),r=new Kl(s,n);return this.scene.add(r),r}newPoints(e,t){const i=new Ce,s=new Je(new Float32Array,3);i.setAttribute("position",s);const n=new ch({size:e,color:t,sizeAttenuation:!1,depthTest:!1}),r=new hh(i,n);return r.frustumCulled=!1,this.scene.add(r),r}};y(ql,"settings",{colors:{LINE:[213/255,0/255,255/255],CIRCULARARC:[0/255,46,255/255],CLOTHOID:[0/255,255/255,0/255],PARABOLICARC:[0/255,255/255,72/255],CONSTANTGRADIENT:[213/255,0/255,255/255]}});let $l=ql;class lp extends Yi{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new Se(.5,.5),this.addEventListener("removed",function(){this.traverse(function(t){t.element instanceof Element&&t.element.parentNode!==null&&t.element.parentNode.removeChild(t.element)})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const _i=new x,Fa=new ne,Aa=new ne,Oa=new x,Na=new x;class cp{constructor(e={}){const t=this;let i,s,n,r;const o={objects:new WeakMap},a=e.element!==void 0?e.element:document.createElement("div");a.style.overflow="hidden",this.domElement=a,this.getSize=function(){return{width:i,height:s}},this.render=function(f,m){f.matrixWorldAutoUpdate===!0&&f.updateMatrixWorld(),m.parent===null&&m.matrixWorldAutoUpdate===!0&&m.updateMatrixWorld(),Fa.copy(m.matrixWorldInverse),Aa.multiplyMatrices(m.projectionMatrix,Fa),l(f,f,m),u(f)},this.setSize=function(f,m){i=f,s=m,n=i/2,r=s/2,a.style.width=f+"px",a.style.height=m+"px"};function l(f,m,p){if(f.isCSS2DObject){_i.setFromMatrixPosition(f.matrixWorld),_i.applyMatrix4(Aa);const E=f.visible===!0&&_i.z>=-1&&_i.z<=1&&f.layers.test(p.layers)===!0;if(f.element.style.display=E===!0?"":"none",E===!0){f.onBeforeRender(t,m,p);const g=f.element;g.style.transform="translate("+-100*f.center.x+"%,"+-100*f.center.y+"%)translate("+(_i.x*n+n)+"px,"+(-_i.y*r+r)+"px)",g.parentNode!==a&&a.appendChild(g),f.onAfterRender(t,m,p)}const I={distanceToCameraSquared:h(p,f)};o.objects.set(f,I)}for(let E=0,I=f.children.length;E{if(this.onBeforeUpdate.trigger(this),!this.enabled||!this.currentWorld)return;const s=this.currentWorld.scene.three,n=this.currentWorld.camera.three;s instanceof Ci&&this.three2D.render(s,n)}),this.onDisposed.add(()=>{this.three2D.domElement.remove()}),this.onResize.add(({x:s,y:n})=>{this.three2D.setSize(s,n)}),this.setupHtmlRenderer(),this.resize()}setupHtmlRenderer(){this.three2D.domElement.style.position="absolute",this.three2D.domElement.style.top="0px",this.three2D.domElement.style.pointerEvents="none",this.container&&this.container.appendChild(this.three2D.domElement)}}const ec=class tc extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"enabled",!0),y(this,"threshold",50),y(this,"autoCluster",!0),y(this,"list",new Map),y(this,"clusterLabels",new Set),y(this,"currentKeys",new Set),y(this,"_color","white"),y(this,"_markerKey",0),y(this,"_clusterKey",0),y(this,"_worldEvents",new Map),y(this,"_setupWorlds",new Set),e.add(tc.uuid,this)}get color(){return this._color}set color(e){this._color=e;for(const[t,i]of this.list)for(const[s,n]of i)n.label.three.element.style.color=e}create(e,t,i,s=!1){this.setupEvents(e,!0);const n=this._markerKey.toString(),r=this.getWorldMarkerList(e);if(r.has(n))return;const o=document.createElement("span");o.innerHTML=t,o.style.color=this._color;const a=new qe(e,o);return a.three.position.copy(i),r.set(n,{key:n,label:a,merged:!1,static:s}),this._markerKey++,n}delete(e){for(const[t,i]of this.list){const s=i.get(e);s&&s.label.dispose(),i.delete(e)}}getWorldMarkerList(e){return this.list.has(e.uuid)||this.list.set(e.uuid,new Map),this.list.get(e.uuid)}dispose(e){for(const[t,i]of this.list){const s=[...i.keys()];for(const n of s){const r=i.get(n);e&&r.type!==e||(r.label.dispose(),i.delete(n))}}if(!e){this.list.clear(),this._markerKey=0;for(const t of this.clusterLabels)t.label.dispose();this.clusterLabels.clear(),this._clusterKey=0,this.currentKeys.clear()}this.onDisposed.trigger()}setupEvents(e,t){if(t&&this._setupWorlds.has(e.uuid)||!e.camera.hasCameraControls())return;const i=this.getWorldEvent(e);e.camera.controls.removeEventListener("sleep",i),e.camera.controls.removeEventListener("rest",i),t&&(e.camera.controls.addEventListener("sleep",i),e.camera.controls.addEventListener("rest",i))}cluster(e){if(!this.autoCluster)return;this.resetMarkers();const t=this.list.get(e.uuid);if(t){for(const[i,s]of t)if(!s.merged&&!s.static){this.currentKeys.clear();for(const[n,r]of t)r.static||s.key!==r.key&&!r.merged&&this.distance(s.label,r.label)0){this.currentKeys.add(s.key),s.merged=!0;const n=Array.from(this.currentKeys),r=this.getAveragePositionFromLabels(n),o=new qe(s.label.world,this.createClusterElement(this._clusterKey.toString())),{element:a}=o.three;a.textContent=n.length.toString(),o.three.position.copy(r),this.clusterLabels.add({key:this._clusterKey.toString(),markerKeys:n,label:o}),this._clusterKey++}}this.removeMergeMarkers(e)}}getWorldEvent(e){if(!this._worldEvents.has(e.uuid)){const t=()=>{this.cluster(e)};this._worldEvents.set(e.uuid,t)}return this._worldEvents.get(e.uuid)}resetMarkers(){for(const[e,t]of this.list)for(const[i,s]of t)s.merged=!1;for(const e of this.clusterLabels)e.label.dispose();this.clusterLabels.clear(),this._clusterKey=0}removeMergeMarkers(e){const t=this.list.get(e.uuid);if(t){for(const[i,s]of t)s.merged?s.label.dispose():s.label.world.scene.three.add(s.label.three);for(const i of this.clusterLabels)if(i.markerKeys.length===1){for(const[s,n]of this.list){const r=n.get(i.markerKeys[0]);r&&(r.label.world.scene.three.add(r.label.three),r.merged=!1)}i.label.dispose(),this.clusterLabels.delete(i)}}}getAveragePositionFromLabels(e){const t=e.map(i=>{for(const[s,n]of this.list){const r=n.get(i);if(r)return r.label.three.position}return new x});return t.reduce((i,s)=>i.add(s),new x).divideScalar(t.length)}createClusterElement(e){const t=document.createElement("div");return t.textContent=e,t.style.color="#000000",t.style.background="#FFFFFF",t.style.fontSize="1.2rem",t.style.fontWeight="500",t.style.pointerEvents="auto",t.style.borderRadius="50%",t.style.padding="5px 11px",t.style.textAlign="center",t.style.cursor="pointer",t.addEventListener("pointerdown",()=>{this.navigateToCluster(e)}),t.addEventListener("pointerover",()=>{t.style.background="#BCF124"}),t.addEventListener("pointerout",()=>{t.style.background="#FFFFFF"}),t}getScreenPosition(e){const t=new x;if(!e.world.renderer)throw new Error("Renderer not found!");const i=e.three.position.clone();i.project(e.world.camera.three);const s=e.world.renderer.getSize();return t.x=i.x*s.x/2+s.x/2,t.y=-(i.y*s.y/2)+s.y/2,t}distance(e,t){const i=this.getScreenPosition(e),s=this.getScreenPosition(t),n=i.x-s.x,r=i.y-s.y,o=Math.sqrt(n*n+r*r)*.5;return o===0?this.threshold+1:o}navigateToCluster(e){const t=[],i=Array.from(this.clusterLabels).find(l=>l.key===e);if(!i)return;const s=i.label.world.camera;if(!s.hasCameraControls()){console.warn("Zoom to clusters only supported with Camera Controls!");return}for(const l of i.markerKeys)for(const[h,d]of this.list){const u=d.get(l);if(u){const{x:f,y:m,z:p}=u.label.three.position;t.push(f,m,p)}}i.label.dispose(),this.clusterLabels.delete(i);const n=new Ce,r=new Float32Array(t),o=new Je(r,3);n.setAttribute("position",o);const a=new ee(n);a.geometry.computeBoundingSphere(),a.geometry.boundingSphere&&s.controls.fitToSphere(a,!0),n.dispose(),a.clear(),t.length=0}};y(ec,"uuid","4079eb91-79b0-4ede-bcf2-15b837129236");let ai=ec;function dp(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var go={exports:{}};go.exports=Yn;go.exports.default=Yn;function Yn(c,e,t){t=t||2;var i=e&&e.length,s=i?e[0]*t:c.length,n=ic(c,0,s,t,!0),r=[];if(!n||n.next===n.prev)return r;var o,a,l,h,d,u,f;if(i&&(n=Ip(c,e,n,t)),c.length>80*t){o=l=c[0],a=h=c[1];for(var m=t;ml&&(l=d),u>h&&(h=u);f=Math.max(l-o,h-a),f=f!==0?32767/f:0}return vs(n,r,t,o,a,f,0),r}function ic(c,e,t,i,s){var n,r;if(s===Ur(c,e,t,i)>0)for(n=e;n=e;n-=i)r=Pa(n,c[n],c[n+1],r);return r&&Gn(r,r.next)&&(Fs(r),r=r.next),r}function Ei(c,e){if(!c)return c;e||(e=c);var t=c,i;do if(i=!1,!t.steiner&&(Gn(t,t.next)||Pe(t.prev,t,t.next)===0)){if(Fs(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function vs(c,e,t,i,s,n,r){if(c){!r&&n&&Rp(c,i,s,n);for(var o=c,a,l;c.prev!==c.next;){if(a=c.prev,l=c.next,n?fp(c,i,s,n):up(c)){e.push(a.i/t|0),e.push(c.i/t|0),e.push(l.i/t|0),Fs(c),c=l.next,o=l.next;continue}if(c=l,c===o){r?r===1?(c=pp(Ei(c),e,t),vs(c,e,t,i,s,n,2)):r===2&&mp(c,e,t,i,s,n):vs(Ei(c),e,t,i,s,n,1);break}}}}function up(c){var e=c.prev,t=c,i=c.next;if(Pe(e,t,i)>=0)return!1;for(var s=e.x,n=t.x,r=i.x,o=e.y,a=t.y,l=i.y,h=sn?s>r?s:r:n>r?n:r,f=o>a?o>l?o:l:a>l?a:l,m=i.next;m!==e;){if(m.x>=h&&m.x<=u&&m.y>=d&&m.y<=f&&ki(s,o,n,a,r,l,m.x,m.y)&&Pe(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function fp(c,e,t,i){var s=c.prev,n=c,r=c.next;if(Pe(s,n,r)>=0)return!1;for(var o=s.x,a=n.x,l=r.x,h=s.y,d=n.y,u=r.y,f=oa?o>l?o:l:a>l?a:l,E=h>d?h>u?h:u:d>u?d:u,I=Dr(f,m,e,t,i),g=Dr(p,E,e,t,i),w=c.prevZ,C=c.nextZ;w&&w.z>=I&&C&&C.z<=g;){if(w.x>=f&&w.x<=p&&w.y>=m&&w.y<=E&&w!==s&&w!==r&&ki(o,h,a,d,l,u,w.x,w.y)&&Pe(w.prev,w,w.next)>=0||(w=w.prevZ,C.x>=f&&C.x<=p&&C.y>=m&&C.y<=E&&C!==s&&C!==r&&ki(o,h,a,d,l,u,C.x,C.y)&&Pe(C.prev,C,C.next)>=0))return!1;C=C.nextZ}for(;w&&w.z>=I;){if(w.x>=f&&w.x<=p&&w.y>=m&&w.y<=E&&w!==s&&w!==r&&ki(o,h,a,d,l,u,w.x,w.y)&&Pe(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;C&&C.z<=g;){if(C.x>=f&&C.x<=p&&C.y>=m&&C.y<=E&&C!==s&&C!==r&&ki(o,h,a,d,l,u,C.x,C.y)&&Pe(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function pp(c,e,t){var i=c;do{var s=i.prev,n=i.next.next;!Gn(s,n)&&sc(s,i,i.next,n)&&ys(s,n)&&ys(n,s)&&(e.push(s.i/t|0),e.push(i.i/t|0),e.push(n.i/t|0),Fs(i),Fs(i.next),i=c=n),i=i.next}while(i!==c);return Ei(i)}function mp(c,e,t,i,s,n){var r=c;do{for(var o=r.next.next;o!==r.prev;){if(r.i!==o.i&&vp(r,o)){var a=nc(r,o);r=Ei(r,r.next),a=Ei(a,a.next),vs(r,e,t,i,s,n,0),vs(a,e,t,i,s,n,0);return}o=o.next}r=r.next}while(r!==c)}function Ip(c,e,t,i){var s=[],n,r,o,a,l;for(n=0,r=e.length;n=t.next.y&&t.next.y!==t.y){var o=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>n&&(n=o,r=t.x=t.x&&t.x>=l&&i!==t.x&&ki(sr.x||t.x===r.x&&Tp(r,t)))&&(r=t,d=u)),t=t.next;while(t!==a);return r}function Tp(c,e){return Pe(c.prev,c,e.prev)<0&&Pe(e.next,c,c.next)<0}function Rp(c,e,t,i){var s=c;do s.z===0&&(s.z=Dr(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==c);s.prevZ.nextZ=null,s.prevZ=null,Sp(s)}function Sp(c){var e,t,i,s,n,r,o,a,l=1;do{for(t=c,c=null,n=null,r=0;t;){for(r++,i=t,o=0,e=0;e0||a>0&&i;)o!==0&&(a===0||!i||t.z<=i.z)?(s=t,t=t.nextZ,o--):(s=i,i=i.nextZ,a--),n?n.nextZ=s:c=s,s.prevZ=n,n=s;t=i}n.nextZ=null,l*=2}while(r>1);return c}function Dr(c,e,t,i,s){return c=(c-t)*s|0,e=(e-i)*s|0,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,c|e<<1}function wp(c){var e=c,t=c;do(e.x=(c-r)*(n-o)&&(c-r)*(i-o)>=(t-r)*(e-o)&&(t-r)*(n-o)>=(s-r)*(i-o)}function vp(c,e){return c.next.i!==e.i&&c.prev.i!==e.i&&!yp(c,e)&&(ys(c,e)&&ys(e,c)&&Fp(c,e)&&(Pe(c.prev,c,e.prev)||Pe(c,e.prev,e))||Gn(c,e)&&Pe(c.prev,c,c.next)>0&&Pe(e.prev,e,e.next)>0)}function Pe(c,e,t){return(e.y-c.y)*(t.x-e.x)-(e.x-c.x)*(t.y-e.y)}function Gn(c,e){return c.x===e.x&&c.y===e.y}function sc(c,e,t,i){var s=hn(Pe(c,e,t)),n=hn(Pe(c,e,i)),r=hn(Pe(t,i,c)),o=hn(Pe(t,i,e));return!!(s!==n&&r!==o||s===0&&cn(c,t,e)||n===0&&cn(c,i,e)||r===0&&cn(t,c,i)||o===0&&cn(t,e,i))}function cn(c,e,t){return e.x<=Math.max(c.x,t.x)&&e.x>=Math.min(c.x,t.x)&&e.y<=Math.max(c.y,t.y)&&e.y>=Math.min(c.y,t.y)}function hn(c){return c>0?1:c<0?-1:0}function yp(c,e){var t=c;do{if(t.i!==c.i&&t.next.i!==c.i&&t.i!==e.i&&t.next.i!==e.i&&sc(t,t.next,c,e))return!0;t=t.next}while(t!==c);return!1}function ys(c,e){return Pe(c.prev,c,c.next)<0?Pe(c,e,c.next)>=0&&Pe(c,c.prev,e)>=0:Pe(c,e,c.prev)<0||Pe(c,c.next,e)<0}function Fp(c,e){var t=c,i=!1,s=(c.x+e.x)/2,n=(c.y+e.y)/2;do t.y>n!=t.next.y>n&&t.next.y!==t.y&&s<(t.next.x-t.x)*(n-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==c);return i}function nc(c,e){var t=new _r(c.i,c.x,c.y),i=new _r(e.i,e.x,e.y),s=c.next,n=e.prev;return c.next=e,e.prev=c,t.next=s,s.prev=t,i.next=t,t.prev=i,n.next=i,i.prev=n,i}function Pa(c,e,t,i){var s=new _r(c,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function Fs(c){c.next.prev=c.prev,c.prev.next=c.next,c.prevZ&&(c.prevZ.nextZ=c.nextZ),c.nextZ&&(c.nextZ.prevZ=c.prevZ)}function _r(c,e,t){this.i=c,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Yn.deviation=function(c,e,t,i){var s=e&&e.length,n=s?e[0]*t:c.length,r=Math.abs(Ur(c,0,n,t));if(s)for(var o=0,a=e.length;o0&&(i+=c[s-1].length,t.holes.push(i))}return t};var Ap=go.exports;const Op=dp(Ap),Np={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:` varying vec2 vUv; @@ -660,7 +660,7 @@ ${e} gl_FragColor = opacity * texel; - }`};class Qi{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const yp=new ii(-1,1,1,-1,0,1);class Op extends Ce{constructor(){super(),this.setAttribute("position",new Gi([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new Gi([0,2,0,0,2,0],2))}}const Np=new Op;class nc{constructor(e){this._mesh=new ee(Np,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,yp)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class rc extends Qi{constructor(e,t){super(),this.textureID=t!==void 0?t:"tDiffuse",e instanceof He?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=ao.clone(e.uniforms),this.material=new He({name:e.name!==void 0?e.name:"unspecified",defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new nc(this.material)}render(e,t,i){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=i.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class ba extends Qi{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,i){const s=e.getContext(),n=e.state;n.buffers.color.setMask(!1),n.buffers.depth.setMask(!1),n.buffers.color.setLocked(!0),n.buffers.depth.setLocked(!0);let r,o;this.inverse?(r=0,o=1):(r=1,o=0),n.buffers.stencil.setTest(!0),n.buffers.stencil.setOp(s.REPLACE,s.REPLACE,s.REPLACE),n.buffers.stencil.setFunc(s.ALWAYS,r,4294967295),n.buffers.stencil.setClear(o),n.buffers.stencil.setLocked(!0),e.setRenderTarget(i),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),n.buffers.color.setLocked(!1),n.buffers.depth.setLocked(!1),n.buffers.color.setMask(!0),n.buffers.depth.setMask(!0),n.buffers.stencil.setLocked(!1),n.buffers.stencil.setFunc(s.EQUAL,1,4294967295),n.buffers.stencil.setOp(s.KEEP,s.KEEP,s.KEEP),n.buffers.stencil.setLocked(!0)}}class bp extends Qi{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class Lp{constructor(e,t){if(this.renderer=e,this._pixelRatio=e.getPixelRatio(),t===void 0){const i=e.getSize(new Se);this._width=i.width,this._height=i.height,t=new Ot(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:lo}),t.texture.name="EffectComposer.rt1"}else this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new rc(Ap),this.copyPass.material.blending=dh,this.clock=new La}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);t!==-1&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;tc.charCodeAt(0));const Bp=Uint8Array.from(atob(oc),c=>c.charCodeAt(0));function ac(c,e,t){if(e.getQueryParameter(c,e.QUERY_RESULT_AVAILABLE)){const i=e.getQueryParameter(c,e.QUERY_RESULT)/1e6;t.lastTime=i}else setTimeout(()=>{ac(c,e,t)},1)}class zp extends Qi{constructor(e,t,i=512,s=512){super(),this.width=i,this.height=s,this.clear=!0,this.camera=t,this.scene=e,this.configuration=new Proxy({aoSamples:16,aoRadius:5,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,color:new _e(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0},{set:(n,r,o)=>{const a=n[r];return n[r]=o,r==="aoSamples"&&a!==o&&this.configureAOPass(this.configuration.logarithmicDepthBuffer),r==="denoiseSamples"&&a!==o&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),r==="halfRes"&&a!==o&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.setSize(this.width,this.height)),r==="depthAwareUpsampling"&&a!==o&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),!0}}),this.samples=[],this.samplesR=[],this.samplesDenoise=[],this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.beautyRenderTarget=new Ot(this.width,this.height,{minFilter:es,magFilter:xt}),this.beautyRenderTarget.depthTexture=new fh(this.width,this.height,ph),this.beautyRenderTarget.depthTexture.format=mh,this.writeTargetInternal=new Ot(this.width,this.height,{minFilter:es,magFilter:es,depthBuffer:!1}),this.readTargetInternal=new Ot(this.width,this.height,{minFilter:es,magFilter:es,depthBuffer:!1}),this.bluenoise=new Ih(Bp,128,128),this.bluenoise.colorSpace=Eh,this.bluenoise.wrapS=Fo,this.bluenoise.wrapT=Fo,this.bluenoise.minFilter=xt,this.bluenoise.magFilter=xt,this.bluenoise.needsUpdate=!0,this.lastTime=0,this._r=new Se,this._c=new _e}configureHalfResTargets(){this.configuration.halfRes?(this.depthDownsampleTarget=new gh(this.width/2,this.height/2,2),this.depthDownsampleTarget.texture[0].format=Ch,this.depthDownsampleTarget.texture[0].type=Th,this.depthDownsampleTarget.texture[0].minFilter=xt,this.depthDownsampleTarget.texture[0].magFilter=xt,this.depthDownsampleTarget.texture[0].depthBuffer=!1,this.depthDownsampleTarget.texture[1].format=za,this.depthDownsampleTarget.texture[1].type=lo,this.depthDownsampleTarget.texture[1].minFilter=xt,this.depthDownsampleTarget.texture[1].magFilter=xt,this.depthDownsampleTarget.texture[1].depthBuffer=!1,this.depthDownsampleQuad=new hn(new He(Up))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer)}configureAOPass(e=!1){this.samples=this.generateHemisphereSamples(this.configuration.aoSamples),this.samplesR=this.generateHemisphereSamplesR(this.configuration.aoSamples);const t={...Dp};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e&&(t.fragmentShader=`#define LOGDEPTH + }`};var ac="5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+c731FUxjvaexCkCJ0qhrJJ++htWqetNC4NewClu8aFRSwrqiJEGe+qtTg4CYCHaF1wJI0sy/ZBQAI0qAMyBvVjWZlv2pdkCaro9eWDLK5I4mbb8E4d7hZr9dDJiTJm6Bmb5S+2F7yal/JPdeLUfwq7jmVLaQfhv4tWMJAt7V4sG9LuAv2oPJgSj1nnlBvPibfHM2TrlWHwGCLGxW/5Jm2TotaDL+pHDM5pn1r0UuTZ24N8S5k68bLHW9tfD+2k4zGev23ExJb4YTRKWrj82N5LjJ26lj1BkGZ0CsXLGGELoPaYQomjTqPxYqhfwOwDliNGVqux9ffuybqOKgsbB51B1GbZfG8vHDBE2JQGib1mnCmWOWAMJcHN0cKeDHYTflbDTVXajtr68mwfRje6WueQ/6yWqmZMLWNH7P27zGFhMFqaqfg11Q88g/9UA/FROe9yfq0yOO0pnNAxvepFy2BpEbcgG+mCyjCC01JWlOZlIPdf1TtlyOt7L94ToYGCukoFt4OqwOrofamjECpSgKLLmrRM+sNRAw12eaqk8KtdFk7pn2IcDQiPXCh16t1a+psi+w9towHTKPyQM0StKr61b2BnN1HU+aezFNBLfHTiXwhGTbdxLLmrsAGIVSiNAeCGE8GlB0iOv2v78kP0CTmAPUEqnHYRSDlP+L6m/rYjEK6Q85GRDJi2W20/7NLPpSOaMR++IFvpkcwRuc59j8hh9tYlc1xjdt2jmp9KJczB7U9P43inuxLOv11P5/HYH5d6gLB0CsbGC8APjh+EcCP0zFWqlaACZweLhVfv3yiyd8R3bdVg8sRKsxPvhDaPpiFp9+MN+0Ua0bsPr+lhxfZhMhlevkLbR4ZvcSRP6ApQLy3+eMh9ehCB3z5DVAaN3P6J8pi5Qa88ZQsOuCTWyH6q8yMfBw8y8nm6jaOxJhPH6Hf0I4jmALUBsWKH4gWBnyijHh7z3/1HhQzFLRDRrIQwUtu11yk7U0gDw/FatOIZOJaBx3UqbUxSZ6dboFPm5pAyyXC2wYdSWlpZx/D2C6hDO2sJM4HT9IKWWmDkZIO2si/6BKHruXIEDpfAtz3xDlIdKnnlqnkfCyy6vNOPyuoWsSWBeiN0mcfIrnOtp2j7bxjOkr25skfS/lwOC692cEp7TKSlymbsyzoWg/0AN66SvQYo6BqpNwPpTaUu25zMWlwVUdfu1EEdc0O06TI0JmHk4f6GZQbfOs//OdgtGPO6uLoadJycR8Z80rkd88QoNmimZd8vcpQKScCFkxH1RMTkPlN3K7CL/NSMOiXEvxrn9VyUPFee63uRflgaPMSsafvqMgzTt3T1RaHNLLFatQbD0Vha4YXZ/6Ake7onM65nC9cyLkteYkDfHoJtef7wCrWXTK0+vH38VUBcFJP0+uUXpkiK0gDXNA39HL/qdVcaOA16kd2gzq8aHpNSaKtgMLJC6fdLLS/I/4lUWV2+djY9Rc3QuJOUrlHFQERtXN4xJaAHZERCUQZ9ND2pEtZg8dsnilcnqmqYn3c1sRyK0ziKpHNytEyi2gmzxEFchvT1uBWxZUikkAlWuyqvvhteSG9kFhTLNM97s3X1iS2UbE6cvApgbmeJ/KqtP0NNT3bZiG9TURInCZtVsNZzYus6On0wcdMlVfqo8XLhT5ojaOk4DtCyeoQkBt1mf5luFNaLFjI/1cnPefyCQwcq5ia/4pN4NB+xE/3SEPsliJypS964SI6o5fDVa0IERR8DoeQ+1iyRLU1qGYexB61ph4pkG1rf3c2YD6By1pFCmww9B0r2VjFeaubkIdgWx4RKLQRPLENdGo8ezI5mkNtdCws19aP1uHhenD+HKa8GDeLulb2fiMRhU2xJzzz9e4yOMPvEnGEfbCiQ17nUDpcFDWthr68mhZ4WiHUkRpaVWJNExuULcGkuyVLsQj59pf6OHFR7tofhy9FMrWPCEvX1d5sCVJt8yBFiB6NoOuwMy4wlso9I2G4E5/5B2c6vIZUUY9fFujT3hpkdTuVhbhBwLCtnlIjBpN4cq+waZ0wXSrmebcl+dcrb7sPh9jKxFINkScDTBgjSUfLkC3huJJs/M4M8AOFxbbSIVpBUarYFmLpGsv+V6TJnWNTwI41tubwo7QSI1VOdRKT/Pp8U3oK2ciDbeuWnAGAANvQjGfcewdAdo6H83XzqlK/4yudtFHJSv9Y+qJskwnVToH1I0+tJ3vsLBXtlvMzLIxUj/8LcqZnrNHfVRgabFNXW0qpUvDgxnP3f54KooR3NI+2Q/VHAYFigMkQE5dLH6C6fGs/TKeE6E2jOhZQcP9/rrJjJKcLYdn5cw6XLCUe9F7quk5Yhac+nYL5HOXvp6Q/5qbiQHkuebanX77YSNx34YaWYpcEHuY1u/lEVTCQ7taPaw3oNcn/qJhMzGPZUs3XAq48wj/hCIO2d5aFdfXnS0yg57/jxzDJBwkdOgeVnyyh19Iz1UqiysT4J1eeKwUuWEYln23ydtP7g3R1BnvnxqFPAnOMgOIop2dkXPfUh/9ZKV3ZQbZNactPD4ql5Qg9CxSBnIwzlj/tseQKWRstwNbf17neGwDFFWdm/8f+nDWt/WlKV3MUiAm3ci6xXMDSL5ubPXBg/gKEE7TsZVGUcrIbdXILcMngvGs7unvlPJh6oadeBDqiAviIZ/iyiUMdQZAuf/YBAY0VP1hcgInuWoKbx31AOjyTN2OOHrlthB3ny9JKHOAc8BMvqopikPldcwIQoFxTccKKIeI815GcwaKDLsMbCsxegrzXl8E0bpic/xffU9y1DCgeKZoF2PIY77RIn6kSRdBiGd8NtNwT74dyeFBMkYraPkudN26x9NPuBt4iCOAnBFaNSKVgKiZQruw22kM1fgBKG7cPYAxdHJ8M4V/jzBn2jEJg+jk/jjV4oMmMNOpKB5oVpVh7tK529Z+5vKZ0NSY2A4YdcT0x4BdkoNEDrpsTmekSTjvx9ZBiTHrm9M/n/hGmgpjz4WEjttRfAEy5DYH5vCK/9GuVPa4hoApFaNlrFD/n2PpKOw24iKujKhVIz41p1E0HwsCd/c17OA0H0RjZi1V/rjJLexUzpmXTMIMuzaOBbU4dxvQMgyvxJvR6DyF3BaHkaqT4P3FRYlm+zh8EEGgmkNqD1WRUubDW62VqLoH8UEelIpL7C8CguWWGGCAIDPma9bnh+7IJSt0Cn6ACER2mYk8dLsrN70RUVLiE0ig+08yPY9IOtuqHf/KYsT84BwhMcVq7t8q1WVjpJGNyXdtIPIjhAzabtrX03Itn29QO3TCixE9WpkHIOdAoGvqCrw1D3x9g9Px8u0yZZuulZuGy0veSY34KDSlhsO1zx2ZMrpDBzCHPB4niwApk6NevIvmBxU3+4yaewDvgEQDJ6Of5iRxjAIpp9UO8EzNY4blj4qh8SCSZTqbe/lShE6tNU9Y5IoWHeJxPcHF9KwYQD7lFcIpcscHrcfkHJfL2lL1zczKywEF7BwkjXEirgBcvNWayatqdTVT5oLbzTmED3EOYBSXFyb2VIYk3t0dOZWJdG1nP+W7Qfyeb8MSIyUGKEA57ptPxrPHKYGZPHsuBqQuVSrn0i8KJX+rlzAqo8AawchsJ26FckxTf5+joTcw+2y8c8bushpRYEbgrdr64ltEYPV2AbVgKXV3XACoD1gbs01CExbJALkuItjfYN3+6I8kbiTYmdzBLaNC+xu9z/eXcRQV1Lo8cJoSsKyWJPuTncu5vcmfMUAWmuwhjymK1rhYR8pQMXNQg9X+5ha5fEnap+LhUL1d5SURZz9rGdOWLhrMcMKSaU3LhOQ/6a6qSCwgzQxCW2gFs53fpvfWxhH+xDHdKRV6w29nQ6rNqd9by+zm1OpzYyJwvFyOkrVXQUwt4HaapnweCa7Tj2Mp/tT4YcY3Q/tk1czgkzlV5mpDrdp1spOYB8ionAwxujjdhj5y9qEHu0uc36PAKAYsKLaEoiwPnob0pdluPWdv4sNSlG8GWViI+x/Z4DkW/kSs2iE3ADFjg4TCvgCbX3v0Hz0KZkerrpzEIukAusidDs2g/w0zgmLnZXvVr5kkpwQTLZ0L6uaTHl0LVikIuNIVPmL3fOQJqIdfzymUN0zucIrDintBn6ICl/inj5zteISv5hEMGMqtHc2ghcFJvmH3ZhIZi34vqqTFCb9pltTYz582Y3dwYaHb9khdfve1YryzEwEKbI8qm62qv+NyllC+WxLLAJjz0ZaEF2aTn35qeFmkbP6LDYcbwqWxA0WKsteB7vy8bRHE4r8LhubWDc0pbe90XckSDDAkRej0TQlmWsWwaz18Tx2phykVvwuIRzf4kt9srT8N7gsMjMs0NLAAldabFf2tiMoaaxHcZSX51WPc1BrwApMxih227qTZkcgtkdK1h314XvZKUKh/XysWYnk1ST4kiBI1B9OlfTjB3WHzTAReFLofsGtikwpIXzQBc/gOjz2Thlj36WN0sxyf4RmAFtrYt64fwm+ThjbhlmUTZzebLl4yAkAqzJSfjPBZS2H/IvkkTUdVh0qdB6EuiHEjEil5lk9BTPzxmoW4Jx543hiyy4ASdYA2DNoprsR9iwGFwFG3F2vIROy4L5CZrl230+k733JwboSNBKngsaFPtqo+q3mFFSjC1k0kIAFmKihaYSwaSF7konmYHZWmchuaq15TpneA2ADSRvA07I7US0lTOOfKrgxhzRl0uJihcEZhhYWxObjvNTJ/5sR4Aa5wOQhGClGLb746cJhQ2E6Jie1hbGgWxUH7YSKETptrTeR/xfcMNk2WM12S0XElC9klR8O7jLYekEOZdscP0ypSdoCVZAoK+2ju2PHE869Q9rxCs9DVQco4BriiPbCjN/8tBjsah4IuboR5QbmbyDpcdXVxGMxvWKIjocBuKbjb+B4HvkunbG0wX0IFCjQKoNMFIKcJSJXtkP3EO+J16uh4img0LQlBAOYwBLupu5r1NALMo0g3xkd9b4f7KoCBWHeyk24FmYUCy/PGLv0xErOTyORp8TJ5nnc2k1dOVBTJok7iHye9dwxwRVP3c7eAS8pMmJYHGpzIHz6ii2WJm8HMTPAZdA4q+ugj3PNCL/N45kyglqvQV4f/+ryDDG5RPy5HVoV9FVuJcq2dxF9Y0heVoipV6q1LyfAeuMzbsUV+rsSBmCSV+1CdKlxy0T0Y6Om0X6701URm2Ml6DIQgJ/3KO6kwcMYRrmKsY7TfxWhSXZll+1PfyRXe9HS0t1IKTQMZL7ZqQ8D/o+en57Y9XAQ9C+kZYykNr0xOMxEwu2+Cppm69mQyTm3H7QX6kHvXF201r+KVAf354qypJC5OHSeBU47bM1bTaVmdVEWQ+9CcvvHdu8Ue5UndHM+EeukmR82voQpetZ7WJjyXs+tPS60nk09gymuORoHNtbm0VuvyigiEvOsyHiRBW7V6FyTCppLPEHvesan91SlEh1/QEunq+qgREFXByDwNKcAH5s8/RFg8hP4wcPmFqX0xXGSKY087bqRLsBZe52jThx0XLkhKQUWPvI18WQQS3g2Ra1pzQ1oNFKdfJJjyaH5tJH6w0/upJobwB8KZ5cIs9LnVGxfBaHXBfvLkNpab7dpU6TdcbBIc+A4bqXE/Xt8/xsGQOdoXra4Us5nDAM6v2BNBQaGMmgMfQQV+ikTteSHvyl8wUxULiYRIEKaiDxpBJnyf9OoqQdZVJ8ahqOvuwqq5mnDUAUzUr/Lvs1wLu2F+r4eZMfJPL4gV5mKLkITmozRnTvA7VABaxZmFRtkhvU5iH9RQ1z26ku7aABokvptx7RKZBVL6dveLKOzg0NC7HAxcg5kE1wuyJiEQLOpO0ma3AtWD2Q2Wmn2oPZeDYAwVyEpxuwDy7ivmdUDSL95ol3h2JByTMovOCgxZ1q4E5nwwa7+4WtDAse6bDdr27XgAi5Px3IWbyZ/vRiECKwOMeJSuIl8A4Ds0emI3SgKVVWVO5uyiEUET+ucEq0casA+DQyhzRc8j+Plo0pxKynB/t0uXod1FVV4fX1sC4kDfwFaUDGQ4p9HYgaMqIWX3OF/S8+vcR0JS0bDapWKJwAIIQiRUzvh5YwtzkjccbbrT9Ky/qt5X7MAGA0lzh43mDF9EB6lCGuO/aFCMhdOqNryvd73KdJNy3mxtT8AqgmG4xq7eE1jKu6rV0g8UGyMatzyIMjiOCf4lIJFzAfwDbIfC72TJ/TK+cGsLR8blpjlEILjD8Mxr7IffhbFhgo12CzXRQ2O8JqBJ70+t12385tSmFC8Or+U8svOaoGoojT1/EmjRMT7x2iTUZ7Ny02VGeMZTtGy029tGN1/9k7x3mFu63lYnaWjfJT1m1zpWO3HSXpGkFqVd/m3kDMv4X9rmLOpwEeu8r6TI6C2zUG+MT6v90OU3y5hKqLhpyFLGtkZhDmUg/W1JGSmA8N1TapR4Kny+P6+DuMadZ9+xBbv06nfOjMwkoTsjG0zFmNbvlxEjw+Pl5QYK+V8Qyb+nknZ0Nb/Ofi9+V0eoNtTrtD1/0wzUGGG5u2D/J1ouO/PjXFJVx6LurVnPOyFVbZx7s3ZSjSq+7YN3wzTbFbUvP8GBh7cKieJt56SIowQ2I577+UEXrxUKMFO+XaLLCALuiJWB2vUdpsT+kQ+adoeTfwOulXhd/KZ7ygjj6PhvGT1xzfT7hTwd6dzSB4xV70CesHC0dsg2VyujlMGBKjg5snbrHHX/LNj3SsoLGSX+bZNTDDCNTXh+dCVPlj4K8+hJ/kVddrbtZw26Hx5qYiv3oNNg5blHRSPtmojhZmBQAz8sLC9nAuWNSz1dIofFtlryEKklbdkhBCcx5dhj7pinXDNlCeatCeTCEjYCpZ3HRf5QzUcRR1Tdb3gwtYtpPdgMxmWfJGoZSu1EsCJbIhS16Ed97+8br4Ar1mB1GcnZVx/HPtJl4CgbHXrrDPwlE4od8deRQYLt9IlsvCqgesMmLAVxB+igH7WGTcY/e3lLHJ4rkBgh2p1QpUBRb/cSQsJCbosFDkalbJigimldVK7TIHKSq2w8mezku9hgw8fXJxGdXoL1ggma52kXzjP78l0d0zMwtTVlt0FqnRyGLPGEjmICzgSp7XPFlUr7AeMclQ4opqwBFInziM5F8oJJ8qeuckGOnAcZZOLl1+ZhGF17pfIuujipwFJL7ChIIB2vlo0IQZGTJPNa2YjNcGUw+a/gWYLkCp+bOGIYhWr08UIE709ZEHlUoEbumzgpJv1D0+hWYNEpj+laoZIK5weO2DFwLL6UBYNrXTm9YvvxeN9U9oKsB3zKBwzFFwDgid5ESMhy68xBnVa55sCZd+l5AnzT8etYjIwF/BGwEx1jjzFv32bk6EeJulESARh8RZ48o7rKw67UZpudPa15SDnL8AL8xMV2SC0D1P53p190zhCFkMmEiir2olwxcJppl/kLm6/0QSUQLNaxi1AC3Pg1CTosX2YQr73PjEIxIlg4mJ62vP7ZyoHE55B0SX9YrrrCPtNsrJEwtn6KOSt7nLT3n3DLJTPbLulcqQ1kETP6Huts29oP+JLEqRGWgnrqMD+mhCl1XCZifjgQ39AeudE8pyu2DqnYU3PyPbJhStq1HbP+VxgseWL+hQ+4w1okADlA9WqoaRuoS7IY77Cm40cJiE6FLomUMltT+xO3Upcv5dzSh9F57hodSBnMHukcH1kd9tqlpprBQ/Ij9E+wMQXrZG5PlzwYJ6jmRdnQtRj64wC/7vsDaaMFteBOUDR4ebRrNZJHhwlNEK9Bz3k7jqOV5KJpL74p2sQnd7vLE374Jz+G7H3RUbX17SobYOe9wKkL/Ja/zeiKExOBmPo0X29bURQMxJkN4ddbrHnOkn6+M1zTZHo0efsB23WSSsByfmye2ZuTEZ12J3Y8ffT6Fcv8XVfA/k+p+xJGreKHJRVUIBqfEIlRt987/QXkssXuvLkECSpVEBs+gE1meB6Xn1RWISG6sV3+KOVjiE9wGdRHS8rmTERRnk0mDNU/+kOQYN/6jdeq0IHeh9c6xlSNICo9OcX1MmAiEuvGay43xCZgxHeZqD7etZMigoJI5V2q7xDcXcPort7AEjLwWlEf4ouzy2iPa3lxpcJWdIcHjhLZf1zg/Kv3/yN1voOmCLrI1Fe0MuFbB0TFSUt+t4Wqe2Mj1o2KS0TFQPGRlFm26IvVP9OXKIQkjfueRtMPoqLfVgDhplKvWWJA673+52FgEEgm+HwEgzOjaTuBz639XtCTwaQL/DrCeRdXun0VU3HDmNmTkc6YrNR6tTVWnbqHwykSBswchFLnvouR0KRhDhZiTYYYNWdvXzY+61Jz5IBcTJavGXr9BcHdk/3tqaLbwCbfpwjxCFSUs1xfFcRzRfMAl+QYuCpsYGz9H01poc1LyzhXwmODmUSg/xFq/RosgYikz4Om/ni9QCcr28ZPISaKrY7O+CspM/s+sHtnA9o9WgFWhcBX2LDN2/AL5uB6UxL/RaBp7EI+JHGz6MeLfvSNJnBgI9THFdUwmg1AXb9pvd7ccLqRdmcHLRT1I2VuEAghBduBm7pHNrZIjb2UVrijpZPlGL68hr+SDlC31mdis0BjP4aZFEOcw+uB17y5u7WOnho60Vcy7gRr7BZ9z5zY1uIwo+tW1YKpuQpdR0Vi7AxKmaIa4jXTjUh7MRlNM0W/Ut/CSD7atFd4soMsX7QbcrUZZaWuN0KOVCL9E09UcJlX+esWK56mre/s6UO9ks0owQ+foaVopkuKG+HZYbE1L1e0VwY2J53aCpwC77HqtpyNtoIlBVzOPtFvzBpDV9TjiP3CcTTGqLKh+m7urHvtHSB/+cGuRk4SsTma9sPCVJ19UPvaAv5WB8u57lNeUewwKpXmmKm5XZV91+FqCCT6nVrrrOgXfYmGFlVjqsSn3/yufkGIdtmdD0yVBcYFR3hDx43e3E4iuiEtP3Me9gcsBqveQdKojKR//qD2nEDY0IktMgFvH+SqVWi9mAorym92NEGbY8MeDjp553MiTXCRSASPt+Ga5q7pB9vwFQCTpaoevx0yEfrq9rMs3eU6wclBMJ9Ve8m6QuLYZ58J41YG3jW/khW92h6M/vbFIUPuopZ6VVtpciesU74Ef7ic8iSymDohGeUn4ubT0vRsXmbsjaJaYhL8f+8I5EiD5l680MJbxX/4GYrOg4iPQqpKp0qddSu/HKtznHeVyxgTwhfEORMCwnaqetVSzvidaWN9P+fXtGXfEP9cTdwx2gKVfDdICq7hecgRhIs0qlCt6+5pGlCc6kWoplHa/KjP+FJdXBU/IDoKMxRjFhSYkggIkhvRKiN/b2ud8URPF+lB87AGAwyMjr/Wju2Uj5IrppXZWjI3d14BdKE2fhALyQPmHqqA+AXd2LwvRHcBq4mhOQ4oNRWH7wpzc6Pggfcbv9kqhLxrJKEaJqA6Rxi+TDNOJstd5DoRVCDjmVspCVyHJsFEWPg9+NA8l1e4X2PDvOd5MPZAGw6LRhWqeZoSQcPf9/dGJYAyzCmttlRnx0BfrKQ/G9i5DVJft9fuJwMi3OD/0Dv1bRoxcXAyZ0wMJ6rwk9RjRTF4ZK8JviCCNuVt/BqQYiphOzWCpnbwOZt6qXuiAabQWrS4mNXQ7cEErXR/yJcbdFp5nWE1bPBjD0fmG3ovMxmOq5blpcOs0DtNQpci1t+9DKERWAO53IVV/S4yhMklvIp0j0FIQgwjdUptqmoMYGVWSI5YkTKLHZdXRDv9zs+HdFZt1QVcdlGOgATro3fg6ticCrDQKUJC7bYX50wdvetilEwVenHhlr85HMLRLTD6nDXWId4ORLwwe5IXiOhpuZTVTv+xdkTxJofqeCRM/jcZqQlU0gFVTlYlfwMi6HKR2YG4fQ8TOtgR+yV+BMZb6L5OwDc/28/xdfD7GXFaVA2ZSObiIxBwT2Zev637EuvpM6rxcogdM4FJFa0ZhF7nrqtNsqWg5M7hZMORpjd4szf/wS+Ahs1shY54Ct5J1dOBO4sdEtSnRc0P9PhgyOCt6aQW98R22DpAcNTDe72AHK40vutKTPfpokghRPuGvz0dulBPKfC3O4KVDCyWrJGO7Ikdu06A0keKlVfi0tGcpO0NhzXEh75NHyMysAMV19fq7//sPC0For1k2uFEvq8lwrMAfmP7afR69U2RqaILHe7glpc8HmVf87Qb2ohsw+Di9U+ePdHLecS66MhB/0OwdcXR5WBcWTZLGq/kiAaT+bzkjR8GIpWdv6pfIgQ+Q0xdiKvo+gNB7/Nf9knNJGxnh7LeZEFtMn517tNc74PPS0M4K3I6HHZqNPA+VZcBc/g5a2ARyqKrJ4Z3krsuA+VOJJz2KJpBMgCCWFln3u7k6/q3DETAubKG/pt3ObaNT0NI0Qug90L2ip5dHnZJUjPTvK5E96aX/4mRU2u8n8kh6MKbY7ANBro3huF06U+JvfyELQP25oIaj+n0ITQ4KT9rXZD4EtBIOj95fYNldDN3io/VMIvWNj9P/b95WEMq8UAVfG2XG0N6fSYdnBEC7sUEbatbDICH9qA8TTuW9kEt9DlFOZFP7bdfYLa/khSY8W5K/AkIIAPXtMvyVKyESjKx9nfragssxC0jFMVY94d8lOAwRocdS/l/P43cBGa3IqDa0ihGPcmwS8O8Vj16Uy55rOrnN0shhRJZdW8I7F0Q0KeHc35GFo4aJOFc25gNafBu1V/VO0qS4Qkb6wjRrnlepUWjtYyaDABZceValuOMtoDdeIITWKOJiwGPpB12lQgwkmXh9M86podb0D117mNQ8ElluFvbaS8RTKQ6lyj88dUwoJU/ofOeubhoXWBF8eNumkVJu+As3ED/AvLlrV91UowIWI2m8HBG+a3k247ZKAGYsOcWe7fTWqL8eqwM5ZFuoXbeugPKuMOAtOsN+4dSwkhrSAlfGNTzFwEmCNWtzpa9CgPbYNcmoHtO8pj8qMvlGET6nrkJoQ2lp5MEUV1E2A4ZH70JUlCLXvqTIpZlzyxdr5p/GZiD1/BuFOGbyfFzhuxaC/l3lC2jjt6GNRBa06AqqPlYtdA7kiidYa5Qi0/XpXiMDyMXNOj3kmJEaXufW0GO8+DF8OoMULX1vvjCePKNis4AmxQKLCF+cjf/wyilCJvuiyLVPSdsuRTPZ0AhpdDF/1uFmDwG7iP3qYwNsKzqd3sYdnMolCOuQOIHWy1eQpWhuV+jmSeAC5zCc0/KsOIXkZPdiw8vtB33jEBpezpGDBP4JLY2wH1J7Fzp8y8RICqVd25mDT2tDb/L1mh4fv9TOfDH5dTeATqu+diOZi+/sIt18hiTovPsVQVaqXLPRx/4R/uH/86tBMcF+WBkThKLfblcVCIECc8DgNRVX97KdrsCeIK+CvJZMfwrftcDZDZyp7G8HeKl7bPYnTKX88dXAwAyz66O2chkPDHy/2K2XcT/61XnlAKgPwtI8yP9Vu45yh55KHhJu93mL4nfo8szp/IyDjmFHtSMqqoWsj8WaVhbjXgzZxcqZcyOe7pUK6aXF/Y32LnBOt0WN28UmHRiOpL525C63I2JQPX8vvOU0fz2ij74OeJ1Apgu3JRObfdo9xGDpp7cv3TdULEfNS6Gu3EJu7drBsBsogUqUc6wAUW3ux0/1hLVI/JEKJrAGm8g72C2aJSsGAsKFW4CBvBXVlNIKa5r7HvT1BeGYBfxTR1vhNlFFNN8WQYwr39yT/13XzRGiF2IsfE8HcN0+lN1zN/OnzekVBKkFY11GgrK5CLxrE/2HCEMwQb9yOuP2rTXiZzTEETp/ismFGcTWmbM9G1Sn2D/x3G74uWYZY4rgKB2Zo2bTKS6QnM5x1Yee66Y1L7K44AyiY5K2MH5wrTwxMFh+S8LzNQ25z6sunWZyiRwFIIvSnioltUXNiOr+XMZ6O9h9HcHxZJkfF0tUm6QkU7iJ2ozXARitiL86aqVsMOpmvdIBROhUoanPtCjgft8up3hAaKpw9Qs9MzYtBA2ijHXotzarkV3zKEK0dFFQUwT74NgCmGGuSCEDmFCezXPC9BhyGhmzNa6rQeQQz+r9CmGUZjIQEPsHwe86oCOQhWaHERsv5ia9rZvJ//7UXO7B329YUkLLAiqpLRsVV5XpcfdawlJqi/BVcCqO6dr9YJTFFRMVGhfUbB9YWNvYPY6RyaydAFYq1YIBQxuNAGfYWLMAHtt2XRHoOKCLz+qf5HCVBDOPOktQ3SdJBfxUkaiD585bmTzMwU3oeXUHZ55EC99Kz9kk4ZXMIENwVVpqW2JmGIcUiutIMj2KkpjE2QD+dIZUCxcX57kH7hiuUPnKCTdaw4KN95XPeFRvMcvo5L8LexWqvaJPECzwXCs/4XPAlSMpWUzBBjK3pEnkbueMkMJQrYcnXf7PjbAoJra1VLX4YuscQLpaeYWbT+h24hCFrfcHjxxx6WTSe4AGY/KHRZCQKqTuFWt0D8RmGWmvXSdg1ptIefYPshuIVZT7CV4Ny67fvjJugy0TNYHqoCO45CB88kxrvIsih19DqjD0UqiJsTFPcGW3P/ULOG3nb8CjpgVTIoa5nO9ZYEX4uEHu8hLXrJPjV1lTQ5xTdZVagg+Wj8V0EE4yPsTc345KM6lVXqLiHtm+G6edC4GVEiPgd98g+twSYm18gCsPnjqlLcFm9e72CLJbYD+ocIZOxuVjrX6IKh9fh7WqdIZ66x9PWkDGOVVGkx7jM76Ywe16DX9ng205kg5eq+R2q2MguTJxYv/wWHliD9mOYpzZKNXYC3Wr4iBGkm54hBwkPzFhiX/VBHdVH/KJ1ZIMOHxIN6arKdxrm6EBsgwDt0mPe0MX1HRUMq8ctcmysU6xX0bzM1J07kAvq33jw1q0Pq2cyMWme8F7aVkfhzZEFdyi8fVBQav0YZqvAjZ83WKH726rBx5Bn7GHFthR6H4lFsltu+jWmsAibJ3kpWMG/QbncU7n9skIBL0MuXXtj9sJg+4Dl0XhKJ1LcrMydaIgyrgZgScP4k8YQvcsBmD26X1iYXKLzMYfZn2IfRjznsrJ1e5cnl/3a5xiNoI6n1x1U36FWckJbyx+hiSZg0QqAqeeSvzFYMlZ2REnO/a6yoQhu7PdHMYEPFIvfyGeyCU8e7rpju4DrlOhszj9rOIpNsvCkuD+TLyf5J7D/wsPkBpscFVI1q7oUSU9bN30vH5AqnO7bsf+9rGhtVjOJQ32H9hHSAzR2ape4L0Cz4WxaySm4jvuGXwkFp5NMMLrgZ8LdA+5uLuyxO5SMOmJNDBcbbLefv7z6LyxBwltnfQLd7qqpG1MmNcoLUcx73BkNF/xpdS0cKd6G646ntChXSeTZJJTFYGw39T7fqXDPKoG2cF7/ZcTvME42gXLVjTqzAER1Rt5m7GYsh0X0+XgOeW9MJqE5j/rpGzY6vUu6ACcCTzDMdZHiWELpDnvgE1hmztLcSYz0MtNyUBLqvylUJJnJu79Sku9NMHCTkgqozTnhMFfduV2NLCSYvAI5HUvQp1h/M02vKFD6eosIkGTg6mujUo1W8hy5Knf/erkBQC9LzNqPAYCgR+hczgevta88NNqSlBZryq9QNeUK7RpbvHjoNhUKAAeNYH55LeTW36KyFaXdAkBvyNP9xmRuBokPi2OhqDby6IZ61mwfzG+GmACkS+G80A4WGON5izgJWeeDK91jzusfOi0RmEsVJXwbVUr8u/J2LCQaMnHhi+wJTEPN9tS2b6W4GRGCNmtjAMgPsP357nOeD3H2tcDAPu5xQBKMHf/j4ZhXlkvvy3YmBJsjsd4pSOlfPZCnw5JvzxEXM5JIc+E2mU4CgB0mdJnH4NEsCHYNeVRDXFNuyZUE4nuvaJf1h+11AWLdAZ72D9XNRcxfb2+XHZN/SN48U7yl+sNZhg5gn/PD8wkBtnRj1zBUPIWnoMP6yGUEEzuT+VaX3x2jEIZAZsr3rs9wCfY1Ss0EdIFFzBbyruUup4EPanbSYew5tf16/ZWVup5iykttuqL4xoC/jdZWsAZeSfDSd3fP9kbyAFYXkf0Q2lmxaTkKRZrCo9XCoiUG4yP1URJ5G7+HSOhhJp0Anz0N07QZtyFUye6rcgiOFbtyoO1lkuV0iQ602MTyFK9xLqNHtNy4cJaTO6hjtiwNynVc34ZA6H7k8ai6S6eF6jIG0xJx+JfP97lzuCZr8vU5SIzImaNpiQhyvDbz23//PJcOk7hD4iIvJzfIgOGIR6ZPEJpWHZQoacbF+omeHw8aWHaNOfaIyGeG4lEryMfhtNmWh4RAIpn8dLs7ZE2eTVDwK++xDoSUgh47WDmKlZ/k6OosEUoQjk7Q+Kp7OxwgMFShAv6z4pTW8loVj2+qXLQ0T3hmIue8qHy1o/HXjm089m71t6mrrUyDftqMYtmfvQXKDlZ+K1HR/FkqPSqcjGlcPPIwbMw3wIFKBdVMJ4pFLt+oOIkWZMw8pkoYZ3byw4LmAF+7BdicGXFcb5PWtDw5XNNVc6eB9dv0rAEpgr5J+bLr010bpfGw+IkRoxDbkDFmQdEQUSElP5bViLo1ur/23KN0jEwl+rGC6AUMKxHcv+T9F1Ktpn8jSSrKxJnVkK8UD/tH5DN6nXB8mjUdFU539e9ywLtLYCwmHYVEVqnFmdubduaSd1ivIo4pTsX+mJcOAkrR1D60RIoocCBIdwJhCBM1rOE2XSlPo0U+khALvw+zfxYzwzd4roWlLJkZheFRR8QB8v4USwmAcDswUZ2P/7v7Xa51Fs7orYebYyww4YW5869Y/c6Kq2eTR9HLSjYuChTkXaDygoo8nz/yJ0KzfX8oowaNAwz8HvQdlLU9V9hjqYMURyYvPzZ60G0itmUdZwB+sY6rUkMAZZtWStbDFmnk/dQorhwr3121XQWffrK3as0g29ASwxbsZ3dZAq/96b7/XWckbjmo8+jwdE680DzoEUUivnBgowMuBQxHXoGyp+w/cSGY88rWtmwoyNNIvChs/QsZRnbdV7y8x7t2RkliJV/j8e6qfctrTsMV22zoqgQuTSNFh7U7p/Q49L0kygXNnEYXCBDgi5BeNWxu7VjULcUHI+lGj+OTCEATzWrDmaynq3wT9IAejtvh3esCu6sEu9JOsXxMDpqxm4Tzl+pt2Wa5Bq3TM5TKH4N7KLir8FGIPA569+uJ1VEL3fW8Jyigz/nEUjAVYrdCWq2MnS4hQVgcvXq9aF7Xke/k++rAtIQqckPNwjKrV2t7HCOrA1ps88Y5Rw1Zp+9itnB71j8tNiQc7mV1kUCQXkoi5fOsq1uC6hUPUL7Z69NAM6lg0c/aeiifHoi35v+pVBh7CDM1XfvYpiK5JIbIQFHafmnhHfRTnMagKcjdE7zzgtxkTPKVrObTySTT51g9bB5ro/dzn/sB24fNM2LGJuRQsmC49PLi1jTRfZaLpo8Txxxczij5Pl2vur+S1wQW3W5qyVcIUySZHtFDQHv+EYDoZG1T1J7D91vEIV8dHzUBzW1UyuxRbP+M/CM/vsas6RzmS5traXnQ0Jzv9hYXxKHcs15TQCP744XsLjzFjILYURXFnhM+nnV0iO6nwls9TR4tlz1J9/NvE8FGg5mgpZA4htS05AK0NnU2gxuqf2vjCyWlm3ypKvaX4vxh8Um1MHGB2NTeAFhbDyGm+5w2zqJAWxVlj6dVePb5yR+aMhuz05YubCQJ0BOtoYQ6PoDoW5fCwCtXj5SHvCgL/3B5z2mcXWaRTf8/GsFAfX/ntdWZWFc2xg8MJeenwZ4dZUToce43If4zVb1ex3BMAWGhgkPwR5EgktZhW3Yi+nsnZTUr9FYI160YhAraB0zMV+ouHz6hYm25/ETDM0MTmcypoGgZISSkfwYAQaHGY45yZ91K4A4Mm4fnbMk8GTc4orypT3NLBqAxYdcY/qCH82PpIkmVOEHi1NoYaUymuImLLcib5pmd2MHTB3JR+4rLdRc3gtQ9zeFdciciRiWviu3HkqaLSxJeI2rgc7OKQslItumACQow89elXmi4P3gTZeCauvMH5nF4VrBcLjjwGD+KlKqe/RWIEgT2wGqAgSuL6b+RTTPnQZzxZ5y5HQJkEEKJp5NfoB8hJBM8qn6xbOFtyzBjVBrwSS1zCJR3lEc9ODQ5Wu/xct9/2Q6qLHnmNx6XwZus/i8rEd6UsVxGtoDrm+Br0L5oUojlwdcqyVV4PIMsR60JhZwJtgX7izQWj+GOeF9DA8Wexdmv6DWjgR8LEBp9YuPAM8tJDu3uCumNqHnF2ATYX/tuVO55OgQuiUhmDmJbF9jJyifBRtxOVI9DCNLUY71IXZYTuiYcnILQ/XHuVJ8aHDStL0N+3eYNvXwHi2vEiTPnBqzsC4TsPnFVnYY042j5i7C11AVdBZ1pGSa52jM9dIL119rry0mgGxFzI8xPs+7bmMfYKh37A4HtA081olG1m9S4Zch2hoNCGVvVhd6UL7C2d5hKIBHoB+Uxarq/4aQXhh7IWjSj+ca7Vhqb4+ZwY3nHXh2S9JH4XZxQojbe/eINxYlozTYtT2rpU/xbj+W2hXjFQ+z+dQ8wh9751MP0UpjutQdxz3/FJYAEG5BF400JXWCBs7KrCRf/l+F+d9EuwVk6thOPDB+HNS9iWlLmDgXvY6K0vgiyoeA3An+jWufdAG1suUMBuJT+/w0FNJZbObUT8c5q5WtQxASQF6E+/u8UwVBs1eo8jTamCrcdhZJlADJbqn3crcDHQlBQNGq7btcGKiJXW6q0cn3F0xzf+k1JJS2testB3rx15ZPTDXm8QV5XE2qxBOdM2n6t5YbxyNOmEdsHx+hMp+y9pWkcgw1NikeXuafJvzcjaNwE1Ad6gG79S68aO7jWpKgBETYLmV4ONHhBk7Be8tjf2WVvWMDQvQdOnk448yeMv1tQKU1xev0L171e/qxkMZbmkfKnd29XRCK2hgNNJhwt1qiYWZGKz7Di6K3fGDT7DO2YQ7WU33svE/WKGbWQEvzUV2w+VNYDocI4yxQ6i3i4zU2TjmjCwu5Pk+Ja9HSwLpEoUswq3tFJ1jimthgMXd7KjSl6Qd0K+vxWT8G4/+xITHsWDGSfQTSdFQth5uVVfa8wrkDZHTGVgpJys2ik+3I0dSf6TNo6A/sVptyY/kx1hdAWKPI6t/xj6s+fPMU3hg1vkEB0RRHq/tCy3KUUhzU/d0JKxTyjvUms5iy1GbOFco0NA4t83SK9sBmtLWm4kOLLflyxqgQYP08iyXwYXzKnlQ6VTipuaspSJ9g5H5Lu3eLMnPKbhcwuEg0VZ80ppJWjUnhS3rL35erzysp+fJhxsUs86m28/UwW+IgrS5Y0zWaxlFJ8xML5wk8sg1ragF+eNajyI0Y4mwStxt1RZH2BjaAhvu+SnNNIK88thEgZEsoHv+ii+OMmXJL7dnAiINVDz3tCnqDgpQX9OguNGgZj3axcjq1UgxDw785yNIpqNiLgv57399jVmJ0/RStNswaFIs6FtnkilFZldxj6m562jL4p5g3Y9XCiXRJX6nq2PGJFifFR7EyPG4jDMnBM4t+O8ZpEp3th7TCxEw+ZG4afHl4sNFaqxyLh6+979tt0Aq9BrqI+CS2U7HJoKiGmyVU1lFa3/0O5mNC1bzRgNMy+GXyifLwJP7FwUSUmxmVRpn+gnXWoIuswPutsiciurvN6lsMG7yqEc2Y5ZI3jrPgPq0xEKPZpF7teJa0TQn8BQL4Th+hjv2ByfwKookyXEmj0d1KMcsmfKaeKK3cZZubiYqmSCrnGpYTwgPk5itKucVtjViuswQsDR6TuyGSIHYvlz7wkLg1Rr0K9kV1o8RgABlhbLrN74cVWJW6TnfXN0q12JFMpUbEa8t1+j440FA+17o8qa8PQ9igkctVROVIfB3jU5vtGm5pYYHYSDvU2TEc15pIz19ka1q6c/7WXfF8+POkApdOw7nn7Kqz6V4tru7NXgnA/u0g6+fPRT3hp/QrDQwMsjwNCZxdWrR6pgCBDJNc7/KAlwC0UZ4yWQs0KsuwbbOgcTxQPK54wiXr7s+221hzZ8RVxfoRUKM3e4lpxHC83JllxlrV760tl06f7/65qhE1jhMfivAUXIXfRMe3uY/G2TpWYzDrw5Cm5cS062Bx9lhHq9gtJp8xZwAtSdSuW/Kd7+orEAiswA76N8ezmVGYgNaYlQ/xk930LAWAtKVBC4U6R08L45IohB1kFia7XJs0TcaT2zBZoLFuOGu4iJaoAnfjL3uS6gnRH7G7A+aT6ETlmkYUfgrBuaSLLDJfhPJe01PfN0oqBTeQURasl3N8BZiQSgdr0aDv3hPTiog4NSyfAUyy98WP7dnTDWQTY+Qwzgk1uxwRqHl5MpC/84Cuw1TXfRlgJrwPop10kCHjmffnFdxCe2J3R3J5j+3H/sZn3IUu3Suy+I+dAOMWvzwExNR3RRPVelZAhtarKlXPWNjPRIVP4JsAFSRXs3o/fSYAPaV/zP8q6DltH47/rYhCLdy/LrpOsbaLf09eACcClJosNefetNElkSFSuCgeY7oTAAl+8Y2zOXJb/bgEDpoDXfQqc6lnlBr/WsmVznkBS1M7ufiqpxvKXjwvR4WxLbh5NbMNy8LsnX4UiuAi8XonbSUcVZKQOWBYUecSOMj6jMG8gHu7WNreBHY90lV7FocDprSrSbexkAtMW9KlXcnrOyLnZdodGYdxz8aw71HztIqLhRdCOB6NyzHPoS2hDy6wLk0I5Jr2t+U0A+A7EsgSn/Ih03A5CspHnVF4MOic+Lck3m61Um+GHDEe4DrHBhmgtDlRQl1XJ/V/VumCHtUDDcZCkgjVMBOmVOGYW0Rcdi1ahdjhBcFlfjA+5cRjBop1aNDvdrf7CxkLVgxiCxhRctW8wczM8+kVmIrGtkaHGlr8y2D098HXE23r7fnJFUU68zyeyM265igNOGPzFG0dIgUDWN6S3ZcfMERJdWVvpGhVEHXNLeWqHiTcF3wOt0FbJY4XHEpmkoG9MQPJJ4ueQ01+MB+SR0rCSGzlE8zod19q75LlLWgzogpnJoD4gPxUYcX+Gpc5Ly4nk+Zm8LDXcNR7SNVxLh6NAcx8ekjb/AC7ADlRnfuHaHJaBodZr7RBX9FLTvocY6kY8bavdAkQicE9bbwGLkZu6whTCJ56lOvM39ijehpTOFqR3V53nQx4hfOvwRPU2y2w7UU8yiRbcyaX6jGJ9CRvl9ybV1tebTp5MMuMnwLcx/lven0w9T0atJuiUE2WtYGiVMaP3EchABl5AsyaCpu/BKAWDFvU2vaCL2/fJBKCKLjxG6xzT4Mh4wHhH3/EqsGSoQAHu2wbHmXHj2LvoW19GXDa2oyeKRwGG1PU+S7mE/S+UmjHiDF1oqJ0R5QsdjAZYN1MzpNX5YDqWYfhfdjAXyFQaVyGKkp1oEGTR8MK6jaGfRDFd41u2Ex8ac8jKPYu3pXsk8gu+m9tr1RVzTTuDsACW4S1h32yFHX7qpXSmA0QVEcR8W9j2Juu0pcYqTmdis88VgT3gq7iYue5Hx/3K6hFQa9rZrNSDcjaSQlNn4LSqs20bypnKqpzvnnxjMdz5StbzvoAJKgVZa4DLCVoJW765/KyTF4s4YztmAT1c0pTmKJHTpa106FegDo8p2zD6uOnwpYi0vJlRMDe9wPT6964UfAf6lq3qWypUOx9q6BbKEYt7K3gWMXDNN6wAm1fNnSOnZ4JkbPq7jLQrl0wL1V7QwO/sXneKGfTgUL28I5iPVG9dA2gS7Ki005JUR7Vmw4gX4TJvy1WS74cIXD08LCF5obqcZwamuoZ+FPMJEck0TLHjyH1baPr55/Cy0ptDfRJ7d89pbP48tLMHG5dO11Z8xSSpPGQSgXDWmpsNsmm+MvxJjMCi7OFDHxxpmTtjgnOCq+c7Fi1DybfhAntviKccz+sj+OPKPYOKeYYPLvq6MpUx/chSvBccg9dfbeqetQNCs3eiCFZTU1mrDido/mib64STMgsa+IKLk9PyxGGbVSQB9GsHto6f5prAFIbRDSItDedz3t5+Nn69FFS0nEfmkF7hKBmNVce5xv65USKGBoHYxJyutSGnRIq7vMDsAMvirOEJOzNi5Kt7fypuSU2c2Npo6UH5jMOkePH0TwgpammO3Fb2FX6f11309z/mqRmQ949HHRj/wMzKNx95M9pwKf+UQkMEwisL3YVotvHhCv4y00Ui0Ql8dR7tGqFcSdYtmoAOuAodkBNs4PZSjAAF7S/szwLddFMdCyB/dWPgFUiUE+WmUUCjYrKfJLQfNNpQ4NKaF57w7Kp/isZVwQPUJyjJavN3fQNKU+F74jVBJYQEcEdw0Niinyea0l9PJ1/AcTm/LI91RZjDvLI81pnat7RKU2P4/TnIAa3hIEfeg4iGQ+wTDlURK6YjNpN5s5VkQW9w7sDYKU4XmjyZsCQLxztqd4SDQvLyuPDhURAJXKfR1c7tq3mRu4usFHPqz7HgS0X7kNxiWWR3fb3uVwbgKpmgLYkwKrXKt09COw4MjhxeZlDXKy7nNLHXAIKPtferWQnZLboonQXK81x+BB3oUidBehK1swSXxVbscj/LsfONu/xYEXYPM3aMqIYd+2hAnFvDHbdrJLhGEd3sG5PyxqhzejhQJo9wauFK3xmPYqxB99J8zYU9/yzrEZNzzbvPoR9vUlE3Ha4zspVDzHHffPZMJ1VLZkKqGCf8ZqupqMt6T+NRPfmPm2xeDgvzMrRJEL4/zzlu7Z35smvzbgeC25VP2CUrZkRxEi15A0769ojdO1d7C9OG+swj1ROMM3NgKdeBADoRMeJkRZcZ1FbQu6C0BS9NNSaoxtFzYT4lX7+PQ7BKa84yrN+ujVVef+SgnEie1G0N+eOtbZF/UU+wkeerWjloYqFiqo0vBnmxh+TwNMo9I/8lfU2XTCT0K4OoWE08ipyNHjxHvfhY6qa3x4HzdQ8+jkiO5+j91YkihS5memfpFREHP/2veN5XcRue2zCVuAub8V6vDlOvyP+PBm+owyRhMmng5wwGGIXsOkQekXrXpE/6dFjkHwwoFoj5bIFiqp+4wHpSWRbv2xGrRpd2c87FzMP6Hfj/3LWIBqFiNOAxBw+AAP1XqUBszdZhzOSQrQS4Ein4fyV7MaGsB0VsMF4bPb4lx/foTGQRJv45LpoxDd84xCawHaX7jpXUrOdkFxx2oUvY2xqpgIvcVufwd+zAnaaVTnEyDXD7S/o/xrrk4mgTjXhcjj5Rzrbr23NmuZQvpdNzny5MCR9bwvIRIqzOZZLsstZSCDYa56JTvzxgBs20dYTtTUbe21uljlWqGfSh2bYAzOpf6UguK30ZxNXgLHs6Y6urtxFA5iLYvlue5mDONW0MOtQjhqr8fRbCkYneiDkvzHkQVT4F9v9vxh2SIGPBH8bZb8ugo/BSgXojeSdNXbBAIDsB6DUNSXnwlu/bFLaCqSbvu4+YLplwO1JbtrMf9ZUfsxerAZjB7E/zl3qwgK27FswemUmSM4i37YAVhQSocuV8AcDI/CSeCDNPavESshDQ8A/lVIrAJAMdP/rHXouiNU8RL/TIvfQiuZEb6dkIKMGGOW5kT8vO8pivWnT4v7qmwuJo52AS1r/RyQ2g/7c9ZJgmMIzf0GvJJRfMNu1utRNuLWHOm9JIMcJK3qiDtVpGCDP45W1oTTMUnMC91kYhP0GHjhCW8V38xhjHgFFBfuWMsmSQ9MvNqKXiqtUhDAkIy0PW7YSKaKUv6zctAiIk+Jt17kG6LpNVOeMvJnlVBaJSkKe0HTJJUMvf8R2zna35/yh2wNlWLzIP3BJR5aRNxkV94ICOlycI1/JYRZtzvWMNoIpQrdNvyBuBydhSwhRwPo079Xk/XQZpbhzN/KK4NbdJQV0JIMP+Y5UBIM3TTYlFGYVjcvA5yVozkimco91Fx/eo+ydgAx1gMezTh+bYxCtXPYkMoPdtaElRusxlmdSV9zgF4Np+iylun3LVxCycAFxGCFsmARf6y4I6zXY0tx81aQyalr3/ih+ZjxGNWdhItgNLdEZ/BOIJpPoAveh2bKbEFxU/M0+4xqDo3Ox8MnNn8Lmv15NJigSvJV+y2W/ZogEXNiv0/nuFzZGr0pKujOShzcdkEVlMw8mNZXZCbtM9V+mfawtLxCTvo+enFWhJcFv8LVTFycDjPGBXRQKNN+z68HJtYdpH++g5WdhQpCO+DE7Qdu6TmZgtetrpU2ZlgpslOx+4hb3aXaqbdc92LCh51er8vm1GQ9uWD9+fAPRV50ixhgc5zi2Jsg1xQVxzlaELRWJ5biyF+eCwNV0oFnTbBHr3Glm9qlGVOpoOsQC8hlNG88fxeAekkCGnHFn6i5WzyO7ShDYbZ2KM4eqndyy01v+6TFhmkxgc0dndt7EzRCcEfBxSaWZwcev6MDZcuvSZQ9CNSd4Tx25TY6UAbrhikuP1vNFfPdZhCG1pe6vx4D6Ez3zIb0zDa42FPpxWvIpEeXb7YTcfZOahSpSYaWLH/vq0F3U1KO7ZxliZpoMBBYJs91IE0bOkrPNQ/USYY0qKCO3CU+AFbOYxzKWBkIglrX34377BZ18MKQCv1KWfIHEeguSpvrNH5RQOD4LeiH2gdx1MOAKphlL41F4RpxaU4dy8xERFgqoyICQq9XmQ8WJSokwqvhQM0fLtsvyCO2PAkJ3BZg5IqoR5q/GdTLgOWPFR53Nqw9Ma5vBzZcQ4+iZgetmKg5ZIn+/7Jbi+VlViXuD9CaAUtdEmnwWTS7wZWuskVvc/SDaaKV+Jz6HrZTHo3UrAu0IZDBkXWmL+mTTjdTb1A+MdhKkY/hvFNwXj1FzUngsN58u/kTdJ3Xi0hy7efR6faAOi4SKGaiOty8lxDFkiD9wq2GW1EZEsoWGw/WzxXhWDzYY8CC7WuLFHc+x19jhH+FiLXwDIARRtnkJPF2BUPZ9+grZ3tjqAWhhN3h74w5pooRQUNATy05A9HDLnILGSCtfESoSilqtqAIQ/TV2t3KhOc+teDf5t+DqZDdB8Ob9YXyklrSO73pR0QAxPvQj57c6FIR5dOciqeHZ2LRABMROo8Jk8V6JFewCL8TCd/A5MSbXLky1cW7mXobqgeEXdFDoEydKo5oCuyn+2JYI/7pIGFAzErlHZ5hOaiT17HC3zp2HpJwsIAb4/oIoZ8x8ak43Yp83Ermq55Dg8HxKGHXbXs47sh0PzQELTGFsf5eO3lYAuJjMneoYWk8W/3tW2WLntEKBZEW4hOFgo8K58Rj0vk5KLyezu1d8SO/JcuxpOJqFUM2sxBmbQ/9qqwb90R0WulpR/Ju84bQ5/fTh7po/pbBb7AQaYNdK3fatD3K4TLHAaa66MQzp/+ZGyCjzo5OXRzJ8UHyg/YpNHvvlOpwQIOjakpLHwGV4WsLDPjEIqG23ily3LL0dlkYQxj3Xx0ApCo35zYGoGOtIclYS83MnI5TwVdQ+Hg453WFQN694DaqhGaL/dm0KncXYqXLi5polgT4DOrzD4oSVhrkh8GW2PaXjOFDCLPcn4RQj8dRGIJuV81LxMPZ0UL6zpkaebhbFBxcRJe38UiTbUPDjFWk2jBqzrBvXcKmgdDcmRyJhIpuq+3DQY464AlY42z2EM0yIK0I6b+VgpanMfpdWo7OxKY8RM5tSJv340/qD8SxrYsybMuUkF8fHj7HcvxEPC5YYrH4LW1YKg6QaeFZLvPbrHZHvi4OXLKkN8cGQO8019OKqcv6QnBlj01e7qS5evoGm53rv+VmDxxCXDiOrDg+IaPeMPrn8TJ1oReXYI3yb+4HQbikxP5TQXHk4YXPUv95+KmkxGsRgTwP71YiMpqNXp0loHZeXRp9i3euKrVtxMM0e6XAoACwNtcc6sOuhZVb1htBLudzahrDFt5GkdlwHjZl5y0LbvSHwII+qYeDwRKTTzyXaInHIM+8rc5TrjUlPRVwB5LKFpQnV8e7vLv7T7V/iJTW9h9TnRtNCSGcofBWYm5P7wZcAq3AFamEW/GMbo27ldz0plt5HI53ddWkn9IuCZY+Iy0MATUh3YenRTbVgdLYtu893SuN6EL4e9V4NhlzUjI8nOS6B99ecyC1Ot8sDahQpWHbmt2YvWGyL3S9tEVLKYs+LnghBmmSl2uPWfqPobPwBHNLW21LUjfZb7jfLMTsMp3icGO1npK/rCsUgdBVKVg0Ys+/WKuTmVJoC8Oe5h3PK1TQhbpZ2ytP9nlutQPtLAEt+CVT90DfVkn7lHLOX8AfS6HLzfHeAhu1alnl19RHKV1LI0G7RPzYgVaSpX7th9f06uo2WpxjL86i/2uzK2qj/ClHbGDyQr3F9/axmq4kJ7zZFVXVVwfiFr5bhUGVZeQJHKFAcsnqPKsb8vHyB9SpFpT9U1U7D4aS9vYgqajxhC+hOkolJV2dKAxysCkWBo3SPiPUrSQYZxOWwWCoQzbV0oeaDEcgUtqI3nq9TSmpQ688/+wb26P2CHLY1H7q5lypXSrnwnnztq/jN1o9lyvLmLyGguV0VJnDCREkiUNrZqGG06MsyA+Phd9CuFoM5M1Pyk7S6TJaHdTw0ni3n5ysAup0kyxr65lFc81NcH8xSmpp+iOEtQZrH/y01k1rGMRJAGFhi+nDecpUlnrh+qBOCMZCcSCovOPJrxjZnZJDMLdpMVu+tBSVS1nKxsYjY9Dtq1/++riVfLUVhzofIcIgQQPOqHioELxU3EpCcZMoL9laa5YlOZAMEp5apx7CphrkL+fyKbBAf8ctwVd93FTo7F5Oc/alNsCgK6lHruPROtN2RybiLqx8P5LTUZXU+Aoyz08zYHasR3U8hPDKj+6arWXR9yWdJoMn45prCSURKKy3+JHgvs2Ot6v6GbEtdCumgCttv2VNoU3KOqUwqNIWHqYm4eMijTM9VWB7umEyp7UPOI8fduHJY0W9xSCZdvc2xMjo3Zdu2o/WZKDMOSh9UmLvo45IBppD2dG++HJu8kbfFdlwuIxk2KHhgHQeNKcHhFkYGRzL2VJVMOAb0Co64wvds5CaYl9ZmBm4zuGDeaO2eI1XM4+rD/HmZyRF62SabgAe8TF43VuMutigJJMfbW2UK0azGLFbOfujnHD+GGBYmSmOQbUCOY99HYvswBQA6r9hrc2jtsUUxLVjxnZ4JnIrTwIVdWCTPtpJpvlA7m01/4tbUMyz9mv1jdN1jkiHQCJXXKg8bJ+aqW6rbwbn5yDSHBTcFXIegrhHGAjJOZI1pyP83Z3vMYTAJoo8V9IwyS+U6OVg78+IhSYHDYjRs8FrF8smHQ9h4qAYxp49rRP2d5uxLAuP72GvZaYvfeLOkMrcg0PkPuq7NsXhMFmiZa6PKBH1l+oKHI5DBLdZCvCwTPdXqmnz8gLzVRb/ixLTSdit2nrzt0x+5rDeZT+ac31NKNskQs6noKlQccyD3UxzfVZFmcbpmrfPsZD0Ve34xpKWk/E9Khn4A5yVPVq+dwnv0EyYecPqXGU7R8suTW0A6NJWweLI3iSGDlQXzMYsSWkSMhFTfyA2vTDt/3wXk+mVU6bRNkZvNnyVHYiA4tmnNwdh/RVsk/EgSerfTIf5VBmuAc2IKSeL5Nbrg3acgFj80mI8SWsc3dNAGCBLLMP89gH5UnLTKq78d9SxQH/g7DVnBh/qnBdw5CDrw/uMzcdXSxWqGIFcnQZt/1aOHxUg88MN2w+FPx/V75gy2wzEVe6G51PQIR2tZsxbv62HhgjwtlzrVREw/yzlaAiuXC26cnpvQzWXp2mOgihyPCWqq38nEadX2T7f1Y5zGxEGBaT//IcL/BsquAJX5EDbX8X1p8nLWR2yyjFRvqC/jssoCJBCDJOsZvoBfXqQSEKhNARH1YfueeKBslAwLi24/wAO1BHptlf1kQFNsOPlDvlYednrEp3a4SAz/G7LIVEsZBu0EKWZu/euB/XKdkGonP6t6lgEcCOw8mceuzvEVzyoPnMyzrqoNQXJb9C8ZCXSiedKiCgNwfNkpVlHbUgE2Rb9WFScOeEad+T+jT8XlSc8rcvkIuhAv/gxRu2eb2GonLTyokjcGF1EBpCJbhy2H3lhL0rdZIw1okA5pBg2oRfQceXTPzhuNKorTEF7t1UIgDqIo7/loxyTgbtKu29o9K9KujvCqUGyPY7upcfiZLNBVKh5uXAAZjQjhlhBp0ukmO4Avxu4xAVhCtnsOIA/tAm94U3HEuSr3wq+ZLo8pyoC9EB/q3pOzQRyCTkozmJwo1Ln/2xEbtNnS2S0NUIS3yz3/mBIdxONHxqP9FW+uoGI1F415lI1nZwK0SoPA0+flaokBGEoXgZnO4GOExU7VOjdPns59ekmDxqNhEHeAF5i5N/3W2NC1XGFjTpqLrnCECiwVkOTrLtp2ehUIaejOG6+1336YQSKMSsL4zhUjw6SQKryVRz5Ldn3R5/r8AOi02RJkQXPdvPsl/FMg96E/cJmIFLmEDzr1Gkh9G3zisG4pqM/MV6XIz+CtDUh6hmJB97VzN8jaPSS90vgDjvnaNlKky2/zIhE9ObugwrftI+Oi2a4VVaB/Mwn3VmaWjsU9NOf2usbcN/GLQMjvfeU/YvyEERPKw1leXZWWk1HXzY3P9MUq6MZq1hkEgFzds51mv8mnp1i4pQprPwY0TId1szXwe5TG+R5mMD76nGPQr7/EhQWksjsgGs7Zy5QYvMcGV5tcXJR+6hlHFIAc/M6XjkKYtwm673Bi+K1tNO9i1YBePTur4I+gMsOK7f7980mcJXhgdWdhNzUN2JvFsvXq3zZRG2V30sJtJYxj0aUv1u4/ppVHi1iHnTY3gDHsrQS8YwMX5XwZ2gcFYYe2wd7ZO9swr0gb8zf/fXx8QWKPXcK1UdJk3760B/TMlpWLCbhkqVoSTsOqzgkmFmFteCCTGhNyvFhw1RrTIWzRxq8Tj5FirvKvtkp2GAVhnZ7vnr71pyI0rKwQbVxKZuqM7GAvn2mRBj5p8djlHUsh/r/eBECptpbbjP5nFyuN4mvQLZCaxeTkDUzd/kNGLIzBFv1CElQO+xmf7Dzt1f7GM1Bh+wLDCJZlhcVDXbtPuGssdEie3lZNiWcXMTjZtWAT5MCmpq6JCRuFSHZYGKcSFZ9kOYJfEqLIcWdzpTA+Hmu+ktgSUwXVSwkaa/aHdZXh7IOyrudCBalCZpgXGRNbhN2XpEY60DXXO1Ci5ayZSoxtG0WRCC50+XtgWz7qgX5MRA5S+jzXCYy7O7Nn0ljVxiBxQNCZKZMTqi6mPfy2LZx76uyRUXHjnpJJEimflHDUxyX7fFg7iJvSrsZMH6Uv2xbfQNx5eCbx3oKycUrBY22KPmgfg/w07CDVsw6tb5VxPg5/X38cQtXI47U7MAGGjO28II12T+PjaXHlstPtkUQNn0DKkCYis+kVAkA1wyAJgYKLGnKD3nlVCarYqCkNIZbiVwO2Ydjl7N6iOtvvbAfuq7VKZLo0jEdw1YdsRaHcuJQulgb51JyELzYBkP1hd03IDcZfPg5XmNvYQSOINsCSn3BuLtkCPZRalK7+S97zxvJHiJCZJM9XP785NZ8B8fqDe/Ot0BS3PH1ptErwxBtpgfOj4d/41nrSjJQf9bV1kfdBHJxYbHILxOsWkZvoP/Z4Sl0Yx3bDjTF96xf96+6uIoQ351Ce6DeTwTnkPr20YwATlnhskWIddUohklNITCq/07zkiEc3B58uiBG6d9YAc4h/7s44FN2RG1UuZWeojrOZIhElvDP4KqHcOYbqqS95o7ilQH5ONJfy+aYiB+sPpn35HfHG3duLpNvBjXc+Klf4IKrFHjeVty02xPTNnbdL4gtkqPqMLhSgR/fDXzxJbSScqewiF1wdVoJ/fGL/nGWZfVlDHOQKD+/i/mqwXqvNqxtZeRHwoe/bodk66B9soOnZp36gdzVMRRQsQiBFf+HXjRcrRf9FsGghw3+qoN0JeeMvDJrkSBPsESDai/uVOzn2Ohge+UVdi050fdWpsjP0D/QuTdYs6QyI9xnhU8WT2+KBKzoZ7Bq8fOdKPeLulUhJjT34/EOnUloqus8+pzqNh/UdUOhgTlrbkuTfsaIYDm87u/GNIl3N53uaU8bgaBjpz0jdu1f59K4KFDtwUUeEUoeYx6DEkWKHdi7dtHhQF44lbysk7PqERrsuAQu2D5tDMl7kFoGdI8r/s8rMytJzYBU40wqeFvTl0ZVLdOB6Ya9E/f8VPbGx5MdpYqYMLMyB0QxVdnoJ+tgAQVWfH+jtOHD3PsjuT8dOTSrupuvHWRHQoGI1Qj1Hc6k+Mg84FAZ/gzl3SEzuGWZKFwuo2D3EiG95D2Z1szTqAuFRmT1nEh20tkC4ysmXx6JtN0taK1iRR62s2uNW5rSAvMEJ8yotr3UhJe22brlQn8Gvcq1I0aODaHJucQKVe6SXyfcDWODMw8xf+2C7Zx5a4Qlh7pJs550DictL4OxcDXKvVmLgVWRwb3moxv4kcxzm89EERJXCl7X/BziBkGQWOHPGF+6K5NFJYOFVv4+NyFq+OPMaSWZKoydplufY+CYyL63T8MCMmwqLTmAE8h0prhi174wnx7DHZWYuRJSYZ63uz97AGOzyI3aebclnud77znbZetbWUripe+AadLQeZPtWsF+FNiaXCy/98km137lWewyc7Gamai1Hd3Ls+KMMVh0R3NKTQ08TIClDfMKwUGKy/7YZlJHU3uW60X0r74Afh02v5MJgVOYkjmors6GAaDU7yKHydfkXYd6nEjYc76xws1LDLWCNNKBtUHNyLseOyNDgmHiJ41lXvq638RzDGis8WIniOb/pbTs+HsQVGPi6mxG+CU+oflMR6/qx3pVP+GPgqa0U0lo8MVmI1cBgSnPGgrh+J+m9TVg8nivua0EQP7xai44ruC5gsAVOp9bLsDXfHQujo6IpBmpfbbU8PDavZpTuJtmflVQuOImnRQ5kKoQz2NBFjdiHH3cF9QLgDP5vz/W5trCy22Uk+TCjXjdbCCHB3rJhKYTwiyQUf8xu6yTKtIwrbw4tzFgXDODmWYEnnpDupk3b4AP3qz4AZ2En5wi6aZV287AgCF4vH8TlWLni1E5Hd93vLxSYLBWSuj3eXGFtWyWpBkIeKu+YsBh19VeakA8OePM0ILu6dYYl9DNIK3kU1ybH+A5xYhFI/EqSX3vtNs6V5eQgxYLvu0hYFjiG+n8JzqLQVROiVa8XNQDYJtDAetPFSuEtGI3B8rnbbrNo9TJn/z3lRYq0ecBIe7a03vLESwhKOm1bGTk2kPMv/Sh9wyCOmIore7JhSFT9HIjonBfi+gcdDLfFt7dpShJmW1gkcXmitWwm1cC480CraHm/or2MHphB9Q1bmt/SBXFqXJdcv5GTt3IS2fRgqThhInCjRkh7Dk1iS2vMBLSGtRPppb4FEu762JehUMQxxLQre365CKoJGvJwVde91XQ+bDp5ZsMu/QHmLgITmwGXSpQFQlQBajqquxlwIOe2cyfezaSHIoRNLcwjW+epnmAtmmWA9KU29v/cA2iuWbj9ZV7HR4anhHkjbxnzKPHnIZ7Mm5wAf2o/3xUhnfH++quS20TdhalHgNhusidPKWyKWV8ZjFLgb1fX2r7ifLyUtxuKHHIfCWXQJ/DKeU61vxmPT34MTi2Q9r7/sK1CYuHVqMBsgtfenn31bUzCoyPN89KiO5wHveqnk3uyHnJSUBVTQQ3NyRPmeRKTQvWEBZ4QWcSgMyZF0RQgvUXRcp6KflF056fwahSioP622TdcTVYi4cAwSZLWDvfjoKFLMowPQpzn6ogXHc93fFA5NZmnwslSuesOyNI1EE3RM8kzat6thkmpOiGmm69Yn8yNuxz1YuuPWekoybkee106T9WTPXo44ea9E5QH2Ig6FZn716DBa2FyXHG1B+YfnmhbEpANlOi61BoGO4+G3WMJDokJXj9GhNsFqdaLjA1pkhLP+/mGCZoYsxNI+A+sMvWyoj+PMWeR8koRz+r9pNVEWT70WhiAkNTrojdr0sBLwxIM7D4zT+cVy96ZE+ABi9CqkM9VK7iOfkJVp7AqCqQ9EZ9emn8rB8zfoQZUBrVd6YS2AqiTFt0nJ8HfPGmnBWf3Xi5CgyWoLAmHJp/AfTdHB0+Ns5DlhL6UJ+O/6xys+CWVKtL9S8fVHkpwZZMJn6jVtiUTtXjywmiVXw9a6f/G7Qd4tZtcoS3aytxXYA9aGGmEeBobjiammhUaMDicH3nlOkDvvz19NqWOvHC2SMv7OQHtDIykYerPuoLz6SQNOBtw6oX2Sj3ZLITBDcWNx9CuZYYVaE+vleXnATrwn+PnuQ34jL52tp85aIOk684SUlQ8uyO2t+eIOHndZ3oxD+BcMAba/JVxRYUAUZoEw3D80WWOz0/ul+fYbhFnffx3PgOy2LLiu82D5FMSpi+Pd4EkIFTgfv7p/0vnX1wp0VpNzyXs/5S/4z0RFS21vIF67k1ERTfFuhLM/8fdbKognohMqTNF/+oqvXXLuJB7IHeDdn1X2eParLBEpz8y9CAN2g5VdE7EimekAOhkw+tTzqeEsgyQL4iVDnWrP/RcBd6CDm16/5t+I1SAxCn9wo8knzmpg8DYP8V/vHw8Stu7cliAt+G/VR4XPNZXWF2rZBeQO75os2jFJrbtkfhN9BzHT4HGgXTjyTy8NGsiQdeOw12GjYKCyxP+34kRHZqYsn0pFvVubB0+/emKRgiGXNRWQwMSvAB1xvTprD0Zyt08BjP/4W9HGNfNBcA0Qb9qF5hdQ4dDqpKAFLoIW2gFEVKOganw3M9/4WP9ckP0/g6kaJDRurtxNgT+PjvWYEWlFa80wKYCkd/0ZChV94njjGyg0t98Pz3AL2AFAhvRRiJwdfRcQqqhWkv/o6X45d5w1YLJOye3v7rgta7Ya0jAl/an42ng5Wz4S5we7n2+1W94JnpoGyV8WW2HYjKLkKmp4hBKlNtb5y4W1MrsG/wfq2N5Xrz2kqhdPQL/YoxgCQd6Y2KNkADVu7TxugQRWVuNL0BUj3JRFyWNeCmB74Wsz54OPnbq0GFFxzSkoiJ3Rtq8yEJMKvOMMalFKH7YFHKjb2nwrKVfuUUuRtTfJDiBuaEHHoX+MUrM2bBaAsSdnY5PjqcMBn/wwojQxzt2MoOCC3OEArr09ghhsj2M0mue5ntQcmcC1R/sK3zfShGJuazS+mJUeKxk5u36CYj8+SJCq8ZEv7bNf1+BywGeDQoTDGq6Yh1xW3Suwo2O/ykazTPK/TdVOICyiwK8MuQpK+FX3mqSPzxfLwFJ/iYDjs0WgW2kqXYgm+gkNToB5+jYH83Xlt0cbtEmkkBaVGlHz61rVuWzrK1yjn5nYHKvKCrBPPRth3AKDQQB83fdrbgIeIfB3iHya5NPpEyxbzmtN5Dnk7GqrQ4uu4h3QSoHU+74zs31cWqIx4SZ2bwWLvIxUtR6gufZhNZoMcmSB5z1O9TKvHMORD+VmuiqzsyJKA1OaApB+b9x6u9FTvUkalgl0r7raV+wRqimc2D7B1z/OiSagdd5UME2igLGUcgPlMSX1VsKQp/9yDiYei87KTBA2NPCUmgaLwVdvQFFFxWp2vGCY/KCUvxt3FOu6xIgwS4Vybvbj6feUCkrQPpO/wPHJPhAobSj/aa5YrUvjHMcQkDZwfc9mvghrk/PIPvcJa5InhVBfjh3Xr9vIvA4ac+m+pywS/EqkSX55xgiyj0TB1EE0NT3W2CPFdVD88P72SpdFzHS/6XsmbGtM8JE/m8eojzd4PM1bNADliZ+XG/9hbcKg6PftVKyKKt/8Bz4lGsHyT0VKj2vDGp/qDGBajSHrqzmpEjW5LXsb5kTV6HgbMcnPW2dzQju9N1sI/gPVlgGmk0bHKOX2Ws1q4aPizhcM/XiJ5EZNUK6bZNUeFaUJVTvGxglRUY7vdnoVOe0Raho3huh1XDeTlHpk/2gBjjhUQXe8FN5A4zcRqkNtKpSVq0xyw9j3yQlQxq/Lnqklpz8lXmzHkz8sX9HJjHwyn8UAjblvN0ZFIk4liejx0lVACoKvpsT9+pQoLY4weMHRzcuVC60DUFkaqLfclS4UJti5WK4FE3dYcc0OilX50uscLJomlR6pXriD6ELNNBWOSMt50CJjPkyt3Zn/xj1dlPVP1t6XExK+b3jMoULLPOrEGvjELfAMM1qcuBb0AijkIuFca8f8xapUlkvLjmmJW7RK94r8HaPzvmHHSqX9MXdivNI4A+JHy0VCe79UZZJvzMGzpnsj+Q6k3EItDBiA12fTMlSbEOMAWCdQq9TtyUiAaAqJozMzryEg0k+yVHqCc/DyJcCE2V4WXIhEnsOc5c8f4ChWfUaONhPPWogpDs/lyVCvp3m0NSfrAJKNiVy5aNC9gZ6c9BqwYgj/cDO3kdam6gCjhR+akALFYmt4ixHkWxKhDTGs5K+CwRiKJnvxP9dbxRPCBHbiVa8gsd2GuiNHZD98MNwXMdMC0MubVodd7dnyk3UQFfCIIL1osPxY0ZJ6DvZXwtZ2I0th6aqlTMULVo+lhSIU/5qO63lTSa3MgPRJEOi0AJ8/UlZuvgqLw9dyEDQoHTKWOsq+6fzoAyvIpv14fLaY+braPd6NkSaq0RClMenK1QLH87NZriUaeuCo6SZ7/CfUt2K6VOt0AjIK2jR0vorf6R8+TVzxZb+QdLimH9pU5tQc73xW93QRPMGy/gCK+R+YzmV4fHK52GWBEBL05EEoTY6OYG1WWji66dWnVTg0uPNw839p/yjLxkCfdTaH+v6hVUCd6HlROj6W8Mil6AYGC7NI2+qkZvJh/dAw/iQspXQNwwWHr6slLIp0hBHYTDh/J7Ba7ZR6cp3iU4bSXdmzhTahYDev4yKiIHyN64EANhI5OHYv1G4KXfIOvQizYWchPhzQg5eVGNMxsqrvWVxjtIbkKuHzE+IcA2NZ83GKz0D8z5zmgRnoJGKigseP9TmMS7BgAqtqyixA/SLc1KEUWrhXOQ6kA5ZQRazp3wwSa404cppBnfsS8EsEpbr/gXyW36cZ9pt1RhzyxGxDUmnZeBz/Uf1AP+gyLIg9x04u1fThm2w/H1ZXGvVqsO1VqutV5gUhFkdkwoCjzz3F3FUr1v0njGYT2mSZYvoF/fSd1W11c5VIhkEO06US5wYRmHVPYXmZnbK5YHQ8pkIDJ0yqssqFK34CuHE8RWb+Dr4omk779QOOcYomAMYQ9ILt2KUk2uNlahW/IjGtenuGLxb/t3aFoVz4oNwMZ7iyp4td8mdzgJAfnCcYtklubGAUB9k6bGC5DSkf5VFarnGEBWz600VGR8QywZ+jIYFZbtKT2QdDOYP6k7D8qVgEZByGmRedZRWaQDTggLyNgDD6pQwEeSs82+hTxWypqwU3zuAWqfwil+mytzVnKztyvMFJyJwPFaPr4Z3mTjyxCR2Jv674JVGGMUSWb0l+GtcYtd+NBGChwr8mB2hlyccget9liJhQEb0XgXfgVRlHlbO+jlZ9CcAew0Nw+tRcWgNnz/GL9Kur7RohRhaYZBBmQA6JhvzkazHRcdZDn0zDkfBmYP1PfQjP3d6qqx6gE7vrb3lBKEfK3Y/nCe4COdpr23oZCoIpssGXmqE8CGpO2bEwkSN6uqeqR4UtWR+xsgOzNeR49PTLJpFEAkXha5YaecJ8t/KR+eG7/HKV23zPZAMvHDC1rdxQ0l+6wlIgZbUybjBe6yusL7isRuuYYwg4+8+4lia2ox8RCdvmXlt00ZshBnAIfLkSwIqUzCcsD/d1ZG6Az728L4FCIqBKpbA6bzkJ87lYQpbaHpwPpqu3S0UqNDCwgg3q9MEn02X16E4xibz/rLx7NMDtHcwMOt9r1dVU6Hws9TvJVH7THrnSFESgN5eBy53Nq2Fdb8mySTxz5CitvVE+ZjHaYS3hq9Bax+uS7TxMIT4qJE7HGdsHM1/9uPNBylhP04Lck39JMe8v2dPOSJzyQoy8m/8Fc6h+X+5/mBVA9jAsG4vmx/KdUW+NXxgRt//SS2Ib7aGILsjOz+ZZQu/NMeuAsP1pFRTN90rqIVULbJ20ZJlrjoZD1VxHEoDFFGVWCVOT3jGK+vFD06gc3yDUSnZ7ZHjGmw4ZiAglY2nm78aUpXxI4BfUHqL6YQKFDCazUIryLi53RczlaTh0ry7WN4WpWK9sPJ0J49fu6RGUMYZd3+NrRvEdOrS5n+EJOTkr4lNzo8vawcYnR/n1Dq0rCHu5o2BGBEHABJbsFLi/mlWFO1MjpvUu6UPJjXlXse6MtBROT/mQfyegWGmFRQ7Q/O+rJp471+tQF10+bvkExfBoTQrewd5UwhAUODpyeW+aK6vx2AroUo2bGBZ/ZjcsJFfMYEMsm47LdQSq7T7peI2Ex+4/9oIAJGfhidbXA9UYPNhxigFTg83CETNYfYVkoambj3vv4MZNtE/wrIfTguBNqkQk9ebLPTmY2U4UCzbYqPKO5vjaZXeVksobDAJzhVjoU7p9TdFmNMyLyCQJryBSOcm0hFk/pcwcV15KZ/+IIqeQGPkTbiY1haWSnuQYBeyW5uSPHGtYw28cQS/v3rToNAUGVBSQ6zpBt4CHvaOfEJhuDJYZCcxvPeOStdCzaoSQn9nDe8wDc1MXrJ0+9N9TAKcS6u8ANLCLY4UfHLGf884/LFIn4OLOlRcNl7FS1IJgu1/vLm4INkgHt5ISp2vC3MFJHz1zJnopnKS1AgJtCmhJRZDaW6wis8CJ0KAJW0Yy0+kWI3lJ9N8yqJht68FMNVgkgaAGi5LuKmkZWm+ztKvf9gT8hJrXZkM/QdHI6wy9BqVeWa7g7ZM1YLbUv37YSnLmGsCrl/UVi/tG+fZbzY4bGye0zH08VQpGmyd/v++fS9EtasmbkQEIYnmLZLxO+tNHp3myIGwYBZVXjlWvrCiQcsP/Fu9l0HWmLBu3gvuJ4phtJsXXllJdM8iZIQR8Z6zEMs+cqVL7+TYhxDd0c0l4sbyIEw6N+V0v3ZbUlidyekdcz/aIomGdZtmdI+1QUrrHw7eDXT+G3zbTZMXxpEgJc4zY5bH5az8eHzwoo8QUleUKpVRrsErGmSF6GPJ2OltKYL6/C4zx4rHdcfsrQTcWBmrBWMMiFiU4NGtpYeACqYafRyu8j8x7ltp3nxVbsPO0MSoaR8tv61/q+YCqHX3h4vy4HzjCYEl+4ZDtj2+mawuj4J0rBpcDw+spzuCQ2khFbks09lPGxK8HYJl0Y/lNLUxGLZ+2h6+EFSaD22bYzF7dk/EhCWh6u/v1HUVKC/r/Wl6JHtd1V68J9zdOTgbvJuQug4r4vUV3JJolQQ5tecHKqcNoYjOIs6BZTlfB+yHGfGdxTKsGxbU/4taKuH8Qpd/M7fIG5zebrpiDHV97T4jiUNt7K64/u1e/+erXV34aOjfddcKNO76EzIf1pfD+KivBsRlzlsjj17aDPq/lnKHQCLsD+3TK021HNzhZyuwpLRKS3KE0XH/0TqUOr3VqLMcsSZM6349QJDznPG+sUqeS6wwMWp28TAoDKdmjzW6f+2au71HsOzLIeWencRa5JapKkVTYpvwMIC8u2L+/hYGJmk0588rq6Nnqe041NMzU6lj1K5KmSj0ZRiVpzu2FSTl4PBYHAuhe5dtwnRQwvvNqIELVxKMFWedxxB7UO4zpYRe2x0zH4X6pI2m4g6YdCs08vR9B7omy/goQUYbUZA+wJamq7/c0FhkNm74Mp05NSCK1Dcy1+9qp82p8XVkUB4+SsVRJ/Tqtn8v2esmemr7zjCfjLicMb05JqNoL6zzz0KaYkXeStBrF9+T7EbZTo2Fa/wS5NhJvRoZc8QUfS46HX8HIZ8A6LK8zKtROnakAnEEFoonVlvYR71xYuBAXbjtxfu/bteN8WkArB3//qp+3btpi2SIMyK6rX03iCLnzOd2OrPnD6xqgVT35e6NUMpN7EJSz0DRRzyze1J+Dx3cfx0M577W84qifD51mZG8VNbBf+5PxmGGrGOmkO+Q41YnCkx51D+X3CXsNAjaz/XfcPJUXJ00vaQyfYDtmFq4kU1ZHdnep48T4IskzPsYT9or3rd/ubiYLqeBqjnGbuNWb9ZdPDxkeBmJwYTjsTU+VugQmtz5+C3QBX0piVh3d7BK+Hk4mO3q8qJVQXeIqs4hKuRvBfIwwUyKg9W1x8dv+EwESuk2Bgs1+Zc3wzx4eGasynWs3V360wH3fKXZFTckeHZdgtzTqcQPC2hCHhSXyFMyljvrneLE+c+b/YQ0XcDBam1oAPzvKmmcgER6AqnyC32Ic4HMP4FQN2rh4Y2ntrawByV+9oq/Z8hdwQEPYRYiELBCnuGGXDQbl3ZLuUo0vfKU/AuMwYfNXmNM2vkn/GRrpc5WDP+MEL80tbJDZfDNBRfpfcvVpf75u0LrkIIjnU4adaolZWzB2yjIVwNrF7zF//n4N5xHeaGc7Vh1EYRdc0h2l23qFvLBNQ5kHbmX8Yta2Vj4DU6eBN3XyJBvJf9iL4x+hw1hx/7Ej5U8EZr/Qhgoni5r9PxBfU3fdvXICGW9DzST7GV141bvyMDXblFG5PizNjJUVAWNSxIAStz6+eDAbkYeAKTj6DIR6ysFvZAloBLCgSdMFd3ol/WXDQh3BbBtLqO9hp08BfumZjLpTJGRAIHzDizXZfhbgqejNSS27BIXQLV0muwzgXGqYt9McSvtLWo1Fos3k6Nu2qGyFftqQyDz0/bmgvtZyiFce/SLYnjt2Q9BnlmUVBWOtbDPvUgOSizvJDhdiSkbLLP96MJ7dKO3eUK2nZnpb4s4b2XGF4T6gC4qo9TDv9z2SY4Rffb/RjPs76P0YiWADpPB/nQjC2tDRlxt4sdNCIjmMsLgU+cr8cpyaMSYI9maP4HHww2jTPkGKvF6H6+DFAF+jAZKT9oi23gpZ2zavE0xXPkF7a2FTNJ3bwxvsJV+o0fXZAkmouYq6B2+6ccHhnUIeL10QtZaPoZPJB7/Xry/2Nv+JJFmQ/p2NSiO5bYGA8ej1vh5QlWhaX3JMs5gMBnyyIfXIMf4im0WEUnCPAJzq9q04Tmxzy7nGKKEf31kAp6IFk95aj0AogL7iljLVJlOXNvV7BwZn4dKfuZweSEZBqy+Mvual0TVDHiwHuIuXbvaw+OkU7aeAfck0Hc6H0jgt9g6Rxb6dAuaiKEN1cUYtD88y0b9Arq1q6ML9B20/FunTnZNF+IHgsg641FfllDFpQ+dqrIPKQ8IkLx/2ppx0ivQSrehNaf5dwtBjnPHroRGzG/RWOdiW0COPzepxIqcsWjhfmBXSUD7YCvPm/qTGcSnhcriFKew6a5s0AgK03I1gEifX6y90cJBY9REbQ7yW/XB+zAXN1XZQVEs7r+0ajtx8KvVBKJksKj5YFGdhEennMbwgCJJIMdt/pJD6FIcNVegt2LiQS70DAJeiNNG86dQVNYNZmYEfo8oa002xKLh1+rHlBX40iY8Wlv7FqswQFktpyLn5oSdo1jBRz8V3aRIOmhSnrs2wxGwGBEVEXvRm8RZVvSQ0xlKMVWs9Y7nnmJ9jEVuDL08D2ES3plzvCNP3FpKQeSknFeVBXv5T1Yk0/X5vdj1J1LYa6Ffxxrv90ObLHARkCI+tz6+0i5cZTinvgIYLMVnV/OL+m4RCsTy/+9VQPsYv6X2qSSlVdQ3KM1SOntMNUBpb4C0MsDh10xHQ0cbJK0gsR6X93ru63BDYbRZmPISt1casVwVVE7+u3l55XJGJ0Ev6S+2zpNqOAH66RuzpVskXE6X8x6wHOfp5PAI/7YG3Zozh1U27IXGEEKIm13Rt/nTE3pKWA7i1NFdVQKQ0CNdqEsBkjiuM41dd5rIbR4DMnoDva07v1esxYBGU4JWJUJQyejYbI9p7pqjrpHZUNlz2exX1lTAks+WxY6CExoPlSlNNv6AIsE0VdPmHOj4m0a8bigDelTpIL1WoePLhblmhRlkPDKiZvkzz6eG8vLeJjCGJL1+VFa4QREBVyuhcpZm1ygJm9kuQ+8v4yEMw0VO+TKee6sMFRVc/kS4IirJupnw48LoR2aRk+GuDBZ25xnKFxdSYqZqvWlEcemsbzl7wvQg5z2xKxEUsquyGziyzd/X+XFl/ct9KRLzyyb6ComIL8Wam9x6LPNZXvhO0QQZmQ8T2MFjmRJ42WyRzfyLGkJKft94uO0Yy6Fflo3AoIEon3XBygpi3Je932ToU5EKoikvqkeLFACpsBN5dseemiMdHxOJKrVJDdTS0qCcTzPCyz506oyENFdelskwdghmUnWyXK2WeJX2CBXudNUBON/i8kMdtJm52REvmGqVmxe5aricuTCGLbgZtYvigT++E7xltEh/ZgUoMP+d8vaPU/HdhZaUjsgQ8OoqZeezvNR2JFm2on+IliVyYQ/58LmZ2stgKoBbs4SllwiTpNRw7ecL2WR8bbg05aTN00C8aGWtReWSsYsirJ0K0I97flI2gJRRN717wESryWahXUAFZAdyD08j9SIZQm+wq5GkoUkK5cQ3wk1x01x4fKLPgPIj6D6lZiylqvWGtl6KxCfoSQXlNZIHeDsrIRqhINxdrCinM0iMMkveNxhqrEzhnBn8F6nXVY5zUDLzOXpp338I2HycFa2pueObEof3HQgFEMnHS3/CDKwJAyYl3HyA4X5vXUE8MMa79gYELseTf0IEUJRsfSa873vl6n29lFq+GCqF1I+mB5PSyLFvgHv6hG5Hd14PAHTKhY+xzCgOwwRZxygPwNET0UiO9ynH0p3j7GAFEs+VSjl4ArhHJbySohRLfm6B7FxxYJLJxJlQr5UdD+5Vs0nM6CehSZZNYw4FzcpYoL6nS+wGGSNKLVLXgbgvzAbT4B1J4GMS16IKMlo5S/dzM/NM4NI+a1Fuk4qwaewoHqGp78vgp+SkuhLyAVhI2Or50Id4LlHwRon9o7JT3D2pibchFvFi2VTEx6cLX/qorW2YGSSmnu9+M8teW9DIRH1TfabuDIuLk16NFz3kNr5QLPGAd0JzN2IYFA140yqfi9LfBcZI3aUK/Gt2bfMMk8eqttN8c92OmUYKUaHbB9C9cpEwaOYs49MztuGtI0VMqDDHN8HiRP55BpRIJtIWbSyi0/LOC94XhzqGVyuzaVaBfg0f++sV8wy7ytxlQYA9w1ejE0XaCkpM9zbOrymf4OrEaIyQX84Z9e6wQ1czIvOihnSaq/fcFdkxJcMzE2kWcARwWT1U80dW6B+v6HdclWMyMWLYr49iKWrhm7o1yumJKxVGiv1Rx3Tw61jrh+vuNjikpFRxa0F9G7ZWs57nuhaIeT8ZRjYzuyq4WZBEXs4CyfvmZxGcS4/G2aWon2O/UkjqrfdbBUF0yavSPdNJacaaZxFQNejGDPK7SCF82XxiahbNpwFs/t07gbCJkDUvvKjqaYv1SNJBa21RKsOuGJNKO/F6HTjc1Q5t8lqLL4e83gWTT4aubYGtE+D4e9zdPPo2R3dvG7bDrCQosp62YhTaV3B/kEQGqtzvu59fbgA6lFyGe7urhYr3TWCBFYBmrEpB78fWnXUEd1z0LSzMcWL6vuh4CJYR0tg1jX4H0wkw9mkbM07MXopLJ2Rt7/aL3Hl3MjO8h/1lqNlK74QTbgkurmgd23XflEcMhjO52Y/Wsz+CqwkBCDN8SUcd0hvJ6srikURdDKw75ZZMyms8NdzvzfsXreeCzpVaPKbkgWo0BlD+qWqaXziVa7YTSezNkCD1UBphMwE3IFwG3+Oja0AILbwR+VMjirrIkRPt+DMtp+OKLpkiE15AVv3jn19brZGZkhhAsuT2sTiWSjLvxJkMICAGdQY6CcJ1bmQsycrXCCxoxrME8B5k7aYQkl31h4kmnvmUA1Uo5bGEJkzebQNuMeVIRwKr7shM3Y3iowzuO8Jm833ALhjeDbR9i+ajGdiv5nuQcBDW0PZ0CB/GHvnmE702e3iEmWKin/StmkbfvsVh9mXnjLzZCRfht3g5Fu6OpDSsq1DSVUie4hNThGTSTWkOhTKbARv54Bxp1m/BqW0CfvfUJMQYci+HzQBrAw7lHJI8klNzq1wbwtxf0zzTFIpYQcsU3ddDWDMuciKmN+BHJ47B6FkgX4uR5QSWzLqgN2wQK1aLp2hgMJGqMII4rLK56VcDk89QQhw6cy8PCM19olNpuDwdrQFvP+77wiyyKx8Z4MVJNxV5vJWOwvF+aDouZMW5HNno5d960qcPPO89qYm6Zh6UO7MyFx272aWYtu/0+UZ6eThOP3s/uMGRarrYNGVN2bkl0VbM7ZArP2AnCQLuPoIbkry4nTS/RsIdFmPg98zeYI4R0RY41FQsBym1OXnJcHtmKPjfEXuujVQGfCPrCZsaT+vFbMFWIvUy7OxquIvdi2DVp3+q3E3NGG06d/cz77wgHGWrfcy5LJIzCMZHkk6m2QnZCXYVXwMsVhJI9nJcgG/CrU5lgDb/DlVEsXG06BHIuqVfnTyLdAQZYmJlEEk43pdgF69V12XC+sB9W5Tfm3jPwiHn/VmGszkYx+Er49CLbyk3hDBSKuzDj+nzCo77ZO40EIP4ZROdSwWlf5S8wfYcAzjNdj/aZ8uknw3tur126RfCzMA+cUo5mPaZL9cVp33X0mRTUIS2vgtwDRgsSSX5xcJUWR8gZbdeqyqQEEAeDu3+BMlrgYP2SH/le2u1yfVFn5JX9VQ04X9mmABR/KOd3rAYqR+OQwLWao9MXVS1y+0OKo0FlXuirKuPaY1BQbY3Vo05Gf/+N+u4rDcFBQqiCrYhgRAEjvVW9eNCaOsukcJWEaDuo/pWCYGJLadm4ssTCPvVVEJNBfVXAcTIxH4EFtWFMJUy5of50QNXNZBl+oRuFIkdbt04DeU6j2A3vzzP+IkMahLD6zBVJv+xRBIc5fODvnJMmJRMI8kcyMFqxpeWZAHxC68tGFNyl6yyGN95SwNYXwDSIQCPlL9bzjZaWNWvs5puiP2lbEBlDw5vCHtVmb/sD8QBgOhRassChwM5o5g4lhlD4u86wmdmVmhmEXnCyLeQJ0rRtqYIWRhg72ieDnqmPvOkDTWtKR38TeJwrK/7IRYfbNspygrU6yV9YtJyw3I3uEkDgbPrpcNUpISYvzv3beFg3ZN+swedqf3IVKkcdiAezu/KpHGHPyvX9oT6qzTS342/DenW9ctM197UfFl4rk21KxSma1KnLIWlGGasMF4+G3dxTnqBscul4CqNda6Qy8ita7HCzKlYa86yljm+HQA2B5ArJoZy4LNxeT9izFuQhEoEhUTNJQj2pCc/O44h8GpQX6XgpaAvAQJLVNq0yXGFbzb3O54XQ6sm557+lT3A+VWPyCJn1MLbsssHIdFhJcMtBFQYi0bS+exQ4Rq74xNE2CIRSzi3nj5TNy2AoO0gdyBC0/2iH67UB581jmM92OHqgD4EzAzyxDauPnlIdZu0nWwB4dtxWN+meq/faIuQpK2hoRP/ULwIJ9r3xyxtXxfFwJ3YquXldSEnxoPiYD85u0OAHvKOG6+3eBraUiOgvdfp1EjiroeSLLFutuPPV9XqhAReYPaRy87OAkV5tzSqvyfufCvOMTtkpxApWsJ9n+cNM2uBWu4lj1oDjGasCfCt6cfgCzh6UbZanbL/qCgf/iHjKYaavIiRLJrU2BuzdsP97XHkXLYbbfsHVTlXSohKOXOJ+3LiR6ix9UFLo9qieejYk+P4e5wC64jGQLSxJzYt3cErx1Rtc2+xlJaEBynLN4hLl/qOrgBM7a+yswC0Mh2OieA4SR6MfM9WK/FOWbVyoUBIUAKOhhIZp2LOgukk0/DInn7sF7dRP6Nw77MaAcYg6k0gdjQN9/1wtGVSBm+6LwkI+xfcK9l+JiWepXul+/EEdV7XXp/9lUsW4RQmIkda9H38FJj3EYJTrG4hEU9YWtNd2lKI1683cXFVzSMkh+2nuu9K0JUBoAnrYkKVZpAKF9G7y5n/KMZrP2xPuUFSOaruqriffSEX9Euj/k5dgewEyQCFTif83LhkIjt5qJ1LyI4ynIznWl1SoAdecEp+I5WmKBB2fr5yw33NX94q6HIP0jW3Np2E0r1f7fUjqdxV+iCRULU+yAwPXFvTL7HqfFLj+wCfIbOg+nsW03rGTf1haLvAZA/nC52pSDnC4f0qOiA6WtK20BldZUaA6GO3m5ZOCGyemGK4a12hM3BXnbladA/yTRV+pH7IiT/9WOijGGNXzV+K4wmdmRjU3It+QwUCRat2mGkEHhOcQY06pWeQqBGjHkWcceX8/drkk+tYysHMXVk8hLhLGjUVgivK1Ra4K+RtUcZO5fkVkWQ4W8fyo2tafhGEDSsflUH7yj8wsATBE9YpskR+r7Ac8xqdxtEAfRioGXSprjbLI2DAZZz9HAYR7rUHzvh/UPpFvrLbd/hFf7sF3RimWNpiGsQRZ11RqfZkck9IJu/FPU2DYr/HWUdskJHuLufXCvDbKn0F9sM31Hn3zIuAMTUc+tQsO9ll6jnNnW9Ulo7d32jEQMqJIrWQL5+Se0a8lKRp+XhYp4IfyUaTRC58vFEjKupeFEpU4EOp1AjeALc7vZV0ovza8QSl3ru6xFpY0/ckElMOChkhLWSDHLCKaFK/qC/SIfT50GJZnkCr5SgXZRddXq8Gc6XNjIzSdCF+9YlUFKMiri/sn1Gp/dEMhARah97GidLqitLNBlF+H8XoQmdrM3GXBSCN6izNn2ON0OzpCxOuM917OZCw2ZC0DSvNuTOFCGGYf1TYgUbgK2KKc4zm/25dz3GhVpFqs6x4yhZBbiy/6FD1vXW/aIcDiSUoIhwrUtxuGGZijb47Jz8JfUTblzx4eNPbXeYpygkQo1xXonjeouTuJvAH/zH+FK50zOLAtbN9AO6xjfX09CsjKitMVlHWmmQybLoBHBPkC5IbAZxvs3cH1VAcy2X90WL6y/0SXNsGeLBdr1OWVuYg+/wUNiR7QnP2ec7jNrZZOosT6Olwn02Dh6zSwKoDnMFLfk7lBO0p9mWjex7gEFXNfxFO19qmaoISUZEgdTuy7sHgrD/36o3XeFdzLFoFnOJa4yaENBXdTSmVZacz+5IGdVkEgjQt/TxuhNGHGtQuzNDfM4iNZ28Ly9S9WkUGMNAfDRLr4ipZkJxUA6HnlOi4Yb04/Ze8rB+HEXpDGC5Jpr4fN62LQh8o6kxknE1P5/rNmz43jehFlRUvCyNi3Y5St7lC7a2ogCt3Za6M7AshQdbVV2+R2DuuiLEJz0MLhnn/1/F2Z2U3h560PrnhR0Gc/5GW5DwO/DGrR/4PvL046BKjUp1lfrtKfE4osRTS9/oB0GrNW3cYgvhU8ld61sHhKOf4P94t4n7h9zdRXDaFv4ORPHokkY+NA9QA49RmsGMfJLu1/RXuluq0J4fsUUBoa9dL9T0yDJXvGtuoln8aYrNzoapa7E8cR73/wX6KwBPpwCUUlxsBtOj0rnca7zu5FqJC5W0U8Yt529SAI0S6nmWnS8zguQLRzf/gRLaqSQ6E9T6Q84u1cs56dzBMv2eBG+zAKw2V0x1NJX1gC8M2MYZpScdXEKPG1442UFWTEUlkM9OjbR4FurtJNV4IqEu1htlgltESO0SeZMHZ1JM7bNtYegevwPSCmW+S8uEGj7FTSSV0HbDg1rOnt4Ws8DxqN2T/HOXNd5NGboZ8VTSD6g6rLWcoWOwsyeG08GPG6KHPiLRunEdTPNmY74ObRGT1VCHP7nmBYmjnH+kqK6rDyrEoNjdqc8uG8yZrHWBXU9weqD5rpQ6S/annq7P/GiYepA2ZDdJA/GbdxpHYatPgkXt5sop564gVHZamW6cq/cdADaLCXWt1WgK7y11WaQR90YOen8BECQ56pmJbLvzzfWBhUUJP+dAEEK4o4wZv2+IBAFEdNkNF3mKntsLE5PDLA/IEiV0rziyORzLJsoxRMCQV/HlpCkXsaizcHT/vxU9iadf2hOkKehGum3973fFs7uRlqxz/oDerFL0617PqG+VYIxjeRb2IRLZJGH8vp8ITzF7U7HUg8Crs3WpVY5r8wxn8tzGvUUwY5csVu15Vmm1xcs0UL/lUCkrOXdLtlaa4pHLeQgpd/vu1ZzjMOcgzfQaIwiZK+fMZjRLAHUf83TSCOkovb3xPkD0jElmb4TBqFrwn8G4KWr+RM58qhCnlVimQ390m8YLz+fNHbBRDs7GJgHSK+v5Z9cwZq4glnR2eTjnqTy8Wo7BEg24CL/RT1AKzOIE7muo8oegzn8R6qab08LzTcbb0ippsScfjQoJhsr4jKG2pMVczpCYqptZcGD5rxTHFbL3+NDnEUptRMyARhF2FMiM7pgaB/IpAna1AHa5EPt7oBdzMGg7kOdSOpxrPXbdP3l/+QCfCLMpCsxFd3VAxA/IPVvK8JaenCYCadhyZ6rJeGxTUh11+OOAjrXIJxb/EbIy8rv6h7hywPp9ZhPCcgt9BN808JhGIaKwtL85jO5nipQyAF690xJ9A2DMuCx55TSG88fN6rqBMYDI+I+DtFmoAqJB27B/xxN9xMLnQwLcLCHOx4GIFCq3/6i7gwJePjoG/HKNb0XjhuEQmYFzTgtt/uIo1bBX4C+y1jrb+R0mRj+RyaDkRus8W4WW73qbcjpjIh2tGUY6KJyhEaKiK+LHG5euQeYZO4zXoKbZOWiJTvJNNVrWugpXkIIIE4zK/g4JKATQjtaC1qbJ6khaJHxOTS2goU5zGyjmaPKvVPrBh27E7E2iZ/6omwpBARV/9EKeU1m4Msz8Q7y3MzEF0C8VIIqAxB+Fk8qG970lhV/ZIX6CsxiHqybemqil3Qv/cWKm96fPoMJWSA1dcF03dSwSyNMdvKKBCYVYLuqr2pISKPaNRJJw2R43RNE6avh/TNA1tGJ/ilW/e4LbOvIh7cS2OsbjyXcD6WS0DYaDa+og0lSxehZQiDSt2fVdtF+DO7/cEUAM3uju47Fl17rUPkRPaheA+6/jpSYK5Nh6rSwO8Pbi1y4/L0L5SStva0NcscpH0pw/3Y9+Eqw1SDVvRn2r2d8vRC6YhQywdhKWraKGBMILqjiU2l5d3jb1tnQIwi95QiTJW7MAjJD4Plr9FGRGlM4NQyAiG8wSAKUbRCpmxE+zk9YhXjiC/Rbt983pV0VzovJW+90dH65IOb2VS+Wk+MpsRgZ86uEuxeGPyB++07HlAwqFjq0sm5Lvom/rcHSaLduJrDdabujYJRWbbY2QZptvGwTHAiaqsAafE9NQa2oq6hV8+E2YRbdEcrirxyx9JVWpti7CsFfA/egMevH0MR40/X1jQzMYbw6mr01MI833RiE3EuU79cpspC8tuN6QxFB7ExHF8yrFQ4vRniEkTgKc8kT2tC2HgNJJ+l/FwYXky6qbHj1cMtBGVOw3SFMHn5l5odYVrLqhL6R4DujKq/CEsEj742QjUogvrSb9DOh1Mm5Z7n6MI+YHii3bWp2abi25FJIiX3GM/137MQVr4wwQ5IQETnYx0CoXX1nLeqLjQ2VlOulhy58iVxN5d0Q2TEV6MPr+wA6lluGEC5890db42elDUvTbbMcjHGrT7WA4eEhNLqVT35NhLruSPkwg1UCAUz94Dj23i6dqS1MPh40Oyi0W+wfoWYXIw+siweU3qKdQM/IWLUwDjgMQuiK+CTyRgR/Cg+XmfazCLiF1JChK7C2x+ROCl4t2WjYngGRxBWRQqqrNqx1EesLx8Z8GOimBJK3Ip3O0TWp1z6fhibUBvCtBpCBH7Wz0MrsYEtW/6gd/rLbB2IcMxOrxgW5u+/ZBOjd+9Zg9SRf7ln5tqXgM7wZE2rj4u7BOezWvuyca2TpJkQOR8U/bR+LRjmN6RAS7MCfYSPtJWSbZYnQL8vGmJb39SyiYiER2Via1nlShjJEe3JgCwTOTiIQJ5h+NQeEs7qWkpIDJiQHb7VwcR7T1gLGhKAqUT5DPO5zvGPny/DOh+Lo+Xhxf5wTkF5p5yY0vM1gw2UZQ2nhCedQ+PBxACaAeuBYTyBs9aNWvYATPBLUtXJ3H/+rMIUQ3Xz5MJKdV6OhLEEK73rb9hfjPlA0gKO4j120U6VHh4AJvL3WqjaY/KCbwpCzUCADZmnJdpD4p4U5ry6/YuhcWXcVV4dFm5J8qADBWw9jPITjUtkf0lhIJkzhXLTcXQBZaaunvCCxyWh6ifYzNTTCGJcUD6DyfGam2zj4qdBy7DwBaL2S2IxicF7F2ubPDvx0+DEQVydAIF4Utn+/niyxDQpGlaaG5eRQcfYEHaZeHBOfZ8x6KnSsZnB8YZbLVBcEF3Mv/87cj4r/BYDYAaUWrrm/rWPImSVpvPlB3xQvVG305B+bCj4kIW4ZWzFnX7/nApDibPZxncAV04laDsD872g54z55DZylkUKHXF7Y5iFwsc0HDovYpJ1P+XIAb4pKZnw/e2BrTZn6jCeAAvAt6Z8EdXqS/KoRwK37xhZL7w17n2PYpqnoCtRAvnU/CocUq+el+PFEwM2GkhLBAJXvVbqxBMfPWlA8XMNY1+dfsV9Uy0C+WgSzcXw/ylN23DlELK9DPZ1nzFCvyDWygh1ABv0LXhuVuDEraYOrX0J/NpbYoxjl/mfncXN1DorfumMjOo/dWEk/OvdZ8w/66CtISpGM2htGRpT929qEz+kRM+2XpAqcSS9GOrLWVVUVIm3Ez/yIqAWm019Td/ytbE6eeYJaY+mJpelcp0h+4Y1hmcF9J6cZQEJi7foY8n1psVTCzE0QYMX+ScYxKxb/bU9eproUaSNTxHeNhomtba4y/CfLAZYXndn5ndeIjFIsRWRpwX3HwrIsKxRgd52tRs/iun5uy44w8u2wZgayiPbOTWGXUn/BDqak5EZebXbdQHyE0yEhUO5HcDnE6xlAuZFDSKLDTTZz9bWcfe1wy8KhSOwh15cBRibt+faUQgl7/5na6Nl5d1o7iUWTjOhjQa4z2Pha1PNGSn0hZFeICMKGtHJ6EGQbB+HF6+M2e8YSQjJ2cnG2SVpdzXlnkzxYqwXv0s0WM8nggSh7Viq5joXNiF3RJ0A9637p1HFJd2I7GrQ4ZTOWRi8jcZaL/25Pox9feMT7VDPV6TT++0Ri3a1aLS8IABZh2dWfxnBmXDWPdvrxmBiF3eePVqd2ZM5bI9YAN23/3qVLElDeD61xvgRdjkXkl2tqif3zsX1gGp9mzEm6suh1kWL75XC2kXlrCreiNi2pfI+iWVFJDXPd3MBNp7VSAZRp1jpt3ug1pQEM470lZXwotpDljklvGxuNeKwTuKNJw0EK74nc0d851QXL9P4pxZdM7pkmbA7IU2S2Xa/AJRP2VOz3Kyp9oW6FgoQi4noNkoHeNnprbQod8n+dQSSbMzNRZIuL/riHaxoOHkaGYwROCZwqcbK1tUnU2Qt1J+3UTvklj6wOD/d8lrZG7ucjZiCyHxK5XVtzq9lDJ4N1FvARCTUfnLeOLc5bmrtGvb8mmsr0lDDyR5607k41wzglZH1fExfmsXrEjiNLSzSKGb7FVusl07/BgeCclDsQkds2G654GVeUpX7UHaqQBEmJsIyvfxvz85+WyRaoYuQfSH9WpJLeUoXpUt7+Crnl1Jqz+eARyCmzL59OUUBwBuoQAl5VddIrfG6xvDA/RZBOV5AfwjOrJ2xRo4N42rCSFCcnOY7xfewl6tVLetiM2tGLqRLc9k/owyHriX1A9BnluzfDc5xdEUKyuwzWPG+tZGNDV0WLl1JyHPflzcBpj92G0AR0lGaMSZuKui5/LUMn69X9wPKc6FVkNEHEjHjQKPQjuFCokjN+N/6DlMscpE48IhHIa0Ghrc36GwGEiPRymXWKD/di92yfjZjDM3fdHBdwSxJRSBVKHSwh6Ey1/zWZRZ4kk+KMS8HuroIw1UPa+PDVpsSIKvmqZnZisbfHFWNW/dl9n5+wM4VIzhmrETz3k9WU3s+z84SHh2f7dGT/G5WvoisBYAgwm+pqFS0A8xyhy4PiKfgS+6TgnQD5hDEerpzgFSaMcw3yvDZ0+xfL0yznf0uY8N6APiqHdoJZOWqTPnTIbeBLc5dvFdh+mvD+sDtl8BAWzYR7QkSgnx30Ru7TH5a/g4byacurCNvG0lTgpkj9w42uqBp1zMsKr2riOCQwfCRKkuSX9CGADOYGqCHh1JUsk6RwvI9OvM9fCJoL7Sap8NUQ7mAvdB2ougA01NdqxVo8NeGta0R9C7QybiN4uAtDxw2zLTG9+0we68JkqZrj9tJilUV/f4wOLc83GfstXOVF2bAJ6zf56YworQQEDj6QnC+lqyMkGAr0QuAikm0jqS7fy9bYSBz5hekPILc94b8aUau3Kt69QI1kFEmcb19aFQA4bSegA9/hFi61RDIVQ7iOBqViYdGaK8d3zH5qWIjed0hR9e6o4zELdXWhOVOcPCmZIYYXvgUsAyGUoCszsCiTdwOaPEL2kRnYh0mNSZGb6/kr8XfbyUdbEZ7mDBYy0yTDxhkrpIoJmVutN6FHk/E4cTEolaGnv7x+QxQIKZus8IEygpdtBDxj+lC5M6HaJ313pLDYbjpCA+oYl11ISRJ/fB2oIdDBHFLefQmF1uHk7vtSmIyI7Q9HG0qxu8QRWecP8ipKR1o4bGrAhR2KcGEDE6k8r2F7N9lNUZCswXi/EXaOlPb9fdsaw1Sspku1xrmyADIImEs//XiPqI3Jl8BlrsHf1mAVCBmlqE7usMbDEpilt45ia5CXzVqlIZ95Fesu48LEATS3dyXVEjwQAqVbFBttbLfXvX4LhaGKv6P3XBsKWvqEFfq1rPYdohHtQH03ehlVMpZ/BRCBFV6dffGCrIa7OngRAbORd6wsIcR/gQSxhfrfHFmb9Ws3Pk/SikwIvAIYljNbXbvIpKTROSiPcmBDp4hxLkrjR+MfBFZLV5I4usLY6WYmjhT2kzW9XAxxLYCELLIf6lg6p/GFgpoRTm+yQ6PYtmKVvdTHyBxv28y3vTiy+reYBZqmC7x0TDasiMCcA+TxdKgDY4s61MpZyI1+RUzeMfx1qh9MBXg1tI/HSKpcUj7+qTrwp35J3ezefo6UZiEWMPBtx0/tJyaej7NUmUHVRBJfB1q0bsw4yHfui2ZOPNh/6R2/I0j09t9QGeRxpuJzB6DNbaPTOmER6WTXYEGXq7DhzkvCP247uSz6r7MfaasDs419fVF4RAt4XoxkFRmk3sjrhpNSeuDoG5RpjE4pI3rH/ESPaF6RIIJBiAbVU/ct/nKrDmBQPBYlNob0WmW07GhOvvz0m/BXTsPB8qA8Iesm6PsDuOLEEm5+jbniDFyXfndwIXHgWBB1GCyGV52MU+5iXguncQS8T+WyxaPDqCCXMjwPJxGObdF8mBkG2+SpqaBQkeN+1IL8Cbb72d3ySQUR/uO+N9v36KAiKVEPx8EERU0vfKi53JWN50+LSYqgHmF0UrnnHCNpcwfX8ezokGL4sK/rgFZlXnIqg6a8EJh7DfMOwMgTwRjjZ+TrXsj7SA6EaMRroFgxXRIOGDPYZgkadllrCosfuVZqNQwAY1cDJzuD4ocR7PgZYXbCA3g9Jd1PRx7PyRTNad56qFMVIv/9AYYd32opL/KQOuEa2LIoyMUHWsHVeJEgDnTAizkdfigKSmZVUDrztoGXA+B+9B+MYT2q5BETXJUKRLiEw3upTpXnlh7hkEk8/0D3rV1lUxxSlnDzLfFArxdnXRhBNu085RxiTwTISjItGPuj0MQknBfLTi9AeLTT9QUKRG7bxHm7P2Kei6fVAeNBP31q/OVsTuBJZfKaxLodsCxObxFdyJNLV2tAt+2SCAO5/VWcDOd7Or0wzbVGwbXJr73+/PYn3VfNQ4CSxdqgXNPWDqh9ZFVRQbSeb+bFmOpdkO7C70y6dTSHVuHlIY33/KV1QHDJ226atG4ltS4fk0ZNDrmPZ2Lps6qyMYO+Wkmsyw/ECuxfXcZ0zM7vmLjkk/LsX/XG0vaL3KZb2C51I5TVf8fBJmMxHHzKvaXDwSTGiya0f8ZZ3olqbqcd2cjXM0jicXlX0cJsaB81POyuItwEiYZwsHn4gymrnlD0mfAro2YoSC7KxDdL1DQVO+0a7fN1fLkv8ElaXx46Z8EGJ/W6akIr6uEuiFIQB9fHujgNzIzAgaDEYVITJJO5XQkyimdgaTBvra1hUbw4jb8imqVpd7G9dSoQVNPatqBlbm7NLsdI/einfpw6HdFlo9bpLb/wBxf2BGK/YWhn6LhzEvBuRuBZJTDv7HV9WfnA2SyT3HV/F6f+23aOYC8rxO7QQ1FI4/0m/OAHdCwYedzx6F6TIlSh668B+Id3ZxNP3V+Z82Tt/AHYSzDsxyYC8mxyk+Za4Q6u8y70AKpUm1NPP2WMeSHfqCc5mUcG67RR+sJWZg7P5iG4FPnFmWKv1nwwk+fM0IIA5p7xmHnj1zbj89sN0hc81tzI6enBjIyPd6P5GXzsmp9IRHKS506SAEK7IxfjQLxkNK1x+M8YAYLrD1qWXqo03kTvXgYllmtbguZX1FQGpXYjbZzgqSLxcXTKqQ/GhYqBJzZtvPaYGODBTozt0Rw6/vP+hTUJGOAYcEWWr5Mqy4792lLWmElkf2k2HiF5268DSkEL2oQl+VXl2NXgbfa8xxQoI7lpuNkURcA/pNz/go3LD+w41q4eQy20ecjCwekr0XfODump0XPUm2vvNfk4P/tAVA2PLhl21zoFOrSKjd6D1AiMtz/f41uWlBWCDDY4tDRMhyGsls4GW7P8b0/dGx6VTgC6oCCWxMyJyOgl5RPaFDE/EzGGGL9XUm5X9L3crn0DvEELm/Vx6HwlGWtnfZK7dA8/zJkr9b7PBgLeFlmXyfUBxZHF8kxgW5tcxvkEz0roS70jNLvk3QNCTUIwCHnqk5NRDEaewDCzjTR5lKzNzx1RHHJNiZZJ0lXrAsSM03iKPyYNdJfMwUAvRlKP49yIx7XS9cvseBWVvGNAc2I0PmR6Xc9KjqauqjgG/Q8i16OIPtQ2Ll3qDkunTNq2O65AEFG5qycHaB2/159N4n67iMEpyNowNdkq/ZlDxsX4dRKNvBUJaYqhID70qa2Rgq8+AzqTaJhuYrqrDDO1n/0rWggrBcFsYwo7ujJZblKGamFf+3B5MTAXNUOKn5PW91Gx56gtqTqz1dYMML1dFR/KZUZom7Wky7v9EfKnYbBseAvDuBFBFFCuXnhvWc/JS4ipUIe59Ls/kL+W5lteo1xt5bkJYfug17vGw6cqrOjTG4nQXZ+RbEDCMTf5JZ4DBcuVv+tGPyucc3B6R9NMF/lc4ubulrqcBPhRUjGBILbQ+4uBJ9eUHMAj2ijfMskRMLcV5FdgqIWhiEvxNVlZSRrzTzySfBUjZHCJQtbgDZ8nRWLwk6rQKWD5aSHuJh0vBgvlNTP+a4P7p59l0FYBPtoNpiFl/dOo05KHesQCueTxj7IB6io9sqTWxTu2PK2C3ACiXWNyxs52441hxg3eco87pSRV1NUvQeac35o3tgUpXtmtl2yHh3QO1mQ55wSqIri3PtVxJ57l0nOuyav/0ixzLEq3QlLZmLb8Y2JVlrdQMjhpcC1j0DS+VHrYIB4JgyXacVu9PCRoC5Y2+p8qfeJA3OFreaabxWxz5omyn/l55+ufQkO5e9iODCdLWl2crwLrUpaMCi8EUcVXGb3Z8oBCUdwuuohn1sivwQp1O+DaRFYXIbHQibdPfq4dU8WeiYJ4WKMlNEuQr/BRIGwOrAIM3Ppjmzvh27Lyx6xK14sUHgNy2ggNG57CBbXznFP/0NVrUQef5mMdso3AJ33SJxInqYebzcZ2pEVYHYczXE/+mcptBHb4ANtGohwQabL1xmFHav/wFH/al8TKjzGnYiFLEifJHL7OJD0x/rtzWuCrDToEWPBNtRKXFZqz/kBH6gsxzy/TUzP6R+C/A456FbGm8soK/uYyafgNmX0re6fgXeehUvtDCXdAUJElJt7AMv+VMdIrrOK7TAaHo6E8Khx1rq48yOqMqtC08so9cQh/AV760CiEtSm6PBL7JKCZBV4m7t8Gbbc4TQRawpuwTFyS/vt1JBnAQUBDPdEddlJlVAfbGy+OKkohOw9BB/JY9rDZQK1o/kpfl82umHijUnj0gVqhJCsrzUxYl+ygkRPDEPZqUIo/+AtsGplmBSxL8bUE1iBc8lCtShF2iqMC1DdHIH1DcucbSNtxOF9LY4IMng4T9eTYzDr+gnOPVxWBYMambJUexTzxyvFOneFg3r4FBEHqG3QZRgnKISYUQKv9B23A8vhFRe8uNZpBtiMtXqOQlVEbO/HzkRbqVaGj4s2XRVlhO+ewkvEaTp4pNLXG1OVF6ncxf3Fq94KmGuG29LLsFI1fuX35J0TsRNGo+TCioyTrXLVEjPztNVQL1/q5tGSrMPhfJEaQxHcrnqhVVqN1gfF+JK9Pgcud/lGa+Ig7eKQpJuUN+PYhBYQ/b6ahi4nLNe5+d8rQlfK/gl3OQ3WDGWuUMOt1YlBKoX+99JWlZr6tTAVgDF0NSHs5fqbU0euO7cXKnvVB3taBFHP6/KKZCBfGqzNo6DgZgiAELh1EYOni64dmOWUuwAQCKu+L8tnTFLlL6uKkaNtO8YGlOBVU9mQFYx4aGPgGEI/HTycxYXBClfKbmSErtcsuhalOh73FnzRz/thPjvRJcRwPtZmCHs1nYjivLMWWGprl4fRUOlrCDiwNU+9TZuaVsuCxj/4DzKfcla139igH7Z+0uskWkEq/c0mrsRLlVpl8ln0G77hwK9rLKc+RLeI6KLKy3Um5C6Of3qiKNoY/7ad3EFvdP4VICsuTMTii/bee9efmKAiym0A+l3hS7SofuEJ46In7BEO+Kf597wnd6s5mL1d5zNRBdOEmfNKyPdUuCW3u/SfFQes7nYlfV/B1DOE9p/pmgK+bx+eZdZUMu44uBGlaPvej5wxU9aumiyt/uCCZ4PyO0OYfFAMMqTaYcI8GxYeHO/3tDJsJisLleLpS/gvPLbEksIm3R4OCJ21S4P//uyzQ4EJZyYmWZjtknKJbz0vFEi0zDWnZHl4kvpMSPlVI8cEAG5r0JoNN59joEsMhUcPZ1YtIDYX9cnR711x6SQEnBGgTz6d3b1iebIdotlgqE03w87xlD0+qEykcVizaOB3Z+ocaMGWybZTIdpR4niV9mDm65EzKK8VQq59iMlABk54A7zAlMdkYNmaRuWJN+bLJ7RqEZf8vrpM0+3cwD0NctuwJJA13JIJVFlPStNIXzAW4pp1OnTx3rMZQfF+o4p92WDkF2tx1MUdC14Er9l1RlYsEYnOubj2IotL4tkgKwnE219ZsjXb8PJFkzakaWhRBJAkgbR6myiYFsJgC/lellsN9g1ML0j4HX4rwIzHbq20FDkBdfqN9SUnIbJf0QQr+QxHx4f0kRekXaqKZYUXYMbRKa6OObLPOaKGft7xFAgT2pHuSw7kdfloER91zsJPWQJbkAzyDFkkgUg80kW7n7n+WBN3CMXA3lU6QR23Ipx/98577h2OGkpcp5YiTX/TikBkcza+iwBGNBi/j+GwW8tGbKxpiSNEQqUDdqfscbVMQ+OSYGoeQKSLwREfUGDjR/emc+ZAJsy3sraTZkpHFZAI69dwO1dvsOw/Q+O/2lgghmEsk6NKzmfI+OYuOG2UoagP9Le/y9UABk4VHk54+6fW891qe1yVDT2KUc5hNeePBaQwVb5BQYPt/+2xEpqsHC4GY37hXyRSGvfwYa7DGUDbMKd8vud28h67mpOl7fe4uFRe/HOKf3TFs+9RX+QpL0+C2b4R/8VfkUQOABt4tcaDV34nU/UFXBUDvPYMYe0F24AZPIWphY9bLwt+tWvmuWwhvAgPN1rxvo3hpXvQNSPsVKgFUKENrmSCjWPYCUoQfJFpepI6oqpsVwJt6IlBFGO4soABNOS2KtnF9P7E9sSLK1WWOdGvYNhxKO5/D5ACMSM3oLy6XvjzPe57hP26DKKsIbhLZqcz8tJOcm1zlVKV87cVqDh5iOgGkNIKp7JU8eBp4VRPvv6peu3DR+ROhro3GOnpo6Cdltkq395hUi+pDXzwcONA2YjC4BKvX3JGZi77wJboSzwwPelRCe5297Gau3hHdjkNfDMaoCdfo4BX1IthlFNEHUm2nTsuiPe/rOux7FSlxIwT09NqnvyBmWQYcleqlPEreuoCZRFvXL07v84AxlxNdJM/atDmCjpmzumIoYOf4uVqV/8ZnSwV78WW0S0R7AwI0EDq4B6IaI6AUBwPrNLY0eeSw24zQ6qVAgBGW5aK79Mg+Skj4XxdPl8axMl4x6nwmnAfEBIju1ssp4yr/gdi9kl+ScGW3r5NVqJ1fXRkW9O0A6JBottvWGypQioSH2C46bepNpt5dXRK28XY0hseEnW9fDBaUMHziavWy8Q7jttulrsjOd5WunqGz20rPiwX/3fdKuQgv0g4CDqGBMamo9htCyKqN0qTOxWP5MmZG0lur+eIMwtcrfYqJujT19J3dps8mrCySt1MRdmlNIykG8cIMszw/nMlRV1DmpxNn2zf3gflXm1sXSH00EqrICj29dnyNSbIteQOqjPLqBf2QDDVVCAgcCz7vER9m5X4XkTIeB4ppqaFa2UHE05QSkAhs7FkyPf40UFGlKG8GnrdKq0ZLUk9m5jleTBwhdDsYP8HCDKRE6LS48qLHD4pvSl3XFvmH8KBEmyeyNwwJzAJQd8MqhmKsdandB6Ec1bHOw8agmVGP/vvY2C60X8AnR2r2HhdkUbclW9+ozjmxmipA1AJIZnqxg4aa1Le0RHfU2vkpf68y/rFMYgCXue7eNqxoS0NkOw9a9/WcDFJOh0Grb8zYjPgaSDENIFMCM0H5OlIqq2r2FKGkaQSMzVm87r9L7fysa4xxVMD0h7CIExLBVbCe1/r/WavK3yPhHVe3XBjyVTDOqI4/90N/Cm5KnqxFrVYOHbwMIXa3GwNwVME+38OpXvNwD6l+jN8BDCRDEjGDFC+WObTdm+5/tfm0QeEfVUYFtA7gTobiCnl8rywroMyBHNClofz+W7OhssrGuos+fRhh8kBA+Ni0fYdhKK+qCZaY0LUDpn17UUKCX6dOZccCYzSsD2iSQP74pFnhlkOzACsapdT20zbjF6ZqLgELUPT8IglaX38zP6zfdyBF+NjNf247XNtmIz4QCO5iRy/GcS8jjaWMfTxI3EbUvzrprtgRQDOz/eMnyVQVbbFiTMZfhfQLeu+j6iY0Qs/QYGFdHefwzAYuVpPhVZK/tXsy6DAioLlmNDzAu1eQ5ihCnobO+MOZtSD0+uTpiOAvPwGWf52xDUHj4zbdFtZULPV4c1TmWflDGMkg/Ia6kPHprHErwFTGoBg+1D6oX8lSPdz5srAF0RbktUTmq44+USAYYowZQOVbM3BWMc603Oy9SQD3buNTgzJ7yaMBbo/pjkzVrpW5xYH0Ra11ykiz32vo4nBg9Zvm92KHWhJm7uQJV5DMPA1JHBWBMcjz/uZupwXqjoTffeHZ17N3waXUaR7cZDs94ewlhsbQrmI7/A4zJDUZj0qKiVQhn3f3AneEhDwl6GUdCBdKY14q9n6ay58twW2PRXXPJ6UE6TUs6oqH/0xgDpP3bx/mfcCUy5oo91agCPtpTfowGZ0tyw5mIOsUqvdURDhjuWLX/WIqaPlYx3zmJ3ahTcxtC5xQgKWrQskF57LaOvwYN0lzIwz/joNYkiZwLyB7Joi0CsWWRC6SapEN5TClIisNQtNPmfwKaKYb+Hguo76RtcQMXdRZWjEJNHq8KZKeg/uWWDOW6aygLP9JDrNNW7JfWDyHPR8GL+29zBAD5FY1WZXsmYfdKU1VTLLzAHERJJGTpwKZH5k0uZrDYM8zG9WX+RVDM8bsmN8cI2wKz0Td8GEq9T4DvY6FuhMsqPGHC1tkLdxuwBYP0Lu2RvjXaxodrZhKfkkIwGcfm+lFS4WMFPCz3FwWwuvNLNqv7c85xnk3aXWl49yCW0YTzTqwyKuKWSIFJum5G8BBjvxx2yDOZMh18M2WhRGX5VA0p3eAilBsGa54P+iEat2c0lLnTrXg7fzDLJrjO/213hRmT/92zHwHShntUiR+9KUWKWRcx9OrMWfefEo/p2FR7dbNWoP/P/se7JJUfBzJixcPvTzMvSTQrccDAmpwoLnh6pnsAF37U9Cakvwb0EZzywhYhfUyAZ4oAu4R1X55yrbJifKRbLIC6NaYqZxbpzV9ec4/SFSjJKEvmVGa9tHfUJayAvrPPbVHNaxlbdJOOn7f43GTTdGGufXu/daAhuYtol2y5rFVUxlDpyKCfYRz3fOyJZEjhxizetlF5kpK8kUuEpKNWnSG9VEdmcn7Tu0/U9Pho+IZiTincXepD9zQXGusmr6j19TKRCe4dmbGmRl1cDDNABYeOKT51fHc6+d1Q9T2n1UMmkd+aiSUgNIrogqtnInezaEs7HmtmpjKttWg7ulLhPvEEnGE5TqPY3iCItPzYojGET4V755b+cNmqdG6OBTlbYjDs4AAp+ho1Iq8R/eWa0/FOyB4K5JLQ/WqwpaNPuaoufHcJMEld4peiw/7uIRZ9U4otV2lACBY2PfSUUu7vJ/iZUtvPoJmd8K/BmbnNo2iumTtQxEeARnjsHdzf1JrE1L6NGFsI7t81c5GCgmWILKM5pWDA5HO53I6aju6916JkUl1YcYyk9Hwwf/waKzGbNaeXD2d1jBd+rriDyPgR5p32kxAb41vjMM5QjUrVztISMmbVDBnx2qArnLJ6ECRGZcfK4U6LCAMxRtE+Y32MobWIYqbeJLCsaF4pCXyZjPABVmN36NRAavX8RXO80JuF2m/Snmg2NL0dSW67EVH9I4fcFSjpL73r6ohLh/V+uK3786Tpz4u9p1byZEEFVjn4eK4wBNeQ7DGhdbFbRTt6/9b55EBMfJGakrqZ4U+Fgnh2uIpidUcG+iBjHE5HMRX2ZKkKLyYQElkw/Kbj2w8OvDaxd8rzWoSUnwkiP9DB4L1FBdrrf9anTqNfPehHTBlyG9cgcQLrR8tQEZN9zuxs8BV1Zf+cIk9kSStcCODphQCbZP7NYhgTuqPh967gyo6DhJVEeM/gq2arEo3NkVtX7D7mzM4zzsjwEazeZbygY6xwP5F5NLqPJ0Hxncni2XMn/GdHQmTbQF1zee4LOhZaDlBzMZLsKXcJ3sJsBmPODcSW/FKYiVgzz7wLdz0C3bFpTwedWpIZzG+H0kpS6hOFF5yNj/xUGHEQK75qxYUFuXq2vFITPVf7aaAWUF+eBV5VbBqFcUccHNaTmGaDdRTdXTurKJ8ATxX0DHWz2qNhGP4nrYJRCKI12hvvahdfR6RlR+zca42mjybVuHEEGrU2KvnHy9+mmlQDH4jYHZKC6knkne5Q28ldgrISAF0p2u8YVTy2bGLZqUkIV6zWDXi0DuZMiQhOJwUgZQNnrjzpboxif7CaCAFdxHukA5fPTubF6aLOTWCnS/EP8ZSOIyNGpkn86BVLEgxNoCo5XDdJHdnSB0Zy+5O4NQSsoKdZzikwg0eSvXAE6j6WW27irlXjNHHxiuOY/LaFsSgXv62JfK2/O09r1DMjpxv32Y457Wd8wFBf9V6i6CdLP2Z9qNFsxcP88S7N6b5FAkZAkO78T3f4mpUVnXed/QQC1AAudBr+gg118i202+jHf4m1tBvD2iwt/8PqoAWQSajReU2kDJ91lZ9cqfgKVbzge5mUlKDSh7aeClFOoVz9UEdTQyNyjj+u7JaX9DWyqtt6955fcvBJF1aKEjjPQjYV4+FQr9Fnd8NqWavBRL91OUcILzXVselzvLQtPmmvtdhkUNi8G+O+b/qcVyHvls9lJjRGbe0YWtuq9zXA02yIjtBjoQd1vY0EmEFvb3u3xiPt9Wix6NZ7ljWQVbw229SAPrh/hsIECHTLmxKxWD3/K6TUieQeqJIfpcIoOQcgmvHDyyRUevzKImeikRzg+ly1+qSicz7hh/DCm/39Fyk6M86XNkhcEgJKANNt1matUHBPuMmqkqR0Irsee0uIofjg8efSzC4Ml6OzAV1PuydANODV+SaVqKrg8qTvT2ROpiQHqoOAq3EdFRo1QW+1ak/AYmGEVA4cF99A82GRm5mLHhLHqOSqBVNF5d+tjFko2morW+bAtWqE3Mhi2uYPJEeL+puWOoJaLV9uHtQIj2GvjqEnPiF3gSNk2kq1rb+v31DDwcalu1nsmfE1n7J39uQgliDyyoBoudkZrUtnIUrDsC6iGs/DA1YU+EpC8VYQ4iw91D0O8kJIRK0Zo3YzUzYnm6vxq+9EDAP5SWf+Eyupwlhcyq7rgfu0UcsS/cyy18bZBvpooyg1q0GNkTJ+MwtXBtDoaChHEqMdF/a7GjUgboSb8jHDJrfqRhQ/bbI62r8nHoOa6UgOaJLxxg1EhXpXmkd3Rch7uNxgpPzxP/mBdrGsygnoth1z7Q/YLYJb7LwpuGREdhP+ef4imi3CBmJrq9pWR8/s43S4uxqNYHUv9ha9RBACBhuz+S4xTQTZaCKSoDHnxC8CxGhiHczvJUTlt4rrWQpu9+AvsrR2wMvwqpTTd2ETTsO/P3JJiLBUvcs0TXCPCRY2h9Nx8ZqMz8XSEqa9ByDLoNM8PxxK/62v/Wkztb9dlxfHsl4u4UjIZo5lD7knNDevOZvFRYHhwFE22lXrX+Sffrt3y9R1DKaG/GlAPLQQX/Hetzpmce0TT69U3cFZSUWj1hcJa25OoCXx3O5jXSizjPu68eF6JRu4ly0GPmihJAcdY54LAu+PeTtHdGWaRfb6RVp9zxwP+2PoTSQm+qFhD5LkhsYuT1IwWLIAUjU9P0z7IOUj2QP4sYABt2vX5hJCVUnjOBPVGQTmwyR8LSRc2WvhlmD4DMitovW8AmruHvsuxxMnY/ybXB0f6jgvY+7tMu0sJN5r4DBEBXa37SH5PepbiAlY5L6+09qF9dbg57qZdXr+Lkj+9ODwIdoY9Ogs9QXAMPBK9sNLNDM1mFaODMVpqeBBx3+/X8BkyPofOmxl+kYJsG1PP50FDBXj0A4uVUwSXOnyDvjHd5pupMiy5DyOMVDjPDi22YVTeKKPxtGz5/wLm/x/DzHO4PBKlriUyR2fdazZ8MZwZO2yzm40RwLqezNhsNT7aqhOqWBMfTbYcyVtVzrROKLQ/cw8h9MBYgLQZ5m7RtajLhjAmwWRubbOysVY9+MbTxulvSqQymjxTj0/yGmowXOk8LorLHbyciHZbi5Wipq5e028xOnXPq0SO1Ei/BmXFCr+iw4toQwld1d5KXZJaq1eDPduqLEuVRpKA9CzB7KJsTTpdrYpMaOsIFM7Wgr9Oh/caoRAohQN6A6HSrmbUuxffYlS4ymc4W40QYfauuqpQ/JTXe2l3gW1vBU3Q0CQWi+YnGMAlM7QCe806vIrrgQmejgYb3z21bFn0KNZj8qMbtk0fubcrDYYwmBhjZezZtAK7N3MQKKCODWwtmN/WYEGctudKJzRB3xrBGIXPbh2oyOsQ4psvw2packPl36ulG2AlW5rvS3xsDrZG0jPgcLNOBZVquBKudvtx5EyYnivmLREWPn30cbkfL4RsfTwuJVSFZZJFh6UkofGq/bkz/WqbPwyDk8xppCVNz7JQstijvxEWrb40THMQJebLnzyY2q2jx2SLecaR7/0b676f5ddR3aDQqQxzS6YlPvFcYbw+8vic5SAk75H9CSsEorQCVlJSk7DU5HBRkzDnV2QtTJe9fsfqy1sQNBXqUXzv+3HDVDSjlHNPKEmNGm5+zlEP/Pa0mLR8hxOG5PeuHfsO4YAaC+btxGwKVWC9Se7tv8fBJBx1n+Kox6GyPB1SVukkNQkjh9dl8s6dR8uwRo6Ep3zrpyoDHwNvpGU0zV5/27gpveUjCyrt2ZF4TOPsS/WygLkfE2dbNXsNDXjU0kggbh+REnbrOGVNbeYAoc4ZX0aRdyTYOFzlRKaGo4MoHLkMH9FMwYlY+jItBYVbIzsByLIUmu7xM7N3q4VtOAzdBtYpwYx/5yTIIJ9yh2VZWg/uPZimDRgASUeaIeF/TU+n3NBLOkQvsf4CKuJi9s4FqpE2p0HLaw6yIcFU8mcl8Jx6XPWv+eL9Uv+Eyr1QVYQfaJcVwJ6kjFn9GSZ3uvbIxaZMwi7x+nNLp60sgdzogotqc5oVT+LDsygUDk+S361me7L2BWYFkcDER/Rx+J0tgDZ6wwKRu7kFtxCpqtt19WgsF6LzpqmDlLORvOsY68JnuZgBdo7ozFmFR6uGXxbySNeCvPKl92vkVsYEYjZ70nSsNQz9WiIy0pcd4Cjnd16gHVj3X+IIr+ZH/gTnYy0JQvVtpoQKA3yqTH8ZK5WAWFLSXjNeHCwtYmaan6uJoOWW3ktmR0n9j0uxSEniCHfobcaa4adhh6U65iKCHer9DsvpoFJxkj5jhGLhPSjJ+hLddzatV/1Ocn1CE5uZoZAMtgkhUYN5zk9+VUjJxOTjDsX8kQFan+fCSw0rK8IhXNp3dynfHXSYCNq076Pn60lpsgbLC41pl75UNjAtdkXJ0OFBP9SOFxYd/qxoACmCf2c4BNjgll3P8P77ikGQPLbKe6Bprf5RR7SLTcoLj+WEriYD+XvlnCQ6gwN09MIkc6PH+xS8JfJD7iyBoSsLx/L/1AzaxG7e0eIP2dxroERhpC6jg8arrg7XQBksDHIJZIPRhy16WjWaucMUOLtxrgBU9rezETjoCtMnBYdaOAagkVHdueRkp+p0+SRoZ4ejQaCwhOiYRYYJC7NsV73oO8dwYLioC3qILoo9B/eMud5uERJdTB+L3gaZcXObntZ43fegezhpmSwHyw4dM10xfsXF1MY5XAR1XmGR9Qz8Yrc2BSBiUUf1wSye1tGQLKtmsheBI0zWEKzJu8/tdWQ84lcWgnXo9INPwDU5XiJi0OyBQbwRH1ahR14L10g9kAYWlDK/0N3VzcgYYursjTtw/2wSHmfTGJsx5NOXmMmVliBLLHGu6G0jFBLZtUkH7EzFzorhlKhKRrLqXXlXpO8crQ3CHEcZLu9XzwCc9SvkPe94gxwonijdizLHtGfLLKLF1cdtXMFa7Mf4P/JQHiBZIRXBzCKoqPaIuvh7X4/SQdEJnxbsIECUF90ZnrLUpBjTXiX4XAc3Mse7eTXKyZp8Q3Sf1S3esZyDQl+BBER4PmbGOeQ+K1112FbEeyqQZg56WiQ0jRCUmP+Kew9A1ZxSjutLVOfkpuBwoSkP4RGNoe7WrmyTXKI6nk1Tnz0oe2Vm3PjBDf8Gwhe+fwAYSAjlPra1TtCj1uu1GcdIAm6ViQn9Srqf1ym9fPIxInLxt48mCIl6DSTi4ZJ+XkJrz2dXWQqhpSF4nNWapdIjJH+p1Opedufkw0xHlr4vORb9BCJ3W8vAPdZSqI7VxbNaaOfqhI/8w7L9horVKv7MLnEr2l2XgUM6+i5Ix58xgRlYVxa+ltEdaupD5yktPEOlldMIatEHTM9j7h7hxVvQPEbtQP6BmDdVaPz2u/o7+Aiy4lsXGE+Km2ss6828uqY4y28croxcwQBaemP2+4hEA88WmmXnQTmIMFje/i5qVzP/dynhApy5GEB55hU7+jPdveexxyrULupZB1hjyqISvKscuKXOXZUnp8dPLlTkOIlOhMu9t4Vx5PLPIDK0SdUiZ95AlS0+/1macnq6hXYYejgXigt9NePxN2PY9CC0HftH0q8httvBeLZ48ootbmSIZgK7/Wm1zqq/lUDZBL6CYC5KDyLg/WfRKIQMNyN2X432uLr/f/9AoV132hvDNWvIbdgJKmzFwnqjd8+MjwrCINW480Y/0ve7EpvtXHg4WzJv5MuILg89gjdMk86QRO9Q/YKdmb+HV6eMqRTq/oudO/E6zvH3NzGgHNz/zI4Clc1kXUMDTrnDpBI2KbWe//7iI6d1A8nhX4F+4tGki7hfsA4VOK83fdLmcdAGqQRjtItVXa3J7vhE+x0h3K+fVJpM2FZDdY7gVF9ME1rtQmyQOE+F7b6vQAUregqMnIegpxtIKRhyTvfx+DFWZLf+VUZHUO+CicH8sE+9LpldACFUpG+WMfE56X+8xIB5l+Eu4ij2kBUNYythq4o1kyIEuD1kt9XQ97gS9+waaIHokWae6jm/Y8Govgmk31Z2M0SBZAIeudbA/y6RkBys3zsWVHoPxD73jIs92cougppJ3Uxf/pQcoOw/qt20epdVJgHhT5/Rg5mNf+bvQ4LJnwSxs7VE9Qc/myZF4IFBUAom49bMTIghVW6RJ2gfXkP6ovc0THTEpxZWx4zTkARVTfH75vftaIkZptS+h3ERciwL+zFBfxojqrdRqqdkYWAVmXpf+ueckOfXPrN5b9eEwl8OJWgoXwyPM73RDn5ix09+qYTUbhIRquBAIHnO03H3q5TFdSXzP+sPDF+FV61ALiJwLttts7/NF2qhFJI57p4sixeZfoEtm0Dg5wGwPCH6tc6aqO8oe5R+IkDR8TuyFEN2w2kBdTxxvejaSoap3bQlCW4svakUIjVrpe7zCbbcGL0xSe/T3hysCfb20Xj0oFitmmY1Q+1QAbHJj3MfeeZfxuvYYoF7mLnb9sF2SPQEFrRwt08qapY0ODw4ReEM3TamVg4j3BvgKWWLIeWrMXPSM+I3hBzjUn6TbqMNWIPDWj5FBYrWBwXYB71BOpmX+5iYomjHoQ7LUcQ867QRS3qZXYnBbLy/FO2tEGfzE/rGyNxED2nvMySIIs4Fx3fZIsIZn/tCkocG9krZ5TWha4eDI3zmyCQeBMYsXlRDNsMfjEEBFh6/Qhq12c9IUp606kEY5bwbG/QnU+IAyJhlftn2f8iRL5A7v4R9oAJGU2GYjNHqZUGg2z6az4YMtQyXcV9X9WBRlaYnfVIRsmuVGDhDBIoG6C8AkCK6LdXd0NgeShgVCNpx7iacd6L5r4rVi1Gco6rCBwBfwyIJs4Fhnq8IZrURn9zhkJ2FenUPijnbIom4cDNJT3zqMfvySGt4ko2KqwoGDH25QLfuWMbcuRhuQwYKgCX9VgClxETR6DM5DNjTv7F3ysG0kI8NKZ5AZDzjJnJD4VVPwVR/fNKHpzgM8QQGSapVEbQCuiSw0xjHphp0eDxZeames1Mp9WwQ2puhmhj5ql1Lv0eYJEpN8RFa01yfNY0KZkTpYzcO/Ckhbb36k9esVXSMPl1G/K7/sR9Mcqvz7tEmdFwGaO02c6azfLxlRg6byx5y5aqHXBgH+N8X+0pGSjHsaENs0tEcJU4XtLrRLBJGIFVEe3TvIYkvc3siaU1d3xi9t7TPq1L/+hMRqojqmp8jBLyo7KEuYZeOKHFM3mUkV+XkyhiFhmwxtLgSsGMbh8fE6hCR2rTOIinlmsF74yj7IpViQkLbyCbrvDt5/yX6I7Y1abrFs7QBI3D9QnlxlwbgZHvFTKeaFKcI3NvUQFQURMimQ5M+eF6vwSlYff+7/cWpYmvPrIh9BVONzVYOe2tQdAWWT5fJSYL5Upt0L6Dl/pZObBEdo+FPC4b2+iU09eJ6vb/kc2/uq9CvCUV9KB+C/CPAJdOu7vq8wf/Yxy8081PEnm7VGsIzzoFYnDvfYTUyPhdXV2yICWljxWqkyEe4e1n+SZCRACDyiLTdzj5Dq5ThMdA+CNJhV09iM2iW1Pgf2XiLDkIpNo8ugDtNdVTMEBsO+uHzrqEI+EwMOFr2gevD8TkmyjvrYH9Bw6rkARUFwc7DRpOCIaACn2Edjv7bmiS3MFeVgdj1y0Rv+v1DYqY6EwHst3CNlpq6XBW7Q/fu+F1R20aHUR5Z1LIZ7wvY0E/w99bKzAyUjG7671ZUYF6F5+Ynv4Cm0twLZ+GTrBp8VL/LMeq8XYgzYldrklMglyWJS7iWBhdA5GraO3m3rO2AorN4N62bHcpIhG8kbvIkybnRVTEWt5a5f7iIYJN61OO1gLp+lMKa9CuaUR/y9eoF3/jHgqh6iPSadglFYQ/GTsLkzIXMTFtBelXwJHtvmQtoXItuOsLGvL2IK/M295YD8SaNfSND8zTfgUXGYQRyrzsPYC1cxWOto+YkW9R3EinZBFUy/5HWXF6WeqLcPADGeJH3U642mjV9hMqA/GY+7DcN2bpls25VizlGv+FyH0qhDmmd0gUS8y90rDX+Xk6y6McJ6S7gM/DYcoTHv/2NeKg4rjMw8TqrlL9LBcLKWQxtuJxVX7ObKDCs6fNlfUj6iRrGPFdJD+ziFknCJKgixZ5RJQEQZi2MefRmUYi5crYu3Oh50a5Jf+upvNzFAo7KhxO8WRvoqnLO0wvvdcPsaVUOIcvfZoUierdTyFyoxwnJI91KCBroEodybtBGshuLseewOL8RJP+H2Oqsca/SYdeeRtivXY+FFQeTQ33eeX3DdtS0+wgHXVCCQk/CkG/az4aY+ExO9eyJRmpeKAXose57USPZEoRKo6m3uIY0rsGhjw0xAS7X1DuBTFVuo29v3dChgu70cPjpl5/xQmrPdA36PXNZRWOszr9FtTYYxG7dHUooremnYo1QnUGWsN/xygLq9TDGLLhVH/pc4pD+15uGiALFzU4PINmfD25G8LAsJea1dQlpC1s7rkYJUQqIwFNDY4Eh0dawLn8fCol/rhUCEbEHM1dJlCBpXxKfm7zt/ZpsbXgy68nEkEoLjs9rk0E9GFFZoYLZv/4qZR7nl7qBbeALu0FWvdWoNb4hCvlkME+i5nbMafn9uVxxXlpXBlOxHA7IKvKJLMXQanWkuK9A+2VI1JSDoY06+R0/g5TPJIHfO3roljfhM9ncx6Qrk66xY1H0+2UgF+oQgm28A27u9+T4rGo0sT6suA8Jdwthg1T9gojZro33dFb5pubkZ5ZHchLzsKkibaR3DHxf769V4iImNuKKrpgMMK8vcvF4YgFx9Asca63MVyNPtp5+zXPASns3bwdmsxnn1S54GTdkB4DwX4L7JXMnQGqIaS+mPgWxbIZbFcDNIrMilEIEGFczfvcACtmReTyzqnpITyfsh5QK4RKX9ZWtvUy4bWXjsLYbNV7MrrZsT82c9cmf4f8I0sSYqVIlcUYgI782imxBuEKs3OWcogWDmwlr9TGLtVSSTlyzHUW4PU9f7Wv06gLioBSoAf5esTj3FD9kKtTKQZfTKEIOcCYWcfIk4IkcfoFGKSLqsHhBpBOTfEJ6dxkBJXCSlknDrb8XJYO4/96XFd4ThAg4/Heg3u5p1kP3QG2yMuUrty2cFQaT3cWMABIB2diEu/1KfFFSKbfjTp8aUhb99C/ZA5m7h8JWsGwT5Ml9Uhw6CmNHyRA15TyVwIsOH0I1tFeVqQaoqT7wGjyqrJ9bI+WtpjMv5CAGQfj+k2aPOJZ/zLvxAtkd/Bzh9BZPEwVE0I0DI82uWK72P5+mHKig5zbXYrQE5bSNA9/gHvSND2qLV3hLPnoJp5q/NeZX7mhb2aWf7qkF8iM4HEHQ6YiYA+E+kPmfMGabHq62QBi8sSJ3yb68iTcA4YT6f+gJb6G3adGkY9eeu7XQZiQEi2fXRSKUOj/zLkyh4R3hOAX6xhT1yCvCHT2Jb9tAzSMxe0RFbM3g6b/VHgP8nyZkt45j1ZYBTwOpQIaFU7nU5focNbiclNOds9b6I+FOnBXwyAf1ViJPMKBBofmR8wg+77g5o3CiYUzQ+KdNxUo14XQc58/GKrIq3XSIefM9azql5sX7KlTsU8DGT1HlHIYnd10cJYsAEHoN0mLKcHTySHsjTFesKWsmK+siZFXhlavE6F44mweXOrX6FBoELRrvIrsst4OH+O47VaML4CK/cNrjlTodfRr3u2XZsHCcw9kXLGX/15sm10DYmP3G3387x7LDyVoplrs0pzIvfcy41eb2Ob/wM6tQNLxQKnfSbL0eyYL+RWR09qeHT/lWpCFvcISYlmdF/jMaIWDyxE/LA1tguYOSiQtSqHfgqHr1n/k5nFhnUBnU1J1eys/8qySmWwIplgfD3uNcFHlg6trf2B11Om/f7E9onO53sWHhas4nNuhBJsUn2OjOnOAFZi2dcAvexHytVxIdybjHcEdXUcp0jkab19hwZ0RddTUGjtyulBmpbfGD+4d+oynTEjmMlYS/pfoCyhEk9XbgbBf7wtFs5qleFrCmB0NrUYZLxmw+2wFqYEUy2hYP3ZxY8uhRZeFXZfhOD58zGBx7lo4yMjiBc0zvOGqVQm8d4tk1CRpyGJOGJWVU4EpHPxqgMP6hV7f0IxJugziIEJHavrZauRXe0/THYEOKpl/a4jm/fah+oAzHRBqwetjJBSjNp5LaZ3ZUNQElZJBDOF1e4muumSHF6da394Cvppq45QN1B2wYBfbx4Y9fnq5b+heTNTCmP9XhMQGniDhmdhGzfPUY5YPvTUhEcaaA2ucNDUO/xvaUVhXDIodrM/05R31bnFkjUjn34N7Aiuagl9VB9SjYsu83Ws9eoevaZVwZMC4uiZko2GtNzZCyMHRq6GKhvEGBiM1gLyvMZk3eR2dGcn19YX72JnDBY6RWncG7lGAg0YZR9lyoCyQ13gtnyBi05gPlO9yOeIYGqQrhgRpR+pAvx4czdaBMpVI7SgZMAhMSsdPUEQ9stTtwSabBmrln0uHsOMhDvi0bNRUWUmqnu3eiLgzk2XKGyTaHCe59vZZcmDkk8aOO6pTw5H+DWALBPMcCOmfIz4cF9E5zesXbQkQNDFk7vlnAcetbpid+Ce9MnTb3Clhv0lL7lyusJYCpLpalVXmQ67YNR+IIDh9vW7XeWnU3FFfdnO0yqCON1josSLVMTTaH/T3Q7Y+gOUofDwwXaGyGRB+4GRC2kk7zANlgd7PmE5kXda4IpmTbP2OqUJ/O9EXW4aslQR5PtYy3tNMamtk4Lwzb6WIFll7MVBneG5vPfEGslblvK4unzLLIvceI6WxhiZNc/nr10k9nn8ikKPz5jmA9oC+lWIE8QR4XYTcO6WZ7VMORykmWLBbTE1NQc8/TBpYSaYjlsyOK50EEwZC6/hyMiltFDU/OcVfSs/4s0Rk68qJkU5mIFxzQcySQSzLKmqQzkbb2ZlC8MLMP8Tt/ui2UK3r3IoyOWjDNfAV+2/iYAbaU/gcEuC9PqZbBCpHpobrsMSJpIpAbdk+lZArMaQfdQP2kY9Krk6TsjNb/ad7Ghc/HTlJyxRISEoijGyuLhUJB5Ch35PrR1oibmRE3vvhC5cWj/AFFMlliT5ELHoj9ieMLEG0BOkVRUXKuv2bfaF8AdXORnzTtMfXYqB8UVY5TvybX4Mkg9YXaiDDrp7KV8wVHpmx3MIlmRkznG4Q7DbYNTZBEi2yxQfQW37NrAOyCP8AXP/EHi/BLLFg/ip1tleZLojlnpdzKgSmJyi4IRDWNifCtFxTRjzh2z9DNa3KUZLZnixrksQWHwp2gRkmuu7HYPHYIQrdjih0WnNb7CL7hFDLjbfGaVLQh5Fu7SHtZTqDYzgY4QnM/x2PC8v6+qmCAMbOvWxZOIxjgpUF1ud2/e41K1bJAXPTZ0ctJLsigJDqNH6fNsXGGXNx7cwJPgP6INK3Qxc3ylfv0L1e9m37k+CqkJJTN6MvvQuae8WjO1l0JvBh6yHIrZgf/Bt/DNS1QULgHfUCLdwH6GVXxn8JChzrTEJL4dTZGD6nCwPWD+eeU/jxNc/wph/HYngIZcSTOnA7ZoHemc7pUYXx0Nr45Sbce9CyAvFnCzoIYbXxoDXYVwt/7sf509VEfvoLzjbFrRKr4vntb5dgeDiwRX6neO0yQZsOSoVjVvOOSAuP4PT+ezKgOTL5CMeBFh5fTyCTneXHNexLrs1pBpLHH3kmt/Gi6938ByjJyGR1wM7/rvRQQoS1drQjQ0vefqIJKlavxUAyi0PuILAyGGfaeCzz00DKjY1cowpRuwwf7rYPEZOByjttnqj6EUZ84F5gZp+4HJmTpMjNq0q/lyKFhwHKG0wkVp5h+gESx82VKGR+mbao8YOh23JnEy+eNJ45yos7d1gFc6GC67dt+OzE5TpAYicEpe2YtuuIHNt0hQpdLBdS8eqx9D9RSrya3h16jYIp9Ogfv58USTrQa6bOJgC6Fuw3VSohoUOQpQ/XY+PVKw2eV8Q1N6yxzymT6QIiLizm3kcA+jtFVJVj/IlTTGr7Tj6P8fQmh0ag3AJfRbLs8nmEQ1QHGUtaUv9djTgKNG5hVLyiujHLL77tNlHcYLwqquU6Z2V+WMoDwfBiMDqK39/tNhs7dXQhQTHYkold5VgNmV+WJr8ETyoKTHTS8g1RZL+KCbZw1LZoGTgR6eNleq+XGRggG9pbw1+WcW0jzJpvQle+pDWTA3yPaJogeuohg7EijR/48Se6kjwNpGStelAHWNOtzrfgmNxtH9r1eSRWLz79nRNF5th43Vy+rZ9FcwK7PlfJojQmk6yDIgDVpS2IJtFflHkl2pdrA/ZK4Grks9dfURGUNk54HimplKaYEZX5dE2M9W/60vxTLBE6XeIZ01h4YiHBHGMX+eAHZAHpSk2dFZUbQL/ylbq8VdzyOCnwzB532xAsz2XqmJFNJCZ6YuvEpyZtLa07GuhPki8MeZUI63KN4jC30SSX7/bWpsMyfpqrzmMI+cCYlmRUB0Mu4kG/untuIlFzWG2JnuSThOvNB87WuxDF4K9MPLtApA2nPV+2yMqZtQu/5eBgMzg8/6FBhddJz3kV0onK4Jbo71w6dhI4czF3ksh7/wVe0vAH8B/pVGb1v7xscPIhg6KL+hvTtq6g1+kCPpBURUhkj6yrfPgZ3/Xtc22MaQJp0ouI8smF0IW7P8ZfkCNRlxyoz5rOlXJ2YoBYf+hZJACLpIW6Ecg7s2fptIWtvuAgGvGV7dSNLkYv17ghjkJQx6tLucnApd6V56PAKNj/7Yyi6MOC9uwvXC4HnQSolMT49c6/5ZRIfWauOyw+arQBxET3gqjgZPldHDuhPDdYxffuJ1ityuwa75OUwVzCfQ3DhhKAfuieBFYqqN1i5usxjNFwKad4V39gjt2wLjcS1yX59qz0LCyVW9KbSYU9A28hy5DC7hdtdQxRU9PX4vfg8R4KZzpT7OhJe4Rwnuob88KsYJT3Xdb5uQj/iI2b9k+IAL2RazReg2nxwi3ia771jH8mWcStAs1NJu+cMgx6oarFqLe8b1HSRxQ7za0WtQhVKdhOSo+l5MyUbO7l4rtMf8vOidRDYSBoESyiDirZR/lirb7mNwOHR9B00U3KDHjR+/6/p0FjHCVpWNOzJcWfIRQkZ6XmbdXoGNbYi+/6K31kVQSpEiFHlf0XTAzQKDh03BJv6aoldSXInQfAEINY34mN7TGvaILI1iq1F8qQD9LdUyM1y1GkmIcoViAyaqPmTF6srtanuyTM4L1D0wyuj0tEVAfuycGdwEON4fnsCqlt5T6S1obgnUutprS4s5WpzQgzd4U9TRXJErli2+o2bS7A/uISBZhgh/679K/zLda6gWtuZwAvTGNdCbAN9uwZti3Hk9kKWrIq/zDHz00+fSYLcc5sgjgY5sWd/F9nGirgGojICMTxUzGmVVyjsC+0iZ7i++UKuLA2KCekIgylXj+DAZVKUFgBgXYW5+1bwyASMUltB5MhCcaMuivyyhZw3MJ7OjjmJyH+sH7zwWOwFaztw+KQpl6ETunGZ4wgXDkkep9RDpXHKdERy5R1KfOfi61l4kXklOVi+UvIPbGuKxTqSuKxjgg5aUU0X3V/EKdOugbYyeYKlYTyfe6Py6u2Z+A0k4k2giHiUVqkoC8MKxTXxmChSs68WryAMhUxyo84ORdwTONcLdmrVJbnyH+ugmyyx9iKEPADsMijuo2U3uJDa7Wnfr9gcycQq006VxIwrhk0FV/BDjqzquNOsEJXdrimGw0G+JVU4/5BNk+lE5kSCYz9cOOfNBtbtPUoVHnu1jfPwwGlaTc7GUxPcDFnEgwaHh5znVnSwPAAdXz5o6vI34Epz0NKfx11wmUjfW8nTAn60/CwPV4XjHM2yzXbq/EA9hUimpPyH+gMWQc8fiEpaTtk7l1iADxvDO8EMdlaQ0nXdXnhCuCrsoC+Uvlb9IaXpTbhDyzTzYYUPRsJ1khYU6+UMPk1YHn7mE5V3/F28Yia/wrwDdF+R6TmVzsqudzix7NyUGk46wXs0WaHIURcZDicGiV7SEhoVNTU0zgBoaSd49LNnCcmSgWRMUa0JKdpcVnfovdDcIyEcqOXD4VeP1baW1O5XKi8DuZzNuEL/drafxlkHz2RIla0Jp8ILNn7S3fdeg9UhAx9q0+SKtkZq2KsJrdjjyAjr3GfTjVIDAz98414NxYOtS7EWs2ZaFK7+4WBYoC5Hkeq4b/TVXen2W5sxGUXGVbea0PfIOieEzqtacY9iZH8JBwrLvaO9mQx8S8Xs1qoQA5mRuhLUFIcDGMj1wJK/K+vclB5Bl071Plrpq5+L4WJ77f/haemR3QBDVN+DYo/NMMFkqokI7b1nRwuzDmI5dEx4XMlGANd6UtZZVQ12+CHjwiLfAM9yPWaei6wRjGbxBRZUWxyt/lA3BanlqVbrdSdMBG5p3j4Pa9sSfYjUr77zB9h2qpnC6V8u1+XFmGBTP3y97KCCHykGfB6mbCNng2OYcDfFxSp12MaqtqOwry+xB9gUkHlnfW9DENAGqcYOxFOWwZHAJEeIuPuyLr3pc8euQGkJA6K1rmHJDoeAl370hmHY+Wk02WBNr6bOj8owlbEPXZobBQ/xU4JVN9l2GH0nnIedokXyCvBiq+jOf90wECFhhyXgaKiOos+J5t5i72+cySCooSeyr88ULT2mwUuMCLDw9Pty72PByiEtatpiqNeZF8Kladg4jD+8iY+w8ru/PveAVmrABMft/YevFyzmyB1LNidUz8yrnolKmitwK2bPJrQzSfyMg7RCZtnj801QmxB2Hh1RdODJ04NYCR84mkyeVmLrySQsPfWBiZawIPusj3W803YTrCIFZh55a7RhYSAh5uolGsv0TMC+pfZ8CJFMfhrjIkPX4iPlpoVij0m+1EDPaObMhssohxiQLjAb8un88eH/6Z8SnJxoDDY9JjIkM28xe9G9BMqE8CdRizNqXF+yzFoq+i0JXmGCunk6mGwVz7dw0Aht2yZLXL1jgrrUpP84ikBVljLiJmABWcOUt5aq4e2FLPP4IYwNw6/6kBGhUw92jqGvzzSz2IXFoSGkFThCZ6Hdi95k3hbTR+UyOtNXxKf3qOHtoG1+tO5u2H6XvCe4OZ0IsSdV2C22f4X0XRjnoLI9dkAJcmaPzyLbgrWgj/dizWHsrNz5PzGCCZ7zywhZMyk6RrEJ5ucZ5k4Fosm8+U94ZyJFHYaHthMhJSLgoHd9plpggxNFeaBMx2BdSg8d0qM1P9s3xHTr7n+uvFsfU5qJafAkyfAi/gC+OLxCw0uMl/XJ+id3bpdG4VxQwyKvZaxCWrPaRHIy9KcdR43jv9jfykGUTzB9KjyF1G0SkyMHMeY5wgAmcEp9B8ffD92GR4FQExXAD/Rm70xyf9mrg0HowJ+Y5o1trz3gJx6Em+pGPt0PvCVSXsmyA7BLMqIiL8iKyvmFzR0O7FJPoUD5dZJ1eKn4tDUJJ4Umb72XTHqR1qs8KsHPpu1Bas2jM6FoTMyoX5aScTz2RVJH0xso6SkxxuMBg3uUblz4fj83SnK1GADX8ZJtrY6l5lrbF1/ZuSi1BShVAdFnfBB3Sh1SW4KQz2mL+Y4svWwspzeGp4W6pTFKdMDjOxHzkJHkAfLjLjqf+T1Axa9og+Cl7gRTi70bSWjsQM9F19HqH1IdJOoerLMQTLpuVpFU//G6/hsxG6sFsnzMJ7n73SbIizBrcriqJQot6sKe+uP1gONUVuBIPlDJA49atkvafSdkS4NR+zciAFrwoHjdIsVSJKqDxAVrM15uFJb4cUI1Z5j3Wgo4gLqLZDMdNtYKJ1P7oBTGSBKZGTqguAYXj9FtcQ4sSbuwAvEKj0iSHfGzNYpAzMhIVEl+O5tVLe4s/3uEd9Gsrl6bogS5HKQwX3XK8Vnj7lf+5qIQiTSzRnfkEpdxxgU0LAZG7OSxjiHkVD2gFaZ1GjKhIedce7dFUwac8qA8Ut250wwH7O4rKHFECWEhhPfyyNNFFWeFrcIjCB9QkpXuz0U80DXFirexggv6bCvxlzrpYL2A02HykHogeIIum14ATyzZnKSfKNZqYUHkFr6qN2/mPO1WK01C9CpwXcl3fLEficn+qMiFNH5a/JFJBAF2ZZWJ5EP8mGzPCF9CDlr0z0YHruP+6bAUG47CNw5yDdR0WDTjq/DqDE8W+/fc6iTB4r9945YbHjR76ZqoOFAkp3KnRniRLdWK5iKvLCCH/Jf9vzHnX4LfdHlAiEucOADd6aaTJnMDTB0DnLoW9pvA/TvJPoH2GYOwUyBgDkGv7VLqRPzjz9nIWylnnWqIlm7L9YRAuucHIleKaTQCeUrXP0Wnyp2nmBxzeDiVOPsap6l6MYLHO4xg8HBAK3J1dgvBpIjcYDKZexJV5mf8c0hpw5ODKTwdkKCeeTezcPXh/9nI/FlRcIYy8sH3nKCQ0EEucVi+uinLNXGTmZXSuB5jYC2k1R6X8FYDLSs7G3qg+Wa30/SZZVsN+vbIWPDRqs9HMz/V2eXRrxClGwzMRZTnpwuqrD1GTjLUluOf9uPygJGxe+/EB6Ak5UCCsCWe2GLD5iZX8ywqGyaP9CGKOOsQ504tSVjAMPPpKo7Ex8LT3xYdh4QReijfasLvMKd8/bu689y+WY+S8IO9LXV7KYzmOOycnb7imsjeiBPCZgNd2Hd2fLIQOaLorPkKjFZcGRaNO6lp+pBPTMvw9QIbYuQZBlhu48VmV3i/3Y0m71BChUWR3cdNSS4D96YC5J0Y7ZFqMHBW6G9p9pf1EMvsoq2dzX2wSvNYXqdP47zyePLrk+nreb97cBNao7U34lHDXeFQ+HqT8XvcE26g42SyQZmHFRlH2UZ0kohpcgm7Li2wAo0IHMre/0XfRV0HtarB6og11KC3Z7/RUcqKzEPA7ZEJQgZNgBZE02MFT702HN67p516Nvqkm0Gjx83wQdQMeqxlml8LDK0V5SdTdnatEK7C+bhiQ3CLRBupVuTeGYhJY/BbrqiE1SY1vdXZ2SFuvNbcrI6ErGJV8/qH1acDEtu58Cm9IYXlR4R//8FS+sjKjiIPcuzVQ+9bV25MODrRYTzxFJYbLhp2Um/HKOncgLdKHj7tOrMZfxR6CrV1qRAGh+vD5dMMDkqvh3RtFI8M/B+95gOm4879zLjARkfVycAOqjJdoBfgWjWNsJnafTkmc7B3nIQv/Doeol9zaGW/DlpeEHHLSCVAFpPcoRFbXqIB0NIfCnsKcK8GmaNVe1S1WmDjR9kV2WjYdDpu3d+gX3edjZ363f9jQEbUhFXtuRXOQv+gmYCubqBrqUoagUdP7xj0HIFEZg93/KZ2CrZfN9t0A6WcpUJBI5WLyoLnqf11jJxzi7XP7icTGifXh8HPdPwOvmb7A1BFcfY2H1yrgpQ9LL1WPc8f4dqfuE91BNq8DtcEql3/06rGk4gsNyWI77GnH9IKwUsAFlrpUmA3zzUPojorig8/2Cbd3TjsCKM9wxliCLyKPngKsM1KFkqM6bMFtyxYYrU2eewcxYM6RkLIzuCbt2tjjkrWkSVoIS5lGaeH9ACsgsCD8uBJTg2FG+jOXwTTSCvGIWOiSPmrIKKcqEISVvUcMWhHEeUKjXTMdtBmPl8s4WipwTYa2j7rmaa0RNf7IXAOT77NGep/q0h0KdWRo5UPERTufgAqHgtum1dZEPq6OH8ILA+nokd8MXPhCko+zgkNqNlrLQew5ugiVBI+TSaF0+Nh/0lIpsCoBQWlDacVD+Vx3x3aSXTbkp6URafBo7r4W0YMJYL0MnwFM5mzSBvH459mHAZ0yzT09dEXgjVW9/ggg2LxRO6yGo5FTpGQS5EwMSjG3crtd3U4X4CO+KX5W46TC5B/X/DpEipFhWLaE6rpYO0r44KwsS9Ge9H2dfFY3QNvXA1sWHN6WR25HgQ091u/FmxcmTXpvXerH0b5xRi1MwmGmrK4ZAT1TapoD8+smzXuW4xfFWkVDOL7zk9xNtB53A3+dJrIzc5OTB601UXSFtQkX3hWaSnhB0fIWaxp9w7vGQDYtDAeTTDigrLMhVNfLUpJcIxhrMjO0Amicb+Ubauev6gApJbByzVQRTWq047GGRSYgxukHnlk5+xWTYTi31cQQCJ9ILZRJ3tV05M1AIgNeeDW2H8IBJqkzSl9nnKSajGYOD7eMyjHHWbG4SEV8CvAH8Iew6SodPSlX4spOyb4O8XdYQ2bne98jMMolgBIbc8j1VfPhmdPcqVcmf5qMjZcC2VzGSMF9s4863hYPVGq86Huy5cmg6zBz+qDU3yje9vmEr3yJ6kZhF5z8UdlkJdjq/581O9VuCR2B3lyEAfQoUZot9HdVILawreyRxAy11JlpE3UoO/fi5/5omkUs0A7Gvb5+bsteFVIW+9l+qR2dINow47smAidv0bLLEr/yqKcUanjvixyzAQCM5CVzq0r7rDR9M7wjLxBq9eBWRVmyK9TfSJqXHjL8T3l8phqzWGZrkRC5oiPO6C5Wf59fFDP+ituUaiEqytebX0Feyu7U5Leql5gBMTdDPsmK7KUOyA5TuWxjGc7dN7kJKEYpro0VWRhjMArMIGbutu6vN2OSHb6nvd508S4Q34uCRKu96bSAD7YHASNVhzXv8N8jroYf5Y7E9s4wTpkvo3BZkkWqpF0M1vka3jjUC/JuZvw9V8avX+D9bciICl12vr/bQJxDe+TN9MQwDJwOe5HRWZKtCtH/1/2brHVDE381FF3JIILjZf20UTFL4MLwmZtFv3M88Bv1x6hEyoaAlZ5p5QEWzlw8bJBt8orARhiododtduYtJBSF7octT9JzbeKdozaif0LBWL/u9RjbeVNLZ8UV44Ye6Sz56Vn8QlwftWL01WoPryii3ZZ930Zx6Ins/HGvGQmHAD+2qvuKQAs8Y6ublb+Dvhp3Y2NNMjsuzOvb6m4YtkPzbhlctKadex8tBQuo0zhmSxfDIZm5VnEDdG2vZ6kcykYFxgAz3wrkVyXQnwxyQIeYMIHQYT+257jBWD0yJIiC3PqmohMzTC/65XVgSsowG2kgnlR7pYY18nBQ8aVfJ64D79rH2pymM4xMU1Zk/OS14XiDcldhO0c0RhQxiPSY72XYxpiaKVYmzOcEvI1PzQa7+LVZ6pBIwn8ffWvhqa38b3IskTs4RBkYs9i+i9/AqdAQg2IOeWv2fuo5tEcFyefI9nATJXQchbBEQO2Cj3kaBe2X+81o97B22kYSwjOkgZybf53qZFQ6p/N0dL/VnuL1cYTGi8k6rMpkKGx4j+Mc/fcHUVNXTKhyO10FkvHiN+qSbJGepJ/aLXoLZ8RET0Bshv/4hAQgzeS7yl0n74cedqdnmAeHmQ2CyXvMM0MWpEvA2ezZIKU+WvUSaGpTt1kvMloerqnqxHLfT01Yh2n3iD29EWnrQsyjedi1I5SUgvQKBM9G+oAai15cO1con2QFz3UK7w7ZgzM+vPmbk2QqR87fzlbdTSAhrLXzqVfLnWBA/4+5aC+0BRMZ6iX9lH3QXtKU9D01K3HprdilL456y5lsl38VQaMbz9hk0LgquziMY01Znz2WE4ClHG9cF/e7stVmn89oNFUE9NZ1RAc97KzDEWHLoKwlCG6L20/2Gj7/M6PDhsvhY+FMzYRg+v/0jo2gPT0UTCfaLBDRVvKQgUSYPMG1dr6ox7ohepBUS0msHq/V7A6Y9WfKDgSLatqTzwhOXnuXAoFc1LsdlV/Nv7XHqg5TAohZGa1mOn44SyY1fyPMCxL1QmxvhBC7mxDyj9DUnBpbjdAzrBW0mUzZ51brDVW3f0A8oKL6FYBf0mwK6YxDMJogq94OPgpZyKHKBYvJXMfs6u0pYnEn/jPeTVQMK6uY9Egww5setjqwdQmwi1ea0/uoNw7QKPorCWZohFt4VB+HUy/ObjCDdxryIg/y0wXGMwFyftSyf0v/ESOVaUNOHg1aA0SQ0KOwx/oqBneMvSoxZc7SqvQaHcx3ZLg7I0FQgQ9799KuVGTfGNgWvzIMnHqMNnCyCLJMNoNQK9XA4Wkq+6tVuCUREehKj+szE6KlaSwgAPfb6JeGqIyBrjJK/wNw2yPaYB9wHia3A56M5r4OplAvdVjO1vrsc4I8LAy1zqqpo0yM1hfixHeLNDG6ufXaX/4mWxYpqL3hBHpPbnox49P3jj/wGgdZFaJe1JTer036xd0Xak5qCI6SV86xqAdAChv6sj7ESw0SU7w0leCi/08lfYfucRQHdzjO3JkA7lvHw0ouMCSCweP+ms5HlStT1HLlgQ/pkLQ0HiDkuoPtTY6fDW0UPlH3ebKJKJsiIlEwAnWQ1ExfQhfs1IRdbEO6sgyC7u2YqSye9WFoH3s0+d4P2X78UPcUsRitbiSflMds3+5ixk47wEAbwHOouv3l0AUb9zZIP32hh+8n3fJx3LXT4wqErJXRmufydvyJuKW5IkA+rD7B5y3hJGUFrf+je8x2WEZ93MMZZjKF3R4hY4E82J7y0z9znWEXqtnGce0dejOBkrf6CbP1VCh4ixhRvmOXO9yA0A2XQqeWYNfk1eUkRWlybRDBiE5SOOtjudxOpqC6Hv0XRqdL58/dsrEItVoppvb13l9MrZRKzOe/vtw9JP9aAkOa7ra6MbT/3YE4LlEJ5ticKWKe+rOGibg+N20Vx6Vg7J3byZG9+hIpULnZWH4Tq3LmlMA+oUfgAbbzPl3twbDuQozSElI95KSsXaBWevUxIWPQdY+4eolMlTtLwn+51SP6BWFEiioYy+r2Rza4OqKJPMbx7t0CZCtpMKxYQ5JCowbAH7J4Y3Eh3C04j1H/2a7qH3cVo01mg0KjVVR59qENmLLCnQ4LNMS3i2XshEK7QAIvi4D+egZPpMUywog3s+tqRiaGXIEMFp3rd3TuvLXVT9tpJGxjgQLGMKXmGL1MVjoN97by2NaOn0JoIbOQqeBIHTVbBYNON5DD3XP+rStPIfVbuHd+90TJpGh8BlfV0dLneK2wDMnndVGVvQLhvaQxu6sL3XsvtxmQzeFWUSHLeAlmTc9yNQKkXtOJWS9faewS8yotiXdJQ6EI1vpVOHgh46gljSllVDRx9qlH7i2QFU/dKpaQEbpAFUBI/eSUGbpgT2ORGcUGXXDWjQJQo+nCkQVnIMRUCP367os5Iw4Rb3LDvOi+/mwcBozzUa4WkjVcSIURKO3RTFCiY9j3O6C5MBS6Y0WbBooC0nOzhKxL8xMIIaM/tnyEzIdlABrz3f9XlCiQ0hh+C7/bNp14eUvnjcHWjBOSw8E7BjzeXkRQkpIuZSOriwZ8PiOLZxCkXFOQ4hbXa4Tu69lccJ9Hd0F1lxkg5QnAhhfx5WdcTkBH3SibBUMCLPb/cYypz6s4GGDMV5smYibldp//j9gbCEhqanpxLsoexOMik4SOt879z21iz+8V3wgG8CicQsmxcsqCc5QUqOZhnpO4qAFgzHF+noxN835P4xf5EsOcPvYWwtzK3WEYVGy5tuvxE5WZB246SGIDgeC4sMge0B4p70Tse4b6NjlPHW+90GmqnySqY83r0ilaew46qmwi4RzmOcPehbn4YPCoISjQ44RURV++dfU53vcKhkSj6cWuh75tdSSUNMysFwoP+lN2gGTwxOfrha9wWxDPpimhEBVrt6dcBIvdoUbCLTDQDZuUOVVhZP4sATqq8z7Ai0STnGxzKmAHG+3I+/tvrDN/OOTHwR6W5aWSRj+M5wmS5hfdvimlus2z4pE6RV+l6scSEX3XjFUVgbSuuufln4qZfmgBxNvIZmkPtMh4WHAtuqRVdgDOLksqdhjqc9jrNVpRsYL4L5fXaKhNXYNJfTorxbaoSpoqj6ZEp05xsc4y4Qryx7BRs3iYvuHRbCUsiCPmmGdUPXDn6H7woEjiz1YeriH6NPF5au5aVrtcw0DvEgLLKMuVq6QvzE1mu+x9AFhhIEE3jVvzGWs7x+IBGJ2hfG8Kb57q5sDsPmddrc0s2doavGt3j59SpKkbETAVxcSwwHbpAEsYTNPM1KhVl7EPpQp+gNotyPx7hI11xG47CrYE7+4xlCFpaDwvf9FWescjE9qNrcgCXvSeme0GAOo6QjsttWQcRguwWZb6OG1VPN2xZcfyUeEGLHhPkrziDDf4SHNaCcXXJ9CtFdyRMVueZNWqaoSKhpFI91MMLSXju3pGbSzJlM8FPf/oxZbRADvlZZCyb8fbb4mQVBZZ3GWV4hj4PCrLA1qQvEqs9XLsRnoal9WaSQhWRzLJmCurnGGRc6wxyAAejp0pAR70k0M8R+ziXphTbSz5jU2xp2cFe1EhegrqPqjFAtYWbYwsm9X969oYf76RSVpD5DfI8iDfFILBkfvnZaZtHikQ2tfNY1T0QOYafZ+dfiQjWZxqrDxXDWbc/jYZSbOzpgJ0HvC9wodOgTk5d5d9dmNrnM0LH8bvtI4zgktUZdf/DkYM10EF8yMhbFqvpMTi+TaLBUNd9aLSzSGAqu41xsKxsEYHFPhxozYZMPCafc4U5t8Ja7k34czb9pTsN2JFnwl8AmZSpI39KzBoEcD8fz0CAcio2KlaDIhPF8V0HkEbwc2c0mkpBazhOMI1d4cxnKG15nlJ+haP4D9g/H1z7jIEHS7enL9st+r19iJpqLFuJiKD2NT7LXyBzaAcFxIJ/fo4roeZSvHUyfgqUjSVcPiszEAuk4Fgqjxih+ln6TZW8b5sbDIvrB1Ul++c1B63XbFgHdVJTaRPzIXeh5f5u+QYvfa7pHyQV0ZUIv4SnfFMvTC0g0/fdaaBd9rcpxu/CBpbobKZgCIyVRDZGdPlZs8UGyu7+Hxb64E/k0YIIyG0d7ZSIcU1dOwyAQt25Ow5B4W/oUhgU+Gf+qB/Eqf+V11+GylEkiyGag2sSabnAwgaqTr549u7USX8FH6EnKLv1g9jl2zIU7C6GM3aeDn8kP+9aBM0Agrl165RV4/UHaXPnrBjs3YOHlrMK9jziNkwwt6+rC5FPPvSm2uVuOQouD4+Rk/8X2VoT+8bijB9PNpfsOsNhiSOVgntu7dzfzJItraFExs2ylPt0vanTgZJP3SIxPvZsgaDSBNmxIh0KPLS+EZkJ1Xy0gY8WVOZDbYF9v0GJta6+GUy7ek8lisYumJ1nyw90NF5n7L6H1aFMYqA/WI2COJA7pWaf9Ugf5pniETIJNyNXtonwZOLeCG380p2a2m5Fs4WDJIbVCtkJ77ah+h3HMvJJ0fzW8OXfnZDuzbWB935lP5zr2+vOc7CL44LjNt8p2deJJKd+d8n1mwKwxWxUjkxJRVlpIqwq1a+Sfeu1oNGDaOXyS/LVoiWAi4/RFFK77j8sVBWyTeqc13DCYWKdEbHTgEcIdtBewm3fvU99V8J4gYLJijdis2O/D+3FBz8kG/SwAXwjzKgO1TmXuA3syLPxxfnEUxttkUPpzQJgAzcN6o79tpHr3QWX3TVy4USKZJPX/G7/sFv7TB2RKaM9LvG8518UTl/oNK6/mqMpSOqsv0xRVzNjumgamqz/e3LG3e1lkrW5SquqlrDJIrN90AProjO2hsva2vAv1ZNPbHVfvH6K8KnMmDbXcZImS+YAXafdXLVILS/Q0MSKuRaLPQABT6AsH1SpBlkiSLXyhT/gT5IbfD6Z1Jx0n7l33o2uGW4lgd8BRn8WUeEHBHEn2SCXVQwlREQtvN7iSC2y8qSngF4ytc3vgOucrGccauebyUn9sdKmkhMom+XHRGLg4yr7NW/ZAq8UDCTjimw0unj204NYoihtZTNdXwgmCpqzA6Y4a3S/braI7FEXELgpjVSnB+dqkyFq3Tny2G8lAz1OtN0TZdE3wgbqL8XtsE5Ut1NayTqmPNmEhJVC0f6ZfMop0HP5VawTxA+lq1XoeRAoIGH0ojuV+9O13sh2V2zoxj5jVyNGuZDtqZVlEeSIRI05PVi7nZfKw+EuT5YTkdX/qnx/AmQXABJR8mEbt5A8Oab2RqMdG+P0zvDI0gODnGDSO2w4ZOrD1zi5LnYaIljibbOMhpDWcwsd6Ry5eUmiLQ24OpaErO6a3/sYLybm9xOJLqfn7DNg/5SKBxEfKNyyUYP4KtkSMQI5Xo7dHcIhqH4l3CRK/gB7WtFU6bj0mReNJIitL8grYbUyZpqDuMDT5s5WQsWjOEmRSbMiH7HIkEIPvRu0WxMnRCJKjGFWdlKGqK96T7jlsEHCjsPjk/9VEQ4W5qB2tRAFGJ5YGgbmyYxqxGxduvkNdd3IZKcIbvtEtH4X7aHeyV4Dcn4wkEzUNRRhISM51Av5I1mwi2lj3DP8d6K9iFzNVDCSb+eb9pBu+SEqYrvFC8WKSi8OcZDj50KV871120hgz6n6OZy1KOh8OzKNuCKFt9mVlUfJKzD9gcuL53q+oTHGGIKFz4+4/zLC13N3l3y4Fn9dzM02uGyBGoJXmF3jrwW9OguOsh1FVykE1suM6kC/e005VRngkgcn29tixbfGSx7k8JzTId+5wTXE1HgKXCtGlwA7L6FxS+RUGGP2az1Em91D7THACjjqlVdoDOltQ7Yb4S8n4kG/m/CvtFfQB0e/e/JMgICLGKds6v5THENB7WYOdJ0P5s3GQzdbeXjUAG5Y2WCUBs5LZ6xDZzv1L7jfUHqBbmnHW7U4g+UTYB/tW7B0Ya0JAbpzWFSoVQH6CbY6q9fM8ccelwWdxeWdjZm+TcmBAHpje+emw8T5mUgl7Omvks7D2xk04/HjynzVyBN2dI3dBgxTkB1keL9tMN0WgyjY0ddKI8pigHP9lOa8hb7F2bZIa/FqS6JJPPHnlyPbVl+weIG7j4ocmWH/OkvaT4qtcbnafk2ocwOkjSqUob66ehit1UDMwKXreD2R92MZugTHNe/PWAZesANg9eBbm2p+4kqK52j8MW3AhqaffDN+kK195DUM4FLVYm8BQhOF+OWoM5tTD8LImCNRenutbU6qRxpaMDXCBU37/K3Y7eobcg/IaZaBuw44FteI67Hdgufk5VqCDjlK7jDBUtVq07hpPI9ymWW/m3nNLQlusNGDSBNYXOUBDRWNnHira/1eo9GEwVgpXn2tG1PUUxT15p/fbfGXCvpsj0QlzwErC0ge/Oqlsh7E0QhpqDAcvlBJOiXDD/bv01SkM269rmghWHJPUbmpq4trj7H6cCMXMIwWgOLaTXR0w3tamzJpReC8FXDNwkxSCbmg/ag17JdPyptz7mR3k6KvXor6tFCfEv85TW7CDWLEap1AC12Ym+LK9/CxdKPnXz9Qz4xNXGn3sG1wAfthifQfjDyiCnLo2uhuMzI9yKxH4PUTt52mReMLmnHFrrLpDYcPC+cU7ge55guYhGv/ANB92YzoXrI+Hs6gdXnnfE8GGhfydGwvKBKCtpDecGnu41Mz28j9/LTVtSV9WZEoxANMgPGo4BDbY2p69ixYGQWATdyg9TRDAK7f/Lrlubat60yuVZ9wcwqZ7NBP71mX6NEgdvfK1EgMnkZzsDQl/wWDHdAoOYCo4pKwY5I/V26cKTO4aMYcV/YDdgglOtas2KtIXBJAcgotsV4YfF+CDN4T5WdX808VdXh3/UXLrAdcMDF3QIXj1HyUHIOkXBH7DXICbJt9eNiowRXiuB0d1J/FqjPFe2IlNdXnwFwpRusB5PLSv0Lk/AdI1gQmao8wwLmnoh/L9riMbMMsWAOI+5B71d+lGTKlxx4hQn4ixRfedyZUUsRcpGrgAS1XqCKzggl0/LFuyQpe9BsgvZGkEHQ4ELkl6bcLtiHZ+7uFxmRjnV7v8PP1Whug1igIT3OTMnmb/dGJPuGKY5fRdvWoatxfNU3ABi+fY7eHiPqC0gQDpAC19twVfWBtBur+ST+y7fzmSE5Q0C3mcp8/31XIdqm7sEZJHtFnXBgaTyG+fWRGAY70K10IBvKH2TE6IMzm1k92/Cn2payTupKTtojgP3uaWIgFVgV0lD0WGR0PanqiKtrBFwqznvb/rz2PgpSjWd2BESLQpxY+6tmKXZnjvY9xfR12CQ8o/aKz1t+XxCSzy0uE5f/kaFUCrwxjL8gT7SEUJshp//5/yvPFJHgJlgsvXp+gRQCSzz+vS6rl3BhMsbj/HzwJYz8GsWppOQDGVswlOHEaFE/qhImhDrt2DUfNxtt21GW7KwJRn9/mtYIjlnnwgESPEpwoLyTru3SsVGzRxnZG6x+BiseUs57lTdb3H8KG7UPeH1SSjy9wZHELnar9x5cOtOR7lOvyjWm4Ab18Q+qoMxxLCFit0V8SmOu7AU8XGY3eSXb6Ly+kaQmDkRlOstgmcj+rD34KNz7LTvLL0O1Z9J/nCjp+1flOFgtbd7Yg0t5eNrPuppxYxJfSpnJRNL4S3YTffnV+x+zVsuioseET/On2wNi/TnL2rAQIKswi7Er3Sv48D/+PLsa2WJOSk6DqcCLmusILDiz0FwKEhMewrxtNyM2IAE0/6hiopIQoUgC6U8CLirhWbfVibSnCGZlF5uywIcaUlcEaYP/evokbi1NSquO62XNnWR4+fB3M1N7LaI5pwdHYOKEjg9OaSiTtEDypKGOVxZhdQS0jEvZ46foNS4SBpwZfPn60p6pQldNUmimhWeU5LUnEpZYjPJU6hmAsh4AKaLFfJANrZ9ou428yoEIFuiY9UgOYkqtSUocWxyijxK+NTtuDdbh7NJcyLIl6CUBWQjZiL34Bk0Qe3vmT9tpIKus3r5CvEdEu5Va2Wxm8CQJT9bESzuFBeH0QIRybKFAUVqNa9tCXukd1jwLXYKWsuMuFda8R1UjVG2cvAZ+R3lBV+nLksL4Ti6lubX3hKFcSyFsG5rK9pJt5nlSGIkBLP/HFqLL/KX0S96NdOo4CS+GYPBk+lBZxz6Yie12vvUj8l4t1ik/5PmvbLOTPCcaoPeZ7APUQIKIcxcNUDin3R1okbeAUGwt7Ja3G0ntQokBhlajisyXeqbfPLrTTKpTauclKp+DGdyBsbzFHEYtIqZnlLe5wjluF/UID6EgwWPGj0FVKM59Jom3+0Y1QTb+IKqHZv/0FIEEuVItlJHSixdza2w0UN80Hyc/eUGv6SBybC/EEs9cOcLBR1eeQXXe7p7hfIhtxxBrGhk9n7jom/4LXF125WzPmMCUiNyE8iO7sVSmRf/iSNFBveZWGPeCirfJ8a43fk5jCfA3NPEJyMAamu3Q5im0DKo8aonWXtye9iE8vraixlVTAGSXFMjP3+XiOE9jrnXTDzARnt7+9gvHctQpaAI0za6N7bq9R1lb55jILwmx4Ih4OA0K1/Xx7B9jytPFBRhEO8xqXLhxotsIRjnGRvnkMK/KJ1YhE9T2mNmclLYgMSn+7dzik8BzoHt+EcXstV8yNpTspqsnS96ATq3A66NbF449w9JqViBt4gWi7yVzt3kR4XSJ8iEB5anMqG+EsSyrMQVv0sMeEysGx+yYs6G2xPJw3zqTq4RzDQXPhYra/VMlt7E8zzl4D7L3HS3kkWf4ZkmFmnjcENPQdkmohl6p/gqkOg+8McyzNxxb5Fl19DsSr3MTuSMqhSKDn95ibzYCEdrZXJiKaqu7BFBuju+jSObOPchog2IsE/u/3U/UK2mntvSnD0qNkPYoRTskBnLJ3NJamL0V4sEbryX8NMr7MKMJ0+h2+xMKY4KERpvUrd0c6ABXWHqLdY1QTugC/5dhdoLy3+KwgG5FnL0MZw6qvOvHkKQRoQrcKLuwUld15s05QxurH67A9eAr02a/vUWNBIgP6vOa69ZZuZKElWttIerRDGIAkZ54fw7HBctSZtfspPxaliwbOEH/Laxot3ZQonzvXknSVodzZHA1Jw7BcNRsYvl+KJ0Y6pMRPpIbaN/QSuHtnjUoej+vlVhq5021xMUPKxCK/D8rSRbOmduHG85/JrIimgo5wXWP83lLvRaxwCxeTGVt44fTUqsfUARmQcS3f5DbHR9SZ4nJYIEvcCjIqLezJ3I6S7xBop57j3ZyMQX0Xxr5mc6IUmrlOXM9fJG5iDZQQ9rWsGZ0Y26GzTAEsD6pjPuDa1XAT1MRpxyZ8zN53sl1YEV0E0EHvZqcnBnqMTXRh6zC9PwDXEk3OHs2zLLIjBhY5+7lDxp1X0qcm8XtWorat33mUx+kEDDgaDUdpclQq/ZM6mMYoF433nKbCKDxCozugSPVaRjNPosMDy8FujvIJSb763XuBGBIYLS9x+HZhYiUa9xod0xKV9aRt7yczWWlLgfK8qn4fULHMBSP48m/wTWfDBdTH8uDAKt5WM033+2bCpxDhmZtE+d7XP65yBTOf9/EWaCG+Gs9/5kVbWS0JlfoDH6Si2tVCzCRGfV0XZAUWfXOMJ5F9dkMagbwaeqVqqbVONDQGg8zID5MUV7IkazdAz4JLOXsn1RuZnoZNIGV2Na15+dRKYUAmXFmkWBJpPMBwT8N4bd8VZwBnhm3WzH9S0sbpoP0sgf2OmPvQ6smMyfkVK+OLjXYubmtioAhdwDb5/pLRg3PGwfHEz6v9OOe4AK8iw2cma49tV44In8Rc9jGcqSQlFXPdlC8366ke4U/ITFy0/SQBl1vWvGk40KycwWGaLf8cCtEi/4X2W8961i6lYnpfNQhGcQyC8s2oIOW+Pw545Thq3ZBEyNC8YDr/pzCEmBI8U3A4IiQJoHiD9kUMNd8wfzysC2Kqc4OGeWYsJxmDev4Jn4HV+vqpgN6xxSEMABhRMdTteHiJAgnQEX9BR2V1sNqh5EcMvQNYYa5+bblQn7Rli1UFCtQkP6ECmGkxmPNkg2CGS2mmf0/WEuTZSyPMtbbrnftPgleOmJ3jSm0m1EU9fQHQo1NZti+KczpJ8mSYIVtXzXh4rNJcL3Fm7Bbftpjmj5UnuDpPk8HvqKOj2DGJyk4R0Md1x7umiH0DTOXaLwO0EI94k7n6R8nfqiwekgUQZ1rRek0HViM5YN0JLWp4f4NRE8ErcGNSHZd58+9Kx8lmkc9ogfQmX0rX1kB8QQzNbH+eVDee0jOQNUgQcew3y+0QbifXrtLHXDIxsqsej41Kz7vfcQRE1zUnY2phYNILK8a657zyHNMzPiRhxs28s1JX2kiCMEloubOXnc8BzU+n7LM9wztf63eFWN/eWHXVivSdCWg5DfWsk2CF8aFJrOP277QEPdkWlOlewCVEkLjyd5wUn9ZzaKOJKnDQDLfliiRLTKlU8TOeQj8jOU8FfpM9tayJTDpxw6sVlZuJRAILfxn+QAGIB/W1FGDjuuVu62hFDBdvzVSfge95Ebf9pclp0GrpV3S+gwBWn5J7aGiim/fRyIN7YVVXJsnAnVeq90vDdAV0XearTqjT2Ck/AMkBW6T/ls/6VUVnFWs01wxkahKR0tRwyLRKgHefm3RWie/pTVQpUMZw+/7ozQSW+7vuZd8lsvT1iX5rwlpiaFnOnDbHsr1As6vLETd5HVbcBCGbJHcS7ax9Byd50jdYyagUtjAaHYX8ryyuR/bDkw1o4j8+hXMfbzy+CVmgrfRDyl4dn+5LxrqRAXLoDKpQREAHqdLSsVSJh1s8KnZ/SsUVq27cq+O6LMSBmhT4X3E750rmWwCsoCre6bT//oFWYALjp2SbcxnULBaTvnYDHtfEbO1m/3c9nJk8ZO5KHQTV88ivTWN/S2EXwmisTPdcupMrvI8e48QZdkZu9WHyKron7MKhGFJw6Z0KZ3tleVrvvJo89siUwByPY+Hs4gkKPBQbLQOaedcv/xeM+Ih8rl1eHEC/C65xWVciToVqSGp9HfbhVzFSrO6kBnv7mJwnRLvMEwqiNankVdJJMw4icU3lKyw/ecNSWIUddqlbThYMiq8nHjRRufs+28cq0OI9zhpvxFvFgSZE/eAYvm0x+9lZO+EH9NkBngaqU1NMYhdombNuy3awUN9p0mJQ//e9L65YbShgoc+ZUlNy+c6F6gDEHXV0JrzevPIZFAe2RyRa2dNqzLvihAAMCszYueqszzXRkSyobx5+LTLK2V3lfg3wbS9DzP3QW7VHdHbjZcttQRvtjrGveJnNn2DE2ZDIbvkCrT0H8RzbGDdmIq4P1ey+hoY/W6NuZKOz4dv4HUNznxdKV1Wf3MvqUv35r2jTKvpPWBUWNm5fytX/QJwp6qkIOsSx7Y67BSCbCDVLM8/VcMG+T0j+INrgL9sfT1ICtACH8BI0G6ViUZPVzzCmQHW2oVIwZjAoFl6+meO/pD8teO1E+1y03mCpYfW9S8qhtH2GhlFlebPf4NbezVv9xbXKWz0xezRNQWqUqtYRTUbuzK7KTvjG4rQHfzBpVmK4wDLnSIwdSzTSk1fPNeY0WOpPZTLlvQ59xwgfFrb326vT2hS1JAZ9E6sujFtKTiJ7bxI6o4cBhDaX+adXREThhR+MwA4TqD7rga/o9iY7d6TVRe14CS2S3iSQsD0R6ApnhG/2Wa0A0AY2NtWTjmabdKU+KgIRDP9RQYVjXiF1qC+xyNVG03I9vpmEpY/G/zC4nLOKgXAZ/uTikHI9Afbkhfgfgo9arWbix5eH7WUo9RQygDzwCnVSjbXc7MihEufVj6WGbK963pw8VjY3RS8IH1cy2yZbIcKLO5CgAUcXJfF2+McnDLKtXxyZaf7SPA6KJq+zF2NHyfoeTOwHhGqNcnHVr1hT73pcoyXyfvCYBnG1Bp/aR9t8hoI7CXM3UZOisWGA1SHZ2jf7k9GlRnp3mF/c1AV+JjvUsnZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==";Uint8Array.from(atob(ac),c=>c.charCodeAt(0));const Vp=Uint8Array.from(atob(ac),c=>c.charCodeAt(0));function lc(c,e,t){if(e.getQueryParameter(c,e.QUERY_RESULT_AVAILABLE)){const i=e.getQueryParameter(c,e.QUERY_RESULT)/1e6;t.lastTime=i}else setTimeout(()=>{lc(c,e,t)},1)}class Yp extends Ki{constructor(e,t,i=512,s=512){super(),this.width=i,this.height=s,this.clear=!0,this.camera=t,this.scene=e,this.configuration=new Proxy({aoSamples:16,aoRadius:5,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,color:new _e(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0},{set:(n,r,o)=>{const a=n[r];return n[r]=o,r==="aoSamples"&&a!==o&&this.configureAOPass(this.configuration.logarithmicDepthBuffer),r==="denoiseSamples"&&a!==o&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),r==="halfRes"&&a!==o&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.setSize(this.width,this.height)),r==="depthAwareUpsampling"&&a!==o&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),!0}}),this.samples=[],this.samplesR=[],this.samplesDenoise=[],this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.beautyRenderTarget=new Ot(this.width,this.height,{minFilter:ts,magFilter:Dt}),this.beautyRenderTarget.depthTexture=new mh(this.width,this.height,Ih),this.beautyRenderTarget.depthTexture.format=Eh,this.writeTargetInternal=new Ot(this.width,this.height,{minFilter:ts,magFilter:ts,depthBuffer:!1}),this.readTargetInternal=new Ot(this.width,this.height,{minFilter:ts,magFilter:ts,depthBuffer:!1}),this.bluenoise=new gh(Vp,128,128),this.bluenoise.colorSpace=Ch,this.bluenoise.wrapS=Fo,this.bluenoise.wrapT=Fo,this.bluenoise.minFilter=Dt,this.bluenoise.magFilter=Dt,this.bluenoise.needsUpdate=!0,this.lastTime=0,this._r=new Se,this._c=new _e}configureHalfResTargets(){this.configuration.halfRes?(this.depthDownsampleTarget=new Th(this.width/2,this.height/2,2),this.depthDownsampleTarget.texture[0].format=Rh,this.depthDownsampleTarget.texture[0].type=Sh,this.depthDownsampleTarget.texture[0].minFilter=Dt,this.depthDownsampleTarget.texture[0].magFilter=Dt,this.depthDownsampleTarget.texture[0].depthBuffer=!1,this.depthDownsampleTarget.texture[1].format=ka,this.depthDownsampleTarget.texture[1].type=oo,this.depthDownsampleTarget.texture[1].minFilter=Dt,this.depthDownsampleTarget.texture[1].magFilter=Dt,this.depthDownsampleTarget.texture[1].depthBuffer=!1,this.depthDownsampleQuad=new dn(new He(kp))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer)}configureAOPass(e=!1){this.samples=this.generateHemisphereSamples(this.configuration.aoSamples),this.samplesR=this.generateHemisphereSamplesR(this.configuration.aoSamples);const t={...Up};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e&&(t.fragmentShader=`#define LOGDEPTH `+t.fragmentShader),this.configuration.halfRes&&(t.fragmentShader=`#define HALFRES -`+t.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new He(t)):this.effectShaderQuad=new hn(new He(t))}configureDenoisePass(e=!1){this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const t={..._p};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.denoiseSamples),e&&(t.fragmentShader=`#define LOGDEPTH -`+t.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new He(t)):this.poissonBlurQuad=new hn(new He(t))}configureEffectCompositer(e=!1){const t={...xp};e&&(t.fragmentShader=`#define LOGDEPTH +`+t.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new He(t)):this.effectShaderQuad=new dn(new He(t))}configureDenoisePass(e=!1){this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const t={...zp};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.denoiseSamples),e&&(t.fragmentShader=`#define LOGDEPTH +`+t.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new He(t)):this.poissonBlurQuad=new dn(new He(t))}configureEffectCompositer(e=!1){const t={...Bp};e&&(t.fragmentShader=`#define LOGDEPTH `+t.fragmentShader),this.configuration.halfRes&&this.configuration.depthAwareUpsampling&&(t.fragmentShader=`#define HALFRES -`+t.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new He(t)):this.effectCompositerQuad=new hn(new He(t))}generateHemisphereSamples(e){const t=[];for(let i=0;i @@ -1343,7 +1343,7 @@ void main() { #include gl_FragColor = vColor; } - `})}function Yp(){return new He({side:2,clipping:!0,uniforms:{},vertexShader:` + `})}function Wp(){return new He({side:2,clipping:!0,uniforms:{},vertexShader:` varying vec3 vCameraPosition; varying vec3 vPosition; varying vec3 vNormal; @@ -1389,7 +1389,7 @@ void main() { gl_FragColor = vec4(difference, difference, difference, 1.); } - `})}class Gp extends Qi{constructor(e,t,i,s,n){if(super(),F(this,"components"),F(this,"resolution"),F(this,"renderScene"),F(this,"renderCamera"),F(this,"fsQuad"),F(this,"normalOverrideMaterial"),F(this,"glossOverrideMaterial"),F(this,"planeBuffer"),F(this,"glossBuffer"),F(this,"outlineBuffer"),F(this,"excludedMeshes",[]),F(this,"outlinedMeshes",{}),F(this,"outlineScene",new Ci),F(this,"_outlineEnabled",!1),F(this,"_lineColor",10066329),F(this,"_opacity",.4),F(this,"_tolerance",3),F(this,"_glossEnabled",!0),F(this,"_glossExponent",1.9),F(this,"_minGloss",-.1),F(this,"_maxGloss",.1),!i.renderer)throw new Error("The given world must have a renderer!");this.components=t,this.renderScene=s,this.renderCamera=n,this.resolution=new Se(e.x,e.y),this.fsQuad=new nc,this.fsQuad.material=this.createOutlinePostProcessMaterial(),this.planeBuffer=this.newRenderTarget(),this.glossBuffer=this.newRenderTarget(),this.outlineBuffer=this.newRenderTarget();const r=Vp();r.clippingPlanes=i.renderer.clippingPlanes,this.normalOverrideMaterial=r;const o=Yp();o.clippingPlanes=i.renderer.clippingPlanes,this.glossOverrideMaterial=o}get lineColor(){return this._lineColor}set lineColor(e){this._lineColor=e,this.fsQuad.material.uniforms.lineColor.value.set(e)}get tolerance(){return this._tolerance}set tolerance(e){this._tolerance=e;const t=this.fsQuad.material;t.uniforms.tolerance.value=e}get opacity(){return this._opacity}set opacity(e){this._opacity=e;const t=this.fsQuad.material;t.uniforms.opacity.value=e}get glossEnabled(){return this._glossEnabled}set glossEnabled(e){if(e===this._glossEnabled)return;this._glossEnabled=e;const t=this.fsQuad.material;t.uniforms.glossEnabled.value=e?1:0}get glossExponent(){return this._glossExponent}set glossExponent(e){this._glossExponent=e;const t=this.fsQuad.material;t.uniforms.glossExponent.value=e}get minGloss(){return this._minGloss}set minGloss(e){this._minGloss=e;const t=this.fsQuad.material;t.uniforms.minGloss.value=e}get maxGloss(){return new st().color.convertLinearToSRGB(),this._maxGloss}set maxGloss(e){this._maxGloss=e;const t=this.fsQuad.material;t.uniforms.maxGloss.value=e}get outlineEnabled(){return this._outlineEnabled}set outlineEnabled(e){if(e===this._outlineEnabled)return;this._outlineEnabled=e;const t=this.fsQuad.material;t.uniforms.outlineEnabled.value=e?1:0}async dispose(){this.planeBuffer.dispose(),this.glossBuffer.dispose(),this.outlineBuffer.dispose(),this.normalOverrideMaterial.dispose(),this.glossOverrideMaterial.dispose(),this.fsQuad.material.dispose(),this.fsQuad.dispose(),this.excludedMeshes=[],this.outlineScene.children=[];const e=this.components.get(Nt);for(const t in this.outlinedMeshes){const i=this.outlinedMeshes[t];for(const s of i.meshes){e.destroy(s,!0,!0);const n=s;n.fragment&&n.fragment.dispose(!0)}i.material.dispose()}}setSize(e,t){this.planeBuffer.setSize(e,t),this.glossBuffer.setSize(e,t),this.outlineBuffer.setSize(e,t),this.resolution.set(e,t);const i=this.fsQuad.material;i.uniforms.screenSize.value.set(this.resolution.x,this.resolution.y,1/this.resolution.x,1/this.resolution.y),i.uniformsNeedUpdate=!0}render(e,t,i){const s=t.depthBuffer;t.depthBuffer=!1;const n=this.renderScene.overrideMaterial,r=this.renderScene.background;this.renderScene.background=null;for(const a of this.excludedMeshes)a.visible=!1;e.setRenderTarget(this.planeBuffer),this.renderScene.overrideMaterial=this.normalOverrideMaterial,e.render(this.renderScene,this.renderCamera),this._glossEnabled&&(e.setRenderTarget(this.glossBuffer),this.renderScene.overrideMaterial=this.glossOverrideMaterial,e.render(this.renderScene,this.renderCamera)),this.renderScene.overrideMaterial=n,e.setRenderTarget(this.outlineBuffer),this._outlineEnabled?e.render(this.outlineScene,this.renderCamera):e.clear();for(const a of this.excludedMeshes)a.visible=!0;this.renderScene.background=r;const o=this.fsQuad.material;o.uniforms.planeBuffer.value=this.planeBuffer.texture,o.uniforms.glossBuffer.value=this.glossBuffer.texture,o.uniforms.outlineBuffer.value=this.outlineBuffer.texture,o.uniforms.sceneColorBuffer.value=i.texture,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.fsQuad.render(e)),t.depthBuffer=s}get vertexShader(){return` + `})}class Xp extends Ki{constructor(e,t,i,s,n){if(super(),y(this,"components"),y(this,"resolution"),y(this,"renderScene"),y(this,"renderCamera"),y(this,"fsQuad"),y(this,"normalOverrideMaterial"),y(this,"glossOverrideMaterial"),y(this,"planeBuffer"),y(this,"glossBuffer"),y(this,"outlineBuffer"),y(this,"excludedMeshes",[]),y(this,"outlinedMeshes",{}),y(this,"outlineScene",new Ci),y(this,"_outlineEnabled",!1),y(this,"_lineColor",10066329),y(this,"_opacity",.4),y(this,"_tolerance",3),y(this,"_glossEnabled",!0),y(this,"_glossExponent",1.9),y(this,"_minGloss",-.1),y(this,"_maxGloss",.1),!i.renderer)throw new Error("The given world must have a renderer!");this.components=t,this.renderScene=s,this.renderCamera=n,this.resolution=new Se(e.x,e.y),this.fsQuad=new rc,this.fsQuad.material=this.createOutlinePostProcessMaterial(),this.planeBuffer=this.newRenderTarget(),this.glossBuffer=this.newRenderTarget(),this.outlineBuffer=this.newRenderTarget();const r=Hp();r.clippingPlanes=i.renderer.clippingPlanes,this.normalOverrideMaterial=r;const o=Wp();o.clippingPlanes=i.renderer.clippingPlanes,this.glossOverrideMaterial=o}get lineColor(){return this._lineColor}set lineColor(e){this._lineColor=e,this.fsQuad.material.uniforms.lineColor.value.set(e)}get tolerance(){return this._tolerance}set tolerance(e){this._tolerance=e;const t=this.fsQuad.material;t.uniforms.tolerance.value=e}get opacity(){return this._opacity}set opacity(e){this._opacity=e;const t=this.fsQuad.material;t.uniforms.opacity.value=e}get glossEnabled(){return this._glossEnabled}set glossEnabled(e){if(e===this._glossEnabled)return;this._glossEnabled=e;const t=this.fsQuad.material;t.uniforms.glossEnabled.value=e?1:0}get glossExponent(){return this._glossExponent}set glossExponent(e){this._glossExponent=e;const t=this.fsQuad.material;t.uniforms.glossExponent.value=e}get minGloss(){return this._minGloss}set minGloss(e){this._minGloss=e;const t=this.fsQuad.material;t.uniforms.minGloss.value=e}get maxGloss(){return new st().color.convertLinearToSRGB(),this._maxGloss}set maxGloss(e){this._maxGloss=e;const t=this.fsQuad.material;t.uniforms.maxGloss.value=e}get outlineEnabled(){return this._outlineEnabled}set outlineEnabled(e){if(e===this._outlineEnabled)return;this._outlineEnabled=e;const t=this.fsQuad.material;t.uniforms.outlineEnabled.value=e?1:0}async dispose(){this.planeBuffer.dispose(),this.glossBuffer.dispose(),this.outlineBuffer.dispose(),this.normalOverrideMaterial.dispose(),this.glossOverrideMaterial.dispose(),this.fsQuad.material.dispose(),this.fsQuad.dispose(),this.excludedMeshes=[],this.outlineScene.children=[];const e=this.components.get(Nt);for(const t in this.outlinedMeshes){const i=this.outlinedMeshes[t];for(const s of i.meshes){e.destroy(s,!0,!0);const n=s;n.fragment&&n.fragment.dispose(!0)}i.material.dispose()}}setSize(e,t){this.planeBuffer.setSize(e,t),this.glossBuffer.setSize(e,t),this.outlineBuffer.setSize(e,t),this.resolution.set(e,t);const i=this.fsQuad.material;i.uniforms.screenSize.value.set(this.resolution.x,this.resolution.y,1/this.resolution.x,1/this.resolution.y),i.uniformsNeedUpdate=!0}render(e,t,i){const s=t.depthBuffer;t.depthBuffer=!1;const n=this.renderScene.overrideMaterial,r=this.renderScene.background;this.renderScene.background=null;for(const a of this.excludedMeshes)a.visible=!1;e.setRenderTarget(this.planeBuffer),this.renderScene.overrideMaterial=this.normalOverrideMaterial,e.render(this.renderScene,this.renderCamera),this._glossEnabled&&(e.setRenderTarget(this.glossBuffer),this.renderScene.overrideMaterial=this.glossOverrideMaterial,e.render(this.renderScene,this.renderCamera)),this.renderScene.overrideMaterial=n,e.setRenderTarget(this.outlineBuffer),this._outlineEnabled?e.render(this.outlineScene,this.renderCamera):e.clear();for(const a of this.excludedMeshes)a.visible=!0;this.renderScene.background=r;const o=this.fsQuad.material;o.uniforms.planeBuffer.value=this.planeBuffer.texture,o.uniforms.glossBuffer.value=this.glossBuffer.texture,o.uniforms.outlineBuffer.value=this.outlineBuffer.texture,o.uniforms.sceneColorBuffer.value=i.texture,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.fsQuad.render(e)),t.depthBuffer=s}get vertexShader(){return` varying vec2 vUv; void main() { vUv = uv; @@ -1578,7 +1578,7 @@ void main() { gl_FragColor = corrected; } - `}createOutlinePostProcessMaterial(){return new He({uniforms:{opacity:{value:this._opacity},debugVisualize:{value:0},sceneColorBuffer:{value:null},tolerance:{value:this._tolerance},planeBuffer:{value:null},glossBuffer:{value:null},outlineBuffer:{value:null},glossEnabled:{value:1},minGloss:{value:this._minGloss},maxGloss:{value:this._maxGloss},outlineEnabled:{value:0},glossExponent:{value:this._glossExponent},width:{value:1},lineColor:{value:new _e(this._lineColor)},screenSize:{value:new Xi(this.resolution.x,this.resolution.y,1/this.resolution.x,1/this.resolution.y)}},vertexShader:this.vertexShader,fragmentShader:this.fragmentShader})}newRenderTarget(){const e=new Ot(this.resolution.x,this.resolution.y);return e.texture.colorSpace="srgb-linear",e.texture.format=za,e.texture.type=lo,e.texture.minFilter=xt,e.texture.magFilter=xt,e.texture.generateMipmaps=!1,e.stencilBuffer=!1,e}}class Hp{constructor(e,t,i){if(F(this,"composer"),F(this,"overrideClippingPlanes",!1),F(this,"_components"),F(this,"_world"),F(this,"_renderTarget"),F(this,"_enabled",!1),F(this,"_initialized",!1),F(this,"_n8ao"),F(this,"_customEffects"),F(this,"_basePass"),F(this,"_gammaPass"),F(this,"_depthTexture"),F(this,"_renderer"),F(this,"_settings",{gamma:!0,custom:!0,ao:!1}),!i.renderer)throw new Error("The given world must have a renderer!");this._components=e,this._renderer=t,this._world=i,this._renderTarget=new Ot(window.innerWidth,window.innerHeight),this._renderTarget.texture.colorSpace="srgb-linear",this.composer=new Lp(t,this._renderTarget),this.composer.setSize(window.innerWidth,window.innerHeight)}get basePass(){if(!this._basePass)throw new Error("Custom effects not initialized!");return this._basePass}get gammaPass(){if(!this._gammaPass)throw new Error("Custom effects not initialized!");return this._gammaPass}get customEffects(){if(!this._customEffects)throw new Error("Custom effects not initialized!");return this._customEffects}get n8ao(){if(!this._n8ao)throw new Error("Custom effects not initialized!");return this._n8ao}get enabled(){return this._enabled}set enabled(e){this._initialized||this.initialize(),this._enabled=e}get settings(){return{...this._settings}}dispose(){var e,t,i,s;this.composer.dispose(),this._renderTarget.dispose(),(e=this._depthTexture)==null||e.dispose(),(t=this._customEffects)==null||t.dispose(),(i=this._gammaPass)==null||i.dispose(),(s=this._n8ao)==null||s.dispose()}setPasses(e){let t=!1;for(const i in e){const s=i;if(this.settings[s]!==e[s]){t=!0;break}}if(t){for(const i in e){const s=i;this._settings[s]!==void 0&&(this._settings[s]=e[s])}this.updatePasses()}}setSize(e,t){if(!(e===0||t===0)&&this._initialized){const i=this._settings.custom;i&&this.setPasses({custom:!1}),this.setPasses({custom:!1}),this.composer.setSize(e,t),this.basePass.setSize(e,t),this.n8ao.setSize(e,t),this.customEffects.setSize(e,t),this.gammaPass.setSize(e,t),i&&this.setPasses({custom:!0})}}update(){this._enabled&&this.composer.render()}updateCamera(){const e=this._world.camera.three;this._n8ao&&(this._n8ao.camera=e),this._customEffects&&(this._customEffects.renderCamera=e),this._basePass&&(this._basePass.camera=e)}updateProjection(e){this.composer.passes.forEach(t=>{t.camera=e}),this.update()}initialize(){if(!this._world.renderer)throw new Error("The given world must have a renderer!");const e=this._world.scene.three,t=this._world.camera.three;if(!(e instanceof Ci))throw new Error("The given scene must have a THREE.Scene as core!");const i=this._world.camera;i.projection&&i.projection.onChanged.add(()=>{this.updateCamera()});const s=this._world.renderer;this.overrideClippingPlanes||(this._renderer.clippingPlanes=s.clippingPlanes),this._renderer.outputColorSpace="srgb",this._renderer.toneMapping=uh,this.newBasePass(e,t),this.newSaoPass(e,t),this.newGammaPass(),this.newCustomPass(e,t),this._initialized=!0,this.updatePasses()}updatePasses(){for(const e of this.composer.passes)this.composer.removePass(e);this._basePass&&this.composer.addPass(this.basePass),this._settings.gamma&&this.composer.addPass(this.gammaPass),this._settings.ao&&this.composer.addPass(this.n8ao),this._settings.custom&&this.composer.addPass(this.customEffects)}newCustomPass(e,t){this._customEffects=new Gp(new Se(window.innerWidth,window.innerHeight),this._components,this._world,e,t)}newGammaPass(){this._gammaPass=new rc(kp)}newSaoPass(e,t){if(!this._world.renderer)throw new Error("The given world must have a renderer!");const{width:i,height:s}=this._world.renderer.getSize();this._n8ao=new zp(e,t,i,s);const{configuration:n}=this._n8ao;n.aoSamples=16,n.denoiseSamples=1,n.denoiseRadius=13,n.aoRadius=1,n.distanceFalloff=4,n.aoRadius=1,n.intensity=4,n.halfRes=!0,n.color=new _e().setHex(13421772,"srgb-linear")}newBasePass(e,t){this._basePass=new Pp(e,t)}}class kr extends ap{constructor(e,t,i){super(e,t,i),F(this,"_postproduction"),this.onResize.add(s=>this.resizePostproduction(s)),this.onWorldChanged.add(()=>{this.currentWorld&&(this._postproduction&&this._postproduction.dispose(),this._postproduction=new Hp(e,this.three,this.currentWorld),this.setPostproductionSize())})}get postproduction(){if(!this._postproduction)throw new Error("Renderer not initialized yet with a world!");return this._postproduction}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger();const e=this.currentWorld.scene.three,t=this.currentWorld.camera.three;this.postproduction.enabled?this.postproduction.composer.render():this.three.render(e,t),e instanceof Ci&&this.three2D.render(e,t),this.onAfterUpdate.trigger()}dispose(){super.dispose(),this.postproduction.dispose()}resizePostproduction(e){this.postproduction&&this.setPostproductionSize(e)}setPostproductionSize(e){if(!this.container)return;const t=e?e.x:this.container.clientWidth,i=e?e.y:this.container.clientHeight;this.postproduction.setSize(t,i)}}class Wp{constructor(e,t,i,s,n){F(this,"mesh",new ee(new Ce)),F(this,"components"),F(this,"world"),F(this,"styleName"),F(this,"_precission",1e4),F(this,"_tempVector",new P),F(this,"_plane"),F(this,"_geometry"),F(this,"_outlinedMesh"),F(this,"_plane2DCoordinateSystem",new ne),F(this,"_planeAxis"),this.components=e,this.world=t,this.mesh.material=n,this.mesh.frustumCulled=!1,this.mesh.userData.indexFragmentMap=new Map,this._plane=i;const{x:r,y:o,z:a}=i.normal;Math.abs(r)===1?this._planeAxis="x":Math.abs(o)===1?this._planeAxis="y":Math.abs(a)===1&&(this._planeAxis="z"),this._geometry=s,this.mesh.geometry.attributes.position=s.attributes.position;const l=i.normal.clone().multiplyScalar(.01);this._outlinedMesh=new ee(this.mesh.geometry),this.mesh.position.copy(l),this._outlinedMesh.position.copy(l),this.visible=!0}get visible(){return this.mesh.parent!==null}set visible(e){const t=this.getStyleAndScene();if(e){if(this.world.scene.three.add(this.mesh),t){const{style:i,outlineScene:s}=t;this._outlinedMesh.material=i.material,i.meshes.add(this._outlinedMesh),s.add(this._outlinedMesh)}}else if(this.mesh.removeFromParent(),t){const{style:i}=t;i.meshes.delete(this._outlinedMesh),this._outlinedMesh.removeFromParent()}}set geometry(e){this._geometry=e,this.mesh.geometry.attributes.position=e.attributes.position}dispose(){const e=this.getStyleAndScene();if(e){const{style:t}=e;t.meshes.delete(this._outlinedMesh),this._outlinedMesh.removeFromParent()}this.mesh.material=[],this._outlinedMesh.material=[],this.mesh.userData.indexFragmentMap.clear(),this.mesh.userData={},this.mesh.geometry.dispose(),this.mesh.removeFromParent(),this.mesh.geometry=null,this._outlinedMesh.geometry=null,this.mesh=null,this._plane=null,this._geometry=null,this.components=null}update(e,t){const i=this._geometry.attributes.position.array;if(!i)return;this.updatePlane2DCoordinateSystem();const{userData:s}=this.mesh,n=s.indexFragmentMap;n.clear();let r=0;const o=[];let a=0;const l=this.components.get(ue);for(const[h,d]of t)for(const u in d){const f=l.list.get(u);f&&(f.mesh.userData.fills||(f.mesh.userData.fills=new Set),f.mesh.userData.fills.add(this.mesh))}for(let h=0;hthis._localPlane.intersectsBox(s),intersectsTriangle:s=>{let n=0;if(this._tempLine.start.copy(s.a),this._tempLine.end.copy(s.b),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}if(this._tempLine.start.copy(s.b),this._tempLine.end.copy(s.c),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}if(this._tempLine.start.copy(s.c),this._tempLine.end.copy(s.a),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}n!==2&&(i-=n)}}),i}updateDeletedEdges(e){const t=Object.keys(this._edges);for(const i of t)e[i]===void 0&&(this.disposeEdge(i),this.disposeOutline(i))}disposeOutline(e){if(!this.world.renderer)return;const t=this.world.renderer;if(t instanceof kr){const i=t.postproduction.customEffects.outlinedMeshes;delete i[e]}}disposeEdge(e){const t=this.components.get(Nt),i=this._edges[e];i.fill&&i.fill.dispose(),t.destroy(i.mesh,!1),delete this._edges[e]}}class bn extends zn{constructor(e,t,i,s,n,r=5,o=!0){super(e,t,i,s,n,r,o),F(this,"edges"),F(this,"edgesMaxUpdateRate",50),F(this,"_visible",!0),F(this,"_edgesVisible",!0),F(this,"updateFill",()=>{this.edges.fillNeedsUpdate=!0,this.edges.update()}),this.edges=new Xp(e,t,this.three),this.toggleControls(!0),this.edges.visible=!0,this.onDraggingEnded.add(()=>{this.updateFill(),this.edges.visible=!0}),this.onDraggingStarted.add(()=>this.edges.visible=!1)}get visible(){return this._visible}set visible(e){super.visible=e,this.toggleControls(e)}set enabled(e){this._enabled=e,this.world.renderer&&this.world.renderer.setPlane(e,this.three)}get enabled(){return super.enabled}dispose(){super.dispose(),this.edges.dispose()}}class jp{constructor(){F(this,"onDisposed",new Y),F(this,"enabled",!0),F(this,"list",{}),F(this,"_defaultLineMaterial",new si({color:0,linewidth:.001})),F(this,"onAfterUpdate",new Y),F(this,"onBeforeUpdate",new Y)}update(e){this.onBeforeUpdate.trigger(this.list),this.onAfterUpdate.trigger(this.list)}create(e,t,i,s,n,r){if(!i.renderer)throw new Error("The given world doesn't have a renderer!");s||(s=this._defaultLineMaterial);for(const l of t)l.geometry.boundsTree||l.geometry.computeBoundsTree();const o=i.renderer;s.clippingPlanes=o.clippingPlanes;const a={name:e,lineMaterial:s,meshes:t,fillMaterial:n,outlineMaterial:r,fragments:{}};return this.list[e]=a,a}dispose(){const e=Object.keys(this.list);for(const t of e)this.deleteStyle(t);this.list={},this.onDisposed.trigger(),this.onDisposed.reset()}deleteStyle(e,t=!0){var i,s;const n=this.list[e];n&&(n.meshes.clear(),t&&(n.lineMaterial.dispose(),(i=n.fillMaterial)==null||i.dispose(),(s=n.outlineMaterial)==null||s.dispose())),delete this.list[e]}}const lc=class cc extends de{constructor(e){super(e),F(this,"onDisposed",new Y),F(this,"enabled",!0),F(this,"styles"),F(this,"fillsNeedUpdate",!1),F(this,"_visible",!0),this.components.list.set(cc.uuid,this),this.styles=new jp}get visible(){return this._visible}set visible(e){this._visible=e;const t=this.components.get(Wi);for(const i of t.list)i instanceof bn&&(i.edges.visible=e)}dispose(){this.styles.dispose(),this.onDisposed.trigger()}async update(e=!1){if(!this.enabled)return;const t=this.components.get(Wi);for(const i of t.list)i instanceof bn&&(e||this.fillsNeedUpdate?i.updateFill():i.update());this.fillsNeedUpdate=!1}};F(lc,"uuid","24dfc306-a3c4-410f-8071-babc4afa5e4d");let dn=lc;const Zp={name:"HorizontalBlurShader",uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:` + `}createOutlinePostProcessMaterial(){return new He({uniforms:{opacity:{value:this._opacity},debugVisualize:{value:0},sceneColorBuffer:{value:null},tolerance:{value:this._tolerance},planeBuffer:{value:null},glossBuffer:{value:null},outlineBuffer:{value:null},glossEnabled:{value:1},minGloss:{value:this._minGloss},maxGloss:{value:this._maxGloss},outlineEnabled:{value:0},glossExponent:{value:this._glossExponent},width:{value:1},lineColor:{value:new _e(this._lineColor)},screenSize:{value:new Zi(this.resolution.x,this.resolution.y,1/this.resolution.x,1/this.resolution.y)}},vertexShader:this.vertexShader,fragmentShader:this.fragmentShader})}newRenderTarget(){const e=new Ot(this.resolution.x,this.resolution.y);return e.texture.colorSpace="srgb-linear",e.texture.format=ka,e.texture.type=oo,e.texture.minFilter=Dt,e.texture.magFilter=Dt,e.texture.generateMipmaps=!1,e.stencilBuffer=!1,e}}class Zp{constructor(e,t,i){if(y(this,"composer"),y(this,"overrideClippingPlanes",!1),y(this,"_components"),y(this,"_world"),y(this,"_renderTarget"),y(this,"_enabled",!1),y(this,"_initialized",!1),y(this,"_n8ao"),y(this,"_customEffects"),y(this,"_basePass"),y(this,"_gammaPass"),y(this,"_depthTexture"),y(this,"_renderer"),y(this,"_settings",{gamma:!0,custom:!0,ao:!1}),!i.renderer)throw new Error("The given world must have a renderer!");this._components=e,this._renderer=t,this._world=i,this._renderTarget=new Ot(window.innerWidth,window.innerHeight),this._renderTarget.texture.colorSpace="srgb-linear",this.composer=new Lp(t,this._renderTarget),this.composer.setSize(window.innerWidth,window.innerHeight)}get basePass(){if(!this._basePass)throw new Error("Custom effects not initialized!");return this._basePass}get gammaPass(){if(!this._gammaPass)throw new Error("Custom effects not initialized!");return this._gammaPass}get customEffects(){if(!this._customEffects)throw new Error("Custom effects not initialized!");return this._customEffects}get n8ao(){if(!this._n8ao)throw new Error("Custom effects not initialized!");return this._n8ao}get enabled(){return this._enabled}set enabled(e){this._initialized||this.initialize(),this._enabled=e}get settings(){return{...this._settings}}dispose(){var e,t,i,s;this.composer.dispose(),this._renderTarget.dispose(),(e=this._depthTexture)==null||e.dispose(),(t=this._customEffects)==null||t.dispose(),(i=this._gammaPass)==null||i.dispose(),(s=this._n8ao)==null||s.dispose()}setPasses(e){let t=!1;for(const i in e){const s=i;if(this.settings[s]!==e[s]){t=!0;break}}if(t){for(const i in e){const s=i;this._settings[s]!==void 0&&(this._settings[s]=e[s])}this.updatePasses()}}setSize(e,t){if(!(e===0||t===0)&&this._initialized){const i=this._settings.custom;i&&this.setPasses({custom:!1}),this.setPasses({custom:!1}),this.composer.setSize(e,t),this.basePass.setSize(e,t),this.n8ao.setSize(e,t),this.customEffects.setSize(e,t),this.gammaPass.setSize(e,t),i&&this.setPasses({custom:!0})}}update(){this._enabled&&this.composer.render()}updateCamera(){const e=this._world.camera.three;this._n8ao&&(this._n8ao.camera=e),this._customEffects&&(this._customEffects.renderCamera=e),this._basePass&&(this._basePass.camera=e)}updateProjection(e){this.composer.passes.forEach(t=>{t.camera=e}),this.update()}initialize(){if(!this._world.renderer)throw new Error("The given world must have a renderer!");const e=this._world.scene.three,t=this._world.camera.three;if(!(e instanceof Ci))throw new Error("The given scene must have a THREE.Scene as core!");const i=this._world.camera;i.projection&&i.projection.onChanged.add(()=>{this.updateCamera()});const s=this._world.renderer;this.overrideClippingPlanes||(this._renderer.clippingPlanes=s.clippingPlanes),this._renderer.outputColorSpace="srgb",this._renderer.toneMapping=ph,this.newBasePass(e,t),this.newSaoPass(e,t),this.newGammaPass(),this.newCustomPass(e,t),this._initialized=!0,this.updatePasses()}updatePasses(){for(const e of this.composer.passes)this.composer.removePass(e);this._basePass&&this.composer.addPass(this.basePass),this._settings.gamma&&this.composer.addPass(this.gammaPass),this._settings.ao&&this.composer.addPass(this.n8ao),this._settings.custom&&this.composer.addPass(this.customEffects)}newCustomPass(e,t){this._customEffects=new Xp(new Se(window.innerWidth,window.innerHeight),this._components,this._world,e,t)}newGammaPass(){this._gammaPass=new oc(Gp)}newSaoPass(e,t){if(!this._world.renderer)throw new Error("The given world must have a renderer!");const{width:i,height:s}=this._world.renderer.getSize();this._n8ao=new Yp(e,t,i,s);const{configuration:n}=this._n8ao;n.aoSamples=16,n.denoiseSamples=1,n.denoiseRadius=13,n.aoRadius=1,n.distanceFalloff=4,n.aoRadius=1,n.intensity=4,n.halfRes=!0,n.color=new _e().setHex(13421772,"srgb-linear")}newBasePass(e,t){this._basePass=new Dp(e,t)}}class Br extends hp{constructor(e,t,i){super(e,t,i),y(this,"_postproduction"),this.onResize.add(s=>this.resizePostproduction(s)),this.onWorldChanged.add(()=>{this.currentWorld&&(this._postproduction&&this._postproduction.dispose(),this._postproduction=new Zp(e,this.three,this.currentWorld),this.setPostproductionSize())})}get postproduction(){if(!this._postproduction)throw new Error("Renderer not initialized yet with a world!");return this._postproduction}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger();const e=this.currentWorld.scene.three,t=this.currentWorld.camera.three;this.postproduction.enabled?this.postproduction.composer.render():this.three.render(e,t),e instanceof Ci&&this.three2D.render(e,t),this.onAfterUpdate.trigger()}dispose(){super.dispose(),this.postproduction.dispose()}resizePostproduction(e){this.postproduction&&this.setPostproductionSize(e)}setPostproductionSize(e){if(!this.container)return;const t=e?e.x:this.container.clientWidth,i=e?e.y:this.container.clientHeight;this.postproduction.setSize(t,i)}}class jp{constructor(e,t,i,s,n){y(this,"mesh",new ee(new Ce)),y(this,"components"),y(this,"world"),y(this,"styleName"),y(this,"_precission",1e4),y(this,"_tempVector",new x),y(this,"_plane"),y(this,"_geometry"),y(this,"_outlinedMesh"),y(this,"_plane2DCoordinateSystem",new ne),y(this,"_planeAxis"),this.components=e,this.world=t,this.mesh.material=n,this.mesh.frustumCulled=!1,this.mesh.userData.indexFragmentMap=new Map,this._plane=i;const{x:r,y:o,z:a}=i.normal;Math.abs(r)===1?this._planeAxis="x":Math.abs(o)===1?this._planeAxis="y":Math.abs(a)===1&&(this._planeAxis="z"),this._geometry=s,this.mesh.geometry.attributes.position=s.attributes.position;const l=i.normal.clone().multiplyScalar(.01);this._outlinedMesh=new ee(this.mesh.geometry),this.mesh.position.copy(l),this._outlinedMesh.position.copy(l),this.visible=!0}get visible(){return this.mesh.parent!==null}set visible(e){const t=this.getStyleAndScene();if(e){if(this.world.scene.three.add(this.mesh),t){const{style:i,outlineScene:s}=t;this._outlinedMesh.material=i.material,i.meshes.add(this._outlinedMesh),s.add(this._outlinedMesh)}}else if(this.mesh.removeFromParent(),t){const{style:i}=t;i.meshes.delete(this._outlinedMesh),this._outlinedMesh.removeFromParent()}}set geometry(e){this._geometry=e,this.mesh.geometry.attributes.position=e.attributes.position}dispose(){const e=this.getStyleAndScene();if(e){const{style:t}=e;t.meshes.delete(this._outlinedMesh),this._outlinedMesh.removeFromParent()}this.mesh.material=[],this._outlinedMesh.material=[],this.mesh.userData.indexFragmentMap.clear(),this.mesh.userData={},this.mesh.geometry.dispose(),this.mesh.removeFromParent(),this.mesh.geometry=null,this._outlinedMesh.geometry=null,this.mesh=null,this._plane=null,this._geometry=null,this.components=null}update(e,t){const i=this._geometry.attributes.position.array;if(!i)return;this.updatePlane2DCoordinateSystem();const{userData:s}=this.mesh,n=s.indexFragmentMap;n.clear();let r=0;const o=[];let a=0;const l=this.components.get(ue);for(const[h,d]of t)for(const u in d){const f=l.list.get(u);f&&(f.mesh.userData.fills||(f.mesh.userData.fills=new Set),f.mesh.userData.fills.add(this.mesh))}for(let h=0;hthis._localPlane.intersectsBox(s),intersectsTriangle:s=>{let n=0;if(this._tempLine.start.copy(s.a),this._tempLine.end.copy(s.b),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}if(this._tempLine.start.copy(s.b),this._tempLine.end.copy(s.c),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}if(this._tempLine.start.copy(s.c),this._tempLine.end.copy(s.a),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const r=this._tempVector.applyMatrix4(e.matrixWorld);t.setXYZ(i,r.x,r.y,r.z),n++,i++}n!==2&&(i-=n)}}),i}updateDeletedEdges(e){const t=Object.keys(this._edges);for(const i of t)e[i]===void 0&&(this.disposeEdge(i),this.disposeOutline(i))}disposeOutline(e){if(!this.world.renderer)return;const t=this.world.renderer;if(t instanceof Br){const i=t.postproduction.customEffects.outlinedMeshes;delete i[e]}}disposeEdge(e){const t=this.components.get(Nt),i=this._edges[e];i.fill&&i.fill.dispose(),t.destroy(i.mesh,!1),delete this._edges[e]}}class Pn extends zn{constructor(e,t,i,s,n,r=5,o=!0){super(e,t,i,s,n,r,o),y(this,"edges"),y(this,"edgesMaxUpdateRate",50),y(this,"_visible",!0),y(this,"_edgesVisible",!0),y(this,"updateFill",()=>{this.edges.fillNeedsUpdate=!0,this.edges.update()}),this.edges=new Qp(e,t,this.three),this.toggleControls(!0),this.edges.visible=!0,this.onDraggingEnded.add(()=>{this.updateFill(),this.edges.visible=!0}),this.onDraggingStarted.add(()=>this.edges.visible=!1)}get visible(){return this._visible}set visible(e){super.visible=e,this.toggleControls(e)}set enabled(e){this._enabled=e,this.world.renderer&&this.world.renderer.setPlane(e,this.three)}get enabled(){return super.enabled}dispose(){super.dispose(),this.edges.dispose()}}class Kp{constructor(){y(this,"onDisposed",new Y),y(this,"enabled",!0),y(this,"list",{}),y(this,"_defaultLineMaterial",new si({color:0,linewidth:.001})),y(this,"onAfterUpdate",new Y),y(this,"onBeforeUpdate",new Y)}update(e){this.onBeforeUpdate.trigger(this.list),this.onAfterUpdate.trigger(this.list)}create(e,t,i,s,n,r){if(!i.renderer)throw new Error("The given world doesn't have a renderer!");s||(s=this._defaultLineMaterial);for(const l of t)l.geometry.boundsTree||l.geometry.computeBoundsTree();const o=i.renderer;s.clippingPlanes=o.clippingPlanes;const a={name:e,lineMaterial:s,meshes:t,fillMaterial:n,outlineMaterial:r,fragments:{}};return this.list[e]=a,a}dispose(){const e=Object.keys(this.list);for(const t of e)this.deleteStyle(t);this.list={},this.onDisposed.trigger(),this.onDisposed.reset()}deleteStyle(e,t=!0){var i,s;const n=this.list[e];n&&(n.meshes.clear(),t&&(n.lineMaterial.dispose(),(i=n.fillMaterial)==null||i.dispose(),(s=n.outlineMaterial)==null||s.dispose())),delete this.list[e]}}const cc=class hc extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"enabled",!0),y(this,"styles"),y(this,"fillsNeedUpdate",!1),y(this,"_visible",!0),this.components.list.set(hc.uuid,this),this.styles=new Kp}get visible(){return this._visible}set visible(e){this._visible=e;const t=this.components.get(Xi);for(const i of t.list)i instanceof Pn&&(i.edges.visible=e)}dispose(){this.styles.dispose(),this.onDisposed.trigger()}async update(e=!1){if(!this.enabled)return;const t=this.components.get(Xi);for(const i of t.list)i instanceof Pn&&(e||this.fillsNeedUpdate?i.updateFill():i.update());this.fillsNeedUpdate=!1}};y(cc,"uuid","24dfc306-a3c4-410f-8071-babc4afa5e4d");let un=cc;const qp={name:"HorizontalBlurShader",uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:` varying vec2 vUv; @@ -1610,7 +1610,7 @@ void main() { gl_FragColor = sum; - }`},Qp={name:"VerticalBlurShader",uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:` + }`},Jp={name:"VerticalBlurShader",uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:` varying vec2 vUv; @@ -1642,7 +1642,23 @@ void main() { gl_FragColor = sum; - }`},hc=class Ui extends de{constructor(e){super(e),F(this,"onDisposed",new Y),F(this,"enabled",!0),F(this,"cameraHeight",10),F(this,"darkness",1.2),F(this,"opacity",1),F(this,"resolution",512),F(this,"amount",3.5),F(this,"planeColor",16777215),F(this,"shadowOffset",0),F(this,"shadowExtraScaleFactor",1.5),F(this,"list",{}),F(this,"tempMaterial",new st({visible:!1})),F(this,"depthMaterial",new Ba),this.components.add(Ui.uuid,this),this.initializeDepthMaterial()}dispose(){for(const e in this.list)this.deleteShadow(e);this.tempMaterial.dispose(),this.depthMaterial.dispose(),this.components=null,this.onDisposed.trigger(Ui.uuid),this.onDisposed.reset()}create(e,t,i){if(this.list[t])throw new Error(`There is already a shadow with ID ${t}`);const{size:s,center:n,min:r}=this.getSizeCenterMin(e),o=this.createShadow(t,s,i);return this.initializeShadow(o,n,r),this.createPlanes(o,s),this.bakeShadow(e,o),o.root}deleteShadow(e){const t=this.components.get(Nt),i=this.list[e];if(delete this.list[e],!i)throw new Error(`No shadow with ID ${e} was found.`);t.destroy(i.root),t.destroy(i.blurPlane),i.rt.dispose(),i.rtBlur.dispose()}createPlanes(e,t){const i=new Pn(t.x,t.z).rotateX(Math.PI/2);this.createBasePlane(e,i),Ui.createBlurPlane(e,i)}initializeShadow(e,t,i){this.initializeRoot(e,t,i),Ui.initializeRenderTargets(e),Ui.initializeCamera(e)}bakeShadow(e,t){const i=t.world.scene.three;if(!(i instanceof Ci))throw new Error("The core of the scene of the world must be a scene!");if(!t.world.renderer)throw new Error("The given world must have a renderer!");const s=t.world.renderer.three,n=e.map(l=>!!l.parent);for(let l=0;l!e.includes(l)&&l!==t.root);for(let l=r.length-1;l>=0;l--)i.remove(r[l]);const o=i.background;i.background=null,i.overrideMaterial=this.depthMaterial;const a=[];for(const l of e)a.push(l.visible),l.visible=!0;s.setRenderTarget(t.rt),s.render(i,t.camera),i.overrideMaterial=null,this.blurShadow(t,this.amount),this.blurShadow(t,this.amount*.4),s.setRenderTarget(null),i.background=o;for(let l=0;l=0;l--)i.add(r[l]);for(let l=0;l{i.uniforms.darkness=this.depthMaterial.userData.darkness,i.fragmentShader=` + }`},dc=class Ui extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"enabled",!0),y(this,"cameraHeight",10),y(this,"darkness",1.2),y(this,"opacity",1),y(this,"resolution",512),y(this,"amount",3.5),y(this,"planeColor",16777215),y(this,"shadowOffset",0),y(this,"shadowExtraScaleFactor",1.5),y(this,"list",{}),y(this,"tempMaterial",new st({visible:!1})),y(this,"depthMaterial",new za),this.components.add(Ui.uuid,this),this.initializeDepthMaterial()}dispose(){for(const e in this.list)this.deleteShadow(e);this.tempMaterial.dispose(),this.depthMaterial.dispose(),this.components=null,this.onDisposed.trigger(Ui.uuid),this.onDisposed.reset()}create(e,t,i){if(this.list[t])throw new Error(`There is already a shadow with ID ${t}`);const{size:s,center:n,min:r}=this.getSizeCenterMin(e),o=this.createShadow(t,s,i);return this.initializeShadow(o,n,r),this.createPlanes(o,s),this.bakeShadow(e,o),o.root}deleteShadow(e){const t=this.components.get(Nt),i=this.list[e];if(delete this.list[e],!i)throw new Error(`No shadow with ID ${e} was found.`);t.destroy(i.root),t.destroy(i.blurPlane),i.rt.dispose(),i.rtBlur.dispose()}createPlanes(e,t){const i=new xn(t.x,t.z).rotateX(Math.PI/2);this.createBasePlane(e,i),Ui.createBlurPlane(e,i)}initializeShadow(e,t,i){this.initializeRoot(e,t,i),Ui.initializeRenderTargets(e),Ui.initializeCamera(e)}bakeShadow(e,t){const i=t.world.scene.three;if(!(i instanceof Ci))throw new Error("The core of the scene of the world must be a scene!");if(!t.world.renderer)throw new Error("The given world must have a renderer!");const s=t.world.renderer.three,n=e.map(l=>!!l.parent);for(let l=0;l!e.includes(l)&&l!==t.root);for(let l=r.length-1;l>=0;l--)i.remove(r[l]);const o=i.background;i.background=null,i.overrideMaterial=this.depthMaterial;const a=[];for(const l of e)a.push(l.visible),l.visible=!0;s.setRenderTarget(t.rt),s.render(i,t.camera),i.overrideMaterial=null,this.blurShadow(t,this.amount),this.blurShadow(t,this.amount*.4),s.setRenderTarget(null),i.background=o;for(let l=0;l=0;l--)i.add(r[l]);for(let l=0;l{i.uniforms.darkness=this.depthMaterial.userData.darkness,i.fragmentShader=` uniform float darkness; ${i.fragmentShader.replace(e,t)} - `}}createShadow(e,t,i){return this.list[e]={root:new Fn,world:i,rt:new Ot(this.resolution,this.resolution),rtBlur:new Ot(this.resolution,this.resolution),blurPlane:new ee,camera:this.createCamera(t)},this.list[e]}createCamera(e){return new ii(-e.x/2,e.x/2,e.z/2,-e.z/2,0,this.cameraHeight)}getSizeCenterMin(e){const t=e[0].parent,i=new Fn;i.children=e;const s=new Fe().setFromObject(i);t==null||t.add(...e);const n=new P;s.getSize(n),n.x*=this.shadowExtraScaleFactor,n.z*=this.shadowExtraScaleFactor;const r=new P;s.getCenter(r);const o=s.min;return{size:n,center:r,min:o}}blurShadow(e,t){if(!e.world.renderer)throw new Error("The given world must have a renderer!");const i=new He(Zp);i.depthTest=!1;const s=new He(Qp);s.depthTest=!1,e.blurPlane.visible=!0,e.blurPlane.material=i,e.blurPlane.material.uniforms.tDiffuse.value=e.rt.texture,i.uniforms.h.value=t*1/256;const n=e.world.renderer.three;n.setRenderTarget(e.rtBlur),n.render(e.blurPlane,e.camera),e.blurPlane.material=s,e.blurPlane.material.uniforms.tDiffuse.value=e.rtBlur.texture,s.uniforms.v.value=t*1/256,n.setRenderTarget(e.rt),n.render(e.blurPlane,e.camera),e.blurPlane.visible=!1}};F(hc,"uuid","f833a09a-a3ab-4c58-b03e-da5298c7a1b6");let nm=hc;const Kp=["Station","Radius","Length","InitialKP","FinalKP","KP","Slope","Height","InitialKPV","FinalKPV"],dc=class uc extends de{constructor(e){super(e),F(this,"enabled",!0),F(this,"world",null),F(this,"_markerKey",0),F(this,"_list",new Map),F(this,"type","horizontal"),F(this,"divisionLength",100),e.add(uc.uuid,this)}addKPStation(e,t,i){const s=this.components.get(ai),n=document.createElement("div"),r=document.createElement("div");n.appendChild(r),r.innerHTML=t,r.style.color=s.color,r.style.borderBottom="1px dotted white",r.style.width="160px",r.style.textAlign="left";const o=new qe(e,n),a=new P;a.x=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-1),a.y=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-1),a.z=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-1);const l=new P;l.x=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-2),l.y=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-2),l.z=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-2);const h=new P;h.x=(a.x+l.x)/2,h.y=(a.y+l.y)/2,h.z=(a.z+l.z)/2,o.three.position.copy(h);const d=new P;d.subVectors(a,l).normalize();const u=new at;u.setFromUnitVectors(new P(0,1,0),d);const f=new Ma().setFromQuaternion(u).z,m=Ii.radToDeg(f);r.style.transform=`rotate(${-m-90}deg) translate(-35%, -50%)`;const p=this._markerKey.toString();s.setupEvents(e,!0),s.getWorldMarkerList(e).set(p,{label:o,key:p,merged:!1,static:!1}),this._markerKey++,this.save(p,"KP")}addVerticalMarker(e,t,i,s,n){const r=this.components.get(ai),o=document.createElement("span");o.innerHTML=t,o.style.color=r.color;const a=new qe(e,o,n);if(s==="Height"){const h=document.createElement("span");h.innerHTML=t,h.style.color=r.color;const{position:d}=i.geometry.attributes,u=(d.array.length/3-1)*3,f=d.array.slice(u,u+3);a.three.position.set(f[0],f[1]+10,f[2])}else if(s==="InitialKPV"){const{position:h}=i.geometry.attributes,d=h.getX(0),u=h.getY(0),f=h.getZ(0);a.three.position.set(d-20,u,f)}else if(s==="FinalKPV"){const{position:h}=i.geometry.attributes,d=h.getX(i.geometry.attributes.position.count-1),u=h.getY(i.geometry.attributes.position.count-1),f=h.getZ(i.geometry.attributes.position.count-1);a.three.position.set(d+20,u,f)}else if(s==="Slope"){o.style.color="grey";const{position:h}=i.geometry.attributes,d=new P;d.x=h.getX(0),d.y=h.getY(0),d.z=h.getZ(0);const u=new P;u.x=h.getX(h.count-1),u.y=h.getY(h.count-1),u.z=h.getZ(h.count-1);const f=new P;f.addVectors(d,u).multiplyScalar(.5),a.three.position.set(f.x,f.y-10,f.z)}const l=this._markerKey.toString();return r.setupEvents(e,!0),r.getWorldMarkerList(e).set(l,{label:a,key:l,type:s,merged:!1,static:!1}),this._markerKey++,this.save(l,s),a}addCivilMarker(e,t,i,s){const n=this.components.get(ai),r=document.createElement("span");r.innerHTML=t,r.style.color=n.color;const o=new qe(e,r);if(s==="InitialKP"){const l=i.geometry.attributes.position.getX(0),h=i.geometry.attributes.position.getY(0),d=i.geometry.attributes.position.getZ(0);o.three.position.set(l+2,h+2,d)}else if(s==="FinalKP"){const l=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-1),h=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-1),d=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-1);o.three.position.set(l+2,h-2,d)}else if(s==="Length"){const l=new P;l.x=i.geometry.attributes.position.getX(0),l.y=i.geometry.attributes.position.getY(0),l.z=i.geometry.attributes.position.getZ(0);const h=new P;h.x=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-1),h.y=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-1),h.z=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-1);const d=l.distanceTo(h);o.three.element.innerText=d.toFixed(2);const u=h.clone().add(l).divideScalar(2);o.three.position.copy(u)}const a=this._markerKey.toString();return n.setupEvents(e,!0),n.getWorldMarkerList(e).set(a,{label:o,key:a,type:s,merged:!1,static:!1}),this._markerKey++,this.save(a,s),o}showKPStations(e){if(!this.world)throw new Error("A world is needed for this component to work!");if(this.type==="horizontal"){const t=this.generateStartAndEndKP(e);for(const[,s]of t)this.addKPStation(this.world,s.value,s.normal);const i=this.generateConstantKP(e);for(const[,s]of i)this.addKPStation(this.world,s.value,s.normal)}}showCurveLength(e,t){if(!this.world)throw new Error("A world is needed for this component to work!");const i=this.components.get(ai),s=e.length,n=`${t.toFixed(2)} m`,r=Math.round(s/2),o=e[r],a=i.create(this.world,n,o,!0);a!==void 0&&this.save(a,"Radius")}showLineLength(e,t){if(!this.world)throw new Error("A world is needed for this component to work!");const i=this.components.get(ai),s=new P;s.x=e.geometry.getAttribute("position").getX(0),s.y=e.geometry.getAttribute("position").getY(0),s.z=e.geometry.getAttribute("position").getZ(0);const n=new P;n.x=e.geometry.getAttribute("position").getX(1),n.y=e.geometry.getAttribute("position").getY(1),n.z=e.geometry.getAttribute("position").getZ(1);const r=`${t.toFixed(2)} m`,o=new P;o.addVectors(s,n).multiplyScalar(.5);const a=i.create(this.world,r,o,!0);a!==void 0&&this.save(a,"Radius")}showCurveRadius(e,t){if(!this.world)throw new Error("A world is needed for this component to work!");const i=this.components.get(ai),s=new P;s.x=e.geometry.getAttribute("position").getX(0),s.y=e.geometry.getAttribute("position").getY(0),s.z=e.geometry.getAttribute("position").getZ(0);const n=new P;n.x=e.geometry.getAttribute("position").getX(1),n.y=e.geometry.getAttribute("position").getY(1),n.z=e.geometry.getAttribute("position").getZ(1);const r=`R = ${t.toFixed(2)} m`,o=new P;o.addVectors(s,n).multiplyScalar(.5);const a=i.create(this.world,r,o,!0);a!==void 0&&this.save(a,"Radius")}deleteByType(e=Kp){const t=this.components.get(ai);for(const i of e){const s=this._list.get(i);if(s){for(const n of s)t.delete(n);this._list.delete(i)}}}generateStartAndEndKP(e){const{alignment:t}=e.curve,i=new Map;for(const s of t.horizontal){const n=s.getLength();if(i.size>0){const r=s.index-1,o=i.get(r).distance+n,a=s.mesh.geometry.getAttribute("position"),l=a.count-1,h=new P;h.x=a.getX(l),h.y=a.getY(l),h.z=a.getZ(l);const d=this.createNormalLine(s.mesh);i.set(s.index,{value:this.getShortendKPValue(o),distance:o,point:h,normal:d})}else{const r=s.mesh.geometry.getAttribute("position"),o=r.count-1,a=new P;a.x=r.getX(o),a.y=r.getY(o),a.z=r.getZ(o);const l=this.createNormalLine(s.mesh);i.set(s.index,{value:this.getShortendKPValue(n),distance:n,point:a,normal:l})}}return i}createNormalLine(e){const t=e.geometry.attributes.position.count-1,i=t-1,s=new P;s.x=e.geometry.attributes.position.getX(t),s.y=e.geometry.attributes.position.getY(t),s.z=e.geometry.attributes.position.getZ(t);const n=new P;n.x=e.geometry.attributes.position.getX(i),n.y=e.geometry.attributes.position.getY(i),n.z=e.geometry.attributes.position.getZ(i);const r=new P().subVectors(s,n).clone().applyAxisAngle(new P(0,0,1),Math.PI*.5).normalize(),o=new Ce().setFromPoints([r.clone().setLength(10).add(s),r.clone().setLength(-10).add(s)]);return new De(o)}generateConstantKP(e){const{alignment:t}=e.curve,i=new Map,s=t.getLength("horizontal"),n=Math.floor(s/this.divisionLength);for(let r=0;r1e3&&parseInt(i,10)<1e4){const[r,...o]=i;return`${r}+${o.join("")}.${n}`}if(parseInt(i,10)>1e4){const[r,o,...a]=i;return`${r}${o}+${a.join("")}.${n}`}return`0+${i.padStart(3,"0")}.${n}`}save(e,t){this._list.has(t)||this._list.set(t,new Set),this._list.get(t).add(e)}};F(dc,"uuid","0af12c32-81ee-4100-a030-e9ae546f6170");let Rs=dc;class fc extends de{constructor(e){super(e),F(this,"onHighlight",new Y),F(this,"onMarkerChange",new Y),F(this,"onMarkerHidden",new Y),F(this,"onDisposed",new Y),F(this,"enabled",!0),F(this,"mouseMarkers"),F(this,"_curves",[]),F(this,"_previousAlignment",null),F(this,"_highlighter"),F(this,"_world",null),F(this,"updateLinesResolution",t=>{var i;(i=this._highlighter)==null||i.setResolution(t)}),F(this,"onMouseMove",t=>{var i,s,n;if(!this._world)throw new Error("No world was given for this navigator!");if(!this._world.renderer)return;const r=this._world.renderer.three.domElement.parentElement,o=this._world.camera.three,a=(i=this._highlighter)==null?void 0:i.castRay(t,o,r,this._curves);if(a){const{object:l}=a;(s=this._highlighter)==null||s.hover(l),this.updateMarker(a,"hover");return}this.mouseMarkers&&(this.mouseMarkers.hover.visible=!1),(n=this._highlighter)==null||n.unHover(),this.onMarkerHidden.trigger({type:"hover"})}),F(this,"onClick",t=>{var i,s;if(!this._world)throw new Error("No world was given for this navigator!");if(!this._world.renderer)return;const n=this._world.renderer.three.domElement.parentElement,r=this._world.camera.three,o=(i=this._highlighter)==null?void 0:i.castRay(t,r,n,this._curves);if(o){const a=o,l=a.object;if((s=this._highlighter)==null||s.select(l),this.updateMarker(a,"select"),this._world.camera.hasCameraControls()&&(l.geometry.boundingBox||l.geometry.computeBoundingBox(),l.geometry.boundingBox)){const h=this.getScaledBox(l.geometry.boundingBox,2);this._world.camera.controls.fitToBox(h,!0)}this.onHighlight.trigger({mesh:l,point:a.point}),this._previousAlignment!==l.curve.alignment&&(this.components.get(Rs).showKPStations(l),this._previousAlignment=l.curve.alignment)}}),F(this,"onControlsUpdated",()=>{if(!this._world)throw new Error("No world was given for this navigator!");if(!(this._world.camera.three instanceof ii)||!this._highlighter)return;const{zoom:t,left:i,right:s,top:n,bottom:r}=this._world.camera.three,o=i-s,a=n-r,l=Math.max(o,a)/t,h=40,{caster:d}=this._highlighter;d.params.Line.threshold=l/h})}get highlighter(){if(!this._highlighter)throw new Error("Highlighter not initialized. You must set a world first!");return this._highlighter}get world(){return this._world}set world(e){var t,i,s;if(e===this._world||(this._world&&this.setupEvents(!1),this._world=e,(t=this._highlighter)==null||t.dispose(),(i=this.mouseMarkers)==null||i.hover.dispose(),(s=this.mouseMarkers)==null||s.select.dispose(),!e))return;const n=e.scene.three;this._highlighter=new Jl(n,this.view),this.mouseMarkers={select:this.newMouseMarker("#ffffff",e),hover:this.newMouseMarker("#575757",e)},this.setupEvents(!0)}async draw(e,t){if(!e.civilData)throw new Error("The provided model doesn't have civil data!");if(!this._world)throw new Error("No world was given for this navigator!");const{alignments:i}=e.civilData,s=t||i.values(),n=this._world.scene.three,r=new Fe;r.makeEmpty(),r.min.set(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r.max.set(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(const a of s){if(!a)throw new Error("Alignment not found!");for(const l of a[this.view])if(n.add(l.mesh),this._curves.push(l.mesh),!r.isEmpty())r.expandByObject(l.mesh);else{l.mesh.geometry.computeBoundingBox();const h=l.mesh.geometry.boundingBox;h instanceof Fe&&r.copy(h).applyMatrix4(l.mesh.matrixWorld)}}const o=this.getScaledBox(r,1.2);this._world.camera.hasCameraControls()&&await this._world.camera.controls.fitToBox(o,!1)}async dispose(){var e;(e=this._highlighter)==null||e.dispose(),this.clear(),this.onHighlight.reset(),this._curves=[],this.onDisposed.trigger(),this.onDisposed.reset()}clear(){var e,t;(e=this._highlighter)==null||e.unSelect(),(t=this._highlighter)==null||t.unHover();for(const i of this._curves)i.removeFromParent();this._curves=[]}setMarker(e,t,i){if(!this._curves.length)return;const s=e.getCurveAt(t,this.view),n=e.getPointAt(t,this.view),{index:r}=s.curve.getSegmentAt(s.percentage);this.setMouseMarker(n,s.curve.mesh,r,i)}setDefSegments(e){const t=[],i=[],s=(n,r)=>{const o=r[1]-n[1],a=r[0]-n[0];return o/a};for(let n=0;n=0;u--)if(r[u*3]!==void 0&&r[u*3+1]!==void 0){l=r[u*3],h=r[u*3+1];break}const d=(s([o,a],[l,h])*100).toFixed(2);i.push({slope:d})}for(const n of e)for(let r=0;rs.clone().add(i))}showLineInfo(e,t){const i=this.components.get(Rs);i.world=this._world,i.deleteByType(["Length","Radius"]);const s=e.geometry.attributes.position.array,n=this.calculateParallelCurve(s,s.length/3,t),r=new Ce().setFromPoints(n),o=new De(r,this.markupMaterial);i.showLineLength(o,e.curve.getLength()),this._scene.add(o),this.markupLines.push(o);const{startDimensionPoints:a,endDimensionPoints:l}=this.calculateDimensionLines(e,o),h=this.offsetDimensionLine(a,t*.1),d=this.offsetDimensionLine(l,t*.1),u=new Ce().setFromPoints(h),f=new Ce().setFromPoints(d),m=new De(u,this.markupMaterial);this._scene.add(m),this.markupLines.push(m);const p=new De(f,this.markupMaterial);this._scene.add(p),this.markupLines.push(p)}showClothoidInfo(e,t){const i=this.components.get(Rs);i.world=this._world,i.deleteByType(["Length","Radius"]);const s=e.geometry.attributes.position.array,n=this.calculateParallelCurve(s,s.length/3,t),r=new Ce().setFromPoints(n);i.showCurveLength(n,e.curve.getLength());const o=new De(r,this.markupMaterial);this._scene.add(o),this.markupLines.push(o);const{startDimensionPoints:a,endDimensionPoints:l}=this.calculateDimensionLines(e,o),h=this.offsetDimensionLine(a,t*.1),d=this.offsetDimensionLine(l,t*.1),u=new Ce().setFromPoints(h),f=new Ce().setFromPoints(d),m=new De(u,this.markupMaterial);this._scene.add(m),this.markupLines.push(m);const p=new De(f,this.markupMaterial);this._scene.add(p),this.markupLines.push(p)}showCircularArcInfo(e,t){const i=this.components.get(Rs);i.world=this._world,i.deleteByType(["Length","Radius"]);const s=e.curve.data.RADIUS,n=e.geometry.attributes.position.array,r=e.geometry.attributes.position.count,o=[],a=new P(n[0],n[1],n[2]),l=(r-1)*3,h=new P(n[l],n[l+1],n[l+2]),d=r/2*3,u=new P(n[d],n[d+1],n[d+2]),f=h.clone().sub(a).normalize(),m=new P(-f.y,f.x,0);m.multiplyScalar(s);const p=u.clone().add(m);o.push(u),o.push(p);const I=new Ce().setFromPoints(o),E=new De(I,this.markupMaterial);i.showCurveRadius(E,Math.abs(s)),this._scene.add(E),this.markupLines.push(E);const g=[];for(let D=0;D{!this._highlighter||!this.planHighlighter||this.planHighlighter.showCurveInfo(t)})}get world(){return super.world}set world(e){var t;super.world=e,e&&((t=this.planHighlighter)==null||t.dispose(),this.planHighlighter=new qp(this.components,e.scene.three,e))}};F(pc,"uuid","3096dea0-5bc2-41c7-abce-9089b6c9431b");let rm=pc;const Ic=class Ec extends fc{constructor(e){super(e),F(this,"enabled",!0),F(this,"view","vertical"),this.components.add(Ec.uuid,this)}get world(){return super.world}set world(e){this.world!==e&&(super.world=e,this._highlighter&&this._highlighter.onSelect.add(t=>{if(!this.world)throw new Error("A world is needed to work with this component!");const i=this.components.get(Rs);i.deleteByType(["Slope","Height","InitialKPV","FinalKPV"]);const{alignment:s}=t.curve,n=[];for(const l of s.vertical){const h=l.mesh.geometry.attributes.position.array;n.push(h)}const{defSegments:r,slope:o}=this.setDefSegments(n),a=this.world.scene.three;for(let l=0;l{var i;(i=this.highlighter)==null||i.setResolution(t)}),F(this,"onClick",t=>{if(!this.enabled||!this._highlighter)return;if(!this.world)throw new Error("No world found!");if(!this.world.renderer)return;const i=this.world.renderer.three.domElement,s=this.world.camera.three,n=this._highlighter.castRay(t,s,i,this._curves);if(n){const r=n.object;this._highlighter.select(r),this.updateMarker(n,"select");const{point:o,index:a}=n;a!==void 0&&this.onHighlight.trigger({curve:r,point:o,index:a});return}this._highlighter.unSelect(),this.mouseMarkers&&(this.mouseMarkers.hover.visible=!1),this.onMarkerHidden.trigger({type:"hover"})}),F(this,"onMouseMove",async t=>{if(!this.enabled||!this._highlighter)return;if(!this.world)throw new Error("No world found!");if(!this.world.renderer)return;const i=this.world.renderer.three.domElement,s=this.world.camera.three,n=this._highlighter.castRay(t,s,i,this._curves);if(n){this._highlighter.hover(n.object),this.updateMarker(n,"hover");return}this._highlighter.unHover()}),this.components.add(Cc.uuid,this)}get world(){return this._world}set world(e){var t,i,s;if(e===this._world||(this._world&&this.setupEvents(!1),this._world=e,(t=this._highlighter)==null||t.dispose(),(i=this.mouseMarkers)==null||i.hover.dispose(),(s=this.mouseMarkers)==null||s.select.dispose(),!e))return;const n=e.scene.three;this._highlighter=new Jl(n,"absolute"),this.mouseMarkers={select:this.newMouseMarker("#ffffff",e),hover:this.newMouseMarker("#575757",e)},this.setupEvents(!0)}get highlighter(){if(!this._highlighter)throw new Error("Navigator not initialized!");return this._highlighter}draw(e){if(!e.civilData)throw new Error("Model must have civil data!");if(!this.world)throw new Error("A world must be given before drawing an alignment!");const t=this.world.scene.three;for(const[i,s]of e.civilData.alignments)for(const{mesh:n}of s.absolute)t.add(n),this._curves.push(n)}setMarker(e,t,i){if(!this.mouseMarkers)throw new Error("No mouse markers found! Initialize the world before using this.");const s=e.getPointAt(t,"absolute");this.mouseMarkers[i].visible=!0,this.mouseMarkers[i].three.position.copy(s)}hideMarker(e){if(!this.mouseMarkers)throw new Error("No mouse markers found! Initialize the world before using this.");const t=this.mouseMarkers[e].three;t.visible=!1}newMouseMarker(e,t){const i=t.scene.three,s=document.createElement("div");s.style.backgroundColor=e,s.style.width="1rem",s.style.height="1rem",s.style.borderRadius="1rem";const n=new qe(t,s,i);return n.visible=!1,n}setupEvents(e){var t,i;if(!this.world)throw new Error("No world found!");if(this.world.isDisposing||!this.world.renderer)return;const s=this.world.renderer.three.domElement;(t=this.world.renderer)==null||t.onResize.remove(this.updateLinesResolution),s.removeEventListener("click",this.onClick),s.removeEventListener("pointermove",this.onMouseMove),e&&(s.addEventListener("click",this.onClick),s.addEventListener("pointermove",this.onMouseMove),(i=this.world.renderer)==null||i.onResize.add(this.updateLinesResolution))}updateMarker(e,t){if(!this.mouseMarkers)return;const{point:i,object:s}=e,n=s,r=n.curve,o=n.curve.alignment,a=o.getPercentageAt(i,"absolute");this.mouseMarkers[t].visible=!0,this.mouseMarkers[t].three.position.copy(i),a!==null&&this.onMarkerChange.trigger({alignment:o,percentage:a,type:t,curve:r})}};F(gc,"uuid","0a59c09e-2b49-474a-9320-99f51f40f182");let am=gc;const Tc=class Rc extends de{constructor(e){super(e),F(this,"enabled",!0),F(this,"world",null),F(this,"plane"),F(this,"_world3D",null),this.components.add(Rc.uuid,this)}get world3D(){return this._world3D}set world3D(e){var t;if(this._world3D=e,(t=this.plane)==null||t.dispose(),!e)return;const i=this.components.get(Wi),s=i.Type;i.Type=bn,this.plane=i.createFromNormalAndCoplanarPoint(e,new P(1,0,0),new P),i.Type=s,this.plane.visible=!1,this.plane.enabled=!1}async set(e,t){if(!this.world||!this.plane)throw new Error("You must set a world before using this component");this.plane.enabled=!0;const i=e.curve.getPercentageAt(t);if(i===null)return;const{startPoint:s,endPoint:n}=e.curve.getSegmentAt(i);if(e.geometry.index===null)throw new Error("Geometry must be indexed!");const r=new P;r.subVectors(n,s),r.normalize(),this.plane.setFromNormalAndCoplanarPoint(r,t),this.plane.edges.update();const o=this.plane.helper.matrix.clone();o.invert();const a=this.world.scene.three,l=this.plane.edges.get();for(const h in l){const{mesh:d}=l[h];d.position.set(0,0,0),d.rotation.set(0,0,0),d.updateMatrix(),d.applyMatrix4(o),d.parent!==a&&a.add(d)}this.plane.enabled=!1}};F(Tc,"uuid","96b2c87e-d90b-4639-8257-8f01136fe324");let lm=Tc;function ei(){const c=document.createElement("div");return c.style.backgroundColor="black",c.style.color="white",c.style.padding="8px",c.style.borderRadius="8px",c.style.fontFamily="sans-serif",c}const Cn=class Tn{constructor(e,t,i){F(this,"label"),F(this,"boundingBox",new ee),F(this,"world"),F(this,"components"),F(this,"_length"),F(this,"_visible",!0),F(this,"_start"),F(this,"_end"),F(this,"_root",new Fn),F(this,"_endpoints",[]),F(this,"_line"),this.components=e,this.world=t,this._start=i.start,this._end=i.end,this._length=this.getLength(),this._line=this.createLine(i),this.newEndpointElement(i.endpointElement),this.newEndpointElement(i.endpointElement.cloneNode(!0)),this.label=this.newText(),this._root.renderOrder=2,this.world.scene.three.add(this._root)}get visible(){return this._visible}set visible(e){this._visible=e,this.label.visible=e,this._endpoints[0].visible=e,this._endpoints[1].visible=e;const[t,i]=this._endpoints,s=t.three,n=i.three,r=this.label.three;e?(this.world.scene.three.add(this._root),this._root.add(r,s,n)):(r.removeFromParent(),s.removeFromParent(),n.removeFromParent(),this._root.removeFromParent())}get endPoint(){return this._end}set endPoint(e){this._end=e;const t=this._line.geometry.attributes.position;t.setXYZ(1,e.x,e.y,e.z),t.needsUpdate=!0,this._endpoints[1].three.position.copy(e),this.updateLabel()}get startPoint(){return this._start}set startPoint(e){this._start=e;const t=this._line.geometry.attributes.position;t.setXYZ(0,e.x,e.y,e.z),t.needsUpdate=!0,this._endpoints[0].three.position.copy(e),this.updateLabel()}get _center(){let e=this._end.clone().sub(this._start);const t=e.length()*.5;return e=e.normalize().multiplyScalar(t),this._start.clone().add(e)}dispose(){const e=this.components.get(Nt);this.visible=!1,e.destroy(this._root),e.destroy(this._line);for(const t of this._endpoints)t.dispose();this._endpoints.length=0,this.label.dispose(),this.boundingBox&&e.destroy(this.boundingBox),this.components=null}createBoundingBox(){this.boundingBox.geometry=new Be(1,1,this._length),this.boundingBox.position.copy(this._center),this.boundingBox.lookAt(this._end),this.boundingBox.visible=!1,this._root.add(this.boundingBox)}toggleLabel(){this.label.toggleVisibility()}newEndpointElement(e){const t=this._endpoints.length===0?this._start:this._end,i=new qe(this.world,e);i.three.position.copy(t),this._endpoints.push(i),this._root.add(i.three)}updateLabel(){this._length=this.getLength(),this.label.three.element.textContent=this.getTextContent(),this.label.three.position.copy(this._center),this._line.computeLineDistances()}createLine(e){const t=new Ce;t.setFromPoints([e.start,e.end]);const i=new De(t,e.lineMaterial);return this._root.add(i),i}newText(){const e=ei();e.textContent=this.getTextContent();const t=new qe(this.world,e);return t.three.position.copy(this._center),this._root.add(t.three),t}getTextContent(){return`${(this._length/Tn.scale).toFixed(Tn.rounding)} ${Tn.units}`}getLength(){return this._start.distanceTo(this._end)}};F(Cn,"scale",1),F(Cn,"units","m"),F(Cn,"rounding",2);let go=Cn;class Jp{constructor(e,t,i){F(this,"enabled",!0),F(this,"points",[]),F(this,"workingPlane",null),F(this,"labelMarker"),F(this,"world"),F(this,"components"),F(this,"onDisposed",new Y),F(this,"onAreaComputed",new Y),F(this,"onWorkingPlaneComputed",new Y),F(this,"onPointAdded",new Y),F(this,"onPointRemoved",new Y),F(this,"_visible",!0),F(this,"_rotationMatrix",null),F(this,"_dimensionLines",[]),F(this,"_defaultLineMaterial",new si({color:"red"})),this.world=t,this.components=e;const s=ei();this.labelMarker=new qe(t,s),this.labelMarker.visible=!1,this.onPointAdded.add(n=>{this.points.length===3&&!this._dimensionLines[2]&&(this.addDimensionLine(n,this.points[0]),this.labelMarker.visible=!0)}),i==null||i.forEach(n=>this.setPoint(n))}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this._dimensionLines)t.visible=e,t.label.visible=!1;this.labelMarker.visible=e}setPoint(e,t){let i;if(t?i=t:i=this.points.length===0?0:this.points.length,i===0){this.points[0]=e;return}if(i<0||i>this.points.length)return;const s=this.points.length>i;this.points[i]=e,this.onPointAdded.trigger(e),s||this.addDimensionLine(this.points[i-1],e);const{previousLine:n,nextLine:r}=this.getLinesBetweenIndex(i);n&&(n.endPoint=e),r&&(r.startPoint=e)}removePoint(e){if(this.points.length===3)return;this.points.splice(e,1);const{previousLine:t,nextLine:i}=this.getLinesBetweenIndex(e);i&&(t.endPoint=i.endPoint),i==null||i.dispose(),this._dimensionLines.splice(e,1),this.onPointRemoved.trigger()}toggleLabel(){this.labelMarker.toggleVisibility()}addDimensionLine(e,t){const i=new go(this.components,this.world,{start:e,end:t,lineMaterial:this._defaultLineMaterial,endpointElement:ei()});return i.toggleLabel(),this._dimensionLines.length>1?this._dimensionLines.splice(this._dimensionLines.length-1,0,i):this._dimensionLines.push(i),i}getLinesBetweenIndex(e){const t=e===0?this._dimensionLines.length-1:e-1,i=this._dimensionLines[t],s=this._dimensionLines[e];return{previousLine:i,nextLine:s}}computeWorkingPlane(){this.workingPlane=new ti().setFromCoplanarPoints(this.points[0],this.points[1],this.points[2]);const e=new P(0,1,0),t=this.workingPlane.normal.angleTo(e),i=new P().crossVectors(this.workingPlane.normal,e).normalize();this._rotationMatrix=new ne().makeRotationAxis(i,t),this.onWorkingPlaneComputed.trigger(this.workingPlane)}computeArea(){if(!(this._rotationMatrix&&this.workingPlane))return this.onAreaComputed.trigger(0),0;let e=0,t=0;const i=this._rotationMatrix,s=this.points.map(r=>{const o=r.clone().applyMatrix4(i),a=new Se(o.x,o.z);return e+=a.x,t+=a.y,a}),n=Math.abs(Rh.area(s));return this.labelMarker.three.element.textContent=`${n.toFixed(2)} m²`,this.labelMarker.three.position.set(e/s.length,-this.workingPlane.constant,t/s.length).applyMatrix4(i.clone().invert()),this.onAreaComputed.trigger(n),n}dispose(){this.onAreaComputed.reset(),this.onWorkingPlaneComputed.reset(),this.onPointAdded.reset(),this.onPointRemoved.reset();for(const e of this._dimensionLines)e.dispose();this.labelMarker.dispose(),this._dimensionLines=[],this.points=[],this._rotationMatrix=null,this.workingPlane=null,this._defaultLineMaterial.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get(){return{points:this.points,workingPlane:this.workingPlane,area:this.computeArea()}}}class Co extends Hd{constructor(e,t){super(e,t),F(this,"onDisposed",new Y),F(this,"marker",null),F(this,"_className","default-vertex-picker"),this.onEnabled.add(i=>{this.marker&&(this.marker.visible=i)})}get className(){return this._className}set className(e){this._className=e,this.marker&&(this.marker.three.element.className=e)}dispose(){this.marker&&this.marker.dispose(),super.dispose()}get(e){const t=super.get(e);return t?(this.marker||(this.marker=new qe(e),this.marker.three.element.className=this._className),this.marker.world!==e&&(this.marker.world=e,this.marker.three.removeFromParent(),e.scene.three.add(this.marker.three)),this.marker.visible=!0,this.marker.three.position.copy(t)):this.marker&&(this.marker.visible=!1),t}}const Sc=class Vr extends de{constructor(e){super(e),F(this,"onDisposed",new Y),F(this,"list",[]),F(this,"world"),F(this,"_enabled",!1),F(this,"_visible",!0),F(this,"_vertexPicker"),F(this,"_currentAreaElement",null),F(this,"_clickCount",0),F(this,"create",()=>{if(!this.enabled)return;if(!this.world)throw new Error("World not defined for the area measurement!");const t=this._vertexPicker.get(this.world);if(t){if(!this._currentAreaElement){const i=new Jp(this.components,this.world);i.onPointAdded.add(()=>{this._clickCount===2&&!i.workingPlane&&(i.computeWorkingPlane(),this._vertexPicker.workingPlane=i.workingPlane)}),i.onPointRemoved.add(()=>this._clickCount--),this._currentAreaElement=i}this._currentAreaElement.setPoint(t,this._clickCount),this._currentAreaElement.computeArea(),this._clickCount++}}),F(this,"onMouseMove",()=>{if(!this.world){console.log("No world given for the area measurement!");return}const t=this._vertexPicker.get(this.world);t&&this._currentAreaElement&&(this._currentAreaElement.setPoint(t,this._clickCount),this._currentAreaElement.computeArea())}),F(this,"onKeydown",t=>{this.enabled&&(t.key==="z"&&t.ctrlKey&&this._currentAreaElement&&this._currentAreaElement.removePoint(this._clickCount-1),t.key==="Enter"&&this._currentAreaElement&&this.endCreation(),t.key==="Escape"&&(this._clickCount===0&&!this._currentAreaElement?this.enabled=!1:this.cancelCreation()))}),this.components.add(Vr.uuid,this),this._vertexPicker=new Co(e)}set enabled(e){this._enabled=e,this._vertexPicker.enabled=e,this.setupEvents(e),e||this.cancelCreation()}get enabled(){return this._enabled}set workingPlane(e){this._vertexPicker.workingPlane=e}get workingPlane(){return this._vertexPicker.workingPlane}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}dispose(){this.setupEvents(!1),this._vertexPicker.dispose(),this._currentAreaElement&&this._currentAreaElement.dispose();for(const e of this.list)e.dispose();this.components=null,this.onDisposed.trigger(Vr.uuid),this.onDisposed.reset()}delete(){}deleteAll(){for(const e of this.list)e.dispose();this.list=[]}endCreation(){this._currentAreaElement&&(this._currentAreaElement.points.length<3||(this._currentAreaElement&&(this.list.push(this._currentAreaElement),this._currentAreaElement.removePoint(this._clickCount),this._currentAreaElement.computeWorkingPlane(),this._currentAreaElement.computeArea(),this._currentAreaElement=null),this._vertexPicker.workingPlane=null,this._clickCount=0))}cancelCreation(){this._currentAreaElement&&(this._currentAreaElement.dispose(),this._currentAreaElement=null),this._vertexPicker.workingPlane=null,this._clickCount=0}setupEvents(e){if(!this.world)throw new Error("The area measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the area measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)):(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown))}};F(Sc,"uuid","c453a99e-f054-4781-9060-33df617db4a5");let cm=Sc;class $p{constructor(e,t){F(this,"enabled",!0),F(this,"visible",!0),F(this,"points",[]),F(this,"world"),F(this,"onDisposed",new Y),F(this,"_lineMaterial",new Os({color:6629591,linewidth:2})),F(this,"_lineGeometry",new Nn),F(this,"_line",new Ql(this._lineGeometry,this._lineMaterial)),F(this,"_labelMarker"),F(this,"onAngleComputed",new Y),F(this,"onPointAdded",new Y),this.world=e;const i=ei();this._labelMarker=new qe(e,i),this.labelMarker.visible=!0,this.onPointAdded.add(()=>{this.points.length===1&&e.scene.three.add(this._line),this.points.length===3&&(this.labelMarker.visible=!0)}),this.onAngleComputed.add(s=>{this.labelMarker.three.element.textContent=`${s.toFixed(2)}°`,this.labelMarker.three.position.copy(this.points[1]??new P)}),t==null||t.forEach(s=>this.setPoint(s))}set lineMaterial(e){this._lineMaterial.dispose(),this._lineMaterial=e,this._line.material=e,this._lineMaterial.resolution.set(window.innerWidth,window.innerHeight)}get lineMaterial(){return this._lineMaterial}set labelMarker(e){this._labelMarker.dispose(),this._labelMarker=e}get labelMarker(){return this._labelMarker}get angle(){return{points:this.points,angle:this.computeAngle()}}setPoint(e,t){let i;if(t?i=t:i=this.points.length===0?0:this.points.length,![0,1,2].includes(i))return;this.points[i]=e,this.onPointAdded.trigger(e);const s=this.points.map(n=>[n.x,n.y,n.z]);this._lineGeometry.setPositions(s.flat())}toggleLabel(){this.labelMarker.toggleVisibility()}computeAngle(){const e=this.points[0],t=this.points[1],i=this.points[2];if(!(e&&t&&i))return 0;const s=new P().subVectors(t,e),n=new P().subVectors(t,i),r=Ii.radToDeg(s.angleTo(n));return this.onAngleComputed.trigger(r),r}dispose(){this.points=[],this.labelMarker.dispose(),this.onAngleComputed.reset(),this.onPointAdded.reset(),this.labelMarker.dispose(),this._line.removeFromParent(),this._lineMaterial.dispose(),this._lineGeometry.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}}const vc=class Yr extends de{constructor(e){super(e),F(this,"onDisposed",new Y),F(this,"world"),F(this,"list",[]),F(this,"_lineMaterial"),F(this,"_enabled",!1),F(this,"_vertexPicker"),F(this,"_currentAngleElement",null),F(this,"_clickCount",0),F(this,"create",()=>{if(!this.enabled)return;if(!this.world){console.log("No world selected for angle measurement!");return}const t=this._vertexPicker.get(this.world);if(t){if(!this._currentAngleElement){const i=new $p(this.world);i.lineMaterial=this.lineMaterial,this._currentAngleElement=i}this._currentAngleElement.setPoint(t,this._clickCount),this._currentAngleElement.setPoint(t,this._clickCount+1),this._currentAngleElement.setPoint(t,this._clickCount+2),this._currentAngleElement.computeAngle(),this._clickCount++,this._clickCount===3&&this.endCreation()}}),F(this,"onMouseMove",()=>{if(!this.world){console.log("No world selected for angle measurement!");return}const t=this._vertexPicker.get(this.world);t&&this._currentAngleElement&&(this._currentAngleElement.setPoint(t,this._clickCount),this._currentAngleElement.computeAngle())}),F(this,"onKeyDown",t=>{this.enabled&&t.key==="Escape"&&this.cancelCreation()}),this.components.add(Yr.uuid,this),this._vertexPicker=new Co(e),this._lineMaterial=new Os({color:6629591,linewidth:2})}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.setupEvents(e),this._vertexPicker.enabled=e,e||this.cancelCreation()}get lineMaterial(){return this._lineMaterial}set lineMaterial(e){this._lineMaterial.dispose(),this._lineMaterial=e,this._lineMaterial.resolution.set(window.innerWidth,window.innerHeight)}get workingPlane(){return this._vertexPicker.workingPlane}set workingPlane(e){this._vertexPicker.workingPlane=e}dispose(){this.setupEvents(!1),this._lineMaterial.dispose(),this._vertexPicker.dispose();for(const e of this.list)e.dispose();this._currentAngleElement&&this._currentAngleElement.dispose(),this.components=null,this.onDisposed.trigger(Yr.uuid),this.onDisposed.reset()}delete(){}deleteAll(){for(const e of this.list)e.dispose();this.list=[]}endCreation(){this._currentAngleElement&&(this.list.push(this._currentAngleElement),this._currentAngleElement.computeAngle(),this._currentAngleElement=null),this._clickCount=0}cancelCreation(){this._currentAngleElement&&(this._currentAngleElement.dispose(),this._currentAngleElement=null),this._clickCount=0}setupEvents(e){if(!this.world)throw new Error("No world selected for angle measurement!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The given world doesn't have a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeyDown)):(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeyDown))}};F(vc,"uuid","622fb2c9-528c-4b0a-8a0e-6a1375f0a3aa");let hm=vc;const wc=class Gr extends de{constructor(e){super(e),F(this,"onDisposed",new Y),F(this,"onBeforeUpdate",new Y),F(this,"onAfterUpdate",new Y),F(this,"snapDistance",.25),F(this,"list",[]),F(this,"world"),F(this,"_vertexPicker"),F(this,"_lineMaterial",new si({color:"#DC2626",linewidth:2,depthTest:!1})),F(this,"_visible",!0),F(this,"_enabled",!1),F(this,"_temp",{isDragging:!1,start:new P,end:new P,dimension:void 0}),F(this,"create",t=>{const i=t instanceof Yi?t:void 0;if(this._enabled){if(!this._temp.isDragging){this.drawStart(i);return}this.endCreation()}}),F(this,"onMouseMove",()=>{this.world&&this._vertexPicker.get(this.world)}),F(this,"onKeydown",t=>{this.enabled&&t.key==="Escape"&&this.cancelCreation()}),this.components.add(Gr.uuid,this),this._vertexPicker=new Co(e,{previewElement:ei(),snapDistance:this.snapDistance})}get enabled(){return this._enabled}set enabled(e){e||this.cancelCreation(),this._enabled=e,this._vertexPicker.enabled=e,this.setupEvents(e)}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}get color(){return this._lineMaterial.color}set color(e){this._lineMaterial.color=e}dispose(){this.setupEvents(!1),this.enabled=!1;for(const e of this.list)e.dispose();this._lineMaterial.dispose(),this.list=[],this._vertexPicker.dispose(),this.onDisposed.trigger(Gr.uuid),this.onDisposed.reset()}async update(e){this._enabled&&this._temp.isDragging&&this.drawInProcess()}createOnPoints(e,t){const i=this.drawDimension();i.startPoint=e,i.endPoint=t,i.createBoundingBox(),this.list.push(i)}delete(){if(!this.world)throw new Error("World is needed for Length Measurement!");if(!this._enabled||this.list.length===0)return;const e=this.getBoundingBoxes(),t=this.components.get(ut).get(this.world).castRay(e);if(!t)return;const i=this.list.find(s=>s.boundingBox===t.object);if(i){const s=this.list.indexOf(i);this.list.splice(s,1),i.dispose()}}async deleteMeasurement(e){if(e){const t=this.list.indexOf(e);this.list.splice(t,1),e.dispose()}}deleteAll(){for(const e of this.list)e.dispose();this.list=[]}cancelCreation(){var e;this._temp.dimension&&(this._temp.isDragging=!1,(e=this._temp.dimension)==null||e.dispose(),this._temp.dimension=void 0)}endCreation(){this._temp.dimension&&(this._temp.dimension.createBoundingBox(),this.list.push(this._temp.dimension),this._temp.dimension=void 0,this._temp.isDragging=!1)}drawStart(e){if(!this.world)throw new Error("The length measurement needs a world to work!");const t=e?[e]:void 0,i=this.components.get(ut).get(this.world).castRay(t),s=this._vertexPicker.get(this.world);i&&s&&(this._temp.isDragging=!0,this._temp.start=e?i.point:s)}drawInProcess(){if(!this.world)throw new Error("The length measurement needs a world to work!");if(!this.components.get(ut).get(this.world).castRay())return;const e=this._vertexPicker.get(this.world);e&&(this._temp.end=e,this._temp.dimension||(this._temp.dimension=this.drawDimension()),this._temp.dimension.endPoint=this._temp.end)}drawDimension(){if(!this.world)throw new Error("The length measurement needs a world to work!");return new go(this.components,this.world,{start:this._temp.start,end:this._temp.end,lineMaterial:this._lineMaterial,endpointElement:ei()})}getBoundingBoxes(){return this.list.map(e=>e.boundingBox).filter(e=>e!==void 0)}setupEvents(e){if(!this.world)throw new Error("The length measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the length measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;t&&(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown),e&&(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)))}};F(wc,"uuid","2f9bcacf-18a9-4be6-a293-e898eae64ea1");let Is=wc;const Fc=class Ac extends de{constructor(e){super(e),F(this,"onDisposed",new Y),F(this,"onVolumeFound",new Y),F(this,"label",null),F(this,"world"),F(this,"_enabled",!1),F(this,"create",()=>{if(!this.enabled)return;if(!this.world)throw new Error("World is needed for Volume Measurement!");const t=this.components.get(ut).get(this.world).castRay(),i=this.components.get(pi);if(!t||!t.object)return;const{object:s}=t;if(s instanceof ee){const n=i.getVolumeFromMeshes([s]);this.onVolumeFound.trigger(n)}}),F(this,"onMouseMove",()=>{}),F(this,"onKeydown",t=>{}),this.components.add(Ac.uuid,this)}set enabled(e){this._enabled=e,this.setupEvents(e),e||this.cancelCreation()}get enabled(){return this._enabled}async dispose(){var e;this.setupEvents(!1),(e=this.label)==null||e.dispose(),this.onDisposed.trigger(),this.onDisposed.reset(),this.components=null}delete(){}async deleteAll(){}endCreation(){}cancelCreation(){}getVolumeFromFragments(e){const t=this.components.get(pi).getVolumeFromFragments(e),i=this.components.get(On);i.reset(),i.addFragmentIdMap(e);const s=i.getSphere();return this.setLabel(s,t),t}getVolumeFromMeshes(e){const t=this.components.get(pi),i=this.components.get(On);i.reset();for(const r of e)i.addMesh(r);const s=i.getSphere(),n=t.getVolumeFromMeshes(e);return this.setLabel(s,n),n}clear(){this.label&&(this.label.visible=!1)}newLabel(){if(!this.world)throw new Error("World is needed for Volume Measurement!");const e=ei();return new qe(this.world,e)}setupEvents(e){if(!this.world)throw new Error("The volume measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the volume measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("click",this.create),t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)):(t.removeEventListener("click",this.create),t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown))}setLabel(e,t){if(!this.world)throw new Error("World is needed for Volume Measurement!");this.label||(this.label=this.newLabel(),this.label.three.removeFromParent()),this.label.visible=!0,this.world.scene.three.add(this.label.three),this.label.three.position.copy(e.center);const i=Math.trunc(t*100)/100;this.label.three.element.textContent=i.toString()}};F(Fc,"uuid","811da532-7af3-4635-b592-1c06ae494af5");let dm=Fc;const yc=class Oc extends de{constructor(e){super(e),F(this,"onDisposed",new Y),F(this,"selection",[]),F(this,"preview",new ee(new Ce,new st({side:2,depthTest:!1,transparent:!0,opacity:.25,color:"#BCF124"}))),F(this,"selectionMaterial",new st({side:2,depthTest:!1,transparent:!0,color:"#BCF124",opacity:.75})),F(this,"world"),F(this,"_enabled",!1),F(this,"_currentSelelection",null),F(this,"create",()=>{if(!this.world)throw new Error("No world given to the face measurement!");if(!this.enabled||!this._currentSelelection)return;const t=this.world.scene.three,i=new Ce,s=new ee(i,this.selectionMaterial);i.setAttribute("position",this.preview.geometry.attributes.position),t.add(s),i.computeBoundingSphere();const{area:n,perimeter:r}=this._currentSelelection,o=this.newLabel(i,n);s.add(o.three),this.selection.push({area:n,perimeter:r,mesh:s,label:o})}),F(this,"onMouseMove",()=>{if(!this.world)throw new Error("The face measurement needs a world to work!");if(!this.enabled){this.unselect();return}const t=this.components.get(ut).get(this.world).castRay();if(!t||!t.object||t.faceIndex===void 0){this.unselect();return}const{object:i,faceIndex:s}=t;i instanceof ee||i instanceof It?this.updateSelection(i,s,t.instanceId):this.unselect()}),F(this,"onKeydown",t=>{}),this.components.add(Oc.uuid,this),this.preview.frustumCulled=!1}set enabled(e){if(!this.world)throw new Error("No world given for the Face measurement!");this._enabled=e,this.setupEvents(e),e?this.world.scene.three.add(this.preview):(this.preview.removeFromParent(),this.cancelCreation()),this.setVisibility(e)}get enabled(){return this._enabled}dispose(){this.setupEvents(!1),this.deleteAll(),this.preview.removeFromParent(),this.preview.material.dispose(),this.preview.geometry.dispose(),this.selectionMaterial.dispose(),this.onDisposed.trigger(),this.onDisposed.reset(),this.components=null}delete(){if(!this.world)throw new Error("No world given to the face measurement!");const e=this.selection.map(n=>n.mesh),t=this.components.get(ut).get(this.world).castRay(e);if(!t||!t.object)return;const i=this.selection.find(n=>n.mesh===t.object);if(!i)return;i.mesh.removeFromParent(),i.mesh.geometry.dispose(),i.label.dispose();const s=this.selection.indexOf(i);this.selection.splice(s,1)}deleteAll(){for(const e of this.selection)e.mesh.removeFromParent(),e.mesh.geometry.dispose(),e.label.dispose();this.selection=[]}endCreation(){}cancelCreation(){}get(){const e=[];for(const t of this.selection){const i=t.mesh.geometry,{area:s,perimeter:n}=t,r=i.attributes.position.array;e.push({position:r,area:s,perimeter:n})}return e}set(e){if(!this.world)throw new Error("No world given to the face measurement!");const t=this.world.scene.three;for(const i of e){const s=new Ce,n=new ee(s,this.selectionMaterial);t.add(n);const r=new Je(i.position,3);s.setAttribute("position",r),s.computeBoundingSphere();const{area:o,perimeter:a}=i,l=this.newLabel(s,o);n.add(l.three),this.selection.push({area:o,perimeter:a,mesh:n,label:l})}}setupEvents(e){if(!this.world)throw new Error("The face measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the face measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown),e&&(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown))}setVisibility(e){if(!this.world)throw new Error("The face measurement needs a world to work!");if(this.world.isDisposing)return;const t=this.world.scene.three;for(const i of this.selection){const s=i.label.three;e?(t.add(i.mesh),i.mesh.add(s)):(i.mesh.removeFromParent(),s.removeFromParent())}}unselect(){this.preview.removeFromParent(),this._currentSelelection=null}updateSelection(e,t,i){if(!this.world)throw new Error("The face measurement needs a world to work!");this.world.scene.three.add(this.preview);const s=this.components.get(pi).getFace(e,t,i);if(s===null)return;const n=this.regenerateHighlight(e,s.indices,i);let r=0;for(const{distance:o}of s.edges)r+=o;this._currentSelelection={perimeter:r,area:n}}newLabel(e,t){if(!e.boundingSphere)throw new Error("Error computing area geometry");if(!this.world)throw new Error("The face measurement needs a world to work!");const{center:i}=e.boundingSphere,s=ei(),n=Math.trunc(t*100)/100;s.textContent=n.toString();const r=new qe(this.world,s);return r.three.position.copy(i),r}regenerateHighlight(e,t,i){const s=[],n=[];let r=0,o=0;const a=new hi,l=this.components.get(pi);for(const u of t){const{p1:f,p2:m,p3:p}=l.getVerticesAndNormal(e,u,i);s.push(f.x,f.y,f.z),s.push(m.x,m.y,m.z),s.push(p.x,p.y,p.z),a.set(f,m,p),o+=a.getArea(),n.push(r,r+1,r+2),r+=3}this.preview.position.set(0,0,0),this.preview.rotation.set(0,0,0),this.preview.scale.set(1,1,1),this.preview.updateMatrix(),this.preview.applyMatrix4(e.matrixWorld);const h=new Float32Array(s),d=new Je(h,3);return this.preview.geometry.setAttribute("position",d),this.preview.geometry.setIndex(n),o}};F(yc,"uuid","30279548-1309-44f6-aa97-ce26eed73522");let um=yc;const Nc=class bc extends de{constructor(e){super(e),F(this,"onDisposed",new Y),F(this,"preview"),F(this,"tolerance",.3),F(this,"world"),F(this,"_enabled",!1),F(this,"_lineMaterial",new si({color:"#DC2626",linewidth:2,depthTest:!1,transparent:!0})),F(this,"create",async()=>{if(!this.preview||!this.enabled||!this.preview.visible)return;const t=this.components.get(Is);t.world=this.world;const i=this.preview.startPoint.clone(),s=this.preview.endPoint.clone();t.createOnPoints(i,s)}),F(this,"onMouseMove",()=>{if(!this.preview)return;if(!this.world)throw new Error("The edge measurement needs a world to work!");if(!this.enabled){this.preview.visible=!1;return}const t=this.components.get(ut).get(this.world).castRay();if(!t||!t.object){this.preview.visible=!1;return}const{object:i,faceIndex:s,point:n}=t;if(s===void 0){this.preview.visible=!1;return}i instanceof ee||i instanceof It?this.updateSelection(i,n,s,t.instanceId):this.preview.visible=!1}),F(this,"onKeydown",t=>{}),this.components.add(bc.uuid,this)}set enabled(e){if(this._enabled=e,this.setupEvents(e),e){if(!this.world)throw new Error("The edge measurement needs a world to work!");if(!this.preview){const t=document.createElement("div");t.className="w-2 h-2 bg-red-600 rounded-full",this.preview=new go(this.components,this.world,{start:new P,end:new P,lineMaterial:this._lineMaterial,endpointElement:t}),this.preview.visible=!1}}else this.cancelCreation()}get enabled(){return this._enabled}dispose(){this.preview&&this.preview.dispose(),this._lineMaterial.dispose(),this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset(),this.components=null}delete(){if(!this.enabled)return;const e=this.components.get(Is),t=e.enabled;e.enabled=!0,e.delete(),e.enabled=t}deleteAll(){this.components.get(Is).deleteAll()}endCreation(){}cancelCreation(){}get(){const e=this.components.get(Is).list,t=[];for(const i of e){const s=i.startPoint,n=i.endPoint,r=[s.x,s.y,s.z,n.x,n.y,n.z];t.push(r)}return t}set(e){const t=this.components.get(Is);t.world=this.world;for(const i of e){const[s,n,r,o,a,l]=i,h=new P(s,n,r),d=new P(o,a,l);t.createOnPoints(h,d)}}setupEvents(e){if(!this.world)throw new Error("The edge measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the edge measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)):(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown))}updateSelection(e,t,i,s){if(!this.preview||!e.geometry.index)return;const n=this.components.get(pi).getFace(e,i,s);if(!n)return;const{edges:r}=n;let o=Number.MAX_VALUE,a=[];for(const d of r){const[u,f]=d.points,m=pi.distanceFromPointToLine(t,u,f,!0);m{const n=s.data.colors,r={},o={},a={},l={},h=performance.now();let d=!1;const u=new Set(this._geometriesInMemory);for(const[f,m]of n){const p=this._geometries.get(f);if(!p||!(m>this.threshold))continue;u.delete(f);const{exists:I}=p,E=this._indexModelID.get(p.modelIndex);I?(p.time=h,l[E]||(l[E]=new Set),l[E].add(p.geometryID),this._geometriesInMemory.add(f),d=!0):(r[E]||(r[E]=new Map),p.time=h,p.exists=!0,r[E].has(m)||r[E].set(m,new Set),r[E].get(m).add(p.geometryID),this._geometriesInMemory.add(f),d=!0)}for(const f of u){const m=this._geometries.get(f);m&&(this.handleLostGeometries(h,f,m,o,a),d=!0)}d&&await this.onViewUpdated.trigger({toLoad:r,toRemove:o,toHide:a,toShow:l}),this._isWorkerBusy=!1}),this.config.updateInterval=500,this._geometry=new Be(1,1,1),this._geometry.groups=[],this._geometry.deleteAttribute("uv");const i=this._geometry.attributes.position.array;for(let s=0;sparseInt(m,10)),f=[];for(const m of i.ids){const p=i.get(m);if(!p.colors)throw new Error("Malformed fragments!");for(const I of p.colors)I.setRGB(h/255,d/255,u/255,"srgb");f.push(p)}l.fragment.add(f),_t.enabled=r,this.needsUpdate=!0}removeFragment(e,t){const i=this._modelIDIndex.get(e),s=this.codes.get(i).get(t),n=this._geometries.get(s);if(n.hidden||this.setGeometryVisibility(n,!0,!1),n.fragment){const{fragment:r}=n;r.dispose(!1),n.fragment=void 0}}setModelTransformation(e,t){const i=this._modelIDIndex.get(e);if(i===void 0)throw new Error("Model not found!");const s=this.boxes.get(i);s&&(s.mesh.position.set(0,0,0),s.mesh.rotation.set(0,0,0),s.mesh.scale.set(1,1,1),s.mesh.applyMatrix4(t));const n=this._geometriesGroups.get(i);n&&(n.position.set(0,0,0),n.rotation.set(0,0,0),n.scale.set(1,1,1),n.applyMatrix4(t))}setVisibility(e,t,i){const s=this._modelIDIndex.get(t);if(s!==void 0)for(const[n,r]of i){const o=this.codes.get(s);if(o===void 0)throw new Error("Map not found!");const a=o.get(n),l=this._geometries.get(a);if(l===void 0)throw new Error("Geometry not found!");l.hidden=!e,this.setGeometryVisibility(l,e,!0,r)}}updateTransformations(e){const t=this._modelIDIndex.get(e);if(t===void 0)return;const i=this.components.get(ue).groups.get(e);if(i){i.updateWorldMatrix(!0,!1),i.updateMatrix();const s=this.boxes.get(t);s&&(s.mesh.position.set(0,0,0),s.mesh.rotation.set(0,0,0),s.mesh.scale.set(1,1,1),s.mesh.updateMatrix(),s.mesh.applyMatrix4(i.matrixWorld),s.mesh.updateMatrix());const n=this._geometriesGroups.get(t);n&&(n.position.set(0,0,0),n.rotation.set(0,0,0),n.scale.set(1,1,1),n.updateMatrix(),n.applyMatrix4(i.matrixWorld),n.updateMatrix())}}async addStaticGeometries(e,t=!0){const i={data:{colors:new Map}},s=this.threshold+1e3;for(const n in e){const r=this._modelIDIndex.get(n);if(r===void 0)continue;const o=this.codes.get(r);if(!o)continue;const a=e[n];for(const l of a){const h=o.get(l);if(!h)continue;const d=this._geometries.get(h);if(!d)continue;d.exists=!0,t||(d.hidden=!1,d.time=performance.now(),i.data.colors.set(h,s)),this._geometriesInMemory.add(h);const u=t?this._staticGeometries.culled:this._staticGeometries.unculled;u[n]||(u[n]=new Set),u[n].add(l)}}t||await this.handleWorkerMessage(i)}removeStaticGeometries(e,t){const i=[];t===void 0?i.push("culled","unculled"):t===!0?i.push("culled"):i.push("unculled");for(const s in e){const n=e[s];for(const r of i){const o=this._staticGeometries[r][s];if(o)for(const a of n)o.delete(a)}}}cancel(e){for(const t in e){const i=this._modelIDIndex.get(t);if(i===void 0)throw new Error("Model not found.");const s=this.codes.get(i);if(s===void 0)throw new Error("Codes not found.");for(const n of e[t]){const r=s.get(n);if(r===void 0)throw new Error("Color code not found.");this._geometriesInMemory.delete(r);const o=this._geometries.get(r);if(!o)throw new Error("Geometry not found.");o.exists=!1}}}setGeometryVisibility(e,t,i,s){const{modelIndex:n,geometryID:r,assetIDs:o}=e,a=this.boxes.get(n);if(a===void 0)throw new Error("Model not found!");const l=s||o;if(i&&e.fragment)e.fragment.setVisibility(t,l);else{const h=new Set;for(const d of l){const u=this.getInstanceID(d,r);h.add(u)}a.setVisibility(t,h)}}handleLostGeometries(e,t,i,s,n){var r,o,a;const l=this._indexModelID.get(i.modelIndex),h=e-i.time,{culled:d,unculled:u}=this._staticGeometries;if(h>this.maxLostTime){if((r=d[l])!=null&&r.has(i.geometryID)||(o=u[l])!=null&&o.has(i.geometryID))return;s[l]||(s[l]=new Set),i.exists=!1,s[l].add(i.geometryID),this._geometriesInMemory.delete(t)}else if(h>this.maxHiddenTime){if((a=u[l])!=null&&a.has(i.geometryID))return;n[l]||(n[l]=new Set),n[l].add(i.geometryID)}}createModelIndex(e){if(this._modelIDIndex.has(e))throw new Error("Can't load the same model twice!");const t=this._nextModelID;return this._nextModelID++,this._modelIDIndex.set(e,t),this._indexModelID.set(t,e),t}getInstanceID(e,t){const i=10**(Math.log(t)*Math.LOG10E+1|0);return e+t/i}}const Lc=class Hr extends de{constructor(e){super(e),F(this,"enabled",!0),F(this,"onFragmentsDeleted",new Y),F(this,"onFragmentsLoaded",new Y),F(this,"onDisposed",new Y),F(this,"models",{}),F(this,"serializer",new Ua),F(this,"maxRamTime",5e3),F(this,"useCache",!0),F(this,"cancel",!1),F(this,"url",""),F(this,"fetch",async t=>fetch(this.url+t)),F(this,"fileDB",new Sh("that-open-company-streaming")),F(this,"_culler",null),F(this,"_world",null),F(this,"_ramCache",new Map),F(this,"_isDisposing",!1),F(this,"_geometryInstances",{}),F(this,"_loadedFragments",{}),F(this,"fragIDData",new Map),F(this,"_baseMaterial",new Sn),F(this,"_baseMaterialT",new Sn({transparent:!0,opacity:.5})),F(this,"disposeStreamedGroup",t=>{this._isDisposing=!0;const{groupID:i,fragmentIDs:s}=t;if(this.models[i]){delete this.models[i],delete this._geometryInstances[i],delete this._loadedFragments[i];for(const n of s)this.fragIDData.delete(n);this.culler.remove(i),this._isDisposing=!1}}),this.components.add(Hr.uuid,this),this.components.get(ue).onFragmentsDisposed.add(this.disposeStreamedGroup),qt.setPropertiesDB(!0)}get world(){if(!this._world)throw new Error("You must set a world before using the streamer!");return this._world}set world(e){var t;this._world=e,(t=this._culler)==null||t.dispose(),this._culler=new em(this.components,e),this._culler.onViewUpdated.add(async({toLoad:i,toRemove:s,toShow:n,toHide:r})=>{await this.loadFoundGeometries(i),await this.unloadLostGeometries(s),this.setMeshVisibility(n,!0),this.setMeshVisibility(r,!1)})}get culler(){if(!this._culler)throw new Error("You must set a world before using the streamer!");return this._culler}dispose(){var e;this._isDisposing=!0,this.onFragmentsLoaded.reset(),this.onFragmentsDeleted.reset(),this._ramCache.clear(),this.components.get(ue).onFragmentsDisposed.remove(this.disposeStreamedGroup),this.models={},this._geometryInstances={},this._loadedFragments={},this.fragIDData.clear(),this._baseMaterial.dispose(),this._baseMaterialT.dispose(),(e=this._culler)==null||e.dispose(),this.onDisposed.trigger(Hr.uuid),this.onDisposed.reset(),this._isDisposing=!1,qt.setPropertiesDB(!1)}async load(e,t,i){const{assets:s,geometries:n,globalDataFileId:r}=e,o=await(await this.fetch(r)).arrayBuffer(),a=new Uint8Array(o),l=this.components.get(ue).load(a,{coordinate:t,isStreamed:!0});l.name=r.replace("-processed-global",""),this.world.scene.three.add(l);const{opaque:h,transparent:d}=l.geometryIDs;for(const[f,m]of h){const p=l.keyFragments.get(m);if(p===void 0)throw new Error("Malformed fragments group!");this.fragIDData.set(p,[l,f,new Set])}for(const[f,m]of d){const p=l.keyFragments.get(m);if(p===void 0)throw new Error("Malformed fragments group!");this.fragIDData.set(p,[l,Math.abs(f),new Set])}this.culler.add(l.uuid,s,n),this.models[l.uuid]={assets:s,geometries:n};const u=new Map;for(const f of s){const m=f.id;for(const{transformation:p,geometryID:I,color:E}of f.geometries){u.has(I)||u.set(I,[]);const g=u.get(I);if(!g)throw new Error("Malformed instances");g.push({id:m,transformation:p,color:E})}}if(this._geometryInstances[l.uuid]=u,i){const f=new Map,m=new Map;for(const v in i.ids){const C=i.ids[v],w=parseInt(v,10);f.set(w,C)}for(const v in i.types){const C=i.types[v],w=parseInt(v,10);m.set(w,C)}const p=r.replace("-global","-properties");qt.url=this.url,l.streamSettings={baseFileName:p,ids:f,types:m};const{indexesFile:I}=i,E=await(await this.fetch(I)).text(),g=this.components.get(it);g.setRelationMap(l,g.getRelationsMapFromJSON(E))}return this.culler.updateTransformations(l.uuid),this.culler.needsUpdate=!0,l}remove(e){const t=this.components.get(ue),i=t.groups.get(e);i&&t.disposeGroup(i)}setVisibility(e,t){const i=new Map;for(const s in t){const n=this.fragIDData.get(s);if(n===void 0)throw new Error("Geometry not found!");const[r,o,a]=n,l=r.uuid;i.has(l)||i.set(l,new Map);const h=i.get(l),d=t[s];for(const f of d)e?a.delete(f):a.add(f);h.get(o)||h.set(o,new Set);const u=h.get(o);for(const f of d)u.add(f)}for(const[s,n]of i){this.culler.setVisibility(e,s,n);for(const[r]of n){const o=this._loadedFragments[s];if(!o)continue;const a=o[r];if(a)for(const l of a){const h=t[l.id];h&&l.setVisibility(e,h)}}}this.culler.needsUpdate=!0}async clearCache(){await this.fileDB.clear()}async setStatic(e,t,i){const s={};for(const n of e){const r=this.fragIDData.get(n);if(!r){console.log(`Item not found: ${n}.`);continue}const[o,a]=r,l=o.uuid;s[l]||(s[l]=new Set),s[l].add(a)}if(t){const n={};for(const r in s){const o=new Map;o.set(1,s[r]),n[r]=o}await this.loadFoundGeometries(n,!1),await this.culler.addStaticGeometries(s,i)}else this.culler.removeStaticGeometries(s,i)}async loadFoundGeometries(e,t=!0){this.cancel=!1;const i={};for(const s in e){const n=new Set;for(const[,r]of e[s])for(const o of r)n.add(o);i[s]=n}for(const s in e){if(this._isDisposing)return;if(this.cancel){this.cancelLoading(i);return}const n=this.components.get(ue).groups.get(s);if(!n)return;const{geometries:r}=this.models[s],o=new Map,a=new Set;for(const[u,f]of e[s])for(const m of f){if(this.cancel){this.cancelLoading(i);return}a.add(m);const p=r[m];if(!p)throw new Error("Geometry not found");if(p.geometryFile){const I=p.geometryFile,E=o.get(I)||0;o.set(I,E+u)}}const l=Array.from(o).sort((u,f)=>f[1]-u[1]);for(const[u]of l){if(!this._ramCache.has(u)){let p=new Uint8Array;if(this.useCache){const E=await this.fileDB.get(u);if(E){const g=await E.arrayBuffer();p=new Uint8Array(g)}else{const g=await(await this.fetch(u)).arrayBuffer();p=new Uint8Array(g),await this.fileDB.add(u,p)}}else{const E=await(await this.fetch(u)).arrayBuffer();p=new Uint8Array(E)}const I=this.serializer.import(p);this._ramCache.set(u,{data:I,time:performance.now()})}const f=this._ramCache.get(u);if(!f)continue;f.time=performance.now();const m=[];if(f)for(const[p,{position:I,index:E,normal:g}]of f.data){if(this._isDisposing)return;if(this.cancel){this.cancelLoading(i);return}if(i[s].delete(p),!a.has(p)||!this._geometryInstances[s]||!this._geometryInstances[s].has(p))continue;const v=this._geometryInstances[s].get(p);if(!v)throw new Error("Instances not found!");const C=new Ce,w=new Je(I,3),O=new Je(g,3);C.setAttribute("position",w),C.setAttribute("normal",O),C.setIndex(Array.from(E));const y=[],L=[];for(const N of v)N.color[3]===1?L.push(N):y.push(N);this.newFragment(n,p,C,y,!0,m,t),this.newFragment(n,p,C,L,!1,m,t)}m.length&&!this._isDisposing&&this.onFragmentsLoaded.trigger(m)}const h=new Set,d=performance.now();for(const[u,{time:f}]of this._ramCache)d-f>this.maxRamTime&&h.add(u);for(const u of h)this._ramCache.delete(u)}}async unloadLostGeometries(e){if(this._isDisposing)return;const t=[],i=this.components.get(ue);for(const s in e){const n=i.groups.get(s);if(!n)throw new Error("Fragment group not found!");if(!this._loadedFragments[s])continue;const r=this._loadedFragments[s],o=e[s];for(const a of o){if(this.culler.removeFragment(n.uuid,a),!r[a])continue;const l=r[a];for(const h of l)n.items.splice(n.items.indexOf(h),1),t.push(h);delete r[a]}}t.length&&this.onFragmentsDeleted.trigger(t);for(const s of t)i.list.delete(s.id),this.world.meshes.delete(s.mesh),s.mesh.material=[],s.dispose(!0)}setMeshVisibility(e,t){for(const i in e)for(const s of e[i]){const n=this._loadedFragments[i];if(!n)continue;const r=n[s];if(r)for(const o of r)o.mesh.visible=t}}newFragment(e,t,i,s,n,r,o){if(s.length===0||this._isDisposing)return;const a=e.geometryIDs,l=n?a.transparent:a.opaque,h=t*(n?-1:1),d=l.get(h);if(d===void 0)return;const u=e.keyFragments.get(d);if(u===void 0)return;const f=this.components.get(ue);if(f.list.has(u))return;const m=n?this._baseMaterialT:this._baseMaterial,p=new vn(i,m,s.length);p.mesh.visible=o,p.id=u,p.mesh.uuid=u,p.group=e,e.add(p.mesh),e.items.push(p),f.list.set(p.id,p),this.world.meshes.add(p.mesh),this._loadedFragments[e.uuid]||(this._loadedFragments[e.uuid]={});const I=this._loadedFragments[e.uuid];I[t]||(I[t]=[]),I[t].push(p);const E=new Map;for(let w=0;w{var i;const s=this.components.get(ue);for(const n in t){const r=s.list.get(n);if(!r)continue;const o=(i=r.group)==null?void 0:i.uuid;if(o)for(const a in this.selection){if(a===this.config.selectName||a===this.config.hoverName)continue;const l=this.selection[a][n];if(l){a in this._colorsBeforeSelect||(this._colorsBeforeSelect[a]={}),o in this._colorsBeforeSelect[a]||(this._colorsBeforeSelect[a]={[o]:new Set});for(const h of l)this._colorsBeforeSelect[a][o].add(h)}}}}),F(this,"restoreHighlightersAfterDeselect",()=>{const t=this.components.get(ue);for(const i in this._colorsBeforeSelect){let s={};const n=this._colorsBeforeSelect[i];for(const r in n){const o=t.groups.get(r);if(!o)continue;const a=o.getFragmentMap(n[r]);s={...s,...a}}this.highlightByID(i,s,!1,!1)}this._colorsBeforeSelect={}}),F(this,"clearHover",()=>{this.selection[this.config.hoverName]={}}),F(this,"onMouseDown",t=>{this.enabled&&(this.mouseDownPosition={x:t.clientX,y:t.clientY},this._mouseState.down=!0)}),F(this,"onMouseUp",async t=>{if(!this.enabled)return;const{world:i,autoHighlightOnClick:s,selectEnabled:n}=this.config;if(!i)throw new Error("No world found!");if(!i.renderer)throw new Error("This world doesn't have a renderer!");if(t.target===i.renderer.three.domElement){if(this._mouseState.down=!1,this._mouseState.moved||t.button!==0){this._mouseState.moved=!1;return}if(this._mouseState.moved=!1,s&&n){const r=this.multiple==="none"?!0:!t[this.multiple];await this.highlight(this.config.selectName,r,this.zoomToSelection)}}}),F(this,"onMouseMove",async t=>{if(!this.enabled)return;const i=t.clientX-this.mouseDownPosition.x,s=t.clientY-this.mouseDownPosition.y,n=Math.sqrt(i*i+s*s),{hoverName:r,hoverEnabled:o}=this.config;if(this._mouseState.moved){this.clear(r);return}if(n>this.mouseMoveThreshold){this._mouseState.moved=this._mouseState.down;const a={};for(const l in this.selection){if(l===r)continue;const h=this.selection[l];for(const d in h){d in a||(a[d]=new Set);const u=h[d];for(const f of u)a[d].add(f)}}o&&await this.highlight(this.config.hoverName,!0,!1,a)}}),this.components.add(Wr.uuid,this)}async dispose(){this.setupEvents(!1),this._fills.dispose(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.selection={};for(const e in this.events)this.events[e].onClear.reset(),this.events[e].onHighlight.reset();this.onSetup.reset(),this.events={},this.onDisposed.trigger(Wr.uuid),this.onDisposed.reset()}add(e,t){if(this.selection[e]||this.colors.has(e))throw new Error("A selection with that name already exists!");this.colors.set(e,t),this.selection[e]={},this.events[e]={onHighlight:new Y,onClear:new Y}}async highlight(e,t=!0,i=this.zoomToSelection,s={}){if(!this.enabled)return null;if(!this.config.world)throw new Error("No world found in config!");const n=this.config.world;if(!this.selection[e])throw new Error(`Selection ${e} does not exist.`);const r=[],o=this.components.get(ue).meshes;for(const I of o)r.push(I);const a=this.components.get(Wi);for(const I of a.list){const E=I;if(E.edges){const g=E.edges.fillMeshes;for(const v of g)r.push(v)}}const l=this.components.get(ut).get(n).castRay(r);if(!l||!l.face)return this.clear(e),null;const h=l.object;if(!h.fragment&&h.userData.indexFragmentMap){if(l.faceIndex===void 0||!h.geometry.index)return null;const{userData:I}=h,E=I.indexFragmentMap.get(l.faceIndex);if(E){await this.highlightByID(e,E,t,i,s,h,!0);const g=Object.keys(E)[0];return{id:Array.from(E[g])[0],fragments:E}}return null}const d=h.geometry,u=l.instanceId;if(!d||u===void 0)return null;const f=h.fragment.getItemID(u);if(f===null)throw new Error("Item ID not found!");const m=h.fragment.group;if(!m)throw new Error("Fragment must belong to a FragmentsGroup!");const p=m.getFragmentMap([f]);return await this.highlightByID(e,p,t,i,s,void 0,!0),{id:f,fragments:p}}async highlightByID(e,t,i=!0,s=this.zoomToSelection,n={},r=void 0,o=!1){if(!this.enabled)return;i&&this.clear(e);const a=this.components.get(ue),l=this.colors.get(e);if(!l)throw new Error("Color for selection not found!");const h={};for(const d in t){const u=t[d],f=n[d];for(const m of u)if(!(f&&f.has(m))){if(this.selectable[e]){const p=this.selectable[e];if(!p[d]||!p[d].has(m))continue}h[d]||(h[d]=new Set),h[d].add(m)}}for(const d in h){this.selection[e][d]||(this.selection[e][d]=new Set);const u=h[d],f=new Set,m=new Set;for(const I of u){const E=this.selection[e][d];o&&this.autoToggle.has(e)&&E.has(I)?(f.add(I),E.delete(I)):(E.add(I),m.add(I))}const p=a.list.get(d);if(p&&(f.size&&(this.backupColor?p.setColor(this.backupColor,f):p.resetColor(f)),m.size&&p.setColor(l,m),p.mesh.userData.fills))for(const I of p.mesh.userData.fills)this._fills.highlight(e,I,l,t)}this.events[e].onHighlight.trigger(this.selection[e]),r&&this._fills.highlight(e,r,l,t),s&&await this.zoomSelection(e)}clear(e){const t=e?[e]:Object.keys(this.selection);for(const i of t){this._fills.clear(i);const s=this.components.get(ue),n=this.selection[i];for(const r in this.selection[i]){const o=s.list.get(r);if(!o)continue;const a=n[r];a&&(this.backupColor?o.setColor(this.backupColor,a):o.resetColor(a))}this.events[i].onClear.trigger(null),this.selection[i]={}}}setup(e){this.config={...this.config,...e},this.add(this.config.selectName,this.config.selectionColor),this.autoToggle.add(this.config.selectName),this.add(this.config.hoverName,this.config.hoverColor),this.setupEvents(!0),this.enabled=!0,this.isSetup=!0,this.onSetup.trigger(this)}updateFragments(e){for(const t of e)for(const i in this.selection){const s=this.selection[i][t.id],n=this.colors.get(i);s&&n&&t.setColor(n,s)}}async zoomSelection(e){if(!this.config.world)throw new Error("No world found in config!");const t=this.config.world;if(!t.camera.hasCameraControls())return;const i=this.components.get(On),s=this.components.get(ue);i.reset();const n=this.selection[e];if(!Object.keys(n).length)return;for(const p in n){const I=s.list.get(p);if(!I)continue;const E=n[p];i.addMesh(I.mesh,E)}const r=i.getSphere(),o=1/0,a=-1/0,{x:l,y:h,z:d}=r.center,u=r.radius===o||l===o||h===o||d===o,f=r.radius===a||l===a||h===a||d===a,m=r.radius===0;u||f||m||(r.radius*=this.zoomFactor,await t.camera.controls.fitToSphere(r,!0))}setupEvents(e){if(!this.config.world){console.log("No world found while setting up events!");return}if(this.config.world.isDisposing)return;if(!this.config.world.renderer)throw new Error("The given world doesn't have a renderer!");const t=this.config.world.renderer.three.domElement,i=this.events[this.config.selectName].onHighlight;i.remove(this.clearHover),i.remove(this.saveHighlightersBeforeSelect);const s=this.events[this.config.selectName].onClear;s.remove(this.restoreHighlightersAfterDeselect),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("pointermove",this.onMouseMove),e&&(i.add(this.clearHover),i.add(this.saveHighlightersBeforeSelect),s.add(this.restoreHighlightersAfterDeselect),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("pointermove",this.onMouseMove))}};F(Pc,"uuid","cb8a76f2-654a-4b50-80c6-66fd83cafd77");let mm=Pc;class im extends de{constructor(){super(...arguments),F(this,"onDisposed",new Y),F(this,"world")}get enabled(){return!this.world||this.world.isDisposing?!1:this.getRenderer().postproduction.customEffects.outlineEnabled}set enabled(e){if(!this.world||this.world.isDisposing)return;const t=this.getRenderer();t.postproduction.customEffects.outlineEnabled=e}create(e,t){const i=this.getRenderer();if(i.postproduction.customEffects.outlinedMeshes[e]!==void 0)throw new Error(`There's already a style with the name ${e}.`);i.postproduction.customEffects.outlinedMeshes[e]={material:t,meshes:new Set}}add(e,t){const i=this.getRenderer(),s=this.getStyles()[e];if(!s)throw new Error(`The style ${e} does not exist`);const n=i.postproduction.customEffects.outlineScene,r=this.components.get(ue);for(const o in t){const a=r.list.get(o);if(!a)continue;const l=t[o],h=a.clone(l);h.mesh.position.set(0,0,0),h.mesh.rotation.set(0,0,0),h.mesh.applyMatrix4(a.mesh.matrixWorld),h.mesh.instanceColor=null,h.mesh.material=[s.material],s.meshes.add(h.mesh),n.add(h.mesh)}}clear(e){if(e){this.clearStyle(e,!1);return}const t=this.getStyles(),i=Object.keys(t);for(const s of i)this.clearStyle(s,!1);this.world=void 0}dispose(){if(this.world&&!this.world.isDisposing){const e=this.getStyles(),t=Object.keys(e);for(const i of t)this.clearStyle(i,!0)}this.onDisposed.trigger(),this.onDisposed.reset()}clearStyle(e,t){const i=this.getStyles(),s=i[e];if(!s)return;const n=this.components.get(Nt);for(const r of s.meshes){const o=r;o.fragment&&o.fragment.dispose(!1),n.destroy(r)}s.meshes.clear(),t&&(s.material.dispose(),delete i[e])}getStyles(){return this.getRenderer().postproduction.customEffects.outlinedMeshes}getRenderer(){if(!this.world)throw new Error("You must set a world to use the outliner!");const e=this.world.renderer;if(!e.postproduction)throw new Error("The world given to the outliner must use the postproduction renderer.");return e}}F(im,"uuid","2fd3bcc5-b3b6-4ded-9f64-f47a02854a10");class Dt extends de{constructor(){super(...arguments),F(this,"enabled",!1),F(this,"onDisposed",new Y),F(this,"onNavigated",new Y),F(this,"onExited",new Y),F(this,"planeType","section"),F(this,"offset",100),F(this,"list",new Map),F(this,"world"),F(this,"current",null),F(this,"cached3DCamera",{position:new P,target:new P,projection:"Perspective",zoom:1,top:10,bottom:-10,right:10,left:-10})}create(e){const t=this.getWorld(),{id:i,point:s,normal:n,type:r}=e;let{name:o,offset:a}=e;const l=this.components.get(Wi),h=l.Type;l.Type=bn;const d=l.createFromNormalAndCoplanarPoint(t,n,s);d.visible=!1,d.edges.visible=!1,d.enabled=!1,o=o||i,a=a||this.offset,d.type=r||this.planeType,d.updateFill();const u=n.clone().multiplyScalar(-a).add(s),f=s.clone(),m={id:i,name:o,plane:d,offset:a,cached:{position:u,target:f,zoom:1,size:10}};return this.list.set(i,m),l.Type=h,m}delete(e){const t=this.list.get(e);t&&(t.plane.dispose(),this.list.delete(e))}async goTo(e,t=!1){var i;const s=this.getCamera();if(((i=this.current)==null?void 0:i.id)===e)return;const n=this.list.get(e);if(!n)throw new Error(`There's no section with the ID: ${e}.`);this.cacheCameraPosition(),await this.hidePreviousClippingPlane(),await s.projection.set("Orthographic"),this.current=n;const r=new P,o=new P,{cached:a}=n,{position:l,target:h}=a;r.copy(h),o.copy(l),await s.controls.setLookAt(o.x,o.y,o.z,r.x,r.y,r.z,t);const d=n.cached.size,u=s.threePersp.aspect;s.threeOrtho.top=d,s.threeOrtho.bottom=-d,s.threeOrtho.left=-d*u,s.threeOrtho.right=d*u,s.threeOrtho.updateProjectionMatrix(),await s.controls.zoomTo(a.zoom,!1),s.set("Plan"),this.current.plane&&(this.current.plane.enabled=!0,this.current.plane.edges.fillNeedsUpdate=!0,this.current.plane.edges.visible=!0),this.enabled=!0,this.onNavigated.trigger({id:e})}async exit(e=!1){if(!this.enabled||!this.world)return;this.cacheCameraPosition();const t=this.getCamera();t.set("Orbit");const{position:i,target:s,projection:n}=this.cached3DCamera;await t.projection.set(n),this.current&&(this.current.plane.enabled=!1,this.current.plane.edges.enabled=!1,this.current.plane.edges.visible=!1),this.current=null;const{x:r,y:o,z:a}=i,{x:l,y:h,z:d}=s;await t.controls.setLookAt(r,o,a,l,h,d,e),t.projection.current==="Orthographic"&&(await t.controls.zoomTo(this.cached3DCamera.zoom,!1),t.threeOrtho.left=this.cached3DCamera.left,t.threeOrtho.right=this.cached3DCamera.right,t.threeOrtho.top=this.cached3DCamera.top,t.threeOrtho.bottom=this.cached3DCamera.bottom),this.enabled=!1,this.onExited.trigger()}dispose(){for(const[,{plane:e}]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}getWorld(){if(!this.world)throw new Error("World is needed to create sections!");return this.world}getCamera(){const e=this.getWorld().camera;if(!e.hasCameraControls()||!e.projection)throw new Error("The world given to sections must have an OrthoPerspective camera.");return e}cacheCameraPosition(){if(!this.world)throw new Error("World is needed to create clipping planes!");const e=this.getCamera();if(this.enabled){if(!this.current)throw new Error("Current section not found!");const{cached:t}=this.current,{position:i,target:s}=t;e.controls.getPosition(i),e.controls.getTarget(s),t.zoom=e.threeOrtho.zoom,t.size=e.threeOrtho.top}else{e.three.getWorldPosition(this.cached3DCamera.position),e.controls.getTarget(this.cached3DCamera.target),this.cached3DCamera.projection=e.projection.current,this.cached3DCamera.zoom=e.threeOrtho.zoom;const{top:t,bottom:i,left:s,right:n}=e.threeOrtho;this.cached3DCamera.top=t,this.cached3DCamera.bottom=i,this.cached3DCamera.left=s,this.cached3DCamera.right=n}}async hidePreviousClippingPlane(){if(this.current){const e=this.current.plane;e&&(e.enabled=!1),this.current.plane.edges.visible=!1}}}F(Dt,"uuid","45b41ba3-7bb8-4e08-909f-e0fa87973965");const Mc=class Dc extends de{constructor(e){super(e),F(this,"onDisposed",new Y),F(this,"planeType","floorplan"),F(this,"onNavigated",new Y),F(this,"onExited",new Y),F(this,"enabled",!1),F(this,"currentPlan",null),F(this,"offset",1.5),F(this,"list",[]),F(this,"_cachedPlanCamera",null),this.components.add(Dc.uuid,this)}get world(){return this.components.get(Dt).world}set world(e){const t=this.components.get(Dt);t.world=e}get defaultCameraOffset(){return this.components.get(Dt).offset}set defaultCameraOffset(e){const t=this.components.get(Dt);t.offset=e}dispose(){this.onExited.reset(),this.onNavigated.reset();const e=this.components.get(Dt);for(const t of this.list)e.delete(t.id);this.list=[],this.onDisposed.trigger(),this.onDisposed.reset()}async generate(e){if(!e.hasProperties)throw new Error("Properties are needed to compute plan views!");const t=await e.getAllPropertiesOfType(Mn);if(!t)throw new Error("Floorplans not found!");const i=e.coordinationMatrix.elements[13],s=await fi.getUnits(e);for(const n of Object.values(t)){const r={value:0};this.getAbsoluteFloorHeight(n.ObjectPlacement,r);const o=r.value*s+i+this.offset;this.create({name:n.Name.value,id:n.GlobalId.value,normal:new P(0,-1,0),point:new P(0,o,0)})}}create(e){const t=this.components.get(Dt);e.type=e.type||this.planeType;const i={...t.create(e),planOffset:this.offset};this.list.push(i)}async goTo(e,t=!1){this.enabled&&this.cachePlanCamera(),await this.components.get(Dt).goTo(e,t),await this.applyCachedPlanCamera();const i=this.list.find(s=>s.id===e);i&&(this.currentPlan=i),this.enabled=!0}async exitPlanView(e=!1){this.enabled&&(this.cachePlanCamera(),await this.components.get(Dt).exit(e),this.currentPlan=null,this.enabled=!1,this.onExited.trigger())}cachePlanCamera(){var e;const t=(e=this.world)==null?void 0:e.camera,i=new P,s=new P;t.controls.getTarget(i),t.controls.getPosition(s),this._cachedPlanCamera={target:i,position:s,zoom:t.threeOrtho.zoom,top:t.threeOrtho.top,right:t.threeOrtho.right,bottom:t.threeOrtho.bottom,left:t.threeOrtho.left}}async applyCachedPlanCamera(){var e;if(!this._cachedPlanCamera)return;const t=(e=this.world)==null?void 0:e.camera,{position:i,target:s}=this._cachedPlanCamera,n=new P,r=new P;t.controls.getPosition(n),t.controls.getTarget(r);const o=n.y,a=r.y;await t.controls.setLookAt(i.x,o,i.z,s.x,a,s.z),await t.controls.zoomTo(this._cachedPlanCamera.zoom),t.threeOrtho.top=this._cachedPlanCamera.top,t.threeOrtho.bottom=this._cachedPlanCamera.bottom,t.threeOrtho.left=this._cachedPlanCamera.left,t.threeOrtho.right=this._cachedPlanCamera.right,t.threeOrtho.updateProjectionMatrix()}getAbsoluteFloorHeight(e,t){const i=e.RelativePlacement.Location.Coordinates;t.value+=i[2].value,e.PlacementRelTo&&this.getAbsoluteFloorHeight(e.PlacementRelTo,t)}};F(Mc,"uuid","a80874aa-1c93-43a4-80f2-df346da086b1");let Im=Mc;export{dn as A,ap as G,ai as L,Dt as O,im as V,dm as a,kr as b,fm as c,mm as d,nm as e,bn as f,rm as g,pm as h,am as i,um as l,lm as n,hm as o,cm as r,om as s,Is as t,Im as u}; + `}}createShadow(e,t,i){return this.list[e]={root:new yn,world:i,rt:new Ot(this.resolution,this.resolution),rtBlur:new Ot(this.resolution,this.resolution),blurPlane:new ee,camera:this.createCamera(t)},this.list[e]}createCamera(e){return new ii(-e.x/2,e.x/2,e.z/2,-e.z/2,0,this.cameraHeight)}getSizeCenterMin(e){const t=e[0].parent,i=new yn;i.children=e;const s=new ye().setFromObject(i);t==null||t.add(...e);const n=new x;s.getSize(n),n.x*=this.shadowExtraScaleFactor,n.z*=this.shadowExtraScaleFactor;const r=new x;s.getCenter(r);const o=s.min;return{size:n,center:r,min:o}}blurShadow(e,t){if(!e.world.renderer)throw new Error("The given world must have a renderer!");const i=new He(qp);i.depthTest=!1;const s=new He(Jp);s.depthTest=!1,e.blurPlane.visible=!0,e.blurPlane.material=i,e.blurPlane.material.uniforms.tDiffuse.value=e.rt.texture,i.uniforms.h.value=t*1/256;const n=e.world.renderer.three;n.setRenderTarget(e.rtBlur),n.render(e.blurPlane,e.camera),e.blurPlane.material=s,e.blurPlane.material.uniforms.tDiffuse.value=e.rtBlur.texture,s.uniforms.v.value=t*1/256,n.setRenderTarget(e.rt),n.render(e.blurPlane,e.camera),e.blurPlane.visible=!1}};y(dc,"uuid","f833a09a-a3ab-4c58-b03e-da5298c7a1b6");let lm=dc;const $p=class uc extends de{constructor(e){super(e),y(this,"enabled",!0),y(this,"inputs",["OBC","BUI"]),y(this,"_requestEventID","thatOpenCompanyComponentRequested"),y(this,"_createEventID","thatOpenCompanyComponentCreated"),e.add(uc.uuid,this)}async import(e){return new Promise(t=>{const i=document.createElement("script"),s=` + function main() { + const { ${this.inputs} } = window.ThatOpenCompany; + + ${e} + + const onComponentRequested = () => { + window.removeEventListener("${this._requestEventID}", onComponentRequested); + const event = new CustomEvent("${this._createEventID}", { detail: main }); + window.dispatchEvent(event); + }; + + window.addEventListener("${this._requestEventID}", onComponentRequested); + } + + main(); + `,n=r=>{window.removeEventListener(this._createEventID,n);const o=r.detail,a=this.components.get(o);i.remove(),t(a)};i.addEventListener("load",()=>{window.addEventListener(this._createEventID,n),window.dispatchEvent(new Event(this._requestEventID))}),i.src=URL.createObjectURL(new File([s],"temp.js")),document.head.appendChild(i)})}};y($p,"uuid","74c0c370-1af8-4ca9-900a-4a4196c0f2f5");const em=["Station","Radius","Length","InitialKP","FinalKP","KP","Slope","Height","InitialKPV","FinalKPV"],fc=class pc extends de{constructor(e){super(e),y(this,"enabled",!0),y(this,"world",null),y(this,"_markerKey",0),y(this,"_list",new Map),y(this,"type","horizontal"),y(this,"divisionLength",100),e.add(pc.uuid,this)}addKPStation(e,t,i){const s=this.components.get(ai),n=document.createElement("div"),r=document.createElement("div");n.appendChild(r),r.innerHTML=t,r.style.color=s.color,r.style.borderBottom="1px dotted white",r.style.width="160px",r.style.textAlign="left";const o=new qe(e,n),a=new x;a.x=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-1),a.y=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-1),a.z=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-1);const l=new x;l.x=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-2),l.y=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-2),l.z=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-2);const h=new x;h.x=(a.x+l.x)/2,h.y=(a.y+l.y)/2,h.z=(a.z+l.z)/2,o.three.position.copy(h);const d=new x;d.subVectors(a,l).normalize();const u=new at;u.setFromUnitVectors(new x(0,1,0),d);const f=new La().setFromQuaternion(u).z,m=Ii.radToDeg(f);r.style.transform=`rotate(${-m-90}deg) translate(-35%, -50%)`;const p=this._markerKey.toString();s.setupEvents(e,!0),s.getWorldMarkerList(e).set(p,{label:o,key:p,merged:!1,static:!1}),this._markerKey++,this.save(p,"KP")}addVerticalMarker(e,t,i,s,n){const r=this.components.get(ai),o=document.createElement("span");o.innerHTML=t,o.style.color=r.color;const a=new qe(e,o,n);if(s==="Height"){const h=document.createElement("span");h.innerHTML=t,h.style.color=r.color;const{position:d}=i.geometry.attributes,u=(d.array.length/3-1)*3,f=d.array.slice(u,u+3);a.three.position.set(f[0],f[1]+10,f[2])}else if(s==="InitialKPV"){const{position:h}=i.geometry.attributes,d=h.getX(0),u=h.getY(0),f=h.getZ(0);a.three.position.set(d-20,u,f)}else if(s==="FinalKPV"){const{position:h}=i.geometry.attributes,d=h.getX(i.geometry.attributes.position.count-1),u=h.getY(i.geometry.attributes.position.count-1),f=h.getZ(i.geometry.attributes.position.count-1);a.three.position.set(d+20,u,f)}else if(s==="Slope"){o.style.color="grey";const{position:h}=i.geometry.attributes,d=new x;d.x=h.getX(0),d.y=h.getY(0),d.z=h.getZ(0);const u=new x;u.x=h.getX(h.count-1),u.y=h.getY(h.count-1),u.z=h.getZ(h.count-1);const f=new x;f.addVectors(d,u).multiplyScalar(.5),a.three.position.set(f.x,f.y-10,f.z)}const l=this._markerKey.toString();return r.setupEvents(e,!0),r.getWorldMarkerList(e).set(l,{label:a,key:l,type:s,merged:!1,static:!1}),this._markerKey++,this.save(l,s),a}addCivilMarker(e,t,i,s){const n=this.components.get(ai),r=document.createElement("span");r.innerHTML=t,r.style.color=n.color;const o=new qe(e,r);if(s==="InitialKP"){const l=i.geometry.attributes.position.getX(0),h=i.geometry.attributes.position.getY(0),d=i.geometry.attributes.position.getZ(0);o.three.position.set(l+2,h+2,d)}else if(s==="FinalKP"){const l=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-1),h=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-1),d=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-1);o.three.position.set(l+2,h-2,d)}else if(s==="Length"){const l=new x;l.x=i.geometry.attributes.position.getX(0),l.y=i.geometry.attributes.position.getY(0),l.z=i.geometry.attributes.position.getZ(0);const h=new x;h.x=i.geometry.attributes.position.getX(i.geometry.attributes.position.count-1),h.y=i.geometry.attributes.position.getY(i.geometry.attributes.position.count-1),h.z=i.geometry.attributes.position.getZ(i.geometry.attributes.position.count-1);const d=l.distanceTo(h);o.three.element.innerText=d.toFixed(2);const u=h.clone().add(l).divideScalar(2);o.three.position.copy(u)}const a=this._markerKey.toString();return n.setupEvents(e,!0),n.getWorldMarkerList(e).set(a,{label:o,key:a,type:s,merged:!1,static:!1}),this._markerKey++,this.save(a,s),o}showKPStations(e){if(!this.world)throw new Error("A world is needed for this component to work!");if(this.type==="horizontal"){const t=this.generateStartAndEndKP(e);for(const[,s]of t)this.addKPStation(this.world,s.value,s.normal);const i=this.generateConstantKP(e);for(const[,s]of i)this.addKPStation(this.world,s.value,s.normal)}}showCurveLength(e,t){if(!this.world)throw new Error("A world is needed for this component to work!");const i=this.components.get(ai),s=e.length,n=`${t.toFixed(2)} m`,r=Math.round(s/2),o=e[r],a=i.create(this.world,n,o,!0);a!==void 0&&this.save(a,"Radius")}showLineLength(e,t){if(!this.world)throw new Error("A world is needed for this component to work!");const i=this.components.get(ai),s=new x;s.x=e.geometry.getAttribute("position").getX(0),s.y=e.geometry.getAttribute("position").getY(0),s.z=e.geometry.getAttribute("position").getZ(0);const n=new x;n.x=e.geometry.getAttribute("position").getX(1),n.y=e.geometry.getAttribute("position").getY(1),n.z=e.geometry.getAttribute("position").getZ(1);const r=`${t.toFixed(2)} m`,o=new x;o.addVectors(s,n).multiplyScalar(.5);const a=i.create(this.world,r,o,!0);a!==void 0&&this.save(a,"Radius")}showCurveRadius(e,t){if(!this.world)throw new Error("A world is needed for this component to work!");const i=this.components.get(ai),s=new x;s.x=e.geometry.getAttribute("position").getX(0),s.y=e.geometry.getAttribute("position").getY(0),s.z=e.geometry.getAttribute("position").getZ(0);const n=new x;n.x=e.geometry.getAttribute("position").getX(1),n.y=e.geometry.getAttribute("position").getY(1),n.z=e.geometry.getAttribute("position").getZ(1);const r=`R = ${t.toFixed(2)} m`,o=new x;o.addVectors(s,n).multiplyScalar(.5);const a=i.create(this.world,r,o,!0);a!==void 0&&this.save(a,"Radius")}deleteByType(e=em){const t=this.components.get(ai);for(const i of e){const s=this._list.get(i);if(s){for(const n of s)t.delete(n);this._list.delete(i)}}}generateStartAndEndKP(e){const{alignment:t}=e.curve,i=new Map;for(const s of t.horizontal){const n=s.getLength();if(i.size>0){const r=s.index-1,o=i.get(r).distance+n,a=s.mesh.geometry.getAttribute("position"),l=a.count-1,h=new x;h.x=a.getX(l),h.y=a.getY(l),h.z=a.getZ(l);const d=this.createNormalLine(s.mesh);i.set(s.index,{value:this.getShortendKPValue(o),distance:o,point:h,normal:d})}else{const r=s.mesh.geometry.getAttribute("position"),o=r.count-1,a=new x;a.x=r.getX(o),a.y=r.getY(o),a.z=r.getZ(o);const l=this.createNormalLine(s.mesh);i.set(s.index,{value:this.getShortendKPValue(n),distance:n,point:a,normal:l})}}return i}createNormalLine(e){const t=e.geometry.attributes.position.count-1,i=t-1,s=new x;s.x=e.geometry.attributes.position.getX(t),s.y=e.geometry.attributes.position.getY(t),s.z=e.geometry.attributes.position.getZ(t);const n=new x;n.x=e.geometry.attributes.position.getX(i),n.y=e.geometry.attributes.position.getY(i),n.z=e.geometry.attributes.position.getZ(i);const r=new x().subVectors(s,n).clone().applyAxisAngle(new x(0,0,1),Math.PI*.5).normalize(),o=new Ce().setFromPoints([r.clone().setLength(10).add(s),r.clone().setLength(-10).add(s)]);return new Le(o)}generateConstantKP(e){const{alignment:t}=e.curve,i=new Map,s=t.getLength("horizontal"),n=Math.floor(s/this.divisionLength);for(let r=0;r1e3&&parseInt(i,10)<1e4){const[r,...o]=i;return`${r}+${o.join("")}.${n}`}if(parseInt(i,10)>1e4){const[r,o,...a]=i;return`${r}${o}+${a.join("")}.${n}`}return`0+${i.padStart(3,"0")}.${n}`}save(e,t){this._list.has(t)||this._list.set(t,new Set),this._list.get(t).add(e)}};y(fc,"uuid","0af12c32-81ee-4100-a030-e9ae546f6170");let Ss=fc;class mc extends de{constructor(e){super(e),y(this,"onHighlight",new Y),y(this,"onMarkerChange",new Y),y(this,"onMarkerHidden",new Y),y(this,"onDisposed",new Y),y(this,"enabled",!0),y(this,"mouseMarkers"),y(this,"_curves",[]),y(this,"_previousAlignment",null),y(this,"_highlighter"),y(this,"_world",null),y(this,"updateLinesResolution",t=>{var i;(i=this._highlighter)==null||i.setResolution(t)}),y(this,"onMouseMove",t=>{var i,s,n;if(!this._world)throw new Error("No world was given for this navigator!");if(!this._world.renderer)return;const r=this._world.renderer.three.domElement.parentElement,o=this._world.camera.three,a=(i=this._highlighter)==null?void 0:i.castRay(t,o,r,this._curves);if(a){const{object:l}=a;(s=this._highlighter)==null||s.hover(l),this.updateMarker(a,"hover");return}this.mouseMarkers&&(this.mouseMarkers.hover.visible=!1),(n=this._highlighter)==null||n.unHover(),this.onMarkerHidden.trigger({type:"hover"})}),y(this,"onClick",t=>{var i,s;if(!this._world)throw new Error("No world was given for this navigator!");if(!this._world.renderer)return;const n=this._world.renderer.three.domElement.parentElement,r=this._world.camera.three,o=(i=this._highlighter)==null?void 0:i.castRay(t,r,n,this._curves);if(o){const a=o,l=a.object;if((s=this._highlighter)==null||s.select(l),this.updateMarker(a,"select"),this._world.camera.hasCameraControls()&&(l.geometry.boundingBox||l.geometry.computeBoundingBox(),l.geometry.boundingBox)){const h=this.getScaledBox(l.geometry.boundingBox,2);this._world.camera.controls.fitToBox(h,!0)}this.onHighlight.trigger({mesh:l,point:a.point}),this._previousAlignment!==l.curve.alignment&&(this.components.get(Ss).showKPStations(l),this._previousAlignment=l.curve.alignment)}}),y(this,"onControlsUpdated",()=>{if(!this._world)throw new Error("No world was given for this navigator!");if(!(this._world.camera.three instanceof ii)||!this._highlighter)return;const{zoom:t,left:i,right:s,top:n,bottom:r}=this._world.camera.three,o=i-s,a=n-r,l=Math.max(o,a)/t,h=40,{caster:d}=this._highlighter;d.params.Line.threshold=l/h})}get highlighter(){if(!this._highlighter)throw new Error("Highlighter not initialized. You must set a world first!");return this._highlighter}get world(){return this._world}set world(e){var t,i,s;if(e===this._world||(this._world&&this.setupEvents(!1),this._world=e,(t=this._highlighter)==null||t.dispose(),(i=this.mouseMarkers)==null||i.hover.dispose(),(s=this.mouseMarkers)==null||s.select.dispose(),!e))return;const n=e.scene.three;this._highlighter=new $l(n,this.view),this.mouseMarkers={select:this.newMouseMarker("#ffffff",e),hover:this.newMouseMarker("#575757",e)},this.setupEvents(!0)}async draw(e,t){if(!e.civilData)throw new Error("The provided model doesn't have civil data!");if(!this._world)throw new Error("No world was given for this navigator!");const{alignments:i}=e.civilData,s=t||i.values(),n=this._world.scene.three,r=new ye;r.makeEmpty(),r.min.set(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r.max.set(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(const a of s){if(!a)throw new Error("Alignment not found!");for(const l of a[this.view])if(n.add(l.mesh),this._curves.push(l.mesh),!r.isEmpty())r.expandByObject(l.mesh);else{l.mesh.geometry.computeBoundingBox();const h=l.mesh.geometry.boundingBox;h instanceof ye&&r.copy(h).applyMatrix4(l.mesh.matrixWorld)}}const o=this.getScaledBox(r,1.2);this._world.camera.hasCameraControls()&&await this._world.camera.controls.fitToBox(o,!1)}async dispose(){var e;(e=this._highlighter)==null||e.dispose(),this.clear(),this.onHighlight.reset(),this._curves=[],this.onDisposed.trigger(),this.onDisposed.reset()}clear(){var e,t;(e=this._highlighter)==null||e.unSelect(),(t=this._highlighter)==null||t.unHover();for(const i of this._curves)i.removeFromParent();this._curves=[]}setMarker(e,t,i){if(!this._curves.length)return;const s=e.getCurveAt(t,this.view),n=e.getPointAt(t,this.view),{index:r}=s.curve.getSegmentAt(s.percentage);this.setMouseMarker(n,s.curve.mesh,r,i)}setDefSegments(e){const t=[],i=[],s=(n,r)=>{const o=r[1]-n[1],a=r[0]-n[0];return o/a};for(let n=0;n=0;u--)if(r[u*3]!==void 0&&r[u*3+1]!==void 0){l=r[u*3],h=r[u*3+1];break}const d=(s([o,a],[l,h])*100).toFixed(2);i.push({slope:d})}for(const n of e)for(let r=0;rs.clone().add(i))}showLineInfo(e,t){const i=this.components.get(Ss);i.world=this._world,i.deleteByType(["Length","Radius"]);const s=e.geometry.attributes.position.array,n=this.calculateParallelCurve(s,s.length/3,t),r=new Ce().setFromPoints(n),o=new Le(r,this.markupMaterial);i.showLineLength(o,e.curve.getLength()),this._scene.add(o),this.markupLines.push(o);const{startDimensionPoints:a,endDimensionPoints:l}=this.calculateDimensionLines(e,o),h=this.offsetDimensionLine(a,t*.1),d=this.offsetDimensionLine(l,t*.1),u=new Ce().setFromPoints(h),f=new Ce().setFromPoints(d),m=new Le(u,this.markupMaterial);this._scene.add(m),this.markupLines.push(m);const p=new Le(f,this.markupMaterial);this._scene.add(p),this.markupLines.push(p)}showClothoidInfo(e,t){const i=this.components.get(Ss);i.world=this._world,i.deleteByType(["Length","Radius"]);const s=e.geometry.attributes.position.array,n=this.calculateParallelCurve(s,s.length/3,t),r=new Ce().setFromPoints(n);i.showCurveLength(n,e.curve.getLength());const o=new Le(r,this.markupMaterial);this._scene.add(o),this.markupLines.push(o);const{startDimensionPoints:a,endDimensionPoints:l}=this.calculateDimensionLines(e,o),h=this.offsetDimensionLine(a,t*.1),d=this.offsetDimensionLine(l,t*.1),u=new Ce().setFromPoints(h),f=new Ce().setFromPoints(d),m=new Le(u,this.markupMaterial);this._scene.add(m),this.markupLines.push(m);const p=new Le(f,this.markupMaterial);this._scene.add(p),this.markupLines.push(p)}showCircularArcInfo(e,t){const i=this.components.get(Ss);i.world=this._world,i.deleteByType(["Length","Radius"]);const s=e.curve.data.RADIUS,n=e.geometry.attributes.position.array,r=e.geometry.attributes.position.count,o=[],a=new x(n[0],n[1],n[2]),l=(r-1)*3,h=new x(n[l],n[l+1],n[l+2]),d=r/2*3,u=new x(n[d],n[d+1],n[d+2]),f=h.clone().sub(a).normalize(),m=new x(-f.y,f.x,0);m.multiplyScalar(s);const p=u.clone().add(m);o.push(u),o.push(p);const E=new Ce().setFromPoints(o),I=new Le(E,this.markupMaterial);i.showCurveRadius(I,Math.abs(s)),this._scene.add(I),this.markupLines.push(I);const g=[];for(let L=0;L{!this._highlighter||!this.planHighlighter||this.planHighlighter.showCurveInfo(t)})}get world(){return super.world}set world(e){var t;super.world=e,e&&((t=this.planHighlighter)==null||t.dispose(),this.planHighlighter=new tm(this.components,e.scene.three,e))}};y(Ic,"uuid","3096dea0-5bc2-41c7-abce-9089b6c9431b");let cm=Ic;const gc=class Cc extends mc{constructor(e){super(e),y(this,"enabled",!0),y(this,"view","vertical"),this.components.add(Cc.uuid,this)}get world(){return super.world}set world(e){this.world!==e&&(super.world=e,this._highlighter&&this._highlighter.onSelect.add(t=>{if(!this.world)throw new Error("A world is needed to work with this component!");const i=this.components.get(Ss);i.deleteByType(["Slope","Height","InitialKPV","FinalKPV"]);const{alignment:s}=t.curve,n=[];for(const l of s.vertical){const h=l.mesh.geometry.attributes.position.array;n.push(h)}const{defSegments:r,slope:o}=this.setDefSegments(n),a=this.world.scene.three;for(let l=0;l{var i;(i=this.highlighter)==null||i.setResolution(t)}),y(this,"onClick",t=>{if(!this.enabled||!this._highlighter)return;if(!this.world)throw new Error("No world found!");if(!this.world.renderer)return;const i=this.world.renderer.three.domElement,s=this.world.camera.three,n=this._highlighter.castRay(t,s,i,this._curves);if(n){const r=n.object;this._highlighter.select(r),this.updateMarker(n,"select");const{point:o,index:a}=n;a!==void 0&&this.onHighlight.trigger({curve:r,point:o,index:a});return}this._highlighter.unSelect(),this.mouseMarkers&&(this.mouseMarkers.hover.visible=!1),this.onMarkerHidden.trigger({type:"hover"})}),y(this,"onMouseMove",async t=>{if(!this.enabled||!this._highlighter)return;if(!this.world)throw new Error("No world found!");if(!this.world.renderer)return;const i=this.world.renderer.three.domElement,s=this.world.camera.three,n=this._highlighter.castRay(t,s,i,this._curves);if(n){this._highlighter.hover(n.object),this.updateMarker(n,"hover");return}this._highlighter.unHover()}),this.components.add(Rc.uuid,this)}get world(){return this._world}set world(e){var t,i,s;if(e===this._world||(this._world&&this.setupEvents(!1),this._world=e,(t=this._highlighter)==null||t.dispose(),(i=this.mouseMarkers)==null||i.hover.dispose(),(s=this.mouseMarkers)==null||s.select.dispose(),!e))return;const n=e.scene.three;this._highlighter=new $l(n,"absolute"),this.mouseMarkers={select:this.newMouseMarker("#ffffff",e),hover:this.newMouseMarker("#575757",e)},this.setupEvents(!0)}get highlighter(){if(!this._highlighter)throw new Error("Navigator not initialized!");return this._highlighter}draw(e){if(!e.civilData)throw new Error("Model must have civil data!");if(!this.world)throw new Error("A world must be given before drawing an alignment!");const t=this.world.scene.three;for(const[i,s]of e.civilData.alignments)for(const{mesh:n}of s.absolute)t.add(n),this._curves.push(n)}setMarker(e,t,i){if(!this.mouseMarkers)throw new Error("No mouse markers found! Initialize the world before using this.");const s=e.getPointAt(t,"absolute");this.mouseMarkers[i].visible=!0,this.mouseMarkers[i].three.position.copy(s)}hideMarker(e){if(!this.mouseMarkers)throw new Error("No mouse markers found! Initialize the world before using this.");const t=this.mouseMarkers[e].three;t.visible=!1}newMouseMarker(e,t){const i=t.scene.three,s=document.createElement("div");s.style.backgroundColor=e,s.style.width="1rem",s.style.height="1rem",s.style.borderRadius="1rem";const n=new qe(t,s,i);return n.visible=!1,n}setupEvents(e){var t,i;if(!this.world)throw new Error("No world found!");if(this.world.isDisposing||!this.world.renderer)return;const s=this.world.renderer.three.domElement;(t=this.world.renderer)==null||t.onResize.remove(this.updateLinesResolution),s.removeEventListener("click",this.onClick),s.removeEventListener("pointermove",this.onMouseMove),e&&(s.addEventListener("click",this.onClick),s.addEventListener("pointermove",this.onMouseMove),(i=this.world.renderer)==null||i.onResize.add(this.updateLinesResolution))}updateMarker(e,t){if(!this.mouseMarkers)return;const{point:i,object:s}=e,n=s,r=n.curve,o=n.curve.alignment,a=o.getPercentageAt(i,"absolute");this.mouseMarkers[t].visible=!0,this.mouseMarkers[t].three.position.copy(i),a!==null&&this.onMarkerChange.trigger({alignment:o,percentage:a,type:t,curve:r})}};y(Tc,"uuid","0a59c09e-2b49-474a-9320-99f51f40f182");let dm=Tc;const Sc=class wc extends de{constructor(e){super(e),y(this,"enabled",!0),y(this,"world",null),y(this,"plane"),y(this,"_world3D",null),this.components.add(wc.uuid,this)}get world3D(){return this._world3D}set world3D(e){var t;if(this._world3D=e,(t=this.plane)==null||t.dispose(),!e)return;const i=this.components.get(Xi),s=i.Type;i.Type=Pn,this.plane=i.createFromNormalAndCoplanarPoint(e,new x(1,0,0),new x),i.Type=s,this.plane.visible=!1,this.plane.enabled=!1}async set(e,t){if(!this.world||!this.plane)throw new Error("You must set a world before using this component");this.plane.enabled=!0;const i=e.curve.getPercentageAt(t);if(i===null)return;const{startPoint:s,endPoint:n}=e.curve.getSegmentAt(i);if(e.geometry.index===null)throw new Error("Geometry must be indexed!");const r=new x;r.subVectors(n,s),r.normalize(),this.plane.setFromNormalAndCoplanarPoint(r,t),this.plane.edges.update();const o=this.plane.helper.matrix.clone();o.invert();const a=this.world.scene.three,l=this.plane.edges.get();for(const h in l){const{mesh:d}=l[h];d.position.set(0,0,0),d.rotation.set(0,0,0),d.updateMatrix(),d.applyMatrix4(o),d.parent!==a&&a.add(d)}this.plane.enabled=!1}};y(Sc,"uuid","96b2c87e-d90b-4639-8257-8f01136fe324");let um=Sc;function ei(){const c=document.createElement("div");return c.style.backgroundColor="black",c.style.color="white",c.style.padding="8px",c.style.borderRadius="8px",c.style.fontFamily="sans-serif",c}const Tn=class Rn{constructor(e,t,i){y(this,"label"),y(this,"boundingBox",new ee),y(this,"world"),y(this,"components"),y(this,"_length"),y(this,"_visible",!0),y(this,"_start"),y(this,"_end"),y(this,"_root",new yn),y(this,"_endpoints",[]),y(this,"_line"),this.components=e,this.world=t,this._start=i.start,this._end=i.end,this._length=this.getLength(),this._line=this.createLine(i),this.newEndpointElement(i.endpointElement),this.newEndpointElement(i.endpointElement.cloneNode(!0)),this.label=this.newText(),this._root.renderOrder=2,this.world.scene.three.add(this._root)}get visible(){return this._visible}set visible(e){this._visible=e,this.label.visible=e,this._endpoints[0].visible=e,this._endpoints[1].visible=e;const[t,i]=this._endpoints,s=t.three,n=i.three,r=this.label.three;e?(this.world.scene.three.add(this._root),this._root.add(r,s,n)):(r.removeFromParent(),s.removeFromParent(),n.removeFromParent(),this._root.removeFromParent())}get endPoint(){return this._end}set endPoint(e){this._end=e;const t=this._line.geometry.attributes.position;t.setXYZ(1,e.x,e.y,e.z),t.needsUpdate=!0,this._endpoints[1].three.position.copy(e),this.updateLabel()}get startPoint(){return this._start}set startPoint(e){this._start=e;const t=this._line.geometry.attributes.position;t.setXYZ(0,e.x,e.y,e.z),t.needsUpdate=!0,this._endpoints[0].three.position.copy(e),this.updateLabel()}get _center(){let e=this._end.clone().sub(this._start);const t=e.length()*.5;return e=e.normalize().multiplyScalar(t),this._start.clone().add(e)}dispose(){const e=this.components.get(Nt);this.visible=!1,e.destroy(this._root),e.destroy(this._line);for(const t of this._endpoints)t.dispose();this._endpoints.length=0,this.label.dispose(),this.boundingBox&&e.destroy(this.boundingBox),this.components=null}createBoundingBox(){this.boundingBox.geometry=new Be(1,1,this._length),this.boundingBox.position.copy(this._center),this.boundingBox.lookAt(this._end),this.boundingBox.visible=!1,this._root.add(this.boundingBox)}toggleLabel(){this.label.toggleVisibility()}newEndpointElement(e){const t=this._endpoints.length===0?this._start:this._end,i=new qe(this.world,e);i.three.position.copy(t),this._endpoints.push(i),this._root.add(i.three)}updateLabel(){this._length=this.getLength(),this.label.three.element.textContent=this.getTextContent(),this.label.three.position.copy(this._center),this._line.computeLineDistances()}createLine(e){const t=new Ce;t.setFromPoints([e.start,e.end]);const i=new Le(t,e.lineMaterial);return this._root.add(i),i}newText(){const e=ei();e.textContent=this.getTextContent();const t=new qe(this.world,e);return t.three.position.copy(this._center),this._root.add(t.three),t}getTextContent(){return`${(this._length/Rn.scale).toFixed(Rn.rounding)} ${Rn.units}`}getLength(){return this._start.distanceTo(this._end)}};y(Tn,"scale",1),y(Tn,"units","m"),y(Tn,"rounding",2);let Co=Tn;class im{constructor(e,t,i){y(this,"enabled",!0),y(this,"points",[]),y(this,"workingPlane",null),y(this,"labelMarker"),y(this,"world"),y(this,"components"),y(this,"onDisposed",new Y),y(this,"onAreaComputed",new Y),y(this,"onWorkingPlaneComputed",new Y),y(this,"onPointAdded",new Y),y(this,"onPointRemoved",new Y),y(this,"_visible",!0),y(this,"_rotationMatrix",null),y(this,"_dimensionLines",[]),y(this,"_defaultLineMaterial",new si({color:"red"})),this.world=t,this.components=e;const s=ei();this.labelMarker=new qe(t,s),this.labelMarker.visible=!1,this.onPointAdded.add(n=>{this.points.length===3&&!this._dimensionLines[2]&&(this.addDimensionLine(n,this.points[0]),this.labelMarker.visible=!0)}),i==null||i.forEach(n=>this.setPoint(n))}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this._dimensionLines)t.visible=e,t.label.visible=!1;this.labelMarker.visible=e}setPoint(e,t){let i;if(t?i=t:i=this.points.length===0?0:this.points.length,i===0){this.points[0]=e;return}if(i<0||i>this.points.length)return;const s=this.points.length>i;this.points[i]=e,this.onPointAdded.trigger(e),s||this.addDimensionLine(this.points[i-1],e);const{previousLine:n,nextLine:r}=this.getLinesBetweenIndex(i);n&&(n.endPoint=e),r&&(r.startPoint=e)}removePoint(e){if(this.points.length===3)return;this.points.splice(e,1);const{previousLine:t,nextLine:i}=this.getLinesBetweenIndex(e);i&&(t.endPoint=i.endPoint),i==null||i.dispose(),this._dimensionLines.splice(e,1),this.onPointRemoved.trigger()}toggleLabel(){this.labelMarker.toggleVisibility()}addDimensionLine(e,t){const i=new Co(this.components,this.world,{start:e,end:t,lineMaterial:this._defaultLineMaterial,endpointElement:ei()});return i.toggleLabel(),this._dimensionLines.length>1?this._dimensionLines.splice(this._dimensionLines.length-1,0,i):this._dimensionLines.push(i),i}getLinesBetweenIndex(e){const t=e===0?this._dimensionLines.length-1:e-1,i=this._dimensionLines[t],s=this._dimensionLines[e];return{previousLine:i,nextLine:s}}computeWorkingPlane(){this.workingPlane=new ti().setFromCoplanarPoints(this.points[0],this.points[1],this.points[2]);const e=new x(0,1,0),t=this.workingPlane.normal.angleTo(e),i=new x().crossVectors(this.workingPlane.normal,e).normalize();this._rotationMatrix=new ne().makeRotationAxis(i,t),this.onWorkingPlaneComputed.trigger(this.workingPlane)}computeArea(){if(!(this._rotationMatrix&&this.workingPlane))return this.onAreaComputed.trigger(0),0;let e=0,t=0;const i=this._rotationMatrix,s=this.points.map(r=>{const o=r.clone().applyMatrix4(i),a=new Se(o.x,o.z);return e+=a.x,t+=a.y,a}),n=Math.abs(wh.area(s));return this.labelMarker.three.element.textContent=`${n.toFixed(2)} m²`,this.labelMarker.three.position.set(e/s.length,-this.workingPlane.constant,t/s.length).applyMatrix4(i.clone().invert()),this.onAreaComputed.trigger(n),n}dispose(){this.onAreaComputed.reset(),this.onWorkingPlaneComputed.reset(),this.onPointAdded.reset(),this.onPointRemoved.reset();for(const e of this._dimensionLines)e.dispose();this.labelMarker.dispose(),this._dimensionLines=[],this.points=[],this._rotationMatrix=null,this.workingPlane=null,this._defaultLineMaterial.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get(){return{points:this.points,workingPlane:this.workingPlane,area:this.computeArea()}}}class To extends Zd{constructor(e,t){super(e,t),y(this,"onDisposed",new Y),y(this,"marker",null),y(this,"_className","default-vertex-picker"),this.onEnabled.add(i=>{this.marker&&(this.marker.visible=i)})}get className(){return this._className}set className(e){this._className=e,this.marker&&(this.marker.three.element.className=e)}dispose(){this.marker&&this.marker.dispose(),super.dispose()}get(e){const t=super.get(e);return t?(this.marker||(this.marker=new qe(e),this.marker.three.element.className=this._className),this.marker.world!==e&&(this.marker.world=e,this.marker.three.removeFromParent(),e.scene.three.add(this.marker.three)),this.marker.visible=!0,this.marker.three.position.copy(t)):this.marker&&(this.marker.visible=!1),t}}const vc=class zr extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"list",[]),y(this,"world"),y(this,"_enabled",!1),y(this,"_visible",!0),y(this,"_vertexPicker"),y(this,"_currentAreaElement",null),y(this,"_clickCount",0),y(this,"create",()=>{if(!this.enabled)return;if(!this.world)throw new Error("World not defined for the area measurement!");const t=this._vertexPicker.get(this.world);if(t){if(!this._currentAreaElement){const i=new im(this.components,this.world);i.onPointAdded.add(()=>{this._clickCount===2&&!i.workingPlane&&(i.computeWorkingPlane(),this._vertexPicker.workingPlane=i.workingPlane)}),i.onPointRemoved.add(()=>this._clickCount--),this._currentAreaElement=i}this._currentAreaElement.setPoint(t,this._clickCount),this._currentAreaElement.computeArea(),this._clickCount++}}),y(this,"onMouseMove",()=>{if(!this.world){console.log("No world given for the area measurement!");return}const t=this._vertexPicker.get(this.world);t&&this._currentAreaElement&&(this._currentAreaElement.setPoint(t,this._clickCount),this._currentAreaElement.computeArea())}),y(this,"onKeydown",t=>{this.enabled&&(t.key==="z"&&t.ctrlKey&&this._currentAreaElement&&this._currentAreaElement.removePoint(this._clickCount-1),t.key==="Enter"&&this._currentAreaElement&&this.endCreation(),t.key==="Escape"&&(this._clickCount===0&&!this._currentAreaElement?this.enabled=!1:this.cancelCreation()))}),this.components.add(zr.uuid,this),this._vertexPicker=new To(e)}set enabled(e){this._enabled=e,this._vertexPicker.enabled=e,this.setupEvents(e),e||this.cancelCreation()}get enabled(){return this._enabled}set workingPlane(e){this._vertexPicker.workingPlane=e}get workingPlane(){return this._vertexPicker.workingPlane}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}dispose(){this.setupEvents(!1),this._vertexPicker.dispose(),this._currentAreaElement&&this._currentAreaElement.dispose();for(const e of this.list)e.dispose();this.components=null,this.onDisposed.trigger(zr.uuid),this.onDisposed.reset()}delete(){}deleteAll(){for(const e of this.list)e.dispose();this.list=[]}endCreation(){this._currentAreaElement&&(this._currentAreaElement.points.length<3||(this._currentAreaElement&&(this.list.push(this._currentAreaElement),this._currentAreaElement.removePoint(this._clickCount),this._currentAreaElement.computeWorkingPlane(),this._currentAreaElement.computeArea(),this._currentAreaElement=null),this._vertexPicker.workingPlane=null,this._clickCount=0))}cancelCreation(){this._currentAreaElement&&(this._currentAreaElement.dispose(),this._currentAreaElement=null),this._vertexPicker.workingPlane=null,this._clickCount=0}setupEvents(e){if(!this.world)throw new Error("The area measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the area measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)):(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown))}};y(vc,"uuid","c453a99e-f054-4781-9060-33df617db4a5");let fm=vc;class sm{constructor(e,t){y(this,"enabled",!0),y(this,"visible",!0),y(this,"points",[]),y(this,"world"),y(this,"onDisposed",new Y),y(this,"_lineMaterial",new Ns({color:6629591,linewidth:2})),y(this,"_lineGeometry",new Nn),y(this,"_line",new Kl(this._lineGeometry,this._lineMaterial)),y(this,"_labelMarker"),y(this,"onAngleComputed",new Y),y(this,"onPointAdded",new Y),this.world=e;const i=ei();this._labelMarker=new qe(e,i),this.labelMarker.visible=!0,this.onPointAdded.add(()=>{this.points.length===1&&e.scene.three.add(this._line),this.points.length===3&&(this.labelMarker.visible=!0)}),this.onAngleComputed.add(s=>{this.labelMarker.three.element.textContent=`${s.toFixed(2)}°`,this.labelMarker.three.position.copy(this.points[1]??new x)}),t==null||t.forEach(s=>this.setPoint(s))}set lineMaterial(e){this._lineMaterial.dispose(),this._lineMaterial=e,this._line.material=e,this._lineMaterial.resolution.set(window.innerWidth,window.innerHeight)}get lineMaterial(){return this._lineMaterial}set labelMarker(e){this._labelMarker.dispose(),this._labelMarker=e}get labelMarker(){return this._labelMarker}get angle(){return{points:this.points,angle:this.computeAngle()}}setPoint(e,t){let i;if(t?i=t:i=this.points.length===0?0:this.points.length,![0,1,2].includes(i))return;this.points[i]=e,this.onPointAdded.trigger(e);const s=this.points.map(n=>[n.x,n.y,n.z]);this._lineGeometry.setPositions(s.flat())}toggleLabel(){this.labelMarker.toggleVisibility()}computeAngle(){const e=this.points[0],t=this.points[1],i=this.points[2];if(!(e&&t&&i))return 0;const s=new x().subVectors(t,e),n=new x().subVectors(t,i),r=Ii.radToDeg(s.angleTo(n));return this.onAngleComputed.trigger(r),r}dispose(){this.points=[],this.labelMarker.dispose(),this.onAngleComputed.reset(),this.onPointAdded.reset(),this.labelMarker.dispose(),this._line.removeFromParent(),this._lineMaterial.dispose(),this._lineGeometry.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}}const yc=class kr extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"world"),y(this,"list",[]),y(this,"_lineMaterial"),y(this,"_enabled",!1),y(this,"_vertexPicker"),y(this,"_currentAngleElement",null),y(this,"_clickCount",0),y(this,"create",()=>{if(!this.enabled)return;if(!this.world){console.log("No world selected for angle measurement!");return}const t=this._vertexPicker.get(this.world);if(t){if(!this._currentAngleElement){const i=new sm(this.world);i.lineMaterial=this.lineMaterial,this._currentAngleElement=i}this._currentAngleElement.setPoint(t,this._clickCount),this._currentAngleElement.setPoint(t,this._clickCount+1),this._currentAngleElement.setPoint(t,this._clickCount+2),this._currentAngleElement.computeAngle(),this._clickCount++,this._clickCount===3&&this.endCreation()}}),y(this,"onMouseMove",()=>{if(!this.world){console.log("No world selected for angle measurement!");return}const t=this._vertexPicker.get(this.world);t&&this._currentAngleElement&&(this._currentAngleElement.setPoint(t,this._clickCount),this._currentAngleElement.computeAngle())}),y(this,"onKeyDown",t=>{this.enabled&&t.key==="Escape"&&this.cancelCreation()}),this.components.add(kr.uuid,this),this._vertexPicker=new To(e),this._lineMaterial=new Ns({color:6629591,linewidth:2})}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.setupEvents(e),this._vertexPicker.enabled=e,e||this.cancelCreation()}get lineMaterial(){return this._lineMaterial}set lineMaterial(e){this._lineMaterial.dispose(),this._lineMaterial=e,this._lineMaterial.resolution.set(window.innerWidth,window.innerHeight)}get workingPlane(){return this._vertexPicker.workingPlane}set workingPlane(e){this._vertexPicker.workingPlane=e}dispose(){this.setupEvents(!1),this._lineMaterial.dispose(),this._vertexPicker.dispose();for(const e of this.list)e.dispose();this._currentAngleElement&&this._currentAngleElement.dispose(),this.components=null,this.onDisposed.trigger(kr.uuid),this.onDisposed.reset()}delete(){}deleteAll(){for(const e of this.list)e.dispose();this.list=[]}endCreation(){this._currentAngleElement&&(this.list.push(this._currentAngleElement),this._currentAngleElement.computeAngle(),this._currentAngleElement=null),this._clickCount=0}cancelCreation(){this._currentAngleElement&&(this._currentAngleElement.dispose(),this._currentAngleElement=null),this._clickCount=0}setupEvents(e){if(!this.world)throw new Error("No world selected for angle measurement!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The given world doesn't have a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeyDown)):(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeyDown))}};y(yc,"uuid","622fb2c9-528c-4b0a-8a0e-6a1375f0a3aa");let pm=yc;const Fc=class Vr extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"onBeforeUpdate",new Y),y(this,"onAfterUpdate",new Y),y(this,"snapDistance",.25),y(this,"list",[]),y(this,"world"),y(this,"_vertexPicker"),y(this,"_lineMaterial",new si({color:"#DC2626",linewidth:2,depthTest:!1})),y(this,"_visible",!0),y(this,"_enabled",!1),y(this,"_temp",{isDragging:!1,start:new x,end:new x,dimension:void 0}),y(this,"create",t=>{const i=t instanceof Yi?t:void 0;if(this._enabled){if(!this._temp.isDragging){this.drawStart(i);return}this.endCreation()}}),y(this,"onMouseMove",()=>{this.world&&this._vertexPicker.get(this.world)}),y(this,"onKeydown",t=>{this.enabled&&t.key==="Escape"&&this.cancelCreation()}),this.components.add(Vr.uuid,this),this._vertexPicker=new To(e,{previewElement:ei(),snapDistance:this.snapDistance})}get enabled(){return this._enabled}set enabled(e){e||this.cancelCreation(),this._enabled=e,this._vertexPicker.enabled=e,this.setupEvents(e)}get visible(){return this._visible}set visible(e){this._visible=e;for(const t of this.list)t.visible=e}get color(){return this._lineMaterial.color}set color(e){this._lineMaterial.color=e}dispose(){this.setupEvents(!1),this.enabled=!1;for(const e of this.list)e.dispose();this._lineMaterial.dispose(),this.list=[],this._vertexPicker.dispose(),this.onDisposed.trigger(Vr.uuid),this.onDisposed.reset()}async update(e){this._enabled&&this._temp.isDragging&&this.drawInProcess()}createOnPoints(e,t){const i=this.drawDimension();i.startPoint=e,i.endPoint=t,i.createBoundingBox(),this.list.push(i)}delete(){if(!this.world)throw new Error("World is needed for Length Measurement!");if(!this._enabled||this.list.length===0)return;const e=this.getBoundingBoxes(),t=this.components.get(ut).get(this.world).castRay(e);if(!t)return;const i=this.list.find(s=>s.boundingBox===t.object);if(i){const s=this.list.indexOf(i);this.list.splice(s,1),i.dispose()}}async deleteMeasurement(e){if(e){const t=this.list.indexOf(e);this.list.splice(t,1),e.dispose()}}deleteAll(){for(const e of this.list)e.dispose();this.list=[]}cancelCreation(){var e;this._temp.dimension&&(this._temp.isDragging=!1,(e=this._temp.dimension)==null||e.dispose(),this._temp.dimension=void 0)}endCreation(){this._temp.dimension&&(this._temp.dimension.createBoundingBox(),this.list.push(this._temp.dimension),this._temp.dimension=void 0,this._temp.isDragging=!1)}drawStart(e){if(!this.world)throw new Error("The length measurement needs a world to work!");const t=e?[e]:void 0,i=this.components.get(ut).get(this.world).castRay(t),s=this._vertexPicker.get(this.world);i&&s&&(this._temp.isDragging=!0,this._temp.start=e?i.point:s)}drawInProcess(){if(!this.world)throw new Error("The length measurement needs a world to work!");if(!this.components.get(ut).get(this.world).castRay())return;const e=this._vertexPicker.get(this.world);e&&(this._temp.end=e,this._temp.dimension||(this._temp.dimension=this.drawDimension()),this._temp.dimension.endPoint=this._temp.end)}drawDimension(){if(!this.world)throw new Error("The length measurement needs a world to work!");return new Co(this.components,this.world,{start:this._temp.start,end:this._temp.end,lineMaterial:this._lineMaterial,endpointElement:ei()})}getBoundingBoxes(){return this.list.map(e=>e.boundingBox).filter(e=>e!==void 0)}setupEvents(e){if(!this.world)throw new Error("The length measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the length measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;t&&(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown),e&&(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)))}};y(Fc,"uuid","2f9bcacf-18a9-4be6-a293-e898eae64ea1");let Es=Fc;const Ac=class Oc extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"onVolumeFound",new Y),y(this,"label",null),y(this,"world"),y(this,"_enabled",!1),y(this,"create",()=>{if(!this.enabled)return;if(!this.world)throw new Error("World is needed for Volume Measurement!");const t=this.components.get(ut).get(this.world).castRay(),i=this.components.get(pi);if(!t||!t.object)return;const{object:s}=t;if(s instanceof ee){const n=i.getVolumeFromMeshes([s]);this.onVolumeFound.trigger(n)}}),y(this,"onMouseMove",()=>{}),y(this,"onKeydown",t=>{}),this.components.add(Oc.uuid,this)}set enabled(e){this._enabled=e,this.setupEvents(e),e||this.cancelCreation()}get enabled(){return this._enabled}async dispose(){var e;this.setupEvents(!1),(e=this.label)==null||e.dispose(),this.onDisposed.trigger(),this.onDisposed.reset(),this.components=null}delete(){}async deleteAll(){}endCreation(){}cancelCreation(){}getVolumeFromFragments(e){const t=this.components.get(pi).getVolumeFromFragments(e),i=this.components.get(On);i.reset(),i.addFragmentIdMap(e);const s=i.getSphere();return this.setLabel(s,t),t}getVolumeFromMeshes(e){const t=this.components.get(pi),i=this.components.get(On);i.reset();for(const r of e)i.addMesh(r);const s=i.getSphere(),n=t.getVolumeFromMeshes(e);return this.setLabel(s,n),n}clear(){this.label&&(this.label.visible=!1)}newLabel(){if(!this.world)throw new Error("World is needed for Volume Measurement!");const e=ei();return new qe(this.world,e)}setupEvents(e){if(!this.world)throw new Error("The volume measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the volume measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("click",this.create),t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)):(t.removeEventListener("click",this.create),t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown))}setLabel(e,t){if(!this.world)throw new Error("World is needed for Volume Measurement!");this.label||(this.label=this.newLabel(),this.label.three.removeFromParent()),this.label.visible=!0,this.world.scene.three.add(this.label.three),this.label.three.position.copy(e.center);const i=Math.trunc(t*100)/100;this.label.three.element.textContent=i.toString()}};y(Ac,"uuid","811da532-7af3-4635-b592-1c06ae494af5");let mm=Ac;const Nc=class Pc extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"selection",[]),y(this,"preview",new ee(new Ce,new st({side:2,depthTest:!1,transparent:!0,opacity:.25,color:"#BCF124"}))),y(this,"selectionMaterial",new st({side:2,depthTest:!1,transparent:!0,color:"#BCF124",opacity:.75})),y(this,"world"),y(this,"_enabled",!1),y(this,"_currentSelelection",null),y(this,"create",()=>{if(!this.world)throw new Error("No world given to the face measurement!");if(!this.enabled||!this._currentSelelection)return;const t=this.world.scene.three,i=new Ce,s=new ee(i,this.selectionMaterial);i.setAttribute("position",this.preview.geometry.attributes.position),t.add(s),i.computeBoundingSphere();const{area:n,perimeter:r}=this._currentSelelection,o=this.newLabel(i,n);s.add(o.three),this.selection.push({area:n,perimeter:r,mesh:s,label:o})}),y(this,"onMouseMove",()=>{if(!this.world)throw new Error("The face measurement needs a world to work!");if(!this.enabled){this.unselect();return}const t=this.components.get(ut).get(this.world).castRay();if(!t||!t.object||t.faceIndex===void 0){this.unselect();return}const{object:i,faceIndex:s}=t;i instanceof ee||i instanceof It?this.updateSelection(i,s,t.instanceId):this.unselect()}),y(this,"onKeydown",t=>{}),this.components.add(Pc.uuid,this),this.preview.frustumCulled=!1}set enabled(e){if(!this.world)throw new Error("No world given for the Face measurement!");this._enabled=e,this.setupEvents(e),e?this.world.scene.three.add(this.preview):(this.preview.removeFromParent(),this.cancelCreation()),this.setVisibility(e)}get enabled(){return this._enabled}dispose(){this.setupEvents(!1),this.deleteAll(),this.preview.removeFromParent(),this.preview.material.dispose(),this.preview.geometry.dispose(),this.selectionMaterial.dispose(),this.onDisposed.trigger(),this.onDisposed.reset(),this.components=null}delete(){if(!this.world)throw new Error("No world given to the face measurement!");const e=this.selection.map(n=>n.mesh),t=this.components.get(ut).get(this.world).castRay(e);if(!t||!t.object)return;const i=this.selection.find(n=>n.mesh===t.object);if(!i)return;i.mesh.removeFromParent(),i.mesh.geometry.dispose(),i.label.dispose();const s=this.selection.indexOf(i);this.selection.splice(s,1)}deleteAll(){for(const e of this.selection)e.mesh.removeFromParent(),e.mesh.geometry.dispose(),e.label.dispose();this.selection=[]}endCreation(){}cancelCreation(){}get(){const e=[];for(const t of this.selection){const i=t.mesh.geometry,{area:s,perimeter:n}=t,r=i.attributes.position.array;e.push({position:r,area:s,perimeter:n})}return e}set(e){if(!this.world)throw new Error("No world given to the face measurement!");const t=this.world.scene.three;for(const i of e){const s=new Ce,n=new ee(s,this.selectionMaterial);t.add(n);const r=new Je(i.position,3);s.setAttribute("position",r),s.computeBoundingSphere();const{area:o,perimeter:a}=i,l=this.newLabel(s,o);n.add(l.three),this.selection.push({area:o,perimeter:a,mesh:n,label:l})}}setupEvents(e){if(!this.world)throw new Error("The face measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the face measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown),e&&(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown))}setVisibility(e){if(!this.world)throw new Error("The face measurement needs a world to work!");if(this.world.isDisposing)return;const t=this.world.scene.three;for(const i of this.selection){const s=i.label.three;e?(t.add(i.mesh),i.mesh.add(s)):(i.mesh.removeFromParent(),s.removeFromParent())}}unselect(){this.preview.removeFromParent(),this._currentSelelection=null}updateSelection(e,t,i){if(!this.world)throw new Error("The face measurement needs a world to work!");this.world.scene.three.add(this.preview);const s=this.components.get(pi).getFace(e,t,i);if(s===null)return;const n=this.regenerateHighlight(e,s.indices,i);let r=0;for(const{distance:o}of s.edges)r+=o;this._currentSelelection={perimeter:r,area:n}}newLabel(e,t){if(!e.boundingSphere)throw new Error("Error computing area geometry");if(!this.world)throw new Error("The face measurement needs a world to work!");const{center:i}=e.boundingSphere,s=ei(),n=Math.trunc(t*100)/100;s.textContent=n.toString();const r=new qe(this.world,s);return r.three.position.copy(i),r}regenerateHighlight(e,t,i){const s=[],n=[];let r=0,o=0;const a=new hi,l=this.components.get(pi);for(const u of t){const{p1:f,p2:m,p3:p}=l.getVerticesAndNormal(e,u,i);s.push(f.x,f.y,f.z),s.push(m.x,m.y,m.z),s.push(p.x,p.y,p.z),a.set(f,m,p),o+=a.getArea(),n.push(r,r+1,r+2),r+=3}this.preview.position.set(0,0,0),this.preview.rotation.set(0,0,0),this.preview.scale.set(1,1,1),this.preview.updateMatrix(),this.preview.applyMatrix4(e.matrixWorld);const h=new Float32Array(s),d=new Je(h,3);return this.preview.geometry.setAttribute("position",d),this.preview.geometry.setIndex(n),o}};y(Nc,"uuid","30279548-1309-44f6-aa97-ce26eed73522");let Im=Nc;const bc=class xc extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"preview"),y(this,"tolerance",.3),y(this,"world"),y(this,"_enabled",!1),y(this,"_lineMaterial",new si({color:"#DC2626",linewidth:2,depthTest:!1,transparent:!0})),y(this,"create",async()=>{if(!this.preview||!this.enabled||!this.preview.visible)return;const t=this.components.get(Es);t.world=this.world;const i=this.preview.startPoint.clone(),s=this.preview.endPoint.clone();t.createOnPoints(i,s)}),y(this,"onMouseMove",()=>{if(!this.preview)return;if(!this.world)throw new Error("The edge measurement needs a world to work!");if(!this.enabled){this.preview.visible=!1;return}const t=this.components.get(ut).get(this.world).castRay();if(!t||!t.object){this.preview.visible=!1;return}const{object:i,faceIndex:s,point:n}=t;if(s===void 0){this.preview.visible=!1;return}i instanceof ee||i instanceof It?this.updateSelection(i,n,s,t.instanceId):this.preview.visible=!1}),y(this,"onKeydown",t=>{}),this.components.add(xc.uuid,this)}set enabled(e){if(this._enabled=e,this.setupEvents(e),e){if(!this.world)throw new Error("The edge measurement needs a world to work!");if(!this.preview){const t=document.createElement("div");t.className="w-2 h-2 bg-red-600 rounded-full",this.preview=new Co(this.components,this.world,{start:new x,end:new x,lineMaterial:this._lineMaterial,endpointElement:t}),this.preview.visible=!1}}else this.cancelCreation()}get enabled(){return this._enabled}dispose(){this.preview&&this.preview.dispose(),this._lineMaterial.dispose(),this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset(),this.components=null}delete(){if(!this.enabled)return;const e=this.components.get(Es),t=e.enabled;e.enabled=!0,e.delete(),e.enabled=t}deleteAll(){this.components.get(Es).deleteAll()}endCreation(){}cancelCreation(){}get(){const e=this.components.get(Es).list,t=[];for(const i of e){const s=i.startPoint,n=i.endPoint,r=[s.x,s.y,s.z,n.x,n.y,n.z];t.push(r)}return t}set(e){const t=this.components.get(Es);t.world=this.world;for(const i of e){const[s,n,r,o,a,l]=i,h=new x(s,n,r),d=new x(o,a,l);t.createOnPoints(h,d)}}setupEvents(e){if(!this.world)throw new Error("The edge measurement needs a world to work!");if(this.world.isDisposing)return;if(!this.world.renderer)throw new Error("The world of the edge measurement needs a renderer!");const t=this.world.renderer.three.domElement.parentElement;e?(t.addEventListener("pointermove",this.onMouseMove),window.addEventListener("keydown",this.onKeydown)):(t.removeEventListener("pointermove",this.onMouseMove),window.removeEventListener("keydown",this.onKeydown))}updateSelection(e,t,i,s){if(!this.preview||!e.geometry.index)return;const n=this.components.get(pi).getFace(e,i,s);if(!n)return;const{edges:r}=n;let o=Number.MAX_VALUE,a=[];for(const d of r){const[u,f]=d.points,m=pi.distanceFromPointToLine(t,u,f,!0);m{const n=s.data.colors,r={},o={},a={},l={},h=performance.now();let d=!1;const u=new Set(this._geometriesInMemory);for(const[f,m]of n){const p=this._geometries.get(f);if(!p||!(m>this.threshold))continue;u.delete(f);const{exists:E}=p,I=this._indexModelID.get(p.modelIndex);E?(p.time=h,l[I]||(l[I]=new Set),l[I].add(p.geometryID),this._geometriesInMemory.add(f),d=!0):(r[I]||(r[I]=new Map),p.time=h,p.exists=!0,r[I].has(m)||r[I].set(m,new Set),r[I].get(m).add(p.geometryID),this._geometriesInMemory.add(f),d=!0)}for(const f of u){const m=this._geometries.get(f);m&&(this.handleLostGeometries(h,f,m,o,a),d=!0)}d&&await this.onViewUpdated.trigger({toLoad:r,toRemove:o,toHide:a,toShow:l}),this._isWorkerBusy=!1}),this.config.updateInterval=500,this._geometry=new Be(1,1,1),this._geometry.groups=[],this._geometry.deleteAttribute("uv");const i=this._geometry.attributes.position.array;for(let s=0;sparseInt(m,10)),f=[];for(const m of i.ids){const p=i.get(m);if(!p.colors)throw new Error("Malformed fragments!");for(const E of p.colors)E.setRGB(h/255,d/255,u/255,"srgb");f.push(p)}l.fragment.add(f),_t.enabled=r,this.needsUpdate=!0}removeFragment(e,t){const i=this._modelIDIndex.get(e),s=this.codes.get(i).get(t),n=this._geometries.get(s);if(n.hidden||this.setGeometryVisibility(n,!0,!1),n.fragment){const{fragment:r}=n;r.dispose(!1),n.fragment=void 0}}setModelTransformation(e,t){const i=this._modelIDIndex.get(e);if(i===void 0)throw new Error("Model not found!");const s=this.boxes.get(i);s&&(s.mesh.position.set(0,0,0),s.mesh.rotation.set(0,0,0),s.mesh.scale.set(1,1,1),s.mesh.applyMatrix4(t));const n=this._geometriesGroups.get(i);n&&(n.position.set(0,0,0),n.rotation.set(0,0,0),n.scale.set(1,1,1),n.applyMatrix4(t))}setVisibility(e,t,i){const s=this._modelIDIndex.get(t);if(s!==void 0)for(const[n,r]of i){const o=this.codes.get(s);if(o===void 0)throw new Error("Map not found!");const a=o.get(n),l=this._geometries.get(a);if(l===void 0)throw new Error("Geometry not found!");l.hidden=!e,this.setGeometryVisibility(l,e,!0,r)}}updateTransformations(e){const t=this._modelIDIndex.get(e);if(t===void 0)return;const i=this.components.get(ue).groups.get(e);if(i){i.updateWorldMatrix(!0,!1),i.updateMatrix();const s=this.boxes.get(t);s&&(s.mesh.position.set(0,0,0),s.mesh.rotation.set(0,0,0),s.mesh.scale.set(1,1,1),s.mesh.updateMatrix(),s.mesh.applyMatrix4(i.matrixWorld),s.mesh.updateMatrix());const n=this._geometriesGroups.get(t);n&&(n.position.set(0,0,0),n.rotation.set(0,0,0),n.scale.set(1,1,1),n.updateMatrix(),n.applyMatrix4(i.matrixWorld),n.updateMatrix())}}async addStaticGeometries(e,t=!0){const i={data:{colors:new Map}},s=this.threshold+1e3;for(const n in e){const r=this._modelIDIndex.get(n);if(r===void 0)continue;const o=this.codes.get(r);if(!o)continue;const a=e[n];for(const l of a){const h=o.get(l);if(!h)continue;const d=this._geometries.get(h);if(!d)continue;d.exists=!0,t||(d.hidden=!1,d.time=performance.now(),i.data.colors.set(h,s)),this._geometriesInMemory.add(h);const u=t?this._staticGeometries.culled:this._staticGeometries.unculled;u[n]||(u[n]=new Set),u[n].add(l)}}t||await this.handleWorkerMessage(i)}removeStaticGeometries(e,t){const i=[];t===void 0?i.push("culled","unculled"):t===!0?i.push("culled"):i.push("unculled");for(const s in e){const n=e[s];for(const r of i){const o=this._staticGeometries[r][s];if(o)for(const a of n)o.delete(a)}}}cancel(e){for(const t in e){const i=this._modelIDIndex.get(t);if(i===void 0)throw new Error("Model not found.");const s=this.codes.get(i);if(s===void 0)throw new Error("Codes not found.");for(const n of e[t]){const r=s.get(n);if(r===void 0)throw new Error("Color code not found.");this._geometriesInMemory.delete(r);const o=this._geometries.get(r);if(!o)throw new Error("Geometry not found.");o.exists=!1}}}getBoundingBoxes(e){const t=new zt;for(const i in e){const s=e[i],n=this._modelIDIndex.get(i);if(n===void 0)continue;const r=this.boxes.get(n);if(!r)continue;const o=r.clone(s);t.add(o.mesh),t.items.push(o)}return t}getInstanceID(e,t){const i=10**(Math.log(t)*Math.LOG10E+1|0);return e+t/i}setGeometryVisibility(e,t,i,s){const{modelIndex:n,geometryID:r,assetIDs:o}=e,a=this.boxes.get(n);if(a===void 0)throw new Error("Model not found!");const l=s||o;if(i&&e.fragment)e.fragment.setVisibility(t,l);else{const h=new Set;for(const d of l){const u=this.getInstanceID(d,r);h.add(u)}a.setVisibility(t,h)}}handleLostGeometries(e,t,i,s,n){var r,o,a;const l=this._indexModelID.get(i.modelIndex),h=e-i.time,{culled:d,unculled:u}=this._staticGeometries;if(h>this.maxLostTime){if((r=d[l])!=null&&r.has(i.geometryID)||(o=u[l])!=null&&o.has(i.geometryID))return;s[l]||(s[l]=new Set),i.exists=!1,s[l].add(i.geometryID),this._geometriesInMemory.delete(t)}else if(h>this.maxHiddenTime){if((a=u[l])!=null&&a.has(i.geometryID))return;n[l]||(n[l]=new Set),n[l].add(i.geometryID)}}createModelIndex(e){if(this._modelIDIndex.has(e))throw new Error("Can't load the same model twice!");const t=this._nextModelID;return this._nextModelID++,this._modelIDIndex.set(e,t),this._indexModelID.set(t,e),t}}const Mc=class Yr extends de{constructor(e){super(e),y(this,"enabled",!0),y(this,"onFragmentsDeleted",new Y),y(this,"onFragmentsLoaded",new Y),y(this,"onDisposed",new Y),y(this,"models",{}),y(this,"serializer",new Ba),y(this,"maxRamTime",5e3),y(this,"useCache",!0),y(this,"cancel",!1),y(this,"url",""),y(this,"fetch",async t=>fetch(this.url+t)),y(this,"fileDB",new vh("that-open-company-streaming")),y(this,"_culler",null),y(this,"_world",null),y(this,"_ramCache",new Map),y(this,"_isDisposing",!1),y(this,"_geometryInstances",{}),y(this,"_loadedFragments",{}),y(this,"fragIDData",new Map),y(this,"_baseMaterial",new wn),y(this,"_baseMaterialT",new wn({transparent:!0,opacity:.5})),y(this,"disposeStreamedGroup",t=>{this._isDisposing=!0;const{groupID:i,fragmentIDs:s}=t;if(this.models[i]){delete this.models[i],delete this._geometryInstances[i],delete this._loadedFragments[i];for(const n of s)this.fragIDData.delete(n);this.culler.remove(i),this._isDisposing=!1}}),this.components.add(Yr.uuid,this),this.components.get(ue).onFragmentsDisposed.add(this.disposeStreamedGroup),zt.setPropertiesDB(!0)}get world(){if(!this._world)throw new Error("You must set a world before using the streamer!");return this._world}set world(e){var t;this._world=e,(t=this._culler)==null||t.dispose(),this._culler=new nm(this.components,e),this._culler.onViewUpdated.add(async({toLoad:i,toRemove:s,toShow:n,toHide:r})=>{await this.loadFoundGeometries(i),await this.unloadLostGeometries(s),this.setMeshVisibility(n,!0),this.setMeshVisibility(r,!1)})}get culler(){if(!this._culler)throw new Error("You must set a world before using the streamer!");return this._culler}dispose(){var e;this._isDisposing=!0,this.onFragmentsLoaded.reset(),this.onFragmentsDeleted.reset(),this._ramCache.clear(),this.components.get(ue).onFragmentsDisposed.remove(this.disposeStreamedGroup),this.models={},this._geometryInstances={},this._loadedFragments={},this.fragIDData.clear(),this._baseMaterial.dispose(),this._baseMaterialT.dispose(),(e=this._culler)==null||e.dispose(),this.onDisposed.trigger(Yr.uuid),this.onDisposed.reset(),this._isDisposing=!1,zt.setPropertiesDB(!1)}async load(e,t,i){const{assets:s,geometries:n,globalDataFileId:r}=e,o=await(await this.fetch(r)).arrayBuffer(),a=new Uint8Array(o),l=this.components.get(ue).load(a,{coordinate:t,isStreamed:!0});l.name=r.replace("-processed-global",""),this.world.scene.three.add(l);const{opaque:h,transparent:d}=l.geometryIDs;for(const[p,E]of h){const I=l.keyFragments.get(E);if(I===void 0)throw new Error("Malformed fragments group!");this.fragIDData.set(I,[l,p,new Set])}for(const[p,E]of d){const I=l.keyFragments.get(E);if(I===void 0)throw new Error("Malformed fragments group!");this.fragIDData.set(I,[l,Math.abs(p),new Set])}this.culler.add(l.uuid,s,n);const u=new Map;for(const p of s)u.set(p.id,p);const f={assetsMap:u,geometries:n};Object.defineProperty(f,"assets",{get:()=>Array.from(f.assetsMap.values())}),this.models[l.uuid]=f;const m=new Map;for(const p of s){const E=p.id;for(const{transformation:I,geometryID:g,color:w}of p.geometries){m.has(g)||m.set(g,[]);const C=m.get(g);if(!C)throw new Error("Malformed instances");C.push({id:E,transformation:I,color:w})}}if(this._geometryInstances[l.uuid]=m,i){const p=new Map,E=new Map;for(const v in i.ids){const O=i.ids[v],A=parseInt(v,10);p.set(A,O)}for(const v in i.types){const O=i.types[v],A=parseInt(v,10);E.set(A,O)}const I=r.replace("-global","-properties");zt.url=this.url,l.streamSettings={baseFileName:I,ids:p,types:E};const{indexesFile:g}=i,w=await(await this.fetch(g)).text(),C=this.components.get(it);C.setRelationMap(l,C.getRelationsMapFromJSON(w))}return this.culler.updateTransformations(l.uuid),this.culler.needsUpdate=!0,l}remove(e){const t=this.components.get(ue),i=t.groups.get(e);i&&t.disposeGroup(i)}setVisibility(e,t){const i=new Map;if(!t){const s=this.components.get(ue),n={};for(const[,r]of s.groups){const o=r.getFragmentMap();for(const a in o)n[a]=o[a]}t=n}for(const s in t){const n=this.fragIDData.get(s);if(n===void 0)throw new Error("Geometry not found!");const[r,o,a]=n,l=r.uuid;i.has(l)||i.set(l,new Map);const h=i.get(l),d=t[s];for(const f of d)e?a.delete(f):a.add(f);h.get(o)||h.set(o,new Set);const u=h.get(o);for(const f of d)u.add(f)}for(const[s,n]of i){this.culler.setVisibility(e,s,n);for(const[r]of n){const o=this._loadedFragments[s];if(!o)continue;const a=o[r];if(a)for(const l of a){const h=t[l.id];h&&l.setVisibility(e,h)}}}this.culler.needsUpdate=!0}async clearCache(){await this.fileDB.clear()}async setStatic(e,t,i){const s={};for(const n of e){const r=this.fragIDData.get(n);if(!r){console.log(`Item not found: ${n}.`);continue}const[o,a]=r,l=o.uuid;s[l]||(s[l]=new Set),s[l].add(a)}if(t){const n={};for(const r in s){const o=new Map;o.set(1,s[r]),n[r]=o}await this.loadFoundGeometries(n,!1),await this.culler.addStaticGeometries(s,i)}else this.culler.removeStaticGeometries(s,i)}getBoundingBoxes(e){const t={},i=this.components.get(ue),s=new Map;for(const[r,o]of i.groups)for(const[,a]of o.keyFragments)s.set(a,r);const n=new Set;for(const r in e){const o=s.get(r);if(o===void 0){console.log("Fragment group not found!");continue}const a=e[r];n.has(o)||(t[o]=new Set,n.add(o));for(const l of a){const h=this.models[o].assetsMap.get(l);if(h)for(const d of h.geometries){const u=d.geometryID,f=this.culler.getInstanceID(l,u);t[o].add(f)}}}return this.culler.getBoundingBoxes(t)}async loadFoundGeometries(e,t=!0){this.cancel=!1;const i={};for(const s in e){const n=new Set;for(const[,r]of e[s])for(const o of r)n.add(o);i[s]=n}for(const s in e){if(this._isDisposing)return;if(this.cancel){this.cancelLoading(i);return}const n=this.components.get(ue).groups.get(s);if(!n)return;const{geometries:r}=this.models[s],o=new Map,a=new Set;for(const[f,m]of e[s])for(const p of m){if(this.cancel){this.cancelLoading(i);return}a.add(p);const E=r[p];if(!E)throw new Error("Geometry not found");if(E.geometryFile){const I=E.geometryFile,g=o.get(I)||0;o.set(I,g+f)}}if(this.useCache){const f=o.entries();for(const[m,p]of f)this.fileDB.isCached(m)&&o.set(m,p+99999)}const l=Array.from(o).sort((f,m)=>m[1]-f[1]),h=[];for(const[f]of l){const m=this.loadFragmentFile(s,n,t,f,a,i);h.push(m)}await Promise.all(h);const d=new Set,u=performance.now();for(const[f,{time:m}]of this._ramCache)u-m>this.maxRamTime&&d.add(f);for(const f of d)this._ramCache.delete(f)}}async unloadLostGeometries(e){if(this._isDisposing)return;const t=[],i=this.components.get(ue);for(const s in e){const n=i.groups.get(s);if(!n)throw new Error("Fragment group not found!");if(!this._loadedFragments[s])continue;const r=this._loadedFragments[s],o=e[s];for(const a of o){if(this.culler.removeFragment(n.uuid,a),!r[a])continue;const l=r[a];for(const h of l)n.items.splice(n.items.indexOf(h),1),t.push(h);delete r[a]}}t.length&&this.onFragmentsDeleted.trigger(t);for(const s of t)i.list.delete(s.id),this.world.meshes.delete(s.mesh),s.mesh.material=[],s.dispose(!0)}setMeshVisibility(e,t){for(const i in e)for(const s of e[i]){const n=this._loadedFragments[i];if(!n)continue;const r=n[s];if(r)for(const o of r)o.mesh.visible=t}}newFragment(e,t,i,s,n,r,o){if(s.length===0||this._isDisposing)return;const a=e.geometryIDs,l=n?a.transparent:a.opaque,h=t*(n?-1:1),d=l.get(h);if(d===void 0)return;const u=e.keyFragments.get(d);if(u===void 0)return;const f=this.components.get(ue);if(f.list.has(u))return;const m=n?this._baseMaterialT:this._baseMaterial,p=new vn(i,m,s.length);p.mesh.visible=o,p.id=u,p.mesh.uuid=u,p.group=e,e.add(p.mesh),e.items.push(p),f.list.set(p.id,p),this.world.meshes.add(p.mesh),this._loadedFragments[e.uuid]||(this._loadedFragments[e.uuid]={});const E=this._loadedFragments[e.uuid];E[t]||(E[t]=[]),E[t].push(p);const I=new Map;for(let v=0;v{var i;const s=this.components.get(ue);for(const n in t){const r=s.list.get(n);if(!r)continue;const o=(i=r.group)==null?void 0:i.uuid;if(o)for(const a in this.selection){if(a===this.config.selectName||a===this.config.hoverName)continue;const l=this.selection[a][n];if(l){a in this._colorsBeforeSelect||(this._colorsBeforeSelect[a]={}),o in this._colorsBeforeSelect[a]||(this._colorsBeforeSelect[a]={[o]:new Set});for(const h of l)this._colorsBeforeSelect[a][o].add(h)}}}}),y(this,"restoreHighlightersAfterDeselect",()=>{const t=this.components.get(ue);for(const i in this._colorsBeforeSelect){let s={};const n=this._colorsBeforeSelect[i];for(const r in n){const o=t.groups.get(r);if(!o)continue;const a=o.getFragmentMap(n[r]);s={...s,...a}}this.highlightByID(i,s,!1,!1)}this._colorsBeforeSelect={}}),y(this,"clearHover",()=>{this.selection[this.config.hoverName]={}}),y(this,"onMouseDown",t=>{this.enabled&&(this.mouseDownPosition={x:t.clientX,y:t.clientY},this._mouseState.down=!0)}),y(this,"onMouseUp",async t=>{if(!this.enabled)return;const{world:i,autoHighlightOnClick:s,selectEnabled:n}=this.config;if(!i)throw new Error("No world found!");if(!i.renderer)throw new Error("This world doesn't have a renderer!");if(t.target===i.renderer.three.domElement){if(this._mouseState.down=!1,this._mouseState.moved||t.button!==0){this._mouseState.moved=!1;return}if(this._mouseState.moved=!1,s&&n){const r=this.multiple==="none"?!0:!t[this.multiple];await this.highlight(this.config.selectName,r,this.zoomToSelection)}}}),y(this,"onMouseMove",async t=>{if(!this.enabled)return;const i=t.clientX-this.mouseDownPosition.x,s=t.clientY-this.mouseDownPosition.y,n=Math.sqrt(i*i+s*s),{hoverName:r,hoverEnabled:o}=this.config;if(this._mouseState.moved){this.clear(r);return}if(n>this.mouseMoveThreshold){this._mouseState.moved=this._mouseState.down;const a={};for(const l in this.selection){if(l===r)continue;const h=this.selection[l];for(const d in h){d in a||(a[d]=new Set);const u=h[d];for(const f of u)a[d].add(f)}}o&&await this.highlight(this.config.hoverName,!0,!1,a)}}),this.components.add(Gr.uuid,this),this.eventManager.list.add(this.onSetup),this.eventManager.list.add(this.onDisposed)}async dispose(){this.setupEvents(!1),this._fills.dispose(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.selection={};for(const e in this.events){const{onClear:t,onHighlight:i}=this.events[e];this.eventManager.list.delete(t),this.eventManager.list.delete(i)}this.onDisposed.trigger(Gr.uuid),this.eventManager.reset()}add(e,t){if(this.selection[e]||this.colors.has(e))throw new Error("A selection with that name already exists!");this.colors.set(e,t),this.selection[e]={};const i=new Y,s=new Y,n=new Y;this.events[e]={onHighlight:i,onClear:n,onBeforeHighlight:s},this.eventManager.add([n,i,s])}remove(e){if(this.clear(e),delete this.selection[e],this.colors.delete(e),this.selection[e]||this.colors.has(e))throw new Error("A selection with that name already exists!");if(this.events[e]){const{onHighlight:t,onClear:i,onBeforeHighlight:s}=this.events[e];this.eventManager.remove([i,t,s]),delete this.events[e]}}async highlight(e,t=!0,i=this.zoomToSelection,s={}){if(!this.enabled)return null;if(!this.config.world)throw new Error("No world found in config!");const n=this.config.world;if(!this.selection[e])throw new Error(`Selection ${e} does not exist.`);const r=[],o=this.components.get(ue).meshes;for(const E of o)r.push(E);const a=this.components.get(Xi);for(const E of a.list){const I=E;if(I.edges){const g=I.edges.fillMeshes;for(const w of g)r.push(w)}}const l=this.components.get(ut).get(n).castRay(r);if(!l||!l.face)return this.clear(e),null;const h=l.object;if(!h.fragment&&h.userData.indexFragmentMap){if(l.faceIndex===void 0||!h.geometry.index)return null;const{userData:E}=h,I=E.indexFragmentMap.get(l.faceIndex);if(I){await this.highlightByID(e,I,t,i,s,h,!0);const g=Object.keys(I)[0];return{id:Array.from(I[g])[0],fragments:I}}return null}const d=h.geometry,u=l.instanceId;if(!d||u===void 0)return null;const f=h.fragment.getItemID(u);if(f===null)throw new Error("Item ID not found!");const m=h.fragment.group;if(!m)throw new Error("Fragment must belong to a FragmentsGroup!");const p=m.getFragmentMap([f]);return await this.highlightByID(e,p,t,i,s,void 0,!0),{id:f,fragments:p}}async highlightByID(e,t,i=!0,s=this.zoomToSelection,n={},r=void 0,o=!1){if(!this.enabled)return;this.events[e].onBeforeHighlight.trigger(this.selection[e]),i&&this.clear(e);const a=this.components.get(ue),l=this.colors.get(e);if(l===void 0)throw new Error("Color for selection not found!");const h={};for(const d in t){const u=t[d],f=n[d];for(const m of u)if(!(f&&f.has(m))){if(this.selectable[e]){const p=this.selectable[e];if(!p[d]||!p[d].has(m))continue}h[d]||(h[d]=new Set),h[d].add(m)}}for(const d in h){this.selection[e][d]||(this.selection[e][d]=new Set);const u=h[d],f=new Set,m=new Set;for(const E of u){const I=this.selection[e][d];o&&this.autoToggle.has(e)&&I.has(E)?(f.add(E),I.delete(E)):(I.add(E),m.add(E))}const p=a.list.get(d);if(p&&(f.size&&(this.backupColor?p.setColor(this.backupColor,f):p.resetColor(f)),m.size&&l!==null&&p.setColor(l,m),p.mesh.userData.fills&&l!==null))for(const E of p.mesh.userData.fills)this._fills.highlight(e,E,l,t)}this.events[e].onHighlight.trigger(this.selection[e]),r&&l!==null&&this._fills.highlight(e,r,l,t),s&&await this.zoomSelection(e)}clear(e,t){const i=e?[e]:Object.keys(this.selection);for(const s of i){this._fills.clear(s);const n=this.components.get(ue),r=this.selection[s];for(const o in r){const a=n.list.get(o);if(!a)continue;let l=r[o];if(l){if(t){const h=t[o];if(!h)continue;const d=new Set,u=new Set;for(const f of l)h.has(f)?d.add(f):u.add(f);l=d,u.size?r[o]=u:delete r[o]}this.backupColor?a.setColor(this.backupColor,l):a.resetColor(l)}}t||(this.selection[s]={}),this.events[s].onClear.trigger(null)}}setup(e){this.config={...this.config,...e},this.add(this.config.selectName,this.config.selectionColor),this.autoToggle.add(this.config.selectName),this.add(this.config.hoverName,this.config.hoverColor),this.setupEvents(!0),this.enabled=!0,this.isSetup=!0,this.onSetup.trigger(this)}updateFragments(e){for(const t of e)for(const i in this.selection){const s=this.selection[i][t.id],n=this.colors.get(i);s&&n&&t.setColor(n,s)}}async zoomSelection(e){if(!this.config.world)throw new Error("No world found in config!");const t=this.config.world;if(!t.camera.hasCameraControls())return;const i=this.components.get(On),s=this.components.get(ue);i.reset();const n=this.selection[e];if(!Object.keys(n).length)return;for(const p in n){const E=s.list.get(p);if(!E)continue;const I=n[p];i.addMesh(E.mesh,I)}const r=i.getSphere(),o=1/0,a=-1/0,{x:l,y:h,z:d}=r.center,u=r.radius===o||l===o||h===o||d===o,f=r.radius===a||l===a||h===a||d===a,m=r.radius===0;u||f||m||(r.radius*=this.zoomFactor,await t.camera.controls.fitToSphere(r,!0))}setupEvents(e){if(!this.config.world){console.log("No world found while setting up events!");return}if(this.config.world.isDisposing)return;if(!this.config.world.renderer)throw new Error("The given world doesn't have a renderer!");const t=this.config.world.renderer.three.domElement,i=this.events[this.config.selectName].onHighlight;i.remove(this.clearHover),i.remove(this.saveHighlightersBeforeSelect);const s=this.events[this.config.selectName].onClear;s.remove(this.restoreHighlightersAfterDeselect),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("pointermove",this.onMouseMove),e&&(i.add(this.clearHover),i.add(this.saveHighlightersBeforeSelect),s.add(this.restoreHighlightersAfterDeselect),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("pointermove",this.onMouseMove))}};y(Lc,"uuid","cb8a76f2-654a-4b50-80c6-66fd83cafd77");let Cm=Lc;class om extends de{constructor(){super(...arguments),y(this,"onDisposed",new Y),y(this,"world")}get enabled(){return!this.world||this.world.isDisposing?!1:this.getRenderer().postproduction.customEffects.outlineEnabled}set enabled(e){if(!this.world||this.world.isDisposing)return;const t=this.getRenderer();t.postproduction.customEffects.outlineEnabled=e}create(e,t){const i=this.getRenderer();if(i.postproduction.customEffects.outlinedMeshes[e]!==void 0)throw new Error(`There's already a style with the name ${e}.`);i.postproduction.customEffects.outlinedMeshes[e]={material:t,meshes:new Set}}add(e,t){const i=this.getRenderer(),s=this.getStyles()[e];if(!s)throw new Error(`The style ${e} does not exist`);const n=i.postproduction.customEffects.outlineScene,r=this.components.get(ue);for(const o in t){const a=r.list.get(o);if(!a)continue;const l=t[o],h=a.clone(l);h.mesh.position.set(0,0,0),h.mesh.rotation.set(0,0,0),h.mesh.applyMatrix4(a.mesh.matrixWorld),h.mesh.instanceColor=null,h.mesh.material=[s.material],s.meshes.add(h.mesh),n.add(h.mesh)}}clear(e){if(e){this.clearStyle(e,!1);return}const t=this.getStyles(),i=Object.keys(t);for(const s of i)this.clearStyle(s,!1);this.world=void 0}dispose(){if(this.world&&!this.world.isDisposing){const e=this.getStyles(),t=Object.keys(e);for(const i of t)this.clearStyle(i,!0)}this.onDisposed.trigger(),this.onDisposed.reset()}clearStyle(e,t){const i=this.getStyles(),s=i[e];if(!s)return;const n=this.components.get(Nt);for(const r of s.meshes){const o=r;o.fragment&&o.fragment.dispose(!1),n.destroy(r)}s.meshes.clear(),t&&(s.material.dispose(),delete i[e])}getStyles(){return this.getRenderer().postproduction.customEffects.outlinedMeshes}getRenderer(){if(!this.world)throw new Error("You must set a world to use the outliner!");const e=this.world.renderer;if(!e.postproduction)throw new Error("The world given to the outliner must use the postproduction renderer.");return e}}y(om,"uuid","2fd3bcc5-b3b6-4ded-9f64-f47a02854a10");class Lt extends de{constructor(){super(...arguments),y(this,"enabled",!1),y(this,"onDisposed",new Y),y(this,"onNavigated",new Y),y(this,"onExited",new Y),y(this,"planeType","section"),y(this,"offset",100),y(this,"list",new Map),y(this,"world"),y(this,"current",null),y(this,"cached3DCamera",{position:new x,target:new x,projection:"Perspective",zoom:1,top:10,bottom:-10,right:10,left:-10})}create(e){const t=this.getWorld(),{id:i,point:s,normal:n,type:r}=e;let{name:o,offset:a}=e;const l=this.components.get(Xi),h=l.Type;l.Type=Pn;const d=l.createFromNormalAndCoplanarPoint(t,n,s);d.visible=!1,d.edges.visible=!1,d.enabled=!1,o=o||i,a=a||this.offset,d.type=r||this.planeType,d.updateFill();const u=n.clone().multiplyScalar(-a).add(s),f=s.clone(),m={id:i,name:o,plane:d,offset:a,cached:{position:u,target:f,zoom:1,size:10}};return this.list.set(i,m),l.Type=h,m}delete(e){const t=this.list.get(e);t&&(t.plane.dispose(),this.list.delete(e))}async goTo(e,t=!1){var i;const s=this.getCamera();if(((i=this.current)==null?void 0:i.id)===e)return;const n=this.list.get(e);if(!n)throw new Error(`There's no section with the ID: ${e}.`);this.cacheCameraPosition(),await this.hidePreviousClippingPlane(),await s.projection.set("Orthographic"),this.current=n;const r=new x,o=new x,{cached:a}=n,{position:l,target:h}=a;r.copy(h),o.copy(l),await s.controls.setLookAt(o.x,o.y,o.z,r.x,r.y,r.z,t);const d=n.cached.size,u=s.threePersp.aspect;s.threeOrtho.top=d,s.threeOrtho.bottom=-d,s.threeOrtho.left=-d*u,s.threeOrtho.right=d*u,s.threeOrtho.updateProjectionMatrix(),await s.controls.zoomTo(a.zoom,!1),s.set("Plan"),this.current.plane&&(this.current.plane.enabled=!0,this.current.plane.edges.fillNeedsUpdate=!0,this.current.plane.edges.visible=!0),this.enabled=!0,this.onNavigated.trigger({id:e})}async exit(e=!1){if(!this.enabled||!this.world)return;this.cacheCameraPosition();const t=this.getCamera();t.set("Orbit");const{position:i,target:s,projection:n}=this.cached3DCamera;await t.projection.set(n),this.current&&(this.current.plane.enabled=!1,this.current.plane.edges.enabled=!1,this.current.plane.edges.visible=!1),this.current=null;const{x:r,y:o,z:a}=i,{x:l,y:h,z:d}=s;await t.controls.setLookAt(r,o,a,l,h,d,e),t.projection.current==="Orthographic"&&(await t.controls.zoomTo(this.cached3DCamera.zoom,!1),t.threeOrtho.left=this.cached3DCamera.left,t.threeOrtho.right=this.cached3DCamera.right,t.threeOrtho.top=this.cached3DCamera.top,t.threeOrtho.bottom=this.cached3DCamera.bottom),this.enabled=!1,this.onExited.trigger()}dispose(){for(const[,{plane:e}]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}getWorld(){if(!this.world)throw new Error("World is needed to create sections!");return this.world}getCamera(){const e=this.getWorld().camera;if(!e.hasCameraControls()||!e.projection)throw new Error("The world given to sections must have an OrthoPerspective camera.");return e}cacheCameraPosition(){if(!this.world)throw new Error("World is needed to create clipping planes!");const e=this.getCamera();if(this.enabled){if(!this.current)throw new Error("Current section not found!");const{cached:t}=this.current,{position:i,target:s}=t;e.controls.getPosition(i),e.controls.getTarget(s),t.zoom=e.threeOrtho.zoom,t.size=e.threeOrtho.top}else{e.three.getWorldPosition(this.cached3DCamera.position),e.controls.getTarget(this.cached3DCamera.target),this.cached3DCamera.projection=e.projection.current,this.cached3DCamera.zoom=e.threeOrtho.zoom;const{top:t,bottom:i,left:s,right:n}=e.threeOrtho;this.cached3DCamera.top=t,this.cached3DCamera.bottom=i,this.cached3DCamera.left=s,this.cached3DCamera.right=n}}async hidePreviousClippingPlane(){if(this.current){const e=this.current.plane;e&&(e.enabled=!1),this.current.plane.edges.visible=!1}}}y(Lt,"uuid","45b41ba3-7bb8-4e08-909f-e0fa87973965");const Dc=class _c extends de{constructor(e){super(e),y(this,"onDisposed",new Y),y(this,"planeType","floorplan"),y(this,"onNavigated",new Y),y(this,"onExited",new Y),y(this,"enabled",!1),y(this,"currentPlan",null),y(this,"offset",1.5),y(this,"list",[]),y(this,"_cachedPlanCamera",null),this.components.add(_c.uuid,this)}get world(){return this.components.get(Lt).world}set world(e){const t=this.components.get(Lt);t.world=e}get defaultCameraOffset(){return this.components.get(Lt).offset}set defaultCameraOffset(e){const t=this.components.get(Lt);t.offset=e}dispose(){this.onExited.reset(),this.onNavigated.reset();const e=this.components.get(Lt);for(const t of this.list)e.delete(t.id);this.list=[],this.onDisposed.trigger(),this.onDisposed.reset()}async generate(e){if(!e.hasProperties)throw new Error("Properties are needed to compute plan views!");const t=await e.getAllPropertiesOfType(Mn);if(!t)throw new Error("Floorplans not found!");const i=e.coordinationMatrix.elements[13],s=await fi.getUnits(e);for(const n of Object.values(t)){const r={value:0};this.getAbsoluteFloorHeight(n.ObjectPlacement,r);const o=r.value*s+i+this.offset;this.create({name:n.Name.value,id:n.GlobalId.value,normal:new x(0,-1,0),point:new x(0,o,0)})}}create(e){const t=this.components.get(Lt);e.type=e.type||this.planeType;const i={...t.create(e),planOffset:this.offset};this.list.push(i)}async goTo(e,t=!1){this.enabled&&this.cachePlanCamera(),await this.components.get(Lt).goTo(e,t),await this.applyCachedPlanCamera();const i=this.list.find(s=>s.id===e);i&&(this.currentPlan=i),this.enabled=!0}async exitPlanView(e=!1){this.enabled&&(this.cachePlanCamera(),await this.components.get(Lt).exit(e),this.currentPlan=null,this.enabled=!1,this.onExited.trigger())}cachePlanCamera(){var e;const t=(e=this.world)==null?void 0:e.camera,i=new x,s=new x;t.controls.getTarget(i),t.controls.getPosition(s),this._cachedPlanCamera={target:i,position:s,zoom:t.threeOrtho.zoom,top:t.threeOrtho.top,right:t.threeOrtho.right,bottom:t.threeOrtho.bottom,left:t.threeOrtho.left}}async applyCachedPlanCamera(){var e;if(!this._cachedPlanCamera)return;const t=(e=this.world)==null?void 0:e.camera,{position:i,target:s}=this._cachedPlanCamera,n=new x,r=new x;t.controls.getPosition(n),t.controls.getTarget(r);const o=n.y,a=r.y;await t.controls.setLookAt(i.x,o,i.z,s.x,a,s.z),await t.controls.zoomTo(this._cachedPlanCamera.zoom),t.threeOrtho.top=this._cachedPlanCamera.top,t.threeOrtho.bottom=this._cachedPlanCamera.bottom,t.threeOrtho.left=this._cachedPlanCamera.left,t.threeOrtho.right=this._cachedPlanCamera.right,t.threeOrtho.updateProjectionMatrix()}getAbsoluteFloorHeight(e,t){const i=e.RelativePlacement.Location.Coordinates;t.value+=i[2].value,e.PlacementRelTo&&this.getAbsoluteFloorHeight(e.PlacementRelTo,t)}};y(Dc,"uuid","a80874aa-1c93-43a4-80f2-df346da086b1");let Tm=Dc;export{Br as L,Lt as O,ai as P,om as Y,Pn as a,um as b,fm as c,gm as d,Em as f,mm as h,hp as j,pm as l,Tm as m,cm as n,dm as o,Cm as p,hm as r,lm as s,Es as t,Im as u,un as v}; diff --git a/examples/assets/index-BqrBcJfH.js b/examples/assets/index-BvJCnCKo.js similarity index 98% rename from examples/assets/index-BqrBcJfH.js rename to examples/assets/index-BvJCnCKo.js index 0da878df..137f4823 100644 --- a/examples/assets/index-BqrBcJfH.js +++ b/examples/assets/index-BvJCnCKo.js @@ -1,4 +1,4 @@ -var S=Object.defineProperty;var x=(o,i,e)=>i in o?S(o,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[i]=e;var t=(o,i,e)=>(x(o,typeof i!="symbol"?i+"":i,e),e);import{V as _,C as l,H as D,D as E,A as P,J as p,p as m,$ as F,a0 as U,y as k,a as M}from"./web-ifc-api-CpQ3aV8c.js";import{g as b,E as a,D as w,h as y,i as L,S as f,j as R}from"./index-B_pEH4rh.js";class Z extends b{constructor(){super(...arguments);t(this,"onAfterUpdate",new a);t(this,"onBeforeUpdate",new a);t(this,"onDisposed",new a);t(this,"onResize",new a);t(this,"onClippingPlanesUpdated",new a);t(this,"clippingPlanes",[])}updateClippingPlanes(){this.onClippingPlanesUpdated.trigger()}setPlane(e,s,n){s.isLocal=n;const r=this.clippingPlanes.indexOf(s);e&&r===-1?this.clippingPlanes.push(s):!e&&r>-1&&this.clippingPlanes.splice(r,1),this.three.clippingPlanes=this.clippingPlanes.filter(h=>!h.isLocal)}}class A extends b{constructor(e){super(e);t(this,"onDisposed",new a);t(this,"directionalLights",new Map);t(this,"ambientLights",new Map)}dispose(){const e=this.components.get(w);for(const s of this.three.children){const n=s;n.geometry&&e.destroy(n)}this.deleteAllLights(),this.three.children=[],this.onDisposed.trigger(),this.onDisposed.reset()}deleteAllLights(){for(const[,e]of this.directionalLights)e.removeFromParent(),e.target.removeFromParent(),e.dispose();this.directionalLights.clear();for(const[,e]of this.ambientLights)e.removeFromParent(),e.dispose();this.ambientLights.clear()}}class B{constructor(i,e){t(this,"_list");t(this,"_scene");this._list=i,this._scene=e}get color(){return this._list.directionalLight.color.value}set color(i){this._list.directionalLight.color.value=i;for(const[,e]of this._scene.directionalLights)e.color.copy(i)}get intensity(){return this._list.directionalLight.intensity.value}set intensity(i){this._list.directionalLight.intensity.value=i;for(const[,e]of this._scene.directionalLights)e.intensity=i}get position(){return this._list.directionalLight.position.value.clone()}set position(i){this._list.directionalLight.position.value=i;for(const[,e]of this._scene.directionalLights)e.position.copy(i)}}class N{constructor(i,e){t(this,"_list");t(this,"_scene");this._list=i,this._scene=e}get color(){return this._list.ambientLight.color.value}set color(i){this._list.ambientLight.color.value=i;for(const[,e]of this._scene.ambientLights)e.color.copy(i)}get intensity(){return this._list.ambientLight.intensity.value}set intensity(i){this._list.ambientLight.intensity.value=i;for(const[,e]of this._scene.ambientLights)e.intensity=i}}class O extends y{constructor(){super(...arguments);t(this,"_config",{backgroundColor:{value:new l,type:"Color"},ambientLight:{color:{type:"Color",value:new l},intensity:{type:"Number",interpolable:!0,min:0,max:10,value:2}},directionalLight:{color:{type:"Color",value:new l},intensity:{type:"Number",interpolable:!0,min:0,max:10,value:2},position:{type:"Vector3",value:new _}}});t(this,"ambientLight",new N(this._config,this._component));t(this,"directionalLight",new B(this._config,this._component))}get backgroundColor(){return this._config.backgroundColor.value}set backgroundColor(e){this._config.backgroundColor.value=e,this._component.three.background=e}}class j extends A{constructor(e){super(e);t(this,"onSetup",new a);t(this,"isSetup",!1);t(this,"three");t(this,"config",new O(this,this.components,"Scene"));t(this,"_defaultConfig",{backgroundColor:new l(2107698),directionalLight:{color:new l("white"),intensity:1.5,position:new _(5,10,3)},ambientLight:{color:new l("white"),intensity:1}});this.three=new D,this.three.background=new l(2107698)}setup(e){const s={...this._defaultConfig,...e};this.config.backgroundColor=s.backgroundColor;const n=s.ambientLight;this.config.ambientLight.color=n.color,this.config.ambientLight.intensity=n.intensity;const r=s.directionalLight;this.config.directionalLight.color=r.color,this.config.directionalLight.intensity=r.intensity,this.config.directionalLight.position=r.position,this.deleteAllLights();const{color:h,intensity:g}=this.config.directionalLight,c=new E(h,g);c.position.copy(r.position);const{color:z,intensity:C}=this.config.directionalLight,u=new P(z,C);this.three.add(c,u),this.directionalLights.set(c.uuid,c),this.ambientLights.set(u.uuid,u),this.isSetup=!0,this.onSetup.trigger()}dispose(){super.dispose(),this.components.get(L).list.delete(this.config.uuid)}}class I extends Z{constructor(e,s,n){super(e);t(this,"enabled",!0);t(this,"container");t(this,"three");t(this,"_canvas");t(this,"_parameters");t(this,"_resizeObserver",null);t(this,"onContainerUpdated",new a);t(this,"_resizing",!1);t(this,"resize",e=>{if(this._resizing)return;this._resizing=!0,this.onContainerUpdated.trigger();const s=e?e.x:this.container.clientWidth,n=e?e.y:this.container.clientHeight;this.three.setSize(s,n),this.onResize.trigger(new m(s,n)),this._resizing=!1});t(this,"resizeEvent",()=>{this.resize()});t(this,"onContextLost",e=>{e.preventDefault(),this.enabled=!1});t(this,"onContextBack",()=>{this.three.setRenderTarget(null),this.three.dispose(),this.three=new p({canvas:this._canvas,antialias:!0,alpha:!0,...this._parameters}),this.enabled=!0});this.container=s,this._parameters=n,this.three=new p({antialias:!0,alpha:!0,...n}),this.three.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.setupRenderer(),this.setupEvents(!0),this.resize(),this._canvas=this.three.domElement;const r=this.three.getContext(),{canvas:h}=r;h.addEventListener("webglcontextlost",this.onContextLost,!1),h.addEventListener("webglcontextrestored",this.onContextBack,!1)}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger(this);const e=this.currentWorld.scene.three,s=this.currentWorld.camera.three;this.three.render(e,s),this.onAfterUpdate.trigger(this)}dispose(){this.enabled=!1,this.setupEvents(!1),this.three.domElement.remove(),this.three.forceContextLoss(),this.three.dispose(),this.onResize.reset(),this.onAfterUpdate.reset(),this.onBeforeUpdate.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}getSize(){return new m(this.three.domElement.clientWidth,this.three.domElement.clientHeight)}setupEvents(e){const s=this.three.domElement.parentElement;if(!s)throw new Error("This renderer needs to have an HTML container!");this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),window.removeEventListener("resize",this.resizeEvent),e&&(this._resizeObserver=new ResizeObserver(this.resizeEvent),this._resizeObserver.observe(s),window.addEventListener("resize",this.resizeEvent))}setupRenderer(){this.three.localClippingEnabled=!0,this.container&&this.container.appendChild(this.three.domElement),this.onContainerUpdated.trigger()}}class G extends y{constructor(){super(...arguments);t(this,"_config",{visible:{value:!0,type:"Boolean"},color:{value:new l,type:"Color"},primarySize:{type:"Number",interpolable:!0,value:1,min:0,max:1e3},secondarySize:{type:"Number",interpolable:!0,value:10,min:0,max:1e3},distance:{type:"Number",interpolable:!0,value:500,min:0,max:500}})}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e,this._component.visible=e}get color(){return this._config.color.value}set color(e){this._config.color.value=e,this._component.material.uniforms.uColor.value=e,this._component.material.uniformsNeedUpdate=!0}get primarySize(){return this._config.primarySize.value}set primarySize(e){this._config.primarySize.value=e,this._component.material.uniforms.uSize1.value=e,this._component.material.uniformsNeedUpdate=!0}get secondarySize(){return this._config.secondarySize.value}set secondarySize(e){this._config.secondarySize.value=e,this._component.material.uniforms.uSize2.value=e,this._component.material.uniformsNeedUpdate=!0}get distance(){return this._config.distance.value}set distance(e){this._config.distance.value=e,this._component.material.uniforms.uDistance.value=e,this._component.material.uniformsNeedUpdate=!0}}class W{constructor(i,e){t(this,"onDisposed",new a);t(this,"onSetup",new a);t(this,"isSetup",!1);t(this,"world");t(this,"components");t(this,"config");t(this,"_defaultConfig",{visible:!0,color:new l(12303291),primarySize:1,secondarySize:10,distance:500});t(this,"three");t(this,"_fade",3);t(this,"updateZoom",()=>{this.world.camera instanceof f&&(this.material.uniforms.uZoom.value=this.world.camera.three.zoom)});this.world=e;const{color:s,primarySize:n,secondarySize:r,distance:h}=this._defaultConfig;this.components=i,this.config=new G(this,this.components,"Grid");const g=new F(2,2,1,1),c=new U({side:k,uniforms:{uSize1:{value:n},uSize2:{value:r},uColor:{value:s},uDistance:{value:h},uFade:{value:this._fade},uZoom:{value:1}},transparent:!0,vertexShader:` +var S=Object.defineProperty;var x=(o,i,e)=>i in o?S(o,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[i]=e;var t=(o,i,e)=>(x(o,typeof i!="symbol"?i+"":i,e),e);import{V as _,C as l,H as D,D as E,A as P,J as p,p as m,$ as F,a0 as U,y as k,a as M}from"./web-ifc-api-nU1-R_1k.js";import{g as b,E as a,D as w,h as y,i as L,S as f,j as R}from"./index-BboVOtPt.js";class Z extends b{constructor(){super(...arguments);t(this,"onAfterUpdate",new a);t(this,"onBeforeUpdate",new a);t(this,"onDisposed",new a);t(this,"onResize",new a);t(this,"onClippingPlanesUpdated",new a);t(this,"clippingPlanes",[])}updateClippingPlanes(){this.onClippingPlanesUpdated.trigger()}setPlane(e,s,n){s.isLocal=n;const r=this.clippingPlanes.indexOf(s);e&&r===-1?this.clippingPlanes.push(s):!e&&r>-1&&this.clippingPlanes.splice(r,1),this.three.clippingPlanes=this.clippingPlanes.filter(h=>!h.isLocal)}}class A extends b{constructor(e){super(e);t(this,"onDisposed",new a);t(this,"directionalLights",new Map);t(this,"ambientLights",new Map)}dispose(){const e=this.components.get(w);for(const s of this.three.children){const n=s;n.geometry&&e.destroy(n)}this.deleteAllLights(),this.three.children=[],this.onDisposed.trigger(),this.onDisposed.reset()}deleteAllLights(){for(const[,e]of this.directionalLights)e.removeFromParent(),e.target.removeFromParent(),e.dispose();this.directionalLights.clear();for(const[,e]of this.ambientLights)e.removeFromParent(),e.dispose();this.ambientLights.clear()}}class B{constructor(i,e){t(this,"_list");t(this,"_scene");this._list=i,this._scene=e}get color(){return this._list.directionalLight.color.value}set color(i){this._list.directionalLight.color.value=i;for(const[,e]of this._scene.directionalLights)e.color.copy(i)}get intensity(){return this._list.directionalLight.intensity.value}set intensity(i){this._list.directionalLight.intensity.value=i;for(const[,e]of this._scene.directionalLights)e.intensity=i}get position(){return this._list.directionalLight.position.value.clone()}set position(i){this._list.directionalLight.position.value=i;for(const[,e]of this._scene.directionalLights)e.position.copy(i)}}class N{constructor(i,e){t(this,"_list");t(this,"_scene");this._list=i,this._scene=e}get color(){return this._list.ambientLight.color.value}set color(i){this._list.ambientLight.color.value=i;for(const[,e]of this._scene.ambientLights)e.color.copy(i)}get intensity(){return this._list.ambientLight.intensity.value}set intensity(i){this._list.ambientLight.intensity.value=i;for(const[,e]of this._scene.ambientLights)e.intensity=i}}class O extends y{constructor(){super(...arguments);t(this,"_config",{backgroundColor:{value:new l,type:"Color"},ambientLight:{color:{type:"Color",value:new l},intensity:{type:"Number",interpolable:!0,min:0,max:10,value:2}},directionalLight:{color:{type:"Color",value:new l},intensity:{type:"Number",interpolable:!0,min:0,max:10,value:2},position:{type:"Vector3",value:new _}}});t(this,"ambientLight",new N(this._config,this._component));t(this,"directionalLight",new B(this._config,this._component))}get backgroundColor(){return this._config.backgroundColor.value}set backgroundColor(e){this._config.backgroundColor.value=e,this._component.three.background=e}}class j extends A{constructor(e){super(e);t(this,"onSetup",new a);t(this,"isSetup",!1);t(this,"three");t(this,"config",new O(this,this.components,"Scene"));t(this,"_defaultConfig",{backgroundColor:new l(2107698),directionalLight:{color:new l("white"),intensity:1.5,position:new _(5,10,3)},ambientLight:{color:new l("white"),intensity:1}});this.three=new D,this.three.background=new l(2107698)}setup(e){const s={...this._defaultConfig,...e};this.config.backgroundColor=s.backgroundColor;const n=s.ambientLight;this.config.ambientLight.color=n.color,this.config.ambientLight.intensity=n.intensity;const r=s.directionalLight;this.config.directionalLight.color=r.color,this.config.directionalLight.intensity=r.intensity,this.config.directionalLight.position=r.position,this.deleteAllLights();const{color:h,intensity:g}=this.config.directionalLight,c=new E(h,g);c.position.copy(r.position);const{color:z,intensity:C}=this.config.directionalLight,u=new P(z,C);this.three.add(c,u),this.directionalLights.set(c.uuid,c),this.ambientLights.set(u.uuid,u),this.isSetup=!0,this.onSetup.trigger()}dispose(){super.dispose(),this.components.get(L).list.delete(this.config.uuid)}}class I extends Z{constructor(e,s,n){super(e);t(this,"enabled",!0);t(this,"container");t(this,"three");t(this,"_canvas");t(this,"_parameters");t(this,"_resizeObserver",null);t(this,"onContainerUpdated",new a);t(this,"_resizing",!1);t(this,"resize",e=>{if(this._resizing)return;this._resizing=!0,this.onContainerUpdated.trigger();const s=e?e.x:this.container.clientWidth,n=e?e.y:this.container.clientHeight;this.three.setSize(s,n),this.onResize.trigger(new m(s,n)),this._resizing=!1});t(this,"resizeEvent",()=>{this.resize()});t(this,"onContextLost",e=>{e.preventDefault(),this.enabled=!1});t(this,"onContextBack",()=>{this.three.setRenderTarget(null),this.three.dispose(),this.three=new p({canvas:this._canvas,antialias:!0,alpha:!0,...this._parameters}),this.enabled=!0});this.container=s,this._parameters=n,this.three=new p({antialias:!0,alpha:!0,...n}),this.three.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.setupRenderer(),this.setupEvents(!0),this.resize(),this._canvas=this.three.domElement;const r=this.three.getContext(),{canvas:h}=r;h.addEventListener("webglcontextlost",this.onContextLost,!1),h.addEventListener("webglcontextrestored",this.onContextBack,!1)}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger(this);const e=this.currentWorld.scene.three,s=this.currentWorld.camera.three;this.three.render(e,s),this.onAfterUpdate.trigger(this)}dispose(){this.enabled=!1,this.setupEvents(!1),this.three.domElement.remove(),this.three.forceContextLoss(),this.three.dispose(),this.onResize.reset(),this.onAfterUpdate.reset(),this.onBeforeUpdate.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}getSize(){return new m(this.three.domElement.clientWidth,this.three.domElement.clientHeight)}setupEvents(e){const s=this.three.domElement.parentElement;if(!s)throw new Error("This renderer needs to have an HTML container!");this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),window.removeEventListener("resize",this.resizeEvent),e&&(this._resizeObserver=new ResizeObserver(this.resizeEvent),this._resizeObserver.observe(s),window.addEventListener("resize",this.resizeEvent))}setupRenderer(){this.three.localClippingEnabled=!0,this.container&&this.container.appendChild(this.three.domElement),this.onContainerUpdated.trigger()}}class G extends y{constructor(){super(...arguments);t(this,"_config",{visible:{value:!0,type:"Boolean"},color:{value:new l,type:"Color"},primarySize:{type:"Number",interpolable:!0,value:1,min:0,max:1e3},secondarySize:{type:"Number",interpolable:!0,value:10,min:0,max:1e3},distance:{type:"Number",interpolable:!0,value:500,min:0,max:500}})}get visible(){return this._config.visible.value}set visible(e){this._config.visible.value=e,this._component.visible=e}get color(){return this._config.color.value}set color(e){this._config.color.value=e,this._component.material.uniforms.uColor.value=e,this._component.material.uniformsNeedUpdate=!0}get primarySize(){return this._config.primarySize.value}set primarySize(e){this._config.primarySize.value=e,this._component.material.uniforms.uSize1.value=e,this._component.material.uniformsNeedUpdate=!0}get secondarySize(){return this._config.secondarySize.value}set secondarySize(e){this._config.secondarySize.value=e,this._component.material.uniforms.uSize2.value=e,this._component.material.uniformsNeedUpdate=!0}get distance(){return this._config.distance.value}set distance(e){this._config.distance.value=e,this._component.material.uniforms.uDistance.value=e,this._component.material.uniformsNeedUpdate=!0}}class W{constructor(i,e){t(this,"onDisposed",new a);t(this,"onSetup",new a);t(this,"isSetup",!1);t(this,"world");t(this,"components");t(this,"config");t(this,"_defaultConfig",{visible:!0,color:new l(12303291),primarySize:1,secondarySize:10,distance:500});t(this,"three");t(this,"_fade",3);t(this,"updateZoom",()=>{this.world.camera instanceof f&&(this.material.uniforms.uZoom.value=this.world.camera.three.zoom)});this.world=e;const{color:s,primarySize:n,secondarySize:r,distance:h}=this._defaultConfig;this.components=i,this.config=new G(this,this.components,"Grid");const g=new F(2,2,1,1),c=new U({side:k,uniforms:{uSize1:{value:n},uSize2:{value:r},uColor:{value:s},uDistance:{value:h},uFade:{value:this._fade},uZoom:{value:1}},transparent:!0,vertexShader:` varying vec3 worldPosition; diff --git a/examples/assets/index-C8rcJyf0.js b/examples/assets/index-C8rcJyf0.js new file mode 100644 index 00000000..895dda4b --- /dev/null +++ b/examples/assets/index-C8rcJyf0.js @@ -0,0 +1,310 @@ +import{V as U,p as Ht,t as ds,u as ie,T as rs,S as Li,v as wt,w as La,q as Ys,o as Vs,x as wa,y as ks,z as cr,n as It,W as Oi,H as wi,C as Mt,J as zs,b as ls,s as Ve,K as Vi,N as Ln,Q as ze,P as wn,U as yi,X as Ma,Y as se,Z as va,_ as Da,$ as Mi,a0 as co,a as et,O as Ni,L as lo,a1 as xt,B as Dt,a2 as lr,a3 as Zs,a4 as Ae,a5 as Ts,a6 as ba,a7 as Ua,a8 as Be,I as Mn,a9 as vn,aa as Dn,ab as bn,ac as Ge,ad as xa,ae as hs,af as hr,f as Ba,ag as vi,ah as Di,ai as Ya,aj as Va,ak as za,al as Ga,am as ka,an as ho,ao as uo,ap as Un,aq as xn,ar as Bn,as as Hs,at as Yn,au as Vn,av as zn,aw as Gn,ax as kn,ay as Hn,az as Wn,aA as Xn,aB as $n,aC as xs,aD as he,d as as,e as gi,aE as Ne,aF as Ha,aG as Wa,aH as Xa,aI as $a,aJ as Za,aK as ja,aL as qa,aM as us,aN as Qa,aO as Ka,aP as Ja,aQ as tc,g as de,aR as He,aS as ec,aT as sc,aU as ur,aV as fr,D as fo,A as ic,b8 as dr,ba as nc,bc as rc,bs as oc,E as ac}from"./web-ifc-api-nU1-R_1k.js";var cc=Object.defineProperty,lc=(l,t,e)=>t in l?cc(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e,p=(l,t,e)=>(lc(l,typeof t!="symbol"?t+"":t,e),e);const Io=0,hc=1,uc=2,Ir=2,zi=1.25,Er=1,Ri=6*4+4+4,bi=65535,fc=Math.pow(2,-24),Gi=Symbol("SKIP_GENERATION");function dc(l){return l.index?l.index.count:l.attributes.position.count}function Is(l){return dc(l)/3}function Ic(l,t=ArrayBuffer){return l>65535?new Uint32Array(new t(4*l)):new Uint16Array(new t(2*l))}function Ec(l,t){if(!l.index){const e=l.attributes.position.count,s=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i=Ic(e,s);l.setIndex(new Vs(i,1));for(let n=0;no-a);for(let o=0;on.offset-r.offset),s=e[e.length-1];s.count=Math.min(t-s.offset,s.count);let i=0;return e.forEach(({count:n})=>i+=n),t!==i}function Ot(l,t,e){return e.min.x=t[l],e.min.y=t[l+1],e.min.z=t[l+2],e.max.x=t[l+3],e.max.y=t[l+4],e.max.z=t[l+5],e}function Cc(l){l[0]=l[1]=l[2]=1/0,l[3]=l[4]=l[5]=-1/0}function pr(l){let t=-1,e=-1/0;for(let s=0;s<3;s++){const i=l[s+3]-l[s];i>e&&(e=i,t=s)}return t}function Cr(l,t){t.set(l)}function Tr(l,t,e){let s,i;for(let n=0;n<3;n++){const r=n+3;s=l[n],i=t[n],e[n]=si?s:i}}function js(l,t,e){for(let s=0;s<3;s++){const i=t[l+2*s],n=t[l+2*s+1],r=i-n,o=i+n;re[s+3]&&(e[s+3]=o)}}function ms(l){const t=l[3]-l[0],e=l[4]-l[1],s=l[5]-l[2];return 2*(t*e+e*s+s*t)}function ki(l,t,e,s,i=null){let n=1/0,r=1/0,o=1/0,a=-1/0,c=-1/0,h=-1/0,d=1/0,u=1/0,f=1/0,I=-1/0,E=-1/0,T=-1/0;const C=i!==null;for(let g=t*6,S=(t+e)*6;ga&&(a=N),C&&mI&&(I=m);const w=l[g+2],P=l[g+3],v=w-P,Y=w+P;vc&&(c=Y),C&&wE&&(E=w);const O=l[g+4],M=l[g+5],R=O-M,D=O+M;Rh&&(h=D),C&&OT&&(T=O)}s[0]=n,s[1]=r,s[2]=o,s[3]=a,s[4]=c,s[5]=h,C&&(i[0]=d,i[1]=u,i[2]=f,i[3]=I,i[4]=E,i[5]=T)}function Tc(l,t,e,s){let i=1/0,n=1/0,r=1/0,o=-1/0,a=-1/0,c=-1/0;for(let h=t*6,d=(t+e)*6;ho&&(o=u);const f=l[h+2];fa&&(a=f);const I=l[h+4];Ic&&(c=I)}s[0]=i,s[1]=n,s[2]=r,s[3]=o,s[4]=a,s[5]=c}function mc(l,t){Cc(t);const e=l.attributes.position,s=l.index?l.index.array:null,i=Is(l),n=new Float32Array(i*6),r=e.normalized,o=e.array,a=e.offset||0;let c=3;e.isInterleavedBufferAttribute&&(c=e.data.stride);const h=["getX","getY","getZ"];for(let d=0;dy&&(y=S),m>y&&(y=m);const N=(y-F)/2,w=C*2;n[f+w+0]=F+N,n[f+w+1]=N+(Math.abs(F)+N)*fc,Ft[C+3]&&(t[C+3]=y)}}return n}const Ie=32,gc=(l,t)=>l.candidate-t.candidate,Fe=new Array(Ie).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),qs=new Float32Array(6);function Rc(l,t,e,s,i,n){let r=-1,o=0;if(n===Io)r=pr(t),r!==-1&&(o=(t[r]+t[r+3])/2);else if(n===hc)r=pr(l),r!==-1&&(o=Ac(e,s,i,r));else if(n===uc){const a=ms(l);let c=zi*i;const h=s*6,d=(s+i)*6;for(let u=0;u<3;u++){const f=t[u],T=(t[u+3]-f)/Ie;if(i=N.candidate?js(m,e,N.rightCacheBounds):(js(m,e,N.leftCacheBounds),N.count++)}}for(let m=0;m=Ie&&(y=Ie-1);const N=Fe[y];N.count++,js(S,e,N.bounds)}const C=Fe[Ie-1];Cr(C.bounds,C.rightCacheBounds);for(let S=Ie-2;S>=0;S--){const m=Fe[S],F=Fe[S+1];Tr(m.bounds,F.rightCacheBounds,m.rightCacheBounds)}let g=0;for(let S=0;S=a;)o--;if(r=a;)o--;if(r2**16,i=s?4:2,n=t?new SharedArrayBuffer(e*i):new ArrayBuffer(e*i),r=s?new Uint32Array(n):new Uint16Array(n);for(let o=0,a=r.length;o=i&&(d=!0,n&&(console.warn(`MeshBVH: Max depth of ${i} reached when generating BVH. Consider increasing maxDepth.`),console.warn(e))),y<=r||w>=i)return g(F+y),m.offset=F,m.count=y,m;const P=Rc(m.boundingData,N,I,F,y,o);if(P.axis===-1)return g(F+y),m.offset=F,m.count=y,m;const v=E(h,s,I,F,y,P);if(v===F||v===F+y)g(F+y),m.offset=F,m.count=y;else{m.splitAxis=P.axis;const Y=new Qs,O=F,M=v-F;m.left=Y,Y.boundingData=new Float32Array(6),ki(I,O,M,Y.boundingData,f),S(Y,O,M,f,w+1);const R=new Qs,D=v,$=y-M;m.right=R,R.boundingData=new Float32Array(6),ki(I,D,$,R.boundingData,f),S(R,D,$,f,w+1)}return m}}function Nc(l,t){const e=l.geometry;t.indirect&&(l._indirectBuffer=Oc(e,t.useSharedArrayBuffer),pc(e)&&!t.verbose&&console.warn('MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),l._indirectBuffer||Ec(e,t);const s=yc(l,t);let i,n,r;const o=[],a=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let d=0;dMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return n[f+6]=m/4,m=h(m,g),n[f+7]=S,m}}}class ge{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(t,e){let s=1/0,i=-1/0;for(let n=0,r=t.length;ni?a:i}this.min=s,this.max=i}setFromPoints(t,e){let s=1/0,i=-1/0;for(let n=0,r=e.length;ni?a:i}this.min=s,this.max=i}isSeparated(t){return this.min>t.max||t.min>this.max}}ge.prototype.setFromBox=function(){const l=new U;return function(e,s){const i=s.min,n=s.max;let r=1/0,o=-1/0;for(let a=0;a<=1;a++)for(let c=0;c<=1;c++)for(let h=0;h<=1;h++){l.x=i.x*a+n.x*(1-a),l.y=i.y*c+n.y*(1-c),l.z=i.z*h+n.z*(1-h);const d=e.dot(l);r=Math.min(d,r),o=Math.max(d,o)}this.min=r,this.max=o}}();const _c=function(){const l=new U,t=new U,e=new U;return function(i,n,r){const o=i.start,a=l,c=n.start,h=t;e.subVectors(o,c),l.subVectors(i.end,i.start),t.subVectors(n.end,n.start);const d=e.dot(h),u=h.dot(a),f=h.dot(h),I=e.dot(a),T=a.dot(a)*f-u*u;let C,g;T!==0?C=(d*u-I*f)/T:C=0,g=(d+C*u)/f,r.x=C,r.y=g}}(),Zn=function(){const l=new Ht,t=new U,e=new U;return function(i,n,r,o){_c(i,n,l);let a=l.x,c=l.y;if(a>=0&&a<=1&&c>=0&&c<=1){i.at(a,r),n.at(c,o);return}else if(a>=0&&a<=1){c<0?n.at(0,o):n.at(1,o),i.closestPointToPoint(o,!0,r);return}else if(c>=0&&c<=1){a<0?i.at(0,r):i.at(1,r),n.closestPointToPoint(r,!0,o);return}else{let h;a<0?h=i.start:h=i.end;let d;c<0?d=n.start:d=n.end;const u=t,f=e;if(i.closestPointToPoint(d,!0,t),n.closestPointToPoint(h,!0,e),u.distanceToSquared(d)<=f.distanceToSquared(h)){r.copy(u),o.copy(d);return}else{r.copy(h),o.copy(f);return}}}}(),Pc=function(){const l=new U,t=new U,e=new ds,s=new ie;return function(n,r){const{radius:o,center:a}=n,{a:c,b:h,c:d}=r;if(s.start=c,s.end=h,s.closestPointToPoint(a,!0,l).distanceTo(a)<=o||(s.start=c,s.end=d,s.closestPointToPoint(a,!0,l).distanceTo(a)<=o)||(s.start=h,s.end=d,s.closestPointToPoint(a,!0,l).distanceTo(a)<=o))return!0;const E=r.getPlane(e);if(Math.abs(E.distanceToPoint(a))<=o){const C=E.projectPoint(a,t);if(r.containsPoint(C))return!0}return!1}}(),Lc=1e-15;function Hi(l){return Math.abs(l)new U),this.satBounds=new Array(4).fill().map(()=>new ge),this.points=[this.a,this.b,this.c],this.sphere=new Li,this.plane=new ds,this.needsUpdate=!0}intersectsSphere(t){return Pc(t,this)}update(){const t=this.a,e=this.b,s=this.c,i=this.points,n=this.satAxes,r=this.satBounds,o=n[0],a=r[0];this.getNormal(o),a.setFromPoints(o,i);const c=n[1],h=r[1];c.subVectors(t,e),h.setFromPoints(c,i);const d=n[2],u=r[2];d.subVectors(e,s),u.setFromPoints(d,i);const f=n[3],I=r[3];f.subVectors(s,t),I.setFromPoints(f,i),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,t),this.needsUpdate=!1}}ne.prototype.closestPointToSegment=function(){const l=new U,t=new U,e=new ie;return function(i,n=null,r=null){const{start:o,end:a}=i,c=this.points;let h,d=1/0;for(let u=0;u<3;u++){const f=(u+1)%3;e.start.copy(c[u]),e.end.copy(c[f]),Zn(e,i,l,t),h=l.distanceToSquared(t),h=2){(m===1?C.start:C.end).copy(f),S=2;break}if(S++,S===2&&m===-1)break}}return S}return function(T,C=null,g=!1){this.needsUpdate&&this.update(),T.isExtendedTriangle?T.needsUpdate&&T.update():(l.copy(T),l.update(),T=l);const S=this.plane,m=T.plane;if(Math.abs(S.normal.dot(m.normal))>1-1e-10){const F=this.satBounds,y=this.satAxes;e[0]=T.a,e[1]=T.b,e[2]=T.c;for(let P=0;P<4;P++){const v=F[P],Y=y[P];if(s.setFromPoints(Y,e),v.isSeparated(s))return!1}const N=T.satBounds,w=T.satAxes;t[0]=this.a,t[1]=this.b,t[2]=this.c;for(let P=0;P<4;P++){const v=N[P],Y=w[P];if(s.setFromPoints(Y,t),v.isSeparated(s))return!1}for(let P=0;P<4;P++){const v=y[P];for(let Y=0;Y<4;Y++){const O=w[Y];if(n.crossVectors(v,O),s.setFromPoints(n,t),i.setFromPoints(n,e),s.isSeparated(i))return!1}}return C&&(g||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),C.start.set(0,0,0),C.end.set(0,0,0)),!0}else{const F=I(this,m,d);if(F===1&&T.containsPoint(d.end))return C&&(C.start.copy(d.end),C.end.copy(d.end)),!0;if(F!==2)return!1;const y=I(T,S,u);if(y===1&&this.containsPoint(u.end))return C&&(C.start.copy(u.end),C.end.copy(u.end)),!0;if(y!==2)return!1;if(d.delta(o),u.delta(a),o.dot(a)<0){let M=u.start;u.start=u.end,u.end=M}const N=d.start.dot(o),w=d.end.dot(o),P=u.start.dot(o),v=u.end.dot(o),Y=w0?C.start.copy(d.start):C.start.copy(u.start),c.subVectors(d.end,u.end),c.dot(o)<0?C.end.copy(d.end):C.end.copy(u.end)),!0)}}}();ne.prototype.distanceToPoint=function(){const l=new U;return function(e){return this.closestPointToPoint(e,l),e.distanceTo(l)}}();ne.prototype.distanceToTriangle=function(){const l=new U,t=new U,e=["a","b","c"],s=new ie,i=new ie;return function(r,o=null,a=null){const c=o||a?s:null;if(this.intersectsTriangle(r,c))return(o||a)&&(o&&c.getCenter(o),a&&c.getCenter(a)),0;let h=1/0;for(let d=0;d<3;d++){let u;const f=e[d],I=r[f];this.closestPointToPoint(I,l),u=I.distanceToSquared(l),unew U),this.satAxes=new Array(3).fill().map(()=>new U),this.satBounds=new Array(3).fill().map(()=>new ge),this.alignedSatBounds=new Array(3).fill().map(()=>new ge),this.needsUpdate=!1,t&&this.min.copy(t),e&&this.max.copy(e),s&&this.matrix.copy(s)}set(t,e,s){this.min.copy(t),this.max.copy(e),this.matrix.copy(s),this.needsUpdate=!0}copy(t){this.min.copy(t.min),this.max.copy(t.max),this.matrix.copy(t.matrix),this.needsUpdate=!0}}Vt.prototype.update=function(){return function(){const t=this.matrix,e=this.min,s=this.max,i=this.points;for(let c=0;c<=1;c++)for(let h=0;h<=1;h++)for(let d=0;d<=1;d++){const u=1*c|2*h|4*d,f=i[u];f.x=c?s.x:e.x,f.y=h?s.y:e.y,f.z=d?s.z:e.z,f.applyMatrix4(t)}const n=this.satBounds,r=this.satAxes,o=i[0];for(let c=0;c<3;c++){const h=r[c],d=n[c],u=1<new ie),e=new Array(12).fill().map(()=>new ie),s=new U,i=new U;return function(r,o=0,a=null,c=null){if(this.needsUpdate&&this.update(),this.intersectsBox(r))return(a||c)&&(r.getCenter(i),this.closestPointToPoint(i,s),r.closestPointToPoint(s,i),a&&a.copy(s),c&&c.copy(i)),0;const h=o*o,d=r.min,u=r.max,f=this.points;let I=1/0;for(let T=0;T<8;T++){const C=f[T];i.copy(C).clamp(d,u);const g=C.distanceToSquared(i);if(gnew ne)}}const Zt=new wc;function Gt(l,t){return t[l+15]===65535}function kt(l,t){return t[l+6]}function jt(l,t){return t[l+14]}function qt(l){return l+8}function Qt(l,t){return t[l+6]}function Co(l,t){return t[l+7]}class Mc{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const t=[];let e=null;this.setBuffer=s=>{e&&t.push(e),e=s,this.float32Array=new Float32Array(s),this.uint16Array=new Uint16Array(s),this.uint32Array=new Uint32Array(s)},this.clearBuffer=()=>{e=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,t.length!==0&&this.setBuffer(t.pop())}}}const Rt=new Mc;let Pe,os;const We=[],Ks=new jn(()=>new wt);function vc(l,t,e,s,i,n){Pe=Ks.getPrimitive(),os=Ks.getPrimitive(),We.push(Pe,os),Rt.setBuffer(l._roots[t]);const r=hn(0,l.geometry,e,s,i,n);Rt.clearBuffer(),Ks.releasePrimitive(Pe),Ks.releasePrimitive(os),We.pop(),We.pop();const o=We.length;return o>0&&(os=We[o-1],Pe=We[o-2]),r}function hn(l,t,e,s,i=null,n=0,r=0){const{float32Array:o,uint16Array:a,uint32Array:c}=Rt;let h=l*2;if(Gt(h,a)){const u=kt(l,c),f=jt(h,a);return Ot(l,o,Pe),s(u,f,!1,r,n+l,Pe)}else{let u=function(O){const{uint16Array:M,uint32Array:R}=Rt;let D=O*2;for(;!Gt(D,M);)O=qt(O),D=O*2;return kt(O,R)},f=function(O){const{uint16Array:M,uint32Array:R}=Rt;let D=O*2;for(;!Gt(D,M);)O=Qt(O,R),D=O*2;return kt(O,R)+jt(D,M)};const I=qt(l),E=Qt(l,c);let T=I,C=E,g,S,m,F;if(i&&(m=Pe,F=os,Ot(T,o,m),Ot(C,o,F),g=i(m),S=i(F),S(gs.copy(t).clamp(h.min,h.max),gs.distanceToSquared(t)),intersectsBounds:(h,d,u)=>u{h.closestPointToPoint(t,gs);const u=t.distanceToSquared(gs);return u0&&c.normal.multiplyScalar(-1));const h={a:n,b:r,c:o,normal:new U,materialIndex:0};rs.getNormal(Xe,$e,Ze,h.normal),c.face=h,c.faceIndex=n}return c}function Ui(l,t,e,s,i){const n=s*3;let r=n+0,o=n+1,a=n+2;const c=l.index;l.index&&(r=c.getX(r),o=c.getX(o),a=c.getX(a));const{position:h,normal:d,uv:u,uv1:f}=l.attributes,I=Uc(e,h,d,u,f,r,o,a,t);return I?(I.faceIndex=s,i&&i.push(I),I):null}function Pt(l,t,e,s){const i=l.a,n=l.b,r=l.c;let o=t,a=t+1,c=t+2;e&&(o=e.getX(o),a=e.getX(a),c=e.getX(c)),i.x=s.getX(o),i.y=s.getY(o),i.z=s.getZ(o),n.x=s.getX(a),n.y=s.getY(a),n.z=s.getZ(a),r.x=s.getX(c),r.y=s.getY(c),r.z=s.getZ(c)}function xc(l,t,e,s,i,n){const{geometry:r,_indirectBuffer:o}=l;for(let a=s,c=s+i;ay&&(y=O),MN&&(N=M),Rw&&(w=R)}return a[u+0]!==S||a[u+1]!==m||a[u+2]!==F||a[u+3]!==y||a[u+4]!==N||a[u+5]!==w?(a[u+0]=S,a[u+1]=m,a[u+2]=F,a[u+3]=y,a[u+4]=N,a[u+5]=w,!0):!1}else{const C=u+8,g=r[u+6],S=C+f,m=g+f;let F=I,y=!1,N=!1;t?F||(y=t.has(S),N=t.has(m),F=!y&&!N):(y=!0,N=!0);const w=F||y,P=F||N;let v=!1;w&&(v=d(C,f,F));let Y=!1;P&&(Y=d(g,f,F));const O=v||Y;if(O)for(let M=0;M<3;M++){const R=C+M,D=g+M,$=a[R],G=a[R+3],st=a[D],H=a[D+3];a[u+M]=$H?G:H}return O}}}const Ar=new wt;function Me(l,t,e,s){return Ot(l,t,Ar),e.intersectBox(Ar,s)}function zc(l,t,e,s,i,n){const{geometry:r,_indirectBuffer:o}=l;for(let a=s,c=s+i;a=0;let f,I;u?(f=qt(l),I=Qt(l,r)):(f=Qt(l,r),I=qt(l));const T=Me(f,i,s,Sr)?fn(f,t,e,s):null;if(T){const S=T.point[h];if(u?S<=i[I+c]:S>=i[I+c+3])return T}const g=Me(I,i,s,Sr)?fn(I,t,e,s):null;return T&&g?T.distance<=g.distance?T:g:T||g||null}}const ii=new wt,je=new ne,qe=new ne,Rs=new It,Or=new Vt,ni=new Vt;function $c(l,t,e,s){Rt.setBuffer(l._roots[t]);const i=dn(0,l,e,s);return Rt.clearBuffer(),i}function dn(l,t,e,s,i=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Rt;let a=l*2;if(i===null&&(e.boundingBox||e.computeBoundingBox(),Or.set(e.boundingBox.min,e.boundingBox.max,s),i=Or),Gt(a,r)){const h=t.geometry,d=h.index,u=h.attributes.position,f=e.index,I=e.attributes.position,E=kt(l,o),T=jt(a,r);if(Rs.copy(s).invert(),e.boundsTree)return Ot(l,n,ni),ni.matrix.copy(Rs),ni.needsUpdate=!0,e.boundsTree.shapecast({intersectsBounds:g=>ni.intersectsBox(g),intersectsTriangle:g=>{g.a.applyMatrix4(s),g.b.applyMatrix4(s),g.c.applyMatrix4(s),g.needsUpdate=!0;for(let S=E*3,m=(T+E)*3;SXi.distanceToBox(F),intersectsBounds:(F,y,N)=>N{if(t.boundsTree)return t.boundsTree.shapecast({boundsTraverseOrder:w=>As.distanceToBox(w),intersectsBounds:(w,P,v)=>v{for(let v=w,Y=w+P;vy&&(y=R),DN&&(N=D),$w&&(w=$)}}return a[u+0]!==S||a[u+1]!==m||a[u+2]!==F||a[u+3]!==y||a[u+4]!==N||a[u+5]!==w?(a[u+0]=S,a[u+1]=m,a[u+2]=F,a[u+3]=y,a[u+4]=N,a[u+5]=w,!0):!1}else{const C=u+8,g=r[u+6],S=C+f,m=g+f;let F=I,y=!1,N=!1;t?F||(y=t.has(S),N=t.has(m),F=!y&&!N):(y=!0,N=!0);const w=F||y,P=F||N;let v=!1;w&&(v=d(C,f,F));let Y=!1;P&&(Y=d(g,f,F));const O=v||Y;if(O)for(let M=0;M<3;M++){const R=C+M,D=g+M,$=a[R],G=a[R+3],st=a[D],H=a[D+3];a[u+M]=$H?G:H}return O}}}const yr=new U;function tl(l,t,e,s,i){Rt.setBuffer(l._roots[t]),In(0,l,e,s,i),Rt.clearBuffer()}function In(l,t,e,s,i){const{float32Array:n,uint16Array:r,uint32Array:o}=Rt,a=l*2;if(Gt(a,r)){const h=kt(l,o),d=jt(a,r);zc(t,e,s,h,d,i)}else{const h=qt(l);Me(h,n,s,yr)&&In(h,t,e,s,i);const d=Qt(l,o);Me(d,n,s,yr)&&In(d,t,e,s,i)}}const Nr=new U,el=["x","y","z"];function sl(l,t,e,s){Rt.setBuffer(l._roots[t]);const i=En(0,l,e,s);return Rt.clearBuffer(),i}function En(l,t,e,s){const{float32Array:i,uint16Array:n,uint32Array:r}=Rt;let o=l*2;if(Gt(o,n)){const c=kt(l,r),h=jt(o,n);return Gc(t,e,s,c,h)}else{const c=Co(l,r),h=el[c],u=s.direction[h]>=0;let f,I;u?(f=qt(l),I=Qt(l,r)):(f=Qt(l,r),I=qt(l));const T=Me(f,i,s,Nr)?En(f,t,e,s):null;if(T){const S=T.point[h];if(u?S<=i[I+c]:S>=i[I+c+3])return T}const g=Me(I,i,s,Nr)?En(I,t,e,s):null;return T&&g?T.distance<=g.distance?T:g:T||g||null}}const oi=new wt,Qe=new ne,Ke=new ne,Fs=new It,_r=new Vt,ai=new Vt;function il(l,t,e,s){Rt.setBuffer(l._roots[t]);const i=pn(0,l,e,s);return Rt.clearBuffer(),i}function pn(l,t,e,s,i=null){const{float32Array:n,uint16Array:r,uint32Array:o}=Rt;let a=l*2;if(i===null&&(e.boundingBox||e.computeBoundingBox(),_r.set(e.boundingBox.min,e.boundingBox.max,s),i=_r),Gt(a,r)){const h=t.geometry,d=h.index,u=h.attributes.position,f=e.index,I=e.attributes.position,E=kt(l,o),T=jt(a,r);if(Fs.copy(s).invert(),e.boundsTree)return Ot(l,n,ai),ai.matrix.copy(Fs),ai.needsUpdate=!0,e.boundsTree.shapecast({intersectsBounds:g=>ai.intersectsBox(g),intersectsTriangle:g=>{g.a.applyMatrix4(s),g.b.applyMatrix4(s),g.c.applyMatrix4(s),g.needsUpdate=!0;for(let S=E,m=T+E;S$i.distanceToBox(F),intersectsBounds:(F,y,N)=>N{if(t.boundsTree){const N=t.boundsTree;return N.shapecast({boundsTraverseOrder:w=>Ss.distanceToBox(w),intersectsBounds:(w,P,v)=>v{for(let v=w,Y=w+P;vnew wt),Je=new wt,ts=new wt,Zi=new wt,ji=new wt;let qi=!1;function hl(l,t,e,s){if(qi)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");qi=!0;const i=l._roots,n=t._roots;let r,o=0,a=0;const c=new It().copy(e).invert();for(let h=0,d=i.length;ha.slice()),index:r.array.slice(),indirectBuffer:n?n.slice():null}:o={roots:i,index:r.array,indirectBuffer:n},o}static deserialize(t,e,s={}){s={setIndex:!0,indirect:!!t.indirectBuffer,...s};const{index:i,roots:n,indirectBuffer:r}=t,o=new qn(e,{...s,[Gi]:!0});if(o._roots=n,o._indirectBuffer=r||null,s.setIndex){const a=e.getIndex();if(a===null){const c=new Vs(t.index,1,!1);e.setIndex(c)}else a.array!==i&&(a.array.set(i),a.needsUpdate=!0)}return o}get indirect(){return!!this._indirectBuffer}constructor(t,e={}){if(t.isBufferGeometry){if(t.index&&t.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(e=Object.assign({strategy:Io,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,indirect:!1,[Gi]:!1},e),e.useSharedArrayBuffer&&!ll())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=t,this._roots=null,this._indirectBuffer=null,e[Gi]||(Nc(this,e),!t.boundingBox&&e.setBoundingBox&&(t.boundingBox=this.getBoundingBox(new wt)));const{_indirectBuffer:s}=this;this.resolveTriangleIndex=e.indirect?i=>s[i]:i=>i}refit(t=null){return(this.indirect?Jc:Vc)(this,t)}traverse(t,e=0){const s=this._roots[e],i=new Uint32Array(s),n=new Uint16Array(s);r(0);function r(o,a=0){const c=o*2,h=n[c+15]===bi;if(h){const d=i[o+6],u=n[c+14];t(a,h,new Float32Array(s,o*4,6),d,u)}else{const d=o+Ri/4,u=i[o+6],f=i[o+7];t(a,h,new Float32Array(s,o*4,6),f)||(r(d,a+1),r(u,a+1))}}}raycast(t,e=cr){const s=this._roots,i=this.geometry,n=[],r=e.isMaterial,o=Array.isArray(e),a=i.groups,c=r?e.side:e,h=this.indirect?tl:Hc;for(let d=0,u=s.length;dd(u,f,I,E,T)?!0:s(u,f,this,o,I,E,e)}else r||(o?r=(d,u,f,I)=>s(d,u,this,o,f,I,e):r=(d,u,f)=>f);let a=!1,c=0;const h=this._roots;for(let d=0,u=h.length;d{const E=this.resolveTriangleIndex(I);Pt(r,E*3,o,a)}:I=>{Pt(r,I*3,o,a)},h=Zt.getPrimitive(),d=t.geometry.index,u=t.geometry.attributes.position,f=t.indirect?I=>{const E=t.resolveTriangleIndex(I);Pt(h,E*3,d,u)}:I=>{Pt(h,I*3,d,u)};if(n){const I=(E,T,C,g,S,m,F,y)=>{for(let N=C,w=C+g;Nli.intersectsBox(s),intersectsTriangle:s=>li.intersectsTriangle(s)})}intersectsSphere(t){return this.shapecast({intersectsBounds:e=>t.intersectsBox(e),intersectsTriangle:e=>e.intersectsSphere(t)})}closestPointToGeometry(t,e,s={},i={},n=0,r=1/0){return(this.indirect?cl:Kc)(this,t,e,s,i,n,r)}closestPointToPoint(t,e={},s=0,i=1/0){return Dc(this,t,e,s,i)}getBoundingBox(t){return t.makeEmpty(),this._roots.forEach(s=>{Ot(0,new Float32Array(s),Pr),t.union(Pr)}),t}}function Lr(l,t,e){return l===null||(l.point.applyMatrix4(t.matrixWorld),l.distance=l.point.distanceTo(e.ray.origin),l.object=t,l.distancee.far)?null:l}const Qi=new ac,wr=new It,ul=et.prototype.raycast;function fl(l,t){if(this.geometry.boundsTree){if(this.material===void 0)return;wr.copy(this.matrixWorld).invert(),Qi.copy(l.ray).applyMatrix4(wr);const e=this.geometry.boundsTree;if(l.firstHitOnly===!0){const s=Lr(e.raycastFirst(Qi,this.material),this,l);s&&t.push(s)}else{const s=e.raycast(Qi,this.material);for(let i=0,n=s.length;i{if(!this.enabled)return;const e=this.handlers.slice(0);for(const s of e)s(t)}),p(this,"handlers",[])}add(t){this.handlers.push(t)}remove(t){this.handlers=this.handlers.filter(e=>e!==t)}reset(){this.handlers.length=0}}class Le{constructor(){p(this,"enabled",!0),p(this,"trigger",async t=>{if(!this.enabled)return;const e=this.handlers.slice(0);for(const s of e)await s(t)}),p(this,"handlers",[])}add(t){this.handlers.push(t)}remove(t){this.handlers=this.handlers.filter(e=>e!==t)}reset(){this.handlers.length=0}}class Qn{constructor(t){p(this,"isDisposeable",()=>"dispose"in this&&"onDisposed"in this),p(this,"isResizeable",()=>"resize"in this&&"getSize"in this),p(this,"isUpdateable",()=>"onAfterUpdate"in this&&"onBeforeUpdate"in this&&"update"in this),p(this,"isHideable",()=>"visible"in this),p(this,"isConfigurable",()=>"setup"in this&&"config"in this&&"onSetup"in this),this.components=t}}class At extends Qn{}class Kn extends Qn{constructor(t){super(t),p(this,"worlds",new Map),p(this,"onWorldChanged",new j),p(this,"currentWorld",null),this.onWorldChanged.add(({world:e,action:s})=>{s==="removed"&&this.worlds.delete(e.uuid)})}}class El extends Kn{constructor(){super(...arguments),p(this,"hasCameraControls",()=>"controls"in this)}}class pl extends Kn{constructor(){super(...arguments),p(this,"onAfterUpdate",new j),p(this,"onBeforeUpdate",new j),p(this,"onDisposed",new j),p(this,"onResize",new j),p(this,"onClippingPlanesUpdated",new j),p(this,"clippingPlanes",[])}updateClippingPlanes(){this.onClippingPlanesUpdated.trigger()}setPlane(t,e,s){e.isLocal=s;const i=this.clippingPlanes.indexOf(e);t&&i===-1?this.clippingPlanes.push(e):!t&&i>-1&&this.clippingPlanes.splice(i,1),this.three.clippingPlanes=this.clippingPlanes.filter(n=>!n.isLocal)}}const To=class Cn extends At{constructor(t){super(t),p(this,"_disposedComponents",new Set),p(this,"enabled",!0),t.add(Cn.uuid,this)}get(){return this._disposedComponents}destroy(t,e=!0,s=!0){t.removeFromParent();const i=t;i.dispose&&i.dispose(),this.disposeGeometryAndMaterials(t,e),s&&i.children&&i.children.length&&this.disposeChildren(i),t.children.length=0}disposeGeometry(t){t.boundsTree&&t.disposeBoundsTree&&t.disposeBoundsTree(),t.dispose()}disposeGeometryAndMaterials(t,e){const s=t;s.geometry&&this.disposeGeometry(s.geometry),e&&s.material&&Cn.disposeMaterial(s),s.material=[],s.geometry=null}disposeChildren(t){for(const e of t.children)this.destroy(e)}static disposeMaterial(t){if(t.material)if(Array.isArray(t.material))for(const e of t.material)e.dispose();else t.material.dispose()}};p(To,"uuid","76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe");let fs=To;class Cl extends Kn{constructor(t){super(t),p(this,"onDisposed",new j),p(this,"directionalLights",new Map),p(this,"ambientLights",new Map)}dispose(){const t=this.components.get(fs);for(const e of this.three.children){const s=e;s.geometry&&t.destroy(s)}this.deleteAllLights(),this.three.children=[],this.onDisposed.trigger(),this.onDisposed.reset()}deleteAllLights(){for(const[,t]of this.directionalLights)t.removeFromParent(),t.target.removeFromParent(),t.dispose();this.directionalLights.clear();for(const[,t]of this.ambientLights)t.removeFromParent(),t.dispose();this.ambientLights.clear()}}class we extends Set{constructor(t){super(t),p(this,"onItemAdded",new j),p(this,"onItemDeleted",new j),p(this,"onCleared",new j),p(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}add(...t){for(const e of t)this.has(e)||!this.guard(e)||(super.add(e),this.onItemAdded||(this.onItemAdded=new j),this.onItemAdded.trigger(e));return this}delete(t){const e=super.delete(t);return e&&this.onItemDeleted.trigger(),e}dispose(){this.clear(),this.onItemAdded.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class re extends Map{constructor(t){super(t),p(this,"onItemSet",new j),p(this,"onItemUpdated",new j),p(this,"onItemDeleted",new j),p(this,"onCleared",new j),p(this,"guard",()=>!0)}clear(){super.clear(),this.onCleared.trigger()}set(t,e){const s=this.has(t);if(!(this.guard??(()=>!0))(t,e))return this;const r=super.set(t,e);return s?(this.onItemUpdated||(this.onItemUpdated=new j),this.onItemUpdated.trigger({key:t,value:e})):(this.onItemSet||(this.onItemSet=new j),this.onItemSet.trigger({key:t,value:e})),r}delete(t){const e=super.delete(t);return e&&this.onItemDeleted.trigger(t),e}dispose(){this.clear(),this.onItemSet.reset(),this.onItemDeleted.reset(),this.onCleared.reset()}}class Ki{static isEntry(t){return new Set(["Boolean","Color","Text","Number","Select","Vector3","TextSet","None"]).has(t.type)}static copySchema(t,e={}){for(const s in t){const i=t[s];this.isEntry(i)?e[s]=this.copyEntry(i):(e[s]={},this.copySchema(i,e[s]))}return e}static copyEntry(t){if(t.type==="Boolean"){const e=t;return{type:e.type,value:e.value}}if(t.type==="Color"){const e=t;return{type:e.type,value:e.value.clone()}}if(t.type==="Text"){const e=t;return{type:e.type,value:e.value}}if(t.type==="Number"){const e=t;return{type:e.type,value:e.value,min:e.min,max:e.max,interpolable:e.interpolable}}if(t.type==="Select"){const e=t;return{type:e.type,value:e.value,multiple:e.multiple,options:new Set(e.options)}}if(t.type==="Vector3"){const e=t;return{type:e.type,value:e.value.clone()}}if(t.type==="TextSet"){const e=t;return{type:e.type,value:new Set(e.value)}}if(t.type==="None"){const e=t;return{type:e.type,value:e.value}}throw new Error("Invalid entry!")}}const Ai=0,Tl=1,ml=new U,Mr=new ie,Ji=new ds,vr=new U,hi=new rs;class gl{constructor(){this.tolerance=-1,this.faces=[],this.newFaces=[],this.assigned=new Dr,this.unassigned=new Dr,this.vertices=[]}setFromPoints(t){if(t.length>=4){this.makeEmpty();for(let e=0,s=t.length;ethis.tolerance)return!1;return!0}intersectRay(t,e){const s=this.faces;let i=-1/0,n=1/0;for(let r=0,o=s.length;r0&&h>=0)return null;const d=h!==0?-c/h:0;if(!(d<=0)&&(h>0?n=Math.min(d,n):i=Math.max(d,i),i>n))return null}return i!==-1/0?t.at(i,e):t.at(n,e),e}intersectsRay(t){return this.intersectRay(t,ml)!==null}makeEmpty(){return this.faces=[],this.vertices=[],this}addVertexToFace(t,e){return t.face=e,e.outside===null?this.assigned.append(t):this.assigned.insertBefore(e.outside,t),e.outside=t,this}removeVertexFromFace(t,e){return t===e.outside&&(t.next!==null&&t.next.face===e?e.outside=t.next:e.outside=null),this.assigned.remove(t),this}removeAllVerticesFromFace(t){if(t.outside!==null){const e=t.outside;let s=t.outside;for(;s.next!==null&&s.next.face===t;)s=s.next;return this.assigned.removeSubList(e,s),e.prev=s.next=null,t.outside=null,e}}deleteFaceVertices(t,e){const s=this.removeAllVerticesFromFace(t);if(s!==void 0)if(e===void 0)this.unassigned.appendChain(s);else{let i=s;do{const n=i.next;e.distanceToPoint(i.point)>this.tolerance?this.addVertexToFace(i,e):this.unassigned.append(i),i=n}while(i!==null)}return this}resolveUnassignedPoints(t){if(this.unassigned.isEmpty()===!1){let e=this.unassigned.first();do{const s=e.next;let i=this.tolerance,n=null;for(let r=0;ri&&(i=a,n=o),i>1e3*this.tolerance)break}}n!==null&&this.addVertexToFace(e,n),e=s}while(e!==null)}return this}computeExtremes(){const t=new U,e=new U,s=[],i=[];for(let n=0;n<3;n++)s[n]=i[n]=this.vertices[0];t.copy(this.vertices[0].point),e.copy(this.vertices[0].point);for(let n=0,r=this.vertices.length;ne.getComponent(c)&&(e.setComponent(c,a.getComponent(c)),i[c]=o)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(t.x),Math.abs(e.x))+Math.max(Math.abs(t.y),Math.abs(e.y))+Math.max(Math.abs(t.z),Math.abs(e.z))),{min:s,max:i}}computeInitialHull(){const t=this.vertices,e=this.computeExtremes(),s=e.min,i=e.max;let n=0,r=0;for(let u=0;u<3;u++){const f=i[u].point.getComponent(u)-s[u].point.getComponent(u);f>n&&(n=f,r=u)}const o=s[r],a=i[r];let c,h;n=0,Mr.set(o.point,a.point);for(let u=0,f=this.vertices.length;un&&(n=E,c=I)}}n=-1,Ji.setFromCoplanarPoints(o.point,a.point,c.point);for(let u=0,f=this.vertices.length;un&&(n=E,h=I)}}const d=[];if(Ji.distanceToPoint(h.point)<0){d.push(ee.create(o,a,c),ee.create(h,a,o),ee.create(h,c,a),ee.create(h,o,c));for(let u=0;u<3;u++){const f=(u+1)%3;d[u+1].getEdge(2).setTwin(d[0].getEdge(f)),d[u+1].getEdge(1).setTwin(d[f+1].getEdge(0))}}else{d.push(ee.create(o,c,a),ee.create(h,o,a),ee.create(h,a,c),ee.create(h,c,o));for(let u=0;u<3;u++){const f=(u+1)%3;d[u+1].getEdge(2).setTwin(d[0].getEdge((3-u)%3)),d[u+1].getEdge(0).setTwin(d[f+1].getEdge(1))}}for(let u=0;u<4;u++)this.faces.push(d[u]);for(let u=0,f=t.length;un&&(n=C,E=this.faces[T])}E!==null&&this.addVertexToFace(I,E)}}return this}reindexFaces(){const t=[];for(let e=0;ee&&(e=n,t=i),i=i.next}while(i!==null&&i.face===s);return t}}computeHorizon(t,e,s,i){this.deleteFaceVertices(s),s.mark=Tl;let n;e===null?n=e=s.getEdge(0):n=e.next;do{const r=n.twin,o=r.face;o.mark===Ai&&(o.distanceToPoint(t)>this.tolerance?this.computeHorizon(t,r,o,i):i.push(n)),n=n.next}while(n!==e);return this}addAdjoiningFace(t,e){const s=ee.create(t,e.tail(),e.head());return this.faces.push(s),s.getEdge(-1).setTwin(e.twin),s.getEdge(0)}addNewFaces(t,e){this.newFaces=[];let s=null,i=null;for(let n=0;n0;)e=e.next,t--;for(;t<0;)e=e.prev,t++;return e}compute(){const t=this.edge.tail(),e=this.edge.head(),s=this.edge.next.head();return hi.set(t.point,e.point,s.point),hi.getNormal(this.normal),hi.getMidpoint(this.midpoint),this.area=hi.getArea(),this.constant=this.normal.dot(this.midpoint),this}distanceToPoint(t){return this.normal.dot(t)-this.constant}}class tn{constructor(t,e){this.vertex=t,this.prev=null,this.next=null,this.twin=null,this.face=e}head(){return this.vertex}tail(){return this.prev?this.prev.vertex:null}length(){const t=this.head(),e=this.tail();return e!==null?e.point.distanceTo(t.point):-1}lengthSquared(){const t=this.head(),e=this.tail();return e!==null?e.point.distanceToSquared(t.point):-1}setTwin(t){return this.twin=t,t.twin=this,this}}class Rl{constructor(t){this.point=t,this.prev=null,this.next=null,this.face=null}}class Dr{constructor(){this.head=null,this.tail=null}first(){return this.head}last(){return this.tail}clear(){return this.head=this.tail=null,this}insertBefore(t,e){return e.prev=t.prev,e.next=t,e.prev===null?this.head=e:e.prev.next=e,t.prev=e,this}insertAfter(t,e){return e.prev=t,e.next=t.next,e.next===null?this.tail=e:e.next.prev=e,t.next=e,this}append(t){return this.head===null?this.head=t:this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t,this}appendChain(t){for(this.head===null?this.head=t:this.tail.next=t,t.prev=this.tail;t.next!==null;)t=t.next;return this.tail=t,this}remove(t){return t.prev===null?this.head=t.next:t.prev.next=t.next,t.next===null?this.tail=t.prev:t.next.prev=t.prev,this}removeSubList(t,e){return t.prev===null?this.head=e.next:t.prev.next=e.next,e.next===null?this.tail=t.prev:e.next.prev=t.prev,this}isEmpty(){return this.head===null}}const Tn=[2,2,1],mn=[1,0,0];function ue(l,t){return l*3+t}function Al(l){const t=l.elements;let e=0;for(let s=0;s<9;s++)e+=t[s]*t[s];return Math.sqrt(e)}function Fl(l){const t=l.elements;let e=0;for(let s=0;s<3;s++){const i=t[ue(Tn[s],mn[s])];e+=2*i*i}return Math.sqrt(e)}function Sl(l,t){let e=0,s=1;const i=l.elements;for(let c=0;c<3;c++){const h=Math.abs(i[ue(Tn[c],mn[c])]);h>e&&(e=h,s=c)}let n=1,r=0;const o=mn[s],a=Tn[s];if(Math.abs(i[ue(a,o)])>Number.EPSILON){const c=i[ue(a,a)],h=i[ue(o,o)],d=i[ue(a,o)],u=(c-h)/2/d;let f;u<0?f=-1/(-u+Math.sqrt(1+u*u)):f=1/(u+Math.sqrt(1+u*u)),n=1/Math.sqrt(1+f*f),r=f*n}return t.identity(),t.elements[ue(o,o)]=n,t.elements[ue(a,a)]=n,t.elements[ue(a,o)]=r,t.elements[ue(o,a)]=-r,t}function Ol(l,t){let e=0,s=0;const i=10;t.unitary.identity(),t.diagonal.copy(l);const n=t.unitary,r=t.diagonal,o=new Be,a=new Be,c=Number.EPSILON*Al(r);for(;sc;)Sl(r,o),a.copy(o).transpose(),r.multiply(o),r.premultiply(a),n.multiply(o),++e>2&&(s++,e=0);return t}function yl(l){const t=[];for(let rt=0;rt>8&255]+Lt._lut[t>>16&255]+Lt._lut[t>>24&255]}-${Lt._lut[e&255]}${Lt._lut[e>>8&255]}-${Lt._lut[e>>16&15|64]}${Lt._lut[e>>24&255]}-${Lt._lut[s&63|128]}${Lt._lut[s>>8&255]}-${Lt._lut[s>>16&255]}${Lt._lut[s>>24&255]}${Lt._lut[i&255]}${Lt._lut[i>>8&255]}${Lt._lut[i>>16&255]}${Lt._lut[i>>24&255]}`.toLowerCase()}static validate(t){if(!Lt._pattern.test(t))throw new Error(`${t} is not a valid UUID v4. + +- If you're the tool creator, you can take one from https://www.uuidgenerator.net/. + +- If you're using a platform tool, verify the uuid isn't misspelled or contact the tool creator.`)}};p(Jn,"_pattern",/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/);p(Jn,"_lut",["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"]);let Re=Jn;const mo=class go{constructor(){p(this,"onDisposed",new j),p(this,"list",new Map),p(this,"enabled",!1),p(this,"_clock"),p(this,"onInit",new j),p(this,"update",()=>{if(!this.enabled)return;const t=this._clock.getDelta();for(const[e,s]of this.list)s.enabled&&s.isUpdateable()&&s.update(t);requestAnimationFrame(this.update)}),this._clock=new La,go.setupBVH()}add(t,e){if(this.list.has(t))throw new Error("You're trying to add a component that already exists in the components instance. Use Components.get() instead.");Re.validate(t),this.list.set(t,e)}get(t){const e=t.uuid;if(!this.list.has(e)){const s=new t(this);return this.list.has(e)||this.add(e,s),s}return this.list.get(e)}init(){this.enabled=!0,this._clock.start(),this.update(),this.onInit.trigger()}dispose(){this.enabled=!1;for(const[t,e]of this.list)e.enabled=!1,e.isDisposeable()&&e.dispose();this._clock.stop(),this.onDisposed.trigger(),this.onDisposed.reset()}static setupBVH(){Ys.prototype.computeBoundsTree=dl,Ys.prototype.disposeBoundsTree=Il,et.prototype.raycast=fl}};p(mo,"release","2.4.2");let Ro=mo;class Nl extends Qn{constructor(){super(...arguments),p(this,"meshes",new Set),p(this,"onAfterUpdate",new j),p(this,"onBeforeUpdate",new j),p(this,"onDisposed",new j),p(this,"isDisposing",!1),p(this,"enabled",!0),p(this,"uuid",Re.create()),p(this,"name"),p(this,"_scene"),p(this,"_camera"),p(this,"_renderer",null)}get scene(){if(!this._scene)throw new Error("No scene initialized!");return this._scene}set scene(t){this._scene=t,t.worlds.set(this.uuid,this),t.currentWorld=this,t.onWorldChanged.trigger({world:this,action:"added"})}get camera(){if(!this._camera)throw new Error("No camera initialized!");return this._camera}set camera(t){this._camera=t,t.worlds.set(this.uuid,this),t.currentWorld=this,t.onWorldChanged.trigger({world:this,action:"added"})}get renderer(){return this._renderer}set renderer(t){this._renderer=t,t&&(t.worlds.set(this.uuid,this),t.currentWorld=this,t.onWorldChanged.trigger({world:this,action:"added"}))}update(t){this.enabled&&(!this._scene||!this._camera||(this.scene.currentWorld=this,this.camera.currentWorld=this,this.renderer&&(this.renderer.currentWorld=this),this.onBeforeUpdate.trigger(),this.scene.isUpdateable()&&this.scene.update(t),this.camera.isUpdateable()&&this.camera.update(t),this.renderer&&this.renderer.update(t),this.onAfterUpdate.trigger()))}dispose(t=!0){if(this.enabled=!1,this.isDisposing=!0,this.scene.onWorldChanged.trigger({world:this,action:"removed"}),this.camera.onWorldChanged.trigger({world:this,action:"removed"}),this.renderer&&this.renderer.onWorldChanged.trigger({world:this,action:"removed"}),t){const s=this.components.get(fs);this.scene.dispose(),this.camera.isDisposeable()&&this.camera.dispose(),this.renderer&&this.renderer.dispose();for(const i of this.meshes)s.destroy(i);this.meshes.clear()}this._scene=null,this._camera=null,this._renderer=null,this.components.get(_o).list.delete(this.uuid),this.onDisposed.trigger(),this.onDisposed.reset()}}class ke{constructor(t,e,s,i){p(this,"_component"),p(this,"name"),p(this,"uuid"),this._component=t,this.name=s,this.uuid=i??Re.create(),e.get(Ws).list.set(this.uuid,this)}get controls(){return Ki.copySchema(this._config)}set(t){for(const e in t)if(e in this){const s=e;this[s]=t[e].value}}export(t=this._config,e={}){for(const s in t){const i=t[s];if(Ki.isEntry(i))if(i.type==="Color"){const{r,g:o,b:a}=i.value;e[s]={...i,value:{r,g:o,b:a}}}else if(i.type==="Vector3"){const{x:r,y:o,z:a}=i.value;e[s]={...i,value:{x:r,y:o,z:a}}}else if(i.type==="TextSet"){const r=Array.from(i.value);e[s]={...i,value:r}}else if(i.type==="Select"){const r=Array.from(i.options);e[s]={...i,options:r}}else e[s]={...i};else e[s]={},this.export(i,e[s])}return e}import(t,e={},s=!0){for(const i in t){const n=t[i];if(Ki.isEntry(n))if(n.type==="Color"){const{r:o,g:a,b:c}=n.value;e[i]={...n,value:new Mt(o,a,c)}}else if(n.type==="Vector3"){const{x:o,y:a,z:c}=n.value;e[i]={...n,value:new U(o,a,c)}}else n.type==="TextSet"?e[i]={...n,value:new Set(n.value)}:n.type==="Select"?e[i]={...n,options:new Set(n.options)}:e[i]={...n};else e[i]={},this.import(n,e[i],!1)}s&&this.set(e)}}const Ao=class Fo extends At{constructor(t){super(t),p(this,"list",new re),p(this,"enabled",!0),t.add(Fo.uuid,this)}};p(Ao,"uuid","b8c764e0-6b24-4e77-9a32-35fa728ee5b4");let Ws=Ao;class _l{constructor(t,e){p(this,"_list"),p(this,"_scene"),this._list=t,this._scene=e}get color(){return this._list.directionalLight.color.value}set color(t){this._list.directionalLight.color.value=t;for(const[,e]of this._scene.directionalLights)e.color.copy(t)}get intensity(){return this._list.directionalLight.intensity.value}set intensity(t){this._list.directionalLight.intensity.value=t;for(const[,e]of this._scene.directionalLights)e.intensity=t}get position(){return this._list.directionalLight.position.value.clone()}set position(t){this._list.directionalLight.position.value=t;for(const[,e]of this._scene.directionalLights)e.position.copy(t)}}class Pl{constructor(t,e){p(this,"_list"),p(this,"_scene"),this._list=t,this._scene=e}get color(){return this._list.ambientLight.color.value}set color(t){this._list.ambientLight.color.value=t;for(const[,e]of this._scene.ambientLights)e.color.copy(t)}get intensity(){return this._list.ambientLight.intensity.value}set intensity(t){this._list.ambientLight.intensity.value=t;for(const[,e]of this._scene.ambientLights)e.intensity=t}}class Ll extends ke{constructor(){super(...arguments),p(this,"_config",{backgroundColor:{value:new Mt,type:"Color"},ambientLight:{color:{type:"Color",value:new Mt},intensity:{type:"Number",interpolable:!0,min:0,max:10,value:2}},directionalLight:{color:{type:"Color",value:new Mt},intensity:{type:"Number",interpolable:!0,min:0,max:10,value:2},position:{type:"Vector3",value:new U}}}),p(this,"ambientLight",new Pl(this._config,this._component)),p(this,"directionalLight",new _l(this._config,this._component))}get backgroundColor(){return this._config.backgroundColor.value}set backgroundColor(t){this._config.backgroundColor.value=t,this._component.three.background=t}}class wl extends Cl{constructor(t){super(t),p(this,"onSetup",new j),p(this,"isSetup",!1),p(this,"three"),p(this,"config",new Ll(this,this.components,"Scene")),p(this,"_defaultConfig",{backgroundColor:new Mt(2107698),directionalLight:{color:new Mt("white"),intensity:1.5,position:new U(5,10,3)},ambientLight:{color:new Mt("white"),intensity:1}}),this.three=new wi,this.three.background=new Mt(2107698)}setup(t){const e={...this._defaultConfig,...t};this.config.backgroundColor=e.backgroundColor;const s=e.ambientLight;this.config.ambientLight.color=s.color,this.config.ambientLight.intensity=s.intensity;const i=e.directionalLight;this.config.directionalLight.color=i.color,this.config.directionalLight.intensity=i.intensity,this.config.directionalLight.position=i.position,this.deleteAllLights();const{color:n,intensity:r}=this.config.directionalLight,o=new fo(n,r);o.position.copy(i.position);const{color:a,intensity:c}=this.config.directionalLight,h=new ic(a,c);this.three.add(o,h),this.directionalLights.set(o.uuid,o),this.ambientLights.set(h.uuid,h),this.isSetup=!0,this.onSetup.trigger()}dispose(){super.dispose(),this.components.get(Ws).list.delete(this.config.uuid)}}class Bu extends pl{constructor(t,e,s){super(t),p(this,"enabled",!0),p(this,"container"),p(this,"three"),p(this,"_canvas"),p(this,"_parameters"),p(this,"_resizeObserver",null),p(this,"onContainerUpdated",new j),p(this,"_resizing",!1),p(this,"resize",r=>{if(this._resizing)return;this._resizing=!0,this.onContainerUpdated.trigger();const o=r?r.x:this.container.clientWidth,a=r?r.y:this.container.clientHeight;this.three.setSize(o,a),this.onResize.trigger(new Ht(o,a)),this._resizing=!1}),p(this,"resizeEvent",()=>{this.resize()}),p(this,"onContextLost",r=>{r.preventDefault(),this.enabled=!1}),p(this,"onContextBack",()=>{this.three.setRenderTarget(null),this.three.dispose(),this.three=new zs({canvas:this._canvas,antialias:!0,alpha:!0,...this._parameters}),this.enabled=!0}),this.container=e,this._parameters=s,this.three=new zs({antialias:!0,alpha:!0,...s}),this.three.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.setupRenderer(),this.setupEvents(!0),this.resize(),this._canvas=this.three.domElement;const i=this.three.getContext(),{canvas:n}=i;n.addEventListener("webglcontextlost",this.onContextLost,!1),n.addEventListener("webglcontextrestored",this.onContextBack,!1)}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger(this);const t=this.currentWorld.scene.three,e=this.currentWorld.camera.three;this.three.render(t,e),this.onAfterUpdate.trigger(this)}dispose(){this.enabled=!1,this.setupEvents(!1),this.three.domElement.remove(),this.three.forceContextLoss(),this.three.dispose(),this.onResize.reset(),this.onAfterUpdate.reset(),this.onBeforeUpdate.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}getSize(){return new Ht(this.three.domElement.clientWidth,this.three.domElement.clientHeight)}setupEvents(t){const e=this.three.domElement.parentElement;if(!e)throw new Error("This renderer needs to have an HTML container!");this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),window.removeEventListener("resize",this.resizeEvent),t&&(this._resizeObserver=new ResizeObserver(this.resizeEvent),this._resizeObserver.observe(e),window.addEventListener("resize",this.resizeEvent))}setupRenderer(){this.three.localClippingEnabled=!0,this.container&&this.container.appendChild(this.three.domElement),this.onContainerUpdated.trigger()}}/*! + * camera-controls + * https://github.com/yomotsu/camera-controls + * (c) 2017 @yomotsu + * Released under the MIT License. + */const ct={LEFT:1,RIGHT:2,MIDDLE:4},k=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),es={NONE:0,IN:1,OUT:-1};function ve(l){return l.isPerspectiveCamera}function Oe(l){return l.isOrthographicCamera}const ss=Math.PI*2,Ur=Math.PI/2,So=1e-5,Os=Math.PI/180;function te(l,t,e){return Math.max(t,Math.min(e,l))}function mt(l,t=So){return Math.abs(l)0==f>h&&(f=h,e.value=(f-h)/n),f}function Br(l,t,e,s,i=1/0,n,r){s=Math.max(1e-4,s);const o=2/s,a=o*n,c=1/(1+a+.48*a*a+.235*a*a*a);let h=t.x,d=t.y,u=t.z,f=l.x-h,I=l.y-d,E=l.z-u;const T=h,C=d,g=u,S=i*s,m=S*S,F=f*f+I*I+E*E;if(F>m){const D=Math.sqrt(F);f=f/D*S,I=I/D*S,E=E/D*S}h=l.x-f,d=l.y-I,u=l.z-E;const y=(e.x+o*f)*n,N=(e.y+o*I)*n,w=(e.z+o*E)*n;e.x=(e.x-o*y)*c,e.y=(e.y-o*N)*c,e.z=(e.z-o*w)*c,r.x=h+(f+y)*c,r.y=d+(I+N)*c,r.z=u+(E+w)*c;const P=T-l.x,v=C-l.y,Y=g-l.z,O=r.x-T,M=r.y-C,R=r.z-g;return P*O+v*M+Y*R>0&&(r.x=T,r.y=C,r.z=g,e.x=(r.x-T)/n,e.y=(r.y-C)/n,e.z=(r.z-g)/n),r}function en(l,t){t.set(0,0),l.forEach(e=>{t.x+=e.clientX,t.y+=e.clientY}),t.x/=l.length,t.y/=l.length}function sn(l,t){return Oe(l)?(console.warn(`${t} is not supported in OrthographicCamera`),!0):!1}class Ml{constructor(){this._listeners={}}addEventListener(t,e){const s=this._listeners;s[t]===void 0&&(s[t]=[]),s[t].indexOf(e)===-1&&s[t].push(e)}hasEventListener(t,e){const s=this._listeners;return s[t]!==void 0&&s[t].indexOf(e)!==-1}removeEventListener(t,e){const i=this._listeners[t];if(i!==void 0){const n=i.indexOf(e);n!==-1&&i.splice(n,1)}}removeAllEventListeners(t){if(!t){this._listeners={};return}Array.isArray(this._listeners[t])&&(this._listeners[t].length=0)}dispatchEvent(t){const s=this._listeners[t.type];if(s!==void 0){t.target=this;const i=s.slice(0);for(let n=0,r=i.length;n{},this._enabled=!0,this._state=k.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=es.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new at.Vector3,this._focalOffsetVelocity=new at.Vector3,this._zoomVelocity={value:0},this._truckInternal=(m,F,y)=>{let N,w;if(ve(this._camera)){const P=lt.copy(this._camera.position).sub(this._target),v=this._camera.getEffectiveFOV()*Os,Y=P.length()*Math.tan(v*.5);N=this.truckSpeed*m*Y/this._elementRect.height,w=this.truckSpeed*F*Y/this._elementRect.height}else if(Oe(this._camera)){const P=this._camera;N=m*(P.right-P.left)/P.zoom/this._elementRect.width,w=F*(P.top-P.bottom)/P.zoom/this._elementRect.height}else return;this.verticalDragToForward?(y?this.setFocalOffset(this._focalOffsetEnd.x+N,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(N,0,!0),this.forward(-w,!0)):y?this.setFocalOffset(this._focalOffsetEnd.x+N,this._focalOffsetEnd.y+w,this._focalOffsetEnd.z,!0):this.truck(N,w,!0)},this._rotateInternal=(m,F)=>{const y=ss*this.azimuthRotateSpeed*m/this._elementRect.height,N=ss*this.polarRotateSpeed*F/this._elementRect.height;this.rotate(y,N,!0)},this._dollyInternal=(m,F,y)=>{const N=Math.pow(.95,-m*this.dollySpeed),w=this._sphericalEnd.radius,P=this._sphericalEnd.radius*N,v=te(P,this.minDistance,this.maxDistance),Y=v-P;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(P,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(Y,!0),this._dollyToNoClamp(v,!0)):this._dollyToNoClamp(v,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?P:v)-w,this._dollyControlCoord.set(F,y)),this._lastDollyDirection=Math.sign(-m)},this._zoomInternal=(m,F,y)=>{const N=Math.pow(.95,m*this.dollySpeed),w=this._zoom,P=this._zoom*N;this.zoomTo(P,!0),this.dollyToCursor&&(this._changedZoom+=P-w,this._dollyControlCoord.set(F,y))},typeof at>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=t,this._yAxisUpSpace=new at.Quaternion().setFromUnitVectors(this._camera.up,di),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=k.NONE,this._target=new at.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new at.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new at.Spherical().setFromVector3(lt.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new at.Vector3,new at.Vector3,new at.Vector3,new at.Vector3],this._updateNearPlaneCorners(),this._boundary=new at.Box3(new at.Vector3(-1/0,-1/0,-1/0),new at.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new at.Vector2,this.mouseButtons={left:k.ROTATE,middle:k.DOLLY,right:k.TRUCK,wheel:ve(this._camera)?k.DOLLY:Oe(this._camera)?k.ZOOM:k.NONE},this.touches={one:k.TOUCH_ROTATE,two:ve(this._camera)?k.TOUCH_DOLLY_TRUCK:Oe(this._camera)?k.TOUCH_ZOOM_TRUCK:k.NONE,three:k.TOUCH_TRUCK};const s=new at.Vector2,i=new at.Vector2,n=new at.Vector2,r=m=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const N=this._domElement.getBoundingClientRect(),w=m.clientX/N.width,P=m.clientY/N.height;if(wthis._interactiveArea.right||Pthis._interactiveArea.bottom)return}const F=m.pointerType!=="mouse"?null:(m.buttons&ct.LEFT)===ct.LEFT?ct.LEFT:(m.buttons&ct.MIDDLE)===ct.MIDDLE?ct.MIDDLE:(m.buttons&ct.RIGHT)===ct.RIGHT?ct.RIGHT:null;if(F!==null){const N=this._findPointerByMouseButton(F);N&&this._disposePointer(N)}if((m.buttons&ct.LEFT)===ct.LEFT&&this._lockedPointer)return;const y={pointerId:m.pointerId,clientX:m.clientX,clientY:m.clientY,deltaX:0,deltaY:0,mouseButton:F};this._activePointers.push(y),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",h),this._isDragging=!0,E(m)},o=m=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const N=this._domElement.getBoundingClientRect(),w=m.clientX/N.width,P=m.clientY/N.height;if(wthis._interactiveArea.right||Pthis._interactiveArea.bottom)return}const F=(m.buttons&ct.LEFT)===ct.LEFT?ct.LEFT:(m.buttons&ct.MIDDLE)===ct.MIDDLE?ct.MIDDLE:(m.buttons&ct.RIGHT)===ct.RIGHT?ct.RIGHT:null;if(F!==null){const N=this._findPointerByMouseButton(F);N&&this._disposePointer(N)}const y={pointerId:1,clientX:m.clientX,clientY:m.clientY,deltaX:0,deltaY:0,mouseButton:(m.buttons&ct.LEFT)===ct.LEFT?ct.LEFT:(m.buttons&ct.MIDDLE)===ct.LEFT?ct.MIDDLE:(m.buttons&ct.RIGHT)===ct.LEFT?ct.RIGHT:null};this._activePointers.push(y),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.addEventListener("mousemove",c),this._domElement.ownerDocument.addEventListener("mouseup",d),this._isDragging=!0,E(m)},a=m=>{m.cancelable&&m.preventDefault();const F=m.pointerId,y=this._lockedPointer||this._findPointerById(F);if(y){if(y.clientX=m.clientX,y.clientY=m.clientY,y.deltaX=m.movementX,y.deltaY=m.movementY,this._state=0,m.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(m.buttons&ct.LEFT)===ct.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(m.buttons&ct.MIDDLE)===ct.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(m.buttons&ct.RIGHT)===ct.RIGHT&&(this._state=this._state|this.mouseButtons.right);T()}},c=m=>{const F=this._lockedPointer||this._findPointerById(1);F&&(F.clientX=m.clientX,F.clientY=m.clientY,F.deltaX=m.movementX,F.deltaY=m.movementY,this._state=0,(this._lockedPointer||(m.buttons&ct.LEFT)===ct.LEFT)&&(this._state=this._state|this.mouseButtons.left),(m.buttons&ct.MIDDLE)===ct.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(m.buttons&ct.RIGHT)===ct.RIGHT&&(this._state=this._state|this.mouseButtons.right),T())},h=m=>{const F=this._findPointerById(m.pointerId);if(!(F&&F===this._lockedPointer)){if(F&&this._disposePointer(F),m.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=k.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=k.NONE;C()}},d=()=>{const m=this._findPointerById(1);m&&m===this._lockedPointer||(m&&this._disposePointer(m),this._state=k.NONE,C())};let u=-1;const f=m=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===k.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const P=this._domElement.getBoundingClientRect(),v=m.clientX/P.width,Y=m.clientY/P.height;if(vthis._interactiveArea.right||Ythis._interactiveArea.bottom)return}if(m.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===k.ROTATE||this.mouseButtons.wheel===k.TRUCK){const P=performance.now();u-P<1e3&&this._getClientRect(this._elementRect),u=P}const F=Dl?-1:-3,y=m.deltaMode===1?m.deltaY/F:m.deltaY/(F*10),N=this.dollyToCursor?(m.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,w=this.dollyToCursor?(m.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case k.ROTATE:{this._rotateInternal(m.deltaX,m.deltaY),this._isUserControllingRotate=!0;break}case k.TRUCK:{this._truckInternal(m.deltaX,m.deltaY,!1),this._isUserControllingTruck=!0;break}case k.OFFSET:{this._truckInternal(m.deltaX,m.deltaY,!0),this._isUserControllingOffset=!0;break}case k.DOLLY:{this._dollyInternal(-y,N,w),this._isUserControllingDolly=!0;break}case k.ZOOM:{this._zoomInternal(-y,N,w),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},I=m=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===Ut.ACTION.NONE){const F=m instanceof PointerEvent?m.pointerId:(m instanceof MouseEvent,0),y=this._findPointerById(F);y&&this._disposePointer(y),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("mouseup",d);return}m.preventDefault()}},E=m=>{if(!this._enabled)return;if(en(this._activePointers,zt),this._getClientRect(this._elementRect),s.copy(zt),i.copy(zt),this._activePointers.length>=2){const y=zt.x-this._activePointers[1].clientX,N=zt.y-this._activePointers[1].clientY,w=Math.sqrt(y*y+N*N);n.set(0,w);const P=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,v=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(P,v)}if(this._state=0,!m)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in m&&m.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(m.buttons&ct.LEFT)===ct.LEFT&&(this._state=this._state|this.mouseButtons.left),(m.buttons&ct.MIDDLE)===ct.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(m.buttons&ct.RIGHT)===ct.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&k.ROTATE)===k.ROTATE||(this._state&k.TOUCH_ROTATE)===k.TOUCH_ROTATE||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&k.TRUCK)===k.TRUCK||(this._state&k.TOUCH_TRUCK)===k.TOUCH_TRUCK||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&k.DOLLY)===k.DOLLY||(this._state&k.TOUCH_DOLLY)===k.TOUCH_DOLLY||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&k.ZOOM)===k.ZOOM||(this._state&k.TOUCH_ZOOM)===k.TOUCH_ZOOM||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&k.OFFSET)===k.OFFSET||(this._state&k.TOUCH_OFFSET)===k.TOUCH_OFFSET||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},T=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,en(this._activePointers,zt);const F=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,y=F?-F.deltaX:i.x-zt.x,N=F?-F.deltaY:i.y-zt.y;if(i.copy(zt),((this._state&k.ROTATE)===k.ROTATE||(this._state&k.TOUCH_ROTATE)===k.TOUCH_ROTATE||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(y,N),this._isUserControllingRotate=!0),(this._state&k.DOLLY)===k.DOLLY||(this._state&k.ZOOM)===k.ZOOM){const w=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,P=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0,v=this.dollyDragInverted?-1:1;(this._state&k.DOLLY)===k.DOLLY?(this._dollyInternal(v*N*fi,w,P),this._isUserControllingDolly=!0):(this._zoomInternal(v*N*fi,w,P),this._isUserControllingZoom=!0)}if((this._state&k.TOUCH_DOLLY)===k.TOUCH_DOLLY||(this._state&k.TOUCH_ZOOM)===k.TOUCH_ZOOM||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_ZOOM_ROTATE)===k.TOUCH_ZOOM_ROTATE){const w=zt.x-this._activePointers[1].clientX,P=zt.y-this._activePointers[1].clientY,v=Math.sqrt(w*w+P*P),Y=n.y-v;n.set(0,v);const O=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,M=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&k.TOUCH_DOLLY)===k.TOUCH_DOLLY||(this._state&k.TOUCH_DOLLY_ROTATE)===k.TOUCH_DOLLY_ROTATE||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET?(this._dollyInternal(Y*fi,O,M),this._isUserControllingDolly=!0):(this._zoomInternal(Y*fi,O,M),this._isUserControllingZoom=!0)}((this._state&k.TRUCK)===k.TRUCK||(this._state&k.TOUCH_TRUCK)===k.TOUCH_TRUCK||(this._state&k.TOUCH_DOLLY_TRUCK)===k.TOUCH_DOLLY_TRUCK||(this._state&k.TOUCH_ZOOM_TRUCK)===k.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(y,N,!1),this._isUserControllingTruck=!0),((this._state&k.OFFSET)===k.OFFSET||(this._state&k.TOUCH_OFFSET)===k.TOUCH_OFFSET||(this._state&k.TOUCH_DOLLY_OFFSET)===k.TOUCH_DOLLY_OFFSET||(this._state&k.TOUCH_ZOOM_OFFSET)===k.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(y,N,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},C=()=>{en(this._activePointers,zt),i.copy(zt),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mouseup",d),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",g),this._domElement.ownerDocument.addEventListener("pointerlockerror",S),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",h),E())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",g),this._domElement.ownerDocument.removeEventListener("pointerlockerror",S))};const g=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},S=()=>{this.unlockPointer()};this._addAllEventListeners=m=>{this._domElement=m,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",r),bl&&this._domElement.addEventListener("mousedown",o),this._domElement.addEventListener("pointercancel",h),this._domElement.addEventListener("wheel",f,{passive:!1}),this._domElement.addEventListener("contextmenu",I)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",r),this._domElement.removeEventListener("mousedown",o),this._domElement.removeEventListener("pointercancel",h),this._domElement.removeEventListener("wheel",f,{passive:!1}),this._domElement.removeEventListener("contextmenu",I),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("pointerup",h),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.removeEventListener("pointerlockchange",g),this._domElement.ownerDocument.removeEventListener("pointerlockerror",S))},this.cancel=()=>{this._state!==k.NONE&&(this._state=k.NONE,this._activePointers.length=0,C())},e&&this.connect(e),this.update(0)}get camera(){return this._camera}set camera(t){this._camera=t,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._domElement&&(t?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(t){this._spherical.radius===t&&this._sphericalEnd.radius===t||(this._spherical.radius=t,this._sphericalEnd.radius=t,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(t){this._spherical.theta===t&&this._sphericalEnd.theta===t||(this._spherical.theta=t,this._sphericalEnd.theta=t,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(t){this._spherical.phi===t&&this._sphericalEnd.phi===t||(this._spherical.phi=t,this._sphericalEnd.phi=t,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(t){this._boundaryEnclosesCamera=t,this._needsUpdate=!0}set interactiveArea(t){this._interactiveArea.width=te(t.width,0,1),this._interactiveArea.height=te(t.height,0,1),this._interactiveArea.x=te(t.x,0,1-this._interactiveArea.width),this._interactiveArea.y=te(t.y,0,1-this._interactiveArea.height)}addEventListener(t,e){super.addEventListener(t,e)}removeEventListener(t,e){super.removeEventListener(t,e)}rotate(t,e,s=!1){return this.rotateTo(this._sphericalEnd.theta+t,this._sphericalEnd.phi+e,s)}rotateAzimuthTo(t,e=!1){return this.rotateTo(t,this._sphericalEnd.phi,e)}rotatePolarTo(t,e=!1){return this.rotateTo(this._sphericalEnd.theta,t,e)}rotateTo(t,e,s=!1){this._isUserControllingRotate=!1;const i=te(t,this.minAzimuthAngle,this.maxAzimuthAngle),n=te(e,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=i,this._sphericalEnd.phi=n,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,s||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const r=!s||Et(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Et(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(r)}dolly(t,e=!1){return this.dollyTo(this._sphericalEnd.radius-t,e)}dollyTo(t,e=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=es.NONE,this._changedDolly=0,this._dollyToNoClamp(te(t,this.minDistance,this.maxDistance),e)}_dollyToNoClamp(t,e=!1){const s=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const r=this._collisionTest(),o=Et(r,this._spherical.radius);if(!(s>t)&&o)return Promise.resolve();this._sphericalEnd.radius=Math.min(t,r)}else this._sphericalEnd.radius=t;this._needsUpdate=!0,e||(this._spherical.radius=this._sphericalEnd.radius);const n=!e||Et(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(n)}dollyInFixed(t,e=!1){this._targetEnd.add(this._getCameraDirection(_s).multiplyScalar(t)),e||this._target.copy(this._targetEnd);const s=!e||Et(this._target.x,this._targetEnd.x,this.restThreshold)&&Et(this._target.y,this._targetEnd.y,this.restThreshold)&&Et(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(s)}zoom(t,e=!1){return this.zoomTo(this._zoomEnd+t,e)}zoomTo(t,e=!1){this._isUserControllingZoom=!1,this._zoomEnd=te(t,this.minZoom,this.maxZoom),this._needsUpdate=!0,e||(this._zoom=this._zoomEnd);const s=!e||Et(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(s)}pan(t,e,s=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(t,e,s)}truck(t,e,s=!1){this._camera.updateMatrix(),ae.setFromMatrixColumn(this._camera.matrix,0),ce.setFromMatrixColumn(this._camera.matrix,1),ae.multiplyScalar(t),ce.multiplyScalar(-e);const i=lt.copy(ae).add(ce),n=dt.copy(this._targetEnd).add(i);return this.moveTo(n.x,n.y,n.z,s)}forward(t,e=!1){lt.setFromMatrixColumn(this._camera.matrix,0),lt.crossVectors(this._camera.up,lt),lt.multiplyScalar(t);const s=dt.copy(this._targetEnd).add(lt);return this.moveTo(s.x,s.y,s.z,e)}elevate(t,e=!1){return lt.copy(this._camera.up).multiplyScalar(t),this.moveTo(this._targetEnd.x+lt.x,this._targetEnd.y+lt.y,this._targetEnd.z+lt.z,e)}moveTo(t,e,s,i=!1){this._isUserControllingTruck=!1;const n=lt.set(t,e,s).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,n,this.boundaryFriction),this._needsUpdate=!0,i||this._target.copy(this._targetEnd);const r=!i||Et(this._target.x,this._targetEnd.x,this.restThreshold)&&Et(this._target.y,this._targetEnd.y,this.restThreshold)&&Et(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}lookInDirectionOf(t,e,s,i=!1){const o=lt.set(t,e,s).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(o.x,o.y,o.z,i)}fitToBox(t,e,{cover:s=!1,paddingLeft:i=0,paddingRight:n=0,paddingBottom:r=0,paddingTop:o=0}={}){const a=[],c=t.isBox3?ns.copy(t):ns.setFromObject(t);c.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const h=xr(this._sphericalEnd.theta,Ur),d=xr(this._sphericalEnd.phi,Ur);a.push(this.rotateTo(h,d,e));const u=lt.setFromSpherical(this._sphericalEnd).normalize(),f=kr.setFromUnitVectors(u,nn),I=Et(Math.abs(u.y),1);I&&f.multiply(on.setFromAxisAngle(di,h)),f.multiply(this._yAxisUpSpaceInverse);const E=Gr.makeEmpty();dt.copy(c.min).applyQuaternion(f),E.expandByPoint(dt),dt.copy(c.min).setX(c.max.x).applyQuaternion(f),E.expandByPoint(dt),dt.copy(c.min).setY(c.max.y).applyQuaternion(f),E.expandByPoint(dt),dt.copy(c.max).setZ(c.min.z).applyQuaternion(f),E.expandByPoint(dt),dt.copy(c.min).setZ(c.max.z).applyQuaternion(f),E.expandByPoint(dt),dt.copy(c.max).setY(c.min.y).applyQuaternion(f),E.expandByPoint(dt),dt.copy(c.max).setX(c.min.x).applyQuaternion(f),E.expandByPoint(dt),dt.copy(c.max).applyQuaternion(f),E.expandByPoint(dt),E.min.x-=i,E.min.y-=r,E.max.x+=n,E.max.y+=o,f.setFromUnitVectors(nn,u),I&&f.premultiply(on.invert()),f.premultiply(this._yAxisUpSpace);const T=E.getSize(lt),C=E.getCenter(dt).applyQuaternion(f);if(ve(this._camera)){const g=this.getDistanceToFitBox(T.x,T.y,T.z,s);a.push(this.moveTo(C.x,C.y,C.z,e)),a.push(this.dollyTo(g,e)),a.push(this.setFocalOffset(0,0,0,e))}else if(Oe(this._camera)){const g=this._camera,S=g.right-g.left,m=g.top-g.bottom,F=s?Math.max(S/T.x,m/T.y):Math.min(S/T.x,m/T.y);a.push(this.moveTo(C.x,C.y,C.z,e)),a.push(this.zoomTo(F,e)),a.push(this.setFocalOffset(0,0,0,e))}return Promise.all(a)}fitToSphere(t,e){const s=[],n=t instanceof at.Sphere?rn.copy(t):Ut.createBoundingSphere(t,rn);if(s.push(this.moveTo(n.center.x,n.center.y,n.center.z,e)),ve(this._camera)){const r=this.getDistanceToFitSphere(n.radius);s.push(this.dollyTo(r,e))}else if(Oe(this._camera)){const r=this._camera.right-this._camera.left,o=this._camera.top-this._camera.bottom,a=2*n.radius,c=Math.min(r/a,o/a);s.push(this.zoomTo(c,e))}return s.push(this.setFocalOffset(0,0,0,e)),Promise.all(s)}setLookAt(t,e,s,i,n,r,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=es.NONE,this._changedDolly=0;const a=dt.set(i,n,r),c=lt.set(t,e,s);this._targetEnd.copy(a),this._sphericalEnd.setFromVector3(c.sub(a).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const h=!o||Et(this._target.x,this._targetEnd.x,this.restThreshold)&&Et(this._target.y,this._targetEnd.y,this.restThreshold)&&Et(this._target.z,this._targetEnd.z,this.restThreshold)&&Et(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Et(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Et(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(h)}lerpLookAt(t,e,s,i,n,r,o,a,c,h,d,u,f,I=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=es.NONE,this._changedDolly=0;const E=lt.set(i,n,r),T=dt.set(t,e,s);$t.setFromVector3(T.sub(E).applyQuaternion(this._yAxisUpSpace));const C=is.set(h,d,u),g=dt.set(o,a,c);Ps.setFromVector3(g.sub(C).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(E.lerp(C,f));const S=Ps.theta-$t.theta,m=Ps.phi-$t.phi,F=Ps.radius-$t.radius;this._sphericalEnd.set($t.radius+F*f,$t.phi+m*f,$t.theta+S*f),this.normalizeRotations(),this._needsUpdate=!0,I||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const y=!I||Et(this._target.x,this._targetEnd.x,this.restThreshold)&&Et(this._target.y,this._targetEnd.y,this.restThreshold)&&Et(this._target.z,this._targetEnd.z,this.restThreshold)&&Et(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Et(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Et(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(y)}setPosition(t,e,s,i=!1){return this.setLookAt(t,e,s,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,i)}setTarget(t,e,s,i=!1){const n=this.getPosition(lt),r=this.setLookAt(n.x,n.y,n.z,t,e,s,i);return this._sphericalEnd.phi=te(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),r}setFocalOffset(t,e,s,i=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(t,e,s),this._needsUpdate=!0,i||this._focalOffset.copy(this._focalOffsetEnd);const n=!i||Et(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&Et(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&Et(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}setOrbitPoint(t,e,s){this._camera.updateMatrixWorld(),ae.setFromMatrixColumn(this._camera.matrixWorldInverse,0),ce.setFromMatrixColumn(this._camera.matrixWorldInverse,1),De.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const i=lt.set(t,e,s),n=i.distanceTo(this._camera.position),r=i.sub(this._camera.position);ae.multiplyScalar(r.x),ce.multiplyScalar(r.y),De.multiplyScalar(r.z),lt.copy(ae).add(ce).add(De),lt.z=lt.z+n,this.dollyTo(n,!1),this.setFocalOffset(-lt.x,lt.y,-lt.z,!1),this.moveTo(t,e,s,!1)}setBoundary(t){if(!t){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(t),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(t,e,s,i){if(t===null){this._viewport=null;return}this._viewport=this._viewport||new at.Vector4,typeof t=="number"?this._viewport.set(t,e,s,i):this._viewport.copy(t)}getDistanceToFitBox(t,e,s,i=!1){if(sn(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const n=t/e,r=this._camera.getEffectiveFOV()*Os,o=this._camera.aspect;return((i?n>o:ne.pointerId===t)}_findPointerByMouseButton(t){return this._activePointers.find(e=>e.mouseButton===t)}_disposePointer(t){this._activePointers.splice(this._activePointers.indexOf(t),1)}_encloseToBoundary(t,e,s){const i=e.lengthSq();if(i===0)return t;const n=dt.copy(e).add(t),o=this._boundary.clampPoint(n,is).sub(n),a=o.lengthSq();if(a===0)return t.add(e);if(a===i)return t;if(s===0)return t.add(e).add(o);{const c=1+s*a/e.dot(o);return t.add(dt.copy(e).multiplyScalar(c)).add(o.multiplyScalar(1-s))}}_updateNearPlaneCorners(){if(ve(this._camera)){const t=this._camera,e=t.near,s=t.getEffectiveFOV()*Os,i=Math.tan(s*.5)*e,n=i*t.aspect;this._nearPlaneCorners[0].set(-n,-i,0),this._nearPlaneCorners[1].set(n,-i,0),this._nearPlaneCorners[2].set(n,i,0),this._nearPlaneCorners[3].set(-n,i,0)}else if(Oe(this._camera)){const t=this._camera,e=1/t.zoom,s=t.left*e,i=t.right*e,n=t.top*e,r=t.bottom*e;this._nearPlaneCorners[0].set(s,n,0),this._nearPlaneCorners[1].set(i,n,0),this._nearPlaneCorners[2].set(i,r,0),this._nearPlaneCorners[3].set(s,r,0)}}_collisionTest(){let t=1/0;if(!(this.colliderMeshes.length>=1)||sn(this._camera,"_collisionTest"))return t;const s=this._getTargetDirection(_s);an.lookAt(Yr,s,this._camera.up);for(let i=0;i<4;i++){const n=dt.copy(this._nearPlaneCorners[i]);n.applyMatrix4(an);const r=is.addVectors(this._target,n);Ii.set(r,s),Ii.far=this._spherical.radius+1;const o=Ii.intersectObjects(this.colliderMeshes);o.length!==0&&o[0].distance{const s=()=>{this.removeEventListener("rest",s),e()};this.addEventListener("rest",s)}))}_addAllEventListeners(t){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(t){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(t){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(t,e=new at.Sphere){const s=e,i=s.center;ns.makeEmpty(),t.traverseVisible(r=>{r.isMesh&&ns.expandByObject(r)}),ns.getCenter(i);let n=0;return t.traverseVisible(r=>{if(!r.isMesh)return;const o=r,a=o.geometry.clone();a.applyMatrix4(o.matrixWorld);const h=a.attributes.position;for(let d=0,u=h.count;d{var e;if(!(!this.currentWorld||!this.currentWorld.renderer)){if(this.three instanceof ze){this.onAspectUpdated.trigger();return}if((e=this.currentWorld.renderer)!=null&&e.isResizeable()){const s=this.currentWorld.renderer.getSize();this.three.aspect=s.width/s.height,this.three.updateProjectionMatrix(),this.onAspectUpdated.trigger()}}}),this.three=this.setupCamera(),this.setupEvents(!0),this.onWorldChanged.add(({action:e,world:s})=>{if(e==="added"){const i=this.newCameraControls();this._allControls.set(s.uuid,i)}if(e==="removed"){const i=this._allControls.get(s.uuid);i&&(i.dispose(),this._allControls.delete(s.uuid))}})}get controls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");const t=this._allControls.get(this.currentWorld.uuid);if(!t)throw new Error("Controls not found!");return t}get enabled(){return this.currentWorld===null?!1:this.controls.enabled}set enabled(t){this.currentWorld!==null&&(this.controls.enabled=t)}dispose(){this.setupEvents(!1),this.onAspectUpdated.reset(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.three.removeFromParent(),this.onDisposed.trigger(),this.onDisposed.reset();for(const[t,e]of this._allControls)e.dispose()}update(t){this.enabled&&(this.onBeforeUpdate.trigger(this),this.controls.update(t),this.onAfterUpdate.trigger(this))}setupCamera(){const t=window.innerWidth/window.innerHeight,e=new wn(60,t,1,1e3);return e.position.set(50,50,50),e.lookAt(new U(0,0,0)),e}newCameraControls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");if(!this.currentWorld.renderer)throw new Error("This camera needs a renderer to work!");Ut.install({THREE:Gs.getSubsetOfThree()});const{domElement:t}=this.currentWorld.renderer.three,e=new Ut(this.three,t);return e.smoothTime=.2,e.dollyToCursor=!0,e.infinityDolly=!0,e.minDistance=6,e}setupEvents(t){t?window.addEventListener("resize",this.updateAspect):window.removeEventListener("resize",this.updateAspect)}static getSubsetOfThree(){return{MOUSE:Da,Vector2:Ht,Vector3:U,Vector4:va,Quaternion:se,Matrix4:It,Spherical:Ma,Box3:wt,Sphere:Li,Raycaster:Ln,MathUtils:yi}}}const yo=class No extends At{constructor(t){super(t),p(this,"onAfterUpdate",new j),p(this,"onBeforeUpdate",new j),p(this,"onDisposed",new j),p(this,"list",new re),p(this,"enabled",!0),t.add(No.uuid,this)}create(){const t=new Nl(this.components),e=t.uuid;if(this.list.has(e))throw new Error("There is already a world with this name!");return this.list.set(e,t),t}delete(t){if(!this.list.has(t.uuid))throw new Error("The provided world is not found in the list!");this.list.delete(t.uuid),t.dispose()}dispose(){this.enabled=!1;for(const[t,e]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger()}update(t){if(this.enabled)for(const[e,s]of this.list)s.update(t)}};p(yo,"uuid","fdb61dc4-2ec1-4966-b83d-54ea795fad4a");let _o=yo;function Ul(l,t,e,s){return new Promise((i,n)=>{function r(){const o=l.clientWaitSync(t,e,0);if(o===l.WAIT_FAILED){n();return}if(o===l.TIMEOUT_EXPIRED){setTimeout(r,s);return}i()}r()})}async function xl(l,t,e,s,i,n,r){const o=l.fenceSync(l.SYNC_GPU_COMMANDS_COMPLETE,0);l.flush(),await Ul(l,o,0,10),l.deleteSync(o),l.bindBuffer(t,e),l.getBufferSubData(t,s,i,n,r),l.bindBuffer(t,null)}async function Po(l,t,e,s,i,n,r,o){const a=l.createBuffer();return l.bindBuffer(l.PIXEL_PACK_BUFFER,a),l.bufferData(l.PIXEL_PACK_BUFFER,o.byteLength,l.STREAM_READ),l.readPixels(t,e,s,i,n,r,0),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),await xl(l,l.PIXEL_PACK_BUFFER,a,0,o),l.deleteBuffer(a),o}class Bl extends ke{constructor(){super(...arguments),p(this,"_config",{enabled:{value:!0,type:"Boolean"},width:{type:"Number",interpolable:!0,value:512,min:32,max:1024},height:{type:"Number",interpolable:!0,value:512,min:32,max:1024},autoUpdate:{value:!0,type:"Boolean"},renderDebugFrame:{value:!1,type:"Boolean"},updateInterval:{type:"Number",interpolable:!0,value:1,min:0,max:1},threshold:{type:"Number",interpolable:!0,value:100,min:1,max:512}}),p(this,"_interval",null)}get enabled(){return this._config.enabled.value}set enabled(t){this._config.enabled.value=t,this._component.enabled=t}get width(){return this._config.width.value}set width(t){this.setWidthHeight(t,this.height)}get height(){return this._config.height.value}set height(t){this.setWidthHeight(this.width,t)}get autoUpdate(){return this._config.autoUpdate.value}set autoUpdate(t){this.setAutoAndInterval(t,this.updateInterval)}get updateInterval(){return this._config.updateInterval.value}set updateInterval(t){this.setAutoAndInterval(this.autoUpdate,t)}get renderDebugFrame(){return this._config.renderDebugFrame.value}set renderDebugFrame(t){this._config.renderDebugFrame.value=t}get threshold(){return this._config.threshold.value}set threshold(t){this._config.threshold.value=t}setWidthHeight(t,e){if(t<=0||e<=0)throw new Error("The width and height of the culler renderer must be more than 0!");this._config.width.value=t,this._config.height.value=e,this.resetRenderTarget()}setAutoAndInterval(t,e){if(e<=0)throw new Error("The updateInterval of the culler renderer must be more than 0!");this._config.autoUpdate.value=t,this._config.updateInterval.value=e,this.resetInterval(t)}resetRenderTarget(){this._component.renderTarget.dispose(),this._component.renderTarget=new Oi(this.width,this.height),this._component.bufferSize=this.width*this.height*4,this._component.buffer=new Uint8Array(this._component.bufferSize)}resetInterval(t){this._interval!==null&&window.clearInterval(this._interval),t&&(this._interval=window.setInterval(async()=>{this._component.preventUpdate||await this._component.updateVisibility()},this.updateInterval))}}class Yl{constructor(t,e){if(p(this,"onSetup",new j),p(this,"onDisposed",new j),p(this,"onViewUpdated",new Le),p(this,"enabled",!0),p(this,"needsUpdate",!1),p(this,"components"),p(this,"renderTarget",new Oi),p(this,"bufferSize",1),p(this,"buffer",new Uint8Array),p(this,"preventUpdate",!1),p(this,"config"),p(this,"isSetup",!1),p(this,"world"),p(this,"renderer"),p(this,"_defaultConfig",{enabled:!0,height:512,width:512,updateInterval:1e3,autoUpdate:!0,renderDebugFrame:!1,threshold:100}),p(this,"worker"),p(this,"scene",new wi),p(this,"_availableColor",1),p(this,"_isWorkerBusy",!1),p(this,"updateVisibility",async n=>{if(!this.enabled||!this.needsUpdate&&!n||this._isWorkerBusy)return;this._isWorkerBusy=!0;const r=this.world.camera.three;r.updateMatrix();const{width:o,height:a}=this.config;this.renderer.setSize(o,a),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,r);const c=this.renderer.getContext();await Po(c,0,0,o,a,c.RGBA,c.UNSIGNED_BYTE,this.buffer),this.renderer.setRenderTarget(null),this.config.renderDebugFrame&&this.renderer.render(this.scene,r),this.worker.postMessage({buffer:this.buffer}),this.needsUpdate=!1}),!e.renderer)throw new Error("The given world must have a renderer!");this.components=t,this.config=new Bl(this,this.components,"Culler renderer"),this.world=e,this.renderer=new zs,this.renderer.clippingPlanes=e.renderer.clippingPlanes;const s=` + addEventListener("message", (event) => { + const { buffer } = event.data; + const colors = new Map(); + for (let i = 0; i < buffer.length; i += 4) { + const r = buffer[i]; + const g = buffer[i + 1]; + const b = buffer[i + 2]; + const code = "" + r + "-" + g + "-" + b; + if(colors.has(code)) { + colors.set(code, colors.get(code) + 1); + } else { + colors.set(code, 1); + } + } + postMessage({ colors }); + }); + `,i=new Blob([s],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(i)),this.setup()}dispose(){this.enabled=!1,this.config.autoUpdate=!1,this.components.get(Ws).list.delete(this.config.uuid);for(const e of this.scene.children)e.removeFromParent();this.onViewUpdated.reset(),this.worker.terminate(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.renderTarget.dispose(),this.buffer=null,this.onDisposed.reset()}setup(t){const e={...this._defaultConfig,...t},{width:s,height:i}=e;this.config.setWidthHeight(s,i);const{updateInterval:n,autoUpdate:r}=e;this.config.setAutoAndInterval(r,n),this.config.threshold=e.threshold,this.isSetup=!0,this.onSetup.trigger()}getAvailableColor(){let t=BigInt(this._availableColor.toString());const e=[];do e.unshift(Number(t%256n)),t/=256n;while(t);for(;e.length!==3;)e.unshift(0);const[s,i,n]=e,r=`${s}-${i}-${n}`;return{r:s,g:i,b:n,code:r}}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--}}class Vl extends Yl{constructor(t,e){super(t,e),p(this,"onViewUpdated",new j),p(this,"colorMeshes",new Map),p(this,"_colorCodeMeshMap",new Map),p(this,"_meshIDColorCodeMap",new Map),p(this,"_currentVisibleMeshes",new Set),p(this,"_recentlyHiddenMeshes",new Set),p(this,"_transparentMat",new ls({transparent:!0,opacity:0})),p(this,"handleWorkerMessage",async s=>{if(this.preventUpdate)return;const i=s.data.colors;this._recentlyHiddenMeshes=new Set(this._currentVisibleMeshes),this._currentVisibleMeshes.clear();for(const[n,r]of i){if(r{for(const n of s)n.visible=!0;for(const n of i)n.visible=!1})}get threshold(){return this.config.threshold}set threshold(t){this.config.threshold=t}dispose(){super.dispose(),this._currentVisibleMeshes.clear(),this._recentlyHiddenMeshes.clear(),this._meshIDColorCodeMap.clear(),this._transparentMat.dispose(),this._colorCodeMeshMap.clear();const t=this.components.get(fs);for(const e in this.colorMeshes){const s=this.colorMeshes.get(e);s&&t.destroy(s,!0)}this.colorMeshes.clear()}add(t){if(!this.enabled)return;if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const e=t instanceof Ve,{geometry:s,material:i}=t,{colorMaterial:n,code:r}=this.getAvailableMaterial();let o;if(Array.isArray(i)){let h=!0;const d=[];for(const u of i)br.isTransparent(u)?d.push(this._transparentMat):(h=!1,d.push(n));if(h){n.dispose(),this.preventUpdate=!1;return}o=d}else if(br.isTransparent(i)){n.dispose(),this.preventUpdate=!1;return}else o=n;this._colorCodeMeshMap.set(r,t),this._meshIDColorCodeMap.set(t.uuid,r);const a=e?t.count:1,c=new Ve(s,o,a);e?c.instanceMatrix=t.instanceMatrix:c.setMatrixAt(0,new It),t.visible=!1,t.updateWorldMatrix(!0,!1),c.applyMatrix4(t.matrixWorld),c.updateMatrix(),this.scene.add(c),this.colorMeshes.set(t.uuid,c),this.increaseColor(),this.preventUpdate=!1}remove(t){if(this.preventUpdate){console.log("Culler processing not finished yet.");return}this.preventUpdate=!0;const e=this.components.get(fs);this._currentVisibleMeshes.delete(t),this._recentlyHiddenMeshes.delete(t);const s=this.colorMeshes.get(t.uuid),i=this._meshIDColorCodeMap.get(t.uuid);if(!s||!i){this.preventUpdate=!1;return}this._colorCodeMeshMap.delete(i),this._meshIDColorCodeMap.delete(t.uuid),this.colorMeshes.delete(t.uuid),s.geometry=void 0,s.material=[],e.destroy(s,!0),this._recentlyHiddenMeshes.delete(t),this._currentVisibleMeshes.delete(t),this.preventUpdate=!1}updateInstanced(t){for(const e of t){const s=this.colorMeshes.get(e.uuid);s&&(s.count=e.count)}}getAvailableMaterial(){const{r:t,g:e,b:s,code:i}=this.getAvailableColor(),n=Vi.enabled;Vi.enabled=!1;const r=new Mt(`rgb(${t}, ${e}, ${s})`);if(!this.world.renderer)throw new Error("Renderer not found in the world!");const o=this.world.renderer.clippingPlanes,a=new ls({color:r,clippingPlanes:o,side:ks});return Vi.enabled=n,{colorMaterial:a,code:i}}}const Lo=class gn extends At{constructor(t){super(t),p(this,"onDisposed",new j),p(this,"_enabled",!0),p(this,"list",new Map),t.add(gn.uuid,this)}get enabled(){return this._enabled}set enabled(t){this._enabled=t;for(const[e,s]of this.list)s.enabled=t}create(t){if(this.list.has(t.uuid))return this.list.get(t.uuid);const e=new Vl(this.components,t);return this.list.set(t.uuid,e),e}delete(t){const e=this.list.get(t.uuid);e&&e.dispose(),this.list.delete(t.uuid)}dispose(){this.enabled=!1,this.onDisposed.trigger(gn.uuid),this.onDisposed.reset();for(const[t,e]of this.list)e.dispose();this.list.clear()}updateInstanced(t){for(const[,e]of this.list)e.updateInstanced(t)}};p(Lo,"uuid","69f2a50d-c266-44fc-b1bd-fa4d34be89e6");let zl=Lo;class Gl{constructor(t,e){if(p(this,"onDisposed",new j),p(this,"onDistanceComputed",new j),p(this,"excludedObjects",new Set),p(this,"enabled",!0),p(this,"renderDebugFrame",!1),p(this,"components"),p(this,"scene",new wi),p(this,"camera",new ze(-1,1,1,-1,0,1)),p(this,"depthMaterial"),p(this,"world"),p(this,"renderer"),p(this,"worker"),p(this,"_width",512),p(this,"_height",512),p(this,"_postQuad"),p(this,"tempRT"),p(this,"resultRT"),p(this,"bufferSize"),p(this,"_buffer"),p(this,"_isWorkerBusy",!1),p(this,"compute",async()=>{if(!this.enabled||this.world.isDisposing||this._isWorkerBusy)return;this._isWorkerBusy=!0,this.world.camera.three.updateMatrix(),this.renderer.setSize(this._width,this._height),this.renderer.setRenderTarget(this.tempRT);const o="visibilityBeforeDistanceCheck";for(const c of this.excludedObjects)c.userData[o]=c.visible,c.visible=!1;this.renderer.render(this.world.scene.three,this.world.camera.three);for(const c of this.excludedObjects)c.userData[o]!==void 0&&(c.visible=c.userData[o]);this.depthMaterial.uniforms.tDiffuse.value=this.tempRT.texture,this.depthMaterial.uniforms.tDepth.value=this.tempRT.depthTexture,this.renderer.setRenderTarget(this.resultRT),this.renderer.render(this.scene,this.camera);const a=this.renderer.getContext();try{await Po(a,0,0,this._width,this._height,a.RGBA,a.UNSIGNED_BYTE,this._buffer)}catch{this.renderer.setRenderTarget(null),this._isWorkerBusy=!1;return}this.renderer.setRenderTarget(null),this.renderDebugFrame&&this.renderer.render(this.scene,this.camera),this.worker.postMessage({buffer:this._buffer})}),p(this,"handleWorkerMessage",o=>{if(!this.enabled||this.world.isDisposing)return;const a=o.data.colors;let c=Number.MAX_VALUE;for(const I of a)I!==0&&I + +varying vec2 vUv; +uniform sampler2D tDiffuse; +uniform sampler2D tDepth; +uniform float cameraNear; +uniform float cameraFar; + + +float readDepth( sampler2D depthSampler, vec2 coord ) { + float fragCoordZ = texture2D( depthSampler, coord ).x; + float viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar ); + return viewZToOrthographicDepth( viewZ, cameraNear, cameraFar ); +} + +void main() { + //vec3 diffuse = texture2D( tDiffuse, vUv ).rgb; + float depth = readDepth( tDepth, vUv ); + + gl_FragColor.rgb = 1.0 - vec3( depth ); + gl_FragColor.a = 1.0; +} + `,uniforms:{cameraNear:{value:s.near},cameraFar:{value:s.far},tDiffuse:{value:null},tDepth:{value:null}}});const i=new Mi(2,2);this._postQuad=new et(i,this.depthMaterial),this.scene.add(this._postQuad),this.renderer.clippingPlanes=e.renderer.clippingPlanes;const n=` + addEventListener("message", (event) => { + const { buffer } = event.data; + const colors = new Set(); + for (let i = 0; i < buffer.length; i += 4) { + const r = buffer[i]; + colors.add(r); + } + postMessage({ colors }); + }); + `,r=new Blob([n],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(r)),this.worker.addEventListener("message",this.handleWorkerMessage)}dispose(){this.enabled=!1,this.onDistanceComputed.reset(),this.worker.terminate(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.tempRT.dispose(),this.resultRT.dispose();const t=[...this.scene.children];this.excludedObjects.clear();for(const e of t)e.removeFromParent();this._postQuad.geometry.dispose(),this._postQuad.removeFromParent(),this._buffer=null,this.onDisposed.reset()}}class Yu extends wl{constructor(){super(...arguments),p(this,"_distanceRenderer"),p(this,"autoBias",!0),p(this,"_defaultShadowConfig",{cascade:1,resolution:512}),p(this,"_lightsWithShadow",new Map),p(this,"_isComputingShadows",!1),p(this,"_shadowsEnabled",!0),p(this,"_bias",0),p(this,"recomputeShadows",t=>{if(!this._shadowsEnabled)return;if(this.autoBias&&(this.bias=t/-1e5),t*=1.5,!this.currentWorld)throw new Error("A world needs to be assigned to the scene before computing shadows!");if(!this._lightsWithShadow.size)throw new Error("No shadows found!");const s=this.currentWorld.camera.three;if(!(s instanceof wn)&&!(s instanceof ze))throw new Error("Invalid camera type!");const i=new U;s.getWorldDirection(i);let n=t;const r=new U;r.copy(this.config.directionalLight.position),r.normalize();for(const[o,a]of this._lightsWithShadow){const c=this.directionalLights.get(a);if(!c)throw new Error("Light not found.");const h=new U;h.copy(i);const d=o===this._lightsWithShadow.size-1,u=d?n/2:n*2/3;h.multiplyScalar(u),h.add(s.position);const f=n-u,I=new U;I.copy(r),I.multiplyScalar(f),c.target.position.copy(h),c.position.copy(h),c.position.add(I),c.shadow.camera.right=f,c.shadow.camera.left=-f,c.shadow.camera.top=f,c.shadow.camera.bottom=-f,c.shadow.camera.far=f*2,c.shadow.camera.updateProjectionMatrix(),c.shadow.camera.updateMatrix(),d||(n/=3)}this._isComputingShadows=!1})}get bias(){return this._bias}set bias(t){this._bias=t;for(const[,e]of this._lightsWithShadow){const s=this.directionalLights.get(e);s&&(s.shadow.bias=t)}}get shadowsEnabled(){return this._shadowsEnabled}set shadowsEnabled(t){this._shadowsEnabled=t;for(const[,e]of this.directionalLights)e.castShadow=t}get distanceRenderer(){if(!this._distanceRenderer)throw new Error("You must set up this component before accessing the distance renderer!");return this._distanceRenderer}setup(t){super.setup(t);const e={...this._defaultConfig,...this._defaultShadowConfig,...t};if(e.cascade<=0)throw new Error("Config.shadows.cascade must be a natural number greater than 0!");if(e.cascade>1)throw new Error("Multiple shadows not supported yet!");if(!this.currentWorld)throw new Error("A world needs to be assigned to the scene before setting it up!");for(const[,s]of this.directionalLights)s.target.removeFromParent(),s.removeFromParent(),s.dispose();this.directionalLights.clear(),this._distanceRenderer||(this._distanceRenderer=new Gl(this.components,this.currentWorld),this._distanceRenderer.onDistanceComputed.add(this.recomputeShadows)),this._lightsWithShadow.clear();for(let s=0;s{this._event=e}),this.dom=t,this.setupEvents(!0)}get position(){if(this._event){const t=this.dom.getBoundingClientRect();this._position.x=this.getPositionX(t,this._event),this._position.y=this.getPositionY(t,this._event)}return this._position}dispose(){this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset()}getPositionY(t,e){return-((this.getDataObject(e).clientY-t.top)/(t.bottom-t.top))*2+1}getPositionX(t,e){return(this.getDataObject(e).clientX-t.left)/(t.right-t.left)*2-1}getDataObject(t){return t instanceof MouseEvent?t:t.touches[0]}setupEvents(t){t?(this.dom.addEventListener("pointermove",this.updateMouseInfo),this.dom.addEventListener("touchstart",this.updateMouseInfo)):(this.dom.removeEventListener("pointermove",this.updateMouseInfo),this.dom.removeEventListener("touchstart",this.updateMouseInfo))}}class Hl{constructor(t,e){p(this,"enabled",!0),p(this,"components"),p(this,"onDisposed",new j),p(this,"mouse"),p(this,"three",new Ln),p(this,"world");const s=e.renderer;if(!s)throw new Error("A renderer is needed for the raycaster to work!");this.world=e,this.mouse=new kl(s.three.domElement),this.components=t}dispose(){this.mouse.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}castRay(t=Array.from(this.world.meshes),e=this.mouse.position){if(!this.world)throw new Error("A world is needed to cast rays!");const s=this.world.camera.three;return this.three.setFromCamera(e,s),this.intersect(t)}castRayFromVector(t,e,s=Array.from(this.world.meshes)){return this.three.set(t,e),this.intersect(s)}intersect(t=Array.from(this.world.meshes)){const e=this.three.intersectObjects(t),s=this.filterClippingPlanes(e);return s.length>0?s[0]:null}filterClippingPlanes(t){if(!this.world.renderer)throw new Error("Renderer not found!");const e=this.world.renderer.three;if(!e.clippingPlanes)return t;const s=e.clippingPlanes;return t.length<=0||!s||(s==null?void 0:s.length)<=0?t:t.filter(i=>s.every(n=>n.distanceToPoint(i.point)>0))}}const wo=class Mo extends At{constructor(t){super(t),p(this,"enabled",!0),p(this,"list",new Map),p(this,"onDisposed",new j),t.add(Mo.uuid,this)}get(t){if(this.list.has(t.uuid))return this.list.get(t.uuid);const e=new Hl(this.components,t);return this.list.set(t.uuid,e),t.onDisposed.add(()=>{this.delete(t)}),e}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()}};p(wo,"uuid","d5d8bdf0-db25-4952-b951-b643af207ace");let Rn=wo;class Wl extends ke{constructor(){super(...arguments),p(this,"_config",{visible:{value:!0,type:"Boolean"},color:{value:new Mt,type:"Color"},primarySize:{type:"Number",interpolable:!0,value:1,min:0,max:1e3},secondarySize:{type:"Number",interpolable:!0,value:10,min:0,max:1e3},distance:{type:"Number",interpolable:!0,value:500,min:0,max:500}})}get visible(){return this._config.visible.value}set visible(t){this._config.visible.value=t,this._component.visible=t}get color(){return this._config.color.value}set color(t){this._config.color.value=t,this._component.material.uniforms.uColor.value=t,this._component.material.uniformsNeedUpdate=!0}get primarySize(){return this._config.primarySize.value}set primarySize(t){this._config.primarySize.value=t,this._component.material.uniforms.uSize1.value=t,this._component.material.uniformsNeedUpdate=!0}get secondarySize(){return this._config.secondarySize.value}set secondarySize(t){this._config.secondarySize.value=t,this._component.material.uniforms.uSize2.value=t,this._component.material.uniformsNeedUpdate=!0}get distance(){return this._config.distance.value}set distance(t){this._config.distance.value=t,this._component.material.uniforms.uDistance.value=t,this._component.material.uniformsNeedUpdate=!0}}class Xl{constructor(t,e){p(this,"onDisposed",new j),p(this,"onSetup",new j),p(this,"isSetup",!1),p(this,"world"),p(this,"components"),p(this,"config"),p(this,"_defaultConfig",{visible:!0,color:new Mt(12303291),primarySize:1,secondarySize:10,distance:500}),p(this,"three"),p(this,"_fade",3),p(this,"updateZoom",()=>{this.world.camera instanceof Gs&&(this.material.uniforms.uZoom.value=this.world.camera.three.zoom)}),this.world=e;const{color:s,primarySize:i,secondarySize:n,distance:r}=this._defaultConfig;this.components=t,this.config=new Wl(this,this.components,"Grid");const o=new Mi(2,2,1,1),a=new co({side:ks,uniforms:{uSize1:{value:i},uSize2:{value:n},uColor:{value:s},uDistance:{value:r},uFade:{value:this._fade},uZoom:{value:1}},transparent:!0,vertexShader:` + + varying vec3 worldPosition; + + uniform float uDistance; + + void main() { + + vec3 pos = position.xzy * uDistance; + pos.xz += cameraPosition.xz; + + worldPosition = pos; + + gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0); + + } + `,fragmentShader:` + + varying vec3 worldPosition; + + uniform float uZoom; + uniform float uFade; + uniform float uSize1; + uniform float uSize2; + uniform vec3 uColor; + uniform float uDistance; + + + + float getGrid(float size) { + + vec2 r = worldPosition.xz / size; + + + vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r); + float line = min(grid.x, grid.y); + + + return 1.0 - min(line, 1.0); + } + + void main() { + + + float d = 1.0 - min(distance(cameraPosition.xz, worldPosition.xz) / uDistance, 1.0); + + float g1 = getGrid(uSize1); + float g2 = getGrid(uSize2); + + // Ortho camera fades the grid away when zooming out + float minZoom = step(0.2, uZoom); + float zoomFactor = pow(min(uZoom, 1.), 2.) * minZoom; + + gl_FragColor = vec4(uColor.rgb, mix(g2, g1, g1) * pow(d, uFade)); + gl_FragColor.a = mix(0.5 * gl_FragColor.a, gl_FragColor.a, g2) * zoomFactor; + + if ( gl_FragColor.a <= 0.0 ) discard; + + + } + + `,extensions:{derivatives:!0}});this.three=new et(o,a),this.three.frustumCulled=!1,e.scene.three.add(this.three),this.setupEvents(!0)}get visible(){return this.three.visible}set visible(t){t?this.world.scene.three.add(this.three):this.three.removeFromParent()}get material(){return this.three.material}get fade(){return this._fade===3}set fade(t){this._fade=t?3:0,this.material.uniforms.uFade.value=this._fade}setup(t){const e={...this._defaultConfig,...t};this.config.visible=!0,this.config.color=e.color,this.config.primarySize=e.primarySize,this.config.secondarySize=e.secondarySize,this.config.distance=e.distance,this.isSetup=!0,this.onSetup.trigger()}dispose(){this.setupEvents(!1),this.components.get(Ws).list.delete(this.config.uuid),this.components.get(fs).destroy(this.three),this.onDisposed.trigger(),this.onDisposed.reset(),this.world=null,this.components=null}setupEvents(t){if(this.world.isDisposing||!(this.world.camera instanceof Gs))return;const e=this.world.camera.controls;t?e.addEventListener("update",this.updateZoom):e.removeEventListener("update",this.updateZoom)}}const vo=class Do extends At{constructor(t){super(t),p(this,"list",new Map),p(this,"onDisposed",new j),p(this,"enabled",!0),t.add(Do.uuid,this)}create(t){if(this.list.has(t.uuid))throw new Error("This world already has a grid!");const e=new Xl(this.components,t);return this.list.set(t.uuid,e),t.onDisposed.add(()=>{this.delete(t)}),e}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(),this.onDisposed.reset()}};p(vo,"uuid","d1e814d5-b81c-4452-87a2-f039375e0489");let Vu=vo;const be=new Ln,bt=new U,Se=new U,St=new se,Hr={X:new U(1,0,0),Y:new U(0,1,0),Z:new U(0,0,1)},cn={type:"change"},Wr={type:"mouseDown"},Xr={type:"mouseUp",mode:null},$r={type:"objectChange"};class $l extends Ni{constructor(t,e){super(),e===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),e=document),this.isTransformControls=!0,this.visible=!1,this.domElement=e,this.domElement.style.touchAction="none";const s=new Jl;this._gizmo=s,this.add(s);const i=new th;this._plane=i,this.add(i);const n=this;function r(g,S){let m=S;Object.defineProperty(n,g,{get:function(){return m!==void 0?m:S},set:function(F){m!==F&&(m=F,i[g]=F,s[g]=F,n.dispatchEvent({type:g+"-changed",value:F}),n.dispatchEvent(cn))}}),n[g]=S,i[g]=S,s[g]=S}r("camera",t),r("object",void 0),r("enabled",!0),r("axis",null),r("mode","translate"),r("translationSnap",null),r("rotationSnap",null),r("scaleSnap",null),r("space","world"),r("size",1),r("dragging",!1),r("showX",!0),r("showY",!0),r("showZ",!0);const o=new U,a=new U,c=new se,h=new se,d=new U,u=new se,f=new U,I=new U,E=new U,T=0,C=new U;r("worldPosition",o),r("worldPositionStart",a),r("worldQuaternion",c),r("worldQuaternionStart",h),r("cameraPosition",d),r("cameraQuaternion",u),r("pointStart",f),r("pointEnd",I),r("rotationAxis",E),r("rotationAngle",T),r("eye",C),this._offset=new U,this._startNorm=new U,this._endNorm=new U,this._cameraScale=new U,this._parentPosition=new U,this._parentQuaternion=new se,this._parentQuaternionInv=new se,this._parentScale=new U,this._worldScaleStart=new U,this._worldQuaternionInv=new se,this._worldScale=new U,this._positionStart=new U,this._quaternionStart=new se,this._scaleStart=new U,this._getPointer=Zl.bind(this),this._onPointerDown=ql.bind(this),this._onPointerHover=jl.bind(this),this._onPointerMove=Ql.bind(this),this._onPointerUp=Kl.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(t){if(this.object===void 0||this.dragging===!0)return;be.setFromCamera(t,this.camera);const e=ln(this._gizmo.picker[this.mode],be);e?this.axis=e.object.name:this.axis=null}pointerDown(t){if(!(this.object===void 0||this.dragging===!0||t.button!==0)&&this.axis!==null){be.setFromCamera(t,this.camera);const e=ln(this._plane,be,!0);e&&(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(e.point).sub(this.worldPositionStart)),this.dragging=!0,Wr.mode=this.mode,this.dispatchEvent(Wr)}}pointerMove(t){const e=this.axis,s=this.mode,i=this.object;let n=this.space;if(s==="scale"?n="local":(e==="E"||e==="XYZE"||e==="XYZ")&&(n="world"),i===void 0||e===null||this.dragging===!1||t.button!==-1)return;be.setFromCamera(t,this.camera);const r=ln(this._plane,be,!0);if(r){if(this.pointEnd.copy(r.point).sub(this.worldPositionStart),s==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),n==="local"&&e!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),e.indexOf("X")===-1&&(this._offset.x=0),e.indexOf("Y")===-1&&(this._offset.y=0),e.indexOf("Z")===-1&&(this._offset.z=0),n==="local"&&e!=="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&&(n==="local"&&(i.position.applyQuaternion(St.copy(this._quaternionStart).invert()),e.search("X")!==-1&&(i.position.x=Math.round(i.position.x/this.translationSnap)*this.translationSnap),e.search("Y")!==-1&&(i.position.y=Math.round(i.position.y/this.translationSnap)*this.translationSnap),e.search("Z")!==-1&&(i.position.z=Math.round(i.position.z/this.translationSnap)*this.translationSnap),i.position.applyQuaternion(this._quaternionStart)),n==="world"&&(i.parent&&i.position.add(bt.setFromMatrixPosition(i.parent.matrixWorld)),e.search("X")!==-1&&(i.position.x=Math.round(i.position.x/this.translationSnap)*this.translationSnap),e.search("Y")!==-1&&(i.position.y=Math.round(i.position.y/this.translationSnap)*this.translationSnap),e.search("Z")!==-1&&(i.position.z=Math.round(i.position.z/this.translationSnap)*this.translationSnap),i.parent&&i.position.sub(bt.setFromMatrixPosition(i.parent.matrixWorld))));else if(s==="scale"){if(e.search("XYZ")!==-1){let o=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(o*=-1),Se.set(o,o,o)}else bt.copy(this.pointStart),Se.copy(this.pointEnd),bt.applyQuaternion(this._worldQuaternionInv),Se.applyQuaternion(this._worldQuaternionInv),Se.divide(bt),e.search("X")===-1&&(Se.x=1),e.search("Y")===-1&&(Se.y=1),e.search("Z")===-1&&(Se.z=1);i.scale.copy(this._scaleStart).multiply(Se),this.scaleSnap&&(e.search("X")!==-1&&(i.scale.x=Math.round(i.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),e.search("Y")!==-1&&(i.scale.y=Math.round(i.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),e.search("Z")!==-1&&(i.scale.z=Math.round(i.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(s==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const o=20/this.worldPosition.distanceTo(bt.setFromMatrixPosition(this.camera.matrixWorld));let a=!1;e==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(bt.copy(this.rotationAxis).cross(this.eye))*o):(e==="X"||e==="Y"||e==="Z")&&(this.rotationAxis.copy(Hr[e]),bt.copy(Hr[e]),n==="local"&&bt.applyQuaternion(this.worldQuaternion),bt.cross(this.eye),bt.length()===0?a=!0:this.rotationAngle=this._offset.dot(bt.normalize())*o),(e==="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),n==="local"&&e!=="E"&&e!=="XYZE"?(i.quaternion.copy(this._quaternionStart),i.quaternion.multiply(St.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),i.quaternion.copy(St.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),i.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(cn),this.dispatchEvent($r)}}pointerUp(t){t.button===0&&(this.dragging&&this.axis!==null&&(Xr.mode=this.mode,this.dispatchEvent(Xr)),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(t){t.geometry&&t.geometry.dispose(),t.material&&t.material.dispose()})}attach(t){return this.object=t,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(cn),this.dispatchEvent($r),this.pointStart.copy(this.pointEnd))}getRaycaster(){return be}getMode(){return this.mode}setMode(t){this.mode=t}setTranslationSnap(t){this.translationSnap=t}setRotationSnap(t){this.rotationSnap=t}setScaleSnap(t){this.scaleSnap=t}setSize(t){this.size=t}setSpace(t){this.space=t}}function Zl(l){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:l.button};{const t=this.domElement.getBoundingClientRect();return{x:(l.clientX-t.left)/t.width*2-1,y:-(l.clientY-t.top)/t.height*2+1,button:l.button}}}function jl(l){if(this.enabled)switch(l.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(l));break}}function ql(l){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(l.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(l)),this.pointerDown(this._getPointer(l)))}function Ql(l){this.enabled&&this.pointerMove(this._getPointer(l))}function Kl(l){this.enabled&&(this.domElement.releasePointerCapture(l.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(l)))}function ln(l,t,e){const s=t.intersectObject(l,!0);for(let i=0;i.9&&(r.visible=!1)),this.axis==="Y"&&(St.setFromEuler(Ei.set(0,0,Math.PI/2)),r.quaternion.copy(s).multiply(St),Math.abs(Ct.copy(Ue).applyQuaternion(s).dot(this.eye))>.9&&(r.visible=!1)),this.axis==="Z"&&(St.setFromEuler(Ei.set(0,Math.PI/2,0)),r.quaternion.copy(s).multiply(St),Math.abs(Ct.copy(bs).applyQuaternion(s).dot(this.eye))>.9&&(r.visible=!1)),this.axis==="XYZE"&&(St.setFromEuler(Ei.set(0,Math.PI/2,0)),Ct.copy(this.rotationAxis),r.quaternion.setFromRotationMatrix(jr.lookAt(Zr,Ct,Ue)),r.quaternion.multiply(St),r.visible=this.dragging),this.axis==="E"&&(r.visible=!1)):r.name==="START"?(r.position.copy(this.worldPositionStart),r.visible=this.dragging):r.name==="END"?(r.position.copy(this.worldPosition),r.visible=this.dragging):r.name==="DELTA"?(r.position.copy(this.worldPositionStart),r.quaternion.copy(this.worldQuaternionStart),bt.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),bt.applyQuaternion(this.worldQuaternionStart.clone().invert()),r.scale.copy(bt),r.visible=this.dragging):(r.quaternion.copy(s),this.dragging?r.position.copy(this.worldPositionStart):r.position.copy(this.worldPosition),this.axis&&(r.visible=this.axis.search(r.name)!==-1));continue}r.quaternion.copy(s),this.mode==="translate"||this.mode==="scale"?(r.name==="X"&&Math.abs(Ct.copy(Ds).applyQuaternion(s).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="Y"&&Math.abs(Ct.copy(Ue).applyQuaternion(s).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="Z"&&Math.abs(Ct.copy(bs).applyQuaternion(s).dot(this.eye))>.99&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="XY"&&Math.abs(Ct.copy(bs).applyQuaternion(s).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="YZ"&&Math.abs(Ct.copy(Ds).applyQuaternion(s).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name==="XZ"&&Math.abs(Ct.copy(Ue).applyQuaternion(s).dot(this.eye))<.2&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1)):this.mode==="rotate"&&(pi.copy(s),Ct.copy(this.eye).applyQuaternion(St.copy(s).invert()),r.name.search("E")!==-1&&r.quaternion.setFromRotationMatrix(jr.lookAt(this.eye,Zr,Ue)),r.name==="X"&&(St.setFromAxisAngle(Ds,Math.atan2(-Ct.y,Ct.z)),St.multiplyQuaternions(pi,St),r.quaternion.copy(St)),r.name==="Y"&&(St.setFromAxisAngle(Ue,Math.atan2(Ct.x,Ct.z)),St.multiplyQuaternions(pi,St),r.quaternion.copy(St)),r.name==="Z"&&(St.setFromAxisAngle(bs,Math.atan2(Ct.y,Ct.x)),St.multiplyQuaternions(pi,St),r.quaternion.copy(St))),r.visible=r.visible&&(r.name.indexOf("X")===-1||this.showX),r.visible=r.visible&&(r.name.indexOf("Y")===-1||this.showY),r.visible=r.visible&&(r.name.indexOf("Z")===-1||this.showZ),r.visible=r.visible&&(r.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),r.material._color=r.material._color||r.material.color.clone(),r.material._opacity=r.material._opacity||r.material.opacity,r.material.color.copy(r.material._color),r.material.opacity=r.material._opacity,this.enabled&&this.axis&&(r.name===this.axis||this.axis.split("").some(function(a){return r.name===a}))&&(r.material.color.setHex(16776960),r.material.opacity=1)}super.updateMatrixWorld(t)}}class th extends et{constructor(){super(new Mi(1e5,1e5,2,2),new ls({visible:!1,wireframe:!0,side:ks,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(t){let e=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(e="local"),Ci.copy(Ds).applyQuaternion(e==="local"?this.worldQuaternion:Fi),Ls.copy(Ue).applyQuaternion(e==="local"?this.worldQuaternion:Fi),ws.copy(bs).applyQuaternion(e==="local"?this.worldQuaternion:Fi),Ct.copy(Ls),this.mode){case"translate":case"scale":switch(this.axis){case"X":Ct.copy(this.eye).cross(Ci),le.copy(Ci).cross(Ct);break;case"Y":Ct.copy(this.eye).cross(Ls),le.copy(Ls).cross(Ct);break;case"Z":Ct.copy(this.eye).cross(ws),le.copy(ws).cross(Ct);break;case"XY":le.copy(ws);break;case"YZ":le.copy(Ci);break;case"XZ":Ct.copy(ws),le.copy(Ls);break;case"XYZ":case"E":le.set(0,0,0);break}break;case"rotate":default:le.set(0,0,0)}le.length()===0?this.quaternion.copy(this.cameraQuaternion):(qr.lookAt(bt.set(0,0,0),le,Ct),this.quaternion.setFromRotationMatrix(qr)),super.updateMatrixWorld(t)}}class tr{constructor(t,e,s,i,n,r=5,o=!0){if(p(this,"onDraggingStarted",new j),p(this,"onDraggingEnded",new j),p(this,"onDisposed",new j),p(this,"normal"),p(this,"origin"),p(this,"three",new ds),p(this,"components"),p(this,"world"),p(this,"type","default"),p(this,"_helper"),p(this,"_visible",!0),p(this,"_enabled",!0),p(this,"_controlsActive",!1),p(this,"_arrowBoundBox",new et),p(this,"_planeMesh"),p(this,"_controls"),p(this,"_hiddenMaterial",new ls({visible:!1})),p(this,"update",()=>{this._enabled&&this.three.setFromNormalAndCoplanarPoint(this.normal,this._helper.position)}),p(this,"changeDrag",a=>{this._visible=!a.value,this.preventCameraMovement(),this.notifyDraggingChanged(a)}),this.components=t,this.world=e,!e.renderer)throw new Error("The given world must have a renderer!");this.normal=i,this.origin=s,e.renderer.setPlane(!0,this.three),this._planeMesh=tr.newPlaneMesh(r,n),this._helper=this.newHelper(),this._controls=this.newTransformControls(),this.three.setFromNormalAndCoplanarPoint(i,s),o&&this.toggleControls(!0)}get enabled(){return this._enabled}set enabled(t){if(!this.world.isDisposing){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");this._enabled=t,this.world.renderer.setPlane(t,this.three)}}get visible(){return this._visible}set visible(t){this._visible=t,this._controls.visible=t,this._helper.visible=t,this.toggleControls(t)}get meshes(){return[this._planeMesh,this._arrowBoundBox]}get planeMaterial(){return this._planeMesh.material}set planeMaterial(t){this._planeMesh.material=t}get size(){return this._planeMesh.scale.x}set size(t){this._planeMesh.scale.set(t,t,t)}get helper(){return this._helper}setFromNormalAndCoplanarPoint(t,e){this.reset(),this.normal.equals(t)||(this.normal.copy(t),this._helper.lookAt(t)),this.origin.copy(e),this._helper.position.copy(e),this._helper.updateMatrix(),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 t=new U(1,0,0),e=new U;this.normal.equals(t)||(this.normal.copy(t),this._helper.lookAt(t)),this.origin.copy(e),this._helper.position.copy(e),this._helper.updateMatrix()}toggleControls(t){if(t){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=t}newTransformControls(){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");const t=this.world.camera.three,e=this.world.renderer.three.domElement,s=new $l(t,e);return this.initializeControls(s),this.world.scene.three.add(s),s}initializeControls(t){t.attach(this._helper),t.showX=!1,t.showY=!1,t.setSpace("local"),this.createArrowBoundingBox(),t.children[0].children[0].add(this._arrowBoundBox)}createArrowBoundingBox(){this._arrowBoundBox.geometry=new xt(.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(t){t.value?this.onDraggingStarted.trigger():this.onDraggingEnded.trigger()}preventCameraMovement(){this.world.camera.enabled=this._visible}newHelper(){const t=new Ni;return t.lookAt(this.normal),t.position.copy(this.origin),this._planeMesh.position.z+=.01,t.add(this._planeMesh),this.world.scene.three.add(t),t}static newPlaneMesh(t,e){const s=new Mi(1),i=new et(s,e);return i.scale.set(t,t,t),i}}class eh extends ke{constructor(){super(...arguments),p(this,"_config",{enabled:{value:!0,type:"Boolean"},visible:{value:!0,type:"Boolean"},color:{value:new Mt,type:"Color"},opacity:{type:"Number",interpolable:!0,value:1,min:0,max:1},size:{type:"Number",interpolable:!0,value:2,min:0,max:100}})}get enabled(){return this._config.enabled.value}set enabled(t){this._config.enabled.value=t,this._component.enabled=t}get visible(){return this._config.visible.value}set visible(t){this._config.visible.value=t,this._component.visible=t}get color(){return this._config.color.value}set color(t){this._config.color.value=t,this._component.material.color.copy(t)}get opacity(){return this._config.opacity.value}set opacity(t){this._config.opacity.value=t,this._component.material.opacity=t}get size(){return this._config.size.value}set size(t){this._config.size.value=t,this._component.size=t}}const bo=class Si extends At{constructor(t){super(t),p(this,"onSetup",new j),p(this,"onBeforeDrag",new j),p(this,"onAfterDrag",new j),p(this,"onBeforeCreate",new j),p(this,"onBeforeCancel",new j),p(this,"onAfterCancel",new j),p(this,"onBeforeDelete",new j),p(this,"onAfterCreate",new j),p(this,"onAfterDelete",new j),p(this,"onDisposed",new j),p(this,"isSetup",!1),p(this,"orthogonalY",!1),p(this,"toleranceOrthogonalY",.7),p(this,"Type",tr),p(this,"list",[]),p(this,"config",new eh(this,this.components,"Clipper",Si.uuid)),p(this,"_defaultConfig",{color:new Mt(12255487),opacity:.2,size:2}),p(this,"_material",new ls({color:12255487,side:ks,transparent:!0,opacity:.2})),p(this,"_size",5),p(this,"_enabled",!1),p(this,"_visible",!0),p(this,"_onStartDragging",()=>{this.onBeforeDrag.trigger()}),p(this,"_onEndDragging",()=>{this.onAfterDrag.trigger()}),this.components.add(Si.uuid,this)}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}dispose(){this._enabled=!1,this.components.get(Ws).list.delete(this.config.uuid);for(const e of this.list)e.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(Si.uuid),this.onDisposed.reset()}create(t){const i=this.components.get(Rn).get(t).castRay();return i?this.createPlaneFromIntersection(t,i):null}createFromNormalAndCoplanarPoint(t,e,s){const i=this.newPlane(t,s,e);return this.updateMaterialsAndPlanes(),i}delete(t,e){e||(e=this.pickPlane(t)),e&&this.deletePlane(e)}deleteAll(t){const e=[...this.list];for(const s of e)if(!t||t.has(s.type)){this.delete(s.world,s);const i=this.list.indexOf(s);i!==-1&&this.list.splice(i,1)}}setup(t){const e={...this._defaultConfig,...t};this.config.color=e.color,this.config.opacity=e.opacity,this.config.size=e.size,this.isSetup=!0,this.onSetup.trigger()}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 s=this.components.get(Rn).get(t),i=this.getAllPlaneMeshes(),n=s.castRay(i);if(n){const r=n.object;return this.list.find(o=>o.meshes.includes(r))}}getAllPlaneMeshes(){const t=[];for(const e of this.list)t.push(...e.meshes);return t}createPlaneFromIntersection(t,e){var s;if(!t.renderer)throw new Error("The given world must have a renderer!");const i=e.point.distanceTo(new U(0,0,0)),n=(s=e.face)==null?void 0:s.normal;if(!i||!n)return null;const r=this.getWorldNormal(e,n),o=this.newPlane(t,e.point,r.negate());return o.visible=this._visible,o.size=this._size,t.renderer.setPlane(!0,o.three),this.updateMaterialsAndPlanes(),o}getWorldNormal(t,e){const s=t.object;let i=t.object.matrixWorld.clone();if(s instanceof Ve&&t.instanceId!==void 0){const a=new It;s.getMatrixAt(t.instanceId,a),i=a.multiply(i)}const r=new Be().getNormalMatrix(i),o=e.clone().applyMatrix3(r).normalize();return this.normalizePlaneDirectionY(o),o}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,s){const i=new this.Type(this.components,t,e,s,this._material);return i.onDraggingStarted.add(this._onStartDragging),i.onDraggingEnded.add(this._onEndDragging),this.list.push(i),this.onAfterCreate.trigger(i),i}updateMaterialsAndPlanes(){const t=this.components.get(_o);for(const[e,s]of t.list){if(!s.renderer)continue;s.renderer.updateClippingPlanes();const{clippingPlanes:i}=s.renderer;for(const n of s.meshes)if(n.material)if(Array.isArray(n.material))for(const r of n.material)r.clippingPlanes=i;else n.material.clippingPlanes=i}}};p(bo,"uuid","66290bc5-18c4-4cd1-9379-2e17a0617611");let sh=bo;class ih{constructor(t){p(this,"enabled",!1),p(this,"id","FirstPerson"),this.camera=t}set(t){if(this.enabled=t,t){if(this.camera.projection.current!=="Perspective"){this.camera.set("Orbit");return}this.setupFirstPersonCamera()}}setupFirstPersonCamera(){const t=this.camera.controls,e=new U;t.distance--,t.getPosition(e),t.minDistance=1,t.maxDistance=1,t.distance=1,t.moveTo(e.x,e.y,e.z),t.truckSpeed=50,t.mouseButtons.wheel=Ut.ACTION.DOLLY,t.touches.two=Ut.ACTION.TOUCH_ZOOM_TRUCK}}class nh{constructor(t){p(this,"enabled",!0),p(this,"id","Orbit"),this.camera=t,this.activateOrbitControls()}set(t){this.enabled=t,t&&this.activateOrbitControls()}activateOrbitControls(){const t=this.camera.controls;t.minDistance=1,t.maxDistance=300;const e=new U;t.getPosition(e);const s=e.length();t.distance=s,t.truckSpeed=2;const{rotation:i}=this.camera.three,n=new U(0,0,-1).applyEuler(i),r=e.addScaledVector(n,s);t.moveTo(r.x,r.y,r.z)}}class rh{constructor(t){p(this,"enabled",!1),p(this,"id","Plan"),p(this,"mouseAction1"),p(this,"mouseAction2"),p(this,"mouseInitialized",!1),p(this,"defaultAzimuthSpeed"),p(this,"defaultPolarSpeed"),this.camera=t,this.defaultAzimuthSpeed=t.controls.azimuthRotateSpeed,this.defaultPolarSpeed=t.controls.polarRotateSpeed}set(t){this.enabled=t;const e=this.camera.controls;e.azimuthRotateSpeed=t?0:this.defaultAzimuthSpeed,e.polarRotateSpeed=t?0:this.defaultPolarSpeed,this.mouseInitialized||(this.mouseAction1=e.touches.one,this.mouseAction2=e.touches.two,this.mouseInitialized=!0),t?(e.mouseButtons.left=Ut.ACTION.TRUCK,e.touches.one=Ut.ACTION.TOUCH_TRUCK,e.touches.two=Ut.ACTION.TOUCH_ZOOM):(e.mouseButtons.left=Ut.ACTION.ROTATE,e.touches.one=this.mouseAction1,e.touches.two=this.mouseAction2)}}class oh{constructor(t){p(this,"onChanged",new j),p(this,"current","Perspective"),p(this,"camera"),p(this,"matchOrthoDistanceEnabled",!1),p(this,"_component"),p(this,"_previousDistance",-1),this._component=t,this.camera=t.three}async set(t){this.current!==t&&(t==="Orthographic"?this.setOrthoCamera():await this.setPerspectiveCamera(),this.onChanged.trigger(this.camera))}async toggle(){const e=this.current==="Perspective"?"Orthographic":"Perspective";await this.set(e)}setOrthoCamera(){if(this._component.mode===null||this._component.mode.id==="FirstPerson")return;this._previousDistance=this._component.controls.distance,this._component.controls.distance=200;const t=this.getPerspectiveDims();if(!t)return;const{width:e,height:s}=t;this.setupOrthoCamera(s,e),this.camera=this._component.threeOrtho,this.current="Orthographic"}getPerspectiveDims(){const t=this._component.currentWorld;if(!t||!t.renderer)return null;const e=new U;this._component.threePersp.getWorldDirection(e);const s=new U;this._component.controls.getTarget(s);const n=s.clone().sub(this._component.threePersp.position).dot(e),r=t.renderer.getSize(),o=r.x/r.y,a=this._component.threePersp,c=n*2*Math.atan(a.fov*(Math.PI/180)/2);return{width:c*o,height:c}}setupOrthoCamera(t,e){this._component.controls.mouseButtons.wheel=Ut.ACTION.ZOOM,this._component.controls.mouseButtons.middle=Ut.ACTION.ZOOM;const s=this._component.threePersp,i=this._component.threeOrtho;i.zoom=1,i.left=e/-2,i.right=e/2,i.top=t/2,i.bottom=t/-2,i.updateProjectionMatrix(),i.position.copy(s.position),i.quaternion.copy(s.quaternion),this._component.controls.camera=i}getDistance(){const t=this._component.threePersp,e=this._component.threeOrtho;return(e.top-e.bottom)/e.zoom/(2*Math.atan(t.fov*(Math.PI/180)/2))}async setPerspectiveCamera(){this._component.controls.mouseButtons.wheel=Ut.ACTION.DOLLY,this._component.controls.mouseButtons.middle=Ut.ACTION.DOLLY;const t=this._component.threePersp,e=this._component.threeOrtho;t.position.copy(e.position),t.quaternion.copy(e.quaternion),this._component.controls.mouseButtons.wheel=Ut.ACTION.DOLLY,this.matchOrthoDistanceEnabled?this._component.controls.distance=this.getDistance():this._component.controls.distance=this._previousDistance,await this._component.controls.zoomTo(1),t.updateProjectionMatrix(),this._component.controls.camera=t,this.camera=t,this.current="Perspective"}}class ah extends Gs{constructor(t){super(t),p(this,"projection"),p(this,"threeOrtho"),p(this,"threePersp"),p(this,"_userInputButtons",{}),p(this,"_frustumSize",50),p(this,"_navigationModes",new Map),p(this,"_mode",null),p(this,"previousSize",null),this.threePersp=this.three,this.threeOrtho=this.newOrthoCamera(),this.projection=new oh(this),this.onAspectUpdated.add(()=>{this.setOrthoPerspCameraAspect()}),this.projection.onChanged.add(e=>{this.three=e,this.updateAspect()}),this.onWorldChanged.add(({action:e})=>{e==="added"&&(this._navigationModes.clear(),this._navigationModes.set("Orbit",new nh(this)),this._navigationModes.set("FirstPerson",new ih(this)),this._navigationModes.set("Plan",new rh(this)),this._mode=this._navigationModes.get("Orbit"),this.mode.set(!0,{preventTargetAdjustment:!0}),this.currentWorld&&this.currentWorld.renderer&&(this.previousSize=this.currentWorld.renderer.getSize().clone()))})}get mode(){if(!this._mode)throw new Error("Mode not found, camera not initialized");return this._mode}dispose(){super.dispose(),this.threeOrtho.removeFromParent()}set(t){if(this.mode!==null&&this.mode.id!==t){if(this.mode.set(!1),!this._navigationModes.has(t))throw new Error("The specified mode does not exist!");this._mode=this._navigationModes.get(t),this.mode.set(!0)}}async fit(t,e=1.5){if(!this.enabled)return;const s=Number.MAX_VALUE,i=Number.MIN_VALUE,n=new U(s,s,s),r=new U(i,i,i);for(const u of t){const f=new wt().setFromObject(u);f.min.xr.x&&(r.x=f.max.x),f.max.y>r.y&&(r.y=f.max.y),f.max.z>r.z&&(r.z=f.max.z)}const o=new wt(n,r),a=new U;o.getSize(a);const c=new U;o.getCenter(c);const h=Math.max(a.x,a.y,a.z)*e,d=new Li(c,h);await this.controls.fitToSphere(d,!0)}setUserInput(t){t?this.enableUserInput():this.disableUserInput()}disableUserInput(){this._userInputButtons.left=this.controls.mouseButtons.left,this._userInputButtons.right=this.controls.mouseButtons.right,this._userInputButtons.middle=this.controls.mouseButtons.middle,this._userInputButtons.wheel=this.controls.mouseButtons.wheel,this.controls.mouseButtons.left=0,this.controls.mouseButtons.right=0,this.controls.mouseButtons.middle=0,this.controls.mouseButtons.wheel=0}enableUserInput(){Object.keys(this._userInputButtons).length!==0&&(this.controls.mouseButtons.left=this._userInputButtons.left,this.controls.mouseButtons.right=this._userInputButtons.right,this.controls.mouseButtons.middle=this._userInputButtons.middle,this.controls.mouseButtons.wheel=this._userInputButtons.wheel)}newOrthoCamera(){const t=window.innerWidth/window.innerHeight;return new ze(this._frustumSize*t/-2,this._frustumSize*t/2,this._frustumSize/2,this._frustumSize/-2,.1,1e3)}setOrthoPerspCameraAspect(){if(!this.currentWorld||!this.currentWorld.renderer||!this.previousSize)return;const t=this.currentWorld.renderer.getSize(),e=this.threeOrtho.top,s=this.threeOrtho.right,i=t.y/this.previousSize.y,n=t.x/this.previousSize.x,r=e*i,o=s*n;this.threeOrtho.left=-o,this.threeOrtho.right=o,this.threeOrtho.top=r,this.threeOrtho.bottom=-r,this.threeOrtho.updateProjectionMatrix(),this.previousSize.copy(t)}}const Qr=new Map([[Di,{forRelated:"Decomposes",forRelating:"IsDecomposedBy"}],[Un,{forRelated:"HasAssociations",forRelating:"AssociatedTo"}],[xn,{forRelated:"HasAssociations",forRelating:"ClassificationForObjects"}],[Bn,{forRelated:"HasAssignments",forRelating:"IsGroupedBy"}],[Hs,{forRelated:"IsDefinedBy",forRelating:"DefinesOcurrence"}],[Yn,{forRelated:"IsTypedBy",forRelating:"Types"}],[Vn,{forRelated:"IsDefinedBy",forRelating:"Defines"}],[vi,{forRelated:"ContainedInStructure",forRelating:"ContainsElements"}],[zn,{forRelated:"AssignedToFlowElement",forRelating:"HasControlElements"}],[Gn,{forRelated:"ConnectedFrom",forRelating:"ConnectedTo"}],[kn,{forRelated:"HasAssignments",forRelating:"ReferencedBy"}],[Hn,{forRelated:"HasContext",forRelating:"Declares"}],[Wn,{forRelated:"HasAssignments",forRelating:"Controls"}],[Xn,{forRelated:"Nests",forRelating:"IsNestedBy"}],[$n,{forRelated:"HasAssociations",forRelating:"DocumentRefForObjects"}]]),Pi={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 cs{static async getUnits(t){var e,s,i;const{IFCUNITASSIGNMENT:n}=he,r=await t.getAllPropertiesOfType(n);if(!r)return 1;const o=Object.keys(r),a=r[parseInt(o[0],10)];for(const c of a.Units){if(c.value===void 0||c.value===null)continue;const h=await t.getProperties(c.value);if(!h||!h.UnitType||!h.UnitType.value||h.UnitType.value!=="LENGTHUNIT")continue;let u=1,f=1;return h.Name.value==="METRE"&&(f=1),h.Name.value==="FOOT"&&(f=.3048),((e=h.Prefix)==null?void 0:e.value)==="MILLI"?u=.001:((s=h.Prefix)==null?void 0:s.value)==="CENTI"?u=.01:((i=h.Prefix)==null?void 0:i.value)==="DECI"&&(u=.1),f*u}return 1}static async findItemByGuid(t,e){var s;const i=t.getAllPropertiesIDs();for(const n of i){const r=await t.getProperties(n);if(r&&((s=r.GlobalId)==null?void 0:s.value)===e)return r}return null}static async getRelationMap(t,e,s){var i;const r=s??(async()=>{}),o={},a=t.getAllPropertiesIDs();for(const c of a){const h=await t.getProperties(c);if(!h)continue;const d=h.type===e,u=Object.keys(h).find(C=>C.startsWith("Relating")),f=Object.keys(h).find(C=>C.startsWith("Related"));if(!(d&&u&&f))continue;const I=await t.getProperties((i=h[u])==null?void 0:i.value),E=h[f];if(!I||!E||!(E&&Array.isArray(E)))continue;const T=E.map(C=>C.value);await r(I.expressID,T),o[I.expressID]=T}return o}static async getQsetQuantities(t,e,s){const n=s??(()=>{}),r=await t.getProperties(e);return!r||r.type!==gi?null:(r.Quantities??[{}]).map(c=>(c.value&&n(c.value),c.value)).filter(c=>c!==null)}static async getPsetProps(t,e,s){const n=s??(()=>{}),r=await t.getProperties(e);return!r||r.type!==as?null:(r.HasProperties??[{}]).map(c=>(c.value&&n(c.value),c.value)).filter(c=>c!==null)}static async getPsetRel(t,e){var s;if(!await t.getProperties(e))return null;const n=await t.getAllPropertiesOfType(Hs);if(!n)return null;const r=Object.values(n);let o=null;for(const a of r)((s=a.RelatingPropertyDefinition)==null?void 0:s.value)===e&&(o=a.expressID);return o}static async getQsetRel(t,e){return cs.getPsetRel(t,e)}static async getEntityName(t,e){var s;const i=await t.getProperties(e);if(!i)return{key:null,name:null};const n=Object.keys(i).find(o=>o.endsWith("Name"))??null,r=n?(s=i[n])==null?void 0:s.value:null;return{key:n,name:r}}static async getQuantityValue(t,e){const s=await t.getProperties(e);if(!s)return{key:null,value:null};const i=Object.keys(s).find(r=>r.endsWith("Value"))??null;let n;return i===null||s[i]===void 0||s[i]===null?n=null:n=s[i].value,{key:i,value:n}}static isRel(t){return Pi[t].startsWith("IFCREL")}static async attributeExists(t,e,s){const i=await t.getProperties(e);return i?Object.keys(i).includes(s):!1}static async groupEntitiesByType(t,e){var s;const i=new Map;for(const n of e){const r=await t.getProperties(n);if(!r)continue;const o=r.type;i.get(o)||i.set(o,new Set),(s=i.get(o))==null||s.add(n)}return i}}const ch={IFCURIREFERENCE:"IfcUriReference",IFCTIME:"IfcTime",IFCTEMPERATURERATEOFCHANGEMEASURE:"IfcTemperatureRateOfChangeMeasure",IFCSOUNDPRESSURELEVELMEASURE:"IfcSoundPressureLevelMeasure",IFCSOUNDPOWERLEVELMEASURE:"IfcSoundPowerLevelMeasure",IFCPROPERTYSETDEFINITIONSET:"IfcPropertySetDefinitionSet",IFCPOSITIVEINTEGER:"IfcPositiveInteger",IFCNONNEGATIVELENGTHMEASURE:"IfcNonNegativeLengthMeasure",IFCLINEINDEX:"IfcLineIndex",IFCLANGUAGEID:"IfcLanguageId",IFCDURATION:"IfcDuration",IFCDAYINWEEKNUMBER:"IfcDayInWeekNumber",IFCDATETIME:"IfcDateTime",IFCDATE:"IfcDate",IFCCARDINALPOINTREFERENCE:"IfcCardinalPointReference",IFCBINARY:"IfcBinary",IFCAREADENSITYMEASURE:"IfcAreaDensityMeasure",IFCARCINDEX:"IfcArcIndex",IFCYEARNUMBER:"IfcYearNumber",IFCWARPINGMOMENTMEASURE:"IfcWarpingMomentMeasure",IFCWARPINGCONSTANTMEASURE:"IfcWarpingConstantMeasure",IFCVOLUMETRICFLOWRATEMEASURE:"IfcVolumetricFlowRateMeasure",IFCVOLUMEMEASURE:"IfcVolumeMeasure",IFCVAPORPERMEABILITYMEASURE:"IfcVaporPermeabilityMeasure",IFCTORQUEMEASURE:"IfcTorqueMeasure",IFCTIMESTAMP:"IfcTimestamp",IFCTIMEMEASURE:"IfcTimeMeasure",IFCTHERMODYNAMICTEMPERATUREMEASURE:"IfcThermodynamicTemperatureMeasure",IFCTHERMALTRANSMITTANCEMEASURE:"IfcThermalTransmittanceMeasure",IFCTHERMALRESISTANCEMEASURE:"IfcThermalResistanceMeasure",IFCTHERMALEXPANSIONCOEFFICIENTMEASURE:"IfcThermalExpansionCoefficientMeasure",IFCTHERMALCONDUCTIVITYMEASURE:"IfcThermalConductivityMeasure",IFCTHERMALADMITTANCEMEASURE:"IfcThermalAdmittanceMeasure",IFCTEXTTRANSFORMATION:"IfcTextTransformation",IFCTEXTFONTNAME:"IfcTextFontName",IFCTEXTDECORATION:"IfcTextDecoration",IFCTEXTALIGNMENT:"IfcTextAlignment",IFCTEXT:"IfcText",IFCTEMPERATUREGRADIENTMEASURE:"IfcTemperatureGradientMeasure",IFCSPECULARROUGHNESS:"IfcSpecularRoughness",IFCSPECULAREXPONENT:"IfcSpecularExponent",IFCSPECIFICHEATCAPACITYMEASURE:"IfcSpecificHeatCapacityMeasure",IFCSOUNDPRESSUREMEASURE:"IfcSoundPressureMeasure",IFCSOUNDPOWERMEASURE:"IfcSoundPowerMeasure",IFCSOLIDANGLEMEASURE:"IfcSolidAngleMeasure",IFCSHEARMODULUSMEASURE:"IfcShearModulusMeasure",IFCSECTIONALAREAINTEGRALMEASURE:"IfcSectionalAreaIntegralMeasure",IFCSECTIONMODULUSMEASURE:"IfcSectionModulusMeasure",IFCSECONDINMINUTE:"IfcSecondInMinute",IFCROTATIONALSTIFFNESSMEASURE:"IfcRotationalStiffnessMeasure",IFCROTATIONALMASSMEASURE:"IfcRotationalMassMeasure",IFCROTATIONALFREQUENCYMEASURE:"IfcRotationalFrequencyMeasure",IFCREAL:"IfcReal",IFCRATIOMEASURE:"IfcRatioMeasure",IFCRADIOACTIVITYMEASURE:"IfcRadioactivityMeasure",IFCPRESSUREMEASURE:"IfcPressureMeasure",IFCPRESENTABLETEXT:"IfcPresentableText",IFCPOWERMEASURE:"IfcPowerMeasure",IFCPOSITIVERATIOMEASURE:"IfcPositiveRatioMeasure",IFCPOSITIVEPLANEANGLEMEASURE:"IfcPositivePlaneAngleMeasure",IFCPOSITIVELENGTHMEASURE:"IfcPositiveLengthMeasure",IFCPLANEANGLEMEASURE:"IfcPlaneAngleMeasure",IFCPLANARFORCEMEASURE:"IfcPlanarForceMeasure",IFCPARAMETERVALUE:"IfcParameterValue",IFCPHMEASURE:"IfcPhMeasure",IFCNUMERICMEASURE:"IfcNumericMeasure",IFCNORMALISEDRATIOMEASURE:"IfcNormalisedRatioMeasure",IFCMONTHINYEARNUMBER:"IfcMonthInYearNumber",IFCMONETARYMEASURE:"IfcMonetaryMeasure",IFCMOMENTOFINERTIAMEASURE:"IfcMomentOfInertiaMeasure",IFCMOLECULARWEIGHTMEASURE:"IfcMolecularWeightMeasure",IFCMOISTUREDIFFUSIVITYMEASURE:"IfcMoistureDiffusivityMeasure",IFCMODULUSOFSUBGRADEREACTIONMEASURE:"IfcModulusOfSubgradeReactionMeasure",IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE:"IfcModulusOfRotationalSubgradeReactionMeasure",IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE:"IfcModulusOfLinearSubgradeReactionMeasure",IFCMODULUSOFELASTICITYMEASURE:"IfcModulusOfElasticityMeasure",IFCMINUTEINHOUR:"IfcMinuteInHour",IFCMASSPERLENGTHMEASURE:"IfcMassPerLengthMeasure",IFCMASSMEASURE:"IfcMassMeasure",IFCMASSFLOWRATEMEASURE:"IfcMassFlowRateMeasure",IFCMASSDENSITYMEASURE:"IfcMassDensityMeasure",IFCMAGNETICFLUXMEASURE:"IfcMagneticFluxMeasure",IFCMAGNETICFLUXDENSITYMEASURE:"IfcMagneticFluxDensityMeasure",IFCLUMINOUSINTENSITYMEASURE:"IfcLuminousIntensityMeasure",IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE:"IfcLuminousIntensityDistributionMeasure",IFCLUMINOUSFLUXMEASURE:"IfcLuminousFluxMeasure",IFCLOGICAL:"IfcLogical",IFCLINEARVELOCITYMEASURE:"IfcLinearVelocityMeasure",IFCLINEARSTIFFNESSMEASURE:"IfcLinearStiffnessMeasure",IFCLINEARMOMENTMEASURE:"IfcLinearMomentMeasure",IFCLINEARFORCEMEASURE:"IfcLinearForceMeasure",IFCLENGTHMEASURE:"IfcLengthMeasure",IFCLABEL:"IfcLabel",IFCKINEMATICVISCOSITYMEASURE:"IfcKinematicViscosityMeasure",IFCISOTHERMALMOISTURECAPACITYMEASURE:"IfcIsothermalMoistureCapacityMeasure",IFCIONCONCENTRATIONMEASURE:"IfcIonConcentrationMeasure",IFCINTEGERCOUNTRATEMEASURE:"IfcIntegerCountRateMeasure",IFCINTEGER:"IfcInteger",IFCINDUCTANCEMEASURE:"IfcInductanceMeasure",IFCILLUMINANCEMEASURE:"IfcIlluminanceMeasure",IFCIDENTIFIER:"IfcIdentifier",IFCHOURINDAY:"IfcHourInDay",IFCHEATINGVALUEMEASURE:"IfcHeatingValueMeasure",IFCHEATFLUXDENSITYMEASURE:"IfcHeatFluxDensityMeasure",IFCGLOBALLYUNIQUEID:"IfcGloballyUniqueId",IFCFREQUENCYMEASURE:"IfcFrequencyMeasure",IFCFORCEMEASURE:"IfcForceMeasure",IFCFONTWEIGHT:"IfcFontWeight",IFCFONTVARIANT:"IfcFontVariant",IFCFONTSTYLE:"IfcFontStyle",IFCENERGYMEASURE:"IfcEnergyMeasure",IFCELECTRICVOLTAGEMEASURE:"IfcElectricVoltageMeasure",IFCELECTRICRESISTANCEMEASURE:"IfcElectricResistanceMeasure",IFCELECTRICCURRENTMEASURE:"IfcElectricCurrentMeasure",IFCELECTRICCONDUCTANCEMEASURE:"IfcElectricConductanceMeasure",IFCELECTRICCHARGEMEASURE:"IfcElectricChargeMeasure",IFCELECTRICCAPACITANCEMEASURE:"IfcElectricCapacitanceMeasure",IFCDYNAMICVISCOSITYMEASURE:"IfcDynamicViscosityMeasure",IFCDOSEEQUIVALENTMEASURE:"IfcDoseEquivalentMeasure",IFCDIMENSIONCOUNT:"IfcDimensionCount",IFCDESCRIPTIVEMEASURE:"IfcDescriptiveMeasure",IFCDAYLIGHTSAVINGHOUR:"IfcDaylightSavingHour",IFCDAYINMONTHNUMBER:"IfcDayInMonthNumber",IFCCURVATUREMEASURE:"IfcCurvatureMeasure",IFCCOUNTMEASURE:"IfcCountMeasure",IFCCONTEXTDEPENDENTMEASURE:"IfcContextDependentMeasure",IFCCOMPOUNDPLANEANGLEMEASURE:"IfcCompoundPlaneAngleMeasure",IFCCOMPLEXNUMBER:"IfcComplexNumber",IFCBOXALIGNMENT:"IfcBoxAlignment",IFCBOOLEAN:"IfcBoolean",IFCAREAMEASURE:"IfcAreaMeasure",IFCANGULARVELOCITYMEASURE:"IfcAngularVelocityMeasure",IFCAMOUNTOFSUBSTANCEMEASURE:"IfcAmountOfSubstanceMeasure",IFCACCELERATIONMEASURE:"IfcAccelerationMeasure",IFCABSORBEDDOSEMEASURE:"IfcAbsorbedDoseMeasure",IFCGEOSLICE:"IfcGeoSlice",IFCGEOMODEL:"IfcGeoModel",IFCELECTRICFLOWTREATMENTDEVICE:"IfcElectricFlowTreatmentDevice",IFCDISTRIBUTIONBOARD:"IfcDistributionBoard",IFCCONVEYORSEGMENT:"IfcConveyorSegment",IFCCAISSONFOUNDATION:"IfcCaissonFoundation",IFCBOREHOLE:"IfcBorehole",IFCBEARING:"IfcBearing",IFCALIGNMENT:"IfcAlignment",IFCTRACKELEMENT:"IfcTrackElement",IFCSIGNAL:"IfcSignal",IFCREINFORCEDSOIL:"IfcReinforcedSoil",IFCRAIL:"IfcRail",IFCPAVEMENT:"IfcPavement",IFCNAVIGATIONELEMENT:"IfcNavigationElement",IFCMOORINGDEVICE:"IfcMooringDevice",IFCMOBILETELECOMMUNICATIONSAPPLIANCE:"IfcMobileTelecommunicationsAppliance",IFCLIQUIDTERMINAL:"IfcLiquidTerminal",IFCLINEARPOSITIONINGELEMENT:"IfcLinearPositioningElement",IFCKERB:"IfcKerb",IFCGEOTECHNICALASSEMBLY:"IfcGeotechnicalAssembly",IFCELECTRICFLOWTREATMENTDEVICETYPE:"IfcElectricFlowTreatmentDeviceType",IFCEARTHWORKSFILL:"IfcEarthworksFill",IFCEARTHWORKSELEMENT:"IfcEarthworksElement",IFCEARTHWORKSCUT:"IfcEarthworksCut",IFCDISTRIBUTIONBOARDTYPE:"IfcDistributionBoardType",IFCDEEPFOUNDATION:"IfcDeepFoundation",IFCCOURSE:"IfcCourse",IFCCONVEYORSEGMENTTYPE:"IfcConveyorSegmentType",IFCCAISSONFOUNDATIONTYPE:"IfcCaissonFoundationType",IFCBUILTSYSTEM:"IfcBuiltSystem",IFCBUILTELEMENT:"IfcBuiltElement",IFCBRIDGEPART:"IfcBridgePart",IFCBRIDGE:"IfcBridge",IFCBEARINGTYPE:"IfcBearingType",IFCALIGNMENTVERTICAL:"IfcAlignmentVertical",IFCALIGNMENTSEGMENT:"IfcAlignmentSegment",IFCALIGNMENTHORIZONTAL:"IfcAlignmentHorizontal",IFCALIGNMENTCANT:"IfcAlignmentCant",IFCVIBRATIONDAMPERTYPE:"IfcVibrationDamperType",IFCVIBRATIONDAMPER:"IfcVibrationDamper",IFCVEHICLE:"IfcVehicle",IFCTRANSPORTATIONDEVICE:"IfcTransportationDevice",IFCTRACKELEMENTTYPE:"IfcTrackElementType",IFCTENDONCONDUITTYPE:"IfcTendonConduitType",IFCTENDONCONDUIT:"IfcTendonConduit",IFCSINESPIRAL:"IfcSineSpiral",IFCSIGNALTYPE:"IfcSignalType",IFCSIGNTYPE:"IfcSignType",IFCSIGN:"IfcSign",IFCSEVENTHORDERPOLYNOMIALSPIRAL:"IfcSeventhOrderPolynomialSpiral",IFCSEGMENTEDREFERENCECURVE:"IfcSegmentedReferenceCurve",IFCSECONDORDERPOLYNOMIALSPIRAL:"IfcSecondOrderPolynomialSpiral",IFCROADPART:"IfcRoadPart",IFCROAD:"IfcRoad",IFCRELADHERESTOELEMENT:"IfcRelAdheresToElement",IFCREFERENT:"IfcReferent",IFCRAILWAYPART:"IfcRailwayPart",IFCRAILWAY:"IfcRailway",IFCRAILTYPE:"IfcRailType",IFCPOSITIONINGELEMENT:"IfcPositioningElement",IFCPAVEMENTTYPE:"IfcPavementType",IFCNAVIGATIONELEMENTTYPE:"IfcNavigationElementType",IFCMOORINGDEVICETYPE:"IfcMooringDeviceType",IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE:"IfcMobileTelecommunicationsApplianceType",IFCMARINEPART:"IfcMarinePart",IFCMARINEFACILITY:"IfcMarineFacility",IFCLIQUIDTERMINALTYPE:"IfcLiquidTerminalType",IFCLINEARELEMENT:"IfcLinearElement",IFCKERBTYPE:"IfcKerbType",IFCIMPACTPROTECTIONDEVICETYPE:"IfcImpactProtectionDeviceType",IFCIMPACTPROTECTIONDEVICE:"IfcImpactProtectionDevice",IFCGRADIENTCURVE:"IfcGradientCurve",IFCGEOTECHNICALSTRATUM:"IfcGeotechnicalStratum",IFCGEOTECHNICALELEMENT:"IfcGeotechnicalElement",IFCFACILITYPARTCOMMON:"IfcFacilityPartCommon",IFCFACILITYPART:"IfcFacilityPart",IFCFACILITY:"IfcFacility",IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID:"IfcDirectrixDerivedReferenceSweptAreaSolid",IFCDEEPFOUNDATIONTYPE:"IfcDeepFoundationType",IFCCOURSETYPE:"IfcCourseType",IFCCOSINESPIRAL:"IfcCosineSpiral",IFCCLOTHOID:"IfcClothoid",IFCBUILTELEMENTTYPE:"IfcBuiltElementType",IFCVEHICLETYPE:"IfcVehicleType",IFCTRIANGULATEDIRREGULARNETWORK:"IfcTriangulatedIrregularNetwork",IFCTRANSPORTATIONDEVICETYPE:"IfcTransportationDeviceType",IFCTHIRDORDERPOLYNOMIALSPIRAL:"IfcThirdOrderPolynomialSpiral",IFCSPIRAL:"IfcSpiral",IFCSECTIONEDSURFACE:"IfcSectionedSurface",IFCSECTIONEDSOLIDHORIZONTAL:"IfcSectionedSolidHorizontal",IFCSECTIONEDSOLID:"IfcSectionedSolid",IFCRELPOSITIONS:"IfcRelPositions",IFCRELASSOCIATESPROFILEDEF:"IfcRelAssociatesProfileDef",IFCPOLYNOMIALCURVE:"IfcPolynomialCurve",IFCOFFSETCURVEBYDISTANCES:"IfcOffsetCurveByDistances",IFCOFFSETCURVE:"IfcOffsetCurve",IFCINDEXEDPOLYGONALTEXTUREMAP:"IfcIndexedPolygonalTextureMap",IFCDIRECTRIXCURVESWEPTAREASOLID:"IfcDirectrixCurveSweptAreaSolid",IFCCURVESEGMENT:"IfcCurveSegment",IFCAXIS2PLACEMENTLINEAR:"IfcAxis2PlacementLinear",IFCSEGMENT:"IfcSegment",IFCPOINTBYDISTANCEEXPRESSION:"IfcPointByDistanceExpression",IFCOPENCROSSPROFILEDEF:"IfcOpenCrossProfileDef",IFCLINEARPLACEMENT:"IfcLinearPlacement",IFCALIGNMENTHORIZONTALSEGMENT:"IfcAlignmentHorizontalSegment",IFCALIGNMENTCANTSEGMENT:"IfcAlignmentCantSegment",IFCTEXTURECOORDINATEINDICESWITHVOIDS:"IfcTextureCoordinateIndicesWithVoids",IFCTEXTURECOORDINATEINDICES:"IfcTextureCoordinateIndices",IFCQUANTITYNUMBER:"IfcQuantityNumber",IFCALIGNMENTVERTICALSEGMENT:"IfcAlignmentVerticalSegment",IFCALIGNMENTPARAMETERSEGMENT:"IfcAlignmentParameterSegment",IFCCONTROLLER:"IfcController",IFCALARM:"IfcAlarm",IFCACTUATOR:"IfcActuator",IFCUNITARYCONTROLELEMENT:"IfcUnitaryControlElement",IFCSENSOR:"IfcSensor",IFCPROTECTIVEDEVICETRIPPINGUNIT:"IfcProtectiveDeviceTrippingUnit",IFCFLOWINSTRUMENT:"IfcFlowInstrument",IFCFIRESUPPRESSIONTERMINAL:"IfcFireSuppressionTerminal",IFCFILTER:"IfcFilter",IFCFAN:"IfcFan",IFCELECTRICTIMECONTROL:"IfcElectricTimeControl",IFCELECTRICMOTOR:"IfcElectricMotor",IFCELECTRICGENERATOR:"IfcElectricGenerator",IFCELECTRICFLOWSTORAGEDEVICE:"IfcElectricFlowStorageDevice",IFCELECTRICDISTRIBUTIONBOARD:"IfcElectricDistributionBoard",IFCELECTRICAPPLIANCE:"IfcElectricAppliance",IFCDUCTSILENCER:"IfcDuctSilencer",IFCDUCTSEGMENT:"IfcDuctSegment",IFCDUCTFITTING:"IfcDuctFitting",IFCDISTRIBUTIONCIRCUIT:"IfcDistributionCircuit",IFCDAMPER:"IfcDamper",IFCCOOLINGTOWER:"IfcCoolingTower",IFCCOOLEDBEAM:"IfcCooledBeam",IFCCONDENSER:"IfcCondenser",IFCCOMPRESSOR:"IfcCompressor",IFCCOMMUNICATIONSAPPLIANCE:"IfcCommunicationsAppliance",IFCCOIL:"IfcCoil",IFCCHILLER:"IfcChiller",IFCCABLESEGMENT:"IfcCableSegment",IFCCABLEFITTING:"IfcCableFitting",IFCCABLECARRIERSEGMENT:"IfcCableCarrierSegment",IFCCABLECARRIERFITTING:"IfcCableCarrierFitting",IFCBURNER:"IfcBurner",IFCBOILER:"IfcBoiler",IFCBEAMSTANDARDCASE:"IfcBeamStandardCase",IFCAUDIOVISUALAPPLIANCE:"IfcAudioVisualAppliance",IFCAIRTOAIRHEATRECOVERY:"IfcAirToAirHeatRecovery",IFCAIRTERMINALBOX:"IfcAirTerminalBox",IFCAIRTERMINAL:"IfcAirTerminal",IFCWINDOWSTANDARDCASE:"IfcWindowStandardCase",IFCWASTETERMINAL:"IfcWasteTerminal",IFCWALLELEMENTEDCASE:"IfcWallElementedCase",IFCVALVE:"IfcValve",IFCUNITARYEQUIPMENT:"IfcUnitaryEquipment",IFCUNITARYCONTROLELEMENTTYPE:"IfcUnitaryControlElementType",IFCTUBEBUNDLE:"IfcTubeBundle",IFCTRANSFORMER:"IfcTransformer",IFCTANK:"IfcTank",IFCSWITCHINGDEVICE:"IfcSwitchingDevice",IFCSTRUCTURALLOADCASE:"IfcStructuralLoadCase",IFCSTACKTERMINAL:"IfcStackTerminal",IFCSPACEHEATER:"IfcSpaceHeater",IFCSOLARDEVICE:"IfcSolarDevice",IFCSLABSTANDARDCASE:"IfcSlabStandardCase",IFCSLABELEMENTEDCASE:"IfcSlabElementedCase",IFCSHADINGDEVICE:"IfcShadingDevice",IFCSANITARYTERMINAL:"IfcSanitaryTerminal",IFCREINFORCINGBARTYPE:"IfcReinforcingBarType",IFCRATIONALBSPLINECURVEWITHKNOTS:"IfcRationalBSplineCurveWithKnots",IFCPUMP:"IfcPump",IFCPROTECTIVEDEVICETRIPPINGUNITTYPE:"IfcProtectiveDeviceTrippingUnitType",IFCPROTECTIVEDEVICE:"IfcProtectiveDevice",IFCPLATESTANDARDCASE:"IfcPlateStandardCase",IFCPIPESEGMENT:"IfcPipeSegment",IFCPIPEFITTING:"IfcPipeFitting",IFCOUTLET:"IfcOutlet",IFCOUTERBOUNDARYCURVE:"IfcOuterBoundaryCurve",IFCMOTORCONNECTION:"IfcMotorConnection",IFCMEMBERSTANDARDCASE:"IfcMemberStandardCase",IFCMEDICALDEVICE:"IfcMedicalDevice",IFCLIGHTFIXTURE:"IfcLightFixture",IFCLAMP:"IfcLamp",IFCJUNCTIONBOX:"IfcJunctionBox",IFCINTERCEPTOR:"IfcInterceptor",IFCHUMIDIFIER:"IfcHumidifier",IFCHEATEXCHANGER:"IfcHeatExchanger",IFCFLOWMETER:"IfcFlowMeter",IFCEXTERNALSPATIALELEMENT:"IfcExternalSpatialElement",IFCEVAPORATOR:"IfcEvaporator",IFCEVAPORATIVECOOLER:"IfcEvaporativeCooler",IFCENGINE:"IfcEngine",IFCELECTRICDISTRIBUTIONBOARDTYPE:"IfcElectricDistributionBoardType",IFCDOORSTANDARDCASE:"IfcDoorStandardCase",IFCDISTRIBUTIONSYSTEM:"IfcDistributionSystem",IFCCOMMUNICATIONSAPPLIANCETYPE:"IfcCommunicationsApplianceType",IFCCOLUMNSTANDARDCASE:"IfcColumnStandardCase",IFCCIVILELEMENT:"IfcCivilElement",IFCCHIMNEY:"IfcChimney",IFCCABLEFITTINGTYPE:"IfcCableFittingType",IFCBURNERTYPE:"IfcBurnerType",IFCBUILDINGSYSTEM:"IfcBuildingSystem",IFCBUILDINGELEMENTPARTTYPE:"IfcBuildingElementPartType",IFCBOUNDARYCURVE:"IfcBoundaryCurve",IFCBSPLINECURVEWITHKNOTS:"IfcBSplineCurveWithKnots",IFCAUDIOVISUALAPPLIANCETYPE:"IfcAudioVisualApplianceType",IFCWORKCALENDAR:"IfcWorkCalendar",IFCWINDOWTYPE:"IfcWindowType",IFCVOIDINGFEATURE:"IfcVoidingFeature",IFCVIBRATIONISOLATOR:"IfcVibrationIsolator",IFCTENDONTYPE:"IfcTendonType",IFCTENDONANCHORTYPE:"IfcTendonAnchorType",IFCSYSTEMFURNITUREELEMENT:"IfcSystemFurnitureElement",IFCSURFACEFEATURE:"IfcSurfaceFeature",IFCSTRUCTURALSURFACEACTION:"IfcStructuralSurfaceAction",IFCSTRUCTURALCURVEREACTION:"IfcStructuralCurveReaction",IFCSTRUCTURALCURVEACTION:"IfcStructuralCurveAction",IFCSTAIRTYPE:"IfcStairType",IFCSOLARDEVICETYPE:"IfcSolarDeviceType",IFCSHADINGDEVICETYPE:"IfcShadingDeviceType",IFCSEAMCURVE:"IfcSeamCurve",IFCROOFTYPE:"IfcRoofType",IFCREINFORCINGMESHTYPE:"IfcReinforcingMeshType",IFCREINFORCINGELEMENTTYPE:"IfcReinforcingElementType",IFCRATIONALBSPLINESURFACEWITHKNOTS:"IfcRationalBSplineSurfaceWithKnots",IFCRAMPTYPE:"IfcRampType",IFCPOLYGONALFACESET:"IfcPolygonalFaceSet",IFCPILETYPE:"IfcPileType",IFCOPENINGSTANDARDCASE:"IfcOpeningStandardCase",IFCMEDICALDEVICETYPE:"IfcMedicalDeviceType",IFCINTERSECTIONCURVE:"IfcIntersectionCurve",IFCINTERCEPTORTYPE:"IfcInterceptorType",IFCINDEXEDPOLYCURVE:"IfcIndexedPolyCurve",IFCGEOGRAPHICELEMENT:"IfcGeographicElement",IFCFURNITURE:"IfcFurniture",IFCFOOTINGTYPE:"IfcFootingType",IFCEXTERNALSPATIALSTRUCTUREELEMENT:"IfcExternalSpatialStructureElement",IFCEVENT:"IfcEvent",IFCENGINETYPE:"IfcEngineType",IFCELEMENTASSEMBLYTYPE:"IfcElementAssemblyType",IFCDOORTYPE:"IfcDoorType",IFCCYLINDRICALSURFACE:"IfcCylindricalSurface",IFCCONSTRUCTIONPRODUCTRESOURCETYPE:"IfcConstructionProductResourceType",IFCCONSTRUCTIONMATERIALRESOURCETYPE:"IfcConstructionMaterialResourceType",IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE:"IfcConstructionEquipmentResourceType",IFCCOMPOSITECURVEONSURFACE:"IfcCompositeCurveOnSurface",IFCCOMPLEXPROPERTYTEMPLATE:"IfcComplexPropertyTemplate",IFCCIVILELEMENTTYPE:"IfcCivilElementType",IFCCHIMNEYTYPE:"IfcChimneyType",IFCBSPLINESURFACEWITHKNOTS:"IfcBSplineSurfaceWithKnots",IFCBSPLINESURFACE:"IfcBSplineSurface",IFCADVANCEDBREPWITHVOIDS:"IfcAdvancedBrepWithVoids",IFCADVANCEDBREP:"IfcAdvancedBrep",IFCTRIANGULATEDFACESET:"IfcTriangulatedFaceSet",IFCTOROIDALSURFACE:"IfcToroidalSurface",IFCTESSELLATEDFACESET:"IfcTessellatedFaceSet",IFCTASKTYPE:"IfcTaskType",IFCSURFACECURVE:"IfcSurfaceCurve",IFCSUBCONTRACTRESOURCETYPE:"IfcSubContractResourceType",IFCSTRUCTURALSURFACEREACTION:"IfcStructuralSurfaceReaction",IFCSPHERICALSURFACE:"IfcSphericalSurface",IFCSPATIALZONETYPE:"IfcSpatialZoneType",IFCSPATIALZONE:"IfcSpatialZone",IFCSPATIALELEMENTTYPE:"IfcSpatialElementType",IFCSPATIALELEMENT:"IfcSpatialElement",IFCSIMPLEPROPERTYTEMPLATE:"IfcSimplePropertyTemplate",IFCREVOLVEDAREASOLIDTAPERED:"IfcRevolvedAreaSolidTapered",IFCREPARAMETRISEDCOMPOSITECURVESEGMENT:"IfcReparametrisedCompositeCurveSegment",IFCRELSPACEBOUNDARY2NDLEVEL:"IfcRelSpaceBoundary2ndLevel",IFCRELSPACEBOUNDARY1STLEVEL:"IfcRelSpaceBoundary1stLevel",IFCRELINTERFERESELEMENTS:"IfcRelInterferesElements",IFCRELDEFINESBYTEMPLATE:"IfcRelDefinesByTemplate",IFCRELDEFINESBYOBJECT:"IfcRelDefinesByObject",IFCRELDECLARES:"IfcRelDeclares",IFCRELASSIGNSTOGROUPBYFACTOR:"IfcRelAssignsToGroupByFactor",IFCPROPERTYTEMPLATE:"IfcPropertyTemplate",IFCPROPERTYSETTEMPLATE:"IfcPropertySetTemplate",IFCPROJECTLIBRARY:"IfcProjectLibrary",IFCPROCEDURETYPE:"IfcProcedureType",IFCPREDEFINEDPROPERTYSET:"IfcPredefinedPropertySet",IFCPCURVE:"IfcPCurve",IFCLABORRESOURCETYPE:"IfcLaborResourceType",IFCINDEXEDPOLYGONALFACEWITHVOIDS:"IfcIndexedPolygonalFaceWithVoids",IFCINDEXEDPOLYGONALFACE:"IfcIndexedPolygonalFace",IFCGEOGRAPHICELEMENTTYPE:"IfcGeographicElementType",IFCFIXEDREFERENCESWEPTAREASOLID:"IfcFixedReferenceSweptAreaSolid",IFCEXTRUDEDAREASOLIDTAPERED:"IfcExtrudedAreaSolidTapered",IFCEVENTTYPE:"IfcEventType",IFCCURVEBOUNDEDSURFACE:"IfcCurveBoundedSurface",IFCCREWRESOURCETYPE:"IfcCrewResourceType",IFCCONTEXT:"IfcContext",IFCCONSTRUCTIONRESOURCETYPE:"IfcConstructionResourceType",IFCCARTESIANPOINTLIST3D:"IfcCartesianPointList3D",IFCCARTESIANPOINTLIST2D:"IfcCartesianPointList2D",IFCCARTESIANPOINTLIST:"IfcCartesianPointList",IFCADVANCEDFACE:"IfcAdvancedFace",IFCTYPERESOURCE:"IfcTypeResource",IFCTYPEPROCESS:"IfcTypeProcess",IFCTESSELLATEDITEM:"IfcTessellatedItem",IFCSWEPTDISKSOLIDPOLYGONAL:"IfcSweptDiskSolidPolygonal",IFCRESOURCETIME:"IfcResourceTime",IFCRESOURCECONSTRAINTRELATIONSHIP:"IfcResourceConstraintRelationship",IFCRESOURCEAPPROVALRELATIONSHIP:"IfcResourceApprovalRelationship",IFCQUANTITYSET:"IfcQuantitySet",IFCPROPERTYTEMPLATEDEFINITION:"IfcPropertyTemplateDefinition",IFCPREDEFINEDPROPERTIES:"IfcPredefinedProperties",IFCMIRROREDPROFILEDEF:"IfcMirroredProfileDef",IFCMATERIALRELATIONSHIP:"IfcMaterialRelationship",IFCMATERIALPROFILESETUSAGETAPERING:"IfcMaterialProfileSetUsageTapering",IFCMATERIALPROFILESETUSAGE:"IfcMaterialProfileSetUsage",IFCMATERIALCONSTITUENTSET:"IfcMaterialConstituentSet",IFCMATERIALCONSTITUENT:"IfcMaterialConstituent",IFCLAGTIME:"IfcLagTime",IFCINDEXEDTRIANGLETEXTUREMAP:"IfcIndexedTriangleTextureMap",IFCINDEXEDTEXTUREMAP:"IfcIndexedTextureMap",IFCINDEXEDCOLOURMAP:"IfcIndexedColourMap",IFCEXTERNALREFERENCERELATIONSHIP:"IfcExternalReferenceRelationship",IFCEXTENDEDPROPERTIES:"IfcExtendedProperties",IFCEVENTTIME:"IfcEventTime",IFCCONVERSIONBASEDUNITWITHOFFSET:"IfcConversionBasedUnitWithOffset",IFCCOLOURRGBLIST:"IfcColourRgbList",IFCWORKTIME:"IfcWorkTime",IFCTIMEPERIOD:"IfcTimePeriod",IFCTEXTUREVERTEXLIST:"IfcTextureVertexList",IFCTASKTIMERECURRING:"IfcTaskTimeRecurring",IFCTASKTIME:"IfcTaskTime",IFCTABLECOLUMN:"IfcTableColumn",IFCSURFACEREINFORCEMENTAREA:"IfcSurfaceReinforcementArea",IFCSTRUCTURALLOADORRESULT:"IfcStructuralLoadOrResult",IFCSTRUCTURALLOADCONFIGURATION:"IfcStructuralLoadConfiguration",IFCSCHEDULINGTIME:"IfcSchedulingTime",IFCRESOURCELEVELRELATIONSHIP:"IfcResourceLevelRelationship",IFCREFERENCE:"IfcReference",IFCRECURRENCEPATTERN:"IfcRecurrencePattern",IFCPROPERTYABSTRACTION:"IfcPropertyAbstraction",IFCPROJECTEDCRS:"IfcProjectedCrs",IFCPRESENTATIONITEM:"IfcPresentationItem",IFCMATERIALUSAGEDEFINITION:"IfcMaterialUsageDefinition",IFCMATERIALPROFILEWITHOFFSETS:"IfcMaterialProfileWithOffsets",IFCMATERIALPROFILESET:"IfcMaterialProfileSet",IFCMATERIALPROFILE:"IfcMaterialProfile",IFCMATERIALLAYERWITHOFFSETS:"IfcMaterialLayerWithOffsets",IFCMATERIALDEFINITION:"IfcMaterialDefinition",IFCMAPCONVERSION:"IfcMapConversion",IFCEXTERNALINFORMATION:"IfcExternalInformation",IFCCOORDINATEREFERENCESYSTEM:"IfcCoordinateReferenceSystem",IFCCOORDINATEOPERATION:"IfcCoordinateOperation",IFCCONNECTIONVOLUMEGEOMETRY:"IfcConnectionVolumeGeometry",IFCREINFORCINGBAR:"IfcReinforcingBar",IFCELECTRICDISTRIBUTIONPOINT:"IfcElectricDistributionPoint",IFCDISTRIBUTIONCONTROLELEMENT:"IfcDistributionControlElement",IFCDISTRIBUTIONCHAMBERELEMENT:"IfcDistributionChamberElement",IFCCONTROLLERTYPE:"IfcControllerType",IFCCHAMFEREDGEFEATURE:"IfcChamferEdgeFeature",IFCBEAM:"IfcBeam",IFCALARMTYPE:"IfcAlarmType",IFCACTUATORTYPE:"IfcActuatorType",IFCWINDOW:"IfcWindow",IFCWALLSTANDARDCASE:"IfcWallStandardCase",IFCWALL:"IfcWall",IFCVIBRATIONISOLATORTYPE:"IfcVibrationIsolatorType",IFCTENDONANCHOR:"IfcTendonAnchor",IFCTENDON:"IfcTendon",IFCSTRUCTURALANALYSISMODEL:"IfcStructuralAnalysisModel",IFCSTAIRFLIGHT:"IfcStairFlight",IFCSTAIR:"IfcStair",IFCSLAB:"IfcSlab",IFCSENSORTYPE:"IfcSensorType",IFCROUNDEDEDGEFEATURE:"IfcRoundedEdgeFeature",IFCROOF:"IfcRoof",IFCREINFORCINGMESH:"IfcReinforcingMesh",IFCREINFORCINGELEMENT:"IfcReinforcingElement",IFCRATIONALBEZIERCURVE:"IfcRationalBezierCurve",IFCRAMPFLIGHT:"IfcRampFlight",IFCRAMP:"IfcRamp",IFCRAILING:"IfcRailing",IFCPLATE:"IfcPlate",IFCPILE:"IfcPile",IFCMEMBER:"IfcMember",IFCFOOTING:"IfcFooting",IFCFLOWTREATMENTDEVICE:"IfcFlowTreatmentDevice",IFCFLOWTERMINAL:"IfcFlowTerminal",IFCFLOWSTORAGEDEVICE:"IfcFlowStorageDevice",IFCFLOWSEGMENT:"IfcFlowSegment",IFCFLOWMOVINGDEVICE:"IfcFlowMovingDevice",IFCFLOWINSTRUMENTTYPE:"IfcFlowInstrumentType",IFCFLOWFITTING:"IfcFlowFitting",IFCFLOWCONTROLLER:"IfcFlowController",IFCFIRESUPPRESSIONTERMINALTYPE:"IfcFireSuppressionTerminalType",IFCFILTERTYPE:"IfcFilterType",IFCFANTYPE:"IfcFanType",IFCENERGYCONVERSIONDEVICE:"IfcEnergyConversionDevice",IFCELECTRICALELEMENT:"IfcElectricalElement",IFCELECTRICALCIRCUIT:"IfcElectricalCircuit",IFCELECTRICTIMECONTROLTYPE:"IfcElectricTimeControlType",IFCELECTRICMOTORTYPE:"IfcElectricMotorType",IFCELECTRICHEATERTYPE:"IfcElectricHeaterType",IFCELECTRICGENERATORTYPE:"IfcElectricGeneratorType",IFCELECTRICFLOWSTORAGEDEVICETYPE:"IfcElectricFlowStorageDeviceType",IFCELECTRICAPPLIANCETYPE:"IfcElectricApplianceType",IFCEDGEFEATURE:"IfcEdgeFeature",IFCDUCTSILENCERTYPE:"IfcDuctSilencerType",IFCDUCTSEGMENTTYPE:"IfcDuctSegmentType",IFCDUCTFITTINGTYPE:"IfcDuctFittingType",IFCDOOR:"IfcDoor",IFCDISTRIBUTIONPORT:"IfcDistributionPort",IFCDISTRIBUTIONFLOWELEMENT:"IfcDistributionFlowElement",IFCDISTRIBUTIONELEMENT:"IfcDistributionElement",IFCDISTRIBUTIONCONTROLELEMENTTYPE:"IfcDistributionControlElementType",IFCDISTRIBUTIONCHAMBERELEMENTTYPE:"IfcDistributionChamberElementType",IFCDISCRETEACCESSORYTYPE:"IfcDiscreteAccessoryType",IFCDISCRETEACCESSORY:"IfcDiscreteAccessory",IFCDIAMETERDIMENSION:"IfcDiameterDimension",IFCDAMPERTYPE:"IfcDamperType",IFCCURTAINWALL:"IfcCurtainWall",IFCCOVERING:"IfcCovering",IFCCOOLINGTOWERTYPE:"IfcCoolingTowerType",IFCCOOLEDBEAMTYPE:"IfcCooledBeamType",IFCCONSTRUCTIONPRODUCTRESOURCE:"IfcConstructionProductResource",IFCCONSTRUCTIONMATERIALRESOURCE:"IfcConstructionMaterialResource",IFCCONSTRUCTIONEQUIPMENTRESOURCE:"IfcConstructionEquipmentResource",IFCCONDITIONCRITERION:"IfcConditionCriterion",IFCCONDITION:"IfcCondition",IFCCONDENSERTYPE:"IfcCondenserType",IFCCOMPRESSORTYPE:"IfcCompressorType",IFCCOLUMN:"IfcColumn",IFCCOILTYPE:"IfcCoilType",IFCCIRCLE:"IfcCircle",IFCCHILLERTYPE:"IfcChillerType",IFCCABLESEGMENTTYPE:"IfcCableSegmentType",IFCCABLECARRIERSEGMENTTYPE:"IfcCableCarrierSegmentType",IFCCABLECARRIERFITTINGTYPE:"IfcCableCarrierFittingType",IFCBUILDINGELEMENTPROXYTYPE:"IfcBuildingElementProxyType",IFCBUILDINGELEMENTPROXY:"IfcBuildingElementProxy",IFCBUILDINGELEMENTPART:"IfcBuildingElementPart",IFCBUILDINGELEMENTCOMPONENT:"IfcBuildingElementComponent",IFCBUILDINGELEMENT:"IfcBuildingElement",IFCBOILERTYPE:"IfcBoilerType",IFCBEZIERCURVE:"IfcBezierCurve",IFCBEAMTYPE:"IfcBeamType",IFCBSPLINECURVE:"IfcBSplineCurve",IFCASSET:"IfcAsset",IFCANGULARDIMENSION:"IfcAngularDimension",IFCAIRTOAIRHEATRECOVERYTYPE:"IfcAirToAirHeatRecoveryType",IFCAIRTERMINALTYPE:"IfcAirTerminalType",IFCAIRTERMINALBOXTYPE:"IfcAirTerminalBoxType",IFCACTIONREQUEST:"IfcActionRequest",IFC2DCOMPOSITECURVE:"Ifc2DCompositeCurve",IFCZONE:"IfcZone",IFCWORKSCHEDULE:"IfcWorkSchedule",IFCWORKPLAN:"IfcWorkPlan",IFCWORKCONTROL:"IfcWorkControl",IFCWASTETERMINALTYPE:"IfcWasteTerminalType",IFCWALLTYPE:"IfcWallType",IFCVIRTUALELEMENT:"IfcVirtualElement",IFCVALVETYPE:"IfcValveType",IFCUNITARYEQUIPMENTTYPE:"IfcUnitaryEquipmentType",IFCTUBEBUNDLETYPE:"IfcTubeBundleType",IFCTRIMMEDCURVE:"IfcTrimmedCurve",IFCTRANSPORTELEMENT:"IfcTransportElement",IFCTRANSFORMERTYPE:"IfcTransformerType",IFCTIMESERIESSCHEDULE:"IfcTimeSeriesSchedule",IFCTANKTYPE:"IfcTankType",IFCSYSTEM:"IfcSystem",IFCSWITCHINGDEVICETYPE:"IfcSwitchingDeviceType",IFCSUBCONTRACTRESOURCE:"IfcSubContractResource",IFCSTRUCTURALSURFACECONNECTION:"IfcStructuralSurfaceConnection",IFCSTRUCTURALRESULTGROUP:"IfcStructuralResultGroup",IFCSTRUCTURALPOINTREACTION:"IfcStructuralPointReaction",IFCSTRUCTURALPOINTCONNECTION:"IfcStructuralPointConnection",IFCSTRUCTURALPOINTACTION:"IfcStructuralPointAction",IFCSTRUCTURALPLANARACTIONVARYING:"IfcStructuralPlanarActionVarying",IFCSTRUCTURALPLANARACTION:"IfcStructuralPlanarAction",IFCSTRUCTURALLOADGROUP:"IfcStructuralLoadGroup",IFCSTRUCTURALLINEARACTIONVARYING:"IfcStructuralLinearActionVarying",IFCSTRUCTURALLINEARACTION:"IfcStructuralLinearAction",IFCSTRUCTURALCURVEMEMBERVARYING:"IfcStructuralCurveMemberVarying",IFCSTRUCTURALCURVEMEMBER:"IfcStructuralCurveMember",IFCSTRUCTURALCURVECONNECTION:"IfcStructuralCurveConnection",IFCSTRUCTURALCONNECTION:"IfcStructuralConnection",IFCSTRUCTURALACTION:"IfcStructuralAction",IFCSTAIRFLIGHTTYPE:"IfcStairFlightType",IFCSTACKTERMINALTYPE:"IfcStackTerminalType",IFCSPACETYPE:"IfcSpaceType",IFCSPACEPROGRAM:"IfcSpaceProgram",IFCSPACEHEATERTYPE:"IfcSpaceHeaterType",IFCSPACE:"IfcSpace",IFCSLABTYPE:"IfcSlabType",IFCSITE:"IfcSite",IFCSERVICELIFE:"IfcServiceLife",IFCSCHEDULETIMECONTROL:"IfcScheduleTimeControl",IFCSANITARYTERMINALTYPE:"IfcSanitaryTerminalType",IFCRELASSIGNSTASKS:"IfcRelAssignsTasks",IFCRELAGGREGATES:"IfcRelAggregates",IFCRAMPFLIGHTTYPE:"IfcRampFlightType",IFCRAILINGTYPE:"IfcRailingType",IFCRADIUSDIMENSION:"IfcRadiusDimension",IFCPUMPTYPE:"IfcPumpType",IFCPROTECTIVEDEVICETYPE:"IfcProtectiveDeviceType",IFCPROJECTIONELEMENT:"IfcProjectionElement",IFCPROJECTORDERRECORD:"IfcProjectOrderRecord",IFCPROJECTORDER:"IfcProjectOrder",IFCPROCEDURE:"IfcProcedure",IFCPORT:"IfcPort",IFCPOLYLINE:"IfcPolyline",IFCPLATETYPE:"IfcPlateType",IFCPIPESEGMENTTYPE:"IfcPipeSegmentType",IFCPIPEFITTINGTYPE:"IfcPipeFittingType",IFCPERMIT:"IfcPermit",IFCPERFORMANCEHISTORY:"IfcPerformanceHistory",IFCOUTLETTYPE:"IfcOutletType",IFCORDERACTION:"IfcOrderAction",IFCOPENINGELEMENT:"IfcOpeningElement",IFCOCCUPANT:"IfcOccupant",IFCMOVE:"IfcMove",IFCMOTORCONNECTIONTYPE:"IfcMotorConnectionType",IFCMEMBERTYPE:"IfcMemberType",IFCMECHANICALFASTENERTYPE:"IfcMechanicalFastenerType",IFCMECHANICALFASTENER:"IfcMechanicalFastener",IFCLINEARDIMENSION:"IfcLinearDimension",IFCLIGHTFIXTURETYPE:"IfcLightFixtureType",IFCLAMPTYPE:"IfcLampType",IFCLABORRESOURCE:"IfcLaborResource",IFCJUNCTIONBOXTYPE:"IfcJunctionBoxType",IFCINVENTORY:"IfcInventory",IFCHUMIDIFIERTYPE:"IfcHumidifierType",IFCHEATEXCHANGERTYPE:"IfcHeatExchangerType",IFCGROUP:"IfcGroup",IFCGRID:"IfcGrid",IFCGASTERMINALTYPE:"IfcGasTerminalType",IFCFURNITURESTANDARD:"IfcFurnitureStandard",IFCFURNISHINGELEMENT:"IfcFurnishingElement",IFCFLOWTREATMENTDEVICETYPE:"IfcFlowTreatmentDeviceType",IFCFLOWTERMINALTYPE:"IfcFlowTerminalType",IFCFLOWSTORAGEDEVICETYPE:"IfcFlowStorageDeviceType",IFCFLOWSEGMENTTYPE:"IfcFlowSegmentType",IFCFLOWMOVINGDEVICETYPE:"IfcFlowMovingDeviceType",IFCFLOWMETERTYPE:"IfcFlowMeterType",IFCFLOWFITTINGTYPE:"IfcFlowFittingType",IFCFLOWCONTROLLERTYPE:"IfcFlowControllerType",IFCFEATUREELEMENTSUBTRACTION:"IfcFeatureElementSubtraction",IFCFEATUREELEMENTADDITION:"IfcFeatureElementAddition",IFCFEATUREELEMENT:"IfcFeatureElement",IFCFASTENERTYPE:"IfcFastenerType",IFCFASTENER:"IfcFastener",IFCFACETEDBREPWITHVOIDS:"IfcFacetedBrepWithVoids",IFCFACETEDBREP:"IfcFacetedBrep",IFCEVAPORATORTYPE:"IfcEvaporatorType",IFCEVAPORATIVECOOLERTYPE:"IfcEvaporativeCoolerType",IFCEQUIPMENTSTANDARD:"IfcEquipmentStandard",IFCEQUIPMENTELEMENT:"IfcEquipmentElement",IFCENERGYCONVERSIONDEVICETYPE:"IfcEnergyConversionDeviceType",IFCELLIPSE:"IfcEllipse",IFCELEMENTCOMPONENTTYPE:"IfcElementComponentType",IFCELEMENTCOMPONENT:"IfcElementComponent",IFCELEMENTASSEMBLY:"IfcElementAssembly",IFCELEMENT:"IfcElement",IFCELECTRICALBASEPROPERTIES:"IfcElectricalBaseProperties",IFCDISTRIBUTIONFLOWELEMENTTYPE:"IfcDistributionFlowElementType",IFCDISTRIBUTIONELEMENTTYPE:"IfcDistributionElementType",IFCDIMENSIONCURVEDIRECTEDCALLOUT:"IfcDimensionCurveDirectedCallout",IFCCURTAINWALLTYPE:"IfcCurtainWallType",IFCCREWRESOURCE:"IfcCrewResource",IFCCOVERINGTYPE:"IfcCoveringType",IFCCOSTSCHEDULE:"IfcCostSchedule",IFCCOSTITEM:"IfcCostItem",IFCCONTROL:"IfcControl",IFCCONSTRUCTIONRESOURCE:"IfcConstructionResource",IFCCONIC:"IfcConic",IFCCOMPOSITECURVE:"IfcCompositeCurve",IFCCOLUMNTYPE:"IfcColumnType",IFCCIRCLEHOLLOWPROFILEDEF:"IfcCircleHollowProfileDef",IFCBUILDINGSTOREY:"IfcBuildingStorey",IFCBUILDINGELEMENTTYPE:"IfcBuildingElementType",IFCBUILDING:"IfcBuilding",IFCBOUNDEDCURVE:"IfcBoundedCurve",IFCBOOLEANCLIPPINGRESULT:"IfcBooleanClippingResult",IFCBLOCK:"IfcBlock",IFCASYMMETRICISHAPEPROFILEDEF:"IfcAsymmetricIShapeProfileDef",IFCANNOTATION:"IfcAnnotation",IFCACTOR:"IfcActor",IFCTRANSPORTELEMENTTYPE:"IfcTransportElementType",IFCTASK:"IfcTask",IFCSYSTEMFURNITUREELEMENTTYPE:"IfcSystemFurnitureElementType",IFCSURFACEOFREVOLUTION:"IfcSurfaceOfRevolution",IFCSURFACEOFLINEAREXTRUSION:"IfcSurfaceOfLinearExtrusion",IFCSURFACECURVESWEPTAREASOLID:"IfcSurfaceCurveSweptAreaSolid",IFCSTRUCTUREDDIMENSIONCALLOUT:"IfcStructuredDimensionCallout",IFCSTRUCTURALSURFACEMEMBERVARYING:"IfcStructuralSurfaceMemberVarying",IFCSTRUCTURALSURFACEMEMBER:"IfcStructuralSurfaceMember",IFCSTRUCTURALREACTION:"IfcStructuralReaction",IFCSTRUCTURALMEMBER:"IfcStructuralMember",IFCSTRUCTURALITEM:"IfcStructuralItem",IFCSTRUCTURALACTIVITY:"IfcStructuralActivity",IFCSPHERE:"IfcSphere",IFCSPATIALSTRUCTUREELEMENTTYPE:"IfcSpatialStructureElementType",IFCSPATIALSTRUCTUREELEMENT:"IfcSpatialStructureElement",IFCRIGHTCIRCULARCYLINDER:"IfcRightCircularCylinder",IFCRIGHTCIRCULARCONE:"IfcRightCircularCone",IFCREVOLVEDAREASOLID:"IfcRevolvedAreaSolid",IFCRESOURCE:"IfcResource",IFCRELVOIDSELEMENT:"IfcRelVoidsElement",IFCRELSPACEBOUNDARY:"IfcRelSpaceBoundary",IFCRELSERVICESBUILDINGS:"IfcRelServicesBuildings",IFCRELSEQUENCE:"IfcRelSequence",IFCRELSCHEDULESCOSTITEMS:"IfcRelSchedulesCostItems",IFCRELREFERENCEDINSPATIALSTRUCTURE:"IfcRelReferencedInSpatialStructure",IFCRELPROJECTSELEMENT:"IfcRelProjectsElement",IFCRELOVERRIDESPROPERTIES:"IfcRelOverridesProperties",IFCRELOCCUPIESSPACES:"IfcRelOccupiesSpaces",IFCRELNESTS:"IfcRelNests",IFCRELINTERACTIONREQUIREMENTS:"IfcRelInteractionRequirements",IFCRELFLOWCONTROLELEMENTS:"IfcRelFlowControlElements",IFCRELFILLSELEMENT:"IfcRelFillsElement",IFCRELDEFINESBYTYPE:"IfcRelDefinesByType",IFCRELDEFINESBYPROPERTIES:"IfcRelDefinesByProperties",IFCRELDEFINES:"IfcRelDefines",IFCRELDECOMPOSES:"IfcRelDecomposes",IFCRELCOVERSSPACES:"IfcRelCoversSpaces",IFCRELCOVERSBLDGELEMENTS:"IfcRelCoversBldgElements",IFCRELCONTAINEDINSPATIALSTRUCTURE:"IfcRelContainedInSpatialStructure",IFCRELCONNECTSWITHREALIZINGELEMENTS:"IfcRelConnectsWithRealizingElements",IFCRELCONNECTSWITHECCENTRICITY:"IfcRelConnectsWithEccentricity",IFCRELCONNECTSSTRUCTURALMEMBER:"IfcRelConnectsStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT:"IfcRelConnectsStructuralElement",IFCRELCONNECTSSTRUCTURALACTIVITY:"IfcRelConnectsStructuralActivity",IFCRELCONNECTSPORTS:"IfcRelConnectsPorts",IFCRELCONNECTSPORTTOELEMENT:"IfcRelConnectsPortToElement",IFCRELCONNECTSPATHELEMENTS:"IfcRelConnectsPathElements",IFCRELCONNECTSELEMENTS:"IfcRelConnectsElements",IFCRELCONNECTS:"IfcRelConnects",IFCRELASSOCIATESPROFILEPROPERTIES:"IfcRelAssociatesProfileProperties",IFCRELASSOCIATESMATERIAL:"IfcRelAssociatesMaterial",IFCRELASSOCIATESLIBRARY:"IfcRelAssociatesLibrary",IFCRELASSOCIATESDOCUMENT:"IfcRelAssociatesDocument",IFCRELASSOCIATESCONSTRAINT:"IfcRelAssociatesConstraint",IFCRELASSOCIATESCLASSIFICATION:"IfcRelAssociatesClassification",IFCRELASSOCIATESAPPROVAL:"IfcRelAssociatesApproval",IFCRELASSOCIATESAPPLIEDVALUE:"IfcRelAssociatesAppliedValue",IFCRELASSOCIATES:"IfcRelAssociates",IFCRELASSIGNSTORESOURCE:"IfcRelAssignsToResource",IFCRELASSIGNSTOPROJECTORDER:"IfcRelAssignsToProjectOrder",IFCRELASSIGNSTOPRODUCT:"IfcRelAssignsToProduct",IFCRELASSIGNSTOPROCESS:"IfcRelAssignsToProcess",IFCRELASSIGNSTOGROUP:"IfcRelAssignsToGroup",IFCRELASSIGNSTOCONTROL:"IfcRelAssignsToControl",IFCRELASSIGNSTOACTOR:"IfcRelAssignsToActor",IFCRELASSIGNS:"IfcRelAssigns",IFCRECTANGULARTRIMMEDSURFACE:"IfcRectangularTrimmedSurface",IFCRECTANGULARPYRAMID:"IfcRectangularPyramid",IFCRECTANGLEHOLLOWPROFILEDEF:"IfcRectangleHollowProfileDef",IFCPROXY:"IfcProxy",IFCPROPERTYSET:"IfcPropertySet",IFCPROJECTIONCURVE:"IfcProjectionCurve",IFCPROJECT:"IfcProject",IFCPRODUCT:"IfcProduct",IFCPROCESS:"IfcProcess",IFCPLANE:"IfcPlane",IFCPLANARBOX:"IfcPlanarBox",IFCPERMEABLECOVERINGPROPERTIES:"IfcPermeableCoveringProperties",IFCOFFSETCURVE3D:"IfcOffsetCurve3D",IFCOFFSETCURVE2D:"IfcOffsetCurve2D",IFCOBJECT:"IfcObject",IFCMANIFOLDSOLIDBREP:"IfcManifoldSolidBrep",IFCLINE:"IfcLine",IFCLSHAPEPROFILEDEF:"IfcLShapeProfileDef",IFCISHAPEPROFILEDEF:"IfcIShapeProfileDef",IFCGEOMETRICCURVESET:"IfcGeometricCurveSet",IFCFURNITURETYPE:"IfcFurnitureType",IFCFURNISHINGELEMENTTYPE:"IfcFurnishingElementType",IFCFLUIDFLOWPROPERTIES:"IfcFluidFlowProperties",IFCFILLAREASTYLETILES:"IfcFillAreaStyleTiles",IFCFILLAREASTYLETILESYMBOLWITHSTYLE:"IfcFillAreaStyleTileSymbolWithStyle",IFCFILLAREASTYLEHATCHING:"IfcFillAreaStyleHatching",IFCFACEBASEDSURFACEMODEL:"IfcFaceBasedSurfaceModel",IFCEXTRUDEDAREASOLID:"IfcExtrudedAreaSolid",IFCENERGYPROPERTIES:"IfcEnergyProperties",IFCELLIPSEPROFILEDEF:"IfcEllipseProfileDef",IFCELEMENTARYSURFACE:"IfcElementarySurface",IFCELEMENTTYPE:"IfcElementType",IFCELEMENTQUANTITY:"IfcElementQuantity",IFCEDGELOOP:"IfcEdgeLoop",IFCDRAUGHTINGPREDEFINEDCURVEFONT:"IfcDraughtingPredefinedCurveFont",IFCDRAUGHTINGPREDEFINEDCOLOUR:"IfcDraughtingPredefinedColour",IFCDRAUGHTINGCALLOUT:"IfcDraughtingCallout",IFCDOORSTYLE:"IfcDoorStyle",IFCDOORPANELPROPERTIES:"IfcDoorPanelProperties",IFCDOORLININGPROPERTIES:"IfcDoorLiningProperties",IFCDIRECTION:"IfcDirection",IFCDIMENSIONCURVETERMINATOR:"IfcDimensionCurveTerminator",IFCDIMENSIONCURVE:"IfcDimensionCurve",IFCDEFINEDSYMBOL:"IfcDefinedSymbol",IFCCURVEBOUNDEDPLANE:"IfcCurveBoundedPlane",IFCCURVE:"IfcCurve",IFCCSGSOLID:"IfcCsgSolid",IFCCSGPRIMITIVE3D:"IfcCsgPrimitive3D",IFCCRANERAILFSHAPEPROFILEDEF:"IfcCraneRailFShapeProfileDef",IFCCRANERAILASHAPEPROFILEDEF:"IfcCraneRailAShapeProfileDef",IFCCOMPOSITECURVESEGMENT:"IfcCompositeCurveSegment",IFCCLOSEDSHELL:"IfcClosedShell",IFCCIRCLEPROFILEDEF:"IfcCircleProfileDef",IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM:"IfcCartesianTransformationOperator3DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR3D:"IfcCartesianTransformationOperator3D",IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM:"IfcCartesianTransformationOperator2DNonUniform",IFCCARTESIANTRANSFORMATIONOPERATOR2D:"IfcCartesianTransformationOperator2D",IFCCARTESIANTRANSFORMATIONOPERATOR:"IfcCartesianTransformationOperator",IFCCARTESIANPOINT:"IfcCartesianPoint",IFCCSHAPEPROFILEDEF:"IfcCShapeProfileDef",IFCBOXEDHALFSPACE:"IfcBoxedHalfSpace",IFCBOUNDINGBOX:"IfcBoundingBox",IFCBOUNDEDSURFACE:"IfcBoundedSurface",IFCBOOLEANRESULT:"IfcBooleanResult",IFCAXIS2PLACEMENT3D:"IfcAxis2Placement3D",IFCAXIS2PLACEMENT2D:"IfcAxis2Placement2D",IFCAXIS1PLACEMENT:"IfcAxis1Placement",IFCANNOTATIONSURFACE:"IfcAnnotationSurface",IFCANNOTATIONFILLAREAOCCURRENCE:"IfcAnnotationFillAreaOccurrence",IFCANNOTATIONFILLAREA:"IfcAnnotationFillArea",IFCANNOTATIONCURVEOCCURRENCE:"IfcAnnotationCurveOccurrence",IFCZSHAPEPROFILEDEF:"IfcZShapeProfileDef",IFCWINDOWSTYLE:"IfcWindowStyle",IFCWINDOWPANELPROPERTIES:"IfcWindowPanelProperties",IFCWINDOWLININGPROPERTIES:"IfcWindowLiningProperties",IFCVERTEXLOOP:"IfcVertexLoop",IFCVECTOR:"IfcVector",IFCUSHAPEPROFILEDEF:"IfcUShapeProfileDef",IFCTYPEPRODUCT:"IfcTypeProduct",IFCTYPEOBJECT:"IfcTypeObject",IFCTWODIRECTIONREPEATFACTOR:"IfcTwoDirectionRepeatFactor",IFCTRAPEZIUMPROFILEDEF:"IfcTrapeziumProfileDef",IFCTEXTLITERALWITHEXTENT:"IfcTextLiteralWithExtent",IFCTEXTLITERAL:"IfcTextLiteral",IFCTERMINATORSYMBOL:"IfcTerminatorSymbol",IFCTSHAPEPROFILEDEF:"IfcTShapeProfileDef",IFCSWEPTSURFACE:"IfcSweptSurface",IFCSWEPTDISKSOLID:"IfcSweptDiskSolid",IFCSWEPTAREASOLID:"IfcSweptAreaSolid",IFCSURFACESTYLERENDERING:"IfcSurfaceStyleRendering",IFCSURFACE:"IfcSurface",IFCSUBEDGE:"IfcSubedge",IFCSTRUCTURALSTEELPROFILEPROPERTIES:"IfcStructuralSteelProfileProperties",IFCSTRUCTURALPROFILEPROPERTIES:"IfcStructuralProfileProperties",IFCSTRUCTURALLOADSINGLEFORCEWARPING:"IfcStructuralLoadSingleForceWarping",IFCSTRUCTURALLOADSINGLEFORCE:"IfcStructuralLoadSingleForce",IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION:"IfcStructuralLoadSingleDisplacementDistortion",IFCSTRUCTURALLOADSINGLEDISPLACEMENT:"IfcStructuralLoadSingleDisplacement",IFCSTRUCTURALLOADPLANARFORCE:"IfcStructuralLoadPlanarForce",IFCSTRUCTURALLOADLINEARFORCE:"IfcStructuralLoadLinearForce",IFCSPACETHERMALLOADPROPERTIES:"IfcSpaceThermalLoadProperties",IFCSOUNDVALUE:"IfcSoundValue",IFCSOUNDPROPERTIES:"IfcSoundProperties",IFCSOLIDMODEL:"IfcSolidModel",IFCSLIPPAGECONNECTIONCONDITION:"IfcSlippageConnectionCondition",IFCSHELLBASEDSURFACEMODEL:"IfcShellBasedSurfaceModel",IFCSERVICELIFEFACTOR:"IfcServiceLifeFactor",IFCSECTIONEDSPINE:"IfcSectionedSpine",IFCROUNDEDRECTANGLEPROFILEDEF:"IfcRoundedRectangleProfileDef",IFCRELATIONSHIP:"IfcRelationship",IFCREINFORCEMENTDEFINITIONPROPERTIES:"IfcReinforcementDefinitionProperties",IFCREGULARTIMESERIES:"IfcRegularTimeSeries",IFCRECTANGLEPROFILEDEF:"IfcRectangleProfileDef",IFCPROPERTYTABLEVALUE:"IfcPropertyTableValue",IFCPROPERTYSINGLEVALUE:"IfcPropertySingleValue",IFCPROPERTYSETDEFINITION:"IfcPropertySetDefinition",IFCPROPERTYREFERENCEVALUE:"IfcPropertyReferenceValue",IFCPROPERTYLISTVALUE:"IfcPropertyListValue",IFCPROPERTYENUMERATEDVALUE:"IfcPropertyEnumeratedValue",IFCPROPERTYDEFINITION:"IfcPropertyDefinition",IFCPROPERTYBOUNDEDVALUE:"IfcPropertyBoundedValue",IFCPRODUCTDEFINITIONSHAPE:"IfcProductDefinitionShape",IFCPREDEFINEDPOINTMARKERSYMBOL:"IfcPredefinedPointMarkerSymbol",IFCPREDEFINEDDIMENSIONSYMBOL:"IfcPredefinedDimensionSymbol",IFCPREDEFINEDCURVEFONT:"IfcPredefinedCurveFont",IFCPREDEFINEDCOLOUR:"IfcPredefinedColour",IFCPOLYGONALBOUNDEDHALFSPACE:"IfcPolygonalBoundedHalfSpace",IFCPOLYLOOP:"IfcPolyLoop",IFCPOINTONSURFACE:"IfcPointOnSurface",IFCPOINTONCURVE:"IfcPointOnCurve",IFCPOINT:"IfcPoint",IFCPLANAREXTENT:"IfcPlanarExtent",IFCPLACEMENT:"IfcPlacement",IFCPIXELTEXTURE:"IfcPixelTexture",IFCPHYSICALCOMPLEXQUANTITY:"IfcPhysicalComplexQuantity",IFCPATH:"IfcPath",IFCPARAMETERIZEDPROFILEDEF:"IfcParameterizedProfileDef",IFCORIENTEDEDGE:"IfcOrientedEdge",IFCOPENSHELL:"IfcOpenShell",IFCONEDIRECTIONREPEATFACTOR:"IfcOneDirectionRepeatFactor",IFCOBJECTDEFINITION:"IfcObjectDefinition",IFCMECHANICALCONCRETEMATERIALPROPERTIES:"IfcMechanicalConcreteMaterialProperties",IFCMATERIALDEFINITIONREPRESENTATION:"IfcMaterialDefinitionRepresentation",IFCMAPPEDITEM:"IfcMappedItem",IFCLOOP:"IfcLoop",IFCLOCALPLACEMENT:"IfcLocalPlacement",IFCLIGHTSOURCESPOT:"IfcLightSourceSpot",IFCLIGHTSOURCEPOSITIONAL:"IfcLightSourcePositional",IFCLIGHTSOURCEGONIOMETRIC:"IfcLightSourceGoniometric",IFCLIGHTSOURCEDIRECTIONAL:"IfcLightSourceDirectional",IFCLIGHTSOURCEAMBIENT:"IfcLightSourceAmbient",IFCLIGHTSOURCE:"IfcLightSource",IFCIRREGULARTIMESERIES:"IfcIrregularTimeSeries",IFCIMAGETEXTURE:"IfcImageTexture",IFCHYGROSCOPICMATERIALPROPERTIES:"IfcHygroscopicMaterialProperties",IFCHALFSPACESOLID:"IfcHalfSpaceSolid",IFCGRIDPLACEMENT:"IfcGridPlacement",IFCGEOMETRICSET:"IfcGeometricSet",IFCGEOMETRICREPRESENTATIONSUBCONTEXT:"IfcGeometricRepresentationSubContext",IFCGEOMETRICREPRESENTATIONITEM:"IfcGeometricRepresentationItem",IFCGEOMETRICREPRESENTATIONCONTEXT:"IfcGeometricRepresentationContext",IFCGENERALPROFILEPROPERTIES:"IfcGeneralProfileProperties",IFCGENERALMATERIALPROPERTIES:"IfcGeneralMaterialProperties",IFCFUELPROPERTIES:"IfcFuelProperties",IFCFILLAREASTYLE:"IfcFillAreaStyle",IFCFAILURECONNECTIONCONDITION:"IfcFailureConnectionCondition",IFCFACESURFACE:"IfcFaceSurface",IFCFACEOUTERBOUND:"IfcFaceOuterBound",IFCFACEBOUND:"IfcFaceBound",IFCFACE:"IfcFace",IFCEXTENDEDMATERIALPROPERTIES:"IfcExtendedMaterialProperties",IFCEDGECURVE:"IfcEdgeCurve",IFCEDGE:"IfcEdge",IFCDRAUGHTINGPREDEFINEDTEXTFONT:"IfcDraughtingPredefinedTextFont",IFCDOCUMENTREFERENCE:"IfcDocumentReference",IFCDIMENSIONPAIR:"IfcDimensionPair",IFCDIMENSIONCALLOUTRELATIONSHIP:"IfcDimensionCalloutRelationship",IFCDERIVEDPROFILEDEF:"IfcDerivedProfileDef",IFCCURVESTYLE:"IfcCurveStyle",IFCCONVERSIONBASEDUNIT:"IfcConversionBasedUnit",IFCCONTEXTDEPENDENTUNIT:"IfcContextDependentUnit",IFCCONNECTIONPOINTECCENTRICITY:"IfcConnectionPointEccentricity",IFCCONNECTIONCURVEGEOMETRY:"IfcConnectionCurveGeometry",IFCCONNECTEDFACESET:"IfcConnectedFaceSet",IFCCOMPOSITEPROFILEDEF:"IfcCompositeProfileDef",IFCCOMPLEXPROPERTY:"IfcComplexProperty",IFCCOLOURRGB:"IfcColourRgb",IFCCLASSIFICATIONREFERENCE:"IfcClassificationReference",IFCCENTERLINEPROFILEDEF:"IfcCenterLineProfileDef",IFCBLOBTEXTURE:"IfcBlobTexture",IFCARBITRARYPROFILEDEFWITHVOIDS:"IfcArbitraryProfileDefWithVoids",IFCARBITRARYOPENPROFILEDEF:"IfcArbitraryOpenProfileDef",IFCARBITRARYCLOSEDPROFILEDEF:"IfcArbitraryClosedProfileDef",IFCANNOTATIONTEXTOCCURRENCE:"IfcAnnotationTextOccurrence",IFCANNOTATIONSYMBOLOCCURRENCE:"IfcAnnotationSymbolOccurrence",IFCANNOTATIONSURFACEOCCURRENCE:"IfcAnnotationSurfaceOccurrence",IFCANNOTATIONOCCURRENCE:"IfcAnnotationOccurrence",IFCWATERPROPERTIES:"IfcWaterProperties",IFCVIRTUALGRIDINTERSECTION:"IfcVirtualGridIntersection",IFCVERTEXPOINT:"IfcVertexPoint",IFCVERTEXBASEDTEXTUREMAP:"IfcVertexBasedTextureMap",IFCVERTEX:"IfcVertex",IFCUNITASSIGNMENT:"IfcUnitAssignment",IFCTOPOLOGYREPRESENTATION:"IfcTopologyRepresentation",IFCTOPOLOGICALREPRESENTATIONITEM:"IfcTopologicalRepresentationItem",IFCTIMESERIESVALUE:"IfcTimeSeriesValue",IFCTIMESERIESREFERENCERELATIONSHIP:"IfcTimeSeriesReferenceRelationship",IFCTIMESERIES:"IfcTimeSeries",IFCTHERMALMATERIALPROPERTIES:"IfcThermalMaterialProperties",IFCTEXTUREVERTEX:"IfcTextureVertex",IFCTEXTUREMAP:"IfcTextureMap",IFCTEXTURECOORDINATEGENERATOR:"IfcTextureCoordinateGenerator",IFCTEXTURECOORDINATE:"IfcTextureCoordinate",IFCTEXTSTYLEWITHBOXCHARACTERISTICS:"IfcTextStyleWithBoxCharacteristics",IFCTEXTSTYLETEXTMODEL:"IfcTextStyleTextModel",IFCTEXTSTYLEFORDEFINEDFONT:"IfcTextStyleForDefinedFont",IFCTEXTSTYLEFONTMODEL:"IfcTextStyleFontModel",IFCTEXTSTYLE:"IfcTextStyle",IFCTELECOMADDRESS:"IfcTelecomAddress",IFCTABLEROW:"IfcTableRow",IFCTABLE:"IfcTable",IFCSYMBOLSTYLE:"IfcSymbolStyle",IFCSURFACETEXTURE:"IfcSurfaceTexture",IFCSURFACESTYLEWITHTEXTURES:"IfcSurfaceStyleWithTextures",IFCSURFACESTYLESHADING:"IfcSurfaceStyleShading",IFCSURFACESTYLEREFRACTION:"IfcSurfaceStyleRefraction",IFCSURFACESTYLELIGHTING:"IfcSurfaceStyleLighting",IFCSURFACESTYLE:"IfcSurfaceStyle",IFCSTYLEDREPRESENTATION:"IfcStyledRepresentation",IFCSTYLEDITEM:"IfcStyledItem",IFCSTYLEMODEL:"IfcStyleModel",IFCSTRUCTURALLOADTEMPERATURE:"IfcStructuralLoadTemperature",IFCSTRUCTURALLOADSTATIC:"IfcStructuralLoadStatic",IFCSTRUCTURALLOAD:"IfcStructuralLoad",IFCSTRUCTURALCONNECTIONCONDITION:"IfcStructuralConnectionCondition",IFCSIMPLEPROPERTY:"IfcSimpleProperty",IFCSHAPEREPRESENTATION:"IfcShapeRepresentation",IFCSHAPEMODEL:"IfcShapeModel",IFCSHAPEASPECT:"IfcShapeAspect",IFCSECTIONREINFORCEMENTPROPERTIES:"IfcSectionReinforcementProperties",IFCSECTIONPROPERTIES:"IfcSectionProperties",IFCSIUNIT:"IfcSIUnit",IFCROOT:"IfcRoot",IFCRIBPLATEPROFILEPROPERTIES:"IfcRibPlateProfileProperties",IFCREPRESENTATIONMAP:"IfcRepresentationMap",IFCREPRESENTATIONITEM:"IfcRepresentationItem",IFCREPRESENTATIONCONTEXT:"IfcRepresentationContext",IFCREPRESENTATION:"IfcRepresentation",IFCRELAXATION:"IfcRelaxation",IFCREINFORCEMENTBARPROPERTIES:"IfcReinforcementBarProperties",IFCREFERENCESVALUEDOCUMENT:"IfcReferencesValueDocument",IFCQUANTITYWEIGHT:"IfcQuantityWeight",IFCQUANTITYVOLUME:"IfcQuantityVolume",IFCQUANTITYTIME:"IfcQuantityTime",IFCQUANTITYLENGTH:"IfcQuantityLength",IFCQUANTITYCOUNT:"IfcQuantityCount",IFCQUANTITYAREA:"IfcQuantityArea",IFCPROPERTYENUMERATION:"IfcPropertyEnumeration",IFCPROPERTYDEPENDENCYRELATIONSHIP:"IfcPropertyDependencyRelationship",IFCPROPERTYCONSTRAINTRELATIONSHIP:"IfcPropertyConstraintRelationship",IFCPROPERTY:"IfcProperty",IFCPROFILEPROPERTIES:"IfcProfileProperties",IFCPROFILEDEF:"IfcProfileDef",IFCPRODUCTSOFCOMBUSTIONPROPERTIES:"IfcProductsOfCombustionProperties",IFCPRODUCTREPRESENTATION:"IfcProductRepresentation",IFCPRESENTATIONSTYLEASSIGNMENT:"IfcPresentationStyleAssignment",IFCPRESENTATIONSTYLE:"IfcPresentationStyle",IFCPRESENTATIONLAYERWITHSTYLE:"IfcPresentationLayerWithStyle",IFCPRESENTATIONLAYERASSIGNMENT:"IfcPresentationLayerAssignment",IFCPREDEFINEDTEXTFONT:"IfcPredefinedTextFont",IFCPREDEFINEDTERMINATORSYMBOL:"IfcPredefinedTerminatorSymbol",IFCPREDEFINEDSYMBOL:"IfcPredefinedSymbol",IFCPREDEFINEDITEM:"IfcPredefinedItem",IFCPOSTALADDRESS:"IfcPostalAddress",IFCPHYSICALSIMPLEQUANTITY:"IfcPhysicalSimpleQuantity",IFCPHYSICALQUANTITY:"IfcPhysicalQuantity",IFCPERSONANDORGANIZATION:"IfcPersonAndOrganization",IFCPERSON:"IfcPerson",IFCOWNERHISTORY:"IfcOwnerHistory",IFCORGANIZATIONRELATIONSHIP:"IfcOrganizationRelationship",IFCORGANIZATION:"IfcOrganization",IFCOPTICALMATERIALPROPERTIES:"IfcOpticalMaterialProperties",IFCOBJECTIVE:"IfcObjective",IFCOBJECTPLACEMENT:"IfcObjectPlacement",IFCNAMEDUNIT:"IfcNamedUnit",IFCMONETARYUNIT:"IfcMonetaryUnit",IFCMETRIC:"IfcMetric",IFCMECHANICALSTEELMATERIALPROPERTIES:"IfcMechanicalSteelMaterialProperties",IFCMECHANICALMATERIALPROPERTIES:"IfcMechanicalMaterialProperties",IFCMEASUREWITHUNIT:"IfcMeasureWithUnit",IFCMATERIALPROPERTIES:"IfcMaterialProperties",IFCMATERIALLIST:"IfcMaterialList",IFCMATERIALLAYERSETUSAGE:"IfcMaterialLayerSetUsage",IFCMATERIALLAYERSET:"IfcMaterialLayerSet",IFCMATERIALLAYER:"IfcMaterialLayer",IFCMATERIALCLASSIFICATIONRELATIONSHIP:"IfcMaterialClassificationRelationship",IFCMATERIAL:"IfcMaterial",IFCLOCALTIME:"IfcLocalTime",IFCLIGHTINTENSITYDISTRIBUTION:"IfcLightIntensityDistribution",IFCLIGHTDISTRIBUTIONDATA:"IfcLightDistributionData",IFCLIBRARYREFERENCE:"IfcLibraryReference",IFCLIBRARYINFORMATION:"IfcLibraryInformation",IFCIRREGULARTIMESERIESVALUE:"IfcIrregularTimeSeriesValue",IFCGRIDAXIS:"IfcGridAxis",IFCEXTERNALLYDEFINEDTEXTFONT:"IfcExternallyDefinedTextFont",IFCEXTERNALLYDEFINEDSYMBOL:"IfcExternallyDefinedSymbol",IFCEXTERNALLYDEFINEDSURFACESTYLE:"IfcExternallyDefinedSurfaceStyle",IFCEXTERNALLYDEFINEDHATCHSTYLE:"IfcExternallyDefinedHatchStyle",IFCEXTERNALREFERENCE:"IfcExternalReference",IFCENVIRONMENTALIMPACTVALUE:"IfcEnvironmentalImpactValue",IFCDRAUGHTINGCALLOUTRELATIONSHIP:"IfcDraughtingCalloutRelationship",IFCDOCUMENTINFORMATIONRELATIONSHIP:"IfcDocumentInformationRelationship",IFCDOCUMENTINFORMATION:"IfcDocumentInformation",IFCDOCUMENTELECTRONICFORMAT:"IfcDocumentElectronicFormat",IFCDIMENSIONALEXPONENTS:"IfcDimensionalExponents",IFCDERIVEDUNITELEMENT:"IfcDerivedUnitElement",IFCDERIVEDUNIT:"IfcDerivedUnit",IFCDATEANDTIME:"IfcDateAndTime",IFCCURVESTYLEFONTPATTERN:"IfcCurveStyleFontPattern",IFCCURVESTYLEFONTANDSCALING:"IfcCurveStyleFontAndScaling",IFCCURVESTYLEFONT:"IfcCurveStyleFont",IFCCURRENCYRELATIONSHIP:"IfcCurrencyRelationship",IFCCOSTVALUE:"IfcCostValue",IFCCOORDINATEDUNIVERSALTIMEOFFSET:"IfcCoordinatedUniversalTimeOffset",IFCCONSTRAINTRELATIONSHIP:"IfcConstraintRelationship",IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP:"IfcConstraintClassificationRelationship",IFCCONSTRAINTAGGREGATIONRELATIONSHIP:"IfcConstraintAggregationRelationship",IFCCONSTRAINT:"IfcConstraint",IFCCONNECTIONSURFACEGEOMETRY:"IfcConnectionSurfaceGeometry",IFCCONNECTIONPORTGEOMETRY:"IfcConnectionPortGeometry",IFCCONNECTIONPOINTGEOMETRY:"IfcConnectionPointGeometry",IFCCONNECTIONGEOMETRY:"IfcConnectionGeometry",IFCCOLOURSPECIFICATION:"IfcColourSpecification",IFCCLASSIFICATIONNOTATIONFACET:"IfcClassificationNotationFacet",IFCCLASSIFICATIONNOTATION:"IfcClassificationNotation",IFCCLASSIFICATIONITEMRELATIONSHIP:"IfcClassificationItemRelationship",IFCCLASSIFICATIONITEM:"IfcClassificationItem",IFCCLASSIFICATION:"IfcClassification",IFCCALENDARDATE:"IfcCalendarDate",IFCBOUNDARYNODECONDITIONWARPING:"IfcBoundaryNodeConditionWarping",IFCBOUNDARYNODECONDITION:"IfcBoundaryNodeCondition",IFCBOUNDARYFACECONDITION:"IfcBoundaryFaceCondition",IFCBOUNDARYEDGECONDITION:"IfcBoundaryEdgeCondition",IFCBOUNDARYCONDITION:"IfcBoundaryCondition",IFCAPPROVALRELATIONSHIP:"IfcApprovalRelationship",IFCAPPROVALPROPERTYRELATIONSHIP:"IfcApprovalPropertyRelationship",IFCAPPROVALACTORRELATIONSHIP:"IfcApprovalActorRelationship",IFCAPPROVAL:"IfcApproval",IFCAPPLIEDVALUERELATIONSHIP:"IfcAppliedValueRelationship",IFCAPPLIEDVALUE:"IfcAppliedValue",IFCAPPLICATION:"IfcApplication",IFCADDRESS:"IfcAddress",IFCACTORROLE:"IfcActorRole"};class lh{constructor(){p(this,"factor",1),p(this,"complement",1)}apply(t){const s=this.getScaleMatrix().multiply(t);t.copy(s)}setUp(t){var e,s,i;this.factor=1;const n=this.getLengthUnits(t);if(!n)return;const r=n==null,o=n.Name===void 0||n.Name===null;r||o||(n.Name.value==="FOOT"&&(this.factor=.3048),((e=n.Prefix)==null?void 0:e.value)==="MILLI"?this.complement=.001:((s=n.Prefix)==null?void 0:s.value)==="CENTI"?this.complement=.01:((i=n.Prefix)==null?void 0:i.value)==="DECI"&&(this.complement=.01))}getLengthUnits(t){try{const s=t.GetLineIDsWithType(0,Ba).get(0),i=t.GetLine(0,s);for(const n of i.Units){if(!n||n.value===null||n.value===void 0)continue;const r=t.GetLine(0,n.value);if(r.UnitType&&r.UnitType.value==="LENGTHUNIT")return r}return null}catch{return console.log("Could not get units"),null}}getScaleMatrix(){const t=this.factor;return new It().fromArray([t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1])}}class Uo{constructor(){p(this,"itemsByFloor",{}),p(this,"_units",new lh)}setUp(t){this._units.setUp(t),this.cleanUp();try{const e=t.GetLineIDsWithType(0,vi),s=new Set,i=t.GetLineIDsWithType(0,Ge);for(let c=0;c0&&!r.has(n))continue;if(this.settings.excludedCategories.has(n))continue;const o=this.webIfc.GetLineIDsWithType(0,n),a=o.size();for(let c=0;c{this.getMesh(n,e)});for(const n of this._visitedFragments){const{index:r,fragment:o}=n[1];e.keyFragments.set(r,o.id)}for(const n of e.items){const r=this._fragmentInstances.get(n.id);if(!r)throw new Error("Fragment not found!");const o=[];for(const[a,c]of r)o.push(c);n.add(o)}const i=this.webIfc.GetCoordinationMatrix(0);return e.coordinationMatrix.fromArray(i),e.civilData=this._civil.read(this.webIfc),e}getMesh(t,e){const s=t.geometries.size(),i=t.expressID;for(let n=0;nr.value!==s),await t.setProperties(s,null),this.registerChange(t,e,s))}addElementToPset(t,e,...s){this.components.get(Kt).addEntitiesRelation(t,e,{type:Hs,inv:"DefinesOcurrence"},...s)}async addPropToPset(t,e,...s){const i=await t.getProperties(e);if(i){for(const n of s){if(i.HasProperties.includes(n))continue;const r=new Ne(n);i.HasProperties.push(r),this.onPropToPset.trigger({model:t,psetID:e,propID:n})}this.registerChange(t,e)}}async createIfcRel(t,e,s,i){const n=dh[e];if(!n)throw new Error(`IfcPropertiesManager: ${n} is unsoported.`);const r=xe.getIFCSchema(t),o=fh[n],a=he[r][n];if(!(o&&a))throw new Error(`IfcPropertiesManager: ${n} is unsoported.`);const c=[new he[r].IfcGloballyUniqueId(Re.create())],{related:h,relating:d}=o,f=[...new Set(i)].map(T=>new Ne(T)),I=(T,C)=>{for(let g=T;gparseInt(r,10)),i=e[s[0]],n=new Ne(i.expressID);return{entity:i,handle:n}}registerChange(t,...e){this.changeMap[t.uuid]||(this.changeMap[t.uuid]=new Set);for(const s of e)this.changeMap[t.uuid].add(s),this.onDataChanged.trigger({model:t,expressID:s})}async newSingleProperty(t,e,s,i){const n=xe.getIFCSchema(t),r=new he[n].IfcIdentifier(s),o=new he[n][e](i),a=new he[n].IfcPropertySingleValue(r,null,o,null);return a.expressID=this.getNewExpressID(t),await this.setData(t,a),a}};p(Ho,"uuid","58c2d9f0-183c-48d6-a402-dfcf5b9a34df");let Ih=Ho;const Wo=class Fn extends At{constructor(t){super(t),p(this,"onDisposed",new j),p(this,"onRelationsIndexed",new j),p(this,"relationMaps",{}),p(this,"enabled",!0),p(this,"_relToAttributesMap",Qr),p(this,"_inverseAttributes",["IsDecomposedBy","Decomposes","AssociatedTo","HasAssociations","ClassificationForObjects","IsGroupedBy","HasAssignments","IsDefinedBy","DefinesOcurrence","IsTypedBy","Types","Defines","ContainedInStructure","ContainsElements","HasControlElements","AssignedToFlowElement","ConnectedTo","ConnectedFrom","ReferencedBy","Declares","HasContext","Controls","IsNestedBy","Nests","DocumentRefForObjects"]),p(this,"_ifcRels",[Di,Un,xn,Bn,Hs,Yn,Vn,vi,zn,Gn,kn,Hn,Wn,Xn,$n]),p(this,"onFragmentsDisposed",s=>{delete this.relationMaps[s.groupID]}),p(this,"_changeMap",{}),p(this,"onEntitiesRelated",new j),this.components.add(Fn.uuid,this),t.get(gt).onFragmentsDisposed.add(this.onFragmentsDisposed)}indexRelations(t,e,s,i){const n=Object.keys(e).find(h=>h.startsWith("Relating")),r=Object.keys(e).find(h=>h.startsWith("Related"));if(!(n&&r))return;const o=e[n].value,a=e[r].map(h=>h.value),c=this.getEntityRelations(t,o,i);for(const h of a)c.push(h);for(const h of a)this.getEntityRelations(t,h,s).push(o)}getAttributeIndex(t){const e=this._inverseAttributes.indexOf(t);if(e===-1)throw new Error(`IfcRelationsIndexer: ${t} is not a valid IFC Inverse Attribute name or its not supported yet by this component.`);return e}setRelationMap(t,e){this.relationMaps[t.uuid]=e,this.onRelationsIndexed.trigger({modelID:t.uuid,relationsMap:e})}async process(t,e){if(!t.hasProperties)throw new Error("FragmentsGroup properties not found");let s=this.relationMaps[t.uuid];s||(s=new Map,this.relationMaps[t.uuid]=s);const i=t.getLocalProperties();if(!i)return s;const n=(e==null?void 0:e.relationsToProcess)??this._ifcRels;for(const[r,o]of Object.entries(i)){if(!n.includes(o.type))continue;const a=this._relToAttributesMap.get(o.type);if(!a)continue;const{forRelated:c,forRelating:h}=a;this.indexRelations(s,o,c,h)}return this.setRelationMap(t,s),s}async processFromWebIfc(t,e){const s=new Map;for(const i of this._ifcRels){const n=this._relToAttributesMap.get(i);if(!n)continue;const{forRelated:r,forRelating:o}=n,a=t.GetLineIDsWithType(e,i);for(let c=0;cT.startsWith("Related")),E=f.find(T=>T.startsWith("Relating"));if(!(I&&E))continue;u[I]=[...h].map(T=>new Ne(T)),u[E]=new Ne(a),await e.setData(i,u)}else{const u=await e.createIfcRel(i,r,a,[...h]);if(!u)continue;c.relID=u.expressID}}}}addEntitiesRelation(t,e,s,...i){const{type:n,inv:r}=s;let o=this.relationMaps[t.uuid];if(o||(o=new Map,this.relationMaps[t.uuid]=o),!this._ifcRels.includes(n))return;const a=Qr.get(n);if(!a)return;const{forRelated:c,forRelating:h}=a;if(!(c===r||h===r))return;let d=this._changeMap[t.uuid];d||(d=new re,this._changeMap[t.uuid]=d);const u=h===r?[e]:i,f=c===r?[e]:i;let I=d.get(n);I||(I=new re,I.onItemSet.add(()=>this.onEntitiesRelated.trigger({invAttribute:r,relType:n,relatingIDs:u,relatedIDs:f})),I.onItemUpdated.add(()=>this.onEntitiesRelated.trigger({invAttribute:r,relType:n,relatingIDs:u,relatedIDs:f})),d.set(n,I));for(const E of u){let T=I.get(E);T||(T={related:new we},I.set(E,T)),T.related.add(...f)}for(const E of u)this.getEntityRelations(t,E,h).push(...f);for(const E of f)this.getEntityRelations(t,E,c).push(...u)}getEntityChildren(t,e,s=new Set){if(s.add(e),this.relationMaps[t.uuid]===void 0)throw new Error("The provided model has no indices. You have to generate them first.");const n=this.getEntityRelations(t,e,"IsDecomposedBy");if(n)for(const o of n)this.getEntityChildren(t,o,s);const r=this.getEntityRelations(t,e,"ContainsElements");if(r)for(const o of r)this.getEntityChildren(t,o,s);return s}};p(Wo,"uuid","23a889ab-83b3-44a4-8bee-ead83438370b");let Kt=Wo;const Xo=class $o extends At{constructor(t){super(t),p(this,"onDisposed",new j),p(this,"onFragmentsLoaded",new j),p(this,"onFragmentsDisposed",new j),p(this,"list",new re),p(this,"groups",new re),p(this,"baseCoordinationModel",""),p(this,"baseCoordinationMatrix",new It),p(this,"enabled",!0),p(this,"_loader",new uo),this.components.add($o.uuid,this)}get meshes(){const t=[];for(const[e,s]of this.list)t.push(s.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,s=[];for(const i of t.items)s.push(i.id),this.list.delete(i.id);t.dispose(!0),this.groups.delete(t.uuid),this.groups.size===0&&(this.baseCoordinationModel="",this.baseCoordinationMatrix=new It),this.onFragmentsDisposed.trigger({groupID:e,fragmentIDs:s})}load(t,e){const i={...{coordinate:!0},...e},{coordinate:n,name:r,properties:o,relationsMap:a}=i,c=this._loader.import(t);e&&(c.isStreamed=e.isStreamed||!1),r&&(c.name=r);for(const h of c.items)h.group=c,this.list.set(h.id,h);return n&&this.coordinate([c]),this.groups.set(c.uuid,c),o&&c.setLocalProperties(o),a&&this.components.get(Kt).setRelationMap(c,a),this.onFragmentsLoaded.trigger(c),c}export(t){return this._loader.export(t)}getModelIdMap(t){const e={};for(const s in t){const i=this.list.get(s);if(!(i&&i.group))continue;const n=i.group;n.uuid in e||(e[n.uuid]=new Set);const r=t[s];for(const o of r)e[n.uuid].add(o)}return e}modelIdToFragmentIdMap(t){let e={};for(const s in t){const i=this.groups.get(s);if(!i)continue;const n=t[s],r=i.getFragmentMap(n);e={...e,...r}}return e}guidToFragmentIdMap(t){const e={};for(const[i,n]of this.groups){i in e||(e[i]=new Set);for(const r of t){const o=n.globalToExpressIDs.get(r);o&&e[i].add(o)}}return this.modelIdToFragmentIdMap(e)}fragmentIdMapToGuids(t){const e=[],s=this.getModelIdMap(t);for(const i in s){const n=this.groups.get(i);if(!n)continue;const r=s[i];for(const o of r)for(const[a,c]of n.globalToExpressIDs.entries())if(c===o){e.push(a);break}}return e}coordinate(t=Array.from(this.groups.values())){if(this.baseCoordinationModel.length===0){const s=t.pop();if(!s)return;this.baseCoordinationModel=s.uuid,this.baseCoordinationMatrix=s.coordinationMatrix.clone()}if(t.length)for(const s of t)s.coordinationMatrix.equals(this.baseCoordinationMatrix)||(s.position.set(0,0,0),s.rotation.set(0,0,0),s.scale.set(1,1,1),s.updateMatrix(),this.applyBaseCoordinateSystem(s,s.coordinationMatrix))}applyBaseCoordinateSystem(t,e){e&&t.applyMatrix4(e.clone().invert()),t.applyMatrix4(this.baseCoordinationMatrix)}clone(t,e){const s=t.cloneGroup(e);this.groups.set(s.uuid,s);for(const i of s.items)this.list.set(i.id,i);return s}};p(Xo,"uuid","fef46874-46a3-461b-8c44-2922ab77c806");let gt=Xo;var Ti=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Eh(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function mi(l){throw new Error('Could not dynamically require "'+l+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Zo={exports:{}};/*! + +JSZip v3.10.1 - A JavaScript class for generating and reading zip files + + +(c) 2009-2016 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/main/LICENSE +*/(function(l,t){(function(e){l.exports=e()})(function(){return function e(s,i,n){function r(c,h){if(!i[c]){if(!s[c]){var d=typeof mi=="function"&&mi;if(!h&&d)return d(c,!0);if(o)return o(c,!0);var u=new Error("Cannot find module '"+c+"'");throw u.code="MODULE_NOT_FOUND",u}var f=i[c]={exports:{}};s[c][0].call(f.exports,function(I){var E=s[c][1][I];return r(E||I)},f,f.exports,e,s,i,n)}return i[c].exports}for(var o=typeof mi=="function"&&mi,a=0;a>2,f=(3&c)<<4|h>>4,I=1>6:64,E=2>4,h=(15&u)<<4|(f=o.indexOf(a.charAt(E++)))>>2,d=(3&f)<<6|(I=o.indexOf(a.charAt(E++))),g[T++]=c,f!==64&&(g[T++]=h),I!==64&&(g[T++]=d);return g}},{"./support":30,"./utils":32}],2:[function(e,s,i){var n=e("./external"),r=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function c(h,d,u,f,I){this.compressedSize=h,this.uncompressedSize=d,this.crc32=u,this.compression=f,this.compressedContent=I}c.prototype={getContentWorker:function(){var h=new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),d=this;return h.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(h,d,u){return h.pipe(new o).pipe(new a("uncompressedSize")).pipe(d.compressWorker(u)).pipe(new a("compressedSize")).withStreamInfo("compression",d)},s.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,s,i){var n=e("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},i.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,s,i){var n=e("./utils"),r=function(){for(var o,a=[],c=0;c<256;c++){o=c;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;a[c]=o}return a}();s.exports=function(o,a){return o!==void 0&&o.length?n.getTypeOf(o)!=="string"?function(c,h,d,u){var f=r,I=u+d;c^=-1;for(var E=u;E>>8^f[255&(c^h[E])];return-1^c}(0|a,o,o.length,0):function(c,h,d,u){var f=r,I=u+d;c^=-1;for(var E=u;E>>8^f[255&(c^h.charCodeAt(E))];return-1^c}(0|a,o,o.length,0):0}},{"./utils":32}],5:[function(e,s,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(e,s,i){var n=null;n=typeof Promise<"u"?Promise:e("lie"),s.exports={Promise:n}},{lie:37}],7:[function(e,s,i){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",r=e("pako"),o=e("./utils"),a=e("./stream/GenericWorker"),c=n?"uint8array":"array";function h(d,u){a.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=u,this.meta={}}i.magic="\b\0",o.inherits(h,a),h.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(c,d.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(u){d.push({data:u,meta:d.meta})}},i.compressWorker=function(d){return new h("Deflate",d)},i.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,s,i){function n(f,I){var E,T="";for(E=0;E>>=8;return T}function r(f,I,E,T,C,g){var S,m,F=f.file,y=f.compression,N=g!==c.utf8encode,w=o.transformTo("string",g(F.name)),P=o.transformTo("string",c.utf8encode(F.name)),v=F.comment,Y=o.transformTo("string",g(v)),O=o.transformTo("string",c.utf8encode(v)),M=P.length!==F.name.length,R=O.length!==v.length,D="",$="",G="",st=F.dir,H=F.date,nt={crc32:0,compressedSize:0,uncompressedSize:0};I&&!E||(nt.crc32=f.crc32,nt.compressedSize=f.compressedSize,nt.uncompressedSize=f.uncompressedSize);var V=0;I&&(V|=8),N||!M&&!R||(V|=2048);var x=0,it=0;st&&(x|=16),C==="UNIX"?(it=798,x|=function(K,Ft){var yt=K;return K||(yt=Ft?16893:33204),(65535&yt)<<16}(F.unixPermissions,st)):(it=20,x|=function(K){return 63&(K||0)}(F.dosPermissions)),S=H.getUTCHours(),S<<=6,S|=H.getUTCMinutes(),S<<=5,S|=H.getUTCSeconds()/2,m=H.getUTCFullYear()-1980,m<<=4,m|=H.getUTCMonth()+1,m<<=5,m|=H.getUTCDate(),M&&($=n(1,1)+n(h(w),4)+P,D+="up"+n($.length,2)+$),R&&(G=n(1,1)+n(h(Y),4)+O,D+="uc"+n(G.length,2)+G);var J="";return J+=` +\0`,J+=n(V,2),J+=y.magic,J+=n(S,2),J+=n(m,2),J+=n(nt.crc32,4),J+=n(nt.compressedSize,4),J+=n(nt.uncompressedSize,4),J+=n(w.length,2),J+=n(D.length,2),{fileRecord:d.LOCAL_FILE_HEADER+J+w+D,dirRecord:d.CENTRAL_FILE_HEADER+n(it,2)+J+n(Y.length,2)+"\0\0\0\0"+n(x,4)+n(T,4)+w+D+Y}}var o=e("../utils"),a=e("../stream/GenericWorker"),c=e("../utf8"),h=e("../crc32"),d=e("../signature");function u(f,I,E,T){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=I,this.zipPlatform=E,this.encodeFileName=T,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(u,a),u.prototype.push=function(f){var I=f.meta.percent||0,E=this.entriesCount,T=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,a.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:E?(I+100*(E-T-1))/E:100}}))},u.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var I=this.streamFiles&&!f.file.dir;if(I){var E=r(f,I,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(f){this.accumulate=!1;var I=this.streamFiles&&!f.file.dir,E=r(f,I,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),I)this.push({data:function(T){return d.DATA_DESCRIPTOR+n(T.crc32,4)+n(T.compressedSize,4)+n(T.uncompressedSize,4)}(f),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var f=this.bytesWritten,I=0;I=this.index;a--)c=(c<<8)+this.byteAt(a);return this.index+=o,c},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},s.exports=r},{"../utils":32}],19:[function(e,s,i){var n=e("./Uint8ArrayReader");function r(o){n.call(this,o)}e("../utils").inherits(r,n),r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},s.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,s,i){var n=e("./DataReader");function r(o){n.call(this,o)}e("../utils").inherits(r,n),r.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},r.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},r.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},s.exports=r},{"../utils":32,"./DataReader":18}],21:[function(e,s,i){var n=e("./ArrayReader");function r(o){n.call(this,o)}e("../utils").inherits(r,n),r.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var a=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},s.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(e,s,i){var n=e("../utils"),r=e("../support"),o=e("./ArrayReader"),a=e("./StringReader"),c=e("./NodeBufferReader"),h=e("./Uint8ArrayReader");s.exports=function(d){var u=n.getTypeOf(d);return n.checkSupport(u),u!=="string"||r.uint8array?u==="nodebuffer"?new c(d):r.uint8array?new h(n.transformTo("uint8array",d)):new o(n.transformTo("array",d)):new a(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,s,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(e,s,i){var n=e("./GenericWorker"),r=e("../utils");function o(a){n.call(this,"ConvertWorker to "+a),this.destType=a}r.inherits(o,n),o.prototype.processChunk=function(a){this.push({data:r.transformTo(this.destType,a.data),meta:a.meta})},s.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,s,i){var n=e("./GenericWorker"),r=e("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,n),o.prototype.processChunk=function(a){this.streamInfo.crc32=r(a.data,this.streamInfo.crc32||0),this.push(a)},s.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,s,i){var n=e("../utils"),r=e("./GenericWorker");function o(a){r.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}n.inherits(o,r),o.prototype.processChunk=function(a){if(a){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+a.data.length}r.prototype.processChunk.call(this,a)},s.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,s,i){var n=e("../utils"),r=e("./GenericWorker");function o(a){r.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(h){c.dataIsReady=!0,c.data=h,c.max=h&&h.length||0,c.type=n.getTypeOf(h),c.isPaused||c._tickAndRepeat()},function(h){c.error(h)})}n.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":a=this.data.substring(this.index,c);break;case"uint8array":a=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":a=this.data.slice(this.index,c)}return this.index=c,this.push({data:a,meta:{percent:this.max?this.index/this.max*100:0}})},s.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,s,i){function n(r){this.name=r||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(r){this.emit("data",r)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(r){this.emit("error",r)}return!0},error:function(r){return!this.isFinished&&(this.isPaused?this.generatedError=r:(this.isFinished=!0,this.emit("error",r),this.previous&&this.previous.error(r),this.cleanUp()),!0)},on:function(r,o){return this._listeners[r].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(r,o){if(this._listeners[r])for(var a=0;a "+r:r}},s.exports=n},{}],29:[function(e,s,i){var n=e("../utils"),r=e("./ConvertWorker"),o=e("./GenericWorker"),a=e("../base64"),c=e("../support"),h=e("../external"),d=null;if(c.nodestream)try{d=e("../nodejs/NodejsStreamOutputAdapter")}catch{}function u(I,E){return new h.Promise(function(T,C){var g=[],S=I._internalType,m=I._outputType,F=I._mimeType;I.on("data",function(y,N){g.push(y),E&&E(N)}).on("error",function(y){g=[],C(y)}).on("end",function(){try{var y=function(N,w,P){switch(N){case"blob":return n.newBlob(n.transformTo("arraybuffer",w),P);case"base64":return a.encode(w);default:return n.transformTo(N,w)}}(m,function(N,w){var P,v=0,Y=null,O=0;for(P=0;P"u")i.blob=!1;else{var n=new ArrayBuffer(0);try{i.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),i.blob=r.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!e("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(e,s,i){for(var n=e("./utils"),r=e("./support"),o=e("./nodejsUtils"),a=e("./stream/GenericWorker"),c=new Array(256),h=0;h<256;h++)c[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;c[254]=c[254]=1;function d(){a.call(this,"utf-8 decode"),this.leftOver=null}function u(){a.call(this,"utf-8 encode")}i.utf8encode=function(f){return r.nodebuffer?o.newBufferFrom(f,"utf-8"):function(I){var E,T,C,g,S,m=I.length,F=0;for(g=0;g>>6:(T<65536?E[S++]=224|T>>>12:(E[S++]=240|T>>>18,E[S++]=128|T>>>12&63),E[S++]=128|T>>>6&63),E[S++]=128|63&T);return E}(f)},i.utf8decode=function(f){return r.nodebuffer?n.transformTo("nodebuffer",f).toString("utf-8"):function(I){var E,T,C,g,S=I.length,m=new Array(2*S);for(E=T=0;E>10&1023,m[T++]=56320|1023&C)}return m.length!==T&&(m.subarray?m=m.subarray(0,T):m.length=T),n.applyFromCharCode(m)}(f=n.transformTo(r.uint8array?"uint8array":"array",f))},n.inherits(d,a),d.prototype.processChunk=function(f){var I=n.transformTo(r.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var E=I;(I=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),I.set(E,this.leftOver.length)}else I=this.leftOver.concat(I);this.leftOver=null}var T=function(g,S){var m;for((S=S||g.length)>g.length&&(S=g.length),m=S-1;0<=m&&(192&g[m])==128;)m--;return m<0||m===0?S:m+c[g[m]]>S?m:S}(I),C=I;T!==I.length&&(r.uint8array?(C=I.subarray(0,T),this.leftOver=I.subarray(T,I.length)):(C=I.slice(0,T),this.leftOver=I.slice(T,I.length))),this.push({data:i.utf8decode(C),meta:f.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=d,n.inherits(u,a),u.prototype.processChunk=function(f){this.push({data:i.utf8encode(f.data),meta:f.meta})},i.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,s,i){var n=e("./support"),r=e("./base64"),o=e("./nodejsUtils"),a=e("./external");function c(E){return E}function h(E,T){for(var C=0;C>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var I,E,T,C=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4>>6:(f<65536?u[T++]=224|f>>>12:(u[T++]=240|f>>>18,u[T++]=128|f>>>12&63),u[T++]=128|f>>>6&63),u[T++]=128|63&f);return u},i.buf2binstring=function(d){return h(d,d.length)},i.binstring2buf=function(d){for(var u=new n.Buf8(d.length),f=0,I=u.length;f>10&1023,g[I++]=56320|1023&E)}return h(g,I)},i.utf8border=function(d,u){var f;for((u=u||d.length)>d.length&&(u=d.length),f=u-1;0<=f&&(192&d[f])==128;)f--;return f<0||f===0?u:f+a[d[f]]>u?f:u}},{"./common":41}],43:[function(e,s,i){s.exports=function(n,r,o,a){for(var c=65535&n|0,h=n>>>16&65535|0,d=0;o!==0;){for(o-=d=2e3>>1:r>>>1;o[a]=r}return o}();s.exports=function(r,o,a,c){var h=n,d=c+a;r^=-1;for(var u=c;u>>8^h[255&(r^o[u])];return-1^r}},{}],46:[function(e,s,i){var n,r=e("../utils/common"),o=e("./trees"),a=e("./adler32"),c=e("./crc32"),h=e("./messages"),d=0,u=4,f=0,I=-2,E=-1,T=4,C=2,g=8,S=9,m=286,F=30,y=19,N=2*m+1,w=15,P=3,v=258,Y=v+P+1,O=42,M=113,R=1,D=2,$=3,G=4;function st(A,W){return A.msg=h[W],W}function H(A){return(A<<1)-(4A.avail_out&&(z=A.avail_out),z!==0&&(r.arraySet(A.output,W.pending_buf,W.pending_out,z,A.next_out),A.next_out+=z,W.pending_out+=z,A.total_out+=z,A.avail_out-=z,W.pending-=z,W.pending===0&&(W.pending_out=0))}function x(A,W){o._tr_flush_block(A,0<=A.block_start?A.block_start:-1,A.strstart-A.block_start,W),A.block_start=A.strstart,V(A.strm)}function it(A,W){A.pending_buf[A.pending++]=W}function J(A,W){A.pending_buf[A.pending++]=W>>>8&255,A.pending_buf[A.pending++]=255&W}function K(A,W){var z,L,_=A.max_chain_length,b=A.strstart,X=A.prev_length,Z=A.nice_match,B=A.strstart>A.w_size-Y?A.strstart-(A.w_size-Y):0,q=A.window,tt=A.w_mask,Q=A.prev,ot=A.strstart+v,Tt=q[b+X-1],ft=q[b+X];A.prev_length>=A.good_match&&(_>>=2),Z>A.lookahead&&(Z=A.lookahead);do if(q[(z=W)+X]===ft&&q[z+X-1]===Tt&&q[z]===q[b]&&q[++z]===q[b+1]){b+=2,z++;do;while(q[++b]===q[++z]&&q[++b]===q[++z]&&q[++b]===q[++z]&&q[++b]===q[++z]&&q[++b]===q[++z]&&q[++b]===q[++z]&&q[++b]===q[++z]&&q[++b]===q[++z]&&bB&&--_!=0);return X<=A.lookahead?X:A.lookahead}function Ft(A){var W,z,L,_,b,X,Z,B,q,tt,Q=A.w_size;do{if(_=A.window_size-A.lookahead-A.strstart,A.strstart>=Q+(Q-Y)){for(r.arraySet(A.window,A.window,Q,Q,0),A.match_start-=Q,A.strstart-=Q,A.block_start-=Q,W=z=A.hash_size;L=A.head[--W],A.head[W]=Q<=L?L-Q:0,--z;);for(W=z=Q;L=A.prev[--W],A.prev[W]=Q<=L?L-Q:0,--z;);_+=Q}if(A.strm.avail_in===0)break;if(X=A.strm,Z=A.window,B=A.strstart+A.lookahead,q=_,tt=void 0,tt=X.avail_in,q=P)for(b=A.strstart-A.insert,A.ins_h=A.window[b],A.ins_h=(A.ins_h<=P&&(A.ins_h=(A.ins_h<=P)if(L=o._tr_tally(A,A.strstart-A.match_start,A.match_length-P),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=P){for(A.match_length--;A.strstart++,A.ins_h=(A.ins_h<=P&&(A.ins_h=(A.ins_h<=P&&A.match_length<=A.prev_length){for(_=A.strstart+A.lookahead-P,L=o._tr_tally(A,A.strstart-1-A.prev_match,A.prev_length-P),A.lookahead-=A.prev_length-1,A.prev_length-=2;++A.strstart<=_&&(A.ins_h=(A.ins_h<A.pending_buf_size-5&&(z=A.pending_buf_size-5);;){if(A.lookahead<=1){if(Ft(A),A.lookahead===0&&W===d)return R;if(A.lookahead===0)break}A.strstart+=A.lookahead,A.lookahead=0;var L=A.block_start+z;if((A.strstart===0||A.strstart>=L)&&(A.lookahead=A.strstart-L,A.strstart=L,x(A,!1),A.strm.avail_out===0)||A.strstart-A.block_start>=A.w_size-Y&&(x(A,!1),A.strm.avail_out===0))return R}return A.insert=0,W===u?(x(A,!0),A.strm.avail_out===0?$:G):(A.strstart>A.block_start&&(x(A,!1),A.strm.avail_out),R)}),new ut(4,4,8,4,yt),new ut(4,5,16,8,yt),new ut(4,6,32,32,yt),new ut(4,4,16,16,rt),new ut(8,16,32,32,rt),new ut(8,16,128,128,rt),new ut(8,32,128,256,rt),new ut(32,128,258,1024,rt),new ut(32,258,258,4096,rt)],i.deflateInit=function(A,W){return vt(A,W,g,15,8,0)},i.deflateInit2=vt,i.deflateReset=Wt,i.deflateResetKeep=pt,i.deflateSetHeader=function(A,W){return A&&A.state?A.state.wrap!==2?I:(A.state.gzhead=W,f):I},i.deflate=function(A,W){var z,L,_,b;if(!A||!A.state||5>8&255),it(L,L.gzhead.time>>16&255),it(L,L.gzhead.time>>24&255),it(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),it(L,255&L.gzhead.os),L.gzhead.extra&&L.gzhead.extra.length&&(it(L,255&L.gzhead.extra.length),it(L,L.gzhead.extra.length>>8&255)),L.gzhead.hcrc&&(A.adler=c(A.adler,L.pending_buf,L.pending,0)),L.gzindex=0,L.status=69):(it(L,0),it(L,0),it(L,0),it(L,0),it(L,0),it(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),it(L,3),L.status=M);else{var X=g+(L.w_bits-8<<4)<<8;X|=(2<=L.strategy||L.level<2?0:L.level<6?1:L.level===6?2:3)<<6,L.strstart!==0&&(X|=32),X+=31-X%31,L.status=M,J(L,X),L.strstart!==0&&(J(L,A.adler>>>16),J(L,65535&A.adler)),A.adler=1}if(L.status===69)if(L.gzhead.extra){for(_=L.pending;L.gzindex<(65535&L.gzhead.extra.length)&&(L.pending!==L.pending_buf_size||(L.gzhead.hcrc&&L.pending>_&&(A.adler=c(A.adler,L.pending_buf,L.pending-_,_)),V(A),_=L.pending,L.pending!==L.pending_buf_size));)it(L,255&L.gzhead.extra[L.gzindex]),L.gzindex++;L.gzhead.hcrc&&L.pending>_&&(A.adler=c(A.adler,L.pending_buf,L.pending-_,_)),L.gzindex===L.gzhead.extra.length&&(L.gzindex=0,L.status=73)}else L.status=73;if(L.status===73)if(L.gzhead.name){_=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>_&&(A.adler=c(A.adler,L.pending_buf,L.pending-_,_)),V(A),_=L.pending,L.pending===L.pending_buf_size)){b=1;break}b=L.gzindex_&&(A.adler=c(A.adler,L.pending_buf,L.pending-_,_)),b===0&&(L.gzindex=0,L.status=91)}else L.status=91;if(L.status===91)if(L.gzhead.comment){_=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>_&&(A.adler=c(A.adler,L.pending_buf,L.pending-_,_)),V(A),_=L.pending,L.pending===L.pending_buf_size)){b=1;break}b=L.gzindex_&&(A.adler=c(A.adler,L.pending_buf,L.pending-_,_)),b===0&&(L.status=103)}else L.status=103;if(L.status===103&&(L.gzhead.hcrc?(L.pending+2>L.pending_buf_size&&V(A),L.pending+2<=L.pending_buf_size&&(it(L,255&A.adler),it(L,A.adler>>8&255),A.adler=0,L.status=M)):L.status=M),L.pending!==0){if(V(A),A.avail_out===0)return L.last_flush=-1,f}else if(A.avail_in===0&&H(W)<=H(z)&&W!==u)return st(A,-5);if(L.status===666&&A.avail_in!==0)return st(A,-5);if(A.avail_in!==0||L.lookahead!==0||W!==d&&L.status!==666){var Z=L.strategy===2?function(B,q){for(var tt;;){if(B.lookahead===0&&(Ft(B),B.lookahead===0)){if(q===d)return R;break}if(B.match_length=0,tt=o._tr_tally(B,0,B.window[B.strstart]),B.lookahead--,B.strstart++,tt&&(x(B,!1),B.strm.avail_out===0))return R}return B.insert=0,q===u?(x(B,!0),B.strm.avail_out===0?$:G):B.last_lit&&(x(B,!1),B.strm.avail_out===0)?R:D}(L,W):L.strategy===3?function(B,q){for(var tt,Q,ot,Tt,ft=B.window;;){if(B.lookahead<=v){if(Ft(B),B.lookahead<=v&&q===d)return R;if(B.lookahead===0)break}if(B.match_length=0,B.lookahead>=P&&0B.lookahead&&(B.match_length=B.lookahead)}if(B.match_length>=P?(tt=o._tr_tally(B,1,B.match_length-P),B.lookahead-=B.match_length,B.strstart+=B.match_length,B.match_length=0):(tt=o._tr_tally(B,0,B.window[B.strstart]),B.lookahead--,B.strstart++),tt&&(x(B,!1),B.strm.avail_out===0))return R}return B.insert=0,q===u?(x(B,!0),B.strm.avail_out===0?$:G):B.last_lit&&(x(B,!1),B.strm.avail_out===0)?R:D}(L,W):n[L.level].func(L,W);if(Z!==$&&Z!==G||(L.status=666),Z===R||Z===$)return A.avail_out===0&&(L.last_flush=-1),f;if(Z===D&&(W===1?o._tr_align(L):W!==5&&(o._tr_stored_block(L,0,0,!1),W===3&&(nt(L.head),L.lookahead===0&&(L.strstart=0,L.block_start=0,L.insert=0))),V(A),A.avail_out===0))return L.last_flush=-1,f}return W!==u?f:L.wrap<=0?1:(L.wrap===2?(it(L,255&A.adler),it(L,A.adler>>8&255),it(L,A.adler>>16&255),it(L,A.adler>>24&255),it(L,255&A.total_in),it(L,A.total_in>>8&255),it(L,A.total_in>>16&255),it(L,A.total_in>>24&255)):(J(L,A.adler>>>16),J(L,65535&A.adler)),V(A),0=z.w_size&&(b===0&&(nt(z.head),z.strstart=0,z.block_start=0,z.insert=0),q=new r.Buf8(z.w_size),r.arraySet(q,W,tt-z.w_size,z.w_size,0),W=q,tt=z.w_size),X=A.avail_in,Z=A.next_in,B=A.input,A.avail_in=tt,A.next_in=0,A.input=W,Ft(z);z.lookahead>=P;){for(L=z.strstart,_=z.lookahead-(P-1);z.ins_h=(z.ins_h<>>=P=w>>>24,S-=P,(P=w>>>16&255)===0)D[h++]=65535&w;else{if(!(16&P)){if(!(64&P)){w=m[(65535&w)+(g&(1<>>=P,S-=P),S<15&&(g+=R[a++]<>>=P=w>>>24,S-=P,!(16&(P=w>>>16&255))){if(!(64&P)){w=F[(65535&w)+(g&(1<>>=P,S-=P,(P=h-d)>3,g&=(1<<(S-=v<<3))-1,n.next_in=a,n.next_out=h,n.avail_in=a>>24&255)+(O>>>8&65280)+((65280&O)<<8)+((255&O)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function S(O){var M;return O&&O.state?(M=O.state,O.total_in=O.total_out=M.total=0,O.msg="",M.wrap&&(O.adler=1&M.wrap),M.mode=I,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new n.Buf32(E),M.distcode=M.distdyn=new n.Buf32(T),M.sane=1,M.back=-1,u):f}function m(O){var M;return O&&O.state?((M=O.state).wsize=0,M.whave=0,M.wnext=0,S(O)):f}function F(O,M){var R,D;return O&&O.state?(D=O.state,M<0?(R=0,M=-M):(R=1+(M>>4),M<48&&(M&=15)),M&&(M<8||15=G.wsize?(n.arraySet(G.window,M,R-G.wsize,G.wsize,0),G.wnext=0,G.whave=G.wsize):(D<($=G.wsize-G.wnext)&&($=D),n.arraySet(G.window,M,R-D,$,G.wnext),(D-=$)?(n.arraySet(G.window,M,R-D,D,0),G.wnext=D,G.whave=G.wsize):(G.wnext+=$,G.wnext===G.wsize&&(G.wnext=0),G.whave>>8&255,R.check=o(R.check,b,2,0),x=V=0,R.mode=2;break}if(R.flags=0,R.head&&(R.head.done=!1),!(1&R.wrap)||(((255&V)<<8)+(V>>8))%31){O.msg="incorrect header check",R.mode=30;break}if((15&V)!=8){O.msg="unknown compression method",R.mode=30;break}if(x-=4,A=8+(15&(V>>>=4)),R.wbits===0)R.wbits=A;else if(A>R.wbits){O.msg="invalid window size",R.mode=30;break}R.dmax=1<>8&1),512&R.flags&&(b[0]=255&V,b[1]=V>>>8&255,R.check=o(R.check,b,2,0)),x=V=0,R.mode=3;case 3:for(;x<32;){if(H===0)break t;H--,V+=D[G++]<>>8&255,b[2]=V>>>16&255,b[3]=V>>>24&255,R.check=o(R.check,b,4,0)),x=V=0,R.mode=4;case 4:for(;x<16;){if(H===0)break t;H--,V+=D[G++]<>8),512&R.flags&&(b[0]=255&V,b[1]=V>>>8&255,R.check=o(R.check,b,2,0)),x=V=0,R.mode=5;case 5:if(1024&R.flags){for(;x<16;){if(H===0)break t;H--,V+=D[G++]<>>8&255,R.check=o(R.check,b,2,0)),x=V=0}else R.head&&(R.head.extra=null);R.mode=6;case 6:if(1024&R.flags&&(H<(K=R.length)&&(K=H),K&&(R.head&&(A=R.head.extra_len-R.length,R.head.extra||(R.head.extra=new Array(R.head.extra_len)),n.arraySet(R.head.extra,D,G,K,A)),512&R.flags&&(R.check=o(R.check,D,K,G)),H-=K,G+=K,R.length-=K),R.length))break t;R.length=0,R.mode=7;case 7:if(2048&R.flags){if(H===0)break t;for(K=0;A=D[G+K++],R.head&&A&&R.length<65536&&(R.head.name+=String.fromCharCode(A)),A&&K>9&1,R.head.done=!0),O.adler=R.check=0,R.mode=12;break;case 10:for(;x<32;){if(H===0)break t;H--,V+=D[G++]<>>=7&x,x-=7&x,R.mode=27;break}for(;x<3;){if(H===0)break t;H--,V+=D[G++]<>>=1)){case 0:R.mode=14;break;case 1:if(v(R),R.mode=20,M!==6)break;V>>>=2,x-=2;break t;case 2:R.mode=17;break;case 3:O.msg="invalid block type",R.mode=30}V>>>=2,x-=2;break;case 14:for(V>>>=7&x,x-=7&x;x<32;){if(H===0)break t;H--,V+=D[G++]<>>16^65535)){O.msg="invalid stored block lengths",R.mode=30;break}if(R.length=65535&V,x=V=0,R.mode=15,M===6)break t;case 15:R.mode=16;case 16:if(K=R.length){if(H>>=5,x-=5,R.ndist=1+(31&V),V>>>=5,x-=5,R.ncode=4+(15&V),V>>>=4,x-=4,286>>=3,x-=3}for(;R.have<19;)R.lens[X[R.have++]]=0;if(R.lencode=R.lendyn,R.lenbits=7,z={bits:R.lenbits},W=c(0,R.lens,0,19,R.lencode,0,R.work,z),R.lenbits=z.bits,W){O.msg="invalid code lengths set",R.mode=30;break}R.have=0,R.mode=19;case 19:for(;R.have>>16&255,ht=65535&_,!((rt=_>>>24)<=x);){if(H===0)break t;H--,V+=D[G++]<>>=rt,x-=rt,R.lens[R.have++]=ht;else{if(ht===16){for(L=rt+2;x>>=rt,x-=rt,R.have===0){O.msg="invalid bit length repeat",R.mode=30;break}A=R.lens[R.have-1],K=3+(3&V),V>>>=2,x-=2}else if(ht===17){for(L=rt+3;x>>=rt)),V>>>=3,x-=3}else{for(L=rt+7;x>>=rt)),V>>>=7,x-=7}if(R.have+K>R.nlen+R.ndist){O.msg="invalid bit length repeat",R.mode=30;break}for(;K--;)R.lens[R.have++]=A}}if(R.mode===30)break;if(R.lens[256]===0){O.msg="invalid code -- missing end-of-block",R.mode=30;break}if(R.lenbits=9,z={bits:R.lenbits},W=c(h,R.lens,0,R.nlen,R.lencode,0,R.work,z),R.lenbits=z.bits,W){O.msg="invalid literal/lengths set",R.mode=30;break}if(R.distbits=6,R.distcode=R.distdyn,z={bits:R.distbits},W=c(d,R.lens,R.nlen,R.ndist,R.distcode,0,R.work,z),R.distbits=z.bits,W){O.msg="invalid distances set",R.mode=30;break}if(R.mode=20,M===6)break t;case 20:R.mode=21;case 21:if(6<=H&&258<=nt){O.next_out=st,O.avail_out=nt,O.next_in=G,O.avail_in=H,R.hold=V,R.bits=x,a(O,J),st=O.next_out,$=O.output,nt=O.avail_out,G=O.next_in,D=O.input,H=O.avail_in,V=R.hold,x=R.bits,R.mode===12&&(R.back=-1);break}for(R.back=0;ut=(_=R.lencode[V&(1<>>16&255,ht=65535&_,!((rt=_>>>24)<=x);){if(H===0)break t;H--,V+=D[G++]<>pt)])>>>16&255,ht=65535&_,!(pt+(rt=_>>>24)<=x);){if(H===0)break t;H--,V+=D[G++]<>>=pt,x-=pt,R.back+=pt}if(V>>>=rt,x-=rt,R.back+=rt,R.length=ht,ut===0){R.mode=26;break}if(32&ut){R.back=-1,R.mode=12;break}if(64&ut){O.msg="invalid literal/length code",R.mode=30;break}R.extra=15&ut,R.mode=22;case 22:if(R.extra){for(L=R.extra;x>>=R.extra,x-=R.extra,R.back+=R.extra}R.was=R.length,R.mode=23;case 23:for(;ut=(_=R.distcode[V&(1<>>16&255,ht=65535&_,!((rt=_>>>24)<=x);){if(H===0)break t;H--,V+=D[G++]<>pt)])>>>16&255,ht=65535&_,!(pt+(rt=_>>>24)<=x);){if(H===0)break t;H--,V+=D[G++]<>>=pt,x-=pt,R.back+=pt}if(V>>>=rt,x-=rt,R.back+=rt,64&ut){O.msg="invalid distance code",R.mode=30;break}R.offset=ht,R.extra=15&ut,R.mode=24;case 24:if(R.extra){for(L=R.extra;x>>=R.extra,x-=R.extra,R.back+=R.extra}if(R.offset>R.dmax){O.msg="invalid distance too far back",R.mode=30;break}R.mode=25;case 25:if(nt===0)break t;if(K=J-nt,R.offset>K){if((K=R.offset-K)>R.whave&&R.sane){O.msg="invalid distance too far back",R.mode=30;break}Ft=K>R.wnext?(K-=R.wnext,R.wsize-K):R.wnext-K,K>R.length&&(K=R.length),yt=R.window}else yt=$,Ft=st-R.offset,K=R.length;for(ntN?(P=Ft[yt+T[M]],x[it+T[M]]):(P=96,0),g=1<>st)+(S-=g)]=w<<24|P<<16|v|0,S!==0;);for(g=1<>=1;if(g!==0?(V&=g-1,V+=g):V=0,M++,--J[O]==0){if(O===D)break;O=d[u+T[M]]}if($>>7)]}function it(_,b){_.pending_buf[_.pending++]=255&b,_.pending_buf[_.pending++]=b>>>8&255}function J(_,b,X){_.bi_valid>C-X?(_.bi_buf|=b<<_.bi_valid&65535,it(_,_.bi_buf),_.bi_buf=b>>C-_.bi_valid,_.bi_valid+=X-C):(_.bi_buf|=b<<_.bi_valid&65535,_.bi_valid+=X)}function K(_,b,X){J(_,X[2*b],X[2*b+1])}function Ft(_,b){for(var X=0;X|=1&_,_>>>=1,X<<=1,0<--b;);return X>>>1}function yt(_,b,X){var Z,B,q=new Array(T+1),tt=0;for(Z=1;Z<=T;Z++)q[Z]=tt=tt+X[Z-1]<<1;for(B=0;B<=b;B++){var Q=_[2*B+1];Q!==0&&(_[2*B]=Ft(q[Q]++,Q))}}function rt(_){var b;for(b=0;b>1;1<=X;X--)pt(_,q,X);for(B=ot;X=_.heap[1],_.heap[1]=_.heap[_.heap_len--],pt(_,q,1),Z=_.heap[1],_.heap[--_.heap_max]=X,_.heap[--_.heap_max]=Z,q[2*B]=q[2*X]+q[2*Z],_.depth[B]=(_.depth[X]>=_.depth[Z]?_.depth[X]:_.depth[Z])+1,q[2*X+1]=q[2*Z+1]=B,_.heap[1]=B++,pt(_,q,1),2<=_.heap_len;);_.heap[--_.heap_max]=_.heap[1],function(ft,Xt){var Es,oe,ps,Nt,Xs,Yi,fe=Xt.dyn_tree,or=Xt.max_code,Na=Xt.stat_desc.static_tree,_a=Xt.stat_desc.has_stree,Pa=Xt.stat_desc.extra_bits,ar=Xt.stat_desc.extra_base,Cs=Xt.stat_desc.max_length,$s=0;for(Nt=0;Nt<=T;Nt++)ft.bl_count[Nt]=0;for(fe[2*ft.heap[ft.heap_max]+1]=0,Es=ft.heap_max+1;Es>=7;B>>=1)if(1&Tt&&Q.dyn_ltree[2*ot]!==0)return r;if(Q.dyn_ltree[18]!==0||Q.dyn_ltree[20]!==0||Q.dyn_ltree[26]!==0)return o;for(ot=32;ot>>3,(q=_.static_len+3+7>>>3)<=B&&(B=q)):B=q=X+5,X+4<=B&&b!==-1?L(_,b,X,Z):_.strategy===4||q===B?(J(_,2+(Z?1:0),3),Wt(_,Y,O)):(J(_,4+(Z?1:0),3),function(Q,ot,Tt,ft){var Xt;for(J(Q,ot-257,5),J(Q,Tt-1,5),J(Q,ft-4,4),Xt=0;Xt>>8&255,_.pending_buf[_.d_buf+2*_.last_lit+1]=255&b,_.pending_buf[_.l_buf+_.last_lit]=255&X,_.last_lit++,b===0?_.dyn_ltree[2*X]++:(_.matches++,b--,_.dyn_ltree[2*(R[X]+d+1)]++,_.dyn_dtree[2*x(b)]++),_.last_lit===_.lit_bufsize-1},i._tr_align=function(_){J(_,2,3),K(_,S,Y),function(b){b.bi_valid===16?(it(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}(_)}},{"../utils/common":41}],53:[function(e,s,i){s.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,s,i){(function(n){(function(r,o){if(!r.setImmediate){var a,c,h,d,u=1,f={},I=!1,E=r.document,T=Object.getPrototypeOf&&Object.getPrototypeOf(r);T=T&&T.setTimeout?T:r,a={}.toString.call(r.process)==="[object process]"?function(m){process.nextTick(function(){g(m)})}:function(){if(r.postMessage&&!r.importScripts){var m=!0,F=r.onmessage;return r.onmessage=function(){m=!1},r.postMessage("","*"),r.onmessage=F,m}}()?(d="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",S,!1):r.attachEvent("onmessage",S),function(m){r.postMessage(d+m,"*")}):r.MessageChannel?((h=new MessageChannel).port1.onmessage=function(m){g(m.data)},function(m){h.port2.postMessage(m)}):E&&"onreadystatechange"in E.createElement("script")?(c=E.documentElement,function(m){var F=E.createElement("script");F.onreadystatechange=function(){g(m),F.onreadystatechange=null,c.removeChild(F),F=null},c.appendChild(F)}):function(m){setTimeout(g,0,m)},T.setImmediate=function(m){typeof m!="function"&&(m=new Function(""+m));for(var F=new Array(arguments.length-1),y=0;y"u"?n===void 0?this:n:self)}).call(this,typeof Ti<"u"?Ti:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Zo);var ph=Zo.exports;const Kr=Eh(ph);var jo={},xi={};(function(l){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",e=t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",s="["+t+"]["+e+"]*",i=new RegExp("^"+s+"$"),n=function(o,a){const c=[];let h=a.exec(o);for(;h;){const d=[];d.startIndex=a.lastIndex-h[0].length;const u=h.length;for(let f=0;f"u")};l.isExist=function(o){return typeof o<"u"},l.isEmptyObject=function(o){return Object.keys(o).length===0},l.merge=function(o,a,c){if(a){const h=Object.keys(a),d=h.length;for(let u=0;u"&&l[n]!==" "&&l[n]!==" "&&l[n]!==` +`&&l[n]!=="\r";n++)a+=l[n];if(a=a.trim(),a[a.length-1]==="/"&&(a=a.substring(0,a.length-1),n--),!Oh(a)){let d;return a.trim().length===0?d="Invalid space after '<'.":d="Tag '"+a+"' is an invalid name.",_t("InvalidTag",d,Bt(l,n))}const c=gh(l,n);if(c===!1)return _t("InvalidAttr","Attributes for '"+a+"' have open quote.",Bt(l,n));let h=c.value;if(n=c.index,h[h.length-1]==="/"){const d=n-h.length;h=h.substring(0,h.length-1);const u=so(h,t);if(u===!0)s=!0;else return _t(u.err.code,u.err.msg,Bt(l,d+u.err.line))}else if(o)if(c.tagClosed){if(h.trim().length>0)return _t("InvalidTag","Closing tag '"+a+"' can't have attributes or invalid starting.",Bt(l,r));if(e.length===0)return _t("InvalidTag","Closing tag '"+a+"' has not been opened.",Bt(l,r));{const d=e.pop();if(a!==d.tagName){let u=Bt(l,d.tagStartPos);return _t("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+u.line+", col "+u.col+") instead of closing tag '"+a+"'.",Bt(l,r))}e.length==0&&(i=!0)}}else return _t("InvalidTag","Closing tag '"+a+"' doesn't have proper closing.",Bt(l,n));else{const d=so(h,t);if(d!==!0)return _t(d.err.code,d.err.msg,Bt(l,n-h.length+d.err.line));if(i===!0)return _t("InvalidXml","Multiple possible root nodes found.",Bt(l,n));t.unpairedTags.indexOf(a)!==-1||e.push({tagName:a,tagStartPos:r}),s=!0}for(n++;n0)return _t("InvalidXml","Invalid '"+JSON.stringify(e.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return _t("InvalidXml","Start tag expected.",1);return!0};function Jr(l){return l===" "||l===" "||l===` +`||l==="\r"}function to(l,t){const e=t;for(;t5&&s==="xml")return _t("InvalidXml","XML declaration allowed only at the start of the document.",Bt(l,t));if(l[t]=="?"&&l[t+1]==">"){t++;break}else continue}return t}function eo(l,t){if(l.length>t+5&&l[t+1]==="-"&&l[t+2]==="-"){for(t+=3;t"){t+=2;break}}else if(l.length>t+8&&l[t+1]==="D"&&l[t+2]==="O"&&l[t+3]==="C"&&l[t+4]==="T"&&l[t+5]==="Y"&&l[t+6]==="P"&&l[t+7]==="E"){let e=1;for(t+=8;t"&&(e--,e===0))break}else if(l.length>t+9&&l[t+1]==="["&&l[t+2]==="C"&&l[t+3]==="D"&&l[t+4]==="A"&&l[t+5]==="T"&&l[t+6]==="A"&&l[t+7]==="["){for(t+=8;t"){t+=2;break}}return t}const Th='"',mh="'";function gh(l,t){let e="",s="",i=!1;for(;t"&&s===""){i=!0;break}e+=l[t]}return s!==""?!1:{value:e,index:t,tagClosed:i}}const Rh=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function so(l,t){const e=sr.getAllMatches(l,Rh),s={};for(let i=0;i!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(l,t,e){return l}},yh=function(l){return Object.assign({},qo,l)};ir.buildOptions=yh;ir.defaultOptions=qo;class Nh{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}var _h=Nh;const Ph=xi;function Lh(l,t){const e={};if(l[t+3]==="O"&&l[t+4]==="C"&&l[t+5]==="T"&&l[t+6]==="Y"&&l[t+7]==="P"&&l[t+8]==="E"){t=t+9;let s=1,i=!1,n=!1,r="";for(;t"){if(n?l[t-1]==="-"&&l[t-2]==="-"&&(n=!1,s--):s--,s===0)break}else l[t]==="["?i=!0:r+=l[t];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:e,i:t}}function wh(l,t){let e="";for(;t0&&i&&e[2]!==".")return l;if(!t.leadingZeros&&n.length>0&&!i&&e[1]!==".")return l;{const a=Number(e),c=""+a;return c.search(/[eE]/)!==-1||o?t.eNotation?a:l:e.indexOf(".")!==-1?c==="0"&&r===""||c===r||i&&c==="-"+r?a:l:n?r===c||i+r===c?a:l:e===c||e===i+c?a:l}}else return l}}function kh(l){return l&&l.indexOf(".")!==-1&&(l=l.replace(/0+$/,""),l==="."?l="0":l[0]==="."?l="0"+l:l[l.length-1]==="."&&(l=l.substr(0,l.length-1))),l}var Hh=Gh;const Qo=xi,vs=_h,Wh=Bh,Xh=Hh;let $h=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,s)=>String.fromCharCode(Number.parseInt(s,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,s)=>String.fromCharCode(Number.parseInt(s,16))}},this.addExternalEntities=Zh,this.parseXml=Jh,this.parseTextData=jh,this.resolveNameSpace=qh,this.buildAttributesMap=Kh,this.isItStopNode=iu,this.replaceEntitiesValue=eu,this.readStopNodeData=ru,this.saveTextToParentTag=su,this.addChild=tu}};function Zh(l){const t=Object.keys(l);for(let e=0;e0)){r||(l=this.replaceEntitiesValue(l));const o=this.options.tagValueProcessor(t,l,e,i,n);return o==null?l:typeof o!=typeof l||o!==l?o:this.options.trimValues?On(l,this.options.parseTagValue,this.options.numberParseOptions):l.trim()===l?On(l,this.options.parseTagValue,this.options.numberParseOptions):l}}function qh(l){if(this.options.removeNSPrefix){const t=l.split(":"),e=l.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(l=e+t[1])}return l}const Qh=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Kh(l,t,e){if(!this.options.ignoreAttributes&&typeof l=="string"){const s=Qo.getAllMatches(l,Qh),i=s.length,n={};for(let r=0;r",n,"Closing Tag is not closed.");let a=l.substring(n+2,o).trim();if(this.options.removeNSPrefix){const d=a.indexOf(":");d!==-1&&(a=a.substr(d+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),e&&(s=this.saveTextToParentTag(s,e,i));const c=i.substring(i.lastIndexOf(".")+1);if(a&&this.options.unpairedTags.indexOf(a)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let h=0;c&&this.options.unpairedTags.indexOf(c)!==-1?(h=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):h=i.lastIndexOf("."),i=i.substring(0,h),e=this.tagsNodeStack.pop(),s="",n=o}else if(l[n+1]==="?"){let o=Sn(l,n,!1,"?>");if(!o)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,e,i),!(this.options.ignoreDeclaration&&o.tagName==="?xml"||this.options.ignorePiTags)){const a=new vs(o.tagName);a.add(this.options.textNodeName,""),o.tagName!==o.tagExp&&o.attrExpPresent&&(a[":@"]=this.buildAttributesMap(o.tagExp,i,o.tagName)),this.addChild(e,a,i)}n=o.closeIndex+1}else if(l.substr(n+1,3)==="!--"){const o=Ye(l,"-->",n+4,"Comment is not closed.");if(this.options.commentPropName){const a=l.substring(n+4,o-2);s=this.saveTextToParentTag(s,e,i),e.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}n=o}else if(l.substr(n+1,2)==="!D"){const o=Wh(l,n);this.docTypeEntities=o.entities,n=o.i}else if(l.substr(n+1,2)==="!["){const o=Ye(l,"]]>",n,"CDATA is not closed.")-2,a=l.substring(n+9,o);s=this.saveTextToParentTag(s,e,i);let c=this.parseTextData(a,e.tagname,i,!0,!1,!0,!0);c==null&&(c=""),this.options.cdataPropName?e.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]):e.add(this.options.textNodeName,c),n=o+2}else{let o=Sn(l,n,this.options.removeNSPrefix),a=o.tagName;const c=o.rawTagName;let h=o.tagExp,d=o.attrExpPresent,u=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),e&&s&&e.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,e,i,!1));const f=e;if(f&&this.options.unpairedTags.indexOf(f.tagname)!==-1&&(e=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),a!==t.tagname&&(i+=i?"."+a:a),this.isItStopNode(this.options.stopNodes,i,a)){let I="";if(h.length>0&&h.lastIndexOf("/")===h.length-1)a[a.length-1]==="/"?(a=a.substr(0,a.length-1),i=i.substr(0,i.length-1),h=a):h=h.substr(0,h.length-1),n=o.closeIndex;else if(this.options.unpairedTags.indexOf(a)!==-1)n=o.closeIndex;else{const T=this.readStopNodeData(l,c,u+1);if(!T)throw new Error(`Unexpected end of ${c}`);n=T.i,I=T.tagContent}const E=new vs(a);a!==h&&d&&(E[":@"]=this.buildAttributesMap(h,i,a)),I&&(I=this.parseTextData(I,a,i,!0,d,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),E.add(this.options.textNodeName,I),this.addChild(e,E,i)}else{if(h.length>0&&h.lastIndexOf("/")===h.length-1){a[a.length-1]==="/"?(a=a.substr(0,a.length-1),i=i.substr(0,i.length-1),h=a):h=h.substr(0,h.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const I=new vs(a);a!==h&&d&&(I[":@"]=this.buildAttributesMap(h,i,a)),this.addChild(e,I,i),i=i.substr(0,i.lastIndexOf("."))}else{const I=new vs(a);this.tagsNodeStack.push(e),a!==h&&d&&(I[":@"]=this.buildAttributesMap(h,i,a)),this.addChild(e,I,i),e=I}s="",n=u}}else s+=l[n];return t.child};function tu(l,t,e){const s=this.options.updateTag(t.tagname,e,t[":@"]);s===!1||(typeof s=="string"&&(t.tagname=s),l.addChild(t))}const eu=function(l){if(this.options.processEntities){for(let t in this.docTypeEntities){const e=this.docTypeEntities[t];l=l.replace(e.regx,e.val)}for(let t in this.lastEntities){const e=this.lastEntities[t];l=l.replace(e.regex,e.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const e=this.htmlEntities[t];l=l.replace(e.regex,e.val)}l=l.replace(this.ampEntity.regex,this.ampEntity.val)}return l};function su(l,t,e,s){return l&&(s===void 0&&(s=Object.keys(t.child).length===0),l=this.parseTextData(l,t.tagname,e,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,s),l!==void 0&&l!==""&&t.add(this.options.textNodeName,l),l=""),l}function iu(l,t,e){const s="*."+e;for(const i in l){const n=l[i];if(s===n||t===n)return!0}return!1}function nu(l,t,e=">"){let s,i="";for(let n=t;n",e,`${t} is not closed`);if(l.substring(e+2,n).trim()===t&&(i--,i===0))return{tagContent:l.substring(s,e),i:n};e=n}else if(l[e+1]==="?")e=Ye(l,"?>",e+1,"StopNode is not closed.");else if(l.substr(e+1,3)==="!--")e=Ye(l,"-->",e+3,"StopNode is not closed.");else if(l.substr(e+1,2)==="![")e=Ye(l,"]]>",e,"StopNode is not closed.")-2;else{const n=Sn(l,e,">");n&&((n&&n.tagName)===t&&n.tagExp[n.tagExp.length-1]!=="/"&&i++,e=n.closeIndex)}}function On(l,t,e){if(t&&typeof l=="string"){const s=l.trim();return s==="true"?!0:s==="false"?!1:Xh(l,e)}else return Qo.isExist(l)?l:""}var ou=$h,Ko={};function au(l,t){return Jo(l,t)}function Jo(l,t,e){let s;const i={};for(let n=0;n0&&(i[t.textNodeName]=s):s!==void 0&&(i[t.textNodeName]=s),i}function cu(l){const t=Object.keys(l);for(let e=0;e`);let e=null;this.modifiedDate&&(e=`${this.modifiedDate.toISOString()}`);let s=null;return this.modifiedAuthor&&(s=`${this.modifiedAuthor}`),` + + ${this.date.toISOString()} + ${this.author} + ${this.comment} + ${t??""} + ${s??""} + ${e??""} + + `}}const ea=class ye{constructor(t){p(this,"guid",Re.create()),p(this,"title",ye.default.title),p(this,"creationDate",new Date),p(this,"creationAuthor",""),p(this,"viewpoints",new we),p(this,"relatedTopics",new we),p(this,"comments",new re),p(this,"customData",{}),p(this,"description"),p(this,"serverAssignedId"),p(this,"dueDate"),p(this,"modifiedAuthor"),p(this,"modifiedDate"),p(this,"index"),p(this,"_type",ye.default.type),p(this,"_status",ye.default.status),p(this,"_priority",ye.default.priority),p(this,"_stage",ye.default.stage),p(this,"_assignedTo",ye.default.assignedTo),p(this,"_labels",ye.default.labels??new Set),p(this,"_components"),this._components=t;const e=t.get(Yt);this.creationAuthor=e.config.author,this.relatedTopics.guard=s=>s!==this.guid}set type(t){const e=this._components.get(Yt),{strict:s,types:i}=e.config;(!s||i.has(t))&&(this._type=t)}get type(){return this._type}set status(t){const e=this._components.get(Yt),{strict:s,statuses:i}=e.config;(!s||i.has(t))&&(this._status=t)}get status(){return this._status}set priority(t){const e=this._components.get(Yt);if(t){const{strict:s,priorities:i}=e.config;if(!(s?i.has(t):!0))return;this._priority=t}else this._priority=t}get priority(){return this._priority}set stage(t){const e=this._components.get(Yt);if(t){const{strict:s,stages:i}=e.config;if(!(s?i.has(t):!0))return;this._stage=t}else this._stage=t}get stage(){return this._stage}set assignedTo(t){const e=this._components.get(Yt);if(t){const{strict:s,users:i}=e.config;if(!(s?i.has(t):!0))return;this._assignedTo=t}else this._assignedTo=t}get assignedTo(){return this._assignedTo}set labels(t){const e=this._components.get(Yt),{strict:s,labels:i}=e.config;if(s){const n=new Set;for(const r of t)(!s||i.has(r))&&n.add(r);this._labels=n}else this._labels=t}get labels(){return this._labels}get _managerVersion(){return this._components.get(Yt).config.version}set(t){const e=t,s=this;for(const n in t){if(n==="guid")continue;const r=e[n];n in this&&(s[n]=r)}return this._components.get(Yt).list.set(this.guid,this),this}createComment(t,e){const s=new yn(this._components,t);return s.viewpoint=e,s.topic=this,this.comments.set(s.guid,s),s}createLabelTags(t=this._managerVersion){let e="Labels";t==="2.1"&&(e="Labels"),t==="3"&&(e="Label");let s=[...this.labels].map(i=>`<${e}>${i}`).join(` +`);for(const i in this.customData){const n=this.customData[i];typeof n=="string"&&(s+=` +<${e}>${n}`)}return t==="2.1"?s:t==="3"?s.length!==0?` +${s} +`:"":s}createCommentTags(t=this._managerVersion){const e=[...this.comments.values()].map(s=>s.serialize()).join(` +`);return t==="2.1"?e:t==="3"?e.length!==0?` +${e} +`:"":e}createViewpointTags(t=this._managerVersion){let e="Viewpoints";t==="2.1"&&(e="Viewpoints"),t==="3"&&(e="ViewPoint");const s=this._components.get(pe),n=[...this.viewpoints].map(r=>s.list.get(r)).filter(r=>r).map(r=>`<${e} Guid="${r.guid}"> + ${r.guid}.bcfv + ${r.guid}.jpeg + + `).join(` +`);return t==="2.1"?n:t==="3"?n.length!==0?` +${n} +`:"":n}createRelatedTopicTags(t=this._managerVersion){const e=[...this.relatedTopics].map(s=>` + `).join(` +`);return t==="2.1"?e:t==="3"?e.length!==0?` +${e} +`:"":e}serialize(){const t=this._managerVersion;let e=null;this.serverAssignedId&&(e=`ServerAssignedId="${this.serverAssignedId}"`);let s=null;this.priority&&(s=`${this.priority}`);let i=null;this.index&&t==="2.1"&&(i=`${this.index}`);let n=null;this.modifiedDate&&(n=`${this.modifiedDate.toISOString()}`);let r=null;this.modifiedAuthor&&(r=`${this.modifiedAuthor}`);let o=null;this.dueDate&&(o=`${this.dueDate.toISOString()}`);let a=null;this.assignedTo&&(a=`${this.assignedTo}`);let c=null;this.description&&(c=`${this.description}`);let h=null;this.stage&&(h=`${this.stage}`);const d=this.createCommentTags(t),u=this.createViewpointTags(t),f=this.createLabelTags(t),I=this.createRelatedTopicTags(t);return` + + + + ${this.title} + ${this.creationDate.toISOString()} + ${this.creationAuthor} + ${s??""} + ${i??""} + ${n??""} + ${r??""} + ${o??""} + ${a??""} + ${c??""} + ${h??""} + ${f} + ${I} + ${t==="3"?d:""} + ${t==="3"?u:""} + + ${t==="2.1"?d:""} + ${t==="2.1"?u:""} + + `}};p(ea,"default",{title:"BCF Topic",type:"Issue",status:"Active"});let io=ea;const Tu=(l,t)=>{if(t.trim()==="")return;const e=Yt.xmlParser.parse(t).Extensions;if(!e)return;const{Priorities:s,TopicStatuses:i,TopicTypes:n,Users:r}=e;if(s&&s.Priority){const o=Array.isArray(s.Priority)?s.Priority:[s.Priority];for(const a of o)l.config.priorities.add(a)}if(i&&i.TopicStatus){const o=Array.isArray(i.TopicStatus)?i.TopicStatus:[i.TopicStatus];for(const a of o)l.config.statuses.add(a)}if(n&&n.TopicType){const o=Array.isArray(n.TopicType)?n.TopicType:[n.TopicType];for(const a of o)l.config.types.add(a)}if(r&&r.User){const o=Array.isArray(r.User)?r.User:[r.User];for(const a of o)l.config.users.add(a)}};class mu extends ke{constructor(){super(...arguments),p(this,"_config",{version:{type:"Select",options:new Set(["2.1","3"]),multiple:!1,value:""},author:{type:"Text",value:""},types:{type:"TextSet",value:new Set},statuses:{type:"TextSet",value:new Set},priorities:{type:"TextSet",value:new Set},labels:{type:"TextSet",value:new Set},stages:{type:"TextSet",value:new Set},users:{type:"TextSet",value:new Set},includeSelectionTag:{type:"Boolean",value:!1},updateExtensionsOnImport:{type:"Boolean",value:!1},strict:{type:"Boolean",value:!1},includeAllExtensionsOnExport:{type:"Boolean",value:!1},fallbackVersionOnImport:{type:"Select",multiple:!1,options:new Set(["2.1","3"]),value:""},ignoreIncompleteTopicsOnImport:{type:"Boolean",value:!1}})}get version(){return this._config.version.value}set version(t){this._config.version.value=t}get author(){return this._config.author.value}set author(t){this._config.author.value=t}get types(){return this._config.types.value}set types(t){this._config.types.value=t}get statuses(){return this._config.statuses.value}set statuses(t){this._config.statuses.value=t}get priorities(){return this._config.priorities.value}set priorities(t){this._config.priorities.value=t}get labels(){return this._config.labels.value}set labels(t){this._config.labels.value=t}get stages(){return this._config.stages.value}set stages(t){this._config.stages.value=t}get users(){return this._config.users.value}set users(t){this._config.users.value=t}get includeSelectionTag(){return this._config.includeSelectionTag.value}set includeSelectionTag(t){this._config.includeSelectionTag.value=t}get updateExtensionsOnImport(){return this._config.updateExtensionsOnImport.value}set updateExtensionsOnImport(t){this._config.updateExtensionsOnImport.value=t}get strict(){return this._config.strict.value}set strict(t){this._config.strict.value=t}get includeAllExtensionsOnExport(){return this._config.includeAllExtensionsOnExport.value}set includeAllExtensionsOnExport(t){this._config.includeAllExtensionsOnExport.value=t}get fallbackVersionOnImport(){return this._config.fallbackVersionOnImport.value}set fallbackVersionOnImport(t){this._config.fallbackVersionOnImport.value=t}get ignoreIncompleteTopicsOnImport(){return this._config.ignoreIncompleteTopicsOnImport.value}set ignoreIncompleteTopicsOnImport(t){this._config.ignoreIncompleteTopicsOnImport.value=t}}const nr=class Us extends At{constructor(){super(...arguments),p(this,"enabled",!1),p(this,"_defaultConfig",{author:"jhon.doe@example.com",version:"2.1",types:new Set(["Clash","Failure","Fault","Inquiry","Issue","Remark","Request"]),statuses:new Set(["Active","In Progress","Done","In Review","Closed"]),priorities:new Set(["On hold","Minor","Normal","Major","Critical"]),labels:new Set,stages:new Set,users:new Set,includeSelectionTag:!1,updateExtensionsOnImport:!0,strict:!1,includeAllExtensionsOnExport:!0,fallbackVersionOnImport:"2.1",ignoreIncompleteTopicsOnImport:!1}),p(this,"config",new mu(this,this.components,"BCF Topics",Us.uuid)),p(this,"list",new re),p(this,"onSetup",new j),p(this,"isSetup",!1),p(this,"onBCFImported",new j),p(this,"onDisposed",new j)}setup(t){if(this.isSetup)return;const e={...this._defaultConfig,...t};this.config.version=e.version,this.config.author=e.author,this.config.types=e.types,this.config.statuses=e.statuses,this.config.priorities=e.priorities,this.config.labels=e.labels,this.config.stages=e.stages,this.config.users=e.users,this.config.includeSelectionTag=e.includeSelectionTag,this.config.updateExtensionsOnImport=e.updateExtensionsOnImport,this.config.strict=e.strict,this.config.includeAllExtensionsOnExport=e.includeAllExtensionsOnExport,this.config.fallbackVersionOnImport=e.fallbackVersionOnImport||"",this.config.ignoreIncompleteTopicsOnImport=e.ignoreIncompleteTopicsOnImport,this.isSetup=!0,this.enabled=!0,this.onSetup.trigger()}create(t){const e=new io(this.components);return t?(e.guid=t.guid??e.guid,e.set(t)):this.list.set(e.guid,e),e}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get usedTypes(){const t=[...this.list].map(([e,s])=>s.type);return new Set(t)}get usedStatuses(){const t=[...this.list].map(([e,s])=>s.status);return new Set(t)}get usedPriorities(){const t=[...this.list].map(([e,s])=>s.priority).filter(e=>e);return new Set(t)}get usedStages(){const t=[...this.list].map(([e,s])=>s.stage).filter(e=>e);return new Set(t)}get usedUsers(){const t=[];for(const[e,s]of this.list){t.push(s.creationAuthor),s.assignedTo&&t.push(s.assignedTo),s.modifiedAuthor&&t.push(s.modifiedAuthor);for(const[i,n]of s.comments)t.push(n.author),n.modifiedAuthor&&t.push(n.modifiedAuthor)}return new Set(t)}get usedLabels(){const t=[];for(const[e,s]of this.list)t.push(...s.labels);return new Set(t)}updateExtensions(){for(const[t,e]of this.list){for(const s of e.labels)this.config.labels.add(s);this.config.types.add(e.type),e.priority&&this.config.priorities.add(e.priority),e.stage&&this.config.stages.add(e.stage),this.config.statuses.add(e.status),this.config.users.add(e.creationAuthor),e.assignedTo&&this.config.users.add(e.assignedTo),e.modifiedAuthor&&this.config.users.add(e.modifiedAuthor);for(const[s,i]of e.comments)this.config.users.add(i.author),i.modifiedAuthor&&this.config.users.add(i.modifiedAuthor)}}updateViewpointReferences(){const t=this.components.get(pe);for(const[e,s]of this.list)for(const i of s.viewpoints)t.list.has(i)||s.viewpoints.delete(i)}async export(t=this.list.values()){const e=new Kr;e.file("bcf.version",` + + `),e.file("bcf.extensions",this.serializeExtensions());const i=await(await fetch("https://thatopen.github.io/engine_components/resources/favicon.ico")).arrayBuffer(),n=this.components.get(pe);for(const o of t){const a=e.folder(o.guid);a.file("markup.bcf",o.serialize());for(const c of o.viewpoints){const h=n.list.get(c);h&&(a.file(`${c}.jpeg`,i,{binary:!0}),a.file(`${c}.bcfv`,await h.serialize()))}}return await e.generateAsync({type:"blob"})}serializeExtensions(){const t=[...this.config.types].map(o=>`${o}`).join(` +`),e=[...this.config.statuses].map(o=>`${o}`).join(` +`),s=[...this.config.priorities].map(o=>`${o}`).join(` +`),i=[...this.config.labels].map(o=>`${o}`).join(` +`),n=[...this.config.stages].map(o=>`${o}`).join(` +`),r=[...this.config.users].map(o=>`${o}`).join(` +`);return` + + + ${t.length!==0?` +${t} +`:""} + ${e.length!==0?` +${e} +`:""} + ${s.length!==0?` +${s} +`:""} + ${i.length!==0?` +${i} +`:""} + ${n.length!==0?` +${n} +`:""} + ${r.length!==0?` +${r} +`:""} + + `}processMarkupComment(t){const{Guid:e,Date:s,Author:i,Comment:n,Viewpoint:r}=t;if(!(e&&s&&i&&(yn||r)))return null;const o=this.components.get(pe),a=new yn(this.components,n??"");return a.guid=e,a.date=new Date(s),a.author=i,a.viewpoint=r!=null&&r.Guid?o.list.get(r.Guid):void 0,a.modifiedAuthor=t.ModifiedAuthor,a.modifiedDate=t.ModifiedDate?new Date(t.ModifiedDate):void 0,a}getMarkupComments(t,e){var s;let i;if(e==="2.1"&&(i=t.Comment),e==="3"&&(i=(s=t.Topic.Comments)==null?void 0:s.Comment),!i)return[];i=Array.isArray(i)?i:[i];const n=i.map(o=>this.processMarkupComment(o)).filter(o=>o);return Array.isArray(n)?n:[n]}getMarkupLabels(t,e){var s;let i;return e==="2.1"&&(i=t.Topic.Labels),e==="3"&&(i=(s=t.Topic.Labels)==null?void 0:s.Label),i?Array.isArray(i)?i:[i]:[]}getMarkupViewpoints(t,e){var s;let i;return e==="2.1"&&(i=t.Viewpoints),e==="3"&&(i=(s=t.Topic.Viewpoints)==null?void 0:s.ViewPoint),i?(i=Array.isArray(i)?i:[i],i):[]}getMarkupRelatedTopics(t,e){var s;let i;return e==="2.1"&&(i=t.Topic.RelatedTopic),e==="3"&&(i=(s=t.Topic.RelatedTopics)==null?void 0:s.RelatedTopic),i?(Array.isArray(i)?i:[i]).map(r=>r.Guid):[]}async load(t,e){var s;const{fallbackVersionOnImport:i,ignoreIncompleteTopicsOnImport:n,updateExtensionsOnImport:r}=this.config,o=new Kr;await o.loadAsync(t);const a=Object.values(o.files);let c=i;const h=a.find(g=>g.name.endsWith(".version"));if(h){const g=await h.async("string"),S=Us.xmlParser.parse(g).Version.VersionId;c=String(S)}if(!(c&&(c==="2.1"||c==="3")))throw new Error(`BCFTopics: ${c} is not supported.`);const d=a.find(g=>g.name.endsWith(".extensions"));if(r&&d){const g=await d.async("string");Tu(this,g)}const u=[],f=this.components.get(pe),I=a.filter(g=>g.name.endsWith(".bcfv"));for(const g of I){const S=await g.async("string"),m=Us.xmlParser.parse(S).VisualizationInfo;if(!m){console.warn("Missing VisualizationInfo in Viewpoint");continue}const F={},{Guid:y,ClippingPlanes:N,Components:w,OrthogonalCamera:P,PerspectiveCamera:v}=m;if(y&&(F.guid=y),w){const{Selection:O,Visibility:M}=w;if(O&&O.Component){const D=Array.isArray(O.Component)?O.Component:[O.Component];F.selectionComponents=D.map($=>$.IfcGuid).filter($=>$)}if(M&&"DefaultVisibility"in M&&(F.defaultVisibility=M.DefaultVisibility),M&&M.Exceptions&&"Component"in M.Exceptions){const{Component:D}=M.Exceptions,$=Array.isArray(D)?D:[D];F.exceptionComponents=$.map(G=>G.IfcGuid).filter(G=>G)}let R;c==="2.1"&&(R=w.ViewSetupHints),c==="3"&&(R=(s=w.Visibility)==null?void 0:s.ViewSetupHints),R&&("OpeningsVisible"in R&&(F.openingsVisible=R.OpeningsVisible),"SpacesVisible"in R&&(F.spacesVisible=R.SpacesVisible),"SpaceBoundariesVisible"in R&&(F.spaceBoundariesVisible=R.SpaceBoundariesVisible))}if(P||v){const O=m.PerspectiveCamera??m.OrthogonalCamera,{CameraViewPoint:M,CameraDirection:R}=O,D=new U(Number(M.X),Number(M.Z),Number(-M.Y)),$=new U(Number(R.X),Number(R.Z),Number(-R.Y)),G={position:{x:D.x,y:D.y,z:D.z},direction:{x:$.x,y:$.y,z:$.z},aspectRatio:"AspectRatio"in O?O.AspectRatio:1};"ViewToWorldScale"in O&&(F.camera={...G,viewToWorldScale:O.ViewToWorldScale}),"FieldOfView"in O&&(F.camera={...G,fov:O.FieldOfView})}const Y=new Ra(this.components,e,{data:F,setCamera:!1});if(w){const{Coloring:O}=w;if(O&&O.Color){const M=Array.isArray(O.Color)?O.Color:[O.Color];for(const R of M){const{Color:D,Component:$}=R,st=(Array.isArray($)?$:[$]).map(H=>H.IfcGuid);Y.componentColors.set(D,st)}}}if(u.push(Y),N){const O=this.components.get(sh),M=Array.isArray(N.ClippingPlane)?N.ClippingPlane:[N.ClippingPlane];for(const R of M){const{Location:D,Direction:$}=R;if(!(D&&$))continue;const G=new U(D.X,D.Z,-D.Y),st=new U($.X,-$.Z,$.Y),H=O.createFromNormalAndCoplanarPoint(e,st,G);H.visible=!1,H.enabled=!1,Y.clippingPlanes.add(H)}}}const E={},T=[],C=a.filter(g=>g.name.endsWith(".bcf"));for(const g of C){const S=await g.async("string"),m=Us.xmlParser.parse(S).Markup,F=m.Topic,{Guid:y,TopicType:N,TopicStatus:w,Title:P,CreationDate:v,CreationAuthor:Y}=F;if(n&&!(y&&N&&w&&P&&v&&Y))continue;const O=new io(this.components);O.guid=y??O.guid;const M=this.getMarkupRelatedTopics(m,c);E[O.guid]=new Set(M),O.type=N??O.type,O.status=w??O.status,O.title=P??O.title,O.creationDate=v?new Date(v):O.creationDate,O.creationAuthor=Y??O.creationAuthor,O.serverAssignedId=F.ServerAssignedId,O.priority=F.Priority,O.index=F.Index,O.modifiedDate=F.ModifiedDate?new Date(F.ModifiedDate):void 0,O.modifiedAuthor=F.ModifiedAuthor,O.dueDate=F.DueDate?new Date(F.DueDate):void 0,O.assignedTo=F.AssignedTo,O.description=F.Description,O.stage=F.Stage;const R=this.getMarkupLabels(m,c);for(const G of R)O.labels.add(G);const D=this.getMarkupComments(m,c);for(const G of D)O.comments.set(G.guid,G);const $=this.getMarkupViewpoints(m,c);for(const G of $){if(!(G&&G.Guid))continue;const st=f.list.get(G.Guid);st&&O.viewpoints.add(st.guid)}this.list.set(O.guid,O),T.push(O)}for(const g in E){const S=this.list.get(g);if(!S)continue;const m=E[g];for(const F of m)S.relatedTopics.add(F)}return this.onBCFImported.trigger(T),{viewpoints:u,topics:T}}};p(nr,"uuid","de977976-e4f6-4e4f-a01a-204727839802");p(nr,"xmlParser",new ta.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let Yt=nr;const sa=class Ee extends At{constructor(t){super(t),p(this,"enabled",!0),p(this,"onDisposed",new j),p(this,"_absoluteMin"),p(this,"_absoluteMax"),p(this,"_meshes",[]),this.components.add(Ee.uuid,this),this._absoluteMin=Ee.newBound(!0),this._absoluteMax=Ee.newBound(!1)}static getDimensions(t){const{min:e,max:s}=t,i=Math.abs(s.x-e.x),n=Math.abs(s.y-e.y),r=Math.abs(s.z-e.z),o=new U;return o.subVectors(s,e).divideScalar(2).add(e),{width:i,height:n,depth:r,center:o}}static newBound(t){const e=t?1:-1;return new U(e*Number.MAX_VALUE,e*Number.MAX_VALUE,e*Number.MAX_VALUE)}static getBounds(t,e,s){const i=s||this.newBound(!1),n=e||this.newBound(!0);for(const r of t)r.xi.x&&(i.x=r.x),r.y>i.y&&(i.y=r.y),r.z>i.z&&(i.z=r.z);return new wt(e,s)}dispose(){const t=this.components.get(fs);for(const e of this._meshes)t.destroy(e);this._meshes=[],this.onDisposed.trigger(Ee.uuid),this.onDisposed.reset()}get(){const t=this._absoluteMin.clone(),e=this._absoluteMax.clone();return new wt(t,e)}getSphere(){const t=this._absoluteMin.clone(),e=this._absoluteMax.clone(),s=Math.abs((e.x-t.x)/2),i=Math.abs((e.y-t.y)/2),n=Math.abs((e.z-t.z)/2),r=new U(t.x+s,t.y+i,t.z+n),o=r.distanceTo(t);return new Li(r,o)}getMesh(){const t=new wt(this._absoluteMin,this._absoluteMax),e=Ee.getDimensions(t),{width:s,height:i,depth:n,center:r}=e,o=new Dt(s,i,n),a=new et(o);return this._meshes.push(a),a.position.copy(r),a}reset(){this._absoluteMin=Ee.newBound(!0),this._absoluteMax=Ee.newBound(!1)}add(t){for(const e of t.items)this.addMesh(e.mesh)}addMesh(t,e){if(!t.geometry.index)return;const s=Ee.getFragmentBounds(t);t.updateMatrixWorld();const i=t.matrixWorld,n=new It,r=t instanceof Ve,o=new Set;if(t instanceof qa){e||(e=t.fragment.ids);for(const a of e){const c=t.fragment.getInstancesIDs(a);if(c)for(const h of c)o.add(h)}}else o.add(0);for(const a of o){const c=s.min.clone(),h=s.max.clone();r&&(t.getMatrixAt(a,n),c.applyMatrix4(n),h.applyMatrix4(n)),c.applyMatrix4(i),h.applyMatrix4(i),c.xthis._absoluteMax.x&&(this._absoluteMax.x=c.x),c.y>this._absoluteMax.y&&(this._absoluteMax.y=c.y),c.z>this._absoluteMax.z&&(this._absoluteMax.z=c.z),h.x>this._absoluteMax.x&&(this._absoluteMax.x=h.x),h.y>this._absoluteMax.y&&(this._absoluteMax.y=h.y),h.z>this._absoluteMax.z&&(this._absoluteMax.z=h.z),h.xr.x&&(r.x=h),d>r.y&&(r.y=d),u>r.z&&(r.z=u)}return new wt(n,r)}};p(sa,"uuid","d1444724-dba6-4cdd-a0c7-68ee1450d166");let gu=sa;const ia=class na extends At{constructor(t){super(t),p(this,"enabled",!0),t.add(na.uuid,this)}async getIsolatedElements(t,e,s){const i=new Set;function n(a){if(i.has(a))return;const c=t.GetLine(e,a);if(c){i.add(a);for(const h in c){const d=c[h];d&&d.constructor.name==="Handle"&&d.value>0?n(d.value):Array.isArray(d)&&d.forEach(u=>{u&&u.constructor.name==="Handle"&&u.value>0&&n(u.value)})}}}for(const a of s)n(a);const r=[];for(const a of i)r.push(a);r.sort((a,c)=>a-c);const o=[];return r.forEach(a=>{const c=t.GetLine(e,a);o.push(c)}),o}async export(t,e,s){return s.forEach(n=>{t.WriteLine(e,n)}),t.SaveModel(e)}async splitIfc(t,e,s){const i=new Uint8Array(e),n=t.OpenModel(i),r=await this.getIsolatedElements(t,n,s),o=t.CreateModel({schema:Qa.IFC2X3});return await this.export(t,o,r)}};p(ia,"uuid","6eb0ba2f-71c0-464e-bcec-2d7c335186b2");let ku=ia;const ra=class oa{constructor(t){p(this,"onProgress",new j),p(this,"inclusive",!1),p(this,"rules",[]),p(this,"ids",{}),p(this,"needsUpdate",new Map),p(this,"components"),this.components=t}static import(t,e){const s=oa.importers.get(e.type);return s?s(t,e):(console.warn("Invalid query data:.",e),null)}static importRules(t){const e=[];for(const s of t){const i={};for(const n in s){const r=s[n];r.regexp?i[n]=new RegExp(r.value):i[n]=r}e.push(i)}return e}static importIds(t){const e={};for(const s in t.ids)e[s]=new Set(t.ids[s]);return e}clear(t){if(t===void 0){this.ids={},this.needsUpdate.clear();return}delete this.ids[t],this.needsUpdate.delete(t)}addID(t,e){this.ids[t]||(this.ids[t]=new Set),this.ids[t].add(e)}getData(){const t={};for(const s in this.ids)t[s]=Array.from(this.ids[s]);const e=this.exportRules();return{name:this.name,inclusive:this.inclusive,type:"IfcFinderQuery",ids:t,rules:e}}exportRules(){const t=[];for(const e of this.rules){const s={};for(const i in e){const n=e[i];n instanceof RegExp?s[i]={regexp:!0,value:n.source}:s[i]=n}t.push(s)}return t}findInFile(t,e){return new Promise(s=>{const i=new FileReader,n=new TextDecoder("utf-8"),r=1e4*1024,o=1e3;let a=0;const c=/;/,h=()=>{if(a>=e.size){s();return}const d=Math.min(a+r+o,e.size),u=e.slice(a,d);i.readAsArrayBuffer(u)};i.onload=()=>{if(!(i.result instanceof ArrayBuffer))return;const d=new Uint8Array(i.result),f=n.decode(d).split(c);f.shift(),this.findInLines(t,f),this.onProgress.trigger(a/e.size),a+=r,h()},h()})}getIdFromLine(t){const e=t.slice(t.indexOf("#")+1,t.indexOf("="));return parseInt(e,10)}testRules(t){let e=null,s=null,i=null,n=!1;for(const r of this.rules){if(r.type==="category"){if(e===null&&(e=this.getCategoryFromLine(t),e===null)){if(this.inclusive)continue;break}if(!r.value.test(e)){if(this.inclusive)continue;n=!1;break}n=!0;continue}if(s===null&&(s=this.getAttributesFromLine(t),s===null)){if(this.inclusive)continue;n=!1;break}if(e===null&&(e=this.getCategoryFromLine(t),e===null)){if(this.inclusive)continue;n=!1;break}if(i===null&&(i=Object.keys(new Ka[e]),i=i.slice(2),i===null)){if(this.inclusive)continue;n=!1;break}if(r.type==="property"){const{name:o,value:a}=r;if(!a.test(t)){if(this.inclusive)continue;n=!1;break}let c=!1;for(let h=0;h"&&parseFloat(f)>a){h=!0;break}else if(c===">="&&parseFloat(f)>=a){h=!0;break}else if(c==="<="&&parseFloat(f)<=a){h=!0;break}}}if(h)n=!0;else if(!this.inclusive){n=!1;break}}}return n}getCategoryFromLine(t){const e=t.indexOf("=")+1,s=t.indexOf("("),i=t.slice(e,s).trim(),n=ch[i];return n||null}getAttributesFromLine(t){const e=/\((.*)\)/,s=t.match(e);if(!(s&&s[1]))return null;const i=/,(?![^()]*\))/g;return s[1].split(i).map(r=>r.trim())}};p(ra,"importers",new Map);let Ce=ra;class no{constructor(t){p(this,"list",new Map),p(this,"id",yi.generateUUID()),p(this,"mode","intersect"),p(this,"_components"),this._components=t}get queries(){return new Set(this.list.values())}get items(){const t=[];for(const e of this.queries)t.push(e.items);return this.mode==="combine"?us.combine(t):us.intersect(t)}add(t){if(this.list.has(t.name))throw new Error(`This group already has a query with the name ${t.name}.`);this.list.set(t.name,t)}clear(t){for(const e of this.queries)e.clear(t)}import(t){this.mode=t.mode,this.id=t.id;for(const e in t.queries){const s=Ce.import(this._components,t.queries[e]);s&&this.list.set(e,s)}}export(){const t={};for(const[e,s]of this.list)t[e]=s.export();return{mode:this.mode,id:this.id,queries:t}}async update(t,e){for(const s of this.queries){const i=s.needsUpdate.get(t);(i===void 0||i)&&await s.update(t,e)}}}const aa=class ca extends Ce{constructor(t,e){super(t),p(this,"name"),this.name=e.name,this.rules=e.rules,this.inclusive=e.inclusive}get items(){const t=this.components.get(gt),e=[];for(const s in this.ids){const i=this.ids[s],n=t.groups.get(s);if(!n){console.warn(`Model ${s} not found!`);continue}const r=n.getFragmentMap(i);e.push(r)}return us.combine(e)}export(){const t=this.getData();return t.type=ca.type,t}async update(t,e){this.ids[t]=new Set,await this.findInFile(t,e),this.needsUpdate.set(t,!1)}findInLines(t,e){for(const s of e)if(this.testRules(s)){const n=this.getIdFromLine(s);this.addID(t,n)}}};p(aa,"type","IfcBasicQuery");let ro=aa;Ce.importers.set(ro.type,(l,t)=>{const e=new ro(l,{name:t.name,rules:Ce.importRules(t.rules),inclusive:t.inclusive});return e.ids=Ce.importIds(t),e});const la=class ha extends Ce{constructor(t,e){super(t),p(this,"name"),p(this,"psets",[]),this.name=e.name,this.rules=e.rules,this.inclusive=e.inclusive}get items(){const t=this.components.get(Kt),e=this.components.get(gt),s=[];for(const i in this.ids){const n=e.groups.get(i);if(!n){console.log(`Model not found: ${i}.`);continue}const r=this.ids[i];for(const o of r){const a=t.getEntityRelations(i,o,"DefinesOcurrence");if(a){const c=n.getFragmentMap(a);s.push(c)}}}return us.combine(s)}export(){const t=this.getData();return t.type=ha.type,t}async update(t,e){await this.findInFile(t,e);const s=new Set;for(const i of this.psets){const n=this.getAttributesFromLine(i);if(n===null)continue;const r=n[4].replace("(","[").replace(")","]").replace(/#/g,""),o=JSON.parse(r);for(const a of o){const c=this.ids[t];if(c&&c.has(a)){const h=this.getIdFromLine(i);s.add(h);break}}}this.ids[t]=s,this.psets=[],this.needsUpdate.set(t,!1)}findInLines(t,e){for(const s of e){const i=this.getCategoryFromLine(s);if(i==="IfcPropertySet"){this.psets.push(s);continue}if(i!=="IfcPropertySingleValue")continue;if(this.testRules(s)){const r=this.getIdFromLine(s);this.addID(t,r)}}}};p(la,"type","IfcPropertyQuery");let oo=la;Ce.importers.set(oo.type,(l,t)=>{const e=new oo(l,{name:t.name,inclusive:t.inclusive,rules:Ce.importRules(t.rules)});return e.ids=Ce.importIds(t),e});const ua=class fa extends At{constructor(t){super(t),p(this,"enabled",!0),p(this,"list",new Map),t.add(fa.uuid,this)}get queries(){const t=new Set;for(const[,e]of this.list)for(const s of e.queries)t.add(s);return t}import(t){for(const e in t){const s=new no(this.components);s.import(t[e]),this.list.set(e,s)}}export(){const t={};for(const[e,s]of this.list)t[e]=s.export();return t}create(){const t=new no(this.components);return this.list.set(t.id,t),t}delete(t){this.list.delete(t)}clear(){this.list.clear()}};p(ua,"uuid","0da7ad77-f734-42ca-942f-a074adfd1e3a");let Hu=ua;const da=class Ia extends At{constructor(t){super(t),p(this,"enabled",!0),p(this,"list",{}),p(this,"onDisposed",new j),p(this,"onFragmentsDisposed",s=>{const{groupID:i,fragmentIDs:n}=s;for(const r in this.list){const o=this.list[r],a=Object.keys(o);if(a.includes(i))delete o[i],Object.values(o).length===0&&delete this.list[r];else for(const c of a){const h=o[c];for(const d of n)delete h.map[d];Object.values(h).length===0&&delete o[c]}}}),t.add(Ia.uuid,this),t.get(gt).onFragmentsDisposed.add(this.onFragmentsDisposed)}dispose(){this.list={},this.components.get(gt).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(),this.onDisposed.reset()}remove(t){for(const e in this.list){const s=this.list[e];for(const i in s){const n=s[i];delete n.map[t]}}}find(t){const e=this.components.get(gt);if(!t){const r={};for(const[o,a]of e.list)r[o]=new Set(a.ids);return r}const s=Object.keys(t).length,i={};for(const r in t){const o=t[r];if(!this.list[r]){console.warn(`Classification ${r} does not exist.`);continue}for(const a of o){const c=this.list[r][a];if(c)for(const h in c.map){i[h]||(i[h]=new Map);for(const d of c.map[h]){const u=i[h].get(d);u===void 0?i[h].set(d,1):i[h].set(d,u+1)}}}}const n={};for(const r in i){const o=i[r];for(const[a,c]of o){if(c===void 0)throw new Error("Malformed fragments map!");c===s&&(n[r]||(n[r]=new Set),n[r].add(a))}}return n}byModel(t,e){this.list.models||(this.list.models={});const s=this.list.models;s[t]||(s[t]={map:{},id:null,name:t});const i=s[t];for(const[n,r]of e.data){const o=r[0];for(const a of o){const c=e.keyFragments.get(a);c&&(i.map[c]||(i.map[c]=new Set),i.map[c].add(n))}}}async byPredefinedType(t){var e;this.list.predefinedTypes||(this.list.predefinedTypes={});const s=this.list.predefinedTypes,i=t.getAllPropertiesIDs();for(const n of i){const r=await t.getProperties(n);if(!r)continue;const o=String((e=r.PredefinedType)==null?void 0:e.value).toUpperCase();s[o]||(s[o]={map:{},id:null,name:o});const a=s[o];for(const[c,h]of t.data){const d=h[0];for(const u of d){const f=t.keyFragments.get(u);if(!f)throw new Error("Fragment ID not found!");a.map[f]||(a.map[f]=new Set),a.map[f].add(r.expressID)}}}}byEntity(t){this.list.entities||(this.list.entities={});for(const[e,s]of t.data){const n=s[1][1],r=Pi[n];this.saveItem(t,"entities",r,e)}}async byIfcRel(t,e,s){cs.isRel(e)&&await cs.getRelationMap(t,e,async(i,n)=>{const{name:r}=await cs.getEntityName(t,i);for(const o of n)this.saveItem(t,s,r??"NO REL NAME",o)})}async bySpatialStructure(t,e={}){var s,i;const n=this.components.get(Kt),r=n.relationMaps[t.uuid];if(!r)throw new Error(`Classifier: model relations of ${t.name||t.uuid} have to exists to group by spatial structure.`);const o=e.systemName??"spatialStructures",c=e.useProperties===void 0||e.useProperties;for(const[h]of r){if(e.isolate){const I=t.data.get(h);if(!I)continue;const E=I[1][1];if(E===void 0||!e.isolate.has(E))continue}const d=n.getEntityRelations(t,h,"Decomposes");if(d)for(const I of d){let E=I.toString();if(c){const T=await t.getProperties(I);if(!T)continue;E=(s=T.Name)==null?void 0:s.value}this.saveItem(t,o,E,h,I)}const u=n.getEntityRelations(t,h,"ContainsElements");if(!u)continue;let f=h.toString();if(c){const I=await t.getProperties(h);if(!I)continue;f=(i=I.Name)==null?void 0:i.value}for(const I of u){this.saveItem(t,o,f,I,h);const E=n.getEntityRelations(t,Number(I),"IsDecomposedBy");if(E)for(const T of E)this.saveItem(t,o,f,T,h)}}}setColor(t,e,s=!1){const i=this.components.get(gt);for(const n in t){const r=i.list.get(n);if(!r)continue;const o=t[n];r.setColor(e,o,s)}}resetColor(t){const e=this.components.get(gt);for(const s in t){const i=e.list.get(s);if(!i)continue;const n=t[s];i.resetColor(n)}}export(){const t={};for(const e in this.list){t[e]={};const s=this.list[e];for(const i in s){const n=s[i];t[e][i]={map:us.export(n.map),name:n.name,id:n.id}}}return t}import(t){for(const e in t){this.list[e]||(this.list[e]={});const s=t[e];for(const i in s){const n=s[i];this.list[e][i]={map:us.import(n.map),name:n.name,id:n.id}}}}saveItem(t,e,s,i,n=null){this.list[e]||(this.list[e]={});const r=t.data.get(i);if(r)for(const o of r[0]){const a=t.keyFragments.get(o);if(a){const c=this.list[e];c[s]||(c[s]={map:{},id:n,name:s}),c[s].map[a]||(c[s].map[a]=new Set),c[s].map[a].add(i)}}}};p(da,"uuid","e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");let Nn=da;const Ea=class pa extends At{constructor(t){super(t),p(this,"onDisposed",new j),p(this,"enabled",!0),p(this,"height",10),p(this,"groupName","spatialStructures"),p(this,"list",new Set),t.add(pa.uuid,this)}dispose(){this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}set(t){if(!this.enabled)return;const e=this.components.get(Nn),s=this.components.get(gt),i=t?1:-1;let n=0;const r=e.list[this.groupName],o=new It;for(const a in r){o.elements[13]=n*i*this.height;for(const c in r[a].map){const h=s.list.get(c),d=a+c,u=this.list.has(d);if(!h||t&&u||!t&&!u)continue;t?this.list.add(d):this.list.delete(d);const f=r[a].map[c];h.applyTransform(f,o),h.mesh.computeBoundingSphere(),h.mesh.computeBoundingBox()}n++}}};p(Ea,"uuid","d260618b-ce88-4c7d-826c-6debb91de3e2");let Wu=Ea;const Ca=class Ta extends At{constructor(t){super(t),p(this,"enabled",!0),this.components.add(Ta.uuid,this)}set(t,e){const s=this.components.get(gt);if(!e){for(const[i,n]of s.list)n&&(n.setVisibility(t),this.updateCulledVisibility(n));return}for(const i in e){const n=e[i],r=s.list.get(i);r&&(r.setVisibility(t,n),this.updateCulledVisibility(r))}}isolate(t){this.set(!1),this.set(!0,t)}updateCulledVisibility(t){const e=this.components.get(zl);for(const[s,i]of e.list){const n=i.colorMeshes.get(t.id);n&&(n.count=t.mesh.count)}}};p(Ca,"uuid","dd9ccf2d-8a21-4821-b7f6-2949add16a29");let Ru=Ca;class Au extends er{constructor(){super(...arguments),p(this,"minGeometrySize",10),p(this,"minAssetsSize",1e3),p(this,"maxTriangles",null)}}const ma=class ga extends At{constructor(t){super(t),p(this,"onGeometryStreamed",new Le),p(this,"onAssetStreamed",new Le),p(this,"onProgress",new Le),p(this,"onIfcLoaded",new Le),p(this,"onDisposed",new j),p(this,"settings",new Au),p(this,"enabled",!0),p(this,"webIfc",new hs),p(this,"_nextAvailableID",0),p(this,"_splittedGeometries",new Map),p(this,"_spatialTree",new Uo),p(this,"_metaData",new Bo),p(this,"_visitedGeometries",new Map),p(this,"_streamSerializer",new Ja),p(this,"_geometries",new Map),p(this,"_geometryCount",0),p(this,"_civil",new xo),p(this,"_groupSerializer",new uo),p(this,"_assets",[]),p(this,"_meshesWithHoles",new Set),this.components.add(ga.uuid,this),this.settings.excludedCategories.add(ho)}dispose(){this.onIfcLoaded.reset(),this.onGeometryStreamed.reset(),this.onAssetStreamed.reset(),this.webIfc=null,this.onDisposed.trigger(),this.onDisposed.reset()}async streamFromBuffer(t){await this.readIfcFile(t),await this.streamAllGeometries(),this.cleanUp()}async streamFromCallBack(t){await this.streamIfcFile(t),await this.streamAllGeometries(),this.cleanUp()}async readIfcFile(t){const{path:e,absolute:s,logLevel:i}=this.settings.wasm;this.webIfc.SetWasmPath(e,s),await this.webIfc.Init(),i&&this.webIfc.SetLogLevel(i),this.webIfc.OpenModel(t,this.settings.webIfc),this._nextAvailableID=this.webIfc.GetMaxExpressID(0)}async streamIfcFile(t){const{path:e,absolute:s,logLevel:i}=this.settings.wasm;this.webIfc.SetWasmPath(e,s),await this.webIfc.Init(),i&&this.webIfc.SetLogLevel(i),this.webIfc.OpenModelFromCallback(t,this.settings.webIfc),this._nextAvailableID=this.webIfc.GetMaxExpressID(0)}async streamAllGeometries(){console.log("Converting geometries to tiles...");const{minGeometrySize:t,minAssetsSize:e}=this.settings;this._spatialTree.setUp(this.webIfc);const s=this.webIfc.GetIfcEntityList(0),i=[[]],n=new xs;n.ifcMetadata={name:"",description:"",...this._metaData.getNameInfo(this.webIfc),...this._metaData.getDescriptionInfo(this.webIfc),schema:this.webIfc.GetModelSchema(0)||"IFC2X3",maxExpressID:this.webIfc.GetMaxExpressID(0)};let r=0,o=0;for(const I of s){if(!this.webIfc.IsIfcElement(I)&&I!==Ge||this.settings.excludedCategories.has(I))continue;const E=this.webIfc.GetLineIDsWithType(0,I),T=E.size();for(let C=0;Ct&&(r=0,o++,i.push([]));const g=E.get(C);i[o].push(g);const S=this.webIfc.GetLine(0,g);if(S.GlobalId){const F=(S==null?void 0:S.GlobalId.value)||(S==null?void 0:S.GlobalId);n.globalToExpressIDs.set(F,g)}const m=this._spatialTree.itemsByFloor[g]||0;n.data.set(g,[[],[m,I]]),r++}}this._spatialTree.cleanUp();let a=.01,c=0;for(const I of i){c++,this.webIfc.StreamMeshes(0,I,T=>{this.getMesh(this.webIfc,T,n)}),this._geometryCount>this.settings.minGeometrySize&&await this.streamGeometries(),this._assets.length>e&&await this.streamAssets();const E=c/i.length;E>a&&(a+=.01,a=Math.max(a,E),await this.onProgress.trigger(Math.round(a*100)/100))}this._geometryCount&&await this.streamGeometries(),this._assets.length&&await this.streamAssets();const{opaque:h,transparent:d}=n.geometryIDs;for(const[I,{index:E,uuid:T}]of this._visitedGeometries)n.keyFragments.set(E,T),(I>1?h:d).set(I,E);Yo.get(n,this.webIfc);const u=this.webIfc.GetCoordinationMatrix(0);n.coordinationMatrix.fromArray(u),n.civilData=this._civil.read(this.webIfc);const f=this._groupSerializer.export(n);await this.onIfcLoaded.trigger(f),n.dispose(!0)}cleanUp(){try{this.webIfc.Dispose()}catch{}this.webIfc=null,this.webIfc=new hs,this._visitedGeometries.clear(),this._geometries.clear(),this._assets=[],this._meshesWithHoles.clear()}getMesh(t,e,s){const i=e.geometries.size(),n=e.expressID,r={id:n,geometries:[]};for(let o=0;othis.settings.minGeometrySize&&await this.outputGeometries(t);await this.outputGeometries(t),this._geometries.clear(),this._geometryCount=0}async outputGeometries(t){let e=this._streamSerializer.export(t),s={};for(const[i,{boundingBox:n,hasHoles:r}]of t)s[i]={boundingBox:n,hasHoles:r};await this.onGeometryStreamed.trigger({data:s,buffer:e}),s=null,e=null,t.clear()}registerGeometryData(t,e,s,i,n,r){const o=this._visitedGeometries.get(r);if(o===void 0)throw new Error("Error getting geometry data for streaming!");const a=t.data.get(e);if(!a)throw new Error("Data not found!");a[0].push(o.index);const{x:c,y:h,z:d,w:u}=s.color,f=[c,h,d,u],I=s.flatTransformation;i.geometries.push({color:f,geometryID:n,transformation:I})}};p(ma,"uuid","d9999a00-e1f5-4d3f-8cfe-c56e08609764");let Xu=ma;class Fu extends er{constructor(){super(...arguments),p(this,"propertiesSize",100)}}class Su extends At{constructor(){super(...arguments),p(this,"onPropertiesStreamed",new Le),p(this,"onProgress",new Le),p(this,"onIndicesStreamed",new Le),p(this,"onDisposed",new j),p(this,"enabled",!0),p(this,"settings",new Fu),p(this,"webIfc",new hs)}async dispose(){this.onIndicesStreamed.reset(),this.onPropertiesStreamed.reset(),this.webIfc=null,this.onDisposed.reset()}async streamFromBuffer(t){await this.readIfcFile(t),await this.streamAllProperties(),this.cleanUp()}async streamFromCallBack(t){await this.streamIfcFile(t),await this.streamAllProperties(),this.cleanUp()}async readIfcFile(t){const{path:e,absolute:s,logLevel:i}=this.settings.wasm;this.webIfc.SetWasmPath(e,s),await this.webIfc.Init(),i&&this.webIfc.SetLogLevel(i),this.webIfc.OpenModel(t,this.settings.webIfc)}async streamIfcFile(t){const{path:e,absolute:s,logLevel:i}=this.settings.wasm;this.webIfc.SetWasmPath(e,s),await this.webIfc.Init(),i&&this.webIfc.SetLogLevel(i),this.webIfc.OpenModelFromCallback(t,this.settings.webIfc)}async streamAllProperties(){const{propertiesSize:t}=this.settings,e=new Set(this.webIfc.GetIfcEntityList(0)),s=new Set([Mn,vn,Dn,bn,Ge]);for(const a of s)e.add(a);let i=.01,n=0;for(const a of e){if(n++,Vo.has(a))continue;const c=s.has(a),h=this.webIfc.GetLineIDsWithType(0,a),d=h.size();let u=0;for(let I=0;Ii&&(i=Math.round(i*100)/100,await this.onProgress.trigger(i),i+=.01)}await this.onProgress.trigger(1);const o=await this.components.get(Kt).processFromWebIfc(this.webIfc,0);await this.onIndicesStreamed.trigger(o)}cleanUp(){this.webIfc.Dispose(),this.webIfc=null,this.webIfc=new hs}}p(Su,"uuid","88d2c89c-ce32-47d7-8cb6-d51e4b311a0b");class Ra{constructor(t,e,s){p(this,"title"),p(this,"guid",Re.create()),p(this,"clippingPlanes",new we),p(this,"camera",{aspectRatio:1,fov:60,direction:{x:0,y:0,z:0},position:{x:0,y:0,z:0}}),p(this,"exceptionComponents",new we),p(this,"selectionComponents",new we),p(this,"componentColors",new re),p(this,"spacesVisible",!1),p(this,"spaceBoundariesVisible",!1),p(this,"openingsVisible",!1),p(this,"defaultVisibility",!0),p(this,"_components"),p(this,"world");const i={setCamera:!0,...s},{data:n,setCamera:r}=i;this._components=t,this.world=e,n&&(this.guid=n.guid??this.guid,this.set(n)),r&&this.updateCamera()}get _selectionModelIdMap(){const t=this._components.get(gt),e={};for(const[s,i]of t.groups){s in e||(e[s]=new Set);for(const n of this.selectionComponents){const r=i.globalToExpressIDs.get(n);r&&e[s].add(r)}}return e}get _exceptionModelIdMap(){const t=this._components.get(gt),e={};for(const[s,i]of t.groups){s in e||(e[s]=new Set);for(const n of this.exceptionComponents){const r=i.globalToExpressIDs.get(n);r&&e[s].add(r)}}return e}get selection(){return this._components.get(gt).modelIdToFragmentIdMap(this._selectionModelIdMap)}get exception(){return this._components.get(gt).modelIdToFragmentIdMap(this._exceptionModelIdMap)}get projection(){return"fov"in this.camera?"Perspective":"Orthographic"}get position(){const t=this._components.get(gt),{position:e}=this.camera,{x:s,y:i,z:n}=e,r=new U(s,i,n);return t.applyBaseCoordinateSystem(r,new It),r}get direction(){const{direction:t}=this.camera,{x:e,y:s,z:i}=t;return new U(e,s,i)}get _managerVersion(){return this._components.get(Yt).config.version}get topics(){return[...this._components.get(Yt).list.values()].filter(i=>i.viewpoints.has(this.guid))}addComponentsFromMap(t){const s=this._components.get(gt).fragmentIdMapToGuids(t);this.selectionComponents.add(...s),this._components.get(pe).list.set(this.guid,this)}set(t){const e=t,s=this;for(const n in t){if(n==="guid")continue;const r=e[n];if(n==="selectionComponents"){this.selectionComponents.clear(),this.selectionComponents.add(...r);continue}if(n==="exceptionComponents"){this.exceptionComponents.clear(),this.exceptionComponents.add(...r);continue}n in this&&(s[n]=r)}return this._components.get(pe).list.set(this.guid,this),this}async go(t,e=!0){const{camera:s}=t??this.world;if(!s.hasCameraControls())throw new Error("Viewpoint: the world's camera need controls to set the viewpoint.");s instanceof ah&&s.projection.set(this.projection);const i=new U(this.camera.position.x,this.camera.position.y,this.camera.position.z),n=new U(this.camera.direction.x,this.camera.direction.y,this.camera.direction.z);if(i.equals(new U)&&n.equals(new U))return;const r=this.position,o=this.direction;let a={x:r.x+o.x*80,y:r.y+o.y*80,z:r.z+o.z*80};const c=this.selection;if(Object.keys(c).length===0){const u=this._components.get(Rn).get(this.world).castRayFromVector(r,this.direction);u&&(a=u.point)}else{const h=this._components.get(gu);h.reset(),h.addFragmentIdMap(c),a=h.getSphere().center,h.reset()}await s.controls.setLookAt(r.x,r.y,r.z,a.x,a.y,a.z,e)}updateCamera(t){const{camera:e,renderer:s}=t??this.world;if(!s)throw new Error("Viewpoint: the world needs to have a renderer!");if(!e.hasCameraControls())throw new Error("Viewpoint: world's camera need camera controls!");const i=new U;e.controls.getPosition(i);const n=e.three,r=new U(0,0,-1).applyEuler(n.rotation),{width:o,height:a}=s.getSize();let c=o/a;Number.isNaN(c)&&(c=1);const h=this._components.get(gt);i.applyMatrix4(h.baseCoordinationMatrix.clone().invert());const d={aspectRatio:c,position:{x:i.x,y:i.y,z:i.z},direction:{x:r.x,y:r.y,z:r.z}};n instanceof wn?this.camera={...d,fov:n.fov}:n instanceof ze&&(this.camera={...d,viewToWorldScale:n.top-n.bottom}),this._components.get(pe).list.set(this.guid,this)}applyVisibility(){const t=this._components.get(Ru);t.set(this.defaultVisibility),t.set(!this.defaultVisibility,this.exception),t.set(!0,this.selection)}applyColors(){const t=this._components.get(pe),e=this._components.get(gt),s=this._components.get(Nn);for(const[i,n]of this.componentColors){const r=e.guidToFragmentIdMap(n);s.setColor(r,i,t.config.overwriteColors)}}resetColors(){const t=this._components.get(gt),e=this._components.get(Nn);for(const[s,i]of this.componentColors){const n=t.guidToFragmentIdMap(i);e.resetColor(n)}}async createComponentTags(t){var e,s;const i=this._components.get(gt),n=this._components.get(Yt);let r="";if(n.config.includeSelectionTag){const o=t==="selection"?this._selectionModelIdMap:this._exceptionModelIdMap;for(const a in o){const c=i.groups.get(a);if(!c)continue;const h=o[a];for(const d of h){const u=await c.getProperties(d);if(!u)continue;const f=(e=u.GlobalId)==null?void 0:e.value;if(!f)continue;const I=(s=u.Tag)==null?void 0:s.value;let E=null;I&&(E=`AuthoringToolId="${I}"`),r+=` +`}}}else r=[...this.selectionComponents].map(o=>``).join(` +`);return r}createColorTags(){let t="";for(const[e,s]of this.componentColors.entries()){const i=`#${e.getHexString()}`,n=s.map(r=>` +`).join(` +`);t+=` +${n} +`}return t.length!==0?` +${t} +`:""}async serialize(t=this._managerVersion){const e=this._components.get(gt),s=this.position;s.applyMatrix4(e.baseCoordinationMatrix.clone().invert());const i=this.direction;i.normalize();const n=new It().makeRotationX(Math.PI/2),r=i.clone().applyMatrix4(n);r.normalize();const o=` + ${s.x} + ${-s.z} + ${s.y} + `,a=` + ${i.x} + ${-i.z} + ${i.y} + `,c=` + ${r.x} + ${-r.z} + ${r.y} + `,h=`${this.camera.aspectRatio}`;let d="";"viewToWorld"in this.camera?d=` + ${o} + ${a} + ${c} + ${h} + ${this.camera.viewToWorld} + `:"fov"in this.camera&&(d=` + ${o} + ${a} + ${c} + ${h} + ${this.camera.fov} + `);const u=``,f=(await this.createComponentTags("selection")).trim(),I=(await this.createComponentTags("exception")).trim(),E=this.createColorTags();return` + + + ${t==="2.1"?u:""} + ${f.length!==0?`${f}`:""} + + ${t==="3"?u:""} + ${I.length!==0?`${I}`:""} + + ${E} + + ${d} + `}}class Ou extends ke{constructor(){super(...arguments),p(this,"_config",{overwriteColors:{value:!1,type:"Boolean"}})}get overwriteColors(){return this._config.overwriteColors.value}set overwriteColors(t){this._config.overwriteColors.value=t}}const Aa=class _n extends At{constructor(t){super(t),p(this,"enabled",!0),p(this,"list",new re),p(this,"isSetup",!1),p(this,"onSetup",new j),p(this,"config",new Ou(this,this.components,"Viewpoints",_n.uuid)),p(this,"onDisposed",new j),t.add(_n.uuid,this)}create(t,e){const s=new Ra(this.components,t,{data:e});return e||this.list.set(s.guid,s),s}setup(){}dispose(){this.list.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}};p(Aa,"uuid","ee867824-a796-408d-8aa0-4e5962a83c66");let pe=Aa;class yu extends ke{constructor(){super(...arguments),p(this,"_config",{visible:{value:!0,type:"Boolean"},lockRotation:{value:!0,type:"Boolean"},zoom:{type:"Number",interpolable:!0,value:.05,min:.001,max:5},frontOffset:{type:"Number",interpolable:!0,value:0,min:0,max:100},sizeX:{type:"Number",interpolable:!0,value:320,min:20,max:5e3},sizeY:{type:"Number",interpolable:!0,value:160,min:20,max:5e3},backgroundColor:{value:new Mt,type:"Color"}})}get visible(){return this._config.visible.value}set visible(t){this._config.visible.value=t;const e=this._component.renderer.domElement.style;e.display=t?"block":"none"}get lockRotation(){return this._config.lockRotation.value}set lockRotation(t){this._config.lockRotation.value=t,this._component.lockRotation=t}get zoom(){return this._config.zoom.value}set zoom(t){this._config.zoom.value=t,this._component.zoom=t}get frontOffset(){return this._config.frontOffset.value}set frontOffset(t){this._config.frontOffset.value=t,this._component.frontOffset=t}get sizeX(){return this._config.sizeX.value}set sizeX(t){this._config.sizeX.value=t;const{sizeX:e,sizeY:s}=this._config,i=new Ht(e.value,s.value);this._component.resize(i)}get sizeY(){return this._config.sizeY.value}set sizeY(t){this._config.sizeY.value=t;const{sizeX:e,sizeY:s}=this._config,i=new Ht(e.value,s.value);this._component.resize(i)}get backgroundColor(){return this._config.backgroundColor.value}set backgroundColor(t){this._config.backgroundColor.value=t,this._component.backgroundColor=t}}class Nu{constructor(t,e){if(p(this,"onDisposed",new j),p(this,"onAfterUpdate",new j),p(this,"onBeforeUpdate",new j),p(this,"onResize",new j),p(this,"onSetup",new j),p(this,"frontOffset",0),p(this,"overrideMaterial",new tc),p(this,"backgroundColor",new Mt(395274)),p(this,"renderer"),p(this,"enabled",!0),p(this,"world"),p(this,"config"),p(this,"isSetup",!1),p(this,"_defaultConfig",{visible:!0,lockRotation:!1,zoom:.05,frontOffset:0,sizeX:320,sizeY:160,backgroundColor:new Mt(395274)}),p(this,"_lockRotation",!0),p(this,"_size",new Ht(320,160)),p(this,"_camera"),p(this,"_plane"),p(this,"_tempVector1",new U),p(this,"_tempVector2",new U),p(this,"_tempTarget",new U),p(this,"down",new U(0,-1,0)),p(this,"updatePlanes",()=>{if(!this.world.renderer)throw new Error("The given world must have a renderer!");const n=[],r=this.world.renderer.three;for(const o of r.clippingPlanes)n.push(o);n.push(this._plane),this.renderer.clippingPlanes=n}),this.world=t,!this.world.renderer)throw new Error("The given world must have a renderer!");this.renderer=new zs,this.renderer.setSize(this._size.x,this._size.y);const s=1,i=this._size.x/this._size.y;this._camera=new ze(s*i/-2,s*i/2,s/2,s/-2),this.world.renderer.onClippingPlanesUpdated.add(this.updatePlanes),this._camera.position.set(0,200,0),this._camera.zoom=.1,this._camera.rotation.x=-Math.PI/2,this._plane=new ds(this.down,200),this.updatePlanes(),this.config=new yu(this,e,"MiniMap")}get lockRotation(){return this._lockRotation}set lockRotation(t){this._lockRotation=t,t&&(this._camera.rotation.z=0)}get zoom(){return this._camera.zoom}set zoom(t){this._camera.zoom=t,this._camera.updateProjectionMatrix()}dispose(){this.enabled=!1,this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.onResize.reset(),this.overrideMaterial.dispose(),this.renderer.forceContextLoss(),this.renderer.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get(){return this._camera}update(){if(!this.enabled)return;this.onBeforeUpdate.trigger();const t=this.world.scene.three,e=this.world.camera;if(!e.hasCameraControls())throw new Error("The given world must use camera controls!");if(!(t instanceof wi))throw new Error("The given world must have a THREE.Scene as a root!");const s=e.controls;if(s.getPosition(this._tempVector1),this._camera.position.x=this._tempVector1.x,this._camera.position.z=this._tempVector1.z,this.frontOffset!==0&&(s.getTarget(this._tempVector2),this._tempVector2.sub(this._tempVector1),this._tempVector2.normalize().multiplyScalar(this.frontOffset),this._camera.position.x+=this._tempVector2.x,this._camera.position.z+=this._tempVector2.z),!this._lockRotation){s.getTarget(this._tempTarget);const n=Math.atan2(this._tempTarget.x-this._tempVector1.x,this._tempTarget.z-this._tempVector1.z);this._camera.rotation.z=n+Math.PI}this._plane.set(this.down,this._tempVector1.y);const i=t.background;t.background=this.backgroundColor,this.renderer.render(t,this._camera),t.background=i,this.onAfterUpdate.trigger()}getSize(){return this._size}resize(t=this._size){this._size.copy(t),this.renderer.setSize(t.x,t.y);const e=t.x/t.y,s=1;this._camera.left=s*e/-2,this._camera.right=s*e/2,this._camera.top=s/2,this._camera.bottom=-s/2,this._camera.updateProjectionMatrix(),this.onResize.trigger(t)}setup(t){const e={...this._defaultConfig,...t};this.config.visible=!0,this.config.lockRotation=e.lockRotation,this.config.zoom=e.zoom,this.config.frontOffset=e.frontOffset,this.config.sizeX=e.sizeX,this.config.sizeY=e.sizeY,this.config.backgroundColor=e.backgroundColor,this.isSetup=!0,this.onSetup.trigger()}}const Fa=class Sa extends At{constructor(t){super(t),p(this,"onAfterUpdate",new j),p(this,"onBeforeUpdate",new j),p(this,"onDisposed",new j),p(this,"onSetup",new j),p(this,"enabled",!0),p(this,"list",new Map),this.components.add(Sa.uuid,this)}create(t){if(this.list.has(t.uuid))throw new Error("This world already has a minimap!");const e=new Nu(t,this.components);return this.list.set(t.uuid,e),e}delete(t){const e=this.list.get(t);e&&e.dispose(),this.list.delete(t)}dispose(){for(const[t,e]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger()}update(){for(const[t,e]of this.list)e.update()}};p(Fa,"uuid","39ad6aad-84c8-4adf-a1e0-7f25313a9e7f");let $u=Fa;const Oa=class ya extends At{constructor(t){super(t),p(this,"enabled",!0),t.add(ya.uuid,this)}static distanceFromPointToLine(t,e,s,i=!1){const n=new ie,r=new U;return n.set(e,s),n.closestPointToPoint(t,i,r),r.distanceTo(t)}getFace(t,e,s){if(!t.geometry.index)throw new Error("Geometry must be indexed!");const i=new Map,n=t.geometry.index.array,{plane:r}=this.getFaceData(e,s,t),o=[];for(let d=0;dm.id);if(!f.size){const m=a++;for(const{id:F}of u)c.set(F,m);h.set(m,{edges:new Set(I),indices:new Set([d])});continue}let E=null;const T=new Set,C=new Set(I);for(const[m,F]of f){E===null?E=F:F!==E&&T.add(F),c.delete(m);const{edges:y}=h.get(F);y.delete(m),C.delete(m)}if(E===null)throw new Error("Error computing face!");const g=h.get(E),{indices:S}=g;S.add(d);for(const m of C){c.set(m,E);const{edges:F}=g;F.add(m)}for(const m of T){const F=h.get(m),{edges:y,indices:N}=F,w=h.get(E),{edges:P,indices:v}=w;for(const Y of y)P.add(Y),c.set(Y,E);for(const Y of N)v.add(Y);h.delete(m)}}for(const[d,{indices:u,edges:f}]of h)if(u.has(e)){const I=[];for(const E of f){const T=i.get(E);I.push(T)}return{edges:I,indices:u}}return null}getVerticesAndNormal(t,e,s){if(!t.geometry.index)throw new Error("Geometry must be indexed!");const i=t.geometry.index.array,n=t.geometry.attributes.position.array,r=t.geometry.attributes.normal.array,o=i[e*3]*3,a=i[e*3+1]*3,c=i[e*3+2]*3,h=new U(n[o],n[o+1],n[o+2]),d=new U(n[a],n[a+1],n[a+2]),u=new U(n[c],n[c+1],n[c+2]),f=new U(r[o],r[o+1],r[o+2]),I=new U(r[a],r[a+1],r[a+2]),E=new U(r[c],r[c+1],r[c+2]),T=(f.x+I.x+E.x)/3,C=(f.y+I.y+E.y)/3,g=(f.z+I.z+E.z)/3,S=new U(T,C,g);if(s!==void 0&&t instanceof Ve){const m=new It;t.getMatrixAt(s,m);const F=new It;F.extractRotation(m),S.applyMatrix4(F),h.applyMatrix4(m),d.applyMatrix4(m),u.applyMatrix4(m)}return{p1:h,p2:d,p3:u,faceNormal:S}}round(t){t.x=Math.trunc(t.x*1e3)/1e3,t.y=Math.trunc(t.y*1e3)/1e3,t.z=Math.trunc(t.z*1e3)/1e3}getVolumeFromFragments(t){const e=this.components.get(gt),s=new It,i=[];for(const r in t){const o=e.list.get(r);if(!o)continue;const a=t[r];let c=0;for(const u of a){const f=o.getInstancesIDs(u);f&&(c+=f.size)}const h=new Ve(o.mesh.geometry,void 0,c);let d=0;for(const u of a){const f=o.getInstancesIDs(u);if(f)for(const I of f)o.mesh.getMatrixAt(I,s),h.setMatrixAt(d++,s)}i.push(h)}const n=this.getVolumeFromMeshes(i);for(const r of i)r.geometry=null,r.material=[],r.dispose();return n}getVolumeFromMeshes(t){let e=0;for(const s of t)e+=this.getVolumeOfMesh(s);return e}getFaceData(t,e,s){const i=this.getVerticesAndNormal(s,t,e),{p1:n,p2:r,p3:o,faceNormal:a}=i;this.round(n),this.round(r),this.round(o),this.round(a);const c=[{id:`${n.x}|${n.y}|${n.z}`,value:n},{id:`${r.x}|${r.y}|${r.z}`,value:r},{id:`${o.x}|${o.y}|${o.z}`,value:o}];c.sort((g,S)=>g.idS.id?1:0);const[{id:h,value:d},{id:u,value:f},{id:I,value:E}]=c,T=[{id:`${h}|${u}`,distance:d.distanceTo(f),points:[d,f]},{id:`${u}|${I}`,distance:f.distanceTo(E),points:[f,E]},{id:`${h}|${I}`,distance:d.distanceTo(E),points:[d,E]}],C=new ds;return C.setFromNormalAndCoplanarPoint(a,n),C.constant=Math.round(C.constant*10)/10,{plane:C,edges:T}}getVolumeOfMesh(t){let e=0;const s=new U,i=new U,n=new U,{index:r}=t.geometry,o=t.geometry.attributes.position.array;if(!r)return console.warn("Geometry must be indexed to compute its volume!"),0;const a=[];if(t instanceof Ve)for(let h=0;h{const r={parameter:i,currentValue:e,requiredValue:s.parameter,pass:!1};n&&this.addCheckResult(r,n);let o=!1;if(s.type==="simple"&&(o=e===s.parameter),s.type==="enumeration"&&(o=s.parameter.includes(e)),s.type==="pattern"&&(o=new RegExp(s.parameter).test(String(e))),s.type==="length"){const{min:a,length:c,max:h}=s.parameter;c!==void 0&&(o=String(e).length===c),a!==void 0&&(o=String(e).length>=a),h!==void 0&&(o=String(e).length<=h)}if(s.type==="bounds"&&typeof e=="number"){const{min:a,minInclusive:c,max:h,maxInclusive:d}=s.parameter;let u=!0,f=!0;a!==void 0&&(u=c?e<=a:e=h:e>h),o=u&&f}return this.cardinality==="prohibited"&&(o=!o),this.cardinality==="optional"&&(o=!0),r.pass=o,r.pass}),p(this,"testResult",[]),this.components=t}addCheckResult(t,e){const s=e.findIndex(({parameter:i})=>i===t.parameter);s!==-1?e[s]=t:e.push(t)}saveResult(t,e){const{GlobalId:s}=t;if(!s)return;const{value:i}=s,n={expressID:i,pass:e,checks:[],cardinality:this.cardinality};this.testResult.push(n)}}const Te=(l,t)=>{let e="";return t?(t.type==="simple"&&(e=`${t.parameter}`),t.type==="enumeration"&&(e=` + ${t.parameter.map(n=>``).join(`\r +`)} + `),t.type==="pattern"&&(e=` + + `),` + ${e} + `):e};class _u extends Bi{constructor(t,e){super(t),p(this,"facetType","Attribute"),p(this,"name"),p(this,"value"),this.name=e}serialize(t){const e=Te("Name",this.name),s=Te("Value",this.value);let i="";return t==="requirement"&&(i+=`cardinality="${this.cardinality}"`,i+=this.instructions?`instructions="${this.instructions}"`:""),` + ${e} + ${s} +`}async getEntities(){return[]}async test(t){var e;this.testResult=[];for(const i in t){const n=Number(i),r=t[n],o=[],a={guid:(e=r.GlobalId)==null?void 0:e.value,expressID:n,pass:!1,checks:o,cardinality:this.cardinality};this.testResult.push(a);const h=Object.keys(r).filter(u=>{const f=this.evalRequirement(u,this.name,"Name"),I=r[u];return f&&I===null?this.cardinality==="optional"||this.cardinality==="prohibited":f&&(I==null?void 0:I.type)===3&&I.value===2||f&&Array.isArray(I)&&I.length===0||f&&(I==null?void 0:I.type)===1&&I.value.trim()===""?!1:f}),d=h.length>0;if(o.push({parameter:"Name",currentValue:d?h[0]:null,requiredValue:this.name.parameter,pass:this.cardinality==="prohibited"?!d:d}),this.value)if(h[0]){const u=r[h[0]];(u==null?void 0:u.type)===5?o.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"}):this.evalRequirement(u?u.value:null,this.value,"Value",o)}else o.push({parameter:"Value",currentValue:null,requiredValue:this.value.parameter,pass:this.cardinality==="prohibited"});a.pass=o.every(({pass:u})=>u)}const s=[...this.testResult];return this.testResult=[],s}}class Pu extends Bi{constructor(t,e){super(t),p(this,"facetType","Classification"),p(this,"system"),p(this,"value"),p(this,"uri"),this.system=e}serialize(t){const e=Te("System",this.system),s=Te("Value",this.value);let i="";return t==="requirement"&&(i+=`cardinality="${this.cardinality}"`,i+=this.uri?`uri=${this.uri}`:"",i+=this.instructions?`instructions="${this.instructions}"`:""),` + ${e} + ${s} +`}async getEntities(t,e={}){var s;const i=[],n=await t.getAllPropertiesOfType(de),r=await t.getAllPropertiesOfType(He),o={...n,...r},a=[];for(const h in o){const d=Number(h),u=await t.getProperties(d);if(!u)continue;const f=(s=u.ReferencedSource)==null?void 0:s.value;if(!f)continue;const I=await t.getProperties(f);!I||!this.evalSystem(I)||!this.evalValue(u)||!this.evalURI(u)||a.push(d)}const c=this.components.get(Kt);for(const h of a){const d=c.getEntitiesWithRelation(t,"HasAssociations",h);for(const u of d){if(u in e)continue;const f=await t.getProperties(u);f&&(e[u]=f,i.push(u))}}return i}async test(t,e){var s;this.testResult=[];for(const n in t){const r=Number(n),o=t[r],a=[],c={guid:(s=o.GlobalId)==null?void 0:s.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(c);let h=!0;const d=await this.getSystems(e,r),u=d.map(f=>this.getSystemName(f)).filter(f=>f);for(const f of d){if(!this.evalSystem(f,a))continue;if(h=!1,!(this.value&&this.system))break;if(f.type!==de)continue;const E=!this.value||this.evalValue(f,a),T=!this.uri||this.evalURI(f,a);if(E&&T)break}h&&this.addCheckResult({parameter:"System",currentValue:u,requiredValue:this.system,pass:this.cardinality==="optional"},a),c.pass=a.every(({pass:f})=>f)}const i=[...this.testResult];return this.testResult=[],i}async processReferencedSource(t,e){var s;const i=(s=e.ReferencedSource)==null?void 0:s.value;if(!i)return null;const n=await t.getProperties(i);return n?(n.type===de&&(n.ReferencedSource=await this.processReferencedSource(t,n)),n):null}async getSystems(t,e){var s;const i=[],n=this.components.get(Kt),r=n.getEntityRelations(t,e,"HasAssociations");if(r)for(const d of r){const u=await t.getProperties(d);u&&(u.type===He&&i.push(u),u.type===de&&(u.ReferencedSource=await this.processReferencedSource(t,u),u.ReferencedSource&&i.push(u)))}const o=i.map(d=>{var u,f,I;return d.type===He?(u=d.Name)==null?void 0:u.value:d.type===de?(I=(f=d.ReferencedSource)==null?void 0:f.Name)==null?void 0:I.value:null}).filter(d=>d),a=n.getEntityRelations(t,e,"IsTypedBy");if(!(a&&a[0]))return i;const c=a[0],h=n.getEntityRelations(t,c,"HasAssociations");if(h)for(const d of h){const u=await t.getProperties(d);if(u){if(u.type===He){if(o.includes((s=u.Name)==null?void 0:s.value))continue;i.push(u)}u.type===de&&(u.ReferencedSource=await this.processReferencedSource(t,u),u.ReferencedSource&&i.push(u))}}return i}getSystemName(t){var e,s,i,n;if(t.type===He)return(e=t.Name)==null?void 0:e.value;if(t.type===de){if(((s=t.ReferencedSource)==null?void 0:s.type)===de)return this.getSystemName(t.ReferencedSource);if(((i=t.ReferencedSource)==null?void 0:i.type)===He)return(n=t.ReferencedSource.Name)==null?void 0:n.value}return null}getAllReferenceIdentifications(t){if(t.type!==de)return null;const e=[];if(t.Identification&&e.push(t.Identification.value),t.ReferencedSource){const s=this.getAllReferenceIdentifications(t.ReferencedSource);s&&e.push(...s)}return e}evalSystem(t,e){const s=this.getSystemName(t);return this.evalRequirement(s,this.system,"System",e)}evalValue(t,e){if(!this.value)return!0;const s=this.getAllReferenceIdentifications(t);if(!s)return!1;const i=s.find(n=>this.value?this.evalRequirement(n,this.value,"Value"):!1);return e&&this.addCheckResult({parameter:"Value",currentValue:i??null,requiredValue:this.value,pass:!!i},e),!!i}evalURI(t,e){var s;return this.uri?this.evalRequirement((s=t.Location)==null?void 0:s.value,{type:"simple",parameter:this.uri},"URI",e):!0}}class Lu extends Bi{constructor(t,e){super(t),p(this,"facetType","Entity"),p(this,"name"),p(this,"predefinedType"),this.name=e}serialize(t){const e=Te("Name",this.name),s=Te("Name",this.predefinedType);let i="";return t==="requirement"&&(i+=`cardinality="${this.cardinality}"`,i+=this.instructions?`instructions="${this.instructions}"`:""),` + ${e} + ${s} +`}async getEntities(t,e={}){const s=Object.entries(Pi),i=[];for(const[o]of s)await this.evalName({type:o})&&i.push(Number(o));let n={};for(const o of i){const a=await t.getAllPropertiesOfType(o);a&&(n={...n,...a})}if(!this.predefinedType){for(const o in n)o in e||(e[o]=n[o]);return Object.keys(n).map(Number)}const r=[];for(const o in n){const a=Number(o);if(a in e)continue;const c=n[a];await this.evalPredefinedType(t,c)&&(e[a]=c,r.push(a))}return r}async test(t,e){var s;this.testResult=[];for(const i in t){const n=Number(i),r=t[n],o=[],a={guid:(s=r.GlobalId)==null?void 0:s.value,expressID:n,pass:!1,checks:o,cardinality:this.cardinality};this.testResult.push(a),await this.evalName(r,o),await this.evalPredefinedType(e,r,o),a.pass=o.every(({pass:c})=>c)}return this.testResult}async evalName(t,e){const s=Pi[t.type];return this.evalRequirement(s,this.name,"Name",e)}async evalPredefinedType(t,e,s){var i,n,r,o;if(!this.predefinedType)return null;const a=this.components.get(Kt),c=typeof this.predefinedType.parameter=="string"&&this.predefinedType.parameter==="USERDEFINED";let h=(i=e.PredefinedType)==null?void 0:i.value;if(h==="USERDEFINED"&&!c){const f=Object.keys(e).find(I=>/^((?!Predefined).)*Type$/.test(I));h=f?(n=e[f])==null?void 0:n.value:"USERDEFINED"}if(!h){const u=a.getEntityRelations(t,e.expressID,"IsTypedBy");if(u&&u[0]){const f=await t.getProperties(u[0]);if(f&&(h=(r=f.PredefinedType)==null?void 0:r.value,h==="USERDEFINED"&&!c)){const E=Object.keys(f).find(T=>/^((?!Predefined).)*Type$/.test(T));h=E?(o=f[E])==null?void 0:o.value:"USERDEFINED"}}}return this.evalRequirement(h,this.predefinedType,"PredefinedType",s)}}class wu extends Bi{constructor(t,e,s){super(t),p(this,"facetType","Property"),p(this,"propertySet"),p(this,"baseName"),p(this,"value"),p(this,"dataType"),p(this,"uri"),p(this,"_unsupportedTypes",[ec,sc]),this.propertySet=e,this.baseName=s}serialize(t){const e=Te("PropertySet",this.propertySet),s=Te("BaseName",this.baseName),i=Te("Value",this.value),n=this.dataType?`dataType=${this.dataType}`:"";let r="";return t==="requirement"&&(r+=`cardinality="${this.cardinality}"`,r+=this.uri?`uri=${this.uri}`:"",r+=this.instructions?`instructions="${this.instructions}"`:""),` + ${e} + ${s} + ${i} +`}async getEntities(t,e={}){var s,i;let n={};const r=await t.getAllPropertiesOfType(as);n={...n,...r};const o=await t.getAllPropertiesOfType(gi);if(n={...n,...o},Object.keys(n).length===0)return[];const a=[];for(const h in n){const d=Number(h),u=await t.getProperties(d);if(!u||!(((s=u.Name)==null?void 0:s.value)===this.propertySet.parameter))continue;let I;if(u.type===as&&(I="HasProperties"),u.type===gi&&(I="Quantities"),!!I)for(const E of u[I]){const T=await t.getProperties(E.value);if(!(!T||!(((i=T.Name)==null?void 0:i.value)===this.baseName.parameter))){if(this.value){const g=Object.keys(T).find(m=>m.endsWith("Value"));if(!g||!(T[g].value===this.value.parameter))continue}a.push(d)}}}const c=this.components.get(Kt);for(const h of a){const d=c.getEntitiesWithRelation(t,"IsDefinedBy",h);for(const u of d){if(u in e)continue;const f=await t.getProperties(u);f&&(e[u]=f)}}return[]}async test(t,e){var s;this.testResult=[];for(const n in t){const r=Number(n),o=t[r],a=[],c={guid:(s=o.GlobalId)==null?void 0:s.value,expressID:r,pass:!1,checks:a,cardinality:this.cardinality};this.testResult.push(c);const d=(await this.getPsets(e,r)).filter(u=>{var f;return this.evalRequirement(((f=u.Name)==null?void 0:f.value)??null,this.propertySet,"PropertySet")?(a.push({currentValue:u.Name.value,parameter:"PropertySet",pass:!0,requiredValue:this.propertySet.parameter}),!0):!1});if(d.length===0){a.push({currentValue:null,parameter:"PropertySet",pass:!1,requiredValue:this.propertySet.parameter});continue}for(const u of d){const f=this.getItemsAttrName(u.type);if(!f){a.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}const E=u[f].filter(T=>{var C;return this._unsupportedTypes.includes(T.type)||!this.evalRequirement(((C=T.Name)==null?void 0:C.value)??null,this.baseName,"BaseName")?!1:(a.push({currentValue:T.Name.value,parameter:"BaseName",pass:!0,requiredValue:this.baseName.parameter}),!0)});if(E.length===0){a.push({currentValue:null,parameter:"BaseName",pass:!1,requiredValue:this.baseName.parameter});continue}for(const T of E)this.evalValue(T,a),this.evalDataType(T,a),this.evalURI()}c.pass=a.every(({pass:u})=>u)}const i=[...this.testResult];return this.testResult=[],i}getItemsAttrName(t){let e;return t===as&&(e="HasProperties"),t===gi&&(e="Quantities"),e}getValueKey(t){return Object.keys(t).find(e=>e.endsWith("Value")||e.endsWith("Values"))}async getPsetProps(t,e,s){const i=structuredClone(e),n=[],r=i[s];if(!r)return n;for(const{value:o}of r){const a=await t.getProperties(o);a&&n.push(a)}return i[s]=n,i}async getTypePsets(t,e){const s=[],n=this.components.get(Kt).getEntityRelations(t,e,"IsTypedBy");if(!(n&&n[0]))return s;const r=await t.getProperties(n[0]);if(!(r&&"HasPropertySets"in r&&Array.isArray(r.HasPropertySets)))return s;for(const{value:o}of r.HasPropertySets){const a=await t.getProperties(o);if(!(a&&"HasProperties"in a&&Array.isArray(a.HasProperties)))continue;const c=await this.getPsetProps(t,a,"HasProperties");s.push(c)}return s}async getPsets(t,e){const s=await this.getTypePsets(t,e),n=this.components.get(Kt).getEntityRelations(t,e,"IsDefinedBy");if(!n)return s;for(const r of n){const o=await t.getProperties(r);if(!o)continue;const a=this.getItemsAttrName(o.type);if(!a)continue;const c=await this.getPsetProps(t,o,a);s.push(c)}return s}evalValue(t,e){const s=this.getValueKey(t),i=t[s];if(this.value){if(!i)return e==null||e.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:this.value.parameter}),!1;const n=structuredClone(this.value);if(i.name==="IFCLABEL"&&n.type==="simple"&&(n.parameter=String(n.parameter)),(t.type===ur||t.type===fr)&&Array.isArray(i)){const o=i.map(c=>c.value),a=i.find(c=>n?this.evalRequirement(c.value,n,"Value"):!1);return e==null||e.push({currentValue:o,pass:!!a,parameter:"Value",requiredValue:n.parameter}),!!a}return this.evalRequirement(i.value,n,"Value",e)}return s?i.type===3&&i.value===2?(e==null||e.push({parameter:"Value",currentValue:null,pass:!1,requiredValue:null}),!1):i.type===1&&i.value.trim()===""?(e==null||e.push({parameter:"Value",currentValue:"",pass:!1,requiredValue:null}),!1):!0:!0}evalDataType(t,e){if(!this.dataType)return!0;const s=this.getValueKey(t),i=t[s];if(!i)return e==null||e.push({parameter:"DataType",currentValue:null,pass:!1,requiredValue:this.dataType}),!1;if((t.type===ur||t.type===fr)&&Array.isArray(i)&&i[0]){const r=i[0].name;return this.evalRequirement(r,{type:"simple",parameter:this.dataType},"DataType",e)}return this.evalRequirement(i.name,{type:"simple",parameter:this.dataType},"DataType",e)}evalURI(){return!0}}class Mu{constructor(t,e,s){p(this,"name"),p(this,"ifcVersion",new Set),p(this,"identifier",Re.create()),p(this,"description"),p(this,"instructions"),p(this,"requirementsDescription"),p(this,"applicability",new we),p(this,"requirements",new we),p(this,"components"),this.components=t,this.name=e;for(const i of s)this.ifcVersion.add(i)}set(t){const e=t,s=this;for(const n in t){if(n==="identifier")continue;const r=e[n];n in this&&(s[n]=r)}return this.components.get(Uu).list.set(this.identifier,this),this}async test(t){let e=[];if(this.requirements.size===0)return e;const s={};for(const n of this.applicability)await n.getEntities(t,s);return e=await[...this.requirements][0].test(s,t),e}serialize(){const t=`name="${this.name}"`,e=this.identifier?`identifier="${this.identifier}"`:"",s=this.description?`description="${this.description}"`:"",i=this.instructions?`instructions="${this.instructions}"`:"";return` + + ${[...this.applicability].map(r=>r.serialize("applicability"))} + + + ${[...this.requirements].map(r=>r.serialize("requirement"))} + + `}}const me=l=>{if(!l)return;const t={};if("simpleValue"in l&&(t.type="simple",t.parameter=l.simpleValue),"restriction"in l){const e=l.restriction;if("pattern"in e&&(t.type="pattern",t.parameter=e.pattern.value),"enumeration"in e){t.type="enumeration";const s=e.enumeration.map(({value:i})=>i);t.parameter=s}}if(t.parameter!==void 0)return t},ao=(l,t)=>{const e=[];for(const s of t){const i=s.name,n=me(i);if(!n)continue;const r=new Lu(l,n);s.cardinality&&(r.cardinality=s.cardinality),r.predefinedType=me(s.predefinedType),r.instructions=s.instructions,e.push(r)}return e},vu=(l,t)=>{const e=[];for(const s of t){const i=s.name,n=me(i);if(!n)continue;const r=new _u(l,n);s.cardinality&&(r.cardinality=s.cardinality),r.value=me(s.value),r.instructions=s.instructions,e.push(r)}return e},Du=(l,t)=>{const e=[];for(const s of t){const i=s.system,n=me(i);if(!n)continue;const r=new Pu(l,n);s.cardinality&&(r.cardinality=s.cardinality);const o=me(s.value);(o==null?void 0:o.type)==="simple"&&(o.parameter=String(o.parameter)),(o==null?void 0:o.type)==="enumeration"&&Array.isArray(o.parameter)&&(o.parameter=o.parameter.map(String)),r.value=o,r.uri=s.uri,r.instructions=s.instructions,e.push(r)}return e},bu=(l,t)=>{const e=[];for(const s of t){const i=s.propertySet,n=s.baseName,r=me(i),o=me(n);if(!(o&&r))continue;const a=new wu(l,r,o);s.cardinality&&(a.cardinality=s.cardinality);const c=me(s.value);(c==null?void 0:c.type)==="enumeration"&&Array.isArray(c.parameter)&&(c.parameter=c.parameter.map(String)),a.value=c,a.dataType=s.dataType,a.uri=s.uri,a.instructions=s.instructions,e.push(a)}return e},rr=class Pn extends At{constructor(t){super(t),p(this,"enabled",!0),p(this,"list",new re),t.add(Pn.uuid,this)}getFragmentIdMap(t,e){const i=e.filter(c=>c.pass).map(c=>c.expressID),n=t.getFragmentMap(i),o=e.filter(c=>!c.pass).map(c=>c.expressID),a=t.getFragmentMap(o);return{pass:n,fail:a}}create(t,e,s){const i=new Mu(this.components,t,e);return s&&(i.identifier=s),this.list.set(i.identifier,i),i}load(t){const e=[],s=Pn.xmlParser.parse(t).ids,{specifications:i}=s;if(i&&i.specification){const n=Array.isArray(i.specification)?i.specification:[i.specification];for(const r of n){const{name:o,ifcVersion:a,description:c,instructions:h,identifier:d}=r;if(!(o&&a))continue;const u=[],f=[],{applicability:I,requirements:E}=r;if(I){const{maxOccurs:C,...g}=I,S=Array.isArray(g)?g:[g];for(const m of S)for(const F in m){const y=Array.isArray(m[F])?m[F]:[m[F]];if(F==="entity"){const N=ao(this.components,y);u.push(...N)}}}let T;if(E){const{maxOccurs:C,...g}=E;T=E.description;const S=Array.isArray(g)?g:[g];for(const m of S)for(const F in m){const y=Array.isArray(m[F])?m[F]:[m[F]];if(F==="entity"){const N=ao(this.components,y);f.push(...N)}if(F==="attribute"){const N=vu(this.components,y);f.push(...N)}if(F==="classification"){const N=Du(this.components,y);f.push(...N)}if(F==="property"){const N=bu(this.components,y);f.push(...N)}}}if(u.length>0&&f.length>0){const C=this.create(o,a.split(/\s+/),d);C.description=c,C.instructions=h,C.requirementsDescription=T,C.applicability.add(...u),C.requirements.add(...f),e.push(C)}}}return e}export(t,e=this.list.values()){const s=e??this.list;return` + + + ${t.title} + ${t.copyright?`${t.copyright}`:""} + ${t.version?`${t.version}`:""} + ${t.description?`${t.description}`:""} + ${t.author?`${t.author}`:""} + ${t.date?`${t.date.toISOString().split("T")[0]}`:""} + ${t.purpose?`${t.purpose}`:""} + ${t.milestone?`${t.milestone}`:""} + + + ${[...s].map(n=>n.serialize()).join(` +`)} + +`}};p(rr,"uuid","9f0b9f78-9b2e-481a-b766-2fbfd01f342c");p(rr,"xmlParser",new ta.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",ignoreAttributes:!1,ignoreDeclaration:!0,ignorePiTags:!0,numberParseOptions:{leadingZeros:!0,hex:!0},parseAttributeValue:!0,preserveOrder:!1,processEntities:!1,removeNSPrefix:!0,trimValues:!0}));let Uu=rr;export{Yt as B,Ro as C,Wu as E,gt as F,Vu as G,Ru as H,uh as I,Zu as M,ah as O,Rn as R,wl as S,io as T,Re as U,pe as V,_o as W,Gs as a,zl as b,Nn as c,Bu as d,sh as e,Nl as f,Kt as g,Pi as h,Ih as i,hh as j,ku as k,Hu as l,ro as m,oo as n,Su as o,Xu as p,gu as q,Yu as r,$u as s}; diff --git a/examples/assets/index-fOrz5L1Y.js b/examples/assets/index-DGT5XDSa.js similarity index 96% rename from examples/assets/index-fOrz5L1Y.js rename to examples/assets/index-DGT5XDSa.js index 6d5809ce..7d7154da 100644 --- a/examples/assets/index-fOrz5L1Y.js +++ b/examples/assets/index-DGT5XDSa.js @@ -1,8 +1,8 @@ -import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B as Kr,d as Go,P as ta,R as yt,s as qo,w as Yo}from"./index-B03kGVBW.js";import{C as ue,P as ri,c as Ce,D as ea,A as ia,I as na,R as oa,d as Xo,e as Jo,f as sa,g as ra,h as Qo,i as aa,j as la,k as Zo,l as Ko,m as ca,V as _n,n as Ti,G as Bn,F as da,L as ua,o as Un,O as ha,p as pa,q as ma,r as fa}from"./web-ifc-api-CpQ3aV8c.js";import{b as P,d as ba,G as ga}from"./index-lUHwa_Wd.js";var va=Object.defineProperty,ya=(e,t,i)=>t in e?va(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,It=(e,t,i)=>(ya(e,typeof t!="symbol"?t+"":t,i),i);const te=Math.min,mt=Math.max,fi=Math.round,Ct=e=>({x:e,y:e}),_a={left:"right",right:"left",bottom:"top",top:"bottom"},$a={start:"end",end:"start"};function Vn(e,t,i){return mt(e,te(t,i))}function Ge(e,t){return typeof e=="function"?e(t):e}function ft(e){return e.split("-")[0]}function Ni(e){return e.split("-")[1]}function ts(e){return e==="x"?"y":"x"}function es(e){return e==="y"?"height":"width"}function Ht(e){return["top","bottom"].includes(ft(e))?"y":"x"}function is(e){return ts(Ht(e))}function xa(e,t,i){i===void 0&&(i=!1);const n=Ni(e),o=is(e),s=es(o);let r=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=bi(r)),[r,bi(r)]}function wa(e){const t=bi(e);return[en(e),t,en(t)]}function en(e){return e.replace(/start|end/g,t=>$a[t])}function Ca(e,t,i){const n=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return i?t?o:n:t?n:o;case"left":case"right":return t?s:r;default:return[]}}function Aa(e,t,i,n){const o=Ni(e);let s=Ca(ft(e),i==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(en)))),s}function bi(e){return e.replace(/left|right|bottom|top/g,t=>_a[t])}function Ea(e){return{top:0,right:0,bottom:0,left:0,...e}}function ns(e){return typeof e!="number"?Ea(e):{top:e,right:e,bottom:e,left:e}}function ee(e){const{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function Wn(e,t,i){let{reference:n,floating:o}=e;const s=Ht(t),r=is(t),l=es(r),a=ft(t),d=s==="y",u=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2,h=n[l]/2-o[l]/2;let p;switch(a){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:c};break;case"left":p={x:n.x-o.width,y:c};break;default:p={x:n.x,y:n.y}}switch(Ni(t)){case"start":p[r]-=h*(i&&d?-1:1);break;case"end":p[r]+=h*(i&&d?-1:1);break}return p}const Sa=async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t));let d=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:c}=Wn(d,n,a),h=n,p={},b=0;for(let $=0;$w<=0)){var F,Y;const w=(((F=s.flip)==null?void 0:F.index)||0)+1,L=T[w];if(L)return{data:{index:w,overflows:E},reset:{placement:L}};let V=(Y=E.filter(K=>K.overflows[0]<=0).sort((K,tt)=>K.overflows[1]-tt.overflows[1])[0])==null?void 0:Y.placement;if(!V)switch(p){case"bestFit":{var G;const K=(G=E.filter(tt=>{if(C){const ct=Ht(tt.placement);return ct===y||ct==="y"}return!0}).map(tt=>[tt.placement,tt.overflows.filter(ct=>ct>0).reduce((ct,xe)=>ct+xe,0)]).sort((tt,ct)=>tt[1]-ct[1])[0])==null?void 0:G[0];K&&(V=K);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function ss(e){const t=te(...e.map(s=>s.left)),i=te(...e.map(s=>s.top)),n=mt(...e.map(s=>s.right)),o=mt(...e.map(s=>s.bottom));return{x:t,y:i,width:n-t,height:o-i}}function Oa(e){const t=e.slice().sort((o,s)=>o.y-s.y),i=[];let n=null;for(let o=0;on.height/2?i.push([s]):i[i.length-1].push(s),n=s}return i.map(o=>ee(ss(o)))}const Ta=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:n,rects:o,platform:s,strategy:r}=t,{padding:l=2,x:a,y:d}=Ge(e,t),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),c=Oa(u),h=ee(ss(u)),p=ns(l);function b(){if(c.length===2&&c[0].left>c[1].right&&a!=null&&d!=null)return c.find(v=>a>v.left-p.left&&av.top-p.top&&d=2){if(Ht(i)==="y"){const E=c[0],F=c[c.length-1],Y=ft(i)==="top",G=E.top,w=F.bottom,L=Y?E.left:F.left,V=Y?E.right:F.right,K=V-L,tt=w-G;return{top:G,bottom:w,left:L,right:V,width:K,height:tt,x:L,y:G}}const v=ft(i)==="left",f=mt(...c.map(E=>E.right)),y=te(...c.map(E=>E.left)),_=c.filter(E=>v?E.left===y:E.right===f),x=_[0].top,A=_[_.length-1].bottom,C=y,T=f,M=T-C,S=A-x;return{top:x,bottom:A,left:C,right:T,width:M,height:S,x:C,y:x}}return h}const $=await s.getElementRects({reference:{getBoundingClientRect:b},floating:n.floating,strategy:r});return o.reference.x!==$.reference.x||o.reference.y!==$.reference.y||o.reference.width!==$.reference.width||o.reference.height!==$.reference.height?{reset:{rects:$}}:{}}}};async function Na(e,t){const{placement:i,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=ft(i),l=Ni(i),a=Ht(i)==="y",d=["left","top"].includes(r)?-1:1,u=s&&a?-1:1,c=Ge(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof b=="number"&&(p=l==="end"?b*-1:b),a?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const rs=function(e){return{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:s,placement:r,middlewareData:l}=t,a=await Na(t,e);return r===((i=l.offset)==null?void 0:i.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:{...a,placement:r}}}}},Ia=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:v=>{let{x:f,y}=v;return{x:f,y}}},...a}=Ge(e,t),d={x:i,y:n},u=await os(t,a),c=Ht(ft(o)),h=ts(c);let p=d[h],b=d[c];if(s){const v=h==="y"?"top":"left",f=h==="y"?"bottom":"right",y=p+u[v],_=p-u[f];p=Vn(y,p,_)}if(r){const v=c==="y"?"top":"left",f=c==="y"?"bottom":"right",y=b+u[v],_=b-u[f];b=Vn(y,b,_)}const $=l.fn({...t,[h]:p,[c]:b});return{...$,data:{x:$.x-i,y:$.y-n,enabled:{[h]:s,[c]:r}}}}}};function Ii(){return typeof window<"u"}function At(e){return as(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(as(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function as(e){return Ii()?e instanceof Node||e instanceof Q(e).Node:!1}function dt(e){return Ii()?e instanceof Element||e instanceof Q(e).Element:!1}function ut(e){return Ii()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function Gn(e){return!Ii()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function qe(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!["inline","contents"].includes(o)}function Ma(e){return["table","td","th"].includes(At(e))}function Pa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function $n(e){const t=xn(),i=dt(e)?it(e):e;return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":!1)||!t&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!t&&(i.filter?i.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(i.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(i.contain||"").includes(n))}function Ra(e){let t=ie(e);for(;ut(t)&&!Mi(t);){if($n(t))return t;if(Pa(t))return null;t=ie(t)}return null}function xn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Mi(e){return["html","body","#document"].includes(At(e))}function it(e){return Q(e).getComputedStyle(e)}function Pi(e){return dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ie(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gn(e)&&e.host||St(e);return Gn(t)?t.host:t}function ls(e){const t=ie(e);return Mi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&qe(t)?t:ls(t)}function nn(e,t,i){var n;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=ls(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),r=Q(o);if(s){const l=La(r);return t.concat(r,r.visualViewport||[],qe(o)?o:[],l&&i?nn(l):[])}return t.concat(o,nn(o,[],i))}function La(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cs(e){const t=it(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=ut(e),s=o?e.offsetWidth:i,r=o?e.offsetHeight:n,l=fi(i)!==s||fi(n)!==r;return l&&(i=s,n=r),{width:i,height:n,$:l}}function ds(e){return dt(e)?e:e.contextElement}function Qt(e){const t=ds(e);if(!ut(t))return Ct(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=cs(t);let r=(s?fi(i.width):i.width)/n,l=(s?fi(i.height):i.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const ja=Ct(0);function us(e){const t=Q(e);return!xn()||!t.visualViewport?ja:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function za(e,t,i){return t===void 0&&(t=!1),!i||t&&i!==Q(e)?!1:t}function Re(e,t,i,n){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),s=ds(e);let r=Ct(1);t&&(n?dt(n)&&(r=Qt(n)):r=Qt(e));const l=za(s,i,n)?us(s):Ct(0);let a=(o.left+l.x)/r.x,d=(o.top+l.y)/r.y,u=o.width/r.x,c=o.height/r.y;if(s){const h=Q(s),p=n&&dt(n)?Q(n):n;let b=h,$=b.frameElement;for(;$&&n&&p!==b;){const v=Qt($),f=$.getBoundingClientRect(),y=it($),_=f.left+($.clientLeft+parseFloat(y.paddingLeft))*v.x,x=f.top+($.clientTop+parseFloat(y.paddingTop))*v.y;a*=v.x,d*=v.y,u*=v.x,c*=v.y,a+=_,d+=x,b=Q($),$=b.frameElement}}return ee({width:u,height:c,x:a,y:d})}const Da=[":popover-open",":modal"];function hs(e){return Da.some(t=>{try{return e.matches(t)}catch{return!1}})}function Ha(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s=o==="fixed",r=St(n),l=t?hs(t.floating):!1;if(n===r||l&&s)return i;let a={scrollLeft:0,scrollTop:0},d=Ct(1);const u=Ct(0),c=ut(n);if((c||!c&&!s)&&((At(n)!=="body"||qe(r))&&(a=Pi(n)),ut(n))){const h=Re(n);d=Qt(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-a.scrollLeft*d.x+u.x,y:i.y*d.y-a.scrollTop*d.y+u.y}}function Fa(e){return Array.from(e.getClientRects())}function ps(e){return Re(St(e)).left+Pi(e).scrollLeft}function Ba(e){const t=St(e),i=Pi(e),n=e.ownerDocument.body,o=mt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=mt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+ps(e);const l=-i.scrollTop;return it(n).direction==="rtl"&&(r+=mt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:r,y:l}}function Ua(e,t){const i=Q(e),n=St(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;const d=xn();(!d||d&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function Va(e,t){const i=Re(e,!0,t==="fixed"),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=ut(e)?Qt(e):Ct(1),r=e.clientWidth*s.x,l=e.clientHeight*s.y,a=o*s.x,d=n*s.y;return{width:r,height:l,x:a,y:d}}function qn(e,t,i){let n;if(t==="viewport")n=Ua(e,i);else if(t==="document")n=Ba(St(e));else if(dt(t))n=Va(t,i);else{const o=us(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return ee(n)}function ms(e,t){const i=ie(e);return i===t||!dt(i)||Mi(i)?!1:it(i).position==="fixed"||ms(i,t)}function Wa(e,t){const i=t.get(e);if(i)return i;let n=nn(e,[],!1).filter(l=>dt(l)&&At(l)!=="body"),o=null;const s=it(e).position==="fixed";let r=s?ie(e):e;for(;dt(r)&&!Mi(r);){const l=it(r),a=$n(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&o&&["absolute","fixed"].includes(o.position)||qe(r)&&!a&&ms(e,r))?n=n.filter(d=>d!==r):o=l,r=ie(r)}return t.set(e,n),n}function Ga(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const s=[...i==="clippingAncestors"?Wa(t,this._c):[].concat(i),n],r=s[0],l=s.reduce((a,d)=>{const u=qn(t,d,o);return a.top=mt(u.top,a.top),a.right=te(u.right,a.right),a.bottom=te(u.bottom,a.bottom),a.left=mt(u.left,a.left),a},qn(t,r,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qa(e){const{width:t,height:i}=cs(e);return{width:t,height:i}}function Ya(e,t,i){const n=ut(t),o=St(t),s=i==="fixed",r=Re(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=Ct(0);if(n||!n&&!s)if((At(t)!=="body"||qe(o))&&(l=Pi(t)),n){const c=Re(t,!0,s,t);a.x=c.x+t.clientLeft,a.y=c.y+t.clientTop}else o&&(a.x=ps(o));const d=r.left+l.scrollLeft-a.x,u=r.top+l.scrollTop-a.y;return{x:d,y:u,width:r.width,height:r.height}}function Yn(e,t){return!ut(e)||it(e).position==="fixed"?null:t?t(e):e.offsetParent}function fs(e,t){const i=Q(e);if(!ut(e)||hs(e))return i;let n=Yn(e,t);for(;n&&Ma(n)&&it(n).position==="static";)n=Yn(n,t);return n&&(At(n)==="html"||At(n)==="body"&&it(n).position==="static"&&!$n(n))?i:n||Ra(e)||i}const Xa=async function(e){const t=this.getOffsetParent||fs,i=this.getDimensions;return{reference:Ya(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await i(e.floating)}}};function Ja(e){return it(e).direction==="rtl"}const Qa={convertOffsetParentRelativeRectToViewportRelativeRect:Ha,getDocumentElement:St,getClippingRect:Ga,getOffsetParent:fs,getElementRects:Xa,getClientRects:Fa,getDimensions:qa,getScale:Qt,isElement:dt,isRTL:Ja},bs=Ia,gs=ka,vs=Ta,ys=(e,t,i)=>{const n=new Map,o={platform:Qa,...i},s={...o.platform,_c:n};return Sa(e,t,{...o,platform:s})};/** +import{I as Qr,V as yn,B as ki,W as Oi,G as Wo,f as Zr,F as Vt,g as ht,h as mi,c as Kr,H as Go,i as ta,T as yt,S as qo,O as Yo}from"./index-C8rcJyf0.js";import{C as ue,P as ri,c as Ce,D as ea,A as ia,I as na,R as oa,d as Xo,e as Jo,f as sa,g as ra,h as Qo,i as aa,j as la,k as Zo,l as Ko,m as ca,V as _n,n as Ti,G as Bn,F as da,L as ua,o as Un,O as ha,p as pa,q as ma,r as fa}from"./web-ifc-api-nU1-R_1k.js";import{L as P,p as ba,j as ga}from"./index-BdoCSKf7.js";var va=Object.defineProperty,ya=(e,t,i)=>t in e?va(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Nt=(e,t,i)=>(ya(e,typeof t!="symbol"?t+"":t,i),i);const te=Math.min,mt=Math.max,fi=Math.round,Ct=e=>({x:e,y:e}),_a={left:"right",right:"left",bottom:"top",top:"bottom"},$a={start:"end",end:"start"};function Vn(e,t,i){return mt(e,te(t,i))}function Ge(e,t){return typeof e=="function"?e(t):e}function ft(e){return e.split("-")[0]}function Ii(e){return e.split("-")[1]}function ts(e){return e==="x"?"y":"x"}function es(e){return e==="y"?"height":"width"}function Ht(e){return["top","bottom"].includes(ft(e))?"y":"x"}function is(e){return ts(Ht(e))}function xa(e,t,i){i===void 0&&(i=!1);const n=Ii(e),o=is(e),s=es(o);let r=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=bi(r)),[r,bi(r)]}function wa(e){const t=bi(e);return[en(e),t,en(t)]}function en(e){return e.replace(/start|end/g,t=>$a[t])}function Ca(e,t,i){const n=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return i?t?o:n:t?n:o;case"left":case"right":return t?s:r;default:return[]}}function Aa(e,t,i,n){const o=Ii(e);let s=Ca(ft(e),i==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(en)))),s}function bi(e){return e.replace(/left|right|bottom|top/g,t=>_a[t])}function Ea(e){return{top:0,right:0,bottom:0,left:0,...e}}function ns(e){return typeof e!="number"?Ea(e):{top:e,right:e,bottom:e,left:e}}function ee(e){const{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function Wn(e,t,i){let{reference:n,floating:o}=e;const s=Ht(t),r=is(t),l=es(r),a=ft(t),d=s==="y",u=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2,h=n[l]/2-o[l]/2;let p;switch(a){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:c};break;case"left":p={x:n.x-o.width,y:c};break;default:p={x:n.x,y:n.y}}switch(Ii(t)){case"start":p[r]-=h*(i&&d?-1:1);break;case"end":p[r]+=h*(i&&d?-1:1);break}return p}const Sa=async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t));let d=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:c}=Wn(d,n,a),h=n,p={},b=0;for(let $=0;$w<=0)){var F,Y;const w=(((F=s.flip)==null?void 0:F.index)||0)+1,L=T[w];if(L)return{data:{index:w,overflows:E},reset:{placement:L}};let V=(Y=E.filter(K=>K.overflows[0]<=0).sort((K,tt)=>K.overflows[1]-tt.overflows[1])[0])==null?void 0:Y.placement;if(!V)switch(p){case"bestFit":{var G;const K=(G=E.filter(tt=>{if(C){const ct=Ht(tt.placement);return ct===y||ct==="y"}return!0}).map(tt=>[tt.placement,tt.overflows.filter(ct=>ct>0).reduce((ct,xe)=>ct+xe,0)]).sort((tt,ct)=>tt[1]-ct[1])[0])==null?void 0:G[0];K&&(V=K);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function ss(e){const t=te(...e.map(s=>s.left)),i=te(...e.map(s=>s.top)),n=mt(...e.map(s=>s.right)),o=mt(...e.map(s=>s.bottom));return{x:t,y:i,width:n-t,height:o-i}}function Oa(e){const t=e.slice().sort((o,s)=>o.y-s.y),i=[];let n=null;for(let o=0;on.height/2?i.push([s]):i[i.length-1].push(s),n=s}return i.map(o=>ee(ss(o)))}const Ta=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:n,rects:o,platform:s,strategy:r}=t,{padding:l=2,x:a,y:d}=Ge(e,t),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),c=Oa(u),h=ee(ss(u)),p=ns(l);function b(){if(c.length===2&&c[0].left>c[1].right&&a!=null&&d!=null)return c.find(v=>a>v.left-p.left&&av.top-p.top&&d=2){if(Ht(i)==="y"){const E=c[0],F=c[c.length-1],Y=ft(i)==="top",G=E.top,w=F.bottom,L=Y?E.left:F.left,V=Y?E.right:F.right,K=V-L,tt=w-G;return{top:G,bottom:w,left:L,right:V,width:K,height:tt,x:L,y:G}}const v=ft(i)==="left",f=mt(...c.map(E=>E.right)),y=te(...c.map(E=>E.left)),_=c.filter(E=>v?E.left===y:E.right===f),x=_[0].top,A=_[_.length-1].bottom,C=y,T=f,M=T-C,S=A-x;return{top:x,bottom:A,left:C,right:T,width:M,height:S,x:C,y:x}}return h}const $=await s.getElementRects({reference:{getBoundingClientRect:b},floating:n.floating,strategy:r});return o.reference.x!==$.reference.x||o.reference.y!==$.reference.y||o.reference.width!==$.reference.width||o.reference.height!==$.reference.height?{reset:{rects:$}}:{}}}};async function Ia(e,t){const{placement:i,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=ft(i),l=Ii(i),a=Ht(i)==="y",d=["left","top"].includes(r)?-1:1,u=s&&a?-1:1,c=Ge(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof b=="number"&&(p=l==="end"?b*-1:b),a?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const rs=function(e){return{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:s,placement:r,middlewareData:l}=t,a=await Ia(t,e);return r===((i=l.offset)==null?void 0:i.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:{...a,placement:r}}}}},Na=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:v=>{let{x:f,y}=v;return{x:f,y}}},...a}=Ge(e,t),d={x:i,y:n},u=await os(t,a),c=Ht(ft(o)),h=ts(c);let p=d[h],b=d[c];if(s){const v=h==="y"?"top":"left",f=h==="y"?"bottom":"right",y=p+u[v],_=p-u[f];p=Vn(y,p,_)}if(r){const v=c==="y"?"top":"left",f=c==="y"?"bottom":"right",y=b+u[v],_=b-u[f];b=Vn(y,b,_)}const $=l.fn({...t,[h]:p,[c]:b});return{...$,data:{x:$.x-i,y:$.y-n,enabled:{[h]:s,[c]:r}}}}}};function Ni(){return typeof window<"u"}function At(e){return as(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(as(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function as(e){return Ni()?e instanceof Node||e instanceof Q(e).Node:!1}function dt(e){return Ni()?e instanceof Element||e instanceof Q(e).Element:!1}function ut(e){return Ni()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function Gn(e){return!Ni()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function qe(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!["inline","contents"].includes(o)}function Ma(e){return["table","td","th"].includes(At(e))}function Pa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function $n(e){const t=xn(),i=dt(e)?it(e):e;return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":!1)||!t&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!t&&(i.filter?i.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(i.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(i.contain||"").includes(n))}function Ra(e){let t=ie(e);for(;ut(t)&&!Mi(t);){if($n(t))return t;if(Pa(t))return null;t=ie(t)}return null}function xn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Mi(e){return["html","body","#document"].includes(At(e))}function it(e){return Q(e).getComputedStyle(e)}function Pi(e){return dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ie(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gn(e)&&e.host||St(e);return Gn(t)?t.host:t}function ls(e){const t=ie(e);return Mi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&qe(t)?t:ls(t)}function nn(e,t,i){var n;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=ls(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),r=Q(o);if(s){const l=La(r);return t.concat(r,r.visualViewport||[],qe(o)?o:[],l&&i?nn(l):[])}return t.concat(o,nn(o,[],i))}function La(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cs(e){const t=it(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=ut(e),s=o?e.offsetWidth:i,r=o?e.offsetHeight:n,l=fi(i)!==s||fi(n)!==r;return l&&(i=s,n=r),{width:i,height:n,$:l}}function ds(e){return dt(e)?e:e.contextElement}function Qt(e){const t=ds(e);if(!ut(t))return Ct(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=cs(t);let r=(s?fi(i.width):i.width)/n,l=(s?fi(i.height):i.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const ja=Ct(0);function us(e){const t=Q(e);return!xn()||!t.visualViewport?ja:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function za(e,t,i){return t===void 0&&(t=!1),!i||t&&i!==Q(e)?!1:t}function Re(e,t,i,n){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),s=ds(e);let r=Ct(1);t&&(n?dt(n)&&(r=Qt(n)):r=Qt(e));const l=za(s,i,n)?us(s):Ct(0);let a=(o.left+l.x)/r.x,d=(o.top+l.y)/r.y,u=o.width/r.x,c=o.height/r.y;if(s){const h=Q(s),p=n&&dt(n)?Q(n):n;let b=h,$=b.frameElement;for(;$&&n&&p!==b;){const v=Qt($),f=$.getBoundingClientRect(),y=it($),_=f.left+($.clientLeft+parseFloat(y.paddingLeft))*v.x,x=f.top+($.clientTop+parseFloat(y.paddingTop))*v.y;a*=v.x,d*=v.y,u*=v.x,c*=v.y,a+=_,d+=x,b=Q($),$=b.frameElement}}return ee({width:u,height:c,x:a,y:d})}const Da=[":popover-open",":modal"];function hs(e){return Da.some(t=>{try{return e.matches(t)}catch{return!1}})}function Ha(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s=o==="fixed",r=St(n),l=t?hs(t.floating):!1;if(n===r||l&&s)return i;let a={scrollLeft:0,scrollTop:0},d=Ct(1);const u=Ct(0),c=ut(n);if((c||!c&&!s)&&((At(n)!=="body"||qe(r))&&(a=Pi(n)),ut(n))){const h=Re(n);d=Qt(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-a.scrollLeft*d.x+u.x,y:i.y*d.y-a.scrollTop*d.y+u.y}}function Fa(e){return Array.from(e.getClientRects())}function ps(e){return Re(St(e)).left+Pi(e).scrollLeft}function Ba(e){const t=St(e),i=Pi(e),n=e.ownerDocument.body,o=mt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=mt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+ps(e);const l=-i.scrollTop;return it(n).direction==="rtl"&&(r+=mt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:r,y:l}}function Ua(e,t){const i=Q(e),n=St(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;const d=xn();(!d||d&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function Va(e,t){const i=Re(e,!0,t==="fixed"),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=ut(e)?Qt(e):Ct(1),r=e.clientWidth*s.x,l=e.clientHeight*s.y,a=o*s.x,d=n*s.y;return{width:r,height:l,x:a,y:d}}function qn(e,t,i){let n;if(t==="viewport")n=Ua(e,i);else if(t==="document")n=Ba(St(e));else if(dt(t))n=Va(t,i);else{const o=us(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return ee(n)}function ms(e,t){const i=ie(e);return i===t||!dt(i)||Mi(i)?!1:it(i).position==="fixed"||ms(i,t)}function Wa(e,t){const i=t.get(e);if(i)return i;let n=nn(e,[],!1).filter(l=>dt(l)&&At(l)!=="body"),o=null;const s=it(e).position==="fixed";let r=s?ie(e):e;for(;dt(r)&&!Mi(r);){const l=it(r),a=$n(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&o&&["absolute","fixed"].includes(o.position)||qe(r)&&!a&&ms(e,r))?n=n.filter(d=>d!==r):o=l,r=ie(r)}return t.set(e,n),n}function Ga(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const s=[...i==="clippingAncestors"?Wa(t,this._c):[].concat(i),n],r=s[0],l=s.reduce((a,d)=>{const u=qn(t,d,o);return a.top=mt(u.top,a.top),a.right=te(u.right,a.right),a.bottom=te(u.bottom,a.bottom),a.left=mt(u.left,a.left),a},qn(t,r,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qa(e){const{width:t,height:i}=cs(e);return{width:t,height:i}}function Ya(e,t,i){const n=ut(t),o=St(t),s=i==="fixed",r=Re(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=Ct(0);if(n||!n&&!s)if((At(t)!=="body"||qe(o))&&(l=Pi(t)),n){const c=Re(t,!0,s,t);a.x=c.x+t.clientLeft,a.y=c.y+t.clientTop}else o&&(a.x=ps(o));const d=r.left+l.scrollLeft-a.x,u=r.top+l.scrollTop-a.y;return{x:d,y:u,width:r.width,height:r.height}}function Yn(e,t){return!ut(e)||it(e).position==="fixed"?null:t?t(e):e.offsetParent}function fs(e,t){const i=Q(e);if(!ut(e)||hs(e))return i;let n=Yn(e,t);for(;n&&Ma(n)&&it(n).position==="static";)n=Yn(n,t);return n&&(At(n)==="html"||At(n)==="body"&&it(n).position==="static"&&!$n(n))?i:n||Ra(e)||i}const Xa=async function(e){const t=this.getOffsetParent||fs,i=this.getDimensions;return{reference:Ya(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await i(e.floating)}}};function Ja(e){return it(e).direction==="rtl"}const Qa={convertOffsetParentRelativeRectToViewportRelativeRect:Ha,getDocumentElement:St,getClippingRect:Ga,getOffsetParent:fs,getElementRects:Xa,getClientRects:Fa,getDimensions:qa,getScale:Qt,isElement:dt,isRTL:Ja},bs=Na,gs=ka,vs=Ta,ys=(e,t,i)=>{const n=new Map,o={platform:Qa,...i},s={...o.platform,_c:n};return Sa(e,t,{...o,platform:s})};/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const di=globalThis,wn=di.ShadowRoot&&(di.ShadyCSS===void 0||di.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Cn=Symbol(),Xn=new WeakMap;let _s=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Cn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(wn&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Xn.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Xn.set(t,e))}return e}toString(){return this.cssText}};const Za=e=>new _s(typeof e=="string"?e:e+"",void 0,Cn),N=(e,...t)=>{const i=e.length===1?e[0]:t.reduce((n,o,s)=>n+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[s+1],e[0]);return new _s(i,e,Cn)},Ka=(e,t)=>{if(wn)e.adoptedStyleSheets=t.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(const i of t){const n=document.createElement("style"),o=di.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=i.cssText,e.appendChild(n)}},Jn=wn?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let i="";for(const n of t.cssRules)i+=n.cssText;return Za(i)})(e):e;/** + */const di=globalThis,wn=di.ShadowRoot&&(di.ShadyCSS===void 0||di.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Cn=Symbol(),Xn=new WeakMap;let _s=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Cn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(wn&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Xn.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Xn.set(t,e))}return e}toString(){return this.cssText}};const Za=e=>new _s(typeof e=="string"?e:e+"",void 0,Cn),I=(e,...t)=>{const i=e.length===1?e[0]:t.reduce((n,o,s)=>n+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[s+1],e[0]);return new _s(i,e,Cn)},Ka=(e,t)=>{if(wn)e.adoptedStyleSheets=t.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(const i of t){const n=document.createElement("style"),o=di.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=i.cssText,e.appendChild(n)}},Jn=wn?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let i="";for(const n of t.cssRules)i+=n.cssText;return Za(i)})(e):e;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause @@ -50,7 +50,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B * * @license MIT * @version 2.0.0 -*/const Os=Object.freeze({left:0,top:0,width:16,height:16}),$i=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Xe=Object.freeze({...Os,...$i}),on=Object.freeze({...Xe,body:"",hidden:!1}),Cl=Object.freeze({width:null,height:null}),Ts=Object.freeze({...Cl,...$i});function Al(e,t=0){const i=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(i===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(i!==e){let o=0;switch(i){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-i.length));return isNaN(s)?0:(s=s/o,s%1===0?n(s):0)}}return t}const El=/[\s,]+/;function Sl(e,t){t.split(El).forEach(i=>{switch(i.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Ns={...Ts,preserveAspectRatio:""};function co(e){const t={...Ns},i=(n,o)=>e.getAttribute(n)||o;return t.width=i("width",null),t.height=i("height",null),t.rotate=Al(i("rotate","")),Sl(t,i("flip","")),t.preserveAspectRatio=i("preserveAspectRatio",i("preserveaspectratio","")),t}function kl(e,t){for(const i in Ns)if(e[i]!==t[i])return!0;return!1}const Ne=/^[a-z0-9]+(-[a-z0-9]+)*$/,Je=(e,t,i,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),a=o.pop(),d={provider:o.length>0?o[0]:n,prefix:a,name:l};return t&&!ui(d)?null:d}const s=o[0],r=s.split("-");if(r.length>1){const l={provider:n,prefix:r.shift(),name:r.join("-")};return t&&!ui(l)?null:l}if(i&&n===""){const l={provider:n,prefix:"",name:s};return t&&!ui(l,i)?null:l}return null},ui=(e,t)=>e?!!((e.provider===""||e.provider.match(Ne))&&(t&&e.prefix===""||e.prefix.match(Ne))&&e.name.match(Ne)):!1;function Ol(e,t){const i={};!e.hFlip!=!t.hFlip&&(i.hFlip=!0),!e.vFlip!=!t.vFlip&&(i.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(i.rotate=n),i}function uo(e,t){const i=Ol(e,t);for(const n in on)n in $i?n in e&&!(n in i)&&(i[n]=$i[n]):n in t?i[n]=t[n]:n in e&&(i[n]=e[n]);return i}function Tl(e,t){const i=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function s(r){if(i[r])return o[r]=[];if(!(r in o)){o[r]=null;const l=n[r]&&n[r].parent,a=l&&s(l);a&&(o[r]=[l].concat(a))}return o[r]}return Object.keys(i).concat(Object.keys(n)).forEach(s),o}function Nl(e,t,i){const n=e.icons,o=e.aliases||Object.create(null);let s={};function r(l){s=uo(n[l]||o[l],s)}return r(t),i.forEach(r),uo(e,s)}function Is(e,t){const i=[];if(typeof e!="object"||typeof e.icons!="object")return i;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),i.push(o)});const n=Tl(e);for(const o in n){const s=n[o];s&&(t(o,Nl(e,o,s)),i.push(o))}return i}const Il={provider:"",aliases:{},not_found:{},...Os};function Xi(e,t){for(const i in t)if(i in e&&typeof e[i]!=typeof t[i])return!1;return!0}function Ms(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Xi(e,Il))return null;const i=t.icons;for(const o in i){const s=i[o];if(!o.match(Ne)||typeof s.body!="string"||!Xi(s,on))return null}const n=t.aliases||Object.create(null);for(const o in n){const s=n[o],r=s.parent;if(!o.match(Ne)||typeof r!="string"||!i[r]&&!n[r]||!Xi(s,on))return null}return t}const xi=Object.create(null);function Ml(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Et(e,t){const i=xi[e]||(xi[e]=Object.create(null));return i[t]||(i[t]=Ml(e,t))}function Sn(e,t){return Ms(t)?Is(t,(i,n)=>{n?e.icons[i]=n:e.missing.add(i)}):[]}function Pl(e,t,i){try{if(typeof i.body=="string")return e.icons[t]={...i},!0}catch{}return!1}function Rl(e,t){let i=[];return(typeof e=="string"?[e]:Object.keys(xi)).forEach(n=>{(typeof n=="string"&&typeof t=="string"?[t]:Object.keys(xi[n]||{})).forEach(o=>{const s=Et(n,o);i=i.concat(Object.keys(s.icons).map(r=>(n!==""?"@"+n+":":"")+o+":"+r))})}),i}let De=!1;function Ps(e){return typeof e=="boolean"&&(De=e),De}function He(e){const t=typeof e=="string"?Je(e,!0,De):e;if(t){const i=Et(t.provider,t.prefix),n=t.name;return i.icons[n]||(i.missing.has(n)?null:void 0)}}function Rs(e,t){const i=Je(e,!0,De);if(!i)return!1;const n=Et(i.provider,i.prefix);return Pl(n,i.name,t)}function ho(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),De&&!t&&!e.prefix){let o=!1;return Ms(e)&&(e.prefix="",Is(e,(s,r)=>{r&&Rs(s,r)&&(o=!0)})),o}const i=e.prefix;if(!ui({provider:t,prefix:i,name:"a"}))return!1;const n=Et(t,i);return!!Sn(n,e)}function po(e){return!!He(e)}function Ll(e){const t=He(e);return t?{...Xe,...t}:null}function jl(e){const t={loaded:[],missing:[],pending:[]},i=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const s=o.provider,r=o.prefix,l=o.name,a=i[s]||(i[s]=Object.create(null)),d=a[r]||(a[r]=Et(s,r));let u;l in d.icons?u=t.loaded:r===""||d.missing.has(l)?u=t.missing:u=t.pending;const c={provider:s,prefix:r,name:l};u.push(c)}),t}function Ls(e,t){e.forEach(i=>{const n=i.loaderCallbacks;n&&(i.loaderCallbacks=n.filter(o=>o.id!==t))})}function zl(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let i=!1;const n=e.provider,o=e.prefix;t.forEach(s=>{const r=s.icons,l=r.pending.length;r.pending=r.pending.filter(a=>{if(a.prefix!==o)return!0;const d=a.name;if(e.icons[d])r.loaded.push({provider:n,prefix:o,name:d});else if(e.missing.has(d))r.missing.push({provider:n,prefix:o,name:d});else return i=!0,!0;return!1}),r.pending.length!==l&&(i||Ls([e],s.id),s.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),s.abort))})}))}let Dl=0;function Hl(e,t,i){const n=Dl++,o=Ls.bind(null,i,n);if(!t.pending.length)return o;const s={id:n,icons:t,callback:e,abort:o};return i.forEach(r=>{(r.loaderCallbacks||(r.loaderCallbacks=[])).push(s)}),o}const sn=Object.create(null);function mo(e,t){sn[e]=t}function rn(e){return sn[e]||sn[""]}function Fl(e,t=!0,i=!1){const n=[];return e.forEach(o=>{const s=typeof o=="string"?Je(o,t,i):o;s&&n.push(s)}),n}var Bl={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ul(e,t,i,n){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let r;if(e.random){let C=e.resources.slice(0);for(r=[];C.length>1;){const T=Math.floor(Math.random()*C.length);r.push(C[T]),C=C.slice(0,T).concat(C.slice(T+1))}r=r.concat(C)}else r=e.resources.slice(s).concat(e.resources.slice(0,s));const l=Date.now();let a="pending",d=0,u,c=null,h=[],p=[];typeof n=="function"&&p.push(n);function b(){c&&(clearTimeout(c),c=null)}function $(){a==="pending"&&(a="aborted"),b(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function v(C,T){T&&(p=[]),typeof C=="function"&&p.push(C)}function f(){return{startTime:l,payload:t,status:a,queriesSent:d,queriesPending:h.length,subscribe:v,abort:$}}function y(){a="failed",p.forEach(C=>{C(void 0,u)})}function _(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function x(C,T,M){const S=T!=="success";switch(h=h.filter(E=>E!==C),a){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){u=M,y();return}if(S){u=M,h.length||(r.length?A():y());return}if(b(),_(),!e.random){const E=e.resources.indexOf(C.resource);E!==-1&&E!==e.index&&(e.index=E)}a="completed",p.forEach(E=>{E(M)})}function A(){if(a!=="pending")return;b();const C=r.shift();if(C===void 0){if(h.length){c=setTimeout(()=>{b(),a==="pending"&&(_(),y())},e.timeout);return}y();return}const T={status:"pending",resource:C,callback:(M,S)=>{x(T,M,S)}};h.push(T),d++,c=setTimeout(A,e.rotate),i(C,t,T.callback)}return setTimeout(A),f}function js(e){const t={...Bl,...e};let i=[];function n(){i=i.filter(r=>r().status==="pending")}function o(r,l,a){const d=Ul(t,r,l,(u,c)=>{n(),a&&a(u,c)});return i.push(d),d}function s(r){return i.find(l=>r(l))||null}return{query:o,find:s,setIndex:r=>{t.index=r},getIndex:()=>t.index,cleanup:n}}function kn(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Li=Object.create(null),ai=["https://api.simplesvg.com","https://api.unisvg.com"],an=[];for(;ai.length>0;)ai.length===1||Math.random()>.5?an.push(ai.shift()):an.push(ai.pop());Li[""]=kn({resources:["https://api.iconify.design"].concat(an)});function fo(e,t){const i=kn(t);return i===null?!1:(Li[e]=i,!0)}function ji(e){return Li[e]}function Vl(){return Object.keys(Li)}function bo(){}const Ji=Object.create(null);function Wl(e){if(!Ji[e]){const t=ji(e);if(!t)return;const i=js(t),n={config:t,redundancy:i};Ji[e]=n}return Ji[e]}function zs(e,t,i){let n,o;if(typeof e=="string"){const s=rn(e);if(!s)return i(void 0,424),bo;o=s.send;const r=Wl(e);r&&(n=r.redundancy)}else{const s=kn(e);if(s){n=js(s);const r=e.resources?e.resources[0]:"",l=rn(r);l&&(o=l.send)}}return!n||!o?(i(void 0,424),bo):n.query(t,o,i)().abort}const go="iconify2",Fe="iconify",Ds=Fe+"-count",vo=Fe+"-version",Hs=36e5,Gl=168,ql=50;function ln(e,t){try{return e.getItem(t)}catch{}}function On(e,t,i){try{return e.setItem(t,i),!0}catch{}}function yo(e,t){try{e.removeItem(t)}catch{}}function cn(e,t){return On(e,Ds,t.toString())}function dn(e){return parseInt(ln(e,Ds))||0}const jt={local:!0,session:!0},Fs={local:new Set,session:new Set};let Tn=!1;function Yl(e){Tn=e}let li=typeof window>"u"?{}:window;function Bs(e){const t=e+"Storage";try{if(li&&li[t]&&typeof li[t].length=="number")return li[t]}catch{}jt[e]=!1}function Us(e,t){const i=Bs(e);if(!i)return;const n=ln(i,vo);if(n!==go){if(n){const l=dn(i);for(let a=0;a{const a=Fe+l.toString(),d=ln(i,a);if(typeof d=="string"){try{const u=JSON.parse(d);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,l))return!0}catch{}yo(i,a)}};let r=dn(i);for(let l=r-1;l>=0;l--)s(l)||(l===r-1?(r--,cn(i,r)):Fs[e].add(l))}function Vs(){if(!Tn){Yl(!0);for(const e in jt)Us(e,t=>{const i=t.data,n=t.provider,o=i.prefix,s=Et(n,o);if(!Sn(s,i).length)return!1;const r=i.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,r):r,!0})}}function Xl(e,t){const i=e.lastModifiedCached;if(i&&i>=t)return i===t;if(e.lastModifiedCached=t,i)for(const n in jt)Us(n,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function Jl(e,t){Tn||Vs();function i(n){let o;if(!jt[n]||!(o=Bs(n)))return;const s=Fs[n];let r;if(s.size)s.delete(r=Array.from(s).shift());else if(r=dn(o),r>=ql||!cn(o,r+1))return;const l={cached:Math.floor(Date.now()/Hs),provider:e.provider,data:t};return On(o,Fe+r.toString(),JSON.stringify(l))}t.lastModified&&!Xl(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),i("local")||i("session"))}function _o(){}function Ql(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,zl(e)}))}function Zl(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:i,prefix:n}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;!o||!(s=rn(i))||s.prepare(i,n,o).forEach(r=>{zs(i,r,l=>{if(typeof l!="object")r.icons.forEach(a=>{e.missing.add(a)});else try{const a=Sn(e,l);if(!a.length)return;const d=e.pendingIcons;d&&a.forEach(u=>{d.delete(u)}),Jl(e,l)}catch(a){console.error(a)}Ql(e)})})}))}const Nn=(e,t)=>{const i=Fl(e,!0,Ps()),n=jl(i);if(!n.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(n.loaded,n.missing,n.pending,_o)}),()=>{a=!1}}const o=Object.create(null),s=[];let r,l;return n.pending.forEach(a=>{const{provider:d,prefix:u}=a;if(u===l&&d===r)return;r=d,l=u,s.push(Et(d,u));const c=o[d]||(o[d]=Object.create(null));c[u]||(c[u]=[])}),n.pending.forEach(a=>{const{provider:d,prefix:u,name:c}=a,h=Et(d,u),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(c)||(p.add(c),o[d][u].push(c))}),s.forEach(a=>{const{provider:d,prefix:u}=a;o[d][u].length&&Zl(a,o[d][u])}),t?Hl(t,n,s):_o},Kl=e=>new Promise((t,i)=>{const n=typeof e=="string"?Je(e,!0):e;if(!n){i(e);return}Nn([n||e],o=>{if(o.length&&n){const s=He(n);if(s){t({...Xe,...s});return}}i(e)})});function tc(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function ec(e,t){const i=typeof e=="string"?Je(e,!0,!0):null;if(!i){const s=tc(e);return{value:e,data:s}}const n=He(i);if(n!==void 0||!i.prefix)return{value:e,name:i,data:n};const o=Nn([i],()=>t(e,i,He(i)));return{value:e,name:i,loading:o}}function Qi(e){return e.hasAttribute("inline")}let Ws=!1;try{Ws=navigator.vendor.indexOf("Apple")===0}catch{}function ic(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(Ws||e.indexOf("=0;){const o=e.indexOf(">",n),s=e.indexOf("",s);if(r===-1)break;i+=e.slice(o+1,s).trim(),e=e.slice(0,n).trim()+e.slice(r+1)}return{defs:i,content:e}}function rc(e,t){return e?""+e+""+t:t}function ac(e,t,i){const n=sc(e);return rc(n.defs,t+n.content+i)}const lc=e=>e==="unset"||e==="undefined"||e==="none";function Gs(e,t){const i={...Xe,...e},n={...Ts,...t},o={left:i.left,top:i.top,width:i.width,height:i.height};let s=i.body;[i,n].forEach($=>{const v=[],f=$.hFlip,y=$.vFlip;let _=$.rotate;f?y?_+=2:(v.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),v.push("scale(-1 1)"),o.top=o.left=0):y&&(v.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),v.push("scale(1 -1)"),o.top=o.left=0);let x;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:x=o.height/2+o.top,v.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:v.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:x=o.width/2+o.left,v.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}_%2===1&&(o.left!==o.top&&(x=o.left,o.left=o.top,o.top=x),o.width!==o.height&&(x=o.width,o.width=o.height,o.height=x)),v.length&&(s=ac(s,'',""))});const r=n.width,l=n.height,a=o.width,d=o.height;let u,c;r===null?(c=l===null?"1em":l==="auto"?d:l,u=un(c,a/d)):(u=r==="auto"?a:r,c=l===null?un(u,d/a):l==="auto"?d:l);const h={},p=($,v)=>{lc(v)||(h[$]=v.toString())};p("width",u),p("height",c);const b=[o.left,o.top,a,d];return h.viewBox=b.join(" "),{attributes:h,viewBox:b,body:s}}function In(e,t){let i=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)i+=" "+n+'="'+t[n]+'"';return'"+e+""}function cc(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function dc(e){return"data:image/svg+xml,"+cc(e)}function qs(e){return'url("'+dc(e)+'")'}const uc=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let wi=uc();function hc(e){wi=e}function pc(){return wi}function mc(e,t){const i=ji(e);if(!i)return 0;let n;if(!i.maxURL)n=0;else{let o=0;i.resources.forEach(r=>{o=Math.max(o,r.length)});const s=t+".json?icons=";n=i.maxURL-o-i.path.length-s.length}return n}function fc(e){return e===404}const bc=(e,t,i)=>{const n=[],o=mc(e,t),s="icons";let r={type:s,provider:e,prefix:t,icons:[]},l=0;return i.forEach((a,d)=>{l+=a.length+1,l>=o&&d>0&&(n.push(r),r={type:s,provider:e,prefix:t,icons:[]},l=a.length),r.icons.push(a)}),n.push(r),n};function gc(e){if(typeof e=="string"){const t=ji(e);if(t)return t.path}return"/"}const vc=(e,t,i)=>{if(!wi){i("abort",424);return}let n=gc(t.provider);switch(t.type){case"icons":{const s=t.prefix,r=t.icons.join(","),l=new URLSearchParams({icons:r});n+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;n+=s.slice(0,1)==="/"?s.slice(1):s;break}default:i("abort",400);return}let o=503;wi(e+n).then(s=>{const r=s.status;if(r!==200){setTimeout(()=>{i(fc(r)?"abort":"next",r)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?i("abort",s):i("next",o)});return}setTimeout(()=>{i("success",s)})}).catch(()=>{i("next",o)})},yc={prepare:bc,send:vc};function $o(e,t){switch(e){case"local":case"session":jt[e]=t;break;case"all":for(const i in jt)jt[i]=t;break}}const Zi="data-style";let Ys="";function _c(e){Ys=e}function xo(e,t){let i=Array.from(e.childNodes).find(n=>n.hasAttribute&&n.hasAttribute(Zi));i||(i=document.createElement("style"),i.setAttribute(Zi,Zi),e.appendChild(i)),i.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+Ys}function Xs(){mo("",yc),Ps(!0);let e;try{e=window}catch{}if(e){if(Vs(),e.IconifyPreload!==void 0){const t=e.IconifyPreload,i="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!ho(n))&&console.error(i)}catch{console.error(i)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const i in t){const n="IconifyProviders["+i+"] is invalid.";try{const o=t[i];if(typeof o!="object"||!o||o.resources===void 0)continue;fo(i,o)||console.error(n)}catch{console.error(n)}}}}return{enableCache:t=>$o(t,!0),disableCache:t=>$o(t,!1),iconLoaded:po,iconExists:po,getIcon:Ll,listIcons:Rl,addIcon:Rs,addCollection:ho,calculateSize:un,buildIcon:Gs,iconToHTML:In,svgToURL:qs,loadIcons:Nn,loadIcon:Kl,addAPIProvider:fo,appendCustomStyle:_c,_api:{getAPIConfig:ji,setAPIModule:mo,sendAPIQuery:zs,setFetch:hc,getFetch:pc,listAPIProviders:Vl}}}const hn={"background-color":"currentColor"},Js={"background-color":"transparent"},wo={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Co={"-webkit-mask":hn,mask:hn,background:Js};for(const e in Co){const t=Co[e];for(const i in wo)t[e+"-"+i]=wo[i]}function Ao(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function $c(e,t,i){const n=document.createElement("span");let o=e.body;o.indexOf("");const s=e.attributes,r=In(o,{...s,width:t.width+"",height:t.height+""}),l=qs(r),a=n.style,d={"--svg":l,width:Ao(s.width),height:Ao(s.height),...i?hn:Js};for(const u in d)a.setProperty(u,d[u]);return n}let Ie;function xc(){try{Ie=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ie=null}}function wc(e){return Ie===void 0&&xc(),Ie?Ie.createHTML(e):e}function Cc(e){const t=document.createElement("span"),i=e.attributes;let n="";i.width||(n="width: inherit;"),i.height||(n+="height: inherit;"),n&&(i.style=n);const o=In(e.body,i);return t.innerHTML=wc(o),t.firstChild}function pn(e){return Array.from(e.childNodes).find(t=>{const i=t.tagName&&t.tagName.toUpperCase();return i==="SPAN"||i==="SVG"})}function Eo(e,t){const i=t.icon.data,n=t.customisations,o=Gs(i,n);n.preserveAspectRatio&&(o.attributes.preserveAspectRatio=n.preserveAspectRatio);const s=t.renderedMode;let r;switch(s){case"svg":r=Cc(o);break;default:r=$c(o,{...Xe,...i},s==="mask")}const l=pn(e);l?r.tagName==="SPAN"&&l.tagName===r.tagName?l.setAttribute("style",r.getAttribute("style")):e.replaceChild(r,l):e.appendChild(r)}function So(e,t,i){const n=i&&(i.rendered?i:i.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:n}}function Ac(e="iconify-icon"){let t,i;try{t=window.customElements,i=window.HTMLElement}catch{return}if(!t||!i)return;const n=t.get(e);if(n)return n;const o=["icon","mode","inline","observe","width","height","rotate","flip"],s=class extends i{constructor(){super(),It(this,"_shadowRoot"),It(this,"_initialised",!1),It(this,"_state"),It(this,"_checkQueued",!1),It(this,"_connected",!1),It(this,"_observer",null),It(this,"_visible",!0);const l=this._shadowRoot=this.attachShadow({mode:"open"}),a=Qi(this);xo(l,a),this._state=So({value:""},a),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(l){switch(l){case"inline":{const a=Qi(this),d=this._state;a!==d.inline&&(d.inline=a,xo(this._shadowRoot,a));break}case"observer":{this.observer?this.startObserver():this.stopObserver();break}default:this._queueCheck()}}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Qi(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}get observer(){return this.hasAttribute("observer")}set observer(l){l?this.setAttribute("observer","true"):this.removeAttribute("observer")}restartAnimation(){const l=this._state;if(l.rendered){const a=this._shadowRoot;if(l.renderedMode==="svg")try{a.lastChild.setCurrentTime(0);return}catch{}Eo(a,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,a=this.getAttribute("icon");if(a!==l.icon.value){this._iconChanged(a);return}if(!l.rendered||!this._visible)return;const d=this.getAttribute("mode"),u=co(this);(l.attrMode!==d||kl(l.customisations,u)||!pn(this._shadowRoot))&&this._renderIcon(l.icon,u,d)}_iconChanged(l){const a=ec(l,(d,u,c)=>{const h=this._state;if(h.rendered||this.getAttribute("icon")!==d)return;const p={value:d,name:u,data:c};p.data?this._gotIconData(p):h.icon=p});a.data?this._gotIconData(a):this._state=So(a,this._state.inline,this._state)}_forceRender(){if(!this._visible){const l=pn(this._shadowRoot);l&&this._shadowRoot.removeChild(l);return}this._queueCheck()}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,co(this),this.getAttribute("mode"))}_renderIcon(l,a,d){const u=ic(l.data.body,d),c=this._state.inline;Eo(this._shadowRoot,this._state={rendered:!0,icon:l,inline:c,customisations:a,attrMode:d,renderedMode:u})}startObserver(){if(!this._observer)try{this._observer=new IntersectionObserver(l=>{const a=l.some(d=>d.isIntersecting);a!==this._visible&&(this._visible=a,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};o.forEach(l=>{l in s.prototype||Object.defineProperty(s.prototype,l,{get:function(){return this.getAttribute(l)},set:function(a){a!==null?this.setAttribute(l,a):this.removeAttribute(l)}})});const r=Xs();for(const l in r)s[l]=s.prototype[l]=r[l];return t.define(e,s),s}Ac()||Xs();const Ec=N` +*/const Os=Object.freeze({left:0,top:0,width:16,height:16}),$i=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Xe=Object.freeze({...Os,...$i}),on=Object.freeze({...Xe,body:"",hidden:!1}),Cl=Object.freeze({width:null,height:null}),Ts=Object.freeze({...Cl,...$i});function Al(e,t=0){const i=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(i===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(i!==e){let o=0;switch(i){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-i.length));return isNaN(s)?0:(s=s/o,s%1===0?n(s):0)}}return t}const El=/[\s,]+/;function Sl(e,t){t.split(El).forEach(i=>{switch(i.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Is={...Ts,preserveAspectRatio:""};function co(e){const t={...Is},i=(n,o)=>e.getAttribute(n)||o;return t.width=i("width",null),t.height=i("height",null),t.rotate=Al(i("rotate","")),Sl(t,i("flip","")),t.preserveAspectRatio=i("preserveAspectRatio",i("preserveaspectratio","")),t}function kl(e,t){for(const i in Is)if(e[i]!==t[i])return!0;return!1}const Ie=/^[a-z0-9]+(-[a-z0-9]+)*$/,Je=(e,t,i,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),a=o.pop(),d={provider:o.length>0?o[0]:n,prefix:a,name:l};return t&&!ui(d)?null:d}const s=o[0],r=s.split("-");if(r.length>1){const l={provider:n,prefix:r.shift(),name:r.join("-")};return t&&!ui(l)?null:l}if(i&&n===""){const l={provider:n,prefix:"",name:s};return t&&!ui(l,i)?null:l}return null},ui=(e,t)=>e?!!((e.provider===""||e.provider.match(Ie))&&(t&&e.prefix===""||e.prefix.match(Ie))&&e.name.match(Ie)):!1;function Ol(e,t){const i={};!e.hFlip!=!t.hFlip&&(i.hFlip=!0),!e.vFlip!=!t.vFlip&&(i.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(i.rotate=n),i}function uo(e,t){const i=Ol(e,t);for(const n in on)n in $i?n in e&&!(n in i)&&(i[n]=$i[n]):n in t?i[n]=t[n]:n in e&&(i[n]=e[n]);return i}function Tl(e,t){const i=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function s(r){if(i[r])return o[r]=[];if(!(r in o)){o[r]=null;const l=n[r]&&n[r].parent,a=l&&s(l);a&&(o[r]=[l].concat(a))}return o[r]}return Object.keys(i).concat(Object.keys(n)).forEach(s),o}function Il(e,t,i){const n=e.icons,o=e.aliases||Object.create(null);let s={};function r(l){s=uo(n[l]||o[l],s)}return r(t),i.forEach(r),uo(e,s)}function Ns(e,t){const i=[];if(typeof e!="object"||typeof e.icons!="object")return i;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),i.push(o)});const n=Tl(e);for(const o in n){const s=n[o];s&&(t(o,Il(e,o,s)),i.push(o))}return i}const Nl={provider:"",aliases:{},not_found:{},...Os};function Xi(e,t){for(const i in t)if(i in e&&typeof e[i]!=typeof t[i])return!1;return!0}function Ms(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Xi(e,Nl))return null;const i=t.icons;for(const o in i){const s=i[o];if(!o.match(Ie)||typeof s.body!="string"||!Xi(s,on))return null}const n=t.aliases||Object.create(null);for(const o in n){const s=n[o],r=s.parent;if(!o.match(Ie)||typeof r!="string"||!i[r]&&!n[r]||!Xi(s,on))return null}return t}const xi=Object.create(null);function Ml(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Et(e,t){const i=xi[e]||(xi[e]=Object.create(null));return i[t]||(i[t]=Ml(e,t))}function Sn(e,t){return Ms(t)?Ns(t,(i,n)=>{n?e.icons[i]=n:e.missing.add(i)}):[]}function Pl(e,t,i){try{if(typeof i.body=="string")return e.icons[t]={...i},!0}catch{}return!1}function Rl(e,t){let i=[];return(typeof e=="string"?[e]:Object.keys(xi)).forEach(n=>{(typeof n=="string"&&typeof t=="string"?[t]:Object.keys(xi[n]||{})).forEach(o=>{const s=Et(n,o);i=i.concat(Object.keys(s.icons).map(r=>(n!==""?"@"+n+":":"")+o+":"+r))})}),i}let De=!1;function Ps(e){return typeof e=="boolean"&&(De=e),De}function He(e){const t=typeof e=="string"?Je(e,!0,De):e;if(t){const i=Et(t.provider,t.prefix),n=t.name;return i.icons[n]||(i.missing.has(n)?null:void 0)}}function Rs(e,t){const i=Je(e,!0,De);if(!i)return!1;const n=Et(i.provider,i.prefix);return Pl(n,i.name,t)}function ho(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),De&&!t&&!e.prefix){let o=!1;return Ms(e)&&(e.prefix="",Ns(e,(s,r)=>{r&&Rs(s,r)&&(o=!0)})),o}const i=e.prefix;if(!ui({provider:t,prefix:i,name:"a"}))return!1;const n=Et(t,i);return!!Sn(n,e)}function po(e){return!!He(e)}function Ll(e){const t=He(e);return t?{...Xe,...t}:null}function jl(e){const t={loaded:[],missing:[],pending:[]},i=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const s=o.provider,r=o.prefix,l=o.name,a=i[s]||(i[s]=Object.create(null)),d=a[r]||(a[r]=Et(s,r));let u;l in d.icons?u=t.loaded:r===""||d.missing.has(l)?u=t.missing:u=t.pending;const c={provider:s,prefix:r,name:l};u.push(c)}),t}function Ls(e,t){e.forEach(i=>{const n=i.loaderCallbacks;n&&(i.loaderCallbacks=n.filter(o=>o.id!==t))})}function zl(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let i=!1;const n=e.provider,o=e.prefix;t.forEach(s=>{const r=s.icons,l=r.pending.length;r.pending=r.pending.filter(a=>{if(a.prefix!==o)return!0;const d=a.name;if(e.icons[d])r.loaded.push({provider:n,prefix:o,name:d});else if(e.missing.has(d))r.missing.push({provider:n,prefix:o,name:d});else return i=!0,!0;return!1}),r.pending.length!==l&&(i||Ls([e],s.id),s.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),s.abort))})}))}let Dl=0;function Hl(e,t,i){const n=Dl++,o=Ls.bind(null,i,n);if(!t.pending.length)return o;const s={id:n,icons:t,callback:e,abort:o};return i.forEach(r=>{(r.loaderCallbacks||(r.loaderCallbacks=[])).push(s)}),o}const sn=Object.create(null);function mo(e,t){sn[e]=t}function rn(e){return sn[e]||sn[""]}function Fl(e,t=!0,i=!1){const n=[];return e.forEach(o=>{const s=typeof o=="string"?Je(o,t,i):o;s&&n.push(s)}),n}var Bl={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ul(e,t,i,n){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let r;if(e.random){let C=e.resources.slice(0);for(r=[];C.length>1;){const T=Math.floor(Math.random()*C.length);r.push(C[T]),C=C.slice(0,T).concat(C.slice(T+1))}r=r.concat(C)}else r=e.resources.slice(s).concat(e.resources.slice(0,s));const l=Date.now();let a="pending",d=0,u,c=null,h=[],p=[];typeof n=="function"&&p.push(n);function b(){c&&(clearTimeout(c),c=null)}function $(){a==="pending"&&(a="aborted"),b(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function v(C,T){T&&(p=[]),typeof C=="function"&&p.push(C)}function f(){return{startTime:l,payload:t,status:a,queriesSent:d,queriesPending:h.length,subscribe:v,abort:$}}function y(){a="failed",p.forEach(C=>{C(void 0,u)})}function _(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function x(C,T,M){const S=T!=="success";switch(h=h.filter(E=>E!==C),a){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){u=M,y();return}if(S){u=M,h.length||(r.length?A():y());return}if(b(),_(),!e.random){const E=e.resources.indexOf(C.resource);E!==-1&&E!==e.index&&(e.index=E)}a="completed",p.forEach(E=>{E(M)})}function A(){if(a!=="pending")return;b();const C=r.shift();if(C===void 0){if(h.length){c=setTimeout(()=>{b(),a==="pending"&&(_(),y())},e.timeout);return}y();return}const T={status:"pending",resource:C,callback:(M,S)=>{x(T,M,S)}};h.push(T),d++,c=setTimeout(A,e.rotate),i(C,t,T.callback)}return setTimeout(A),f}function js(e){const t={...Bl,...e};let i=[];function n(){i=i.filter(r=>r().status==="pending")}function o(r,l,a){const d=Ul(t,r,l,(u,c)=>{n(),a&&a(u,c)});return i.push(d),d}function s(r){return i.find(l=>r(l))||null}return{query:o,find:s,setIndex:r=>{t.index=r},getIndex:()=>t.index,cleanup:n}}function kn(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Li=Object.create(null),ai=["https://api.simplesvg.com","https://api.unisvg.com"],an=[];for(;ai.length>0;)ai.length===1||Math.random()>.5?an.push(ai.shift()):an.push(ai.pop());Li[""]=kn({resources:["https://api.iconify.design"].concat(an)});function fo(e,t){const i=kn(t);return i===null?!1:(Li[e]=i,!0)}function ji(e){return Li[e]}function Vl(){return Object.keys(Li)}function bo(){}const Ji=Object.create(null);function Wl(e){if(!Ji[e]){const t=ji(e);if(!t)return;const i=js(t),n={config:t,redundancy:i};Ji[e]=n}return Ji[e]}function zs(e,t,i){let n,o;if(typeof e=="string"){const s=rn(e);if(!s)return i(void 0,424),bo;o=s.send;const r=Wl(e);r&&(n=r.redundancy)}else{const s=kn(e);if(s){n=js(s);const r=e.resources?e.resources[0]:"",l=rn(r);l&&(o=l.send)}}return!n||!o?(i(void 0,424),bo):n.query(t,o,i)().abort}const go="iconify2",Fe="iconify",Ds=Fe+"-count",vo=Fe+"-version",Hs=36e5,Gl=168,ql=50;function ln(e,t){try{return e.getItem(t)}catch{}}function On(e,t,i){try{return e.setItem(t,i),!0}catch{}}function yo(e,t){try{e.removeItem(t)}catch{}}function cn(e,t){return On(e,Ds,t.toString())}function dn(e){return parseInt(ln(e,Ds))||0}const jt={local:!0,session:!0},Fs={local:new Set,session:new Set};let Tn=!1;function Yl(e){Tn=e}let li=typeof window>"u"?{}:window;function Bs(e){const t=e+"Storage";try{if(li&&li[t]&&typeof li[t].length=="number")return li[t]}catch{}jt[e]=!1}function Us(e,t){const i=Bs(e);if(!i)return;const n=ln(i,vo);if(n!==go){if(n){const l=dn(i);for(let a=0;a{const a=Fe+l.toString(),d=ln(i,a);if(typeof d=="string"){try{const u=JSON.parse(d);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,l))return!0}catch{}yo(i,a)}};let r=dn(i);for(let l=r-1;l>=0;l--)s(l)||(l===r-1?(r--,cn(i,r)):Fs[e].add(l))}function Vs(){if(!Tn){Yl(!0);for(const e in jt)Us(e,t=>{const i=t.data,n=t.provider,o=i.prefix,s=Et(n,o);if(!Sn(s,i).length)return!1;const r=i.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,r):r,!0})}}function Xl(e,t){const i=e.lastModifiedCached;if(i&&i>=t)return i===t;if(e.lastModifiedCached=t,i)for(const n in jt)Us(n,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function Jl(e,t){Tn||Vs();function i(n){let o;if(!jt[n]||!(o=Bs(n)))return;const s=Fs[n];let r;if(s.size)s.delete(r=Array.from(s).shift());else if(r=dn(o),r>=ql||!cn(o,r+1))return;const l={cached:Math.floor(Date.now()/Hs),provider:e.provider,data:t};return On(o,Fe+r.toString(),JSON.stringify(l))}t.lastModified&&!Xl(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),i("local")||i("session"))}function _o(){}function Ql(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,zl(e)}))}function Zl(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:i,prefix:n}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;!o||!(s=rn(i))||s.prepare(i,n,o).forEach(r=>{zs(i,r,l=>{if(typeof l!="object")r.icons.forEach(a=>{e.missing.add(a)});else try{const a=Sn(e,l);if(!a.length)return;const d=e.pendingIcons;d&&a.forEach(u=>{d.delete(u)}),Jl(e,l)}catch(a){console.error(a)}Ql(e)})})}))}const In=(e,t)=>{const i=Fl(e,!0,Ps()),n=jl(i);if(!n.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(n.loaded,n.missing,n.pending,_o)}),()=>{a=!1}}const o=Object.create(null),s=[];let r,l;return n.pending.forEach(a=>{const{provider:d,prefix:u}=a;if(u===l&&d===r)return;r=d,l=u,s.push(Et(d,u));const c=o[d]||(o[d]=Object.create(null));c[u]||(c[u]=[])}),n.pending.forEach(a=>{const{provider:d,prefix:u,name:c}=a,h=Et(d,u),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(c)||(p.add(c),o[d][u].push(c))}),s.forEach(a=>{const{provider:d,prefix:u}=a;o[d][u].length&&Zl(a,o[d][u])}),t?Hl(t,n,s):_o},Kl=e=>new Promise((t,i)=>{const n=typeof e=="string"?Je(e,!0):e;if(!n){i(e);return}In([n||e],o=>{if(o.length&&n){const s=He(n);if(s){t({...Xe,...s});return}}i(e)})});function tc(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function ec(e,t){const i=typeof e=="string"?Je(e,!0,!0):null;if(!i){const s=tc(e);return{value:e,data:s}}const n=He(i);if(n!==void 0||!i.prefix)return{value:e,name:i,data:n};const o=In([i],()=>t(e,i,He(i)));return{value:e,name:i,loading:o}}function Qi(e){return e.hasAttribute("inline")}let Ws=!1;try{Ws=navigator.vendor.indexOf("Apple")===0}catch{}function ic(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(Ws||e.indexOf("=0;){const o=e.indexOf(">",n),s=e.indexOf("",s);if(r===-1)break;i+=e.slice(o+1,s).trim(),e=e.slice(0,n).trim()+e.slice(r+1)}return{defs:i,content:e}}function rc(e,t){return e?""+e+""+t:t}function ac(e,t,i){const n=sc(e);return rc(n.defs,t+n.content+i)}const lc=e=>e==="unset"||e==="undefined"||e==="none";function Gs(e,t){const i={...Xe,...e},n={...Ts,...t},o={left:i.left,top:i.top,width:i.width,height:i.height};let s=i.body;[i,n].forEach($=>{const v=[],f=$.hFlip,y=$.vFlip;let _=$.rotate;f?y?_+=2:(v.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),v.push("scale(-1 1)"),o.top=o.left=0):y&&(v.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),v.push("scale(1 -1)"),o.top=o.left=0);let x;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:x=o.height/2+o.top,v.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:v.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:x=o.width/2+o.left,v.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}_%2===1&&(o.left!==o.top&&(x=o.left,o.left=o.top,o.top=x),o.width!==o.height&&(x=o.width,o.width=o.height,o.height=x)),v.length&&(s=ac(s,'',""))});const r=n.width,l=n.height,a=o.width,d=o.height;let u,c;r===null?(c=l===null?"1em":l==="auto"?d:l,u=un(c,a/d)):(u=r==="auto"?a:r,c=l===null?un(u,d/a):l==="auto"?d:l);const h={},p=($,v)=>{lc(v)||(h[$]=v.toString())};p("width",u),p("height",c);const b=[o.left,o.top,a,d];return h.viewBox=b.join(" "),{attributes:h,viewBox:b,body:s}}function Nn(e,t){let i=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)i+=" "+n+'="'+t[n]+'"';return'"+e+""}function cc(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function dc(e){return"data:image/svg+xml,"+cc(e)}function qs(e){return'url("'+dc(e)+'")'}const uc=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let wi=uc();function hc(e){wi=e}function pc(){return wi}function mc(e,t){const i=ji(e);if(!i)return 0;let n;if(!i.maxURL)n=0;else{let o=0;i.resources.forEach(r=>{o=Math.max(o,r.length)});const s=t+".json?icons=";n=i.maxURL-o-i.path.length-s.length}return n}function fc(e){return e===404}const bc=(e,t,i)=>{const n=[],o=mc(e,t),s="icons";let r={type:s,provider:e,prefix:t,icons:[]},l=0;return i.forEach((a,d)=>{l+=a.length+1,l>=o&&d>0&&(n.push(r),r={type:s,provider:e,prefix:t,icons:[]},l=a.length),r.icons.push(a)}),n.push(r),n};function gc(e){if(typeof e=="string"){const t=ji(e);if(t)return t.path}return"/"}const vc=(e,t,i)=>{if(!wi){i("abort",424);return}let n=gc(t.provider);switch(t.type){case"icons":{const s=t.prefix,r=t.icons.join(","),l=new URLSearchParams({icons:r});n+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;n+=s.slice(0,1)==="/"?s.slice(1):s;break}default:i("abort",400);return}let o=503;wi(e+n).then(s=>{const r=s.status;if(r!==200){setTimeout(()=>{i(fc(r)?"abort":"next",r)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?i("abort",s):i("next",o)});return}setTimeout(()=>{i("success",s)})}).catch(()=>{i("next",o)})},yc={prepare:bc,send:vc};function $o(e,t){switch(e){case"local":case"session":jt[e]=t;break;case"all":for(const i in jt)jt[i]=t;break}}const Zi="data-style";let Ys="";function _c(e){Ys=e}function xo(e,t){let i=Array.from(e.childNodes).find(n=>n.hasAttribute&&n.hasAttribute(Zi));i||(i=document.createElement("style"),i.setAttribute(Zi,Zi),e.appendChild(i)),i.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+Ys}function Xs(){mo("",yc),Ps(!0);let e;try{e=window}catch{}if(e){if(Vs(),e.IconifyPreload!==void 0){const t=e.IconifyPreload,i="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!ho(n))&&console.error(i)}catch{console.error(i)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const i in t){const n="IconifyProviders["+i+"] is invalid.";try{const o=t[i];if(typeof o!="object"||!o||o.resources===void 0)continue;fo(i,o)||console.error(n)}catch{console.error(n)}}}}return{enableCache:t=>$o(t,!0),disableCache:t=>$o(t,!1),iconLoaded:po,iconExists:po,getIcon:Ll,listIcons:Rl,addIcon:Rs,addCollection:ho,calculateSize:un,buildIcon:Gs,iconToHTML:Nn,svgToURL:qs,loadIcons:In,loadIcon:Kl,addAPIProvider:fo,appendCustomStyle:_c,_api:{getAPIConfig:ji,setAPIModule:mo,sendAPIQuery:zs,setFetch:hc,getFetch:pc,listAPIProviders:Vl}}}const hn={"background-color":"currentColor"},Js={"background-color":"transparent"},wo={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Co={"-webkit-mask":hn,mask:hn,background:Js};for(const e in Co){const t=Co[e];for(const i in wo)t[e+"-"+i]=wo[i]}function Ao(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function $c(e,t,i){const n=document.createElement("span");let o=e.body;o.indexOf("");const s=e.attributes,r=Nn(o,{...s,width:t.width+"",height:t.height+""}),l=qs(r),a=n.style,d={"--svg":l,width:Ao(s.width),height:Ao(s.height),...i?hn:Js};for(const u in d)a.setProperty(u,d[u]);return n}let Ne;function xc(){try{Ne=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ne=null}}function wc(e){return Ne===void 0&&xc(),Ne?Ne.createHTML(e):e}function Cc(e){const t=document.createElement("span"),i=e.attributes;let n="";i.width||(n="width: inherit;"),i.height||(n+="height: inherit;"),n&&(i.style=n);const o=Nn(e.body,i);return t.innerHTML=wc(o),t.firstChild}function pn(e){return Array.from(e.childNodes).find(t=>{const i=t.tagName&&t.tagName.toUpperCase();return i==="SPAN"||i==="SVG"})}function Eo(e,t){const i=t.icon.data,n=t.customisations,o=Gs(i,n);n.preserveAspectRatio&&(o.attributes.preserveAspectRatio=n.preserveAspectRatio);const s=t.renderedMode;let r;switch(s){case"svg":r=Cc(o);break;default:r=$c(o,{...Xe,...i},s==="mask")}const l=pn(e);l?r.tagName==="SPAN"&&l.tagName===r.tagName?l.setAttribute("style",r.getAttribute("style")):e.replaceChild(r,l):e.appendChild(r)}function So(e,t,i){const n=i&&(i.rendered?i:i.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:n}}function Ac(e="iconify-icon"){let t,i;try{t=window.customElements,i=window.HTMLElement}catch{return}if(!t||!i)return;const n=t.get(e);if(n)return n;const o=["icon","mode","inline","observe","width","height","rotate","flip"],s=class extends i{constructor(){super(),Nt(this,"_shadowRoot"),Nt(this,"_initialised",!1),Nt(this,"_state"),Nt(this,"_checkQueued",!1),Nt(this,"_connected",!1),Nt(this,"_observer",null),Nt(this,"_visible",!0);const l=this._shadowRoot=this.attachShadow({mode:"open"}),a=Qi(this);xo(l,a),this._state=So({value:""},a),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(l){switch(l){case"inline":{const a=Qi(this),d=this._state;a!==d.inline&&(d.inline=a,xo(this._shadowRoot,a));break}case"observer":{this.observer?this.startObserver():this.stopObserver();break}default:this._queueCheck()}}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Qi(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}get observer(){return this.hasAttribute("observer")}set observer(l){l?this.setAttribute("observer","true"):this.removeAttribute("observer")}restartAnimation(){const l=this._state;if(l.rendered){const a=this._shadowRoot;if(l.renderedMode==="svg")try{a.lastChild.setCurrentTime(0);return}catch{}Eo(a,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,a=this.getAttribute("icon");if(a!==l.icon.value){this._iconChanged(a);return}if(!l.rendered||!this._visible)return;const d=this.getAttribute("mode"),u=co(this);(l.attrMode!==d||kl(l.customisations,u)||!pn(this._shadowRoot))&&this._renderIcon(l.icon,u,d)}_iconChanged(l){const a=ec(l,(d,u,c)=>{const h=this._state;if(h.rendered||this.getAttribute("icon")!==d)return;const p={value:d,name:u,data:c};p.data?this._gotIconData(p):h.icon=p});a.data?this._gotIconData(a):this._state=So(a,this._state.inline,this._state)}_forceRender(){if(!this._visible){const l=pn(this._shadowRoot);l&&this._shadowRoot.removeChild(l);return}this._queueCheck()}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,co(this),this.getAttribute("mode"))}_renderIcon(l,a,d){const u=ic(l.data.body,d),c=this._state.inline;Eo(this._shadowRoot,this._state={rendered:!0,icon:l,inline:c,customisations:a,attrMode:d,renderedMode:u})}startObserver(){if(!this._observer)try{this._observer=new IntersectionObserver(l=>{const a=l.some(d=>d.isIntersecting);a!==this._visible&&(this._visible=a,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};o.forEach(l=>{l in s.prototype||Object.defineProperty(s.prototype,l,{get:function(){return this.getAttribute(l)},set:function(a){a!==null?this.setAttribute(l,a):this.removeAttribute(l)}})});const r=Xs();for(const l in r)s[l]=s.prototype[l]=r[l];return t.define(e,s),s}Ac()||Xs();const Ec=I` ::-webkit-scrollbar { width: 0.4rem; height: 0.4rem; @@ -68,7 +68,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B ::-webkit-scrollbar-track { background-color: var(--bim-scrollbar--bgc, var(--bim-ui_bg-base)); } -`,Sc=N` +`,Sc=I` :root { /* Grayscale Colors */ --bim-ui_gray-0: hsl(210 10% 5%); @@ -163,7 +163,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B [data-context-dialog]::backdrop { background-color: transparent; } -`,kt={scrollbar:Ec,globalStyles:Sc},Qs=class k{static set config(t){this._config={...k._config,...t}}static get config(){return k._config}static addGlobalStyles(){let t=document.querySelector("style[id='bim-ui']");if(t)return;t=document.createElement("style"),t.id="bim-ui",t.textContent=kt.globalStyles.cssText;const i=document.head.firstChild;i?document.head.insertBefore(t,i):document.head.append(t)}static defineCustomElement(t,i){customElements.get(t)||customElements.define(t,i)}static registerComponents(){k.init()}static init(){k.addGlobalStyles(),k.defineCustomElement("bim-button",Mc),k.defineCustomElement("bim-checkbox",pe),k.defineCustomElement("bim-color-input",Wt),k.defineCustomElement("bim-context-menu",fn),k.defineCustomElement("bim-dropdown",bt),k.defineCustomElement("bim-grid",Pn),k.defineCustomElement("bim-icon",Fc),k.defineCustomElement("bim-input",Ze),k.defineCustomElement("bim-label",fe),k.defineCustomElement("bim-number-input",Z),k.defineCustomElement("bim-option",H),k.defineCustomElement("bim-panel",Gt),k.defineCustomElement("bim-panel-section",be),k.defineCustomElement("bim-selector",ge),k.defineCustomElement("bim-table",st),k.defineCustomElement("bim-tabs",Yt),k.defineCustomElement("bim-tab",et),k.defineCustomElement("bim-table-cell",hr),k.defineCustomElement("bim-table-children",mr),k.defineCustomElement("bim-table-group",br),k.defineCustomElement("bim-table-row",qt),k.defineCustomElement("bim-text-input",rt),k.defineCustomElement("bim-toolbar",Ui),k.defineCustomElement("bim-toolbar-group",Fi),k.defineCustomElement("bim-toolbar-section",_e),k.defineCustomElement("bim-viewport",Sr)}static newRandomId(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let i="";for(let n=0;n<10;n++){const o=Math.floor(Math.random()*t.length);i+=t.charAt(o)}return i}};Qs._config={sectionLabelOnVerticalToolbar:!1};let W=Qs;class U extends O{constructor(){super(...arguments),this._lazyLoadObserver=null,this._visibleElements=[],this.ELEMENTS_BEFORE_OBSERVER=20,this.useObserver=!1,this.elements=new Set,this.observe=t=>{if(!this.useObserver)return;for(const n of t)this.elements.add(n);const i=t.slice(this.ELEMENTS_BEFORE_OBSERVER);for(const n of i)n.remove();this.observeLastElement()}}set visibleElements(t){this._visibleElements=this.useObserver?t:[],this.requestUpdate()}get visibleElements(){return this._visibleElements}getLazyObserver(){if(!this.useObserver)return null;if(this._lazyLoadObserver)return this._lazyLoadObserver;const t=new IntersectionObserver(i=>{const n=i[0];if(!n.isIntersecting)return;const o=n.target;t.unobserve(o);const s=this.ELEMENTS_BEFORE_OBSERVER+this.visibleElements.length,r=[...this.elements][s];r&&(this.visibleElements=[...this.visibleElements,r],t.observe(r))},{threshold:.5});return t}observeLastElement(){const t=this.getLazyObserver();if(!t)return;const i=this.ELEMENTS_BEFORE_OBSERVER+this.visibleElements.length-1,n=[...this.elements][i];n&&t.observe(n)}resetVisibleElements(){const t=this.getLazyObserver();if(t){for(const i of this.elements)t.unobserve(i);this.visibleElements=[],this.observeLastElement()}}static create(t,i){const n=document.createDocumentFragment();if(t.length===0)return se(t(),n),n.firstElementChild;if(!i)throw new Error("UIComponent: Initial state is required for statefull components.");let o=i;const s=t,r=a=>(o={...o,...a},se(s(o,r),n),o);r(i);const l=()=>o;return[n.firstElementChild,r,l]}}const Be=(e,t={},i=!0)=>{let n={};for(const o of e.children){const s=o,r=s.getAttribute("name")||s.getAttribute("label"),l=t[r];if(r){if("value"in s&&typeof s.value<"u"&&s.value!==null){const a=s.value;if(typeof a=="object"&&!Array.isArray(a)&&Object.keys(a).length===0)continue;n[r]=l?l(s.value):s.value}else if(i){const a=Be(s,t);if(Object.keys(a).length===0)continue;n[r]=l?l(a):a}}else i&&(n={...n,...Be(s,t)})}return n},zi=e=>e==="true"||e==="false"?e==="true":e&&!isNaN(Number(e))&&e.trim()!==""?Number(e):e,kc=[">=","<=","=",">","<","?","/","#"];function ko(e){const t=kc.find(r=>e.split(r).length===2),i=e.split(t).map(r=>r.trim()),[n,o]=i,s=o.startsWith("'")&&o.endsWith("'")?o.replace(/'/g,""):zi(o);return{key:n,condition:t,value:s}}const mn=e=>{try{const t=[],i=e.split(/&(?![^()]*\))/).map(n=>n.trim());for(const n of i){const o=!n.startsWith("(")&&!n.endsWith(")"),s=n.startsWith("(")&&n.endsWith(")");if(o){const r=ko(n);t.push(r)}if(s){const r={operator:"&",queries:n.replace(/^(\()|(\))$/g,"").split("&").map(l=>l.trim()).map((l,a)=>{const d=ko(l);return a>0&&(d.operator="&"),d})};t.push(r)}}return t}catch{return null}},Oo=(e,t,i)=>{let n=!1;switch(t){case"=":n=e===i;break;case"?":n=String(e).includes(String(i));break;case"<":(typeof e=="number"||typeof i=="number")&&(n=e":(typeof e=="number"||typeof i=="number")&&(n=e>i);break;case">=":(typeof e=="number"||typeof i=="number")&&(n=e>=i);break;case"/":n=String(e).startsWith(String(i));break}return n};var Oc=Object.defineProperty,Tc=Object.getOwnPropertyDescriptor,Zs=(e,t,i,n)=>{for(var o=Tc(t,i),s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&Oc(t,i,o),o},D;const Mn=(D=class extends O{constructor(){super(...arguments),this._previousContainer=null,this._visible=!1}get placement(){return this._placement}set placement(e){this._placement=e,this.updatePosition()}static removeMenus(){for(const e of D.menus)e instanceof D&&(e.visible=!1);D.dialog.close(),D.dialog.remove()}get visible(){return this._visible}set visible(e){var t;this._visible=e,e?(D.dialog.parentElement||document.body.append(D.dialog),this._previousContainer=this.parentElement,D.dialog.style.top=`${window.scrollY||document.documentElement.scrollTop}px`,D.dialog.append(this),D.dialog.showModal(),this.updatePosition(),this.dispatchEvent(new Event("visible"))):((t=this._previousContainer)==null||t.append(this),this._previousContainer=null,this.dispatchEvent(new Event("hidden")))}async updatePosition(){if(!(this.visible&&this._previousContainer))return;const e=this.placement??"right",t=await ys(this._previousContainer,this,{placement:e,middleware:[rs(10),vs(),gs(),bs({padding:5})]}),{x:i,y:n}=t;this.style.left=`${i}px`,this.style.top=`${n}px`}connectedCallback(){super.connectedCallback(),D.menus.push(this)}render(){return m` `}},D.styles=[kt.scrollbar,N` +`,kt={scrollbar:Ec,globalStyles:Sc},Qs=class k{static set config(t){this._config={...k._config,...t}}static get config(){return k._config}static addGlobalStyles(){let t=document.querySelector("style[id='bim-ui']");if(t)return;t=document.createElement("style"),t.id="bim-ui",t.textContent=kt.globalStyles.cssText;const i=document.head.firstChild;i?document.head.insertBefore(t,i):document.head.append(t)}static defineCustomElement(t,i){customElements.get(t)||customElements.define(t,i)}static registerComponents(){k.init()}static init(){k.addGlobalStyles(),k.defineCustomElement("bim-button",Mc),k.defineCustomElement("bim-checkbox",pe),k.defineCustomElement("bim-color-input",Wt),k.defineCustomElement("bim-context-menu",fn),k.defineCustomElement("bim-dropdown",bt),k.defineCustomElement("bim-grid",Pn),k.defineCustomElement("bim-icon",Fc),k.defineCustomElement("bim-input",Ze),k.defineCustomElement("bim-label",fe),k.defineCustomElement("bim-number-input",Z),k.defineCustomElement("bim-option",H),k.defineCustomElement("bim-panel",Gt),k.defineCustomElement("bim-panel-section",be),k.defineCustomElement("bim-selector",ge),k.defineCustomElement("bim-table",st),k.defineCustomElement("bim-tabs",Yt),k.defineCustomElement("bim-tab",et),k.defineCustomElement("bim-table-cell",hr),k.defineCustomElement("bim-table-children",mr),k.defineCustomElement("bim-table-group",br),k.defineCustomElement("bim-table-row",qt),k.defineCustomElement("bim-text-input",rt),k.defineCustomElement("bim-toolbar",Ui),k.defineCustomElement("bim-toolbar-group",Fi),k.defineCustomElement("bim-toolbar-section",_e),k.defineCustomElement("bim-viewport",Sr)}static newRandomId(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let i="";for(let n=0;n<10;n++){const o=Math.floor(Math.random()*t.length);i+=t.charAt(o)}return i}};Qs._config={sectionLabelOnVerticalToolbar:!1};let W=Qs;class U extends O{constructor(){super(...arguments),this._lazyLoadObserver=null,this._visibleElements=[],this.ELEMENTS_BEFORE_OBSERVER=20,this.useObserver=!1,this.elements=new Set,this.observe=t=>{if(!this.useObserver)return;for(const n of t)this.elements.add(n);const i=t.slice(this.ELEMENTS_BEFORE_OBSERVER);for(const n of i)n.remove();this.observeLastElement()}}set visibleElements(t){this._visibleElements=this.useObserver?t:[],this.requestUpdate()}get visibleElements(){return this._visibleElements}getLazyObserver(){if(!this.useObserver)return null;if(this._lazyLoadObserver)return this._lazyLoadObserver;const t=new IntersectionObserver(i=>{const n=i[0];if(!n.isIntersecting)return;const o=n.target;t.unobserve(o);const s=this.ELEMENTS_BEFORE_OBSERVER+this.visibleElements.length,r=[...this.elements][s];r&&(this.visibleElements=[...this.visibleElements,r],t.observe(r))},{threshold:.5});return t}observeLastElement(){const t=this.getLazyObserver();if(!t)return;const i=this.ELEMENTS_BEFORE_OBSERVER+this.visibleElements.length-1,n=[...this.elements][i];n&&t.observe(n)}resetVisibleElements(){const t=this.getLazyObserver();if(t){for(const i of this.elements)t.unobserve(i);this.visibleElements=[],this.observeLastElement()}}static create(t,i){const n=document.createDocumentFragment();if(t.length===0)return se(t(),n),n.firstElementChild;if(!i)throw new Error("UIComponent: Initial state is required for statefull components.");let o=i;const s=t,r=a=>(o={...o,...a},se(s(o,r),n),o);r(i);const l=()=>o;return[n.firstElementChild,r,l]}}const Be=(e,t={},i=!0)=>{let n={};for(const o of e.children){const s=o,r=s.getAttribute("name")||s.getAttribute("label"),l=t[r];if(r){if("value"in s&&typeof s.value<"u"&&s.value!==null){const a=s.value;if(typeof a=="object"&&!Array.isArray(a)&&Object.keys(a).length===0)continue;n[r]=l?l(s.value):s.value}else if(i){const a=Be(s,t);if(Object.keys(a).length===0)continue;n[r]=l?l(a):a}}else i&&(n={...n,...Be(s,t)})}return n},zi=e=>e==="true"||e==="false"?e==="true":e&&!isNaN(Number(e))&&e.trim()!==""?Number(e):e,kc=[">=","<=","=",">","<","?","/","#"];function ko(e){const t=kc.find(r=>e.split(r).length===2),i=e.split(t).map(r=>r.trim()),[n,o]=i,s=o.startsWith("'")&&o.endsWith("'")?o.replace(/'/g,""):zi(o);return{key:n,condition:t,value:s}}const mn=e=>{try{const t=[],i=e.split(/&(?![^()]*\))/).map(n=>n.trim());for(const n of i){const o=!n.startsWith("(")&&!n.endsWith(")"),s=n.startsWith("(")&&n.endsWith(")");if(o){const r=ko(n);t.push(r)}if(s){const r={operator:"&",queries:n.replace(/^(\()|(\))$/g,"").split("&").map(l=>l.trim()).map((l,a)=>{const d=ko(l);return a>0&&(d.operator="&"),d})};t.push(r)}}return t}catch{return null}},Oo=(e,t,i)=>{let n=!1;switch(t){case"=":n=e===i;break;case"?":n=String(e).includes(String(i));break;case"<":(typeof e=="number"||typeof i=="number")&&(n=e":(typeof e=="number"||typeof i=="number")&&(n=e>i);break;case">=":(typeof e=="number"||typeof i=="number")&&(n=e>=i);break;case"/":n=String(e).startsWith(String(i));break}return n};var Oc=Object.defineProperty,Tc=Object.getOwnPropertyDescriptor,Zs=(e,t,i,n)=>{for(var o=Tc(t,i),s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&Oc(t,i,o),o},D;const Mn=(D=class extends O{constructor(){super(...arguments),this._previousContainer=null,this._visible=!1}get placement(){return this._placement}set placement(e){this._placement=e,this.updatePosition()}static removeMenus(){for(const e of D.menus)e instanceof D&&(e.visible=!1);D.dialog.close(),D.dialog.remove()}get visible(){return this._visible}set visible(e){var t;this._visible=e,e?(D.dialog.parentElement||document.body.append(D.dialog),this._previousContainer=this.parentElement,D.dialog.style.top=`${window.scrollY||document.documentElement.scrollTop}px`,D.dialog.append(this),D.dialog.showModal(),this.updatePosition(),this.dispatchEvent(new Event("visible"))):((t=this._previousContainer)==null||t.append(this),this._previousContainer=null,this.dispatchEvent(new Event("hidden")))}async updatePosition(){if(!(this.visible&&this._previousContainer))return;const e=this.placement??"right",t=await ys(this._previousContainer,this,{placement:e,middleware:[rs(10),vs(),gs(),bs({padding:5})]}),{x:i,y:n}=t;this.style.left=`${i}px`,this.style.top=`${n}px`}connectedCallback(){super.connectedCallback(),D.menus.push(this)}render(){return m` `}},D.styles=[kt.scrollbar,I` :host { pointer-events: auto; position: absolute; @@ -202,7 +202,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B overflow: visible; background-color: transparent; " - >`),D.menus=[],D);Zs([g({type:String,reflect:!0})],Mn.prototype,"placement");Zs([g({type:Boolean,reflect:!0})],Mn.prototype,"visible");let fn=Mn;var Nc=Object.defineProperty,Ic=Object.getOwnPropertyDescriptor,at=(e,t,i,n)=>{for(var o=n>1?void 0:n?Ic(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Nc(t,i,o),o},Ee;const nt=(Ee=class extends O{constructor(){super(),this.labelHidden=!1,this.active=!1,this.disabled=!1,this.vertical=!1,this.tooltipVisible=!1,this._stateBeforeLoading={disabled:!1,icon:""},this._loading=!1,this._parent=re(),this._tooltip=re(),this._mouseLeave=!1,this.onClick=e=>{e.stopPropagation(),this.disabled||this.dispatchEvent(new Event("click"))},this.showContextMenu=()=>{const e=this._contextMenu;if(e){const t=this.getAttribute("data-context-group");t&&e.setAttribute("data-context-group",t),this.closeNestedContexts();const i=W.newRandomId();for(const n of e.children)n instanceof Ee&&n.setAttribute("data-context-group",i);e.visible=!0}},this.mouseLeave=!0}set loading(e){if(this._loading=e,e)this._stateBeforeLoading={disabled:this.disabled,icon:this.icon},this.disabled=e,this.icon="eos-icons:loading";else{const{disabled:t,icon:i}=this._stateBeforeLoading;this.disabled=t,this.icon=i}}get loading(){return this._loading}set mouseLeave(e){this._mouseLeave=e,e&&(this.tooltipVisible=!1,clearTimeout(this.timeoutID))}get mouseLeave(){return this._mouseLeave}computeTooltipPosition(){const{value:e}=this._parent,{value:t}=this._tooltip;e&&t&&ys(e,t,{placement:"bottom",middleware:[rs(10),vs(),gs(),bs({padding:5})]}).then(i=>{const{x:n,y:o}=i;Object.assign(t.style,{left:`${n}px`,top:`${o}px`})})}onMouseEnter(){if(!(this.tooltipTitle||this.tooltipText))return;this.mouseLeave=!1;const e=this.tooltipTime??700;this.timeoutID=setTimeout(()=>{this.mouseLeave||(this.computeTooltipPosition(),this.tooltipVisible=!0)},e)}closeNestedContexts(){const e=this.getAttribute("data-context-group");if(e)for(const t of fn.dialog.children){const i=t.getAttribute("data-context-group");if(t instanceof fn&&i===e){t.visible=!1,t.removeAttribute("data-context-group");for(const n of t.children)n instanceof Ee&&(n.closeNestedContexts(),n.removeAttribute("data-context-group"))}}}click(){this.disabled||super.click()}get _contextMenu(){return this.querySelector("bim-context-menu")}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.showContextMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.showContextMenu)}render(){const e=m` + >`),D.menus=[],D);Zs([g({type:String,reflect:!0})],Mn.prototype,"placement");Zs([g({type:Boolean,reflect:!0})],Mn.prototype,"visible");let fn=Mn;var Ic=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,at=(e,t,i,n)=>{for(var o=n>1?void 0:n?Nc(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Ic(t,i,o),o},Ee;const nt=(Ee=class extends O{constructor(){super(),this.labelHidden=!1,this.active=!1,this.disabled=!1,this.vertical=!1,this.tooltipVisible=!1,this._stateBeforeLoading={disabled:!1,icon:""},this._loading=!1,this._parent=re(),this._tooltip=re(),this._mouseLeave=!1,this.onClick=e=>{e.stopPropagation(),this.disabled||this.dispatchEvent(new Event("click"))},this.showContextMenu=()=>{const e=this._contextMenu;if(e){const t=this.getAttribute("data-context-group");t&&e.setAttribute("data-context-group",t),this.closeNestedContexts();const i=W.newRandomId();for(const n of e.children)n instanceof Ee&&n.setAttribute("data-context-group",i);e.visible=!0}},this.mouseLeave=!0}set loading(e){if(this._loading=e,e)this._stateBeforeLoading={disabled:this.disabled,icon:this.icon},this.disabled=e,this.icon="eos-icons:loading";else{const{disabled:t,icon:i}=this._stateBeforeLoading;this.disabled=t,this.icon=i}}get loading(){return this._loading}set mouseLeave(e){this._mouseLeave=e,e&&(this.tooltipVisible=!1,clearTimeout(this.timeoutID))}get mouseLeave(){return this._mouseLeave}computeTooltipPosition(){const{value:e}=this._parent,{value:t}=this._tooltip;e&&t&&ys(e,t,{placement:"bottom",middleware:[rs(10),vs(),gs(),bs({padding:5})]}).then(i=>{const{x:n,y:o}=i;Object.assign(t.style,{left:`${n}px`,top:`${o}px`})})}onMouseEnter(){if(!(this.tooltipTitle||this.tooltipText))return;this.mouseLeave=!1;const e=this.tooltipTime??700;this.timeoutID=setTimeout(()=>{this.mouseLeave||(this.computeTooltipPosition(),this.tooltipVisible=!0)},e)}closeNestedContexts(){const e=this.getAttribute("data-context-group");if(e)for(const t of fn.dialog.children){const i=t.getAttribute("data-context-group");if(t instanceof fn&&i===e){t.visible=!1,t.removeAttribute("data-context-group");for(const n of t.children)n instanceof Ee&&(n.closeNestedContexts(),n.removeAttribute("data-context-group"))}}}click(){this.disabled||super.click()}get _contextMenu(){return this.querySelector("bim-context-menu")}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.showContextMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.showContextMenu)}render(){const e=m`
${this.tooltipTitle?m`

${this.tooltipTitle} @@ -237,7 +237,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B ${this.tooltipTitle||this.tooltipText?e:null}

- `}},Ee.styles=N` + `}},Ee.styles=I` :host { --bim-label--c: var(--bim-ui_bg-contrast-100, white); display: block; @@ -358,7 +358,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B .checked="${this.checked}" /> - `}};Ks.styles=N` + `}};Ks.styles=I` :host { display: block; } @@ -434,7 +434,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B - `}};tr.styles=N` + `}};tr.styles=I` :host { --bim-input--bgc: var(--bim-ui_bg-contrast-20); flex: 1; @@ -520,7 +520,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B `:null} - `}};er.styles=N` + `}};er.styles=I` :host { --bim-label--c: var(--bim-ui_bg-contrast-100); display: block; @@ -609,7 +609,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B - `}};ir.styles=[kt.scrollbar,N` + `}};ir.styles=[kt.scrollbar,I` :host { --bim-input--bgc: var( --bim-dropdown--bgc, @@ -645,7 +645,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B pointer-events: none; } `];let bt=ir;Tt([g({type:String,reflect:!0})],bt.prototype,"name",2);Tt([g({type:String,reflect:!0})],bt.prototype,"icon",2);Tt([g({type:String,reflect:!0})],bt.prototype,"label",2);Tt([g({type:Boolean,reflect:!0})],bt.prototype,"multiple",2);Tt([g({type:Boolean,reflect:!0})],bt.prototype,"required",2);Tt([g({type:Boolean,reflect:!0})],bt.prototype,"vertical",2);Tt([g({type:Boolean,reflect:!0})],bt.prototype,"visible",1);Tt([he()],bt.prototype,"_value",2);var Hc=Object.defineProperty,nr=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&Hc(t,i,o),o};const or=class extends O{constructor(){super(...arguments),this.floating=!1,this.layouts={}}getUniqueAreasFromTemplate(e){const t=e.split(` -`).map(i=>i.trim()).map(i=>i.split('"')[1]).filter(i=>i!==void 0).flatMap(i=>i.split(/\s+/));return[...new Set(t)].filter(i=>i!=="")}firstUpdated(){this._onLayoutChange=new Event("layoutchange")}render(){if(this.layout){if(this.layouts[this.layout]){this.innerHTML="";const e=this.layouts[this.layout],t=this.getUniqueAreasFromTemplate(e.template).map(i=>{const n=e.elements[i];return n&&(n.style.gridArea=i),n}).filter(i=>!!i);this.style.gridTemplate=e.template,this._onLayoutChange&&this.dispatchEvent(this._onLayoutChange),this.append(...t)}}else this.innerHTML="",this.style.gridTemplate="",this._onLayoutChange&&this.dispatchEvent(this._onLayoutChange);return m``}};or.styles=N` +`).map(i=>i.trim()).map(i=>i.split('"')[1]).filter(i=>i!==void 0).flatMap(i=>i.split(/\s+/));return[...new Set(t)].filter(i=>i!=="")}firstUpdated(){this._onLayoutChange=new Event("layoutchange")}render(){if(this.layout){if(this.layouts[this.layout]){this.innerHTML="";const e=this.layouts[this.layout],t=this.getUniqueAreasFromTemplate(e.template).map(i=>{const n=e.elements[i];return n&&(n.style.gridArea=i),n}).filter(i=>!!i);this.style.gridTemplate=e.template,this._onLayoutChange&&this.dispatchEvent(this._onLayoutChange),this.append(...t)}}else this.innerHTML="",this.style.gridTemplate="",this._onLayoutChange&&this.dispatchEvent(this._onLayoutChange);return m``}};or.styles=I` :host { display: grid; height: 100%; @@ -676,7 +676,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B } `;let Pn=or;nr([g({type:Boolean,reflect:!0})],Pn.prototype,"floating");nr([g({type:String,reflect:!0})],Pn.prototype,"layout");const bn=class extends O{render(){return m` - `}};bn.styles=N` + `}};bn.styles=I` :host { height: var(--bim-icon--fz, var(--bim-ui_size-sm)); width: var(--bim-icon--fz, var(--bim-ui_size-sm)); @@ -695,7 +695,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B - `}};sr.styles=N` + `}};sr.styles=I` :host { flex: 1; display: block; @@ -749,7 +749,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B ${!this.iconHidden&&this.icon?m``:null}

- `}};rr.styles=N` + `}};rr.styles=I` :host { --bim-icon--c: var(--bim-label--c); color: var(--bim-label--c, var(--bim-ui_bg-contrast-60)); @@ -856,7 +856,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B > ${this.slider?o:e} - `}};ar.styles=N` + `}};ar.styles=I` :host { --bim-input--bgc: var( --bim-number-input--bgc, @@ -952,7 +952,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B - `}};lr.styles=[kt.scrollbar,N` + `}};lr.styles=[kt.scrollbar,I` :host { display: flex; border-radius: var(--bim-ui_size-base); @@ -1026,7 +1026,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B - `}};cr.styles=[kt.scrollbar,N` + `}};cr.styles=[kt.scrollbar,I` :host { display: block; pointer-events: auto; @@ -1090,7 +1090,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B > - `}};dr.styles=N` + `}};dr.styles=I` :host { --bim-input--bgc: var(--bim-ui_bg-contrast-20); --bim-input--g: 0; @@ -1242,7 +1242,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B } - `}};ur.styles=N` + `}};ur.styles=I` :host { padding: 0.375rem; display: flex; @@ -1276,7 +1276,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B `;let hr=ur;Kc([g({type:String,reflect:!0})],hr.prototype,"column");var td=Object.defineProperty,ed=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&td(t,i,o),o};const pr=class extends O{constructor(){super(...arguments),this._groups=[],this.data=[],this.table=this.closest("bim-table")}toggleGroups(e,t=!1){for(const i of this._groups)i.childrenHidden=typeof e>"u"?!i.childrenHidden:!e,t&&i.toggleChildren(e,t)}render(){return this._groups=[],m` ${this.data.map(e=>{const t=document.createElement("bim-table-group");return this._groups.push(t),t.table=this.table,t.data=e,t})} - `}};pr.styles=N` + `}};pr.styles=I` :host { --bim-button--bgc: transparent; position: relative; @@ -1302,7 +1302,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B `} `,i=document.createDocumentFragment();se(t,i);let n=null;this.table.noIndentation||(n=document.createElement("div"),n.classList.add("branch","branch-horizontal"),n.style.left=`${e-1+(this.table.selectableRows?2.05:.5625)}rem`);let o=null;if(!this.table.noIndentation){const l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("height","9.5"),l.setAttribute("width","7.5"),l.setAttribute("viewBox","0 0 4.6666672 7.3333333");const a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d","m 1.7470835,6.9583848 2.5899999,-2.59 c 0.39,-0.39 0.39,-1.02 0,-1.41 L 1.7470835,0.36838483 c -0.63,-0.62000003 -1.71000005,-0.18 -1.71000005,0.70999997 v 5.17 c 0,0.9 1.08000005,1.34 1.71000005,0.71 z"),l.append(a);const d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("height","6.5"),d.setAttribute("width","9.5"),d.setAttribute("viewBox","0 0 5.9111118 5.0175439");const u=document.createElementNS("http://www.w3.org/2000/svg","path");u.setAttribute("d","M -0.33616196,1.922522 2.253838,4.5125219 c 0.39,0.39 1.02,0.39 1.41,0 L 6.2538379,1.922522 c 0.6200001,-0.63 0.18,-1.71000007 -0.7099999,-1.71000007 H 0.37383804 c -0.89999997,0 -1.33999997,1.08000007 -0.71,1.71000007 z"),d.append(u),o=document.createElement("div"),o.addEventListener("click",c=>{c.stopPropagation(),this.toggleChildren()}),o.classList.add("caret"),o.style.left=`${(this.table.selectableRows?1.5:.125)+e}rem`,this.childrenHidden?o.append(l):o.append(d)}const s=document.createElement("bim-table-row");this.data.children&&!this.childrenHidden&&s.append(i),s.table=this.table,s.data=this.data.data,this.table.dispatchEvent(new CustomEvent("rowcreated",{detail:{row:s}})),o&&this.data.children&&s.append(o),e!==0&&(!this.data.children||this.childrenHidden)&&n&&s.append(n);let r;if(this.data.children){r=document.createElement("bim-table-children"),this._children=r,r.table=this.table,r.data=this.data.children;const l=document.createDocumentFragment();se(t,l),r.append(l)}return m`
${s} ${this.childrenHidden?null:r}
- `}};fr.styles=N` + `}};fr.styles=I` :host { position: relative; } @@ -1351,7 +1351,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B >`:null} ${i} - `}render(){return m`${this._intersecting?this.compute():m``}`}};gr.styles=N` + `}render(){return m`${this._intersecting?this.compute():m``}`}};gr.styles=I` :host { position: relative; grid-area: Data; @@ -1379,7 +1379,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B ${this.headersHidden?null:e} ${Qc()}
${t}
- `}};vr.styles=[kt.scrollbar,N` + `}};vr.styles=[kt.scrollbar,I` :host { position: relative; overflow: auto; @@ -1416,7 +1416,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B flex-wrap: wrap; margin-bottom: 0.5rem; } - `];let st=vr;lt([he()],st.prototype,"_filteredData",2);lt([g({type:Boolean,attribute:"headers-hidden",reflect:!0})],st.prototype,"headersHidden",2);lt([g({type:String,attribute:"min-col-width",reflect:!0})],st.prototype,"minColWidth",2);lt([g({type:Array,attribute:!1})],st.prototype,"columns",1);lt([g({type:Array,attribute:!1})],st.prototype,"data",1);lt([g({type:Boolean,reflect:!0})],st.prototype,"expanded",2);lt([g({type:Boolean,reflect:!0,attribute:"selectable-rows"})],st.prototype,"selectableRows",2);lt([g({attribute:!1})],st.prototype,"selection",2);lt([g({type:Boolean,attribute:"no-indentation",reflect:!0})],st.prototype,"noIndentation",2);lt([g({type:Boolean,reflect:!0})],st.prototype,"loading",2);lt([he()],st.prototype,"_errorLoading",2);var ad=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,Hi=(e,t,i,n)=>{for(var o=n>1?void 0:n?ld(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&ad(t,i,o),o};const yr=class extends O{constructor(){super(...arguments),this._defaultName="__unnamed__",this.name=this._defaultName,this._hidden=!1}set hidden(e){this._hidden=e,this.dispatchEvent(new Event("hiddenchange"))}get hidden(){return this._hidden}connectedCallback(){super.connectedCallback();const{parentElement:e}=this;if(e&&this.name===this._defaultName){const t=[...e.children].indexOf(this);this.name=`${this._defaultName}${t}`}}render(){return m` `}};yr.styles=N` + `];let st=vr;lt([he()],st.prototype,"_filteredData",2);lt([g({type:Boolean,attribute:"headers-hidden",reflect:!0})],st.prototype,"headersHidden",2);lt([g({type:String,attribute:"min-col-width",reflect:!0})],st.prototype,"minColWidth",2);lt([g({type:Array,attribute:!1})],st.prototype,"columns",1);lt([g({type:Array,attribute:!1})],st.prototype,"data",1);lt([g({type:Boolean,reflect:!0})],st.prototype,"expanded",2);lt([g({type:Boolean,reflect:!0,attribute:"selectable-rows"})],st.prototype,"selectableRows",2);lt([g({attribute:!1})],st.prototype,"selection",2);lt([g({type:Boolean,attribute:"no-indentation",reflect:!0})],st.prototype,"noIndentation",2);lt([g({type:Boolean,reflect:!0})],st.prototype,"loading",2);lt([he()],st.prototype,"_errorLoading",2);var ad=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,Hi=(e,t,i,n)=>{for(var o=n>1?void 0:n?ld(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&ad(t,i,o),o};const yr=class extends O{constructor(){super(...arguments),this._defaultName="__unnamed__",this.name=this._defaultName,this._hidden=!1}set hidden(e){this._hidden=e,this.dispatchEvent(new Event("hiddenchange"))}get hidden(){return this._hidden}connectedCallback(){super.connectedCallback();const{parentElement:e}=this;if(e&&this.name===this._defaultName){const t=[...e.children].indexOf(this);this.name=`${this._defaultName}${t}`}}render(){return m` `}};yr.styles=I` :host { display: block; height: 100%; @@ -1432,7 +1432,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B - `}};_r.styles=[kt.scrollbar,N` + `}};_r.styles=[kt.scrollbar,I` * { box-sizing: border-box; } @@ -1568,7 +1568,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B @input=${this.onInputChange} />`} - `}};$r.styles=[kt.scrollbar,N` + `}};$r.styles=[kt.scrollbar,I` :host { --bim-input--bgc: var(--bim-ui_bg-contrast-20); flex: 1; @@ -1614,7 +1614,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B
- `}};wr.styles=N` + `}};wr.styles=I` .parent { display: grid; gap: 0.25rem; @@ -1634,7 +1634,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B ${!this.labelHidden&&(this.label||this.icon)?m`${this.label}`:null} - `}};Cr.styles=N` + `}};Cr.styles=I` :host { --bim-label--fz: var(--bim-ui_size-xs); --bim-label--c: var(--bim-ui_bg-contrast-60); @@ -1682,7 +1682,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B
- `}};Ar.styles=N` + `}};Ar.styles=I` :host { --bim-button--bgc: transparent; background-color: var(--bim-ui_bg-base); @@ -1723,7 +1723,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B
- `}};Er.styles=N` + `}};Er.styles=I` :host { display: grid; min-width: 0; @@ -1773,11 +1773,11 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B No models has been loaded yet - `},Ed=(e,t=!0)=>{const i=U.create(Ad,e);if(t){const{components:n}=e,o=n.get(Vt),[,s]=i;o.onFragmentsLoaded.add(()=>setTimeout(()=>s())),o.onFragmentsDisposed.add(()=>s())}return i},Sd=Object.freeze(Object.defineProperty({__proto__:null,modelsList:Ed},Symbol.toStringTag,{value:"Module"})),Or=["Name","ContainedInStructure","ForLayerSet","LayerThickness","HasProperties","HasAssociations","HasAssignments","HasPropertySets","PredefinedType","Quantities","ReferencedSource","Identification",e=>e.includes("Value"),e=>e.startsWith("Material"),e=>e.startsWith("Relating"),e=>{const t=["IsGroupedBy","IsDecomposedBy"];return e.startsWith("Is")&&!t.includes(e)}];async function hi(e,t,i,n=Or,o=!1){const s=e.get(ht),r=await t.getProperties(i);if(!r)return{data:{Entity:`${i} properties not found...`}};const l=s.relationMaps[t.uuid],a={data:{}};for(const d in r){const u=n.map(h=>typeof h=="string"?d===h:h(d)).includes(!0);if(!(d==="type"||u))continue;const c=r[d];if(c)if(c.type===5){a.children||(a.children=[]);const h=await hi(e,t,c.value,n,o);a.children.push(h)}else if(typeof c=="object"&&!Array.isArray(c)){const{value:h,type:p}=c;if(o)p===1||p===2||p===3||(a.data[d]=h);else{const b=typeof h=="number"?Number(h.toFixed(3)):h;a.data[d]=b}}else if(Array.isArray(c))for(const h of c){if(h.type!==5)continue;a.children||(a.children=[]);const p=await hi(e,t,h.value,n,o);a.children.push(p)}else if(d==="type"){const h=mi[c];a.data.Entity=h}else a.data[d]=c}if(l&&l.get(r.expressID)){const d=l.get(r.expressID);for(const u of n){const c=[];if(typeof u=="string"){const h=s._inverseAttributes.indexOf(u);h!==-1&&c.push(h)}else{const h=s._inverseAttributes.filter(p=>u(p));for(const p of h){const b=s._inverseAttributes.indexOf(p);c.push(b)}}for(const h of c){const p=d.get(h);if(p)for(const b of p){const $=await hi(e,t,b,n,o);a.children||(a.children=[]),a.children.push($)}}}}return a}const kd=e=>{const{components:t,fragmentIdMap:i,attributesToInclude:n,editable:o,tableDefinition:s}=e,r=t.get(Vt);let l;return typeof n=="function"?l=n(Or):l=n,m`{if(!a)return;const d=a,u=[],c=[];for(const h in i){const p=r.list.get(h);if(!(p&&p.group))continue;const b=p.group,$=c.find(v=>v.model===b);if($)for(const v of i[h])$.expressIDs.add(v);else{const v={model:b,expressIDs:new Set(i[h])};c.push(v)}}for(const h of c){const{model:p,expressIDs:b}=h;for(const $ of b){const v=await hi(t,p,$,l,o);u.push(v)}}d.dataTransform=s,d.data=u,d.columns=[{name:"Entity",width:"minmax(15rem, 1fr)"}]})}>`},Od=e=>U.create(kd,e),Td=Object.freeze(Object.defineProperty({__proto__:null,entityAttributes:Od},Symbol.toStringTag,{value:"Module"}));let _t;const Nd=e=>{const{components:t,classifications:i}=e,n=t.get(Kr),o=t.get(Go);_t||(_t=document.createElement("bim-table"),_t.headersHidden=!0,_t.hiddenColumns=["system"],_t.columns=["Name",{name:"Actions",width:"auto"}],_t.dataTransform={Actions:(r,l)=>{const{system:a,Name:d}=l;if(!(typeof a=="string"&&typeof d=="string"))return r;const u=n.list[a];if(!(u&&u[d]))return r;const c=u[d],{map:h}=c;return m` + `},Ed=(e,t=!0)=>{const i=U.create(Ad,e);if(t){const{components:n}=e,o=n.get(Vt),[,s]=i;o.onFragmentsLoaded.add(()=>setTimeout(()=>s())),o.onFragmentsDisposed.add(()=>s())}return i},Sd=Object.freeze(Object.defineProperty({__proto__:null,modelsList:Ed},Symbol.toStringTag,{value:"Module"})),Or=["Name","ContainedInStructure","ForLayerSet","LayerThickness","HasProperties","HasAssociations","HasAssignments","HasPropertySets","PredefinedType","Quantities","ReferencedSource","Identification",e=>e.includes("Value"),e=>e.startsWith("Material"),e=>e.startsWith("Relating"),e=>{const t=["IsGroupedBy","IsDecomposedBy"];return e.startsWith("Is")&&!t.includes(e)}];async function hi(e,t,i,n=Or,o=!1){const s=e.get(ht),r=await t.getProperties(i);if(!r)return{data:{Entity:`${i} properties not found...`}};const l=s.relationMaps[t.uuid],a={data:{}};for(const d in r){const u=n.map(h=>typeof h=="string"?d===h:h(d)).includes(!0);if(!(d==="type"||u))continue;const c=r[d];if(c)if(c.type===5){a.children||(a.children=[]);const h=await hi(e,t,c.value,n,o);a.children.push(h)}else if(typeof c=="object"&&!Array.isArray(c)){const{value:h,type:p}=c;if(o)p===1||p===2||p===3||(a.data[d]=h);else{const b=typeof h=="number"?Number(h.toFixed(3)):h;a.data[d]=b}}else if(Array.isArray(c))for(const h of c){if(h.type!==5)continue;a.children||(a.children=[]);const p=await hi(e,t,h.value,n,o);a.children.push(p)}else if(d==="type"){const h=mi[c];a.data.Entity=h}else a.data[d]=c}if(l&&l.get(r.expressID)){const d=l.get(r.expressID);for(const u of n){const c=[];if(typeof u=="string"){const h=s._inverseAttributes.indexOf(u);h!==-1&&c.push(h)}else{const h=s._inverseAttributes.filter(p=>u(p));for(const p of h){const b=s._inverseAttributes.indexOf(p);c.push(b)}}for(const h of c){const p=d.get(h);if(p)for(const b of p){const $=await hi(e,t,b,n,o);a.children||(a.children=[]),a.children.push($)}}}}return a}const kd=e=>{const{components:t,fragmentIdMap:i,attributesToInclude:n,editable:o,tableDefinition:s}=e,r=t.get(Vt);let l;return typeof n=="function"?l=n(Or):l=n,m`{if(!a)return;const d=a,u=[],c=[];for(const h in i){const p=r.list.get(h);if(!(p&&p.group))continue;const b=p.group,$=c.find(v=>v.model===b);if($)for(const v of i[h])$.expressIDs.add(v);else{const v={model:b,expressIDs:new Set(i[h])};c.push(v)}}for(const h of c){const{model:p,expressIDs:b}=h;for(const $ of b){const v=await hi(t,p,$,l,o);u.push(v)}}d.dataTransform=s,d.data=u,d.columns=[{name:"Entity",width:"minmax(15rem, 1fr)"}]})}>`},Od=e=>U.create(kd,e),Td=Object.freeze(Object.defineProperty({__proto__:null,entityAttributes:Od},Symbol.toStringTag,{value:"Module"}));let _t;const Id=e=>{const{components:t,classifications:i}=e,n=t.get(Kr),o=t.get(Go);_t||(_t=document.createElement("bim-table"),_t.headersHidden=!0,_t.hiddenColumns=["system"],_t.columns=["Name",{name:"Actions",width:"auto"}],_t.dataTransform={Actions:(r,l)=>{const{system:a,Name:d}=l;if(!(typeof a=="string"&&typeof d=="string"))return r;const u=n.list[a];if(!(u&&u[d]))return r;const c=u[d],{map:h}=c;return m`
{const b=p.target;o.set(b.value,h)}}>
- `}});const s=[];for(const r of i){const l=typeof r=="string"?r:r.system,a=typeof r=="string"?r:r.label,d=n.list[l];d&&s.push({data:{Name:a,system:l},children:Object.keys(d).map(u=>({data:{Name:u,system:l,Actions:""}}))})}return _t.data=s,m`${_t}`},Id=(e,t=!0)=>{const i=U.create(Nd,e);if(t){const{components:n}=e,o=n.get(Vt),[,s]=i;o.onFragmentsDisposed.add(()=>s())}return i},Md=Object.freeze(Object.defineProperty({__proto__:null,classificationTree:Id},Symbol.toStringTag,{value:"Module"})),Tr=async(e,t,i)=>{var n,o,s,r;const l=e.get(ht),a={data:{Name:(n=i.Name)==null?void 0:n.value},children:[{data:{Name:"Identification",Value:(o=i.Identification)==null?void 0:o.value}},{data:{Name:"Name",Value:(s=i.Name)==null?void 0:s.value}},{data:{Name:"Description",Value:(r=i.Description)==null?void 0:r.value}}]},d=l.getEntityRelations(t,i.expressID,"IsNestedBy");if(!d)return a;a.children||(a.children=[]);const u=[];a.children.push({data:{Name:"Tasks"},children:u});for(const c of d){const h=await t.getProperties(c);if(!h)continue;const p=await Tr(e,t,h);u.push(p)}return a},Pd=async(e,t,i)=>{const n=[];for(const o of i){const s=await Tr(e,t,o);n.push(s)}return{data:{Name:"Tasks"},children:n}},Rd=async(e,t)=>{var i,n,o,s;const r={data:{Name:"Classifications"}};for(const l of t){const{value:a}=l.ReferencedSource,d=await e.getProperties(a);if(!d)continue;const u={data:{Name:(i=d.Name)==null?void 0:i.value},children:[{data:{Name:"Identification",Value:((n=l.Identification)==null?void 0:n.value)||((o=l.ItemReference)==null?void 0:o.value)}},{data:{Name:"Name",Value:(s=l.Name)==null?void 0:s.value}}]};r.children||(r.children=[]),r.children.push(u)}return r},Ld=async(e,t)=>{var i,n,o,s,r,l;const a={data:{Name:"Materials"}};for(const d of t){if(d.type===Qo){const u=(i=d.ForLayerSet)==null?void 0:i.value,c=await e.getProperties(u);if(!c)continue;for(const h of c.MaterialLayers){const{value:p}=h,b=await e.getProperties(p);if(!b)continue;const $=await e.getProperties((n=b.Material)==null?void 0:n.value);if(!$)continue;const v={data:{Name:"Layer"},children:[{data:{Name:"Thickness",Value:(o=b.LayerThickness)==null?void 0:o.value}},{data:{Name:"Material",Value:(s=$.Name)==null?void 0:s.value}}]};a.children||(a.children=[]),a.children.push(v)}}if(d.type===Ko)for(const u of d.Materials){const{value:c}=u,h=await e.getProperties(c);if(!h)continue;const p={data:{Name:"Name",Value:(r=h.Name)==null?void 0:r.value}};a.children||(a.children=[]),a.children.push(p)}if(d.type===Zo){const u={data:{Name:"Name",Value:(l=d.Name)==null?void 0:l.value}};a.children||(a.children=[]),a.children.push(u)}}return a},jd={IFCLENGTHMEASURE:"LENGTHUNIT",IFCAREAMEASURE:"AREAUNIT",IFCVOLUMEMEASURE:"VOLUMEUNIT",IFCPLANEANGLEMEASURE:"PLANEANGLEUNIT"},zd={MILLIMETRE:{symbol:"mm",digits:0},METRE:{symbol:"m",digits:2},KILOMETRE:{symbol:"km",digits:2},SQUARE_METRE:{symbol:"m²",digits:2},CUBIC_METRE:{symbol:"m³",digits:2},DEGREE:{symbol:"°",digits:2},RADIAN:{symbol:"rad",digits:2},GRAM:{symbol:"g",digits:0},KILOGRAM:{symbol:"kg",digits:2},MILLISECOND:{symbol:"ms",digits:0},SECOND:{symbol:"s",digits:0}},Nr=async(e,t)=>{var i,n,o;const s=Object.values(await e.getAllPropertiesOfType(sa))[0];let r;for(const l of s.Units){const a=await e.getProperties(l.value);if(a&&((i=a.UnitType)==null?void 0:i.value)===jd[t]){r=`${((n=a.Prefix)==null?void 0:n.value)??""}${((o=a.Name)==null?void 0:o.value)??""}`;break}}return r?zd[r]:null},Dd=async(e,t,i)=>{var n,o;const{displayUnits:s}=i,r={data:{Name:"PropertySets"}};for(const l of t){const a={data:{Name:(n=l.Name)==null?void 0:n.value}};if(l.type===Xo){for(const d of l.HasProperties){const{value:u}=d,c=await e.getProperties(u);if(!c)continue;const h=Object.keys(c).find(v=>v.includes("Value"));if(!(h&&c[h]))continue;let p=c[h].value,b="";if(s){const{name:v}=c[h],f=await Nr(e,v)??{};b=f.symbol,p=c[h].value,typeof p=="number"&&f.digits&&(p=p.toFixed(f.digits))}const $={data:{Name:(o=c.Name)==null?void 0:o.value,Value:`${p} ${b??""}`}};a.children||(a.children=[]),a.children.push($)}a.children&&(r.children||(r.children=[]),r.children.push(a))}}return r},Hd=async(e,t,i)=>{var n,o;const{displayUnits:s}=i,r={data:{Name:"QuantitySets"}};for(const l of t){const a={data:{Name:(n=l.Name)==null?void 0:n.value}};if(l.type===Jo){for(const d of l.Quantities){const{value:u}=d,c=await e.getProperties(u);if(!c)continue;const h=Object.keys(c).find(v=>v.includes("Value"));if(!(h&&c[h]))continue;let p=c[h].value,b="";if(s){const{name:v}=c[h],f=await Nr(e,v)??{};b=f.symbol,p=c[h].value,typeof p=="number"&&f.digits&&(p=p.toFixed(f.digits))}const $={data:{Name:(o=c.Name)==null?void 0:o.value,Value:`${p} ${b??""}`}};a.children||(a.children=[]),a.children.push($)}a.children&&(r.children||(r.children=[]),r.children.push(a))}}return r},Fd=["OwnerHistory","ObjectPlacement","CompositionType"],Ir=async(e,t)=>{const i={groupName:"Attributes",includeClass:!1,...t},{groupName:n,includeClass:o}=i,s={data:{Name:n}};o&&(s.children||(s.children=[]),s.children.push({data:{Name:"Class",Value:mi[e.type]}}));for(const r in e){if(Fd.includes(r))continue;const l=e[r];if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.type===oa)continue;const a={data:{Name:r,Value:l.value}};s.children||(s.children=[]),s.children.push(a)}}return s},ae=(e,...t)=>{e.children||(e.children=[]),e.children.push(...t)},Bd=async(e,t,i,n,o)=>{const s=e.get(ht).getEntityRelations(t,i,"IsDefinedBy");if(s){const r=[],l=[];for(const u of s){const c=await t.getProperties(u);c&&(c.type===Xo&&r.push(c),c.type===Jo&&l.push(c))}const a=await Dd(t,r,o);a.children&&ae(n,a);const d=await Hd(t,l,o);d.children&&ae(n,d)}},Ud=async(e,t,i,n)=>{const o=e.get(ht).getEntityRelations(t,i,"HasAssociations");if(o){const s=[],r=[];for(const d of o){const u=await t.getProperties(d);u&&(u.type===ra&&s.push(u),(u.type===Qo||u.type===aa||u.type===la||u.type===Zo||u.type===Ko)&&r.push(u))}const l=await Rd(t,s);l.children&&ae(n,l);const a=await Ld(t,r);a.children&&ae(n,a)}},Vd=async(e,t,i,n)=>{const o=e.get(ht).getEntityRelations(t,i,"HasAssignments");if(o){const s=[];for(const l of o){const a=await t.getProperties(l);a&&a.type===ca&&s.push(a)}const r=await Pd(e,t,s);r.children&&ae(n,r)}},Wd=async(e,t,i,n)=>{const o=e.get(ht).getEntityRelations(t,i,"ContainedInStructure");if(o&&o[0]){const s=o[0],r=await t.getProperties(s);if(r){const l=await Ir(r,{groupName:"SpatialContainer"});ae(n,l)}}};let ci={};const Gd=async(e,t,i)=>{var n;const o=e.get(ht),s=e.get(Vt),r=s.getModelIdMap(t);Object.keys(t).length===0&&(ci={});const l=[];for(const a in r){const d=s.groups.get(a);if(!d)continue;const u=o.relationMaps[d.uuid];if(!u)continue;a in ci||(ci[a]=new Map);const c=ci[a],h=r[a];for(const p of h){let b=c.get(p);if(b){l.push(b);continue}const $=await d.getProperties(p);if(!$)continue;b={data:{Name:(n=$.Name)==null?void 0:n.value}},l.push(b),c.set(p,b);const v=await Ir($,{includeClass:!0});b.children||(b.children=[]),b.children.push(v),u.get(p)&&(await Bd(e,d,p,b,i),await Ud(e,d,p,b),await Vd(e,d,p,b),await Wd(e,d,p,b))}}return l},qd=e=>{const t={emptySelectionWarning:!0,...e},{components:i,fragmentIdMap:n,emptySelectionWarning:o}=t;return m` + `}});const s=[];for(const r of i){const l=typeof r=="string"?r:r.system,a=typeof r=="string"?r:r.label,d=n.list[l];d&&s.push({data:{Name:a,system:l},children:Object.keys(d).map(u=>({data:{Name:u,system:l,Actions:""}}))})}return _t.data=s,m`${_t}`},Nd=(e,t=!0)=>{const i=U.create(Id,e);if(t){const{components:n}=e,o=n.get(Vt),[,s]=i;o.onFragmentsDisposed.add(()=>s())}return i},Md=Object.freeze(Object.defineProperty({__proto__:null,classificationTree:Nd},Symbol.toStringTag,{value:"Module"})),Tr=async(e,t,i)=>{var n,o,s,r;const l=e.get(ht),a={data:{Name:(n=i.Name)==null?void 0:n.value},children:[{data:{Name:"Identification",Value:(o=i.Identification)==null?void 0:o.value}},{data:{Name:"Name",Value:(s=i.Name)==null?void 0:s.value}},{data:{Name:"Description",Value:(r=i.Description)==null?void 0:r.value}}]},d=l.getEntityRelations(t,i.expressID,"IsNestedBy");if(!d)return a;a.children||(a.children=[]);const u=[];a.children.push({data:{Name:"Tasks"},children:u});for(const c of d){const h=await t.getProperties(c);if(!h)continue;const p=await Tr(e,t,h);u.push(p)}return a},Pd=async(e,t,i)=>{const n=[];for(const o of i){const s=await Tr(e,t,o);n.push(s)}return{data:{Name:"Tasks"},children:n}},Rd=async(e,t)=>{var i,n,o,s;const r={data:{Name:"Classifications"}};for(const l of t){const{value:a}=l.ReferencedSource,d=await e.getProperties(a);if(!d)continue;const u={data:{Name:(i=d.Name)==null?void 0:i.value},children:[{data:{Name:"Identification",Value:((n=l.Identification)==null?void 0:n.value)||((o=l.ItemReference)==null?void 0:o.value)}},{data:{Name:"Name",Value:(s=l.Name)==null?void 0:s.value}}]};r.children||(r.children=[]),r.children.push(u)}return r},Ld=async(e,t)=>{var i,n,o,s,r,l;const a={data:{Name:"Materials"}};for(const d of t){if(d.type===Qo){const u=(i=d.ForLayerSet)==null?void 0:i.value,c=await e.getProperties(u);if(!c)continue;for(const h of c.MaterialLayers){const{value:p}=h,b=await e.getProperties(p);if(!b)continue;const $=await e.getProperties((n=b.Material)==null?void 0:n.value);if(!$)continue;const v={data:{Name:"Layer"},children:[{data:{Name:"Thickness",Value:(o=b.LayerThickness)==null?void 0:o.value}},{data:{Name:"Material",Value:(s=$.Name)==null?void 0:s.value}}]};a.children||(a.children=[]),a.children.push(v)}}if(d.type===Ko)for(const u of d.Materials){const{value:c}=u,h=await e.getProperties(c);if(!h)continue;const p={data:{Name:"Name",Value:(r=h.Name)==null?void 0:r.value}};a.children||(a.children=[]),a.children.push(p)}if(d.type===Zo){const u={data:{Name:"Name",Value:(l=d.Name)==null?void 0:l.value}};a.children||(a.children=[]),a.children.push(u)}}return a},jd={IFCLENGTHMEASURE:"LENGTHUNIT",IFCAREAMEASURE:"AREAUNIT",IFCVOLUMEMEASURE:"VOLUMEUNIT",IFCPLANEANGLEMEASURE:"PLANEANGLEUNIT"},zd={MILLIMETRE:{symbol:"mm",digits:0},METRE:{symbol:"m",digits:2},KILOMETRE:{symbol:"km",digits:2},SQUARE_METRE:{symbol:"m²",digits:2},CUBIC_METRE:{symbol:"m³",digits:2},DEGREE:{symbol:"°",digits:2},RADIAN:{symbol:"rad",digits:2},GRAM:{symbol:"g",digits:0},KILOGRAM:{symbol:"kg",digits:2},MILLISECOND:{symbol:"ms",digits:0},SECOND:{symbol:"s",digits:0}},Ir=async(e,t)=>{var i,n,o;const s=Object.values(await e.getAllPropertiesOfType(sa))[0];let r;for(const l of s.Units){const a=await e.getProperties(l.value);if(a&&((i=a.UnitType)==null?void 0:i.value)===jd[t]){r=`${((n=a.Prefix)==null?void 0:n.value)??""}${((o=a.Name)==null?void 0:o.value)??""}`;break}}return r?zd[r]:null},Dd=async(e,t,i)=>{var n,o;const{displayUnits:s}=i,r={data:{Name:"PropertySets"}};for(const l of t){const a={data:{Name:(n=l.Name)==null?void 0:n.value}};if(l.type===Xo){for(const d of l.HasProperties){const{value:u}=d,c=await e.getProperties(u);if(!c)continue;const h=Object.keys(c).find(v=>v.includes("Value"));if(!(h&&c[h]))continue;let p=c[h].value,b="";if(s){const{name:v}=c[h],f=await Ir(e,v)??{};b=f.symbol,p=c[h].value,typeof p=="number"&&f.digits&&(p=p.toFixed(f.digits))}const $={data:{Name:(o=c.Name)==null?void 0:o.value,Value:`${p} ${b??""}`}};a.children||(a.children=[]),a.children.push($)}a.children&&(r.children||(r.children=[]),r.children.push(a))}}return r},Hd=async(e,t,i)=>{var n,o;const{displayUnits:s}=i,r={data:{Name:"QuantitySets"}};for(const l of t){const a={data:{Name:(n=l.Name)==null?void 0:n.value}};if(l.type===Jo){for(const d of l.Quantities){const{value:u}=d,c=await e.getProperties(u);if(!c)continue;const h=Object.keys(c).find(v=>v.includes("Value"));if(!(h&&c[h]))continue;let p=c[h].value,b="";if(s){const{name:v}=c[h],f=await Ir(e,v)??{};b=f.symbol,p=c[h].value,typeof p=="number"&&f.digits&&(p=p.toFixed(f.digits))}const $={data:{Name:(o=c.Name)==null?void 0:o.value,Value:`${p} ${b??""}`}};a.children||(a.children=[]),a.children.push($)}a.children&&(r.children||(r.children=[]),r.children.push(a))}}return r},Fd=["OwnerHistory","ObjectPlacement","CompositionType"],Nr=async(e,t)=>{const i={groupName:"Attributes",includeClass:!1,...t},{groupName:n,includeClass:o}=i,s={data:{Name:n}};o&&(s.children||(s.children=[]),s.children.push({data:{Name:"Class",Value:mi[e.type]}}));for(const r in e){if(Fd.includes(r))continue;const l=e[r];if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.type===oa)continue;const a={data:{Name:r,Value:l.value}};s.children||(s.children=[]),s.children.push(a)}}return s},ae=(e,...t)=>{e.children||(e.children=[]),e.children.push(...t)},Bd=async(e,t,i,n,o)=>{const s=e.get(ht).getEntityRelations(t,i,"IsDefinedBy");if(s){const r=[],l=[];for(const u of s){const c=await t.getProperties(u);c&&(c.type===Xo&&r.push(c),c.type===Jo&&l.push(c))}const a=await Dd(t,r,o);a.children&&ae(n,a);const d=await Hd(t,l,o);d.children&&ae(n,d)}},Ud=async(e,t,i,n)=>{const o=e.get(ht).getEntityRelations(t,i,"HasAssociations");if(o){const s=[],r=[];for(const d of o){const u=await t.getProperties(d);u&&(u.type===ra&&s.push(u),(u.type===Qo||u.type===aa||u.type===la||u.type===Zo||u.type===Ko)&&r.push(u))}const l=await Rd(t,s);l.children&&ae(n,l);const a=await Ld(t,r);a.children&&ae(n,a)}},Vd=async(e,t,i,n)=>{const o=e.get(ht).getEntityRelations(t,i,"HasAssignments");if(o){const s=[];for(const l of o){const a=await t.getProperties(l);a&&a.type===ca&&s.push(a)}const r=await Pd(e,t,s);r.children&&ae(n,r)}},Wd=async(e,t,i,n)=>{const o=e.get(ht).getEntityRelations(t,i,"ContainedInStructure");if(o&&o[0]){const s=o[0],r=await t.getProperties(s);if(r){const l=await Nr(r,{groupName:"SpatialContainer"});ae(n,l)}}};let ci={};const Gd=async(e,t,i)=>{var n;const o=e.get(ht),s=e.get(Vt),r=s.getModelIdMap(t);Object.keys(t).length===0&&(ci={});const l=[];for(const a in r){const d=s.groups.get(a);if(!d)continue;const u=o.relationMaps[d.uuid];if(!u)continue;a in ci||(ci[a]=new Map);const c=ci[a],h=r[a];for(const p of h){let b=c.get(p);if(b){l.push(b);continue}const $=await d.getProperties(p);if(!$)continue;b={data:{Name:(n=$.Name)==null?void 0:n.value}},l.push(b),c.set(p,b);const v=await Nr($,{includeClass:!0});b.children||(b.children=[]),b.children.push(v),u.get(p)&&(await Bd(e,d,p,b,i),await Ud(e,d,p,b),await Vd(e,d,p,b),await Wd(e,d,p,b))}}return l},qd=e=>{const t={emptySelectionWarning:!0,...e},{components:i,fragmentIdMap:n,emptySelectionWarning:o}=t;return m` {const{cell:r}=s;r.column==="Name"&&!("Value"in r.rowData)&&(r.style.gridColumn="1 / -1")}} ${q(async s=>{if(!s)return;const r=s;r.columns=[{name:"Name",width:"12rem"}],r.headersHidden=!0,r.loadFunction=()=>Gd(i,n,e),await r.loadData(!0)&&r.dispatchEvent(new Event("datacomputed"))})}> ${o?m` @@ -1804,7 +1804,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B {const o=n.target;i.setPasses({custom:o.checked})}} .checked=${t}> `},$t=(e,t,i,n=()=>{})=>m` - `,I=(e,t,i,n)=>{const o={slider:!1,min:0,max:100,step:1,prefix:null,suffix:null,onInputSet:()=>{},...n},{slider:s,min:r,max:l,step:a,suffix:d,prefix:u,onInputSet:c}=o;return m` + `,N=(e,t,i,n)=>{const o={slider:!1,min:0,max:100,step:1,prefix:null,suffix:null,onInputSet:()=>{},...n},{slider:s,min:r,max:l,step:a,suffix:d,prefix:u,onInputSet:c}=o;return m` `},lu=e=>{const{components:t}=e,i=t.get(Oi);return m` - {const o=n.cell.parentNode;if(!o)return;const s=o.querySelector("bim-table-cell[column='Name']"),r=o.querySelector("bim-table-cell[column='Value']");s&&!r&&(s.style.gridColumn="1 / -1")}} ${q(async n=>{var o,s,r,l,a;if(!n)return;const d=n;d.preserveStructureOnFilter=!0,d.dataTransform={Value:(c,h)=>{const p=h.World,b=i.list.get(p);if(!b)return c;const{scene:$,camera:v,renderer:f}=b,y=h.Name;if(y==="Grid"&&h.IsGridConfig&&typeof c=="boolean"){const _=Se(t,b);return _?$t(_,"visible",c):c}if(y==="Color"&&h.IsGridConfig&&typeof c=="string"){const _=Se(t,b);return _?ou(_,c):c}if(y==="Distance"&&h.IsGridConfig&&typeof c=="number"){const _=Se(t,b);return _?I(_.material.uniforms.uDistance,"value",c,{slider:!0,min:300,max:1e3}):c}if(y==="Size"&&h.IsGridConfig&&typeof c=="string"){const _=Se(t,b);if(!_)return c;const{x,y:A}=JSON.parse(c),C=I(_.material.uniforms.uSize1,"value",x,{slider:!0,suffix:"m",prefix:"A",min:1,max:20}),T=I(_.material.uniforms.uSize2,"value",A,{slider:!0,suffix:"m",prefix:"B",min:1,max:20});return m` + {const o=n.cell.parentNode;if(!o)return;const s=o.querySelector("bim-table-cell[column='Name']"),r=o.querySelector("bim-table-cell[column='Value']");s&&!r&&(s.style.gridColumn="1 / -1")}} ${q(async n=>{var o,s,r,l,a;if(!n)return;const d=n;d.preserveStructureOnFilter=!0,d.dataTransform={Value:(c,h)=>{const p=h.World,b=i.list.get(p);if(!b)return c;const{scene:$,camera:v,renderer:f}=b,y=h.Name;if(y==="Grid"&&h.IsGridConfig&&typeof c=="boolean"){const _=Se(t,b);return _?$t(_,"visible",c):c}if(y==="Color"&&h.IsGridConfig&&typeof c=="string"){const _=Se(t,b);return _?ou(_,c):c}if(y==="Distance"&&h.IsGridConfig&&typeof c=="number"){const _=Se(t,b);return _?N(_.material.uniforms.uDistance,"value",c,{slider:!0,min:300,max:1e3}):c}if(y==="Size"&&h.IsGridConfig&&typeof c=="string"){const _=Se(t,b);if(!_)return c;const{x,y:A}=JSON.parse(c),C=N(_.material.uniforms.uSize1,"value",x,{slider:!0,suffix:"m",prefix:"A",min:1,max:20}),T=N(_.material.uniforms.uSize2,"value",A,{slider:!0,suffix:"m",prefix:"B",min:1,max:20});return m`
${C}${T}
- `}if(y==="Near Frustum"&&v.three instanceof ri&&typeof c=="number"){const _=v.three;return I(v.three,"near",c,{slider:!0,min:.1,max:10,step:.1,onInputSet:()=>_.updateProjectionMatrix()})}if(y==="Far Frustum"&&v.three instanceof ri&&typeof c=="number"){const _=v.three;return I(v.three,"far",c,{slider:!0,min:300,max:2e3,step:10,onInputSet:()=>_.updateProjectionMatrix()})}if(y==="Field of View"&&v.three instanceof ri&&typeof c=="number"){const _=v.three;return I(v.three,"fov",c,{slider:!0,min:10,max:120,onInputSet:()=>_.updateProjectionMatrix()})}if(y==="Invert Drag"&&v.hasCameraControls()&&typeof c=="boolean")return $t(v.controls,"dollyDragInverted",c);if(y==="Dolly Speed"&&v.hasCameraControls()&&typeof c=="number")return I(v.controls,"dollySpeed",c,{slider:!0,min:.5,max:3,step:.1});if(y==="Truck Speed"&&v.hasCameraControls()&&typeof c=="number")return I(v.controls,"truckSpeed",c,{slider:!0,min:.5,max:6,step:.1});if(y==="Smooth Time"&&v.hasCameraControls()&&typeof c=="number")return I(v.controls,"smoothTime",c,{slider:!0,min:.01,max:2,step:.01});if(y==="Intensity"&&typeof c=="number"){if(h.Light&&typeof h.Light=="string"){const _=$.three.children.find(x=>x.uuid===h.Light);return _&&_ instanceof Ce?I(_,"intensity",c,{slider:!0,min:0,max:10,step:.1}):c}if(h.IsAOConfig&&f instanceof P)return I(f.postproduction.n8ao.configuration,"intensity",c,{slider:!0,max:16,step:.1})}if(y==="Color"&&typeof c=="string"){const _=h.Light,x=$.three.children.find(A=>A.uuid===_);if(x&&x instanceof Ce)return eu(x,c);if(h.IsAOConfig&&f instanceof P)return iu(f,c)}if(y==="Ambient Oclussion"&&typeof c=="boolean"&&h.IsAOConfig&&f instanceof P)return su(f,c);if(y==="Half Resolution"&&h.IsAOConfig&&f instanceof P&&typeof c=="boolean")return $t(f.postproduction.n8ao.configuration,"halfRes",c);if(y==="Screen Space Radius"&&h.IsAOConfig&&f instanceof P&&typeof c=="boolean")return $t(f.postproduction.n8ao.configuration,"screenSpaceRadius",c);if(y==="Radius"&&h.IsAOConfig&&f instanceof P&&typeof c=="number")return I(f.postproduction.n8ao.configuration,"aoRadius",c,{slider:!0,max:2,step:.1});if(y==="Denoise Samples"&&h.IsAOConfig&&f instanceof P&&typeof c=="number")return I(f.postproduction.n8ao.configuration,"denoiseSamples",c,{slider:!0,min:1,max:16});if(y==="Samples"&&h.IsAOConfig&&f instanceof P&&typeof c=="number")return I(f.postproduction.n8ao.configuration,"aoSamples",c,{slider:!0,min:1,max:16});if(y==="Denoise Radius"&&h.IsAOConfig&&f instanceof P&&typeof c=="number")return I(f.postproduction.n8ao.configuration,"denoiseRadius",c,{slider:!0,min:0,max:16,step:.1});if(y==="Distance Falloff"&&h.IsAOConfig&&f instanceof P&&typeof c=="number")return I(f.postproduction.n8ao.configuration,"distanceFalloff",c,{slider:!0,min:0,max:4,step:.1});if(y==="Directional Light"&&h.Light&&typeof h.Light=="string"&&typeof c=="boolean"){const _=$.three.children.find(x=>x.uuid===h.Light);return _&&_ instanceof Ce?$t(_,"visible",c):c}if(y==="Ambient Light"&&h.Light&&typeof h.Light=="string"&&typeof c=="boolean"){const _=$.three.children.find(x=>x.uuid===h.Light);return _&&_ instanceof Ce?$t(_,"visible",c):c}if(y==="Position"&&h.Light&&typeof h.Light=="string"&&typeof c=="string"){const _=$.three.children.find(E=>E.uuid===h.Light);if(!(_&&_ instanceof Ce))return c;const{x,y:A,z:C}=JSON.parse(c),T=I(_.position,"x",x,{slider:!0,prefix:"X",suffix:"m",min:-50,max:50}),M=I(_.position,"y",A,{slider:!0,prefix:"Y",suffix:"m",min:-50,max:50}),S=I(_.position,"z",C,{slider:!0,prefix:"Z",suffix:"m",min:-50,max:50});return m` + `}if(y==="Near Frustum"&&v.three instanceof ri&&typeof c=="number"){const _=v.three;return N(v.three,"near",c,{slider:!0,min:.1,max:10,step:.1,onInputSet:()=>_.updateProjectionMatrix()})}if(y==="Far Frustum"&&v.three instanceof ri&&typeof c=="number"){const _=v.three;return N(v.three,"far",c,{slider:!0,min:300,max:2e3,step:10,onInputSet:()=>_.updateProjectionMatrix()})}if(y==="Field of View"&&v.three instanceof ri&&typeof c=="number"){const _=v.three;return N(v.three,"fov",c,{slider:!0,min:10,max:120,onInputSet:()=>_.updateProjectionMatrix()})}if(y==="Invert Drag"&&v.hasCameraControls()&&typeof c=="boolean")return $t(v.controls,"dollyDragInverted",c);if(y==="Dolly Speed"&&v.hasCameraControls()&&typeof c=="number")return N(v.controls,"dollySpeed",c,{slider:!0,min:.5,max:3,step:.1});if(y==="Truck Speed"&&v.hasCameraControls()&&typeof c=="number")return N(v.controls,"truckSpeed",c,{slider:!0,min:.5,max:6,step:.1});if(y==="Smooth Time"&&v.hasCameraControls()&&typeof c=="number")return N(v.controls,"smoothTime",c,{slider:!0,min:.01,max:2,step:.01});if(y==="Intensity"&&typeof c=="number"){if(h.Light&&typeof h.Light=="string"){const _=$.three.children.find(x=>x.uuid===h.Light);return _&&_ instanceof Ce?N(_,"intensity",c,{slider:!0,min:0,max:10,step:.1}):c}if(h.IsAOConfig&&f instanceof P)return N(f.postproduction.n8ao.configuration,"intensity",c,{slider:!0,max:16,step:.1})}if(y==="Color"&&typeof c=="string"){const _=h.Light,x=$.three.children.find(A=>A.uuid===_);if(x&&x instanceof Ce)return eu(x,c);if(h.IsAOConfig&&f instanceof P)return iu(f,c)}if(y==="Ambient Oclussion"&&typeof c=="boolean"&&h.IsAOConfig&&f instanceof P)return su(f,c);if(y==="Half Resolution"&&h.IsAOConfig&&f instanceof P&&typeof c=="boolean")return $t(f.postproduction.n8ao.configuration,"halfRes",c);if(y==="Screen Space Radius"&&h.IsAOConfig&&f instanceof P&&typeof c=="boolean")return $t(f.postproduction.n8ao.configuration,"screenSpaceRadius",c);if(y==="Radius"&&h.IsAOConfig&&f instanceof P&&typeof c=="number")return N(f.postproduction.n8ao.configuration,"aoRadius",c,{slider:!0,max:2,step:.1});if(y==="Denoise Samples"&&h.IsAOConfig&&f instanceof P&&typeof c=="number")return N(f.postproduction.n8ao.configuration,"denoiseSamples",c,{slider:!0,min:1,max:16});if(y==="Samples"&&h.IsAOConfig&&f instanceof P&&typeof c=="number")return N(f.postproduction.n8ao.configuration,"aoSamples",c,{slider:!0,min:1,max:16});if(y==="Denoise Radius"&&h.IsAOConfig&&f instanceof P&&typeof c=="number")return N(f.postproduction.n8ao.configuration,"denoiseRadius",c,{slider:!0,min:0,max:16,step:.1});if(y==="Distance Falloff"&&h.IsAOConfig&&f instanceof P&&typeof c=="number")return N(f.postproduction.n8ao.configuration,"distanceFalloff",c,{slider:!0,min:0,max:4,step:.1});if(y==="Directional Light"&&h.Light&&typeof h.Light=="string"&&typeof c=="boolean"){const _=$.three.children.find(x=>x.uuid===h.Light);return _&&_ instanceof Ce?$t(_,"visible",c):c}if(y==="Ambient Light"&&h.Light&&typeof h.Light=="string"&&typeof c=="boolean"){const _=$.three.children.find(x=>x.uuid===h.Light);return _&&_ instanceof Ce?$t(_,"visible",c):c}if(y==="Position"&&h.Light&&typeof h.Light=="string"&&typeof c=="string"){const _=$.three.children.find(E=>E.uuid===h.Light);if(!(_&&_ instanceof Ce))return c;const{x,y:A,z:C}=JSON.parse(c),T=N(_.position,"x",x,{slider:!0,prefix:"X",suffix:"m",min:-50,max:50}),M=N(_.position,"y",A,{slider:!0,prefix:"Y",suffix:"m",min:-50,max:50}),S=N(_.position,"z",C,{slider:!0,prefix:"Z",suffix:"m",min:-50,max:50});return m`
${T}${M}${S}
- `}return y==="Custom Effects"&&h.IsCEConfig&&f instanceof P&&typeof c=="boolean"?au(f,c):y==="Color"&&h.IsOutlineConfig&&f instanceof P&&typeof c=="string"?nu(f,c):y==="Tolerance"&&h.IsOutlineConfig&&f instanceof P&&typeof c=="number"?I(f.postproduction.customEffects,"tolerance",c,{slider:!0,min:0,max:6,step:.01}):y==="Outline"&&h.IsOutlineConfig&&f instanceof P&&typeof c=="boolean"?$t(f.postproduction.customEffects,"outlineEnabled",c):y==="Gloss"&&h.IsGlossConfig&&f instanceof P&&typeof c=="boolean"?$t(f.postproduction.customEffects,"glossEnabled",c):y==="Min"&&h.IsGlossConfig&&f instanceof P&&typeof c=="number"?I(f.postproduction.customEffects,"minGloss",c,{slider:!0,min:-.5,max:.5,step:.01}):y==="Max"&&h.IsGlossConfig&&f instanceof P&&typeof c=="number"?I(f.postproduction.customEffects,"maxGloss",c,{slider:!0,min:-.5,max:.5,step:.01}):y==="Exponent"&&h.IsGlossConfig&&f instanceof P&&typeof c=="number"?I(f.postproduction.customEffects,"glossExponent",c,{slider:!0,min:0,max:5,step:.01}):y==="Gamma Correction"&&h.IsGammaConfig&&f instanceof P&&typeof c=="boolean"?ru(f,c):c}};const u=[];for(const[,c]of i.list){const{scene:h,camera:p,renderer:b}=c,$=Se(t,c),v={data:{Name:c instanceof Zr&&c.name||c.uuid},children:[]};if(h){const f={data:{Name:"Scene"}};if($){const x=`#${$.material.uniforms.uColor.value.getHexString()}`,A=JSON.stringify({x:$.material.uniforms.uSize1.value,y:$.material.uniforms.uSize2.value}),C={data:{Name:"Grid",Value:$.three.visible,World:c.uuid,IsGridConfig:!0},children:[{data:{Name:"Color",Value:x,World:c.uuid,IsGridConfig:!0}},{data:{Name:"Size",Value:A,World:c.uuid,IsGridConfig:!0}},{data:{Name:"Distance",Value:$.material.uniforms.uDistance.value,World:c.uuid,IsGridConfig:!0}}]};f.children||(f.children=[]),f.children.push(C)}const y=h.three.children.filter(x=>x instanceof ea);for(const x of y){const A={data:{Name:"Directional Light",Value:x.visible,World:c.uuid,Light:x.uuid},children:[{data:{Name:"Position",Value:JSON.stringify(x.position),World:c.uuid,Light:x.uuid}},{data:{Name:"Intensity",Value:x.intensity,World:c.uuid,Light:x.uuid}},{data:{Name:"Color",Value:`#${x.color.getHexString()}`,World:c.uuid,Light:x.uuid}}]};f.children||(f.children=[]),f.children.push(A)}const _=h.three.children.filter(x=>x instanceof ia);for(const x of _){const A={data:{Name:"Ambient Light",Value:x.visible,World:c.uuid,Light:x.uuid},children:[{data:{Name:"Intensity",Value:x.intensity,World:c.uuid,Light:x.uuid}},{data:{Name:"Color",Value:`#${x.color.getHexString()}`,World:c.uuid,Light:x.uuid}}]};f.children||(f.children=[]),f.children.push(A)}f.children&&((o=f.children)==null?void 0:o.length)>0&&((s=v.children)==null||s.push(f))}if(p.three instanceof ri){const f={data:{Name:"Perspective Camera"},children:[{data:{Name:"Near Frustum",Value:p.three.near,World:c.uuid}},{data:{Name:"Far Frustum",Value:p.three.far,World:c.uuid}},{data:{Name:"Field of View",Value:p.three.fov,World:c.uuid}}]};if(p.hasCameraControls()){const{controls:y}=p,_={dollyDragInverted:"Invert Drag",dollySpeed:"Dolly Speed",truckSpeed:"Truck Speed",smoothTime:"Smooth Time"};for(const x in _){const A=y[x];A!=null&&((r=f.children)==null||r.push({data:{Name:_[x],Value:A,World:c.uuid}}))}}(l=v.children)==null||l.push(f)}if(b instanceof P){const{postproduction:f}=b,y=f.n8ao.configuration,_={data:{Name:"Renderer"},children:[{data:{Name:"Gamma Correction",Value:f.settings.gamma??!1,World:c.uuid,IsGammaConfig:!0}},{data:{Name:"Ambient Oclussion",Value:f.settings.ao??!1,World:c.uuid,IsAOConfig:!0},children:[{data:{Name:"Samples",Value:y.aoSamples,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Color",Value:`#${y.color.getHexString()}`,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Half Resolution",Value:y.halfRes,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Screen Space Radius",Value:y.screenSpaceRadius,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Radius",Value:y.aoRadius,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Intensity",Value:y.intensity,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Distance Falloff",Value:y.distanceFalloff,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Denoise Samples",Value:y.denoiseSamples,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Denoise Radius",Value:y.denoiseRadius,World:c.uuid,IsAOConfig:!0}}]},{data:{Name:"Custom Effects",Value:f.settings.custom??!1,World:c.uuid,IsCEConfig:!0},children:[{data:{Name:"Gloss",Value:f.customEffects.glossEnabled,World:c.uuid,IsGlossConfig:!0},children:[{data:{Name:"Min",Value:f.customEffects.minGloss,World:c.uuid,IsGlossConfig:!0}},{data:{Name:"Max",Value:f.customEffects.maxGloss,World:c.uuid,IsGlossConfig:!0}},{data:{Name:"Exponent",Value:f.customEffects.glossExponent,World:c.uuid,IsGlossConfig:!0}}]},{data:{Name:"Outline",Value:f.customEffects.outlineEnabled,World:c.uuid,IsOutlineConfig:!0},children:[{data:{Name:"Color",get Value(){const x=new ue(f.customEffects.lineColor),A=f.customEffects.opacity;return JSON.stringify({color:`#${x.getHexString()}`,opacity:A})},World:c.uuid,IsOutlineConfig:!0}},{data:{Name:"Tolerance",Value:f.customEffects.tolerance,World:c.uuid,IsOutlineConfig:!0}}]}]}]};(a=v.children)==null||a.push(_)}u.push(v)}d.columns=[{name:"Name",width:"11rem"}],d.hiddenColumns=["World","Light","IsAOConfig","IsCEConfig","IsGlossConfig","IsOutlineConfig","IsGammaConfig","IsGridConfig"],d.data=u})} headers-hidden expanded> + `}return y==="Custom Effects"&&h.IsCEConfig&&f instanceof P&&typeof c=="boolean"?au(f,c):y==="Color"&&h.IsOutlineConfig&&f instanceof P&&typeof c=="string"?nu(f,c):y==="Tolerance"&&h.IsOutlineConfig&&f instanceof P&&typeof c=="number"?N(f.postproduction.customEffects,"tolerance",c,{slider:!0,min:0,max:6,step:.01}):y==="Outline"&&h.IsOutlineConfig&&f instanceof P&&typeof c=="boolean"?$t(f.postproduction.customEffects,"outlineEnabled",c):y==="Gloss"&&h.IsGlossConfig&&f instanceof P&&typeof c=="boolean"?$t(f.postproduction.customEffects,"glossEnabled",c):y==="Min"&&h.IsGlossConfig&&f instanceof P&&typeof c=="number"?N(f.postproduction.customEffects,"minGloss",c,{slider:!0,min:-.5,max:.5,step:.01}):y==="Max"&&h.IsGlossConfig&&f instanceof P&&typeof c=="number"?N(f.postproduction.customEffects,"maxGloss",c,{slider:!0,min:-.5,max:.5,step:.01}):y==="Exponent"&&h.IsGlossConfig&&f instanceof P&&typeof c=="number"?N(f.postproduction.customEffects,"glossExponent",c,{slider:!0,min:0,max:5,step:.01}):y==="Gamma Correction"&&h.IsGammaConfig&&f instanceof P&&typeof c=="boolean"?ru(f,c):c}};const u=[];for(const[,c]of i.list){const{scene:h,camera:p,renderer:b}=c,$=Se(t,c),v={data:{Name:c instanceof Zr&&c.name||c.uuid},children:[]};if(h){const f={data:{Name:"Scene"}};if($){const x=`#${$.material.uniforms.uColor.value.getHexString()}`,A=JSON.stringify({x:$.material.uniforms.uSize1.value,y:$.material.uniforms.uSize2.value}),C={data:{Name:"Grid",Value:$.three.visible,World:c.uuid,IsGridConfig:!0},children:[{data:{Name:"Color",Value:x,World:c.uuid,IsGridConfig:!0}},{data:{Name:"Size",Value:A,World:c.uuid,IsGridConfig:!0}},{data:{Name:"Distance",Value:$.material.uniforms.uDistance.value,World:c.uuid,IsGridConfig:!0}}]};f.children||(f.children=[]),f.children.push(C)}const y=h.three.children.filter(x=>x instanceof ea);for(const x of y){const A={data:{Name:"Directional Light",Value:x.visible,World:c.uuid,Light:x.uuid},children:[{data:{Name:"Position",Value:JSON.stringify(x.position),World:c.uuid,Light:x.uuid}},{data:{Name:"Intensity",Value:x.intensity,World:c.uuid,Light:x.uuid}},{data:{Name:"Color",Value:`#${x.color.getHexString()}`,World:c.uuid,Light:x.uuid}}]};f.children||(f.children=[]),f.children.push(A)}const _=h.three.children.filter(x=>x instanceof ia);for(const x of _){const A={data:{Name:"Ambient Light",Value:x.visible,World:c.uuid,Light:x.uuid},children:[{data:{Name:"Intensity",Value:x.intensity,World:c.uuid,Light:x.uuid}},{data:{Name:"Color",Value:`#${x.color.getHexString()}`,World:c.uuid,Light:x.uuid}}]};f.children||(f.children=[]),f.children.push(A)}f.children&&((o=f.children)==null?void 0:o.length)>0&&((s=v.children)==null||s.push(f))}if(p.three instanceof ri){const f={data:{Name:"Perspective Camera"},children:[{data:{Name:"Near Frustum",Value:p.three.near,World:c.uuid}},{data:{Name:"Far Frustum",Value:p.three.far,World:c.uuid}},{data:{Name:"Field of View",Value:p.three.fov,World:c.uuid}}]};if(p.hasCameraControls()){const{controls:y}=p,_={dollyDragInverted:"Invert Drag",dollySpeed:"Dolly Speed",truckSpeed:"Truck Speed",smoothTime:"Smooth Time"};for(const x in _){const A=y[x];A!=null&&((r=f.children)==null||r.push({data:{Name:_[x],Value:A,World:c.uuid}}))}}(l=v.children)==null||l.push(f)}if(b instanceof P){const{postproduction:f}=b,y=f.n8ao.configuration,_={data:{Name:"Renderer"},children:[{data:{Name:"Gamma Correction",Value:f.settings.gamma??!1,World:c.uuid,IsGammaConfig:!0}},{data:{Name:"Ambient Oclussion",Value:f.settings.ao??!1,World:c.uuid,IsAOConfig:!0},children:[{data:{Name:"Samples",Value:y.aoSamples,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Color",Value:`#${y.color.getHexString()}`,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Half Resolution",Value:y.halfRes,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Screen Space Radius",Value:y.screenSpaceRadius,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Radius",Value:y.aoRadius,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Intensity",Value:y.intensity,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Distance Falloff",Value:y.distanceFalloff,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Denoise Samples",Value:y.denoiseSamples,World:c.uuid,IsAOConfig:!0}},{data:{Name:"Denoise Radius",Value:y.denoiseRadius,World:c.uuid,IsAOConfig:!0}}]},{data:{Name:"Custom Effects",Value:f.settings.custom??!1,World:c.uuid,IsCEConfig:!0},children:[{data:{Name:"Gloss",Value:f.customEffects.glossEnabled,World:c.uuid,IsGlossConfig:!0},children:[{data:{Name:"Min",Value:f.customEffects.minGloss,World:c.uuid,IsGlossConfig:!0}},{data:{Name:"Max",Value:f.customEffects.maxGloss,World:c.uuid,IsGlossConfig:!0}},{data:{Name:"Exponent",Value:f.customEffects.glossExponent,World:c.uuid,IsGlossConfig:!0}}]},{data:{Name:"Outline",Value:f.customEffects.outlineEnabled,World:c.uuid,IsOutlineConfig:!0},children:[{data:{Name:"Color",get Value(){const x=new ue(f.customEffects.lineColor),A=f.customEffects.opacity;return JSON.stringify({color:`#${x.getHexString()}`,opacity:A})},World:c.uuid,IsOutlineConfig:!0}},{data:{Name:"Tolerance",Value:f.customEffects.tolerance,World:c.uuid,IsOutlineConfig:!0}}]}]}]};(a=v.children)==null||a.push(_)}u.push(v)}d.columns=[{name:"Name",width:"11rem"}],d.hiddenColumns=["World","Light","IsAOConfig","IsCEConfig","IsGlossConfig","IsOutlineConfig","IsGammaConfig","IsGridConfig"],d.data=u})} headers-hidden expanded> No worlds to configure @@ -1837,9 +1837,9 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Ci=globalThis,Ai=Ci.trustedTypes,No=Ai?Ai.createPolicy("lit-html",{createHTML:e=>e}):void 0,Mr="$lit$",wt=`lit$${Math.random().toFixed(9).slice(2)}$`,Pr="?"+wt,uu=`<${Pr}>`,Ut=document,Ue=()=>Ut.createComment(""),Ve=e=>e===null||typeof e!="object"&&typeof e!="function",Ln=Array.isArray,hu=e=>Ln(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Ki=`[ -\f\r]`,ke=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Io=/-->/g,Mo=/>/g,Pt=RegExp(`>|${Ki}(?:([^\\s"'>=/]+)(${Ki}*=${Ki}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),Po=/'/g,Ro=/"/g,Rr=/^(?:script|style|textarea|title)$/i,pu=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),jn=pu(1),le=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),Lo=new WeakMap,Lt=Ut.createTreeWalker(Ut,129);function Lr(e,t){if(!Ln(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return No!==void 0?No.createHTML(t):t}const mu=(e,t)=>{const i=e.length-1,n=[];let o,s=t===2?"":t===3?"":"",r=ke;for(let l=0;l"?(r=o??ke,c=-1):u[1]===void 0?c=-2:(c=r.lastIndex-u[2].length,d=u[1],r=u[3]===void 0?Pt:u[3]==='"'?Ro:Po):r===Ro||r===Po?r=Pt:r===Io||r===Mo?r=ke:(r=Pt,o=void 0);const p=r===Pt&&e[l+1].startsWith("/>")?" ":"";s+=r===ke?a+uu:c>=0?(n.push(d),a.slice(0,c)+Mr+a.slice(c)+wt+p):a+wt+(c===-2?l:p)}return[Lr(e,s+(e[i]||"")+(t===2?"":t===3?"":"")),n]};class We{constructor({strings:t,_$litType$:i},n){let o;this.parts=[];let s=0,r=0;const l=t.length-1,a=this.parts,[d,u]=mu(t,i);if(this.el=We.createElement(d,n),Lt.currentNode=this.el.content,i===2||i===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(o=Lt.nextNode())!==null&&a.length0){o.textContent=Ai?Ai.emptyScript:"";for(let p=0;p2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=j}_$AI(t,i=this,n,o){const s=this.strings;let r=!1;if(s===void 0)t=ce(this,t,i,0),r=!Ve(t)||t!==this._$AH&&t!==le,r&&(this._$AH=t);else{const l=t;let a,d;for(t=s[0],a=0;a{const n=(i==null?void 0:i.renderBefore)??t;let o=n._$litPart$;if(o===void 0){const s=(i==null?void 0:i.renderBefore)??null;n._$litPart$=o=new ni(t.insertBefore(Ue(),s),s,void 0,i??{})}return o._$AI(e),o};/** + */const Ci=globalThis,Ai=Ci.trustedTypes,Io=Ai?Ai.createPolicy("lit-html",{createHTML:e=>e}):void 0,Mr="$lit$",wt=`lit$${Math.random().toFixed(9).slice(2)}$`,Pr="?"+wt,uu=`<${Pr}>`,Ut=document,Ue=()=>Ut.createComment(""),Ve=e=>e===null||typeof e!="object"&&typeof e!="function",Ln=Array.isArray,hu=e=>Ln(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Ki=`[ +\f\r]`,ke=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,No=/-->/g,Mo=/>/g,Pt=RegExp(`>|${Ki}(?:([^\\s"'>=/]+)(${Ki}*=${Ki}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),Po=/'/g,Ro=/"/g,Rr=/^(?:script|style|textarea|title)$/i,pu=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),jn=pu(1),le=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),Lo=new WeakMap,Lt=Ut.createTreeWalker(Ut,129);function Lr(e,t){if(!Ln(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Io!==void 0?Io.createHTML(t):t}const mu=(e,t)=>{const i=e.length-1,n=[];let o,s=t===2?"":t===3?"":"",r=ke;for(let l=0;l"?(r=o??ke,c=-1):u[1]===void 0?c=-2:(c=r.lastIndex-u[2].length,d=u[1],r=u[3]===void 0?Pt:u[3]==='"'?Ro:Po):r===Ro||r===Po?r=Pt:r===No||r===Mo?r=ke:(r=Pt,o=void 0);const p=r===Pt&&e[l+1].startsWith("/>")?" ":"";s+=r===ke?a+uu:c>=0?(n.push(d),a.slice(0,c)+Mr+a.slice(c)+wt+p):a+wt+(c===-2?l:p)}return[Lr(e,s+(e[i]||"")+(t===2?"":t===3?"":"")),n]};class We{constructor({strings:t,_$litType$:i},n){let o;this.parts=[];let s=0,r=0;const l=t.length-1,a=this.parts,[d,u]=mu(t,i);if(this.el=We.createElement(d,n),Lt.currentNode=this.el.content,i===2||i===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(o=Lt.nextNode())!==null&&a.length0){o.textContent=Ai?Ai.emptyScript:"";for(let p=0;p2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=j}_$AI(t,i=this,n,o){const s=this.strings;let r=!1;if(s===void 0)t=ce(this,t,i,0),r=!Ve(t)||t!==this._$AH&&t!==le,r&&(this._$AH=t);else{const l=t;let a,d;for(t=s[0],a=0;a{const n=(i==null?void 0:i.renderBefore)??t;let o=n._$litPart$;if(o===void 0){const s=(i==null?void 0:i.renderBefore)??null;n._$litPart$=o=new ni(t.insertBefore(Ue(),s),s,void 0,i??{})}return o._$AI(e),o};/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause @@ -1855,7 +1855,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const vn=()=>new Ou;let Ou=class{};const tn=new WeakMap,Tu=wu(class extends ku{render(e){return j}update(e,[t]){var i;const n=t!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=t,this.ht=(i=e.options)==null?void 0:i.host,this.rt(this.ct=e.element)),j}rt(e){if(this.isConnected||(e=void 0),typeof this.Y=="function"){const t=this.ht??globalThis;let i=tn.get(t);i===void 0&&(i=new WeakMap,tn.set(t,i)),i.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),i.set(this.Y,e),e!==void 0&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){var e,t;return typeof this.Y=="function"?(e=tn.get(this.ht??globalThis))==null?void 0:e.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),Nu={dueDate:e=>{if(typeof e=="string"&&e.trim()!=="")return new Date(e)},status:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},type:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},priority:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},stage:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},assignedTo:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},labels:e=>{if(Array.isArray(e))return new Set(e)}},zr=e=>{const{components:t,topic:i,value:n,onCancel:o,onSubmit:s,styles:r}=e,l=s??(()=>{}),a=t.get(ki),d=(n==null?void 0:n.title)??(i==null?void 0:i.title)??yt.default.title,u=(n==null?void 0:n.status)??(i==null?void 0:i.status)??yt.default.status,c=(n==null?void 0:n.type)??(i==null?void 0:i.type)??yt.default.type,h=(n==null?void 0:n.priority)??(i==null?void 0:i.priority)??yt.default.priority,p=(n==null?void 0:n.assignedTo)??(i==null?void 0:i.assignedTo)??yt.default.assignedTo,b=(n==null?void 0:n.labels)??(i==null?void 0:i.labels)??yt.default.labels,$=(n==null?void 0:n.stage)??(i==null?void 0:i.stage)??yt.default.stage,v=(n==null?void 0:n.description)??(i==null?void 0:i.description)??yt.default.description,f=i!=null&&i.dueDate?i.dueDate.toISOString().split("T")[0]:null,y=new Set([...a.config.statuses]);u&&y.add(u);const _=new Set([...a.config.types]);c&&_.add(c);const x=new Set([...a.config.priorities]);h&&x.add(h);const A=new Set([...a.config.users]);p&&A.add(p);const C=new Set([...a.config.labels]);if(b)for(const w of b)C.add(w);const T=new Set([...a.config.stages]);$&&T.add($);const M=vn(),S=async()=>{const{value:w}=M;if(!w)return;const L=Be(w,Nu);if(i)i.set(L),await l(i);else{const V=a.create(L);await l(V)}},E=vn(),F=w=>{const{value:L}=E;if(!L)return;const V=w.target;L.disabled=V.value.trim()===""},Y=`btn-${W.newRandomId()}`,G=`btn-${W.newRandomId()}`;return m` + */const vn=()=>new Ou;let Ou=class{};const tn=new WeakMap,Tu=wu(class extends ku{render(e){return j}update(e,[t]){var i;const n=t!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=t,this.ht=(i=e.options)==null?void 0:i.host,this.rt(this.ct=e.element)),j}rt(e){if(this.isConnected||(e=void 0),typeof this.Y=="function"){const t=this.ht??globalThis;let i=tn.get(t);i===void 0&&(i=new WeakMap,tn.set(t,i)),i.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),i.set(this.Y,e),e!==void 0&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){var e,t;return typeof this.Y=="function"?(e=tn.get(this.ht??globalThis))==null?void 0:e.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),Iu={dueDate:e=>{if(typeof e=="string"&&e.trim()!=="")return new Date(e)},status:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},type:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},priority:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},stage:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},assignedTo:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},labels:e=>{if(Array.isArray(e))return new Set(e)}},zr=e=>{const{components:t,topic:i,value:n,onCancel:o,onSubmit:s,styles:r}=e,l=s??(()=>{}),a=t.get(ki),d=(n==null?void 0:n.title)??(i==null?void 0:i.title)??yt.default.title,u=(n==null?void 0:n.status)??(i==null?void 0:i.status)??yt.default.status,c=(n==null?void 0:n.type)??(i==null?void 0:i.type)??yt.default.type,h=(n==null?void 0:n.priority)??(i==null?void 0:i.priority)??yt.default.priority,p=(n==null?void 0:n.assignedTo)??(i==null?void 0:i.assignedTo)??yt.default.assignedTo,b=(n==null?void 0:n.labels)??(i==null?void 0:i.labels)??yt.default.labels,$=(n==null?void 0:n.stage)??(i==null?void 0:i.stage)??yt.default.stage,v=(n==null?void 0:n.description)??(i==null?void 0:i.description)??yt.default.description,f=i!=null&&i.dueDate?i.dueDate.toISOString().split("T")[0]:null,y=new Set([...a.config.statuses]);u&&y.add(u);const _=new Set([...a.config.types]);c&&_.add(c);const x=new Set([...a.config.priorities]);h&&x.add(h);const A=new Set([...a.config.users]);p&&A.add(p);const C=new Set([...a.config.labels]);if(b)for(const w of b)C.add(w);const T=new Set([...a.config.stages]);$&&T.add($);const M=vn(),S=async()=>{const{value:w}=M;if(!w)return;const L=Be(w,Iu);if(i)i.set(L),await l(i);else{const V=a.create(L);await l(V)}},E=vn(),F=w=>{const{value:L}=E;if(!L)return;const V=w.target;L.disabled=V.value.trim()===""},Y=`btn-${W.newRandomId()}`,G=`btn-${W.newRandomId()}`;return m`
@@ -1905,7 +1905,7 @@ import{b as Qr,i as yn,M as ki,T as Oi,L as Wo,J as Zr,a as Vt,G as ht,m as mi,B
- `},Iu=e=>{const{components:t,dataStyles:i,onTopicEnter:n}=e,o=t.get(ki),s=e.topics??o.list.values();return m` + `},Nu=e=>{const{components:t,dataStyles:i,onTopicEnter:n}=e,o=t.get(ki),s=e.topics??o.list.values();return m` {if(!r)return;const l=r;l.hiddenColumns.length===0&&(l.hiddenColumns=["Guid"]),l.columns=["Title"],l.dataTransform={Title:(a,d)=>{const{Guid:u}=d;if(typeof u!="string")return a;const c=o.list.get(u);if(!c)return a;const h=`btn-${W.newRandomId()}`;return m`