@bimdata/viewer 2.8.0-beta.3 → 2.8.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5487,7 +5487,7 @@ void main() {
5487
5487
  `,e5=class{constructor(i){this.viewer=i,this.config=i.config,this.state=i.state}destroy(){}},La=new rt,cw=new yl(0,0,0,"ZXY"),OFt=class extends e5{constructor(i){super(i)}fovToZoomLevel(i){const e=Math.round((i-this.config.minFov)/(this.config.maxFov-this.config.minFov)*100);return nn.clamp(e-2*(e-50),0,100)}zoomLevelToFov(i){return this.config.maxFov+i/100*(this.config.minFov-this.config.maxFov)}vFovToHFov(i){return nn.radToDeg(2*Math.atan(Math.tan(nn.degToRad(i)/2)*this.state.aspect))}hFovToVFov(i){return nn.radToDeg(2*Math.atan(Math.tan(nn.degToRad(i)/2)/this.state.aspect))}getAnimationProperties(i,e,t){const n=!Do(e),o=!Do(t),r={};let s=null;if(n){const a=this.viewer.getPosition(),l=vle(a.yaw,e.yaw);r.yaw={start:a.yaw,end:a.yaw+l},r.pitch={start:a.pitch,end:e.pitch},s=IR(i,yle(a,e))}if(o){const a=this.viewer.getZoomLevel(),l=Math.abs(t-a);r.zoom={start:a,end:t},s===null&&(s=IR(i,Math.PI/4*l/100))}return s===null?typeof i=="number"?s=i:s=yR:s=Math.max(yR,s),{duration:s,properties:r}}getTransitionOptions(i){let e;const t=this.config.defaultTransition??wm.defaultTransition;return i.transition===!1||i.transition===null?e=null:i.transition===!0?e={...t}:typeof i.transition=="object"?e={...t,...i.transition}:e=this.config.defaultTransition,e}textureCoordsToSphericalCoords(i){var t;if(!((t=this.state.textureData)!=null&&t.panoData))throw new Yi("Current adapter does not support texture coordinates or no texture has been loaded");const e=this.viewer.adapter.textureCoordsToSphericalCoords(i,this.state.textureData.panoData);return!cw.equals(this.viewer.renderer.panoramaPose)||!cw.equals(this.viewer.renderer.sphereCorrection)?(this.sphericalCoordsToVector3(e,La),La.applyEuler(this.viewer.renderer.panoramaPose),La.applyEuler(this.viewer.renderer.sphereCorrection),this.vector3ToSphericalCoords(La)):e}sphericalCoordsToTextureCoords(i){var e;if(!((e=this.state.textureData)!=null&&e.panoData))throw new Yi("Current adapter does not support texture coordinates or no texture has been loaded");return(!cw.equals(this.viewer.renderer.panoramaPose)||!cw.equals(this.viewer.renderer.sphereCorrection))&&(this.sphericalCoordsToVector3(i,La),PR(La,this.viewer.renderer.sphereCorrection),PR(La,this.viewer.renderer.panoramaPose),i=this.vector3ToSphericalCoords(La)),this.viewer.adapter.sphericalCoordsToTextureCoords(i,this.state.textureData.panoData)}sphericalCoordsToVector3(i,e,t=zh){return e||(e=new rt),e.x=t*-Math.cos(i.pitch)*Math.sin(i.yaw),e.y=t*Math.sin(i.pitch),e.z=t*Math.cos(i.pitch)*Math.cos(i.yaw),e}vector3ToSphericalCoords(i){const e=Math.acos(i.y/Math.sqrt(i.x*i.x+i.y*i.y+i.z*i.z)),t=Math.atan2(i.x,i.z);return{yaw:t<0?-t:Math.PI*2-t,pitch:Math.PI/2-e}}viewerCoordsToVector3(i){const e=this.viewer.renderer.getIntersections(i).filter(t=>t.object.userData[od]);return e.length?e[0].point:null}viewerCoordsToSphericalCoords(i){const e=this.viewerCoordsToVector3(i);return e?this.vector3ToSphericalCoords(e):null}vector3ToViewerCoords(i){const e=i.clone();return e.project(this.viewer.renderer.camera),{x:Math.round((e.x+1)/2*this.state.size.width),y:Math.round((1-e.y)/2*this.state.size.height)}}sphericalCoordsToViewerCoords(i){return this.sphericalCoordsToVector3(i,La),this.vector3ToViewerCoords(La)}isPointVisible(i){let e,t;if(i instanceof rt)e=i,t=this.vector3ToViewerCoords(i);else if(ER(i))e=this.sphericalCoordsToVector3(i,La),t=this.vector3ToViewerCoords(e);else return!1;return e.dot(this.viewer.state.direction)>0&&t.x>=0&&t.x<=this.viewer.state.size.width&&t.y>=0&&t.y<=this.viewer.state.size.height}cleanPosition(i){if("yaw"in i||"pitch"in i){if(!("yaw"in i)||!("pitch"in i))throw new Yi("Position is missing 'yaw' or 'pitch'");return{yaw:El(i.yaw),pitch:El(i.pitch,!0)}}else return this.textureCoordsToSphericalCoords(i)}cleanSphereCorrection(i){return{pan:El((i==null?void 0:i.pan)||0),tilt:El((i==null?void 0:i.tilt)||0,!0),roll:El((i==null?void 0:i.roll)||0,!0,!1)}}cleanPanoramaPose(i){return{pan:nn.degToRad((i==null?void 0:i.poseHeading)||0),tilt:nn.degToRad((i==null?void 0:i.posePitch)||0),roll:nn.degToRad((i==null?void 0:i.poseRoll)||0)}}cleanPanoramaOptions(i,e){return e!=null&&e.isEquirectangular&&(Do(i.zoom)&&!Do(e.initialFov)&&(i={...i,zoom:this.fovToZoomLevel(this.hFovToVFov(e.initialFov))}),Do(i.position)&&!Do(e.initialHeading)&&!Do(e.initialPitch)&&(i={...i,position:{yaw:El(e.initialHeading),pitch:El(e.initialPitch,!0)}})),i}},UFt=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M33.38 33.2a1.96 1.96 0 0 0 1.5-3.23 10.61 10.61 0 0 1 7.18-17.51c.7-.06 1.31-.49 1.61-1.12a13.02 13.02 0 0 1 11.74-7.43c7.14 0 12.96 5.8 12.96 12.9 0 3.07-1.1 6.05-3.1 8.38-.7.82-.61 2.05.21 2.76.83.7 2.07.6 2.78-.22a16.77 16.77 0 0 0 4.04-10.91C72.3 7.54 64.72 0 55.4 0a16.98 16.98 0 0 0-14.79 8.7 14.6 14.6 0 0 0-12.23 14.36c0 3.46 1.25 6.82 3.5 9.45.4.45.94.69 1.5.69m45.74 43.55a22.13 22.13 0 0 1-5.23 12.4c-4 4.55-9.53 6.86-16.42 6.86-12.6 0-20.1-10.8-20.17-10.91a1.82 1.82 0 0 0-.08-.1c-5.3-6.83-14.55-23.82-17.27-28.87-.05-.1 0-.21.02-.23a6.3 6.3 0 0 1 8.24 1.85l9.38 12.59a1.97 1.97 0 0 0 3.54-1.17V25.34a4 4 0 0 1 1.19-2.87 3.32 3.32 0 0 1 2.4-.95c1.88.05 3.4 1.82 3.4 3.94v24.32a1.96 1.96 0 0 0 3.93 0v-33.1a3.5 3.5 0 0 1 7 0v35.39a1.96 1.96 0 0 0 3.93 0v-.44c.05-2.05 1.6-3.7 3.49-3.7 1.93 0 3.5 1.7 3.5 3.82v5.63c0 .24.04.48.13.71l.1.26a1.97 1.97 0 0 0 3.76-.37c.33-1.78 1.77-3.07 3.43-3.07 1.9 0 3.45 1.67 3.5 3.74l-1.77 18.1zM77.39 51c-1.25 0-2.45.32-3.5.9v-.15c0-4.27-3.33-7.74-7.42-7.74-1.26 0-2.45.33-3.5.9V16.69a7.42 7.42 0 0 0-14.85 0v1.86a7 7 0 0 0-3.28-.94 7.21 7.21 0 0 0-5.26 2.07 7.92 7.92 0 0 0-2.38 5.67v37.9l-5.83-7.82a10.2 10.2 0 0 0-13.35-2.92 4.1 4.1 0 0 0-1.53 5.48C20 64.52 28.74 80.45 34.07 87.34c.72 1.04 9.02 12.59 23.4 12.59 7.96 0 14.66-2.84 19.38-8.2a26.06 26.06 0 0 0 6.18-14.6l1.78-18.2v-.2c0-4.26-3.32-7.73-7.42-7.73z"/><!--Created by AomAm from the Noun Project--></svg>
5488
5488
  `,NFt=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 17 79 79"><path fill="currentColor" d="M38.1 29.27c-.24 0-.44.2-.44.45v10.7a.45.45 0 00.9 0v-10.7c0-.25-.2-.45-.45-.45zm10.2 26.66a11.54 11.54 0 01-8.48-6.14.45.45 0 10-.8.41 12.45 12.45 0 009.22 6.62.45.45 0 00.07-.9zm24.55-13.08a23.04 23.04 0 00-22.56-23v7.07l-.01.05a2.83 2.83 0 012.39 2.78v14.03l.09-.02h8.84v-9.22a.45.45 0 11.9 0v9.22h10.35v-.9zm0 27.33V44.66H62.5c-.02 2.01-.52 4-1.47 5.76a.45.45 0 01-.61.18.45.45 0 01-.19-.61 11.54 11.54 0 001.36-5.33h-8.83l-.1-.01a2.83 2.83 0 01-2.83 2.84h-.04-.04a2.83 2.83 0 01-2.83-2.83v-14.9a2.82 2.82 0 012.47-2.8v-7.11a23.04 23.04 0 00-22.57 23v.91h14.72V29.88a8.2 8.2 0 015.02-7.57c.22-.1.5.01.59.24.1.23-.01.5-.24.6a7.3 7.3 0 00-4.47 6.73v13.88h3.9a.45.45 0 110 .9h-3.9v.15a7.32 7.32 0 0011.23 6.17.45.45 0 01.49.76 8.22 8.22 0 01-12.62-6.93v-.15H26.82v25.52a23.04 23.04 0 0023.01 23.01 23.04 23.04 0 0023.02-23.01zm1.8-27.33v27.33A24.85 24.85 0 0149.84 95a24.85 24.85 0 01-24.82-24.82V42.85a24.85 24.85 0 0124.82-24.82 24.85 24.85 0 0124.83 24.82zM57.98 29.88v9.36a.45.45 0 11-.9 0v-9.36a7.28 7.28 0 00-3.4-6.17.45.45 0 01.49-.76 8.18 8.18 0 013.8 6.93z"/><!-- Created by Icon Island from the Noun Project --></svg>
5489
5489
  `,uw=class I1e{constructor(){this.$=I1e.IDLE}is(...e){return e.some(t=>this.$&t)}set(e){this.$=e}add(e){this.$|=e}remove(e){this.$&=~e}};uw.IDLE=0,uw.CLICK=1,uw.MOVING=2;var co=uw,VFt=class extends e5{constructor(i){super(i),this.data={startMouseX:0,startMouseY:0,mouseX:0,mouseY:0,pinchDist:0,moveDelta:{yaw:0,pitch:0,zoom:0},accumulatorFactor:0,ctrlKeyDown:!1,dblclickData:null,dblclickTimeout:null,longtouchTimeout:null,twofingersTimeout:null,ctrlZoomTimeout:null},this.step=new co,this.keyHandler=new sw,this.resizeObserver=new ResizeObserver(Ile(()=>this.viewer.autoSize(),50)),this.moveThreshold=ule*_s.pixelRatio}init(){window.addEventListener("keydown",this,{passive:!1}),window.addEventListener("keyup",this),this.viewer.container.addEventListener("mousedown",this),window.addEventListener("mousemove",this,{passive:!1}),window.addEventListener("mouseup",this),this.viewer.container.addEventListener("touchstart",this,{passive:!1}),window.addEventListener("touchmove",this,{passive:!1}),window.addEventListener("touchend",this,{passive:!1}),this.viewer.container.addEventListener("wheel",this,{passive:!1}),document.addEventListener("fullscreenchange",this),this.resizeObserver.observe(this.viewer.container),this.viewer.addEventListener(H4.type,this),this.viewer.addEventListener(W4.type,this)}destroy(){window.removeEventListener("keydown",this),window.removeEventListener("keyup",this),this.viewer.container.removeEventListener("mousedown",this),window.removeEventListener("mousemove",this),window.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchstart",this),window.removeEventListener("touchmove",this),window.removeEventListener("touchend",this),this.viewer.container.removeEventListener("wheel",this),document.removeEventListener("fullscreenchange",this),this.resizeObserver.disconnect(),this.viewer.removeEventListener(H4.type,this),this.viewer.removeEventListener(W4.type,this),clearTimeout(this.data.dblclickTimeout),clearTimeout(this.data.longtouchTimeout),clearTimeout(this.data.twofingersTimeout),clearTimeout(this.data.ctrlZoomTimeout),super.destroy()}handleEvent(i){switch(i.type){case"keydown":this.__onKeyDown(i);break;case"keyup":this.__onKeyUp();break;case"mousemove":this.__onMouseMove(i);break;case"mouseup":this.__onMouseUp(i);break;case"touchmove":this.__onTouchMove(i);break;case"touchend":this.__onTouchEnd(i);break;case"fullscreenchange":this.__onFullscreenChange();break;case H4.type:this.__applyMoveDelta();break;case W4.type:this.__clearMoveDelta();break}if(!ble(i,"."+U4))switch(i.type){case"mousedown":this.__onMouseDown(i);break;case"touchstart":this.__onTouchStart(i);break;case"wheel":this.__onMouseWheel(i);break}}__onKeyDown(i){var t;if(this.config.mousewheelCtrlKey&&(this.data.ctrlKeyDown=i.key===Ro.Control,this.data.ctrlKeyDown&&(clearTimeout(this.data.ctrlZoomTimeout),this.viewer.overlay.hide(Qo.CTRL_ZOOM))),!this.viewer.dispatchEvent(new rd(i.key,i))||!this.state.keyboardEnabled)return;const e=(t=this.config.keyboardActions)==null?void 0:t[i.key];if(typeof e=="function"){e(this.viewer,i),i.preventDefault();return}if(!(i.ctrlKey||i.altKey||i.shiftKey||i.metaKey)&&e&&!this.keyHandler.pending){switch(e!=="ZOOM_IN"&&e!=="ZOOM_OUT"&&this.viewer.stopAll(),e){case"ROTATE_UP":this.viewer.dynamics.position.roll({pitch:!1});break;case"ROTATE_DOWN":this.viewer.dynamics.position.roll({pitch:!0});break;case"ROTATE_RIGHT":this.viewer.dynamics.position.roll({yaw:!1});break;case"ROTATE_LEFT":this.viewer.dynamics.position.roll({yaw:!0});break;case"ZOOM_IN":this.viewer.dynamics.zoom.roll(!1);break;case"ZOOM_OUT":this.viewer.dynamics.zoom.roll(!0);break}this.keyHandler.down(e),i.preventDefault()}}__onKeyUp(){this.data.ctrlKeyDown=!1,this.state.keyboardEnabled&&this.keyHandler.up(i=>{i==="ZOOM_IN"||i==="ZOOM_OUT"?this.viewer.dynamics.zoom.stop():(this.viewer.dynamics.position.stop(),this.viewer.resetIdleTimer())})}__onMouseDown(i){this.step.add(co.CLICK),this.data.startMouseX=i.clientX,this.data.startMouseY=i.clientY}__onMouseUp(i){this.step.is(co.CLICK,co.MOVING)&&this.__stopMove(i.clientX,i.clientY,i,i.button===2)}__onMouseMove(i){this.config.mousemove&&this.step.is(co.CLICK,co.MOVING)&&(i.preventDefault(),this.__doMove(i.clientX,i.clientY)),this.__handleObjectsEvents(i)}__onTouchStart(i){i.touches.length===1?(this.step.add(co.CLICK),this.data.startMouseX=i.touches[0].clientX,this.data.startMouseY=i.touches[0].clientY,this.data.longtouchTimeout||(this.data.longtouchTimeout=setTimeout(()=>{const e=i.touches[0];this.__stopMove(e.clientX,e.clientY,i,!0),this.data.longtouchTimeout=null},hle))):i.touches.length===2&&(this.step.set(co.IDLE),this.__cancelLongTouch(),this.config.mousemove&&(this.__cancelTwoFingersOverlay(),this.__startMoveZoom(i),i.preventDefault()))}__onTouchEnd(i){if(this.__cancelLongTouch(),this.step.is(co.CLICK,co.MOVING)){if(i.preventDefault(),this.__cancelTwoFingersOverlay(),i.touches.length===1)this.__stopMove(this.data.mouseX,this.data.mouseY);else if(i.touches.length===0){const e=i.changedTouches[0];this.__stopMove(e.clientX,e.clientY,i)}}}__onTouchMove(i){if(this.__cancelLongTouch(),!!this.config.mousemove)if(i.touches.length===1){if(this.config.touchmoveTwoFingers)this.step.is(co.CLICK)&&!this.data.twofingersTimeout&&(this.data.twofingersTimeout=setTimeout(()=>{this.viewer.overlay.show({id:Qo.TWO_FINGERS,image:UFt,title:this.config.lang.twoFingers})},ple));else if(this.step.is(co.CLICK,co.MOVING)){i.preventDefault();const e=i.touches[0];this.__doMove(e.clientX,e.clientY)}}else this.__doMoveZoom(i),this.__cancelTwoFingersOverlay()}__cancelLongTouch(){this.data.longtouchTimeout&&(clearTimeout(this.data.longtouchTimeout),this.data.longtouchTimeout=null)}__cancelTwoFingersOverlay(){this.config.touchmoveTwoFingers&&(this.data.twofingersTimeout&&(clearTimeout(this.data.twofingersTimeout),this.data.twofingersTimeout=null),this.viewer.overlay.hide(Qo.TWO_FINGERS))}__onMouseWheel(i){if(!this.config.mousewheel||!i.deltaY)return;if(this.config.mousewheelCtrlKey&&!this.data.ctrlKeyDown){this.viewer.overlay.show({id:Qo.CTRL_ZOOM,image:NFt,title:this.config.lang.ctrlZoom}),clearTimeout(this.data.ctrlZoomTimeout),this.data.ctrlZoomTimeout=setTimeout(()=>this.viewer.overlay.hide(Qo.CTRL_ZOOM),fle);return}i.preventDefault(),i.stopPropagation();const e=i.deltaY/Math.abs(i.deltaY)*5*this.config.zoomSpeed;e!==0&&this.viewer.dynamics.zoom.step(-e,5)}__onFullscreenChange(){const i=this.viewer.isFullscreenEnabled();this.config.keyboard==="fullscreen"&&(i?this.viewer.startKeyboardControl():this.viewer.stopKeyboardControl()),this.viewer.dispatchEvent(new z4(i))}__resetMove(){this.step.set(co.IDLE),this.data.mouseX=0,this.data.mouseY=0,this.data.startMouseX=0,this.data.startMouseY=0}__startMoveZoom(i){this.viewer.stopAll(),this.__resetMove();const e=CR(i);this.step.set(co.MOVING),this.data.accumulatorFactor=this.config.moveInertia,{distance:this.data.pinchDist,center:{x:this.data.mouseX,y:this.data.mouseY}}=e}__stopMove(i,e,t,n=!1){this.step.is(co.CLICK)&&!this.__moveThresholdReached(i,e)&&this.__doClick(i,e,t,n),this.config.moveInertia&&(this.data.accumulatorFactor=Math.pow(this.config.moveInertia,.5)),this.__resetMove(),this.viewer.resetIdleTimer()}__doClick(i,e,t,n=!1){const o=this.viewer.container.getBoundingClientRect(),r=i-o.left,s=e-o.top,a=this.viewer.renderer.getIntersections({x:r,y:s}),l=a.find(c=>c.object.userData[od]);if(l){const c=this.viewer.dataHelper.vector3ToSphericalCoords(l.point),u={rightclick:n,originalEvent:t,target:X9(t),clientX:i,clientY:e,viewerX:r,viewerY:s,yaw:c.yaw,pitch:c.pitch,objects:a.map(d=>d.object).filter(d=>!d.userData[od])};try{const d=this.viewer.dataHelper.sphericalCoordsToTextureCoords(u);Object.assign(u,d)}catch{}this.data.dblclickTimeout?(Math.abs(this.data.dblclickData.clientX-u.clientX)<this.moveThreshold&&Math.abs(this.data.dblclickData.clientY-u.clientY)<this.moveThreshold&&this.viewer.dispatchEvent(new $le(this.data.dblclickData)),clearTimeout(this.data.dblclickTimeout),this.data.dblclickTimeout=null,this.data.dblclickData=null):(this.viewer.dispatchEvent(new Zle(u)),this.data.dblclickData=$9(u),this.data.dblclickTimeout=setTimeout(()=>{this.data.dblclickTimeout=null,this.data.dblclickData=null},dle))}}__handleObjectsEvents(i){if(!Ple(this.state.objectsObservers)&&i.composedPath().includes(this.viewer.container)){const e=xle(this.viewer.container),t={x:i.clientX-e.x,y:i.clientY-e.y},n=this.viewer.renderer.getIntersections(t),o=(r,s,a)=>{this.viewer.dispatchEvent(new a(i,r,t,s))};for(const[r,s]of Object.entries(this.state.objectsObservers)){const a=n.find(l=>l.object.userData[r]);a?(s&&a.object!==s&&(o(s,r,RR),this.state.objectsObservers[r]=null),s?o(a.object,r,Lce):(this.state.objectsObservers[r]=a.object,o(a.object,r,Rce))):s&&(o(s,r,RR),this.state.objectsObservers[r]=null)}}}__doMove(i,e){if(this.step.is(co.CLICK)&&this.__moveThresholdReached(i,e))this.viewer.stopAll(),this.__resetMove(),this.step.set(co.MOVING),this.data.mouseX=i,this.data.mouseY=e,this.data.accumulatorFactor=this.config.moveInertia;else if(this.step.is(co.MOVING)){const t=(i-this.data.mouseX)*Math.cos(this.state.roll)-(e-this.data.mouseY)*Math.sin(this.state.roll),n=(e-this.data.mouseY)*Math.cos(this.state.roll)+(i-this.data.mouseX)*Math.sin(this.state.roll),o={yaw:this.config.moveSpeed*(t/this.state.size.width)*nn.degToRad(this.state.hFov),pitch:this.config.moveSpeed*(n/this.state.size.height)*nn.degToRad(this.state.vFov)};this.data.moveDelta.yaw+=o.yaw,this.data.moveDelta.pitch+=o.pitch,this.data.mouseX=i,this.data.mouseY=e}}__moveThresholdReached(i,e){return Math.abs(i-this.data.startMouseX)>=this.moveThreshold||Math.abs(e-this.data.startMouseY)>=this.moveThreshold}__doMoveZoom(i){if(this.step.is(co.MOVING)){i.preventDefault();const e=CR(i);this.__doMove(e.center.x,e.center.y),this.data.moveDelta.zoom+=this.config.zoomSpeed*((e.distance-this.data.pinchDist)/_s.pixelRatio),this.data.pinchDist=e.distance}}__applyMoveDelta(){if(Math.abs(this.data.moveDelta.yaw)>0||Math.abs(this.data.moveDelta.pitch)>0){const e=this.viewer.getPosition();this.viewer.rotate({yaw:e.yaw-this.data.moveDelta.yaw*(1-this.config.moveInertia),pitch:e.pitch+this.data.moveDelta.pitch*(1-this.config.moveInertia)}),this.data.moveDelta.yaw*=this.data.accumulatorFactor,this.data.moveDelta.pitch*=this.data.accumulatorFactor,Math.abs(this.data.moveDelta.yaw)<=.001&&(this.data.moveDelta.yaw=0),Math.abs(this.data.moveDelta.pitch)<=.001&&(this.data.moveDelta.pitch=0)}if(Math.abs(this.data.moveDelta.zoom)>0){const e=this.viewer.getZoomLevel();this.viewer.zoom(e+this.data.moveDelta.zoom*(1-this.config.moveInertia)),this.data.moveDelta.zoom*=this.config.moveInertia,Math.abs(this.data.moveDelta.zoom)<=.001&&(this.data.moveDelta.zoom=0)}}__clearMoveDelta(){this.data.moveDelta.yaw=0,this.data.moveDelta.pitch=0,this.data.moveDelta.zoom=0}};Oi.enabled=!1;var dw=new hn,Jce=new Qn,Wce=new im,HFt=class extends e5{constructor(i){super(i),this.frustumNeedsUpdate=!0,this.renderer=new ZLt(this.config.rendererParameters),this.renderer.setPixelRatio(_s.pixelRatio),this.renderer.outputColorSpace=Rh,this.renderer.toneMapping=Vre,this.renderer.domElement.className="psv-canvas",this.renderer.domElement.style.background=this.config.canvasBackground,this.scene=new Tae,this.camera=new ia(50,16/9,.1,2*zh),this.camera.matrixAutoUpdate=!1;const e=new ta(new F4(zh).scale(-1,1,1),new D4({opacity:0,transparent:!0,depthTest:!1,depthWrite:!1}));e.userData={[od]:!0},this.scene.add(e),this.raycaster=new Jkt,this.frustum=new rR,this.container=document.createElement("div"),this.container.className="psv-canvas-container",this.container.appendChild(this.renderer.domElement),this.viewer.container.appendChild(this.container),this.container.addEventListener("contextmenu",t=>t.preventDefault()),this.viewer.addEventListener(J4.type,this),this.viewer.addEventListener(Lc.type,this),this.viewer.addEventListener(G4.type,this),this.viewer.addEventListener(q4.type,this),this.viewer.addEventListener(or.type,this),this.hide()}get panoramaPose(){return this.mesh.rotation}get sphereCorrection(){return this.meshContainer.rotation}init(){this.show(),this.renderer.setAnimationLoop(i=>this.__renderLoop(i))}destroy(){this.renderer.setAnimationLoop(null),this.cleanScene(this.scene),this.renderer.dispose(),this.viewer.container.removeChild(this.container),this.viewer.removeEventListener(J4.type,this),this.viewer.removeEventListener(Lc.type,this),this.viewer.removeEventListener(G4.type,this),this.viewer.removeEventListener(q4.type,this),this.viewer.removeEventListener(or.type,this),super.destroy()}handleEvent(i){switch(i.type){case J4.type:this.__onSizeUpdated();break;case Lc.type:this.__onZoomUpdated();break;case G4.type:this.__onPositionUpdated();break;case q4.type:this.__onPositionUpdated();break;case or.type:i.containsOptions("fisheye")&&this.__onPositionUpdated(),i.containsOptions("canvasBackground")&&(this.renderer.domElement.style.background=this.config.canvasBackground);break}}hide(){this.container.style.opacity="0"}show(){this.container.style.opacity="1"}setCustomRenderer(i){i?this.customRenderer=i(this.renderer):this.customRenderer=null,this.viewer.needsUpdate()}__onSizeUpdated(){this.renderer.setSize(this.state.size.width,this.state.size.height),this.camera.aspect=this.state.aspect,this.camera.updateProjectionMatrix(),this.viewer.needsUpdate(),this.frustumNeedsUpdate=!0}__onZoomUpdated(){this.camera.fov=this.state.vFov,this.camera.updateProjectionMatrix(),this.viewer.needsUpdate(),this.frustumNeedsUpdate=!0}__onPositionUpdated(){this.camera.position.set(0,0,0),this.camera.lookAt(this.state.direction),this.config.fisheye&&this.camera.position.copy(this.state.direction).multiplyScalar(this.config.fisheye/2).negate(),this.camera.rotateZ(-this.state.roll),this.camera.updateMatrix(),this.camera.updateMatrixWorld(),this.viewer.needsUpdate(),this.frustumNeedsUpdate=!0}__renderLoop(i){const e=this.timestamp?i-this.timestamp:0;this.timestamp=i,this.viewer.dispatchEvent(new H4(i,e)),this.viewer.dynamics.update(e),(this.state.needsUpdate||this.state.continuousUpdateCount>0)&&(this.state.needsUpdate=!1,(this.customRenderer||this.renderer).render(this.scene,this.camera),this.viewer.dispatchEvent(new Cce))}setTexture(i){this.meshContainer||(this.meshContainer=new Am,this.scene.add(this.meshContainer)),this.state.textureData&&this.viewer.adapter.disposeTexture(this.state.textureData),this.mesh&&(this.meshContainer.remove(this.mesh),this.viewer.adapter.disposeMesh(this.mesh)),this.mesh=this.viewer.adapter.createMesh(i.panoData),this.viewer.adapter.setTexture(this.mesh,i,!1),this.meshContainer.add(this.mesh),this.state.textureData=i,this.viewer.needsUpdate()}setPanoramaPose(i,e=this.mesh){const t=this.viewer.dataHelper.cleanPanoramaPose(i);e.rotation.set(t.tilt,t.pan,t.roll,"YXZ")}setSphereCorrection(i,e=this.meshContainer){const t=this.viewer.dataHelper.cleanSphereCorrection(i);e.rotation.set(t.tilt,t.pan,t.roll,"YXZ")}transition(i,e,t){const n=t.effect==="fade"||t.rotation,o=!Do(e.position),r=!Do(e.zoom),s=new kR(o?this.viewer.dataHelper.cleanPosition(e.position):void 0,e.zoom);this.viewer.dispatchEvent(s);const a=new Am,l=this.viewer.adapter.createMesh(i.panoData);if(this.viewer.adapter.setTexture(l,i,!0),this.viewer.adapter.setTextureOpacity(l,0),this.setPanoramaPose(i.panoData,l),this.setSphereCorrection(e.sphereCorrection,a),o&&!t.rotation){const h=this.viewer.getPosition(),f=new rt(0,1,0);a.rotateOnWorldAxis(f,s.position.yaw-h.yaw);const A=new rt(0,1,0).cross(this.camera.getWorldDirection(new rt)).normalize();a.rotateOnWorldAxis(A,s.position.pitch-h.pitch)}a.add(l),this.scene.add(a),this.renderer.setRenderTarget(new Wu),this.renderer.render(this.scene,this.camera),this.renderer.setRenderTarget(null);const{duration:c,properties:u}=this.viewer.dataHelper.getAnimationProperties(t.speed,t.rotation?s.position:null,n?s.zoomLevel:null),d=new ow({properties:{...u,opacity:{start:0,end:1}},duration:c,easing:"inOutCubic",onTick:h=>{switch(t.effect){case"fade":this.viewer.adapter.setTextureOpacity(l,h.opacity);break;case"black":case"white":h.opacity<.5?this.renderer.toneMappingExposure=t.effect==="black"?nn.mapLinear(h.opacity,0,.5,1,0):nn.mapLinear(h.opacity,0,.5,1,4):(this.renderer.toneMappingExposure=t.effect==="black"?nn.mapLinear(h.opacity,.5,1,0,1):nn.mapLinear(h.opacity,.5,1,4,1),this.mesh.visible=!1,this.viewer.adapter.setTextureOpacity(l,1),r&&!n&&this.viewer.dynamics.zoom.setValue(s.zoomLevel));break}o&&t.rotation&&this.viewer.dynamics.position.setValue({yaw:h.yaw,pitch:h.pitch}),r&&n&&this.viewer.dynamics.zoom.setValue(h.zoom),this.viewer.needsUpdate()}});return d.then(h=>{a.remove(l),this.scene.remove(a),h?(this.viewer.adapter.disposeTexture(this.state.textureData),this.meshContainer.remove(this.mesh),this.viewer.adapter.disposeMesh(this.mesh),this.mesh=l,this.meshContainer.add(l),this.state.textureData=i,this.setPanoramaPose(i.panoData),this.setSphereCorrection(e.sphereCorrection),o&&!t.rotation&&this.viewer.rotate(e.position)):(this.viewer.adapter.disposeTexture(i),this.viewer.adapter.disposeMesh(l))}),d}getIntersections(i){var t;dw.x=2*i.x/this.state.size.width-1,dw.y=-2*i.y/this.state.size.height+1,this.raycaster.setFromCamera(dw,this.camera);const e=this.raycaster.intersectObjects(this.scene.children,!0).filter(n=>n.object.visible).filter(n=>n.object.isMesh&&!!n.object.userData);return(t=this.customRenderer)!=null&&t.getIntersections&&e.push(...this.customRenderer.getIntersections(this.raycaster,dw)),e}isObjectVisible(i){if(!i)return!1;if(this.frustumNeedsUpdate&&(Jce.multiplyMatrices(this.camera.projectionMatrix,this.camera.matrixWorldInverse),this.frustum.setFromProjectionMatrix(Jce),this.frustumNeedsUpdate=!1),i.isVector3)return this.frustum.containsPoint(i);if(i.isMesh&&i.geometry){const e=i;return e.geometry.boundingBox||e.geometry.computeBoundingBox(),Wce.copy(e.geometry.boundingBox).applyMatrix4(e.matrixWorld),this.frustum.intersectsBox(Wce)}else return i.isObject3D?this.frustum.intersectsObject(i):!1}addObject(i){this.scene.add(i)}removeObject(i){this.scene.remove(i)}cleanScene(i){const e=t=>{var n;(n=t.map)==null||n.dispose(),t.uniforms&&Object.values(t.uniforms).forEach(o=>{var r,s;(s=(r=o.value)==null?void 0:r.dispose)==null||s.call(r)}),t.dispose()};i.traverse(t=>{var n,o;(n=t.geometry)==null||n.dispose(),t.material&&(Array.isArray(t.material)?t.material.forEach(r=>{e(r)}):e(t.material)),t instanceof Tae||(o=t.dispose)==null||o.call(t),t!==i&&this.cleanScene(t)})}},zFt=class extends lR{load(i,e,t,n,o){const r=new Request(i,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"});fetch(r,{signal:o}).then(s=>{if(s.status===200||s.status===0){const a=s.body.getReader(),l=s.headers.get("Content-Length")||s.headers.get("X-File-Size"),c=l?parseInt(l):0,u=c!==0;let d=0;const h=new ReadableStream({start(f){A();function A(){a.read().then(({done:p,value:g})=>{if(p)f.close();else{d+=g.byteLength;const m=new ProgressEvent("progress",{lengthComputable:u,loaded:d,total:c});t(m),f.enqueue(g),A()}}).catch(p=>{n(p)})}}});return new Response(h)}else throw new Error(`fetch for "${s.url}" responded with ${s.status}: ${s.statusText}`)}).then(s=>s.blob()).then(s=>{e(s)}).catch(s=>{n(s)})}},jFt=class extends lR{load(i,e,t,n){const o=document.createElement("img");function r(){l(),e(this)}function s(c){if(l(),n!=null&&n.aborted){const u=new Error;u.name="AbortError",u.message="The operation was aborted.",t(u)}else t(c)}function a(){o.src=""}function l(){o.removeEventListener("load",r,!1),o.removeEventListener("error",s,!1),n==null||n.removeEventListener("abort",a,!1)}return o.addEventListener("load",r,!1),o.addEventListener("error",s,!1),n==null||n.addEventListener("abort",a,!1),!i.startsWith("data:")&&this.crossOrigin!==void 0&&(o.crossOrigin=this.crossOrigin),o.src=i,o}},GFt=class extends e5{constructor(i){super(i),this.abortCtrl={},this.fileLoader=new zFt,this.imageLoader=new jFt,this.config.withCredentials&&(this.fileLoader.setWithCredentials(!0),this.imageLoader.setCrossOrigin("use-credentials"))}destroy(){this.abortLoading(),super.destroy()}abortLoading(){Object.values(this.abortCtrl).forEach(i=>i.abort()),this.abortCtrl={}}loadFile(i,e,t){const n=bm.get(i,t);if(n){if(n instanceof Blob)return e==null||e(100),Promise.resolve(n);bm.remove(i,t)}return this.config.requestHeaders&&this.fileLoader.setRequestHeader(this.config.requestHeaders(i)),new Promise((o,r)=>{let s=0;e==null||e(s),this.fileLoader.load(i,a=>{s=100,e==null||e(s),bm.add(i,t,a),o(a)},a=>{if(a.lengthComputable){const l=a.loaded/a.total*100;l>s&&(s=l,e==null||e(s))}},a=>{r(a)},this.__getAbortSignal(t))})}loadImage(i,e,t){const n=bm.get(i,t);return n?(e==null||e(100),n instanceof Blob?this.blobToImage(n):Promise.resolve(n)):!e&&!this.config.requestHeaders?new Promise((o,r)=>{this.imageLoader.load(i,s=>{bm.add(i,t,s),o(s)},s=>{r(s)},this.__getAbortSignal(t))}):this.loadFile(i,e,t).then(o=>this.blobToImage(o))}blobToImage(i){return new Promise((e,t)=>{const n=document.createElement("img");n.onload=()=>{URL.revokeObjectURL(n.src),e(n)},n.onerror=t,n.src=URL.createObjectURL(i)})}preloadPanorama(i){return this.viewer.adapter.supportsPreload(i)?this.viewer.adapter.loadTexture(i,!1):Promise.reject(new Yi("Current adapter does not support preload"))}__getAbortSignal(i){var e;return i?((e=this.abortCtrl[i])!=null&&e.signal.aborted&&delete this.abortCtrl[i],this.abortCtrl[i]||(this.abortCtrl[i]=new AbortController),this.abortCtrl[i].signal):null}},qFt=class extends e5{constructor(i){super(i),this.zoom=new V4(e=>{this.viewer.state.vFov=this.viewer.dataHelper.zoomLevelToFov(e),this.viewer.state.hFov=this.viewer.dataHelper.vFovToHFov(this.viewer.state.vFov),this.viewer.dispatchEvent(new Lc(e))},{defaultValue:this.viewer.config.defaultZoomLvl,min:0,max:100,wrap:!1}),this.position=new Hle(e=>{this.viewer.dataHelper.sphericalCoordsToVector3(e,this.viewer.state.direction),this.viewer.dispatchEvent(new G4(e))},{yaw:new V4(null,{defaultValue:this.config.defaultYaw,min:0,max:2*Math.PI,wrap:!0}),pitch:new V4(null,{defaultValue:this.config.defaultPitch,min:-Math.PI/2,max:Math.PI/2,wrap:!1})}),this.roll=new V4(e=>{this.viewer.state.roll=e,this.viewer.dispatchEvent(new q4(e))},{defaultValue:0,min:-Math.PI,max:Math.PI,wrap:!1}),this.updateSpeeds()}updateSpeeds(){this.zoom.setSpeed(this.config.zoomSpeed*50),this.position.setSpeed(nn.degToRad(this.config.moveSpeed*50)),this.roll.setSpeed(nn.degToRad(this.config.moveSpeed*50))}update(i){this.zoom.update(i),this.position.update(i),this.roll.update(i)}},QFt=class{constructor(){this.ready=!1,this.needsUpdate=!1,this.continuousUpdateCount=0,this.keyboardEnabled=!1,this.direction=new rt(0,0,zh),this.roll=0,this.vFov=60,this.hFov=60,this.aspect=1,this.animation=null,this.transitionAnimation=null,this.loadingPromise=null,this.idleTime=-1,this.objectsObservers={},this.size={width:0,height:0}}},KFt=class extends Gle{constructor(e){var t,n,o;if(super(),this.plugins={},this.children=[],this.parent=wle(e.container),!this.parent)throw new Yi('"container" element not found.');this.parent[od]=this,this.container=document.createElement("div"),this.container.classList.add("psv-container"),this.parent.appendChild(this.container),Nle(this.parent),Ule(this.container,"core"),this.state=new QFt,this.config=IFt(e),this.__setSize(this.config.size),this.overlay=new RFt(this);try{_s.load()}catch(r){console.error(r),this.showError(this.config.lang.webglError);return}bm.init(),this.adapter=new this.config.adapter[0](this,this.config.adapter[1]),this.renderer=new HFt(this),this.textureLoader=new GFt(this),this.eventsHandler=new VFt(this),this.dataHelper=new OFt(this),this.dynamics=new qFt(this),(n=(t=this.adapter).init)==null||n.call(t),this.loader=new TFt(this),this.navbar=new PFt(this),this.panel=new _Ft(this),this.notification=new kFt(this),this.autoSize(),this.setCursor(null),xR(_s.isTouchEnabled,r=>{Z9(this.container,"psv--is-touch",r)}),this.config.plugins.forEach(([r,s])=>{this.plugins[r.id]=new r(this,s)});for(const r of Object.values(this.plugins))(o=r.init)==null||o.call(r);this.config.navbar&&this.navbar.setButtons(this.config.navbar),this.state.loadingPromise||(this.config.panorama?this.setPanorama(this.config.panorama,{sphereCorrection:this.config.sphereCorrection,panoData:this.config.panoData}):this.loader.show())}destroy(){var e,t,n,o,r,s;this.stopAll(),this.stopKeyboardControl(),this.exitFullscreen();for(const[a,l]of Object.entries(this.plugins))l.destroy(),delete this.plugins[a];this.children.slice().forEach(a=>a.destroy()),this.children.length=0,(e=this.eventsHandler)==null||e.destroy(),(t=this.renderer)==null||t.destroy(),(n=this.textureLoader)==null||n.destroy(),(o=this.dataHelper)==null||o.destroy(),(r=this.adapter)==null||r.destroy(),(s=this.dynamics)==null||s.destroy(),this.parent.removeChild(this.container),delete this.parent[od]}init(){this.eventsHandler.init(),this.renderer.init(),this.config.navbar&&this.navbar.show(),this.config.keyboard==="always"&&this.startKeyboardControl(),this.resetIdleTimer(),this.state.ready=!0,this.dispatchEvent(new Q4)}resetIdleTimer(){this.state.idleTime=performance.now()}disableIdleTimer(){this.state.idleTime=-1}getPlugin(e){if(typeof e=="string")return this.plugins[e];{const t=FR(e);return t?this.plugins[t.id]:null}}getPosition(){return this.dataHelper.cleanPosition(this.dynamics.position.current)}getZoomLevel(){return this.dynamics.zoom.current}getSize(){return{...this.state.size}}isFullscreenEnabled(){return Mle(this.parent,_s.isIphone)}needsUpdate(){this.state.needsUpdate=!0}needsContinuousUpdate(e){e?this.state.continuousUpdateCount++:this.state.continuousUpdateCount>0&&this.state.continuousUpdateCount--}autoSize(){(this.container.clientWidth!==this.state.size.width||this.container.clientHeight!==this.state.size.height)&&(this.state.size.width=Math.round(this.container.clientWidth),this.state.size.height=Math.round(this.container.clientHeight),this.state.aspect=this.state.size.width/this.state.size.height,this.state.hFov=this.dataHelper.vFovToHFov(this.state.vFov),this.dispatchEvent(new J4(this.getSize())),this.navbar.autoSize())}setPanorama(e,t={}){var s;this.textureLoader.abortLoading(),(s=this.state.transitionAnimation)==null||s.cancel();const n=this.dataHelper.getTransitionOptions(t);t.showLoader===void 0&&(t.showLoader=!0),t.caption===void 0&&(t.caption=this.config.caption),t.description===void 0&&(t.description=this.config.description),!t.panoData&&typeof this.config.panoData=="function"&&(t.panoData=this.config.panoData),this.hideError(),this.resetIdleTimer(),this.config.panorama=e,this.config.caption=t.caption,this.config.description=t.description,this.config.sphereCorrection=t.sphereCorrection;const o=a=>{if(Rle(a))return!1;if(this.loader.hide(),this.state.loadingPromise=null,a)throw this.navbar.setCaption(null),this.showError(this.config.lang.loadError),console.error(a),this.dispatchEvent(new fce(e,a)),a;return this.navbar.setCaption(this.config.caption),!0};this.navbar.setCaption(`<em>${this.config.lang.loading}</em>`),(t.showLoader||!this.state.ready)&&this.loader.show(),this.dispatchEvent(new dce(e));const r=this.adapter.loadTexture(this.config.panorama,!0,t.panoData).then(a=>{if(a.panorama!==this.config.panorama)throw this.adapter.disposeTexture(a),MR();const l=this.dataHelper.cleanPanoramaOptions(t,a.panoData);return(!Do(l.zoom)||!Do(l.position))&&this.stopAll(),{textureData:a,cleanOptions:l}});return!n||!this.state.ready||!this.adapter.supportsTransition(this.config.panorama)?this.state.loadingPromise=r.then(({textureData:a,cleanOptions:l})=>{this.renderer.show(),this.renderer.setTexture(a),this.renderer.setPanoramaPose(a.panoData),this.renderer.setSphereCorrection(t.sphereCorrection),this.state.ready||this.init(),this.dispatchEvent(new ym(a)),Do(l.zoom)||this.zoom(l.zoom),Do(l.position)||this.rotate(l.position)}).then(()=>o(),a=>o(a)):this.state.loadingPromise=r.then(({textureData:a,cleanOptions:l})=>(this.loader.hide(),this.dispatchEvent(new ym(a)),this.state.transitionAnimation=this.renderer.transition(a,l,n),this.state.transitionAnimation)).then(a=>{if(this.state.transitionAnimation=null,this.dispatchEvent(new mce(a)),!a)throw MR()}).then(()=>o(),a=>o(a)),this.state.loadingPromise}setOptions(e){const t={...this.config,...e};for(let[n,o]of Object.entries(e)){if(!(n in wm)){_o(`Unknown option ${n}`);continue}if(n in Kce){_o(Kce[n]);continue}switch(n in OR&&(o=OR[n](o,{rawConfig:t,defValue:wm[n]})),this.config[n]=o,n){case"mousemove":this.state.cursorOverride||this.setCursor(null);break;case"caption":this.navbar.setCaption(this.config.caption);break;case"size":this.resize(this.config.size);break;case"sphereCorrection":this.renderer.setSphereCorrection(this.config.sphereCorrection);break;case"navbar":case"lang":this.navbar.setButtons(this.config.navbar);break;case"moveSpeed":case"zoomSpeed":this.dynamics.updateSpeeds();break;case"minFov":case"maxFov":this.dynamics.zoom.setValue(this.dataHelper.fovToZoomLevel(this.state.vFov)),this.dispatchEvent(new Lc(this.getZoomLevel()));break;case"keyboard":this.config.keyboard==="always"?this.startKeyboardControl():this.stopKeyboardControl();break}}this.needsUpdate(),this.dispatchEvent(new or(Object.keys(e)))}setOption(e,t){this.setOptions({[e]:t})}showError(e){this.overlay.show({id:Qo.ERROR,image:FFt,title:e,dismissible:!1})}hideError(){this.overlay.hide(Qo.ERROR)}rotate(e){const t=new Jle(this.dataHelper.cleanPosition(e));this.dispatchEvent(t),!t.defaultPrevented&&this.dynamics.position.setValue(t.position)}zoom(e){this.dynamics.zoom.setValue(e)}zoomIn(e=1){this.dynamics.zoom.step(e)}zoomOut(e=1){this.dynamics.zoom.step(-e)}animate(e){const t=ER(e),n=!Do(e.zoom),o=new kR(t?this.dataHelper.cleanPosition(e):void 0,e.zoom);if(this.dispatchEvent(o),o.defaultPrevented)return;this.stopAll();const{duration:r,properties:s}=this.dataHelper.getAnimationProperties(e.speed,o.position,o.zoomLevel);return r?(this.state.animation=new ow({properties:s,duration:r,easing:e.easing||"inOutSine",onTick:a=>{t&&this.dynamics.position.setValue({yaw:a.yaw,pitch:a.pitch}),n&&this.dynamics.zoom.setValue(a.zoom)}}),this.state.animation.then(()=>{this.state.animation=null,this.resetIdleTimer()}),this.state.animation):(t&&this.rotate(o.position),n&&this.zoom(o.zoomLevel),new ow(null))}stopAnimation(){return this.state.animation?(this.state.animation.cancel(),this.state.animation):Promise.resolve()}resize(e){this.__setSize(e),this.autoSize()}__setSize(e){["width","height"].forEach(t=>{e!=null&&e[t]&&(/^[0-9.]+$/.test(e[t])&&(e[t]+="px"),this.parent.style[t]=e[t])})}enterFullscreen(){this.isFullscreenEnabled()||Ele(this.parent,_s.isIphone)}exitFullscreen(){this.isFullscreenEnabled()&&Ble(_s.isIphone)}toggleFullscreen(){this.isFullscreenEnabled()?this.exitFullscreen():this.enterFullscreen()}startKeyboardControl(){this.state.keyboardEnabled=!0}stopKeyboardControl(){this.state.keyboardEnabled=!1}createTooltip(e){return new LFt(this,e)}setCursor(e){this.state.cursorOverride=e,e?this.container.style.cursor=e:this.container.style.cursor=this.config.mousemove?"move":"default"}observeObjects(e){this.state.objectsObservers[e]||(this.state.objectsObservers[e]=null)}unobserveObjects(e){delete this.state.objectsObservers[e]}stopAll(){return this.dispatchEvent(new W4),this.disableIdleTimer(),this.stopAnimation()}};const JFt={class:"annotations-photosphere"},WFt={name:"ViewerPhotosphere",components:{Annotations:z({__name:"AnnotationsPhotosphere",setup(i){const e=mt("$viewer"),{localContext:t}=e,n=t.viewer,o=n.viewer,r=o.renderer.renderer.domElement,s=GB(),a=et(()=>s.value.filter(u=>!n.selectedStorey||u.z>=n.selectedStorey.absoluteElevation&&u.z<n.selectedStorey.absoluteTopElevation));o.addEventListener("render",()=>dp(a));const l=(u,d)=>{const{x:h,y:f}=r.getBoundingClientRect(),{clientX:A,clientY:p}=d,g=o.dataHelper.viewerCoordsToSphericalCoords({x:A-h,y:p-f}),{textureX:m,textureY:w}=o.dataHelper.sphericalCoordsToTextureCoords(g);u.x=m,u.y=w},c=u=>{const d=o.dataHelper.textureCoordsToSphericalCoords({textureX:u.x,textureY:u.y}),h=o.dataHelper.sphericalCoordsToVector3(d),f=o.dataHelper.sphericalCoordsToViewerCoords(d),{width:A,height:p}=o.state.size;if(!(h.dot(o.state.direction)>0&&f.x>=0&&f.x<=A&&f.y>=0&&f.y<=p))return"display: none;";const{x:m,y:w}=f;return`left: ${m}px; top: ${w}px;`};return(u,d)=>(B(),O("div",JFt,[(B(!0),O(ct,null,Bt(a.value,h=>(B(),Z(qB,{annotation:h,canvas:Ct(r),style:ue(c(h)),onAnnotationDrag:f=>l(h,f)},null,8,["annotation","canvas","style","onAnnotationDrag"]))),256))]))}},[["__scopeId","data-v-fd653bd2"]])},data(){var e;const{settings:i}=this.$plugin;return{settings:i,model:null,photosphere:null,selectedStorey:null,loading:!1,modelHeaderShown:((e=this.$options.$cfg)==null?void 0:e.modelLoader)!=="hidden",annotationMode:!1,markerId:1,localContextSubscriptions:[],photoSphereViewerCreated:!1}},watch:{loading(i){i?this.$viewer.localContext.loadingProcessStart():this.$viewer.localContext.loadingProcessEnd()}},created(){this.isMounted=new Promise(i=>{this.setMounted=i})},mounted(){const i=new KFt({loadingImg:null,loadingTxt:null,container:this.$refs.canvas,touchmoveTwoFingers:!0,navbar:null,defaultZoomLvl:0,rendererParameters:{alpha:!0,antialias:!0,preserveDrawingBuffer:!0}});i.renderer.renderer.preserveDrawingBuffer=!0,this.viewer=i,this.photoSphereViewerCreated=!0,this.setMounted()},unmounted(){var i;(i=this.viewer)==null||i.destroy(),this.localContextSubscriptions.forEach(e=>this.$viewer.localContext.hub.off(e))},methods:{async loadModels([i]){this.$viewer.localContext.hub.off(this.metaBuildingLocalContextSub),this.loading=!0,await this.isMounted,this.model&&this.unloadModels(),this.model=i,i.type==="PHOTOSPHERE_BUILDING"?(this.metaBuildingLocalContextSub=this.$viewer.localContext.hub.on("storey-selected",async({storey:e})=>{var t;e&&(this.photosphere=(t=e.plans[0])==null?void 0:t.plan,this.photosphere&&await this.viewer.setPanorama(this.photosphere.document.file,{transition:!1}),this.selectedStorey=e)},{getLastEvent:!0}),this.$viewer.localContext.selectStorey(i.storeys[0])):(this.photosphere=i,await this.viewer.setPanorama(i.document.file,{transition:!1})),this.loading=!1,this.$viewer.localContext.hub.emit("photosphere-model-loaded",{model:i,plugin:this}),this.$viewer.globalContext.hub.emit("photosphere-model-loaded",{model:i,plugin:this})},unloadModels(){this.$viewer.localContext.hub.emit("photosphere-model-unloaded",{model:this.model,plugin:this}),this.$viewer.globalContext.hub.emit("photosphere-model-unloaded",{model:this.model,plugin:this}),this.selectedStorey=null,this.model=null},hideUI(){[...this.$viewer.localContext.plugins.entries()].forEach(([,i])=>i.$hide()),this.modelHeaderShown=!1},showUI(){var i;[...this.$viewer.localContext.plugins.entries()].forEach(([,e])=>e.$show()),this.modelHeaderShown=((i=this.$options.$cfg)==null?void 0:i.modelLoader)!=="hidden"},async getSnapshot(){return{snapshot_type:"png",snapshot_data:this.viewer.renderer.renderer.domElement.toDataURL()}},async getViewpoint(){var o;const i=this.viewer.renderer.camera,e=this.viewer.getPosition(),{textureX:t,textureY:n}=this.viewer.dataHelper.sphericalCoordsToTextureCoords(e);return{order:6,originating_system:"photosphere",authoring_tool_id:this.photosphere?String(this.photosphere.id):void 0,models:this.$viewer.localContext.loadedModels.map(r=>r.id),perspective_camera:{camera_direction:{x:t,y:n,z:0},camera_up_vector:{x:0,y:0,z:0},camera_view_point:{x:0,y:0,z:((o=this.selectedStorey)==null?void 0:o.absoluteElevation)??0},field_of_view:i.fov}}},async setViewpoint(i){var s,a,l,c,u;const e=this.$viewer.state.getStoreyFromAbsoluteElevation(this.$viewer.localContext.loadedModels[0],(s=i==null?void 0:i.perspective_camera)==null?void 0:s.camera_view_point.z);if(e&&e.uuid!==((a=this.selectedStorey)==null?void 0:a.uuid)){this.$viewer.localContext.selectStorey(e),await new Promise(h=>this.viewer.addEventListener("panorama-loaded",h,{once:!0}));const d=(l=e.plans.find(h=>h.plan.id===+i.authoring_tool_id))==null?void 0:l.plan;d&&(this.photosphere=d,await this.viewer.setPanorama(d.document.file,{transition:!1}))}const{x:t,y:n}=((c=i==null?void 0:i.perspective_camera)==null?void 0:c.camera_direction)??{x:0,y:0};this.viewer.rotate({textureX:t,textureY:n});const o=(u=i==null?void 0:i.perspective_camera)==null?void 0:u.field_of_view,r=this.viewer.dataHelper.fovToZoomLevel(o);r&&this.viewer.zoom(r)},startAnnotationMode(i){this.annotationMode||(this.annotationMode=!0,this.annotationListener=({data:e})=>{const t=this.selectedStorey;i({x:e.textureX,y:e.textureY,z:(t==null?void 0:t.absoluteElevation)??0,models:this.$viewer.localContext.loadedModels,storey:t})},this.canvasCursor=this.viewer.renderer.renderer.domElement.style.cursor,this.viewer.renderer.renderer.domElement.style.cursor="copy",this.viewer.addEventListener("click",this.annotationListener))},stopAnnotationMode(){this.annotationMode&&(this.viewer.removeEventListener("click",this.annotationListener),this.annotationMode=!1,this.viewer.renderer.renderer.domElement.style.cursor=this.canvasCursor)}}},ZFt={class:"bimdata-viewer-photosphere"},XFt={ref:"canvas",class:"bimdata-viewer-photosphere__viewer__canvas"};function YFt(i,e,t,n,o,r){const s=k("NoModelWindowPlaceHolder"),a=k("Annotations"),l=k("ModelsLoader");return B(),O("div",ZFt,[b("div",XFt,null,512),!i.model&&!i.loading?(B(),Z(s,{key:0})):ne("",!0),i.photoSphereViewerCreated?(B(),Z(a,{key:1})):ne("",!0),i.settings.modelLoader!=="disabled"?At((B(),Z(l,{key:2,ref:"header",multi:!1},null,512)),[[Gt,i.modelHeaderShown]]):ne("",!0)])}const $Ft={name:"photosphere",isViewer:!0,i18n:{en:{window_label:"Photosphere Viewer"},fr:{window_label:"Visionneuse Photosphère"}},component:z(WFt,[["render",YFt],["__scopeId","data-v-6d247701"]]),window:{name:"photosphere",label:"photosphere.window_label",header:!1,plugins:["fullscreen"],icon:{imgUri:Q$},modelTypes:["PHOTOSPHERE","PHOTOSPHERE_BUILDING"],multiModel:!1}},eOt={name:"photosphereBuilding",component:{setup(){const i=mt("$viewer"),e=mt("$plugin"),{apiClient:t,cloudId:n,projectId:o}=i.api,r=et(()=>i.localContext.loadedModels[0]),s=et(()=>i.localContext.selectedStorey),a=et(()=>i.localContext.viewer.photosphere),l=et(()=>{var d;return(d=s.value)==null?void 0:d.plans.find(h=>{var f;return h.plan.id===((f=a.value)==null?void 0:f.id)})});yt([r,()=>e.shown],([{type:d}={}])=>{d==="PHOTOSPHERE_BUILDING"?e.show():e.hide()},{immediate:!0});const c=d=>{r.value&&i.localContext.selectStorey(r.value.storeys.find(h=>h.uuid===d.uuid))},u=d=>{if(!d)return;const{viewer:h}=i.localContext,f=h.viewer;h.photosphere=d.plan,f.setPanorama(d.plan.document.file,{transition:!1})};return()=>Wn(mre,{apiClient:t,space:{id:n},project:{id:o},model:r.value,storey:s.value,plan:l.value,selectable:!0,onStoreySelected:c,onPlanSelected:u})}},addToWindows:["photosphere"],sidePanel:{position:"right",width:400}};function tOt(i={}){const e=[],t=[PPt,r8t,S8t,A$e,kQe,qZe,Vet,q8t,BGe,XZe,$Ye,aat,fGe,plt,flt,REt,k6t,U6t,e4e,RPt,e7t,CPt,gPt,R6t,QGe,VEt,XEt,$Ft,eOt,d6t,ket,CQe,u7e,d7e,s4e,h7e,l6t,lTt],n=[QMt,nlt,I$e,IGe,$It,Ret,bQe];return t.filter(o=>i.default!==!1&&i[o.name]!==!1||i[o.name]).forEach(o=>e.push(o)),n.filter(o=>i[o.name]).forEach(o=>e.push(o)),e.forEach(o=>{o.settings=i[o.name]??{}}),new Map(e.map(o=>[o.name,o]))}var VR,Zce;function iOt(){if(Zce)return VR;Zce=1;function i(){this.__data__=[],this.size=0}return VR=i,VR}var HR,Xce;function Yce(){if(Xce)return HR;Xce=1;function i(e,t){return e===t||e!==e&&t!==t}return HR=i,HR}var zR,$ce;function hw(){if($ce)return zR;$ce=1;var i=Yce();function e(t,n){for(var o=t.length;o--;)if(i(t[o][0],n))return o;return-1}return zR=e,zR}var jR,eue;function nOt(){if(eue)return jR;eue=1;var i=hw(),e=Array.prototype,t=e.splice;function n(o){var r=this.__data__,s=i(r,o);if(s<0)return!1;var a=r.length-1;return s==a?r.pop():t.call(r,s,1),--this.size,!0}return jR=n,jR}var GR,tue;function oOt(){if(tue)return GR;tue=1;var i=hw();function e(t){var n=this.__data__,o=i(n,t);return o<0?void 0:n[o][1]}return GR=e,GR}var qR,iue;function sOt(){if(iue)return qR;iue=1;var i=hw();function e(t){return i(this.__data__,t)>-1}return qR=e,qR}var QR,nue;function rOt(){if(nue)return QR;nue=1;var i=hw();function e(t,n){var o=this.__data__,r=i(o,t);return r<0?(++this.size,o.push([t,n])):o[r][1]=n,this}return QR=e,QR}var KR,oue;function pw(){if(oue)return KR;oue=1;var i=iOt(),e=nOt(),t=oOt(),n=sOt(),o=rOt();function r(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return r.prototype.clear=i,r.prototype.delete=e,r.prototype.get=t,r.prototype.has=n,r.prototype.set=o,KR=r,KR}var JR,sue;function aOt(){if(sue)return JR;sue=1;var i=pw();function e(){this.__data__=new i,this.size=0}return JR=e,JR}var WR,rue;function lOt(){if(rue)return WR;rue=1;function i(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}return WR=i,WR}var ZR,aue;function cOt(){if(aue)return ZR;aue=1;function i(e){return this.__data__.get(e)}return ZR=i,ZR}var XR,lue;function uOt(){if(lue)return XR;lue=1;function i(e){return this.__data__.has(e)}return XR=i,XR}var YR,cue;function t5(){if(cue)return YR;cue=1;function i(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return YR=i,YR}var $R,uue;function due(){if(uue)return $R;uue=1;var i=Eg(),e=t5(),t="[object AsyncFunction]",n="[object Function]",o="[object GeneratorFunction]",r="[object Proxy]";function s(a){if(!e(a))return!1;var l=i(a);return l==n||l==o||l==t||l==r}return $R=s,$R}var eD,hue;function dOt(){if(hue)return eD;hue=1;var i=Ya(),e=i["__core-js_shared__"];return eD=e,eD}var tD,pue;function hOt(){if(pue)return tD;pue=1;var i=dOt(),e=function(){var n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function t(n){return!!e&&e in n}return tD=t,tD}var iD,fue;function Aue(){if(fue)return iD;fue=1;var i=Function.prototype,e=i.toString;function t(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return iD=t,iD}var nD,mue;function pOt(){if(mue)return nD;mue=1;var i=due(),e=hOt(),t=t5(),n=Aue(),o=/[\\^$.*+?()[\]{}|]/g,r=/^\[object .+?Constructor\]$/,s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,u=RegExp("^"+l.call(c).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(h){if(!t(h)||e(h))return!1;var f=i(h)?u:r;return f.test(n(h))}return nD=d,nD}var oD,gue;function fOt(){if(gue)return oD;gue=1;function i(e,t){return e==null?void 0:e[t]}return oD=i,oD}var sD,vue;function Gh(){if(vue)return sD;vue=1;var i=pOt(),e=fOt();function t(n,o){var r=e(n,o);return i(r)?r:void 0}return sD=t,sD}var rD,yue;function aD(){if(yue)return rD;yue=1;var i=Gh(),e=Ya(),t=i(e,"Map");return rD=t,rD}var lD,wue;function fw(){if(wue)return lD;wue=1;var i=Gh(),e=i(Object,"create");return lD=e,lD}var cD,Cue;function AOt(){if(Cue)return cD;Cue=1;var i=fw();function e(){this.__data__=i?i(null):{},this.size=0}return cD=e,cD}var uD,bue;function mOt(){if(bue)return uD;bue=1;function i(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}return uD=i,uD}var dD,xue;function gOt(){if(xue)return dD;xue=1;var i=fw(),e="__lodash_hash_undefined__",t=Object.prototype,n=t.hasOwnProperty;function o(r){var s=this.__data__;if(i){var a=s[r];return a===e?void 0:a}return n.call(s,r)?s[r]:void 0}return dD=o,dD}var hD,Mue;function vOt(){if(Mue)return hD;Mue=1;var i=fw(),e=Object.prototype,t=e.hasOwnProperty;function n(o){var r=this.__data__;return i?r[o]!==void 0:t.call(r,o)}return hD=n,hD}var pD,Eue;function yOt(){if(Eue)return pD;Eue=1;var i=fw(),e="__lodash_hash_undefined__";function t(n,o){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=i&&o===void 0?e:o,this}return pD=t,pD}var fD,Bue;function wOt(){if(Bue)return fD;Bue=1;var i=AOt(),e=mOt(),t=gOt(),n=vOt(),o=yOt();function r(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return r.prototype.clear=i,r.prototype.delete=e,r.prototype.get=t,r.prototype.has=n,r.prototype.set=o,fD=r,fD}var AD,Iue;function COt(){if(Iue)return AD;Iue=1;var i=wOt(),e=pw(),t=aD();function n(){this.size=0,this.__data__={hash:new i,map:new(t||e),string:new i}}return AD=n,AD}var mD,Sue;function bOt(){if(Sue)return mD;Sue=1;function i(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}return mD=i,mD}var gD,Pue;function Aw(){if(Pue)return gD;Pue=1;var i=bOt();function e(t,n){var o=t.__data__;return i(n)?o[typeof n=="string"?"string":"hash"]:o.map}return gD=e,gD}var vD,Tue;function xOt(){if(Tue)return vD;Tue=1;var i=Aw();function e(t){var n=i(this,t).delete(t);return this.size-=n?1:0,n}return vD=e,vD}var yD,kue;function MOt(){if(kue)return yD;kue=1;var i=Aw();function e(t){return i(this,t).get(t)}return yD=e,yD}var wD,Rue;function EOt(){if(Rue)return wD;Rue=1;var i=Aw();function e(t){return i(this,t).has(t)}return wD=e,wD}var CD,Due;function BOt(){if(Due)return CD;Due=1;var i=Aw();function e(t,n){var o=i(this,t),r=o.size;return o.set(t,n),this.size+=o.size==r?0:1,this}return CD=e,CD}var bD,_ue;function IOt(){if(_ue)return bD;_ue=1;var i=COt(),e=xOt(),t=MOt(),n=EOt(),o=BOt();function r(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return r.prototype.clear=i,r.prototype.delete=e,r.prototype.get=t,r.prototype.has=n,r.prototype.set=o,bD=r,bD}var xD,Lue;function SOt(){if(Lue)return xD;Lue=1;var i=pw(),e=aD(),t=IOt(),n=200;function o(r,s){var a=this.__data__;if(a instanceof i){var l=a.__data__;if(!e||l.length<n-1)return l.push([r,s]),this.size=++a.size,this;a=this.__data__=new t(l)}return a.set(r,s),this.size=a.size,this}return xD=o,xD}var MD,Fue;function POt(){if(Fue)return MD;Fue=1;var i=pw(),e=aOt(),t=lOt(),n=cOt(),o=uOt(),r=SOt();function s(a){var l=this.__data__=new i(a);this.size=l.size}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=o,s.prototype.set=r,MD=s,MD}var ED,Oue;function TOt(){if(Oue)return ED;Oue=1;function i(e,t){for(var n=-1,o=e==null?0:e.length;++n<o&&t(e[n],n,e)!==!1;);return e}return ED=i,ED}var BD,Uue;function kOt(){if(Uue)return BD;Uue=1;var i=Gh(),e=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch{}}();return BD=e,BD}var ID,Nue;function Vue(){if(Nue)return ID;Nue=1;var i=kOt();function e(t,n,o){n=="__proto__"&&i?i(t,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[n]=o}return ID=e,ID}var SD,Hue;function zue(){if(Hue)return SD;Hue=1;var i=Vue(),e=Yce(),t=Object.prototype,n=t.hasOwnProperty;function o(r,s,a){var l=r[s];(!(n.call(r,s)&&e(l,a))||a===void 0&&!(s in r))&&i(r,s,a)}return SD=o,SD}var PD,jue;function mw(){if(jue)return PD;jue=1;var i=zue(),e=Vue();function t(n,o,r,s){var a=!r;r||(r={});for(var l=-1,c=o.length;++l<c;){var u=o[l],d=s?s(r[u],n[u],u,r,n):void 0;d===void 0&&(d=n[u]),a?e(r,u,d):i(r,u,d)}return r}return PD=t,PD}var TD,Gue;function ROt(){if(Gue)return TD;Gue=1;function i(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}return TD=i,TD}var kD,que;function DOt(){if(que)return kD;que=1;var i=Eg(),e=Dp(),t="[object Arguments]";function n(o){return e(o)&&i(o)==t}return kD=n,kD}var RD,Que;function _Ot(){if(Que)return RD;Que=1;var i=DOt(),e=Dp(),t=Object.prototype,n=t.hasOwnProperty,o=t.propertyIsEnumerable,r=i(function(){return arguments}())?i:function(s){return e(s)&&n.call(s,"callee")&&!o.call(s,"callee")};return RD=r,RD}var i5={exports:{}},DD,Kue;function LOt(){if(Kue)return DD;Kue=1;function i(){return!1}return DD=i,DD}i5.exports;var Jue;function Wue(){return Jue||(Jue=1,function(i,e){var t=Ya(),n=LOt(),o=e&&!e.nodeType&&e,r=o&&!0&&i&&!i.nodeType&&i,s=r&&r.exports===o,a=s?t.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||n;i.exports=c}(i5,i5.exports)),i5.exports}var _D,Zue;function FOt(){if(Zue)return _D;Zue=1;var i=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function t(n,o){var r=typeof n;return o=o??i,!!o&&(r=="number"||r!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<o}return _D=t,_D}var LD,Xue;function Yue(){if(Xue)return LD;Xue=1;var i=9007199254740991;function e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=i}return LD=e,LD}var FD,$ue;function OOt(){if($ue)return FD;$ue=1;var i=Eg(),e=Yue(),t=Dp(),n="[object Arguments]",o="[object Array]",r="[object Boolean]",s="[object Date]",a="[object Error]",l="[object Function]",c="[object Map]",u="[object Number]",d="[object Object]",h="[object RegExp]",f="[object Set]",A="[object String]",p="[object WeakMap]",g="[object ArrayBuffer]",m="[object DataView]",w="[object Float32Array]",y="[object Float64Array]",v="[object Int8Array]",x="[object Int16Array]",M="[object Int32Array]",E="[object Uint8Array]",S="[object Uint8ClampedArray]",I="[object Uint16Array]",T="[object Uint32Array]",P={};P[w]=P[y]=P[v]=P[x]=P[M]=P[E]=P[S]=P[I]=P[T]=!0,P[n]=P[o]=P[g]=P[r]=P[m]=P[s]=P[a]=P[l]=P[c]=P[u]=P[d]=P[h]=P[f]=P[A]=P[p]=!1;function R(L){return t(L)&&e(L.length)&&!!P[i(L)]}return FD=R,FD}var OD,ede;function UD(){if(ede)return OD;ede=1;function i(e){return function(t){return e(t)}}return OD=i,OD}var n5={exports:{}};n5.exports;var tde;function ND(){return tde||(tde=1,function(i,e){var t=nz(),n=e&&!e.nodeType&&e,o=n&&!0&&i&&!i.nodeType&&i,r=o&&o.exports===n,s=r&&t.process,a=function(){try{var l=o&&o.require&&o.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();i.exports=a}(n5,n5.exports)),n5.exports}var VD,ide;function UOt(){if(ide)return VD;ide=1;var i=OOt(),e=UD(),t=ND(),n=t&&t.isTypedArray,o=n?e(n):i;return VD=o,VD}var HD,nde;function ode(){if(nde)return HD;nde=1;var i=ROt(),e=_Ot(),t=E8(),n=Wue(),o=FOt(),r=UOt(),s=Object.prototype,a=s.hasOwnProperty;function l(c,u){var d=t(c),h=!d&&e(c),f=!d&&!h&&n(c),A=!d&&!h&&!f&&r(c),p=d||h||f||A,g=p?i(c.length,String):[],m=g.length;for(var w in c)(u||a.call(c,w))&&!(p&&(w=="length"||f&&(w=="offset"||w=="parent")||A&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||o(w,m)))&&g.push(w);return g}return HD=l,HD}var zD,sde;function jD(){if(sde)return zD;sde=1;var i=Object.prototype;function e(t){var n=t&&t.constructor,o=typeof n=="function"&&n.prototype||i;return t===o}return zD=e,zD}var GD,rde;function ade(){if(rde)return GD;rde=1;function i(e,t){return function(n){return e(t(n))}}return GD=i,GD}var qD,lde;function NOt(){if(lde)return qD;lde=1;var i=ade(),e=i(Object.keys,Object);return qD=e,qD}var QD,cde;function VOt(){if(cde)return QD;cde=1;var i=jD(),e=NOt(),t=Object.prototype,n=t.hasOwnProperty;function o(r){if(!i(r))return e(r);var s=[];for(var a in Object(r))n.call(r,a)&&a!="constructor"&&s.push(a);return s}return QD=o,QD}var KD,ude;function dde(){if(ude)return KD;ude=1;var i=due(),e=Yue();function t(n){return n!=null&&e(n.length)&&!i(n)}return KD=t,KD}var JD,hde;function WD(){if(hde)return JD;hde=1;var i=ode(),e=VOt(),t=dde();function n(o){return t(o)?i(o):e(o)}return JD=n,JD}var ZD,pde;function HOt(){if(pde)return ZD;pde=1;var i=mw(),e=WD();function t(n,o){return n&&i(o,e(o),n)}return ZD=t,ZD}var XD,fde;function zOt(){if(fde)return XD;fde=1;function i(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}return XD=i,XD}var YD,Ade;function jOt(){if(Ade)return YD;Ade=1;var i=t5(),e=jD(),t=zOt(),n=Object.prototype,o=n.hasOwnProperty;function r(s){if(!i(s))return t(s);var a=e(s),l=[];for(var c in s)c=="constructor"&&(a||!o.call(s,c))||l.push(c);return l}return YD=r,YD}var $D,mde;function e_(){if(mde)return $D;mde=1;var i=ode(),e=jOt(),t=dde();function n(o){return t(o)?i(o,!0):e(o)}return $D=n,$D}var t_,gde;function GOt(){if(gde)return t_;gde=1;var i=mw(),e=e_();function t(n,o){return n&&i(o,e(o),n)}return t_=t,t_}var o5={exports:{}};o5.exports;var vde;function qOt(){return vde||(vde=1,function(i,e){var t=Ya(),n=e&&!e.nodeType&&e,o=n&&!0&&i&&!i.nodeType&&i,r=o&&o.exports===n,s=r?t.Buffer:void 0,a=s?s.allocUnsafe:void 0;function l(c,u){if(u)return c.slice();var d=c.length,h=a?a(d):new c.constructor(d);return c.copy(h),h}i.exports=l}(o5,o5.exports)),o5.exports}var i_,yde;function QOt(){if(yde)return i_;yde=1;function i(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}return i_=i,i_}var n_,wde;function KOt(){if(wde)return n_;wde=1;function i(e,t){for(var n=-1,o=e==null?0:e.length,r=0,s=[];++n<o;){var a=e[n];t(a,n,e)&&(s[r++]=a)}return s}return n_=i,n_}var o_,Cde;function bde(){if(Cde)return o_;Cde=1;function i(){return[]}return o_=i,o_}var s_,xde;function r_(){if(xde)return s_;xde=1;var i=KOt(),e=bde(),t=Object.prototype,n=t.propertyIsEnumerable,o=Object.getOwnPropertySymbols,r=o?function(s){return s==null?[]:(s=Object(s),i(o(s),function(a){return n.call(s,a)}))}:e;return s_=r,s_}var a_,Mde;function JOt(){if(Mde)return a_;Mde=1;var i=mw(),e=r_();function t(n,o){return i(n,e(n),o)}return a_=t,a_}var l_,Ede;function Bde(){if(Ede)return l_;Ede=1;function i(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}return l_=i,l_}var c_,Ide;function Sde(){if(Ide)return c_;Ide=1;var i=ade(),e=i(Object.getPrototypeOf,Object);return c_=e,c_}var u_,Pde;function Tde(){if(Pde)return u_;Pde=1;var i=Bde(),e=Sde(),t=r_(),n=bde(),o=Object.getOwnPropertySymbols,r=o?function(s){for(var a=[];s;)i(a,t(s)),s=e(s);return a}:n;return u_=r,u_}var d_,kde;function WOt(){if(kde)return d_;kde=1;var i=mw(),e=Tde();function t(n,o){return i(n,e(n),o)}return d_=t,d_}var h_,Rde;function Dde(){if(Rde)return h_;Rde=1;var i=Bde(),e=E8();function t(n,o,r){var s=o(n);return e(n)?s:i(s,r(n))}return h_=t,h_}var p_,_de;function ZOt(){if(_de)return p_;_de=1;var i=Dde(),e=r_(),t=WD();function n(o){return i(o,t,e)}return p_=n,p_}var f_,Lde;function XOt(){if(Lde)return f_;Lde=1;var i=Dde(),e=Tde(),t=e_();function n(o){return i(o,t,e)}return f_=n,f_}var A_,Fde;function YOt(){if(Fde)return A_;Fde=1;var i=Gh(),e=Ya(),t=i(e,"DataView");return A_=t,A_}var m_,Ode;function $Ot(){if(Ode)return m_;Ode=1;var i=Gh(),e=Ya(),t=i(e,"Promise");return m_=t,m_}var g_,Ude;function eUt(){if(Ude)return g_;Ude=1;var i=Gh(),e=Ya(),t=i(e,"Set");return g_=t,g_}var v_,Nde;function tUt(){if(Nde)return v_;Nde=1;var i=Gh(),e=Ya(),t=i(e,"WeakMap");return v_=t,v_}var y_,Vde;function w_(){if(Vde)return y_;Vde=1;var i=YOt(),e=aD(),t=$Ot(),n=eUt(),o=tUt(),r=Eg(),s=Aue(),a="[object Map]",l="[object Object]",c="[object Promise]",u="[object Set]",d="[object WeakMap]",h="[object DataView]",f=s(i),A=s(e),p=s(t),g=s(n),m=s(o),w=r;return(i&&w(new i(new ArrayBuffer(1)))!=h||e&&w(new e)!=a||t&&w(t.resolve())!=c||n&&w(new n)!=u||o&&w(new o)!=d)&&(w=function(y){var v=r(y),x=v==l?y.constructor:void 0,M=x?s(x):"";if(M)switch(M){case f:return h;case A:return a;case p:return c;case g:return u;case m:return d}return v}),y_=w,y_}var C_,Hde;function iUt(){if(Hde)return C_;Hde=1;var i=Object.prototype,e=i.hasOwnProperty;function t(n){var o=n.length,r=new n.constructor(o);return o&&typeof n[0]=="string"&&e.call(n,"index")&&(r.index=n.index,r.input=n.input),r}return C_=t,C_}var b_,zde;function nUt(){if(zde)return b_;zde=1;var i=Ya(),e=i.Uint8Array;return b_=e,b_}var x_,jde;function M_(){if(jde)return x_;jde=1;var i=nUt();function e(t){var n=new t.constructor(t.byteLength);return new i(n).set(new i(t)),n}return x_=e,x_}var E_,Gde;function oUt(){if(Gde)return E_;Gde=1;var i=M_();function e(t,n){var o=n?i(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.byteLength)}return E_=e,E_}var B_,qde;function sUt(){if(qde)return B_;qde=1;var i=/\w*$/;function e(t){var n=new t.constructor(t.source,i.exec(t));return n.lastIndex=t.lastIndex,n}return B_=e,B_}var I_,Qde;function rUt(){if(Qde)return I_;Qde=1;var i=M8(),e=i?i.prototype:void 0,t=e?e.valueOf:void 0;function n(o){return t?Object(t.call(o)):{}}return I_=n,I_}var S_,Kde;function aUt(){if(Kde)return S_;Kde=1;var i=M_();function e(t,n){var o=n?i(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}return S_=e,S_}var P_,Jde;function lUt(){if(Jde)return P_;Jde=1;var i=M_(),e=oUt(),t=sUt(),n=rUt(),o=aUt(),r="[object Boolean]",s="[object Date]",a="[object Map]",l="[object Number]",c="[object RegExp]",u="[object Set]",d="[object String]",h="[object Symbol]",f="[object ArrayBuffer]",A="[object DataView]",p="[object Float32Array]",g="[object Float64Array]",m="[object Int8Array]",w="[object Int16Array]",y="[object Int32Array]",v="[object Uint8Array]",x="[object Uint8ClampedArray]",M="[object Uint16Array]",E="[object Uint32Array]";function S(I,T,P){var R=I.constructor;switch(T){case f:return i(I);case r:case s:return new R(+I);case A:return e(I,P);case p:case g:case m:case w:case y:case v:case x:case M:case E:return o(I,P);case a:return new R;case l:case d:return new R(I);case c:return t(I);case u:return new R;case h:return n(I)}}return P_=S,P_}var T_,Wde;function cUt(){if(Wde)return T_;Wde=1;var i=t5(),e=Object.create,t=function(){function n(){}return function(o){if(!i(o))return{};if(e)return e(o);n.prototype=o;var r=new n;return n.prototype=void 0,r}}();return T_=t,T_}var k_,Zde;function uUt(){if(Zde)return k_;Zde=1;var i=cUt(),e=Sde(),t=jD();function n(o){return typeof o.constructor=="function"&&!t(o)?i(e(o)):{}}return k_=n,k_}var R_,Xde;function dUt(){if(Xde)return R_;Xde=1;var i=w_(),e=Dp(),t="[object Map]";function n(o){return e(o)&&i(o)==t}return R_=n,R_}var D_,Yde;function hUt(){if(Yde)return D_;Yde=1;var i=dUt(),e=UD(),t=ND(),n=t&&t.isMap,o=n?e(n):i;return D_=o,D_}var __,$de;function pUt(){if($de)return __;$de=1;var i=w_(),e=Dp(),t="[object Set]";function n(o){return e(o)&&i(o)==t}return __=n,__}var L_,ehe;function fUt(){if(ehe)return L_;ehe=1;var i=pUt(),e=UD(),t=ND(),n=t&&t.isSet,o=n?e(n):i;return L_=o,L_}var F_,the;function AUt(){if(the)return F_;the=1;var i=POt(),e=TOt(),t=zue(),n=HOt(),o=GOt(),r=qOt(),s=QOt(),a=JOt(),l=WOt(),c=ZOt(),u=XOt(),d=w_(),h=iUt(),f=lUt(),A=uUt(),p=E8(),g=Wue(),m=hUt(),w=t5(),y=fUt(),v=WD(),x=e_(),M=1,E=2,S=4,I="[object Arguments]",T="[object Array]",P="[object Boolean]",R="[object Date]",L="[object Error]",U="[object Function]",H="[object GeneratorFunction]",N="[object Map]",q="[object Number]",J="[object Object]",te="[object RegExp]",le="[object Set]",Pe="[object String]",ye="[object Symbol]",Ne="[object WeakMap]",Ce="[object ArrayBuffer]",ke="[object DataView]",Oe="[object Float32Array]",se="[object Float64Array]",Re="[object Int8Array]",xe="[object Int16Array]",Te="[object Int32Array]",tt="[object Uint8Array]",$e="[object Uint8ClampedArray]",$="[object Uint16Array]",W="[object Uint32Array]",re={};re[I]=re[T]=re[Ce]=re[ke]=re[P]=re[R]=re[Oe]=re[se]=re[Re]=re[xe]=re[Te]=re[N]=re[q]=re[J]=re[te]=re[le]=re[Pe]=re[ye]=re[tt]=re[$e]=re[$]=re[W]=!0,re[L]=re[U]=re[Ne]=!1;function Be(ve,G,X,ie,Q,j){var ae,ee=G&M,he=G&E,ce=G&S;if(X&&(ae=Q?X(ve,ie,Q,j):X(ve)),ae!==void 0)return ae;if(!w(ve))return ve;var we=p(ve);if(we){if(ae=h(ve),!ee)return s(ve,ae)}else{var De=d(ve),Ge=De==U||De==H;if(g(ve))return r(ve,ee);if(De==J||De==I||Ge&&!Q){if(ae=he||Ge?{}:A(ve),!ee)return he?l(ve,o(ae,ve)):a(ve,n(ae,ve))}else{if(!re[De])return Q?ve:{};ae=f(ve,De,ee)}}j||(j=new i);var Ee=j.get(ve);if(Ee)return Ee;j.set(ve,ae),y(ve)?ve.forEach(function(Ie){ae.add(Be(Ie,G,X,Ie,ve,j))}):m(ve)&&ve.forEach(function(Ie,Se){ae.set(Se,Be(Ie,G,X,Se,ve,j))});var Xe=ce?he?u:c:he?x:v,ut=we?void 0:Xe(ve);return e(ut||ve,function(Ie,Se){ut&&(Se=Ie,Ie=ve[Se]),t(ae,Se,Be(Ie,G,X,Se,ve,j))}),ae}return F_=Be,F_}var O_,ihe;function mUt(){if(ihe)return O_;ihe=1;var i=AUt(),e=1,t=4;function n(o){return i(o,e|t)}return O_=n,O_}var gUt=mUt();const vUt=wg(gUt);class yUt{constructor(e={}){const{name:t,isViewer:n=!1,i18nTokenPrefix:o=null,i18n:r=null,addToWindows:s=[],window:a=null,component:l=null,initiallyShown:c=!0,button:u=null,sidePanel:d=null,startupScript:h=null,settings:f={},...A}=e;if(!t)throw new TypeError("Plugin must have a name.");A&&Object.assign(this,A),this.name=t,this.isViewer=n,this.i18nTokenPrefix=o,this.i18n=r,this.addToWindows=s,this.window=a,this.component=l,this.initiallyShown=c,u?this.button=new wUt(u):d&&(this.sidePanel=new CUt(d)),this.startupScript=h,this.settings=f}}class wUt{constructor(e={}){const{position:t="left",stance:n=0,tooltip:o,content:r="free",keepOpen:s,icon:a,iconOpen:l,initiallyOpen:c=!1}=e;this.position=t,this.stance=n,this.tooltip=o,this.content=r,this.keepOpen=s,this.icon=a,this.iconOpen=l,this.initiallyOpen=c}}class CUt{constructor(e={}){const{position:t="left",width:n=300}=e;this.position=t,this.width=n}}let bUt=0;class xUt extends yUt{constructor(e={},t){var n;super(vUt(e)),this.localContext=t,this.id=bUt++,this._shown=me(this.initiallyShown),this._isOpen=me(((n=this.button)==null?void 0:n.initiallyOpen)??!1),this._loading=me(!1),this._componentInstance=me(null),this.button&&(this._buttonText=me(this.button.text)),this.sidePanel&&(this._sidePanelWidth=me(Number.isFinite(this.sidePanel.width)?this.sidePanel.width:300))}get sidePanelWidth(){var e;return(e=this._sidePanelWidth)==null?void 0:e.value}set sidePanelWidth(e=300){if(this._sidePanelWidth){if(!Number.isFinite(e))throw new TypeError("[BIMDataViewer - PluginInstance] sidePanelWidth must be a finite number.");this._sidePanelWidth.value=e}}get shown(){return this._shown.value}show(){this._shown.value=!0}hide(){this._shown.value=!1}get loading(){return this._loading.value}async open(...e){this.isOpen||(await this._onOpenOrClose("open",...e),this._isOpen.value=!0,this.localContext.hub.emit("plugin-open",{name:this.name,plugin:this.componentInstance}),this.localContext.$viewer.globalContext.hub.emit("plugin-open",{name:this.name,plugin:this.componentInstance}))}async close(...e){this.isOpen&&(await this._onOpenOrClose("close",...e),this._isOpen.value=!1,this.localContext.hub.emit("plugin-close",{name:this.name,plugin:this.componentInstance}),this.localContext.$viewer.globalContext.hub.emit("plugin-close",{name:this.name,plugin:this.componentInstance}))}get isOpen(){return this._isOpen.value}_onOpenOrClose(e,...t){if(!this.component){console.warn(`Plugin ${this.name} does not have a component. It cannot be opened or closed.`);return}if(this.loading){console.log(`Plugin ${this.name} is loading. It cannot be opened or closed.`);return}if(typeof this.component[`on${Cu(e)}`]!="function")return;const n=this.component[`on${Cu(e)}`].call(this.componentInstance,...t);return typeof(n==null?void 0:n.then)=="function"?(this._loading.value=!0,n.then(()=>{this._loading.value=!1})):n}get componentInstance(){return this._componentInstance.value}set componentInstance(e){this._componentInstance.value=e}get buttonText(){return this._buttonText.value}set buttonText(e){this._buttonText.value=e}}class MUt{constructor(e={}){this.registeredPlugins=e!==!1?tOt(e):new Map,this.cfg=e}getPluginInstance(e,t){return this.registeredPlugins.has(e)?new xUt(this.registeredPlugins.get(e),t):(console.warn(`No plugin with name "${e}". You must register it before accessing it.`),null)}runPluginsScripts(e){this.registeredPlugins.forEach(t=>{var n;try{(n=t.startupScript)==null||n.call(t,e)}catch(o){console.error(`[Viewer] Failed to execute startupScript of plugin ${t.name}.`,o)}})}registerPlugin(e){if(this.registeredPlugins.has(e.name)&&console.warn(`[BIMDataViewer - PluginManager:registerPlugin] Plugin with name "${e.name}" is already registered. It will be overwritten.`),e.button&&e.sidePanel)throw new TypeError(`[BIMDataViewer - PluginManager:registerPlugin] Plugin "${e.name}" has both a button and a side panel. You should choose one or the other.`);this.registeredPlugins.set(e.name,e)}get pluginTranslations(){const e={};return this.registeredPlugins.forEach(t=>{if(t.i18n){const n=t.i18nTokenPrefix||t.name;Object.keys(t.i18n).forEach(o=>{e[o]||(e[o]={}),e[o][n]=t.i18n[o]})}}),e}}class EUt{constructor({name:e,label:t,plugins:n=[],header:o=!0,icon:r,modelTypes:s=[],multiModel:a=!0,logoAndVersion:l=!1,defaultWindow:c=!1,displayedInWindowSelector:u=!0,noModel:d=!1}){this.name=e,this.label=t,this.plugins=n,this.header=o,this.icon=r,this.modelTypes=s,this.multiModel=a,this.logoAndVersion=l,this.default=c,this.displayedInWindowSelector=u,this.noModel=d}}class BUt{constructor(){this.registeredWindows=new Map,this.defaultWindow=null,this.windowContainers=Hs([])}registerWindow(e){var n,o,r;if(!e)throw new TypeError("registerWindow - window is required.");if(e.plugins||(e.plugins=[]),!(typeof e.name=="string"&&((o=(n=e.plugins)==null?void 0:n.every)!=null&&o.call(n,s=>typeof s=="string"))))throw new TypeError("registerWindow - Windows must have a name as string and window.plugins must be an array of plugin names as string.");if(this.registeredWindows.has(e.name))throw new Error(`A window with the name ${e.name} already exist. It must be unique.`);const t=new EUt({name:e.name,label:e.label,plugins:[...e.plugins],header:e.header,icon:{imgUri:(r=e.icon)==null?void 0:r.imgUri},modelTypes:e.modelTypes,multiModel:e.multiModel??!0,logoAndVersion:e.logoAndVersion,defaultWindow:e.defaultWindow,displayedInWindowSelector:e.displayedInWindowSelector??!0,noModel:e.noModel??!1});return this.registeredWindows.set(t.name,t),t.default&&(this.defaultWindow&&(console.warn(`A window with the name ${this.defaultWindow.name} was already set as default and will be replaced by ${t.name}.`),this.defaultWindow.default=!1),this.defaultWindow=t),t}unregisterWindow(e){return this.registeredWindows.delete(e)}registerAndAddPluginsToWindows(e=[]){e.filter(t=>t.window&&!this.registeredWindows.has(t.window)).forEach(t=>{this.registerWindow(t.window).plugins.unshift(t.name)}),e.filter(t=>{var n;return((n=t.addToWindows)==null?void 0:n.length)>0}).forEach(t=>{t.addToWindows.forEach(n=>{const o=this.registeredWindows.get(n);o?o.plugins.push(t.name):console.warn(`[Viewer] Plugin with name ${t.name} can not be added to the window ${n} because it is not registered.`)})})}}const s5=15,U_=30,N_=19,IUt=29,gw=256,V_=gw+1+IUt,nhe=2*V_+1,r5=256,SUt=7,ohe=16,she=17,rhe=18,H_=8*2,vw=-1,PUt=1,yw=2,TUt=0,xm=0,ahe=1,kUt=3,sr=4,Fa=0,lhe=1,ww=2,Oa=-2,RUt=-3,Mm=-5;function Cw(i){return bw(i.map(([e,t])=>new Array(e).fill(t,0,e)))}function bw(i){return i.reduce((e,t)=>e.concat(Array.isArray(t)?bw(t):t),[])}const che=[0,1,2,3].concat(...Cw([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function En(){const i=this;function e(o){const r=i.dyn_tree,s=i.stat_desc.static_tree,a=i.stat_desc.extra_bits,l=i.stat_desc.extra_base,c=i.stat_desc.max_length;let u,d,h,f,A,p,g=0;for(f=0;f<=s5;f++)o.bl_count[f]=0;for(r[o.heap[o.heap_max]*2+1]=0,u=o.heap_max+1;u<nhe;u++)d=o.heap[u],f=r[r[d*2+1]*2+1]+1,f>c&&(f=c,g++),r[d*2+1]=f,!(d>i.max_code)&&(o.bl_count[f]++,A=0,d>=l&&(A=a[d-l]),p=r[d*2],o.opt_len+=p*(f+A),s&&(o.static_len+=p*(s[d*2+1]+A)));if(g!==0){do{for(f=c-1;o.bl_count[f]===0;)f--;o.bl_count[f]--,o.bl_count[f+1]+=2,o.bl_count[c]--,g-=2}while(g>0);for(f=c;f!==0;f--)for(d=o.bl_count[f];d!==0;)h=o.heap[--u],!(h>i.max_code)&&(r[h*2+1]!=f&&(o.opt_len+=(f-r[h*2+1])*r[h*2],r[h*2+1]=f),d--)}}function t(o,r){let s=0;do s|=o&1,o>>>=1,s<<=1;while(--r>0);return s>>>1}function n(o,r,s){const a=[];let l=0,c,u,d;for(c=1;c<=s5;c++)a[c]=l=l+s[c-1]<<1;for(u=0;u<=r;u++)d=o[u*2+1],d!==0&&(o[u*2]=t(a[d]++,d))}i.build_tree=function(o){const r=i.dyn_tree,s=i.stat_desc.static_tree,a=i.stat_desc.elems;let l,c,u=-1,d;for(o.heap_len=0,o.heap_max=nhe,l=0;l<a;l++)r[l*2]!==0?(o.heap[++o.heap_len]=u=l,o.depth[l]=0):r[l*2+1]=0;for(;o.heap_len<2;)d=o.heap[++o.heap_len]=u<2?++u:0,r[d*2]=1,o.depth[d]=0,o.opt_len--,s&&(o.static_len-=s[d*2+1]);for(i.max_code=u,l=Math.floor(o.heap_len/2);l>=1;l--)o.pqdownheap(r,l);d=a;do l=o.heap[1],o.heap[1]=o.heap[o.heap_len--],o.pqdownheap(r,1),c=o.heap[1],o.heap[--o.heap_max]=l,o.heap[--o.heap_max]=c,r[d*2]=r[l*2]+r[c*2],o.depth[d]=Math.max(o.depth[l],o.depth[c])+1,r[l*2+1]=r[c*2+1]=d,o.heap[1]=d++,o.pqdownheap(r,1);while(o.heap_len>=2);o.heap[--o.heap_max]=o.heap[1],e(o),n(r,i.max_code,o.bl_count)}}En._length_code=[0,1,2,3,4,5,6,7].concat(...Cw([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),En.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],En.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],En.d_code=function(i){return i<256?che[i]:che[256+(i>>>7)]},En.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],En.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],En.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],En.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ko(i,e,t,n,o){const r=this;r.static_tree=i,r.extra_bits=e,r.extra_base=t,r.elems=n,r.max_length=o}const DUt=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],_Ut=Cw([[144,8],[112,9],[24,7],[8,8]]);Ko.static_ltree=bw(DUt.map((i,e)=>[i,_Ut[e]]));const LUt=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],FUt=Cw([[30,5]]);Ko.static_dtree=bw(LUt.map((i,e)=>[i,FUt[e]])),Ko.static_l_desc=new Ko(Ko.static_ltree,En.extra_lbits,gw+1,V_,s5),Ko.static_d_desc=new Ko(Ko.static_dtree,En.extra_dbits,0,U_,s5),Ko.static_bl_desc=new Ko(null,En.extra_blbits,0,N_,SUt);const OUt=9,UUt=8;function Bl(i,e,t,n,o){const r=this;r.good_length=i,r.max_lazy=e,r.nice_length=t,r.max_chain=n,r.func=o}const uhe=0,xw=1,qh=2,Ua=[new Bl(0,0,0,0,uhe),new Bl(4,4,8,4,xw),new Bl(4,5,16,8,xw),new Bl(4,6,32,32,xw),new Bl(4,4,16,16,qh),new Bl(8,16,32,32,qh),new Bl(8,16,128,128,qh),new Bl(8,32,128,256,qh),new Bl(32,128,258,1024,qh),new Bl(32,258,258,4096,qh)],Mw=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],oa=0,Ew=1,a5=2,Bw=3,NUt=32,z_=42,Iw=113,l5=666,j_=8,VUt=0,G_=1,HUt=2,_n=3,Sw=258,kr=Sw+_n+1;function dhe(i,e,t,n){const o=i[e*2],r=i[t*2];return o<r||o==r&&n[e]<=n[t]}function zUt(){const i=this;let e,t,n,o,r,s,a,l,c,u,d,h,f,A,p,g,m,w,y,v,x,M,E,S,I,T,P,R,L,U,H,N,q;const J=new En,te=new En,le=new En;i.depth=[];let Pe,ye,Ne,Ce,ke,Oe;i.bl_count=[],i.heap=[],H=[],N=[],q=[];function se(){c=2*r,d[f-1]=0;for(let Se=0;Se<f-1;Se++)d[Se]=0;T=Ua[P].max_lazy,L=Ua[P].good_length,U=Ua[P].nice_length,I=Ua[P].max_chain,x=0,m=0,E=0,w=S=_n-1,v=0,h=0}function Re(){let Se;for(Se=0;Se<V_;Se++)H[Se*2]=0;for(Se=0;Se<U_;Se++)N[Se*2]=0;for(Se=0;Se<N_;Se++)q[Se*2]=0;H[r5*2]=1,i.opt_len=i.static_len=0,ye=Ne=0}function xe(){J.dyn_tree=H,J.stat_desc=Ko.static_l_desc,te.dyn_tree=N,te.stat_desc=Ko.static_d_desc,le.dyn_tree=q,le.stat_desc=Ko.static_bl_desc,ke=0,Oe=0,Ce=8,Re()}i.pqdownheap=function(Se,Fe){const Ue=i.heap,Qe=Ue[Fe];let lt=Fe<<1;for(;lt<=i.heap_len&&(lt<i.heap_len&&dhe(Se,Ue[lt+1],Ue[lt],i.depth)&&lt++,!dhe(Se,Qe,Ue[lt],i.depth));)Ue[Fe]=Ue[lt],Fe=lt,lt<<=1;Ue[Fe]=Qe};function Te(Se,Fe){let Ue=-1,Qe,lt=Se[0*2+1],Ae=0,je=7,ze=4;lt===0&&(je=138,ze=3),Se[(Fe+1)*2+1]=65535;for(let Ke=0;Ke<=Fe;Ke++)Qe=lt,lt=Se[(Ke+1)*2+1],!(++Ae<je&&Qe==lt)&&(Ae<ze?q[Qe*2]+=Ae:Qe!==0?(Qe!=Ue&&q[Qe*2]++,q[ohe*2]++):Ae<=10?q[she*2]++:q[rhe*2]++,Ae=0,Ue=Qe,lt===0?(je=138,ze=3):Qe==lt?(je=6,ze=3):(je=7,ze=4))}function tt(){let Se;for(Te(H,J.max_code),Te(N,te.max_code),le.build_tree(i),Se=N_-1;Se>=3&&q[En.bl_order[Se]*2+1]===0;Se--);return i.opt_len+=3*(Se+1)+5+5+4,Se}function $e(Se){i.pending_buf[i.pending++]=Se}function $(Se){$e(Se&255),$e(Se>>>8&255)}function W(Se){$e(Se>>8&255),$e(Se&255&255)}function re(Se,Fe){let Ue;const Qe=Fe;Oe>H_-Qe?(Ue=Se,ke|=Ue<<Oe&65535,$(ke),ke=Ue>>>H_-Oe,Oe+=Qe-H_):(ke|=Se<<Oe&65535,Oe+=Qe)}function Be(Se,Fe){const Ue=Se*2;re(Fe[Ue]&65535,Fe[Ue+1]&65535)}function ve(Se,Fe){let Ue,Qe=-1,lt,Ae=Se[0*2+1],je=0,ze=7,Ke=4;for(Ae===0&&(ze=138,Ke=3),Ue=0;Ue<=Fe;Ue++)if(lt=Ae,Ae=Se[(Ue+1)*2+1],!(++je<ze&&lt==Ae)){if(je<Ke)do Be(lt,q);while(--je!==0);else lt!==0?(lt!=Qe&&(Be(lt,q),je--),Be(ohe,q),re(je-3,2)):je<=10?(Be(she,q),re(je-3,3)):(Be(rhe,q),re(je-11,7));je=0,Qe=lt,Ae===0?(ze=138,Ke=3):lt==Ae?(ze=6,Ke=3):(ze=7,Ke=4)}}function G(Se,Fe,Ue){let Qe;for(re(Se-257,5),re(Fe-1,5),re(Ue-4,4),Qe=0;Qe<Ue;Qe++)re(q[En.bl_order[Qe]*2+1],3);ve(H,Se-1),ve(N,Fe-1)}function X(){Oe==16?($(ke),ke=0,Oe=0):Oe>=8&&($e(ke&255),ke>>>=8,Oe-=8)}function ie(){re(G_<<1,3),Be(r5,Ko.static_ltree),X(),1+Ce+10-Oe<9&&(re(G_<<1,3),Be(r5,Ko.static_ltree),X()),Ce=7}function Q(Se,Fe){let Ue,Qe,lt;if(i.dist_buf[ye]=Se,i.lc_buf[ye]=Fe&255,ye++,Se===0?H[Fe*2]++:(Ne++,Se--,H[(En._length_code[Fe]+gw+1)*2]++,N[En.d_code(Se)*2]++),!(ye&8191)&&P>2){for(Ue=ye*8,Qe=x-m,lt=0;lt<U_;lt++)Ue+=N[lt*2]*(5+En.extra_dbits[lt]);if(Ue>>>=3,Ne<Math.floor(ye/2)&&Ue<Math.floor(Qe/2))return!0}return ye==Pe-1}function j(Se,Fe){let Ue,Qe,lt=0,Ae,je;if(ye!==0)do Ue=i.dist_buf[lt],Qe=i.lc_buf[lt],lt++,Ue===0?Be(Qe,Se):(Ae=En._length_code[Qe],Be(Ae+gw+1,Se),je=En.extra_lbits[Ae],je!==0&&(Qe-=En.base_length[Ae],re(Qe,je)),Ue--,Ae=En.d_code(Ue),Be(Ae,Fe),je=En.extra_dbits[Ae],je!==0&&(Ue-=En.base_dist[Ae],re(Ue,je)));while(lt<ye);Be(r5,Se),Ce=Se[r5*2+1]}function ae(){Oe>8?$(ke):Oe>0&&$e(ke&255),ke=0,Oe=0}function ee(Se,Fe,Ue){ae(),Ce=8,$(Fe),$(~Fe),i.pending_buf.set(l.subarray(Se,Se+Fe),i.pending),i.pending+=Fe}function he(Se,Fe,Ue){re((VUt<<1)+(Ue?1:0),3),ee(Se,Fe)}function ce(Se,Fe,Ue){let Qe,lt,Ae=0;P>0?(J.build_tree(i),te.build_tree(i),Ae=tt(),Qe=i.opt_len+3+7>>>3,lt=i.static_len+3+7>>>3,lt<=Qe&&(Qe=lt)):Qe=lt=Fe+5,Fe+4<=Qe&&Se!=-1?he(Se,Fe,Ue):lt==Qe?(re((G_<<1)+(Ue?1:0),3),j(Ko.static_ltree,Ko.static_dtree)):(re((HUt<<1)+(Ue?1:0),3),G(J.max_code+1,te.max_code+1,Ae+1),j(H,N)),Re(),Ue&&ae()}function we(Se){ce(m>=0?m:-1,x-m,Se),m=x,e.flush_pending()}function De(){let Se,Fe,Ue,Qe;do{if(Qe=c-E-x,Qe===0&&x===0&&E===0)Qe=r;else if(Qe==-1)Qe--;else if(x>=r+r-kr){l.set(l.subarray(r,r+r),0),M-=r,x-=r,m-=r,Se=f,Ue=Se;do Fe=d[--Ue]&65535,d[Ue]=Fe>=r?Fe-r:0;while(--Se!==0);Se=r,Ue=Se;do Fe=u[--Ue]&65535,u[Ue]=Fe>=r?Fe-r:0;while(--Se!==0);Qe+=r}if(e.avail_in===0)return;Se=e.read_buf(l,x+E,Qe),E+=Se,E>=_n&&(h=l[x]&255,h=(h<<g^l[x+1]&255)&p)}while(E<kr&&e.avail_in!==0)}function Ge(Se){let Fe=65535,Ue;for(Fe>n-5&&(Fe=n-5);;){if(E<=1){if(De(),E===0&&Se==xm)return oa;if(E===0)break}if(x+=E,E=0,Ue=m+Fe,(x===0||x>=Ue)&&(E=x-Ue,x=Ue,we(!1),e.avail_out===0)||x-m>=r-kr&&(we(!1),e.avail_out===0))return oa}return we(Se==sr),e.avail_out===0?Se==sr?a5:oa:Se==sr?Bw:Ew}function Ee(Se){let Fe=I,Ue=x,Qe,lt,Ae=S;const je=x>r-kr?x-(r-kr):0;let ze=U;const Ke=a,Ye=x+Sw;let be=l[Ue+Ae-1],dt=l[Ue+Ae];S>=L&&(Fe>>=2),ze>E&&(ze=E);do if(Qe=Se,!(l[Qe+Ae]!=dt||l[Qe+Ae-1]!=be||l[Qe]!=l[Ue]||l[++Qe]!=l[Ue+1])){Ue+=2,Qe++;do;while(l[++Ue]==l[++Qe]&&l[++Ue]==l[++Qe]&&l[++Ue]==l[++Qe]&&l[++Ue]==l[++Qe]&&l[++Ue]==l[++Qe]&&l[++Ue]==l[++Qe]&&l[++Ue]==l[++Qe]&&l[++Ue]==l[++Qe]&&Ue<Ye);if(lt=Sw-(Ye-Ue),Ue=Ye-Sw,lt>Ae){if(M=Se,Ae=lt,lt>=ze)break;be=l[Ue+Ae-1],dt=l[Ue+Ae]}}while((Se=u[Se&Ke]&65535)>je&&--Fe!==0);return Ae<=E?Ae:E}function Xe(Se){let Fe=0,Ue;for(;;){if(E<kr){if(De(),E<kr&&Se==xm)return oa;if(E===0)break}if(E>=_n&&(h=(h<<g^l[x+(_n-1)]&255)&p,Fe=d[h]&65535,u[x&a]=d[h],d[h]=x),Fe!==0&&(x-Fe&65535)<=r-kr&&R!=yw&&(w=Ee(Fe)),w>=_n)if(Ue=Q(x-M,w-_n),E-=w,w<=T&&E>=_n){w--;do x++,h=(h<<g^l[x+(_n-1)]&255)&p,Fe=d[h]&65535,u[x&a]=d[h],d[h]=x;while(--w!==0);x++}else x+=w,w=0,h=l[x]&255,h=(h<<g^l[x+1]&255)&p;else Ue=Q(0,l[x]&255),E--,x++;if(Ue&&(we(!1),e.avail_out===0))return oa}return we(Se==sr),e.avail_out===0?Se==sr?a5:oa:Se==sr?Bw:Ew}function ut(Se){let Fe=0,Ue,Qe;for(;;){if(E<kr){if(De(),E<kr&&Se==xm)return oa;if(E===0)break}if(E>=_n&&(h=(h<<g^l[x+(_n-1)]&255)&p,Fe=d[h]&65535,u[x&a]=d[h],d[h]=x),S=w,y=M,w=_n-1,Fe!==0&&S<T&&(x-Fe&65535)<=r-kr&&(R!=yw&&(w=Ee(Fe)),w<=5&&(R==PUt||w==_n&&x-M>4096)&&(w=_n-1)),S>=_n&&w<=S){Qe=x+E-_n,Ue=Q(x-1-y,S-_n),E-=S-1,S-=2;do++x<=Qe&&(h=(h<<g^l[x+(_n-1)]&255)&p,Fe=d[h]&65535,u[x&a]=d[h],d[h]=x);while(--S!==0);if(v=0,w=_n-1,x++,Ue&&(we(!1),e.avail_out===0))return oa}else if(v!==0){if(Ue=Q(0,l[x-1]&255),Ue&&we(!1),x++,E--,e.avail_out===0)return oa}else v=1,x++,E--}return v!==0&&(Ue=Q(0,l[x-1]&255),v=0),we(Se==sr),e.avail_out===0?Se==sr?a5:oa:Se==sr?Bw:Ew}function Ie(Se){return Se.total_in=Se.total_out=0,Se.msg=null,i.pending=0,i.pending_out=0,t=Iw,o=xm,xe(),se(),Fa}i.deflateInit=function(Se,Fe,Ue,Qe,lt,Ae){return Qe||(Qe=j_),lt||(lt=UUt),Ae||(Ae=TUt),Se.msg=null,Fe==vw&&(Fe=6),lt<1||lt>OUt||Qe!=j_||Ue<9||Ue>15||Fe<0||Fe>9||Ae<0||Ae>yw?Oa:(Se.dstate=i,s=Ue,r=1<<s,a=r-1,A=lt+7,f=1<<A,p=f-1,g=Math.floor((A+_n-1)/_n),l=new Uint8Array(r*2),u=[],d=[],Pe=1<<lt+6,i.pending_buf=new Uint8Array(Pe*4),n=Pe*4,i.dist_buf=new Uint16Array(Pe),i.lc_buf=new Uint8Array(Pe),P=Fe,R=Ae,Ie(Se))},i.deflateEnd=function(){return t!=z_&&t!=Iw&&t!=l5?Oa:(i.lc_buf=null,i.dist_buf=null,i.pending_buf=null,d=null,u=null,l=null,i.dstate=null,t==Iw?RUt:Fa)},i.deflateParams=function(Se,Fe,Ue){let Qe=Fa;return Fe==vw&&(Fe=6),Fe<0||Fe>9||Ue<0||Ue>yw?Oa:(Ua[P].func!=Ua[Fe].func&&Se.total_in!==0&&(Qe=Se.deflate(ahe)),P!=Fe&&(P=Fe,T=Ua[P].max_lazy,L=Ua[P].good_length,U=Ua[P].nice_length,I=Ua[P].max_chain),R=Ue,Qe)},i.deflateSetDictionary=function(Se,Fe,Ue){let Qe=Ue,lt,Ae=0;if(!Fe||t!=z_)return Oa;if(Qe<_n)return Fa;for(Qe>r-kr&&(Qe=r-kr,Ae=Ue-Qe),l.set(Fe.subarray(Ae,Ae+Qe),0),x=Qe,m=Qe,h=l[0]&255,h=(h<<g^l[1]&255)&p,lt=0;lt<=Qe-_n;lt++)h=(h<<g^l[lt+(_n-1)]&255)&p,u[lt&a]=d[h],d[h]=lt;return Fa},i.deflate=function(Se,Fe){let Ue,Qe,lt,Ae,je;if(Fe>sr||Fe<0)return Oa;if(!Se.next_out||!Se.next_in&&Se.avail_in!==0||t==l5&&Fe!=sr)return Se.msg=Mw[ww-Oa],Oa;if(Se.avail_out===0)return Se.msg=Mw[ww-Mm],Mm;if(e=Se,Ae=o,o=Fe,t==z_&&(Qe=j_+(s-8<<4)<<8,lt=(P-1&255)>>1,lt>3&&(lt=3),Qe|=lt<<6,x!==0&&(Qe|=NUt),Qe+=31-Qe%31,t=Iw,W(Qe)),i.pending!==0){if(e.flush_pending(),e.avail_out===0)return o=-1,Fa}else if(e.avail_in===0&&Fe<=Ae&&Fe!=sr)return e.msg=Mw[ww-Mm],Mm;if(t==l5&&e.avail_in!==0)return Se.msg=Mw[ww-Mm],Mm;if(e.avail_in!==0||E!==0||Fe!=xm&&t!=l5){switch(je=-1,Ua[P].func){case uhe:je=Ge(Fe);break;case xw:je=Xe(Fe);break;case qh:je=ut(Fe);break}if((je==a5||je==Bw)&&(t=l5),je==oa||je==a5)return e.avail_out===0&&(o=-1),Fa;if(je==Ew){if(Fe==ahe)ie();else if(he(0,0,!1),Fe==kUt)for(Ue=0;Ue<f;Ue++)d[Ue]=0;if(e.flush_pending(),e.avail_out===0)return o=-1,Fa}}return Fe!=sr?Fa:lhe}}function hhe(){const i=this;i.next_in_index=0,i.next_out_index=0,i.avail_in=0,i.total_in=0,i.avail_out=0,i.total_out=0}hhe.prototype={deflateInit(i,e){const t=this;return t.dstate=new zUt,e||(e=s5),t.dstate.deflateInit(t,i,e)},deflate(i){const e=this;return e.dstate?e.dstate.deflate(e,i):Oa},deflateEnd(){const i=this;if(!i.dstate)return Oa;const e=i.dstate.deflateEnd();return i.dstate=null,e},deflateParams(i,e){const t=this;return t.dstate?t.dstate.deflateParams(t,i,e):Oa},deflateSetDictionary(i,e){const t=this;return t.dstate?t.dstate.deflateSetDictionary(t,i,e):Oa},read_buf(i,e,t){const n=this;let o=n.avail_in;return o>t&&(o=t),o===0?0:(n.avail_in-=o,i.set(n.next_in.subarray(n.next_in_index,n.next_in_index+o),e),n.next_in_index+=o,n.total_in+=o,o)},flush_pending(){const i=this;let e=i.dstate.pending;e>i.avail_out&&(e=i.avail_out),e!==0&&(i.next_out.set(i.dstate.pending_buf.subarray(i.dstate.pending_out,i.dstate.pending_out+e),i.next_out_index),i.next_out_index+=e,i.dstate.pending_out+=e,i.total_out+=e,i.avail_out-=e,i.dstate.pending-=e,i.dstate.pending===0&&(i.dstate.pending_out=0))}};function jUt(i){const e=this,t=new hhe,n=GUt(i&&i.chunkSize?i.chunkSize:64*1024),o=xm,r=new Uint8Array(n);let s=i?i.level:vw;typeof s>"u"&&(s=vw),t.deflateInit(s),t.next_out=r,e.append=function(a,l){let c,u,d=0,h=0,f=0;const A=[];if(a.length){t.next_in_index=0,t.next_in=a,t.avail_in=a.length;do{if(t.next_out_index=0,t.avail_out=n,c=t.deflate(o),c!=Fa)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?A.push(new Uint8Array(r)):A.push(r.subarray(0,t.next_out_index))),f+=t.next_out_index,l&&t.next_in_index>0&&t.next_in_index!=d&&(l(t.next_in_index),d=t.next_in_index)}while(t.avail_in>0||t.avail_out===0);return A.length>1?(u=new Uint8Array(f),A.forEach(function(p){u.set(p,h),h+=p.length})):u=A[0]?new Uint8Array(A[0]):new Uint8Array,u}},e.flush=function(){let a,l,c=0,u=0;const d=[];do{if(t.next_out_index=0,t.avail_out=n,a=t.deflate(sr),a!=lhe&&a!=Fa)throw new Error("deflating: "+t.msg);n-t.avail_out>0&&d.push(r.slice(0,t.next_out_index)),u+=t.next_out_index}while(t.avail_in>0||t.avail_out===0);return t.deflateEnd(),l=new Uint8Array(u),d.forEach(function(h){l.set(h,c),c+=h.length}),l}}function GUt(i){return i+5*(Math.floor(i/16383)+1)}const qUt=15,Ui=0,Fc=1,QUt=2,rr=-2,Bn=-3,phe=-4,Oc=-5,Rr=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],fhe=1440,KUt=0,JUt=4,WUt=9,ZUt=5,XUt=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],YUt=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],$Ut=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],eNt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],tNt=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],iNt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ld=15;function q_(){const i=this;let e,t,n,o,r,s;function a(c,u,d,h,f,A,p,g,m,w,y){let v,x,M,E,S,I,T,P,R,L,U,H,N,q,J;L=0,S=d;do n[c[u+L]]++,L++,S--;while(S!==0);if(n[0]==d)return p[0]=-1,g[0]=0,Ui;for(P=g[0],I=1;I<=ld&&n[I]===0;I++);for(T=I,P<I&&(P=I),S=ld;S!==0&&n[S]===0;S--);for(M=S,P>S&&(P=S),g[0]=P,q=1<<I;I<S;I++,q<<=1)if((q-=n[I])<0)return Bn;if((q-=n[S])<0)return Bn;for(n[S]+=q,s[1]=I=0,L=1,N=2;--S!==0;)s[N]=I+=n[L],N++,L++;S=0,L=0;do(I=c[u+L])!==0&&(y[s[I]++]=S),L++;while(++S<d);for(d=s[M],s[0]=S=0,L=0,E=-1,H=-P,r[0]=0,U=0,J=0;T<=M;T++)for(v=n[T];v--!==0;){for(;T>H+P;){if(E++,H+=P,J=M-H,J=J>P?P:J,(x=1<<(I=T-H))>v+1&&(x-=v+1,N=T,I<J))for(;++I<J&&!((x<<=1)<=n[++N]);)x-=n[N];if(J=1<<I,w[0]+J>fhe)return Bn;r[E]=U=w[0],w[0]+=J,E!==0?(s[E]=S,o[0]=I,o[1]=P,I=S>>>H-P,o[2]=U-r[E-1]-I,m.set(o,(r[E-1]+I)*3)):p[0]=U}for(o[1]=T-H,L>=d?o[0]=192:y[L]<h?(o[0]=y[L]<256?0:96,o[2]=y[L++]):(o[0]=A[y[L]-h]+16+64,o[2]=f[y[L++]-h]),x=1<<T-H,I=S>>>H;I<J;I+=x)m.set(o,(U+I)*3);for(I=1<<T-1;S&I;I>>>=1)S^=I;for(S^=I,R=(1<<H)-1;(S&R)!=s[E];)E--,H-=P,R=(1<<H)-1}return q!==0&&M!=1?Oc:Ui}function l(c){let u;for(e||(e=[],t=[],n=new Int32Array(ld+1),o=[],r=new Int32Array(ld),s=new Int32Array(ld+1)),t.length<c&&(t=[]),u=0;u<c;u++)t[u]=0;for(u=0;u<ld+1;u++)n[u]=0;for(u=0;u<3;u++)o[u]=0;r.set(n.subarray(0,ld),0),s.set(n.subarray(0,ld+1),0)}i.inflate_trees_bits=function(c,u,d,h,f){let A;return l(19),e[0]=0,A=a(c,0,19,19,null,null,d,u,h,e,t),A==Bn?f.msg="oversubscribed dynamic bit lengths tree":(A==Oc||u[0]===0)&&(f.msg="incomplete dynamic bit lengths tree",A=Bn),A},i.inflate_trees_dynamic=function(c,u,d,h,f,A,p,g,m){let w;return l(288),e[0]=0,w=a(d,0,c,257,$Ut,eNt,A,h,g,e,t),w!=Ui||h[0]===0?(w==Bn?m.msg="oversubscribed literal/length tree":w!=phe&&(m.msg="incomplete literal/length tree",w=Bn),w):(l(288),w=a(d,c,u,0,tNt,iNt,p,f,g,e,t),w!=Ui||f[0]===0&&c>257?(w==Bn?m.msg="oversubscribed distance tree":w==Oc?(m.msg="incomplete distance tree",w=Bn):w!=phe&&(m.msg="empty distance tree with lengths",w=Bn),w):Ui)}}q_.inflate_trees_fixed=function(i,e,t,n){return i[0]=WUt,e[0]=ZUt,t[0]=XUt,n[0]=YUt,Ui};const Pw=0,Ahe=1,mhe=2,ghe=3,vhe=4,yhe=5,whe=6,Q_=7,Che=8,Tw=9;function nNt(){const i=this;let e,t=0,n,o=0,r=0,s=0,a=0,l=0,c=0,u=0,d,h=0,f,A=0;function p(g,m,w,y,v,x,M,E){let S,I,T,P,R,L,U,H,N,q,J,te,le,Pe,ye,Ne;U=E.next_in_index,H=E.avail_in,R=M.bitb,L=M.bitk,N=M.write,q=N<M.read?M.read-N-1:M.end-N,J=Rr[g],te=Rr[m];do{for(;L<20;)H--,R|=(E.read_byte(U++)&255)<<L,L+=8;if(S=R&J,I=w,T=y,Ne=(T+S)*3,(P=I[Ne])===0){R>>=I[Ne+1],L-=I[Ne+1],M.win[N++]=I[Ne+2],q--;continue}do{if(R>>=I[Ne+1],L-=I[Ne+1],P&16){for(P&=15,le=I[Ne+2]+(R&Rr[P]),R>>=P,L-=P;L<15;)H--,R|=(E.read_byte(U++)&255)<<L,L+=8;S=R&te,I=v,T=x,Ne=(T+S)*3,P=I[Ne];do if(R>>=I[Ne+1],L-=I[Ne+1],P&16){for(P&=15;L<P;)H--,R|=(E.read_byte(U++)&255)<<L,L+=8;if(Pe=I[Ne+2]+(R&Rr[P]),R>>=P,L-=P,q-=le,N>=Pe)ye=N-Pe,N-ye>0&&2>N-ye?(M.win[N++]=M.win[ye++],M.win[N++]=M.win[ye++],le-=2):(M.win.set(M.win.subarray(ye,ye+2),N),N+=2,ye+=2,le-=2);else{ye=N-Pe;do ye+=M.end;while(ye<0);if(P=M.end-ye,le>P){if(le-=P,N-ye>0&&P>N-ye)do M.win[N++]=M.win[ye++];while(--P!==0);else M.win.set(M.win.subarray(ye,ye+P),N),N+=P,ye+=P,P=0;ye=0}}if(N-ye>0&&le>N-ye)do M.win[N++]=M.win[ye++];while(--le!==0);else M.win.set(M.win.subarray(ye,ye+le),N),N+=le,ye+=le,le=0;break}else if(!(P&64))S+=I[Ne+2],S+=R&Rr[P],Ne=(T+S)*3,P=I[Ne];else return E.msg="invalid distance code",le=E.avail_in-H,le=L>>3<le?L>>3:le,H+=le,U-=le,L-=le<<3,M.bitb=R,M.bitk=L,E.avail_in=H,E.total_in+=U-E.next_in_index,E.next_in_index=U,M.write=N,Bn;while(!0);break}if(P&64)return P&32?(le=E.avail_in-H,le=L>>3<le?L>>3:le,H+=le,U-=le,L-=le<<3,M.bitb=R,M.bitk=L,E.avail_in=H,E.total_in+=U-E.next_in_index,E.next_in_index=U,M.write=N,Fc):(E.msg="invalid literal/length code",le=E.avail_in-H,le=L>>3<le?L>>3:le,H+=le,U-=le,L-=le<<3,M.bitb=R,M.bitk=L,E.avail_in=H,E.total_in+=U-E.next_in_index,E.next_in_index=U,M.write=N,Bn);if(S+=I[Ne+2],S+=R&Rr[P],Ne=(T+S)*3,(P=I[Ne])===0){R>>=I[Ne+1],L-=I[Ne+1],M.win[N++]=I[Ne+2],q--;break}}while(!0)}while(q>=258&&H>=10);return le=E.avail_in-H,le=L>>3<le?L>>3:le,H+=le,U-=le,L-=le<<3,M.bitb=R,M.bitk=L,E.avail_in=H,E.total_in+=U-E.next_in_index,E.next_in_index=U,M.write=N,Ui}i.init=function(g,m,w,y,v,x){e=Pw,c=g,u=m,d=w,h=y,f=v,A=x,n=null},i.proc=function(g,m,w){let y,v,x,M=0,E=0,S=0,I,T,P,R;for(S=m.next_in_index,I=m.avail_in,M=g.bitb,E=g.bitk,T=g.write,P=T<g.read?g.read-T-1:g.end-T;;)switch(e){case Pw:if(P>=258&&I>=10&&(g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,w=p(c,u,d,h,f,A,g,m),S=m.next_in_index,I=m.avail_in,M=g.bitb,E=g.bitk,T=g.write,P=T<g.read?g.read-T-1:g.end-T,w!=Ui)){e=w==Fc?Q_:Tw;break}r=c,n=d,o=h,e=Ahe;case Ahe:for(y=r;E<y;){if(I!==0)w=Ui;else return g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,g.inflate_flush(m,w);I--,M|=(m.read_byte(S++)&255)<<E,E+=8}if(v=(o+(M&Rr[y]))*3,M>>>=n[v+1],E-=n[v+1],x=n[v],x===0){s=n[v+2],e=whe;break}if(x&16){a=x&15,t=n[v+2],e=mhe;break}if(!(x&64)){r=x,o=v/3+n[v+2];break}if(x&32){e=Q_;break}return e=Tw,m.msg="invalid literal/length code",w=Bn,g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,g.inflate_flush(m,w);case mhe:for(y=a;E<y;){if(I!==0)w=Ui;else return g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,g.inflate_flush(m,w);I--,M|=(m.read_byte(S++)&255)<<E,E+=8}t+=M&Rr[y],M>>=y,E-=y,r=u,n=f,o=A,e=ghe;case ghe:for(y=r;E<y;){if(I!==0)w=Ui;else return g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,g.inflate_flush(m,w);I--,M|=(m.read_byte(S++)&255)<<E,E+=8}if(v=(o+(M&Rr[y]))*3,M>>=n[v+1],E-=n[v+1],x=n[v],x&16){a=x&15,l=n[v+2],e=vhe;break}if(!(x&64)){r=x,o=v/3+n[v+2];break}return e=Tw,m.msg="invalid distance code",w=Bn,g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,g.inflate_flush(m,w);case vhe:for(y=a;E<y;){if(I!==0)w=Ui;else return g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,g.inflate_flush(m,w);I--,M|=(m.read_byte(S++)&255)<<E,E+=8}l+=M&Rr[y],M>>=y,E-=y,e=yhe;case yhe:for(R=T-l;R<0;)R+=g.end;for(;t!==0;){if(P===0&&(T==g.end&&g.read!==0&&(T=0,P=T<g.read?g.read-T-1:g.end-T),P===0&&(g.write=T,w=g.inflate_flush(m,w),T=g.write,P=T<g.read?g.read-T-1:g.end-T,T==g.end&&g.read!==0&&(T=0,P=T<g.read?g.read-T-1:g.end-T),P===0)))return g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,g.inflate_flush(m,w);g.win[T++]=g.win[R++],P--,R==g.end&&(R=0),t--}e=Pw;break;case whe:if(P===0&&(T==g.end&&g.read!==0&&(T=0,P=T<g.read?g.read-T-1:g.end-T),P===0&&(g.write=T,w=g.inflate_flush(m,w),T=g.write,P=T<g.read?g.read-T-1:g.end-T,T==g.end&&g.read!==0&&(T=0,P=T<g.read?g.read-T-1:g.end-T),P===0)))return g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,g.inflate_flush(m,w);w=Ui,g.win[T++]=s,P--,e=Pw;break;case Q_:if(E>7&&(E-=8,I++,S--),g.write=T,w=g.inflate_flush(m,w),T=g.write,P=T<g.read?g.read-T-1:g.end-T,g.read!=g.write)return g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,g.inflate_flush(m,w);e=Che;case Che:return w=Fc,g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,g.inflate_flush(m,w);case Tw:return w=Bn,g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,g.inflate_flush(m,w);default:return w=rr,g.bitb=M,g.bitk=E,m.avail_in=I,m.total_in+=S-m.next_in_index,m.next_in_index=S,g.write=T,g.inflate_flush(m,w)}},i.free=function(){}}const bhe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Em=0,K_=1,xhe=2,Mhe=3,Ehe=4,Bhe=5,kw=6,Rw=7,Ihe=8,Qh=9;function oNt(i,e){const t=this;let n=Em,o=0,r=0,s=0,a;const l=[0],c=[0],u=new nNt;let d=0,h=new Int32Array(fhe*3);const f=0,A=new q_;t.bitk=0,t.bitb=0,t.win=new Uint8Array(e),t.end=e,t.read=0,t.write=0,t.reset=function(p,g){g&&(g[0]=f),n==kw&&u.free(p),n=Em,t.bitk=0,t.bitb=0,t.read=t.write=0},t.reset(i,null),t.inflate_flush=function(p,g){let m,w,y;return w=p.next_out_index,y=t.read,m=(y<=t.write?t.write:t.end)-y,m>p.avail_out&&(m=p.avail_out),m!==0&&g==Oc&&(g=Ui),p.avail_out-=m,p.total_out+=m,p.next_out.set(t.win.subarray(y,y+m),w),w+=m,y+=m,y==t.end&&(y=0,t.write==t.end&&(t.write=0),m=t.write-y,m>p.avail_out&&(m=p.avail_out),m!==0&&g==Oc&&(g=Ui),p.avail_out-=m,p.total_out+=m,p.next_out.set(t.win.subarray(y,y+m),w),w+=m,y+=m),p.next_out_index=w,t.read=y,g},t.proc=function(p,g){let m,w,y,v,x,M,E,S;for(v=p.next_in_index,x=p.avail_in,w=t.bitb,y=t.bitk,M=t.write,E=M<t.read?t.read-M-1:t.end-M;;){let I,T,P,R,L,U,H,N;switch(n){case Em:for(;y<3;){if(x!==0)g=Ui;else return t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);x--,w|=(p.read_byte(v++)&255)<<y,y+=8}switch(m=w&7,d=m&1,m>>>1){case 0:w>>>=3,y-=3,m=y&7,w>>>=m,y-=m,n=K_;break;case 1:I=[],T=[],P=[[]],R=[[]],q_.inflate_trees_fixed(I,T,P,R),u.init(I[0],T[0],P[0],0,R[0],0),w>>>=3,y-=3,n=kw;break;case 2:w>>>=3,y-=3,n=Mhe;break;case 3:return w>>>=3,y-=3,n=Qh,p.msg="invalid block type",g=Bn,t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g)}break;case K_:for(;y<32;){if(x!==0)g=Ui;else return t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);x--,w|=(p.read_byte(v++)&255)<<y,y+=8}if((~w>>>16&65535)!=(w&65535))return n=Qh,p.msg="invalid stored block lengths",g=Bn,t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);o=w&65535,w=y=0,n=o!==0?xhe:d!==0?Rw:Em;break;case xhe:if(x===0||E===0&&(M==t.end&&t.read!==0&&(M=0,E=M<t.read?t.read-M-1:t.end-M),E===0&&(t.write=M,g=t.inflate_flush(p,g),M=t.write,E=M<t.read?t.read-M-1:t.end-M,M==t.end&&t.read!==0&&(M=0,E=M<t.read?t.read-M-1:t.end-M),E===0)))return t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);if(g=Ui,m=o,m>x&&(m=x),m>E&&(m=E),t.win.set(p.read_buf(v,m),M),v+=m,x-=m,M+=m,E-=m,(o-=m)!==0)break;n=d!==0?Rw:Em;break;case Mhe:for(;y<14;){if(x!==0)g=Ui;else return t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);x--,w|=(p.read_byte(v++)&255)<<y,y+=8}if(r=m=w&16383,(m&31)>29||(m>>5&31)>29)return n=Qh,p.msg="too many length or distance symbols",g=Bn,t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);if(m=258+(m&31)+(m>>5&31),!a||a.length<m)a=[];else for(S=0;S<m;S++)a[S]=0;w>>>=14,y-=14,s=0,n=Ehe;case Ehe:for(;s<4+(r>>>10);){for(;y<3;){if(x!==0)g=Ui;else return t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);x--,w|=(p.read_byte(v++)&255)<<y,y+=8}a[bhe[s++]]=w&7,w>>>=3,y-=3}for(;s<19;)a[bhe[s++]]=0;if(l[0]=7,m=A.inflate_trees_bits(a,l,c,h,p),m!=Ui)return g=m,g==Bn&&(a=null,n=Qh),t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);s=0,n=Bhe;case Bhe:for(;m=r,!(s>=258+(m&31)+(m>>5&31));){let q,J;for(m=l[0];y<m;){if(x!==0)g=Ui;else return t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);x--,w|=(p.read_byte(v++)&255)<<y,y+=8}if(m=h[(c[0]+(w&Rr[m]))*3+1],J=h[(c[0]+(w&Rr[m]))*3+2],J<16)w>>>=m,y-=m,a[s++]=J;else{for(S=J==18?7:J-14,q=J==18?11:3;y<m+S;){if(x!==0)g=Ui;else return t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);x--,w|=(p.read_byte(v++)&255)<<y,y+=8}if(w>>>=m,y-=m,q+=w&Rr[S],w>>>=S,y-=S,S=s,m=r,S+q>258+(m&31)+(m>>5&31)||J==16&&S<1)return a=null,n=Qh,p.msg="invalid bit length repeat",g=Bn,t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);J=J==16?a[S-1]:0;do a[S++]=J;while(--q!==0);s=S}}if(c[0]=-1,L=[],U=[],H=[],N=[],L[0]=9,U[0]=6,m=r,m=A.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),a,L,U,H,N,h,p),m!=Ui)return m==Bn&&(a=null,n=Qh),g=m,t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);u.init(L[0],U[0],h,H[0],h,N[0]),n=kw;case kw:if(t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,(g=u.proc(t,p,g))!=Fc)return t.inflate_flush(p,g);if(g=Ui,u.free(p),v=p.next_in_index,x=p.avail_in,w=t.bitb,y=t.bitk,M=t.write,E=M<t.read?t.read-M-1:t.end-M,d===0){n=Em;break}n=Rw;case Rw:if(t.write=M,g=t.inflate_flush(p,g),M=t.write,E=M<t.read?t.read-M-1:t.end-M,t.read!=t.write)return t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);n=Ihe;case Ihe:return g=Fc,t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);case Qh:return g=Bn,t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g);default:return g=rr,t.bitb=w,t.bitk=y,p.avail_in=x,p.total_in+=v-p.next_in_index,p.next_in_index=v,t.write=M,t.inflate_flush(p,g)}}},t.free=function(p){t.reset(p,null),t.win=null,h=null},t.set_dictionary=function(p,g,m){t.win.set(p.subarray(g,g+m),0),t.read=t.write=m},t.sync_point=function(){return n==K_?1:0}}const sNt=32,rNt=8,aNt=0,She=1,Phe=2,The=3,khe=4,Rhe=5,J_=6,c5=7,Dhe=12,cd=13,lNt=[0,0,255,255];function cNt(){const i=this;i.mode=0,i.method=0,i.was=[0],i.need=0,i.marker=0,i.wbits=0;function e(t){return!t||!t.istate?rr:(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=c5,t.istate.blocks.reset(t,null),Ui)}i.inflateEnd=function(t){return i.blocks&&i.blocks.free(t),i.blocks=null,Ui},i.inflateInit=function(t,n){return t.msg=null,i.blocks=null,n<8||n>15?(i.inflateEnd(t),rr):(i.wbits=n,t.istate.blocks=new oNt(t,1<<n),e(t),Ui)},i.inflate=function(t,n){let o,r;if(!t||!t.istate||!t.next_in)return rr;const s=t.istate;for(n=n==JUt?Oc:Ui,o=Oc;;)switch(s.mode){case aNt:if(t.avail_in===0)return o;if(o=n,t.avail_in--,t.total_in++,((s.method=t.read_byte(t.next_in_index++))&15)!=rNt){s.mode=cd,t.msg="unknown compression method",s.marker=5;break}if((s.method>>4)+8>s.wbits){s.mode=cd,t.msg="invalid win size",s.marker=5;break}s.mode=She;case She:if(t.avail_in===0)return o;if(o=n,t.avail_in--,t.total_in++,r=t.read_byte(t.next_in_index++)&255,((s.method<<8)+r)%31!==0){s.mode=cd,t.msg="incorrect header check",s.marker=5;break}if(!(r&sNt)){s.mode=c5;break}s.mode=Phe;case Phe:if(t.avail_in===0)return o;o=n,t.avail_in--,t.total_in++,s.need=(t.read_byte(t.next_in_index++)&255)<<24&4278190080,s.mode=The;case The:if(t.avail_in===0)return o;o=n,t.avail_in--,t.total_in++,s.need+=(t.read_byte(t.next_in_index++)&255)<<16&16711680,s.mode=khe;case khe:if(t.avail_in===0)return o;o=n,t.avail_in--,t.total_in++,s.need+=(t.read_byte(t.next_in_index++)&255)<<8&65280,s.mode=Rhe;case Rhe:return t.avail_in===0?o:(o=n,t.avail_in--,t.total_in++,s.need+=t.read_byte(t.next_in_index++)&255,s.mode=J_,QUt);case J_:return s.mode=cd,t.msg="need dictionary",s.marker=0,rr;case c5:if(o=s.blocks.proc(t,o),o==Bn){s.mode=cd,s.marker=0;break}if(o==Ui&&(o=n),o!=Fc)return o;o=n,s.blocks.reset(t,s.was),s.mode=Dhe;case Dhe:return t.avail_in=0,Fc;case cd:return Bn;default:return rr}},i.inflateSetDictionary=function(t,n,o){let r=0,s=o;if(!t||!t.istate||t.istate.mode!=J_)return rr;const a=t.istate;return s>=1<<a.wbits&&(s=(1<<a.wbits)-1,r=o-s),a.blocks.set_dictionary(n,r,s),a.mode=c5,Ui},i.inflateSync=function(t){let n,o,r,s,a;if(!t||!t.istate)return rr;const l=t.istate;if(l.mode!=cd&&(l.mode=cd,l.marker=0),(n=t.avail_in)===0)return Oc;for(o=t.next_in_index,r=l.marker;n!==0&&r<4;)t.read_byte(o)==lNt[r]?r++:t.read_byte(o)!==0?r=0:r=4-r,o++,n--;return t.total_in+=o-t.next_in_index,t.next_in_index=o,t.avail_in=n,l.marker=r,r!=4?Bn:(s=t.total_in,a=t.total_out,e(t),t.total_in=s,t.total_out=a,l.mode=c5,Ui)},i.inflateSyncPoint=function(t){return!t||!t.istate||!t.istate.blocks?rr:t.istate.blocks.sync_point()}}function _he(){}_he.prototype={inflateInit(i){const e=this;return e.istate=new cNt,i||(i=qUt),e.istate.inflateInit(e,i)},inflate(i){const e=this;return e.istate?e.istate.inflate(e,i):rr},inflateEnd(){const i=this;if(!i.istate)return rr;const e=i.istate.inflateEnd(i);return i.istate=null,e},inflateSync(){const i=this;return i.istate?i.istate.inflateSync(i):rr},inflateSetDictionary(i,e){const t=this;return t.istate?t.istate.inflateSetDictionary(t,i,e):rr},read_byte(i){return this.next_in[i]},read_buf(i,e){return this.next_in.subarray(i,i+e)}};function uNt(i){const e=this,t=new _he,n=i&&i.chunkSize?Math.floor(i.chunkSize*2):128*1024,o=KUt,r=new Uint8Array(n);let s=!1;t.inflateInit(),t.next_out=r,e.append=function(a,l){const c=[];let u,d,h=0,f=0,A=0;if(a.length!==0){t.next_in_index=0,t.next_in=a,t.avail_in=a.length;do{if(t.next_out_index=0,t.avail_out=n,t.avail_in===0&&!s&&(t.next_in_index=0,s=!0),u=t.inflate(o),s&&u===Oc){if(t.avail_in!==0)throw new Error("inflating: bad input")}else if(u!==Ui&&u!==Fc)throw new Error("inflating: "+t.msg);if((s||u===Fc)&&t.avail_in===a.length)throw new Error("inflating: bad input");t.next_out_index&&(t.next_out_index===n?c.push(new Uint8Array(r)):c.push(r.subarray(0,t.next_out_index))),A+=t.next_out_index,l&&t.next_in_index>0&&t.next_in_index!=h&&(l(t.next_in_index),h=t.next_in_index)}while(t.avail_in>0||t.avail_out===0);return c.length>1?(d=new Uint8Array(A),c.forEach(function(p){d.set(p,f),f+=p.length})):d=c[0]?new Uint8Array(c[0]):new Uint8Array,d}},e.flush=function(){t.inflateEnd()}}const Kh=4294967295,ud=65535,dNt=8,hNt=0,pNt=99,fNt=67324752,ANt=134695760,Lhe=33639248,mNt=101010256,Fhe=101075792,gNt=117853008,Bm=22,W_=20,Z_=56,vNt=1,yNt=39169,wNt=10,CNt=1,bNt=21589,xNt=28789,MNt=25461,ENt=6534,Ohe=1,BNt=6,Uhe=8,Nhe=2048,Vhe=16,Hhe=16384,zhe=73,jhe="/",Ls=void 0,dd="undefined",u5="function";class Ghe{constructor(e){return class extends TransformStream{constructor(t,n){const o=new e(n);super({transform(r,s){s.enqueue(o.append(r))},flush(r){const s=o.flush();s&&r.enqueue(s)}})}}}}const INt=64;let qhe=2;try{typeof navigator!=dd&&navigator.hardwareConcurrency&&(qhe=navigator.hardwareConcurrency)}catch{}const SNt={chunkSize:512*1024,maxWorkers:qhe,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Ls,CompressionStreamNative:typeof CompressionStream!=dd&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=dd&&DecompressionStream},hd=Object.assign({},SNt);function PNt(){return hd}function TNt(i){return Math.max(i.chunkSize,INt)}function X_(i){const{baseURL:e,chunkSize:t,maxWorkers:n,terminateWorkerTimeout:o,useCompressionStream:r,useWebWorkers:s,Deflate:a,Inflate:l,CompressionStream:c,DecompressionStream:u,workerScripts:d}=i;if(pd("baseURL",e),pd("chunkSize",t),pd("maxWorkers",n),pd("terminateWorkerTimeout",o),pd("useCompressionStream",r),pd("useWebWorkers",s),a&&(hd.CompressionStream=new Ghe(a)),l&&(hd.DecompressionStream=new Ghe(l)),pd("CompressionStream",c),pd("DecompressionStream",u),d!==Ls){const{deflate:h,inflate:f}=d;if((h||f)&&(hd.workerScripts||(hd.workerScripts={})),h){if(!Array.isArray(h))throw new Error("workerScripts.deflate must be an array");hd.workerScripts.deflate=h}if(f){if(!Array.isArray(f))throw new Error("workerScripts.inflate must be an array");hd.workerScripts.inflate=f}}}function pd(i,e){e!==Ls&&(hd[i]=e)}const Y_={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}};(()=>{const i={};for(const e of Object.keys(Y_))for(const t of Object.keys(Y_[e])){const n=Y_[e][t];if(typeof n=="string")i[n]=e+"/"+t;else for(let o=0;o<n.length;o++)i[n[o]]=e+"/"+t}return i})();const Qhe=[];for(let i=0;i<256;i++){let e=i;for(let t=0;t<8;t++)e&1?e=e>>>1^3988292384:e=e>>>1;Qhe[i]=e}class Dw{constructor(e){this.crc=e||-1}append(e){let t=this.crc|0;for(let n=0,o=e.length|0;n<o;n++)t=t>>>8^Qhe[(t^e[n])&255];this.crc=t}get(){return~this.crc}}class Khe extends TransformStream{constructor(){let e;const t=new Dw;super({transform(n,o){t.append(n),o.enqueue(n)},flush(){const n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function kNt(i){if(typeof TextEncoder==dd){i=unescape(encodeURIComponent(i));const e=new Uint8Array(i.length);for(let t=0;t<e.length;t++)e[t]=i.charCodeAt(t);return e}else return new TextEncoder().encode(i)}const Fs={concat(i,e){if(i.length===0||e.length===0)return i.concat(e);const t=i[i.length-1],n=Fs.getPartial(t);return n===32?i.concat(e):Fs._shiftRight(e,n,t|0,i.slice(0,i.length-1))},bitLength(i){const e=i.length;if(e===0)return 0;const t=i[e-1];return(e-1)*32+Fs.getPartial(t)},clamp(i,e){if(i.length*32<e)return i;i=i.slice(0,Math.ceil(e/32));const t=i.length;return e=e&31,t>0&&e&&(i[t-1]=Fs.partial(e,i[t-1]&2147483648>>e-1,1)),i},partial(i,e,t){return i===32?e:(t?e|0:e<<32-i)+i*1099511627776},getPartial(i){return Math.round(i/1099511627776)||32},_shiftRight(i,e,t,n){for(n===void 0&&(n=[]);e>=32;e-=32)n.push(t),t=0;if(e===0)return n.concat(i);for(let s=0;s<i.length;s++)n.push(t|i[s]>>>e),t=i[s]<<32-e;const o=i.length?i[i.length-1]:0,r=Fs.getPartial(o);return n.push(Fs.partial(e+r&31,e+r>32?t:n.pop(),1)),n}},_w={bytes:{fromBits(i){const t=Fs.bitLength(i)/8,n=new Uint8Array(t);let o;for(let r=0;r<t;r++)r&3||(o=i[r/4]),n[r]=o>>>24,o<<=8;return n},toBits(i){const e=[];let t,n=0;for(t=0;t<i.length;t++)n=n<<8|i[t],(t&3)===3&&(e.push(n),n=0);return t&3&&e.push(Fs.partial(8*(t&3),n)),e}}},Jhe={};Jhe.sha1=class{constructor(i){const e=this;e.blockSize=512,e._init=[1732584193,4023233417,2562383102,271733878,3285377520],e._key=[1518500249,1859775393,2400959708,3395469782],i?(e._h=i._h.slice(0),e._buffer=i._buffer.slice(0),e._length=i._length):e.reset()}reset(){const i=this;return i._h=i._init.slice(0),i._buffer=[],i._length=0,i}update(i){const e=this;typeof i=="string"&&(i=_w.utf8String.toBits(i));const t=e._buffer=Fs.concat(e._buffer,i),n=e._length,o=e._length=n+Fs.bitLength(i);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const r=new Uint32Array(t);let s=0;for(let a=e.blockSize+n-(e.blockSize+n&e.blockSize-1);a<=o;a+=e.blockSize)e._block(r.subarray(16*s,16*(s+1))),s+=1;return t.splice(0,16*s),e}finalize(){const i=this;let e=i._buffer;const t=i._h;e=Fs.concat(e,[Fs.partial(1,1)]);for(let n=e.length+2;n&15;n++)e.push(0);for(e.push(Math.floor(i._length/4294967296)),e.push(i._length|0);e.length;)i._block(e.splice(0,16));return i.reset(),t}_f(i,e,t,n){if(i<=19)return e&t|~e&n;if(i<=39)return e^t^n;if(i<=59)return e&t|e&n|t&n;if(i<=79)return e^t^n}_S(i,e){return e<<i|e>>>32-i}_block(i){const e=this,t=e._h,n=Array(80);for(let c=0;c<16;c++)n[c]=i[c];let o=t[0],r=t[1],s=t[2],a=t[3],l=t[4];for(let c=0;c<=79;c++){c>=16&&(n[c]=e._S(1,n[c-3]^n[c-8]^n[c-14]^n[c-16]));const u=e._S(5,o)+e._f(c,r,s,a)+l+n[c]+e._key[Math.floor(c/20)]|0;l=a,a=s,s=e._S(30,r),r=o,o=u}t[0]=t[0]+o|0,t[1]=t[1]+r|0,t[2]=t[2]+s|0,t[3]=t[3]+a|0,t[4]=t[4]+l|0}};const Whe={};Whe.aes=class{constructor(i){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const t=e._tables[0][4],n=e._tables[1],o=i.length;let r,s,a,l=1;if(o!==4&&o!==6&&o!==8)throw new Error("invalid aes key size");for(e._key=[s=i.slice(0),a=[]],r=o;r<4*o+28;r++){let c=s[r-1];(r%o===0||o===8&&r%o===4)&&(c=t[c>>>24]<<24^t[c>>16&255]<<16^t[c>>8&255]<<8^t[c&255],r%o===0&&(c=c<<8^c>>>24^l<<24,l=l<<1^(l>>7)*283)),s[r]=s[r-o]^c}for(let c=0;r;c++,r--){const u=s[c&3?r:r-4];r<=4||c<4?a[c]=u:a[c]=n[0][t[u>>>24]]^n[1][t[u>>16&255]]^n[2][t[u>>8&255]]^n[3][t[u&255]]}}encrypt(i){return this._crypt(i,0)}decrypt(i){return this._crypt(i,1)}_precompute(){const i=this._tables[0],e=this._tables[1],t=i[4],n=e[4],o=[],r=[];let s,a,l,c;for(let u=0;u<256;u++)r[(o[u]=u<<1^(u>>7)*283)^u]=u;for(let u=s=0;!t[u];u^=a||1,s=r[s]||1){let d=s^s<<1^s<<2^s<<3^s<<4;d=d>>8^d&255^99,t[u]=d,n[d]=u,c=o[l=o[a=o[u]]];let h=c*16843009^l*65537^a*257^u*16843008,f=o[d]*257^d*16843008;for(let A=0;A<4;A++)i[A][u]=f=f<<24^f>>>8,e[A][d]=h=h<<24^h>>>8}for(let u=0;u<5;u++)i[u]=i[u].slice(0),e[u]=e[u].slice(0)}_crypt(i,e){if(i.length!==4)throw new Error("invalid aes block size");const t=this._key[e],n=t.length/4-2,o=[0,0,0,0],r=this._tables[e],s=r[0],a=r[1],l=r[2],c=r[3],u=r[4];let d=i[0]^t[0],h=i[e?3:1]^t[1],f=i[2]^t[2],A=i[e?1:3]^t[3],p=4,g,m,w;for(let y=0;y<n;y++)g=s[d>>>24]^a[h>>16&255]^l[f>>8&255]^c[A&255]^t[p],m=s[h>>>24]^a[f>>16&255]^l[A>>8&255]^c[d&255]^t[p+1],w=s[f>>>24]^a[A>>16&255]^l[d>>8&255]^c[h&255]^t[p+2],A=s[A>>>24]^a[d>>16&255]^l[h>>8&255]^c[f&255]^t[p+3],p+=4,d=g,h=m,f=w;for(let y=0;y<4;y++)o[e?3&-y:y]=u[d>>>24]<<24^u[h>>16&255]<<16^u[f>>8&255]<<8^u[A&255]^t[p++],g=d,d=h,h=f,f=A,A=g;return o}};const RNt={getRandomValues(i){const e=new Uint32Array(i.buffer),t=n=>{let o=987654321;const r=4294967295;return function(){return o=36969*(o&65535)+(o>>16)&r,n=18e3*(n&65535)+(n>>16)&r,(((o<<16)+n&r)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let n=0,o;n<i.length;n+=4){const r=t((o||Math.random())*4294967296);o=r()*987654071,e[n/4]=r()*4294967296|0}return i}},Zhe={};Zhe.ctrGladman=class{constructor(i,e){this._prf=i,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(i){return this.calculate(this._prf,i,this._iv)}incWord(i){if((i>>24&255)===255){let e=i>>16&255,t=i>>8&255,n=i&255;e===255?(e=0,t===255?(t=0,n===255?n=0:++n):++t):++e,i=0,i+=e<<16,i+=t<<8,i+=n}else i+=1<<24;return i}incCounter(i){(i[0]=this.incWord(i[0]))===0&&(i[1]=this.incWord(i[1]))}calculate(i,e,t){let n;if(!(n=e.length))return[];const o=Fs.bitLength(e);for(let r=0;r<n;r+=4){this.incCounter(t);const s=i.encrypt(t);e[r]^=s[0],e[r+1]^=s[1],e[r+2]^=s[2],e[r+3]^=s[3]}return Fs.clamp(e,o)}};const Jh={importKey(i){return new Jh.hmacSha1(_w.bytes.toBits(i))},pbkdf2(i,e,t,n){if(t=t||1e4,n<0||t<0)throw new Error("invalid params to pbkdf2");const o=(n>>5)+1<<2;let r,s,a,l,c;const u=new ArrayBuffer(o),d=new DataView(u);let h=0;const f=Fs;for(e=_w.bytes.toBits(e),c=1;h<(o||1);c++){for(r=s=i.encrypt(f.concat(e,[c])),a=1;a<t;a++)for(s=i.encrypt(s),l=0;l<s.length;l++)r[l]^=s[l];for(a=0;h<(o||1)&&a<r.length;a++)d.setInt32(h,r[a]),h+=4}return u.slice(0,n/8)}};Jh.hmacSha1=class{constructor(i){const e=this,t=e._hash=Jhe.sha1,n=[[],[]];e._baseHash=[new t,new t];const o=e._baseHash[0].blockSize/32;i.length>o&&(i=new t().update(i).finalize());for(let r=0;r<o;r++)n[0][r]=i[r]^909522486,n[1][r]=i[r]^1549556828;e._baseHash[0].update(n[0]),e._baseHash[1].update(n[1]),e._resultHash=new t(e._baseHash[0])}reset(){const i=this;i._resultHash=new i._hash(i._baseHash[0]),i._updated=!1}update(i){const e=this;e._updated=!0,e._resultHash.update(i)}digest(){const i=this,e=i._resultHash.finalize(),t=new i._hash(i._baseHash[1]).update(e).finalize();return i.reset(),t}encrypt(i){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(i),this.digest(i)}};const DNt=typeof crypto!=dd&&typeof crypto.getRandomValues==u5,Xhe="Invalid password",Yhe="Invalid signature",$_="zipjs-abort-check-password";function $he(i){return DNt?crypto.getRandomValues(i):RNt.getRandomValues(i)}const Im=16,_Nt="raw",epe={name:"PBKDF2"},LNt={name:"HMAC"},FNt="SHA-1",ONt=Object.assign({hash:LNt},epe),eL=Object.assign({iterations:1e3,hash:{name:FNt}},epe),UNt=["deriveBits"],d5=[8,12,16],h5=[16,24,32],fd=10,NNt=[0,0,0,0],Lw=typeof crypto!=dd,p5=Lw&&crypto.subtle,tpe=Lw&&typeof p5!=dd,Il=_w.bytes,VNt=Whe.aes,HNt=Zhe.ctrGladman,zNt=Jh.hmacSha1;let ipe=Lw&&tpe&&typeof p5.importKey==u5,npe=Lw&&tpe&&typeof p5.deriveBits==u5;class jNt extends TransformStream{constructor({password:e,rawPassword:t,signed:n,encryptionStrength:o,checkPasswordOnly:r}){super({start(){Object.assign(this,{ready:new Promise(s=>this.resolveReady=s),password:rpe(e,t),signed:n,strength:o-1,pending:new Uint8Array})},async transform(s,a){const l=this,{password:c,strength:u,resolveReady:d,ready:h}=l;c?(await qNt(l,u,c,sa(s,0,d5[u]+2)),s=sa(s,d5[u]+2),r?a.error(new Error($_)):d()):await h;const f=new Uint8Array(s.length-fd-(s.length-fd)%Im);a.enqueue(ope(l,s,f,0,fd,!0))},async flush(s){const{signed:a,ctr:l,hmac:c,pending:u,ready:d}=this;if(c&&l){await d;const h=sa(u,0,u.length-fd),f=sa(u,u.length-fd);let A=new Uint8Array;if(h.length){const p=A5(Il,h);c.update(p);const g=l.update(p);A=f5(Il,g)}if(a){const p=sa(f5(Il,c.digest()),0,fd);for(let g=0;g<fd;g++)if(p[g]!=f[g])throw new Error(Yhe)}s.enqueue(A)}}})}}class GNt extends TransformStream{constructor({password:e,rawPassword:t,encryptionStrength:n}){let o;super({start(){Object.assign(this,{ready:new Promise(r=>this.resolveReady=r),password:rpe(e,t),strength:n-1,pending:new Uint8Array})},async transform(r,s){const a=this,{password:l,strength:c,resolveReady:u,ready:d}=a;let h=new Uint8Array;l?(h=await QNt(a,c,l),u()):await d;const f=new Uint8Array(h.length+r.length-r.length%Im);f.set(h,0),s.enqueue(ope(a,r,f,h.length,0))},async flush(r){const{ctr:s,hmac:a,pending:l,ready:c}=this;if(a&&s){await c;let u=new Uint8Array;if(l.length){const d=s.update(A5(Il,l));a.update(d),u=f5(Il,d)}o.signature=f5(Il,a.digest()).slice(0,fd),r.enqueue(tL(u,o.signature))}}}),o=this}}function ope(i,e,t,n,o,r){const{ctr:s,hmac:a,pending:l}=i,c=e.length-o;l.length&&(e=tL(l,e),t=WNt(t,c-c%Im));let u;for(u=0;u<=c-Im;u+=Im){const d=A5(Il,sa(e,u,u+Im));r&&a.update(d);const h=s.update(d);r||a.update(h),t.set(f5(Il,h),u+n)}return i.pending=sa(e,u),t}async function qNt(i,e,t,n){const o=await spe(i,e,t,sa(n,0,d5[e])),r=sa(n,d5[e]);if(o[0]!=r[0]||o[1]!=r[1])throw new Error(Xhe)}async function QNt(i,e,t){const n=$he(new Uint8Array(d5[e])),o=await spe(i,e,t,n);return tL(n,o)}async function spe(i,e,t,n){i.password=null;const o=await KNt(_Nt,t,ONt,!1,UNt),r=await JNt(Object.assign({salt:n},eL),o,8*(h5[e]*2+2)),s=new Uint8Array(r),a=A5(Il,sa(s,0,h5[e])),l=A5(Il,sa(s,h5[e],h5[e]*2)),c=sa(s,h5[e]*2);return Object.assign(i,{keys:{key:a,authentication:l,passwordVerification:c},ctr:new HNt(new VNt(a),Array.from(NNt)),hmac:new zNt(l)}),c}async function KNt(i,e,t,n,o){if(ipe)try{return await p5.importKey(i,e,t,n,o)}catch{return ipe=!1,Jh.importKey(e)}else return Jh.importKey(e)}async function JNt(i,e,t){if(npe)try{return await p5.deriveBits(i,e,t)}catch{return npe=!1,Jh.pbkdf2(e,i.salt,eL.iterations,t)}else return Jh.pbkdf2(e,i.salt,eL.iterations,t)}function rpe(i,e){return e===Ls?kNt(i):e}function tL(i,e){let t=i;return i.length+e.length&&(t=new Uint8Array(i.length+e.length),t.set(i,0),t.set(e,i.length)),t}function WNt(i,e){if(e&&e>i.length){const t=i;i=new Uint8Array(e),i.set(t,0)}return i}function sa(i,e,t){return i.subarray(e,t)}function f5(i,e){return i.fromBits(e)}function A5(i,e){return i.toBits(e)}const Sm=12;class ZNt extends TransformStream{constructor({password:e,passwordVerification:t,checkPasswordOnly:n}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),cpe(this,e)},transform(o,r){const s=this;if(s.password){const a=ape(s,o.subarray(0,Sm));if(s.password=null,a[Sm-1]!=s.passwordVerification)throw new Error(Xhe);o=o.subarray(Sm)}n?r.error(new Error($_)):r.enqueue(ape(s,o))}})}}class XNt extends TransformStream{constructor({password:e,passwordVerification:t}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),cpe(this,e)},transform(n,o){const r=this;let s,a;if(r.password){r.password=null;const l=$he(new Uint8Array(Sm));l[Sm-1]=r.passwordVerification,s=new Uint8Array(n.length+l.length),s.set(lpe(r,l),0),a=Sm}else s=new Uint8Array(n.length),a=0;s.set(lpe(r,n),a),o.enqueue(s)}})}}function ape(i,e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=upe(i)^e[n],iL(i,t[n]);return t}function lpe(i,e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=upe(i)^e[n],iL(i,e[n]);return t}function cpe(i,e){const t=[305419896,591751049,878082192];Object.assign(i,{keys:t,crcKey0:new Dw(t[0]),crcKey2:new Dw(t[2])});for(let n=0;n<e.length;n++)iL(i,e.charCodeAt(n))}function iL(i,e){let[t,n,o]=i.keys;i.crcKey0.append([e]),t=~i.crcKey0.get(),n=hpe(Math.imul(hpe(n+dpe(t)),134775813)+1),i.crcKey2.append([n>>>24]),o=~i.crcKey2.get(),i.keys=[t,n,o]}function upe(i){const e=i.keys[2]|2;return dpe(Math.imul(e,e^1)>>>8)}function dpe(i){return i&255}function hpe(i){return i&4294967295}const ppe="deflate-raw";class YNt extends TransformStream{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:o}){super({});const{compressed:r,encrypted:s,useCompressionStream:a,zipCrypto:l,signed:c,level:u}=e,d=this;let h,f,A=fpe(super.readable);(!s||l)&&c&&(h=new Khe,A=Sl(A,h)),r&&(A=mpe(A,a,{level:u,chunkSize:t},o,n)),s&&(l?A=Sl(A,new XNt(e)):(f=new GNt(e),A=Sl(A,f))),Ape(d,A,()=>{let p;s&&!l&&(p=f.signature),(!s||l)&&c&&(p=new DataView(h.value.buffer).getUint32(0)),d.signature=p})}}class $Nt extends TransformStream{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:o}){super({});const{zipCrypto:r,encrypted:s,signed:a,signature:l,compressed:c,useCompressionStream:u}=e;let d,h,f=fpe(super.readable);s&&(r?f=Sl(f,new ZNt(e)):(h=new jNt(e),f=Sl(f,h))),c&&(f=mpe(f,u,{chunkSize:t},o,n)),(!s||r)&&a&&(d=new Khe,f=Sl(f,d)),Ape(this,f,()=>{if((!s||r)&&a){const A=new DataView(d.value.buffer);if(l!=A.getUint32(0,!1))throw new Error(Yhe)}})}}function fpe(i){return Sl(i,new TransformStream({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Ape(i,e,t){e=Sl(e,new TransformStream({flush:t})),Object.defineProperty(i,"readable",{get(){return e}})}function mpe(i,e,t,n,o){try{const r=e&&n?n:o;i=Sl(i,new r(ppe,t))}catch{if(e)try{i=Sl(i,new o(ppe,t))}catch{return i}else return i}return i}function Sl(i,e){return i.pipeThrough(e)}const eVt="message",tVt="start",iVt="pull",gpe="data",nVt="ack",vpe="close",oVt="deflate",ype="inflate";class sVt extends TransformStream{constructor(e,t){super({});const n=this,{codecType:o}=e;let r;o.startsWith(oVt)?r=YNt:o.startsWith(ype)&&(r=$Nt);let s=0,a=0;const l=new r(e,t),c=super.readable,u=new TransformStream({transform(h,f){h&&h.length&&(a+=h.length,f.enqueue(h))},flush(){Object.assign(n,{inputSize:a})}}),d=new TransformStream({transform(h,f){h&&h.length&&(s+=h.length,f.enqueue(h))},flush(){const{signature:h}=l;Object.assign(n,{signature:h,outputSize:s,inputSize:a})}});Object.defineProperty(n,"readable",{get(){return c.pipeThrough(u).pipeThrough(l).pipeThrough(d)}})}}class rVt extends TransformStream{constructor(e){let t;super({transform:n,flush(o){t&&t.length&&o.enqueue(t)}});function n(o,r){if(t){const s=new Uint8Array(t.length+o.length);s.set(t),s.set(o,t.length),o=s,t=null}o.length>e?(r.enqueue(o.slice(0,e)),n(o.slice(e),r)):t=o}}}let wpe=typeof Worker!=dd;class nL{constructor(e,{readable:t,writable:n},{options:o,config:r,streamOptions:s,useWebWorkers:a,transferStreams:l,scripts:c},u){const{signal:d}=s;return Object.assign(e,{busy:!0,readable:t.pipeThrough(new rVt(r.chunkSize)).pipeThrough(new aVt(t,s),{signal:d}),writable:n,options:Object.assign({},o),scripts:c,transferStreams:l,terminate(){return new Promise(h=>{const{worker:f,busy:A}=e;f?(A?e.resolveTerminated=h:(f.terminate(),h()),e.interface=null):h()})},onTaskFinished(){const{resolveTerminated:h}=e;h&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),h()),e.busy=!1,u(e)}}),(a&&wpe?lVt:Cpe)(e,r)}}class aVt extends TransformStream{constructor(e,{onstart:t,onprogress:n,size:o,onend:r}){let s=0;super({async start(){t&&await oL(t,o)},async transform(a,l){s+=a.length,n&&await oL(n,s,o),l.enqueue(a)},async flush(){e.size=s,r&&await oL(r,s)}})}}async function oL(i,...e){try{await i(...e)}catch{}}function Cpe(i,e){return{run:()=>cVt(i,e)}}function lVt(i,e){const{baseURL:t,chunkSize:n}=e;if(!i.interface){let o;try{o=hVt(i.scripts[0],t,i)}catch{return wpe=!1,Cpe(i,e)}Object.assign(i,{worker:o,interface:{run:()=>uVt(i,{chunkSize:n})}})}return i.interface}async function cVt({options:i,readable:e,writable:t,onTaskFinished:n},o){try{const r=new sVt(i,o);await e.pipeThrough(r).pipeTo(t,{preventClose:!0,preventAbort:!0});const{signature:s,inputSize:a,outputSize:l}=r;return{signature:s,inputSize:a,outputSize:l}}finally{n()}}async function uVt(i,e){let t,n;const o=new Promise((h,f)=>{t=h,n=f});Object.assign(i,{reader:null,writer:null,resolveResult:t,rejectResult:n,result:o});const{readable:r,options:s,scripts:a}=i,{writable:l,closed:c}=dVt(i.writable),u=Fw({type:tVt,scripts:a.slice(1),options:s,config:e,readable:r,writable:l},i);u||Object.assign(i,{reader:r.getReader(),writer:l.getWriter()});const d=await o;return u||await l.getWriter().close(),await c,d}function dVt(i){let e;const t=new Promise(o=>e=o);return{writable:new WritableStream({async write(o){const r=i.getWriter();await r.ready,await r.write(o),r.releaseLock()},close(){e()},abort(o){return i.getWriter().abort(o)}}),closed:t}}let bpe=!0,xpe=!0;function hVt(i,e,t){const n={type:"module"};let o,r;typeof i==u5&&(i=i());try{o=new URL(i,e)}catch{o=i}if(bpe)try{r=new Worker(o)}catch{bpe=!1,r=new Worker(o,n)}else r=new Worker(o,n);return r.addEventListener(eVt,s=>pVt(s,t)),r}function Fw(i,{worker:e,writer:t,onTaskFinished:n,transferStreams:o}){try{const{value:r,readable:s,writable:a}=i,l=[];if(r&&(r.byteLength<r.buffer.byteLength?i.value=r.buffer.slice(0,r.byteLength):i.value=r.buffer,l.push(i.value)),o&&xpe?(s&&l.push(s),a&&l.push(a)):i.readable=i.writable=null,l.length)try{return e.postMessage(i,l),!0}catch{xpe=!1,i.readable=i.writable=null,e.postMessage(i)}else e.postMessage(i)}catch(r){throw t&&t.releaseLock(),n(),r}}async function pVt({data:i},e){const{type:t,value:n,messageId:o,result:r,error:s}=i,{reader:a,writer:l,resolveResult:c,rejectResult:u,onTaskFinished:d}=e;try{if(s){const{message:f,stack:A,code:p,name:g}=s,m=new Error(f);Object.assign(m,{stack:A,code:p,name:g}),h(m)}else{if(t==iVt){const{value:f,done:A}=await a.read();Fw({type:gpe,value:f,done:A,messageId:o},e)}t==gpe&&(await l.ready,await l.write(new Uint8Array(n)),Fw({type:nVt,messageId:o},e)),t==vpe&&h(null,r)}}catch(f){Fw({type:vpe,messageId:o},e),h(f)}function h(f,A){f?u(f):c(A),l&&l.releaseLock(),d()}}let Wh=[];const sL=[];let Mpe=0;async function fVt(i,e){const{options:t,config:n}=e,{transferStreams:o,useWebWorkers:r,useCompressionStream:s,codecType:a,compressed:l,signed:c,encrypted:u}=t,{workerScripts:d,maxWorkers:h}=n;e.transferStreams=o||o===Ls;const f=!l&&!c&&!u&&!e.transferStreams;return e.useWebWorkers=!f&&(r||r===Ls&&n.useWebWorkers),e.scripts=e.useWebWorkers&&d?d[a]:[],t.useCompressionStream=s||s===Ls&&n.useCompressionStream,(await A()).run();async function A(){const g=Wh.find(m=>!m.busy);if(g)return Epe(g),new nL(g,i,e,p);if(Wh.length<h){const m={indexWorker:Mpe};return Mpe++,Wh.push(m),new nL(m,i,e,p)}else return new Promise(m=>sL.push({resolve:m,stream:i,workerOptions:e}))}function p(g){if(sL.length){const[{resolve:m,stream:w,workerOptions:y}]=sL.splice(0,1);m(new nL(g,w,y,p))}else g.worker?(Epe(g),AVt(g,e)):Wh=Wh.filter(m=>m!=g)}}function AVt(i,e){const{config:t}=e,{terminateWorkerTimeout:n}=t;Number.isFinite(n)&&n>=0&&(i.terminated?i.terminated=!1:i.terminateTimeout=setTimeout(async()=>{Wh=Wh.filter(o=>o!=i);try{await i.terminate()}catch{}},n))}function Epe(i){const{terminateTimeout:e}=i;e&&(clearTimeout(e),i.terminateTimeout=null)}function mVt(i,e={}){const t=`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,r.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={bytes:{p(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)3&s||(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},m(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3&~n||(t.push(r),r=0);return 3&n&&t.push(_.h(8*(3&n),r)),t}}},P=class{constructor(e){const t=this;t.blockSize=512,t.k=[1732584193,4023233417,2562383102,271733878,3285377520],t.v=[1518500249,1859775393,2400959708,3395469782],e?(t.S=e.S.slice(0),t.C=e.C.slice(0),t.A=e.A):t.reset()}reset(){const e=this;return e.S=e.k.slice(0),e.C=[],e.A=0,e}update(e){const t=this;"string"==typeof e&&(e=I._.m(e));const n=t.C=_.concat(t.C,e),r=t.A,i=t.A=r+_.l(e);if(i>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e.I(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<<e|t>>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;i<e.length;i+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[i/4]=4294967296*e()|0}return e}},V={importKey:e=>new V.R(I.bytes.m(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.bytes.m(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;a<c.length;a++)o[a]^=c[a];for(f=0;(i||1)>d&&f<o.length;f++)h.setInt32(d,o[f]),d+=4}return w.slice(0,r/8)},R:class{constructor(e){const t=this,n=t.M=P,r=[[],[]];t.U=[new n,new n];const s=t.U[0].blockSize/32;e.length>s&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.bytes,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255&~(e>>24))e+=1<<24;else{let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)})(e):t}function oe(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ce(e,t,n){return e.subarray(t,n)}function fe(e,t){return e.p(t)}function ae(e,t){return e.m(t)}class le extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;if(n.password){const t=we(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(B);e=e.subarray(12)}r?t.error(new s(M)):t.enqueue(we(n,e))}})}}class ue extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=U(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(he(n,t),0),s=12}else r=new i(e.length),s=0;r.set(he(n,e),s),t.enqueue(r)}})}}function we(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,n[r]);return n}function he(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,t[r]);return n}function de(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,ee:new x(r[0]),te:new x(r[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,s,i]=e.keys;e.ee.append([t]),n=~e.ee.get(),s=be(r.imul(be(s+me(n)),134775813)+1),e.te.append([s>>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Le(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}He.ge=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.Se=e=>256>e?je[e]:je[256+(e>>>7)],He.ze=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],He.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],He.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le._e=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Ie=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}Le.Be=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Ee=new Le(Le._e,He.ze,257,286,15),Le.Me=new Le(Le.Be,He.Ce,0,30,15),Le.Ue=new Le(null,He.xe,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++i<o&&n==s||(c>i?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<<F&65535,Q(L),L=n>>>16-F,F+=r-16):(L|=e<<F&65535,F+=r)}function Y(e,t){const n=2*e;X(65535&t[n],65535&t[n+1])}function Z(e,t){let n,r,s=-1,i=e[1],o=0,c=7,f=4;for(0===i&&(c=138,f=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ge[n]+256+1)]++,M[2*He.Se(t)]++),!(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.Ce[o]);if(s>>>=3,j<r.floor(W/2)&&s<r.floor(i/2))return!0}return W==T-1}function te(t,n){let r,s,i,o,c=0;if(0!==W)do{r=e.Ne[c],s=e.Oe[c],c++,0===r?Y(s,t):(i=He.ge[s],Y(i+256+1,t),o=He.ze[i],0!==o&&(s-=He.ke[i],X(s,o)),r--,i=He.Se(r),Y(i,n),o=He.Ce[i],0!==o&&(r-=He.ve[i],X(r,o)))}while(W>c);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*He.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le._e,Le.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<<g^255&u[C+1])&b)}while(Ze>A&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i<e.ce&&$e(t,r[i+1],r[i],e.le)&&i++,!$e(t,s,r[i],e.le));)r[n]=r[i],n=i,i<<=1;r[n]=s},e.He=(t,S,x,W,j,G)=>(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.Fe=e,a=x,f=1<<a,l=f-1,m=j+7,y=1<<m,b=y-1,g=r.floor((m+3-1)/3),u=new i(2*f),h=[],d=[],T=1<<j+6,e.Ke=new i(4*T),s=4*T,e.Ne=new o(T),e.Oe=new i(T),D=S,V=G,(t=>(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Xe,c=0,K.re=E,K.ie=Le.Ee,N.re=M,N.ie=Le.Me,O.re=U,O.ie=Le.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Xe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Re!=Je[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<<g^255&u[1])&b,s=0;i-3>=s;s++)p=(p<<g^255&u[s+2])&b,h[s&l]=d[p],d[p]=s;return 0},e.Ye=(r,i)=>{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.$e||!r.et&&0!==r.We||n==Ye&&4!=i)return r.Le=Qe[4],Oe;if(0===r.tt)return r.Le=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=Qe[7],-5;if(n==Ye&&0!==t.We)return r.Le=Qe[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C),0===r||(C-r&65535)>f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<<g^255&u[C+1])&b;else{v--;do{C++,p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C}while(0!=--v);C++}if(n&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 2:R=(e=>{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C),_=v,S=x,v=2,0!==s&&P>_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C)}while(0!=--_);if(z=0,v=2,C++,n&&(se(!1),0===t.tt))return 0}}return 0!==z&&(n=ee(0,255&u[C-1]),z=0),se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i)}if(2!=R&&3!=R||(n=Ye),0==R||2==R)return 0===t.tt&&(c=-1),0;if(1==R){if(1==i)X(2,3),Y(256,Le._e),$(),9>1+H+10-F&&(X(2,3),Y(256,Le._e),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={He(e,t){const n=this;return n.Fe=new et,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Oe},Qe(){const e=this;if(!e.Fe)return Oe;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Oe},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Oe},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],lt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],ut=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],wt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<<k;g>k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g<o);for(o=i[m],i[0]=g=0,C=0,b=-1,A=-S,s[0]=0,x=0,P=0;m>=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++k<P&&(y<<=1)>n[++_];)y-=n[_];if(P=1<<k,h[0]+P>1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]<c?(r[0]=256>d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<<v-A,k=g>>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<<v-1;g&k;k>>>=1)g^=k;for(g^=k,z=(1<<A)-1;(g&z)!=i[b];)b--,A-=S,z=(1<<A)-1}return 0!==I&&1!=m?it:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Le="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=st),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Le="oversubscribed distance tree":h==it?(w.Le="incomplete distance tree",h=st):-4!=h&&(w.Le="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=ot[e],g=ot[t];do{for(;20>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(f=w&b,a=n,l=r,z=3*(l+f),0!==(u=a[z]))for(;;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;for(f=w&g,a=s,l=i,z=3*(l+f),u=a[z];;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(v=a[z+2]+(w&ot[u]),w>>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(64&u)return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(64&u)return 32&u?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case 0:if(z>=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S,0!=m)){t=1==m?7:9;break}c=u,n=r,o=h,t=1;case 1:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<<A,A+=8}if(g=3*(o+(x&ot[b])),x>>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(16&k){a=15&k,i=n[g+2],t=2;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}if(32&k){t=7;break}return t=9,y.Le="invalid literal/length code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<<A,A+=8}i+=x&ot[b],x>>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<<A,A+=8}if(g=3*(o+(x&ot[b])),x>>=n[g+1],A-=n[g+1],k=n[g],16&k){a=15&k,l=n[g+2],t=4;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<<A,A+=8}l+=x&ot[b],x>>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);e.lt[S++]=e.lt[C++],z--,C==e.end&&(C=0),i--}t=0;break;case 6:if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,e.lt[S++]=f,z--,t=0;break;case 7:if(A>7&&(A-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);t=8;case 8:return m=1,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 9:return m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);default:return m=rt,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m)}},e.ht=()=>{}}ht.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g;;){let S,z,C,x,A,_,I,P;switch(s){case 0:for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k&&(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k)))return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(t=0,i=o,i>b&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(v=0;i>v;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}r[pt[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&ot[i]))+1],w=d[3*(u[0]+(f&ot[i]))+2],16>w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=0;break}s=7;case 7:if(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);s=8;case 8:return t=1,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);case 9:return t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);default:return t=rt,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}}},n.ht=e=>{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):rt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),rt):(e.zt=r,n.gt.kt=new yt(n,1<<r),t(n),0)),e.At=(e,t)=>{let n,r;if(!e||!e.gt||!e.et)return rt;const s=e.gt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=mt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=mt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Le="incorrect header check",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=mt,e.Le="need dictionary",s.marker=0,rt;case 7:if(n=s.kt.ut(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case mt:return st;default:return rt}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return rt;const i=e.gt;return s<1<<i.zt||(s=(1<<i.zt)-1,r=n-s),i.kt.yt(t,r,s),i.mode=7,0},e.It=e=>{let n,r,s,i,o;if(!e||!e.gt)return rt;const c=e.gt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.We))return it;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==bt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?st:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===it){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}kt.prototype={xt(e){const t=this;return t.gt=new gt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):rt},Ct(){const e=this;if(!e.gt)return rt;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):rt},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):rt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};
5490
- `,n=()=>e.useDataURI?"data:text/javascript,"+encodeURIComponent(t):URL.createObjectURL(new Blob([t],{type:"text/javascript"}));i({workerScripts:{inflate:[n],deflate:[n]}})}const gVt="Writer iterator completed too soon",vVt="Content-Type",yVt=64*1024,Bpe="writable";class rL{constructor(){this.size=0}init(){this.initialized=!0}}class Ipe extends rL{get readable(){const e=this,{chunkSize:t=yVt}=e,n=new ReadableStream({start(){this.chunkOffset=0},async pull(o){const{offset:r=0,size:s,diskNumberStart:a}=n,{chunkOffset:l}=this;o.enqueue(await ds(e,r+l,Math.min(t,s-l),a)),l+t>s?o.close():this.chunkOffset+=t}});return n}}class Spe extends Ipe{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,o=e+t;let s=await(e||o<n.size?n.blob.slice(e,o):n.blob).arrayBuffer();return s.byteLength>t&&(s=s.slice(e,o)),new Uint8Array(s)}}class Ppe extends rL{constructor(e){super();const t=this,n=new TransformStream,o=[];e&&o.push([vVt,e]),Object.defineProperty(t,Bpe,{get(){return n.writable}}),t.blob=new Response(n.readable,{headers:o}).blob()}getData(){return this.blob}}class wVt extends Ppe{constructor(e){super(e),Object.assign(this,{encoding:e,utf8:!e||e.toLowerCase()=="utf-8"})}async getData(){const{encoding:e,utf8:t}=this,n=await super.getData();if(n.text&&t)return n.text();{const o=new FileReader;return new Promise((r,s)=>{Object.assign(o,{onload:({target:a})=>r(a.result),onerror:()=>s(o.error)}),o.readAsText(n,e)})}}}class CVt extends Ipe{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await Promise.all(t.map(async(n,o)=>{await n.init(),o!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size})),super.init()}async readUint8Array(e,t,n=0){const o=this,{readers:r}=this;let s,a=n;a==-1&&(a=r.length-1);let l=e;for(;l>=r[a].size;)l-=r[a].size,a++;const c=r[a],u=c.size;if(l+t<=u)s=await ds(c,l,t);else{const d=u-l;s=new Uint8Array(t),s.set(await ds(c,l,d)),s.set(await o.readUint8Array(e+d,t-d,n),d)}return o.lastDiskNumber=Math.max(a,o.lastDiskNumber),s}}class Tpe extends rL{constructor(e,t=4294967295){super();const n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let o,r,s;const a=new WritableStream({async write(u){const{availableSize:d}=n;if(s)u.length>=d?(await l(u.slice(0,d)),await c(),n.diskOffset+=o.size,n.diskNumber++,s=null,await this.write(u.slice(d))):await l(u);else{const{value:h,done:f}=await e.next();if(f&&!h)throw new Error(gVt);o=h,o.size=0,o.maxSize&&(n.maxSize=o.maxSize),n.availableSize=n.maxSize,await Ow(o),r=h.writable,s=r.getWriter(),await this.write(u)}},async close(){await s.ready,await c()}});Object.defineProperty(n,Bpe,{get(){return a}});async function l(u){const d=u.length;d&&(await s.ready,await s.write(u),o.size+=d,n.size+=d,n.availableSize-=d)}async function c(){r.size=o.size,await s.close()}}}async function Ow(i,e){if(i.init&&!i.initialized)await i.init(e);else return Promise.resolve()}function bVt(i){return Array.isArray(i)&&(i=new CVt(i)),i instanceof ReadableStream&&(i={readable:i}),i}function xVt(i){i.writable===Ls&&typeof i.next==u5&&(i=new Tpe(i)),i instanceof WritableStream&&(i={writable:i});const{writable:e}=i;return e.size===Ls&&(e.size=0),i instanceof Tpe||Object.assign(i,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),i}function ds(i,e,t,n){return i.readUint8Array(e,t,n)}const kpe="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),MVt=kpe.length==256;function EVt(i){if(MVt){let e="";for(let t=0;t<i.length;t++)e+=kpe[i[t]];return e}else return new TextDecoder().decode(i)}function Uw(i,e){return e&&e.trim().toLowerCase()=="cp437"?EVt(i):new TextDecoder(e).decode(i)}const Rpe="filename",Dpe="rawFilename",_pe="comment",Lpe="rawComment",Fpe="uncompressedSize",Ope="compressedSize",Upe="offset",aL="diskNumberStart",lL="lastModDate",cL="rawLastModDate",Npe="lastAccessDate",BVt="rawLastAccessDate",Vpe="creationDate",IVt="rawCreationDate",SVt=[Rpe,Dpe,Ope,Fpe,lL,cL,_pe,Lpe,Npe,Vpe,Upe,aL,aL,"internalFileAttribute","internalFileAttributes","externalFileAttribute","externalFileAttributes","msDosCompatible","zip64","encrypted","version","versionMadeBy","zipCrypto","directory","executable","bitFlag","signature","filenameUTF8","commentUTF8","compressionMethod","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Hpe{constructor(e){SVt.forEach(t=>this[t]=e[t])}}const uL="File format is not recognized",PVt="End of central directory not found",TVt="End of Zip64 central directory locator not found",kVt="Central directory header not found",RVt="Local file header not found",DVt="Zip64 extra field not found",_Vt="File contains encrypted entry",LVt="Encryption method not supported",zpe="Compression method not supported",jpe="Split zip file",Gpe="utf-8",qpe="cp437",FVt=[[Fpe,Kh],[Ope,Kh],[Upe,Kh],[aL,ud]],OVt={[ud]:{getValue:no,bytes:4},[Kh]:{getValue:Nw,bytes:8}};class UVt{constructor(e,t={}){Object.assign(this,{reader:bVt(e),options:t,config:PNt()})}async*getEntriesGenerator(e={}){const t=this;let{reader:n}=t;const{config:o}=t;if(await Ow(n),(n.size===Ls||!n.readUint8Array)&&(n=new Spe(await new Response(n.readable).blob()),await Ow(n)),n.size<Bm)throw new Error(uL);n.chunkSize=TNt(o);const r=await GVt(n,mNt,n.size,Bm,ud*16);if(!r){const T=await ds(n,0,4),P=Fo(T);throw no(P)==ANt?new Error(jpe):new Error(PVt)}const s=Fo(r);let a=no(s,12),l=no(s,16);const c=r.offset,u=Lo(s,20),d=c+Bm+u;let h=Lo(s,4);const f=n.lastDiskNumber||0;let A=Lo(s,6),p=Lo(s,8),g=0,m=0;if(l==Kh||a==Kh||p==ud||A==ud){const T=await ds(n,r.offset-W_,W_),P=Fo(T);if(no(P,0)==gNt){l=Nw(P,8);let R=await ds(n,l,Z_,-1),L=Fo(R);const U=r.offset-W_-Z_;if(no(L,0)!=Fhe&&l!=U){const H=l;l=U,g=l-H,R=await ds(n,l,Z_,-1),L=Fo(R)}if(no(L,0)!=Fhe)throw new Error(TVt);h==ud&&(h=no(L,16)),A==ud&&(A=no(L,20)),p==ud&&(p=Nw(L,32)),a==Kh&&(a=Nw(L,40)),l-=a}}if(l>=n.size&&(g=n.size-l-a-Bm,l=n.size-a-Bm),f!=h)throw new Error(jpe);if(l<0)throw new Error(uL);let w=0,y=await ds(n,l,a,A),v=Fo(y);if(a){const T=r.offset-a;if(no(v,w)!=Lhe&&l!=T){const P=l;l=T,g+=l-P,y=await ds(n,l,a,A),v=Fo(y)}}const x=r.offset-l-(n.lastDiskOffset||0);if(a!=x&&x>=0&&(a=x,y=await ds(n,l,a,A),v=Fo(y)),l<0||l>=n.size)throw new Error(uL);const M=Os(t,e,"filenameEncoding"),E=Os(t,e,"commentEncoding");for(let T=0;T<p;T++){const P=new NVt(n,o,t.options);if(no(v,w)!=Lhe)throw new Error(kVt);Qpe(P,v,w+6);const R=!!P.bitFlag.languageEncodingFlag,L=w+46,U=L+P.filenameLength,H=U+P.extraFieldLength,N=Lo(v,w+4),q=N>>8==0,J=N>>8==3,te=y.subarray(L,U),le=Lo(v,w+32),Pe=H+le,ye=y.subarray(H,Pe),Ne=R,Ce=R,ke=no(v,w+38),Oe=q&&(Pm(v,w+38)&Vhe)==Vhe||J&&(ke>>16&Hhe)==Hhe||te.length&&te[te.length-1]==jhe.charCodeAt(0),se=J&&(ke>>16&zhe)==zhe,Re=no(v,w+42)+g;Object.assign(P,{versionMadeBy:N,msDosCompatible:q,compressedSize:0,uncompressedSize:0,commentLength:le,directory:Oe,offset:Re,diskNumberStart:Lo(v,w+34),internalFileAttributes:Lo(v,w+36),externalFileAttributes:ke,rawFilename:te,filenameUTF8:Ne,commentUTF8:Ce,rawExtraField:y.subarray(U,H),executable:se}),P.internalFileAttribute=P.internalFileAttributes,P.externalFileAttribute=P.externalFileAttributes;const xe=Os(t,e,"decodeText")||Uw,Te=Ne?Gpe:M||qpe,tt=Ce?Gpe:E||qpe;let $e=xe(te,Te);$e===Ls&&($e=Uw(te,Te));let $=xe(ye,tt);$===Ls&&($=Uw(ye,tt)),Object.assign(P,{rawComment:ye,filename:$e,comment:$,directory:Oe||$e.endsWith(jhe)}),m=Math.max(Re,m),Kpe(P,P,v,w+6),P.zipCrypto=P.encrypted&&!P.extraFieldAES;const W=new Hpe(P);W.getData=(Be,ve)=>P.getData(Be,W,ve),w=Pe;const{onprogress:re}=e;if(re)try{await re(T+1,p,new Hpe(P))}catch{}yield W}const S=Os(t,e,"extractPrependedData"),I=Os(t,e,"extractAppendedData");return S&&(t.prependedData=m>0?await ds(n,0,m):new Uint8Array),t.comment=u?await ds(n,c+Bm,u):new Uint8Array,I&&(t.appendedData=d<n.size?await ds(n,d,n.size-d):new Uint8Array),!0}async getEntries(e={}){const t=[];for await(const n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}}class NVt{constructor(e,t,n){Object.assign(this,{reader:e,config:t,options:n})}async getData(e,t,n={}){const o=this,{reader:r,offset:s,diskNumberStart:a,extraFieldAES:l,compressionMethod:c,config:u,bitFlag:d,signature:h,rawLastModDate:f,uncompressedSize:A,compressedSize:p}=o,g=t.localDirectory={},m=await ds(r,s,30,a),w=Fo(m);let y=Os(o,n,"password"),v=Os(o,n,"rawPassword");const x=Os(o,n,"passThrough");if(y=y&&y.length&&y,v=v&&v.length&&v,l&&l.originalCompressionMethod!=pNt)throw new Error(zpe);if(c!=hNt&&c!=dNt&&!x)throw new Error(zpe);if(no(w,0)!=fNt)throw new Error(RVt);Qpe(g,w,4),g.rawExtraField=g.extraFieldLength?await ds(r,s+30+g.filenameLength,g.extraFieldLength,a):new Uint8Array,Kpe(o,g,w,4,!0),Object.assign(t,{lastAccessDate:g.lastAccessDate,creationDate:g.creationDate});const M=o.encrypted&&g.encrypted&&!x,E=M&&!l;if(x||(t.zipCrypto=E),M){if(!E&&l.strength===Ls)throw new Error(LVt);if(!y&&!v)throw new Error(_Vt)}const S=s+30+g.filenameLength+g.extraFieldLength,I=p,T=r.readable;Object.assign(T,{diskNumberStart:a,offset:S,size:I});const P=Os(o,n,"signal"),R=Os(o,n,"checkPasswordOnly");R&&(e=new WritableStream),e=xVt(e),await Ow(e,x?p:A);const{writable:L}=e,{onstart:U,onprogress:H,onend:N}=n,q={options:{codecType:ype,password:y,rawPassword:v,zipCrypto:E,encryptionStrength:l&&l.strength,signed:Os(o,n,"checkSignature")&&!x,passwordVerification:E&&(d.dataDescriptor?f>>>8&255:h>>>24&255),signature:h,compressed:c!=0&&!x,encrypted:o.encrypted&&!x,useWebWorkers:Os(o,n,"useWebWorkers"),useCompressionStream:Os(o,n,"useCompressionStream"),transferStreams:Os(o,n,"transferStreams"),checkPasswordOnly:R},config:u,streamOptions:{signal:P,size:I,onstart:U,onprogress:H,onend:N}};let J=0;try{({outputSize:J}=await fVt({readable:T,writable:L},q))}catch(te){if(!R||te.message!=$_)throw te}finally{const te=Os(o,n,"preventClose");L.size+=J,!te&&!L.locked&&await L.getWriter().close()}return R?Ls:e.getData?e.getData():L}}function Qpe(i,e,t){const n=i.rawBitFlag=Lo(e,t+2),o=(n&Ohe)==Ohe,r=no(e,t+6);Object.assign(i,{encrypted:o,version:Lo(e,t),bitFlag:{level:(n&BNt)>>1,dataDescriptor:(n&Uhe)==Uhe,languageEncodingFlag:(n&Nhe)==Nhe},rawLastModDate:r,lastModDate:qVt(r),filenameLength:Lo(e,t+22),extraFieldLength:Lo(e,t+24)})}function Kpe(i,e,t,n,o){const{rawExtraField:r}=e,s=e.extraField=new Map,a=Fo(new Uint8Array(r));let l=0;try{for(;l<r.length;){const m=Lo(a,l),w=Lo(a,l+2);s.set(m,{type:m,data:r.slice(l+4,l+4+w)}),l+=4+w}}catch{}const c=Lo(t,n+4);Object.assign(e,{signature:no(t,n+10),uncompressedSize:no(t,n+18),compressedSize:no(t,n+14)});const u=s.get(vNt);u&&(VVt(u,e),e.extraFieldZip64=u);const d=s.get(xNt);d&&(Jpe(d,Rpe,Dpe,e,i),e.extraFieldUnicodePath=d);const h=s.get(MNt);h&&(Jpe(h,_pe,Lpe,e,i),e.extraFieldUnicodeComment=h);const f=s.get(yNt);f?(HVt(f,e,c),e.extraFieldAES=f):e.compressionMethod=c;const A=s.get(wNt);A&&(zVt(A,e),e.extraFieldNTFS=A);const p=s.get(bNt);p&&(jVt(p,e,o),e.extraFieldExtendedTimestamp=p);const g=s.get(ENt);g&&(e.extraFieldUSDZ=g)}function VVt(i,e){e.zip64=!0;const t=Fo(i.data),n=FVt.filter(([o,r])=>e[o]==r);for(let o=0,r=0;o<n.length;o++){const[s,a]=n[o];if(e[s]==a){const l=OVt[a];e[s]=i[s]=l.getValue(t,r),r+=l.bytes}else if(i[s])throw new Error(DVt)}}function Jpe(i,e,t,n,o){const r=Fo(i.data),s=new Dw;s.append(o[t]);const a=Fo(new Uint8Array(4));a.setUint32(0,s.get(),!0);const l=no(r,1);Object.assign(i,{version:Pm(r,0),[e]:Uw(i.data.subarray(5)),valid:!o.bitFlag.languageEncodingFlag&&l==no(a,0)}),i.valid&&(n[e]=i[e],n[e+"UTF8"]=!0)}function HVt(i,e,t){const n=Fo(i.data),o=Pm(n,4);Object.assign(i,{vendorVersion:Pm(n,0),vendorId:Pm(n,2),strength:o,originalCompressionMethod:t,compressionMethod:Lo(n,5)}),e.compressionMethod=i.compressionMethod}function zVt(i,e){const t=Fo(i.data);let n=4,o;try{for(;n<i.data.length&&!o;){const r=Lo(t,n),s=Lo(t,n+2);r==CNt&&(o=i.data.slice(n+4,n+4+s)),n+=4+s}}catch{}try{if(o&&o.length==24){const r=Fo(o),s=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),l=r.getBigUint64(16,!0);Object.assign(i,{rawLastModDate:s,rawLastAccessDate:a,rawCreationDate:l});const c=dL(s),u=dL(a),d=dL(l),h={lastModDate:c,lastAccessDate:u,creationDate:d};Object.assign(i,h),Object.assign(e,h)}}catch{}}function jVt(i,e,t){const n=Fo(i.data),o=Pm(n,0),r=[],s=[];t?((o&1)==1&&(r.push(lL),s.push(cL)),(o&2)==2&&(r.push(Npe),s.push(BVt)),(o&4)==4&&(r.push(Vpe),s.push(IVt))):i.data.length>=5&&(r.push(lL),s.push(cL));let a=1;r.forEach((l,c)=>{if(i.data.length>=a+4){const u=no(n,a);e[l]=i[l]=new Date(u*1e3);const d=s[c];i[d]=u}a+=4})}async function GVt(i,e,t,n,o){const r=new Uint8Array(4),s=Fo(r);QVt(s,0,e);const a=n+o;return await l(n)||await l(Math.min(a,t));async function l(c){const u=t-c,d=await ds(i,u,c);for(let h=d.length-n;h>=0;h--)if(d[h]==r[0]&&d[h+1]==r[1]&&d[h+2]==r[2]&&d[h+3]==r[3])return{offset:u+h,buffer:d.slice(h,h+n).buffer}}}function Os(i,e,t){return e[t]===Ls?i.options[t]:e[t]}function qVt(i){const e=(i&4294901760)>>16,t=i&65535;try{return new Date(1980+((e&65024)>>9),((e&480)>>5)-1,e&31,(t&63488)>>11,(t&2016)>>5,(t&31)*2,0)}catch{}}function dL(i){return new Date(Number(i/BigInt(1e4)-BigInt(116444736e5)))}function Pm(i,e){return i.getUint8(e)}function Lo(i,e){return i.getUint16(e,!0)}function no(i,e){return i.getUint32(e,!0)}function Nw(i,e){return Number(i.getBigUint64(e,!0))}function QVt(i,e,t){i.setUint32(e,t,!0)}function Fo(i){return new DataView(i.buffer)}let Wpe;try{Wpe=typeof document>"u"&&typeof NT>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?NT.href:yd&&yd.tagName.toUpperCase()==="SCRIPT"&&yd.src||new URL("bimdata-viewer.umd.cjs",document.baseURI).href}catch{}X_({baseURL:Wpe}),mVt(X_),X_({Deflate:jUt,Inflate:uNt});function KVt(i){return{getDetailedExtensions(e){return[]},getExtensions(e){return[]},getFullTopics(e,t,n,o,r,s,a){return[]},getTopics(e,t,n,o){return[]}}}function JVt(i){return{checkProjectAccess(e,t){return{has_read_permission:!0,has_write_permission:!1,has_admin_permission:!1,token_scopes:["bcf:read","document:read","model:read"],usable_scopes:["bcf:read","document:read","model:read"],user_role:50,user:null}},getProjectDMSTree(e,t){return{}},getDocumentHistories(e,t,n){return[]},getProjectUsers(e,t){return[]}}}function WVt(i){const e=i,t=e.units.reduce((u,d)=>(d.conversion_baseunit=e.units[d.conversion_baseunit_index],delete d.conversion_baseunit_index,u[d.id]=d,u),{}),n=e.definitions.reduce((u,d)=>(d.unit=e.units[d.unit_id],delete d.unit_id,u[d.id]=d,u),{}),o=e.property_sets.reduce((u,d)=>(d.properties.forEach(h=>{h.definition=e.definitions[h.def_id],delete h.def_id}),u[d.id]=d,u),{}),r=e.classifications.reduce((u,d)=>(d.name=d.type,d.title=d.description,u[d.id]=d,u),{}),s=e.layers.reduce((u,d)=>(d.elements=[],u[d.id]=d,u),{}),a=e.systems.reduce((u,d)=>(d.elements=[],u[d.uuid]=d,u),{}),l={};l.materials_data=e.materials.materials_data.reduce((u,d)=>(d.property_sets=d.psets.map(h=>e.property_sets[h]),delete d.psets,delete d.step_id,u[d.id]=d,u),{}),l.list_components=e.materials.list_components.reduce((u,d)=>(d.material=e.materials.materials_data[d.material],d.option=e.materials.options[d.material_option],u[d.id]=d,delete d.id,u),{}),l.options=e.materials.options.reduce((u,d)=>(d.list_components=d.material_list.map(h=>e.materials.list_components[h]),u[d.id]=d,u),{});const c={};return e.elements.forEach(u=>{u.attributes=e.property_sets[u.attributes],u.property_sets=u.psets.map(d=>e.property_sets[d]),delete u.psets,u.classifications=u.classifications.map(d=>e.classifications[d]),u.systems=u.systems.map(d=>{const h=e.systems[d];return h.elements.push(u.uuid),h}),u.layers=u.layers.map(d=>{const h=e.layers[d];return h.elements.push(u.uuid),h}),u.material_list=u.material_list.map(d=>e.materials.list_components[d]),c[u.uuid]=u}),{units:t,definitions:n,property_sets:o,classifications:r,layers:s,systems:a,materials:l,elements:c}}function ZVt(i){const e={};return Object.values(i).forEach(t=>{e[t.uuid]={},e[t.uuid].attributes={},t.attributes.properties.forEach(n=>{e[t.uuid].attributes[n.definition.name]=n.value}),t.property_sets.forEach(n=>{e[t.uuid][n.name]={},n.properties.forEach(o=>{e[t.uuid][n.name][o.definition.name]=o.value})})}),e}function XVt(i){return Object.values(i).forEach(e=>{e.formattedRawElements=WVt(e.rawElements)}),{getModels(e,t,n,o,r){let s=Object.values(i).map(a=>a.model);return s=s.filter(a=>!(a.type==="PDF"&&a.parent_id)),(n==null?void 0:n.length)>0&&(s=s.filter(a=>n.includes(a.source))),(o==null?void 0:o.length)>0&&(s=s.filter(a=>o.includes(a.status))),(r==null?void 0:r.length)>0&&(s=s.filter(a=>r.includes(a.type))),s},getModel(e,t,n){return i[t].model},getTileset(e,t,n,o){console.warn("[BIMData Viewer] Offline Warning: `getTileset` is not available in offline mode.")},getBuildings(e,t,n){return i[t].buildings},getBuildingPlanPositioning(e,t,n,o,r){const s=this.getBuilding(t,o,r,e).plans.find(a=>a.plan.id===n);return{translation_x:s.translation_x,translation_y:s.translation_y,rotate_z:s.rotate_z,scale:s.scale,opacity:s.opacity}},getBuilding(e,t,n,o){return i[t].buildings.find(r=>r.uuid===o)},getModelClassifications(e,t,n){return Object.values(i[t].formattedRawElements.classifications)},listClassificationElementRelations(e,t,n){return Object.values(i[t].formattedRawElements.elements).flatMap(r=>r.classifications.map(s=>({element_uuid:r.uuid,classification_id:s.id})))},getElementsFromClassification(e,t,n,o){return i[n].formattedRawElements.classifications[t].elements},getDrawings(e,t,n){return i[t].drawings},getDrawing(e,t,n,o){return this.getDrawings(e,n,o).find(r=>r.id===t)},getElements(e,t,n,o,r,s){return Object.values(i[t].formattedRawElements.elements).filter(l=>s?l.type===s:o?l.classifications.some(c=>c.name===o):r?l.classifications.some(c=>c.notation===r):!0)},getElementLinkedDocuments(e,t,n){return console.warn("[BIMData Viewer] Offline Warning: `getElementLinkedDocuments` is not available in offline mode."),[]},async getRawElements(e,t,n,o,r,s){return i[t].rawElements},getSimpleElements(e,t,n,o,r,s){const a=this.getElements(e,t,n,o,r,s);return ZVt(a)},getClassificationsOfElement(e,t,n,o){return this.getElement(e,n,o,t).classifications},getDocumentsOfElement(e,t,n,o){return console.warn("[BIMData Viewer] Offline Warning: `getDocumentsOfElement` is not available in offline mode."),[]},getMaterials(e,t,n,o){return this.getElement(e,n,o,t).material_list.map(r=>r.material)},getMaterial(e,t,n,o,r){return this.getMaterials(e,t,o,r).find(s=>s.id===n)},getElementPropertySets(e,t,n,o){return this.getElement(e,n,o,t).property_sets},getElementPropertySet(e,t,n,o,r){return this.getElementPropertySets(e,t,o,r).find(s=>s.id===n)},getElementPropertySetProperties(e,t,n,o,r){return this.getElementPropertySet(e,t,r,n,o).properties},getElementPropertySetProperty(e,t,n,o,r,s){return this.getElementPropertySetProperties(e,t,o,r,s).find(a=>a.id===n)},getElementPropertySetPropertyDefinitions(e,t,n,o,r,s){return[this.getElementPropertySetProperty(e,t,r,n,o,s).definition]},getElementPropertySetPropertyDefinition(e,t,n,o,r,s,a){const l=this.getElementPropertySetProperty(e,t,s,o,r,a).definition;return l.id===n?l:void 0},getElementPropertySetPropertyDefinitionUnits(e,t,n,o,r,s,a){return[this.getElementPropertySetPropertyDefinition(e,t,s,n,o,r,a).unit]},getElementPropertySetPropertyDefinitionUnit(e,t,n,o,r,s,a,l){const c=this.getElementPropertySetPropertyDefinition(e,t,a,o,r,s,l).unit;return c.id===n?c:void 0},getElement(e,t,n,o){return i[t].formattedRawElements.elements[o]},getSimpleElement(e,t,n,o){return this.getSimpleElements(e,t,n)[o]},getLayers(e,t,n){return Object.values(i[t].formattedRawElements.layers)},getLayer(e,t,n,o){return this.getLayers(e,n,o).find(r=>r.id===t)},getModelMaterials(e,t,n){return Object.values(i[t].formattedRawElements.materials.materials_data)},getModelMaterial(e,t,n,o){return this.getModelMaterials(e,n,o).find(r=>r.id===t)},getProcessorHandlers(e,t,n){return console.warn("[BIMData Viewer] Offline Warning: `getProcessorHandlers` is not available in offline mode."),[]},getProcessorHandler(e,t,n,o){console.warn("[BIMData Viewer] Offline Warning: `getProcessorHandler` is not available in offline mode.")},getModelProperties(e,t,n){return i[t].properties},getModelProperty(e,t,n,o){return i[n].properties.find(r=>r.id===t)},getModelPropertyDefinitions(e,t,n){return Object.values(i[t].formattedRawElements.definitions)},getModelPropertyDefinition(e,t,n,o){return this.getModelPropertyDefinitions(e,n,o).find(r=>r.id===t)},getPropertySets(e,t,n){return Object.values(i[t].formattedRawElements.property_sets)},getPropertySet(e,t,n,o){return this.getPropertySets(e,n,o).find(r=>r.id===t)},getSpaces(e,t,n){return i[t].spaces},getSpace(e,t,n,o){return i[n].spaces.find(r=>r.id===t)},getStoreys(e,t,n){return i[t].storeys},getStoreyPlanPositioning(e,t,n,o,r){const s=this.getStorey(e,n,o,r).plans.find(a=>a.plan.id===t);return{translation_x:s.translation_x,translation_y:s.translation_y,rotate_z:s.rotate_z,scale:s.scale,opacity:s.opacity}},getStorey(e,t,n,o){return i[t].storeys.find(r=>r.uuid===o)},getSystems(e,t,n){return Object.values(i[t].formattedRawElements.systems)},getSystem(e,t,n,o){return this.getSystems(e,t,n).find(r=>r.uuid===o)},getModelUnits(e,t,n){return Object.values(i[t].formattedRawElements.units)},getModelUnit(e,t,n,o){return this.getModelUnits(e,n,o).find(r=>r.id===t)},getZones(e,t,n,o){return i[t].zones.filter(r=>o?r.color===o:!0)},getZone(e,t,n,o){return i[n].zones.find(r=>r.id===t)},getZoneSpaces(e,t,n,o){return this.getZone(e,o,t,n).spaces},getZoneSpace(e,t,n,o,r){return this.getZoneSpaces(e,n,o,r).find(s=>s.id===t)}}}async function YVt(i){const e=i.find(n=>n.filename==="data.json"),t=await(e==null?void 0:e.getData(new wVt));return t?JSON.parse(t):null}async function m5(i,e,t){const n=i.find(r=>r.filename===`${e.id}/${t}`),o=await(n==null?void 0:n.getData(new Ppe));return o?URL.createObjectURL(o):null}async function $Vt(i,e){await Promise.all([m5(i,e,"document_file").then(t=>e.document&&(e.document.file=t)),m5(i,e,"structure_file").then(t=>e.structure_file=t),m5(i,e,"map_file").then(t=>e.map_file=t),m5(i,e,"binary_2d_file").then(t=>e.binary_2d_file=t),...e.xkt_files.map((t,n)=>m5(i,e,`xkt_file_v${t.version}`).then(o=>e.xkt_files[n]={version:t.version,file:o}))])}async function eHt(i){const t=await new UVt(new Spe(i)).getEntries(),n=await YVt(t);return await Promise.all(Object.values(n).flatMap(({model:o,buildings:r,storeys:s})=>[o].concat(o.children).concat(r.flatMap(a=>a.plans).map(a=>a.plan)).concat(s.flatMap(a=>a.plans).map(a=>a.plan))).map(o=>$Vt(t,o))),n}function hL(i,e,t){return new Proxy(i[t],{get:function(n,o){if(e[o])return e[o];throw new Error(`[BIMData Viewer] Offline Error: method \`${t}.${o}\` is not mocked.`)}})}async function tHt(i,e,t){var l,c,u;typeof i=="string"&&(i=await fetch(i).then(d=>d.blob()));const n=await eHt(i),o=KVt(),r=JVt(),s=XVt(n);return Object.assign(o,(l=t.methods)==null?void 0:l.bcfApi),Object.assign(r,(c=t.methods)==null?void 0:c.collaborationApi),Object.assign(s,(u=t.methods)==null?void 0:u.modelApi),Object.assign({},e,{bcfApi:hL(e,o,"bcfApi"),collaborationApi:hL(e,r,"collaborationApi"),modelApi:hL(e,s,"modelApi")})}class iHt{constructor(e={}){const{apiUrl:t,archiveUrl:n,pdfBackendUrl:o,cloudId:r,projectId:s,accessToken:a,offline:l}=e;this.apiUrl=t,this.archiveUrl=n,this.pdfBackendUrl=o,this.cloudId=r,this.projectId=s,this._accessToken=a,this.offline=l??{enabled:!1};const c=FT.makeBIMDataApiClient({apiUrl:t,accessToken:a});this.apiClient=c,this.ready=Promise.resolve(),this.getModelsPromise=null,Object.assign(c,{BcfApi:function(){return console.warn("[BIMData Viewer] DEPRECATED - API - please use `apiClient.bcfApi` instead of `new apiClient.BcfApi()`."),c.bcfApi},CollaborationApi:function(){return console.warn("[BIMData Viewer] DEPRECATED - API - please use `apiClient.collaborationApi` instead of `new apiClient.CollaborationApi()`."),c.collaborationApi},ModelApi:function(){return console.warn("[BIMData Viewer] DEPRECATED - API - please use `apiClient.modelApi` instead of `new apiClient.ModelApi()`."),c.modelApi},IfcApi:function(){return console.warn("[BIMData Viewer] DEPRECATED - API - please use `apiClient.modelApi` instead of `new apiClient.IfcApi()`."),new Proxy(c.modelApi,{get:function(d,h,f){const A=h.replace("Deprecated","").replace("Ifc","Model");return Reflect.get(d,A,f)}})}})}get accessToken(){return this._accessToken}set accessToken(e){this._accessToken=e,this.apiClient.accessToken=e}async getAvailableModels(e=null,t=!1){return t&&(this.getModelsPromise=null),this.getModelsPromise||(this.getModelsPromise=this.apiClient.modelApi.getModels(this.cloudId,this.projectId)),(await this.getModelsPromise).filter(n=>(e==null?void 0:e.includes(n.type))??!0)}getModel(e){const{cloudId:t,projectId:n,apiClient:o}=this;return o.modelApi.getModel(t,e,n)}getIfc(e){return console.warn("[BIMData Viewer] DEPRECATED - API - please use the `getModel` method instead of `getIfc`."),this.getModel(e)}async getModelStructure(e){const o=(await(await fetch(e.structure_file)).json())[0];return bu(o),o}getIfcStructure(e){return console.warn("[BIMData Viewer] DEPRECATED - API - please use the getModelStructure method instead of getIfcStructure."),this.getModelStructure(e)}async getRawElements(e){const{cloudId:t,projectId:n,apiClient:o}=this,r=await o.modelApi.getRawElements(t,e,n);r.units.forEach(a=>{a.conversion_baseunit=r.units[a.conversion_baseunit_index],delete a.conversion_baseunit_index}),r.definitions.forEach(a=>{a.unit=r.units[a.unit_id],delete a.unit_id}),r.property_sets.forEach(a=>{a.properties.forEach(l=>{l.definition=r.definitions[l.def_id],delete l.def_id})});const s={};return r.elements.forEach(a=>{a.attributes=r.property_sets[a.attributes],a.property_sets=a.psets.map(l=>r.property_sets[l]),Object.assign(a,{get propertySets(){return console.warn("propertySets is deprecated, please use property_sets instead."),a.property_sets}}),delete a.psets,a.classifications=a.classifications.map(l=>r.classifications[l]),a.systems=a.systems.map(l=>r.systems[l]),a.layers=a.layers.map(l=>r.layers[l]),s[a.uuid]=a}),s}getStoreys(e){const{cloudId:t,projectId:n,apiClient:o}=this;return o.modelApi.getStoreys(t,e,n)}createModel(e){const{cloudId:t,projectId:n,apiClient:o}=this;return o.modelApi.createModel(t,n,{document_id:e})}async waitForModelProcess(e){const t=["C","E","X"];return t.includes(e.status)?e:new Promise((n,o)=>{const r=setInterval(async()=>{try{let s=await this.getModel(e.id);t.includes(s.status)&&(clearInterval(r),n(s))}catch(s){clearInterval(r),o(s)}},1e3)})}async createStoreyPlan(e,t,n){const{cloudId:o,projectId:r,apiClient:s}=this,a=await this.createModel(n);return await s.modelApi.createStoreyPlan(o,e,r,t,{id:a.id}),a}deleteStoreyPlan(e,t,n){const{cloudId:o,projectId:r,apiClient:s}=this;return s.modelApi.deleteStoreyPlan(o,n,e,r,t)}updatePlanPositioning(e,t,n,o){const{cloudId:r,projectId:s,apiClient:a}=this;return a.modelApi.updateStoreyPlanPositioning(r,n,e,s,t,o)}async enableOfflineMode(e,t={}){let n;this.ready=new Promise(o=>n=o),this.apiClient=await tHt(e,this.apiClient,t),this.offline.enabled=!0,n()}disableOfflineMode(){this.offline.enabled&&(this.apiClient=FT.makeBIMDataApiClient({apiUrl:this.apiUrl,accessToken:this.accessToken}),this.offline.enabled=!1)}}function nHt(i){const e=[{methodName:"selectObjects",property:"selected",value:!0,eventName:"objects-selected",exlusiveIndex:1},{methodName:"deselectObjects",property:"selected",value:!1,eventName:"objects-deselected"},{methodName:"highlightObjects",property:"highlighted",value:!0,eventName:"objects-highlighted"},{methodName:"unhighlightObjects",property:"highlighted",value:!1,eventName:"objects-unhighlighted"},{methodName:"showObjects",property:"visible",value:!0,eventName:"objects-shown"},{methodName:"hideObjects",property:"visible",value:!1,eventName:"objects-hidden"},{methodName:"xrayObjects",property:"xrayed",value:!0,eventName:"objects-xrayed"},{methodName:"unxrayObjects",property:"xrayed",value:!1,eventName:"objects-unxrayed"},{methodName:"setObjectsPickable",property:"pickable",value:!0,eventName:"objects-pickable"},{methodName:"setObjectsUnpickable",property:"pickable",value:!1,eventName:"objects-unpickable"}],t=e.reduce((o,r)=>(o[r.methodName]=function(s,a){n(this,r,a);const{property:l,value:c}=r,u=[];for(const d of s){const h=i.get(d);try{h[l]=c,u.push(h)}catch{console.warn(`object with id ${d} does not exist`)}}this.hub.emit(r.eventName,{objects:u,options:{...a}})},o[`${r.methodName}ByUuids`]=function(s,a){n(this,r,a);const{property:l,value:c}=r,u=s.map(d=>this.uuidsMap.get(d)).filter(d=>(d==null?void 0:d.length)>0).flatMap(d=>d.map(h=>(h[l]=c,h)));this.hub.emit(r.eventName,{objects:u,options:{...a}})},o),{}),n=(o,r,s)=>{if(r.exlusiveIndex!==void 0&&(s!=null&&s.exclusive)){const a=e[r.exlusiveIndex],{property:l,value:c}=r;o[a.methodName](o.objects.filter(u=>u[l]===c).map(u=>u.id),{options:{...s}})}};return{...t,colorizeObjects(o,r,s){const a=[];for(const l of o)try{const c=i.get(l);c.color=r,a.push(c)}catch{console.warn(`object with id ${l} does not exist`)}this.hub.emit("objects-colorized",{objects:a,color:r,options:{...s}})},colorizeObjectsByUuids(o,r,s){const a=o.flatMap(l=>this.uuidsMap.get(l));this.colorizeObjects(a.map(l=>l.id),r,s)},get objects(){return Array.from(i.values())},get objectsIds(){return this.objects.map(o=>o.id)},get objectsUuids(){return Array.from(new Set(this.objects.map(o=>o.uuid)))},get objectsMap(){return i}}}const oHt=Object.freeze({EXA:10**18,PETA:10**15,TERA:10**12,GIGA:10**9,MEGA:10**6,KILO:10**3,HECTO:10**2,DECA:10,DECI:10**-1,CENTI:10**-2,MILLI:10**-3,MICRO:10**-6,NANO:10**-9,PICO:10**-12,FEMTO:10**-15,ATTO:10**-18});async function sHt(i,e,t){async function n(u,d){try{const f=(await i.apiClient.modelApi.getElement(i.cloudId,t,i.projectId,u)).attributes.properties.find(A=>A.definition.name===d);if(f){const A=f.definition.unit;if(A){const{name:p,prefix:g}=A;p!=="METRE"&&console.warn(`[Viewer] Elevation unit other that "METRE" are not supported. Unit "${p}" fallback to "METRE".`);const m=oHt[g];return m===void 0&&console.warn(`[Viewer] Elevation unit prefix "${g}" is unknown and will be ignored.`),(f.value??0)*(m??1)}else return f.value??0}}catch(h){console.warn(`[Models] Cannot get elevation of object with uuid ${u}: ${h}`)}return 0}const o=new Map,r=new Map,s=new Map;function a(){const u=new Set(e.map(d=>{var h,f;return(f=(h=d.object)==null?void 0:h.site)==null?void 0:f.uuid}).filter(Boolean));return A8(u,10,(d,h)=>{n(d,"RefElevation").then(f=>{o.set(d,f),h()},h)})}function l(){const u=new Set(e.map(d=>{var h,f;return(f=(h=d.object)==null?void 0:h.building)==null?void 0:f.uuid}).filter(Boolean));return A8(u,10,(d,h)=>{n(d,"ElevationOfRefHeight").then(f=>{r.set(d,f),h()},h)})}function c(){return A8(e,10,(u,d)=>{n(u.uuid,"Elevation").then(h=>{s.set(u.uuid,h),d()},d)})}await Promise.all([a(),l(),c()]),e.forEach((u,d)=>{var A,p,g,m;const h=s.get(u.uuid)??d;u.elevation=h;const f=r.get((p=(A=u.object)==null?void 0:A.building)==null?void 0:p.uuid);if(f==null){const w=o.get((m=(g=u.object)==null?void 0:g.site)==null?void 0:m.uuid)??0;u.absoluteElevation=h+w}else u.absoluteElevation=h+f}),e.forEach((u,d)=>{var h,f;u.topElevation=((h=e[d+1])==null?void 0:h.elevation)??1/0,u.absoluteTopElevation=((f=e[d+1])==null?void 0:f.absoluteElevation)??1/0})}async function rHt(i,e,t){e.every(n=>n.bimdata_elevation!==null&&n.bimdata_elevation!==void 0)?(e.forEach(n=>{n.elevation=n.bimdata_elevation,n.absoluteElevation=n.bimdata_elevation}),e.forEach((n,o)=>{var r,s;n.topElevation=((r=e[o+1])==null?void 0:r.elevation)??1/0,n.absoluteTopElevation=((s=e[o+1])==null?void 0:s.absoluteElevation)??1/0})):await sHt(i,e,t)}class pL{constructor(e){const{archived:t,binary_2d_file:n,children:o,created_at:r,creator:s,document:a,document_id:l,errors:c,gltf_file:u,id:d,layout_name:h,map_file:f,name:A,north_vector:p,page_number:g,parent_id:m,preview_file:w,project_id:y,recommanded_2d_angle:v,size_ratio:x,source:M,status:E,structure_file:S,systems_file:I,type:T,updated_at:P,version:R,viewer_360_file:L,warnings:U,world_position:H,xkt_file:N,xkt_files:q}=e;this.id=d,this.name=A,this.type=T,this.archived=t,this.binary_2d_file=n,this.children=(o==null?void 0:o.map(J=>new pL(J)))??[],this.created_at=r,this.creator=s,this.document=a,this.document_id=l,this.errors=c,this.gltf_file=u,this.map_file=f,this.north_vector=p,this.page_number=g,this.parent_id=m,this.preview_file=w,this.project_id=y,this.recommanded_2d_angle=v,this.size_ratio=x,this.source=M,this.status=E,this.structure_file=S,this.systems_file=I,this.updated_at=P,this.version=R,this.viewer_360_file=L,this.warnings=U,this.world_position=H,this.xkt_file=N,this.xkt_files=q,this.layout_name=h}}class Zpe{constructor(e,t,n,o){this.model=t,this.storey=n,this.index=o,this.key=`${n.key}-${e.plan.id}-${o}`,this.translation_x=e.translation_x??0,this.translation_y=e.translation_y??0,this.rotate_z=e.rotate_z??0,this.scale=e.scale??1,this.opacity=e.opacity??1,this.plan=e.plan}}class aHt{constructor(e,t){this.model=t;const{name:n,uuid:o,plans:r,plans_unreachable_count:s,bimdata_elevation:a}=e;this.name=n,this.uuid=o,this.bimdata_elevation=a,this.key=`${t.id}-${this.uuid}`,this.plans_unreachable_count=s,this.plans=r.map((l,c)=>new Zpe(l,t,this,c)),this.object=t.uuids.get(this.uuid),this.objects=null,this.elevation=null,this.absoluteElevation=null,this.topElevation=null,this.absoluteTopElevation=null}get uuids(){return new Map([...this.objects.values()].map(e=>[e.uuid,e]))}}class fL extends zE{constructor(e,t){super(e,t,"zone");const{id:n,uuid:o,name:r,created_at:s,updated_at:a,parent_id:l,order:c,zones:u=[],spaces:d=[],color:h,storey_uuid:f}=e;this.id=n,this.uuid=o,this.name=r,this.created_at=s,this.updated_at=a,this.parent_id=l,this.order=c,this.zones=u.map(A=>new fL(A,t)),this.spaces=d,this.color=h,this.storey_uuid=f}getContainedSpaces(){const e=Array.from(this.spaces);for(const t of this.zones)e.push(...t.getContainedSpaces());return e}get area(){return this.getContainedSpaces().filter(t=>t.geometry).reduce((t,n)=>t+lHt(n.geometry),0)}get perimeter(){return this.getContainedSpaces().filter(t=>t.geometry).reduce((t,n)=>t+cHt(n.geometry),0)}}function lHt(i){let e=0;const t=i.length;for(let n=0;n<t;n++){const o=(n+1)%t;e+=i[n].x*i[o].y,e-=i[o].x*i[n].y}return Math.abs(e)/2}function cHt(i){let e=0;const t=i.length;for(let n=0;n<t;n++){const o=(n+1)%t;e+=Math.sqrt(Math.pow(i[o].x-i[n].x,2)+Math.pow(i[o].y-i[n].y,2))}return e}class uHt extends pL{constructor(e,t,{structure:n,zones:o,systems:r,storeys:s}={}){var c,u;if(super(t),this._stateObjectMap=e,this.uuids=new Map,n){const d=Mq(n,this,e),h=P$e(d);this.structure=d,this.objects=h,h.forEach(f=>{f.uuid&&this.uuids.set(f.uuid,f)})}else this.structure=null,this.objects=[];this.zones=[],this.setZones(o??[]),r==null||r.forEach(d=>{const h=new zE(d,this,"system");this.uuids.set(h.uuid,h),e.set(h.id,h),this.objects.unshift(h)}),this.storeys=(s==null?void 0:s.map(d=>new aHt(d,this)).sort(wu("order",!1)))??[];const a=new Map(this.storeys.map(d=>[d.uuid,new Set])),l=this.type==="DWG"?"layout":"storey";for(const d of this.objects)d.type!==l&&a.has((c=d[l])==null?void 0:c.uuid)&&a.get((u=d[l])==null?void 0:u.uuid).add(d);for(const d of this.storeys){const h=a.get(d.uuid);d.objects=h?[...h.values()]:[]}this.objects.forEach(d=>{var h,f;d.parent=this.uuids.get((h=d.parent)==null?void 0:h.uuid),d.children=(f=d.children)==null?void 0:f.map(A=>this.uuids.get(A.uuid)).filter(Boolean)})}setZones(e=[]){this.zones.forEach(t=>{this._stateObjectMap.delete(t.id),this.uuids.delete(t.uuid),this.objects.splice(this.objects.indexOf(t),1)}),this.zones=e.map(t=>{const n=new fL(t,this);return this._stateObjectMap.set(n.id,n),this.uuids.set(n.uuid,n),this.objects.unshift(n),n})}}const dHt=(i,e,t)=>{const{api:n}=t;async function o(r){if(typeof r=="string"&&(console.warn(`[State] 'loadModel' called with id ${r} as string and parsed as integer.`),r=parseInt(r)),i.get(r))return console.warn(`[State] 'loadModel' called with id ${r}}, model already loaded.`),i.get(r);const s=[n.apiClient.modelApi.getZones(n.cloudId,r,n.projectId),n.apiClient.modelApi.getSystems(n.cloudId,r,n.projectId),n.getStoreys(r)],a=await n.getModel(r);a.parent_id&&!i.get(a.parent_id)&&await o(a.parent_id),a.structure_file&&s.push(n.getModelStructure(a));const[l,c,u,d]=await Promise.all(s),h=new uHt(e,a,{structure:d,zones:l,systems:c,storeys:u});return await rHt(n,h.storeys,h.id),i.set(r,h),h}return{get models(){return Array.from(i.values())},get ifcs(){return console.warn("[BIMData Viewer] DEPRECATED - State model - please use the models instead of ifcs."),Array.from(i.values()).filter(r=>!r.type||r.type==="IFC")},get modelsMap(){return i},get ifcsMap(){return console.warn("[BIMData Viewer] DEPRECATED - State model - please use the modelsMap instead of ifcsMap."),new Map([...i].filter(([,r])=>!r.type||r.type==="IFC"))},async loadModels(r){const s=await Promise.allSettled(r.map(o));s.filter(l=>l.status==="rejected").forEach(l=>console.error(l.reason));const a=s.filter(l=>l.status==="fulfilled").map(l=>l.value);if(a.length>0){const l=a.filter(c=>!c.type||c.type==="IFC");l.length&&this.hub.emit("ifcs-loaded",{ifcs:l}),this.hub.emit("models-loaded",{models:a}),t.globalContext.hub.emit("models-loaded",{models:a}),this.hub.emit("objects-added",{objects:a.flatMap(c=>c.objects)})}return a},loadIfcs(r){return console.warn("[BIMData Viewer] DEPRECATED - State model - please use the loadModels method instead of loadIfcs."),this.loadModels(r)},unloadModels(r){const s=[],a=[];if(r.forEach(l=>{const c=i.get(l);c?(i.delete(l),c.objects.map(d=>(a.push(d),d.id)).forEach(d=>e.delete(d)),s.push(c)):console.warn(`[State] Cannot unload model with id ${l} because it is not loaded.`)}),a.length>0&&this.hub.emit("objects-removed",{objects:a}),s.length>0){const l=s.filter(c=>!c.type||c.type==="IFC");l.length&&this.hub.emit("ifcs-unloaded",{ifcs:l}),this.hub.emit("models-unloaded",{models:s})}return s},unloadIfcs(r){return console.warn("[BIMData Viewer] DEPRECATED - State model - please use the unloadModels method instead of unloadIfcs."),this.unloadModels(r)},getStoreyFromAbsoluteElevation(r,s){var a;if(!r.storeys)return null;for(let l=0;l<r.storeys.length;l++)if(s>=r.storeys[l].absoluteElevation&&s<(((a=r.storeys[l+1])==null?void 0:a.absoluteElevation)??1/0))return r.storeys[l];return r.storeys[0]}}};function hHt(i){return{async createPlan(e,t,n,o){const r=await i.api.createStoreyPlan(e.id,t.uuid,n.id);await i.api.updatePlanPositioning(e.id,t.uuid,r.id,o);const s=new Zpe({...o,plan:r},e,t,e.storeys.length);return t.plans.push(s),this.hub.emit("plan-created",{plan:s}),s},async updatePlan(e){const t=await i.api.updatePlanPositioning(e.model.id,e.storey.uuid,e.plan.id,e);return Object.assign(e,t),this.hub.emit("plan-updated",{plan:e}),e},async deletePlan(e){await i.api.deleteStoreyPlan(e.model.id,e.storey.uuid,e.plan.id),e.storey.plans=e.storey.plans.filter(t=>t.key!==e.key),this.hub.emit("plan-deleted",{plan:e})}}}const pHt=(i,e)=>{const t={getObjectsByUuids(n){return n.flatMap(o=>this.uuidsMap.get(o))},getObject(n){return console.warn("[BIMData Viewer] DEPRECATED - State - `getObject` is deprecated, use `objectsMap.get` instead."),e.get(n)},getIfc(n){return console.warn("[BIMData Viewer] DEPRECATED - State - `getIfc` is deprecated, use `modelsMap.get` instead."),i.get(n)},get colorizedObjects(){return Array.from(e.values()).filter(n=>!!n.color)},get colorizedObjectsIds(){return this.colorizedObjects.map(n=>n.id)},get colorizedObjectsUuids(){return Array.from(new Set(this.colorizedObjects.map(n=>n.uuid)))},getObjectsOfType(n){return Array.from(e.values()).filter(o=>o.type===n)},getTypesOf(n){typeof n.map>"u"&&(n=[...n]);const o=new Set;return n.forEach(r=>{const s=e.get(r);s&&s.type&&o.add(s.type)}),Array.from(o).sort()},getObjectsWithTheSameTypeAs(n){const o=this.getTypesOf(n);return[...e.values()].filter(r=>o.includes(r.type))}};return fHt.forEach(n=>{Object.defineProperty(t,n.name,{get(){return Array.from(e.values()).filter(o=>o[n.property]===n.value).map(o=>Object.freeze(Object.defineProperties({},Object.getOwnPropertyDescriptors(o))))}}),Object.defineProperty(t,`${n.name}Ids`,{get(){return this[n.name].map(AHt)}}),Object.defineProperty(t,`${n.name}Uuids`,{get(){return Array.from(new Set(this[n.name].map(mHt)))}})}),t},fHt=[{name:"selectedObjects",property:"selected",value:!0},{name:"deselectedObjects",property:"selected",value:!1},{name:"highlightedObjects",property:"highlighted",value:!0},{name:"unhighlightedObjects",property:"highlighted",value:!1},{name:"visibleObjects",property:"visible",value:!0},{name:"unvisibleObjects",property:"visible",value:!1},{name:"xrayedObjects",property:"xrayed",value:!0},{name:"unxrayedObjects",property:"xrayed",value:!1},{name:"pickableObjects",property:"pickable",value:!0},{name:"unpickableObjects",property:"pickable",value:!1}];function AHt(i){return i.id}function mHt(i){return i.uuid}function AL(i,e,t){var n;return(n=i.mixins)!=null&&n.some(o=>o[t])||(i.mixins?i.mixins[i.mixins.length]=e:i.mixins=[e]),i}const Xpe=Symbol("annotation-mixin-id");function gHt(){let i=0;const e=new Map;return{get annotations(){return Array.from(e.values())},addAnnotation({x:t=0,y:n=0,z:o=0,draggable:r=!0,grabberSelector:s,component:a={render(){}},props:l={}}={},c){const u=this,d=i++,h={get id(){return d},get x(){return t},set x(f){t=f,u.hub.emit("annotation-updated",{annotation:h})},get y(){return n},set y(f){n=f,u.hub.emit("annotation-updated",{annotation:h})},get z(){return o},set z(f){o=f,u.hub.emit("annotation-updated",{annotation:h})},draggable:r,grabberSelector:s,component:a,props:l};return AL(h.component,{[Xpe]:!0,inject:["$viewer"]},Xpe),e.set(d,h),this.hub.emit("annotation-added",{annotation:h,options:c}),h},removeAnnotation(t,n){return e.has(t.id)?(e.delete(t.id),this.hub.emit("annotation-removed",{annotation:t,options:n}),!0):!1},clearAnnotations(){e.forEach(t=>this.removeAnnotation(t))}}}function vHt(i){const e=new Map,t=new Map,n={uuidsMap:{get(o){const r=[];return e.forEach(s=>{const a=s.uuids.get(o);a&&r.push(a)}),r}},hub:new cu};return[dHt(e,t,i),nHt(t),hHt(i),gHt(),pHt(e,t)].forEach(o=>Object.defineProperties(n,Object.getOwnPropertyDescriptors(o))),n}function yHt(i){if((i==null?void 0:i.type)==="container")xHt(i);else if((i==null?void 0:i.type)==="zone")bHt(i);else throw new TypeError("AREAS CORE - Layout first child must be a zone or a container.");return wHt(i),i}function wHt(i){const e=new Set,t=new Set;for(let n of i)if(n.id!=null)if(n.type==="zone"){if(e.has(n.id))throw new Error("AREAS CORE - Cannot add the same zone id twice.");e.add(n.id)}else{if(t.has(n.id))throw new Error("AREAS CORE - Cannot add the same container id twice.");t.add(n.id)}}function CHt(i){Ype(i.layout,"zone",i.zoneIdManager),Ype(i.layout,"container",i.containerIdManager)}function Ype(i,e,t){const n=[...i].filter(r=>r.type===e);n.map(r=>r.id).filter(r=>r!=null).forEach(r=>t.add(r)),n.filter(r=>r.id===void 0||r.id===null).forEach(r=>{r.id=t.nextId()})}function bHt(i){if(typeof i!="object")throw new TypeError("AREAS CORE - Invalid zone. Zone must be an object.");if((i==null?void 0:i.type)!=="zone")throw new TypeError('AREAS CORE - Invalid zone. A zone must be of type "zone".');return i}function xHt(i){var e,t;if(typeof i!="object")throw new TypeError("AREAS CORE - Invalid container. A container must be an object.");if((i==null?void 0:i.type)!=="container")throw new TypeError('AREAS CORE - Invalid container. Container must be of type "container".');if(i!=null&&i.direction&&!["row","column"].includes(i.direction))throw new TypeError('AREAS CORE - Invalid container. Container direction must be of type "row" or "column".');if(((e=i==null?void 0:i.children)==null?void 0:e.length)<2)throw new TypeError("AREAS CORE - Invalid container. Container children must have at least 2 children.");if(((t=i==null?void 0:i.children)==null?void 0:t.reduce((n,o)=>n+(o==null?void 0:o.ratio),0))!==100)throw new TypeError("AREAS CORE - Invalid container. The sum of container children ratios must be equal to 100.");return i}function $pe(i){var e;return(e=i.children)!=null&&e.length&&i.children.forEach(t=>{Object.defineProperty(t,Symbol.iterator,{value:$pe(t),configurable:!0})}),function*(){var t;if(yield i,(t=i.children)!=null&&t.length)for(let n of i.children)yield*n}}function Tm(i){return Object.defineProperty(i,Symbol.iterator,{value:$pe(i),configurable:!0}),i}function efe(){let i=1;const e=new Set;return{nextId(){for(;!this.isIdAvailable(i);)i++;return e.add(i),i},isIdAvailable(n){return!e.has(n)},add(n){return this.isIdAvailable(n)?(e.add(n),n):!1}}}function tfe(i){var t;if(!i)return;const e=Object.assign({},i);return((t=i.children)==null?void 0:t.length)>0&&(e.children=i.children.map(tfe)),e}function MHt(i){return e=>{const t=i.getZone(e);if(!t)return!1;const n=i.getParent(t);if(!n)throw new Error("AREAS CORE - Cannot delete root Zone");const o=n.children.indexOf(t);if(n.children.length>2){const r=n.children[o-1],s=n.children[o+1];o===0?s.ratio+=t.ratio:o===n.children.length-1?r.ratio+=t.ratio:(r.ratio+=Math.floor(t.ratio/2),s.ratio+=Math.ceil(t.ratio/2)),n.children=n.children.filter(a=>a.type!=="zone"||a.id!==e)}else{const r=n.children[o===1?0:1];r.ratio=n.ratio;const s=i.getParent(n);if(s){const a=s.children.indexOf(n);s.children.splice(a,1,r)}else i.layout=r}return!0}}var EHt=MHt;function BHt(i){return()=>ife(i.layout,[i.layout])}function ife(i,e=[]){var t;return(t=i.children)==null||t.forEach(n=>{e.push(n),n.type==="container"&&ife(n,e)}),e}var IHt=BHt;function SHt(i){return e=>{if(!e)throw new TypeError("AREAS CORE - fail to get parent: container child is null or undefined");return i.layout.type==="zone"?null:nfe(i.layout,e)}}function nfe(i,e){for(let t of i.children){if(t===e)return i;if(t.type==="container"){const n=nfe(t,e);if(n)return n}}return null}var PHt=SHt;function THt(i){return e=>i.layout.type==="zone"?i.layout.id===e?i.layout:null:ofe(i.layout,e)}function ofe(i,e){for(let t of i.children)if(t.type==="zone"){if(t.id===e)return t}else{const n=ofe(t,e);if(n)return n}return null}var kHt=THt;function RHt(i){return(t,n)=>{if(typeof n!="number")throw new TypeError("AREAS CORE - resize value must be a number.");const o=i.getParent(t),r=o.children.findIndex(a=>a===t);if(r===-1)return!1;const s=o.children[r+1];if(s){const a=t.ratio+s.ratio;let l=t.ratio+n;return l=l<0?0:l,l=l>a?a:l,t.ratio=l,s.ratio=a-l,!0}else return!1}}var DHt=RHt;function _Ht(i){return(e,t=50,n="row",o=!0,r=null)=>{const s=i.getZone(e);if(!s)throw new Error(`AREAS CORE - fail to split zone ${e}: zone does not exist.`);if(typeof t!="number"||t<0||t>100)throw new TypeError(`AREAS CORE - fail to split zone: invalid ratio ${t}, ratio should be a number between 0 and 100.`);if(n!=="row"&&n!=="column")throw new TypeError(`AREAS CORE - fail to split zone: invalid direction ${n}, direction should be 'row' or 'column'.`);const a=i.getParent(s),l=Tm({id:i.zoneIdManager.nextId(),type:"zone",...r});if(a){const c=a.children.findIndex(u=>u===s);if(a.direction===n)o?(l.ratio=Math.floor(s.ratio*(100-t)/100),s.ratio=Math.ceil(s.ratio*t/100),a.children.splice(c,1,s,l)):(l.ratio=Math.floor(s.ratio*t/100),s.ratio=Math.ceil(s.ratio*(100-t)/100),a.children.splice(c,1,l,s));else{const u=Tm({id:i.containerIdManager.nextId(),type:"container",direction:n,ratio:s.ratio});o?(l.ratio=Math.floor(100-t),s.ratio=Math.ceil(t),u.children=[s,l]):(l.ratio=Math.floor(t),s.ratio=Math.ceil(100-t),u.children=[l,s]),a.children.splice(c,1,u)}}else{const c=Tm({id:i.containerIdManager.nextId(),type:"container",direction:n});o?(l.ratio=Math.floor(100-t),s.ratio=Math.ceil(t),c.children=[s,l]):(l.ratio=Math.floor(t),s.ratio=Math.ceil(100-t),c.children=[l,s]),i._layout=c}return l}}var LHt=_Ht;function FHt(i){return(e=50,t="row",n=!0,o=null)=>{const r=i.layout;if(typeof e!="number"||e<0||e>100)throw new TypeError(`AREAS CORE - fail to split layout: invalid ratio ${e}, ratio should be a number between 0 and 100.`);if(t!=="row"&&t!=="column")throw new TypeError(`AREAS CORE - fail to split layout: invalid direction ${t}, direction should be 'row' or 'column'.`);const s=Tm({id:i.zoneIdManager.nextId(),type:"zone",...o}),a=Tm({id:i.containerIdManager.nextId(),type:"container",direction:t});return n?(s.ratio=Math.floor(100-e),r.ratio=Math.ceil(e),a.children=[r,s]):(s.ratio=Math.floor(e),r.ratio=Math.ceil(100-e),a.children=[s,r]),i._layout=a,s}}var OHt=FHt;function UHt(i){return(e,t)=>{const n=i.getZone(e),o=i.getZone(t);if(!n)throw new Error(`AREAS CORE - fail to swap zone ${e}: zone does not exist.`);if(!o)throw new Error(`AREAS CORE - fail to swap to zone ${t}: zone does not exist.`);const r=i.getParent(n),s=i.getParent(o),a=r.children.indexOf(n),l=s.children.indexOf(o),c=n.ratio,u=o.ratio;n.ratio=u,o.ratio=c,r.children[a]=o,s.children[l]=n}}var NHt=UHt;function VHt(i){const e={_layout:null,get layout(){return this._layout},set layout(t){t||(t={type:"zone"}),Tm(t),yHt(t),this._layout=t,CHt(e)},zoneIdManager:efe(),containerIdManager:efe()};return e.layout=i,e.deleteZone=EHt(e),e.getNodes=IHt(e),e.getParent=PHt(e),e.getZone=kHt(e),e.resize=DHt(e),e.splitZone=LHt(e),e.splitLayout=OHt(e),e.swapZones=NHt(e),e}var HHt=VHt;function sfe(i=1,e=0,t=100){return Math.min(Math.max(e,i),t)}function rfe(i,e){const t=i.getParent(e);if(t){const{width:n,height:o}=rfe(i,t),r=t.children.length-1;return t.direction==="column"?{width:n,height:Math.max(0,(o-r*i.separatorSize)*(e.ratio/100))}:{width:Math.max(0,(n-r*i.separatorSize)*(e.ratio/100)),height:o}}else return{width:i.width,height:i.height}}function afe(i,e,t){const{width:n,height:o}=rfe(i,e),r=e.children.length-1;if(e.direction==="column"){const s=1-r*i.separatorSize/o;return{height:`${sfe(t.ratio*s,0,100)}%`,width:"100%"}}else{const s=1-r*i.separatorSize/n;return{height:"100%",width:`${sfe(t.ratio*s,0,100)}%`}}}function zHt(i,e){const t={ref:i.contentManager.getRef(e.id),id:`zone-${e.id}`,class:"areas-zone",style:{flexGrow:0,overflow:"hidden"},key:e.id},n=i.getParent(e);if(n){const{width:o,height:r}=afe(i,n,e);t.style={width:o,height:r}}else t.style={height:"100%"};return i.vue.h("div",t)}var mL=zHt;function jHt(i,e,t){const{separatorSize:n,separatorDetectionMargin:o,separatorDetectionZIndex:r}=i,s=e.direction==="column",a={ref:`separator-${e.id}-${t+1}`,class:"areas-separator",style:{[s?"height":"width"]:`${n}px`,backgroundColor:"var(--areas-separator-color, black)",flexShrink:0,position:"relative"}},l=s?"ns-resize":"ew-resize",c=i.vue.h("div",{style:{position:"absolute",[s?"height":"width"]:`${o*2}px`,[s?"width":"height"]:"100%",[s?"top":"left"]:`${-o+n/2}px`,zIndex:r,cursor:l},onMousedown:u=>GHt(i,e,t,u,l)});return i.vue.h("div",a,i.resizable?[c]:null)}function GHt(i,e,t,n,o){n.preventDefault(),n.stopPropagation(),document.body.style.cursor=o;const r=a=>qHt(i,e,t,a),s=()=>QHt(r,s);document.addEventListener("mousemove",r),document.addEventListener("mouseup",s)}function qHt(i,e,t,n){const o=e.children[t],r=e.direction==="column"?"height":"width",a=i.root.$refs[`separator-${e.id}-${t+1}`].getBoundingClientRect(),{separatorSize:l}=i,c=(e.direction==="column"?n.clientY-a.y:n.clientX-a.x)-l/2,u=i.root.$refs[`container-${e.id}`].getBoundingClientRect()[r],d=c/u*100;i.resize(o,d)}function QHt(i,e){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e),document.body.style.cursor=""}var KHt=jHt;function gL(i,e){const t={ref:`container-${e.id}`,id:`container-${e.id}`,class:"areas-container",style:{height:"100%",display:"flex",flexDirection:e.direction}},n=i.getParent(e);if(n){const{width:s,height:a}=afe(i,n,e);t.style.width=s,t.style.height=a}const o=e.children.length-1,r=e.children.map((s,a)=>a<=o-1?[s.type==="zone"?mL(i,s):gL(i,s),KHt(i,e,a)]:s.type==="zone"?mL(i,s):gL(i,s));return i.vue.h("div",t,[r])}var JHt=gL;function WHt(i){const e=new Map,t=new Map,n=new Map;e.set("default",{component:{render(){return i.vue.h("div","Default component")}}});function o(s){return s&&!e.has(s)&&(console.warn(`[AREAS] Content with name ${s} is not registered, fallback to 'default'.`),s="default"),e.get(s)}return{registerContent(s,a){e.set(s,{name:s,component:a})},renderContent(s){return[...s].filter(a=>a.type==="zone").forEach(a=>{t.set(a.id,Object.assign({},o(a.content??"default"),{ref:i.vue.ref(null),options:{zoneId:a.id,...a.options,key:a.id},name:a.content??"default"}))}),i.vue.h("div",{style:{display:"none"}},[...t.values()].map(a=>i.vue.h(a.component,{...a.options,ref:a.ref})))},link(){[...n.entries()].forEach(([s,a])=>{const l=t.get(s);if(!l)return;const c=l.ref.value.$el,u=a.value;for(;u.lastChild;)u.removeChild(u.lastChild);u.appendChild(c)})},getElementZoneId(s){var a;for(const[l,c]of[...n.entries()])if((a=c.value)!=null&&a.contains(s))return l;return null},getRef(s){let a=n.get(s);return a||(a=i.vue.ref(null),n.set(s,a)),a},deleteZoneContent(s){t.delete(s),n.delete(s)},clean(){t.clear(),n.clear()}}}var ZHt=WHt;function XHt(i,e,t){const n=e.ref(0),o=e.ref(0),{separatorSize:r=2,separatorDetectionMargin:s=10,separatorDetectionZIndex:a=2,resizable:l=!0}=t??{},c=e.ref(!!l),u={vue:e,core:i,zones:e.ref([]),get resizable(){return c.value},set resizable(h){c.value=h},get width(){return n.value},get height(){return o.value},get separatorSize(){return r},get separatorDetectionMargin(){return s},get separatorDetectionZIndex(){return a},getParent(h){return this.core.getParent(h)},async coreLayoutSync(h=!1){this.layout&&(h?this.layout.value=this.core.layout:e.triggerRef(this.layout),await e.nextTick(),this.contentManager.link())},resize(h,f){this.core.resize(h,f),e.triggerRef(this.layout)},async split(h,f,A,p,g){const m=this.core.splitZone(h,f,A,p,g);return await this.coreLayoutSync(this.zones.value.length===1),m},async splitLayout(h,f,A,p){const g=this.core.splitLayout(h,f,A,p);return await this.coreLayoutSync(!0),g},async delete(h){let f=!1;const A=this.core.getZone(h);if(A){const g=this.core.getParent(A);f=(g==null?void 0:g.children.length)===2&&this.core.getParent(g)===null}this.contentManager.deleteZoneContent(h);const p=this.core.deleteZone(h);return await this.coreLayoutSync(f),p},async swap(h,f){const A=this.core.swapZones(h,f);return await this.coreLayoutSync(),A},destroy(){var h;(h=this.resizeObserver)==null||h.disconnect()},root:null,get component(){return this.layout=e.shallowRef(i.layout),e.watch(this.layout,h=>{this.zones.value=[...h].filter(f=>f.type==="zone")},{immediate:!0}),{created(){u.root=this},mounted(){const{width:h,height:f}=this.$el.getBoundingClientRect();n.value=h,o.value=f,u.resizeObserver=new ResizeObserver(A=>A.forEach(p=>{const{width:g,height:m}=p.target.getBoundingClientRect();n.value=g,o.value=m})),u.resizeObserver.observe(this.$el),u.contentManager.link()},render(){return e.h("div",{class:"areas-root"},[u.contentManager.renderContent(u.layout.value),d(u.layout.value)])}}}};u.contentManager=ZHt(u);function d(h){return h.type==="zone"?mL(u,h):JHt(u,h)}return u}var YHt=XHt;function $Ht(i,e=null,t=null){const n=HHt(e),o=YHt(n,i,t);return Object.freeze({core:n,renderer:o,destroy(){o.destroy()},swap(s,a){return this.renderer.swap(s,a)},split(s,a,l,c,u){return this.renderer.split(s,a,l,c,u)},splitLayout(s,a,l,c){return this.renderer.splitLayout(s,a,l,c)},delete(s){return this.renderer.delete(s)},registerContent(s,a){this.renderer.contentManager.registerContent(s,a)},getElementZoneId(s){return this.renderer.contentManager.getElementZoneId(s)},get layout(){return tfe(this.core.layout)},set layout(s){this.core.layout=s,this.renderer.contentManager.clean(),this.renderer.coreLayoutSync(!0)},get component(){return this.renderer.component},get resizable(){return this.renderer.resizable},set resizable(s){this.renderer.resizable=s}})}var ezt=$Ht;function tzt(i){return Array.isArray(i==null?void 0:i.children)?cfe(i):lfe(i)}function lfe(i,e=100){return{type:"zone",ratio:e,options:typeof i=="string"?{windowName:i}:i}}function cfe(i,e=100){return{type:"container",ratio:e,direction:i.direction,children:i.children.map((t,n)=>Array.isArray(t==null?void 0:t.children)?cfe(t,i.ratios[n]):lfe(t,i.ratios[n]))}}function izt(i,e,t=!0){return i.type==="zone"?ufe(i,e,t):dfe(i,e,t)}function ufe(i,e,t=!0){var r,s;const n=e.get(i.id);if(!n)throw new Error(`[Layout parser] Local context with id ${i.id} not found`);return{windowName:((r=n.window)==null?void 0:r.name)??null,windowState:{modelIds:n.loadedModelIds,viewpoint:(t||void 0)&&n.viewer&&n.getViewpoint(),storey:(s=n.selectedStorey)==null?void 0:s.key}}}function dfe(i,e,t=!0){return{direction:i.direction,ratios:i.children.map(n=>n.ratio),children:i.children.map(n=>n.type==="zone"?ufe(n,e,t):dfe(n,e,t))}}const nzt={props:{text:{type:String,default:""}},emits:["close"]},ozt={class:"success-modal"},szt={class:"success-modal__close"},rzt={class:"success-modal__title"},azt={class:"success-modal__title--icon"},lzt={class:"success-modal__text"},czt={class:"success-modal__button"};function uzt(i,e,t,n,o,r){const s=k("BIMDataIconClose"),a=k("BIMDataPieSpinner"),l=k("BIMDataIconSuccess"),c=k("BIMDataButton");return B(),O("div",ozt,[b("div",szt,[D(a,{delay:5,onStop:e[1]||(e[1]=u=>i.$emit("close"))},{default:V(()=>[D(s,{class:"icon-close",size:"xxxs",onClick:e[0]||(e[0]=u=>i.$emit("close"))})]),_:1})]),b("div",rzt,[b("h2",null,K(i.$t("modal.success")),1),b("span",azt,[D(l,{class:"fill-primary"})])]),b("div",lzt,K(t.text||i.$t("modal.success")),1),b("div",czt,[D(c,{class:"bimdata-btn__fill bimdata-btn__fill--primary bimdata-btn__radius",onClick:e[2]||(e[2]=u=>i.$emit("close"))},{default:V(()=>[nt(K(i.$t("modal.button")),1)]),_:1})])])}const dzt=z(nzt,[["render",uzt],["__scopeId","data-v-79d3a107"]]),hfe=Symbol("modal-mixin-id"),hzt={inject:["$viewer"],data(){return{modals:[]}},computed:{notBlocking(){var i;return((i=this.modal)==null?void 0:i.blocking)===!1},modal(){return this.modals.length?this.modals[0]:null},positionning(){var e;if(!((e=this.modal)!=null&&e.positions))return;const i=this.modal.positions;return{top:i.top?`${i.top}`:"0",right:i.right?`${i.right}`:"0",bottom:i.bottom?`${i.bottom} `:"0",left:i.left?`${i.left}`:"0"}}},created(){document.addEventListener("keydown",e=>{this.notBlocking&&e.key==="Escape"&&this.clearModal()});const i=this;this.mixin={[hfe]:!0,beforeCreate(){!this._.setupState.$viewer&&(this.$plugin=i.$plugin,this.$viewer=i.$viewer)}}},methods:{pushModal(i,e={},{display:t="full",positions:n,blocking:o=!0,exclusive:r=!1}={}){r&&(this.modals=[]),this.inject$viewerRecursively(i),this.modals.push({component:la(i),props:e,display:t,positions:n,blocking:o})},clearModal(){this.modals.shift()},clearModals(){this.modals=[]},inject$viewerRecursively(i){AL(i,this.mixin,hfe),i.components&&Object.values(i.components).forEach(e=>this.inject$viewerRecursively(e))},getModal(i){const e={success:dzt};if(Object.keys(e).includes(i))return e[i];console.warn(`Modal name unknown : ${i}`)}}},pzt={class:"bimdata-modal-manager__content"};function fzt(i,e,t,n,o,r){const s=fi("click-away");return r.modal?(B(),O("div",{key:0,class:de(["bimdata-modal-manager",{full:r.modal.display==="full",banner:r.modal.display==="banner"}]),style:ue(r.positionning),onClick:e[0]||(e[0]=ft(a=>r.notBlocking?r.clearModal():null,["self"]))},[At((B(),O("div",pzt,[(B(),Z(bn(r.modal.component),Cs(r.modal.props,{onClose:r.clearModal}),null,16,["onClose"]))])),[[s,()=>r.notBlocking?r.clearModal():null,"mousedown"]])],6)):ne("",!0)}const pfe=z(hzt,[["render",fzt]]),Azt={props:{plugin:{type:Object,required:!0}},setup(i){const e=mt("$viewer"),{plugin:t}=i;fn("$plugin",t),ffe(t.component,e.localContext,t)}},vL=Symbol("plugin-mixin-id");function ffe(i,e,t,n=!0){var s;if(!!((s=i.mixins)!=null&&s.some(a=>a[vL])))return;const r={[vL]:!0,beforeCreate(){!this._.setupState.$viewer&&(this.$plugin=t,this.$viewer=e.$viewer),Object.defineProperties(this,{$isOpen:{get(){return t.isOpen}},$loading:{get(){return t.loading}},$shown:{get(){return t.shown}}}),n&&(t.componentInstance=this,t.isViewer&&(e.viewer=this))},methods:{$open(...a){t.open(...a)},$close(...a){t.close(...a)},$show(){t.show()},$hide(){t.hide()}}};n&&(r.props={plugin:{type:Object,required:!0}},r.provide={pluginInstance:t},r.created=function(){e.hub.emit("plugin-created",{name:t.name,plugin:this}),e.$viewer.globalContext.hub.emit("plugin-created",{name:t.name,plugin:this})},r.unmounted=function(){e.hub.emit("plugin-destroyed",{name:t.name,plugin:this}),e.$viewer.globalContext.hub.emit("plugin-destroyed",{name:t.name,plugin:this})}),AL(i,r,vL),i.components&&Object.values(i.components).forEach(a=>ffe(a,e,t,!1))}function mzt(i,e,t,n,o,r){return At((B(),Z(bn(t.plugin.component),{class:"plugin-component-instance-container",plugin:t.plugin},null,8,["plugin"])),[[Gt,t.plugin.shown]])}const g5=z(Azt,[["render",mzt]]),gzt={components:{PluginComponentInstanceContainer:g5},props:{plugin:{type:Object,required:!0,validator(i){return i.sidePanel.width?typeof i.sidePanel.width=="number":i.sidePanel}}}};function vzt(i,e,t,n,o,r){const s=k("PluginComponentInstanceContainer");return At((B(),O("div",{class:"side-panel",style:ue(`
5490
+ `,n=()=>e.useDataURI?"data:text/javascript,"+encodeURIComponent(t):URL.createObjectURL(new Blob([t],{type:"text/javascript"}));i({workerScripts:{inflate:[n],deflate:[n]}})}const gVt="Writer iterator completed too soon",vVt="Content-Type",yVt=64*1024,Bpe="writable";class rL{constructor(){this.size=0}init(){this.initialized=!0}}class Ipe extends rL{get readable(){const e=this,{chunkSize:t=yVt}=e,n=new ReadableStream({start(){this.chunkOffset=0},async pull(o){const{offset:r=0,size:s,diskNumberStart:a}=n,{chunkOffset:l}=this;o.enqueue(await ds(e,r+l,Math.min(t,s-l),a)),l+t>s?o.close():this.chunkOffset+=t}});return n}}class Spe extends Ipe{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,o=e+t;let s=await(e||o<n.size?n.blob.slice(e,o):n.blob).arrayBuffer();return s.byteLength>t&&(s=s.slice(e,o)),new Uint8Array(s)}}class Ppe extends rL{constructor(e){super();const t=this,n=new TransformStream,o=[];e&&o.push([vVt,e]),Object.defineProperty(t,Bpe,{get(){return n.writable}}),t.blob=new Response(n.readable,{headers:o}).blob()}getData(){return this.blob}}class wVt extends Ppe{constructor(e){super(e),Object.assign(this,{encoding:e,utf8:!e||e.toLowerCase()=="utf-8"})}async getData(){const{encoding:e,utf8:t}=this,n=await super.getData();if(n.text&&t)return n.text();{const o=new FileReader;return new Promise((r,s)=>{Object.assign(o,{onload:({target:a})=>r(a.result),onerror:()=>s(o.error)}),o.readAsText(n,e)})}}}class CVt extends Ipe{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await Promise.all(t.map(async(n,o)=>{await n.init(),o!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size})),super.init()}async readUint8Array(e,t,n=0){const o=this,{readers:r}=this;let s,a=n;a==-1&&(a=r.length-1);let l=e;for(;l>=r[a].size;)l-=r[a].size,a++;const c=r[a],u=c.size;if(l+t<=u)s=await ds(c,l,t);else{const d=u-l;s=new Uint8Array(t),s.set(await ds(c,l,d)),s.set(await o.readUint8Array(e+d,t-d,n),d)}return o.lastDiskNumber=Math.max(a,o.lastDiskNumber),s}}class Tpe extends rL{constructor(e,t=4294967295){super();const n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let o,r,s;const a=new WritableStream({async write(u){const{availableSize:d}=n;if(s)u.length>=d?(await l(u.slice(0,d)),await c(),n.diskOffset+=o.size,n.diskNumber++,s=null,await this.write(u.slice(d))):await l(u);else{const{value:h,done:f}=await e.next();if(f&&!h)throw new Error(gVt);o=h,o.size=0,o.maxSize&&(n.maxSize=o.maxSize),n.availableSize=n.maxSize,await Ow(o),r=h.writable,s=r.getWriter(),await this.write(u)}},async close(){await s.ready,await c()}});Object.defineProperty(n,Bpe,{get(){return a}});async function l(u){const d=u.length;d&&(await s.ready,await s.write(u),o.size+=d,n.size+=d,n.availableSize-=d)}async function c(){r.size=o.size,await s.close()}}}async function Ow(i,e){if(i.init&&!i.initialized)await i.init(e);else return Promise.resolve()}function bVt(i){return Array.isArray(i)&&(i=new CVt(i)),i instanceof ReadableStream&&(i={readable:i}),i}function xVt(i){i.writable===Ls&&typeof i.next==u5&&(i=new Tpe(i)),i instanceof WritableStream&&(i={writable:i});const{writable:e}=i;return e.size===Ls&&(e.size=0),i instanceof Tpe||Object.assign(i,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),i}function ds(i,e,t,n){return i.readUint8Array(e,t,n)}const kpe="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),MVt=kpe.length==256;function EVt(i){if(MVt){let e="";for(let t=0;t<i.length;t++)e+=kpe[i[t]];return e}else return new TextDecoder().decode(i)}function Uw(i,e){return e&&e.trim().toLowerCase()=="cp437"?EVt(i):new TextDecoder(e).decode(i)}const Rpe="filename",Dpe="rawFilename",_pe="comment",Lpe="rawComment",Fpe="uncompressedSize",Ope="compressedSize",Upe="offset",aL="diskNumberStart",lL="lastModDate",cL="rawLastModDate",Npe="lastAccessDate",BVt="rawLastAccessDate",Vpe="creationDate",IVt="rawCreationDate",SVt=[Rpe,Dpe,Ope,Fpe,lL,cL,_pe,Lpe,Npe,Vpe,Upe,aL,aL,"internalFileAttribute","internalFileAttributes","externalFileAttribute","externalFileAttributes","msDosCompatible","zip64","encrypted","version","versionMadeBy","zipCrypto","directory","executable","bitFlag","signature","filenameUTF8","commentUTF8","compressionMethod","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Hpe{constructor(e){SVt.forEach(t=>this[t]=e[t])}}const uL="File format is not recognized",PVt="End of central directory not found",TVt="End of Zip64 central directory locator not found",kVt="Central directory header not found",RVt="Local file header not found",DVt="Zip64 extra field not found",_Vt="File contains encrypted entry",LVt="Encryption method not supported",zpe="Compression method not supported",jpe="Split zip file",Gpe="utf-8",qpe="cp437",FVt=[[Fpe,Kh],[Ope,Kh],[Upe,Kh],[aL,ud]],OVt={[ud]:{getValue:no,bytes:4},[Kh]:{getValue:Nw,bytes:8}};class UVt{constructor(e,t={}){Object.assign(this,{reader:bVt(e),options:t,config:PNt()})}async*getEntriesGenerator(e={}){const t=this;let{reader:n}=t;const{config:o}=t;if(await Ow(n),(n.size===Ls||!n.readUint8Array)&&(n=new Spe(await new Response(n.readable).blob()),await Ow(n)),n.size<Bm)throw new Error(uL);n.chunkSize=TNt(o);const r=await GVt(n,mNt,n.size,Bm,ud*16);if(!r){const T=await ds(n,0,4),P=Fo(T);throw no(P)==ANt?new Error(jpe):new Error(PVt)}const s=Fo(r);let a=no(s,12),l=no(s,16);const c=r.offset,u=Lo(s,20),d=c+Bm+u;let h=Lo(s,4);const f=n.lastDiskNumber||0;let A=Lo(s,6),p=Lo(s,8),g=0,m=0;if(l==Kh||a==Kh||p==ud||A==ud){const T=await ds(n,r.offset-W_,W_),P=Fo(T);if(no(P,0)==gNt){l=Nw(P,8);let R=await ds(n,l,Z_,-1),L=Fo(R);const U=r.offset-W_-Z_;if(no(L,0)!=Fhe&&l!=U){const H=l;l=U,g=l-H,R=await ds(n,l,Z_,-1),L=Fo(R)}if(no(L,0)!=Fhe)throw new Error(TVt);h==ud&&(h=no(L,16)),A==ud&&(A=no(L,20)),p==ud&&(p=Nw(L,32)),a==Kh&&(a=Nw(L,40)),l-=a}}if(l>=n.size&&(g=n.size-l-a-Bm,l=n.size-a-Bm),f!=h)throw new Error(jpe);if(l<0)throw new Error(uL);let w=0,y=await ds(n,l,a,A),v=Fo(y);if(a){const T=r.offset-a;if(no(v,w)!=Lhe&&l!=T){const P=l;l=T,g+=l-P,y=await ds(n,l,a,A),v=Fo(y)}}const x=r.offset-l-(n.lastDiskOffset||0);if(a!=x&&x>=0&&(a=x,y=await ds(n,l,a,A),v=Fo(y)),l<0||l>=n.size)throw new Error(uL);const M=Os(t,e,"filenameEncoding"),E=Os(t,e,"commentEncoding");for(let T=0;T<p;T++){const P=new NVt(n,o,t.options);if(no(v,w)!=Lhe)throw new Error(kVt);Qpe(P,v,w+6);const R=!!P.bitFlag.languageEncodingFlag,L=w+46,U=L+P.filenameLength,H=U+P.extraFieldLength,N=Lo(v,w+4),q=N>>8==0,J=N>>8==3,te=y.subarray(L,U),le=Lo(v,w+32),Pe=H+le,ye=y.subarray(H,Pe),Ne=R,Ce=R,ke=no(v,w+38),Oe=q&&(Pm(v,w+38)&Vhe)==Vhe||J&&(ke>>16&Hhe)==Hhe||te.length&&te[te.length-1]==jhe.charCodeAt(0),se=J&&(ke>>16&zhe)==zhe,Re=no(v,w+42)+g;Object.assign(P,{versionMadeBy:N,msDosCompatible:q,compressedSize:0,uncompressedSize:0,commentLength:le,directory:Oe,offset:Re,diskNumberStart:Lo(v,w+34),internalFileAttributes:Lo(v,w+36),externalFileAttributes:ke,rawFilename:te,filenameUTF8:Ne,commentUTF8:Ce,rawExtraField:y.subarray(U,H),executable:se}),P.internalFileAttribute=P.internalFileAttributes,P.externalFileAttribute=P.externalFileAttributes;const xe=Os(t,e,"decodeText")||Uw,Te=Ne?Gpe:M||qpe,tt=Ce?Gpe:E||qpe;let $e=xe(te,Te);$e===Ls&&($e=Uw(te,Te));let $=xe(ye,tt);$===Ls&&($=Uw(ye,tt)),Object.assign(P,{rawComment:ye,filename:$e,comment:$,directory:Oe||$e.endsWith(jhe)}),m=Math.max(Re,m),Kpe(P,P,v,w+6),P.zipCrypto=P.encrypted&&!P.extraFieldAES;const W=new Hpe(P);W.getData=(Be,ve)=>P.getData(Be,W,ve),w=Pe;const{onprogress:re}=e;if(re)try{await re(T+1,p,new Hpe(P))}catch{}yield W}const S=Os(t,e,"extractPrependedData"),I=Os(t,e,"extractAppendedData");return S&&(t.prependedData=m>0?await ds(n,0,m):new Uint8Array),t.comment=u?await ds(n,c+Bm,u):new Uint8Array,I&&(t.appendedData=d<n.size?await ds(n,d,n.size-d):new Uint8Array),!0}async getEntries(e={}){const t=[];for await(const n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}}class NVt{constructor(e,t,n){Object.assign(this,{reader:e,config:t,options:n})}async getData(e,t,n={}){const o=this,{reader:r,offset:s,diskNumberStart:a,extraFieldAES:l,compressionMethod:c,config:u,bitFlag:d,signature:h,rawLastModDate:f,uncompressedSize:A,compressedSize:p}=o,g=t.localDirectory={},m=await ds(r,s,30,a),w=Fo(m);let y=Os(o,n,"password"),v=Os(o,n,"rawPassword");const x=Os(o,n,"passThrough");if(y=y&&y.length&&y,v=v&&v.length&&v,l&&l.originalCompressionMethod!=pNt)throw new Error(zpe);if(c!=hNt&&c!=dNt&&!x)throw new Error(zpe);if(no(w,0)!=fNt)throw new Error(RVt);Qpe(g,w,4),g.rawExtraField=g.extraFieldLength?await ds(r,s+30+g.filenameLength,g.extraFieldLength,a):new Uint8Array,Kpe(o,g,w,4,!0),Object.assign(t,{lastAccessDate:g.lastAccessDate,creationDate:g.creationDate});const M=o.encrypted&&g.encrypted&&!x,E=M&&!l;if(x||(t.zipCrypto=E),M){if(!E&&l.strength===Ls)throw new Error(LVt);if(!y&&!v)throw new Error(_Vt)}const S=s+30+g.filenameLength+g.extraFieldLength,I=p,T=r.readable;Object.assign(T,{diskNumberStart:a,offset:S,size:I});const P=Os(o,n,"signal"),R=Os(o,n,"checkPasswordOnly");R&&(e=new WritableStream),e=xVt(e),await Ow(e,x?p:A);const{writable:L}=e,{onstart:U,onprogress:H,onend:N}=n,q={options:{codecType:ype,password:y,rawPassword:v,zipCrypto:E,encryptionStrength:l&&l.strength,signed:Os(o,n,"checkSignature")&&!x,passwordVerification:E&&(d.dataDescriptor?f>>>8&255:h>>>24&255),signature:h,compressed:c!=0&&!x,encrypted:o.encrypted&&!x,useWebWorkers:Os(o,n,"useWebWorkers"),useCompressionStream:Os(o,n,"useCompressionStream"),transferStreams:Os(o,n,"transferStreams"),checkPasswordOnly:R},config:u,streamOptions:{signal:P,size:I,onstart:U,onprogress:H,onend:N}};let J=0;try{({outputSize:J}=await fVt({readable:T,writable:L},q))}catch(te){if(!R||te.message!=$_)throw te}finally{const te=Os(o,n,"preventClose");L.size+=J,!te&&!L.locked&&await L.getWriter().close()}return R?Ls:e.getData?e.getData():L}}function Qpe(i,e,t){const n=i.rawBitFlag=Lo(e,t+2),o=(n&Ohe)==Ohe,r=no(e,t+6);Object.assign(i,{encrypted:o,version:Lo(e,t),bitFlag:{level:(n&BNt)>>1,dataDescriptor:(n&Uhe)==Uhe,languageEncodingFlag:(n&Nhe)==Nhe},rawLastModDate:r,lastModDate:qVt(r),filenameLength:Lo(e,t+22),extraFieldLength:Lo(e,t+24)})}function Kpe(i,e,t,n,o){const{rawExtraField:r}=e,s=e.extraField=new Map,a=Fo(new Uint8Array(r));let l=0;try{for(;l<r.length;){const m=Lo(a,l),w=Lo(a,l+2);s.set(m,{type:m,data:r.slice(l+4,l+4+w)}),l+=4+w}}catch{}const c=Lo(t,n+4);Object.assign(e,{signature:no(t,n+10),uncompressedSize:no(t,n+18),compressedSize:no(t,n+14)});const u=s.get(vNt);u&&(VVt(u,e),e.extraFieldZip64=u);const d=s.get(xNt);d&&(Jpe(d,Rpe,Dpe,e,i),e.extraFieldUnicodePath=d);const h=s.get(MNt);h&&(Jpe(h,_pe,Lpe,e,i),e.extraFieldUnicodeComment=h);const f=s.get(yNt);f?(HVt(f,e,c),e.extraFieldAES=f):e.compressionMethod=c;const A=s.get(wNt);A&&(zVt(A,e),e.extraFieldNTFS=A);const p=s.get(bNt);p&&(jVt(p,e,o),e.extraFieldExtendedTimestamp=p);const g=s.get(ENt);g&&(e.extraFieldUSDZ=g)}function VVt(i,e){e.zip64=!0;const t=Fo(i.data),n=FVt.filter(([o,r])=>e[o]==r);for(let o=0,r=0;o<n.length;o++){const[s,a]=n[o];if(e[s]==a){const l=OVt[a];e[s]=i[s]=l.getValue(t,r),r+=l.bytes}else if(i[s])throw new Error(DVt)}}function Jpe(i,e,t,n,o){const r=Fo(i.data),s=new Dw;s.append(o[t]);const a=Fo(new Uint8Array(4));a.setUint32(0,s.get(),!0);const l=no(r,1);Object.assign(i,{version:Pm(r,0),[e]:Uw(i.data.subarray(5)),valid:!o.bitFlag.languageEncodingFlag&&l==no(a,0)}),i.valid&&(n[e]=i[e],n[e+"UTF8"]=!0)}function HVt(i,e,t){const n=Fo(i.data),o=Pm(n,4);Object.assign(i,{vendorVersion:Pm(n,0),vendorId:Pm(n,2),strength:o,originalCompressionMethod:t,compressionMethod:Lo(n,5)}),e.compressionMethod=i.compressionMethod}function zVt(i,e){const t=Fo(i.data);let n=4,o;try{for(;n<i.data.length&&!o;){const r=Lo(t,n),s=Lo(t,n+2);r==CNt&&(o=i.data.slice(n+4,n+4+s)),n+=4+s}}catch{}try{if(o&&o.length==24){const r=Fo(o),s=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),l=r.getBigUint64(16,!0);Object.assign(i,{rawLastModDate:s,rawLastAccessDate:a,rawCreationDate:l});const c=dL(s),u=dL(a),d=dL(l),h={lastModDate:c,lastAccessDate:u,creationDate:d};Object.assign(i,h),Object.assign(e,h)}}catch{}}function jVt(i,e,t){const n=Fo(i.data),o=Pm(n,0),r=[],s=[];t?((o&1)==1&&(r.push(lL),s.push(cL)),(o&2)==2&&(r.push(Npe),s.push(BVt)),(o&4)==4&&(r.push(Vpe),s.push(IVt))):i.data.length>=5&&(r.push(lL),s.push(cL));let a=1;r.forEach((l,c)=>{if(i.data.length>=a+4){const u=no(n,a);e[l]=i[l]=new Date(u*1e3);const d=s[c];i[d]=u}a+=4})}async function GVt(i,e,t,n,o){const r=new Uint8Array(4),s=Fo(r);QVt(s,0,e);const a=n+o;return await l(n)||await l(Math.min(a,t));async function l(c){const u=t-c,d=await ds(i,u,c);for(let h=d.length-n;h>=0;h--)if(d[h]==r[0]&&d[h+1]==r[1]&&d[h+2]==r[2]&&d[h+3]==r[3])return{offset:u+h,buffer:d.slice(h,h+n).buffer}}}function Os(i,e,t){return e[t]===Ls?i.options[t]:e[t]}function qVt(i){const e=(i&4294901760)>>16,t=i&65535;try{return new Date(1980+((e&65024)>>9),((e&480)>>5)-1,e&31,(t&63488)>>11,(t&2016)>>5,(t&31)*2,0)}catch{}}function dL(i){return new Date(Number(i/BigInt(1e4)-BigInt(116444736e5)))}function Pm(i,e){return i.getUint8(e)}function Lo(i,e){return i.getUint16(e,!0)}function no(i,e){return i.getUint32(e,!0)}function Nw(i,e){return Number(i.getBigUint64(e,!0))}function QVt(i,e,t){i.setUint32(e,t,!0)}function Fo(i){return new DataView(i.buffer)}let Wpe;try{Wpe=typeof document>"u"&&typeof NT>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?NT.href:yd&&yd.tagName.toUpperCase()==="SCRIPT"&&yd.src||new URL("bimdata-viewer.umd.cjs",document.baseURI).href}catch{}X_({baseURL:Wpe}),mVt(X_),X_({Deflate:jUt,Inflate:uNt});function KVt(i){return{getDetailedExtensions(e){return[]},getExtensions(e){return[]},getFullTopics(e,t,n,o,r,s,a){return[]},getTopics(e,t,n,o){return[]}}}function JVt(i){return{checkProjectAccess(e,t){return{has_read_permission:!0,has_write_permission:!1,has_admin_permission:!1,token_scopes:["bcf:read","document:read","model:read"],usable_scopes:["bcf:read","document:read","model:read"],user_role:50,user:null}},getProjectDMSTree(e,t){return{}},getDocumentHistories(e,t,n){return[]},getProjectUsers(e,t){return[]}}}function WVt(i){const e=i,t=e.units.reduce((u,d)=>(d.conversion_baseunit=e.units[d.conversion_baseunit_index],delete d.conversion_baseunit_index,u[d.id]=d,u),{}),n=e.definitions.reduce((u,d)=>(d.unit=e.units[d.unit_id],delete d.unit_id,u[d.id]=d,u),{}),o=e.property_sets.reduce((u,d)=>(d.properties.forEach(h=>{h.definition=e.definitions[h.def_id],delete h.def_id}),u[d.id]=d,u),{}),r=e.classifications.reduce((u,d)=>(d.name=d.type,d.title=d.description,u[d.id]=d,u),{}),s=e.layers.reduce((u,d)=>(d.elements=[],u[d.id]=d,u),{}),a=e.systems.reduce((u,d)=>(d.elements=[],u[d.uuid]=d,u),{}),l={};l.materials_data=e.materials.materials_data.reduce((u,d)=>(d.property_sets=d.psets.map(h=>e.property_sets[h]),delete d.psets,delete d.step_id,u[d.id]=d,u),{}),l.list_components=e.materials.list_components.reduce((u,d)=>(d.material=e.materials.materials_data[d.material],d.option=e.materials.options[d.material_option],u[d.id]=d,delete d.id,u),{}),l.options=e.materials.options.reduce((u,d)=>(d.list_components=d.material_list.map(h=>e.materials.list_components[h]),u[d.id]=d,u),{});const c={};return e.elements.forEach(u=>{u.attributes=e.property_sets[u.attributes],u.property_sets=u.psets.map(d=>e.property_sets[d]),delete u.psets,u.classifications=u.classifications.map(d=>e.classifications[d]),u.systems=u.systems.map(d=>{const h=e.systems[d];return h.elements.push(u.uuid),h}),u.layers=u.layers.map(d=>{const h=e.layers[d];return h.elements.push(u.uuid),h}),u.material_list=u.material_list.map(d=>e.materials.list_components[d]),c[u.uuid]=u}),{units:t,definitions:n,property_sets:o,classifications:r,layers:s,systems:a,materials:l,elements:c}}function ZVt(i){const e={};return Object.values(i).forEach(t=>{e[t.uuid]={},e[t.uuid].attributes={},t.attributes.properties.forEach(n=>{e[t.uuid].attributes[n.definition.name]=n.value}),t.property_sets.forEach(n=>{e[t.uuid][n.name]={},n.properties.forEach(o=>{e[t.uuid][n.name][o.definition.name]=o.value})})}),e}function XVt(i){return Object.values(i).forEach(e=>{e.formattedRawElements=WVt(e.rawElements)}),{getModels(e,t,n,o,r){let s=Object.values(i).map(a=>a.model);return s=s.filter(a=>!(a.type==="PDF"&&a.parent_id)),(n==null?void 0:n.length)>0&&(s=s.filter(a=>n.includes(a.source))),(o==null?void 0:o.length)>0&&(s=s.filter(a=>o.includes(a.status))),(r==null?void 0:r.length)>0&&(s=s.filter(a=>r.includes(a.type))),s},getModel(e,t,n){return i[t].model},getTileset(e,t,n,o){console.warn("[BIMData Viewer] Offline Warning: `getTileset` is not available in offline mode.")},getBuildings(e,t,n){return i[t].buildings},getBuildingPlanPositioning(e,t,n,o,r){const s=this.getBuilding(t,o,r,e).plans.find(a=>a.plan.id===n);return{translation_x:s.translation_x,translation_y:s.translation_y,rotate_z:s.rotate_z,scale:s.scale,opacity:s.opacity}},getBuilding(e,t,n,o){return i[t].buildings.find(r=>r.uuid===o)},getModelClassifications(e,t,n){return Object.values(i[t].formattedRawElements.classifications)},listClassificationElementRelations(e,t,n){return Object.values(i[t].formattedRawElements.elements).flatMap(r=>r.classifications.map(s=>({element_uuid:r.uuid,classification_id:s.id})))},getElementsFromClassification(e,t,n,o){return i[n].formattedRawElements.classifications[t].elements},getDrawings(e,t,n){return i[t].drawings},getDrawing(e,t,n,o){return this.getDrawings(e,n,o).find(r=>r.id===t)},getElements(e,t,n,o,r,s){return Object.values(i[t].formattedRawElements.elements).filter(l=>s?l.type===s:o?l.classifications.some(c=>c.name===o):r?l.classifications.some(c=>c.notation===r):!0)},getElementLinkedDocuments(e,t,n){return console.warn("[BIMData Viewer] Offline Warning: `getElementLinkedDocuments` is not available in offline mode."),[]},async getRawElements(e,t,n,o,r,s){return i[t].rawElements},getSimpleElements(e,t,n,o,r,s){const a=this.getElements(e,t,n,o,r,s);return ZVt(a)},getClassificationsOfElement(e,t,n,o){return this.getElement(e,n,o,t).classifications},getDocumentsOfElement(e,t,n,o){return console.warn("[BIMData Viewer] Offline Warning: `getDocumentsOfElement` is not available in offline mode."),[]},getMaterials(e,t,n,o){return this.getElement(e,n,o,t).material_list.map(r=>r.material)},getMaterial(e,t,n,o,r){return this.getMaterials(e,t,o,r).find(s=>s.id===n)},getElementPropertySets(e,t,n,o){return this.getElement(e,n,o,t).property_sets},getElementPropertySet(e,t,n,o,r){return this.getElementPropertySets(e,t,o,r).find(s=>s.id===n)},getElementPropertySetProperties(e,t,n,o,r){return this.getElementPropertySet(e,t,r,n,o).properties},getElementPropertySetProperty(e,t,n,o,r,s){return this.getElementPropertySetProperties(e,t,o,r,s).find(a=>a.id===n)},getElementPropertySetPropertyDefinitions(e,t,n,o,r,s){return[this.getElementPropertySetProperty(e,t,r,n,o,s).definition]},getElementPropertySetPropertyDefinition(e,t,n,o,r,s,a){const l=this.getElementPropertySetProperty(e,t,s,o,r,a).definition;return l.id===n?l:void 0},getElementPropertySetPropertyDefinitionUnits(e,t,n,o,r,s,a){return[this.getElementPropertySetPropertyDefinition(e,t,s,n,o,r,a).unit]},getElementPropertySetPropertyDefinitionUnit(e,t,n,o,r,s,a,l){const c=this.getElementPropertySetPropertyDefinition(e,t,a,o,r,s,l).unit;return c.id===n?c:void 0},getElement(e,t,n,o){return i[t].formattedRawElements.elements[o]},getSimpleElement(e,t,n,o){return this.getSimpleElements(e,t,n)[o]},getLayers(e,t,n){return Object.values(i[t].formattedRawElements.layers)},getLayer(e,t,n,o){return this.getLayers(e,n,o).find(r=>r.id===t)},getModelMaterials(e,t,n){return Object.values(i[t].formattedRawElements.materials.materials_data)},getModelMaterial(e,t,n,o){return this.getModelMaterials(e,n,o).find(r=>r.id===t)},getProcessorHandlers(e,t,n){return console.warn("[BIMData Viewer] Offline Warning: `getProcessorHandlers` is not available in offline mode."),[]},getProcessorHandler(e,t,n,o){console.warn("[BIMData Viewer] Offline Warning: `getProcessorHandler` is not available in offline mode.")},getModelProperties(e,t,n){return i[t].properties},getModelProperty(e,t,n,o){return i[n].properties.find(r=>r.id===t)},getModelPropertyDefinitions(e,t,n){return Object.values(i[t].formattedRawElements.definitions)},getModelPropertyDefinition(e,t,n,o){return this.getModelPropertyDefinitions(e,n,o).find(r=>r.id===t)},getPropertySets(e,t,n){return Object.values(i[t].formattedRawElements.property_sets)},getPropertySet(e,t,n,o){return this.getPropertySets(e,n,o).find(r=>r.id===t)},getSpaces(e,t,n){return i[t].spaces},getSpace(e,t,n,o){return i[n].spaces.find(r=>r.id===t)},getStoreys(e,t,n){return i[t].storeys},getStoreyPlanPositioning(e,t,n,o,r){const s=this.getStorey(e,n,o,r).plans.find(a=>a.plan.id===t);return{translation_x:s.translation_x,translation_y:s.translation_y,rotate_z:s.rotate_z,scale:s.scale,opacity:s.opacity}},getStorey(e,t,n,o){return i[t].storeys.find(r=>r.uuid===o)},getSystems(e,t,n){return Object.values(i[t].formattedRawElements.systems)},getSystem(e,t,n,o){return this.getSystems(e,t,n).find(r=>r.uuid===o)},getModelUnits(e,t,n){return Object.values(i[t].formattedRawElements.units)},getModelUnit(e,t,n,o){return this.getModelUnits(e,n,o).find(r=>r.id===t)},getZones(e,t,n,o){return i[t].zones.filter(r=>o?r.color===o:!0)},getZone(e,t,n,o){return i[n].zones.find(r=>r.id===t)},getZoneSpaces(e,t,n,o){return this.getZone(e,o,t,n).spaces},getZoneSpace(e,t,n,o,r){return this.getZoneSpaces(e,n,o,r).find(s=>s.id===t)}}}async function YVt(i){const e=i.find(n=>n.filename==="data.json"),t=await(e==null?void 0:e.getData(new wVt));return t?JSON.parse(t):null}async function m5(i,e,t){const n=i.find(r=>r.filename===`${e.id}/${t}`),o=await(n==null?void 0:n.getData(new Ppe));return o?URL.createObjectURL(o):null}async function $Vt(i,e){await Promise.all([m5(i,e,"document_file").then(t=>e.document&&(e.document.file=t)),m5(i,e,"structure_file").then(t=>e.structure_file=t),m5(i,e,"map_file").then(t=>e.map_file=t),m5(i,e,"binary_2d_file").then(t=>e.binary_2d_file=t),...e.xkt_files.map((t,n)=>m5(i,e,`xkt_file_v${t.version}`).then(o=>e.xkt_files[n]={version:t.version,file:o}))])}async function eHt(i){const t=await new UVt(new Spe(i)).getEntries(),n=await YVt(t);return await Promise.all(Object.values(n).flatMap(({model:o,buildings:r=[],storeys:s=[]})=>[o].concat(o.children).concat(r.flatMap(a=>a.plans).map(a=>a.plan)).concat(s.flatMap(a=>a.plans).map(a=>a.plan))).map(o=>$Vt(t,o))),n}function hL(i,e,t){return new Proxy(i[t],{get:function(n,o){if(e[o])return e[o];throw new Error(`[BIMData Viewer] Offline Error: method \`${t}.${o}\` is not mocked.`)}})}async function tHt(i,e,t){var l,c,u;typeof i=="string"&&(i=await fetch(i).then(d=>d.blob()));const n=await eHt(i),o=KVt(),r=JVt(),s=XVt(n);return Object.assign(o,(l=t.methods)==null?void 0:l.bcfApi),Object.assign(r,(c=t.methods)==null?void 0:c.collaborationApi),Object.assign(s,(u=t.methods)==null?void 0:u.modelApi),Object.assign({},e,{bcfApi:hL(e,o,"bcfApi"),collaborationApi:hL(e,r,"collaborationApi"),modelApi:hL(e,s,"modelApi")})}class iHt{constructor(e={}){const{apiUrl:t,archiveUrl:n,pdfBackendUrl:o,cloudId:r,projectId:s,accessToken:a,offline:l}=e;this.apiUrl=t,this.archiveUrl=n,this.pdfBackendUrl=o,this.cloudId=r,this.projectId=s,this._accessToken=a,this.offline=l??{enabled:!1};const c=FT.makeBIMDataApiClient({apiUrl:t,accessToken:a});this.apiClient=c,this.ready=Promise.resolve(),this.getModelsPromise=null,Object.assign(c,{BcfApi:function(){return console.warn("[BIMData Viewer] DEPRECATED - API - please use `apiClient.bcfApi` instead of `new apiClient.BcfApi()`."),c.bcfApi},CollaborationApi:function(){return console.warn("[BIMData Viewer] DEPRECATED - API - please use `apiClient.collaborationApi` instead of `new apiClient.CollaborationApi()`."),c.collaborationApi},ModelApi:function(){return console.warn("[BIMData Viewer] DEPRECATED - API - please use `apiClient.modelApi` instead of `new apiClient.ModelApi()`."),c.modelApi},IfcApi:function(){return console.warn("[BIMData Viewer] DEPRECATED - API - please use `apiClient.modelApi` instead of `new apiClient.IfcApi()`."),new Proxy(c.modelApi,{get:function(d,h,f){const A=h.replace("Deprecated","").replace("Ifc","Model");return Reflect.get(d,A,f)}})}})}get accessToken(){return this._accessToken}set accessToken(e){this._accessToken=e,this.apiClient.accessToken=e}async getAvailableModels(e=null,t=!1){return t&&(this.getModelsPromise=null),this.getModelsPromise||(this.getModelsPromise=this.apiClient.modelApi.getModels(this.cloudId,this.projectId)),(await this.getModelsPromise).filter(n=>(e==null?void 0:e.includes(n.type))??!0)}getModel(e){const{cloudId:t,projectId:n,apiClient:o}=this;return o.modelApi.getModel(t,e,n)}getIfc(e){return console.warn("[BIMData Viewer] DEPRECATED - API - please use the `getModel` method instead of `getIfc`."),this.getModel(e)}async getModelStructure(e){const o=(await(await fetch(e.structure_file)).json())[0];return bu(o),o}getIfcStructure(e){return console.warn("[BIMData Viewer] DEPRECATED - API - please use the getModelStructure method instead of getIfcStructure."),this.getModelStructure(e)}async getRawElements(e){const{cloudId:t,projectId:n,apiClient:o}=this,r=await o.modelApi.getRawElements(t,e,n);r.units.forEach(a=>{a.conversion_baseunit=r.units[a.conversion_baseunit_index],delete a.conversion_baseunit_index}),r.definitions.forEach(a=>{a.unit=r.units[a.unit_id],delete a.unit_id}),r.property_sets.forEach(a=>{a.properties.forEach(l=>{l.definition=r.definitions[l.def_id],delete l.def_id})});const s={};return r.elements.forEach(a=>{a.attributes=r.property_sets[a.attributes],a.property_sets=a.psets.map(l=>r.property_sets[l]),Object.assign(a,{get propertySets(){return console.warn("propertySets is deprecated, please use property_sets instead."),a.property_sets}}),delete a.psets,a.classifications=a.classifications.map(l=>r.classifications[l]),a.systems=a.systems.map(l=>r.systems[l]),a.layers=a.layers.map(l=>r.layers[l]),s[a.uuid]=a}),s}getStoreys(e){const{cloudId:t,projectId:n,apiClient:o}=this;return o.modelApi.getStoreys(t,e,n)}createModel(e){const{cloudId:t,projectId:n,apiClient:o}=this;return o.modelApi.createModel(t,n,{document_id:e})}async waitForModelProcess(e){const t=["C","E","X"];return t.includes(e.status)?e:new Promise((n,o)=>{const r=setInterval(async()=>{try{let s=await this.getModel(e.id);t.includes(s.status)&&(clearInterval(r),n(s))}catch(s){clearInterval(r),o(s)}},1e3)})}async createStoreyPlan(e,t,n){const{cloudId:o,projectId:r,apiClient:s}=this,a=await this.createModel(n);return await s.modelApi.createStoreyPlan(o,e,r,t,{id:a.id}),a}deleteStoreyPlan(e,t,n){const{cloudId:o,projectId:r,apiClient:s}=this;return s.modelApi.deleteStoreyPlan(o,n,e,r,t)}updatePlanPositioning(e,t,n,o){const{cloudId:r,projectId:s,apiClient:a}=this;return a.modelApi.updateStoreyPlanPositioning(r,n,e,s,t,o)}async enableOfflineMode(e,t={}){let n;this.ready=new Promise(o=>n=o),this.apiClient=await tHt(e,this.apiClient,t),this.offline.enabled=!0,n()}disableOfflineMode(){this.offline.enabled&&(this.apiClient=FT.makeBIMDataApiClient({apiUrl:this.apiUrl,accessToken:this.accessToken}),this.offline.enabled=!1)}}function nHt(i){const e=[{methodName:"selectObjects",property:"selected",value:!0,eventName:"objects-selected",exlusiveIndex:1},{methodName:"deselectObjects",property:"selected",value:!1,eventName:"objects-deselected"},{methodName:"highlightObjects",property:"highlighted",value:!0,eventName:"objects-highlighted"},{methodName:"unhighlightObjects",property:"highlighted",value:!1,eventName:"objects-unhighlighted"},{methodName:"showObjects",property:"visible",value:!0,eventName:"objects-shown"},{methodName:"hideObjects",property:"visible",value:!1,eventName:"objects-hidden"},{methodName:"xrayObjects",property:"xrayed",value:!0,eventName:"objects-xrayed"},{methodName:"unxrayObjects",property:"xrayed",value:!1,eventName:"objects-unxrayed"},{methodName:"setObjectsPickable",property:"pickable",value:!0,eventName:"objects-pickable"},{methodName:"setObjectsUnpickable",property:"pickable",value:!1,eventName:"objects-unpickable"}],t=e.reduce((o,r)=>(o[r.methodName]=function(s,a){n(this,r,a);const{property:l,value:c}=r,u=[];for(const d of s){const h=i.get(d);try{h[l]=c,u.push(h)}catch{console.warn(`object with id ${d} does not exist`)}}this.hub.emit(r.eventName,{objects:u,options:{...a}})},o[`${r.methodName}ByUuids`]=function(s,a){n(this,r,a);const{property:l,value:c}=r,u=s.map(d=>this.uuidsMap.get(d)).filter(d=>(d==null?void 0:d.length)>0).flatMap(d=>d.map(h=>(h[l]=c,h)));this.hub.emit(r.eventName,{objects:u,options:{...a}})},o),{}),n=(o,r,s)=>{if(r.exlusiveIndex!==void 0&&(s!=null&&s.exclusive)){const a=e[r.exlusiveIndex],{property:l,value:c}=r;o[a.methodName](o.objects.filter(u=>u[l]===c).map(u=>u.id),{options:{...s}})}};return{...t,colorizeObjects(o,r,s){const a=[];for(const l of o)try{const c=i.get(l);c.color=r,a.push(c)}catch{console.warn(`object with id ${l} does not exist`)}this.hub.emit("objects-colorized",{objects:a,color:r,options:{...s}})},colorizeObjectsByUuids(o,r,s){const a=o.flatMap(l=>this.uuidsMap.get(l));this.colorizeObjects(a.map(l=>l.id),r,s)},get objects(){return Array.from(i.values())},get objectsIds(){return this.objects.map(o=>o.id)},get objectsUuids(){return Array.from(new Set(this.objects.map(o=>o.uuid)))},get objectsMap(){return i}}}const oHt=Object.freeze({EXA:10**18,PETA:10**15,TERA:10**12,GIGA:10**9,MEGA:10**6,KILO:10**3,HECTO:10**2,DECA:10,DECI:10**-1,CENTI:10**-2,MILLI:10**-3,MICRO:10**-6,NANO:10**-9,PICO:10**-12,FEMTO:10**-15,ATTO:10**-18});async function sHt(i,e,t){async function n(u,d){try{const f=(await i.apiClient.modelApi.getElement(i.cloudId,t,i.projectId,u)).attributes.properties.find(A=>A.definition.name===d);if(f){const A=f.definition.unit;if(A){const{name:p,prefix:g}=A;p!=="METRE"&&console.warn(`[Viewer] Elevation unit other that "METRE" are not supported. Unit "${p}" fallback to "METRE".`);const m=oHt[g];return m===void 0&&console.warn(`[Viewer] Elevation unit prefix "${g}" is unknown and will be ignored.`),(f.value??0)*(m??1)}else return f.value??0}}catch(h){console.warn(`[Models] Cannot get elevation of object with uuid ${u}: ${h}`)}return 0}const o=new Map,r=new Map,s=new Map;function a(){const u=new Set(e.map(d=>{var h,f;return(f=(h=d.object)==null?void 0:h.site)==null?void 0:f.uuid}).filter(Boolean));return A8(u,10,(d,h)=>{n(d,"RefElevation").then(f=>{o.set(d,f),h()},h)})}function l(){const u=new Set(e.map(d=>{var h,f;return(f=(h=d.object)==null?void 0:h.building)==null?void 0:f.uuid}).filter(Boolean));return A8(u,10,(d,h)=>{n(d,"ElevationOfRefHeight").then(f=>{r.set(d,f),h()},h)})}function c(){return A8(e,10,(u,d)=>{n(u.uuid,"Elevation").then(h=>{s.set(u.uuid,h),d()},d)})}await Promise.all([a(),l(),c()]),e.forEach((u,d)=>{var A,p,g,m;const h=s.get(u.uuid)??d;u.elevation=h;const f=r.get((p=(A=u.object)==null?void 0:A.building)==null?void 0:p.uuid);if(f==null){const w=o.get((m=(g=u.object)==null?void 0:g.site)==null?void 0:m.uuid)??0;u.absoluteElevation=h+w}else u.absoluteElevation=h+f}),e.forEach((u,d)=>{var h,f;u.topElevation=((h=e[d+1])==null?void 0:h.elevation)??1/0,u.absoluteTopElevation=((f=e[d+1])==null?void 0:f.absoluteElevation)??1/0})}async function rHt(i,e,t){e.every(n=>n.bimdata_elevation!==null&&n.bimdata_elevation!==void 0)?(e.forEach(n=>{n.elevation=n.bimdata_elevation,n.absoluteElevation=n.bimdata_elevation}),e.forEach((n,o)=>{var r,s;n.topElevation=((r=e[o+1])==null?void 0:r.elevation)??1/0,n.absoluteTopElevation=((s=e[o+1])==null?void 0:s.absoluteElevation)??1/0})):await sHt(i,e,t)}class pL{constructor(e){const{archived:t,binary_2d_file:n,children:o,created_at:r,creator:s,document:a,document_id:l,errors:c,gltf_file:u,id:d,layout_name:h,map_file:f,name:A,north_vector:p,page_number:g,parent_id:m,preview_file:w,project_id:y,recommanded_2d_angle:v,size_ratio:x,source:M,status:E,structure_file:S,systems_file:I,type:T,updated_at:P,version:R,viewer_360_file:L,warnings:U,world_position:H,xkt_file:N,xkt_files:q}=e;this.id=d,this.name=A,this.type=T,this.archived=t,this.binary_2d_file=n,this.children=(o==null?void 0:o.map(J=>new pL(J)))??[],this.created_at=r,this.creator=s,this.document=a,this.document_id=l,this.errors=c,this.gltf_file=u,this.map_file=f,this.north_vector=p,this.page_number=g,this.parent_id=m,this.preview_file=w,this.project_id=y,this.recommanded_2d_angle=v,this.size_ratio=x,this.source=M,this.status=E,this.structure_file=S,this.systems_file=I,this.updated_at=P,this.version=R,this.viewer_360_file=L,this.warnings=U,this.world_position=H,this.xkt_file=N,this.xkt_files=q,this.layout_name=h}}class Zpe{constructor(e,t,n,o){this.model=t,this.storey=n,this.index=o,this.key=`${n.key}-${e.plan.id}-${o}`,this.translation_x=e.translation_x??0,this.translation_y=e.translation_y??0,this.rotate_z=e.rotate_z??0,this.scale=e.scale??1,this.opacity=e.opacity??1,this.plan=e.plan}}class aHt{constructor(e,t){this.model=t;const{name:n,uuid:o,plans:r,plans_unreachable_count:s,bimdata_elevation:a}=e;this.name=n,this.uuid=o,this.bimdata_elevation=a,this.key=`${t.id}-${this.uuid}`,this.plans_unreachable_count=s,this.plans=r.map((l,c)=>new Zpe(l,t,this,c)),this.object=t.uuids.get(this.uuid),this.objects=null,this.elevation=null,this.absoluteElevation=null,this.topElevation=null,this.absoluteTopElevation=null}get uuids(){return new Map([...this.objects.values()].map(e=>[e.uuid,e]))}}class fL extends zE{constructor(e,t){super(e,t,"zone");const{id:n,uuid:o,name:r,created_at:s,updated_at:a,parent_id:l,order:c,zones:u=[],spaces:d=[],color:h,storey_uuid:f}=e;this.id=n,this.uuid=o,this.name=r,this.created_at=s,this.updated_at=a,this.parent_id=l,this.order=c,this.zones=u.map(A=>new fL(A,t)),this.spaces=d,this.color=h,this.storey_uuid=f}getContainedSpaces(){const e=Array.from(this.spaces);for(const t of this.zones)e.push(...t.getContainedSpaces());return e}get area(){return this.getContainedSpaces().filter(t=>t.geometry).reduce((t,n)=>t+lHt(n.geometry),0)}get perimeter(){return this.getContainedSpaces().filter(t=>t.geometry).reduce((t,n)=>t+cHt(n.geometry),0)}}function lHt(i){let e=0;const t=i.length;for(let n=0;n<t;n++){const o=(n+1)%t;e+=i[n].x*i[o].y,e-=i[o].x*i[n].y}return Math.abs(e)/2}function cHt(i){let e=0;const t=i.length;for(let n=0;n<t;n++){const o=(n+1)%t;e+=Math.sqrt(Math.pow(i[o].x-i[n].x,2)+Math.pow(i[o].y-i[n].y,2))}return e}class uHt extends pL{constructor(e,t,{structure:n,zones:o,systems:r,storeys:s}={}){var c,u;if(super(t),this._stateObjectMap=e,this.uuids=new Map,n){const d=Mq(n,this,e),h=P$e(d);this.structure=d,this.objects=h,h.forEach(f=>{f.uuid&&this.uuids.set(f.uuid,f)})}else this.structure=null,this.objects=[];this.zones=[],this.setZones(o??[]),r==null||r.forEach(d=>{const h=new zE(d,this,"system");this.uuids.set(h.uuid,h),e.set(h.id,h),this.objects.unshift(h)}),this.storeys=(s==null?void 0:s.map(d=>new aHt(d,this)).sort(wu("order",!1)))??[];const a=new Map(this.storeys.map(d=>[d.uuid,new Set])),l=this.type==="DWG"?"layout":"storey";for(const d of this.objects)d.type!==l&&a.has((c=d[l])==null?void 0:c.uuid)&&a.get((u=d[l])==null?void 0:u.uuid).add(d);for(const d of this.storeys){const h=a.get(d.uuid);d.objects=h?[...h.values()]:[]}this.objects.forEach(d=>{var h,f;d.parent=this.uuids.get((h=d.parent)==null?void 0:h.uuid),d.children=(f=d.children)==null?void 0:f.map(A=>this.uuids.get(A.uuid)).filter(Boolean)})}setZones(e=[]){this.zones.forEach(t=>{this._stateObjectMap.delete(t.id),this.uuids.delete(t.uuid),this.objects.splice(this.objects.indexOf(t),1)}),this.zones=e.map(t=>{const n=new fL(t,this);return this._stateObjectMap.set(n.id,n),this.uuids.set(n.uuid,n),this.objects.unshift(n),n})}}const dHt=(i,e,t)=>{const{api:n}=t;async function o(r){if(typeof r=="string"&&(console.warn(`[State] 'loadModel' called with id ${r} as string and parsed as integer.`),r=parseInt(r)),i.get(r))return console.warn(`[State] 'loadModel' called with id ${r}}, model already loaded.`),i.get(r);const s=[n.apiClient.modelApi.getZones(n.cloudId,r,n.projectId),n.apiClient.modelApi.getSystems(n.cloudId,r,n.projectId),n.getStoreys(r)],a=await n.getModel(r);a.parent_id&&!i.get(a.parent_id)&&await o(a.parent_id),a.structure_file&&s.push(n.getModelStructure(a));const[l,c,u,d]=await Promise.all(s),h=new uHt(e,a,{structure:d,zones:l,systems:c,storeys:u});return await rHt(n,h.storeys,h.id),i.set(r,h),h}return{get models(){return Array.from(i.values())},get ifcs(){return console.warn("[BIMData Viewer] DEPRECATED - State model - please use the models instead of ifcs."),Array.from(i.values()).filter(r=>!r.type||r.type==="IFC")},get modelsMap(){return i},get ifcsMap(){return console.warn("[BIMData Viewer] DEPRECATED - State model - please use the modelsMap instead of ifcsMap."),new Map([...i].filter(([,r])=>!r.type||r.type==="IFC"))},async loadModels(r){const s=await Promise.allSettled(r.map(o));s.filter(l=>l.status==="rejected").forEach(l=>console.error(l.reason));const a=s.filter(l=>l.status==="fulfilled").map(l=>l.value);if(a.length>0){const l=a.filter(c=>!c.type||c.type==="IFC");l.length&&this.hub.emit("ifcs-loaded",{ifcs:l}),this.hub.emit("models-loaded",{models:a}),t.globalContext.hub.emit("models-loaded",{models:a}),this.hub.emit("objects-added",{objects:a.flatMap(c=>c.objects)})}return a},loadIfcs(r){return console.warn("[BIMData Viewer] DEPRECATED - State model - please use the loadModels method instead of loadIfcs."),this.loadModels(r)},unloadModels(r){const s=[],a=[];if(r.forEach(l=>{const c=i.get(l);c?(i.delete(l),c.objects.map(d=>(a.push(d),d.id)).forEach(d=>e.delete(d)),s.push(c)):console.warn(`[State] Cannot unload model with id ${l} because it is not loaded.`)}),a.length>0&&this.hub.emit("objects-removed",{objects:a}),s.length>0){const l=s.filter(c=>!c.type||c.type==="IFC");l.length&&this.hub.emit("ifcs-unloaded",{ifcs:l}),this.hub.emit("models-unloaded",{models:s})}return s},unloadIfcs(r){return console.warn("[BIMData Viewer] DEPRECATED - State model - please use the unloadModels method instead of unloadIfcs."),this.unloadModels(r)},getStoreyFromAbsoluteElevation(r,s){var a;if(!r.storeys)return null;for(let l=0;l<r.storeys.length;l++)if(s>=r.storeys[l].absoluteElevation&&s<(((a=r.storeys[l+1])==null?void 0:a.absoluteElevation)??1/0))return r.storeys[l];return r.storeys[0]}}};function hHt(i){return{async createPlan(e,t,n,o){const r=await i.api.createStoreyPlan(e.id,t.uuid,n.id);await i.api.updatePlanPositioning(e.id,t.uuid,r.id,o);const s=new Zpe({...o,plan:r},e,t,e.storeys.length);return t.plans.push(s),this.hub.emit("plan-created",{plan:s}),s},async updatePlan(e){const t=await i.api.updatePlanPositioning(e.model.id,e.storey.uuid,e.plan.id,e);return Object.assign(e,t),this.hub.emit("plan-updated",{plan:e}),e},async deletePlan(e){await i.api.deleteStoreyPlan(e.model.id,e.storey.uuid,e.plan.id),e.storey.plans=e.storey.plans.filter(t=>t.key!==e.key),this.hub.emit("plan-deleted",{plan:e})}}}const pHt=(i,e)=>{const t={getObjectsByUuids(n){return n.flatMap(o=>this.uuidsMap.get(o))},getObject(n){return console.warn("[BIMData Viewer] DEPRECATED - State - `getObject` is deprecated, use `objectsMap.get` instead."),e.get(n)},getIfc(n){return console.warn("[BIMData Viewer] DEPRECATED - State - `getIfc` is deprecated, use `modelsMap.get` instead."),i.get(n)},get colorizedObjects(){return Array.from(e.values()).filter(n=>!!n.color)},get colorizedObjectsIds(){return this.colorizedObjects.map(n=>n.id)},get colorizedObjectsUuids(){return Array.from(new Set(this.colorizedObjects.map(n=>n.uuid)))},getObjectsOfType(n){return Array.from(e.values()).filter(o=>o.type===n)},getTypesOf(n){typeof n.map>"u"&&(n=[...n]);const o=new Set;return n.forEach(r=>{const s=e.get(r);s&&s.type&&o.add(s.type)}),Array.from(o).sort()},getObjectsWithTheSameTypeAs(n){const o=this.getTypesOf(n);return[...e.values()].filter(r=>o.includes(r.type))}};return fHt.forEach(n=>{Object.defineProperty(t,n.name,{get(){return Array.from(e.values()).filter(o=>o[n.property]===n.value).map(o=>Object.freeze(Object.defineProperties({},Object.getOwnPropertyDescriptors(o))))}}),Object.defineProperty(t,`${n.name}Ids`,{get(){return this[n.name].map(AHt)}}),Object.defineProperty(t,`${n.name}Uuids`,{get(){return Array.from(new Set(this[n.name].map(mHt)))}})}),t},fHt=[{name:"selectedObjects",property:"selected",value:!0},{name:"deselectedObjects",property:"selected",value:!1},{name:"highlightedObjects",property:"highlighted",value:!0},{name:"unhighlightedObjects",property:"highlighted",value:!1},{name:"visibleObjects",property:"visible",value:!0},{name:"unvisibleObjects",property:"visible",value:!1},{name:"xrayedObjects",property:"xrayed",value:!0},{name:"unxrayedObjects",property:"xrayed",value:!1},{name:"pickableObjects",property:"pickable",value:!0},{name:"unpickableObjects",property:"pickable",value:!1}];function AHt(i){return i.id}function mHt(i){return i.uuid}function AL(i,e,t){var n;return(n=i.mixins)!=null&&n.some(o=>o[t])||(i.mixins?i.mixins[i.mixins.length]=e:i.mixins=[e]),i}const Xpe=Symbol("annotation-mixin-id");function gHt(){let i=0;const e=new Map;return{get annotations(){return Array.from(e.values())},addAnnotation({x:t=0,y:n=0,z:o=0,draggable:r=!0,grabberSelector:s,component:a={render(){}},props:l={}}={},c){const u=this,d=i++,h={get id(){return d},get x(){return t},set x(f){t=f,u.hub.emit("annotation-updated",{annotation:h})},get y(){return n},set y(f){n=f,u.hub.emit("annotation-updated",{annotation:h})},get z(){return o},set z(f){o=f,u.hub.emit("annotation-updated",{annotation:h})},draggable:r,grabberSelector:s,component:a,props:l};return AL(h.component,{[Xpe]:!0,inject:["$viewer"]},Xpe),e.set(d,h),this.hub.emit("annotation-added",{annotation:h,options:c}),h},removeAnnotation(t,n){return e.has(t.id)?(e.delete(t.id),this.hub.emit("annotation-removed",{annotation:t,options:n}),!0):!1},clearAnnotations(){e.forEach(t=>this.removeAnnotation(t))}}}function vHt(i){const e=new Map,t=new Map,n={uuidsMap:{get(o){const r=[];return e.forEach(s=>{const a=s.uuids.get(o);a&&r.push(a)}),r}},hub:new cu};return[dHt(e,t,i),nHt(t),hHt(i),gHt(),pHt(e,t)].forEach(o=>Object.defineProperties(n,Object.getOwnPropertyDescriptors(o))),n}function yHt(i){if((i==null?void 0:i.type)==="container")xHt(i);else if((i==null?void 0:i.type)==="zone")bHt(i);else throw new TypeError("AREAS CORE - Layout first child must be a zone or a container.");return wHt(i),i}function wHt(i){const e=new Set,t=new Set;for(let n of i)if(n.id!=null)if(n.type==="zone"){if(e.has(n.id))throw new Error("AREAS CORE - Cannot add the same zone id twice.");e.add(n.id)}else{if(t.has(n.id))throw new Error("AREAS CORE - Cannot add the same container id twice.");t.add(n.id)}}function CHt(i){Ype(i.layout,"zone",i.zoneIdManager),Ype(i.layout,"container",i.containerIdManager)}function Ype(i,e,t){const n=[...i].filter(r=>r.type===e);n.map(r=>r.id).filter(r=>r!=null).forEach(r=>t.add(r)),n.filter(r=>r.id===void 0||r.id===null).forEach(r=>{r.id=t.nextId()})}function bHt(i){if(typeof i!="object")throw new TypeError("AREAS CORE - Invalid zone. Zone must be an object.");if((i==null?void 0:i.type)!=="zone")throw new TypeError('AREAS CORE - Invalid zone. A zone must be of type "zone".');return i}function xHt(i){var e,t;if(typeof i!="object")throw new TypeError("AREAS CORE - Invalid container. A container must be an object.");if((i==null?void 0:i.type)!=="container")throw new TypeError('AREAS CORE - Invalid container. Container must be of type "container".');if(i!=null&&i.direction&&!["row","column"].includes(i.direction))throw new TypeError('AREAS CORE - Invalid container. Container direction must be of type "row" or "column".');if(((e=i==null?void 0:i.children)==null?void 0:e.length)<2)throw new TypeError("AREAS CORE - Invalid container. Container children must have at least 2 children.");if(((t=i==null?void 0:i.children)==null?void 0:t.reduce((n,o)=>n+(o==null?void 0:o.ratio),0))!==100)throw new TypeError("AREAS CORE - Invalid container. The sum of container children ratios must be equal to 100.");return i}function $pe(i){var e;return(e=i.children)!=null&&e.length&&i.children.forEach(t=>{Object.defineProperty(t,Symbol.iterator,{value:$pe(t),configurable:!0})}),function*(){var t;if(yield i,(t=i.children)!=null&&t.length)for(let n of i.children)yield*n}}function Tm(i){return Object.defineProperty(i,Symbol.iterator,{value:$pe(i),configurable:!0}),i}function efe(){let i=1;const e=new Set;return{nextId(){for(;!this.isIdAvailable(i);)i++;return e.add(i),i},isIdAvailable(n){return!e.has(n)},add(n){return this.isIdAvailable(n)?(e.add(n),n):!1}}}function tfe(i){var t;if(!i)return;const e=Object.assign({},i);return((t=i.children)==null?void 0:t.length)>0&&(e.children=i.children.map(tfe)),e}function MHt(i){return e=>{const t=i.getZone(e);if(!t)return!1;const n=i.getParent(t);if(!n)throw new Error("AREAS CORE - Cannot delete root Zone");const o=n.children.indexOf(t);if(n.children.length>2){const r=n.children[o-1],s=n.children[o+1];o===0?s.ratio+=t.ratio:o===n.children.length-1?r.ratio+=t.ratio:(r.ratio+=Math.floor(t.ratio/2),s.ratio+=Math.ceil(t.ratio/2)),n.children=n.children.filter(a=>a.type!=="zone"||a.id!==e)}else{const r=n.children[o===1?0:1];r.ratio=n.ratio;const s=i.getParent(n);if(s){const a=s.children.indexOf(n);s.children.splice(a,1,r)}else i.layout=r}return!0}}var EHt=MHt;function BHt(i){return()=>ife(i.layout,[i.layout])}function ife(i,e=[]){var t;return(t=i.children)==null||t.forEach(n=>{e.push(n),n.type==="container"&&ife(n,e)}),e}var IHt=BHt;function SHt(i){return e=>{if(!e)throw new TypeError("AREAS CORE - fail to get parent: container child is null or undefined");return i.layout.type==="zone"?null:nfe(i.layout,e)}}function nfe(i,e){for(let t of i.children){if(t===e)return i;if(t.type==="container"){const n=nfe(t,e);if(n)return n}}return null}var PHt=SHt;function THt(i){return e=>i.layout.type==="zone"?i.layout.id===e?i.layout:null:ofe(i.layout,e)}function ofe(i,e){for(let t of i.children)if(t.type==="zone"){if(t.id===e)return t}else{const n=ofe(t,e);if(n)return n}return null}var kHt=THt;function RHt(i){return(t,n)=>{if(typeof n!="number")throw new TypeError("AREAS CORE - resize value must be a number.");const o=i.getParent(t),r=o.children.findIndex(a=>a===t);if(r===-1)return!1;const s=o.children[r+1];if(s){const a=t.ratio+s.ratio;let l=t.ratio+n;return l=l<0?0:l,l=l>a?a:l,t.ratio=l,s.ratio=a-l,!0}else return!1}}var DHt=RHt;function _Ht(i){return(e,t=50,n="row",o=!0,r=null)=>{const s=i.getZone(e);if(!s)throw new Error(`AREAS CORE - fail to split zone ${e}: zone does not exist.`);if(typeof t!="number"||t<0||t>100)throw new TypeError(`AREAS CORE - fail to split zone: invalid ratio ${t}, ratio should be a number between 0 and 100.`);if(n!=="row"&&n!=="column")throw new TypeError(`AREAS CORE - fail to split zone: invalid direction ${n}, direction should be 'row' or 'column'.`);const a=i.getParent(s),l=Tm({id:i.zoneIdManager.nextId(),type:"zone",...r});if(a){const c=a.children.findIndex(u=>u===s);if(a.direction===n)o?(l.ratio=Math.floor(s.ratio*(100-t)/100),s.ratio=Math.ceil(s.ratio*t/100),a.children.splice(c,1,s,l)):(l.ratio=Math.floor(s.ratio*t/100),s.ratio=Math.ceil(s.ratio*(100-t)/100),a.children.splice(c,1,l,s));else{const u=Tm({id:i.containerIdManager.nextId(),type:"container",direction:n,ratio:s.ratio});o?(l.ratio=Math.floor(100-t),s.ratio=Math.ceil(t),u.children=[s,l]):(l.ratio=Math.floor(t),s.ratio=Math.ceil(100-t),u.children=[l,s]),a.children.splice(c,1,u)}}else{const c=Tm({id:i.containerIdManager.nextId(),type:"container",direction:n});o?(l.ratio=Math.floor(100-t),s.ratio=Math.ceil(t),c.children=[s,l]):(l.ratio=Math.floor(t),s.ratio=Math.ceil(100-t),c.children=[l,s]),i._layout=c}return l}}var LHt=_Ht;function FHt(i){return(e=50,t="row",n=!0,o=null)=>{const r=i.layout;if(typeof e!="number"||e<0||e>100)throw new TypeError(`AREAS CORE - fail to split layout: invalid ratio ${e}, ratio should be a number between 0 and 100.`);if(t!=="row"&&t!=="column")throw new TypeError(`AREAS CORE - fail to split layout: invalid direction ${t}, direction should be 'row' or 'column'.`);const s=Tm({id:i.zoneIdManager.nextId(),type:"zone",...o}),a=Tm({id:i.containerIdManager.nextId(),type:"container",direction:t});return n?(s.ratio=Math.floor(100-e),r.ratio=Math.ceil(e),a.children=[r,s]):(s.ratio=Math.floor(e),r.ratio=Math.ceil(100-e),a.children=[s,r]),i._layout=a,s}}var OHt=FHt;function UHt(i){return(e,t)=>{const n=i.getZone(e),o=i.getZone(t);if(!n)throw new Error(`AREAS CORE - fail to swap zone ${e}: zone does not exist.`);if(!o)throw new Error(`AREAS CORE - fail to swap to zone ${t}: zone does not exist.`);const r=i.getParent(n),s=i.getParent(o),a=r.children.indexOf(n),l=s.children.indexOf(o),c=n.ratio,u=o.ratio;n.ratio=u,o.ratio=c,r.children[a]=o,s.children[l]=n}}var NHt=UHt;function VHt(i){const e={_layout:null,get layout(){return this._layout},set layout(t){t||(t={type:"zone"}),Tm(t),yHt(t),this._layout=t,CHt(e)},zoneIdManager:efe(),containerIdManager:efe()};return e.layout=i,e.deleteZone=EHt(e),e.getNodes=IHt(e),e.getParent=PHt(e),e.getZone=kHt(e),e.resize=DHt(e),e.splitZone=LHt(e),e.splitLayout=OHt(e),e.swapZones=NHt(e),e}var HHt=VHt;function sfe(i=1,e=0,t=100){return Math.min(Math.max(e,i),t)}function rfe(i,e){const t=i.getParent(e);if(t){const{width:n,height:o}=rfe(i,t),r=t.children.length-1;return t.direction==="column"?{width:n,height:Math.max(0,(o-r*i.separatorSize)*(e.ratio/100))}:{width:Math.max(0,(n-r*i.separatorSize)*(e.ratio/100)),height:o}}else return{width:i.width,height:i.height}}function afe(i,e,t){const{width:n,height:o}=rfe(i,e),r=e.children.length-1;if(e.direction==="column"){const s=1-r*i.separatorSize/o;return{height:`${sfe(t.ratio*s,0,100)}%`,width:"100%"}}else{const s=1-r*i.separatorSize/n;return{height:"100%",width:`${sfe(t.ratio*s,0,100)}%`}}}function zHt(i,e){const t={ref:i.contentManager.getRef(e.id),id:`zone-${e.id}`,class:"areas-zone",style:{flexGrow:0,overflow:"hidden"},key:e.id},n=i.getParent(e);if(n){const{width:o,height:r}=afe(i,n,e);t.style={width:o,height:r}}else t.style={height:"100%"};return i.vue.h("div",t)}var mL=zHt;function jHt(i,e,t){const{separatorSize:n,separatorDetectionMargin:o,separatorDetectionZIndex:r}=i,s=e.direction==="column",a={ref:`separator-${e.id}-${t+1}`,class:"areas-separator",style:{[s?"height":"width"]:`${n}px`,backgroundColor:"var(--areas-separator-color, black)",flexShrink:0,position:"relative"}},l=s?"ns-resize":"ew-resize",c=i.vue.h("div",{style:{position:"absolute",[s?"height":"width"]:`${o*2}px`,[s?"width":"height"]:"100%",[s?"top":"left"]:`${-o+n/2}px`,zIndex:r,cursor:l},onMousedown:u=>GHt(i,e,t,u,l)});return i.vue.h("div",a,i.resizable?[c]:null)}function GHt(i,e,t,n,o){n.preventDefault(),n.stopPropagation(),document.body.style.cursor=o;const r=a=>qHt(i,e,t,a),s=()=>QHt(r,s);document.addEventListener("mousemove",r),document.addEventListener("mouseup",s)}function qHt(i,e,t,n){const o=e.children[t],r=e.direction==="column"?"height":"width",a=i.root.$refs[`separator-${e.id}-${t+1}`].getBoundingClientRect(),{separatorSize:l}=i,c=(e.direction==="column"?n.clientY-a.y:n.clientX-a.x)-l/2,u=i.root.$refs[`container-${e.id}`].getBoundingClientRect()[r],d=c/u*100;i.resize(o,d)}function QHt(i,e){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e),document.body.style.cursor=""}var KHt=jHt;function gL(i,e){const t={ref:`container-${e.id}`,id:`container-${e.id}`,class:"areas-container",style:{height:"100%",display:"flex",flexDirection:e.direction}},n=i.getParent(e);if(n){const{width:s,height:a}=afe(i,n,e);t.style.width=s,t.style.height=a}const o=e.children.length-1,r=e.children.map((s,a)=>a<=o-1?[s.type==="zone"?mL(i,s):gL(i,s),KHt(i,e,a)]:s.type==="zone"?mL(i,s):gL(i,s));return i.vue.h("div",t,[r])}var JHt=gL;function WHt(i){const e=new Map,t=new Map,n=new Map;e.set("default",{component:{render(){return i.vue.h("div","Default component")}}});function o(s){return s&&!e.has(s)&&(console.warn(`[AREAS] Content with name ${s} is not registered, fallback to 'default'.`),s="default"),e.get(s)}return{registerContent(s,a){e.set(s,{name:s,component:a})},renderContent(s){return[...s].filter(a=>a.type==="zone").forEach(a=>{t.set(a.id,Object.assign({},o(a.content??"default"),{ref:i.vue.ref(null),options:{zoneId:a.id,...a.options,key:a.id},name:a.content??"default"}))}),i.vue.h("div",{style:{display:"none"}},[...t.values()].map(a=>i.vue.h(a.component,{...a.options,ref:a.ref})))},link(){[...n.entries()].forEach(([s,a])=>{const l=t.get(s);if(!l)return;const c=l.ref.value.$el,u=a.value;for(;u.lastChild;)u.removeChild(u.lastChild);u.appendChild(c)})},getElementZoneId(s){var a;for(const[l,c]of[...n.entries()])if((a=c.value)!=null&&a.contains(s))return l;return null},getRef(s){let a=n.get(s);return a||(a=i.vue.ref(null),n.set(s,a)),a},deleteZoneContent(s){t.delete(s),n.delete(s)},clean(){t.clear(),n.clear()}}}var ZHt=WHt;function XHt(i,e,t){const n=e.ref(0),o=e.ref(0),{separatorSize:r=2,separatorDetectionMargin:s=10,separatorDetectionZIndex:a=2,resizable:l=!0}=t??{},c=e.ref(!!l),u={vue:e,core:i,zones:e.ref([]),get resizable(){return c.value},set resizable(h){c.value=h},get width(){return n.value},get height(){return o.value},get separatorSize(){return r},get separatorDetectionMargin(){return s},get separatorDetectionZIndex(){return a},getParent(h){return this.core.getParent(h)},async coreLayoutSync(h=!1){this.layout&&(h?this.layout.value=this.core.layout:e.triggerRef(this.layout),await e.nextTick(),this.contentManager.link())},resize(h,f){this.core.resize(h,f),e.triggerRef(this.layout)},async split(h,f,A,p,g){const m=this.core.splitZone(h,f,A,p,g);return await this.coreLayoutSync(this.zones.value.length===1),m},async splitLayout(h,f,A,p){const g=this.core.splitLayout(h,f,A,p);return await this.coreLayoutSync(!0),g},async delete(h){let f=!1;const A=this.core.getZone(h);if(A){const g=this.core.getParent(A);f=(g==null?void 0:g.children.length)===2&&this.core.getParent(g)===null}this.contentManager.deleteZoneContent(h);const p=this.core.deleteZone(h);return await this.coreLayoutSync(f),p},async swap(h,f){const A=this.core.swapZones(h,f);return await this.coreLayoutSync(),A},destroy(){var h;(h=this.resizeObserver)==null||h.disconnect()},root:null,get component(){return this.layout=e.shallowRef(i.layout),e.watch(this.layout,h=>{this.zones.value=[...h].filter(f=>f.type==="zone")},{immediate:!0}),{created(){u.root=this},mounted(){const{width:h,height:f}=this.$el.getBoundingClientRect();n.value=h,o.value=f,u.resizeObserver=new ResizeObserver(A=>A.forEach(p=>{const{width:g,height:m}=p.target.getBoundingClientRect();n.value=g,o.value=m})),u.resizeObserver.observe(this.$el),u.contentManager.link()},render(){return e.h("div",{class:"areas-root"},[u.contentManager.renderContent(u.layout.value),d(u.layout.value)])}}}};u.contentManager=ZHt(u);function d(h){return h.type==="zone"?mL(u,h):JHt(u,h)}return u}var YHt=XHt;function $Ht(i,e=null,t=null){const n=HHt(e),o=YHt(n,i,t);return Object.freeze({core:n,renderer:o,destroy(){o.destroy()},swap(s,a){return this.renderer.swap(s,a)},split(s,a,l,c,u){return this.renderer.split(s,a,l,c,u)},splitLayout(s,a,l,c){return this.renderer.splitLayout(s,a,l,c)},delete(s){return this.renderer.delete(s)},registerContent(s,a){this.renderer.contentManager.registerContent(s,a)},getElementZoneId(s){return this.renderer.contentManager.getElementZoneId(s)},get layout(){return tfe(this.core.layout)},set layout(s){this.core.layout=s,this.renderer.contentManager.clean(),this.renderer.coreLayoutSync(!0)},get component(){return this.renderer.component},get resizable(){return this.renderer.resizable},set resizable(s){this.renderer.resizable=s}})}var ezt=$Ht;function tzt(i){return Array.isArray(i==null?void 0:i.children)?cfe(i):lfe(i)}function lfe(i,e=100){return{type:"zone",ratio:e,options:typeof i=="string"?{windowName:i}:i}}function cfe(i,e=100){return{type:"container",ratio:e,direction:i.direction,children:i.children.map((t,n)=>Array.isArray(t==null?void 0:t.children)?cfe(t,i.ratios[n]):lfe(t,i.ratios[n]))}}function izt(i,e,t=!0){return i.type==="zone"?ufe(i,e,t):dfe(i,e,t)}function ufe(i,e,t=!0){var r,s;const n=e.get(i.id);if(!n)throw new Error(`[Layout parser] Local context with id ${i.id} not found`);return{windowName:((r=n.window)==null?void 0:r.name)??null,windowState:{modelIds:n.loadedModelIds,viewpoint:(t||void 0)&&n.viewer&&n.getViewpoint(),storey:(s=n.selectedStorey)==null?void 0:s.key}}}function dfe(i,e,t=!0){return{direction:i.direction,ratios:i.children.map(n=>n.ratio),children:i.children.map(n=>n.type==="zone"?ufe(n,e,t):dfe(n,e,t))}}const nzt={props:{text:{type:String,default:""}},emits:["close"]},ozt={class:"success-modal"},szt={class:"success-modal__close"},rzt={class:"success-modal__title"},azt={class:"success-modal__title--icon"},lzt={class:"success-modal__text"},czt={class:"success-modal__button"};function uzt(i,e,t,n,o,r){const s=k("BIMDataIconClose"),a=k("BIMDataPieSpinner"),l=k("BIMDataIconSuccess"),c=k("BIMDataButton");return B(),O("div",ozt,[b("div",szt,[D(a,{delay:5,onStop:e[1]||(e[1]=u=>i.$emit("close"))},{default:V(()=>[D(s,{class:"icon-close",size:"xxxs",onClick:e[0]||(e[0]=u=>i.$emit("close"))})]),_:1})]),b("div",rzt,[b("h2",null,K(i.$t("modal.success")),1),b("span",azt,[D(l,{class:"fill-primary"})])]),b("div",lzt,K(t.text||i.$t("modal.success")),1),b("div",czt,[D(c,{class:"bimdata-btn__fill bimdata-btn__fill--primary bimdata-btn__radius",onClick:e[2]||(e[2]=u=>i.$emit("close"))},{default:V(()=>[nt(K(i.$t("modal.button")),1)]),_:1})])])}const dzt=z(nzt,[["render",uzt],["__scopeId","data-v-79d3a107"]]),hfe=Symbol("modal-mixin-id"),hzt={inject:["$viewer"],data(){return{modals:[]}},computed:{notBlocking(){var i;return((i=this.modal)==null?void 0:i.blocking)===!1},modal(){return this.modals.length?this.modals[0]:null},positionning(){var e;if(!((e=this.modal)!=null&&e.positions))return;const i=this.modal.positions;return{top:i.top?`${i.top}`:"0",right:i.right?`${i.right}`:"0",bottom:i.bottom?`${i.bottom} `:"0",left:i.left?`${i.left}`:"0"}}},created(){document.addEventListener("keydown",e=>{this.notBlocking&&e.key==="Escape"&&this.clearModal()});const i=this;this.mixin={[hfe]:!0,beforeCreate(){!this._.setupState.$viewer&&(this.$plugin=i.$plugin,this.$viewer=i.$viewer)}}},methods:{pushModal(i,e={},{display:t="full",positions:n,blocking:o=!0,exclusive:r=!1}={}){r&&(this.modals=[]),this.inject$viewerRecursively(i),this.modals.push({component:la(i),props:e,display:t,positions:n,blocking:o})},clearModal(){this.modals.shift()},clearModals(){this.modals=[]},inject$viewerRecursively(i){AL(i,this.mixin,hfe),i.components&&Object.values(i.components).forEach(e=>this.inject$viewerRecursively(e))},getModal(i){const e={success:dzt};if(Object.keys(e).includes(i))return e[i];console.warn(`Modal name unknown : ${i}`)}}},pzt={class:"bimdata-modal-manager__content"};function fzt(i,e,t,n,o,r){const s=fi("click-away");return r.modal?(B(),O("div",{key:0,class:de(["bimdata-modal-manager",{full:r.modal.display==="full",banner:r.modal.display==="banner"}]),style:ue(r.positionning),onClick:e[0]||(e[0]=ft(a=>r.notBlocking?r.clearModal():null,["self"]))},[At((B(),O("div",pzt,[(B(),Z(bn(r.modal.component),Cs(r.modal.props,{onClose:r.clearModal}),null,16,["onClose"]))])),[[s,()=>r.notBlocking?r.clearModal():null,"mousedown"]])],6)):ne("",!0)}const pfe=z(hzt,[["render",fzt]]),Azt={props:{plugin:{type:Object,required:!0}},setup(i){const e=mt("$viewer"),{plugin:t}=i;fn("$plugin",t),ffe(t.component,e.localContext,t)}},vL=Symbol("plugin-mixin-id");function ffe(i,e,t,n=!0){var s;if(!!((s=i.mixins)!=null&&s.some(a=>a[vL])))return;const r={[vL]:!0,beforeCreate(){!this._.setupState.$viewer&&(this.$plugin=t,this.$viewer=e.$viewer),Object.defineProperties(this,{$isOpen:{get(){return t.isOpen}},$loading:{get(){return t.loading}},$shown:{get(){return t.shown}}}),n&&(t.componentInstance=this,t.isViewer&&(e.viewer=this))},methods:{$open(...a){t.open(...a)},$close(...a){t.close(...a)},$show(){t.show()},$hide(){t.hide()}}};n&&(r.props={plugin:{type:Object,required:!0}},r.provide={pluginInstance:t},r.created=function(){e.hub.emit("plugin-created",{name:t.name,plugin:this}),e.$viewer.globalContext.hub.emit("plugin-created",{name:t.name,plugin:this})},r.unmounted=function(){e.hub.emit("plugin-destroyed",{name:t.name,plugin:this}),e.$viewer.globalContext.hub.emit("plugin-destroyed",{name:t.name,plugin:this})}),AL(i,r,vL),i.components&&Object.values(i.components).forEach(a=>ffe(a,e,t,!1))}function mzt(i,e,t,n,o,r){return At((B(),Z(bn(t.plugin.component),{class:"plugin-component-instance-container",plugin:t.plugin},null,8,["plugin"])),[[Gt,t.plugin.shown]])}const g5=z(Azt,[["render",mzt]]),gzt={components:{PluginComponentInstanceContainer:g5},props:{plugin:{type:Object,required:!0,validator(i){return i.sidePanel.width?typeof i.sidePanel.width=="number":i.sidePanel}}}};function vzt(i,e,t,n,o,r){const s=k("PluginComponentInstanceContainer");return At((B(),O("div",{class:"side-panel",style:ue(`
5491
5491
  --side-panel-width: ${t.plugin.sidePanelWidth}px;
5492
5492
  ${t.plugin.sidePanel.position==="left"?"border-right":"border-left"}: 1px solid var(--color-silver);
5493
5493
  `)},[D(s,{plugin:t.plugin,style:{height:"100%"}},null,8,["plugin"])],4)),[[Gt,t.plugin.shown]])}const yzt=z(gzt,[["render",vzt],["__scopeId","data-v-ced3f116"]]),wzt={props:{name:{type:String,default:"box"},content:{type:String,default:""},width:{type:[Number,String],default:20},height:{type:[Number,String],default:20},color:{type:String,default:"currentColor"},x:{type:[Number,String],default:20},y:{type:[Number,String],default:20}},computed:{viewBox(){return`0 0 ${this.x} ${this.y}`}}},Czt=["width","height","viewBox","aria-labelledby","fill"],bzt=["innerHTML"];function xzt(i,e,t,n,o,r){return B(),O("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,viewBox:r.viewBox,"aria-labelledby":t.name,fill:t.color,role:"presentation"},[b("g",{innerHTML:t.content},null,8,bzt)],8,Czt)}const Mzt=z(wzt,[["render",xzt]]),Ezt=["src"],Bzt={__name:"PluginIcon",props:{plugin:{type:Object,required:!0},isOpen:{type:Boolean,required:!0}},setup(i){const e=i,t=vn(null);return qa(()=>{e.isOpen&&e.plugin.button.iconOpen?t.value=e.plugin.button.iconOpen:e.plugin.button.icon?t.value=e.plugin.button.icon:t.value={component:"BIMDataIcon",options:{name:"default",size:"m"}}}),(n,o)=>t.value.imgUri?(B(),O("img",{key:0,src:t.value.imgUri,style:{"max-width":"40px","max-height":"40px"}},null,8,Ezt)):t.value.svgPath?(B(),Z(Mzt,Cs({key:1},t.value.options,{content:t.value.svgPath}),null,16,["content"])):t.value.component?(B(),Z(bn(t.value.component),_r(Cs({key:2},t.value.options)),null,16)):ne("",!0)}},Izt={key:0,class:"tools-menu__info"},Szt={class:"window"},Pzt={class:"plugins-as-button__content"},Tzt={class:"plugins-as-button__panel__header"},kzt={class:"panel__content"},Rzt={__name:"PluginAsButton",props:{plugin:{type:Object,required:!0},active:{type:Boolean,required:!0},position:{type:String,required:!0,validator(i){return["right","left"].includes(i)}}},emits:["focus"],setup(i,{emit:e}){const t=e,n=mt("$viewer"),{localContext:o}=n,r=i,{active:s}=W5(r),a=r.plugin,l=et(()=>a.isOpen),c=et(()=>a.buttonText),u=et(()=>r.active?2:1);function d(){l.value&&t("focus")}function h(){l.value?a.close():a.open()}function f(){Sn(()=>{l.value&&!a.button.keepOpen&&!a.loading&&a.close()})}return(A,p)=>{const g=k("BIMDataSpinner"),m=k("BIMDataButton"),w=k("BIMDataTooltip"),y=fi("click-away");return At((B(),O("div",{class:"plugins-as-button",style:ue({zIndex:u.value,position:Ct(a).button.content==="simple"?"relative":null})},[b("div",{class:"tools-menu m-b-12",onMouseenter:d},[D(w,{ref:"tooltip",class:de({open:l.value}),text:Ct(a).button.tooltip?A.$t(Ct(a).button.tooltip):Ct(a).name,position:i.position==="left"?"right":"left",disabled:l.value},{default:V(()=>[D(m,{width:"45px",height:"45px",fill:"",icon:"",color:"default",class:de({focus:Ct(s)}),"data-test":`plugin-${Ct(a).name}`,onClick:p[0]||(p[0]=v=>h())},{default:V(()=>[c.value?(B(),O("span",Izt,K(Ct(uZe)(c.value,Ct(a).button.truncateSize||4)),1)):ne("",!0),Ct(a).loading?(B(),Z(g,{key:1})):(B(),Z(Bzt,{key:2,plugin:Ct(a),"is-open":l.value},null,8,["plugin","is-open"]))]),_:1},8,["class","data-test"])]),_:1},8,["class","text","position","disabled"])],32),b("div",Szt,[D(vi,{name:`slide-fade-${i.position}`},{default:V(()=>[At(b("span",Pzt,[Ct(a).button.content==="panel"?(B(),O("div",{key:0,class:de(["plugins-as-button__submenu",`plugins-as-button__submenu--${i.position==="right"?"left":"right"}__panel`])},[b("div",Tzt,K(Ct(a).button.tooltip?A.$t(Ct(a).button.tooltip):Ct(a).name),1),b("div",kzt,[D(g5,{plugin:Ct(a)},null,8,["plugin"])])],2)):(B(),Z(g5,{key:1,class:de(["plugins-as-button__submenu",`plugins-as-button__submenu--${i.position==="right"?"left":"right"}__${Ct(a).button.content||"free"}`]),plugin:Ct(a)},null,8,["class","plugin"]))],512),[[Gt,l.value]])]),_:1},8,["name"])])],4)),[[y,f]])}}},Dzt=z({__name:"SideColumn",props:{plugins:{type:Array,default:()=>[]},position:{type:String,required:!0,validator(i){return["right","left"].includes(i)}}},setup(i){const e=i,t=vn(null);return(n,o)=>(B(),O("div",{class:de(["side-column",`side-column--${e.position}`])},[(B(!0),O(ct,null,Bt(e.plugins,r=>(B(),O(ct,{key:r.name},[r.button.content==="none"?(B(),Z(g5,{key:0,plugin:r,onMouseenter:s=>t.value=r},null,8,["plugin","onMouseenter"])):At((B(),Z(Rzt,{key:1,plugin:r,position:e.position,active:t.value===r,onFocus:s=>t.value=r},null,8,["plugin","position","active","onFocus"])),[[Gt,r.shown]])],64))),128))],2))}},[["__scopeId","data-v-f11ec0c8"]]),_zt={},Lzt={width:"23",height:"22",viewBox:"0 0 23 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fzt(i,e){return B(),O("svg",Lzt,e[0]||(e[0]=[b("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M-1.39472e-07 10.1037L3.19075 13.2944L6.3815 10.1037L4.25434 10.1037L4.25434 5.31755C4.25434 5.17754 4.30509 4.94384 4.42614 4.77572C4.47895 4.70237 4.54133 4.64599 4.62063 4.60508C4.69908 4.56461 4.83161 4.51987 5.05202 4.51987L11.1676 4.51987L11.1676 2.3927L5.05202 2.3927C3.96087 2.3927 3.17625 2.87117 2.69987 3.5328C2.26254 4.14021 2.12717 4.83714 2.12717 5.31755L2.12717 10.1037L-1.39472e-07 10.1037Z",fill:"currentColor"},null,-1),b("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M23 11.9657L19.8092 8.7749L16.6185 11.9657L18.7457 11.9657L18.7457 16.7518C18.7457 16.8918 18.6949 17.1255 18.5739 17.2936C18.521 17.367 18.4587 17.4233 18.3794 17.4643C18.3009 17.5047 18.1684 17.5495 17.948 17.5495L11.8324 17.5495L11.8324 19.6766L17.948 19.6766C19.0391 19.6766 19.8238 19.1982 20.3001 18.5365C20.7375 17.9291 20.8728 17.2322 20.8728 16.7518L20.8728 11.9657L23 11.9657Z",fill:"currentColor"},null,-1),b("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 15.6879C0 14.9536 0.595228 14.3584 1.32948 14.3584H8.24277C8.97703 14.3584 9.57225 14.9536 9.57225 15.6879V19.9422C9.57225 20.6765 8.97703 21.2717 8.24277 21.2717H1.32948C0.595228 21.2717 0 20.6765 0 19.9422V15.6879ZM1.59538 15.9538V19.6763H7.97688V15.9538H1.59538Z",fill:"currentColor"},null,-1),b("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.2948 1.32948C13.2948 0.595229 13.89 0 14.6243 0H21.5376C22.2718 0 22.8671 0.595228 22.8671 1.32948V5.58382C22.8671 6.31807 22.2718 6.91329 21.5376 6.91329H14.6243C13.89 6.91329 13.2948 6.31807 13.2948 5.58382V1.32948ZM14.8902 1.59538V5.31792H21.2717V1.59538H14.8902Z",fill:"currentColor"},null,-1)]))}const Ozt=z(_zt,[["render",Fzt]]),Uzt={props:{color:{type:String,default:"currentColor"},size:{type:Number,default:1}}},Nzt=["width","height"],Vzt=["fill"];function Hzt(i,e,t,n,o,r){return B(),O("svg",{width:23*t.size,height:28*t.size,viewBox:"0 0 23 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.81498 1.39408C7.83109 1.39042 7.84845 1.38833 7.86714 1.38833H8.34975C8.73313 1.38833 9.04391 1.07754 9.04391 0.694167C9.04391 0.310789 8.73313 0 8.34975 0H7.86714C7.74418 0 7.62361 0.0138267 7.5072 0.0402917C7.18421 0.113723 6.96548 0.401367 6.96677 0.719361C6.64878 0.718068 6.36114 0.936792 6.28771 1.25978C6.26124 1.37619 6.24741 1.49677 6.24741 1.61972V2.10233C6.24741 2.48571 6.5582 2.7965 6.94158 2.7965C7.32496 2.7965 7.63575 2.48571 7.63575 2.10233V1.61972C7.63575 1.60103 7.63783 1.58368 7.64149 1.56756C7.65339 1.51525 7.65903 1.46297 7.65892 1.4115C7.71038 1.41162 7.76266 1.40597 7.81498 1.39408ZM10.7628 0C10.3794 0 10.0686 0.310789 10.0686 0.694167C10.0686 1.07754 10.3794 1.38833 10.7628 1.38833H11.728C12.1114 1.38833 12.4222 1.07754 12.4222 0.694167C12.4222 0.310789 12.1114 0 11.728 0H10.7628ZM14.1411 0C13.7577 0 13.4469 0.310789 13.4469 0.694167C13.4469 1.07754 13.7577 1.38833 14.1411 1.38833H15.1063C15.4897 1.38833 15.8005 1.07754 15.8005 0.694167C15.8005 0.310789 15.4897 0 15.1063 0H14.1411ZM17.5194 0C17.136 0 16.8252 0.310789 16.8252 0.694167C16.8252 1.07754 17.136 1.38833 17.5194 1.38833H18.4846C18.868 1.38833 19.1788 1.07754 19.1788 0.694167C19.1788 0.310789 18.868 0 18.4846 0H17.5194ZM20.8976 0C20.5143 0 20.2035 0.310789 20.2035 0.694167C20.2035 1.07754 20.5143 1.38833 20.8976 1.38833H21.3803C21.3989 1.38833 21.4163 1.39042 21.4324 1.39408C21.4847 1.40597 21.537 1.41162 21.5885 1.4115C21.5884 1.46297 21.594 1.51525 21.6059 1.56756C21.6096 1.58368 21.6116 1.60103 21.6116 1.61972V2.10233C21.6116 2.48571 21.9224 2.7965 22.3058 2.7965C22.6892 2.7965 23 2.48571 23 2.10233V1.61972C23 1.49677 22.9861 1.37619 22.9597 1.25978C22.8863 0.936791 22.5986 0.718068 22.2806 0.719361C22.2819 0.401367 22.0632 0.113723 21.7402 0.0402916C21.6238 0.0138267 21.5032 0 21.3803 0H20.8976ZM23 4.51539C23 4.13201 22.6892 3.82122 22.3058 3.82122C21.9224 3.82122 21.6116 4.13201 21.6116 4.51539V5.48061C21.6116 5.86399 21.9224 6.17478 22.3058 6.17478C22.6892 6.17478 23 5.86399 23 5.48061V4.51539ZM23 7.89367C23 7.51029 22.6892 7.1995 22.3058 7.1995C21.9224 7.1995 21.6116 7.51029 21.6116 7.89367V8.85889C21.6116 9.24227 21.9224 9.55306 22.3058 9.55306C22.6892 9.55306 23 9.24227 23 8.85889V7.89367ZM23 11.2719C23 10.8886 22.6892 10.5778 22.3058 10.5778C21.9224 10.5778 21.6116 10.8886 21.6116 11.2719V12.2372C21.6116 12.6205 21.9224 12.9313 22.3058 12.9313C22.6892 12.9313 23 12.6205 23 12.2372V11.2719ZM23 14.6502C23 14.2669 22.6892 13.9561 22.3058 13.9561C21.9224 13.9561 21.6116 14.2669 21.6116 14.6502V15.1328C21.6116 15.1515 21.6096 15.1689 21.6059 15.185C21.594 15.2373 21.5884 15.2896 21.5885 15.3411C21.537 15.3409 21.4847 15.3466 21.4324 15.3585C21.4163 15.3621 21.3989 15.3642 21.3803 15.3642H20.8976C20.5143 15.3642 20.2035 15.675 20.2035 16.0584C20.2035 16.4418 20.5143 16.7526 20.8976 16.7526H21.3803C21.5032 16.7526 21.6238 16.7387 21.7402 16.7123C22.0632 16.6388 22.2819 16.3512 22.2806 16.0332C22.5986 16.0345 22.8863 15.8158 22.9597 15.4928C22.9861 15.3764 23 15.2558 23 15.1328V14.6502ZM14.6474 13.9116C14.2294 13.4884 13.7764 13.3132 13.2767 13.5451C13.1394 13.6088 13.0164 13.7642 12.965 13.9976C12.9404 14.1092 12.9387 14.2154 12.952 14.2991C12.9615 14.3593 12.9761 14.3926 12.9832 14.4062L13.3718 14.7996C13.6232 15.0542 13.6207 15.4644 13.3661 15.7158C13.1116 15.9673 12.7014 15.9648 12.4499 15.7102L11.1619 14.4063C11.0696 14.3373 10.7782 14.256 10.4038 14.5402C10.265 14.6456 10.1892 14.8021 10.164 15.0159C10.146 15.1695 10.1586 15.3254 10.1806 15.4503L11.5483 16.8349C11.7998 17.0894 11.7973 17.4997 11.5427 17.7511C11.2881 18.0026 10.8779 18.0001 10.6265 17.7455L8.84977 15.9469C8.73834 15.8341 8.59086 15.7372 8.44955 15.7103C8.34989 15.6913 8.17941 15.6888 7.92486 15.922C7.40908 16.3944 7.60249 16.7531 7.61982 16.7853C7.62079 16.7871 7.62121 16.7879 7.62092 16.7876L8.36876 17.5446L8.36898 17.5449L9.63136 18.8228C9.88282 19.0774 9.8803 19.4876 9.62574 19.7391C9.37117 19.9905 8.96096 19.988 8.7095 19.7335L7.50459 18.5137C7.39104 18.4504 7.3071 18.431 7.25026 18.426C7.18448 18.4203 7.12354 18.4313 7.05978 18.4573C6.91636 18.5159 6.79333 18.6313 6.65652 18.7691C6.4611 19.004 6.42638 19.1929 6.43343 19.3189C6.44127 19.4591 6.50463 19.5852 6.59048 19.673L9.52673 22.586C9.77984 22.8371 9.78249 23.2456 9.53265 23.4999C9.2828 23.7543 8.87438 23.759 8.61876 23.5104L8.22865 23.1311V23.623C8.24763 24.1981 8.60657 24.7179 9.15357 25.1243C9.71443 25.541 10.3301 25.7301 10.6198 25.7301H14.6969C15.587 25.6238 16.1129 25.3237 16.2057 25.252C17.6012 24.1569 18.629 22.8236 18.9789 22.282C19.965 20.0757 18.9393 18.2565 18.341 17.6508L14.6474 13.9116ZM6.93288 21.8379V23.6327L6.93312 23.6505C6.96401 24.7762 7.65626 25.6261 8.38077 26.1644C9.09398 26.6943 9.97451 27.0259 10.6198 27.0259H14.7343C14.7585 27.0259 14.7826 27.0245 14.8067 27.0218C15.9128 26.8974 16.6893 26.5178 17.0025 26.2739L17.0044 26.2724C18.5682 25.0455 19.7067 23.557 20.0979 22.9372C20.1134 22.9127 20.1272 22.8871 20.1393 22.8607C21.4417 20.0111 20.126 17.614 19.2629 16.7402L17.6781 15.1359V6.01643C17.6781 4.8663 16.7457 3.93393 15.5956 3.93393H2.0825C0.932367 3.93393 0 4.8663 0 6.01643V19.5295C0 20.6797 0.932368 21.612 2.0825 21.612H6.70519L6.93288 21.8379ZM5.13682 19.2982H2.31389V6.24782H15.3642V12.8096C14.7425 12.2755 13.8096 11.8694 12.7314 12.3697C12.2925 12.5733 12.0053 12.926 11.8384 13.2984C11.1789 12.8743 10.2855 13.0031 9.62023 13.5082C9.24833 13.7906 9.04821 14.1549 8.94823 14.5061C8.86696 14.4778 8.7815 14.4544 8.69206 14.4374C8.15818 14.3357 7.58059 14.4801 7.04965 14.9664C6.21364 15.7322 6.13093 16.6828 6.43561 17.319C6.09639 17.4901 5.85345 17.7375 5.73648 17.8566L5.71719 17.8762C5.70638 17.8871 5.69596 17.8985 5.68595 17.9101C5.31058 18.3486 5.1343 18.8291 5.13682 19.2982Z",fill:t.color},null,8,Vzt)],8,Nzt)}const Afe=z(Uzt,[["render",Hzt]]),zzt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qEECAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAkhSURBVHgB7Z3NbhvXFcfPvRTkWg5QdqW2aRAaTbMokHKUOpLQTahNYdMGTD2BqSewuuvO1BNYWnZl+QmkAIWoeqPRpoioGBrKbRAgATQGkiDJJgyQSIli3pNz5oMcUqT4oRnxXkk/QCA5M6Q4/7nzn3vOuXcIYBjW9N8LYCASDAPF2CMrl0uDYRgltPW3vMUP6vDGfTAMo4RWdfGAH4VQRTAMo4QWgL4/o7BMsw9jhA5sI+O9EJA2zT6METq0jRDT7MMYoRu2EWKYfRghdItthBhmH0YI3W4bISbZhxFCn7CNEIPsQ3uhO9pGiEH2ob3Q3WwjxBT7SFRoPq2t2UIGzkBX2wgxxD4SE9qaubuIhzcOEI8PsjP5g2GybidtA22lMAcIq41FhthHIkJbs/kiAj4GgWFLy1DWbc26dTs3wMc0bQOhhlBfrO6U517slrerlY0FpdQCrXB5tQn2kYjQiNCxhamUGKjl+baBtpBqan/nPyvRdS92N1eFwDmvdRtgH2OgKdbs7YzC+nK7wFGcDzddelh4573b2/j9r9hmbNAUAQlAO16UUj5pX/4KX1n/rzyrwiUkBQnwzZefOZNv/JGOosh5C9hjRf2f/6s8+wAuKUO36KPn7xYlitq1W8/Xu23DvvnT8cSvr40ffufYdg0uMUMJ/dPzv65B0L+lC5I9/u7eHCSM9V5QxhLwZrhMAlbpQug6uxsOaM7AQh/tWRmp5EF02c91NfXatBP7zlqz93J0QbwvUBYjXcVOuGRP3DtZCi6Q2jGw0LhnpY99oRs7Pi7Vb8SUE5s1eF21o4kSAjyEAREIS05lowSaMZx1fGSRbYhHHJUJxNL4LecpxAR36xDlFpxIJKFNwjugqPUyEjL05clOggtu67YOWdq8Tq07ke7dsHgiq9Rewya8iFAty4kfV7pdTL3+NsADgaJIu5OJrHIpYpzTRWxthD7ZkikiFLjQr1DB+9fAa+Uh6FDYPgUakEg/ehgmf/825UYg571AtVqtbM5/9flnffs+b/v1F5/+a/L1t24KIQKxxW8nX/8T0PJtGDGJZu+y03e/tabzpZ7bUhKKRC76r9AlkRdgSOTEtUVgLw+gU3aRWzuMmMSEpuzdQ/ZaFPCo57YoGr0LL1F0Bhx7vSYUNA8Up1Ejnz8qkhR6hVsnpzdP287POaMVvGk1jouXF8BEctZ8oRx1di+x7N3+TnmZHpZ7bafq8n1BfTbvOeIqxAQFL0+RAx3vBfX5R5zdG3nNkETOeU+oK8dJfYgJOjNsCs8bF1PKhWdhhGhQnBX+KS0w/nyFCIIb7+OFBSNEA6ExA8mhTcbQuBH/pqJtKYvxUqMo0/Da947p+WwtWzQHGNmZ/B5K2MOU2sKjib1OwxV4zIh1614ODEBLoRFTXG+0EFUJFS56vXIYexL2hf0DcXeLx4zwgRh23Mh5MrR1eDv9w0QBpaDM2c8rTuXZOsSAlSuk8eg4R2qv71c2l7xl0/deolBrwUAZ6h+n1vwgB7kL53L4HhwIO06LYeui/XssBAc/9e2zBFMDCR0VFw8pSyYpnUlBRlwityCahQWQiv4P55pe1TiSxDqJTAeiWinP8+q/zOZdymmU1NF1HnCzAjHBESZ9tu1HmRLoLLKHFb2n0B3F5b32EqzoColLECOcq8jO3LE5oZ+dzj9BgTVUlGsWyk2NiSoojiLZ8ZrBiAS5jRxdoog9zN7/cGOJrIltic+gHCJnGAcXvaPQp4vbBKm6Ut2JP7HOeWhKNHHatCj4n5LIQol5Z7fs8nrKCtYoAilaM3eoOAsuefnj4PvYkACcpOILc+vSwURvCN2vuM3/A6vkobGVsKIEX3b+z37lGz7eLbdEjVQ+m0MQW5QZfBx+P75wvtjdTCTvHFhIieqRpc5b9BZ9zJq+U0AhH/YlbuNzocYVZ0iYj7sMI+Adp57HlKqL+9T809ySkxI5JLCQInQbFN+gTXTqKMDEsT3mVMrr78zk6cyAAglYaLkIdYO3UYpbmwsjImgtsV34euGXynqJHEANkXM3dJatChKZe0KedbzY2eChWvy3QKLflyw4nC56Et0pnQnqmadsEIqLq1RM/qBdlxMXw75Fp9d4eJ0Di3m44FCprdSxNfcQN8qp3bueogtR4IgskX60JgSW0SzHDSBulL4Dlm6iX3QL8SxjSHGjDBWCt4sOh+M5en7hWjW15pxSqjSsuFHOnCYNRL+QeOWwmNA6Hx3CmTrun/JznpUVZ23xvLiqsJwTV0KfE1dCnxNXQp8TRlwMOxFcIDP8XKYgt/ffjZfR+qHz0b9t0AjthPb7rvJ9fi6l2u7exfJEzkTeRxGcCvMRLv3dBI3QTmgWmfK5peA5P9rR9ZTBLViz9wQVbdM8YcUUjPNoIcWi13JPn6WlHTqMvfNDW544Tx4rWqZGXBxGbh1UfF0nB7C8tGtKbfXxDhd8D86Ek4PwWN2EcVmDOmjLyFs0l4ggMhWiJyhsvm8HQmq5sSgln+Ar0cdBGh1aeHR1Z2PKu9GJd++N/rKA8vrY0/DGKMCtW3PP1mqeYQhPMgqEc0l4h75lY7gXAi7u75S9WqE/L1E+ak40amzExWM6ePJB2IPhg8h3roERoWXAghKXg9I+tdSWeyq5UmAjLRveGIX/eLgEHl1f82bSst+jPBCRZoSgbBgh2swzjPL1559uT/7h7TTpNNtciv4gmkr5k07v+cp1f/zdG2+9JKGLJ9eiu3+GKXVxoKV1hLA11FFmQWHf81v8cSqCa3yWV4Kiyo+YOPzHZb9fyBVXXBIGnYCpwzTk09A415EGnl7RS8Bw9H+9Lt4EjdFWaB4nTb2FGnfTuk3c927Lyff3AJXRvWCrdfZOKeENC+aJ+948laB1N+awhLflpLAcNEdroVM3xtcj04z5xicH2en8mt+K/eEHTJxzyJNC6340k525s9X5vkkh6FKSSatqSif0v1F3YB9dMcA2GO2FbrOPE5hgG4z2Qnu9D6G65KvRNWV4mBk/D9LNPgyxDcYIobvZhym2wRghdGf7MMc2GHN+lKzdPgyyDcYYodvtwyTbYIwRutU+zLINxqyfQg3twzDbYIwSOrQP02zDSPjWEmAg5g1ypEIrGMgvJG+j0Idlmd0AAAAASUVORK5CYII=",yL=document.createElement("img");yL.src=zzt,yL.style.cursor="grabbing";function jzt({dataTransferType:i="areas_zone-id",getData:e=()=>null,onDropCB:t=()=>{}}={}){const n=me(!1),o=me(!1);function r(d){d.dataTransfer.types.includes(i)&&(d.preventDefault(),d.dataTransfer.dropEffect="move")}function s(){o.value=!1}function a(d){n.value=!0,d.dataTransfer.setData(i,e()),d.dataTransfer.effectAllowed="move",d.dataTransfer.setDragImage(yL,45,45)}function l(){n.value=!1}function c(d){o.value=!1;const h=parseInt(d.dataTransfer.getData(i),10);t==null||t(h)}function u(d){d.dataTransfer.types.includes(i)&&(o.value=!0)}return{dragging:n,dragover:o,onDragOver:r,onDragLeave:s,onDragStart:a,onDragEnd:l,onDrop:c,onDragEnter:u}}const Gzt=["draggable"],qzt={class:"layout-settings__header"},Qzt={key:0,class:"layout-settings__swap"},Kzt={key:1,class:"layout-settings__split"},Jzt={class:"layout-settings__split__text"},Wzt={class:"layout-settings__split__text"},Zzt={key:2,class:"layout-settings__buttons"},Xzt={__name:"LayoutSettings",setup(i){const e=mt("$viewer"),{localContext:t}=e,n=et(()=>t.window),o=et(()=>e.globalContext.localContexts.length>1),r=et(()=>e.layout.settings.swap),s=et(()=>e.layout.settings.full);function a(){e.layout.settings.swap=!e.layout.settings.swap}function l(){t.loadWindow(null),e.layout.settings.edit=!1}function c(){t.close()}function u(M="row"){e.globalContext.open({localContextId:t.id,ratio:50,direction:M})}function d(){u(),e.layout.settings.edit=!1}function h(){u("column"),e.layout.settings.edit=!1}yt(()=>e.globalContext.localContexts.length,M=>{var E;M===1&&e.layout.settings.edit&&((E=e.globalContext.localContexts[0].window)==null?void 0:E.header)===!1&&(e.layout.settings.edit=!1)});const{dragging:f,dragover:A,onDragOver:p,onDragLeave:g,onDragStart:m,onDragEnd:w,onDrop:y,onDragEnter:v}=jzt({getData:()=>String(t.id),onDropCB:M=>{Number.isNaN(M)||e.globalContext.swap(M,t.id)}}),x=et(()=>e.layout.settings.swap);return(M,E)=>{const S=k("BIMDataIconWindowRight"),I=k("BIMDataButton"),T=k("BIMDataIconWindowBottom"),P=k("BIMDataIconDelete"),R=k("BIMDataTooltip");return B(),O("div",{class:de(["layout-settings",{"layout-settings--swap":r.value,"layout-settings--dragging":Ct(f),"layout-settings--dragover":Ct(A)}]),draggable:x.value,onDragover:E[0]||(E[0]=(...L)=>Ct(p)&&Ct(p)(...L)),onDragleave:E[1]||(E[1]=(...L)=>Ct(g)&&Ct(g)(...L)),onDragenter:E[2]||(E[2]=(...L)=>Ct(v)&&Ct(v)(...L)),onDragstart:E[3]||(E[3]=ft((...L)=>Ct(m)&&Ct(m)(...L),["self"])),onDrop:E[4]||(E[4]=(...L)=>Ct(y)&&Ct(y)(...L)),onDragend:E[5]||(E[5]=(...L)=>Ct(w)&&Ct(w)(...L))},[b("div",qzt,K(M.$t(r.value?"window-manager.swap":"window-manager.description"))+". ",1),r.value?(B(),O("div",Qzt,[D(Afe,{color:"#ffffff",size:2})])):(B(),O("div",Kzt,[D(I,{color:"default",fill:"",square:"",icon:"",height:"50px",style:{padding:"var(--spacing-unit)"},onClick:d},{default:V(()=>[D(S),b("span",Jzt,K(M.$t("window-manager.vertical")),1)]),_:1}),D(I,{color:"default",fill:"",square:"",icon:"",height:"50px",style:{padding:"var(--spacing-unit)"},onClick:h},{default:V(()=>[D(T),b("span",Wzt,K(M.$t("window-manager.horizontal")),1)]),_:1})])),s.value?(B(),O("div",Zzt,[o.value?(B(),Z(R,{key:0,text:M.$t("window-manager.delete"),position:"left"},{default:V(()=>[D(I,{disabled:r.value,fill:"",square:"",icon:"",color:"default",width:"50px",height:"50px",onClick:c},{default:V(()=>[D(P,{fill:"",color:"high"})]),_:1},8,["disabled"])]),_:1},8,["text"])):ne("",!0),o.value?(B(),Z(R,{key:1,text:M.$t("window-manager.swap_tooltip"),position:"left"},{default:V(()=>[D(I,{fill:"",square:"",icon:"",color:r.value?"secondary":"default",width:"50px",height:"50px",onClick:a},{default:V(()=>[D(Afe)]),_:1},8,["color"])]),_:1},8,["text"])):ne("",!0),n.value?(B(),Z(R,{key:2,text:M.$t("window-manager.change"),position:"left"},{default:V(()=>[D(I,{disabled:r.value,fill:"",square:"",icon:"",color:"default",width:"50px",height:"50px",onClick:l},{default:V(()=>[D(Ozt)]),_:1},8,["disabled"])]),_:1},8,["text"])):ne("",!0)])):ne("",!0)],42,Gzt)}}};function Yzt(i,e=()=>{}){const t=me(0),n=me(0),o=me(0),r=me(0),s=l=>{l.forEach(c=>{const{width:u,height:d,x:h,y:f}=c.target.getBoundingClientRect();t.value=u,n.value=d,o.value=h,r.value=f,e==null||e({width:t.value,height:n.value,x:o.value,y:r.value})})},a=new ResizeObserver(s);return Ii(()=>{a.observe(i.value)}),sn(()=>a.disconnect()),{width:t,height:n,x:o,y:r}}class $zt extends WV{constructor(e){super(e);const{width:t,height:n,x:o,y:r}=Yzt(this.templateRef,s=>this.hub.emit("context-resize",s));this._resolution=me(1),this._width=t,this._height=n,this._x=o,this._y=r}get width(){return this._width.value}get height(){return this._height.value}get x(){return this._x.value}get y(){return this._y.value}get resolution(){return this._resolution.value}set resolution(e){this._resolution.value=e}}class ejt extends $zt{constructor(e){super(e),this.viewer=null,this._annotationMode=me(!1)}get annotationMode(){return this._annotationMode.value}async getSnapshot(){if(!this.viewer)throw new Error("[localContext.getSnapshot] Error: no viewer registered in this localContext.");await this.hideUI();const e=await this.viewer.getSnapshot();return await this.showUI(),e}getViewpoint(e){if(!this.viewer)throw new Error("[localContext.getViewpoint] Error: no viewer registered in this localContext.");return this.viewer.getViewpoint(e)}setViewpoint(e,t){if(!this.viewer)throw new Error("[localContext.setViewpoint] Error: no viewer registered in this localContext.");this.viewer.setViewpoint(e,t)}startAnnotationMode(e){if(!this.viewer)throw new Error("[localContext.startAnnotationMode] Error: no viewer registered in this localContext.");if(!this.annotationMode)return this._annotationMode.value=!0,this.viewer.startAnnotationMode(e)}stopAnnotationMode(){if(!this.viewer)throw new Error("[localContext.stopAnnotationMode] Error: no viewer registered in this localContext.");this._annotationMode.value=!1,this.viewer.stopAnnotationMode()}fitView(e){if(!this.viewer)throw new Error("[localContext.fitView] Error: no viewer registered in this localContext.");this.viewer.fitView(e)}async showUI(){if(!this.viewer)throw new Error("[localContext.showUI] Error: no viewer registered in this localContext.");this.pluginComponentInstances.forEach(e=>e.$show()),this.viewer.showUI(),await Sn()}async hideUI({exceptions:e=[]}={}){if(!this.viewer)throw new Error("[localContext.hideUI] Error: no viewer registered in this localContext.");e.push(this.viewer.$plugin.name),[...this.pluginComponentInstances.entries()].filter(([t])=>!e.includes(t)).forEach(([,t])=>t.$hide()),this.viewer.hideUI(),await Sn()}}class tjt extends ejt{constructor(e){super(e),this.modelTypes=null,this.multiModel=!0,this._loadedModels=vn([]),this._loadingModelIds=me([]),this._selectedStorey=vn(null),this._shownPlans=vn([]),this._loadedModelIds=et(()=>this._loadedModels.value.map(t=>t.id)),this._automaticFirstModelsLoading=!1,this._globalContextSubscription=null,sn(()=>{e.globalContext.hub.off(this._globalContextSubscription)})}get loadedModels(){return this._loadedModels.value}get loadingModelIds(){return this._loadingModelIds.value}get loadedModelIds(){return this._loadedModelIds.value}get selectedStorey(){return this._selectedStorey.value}async loadModels(e,t={}){var a;const n=this._$viewer;if(!Array.isArray(e))throw new Error("[BIMDataViewer - Local State] loadModels requires an array of model ids.");this.multiModel||(e.length>1&&(e=[e[0]]),this.loadedModels.length>0&&this.unloadModels(this.loadedModelIds)),this.loadingModelIds.push(...e),this.hub.emit("models-loading",{ids:e});const o=[],r=[];for(const l of e)this.loadedModelIds.includes(l)||(n.state.modelsMap.has(l)?o.push(n.state.modelsMap.get(l)):r.push(l));o.push(...await n.state.loadModels(r)),this._loadingModelIds.value=this.loadingModelIds.filter(l=>!e.includes(l));const s=o.filter(l=>{var c;return((c=this.modelTypes)==null?void 0:c.includes(l.type))??!0});if(s.forEach(l=>{l.status!=="C"&&console.warn(`[BIMDataViewer - Local State] Model with id ${l.id} has an uncompleted status, loading may fail`)}),s.length!==0&&(this._loadedModels.value=[...this.loadedModels,...s],await((a=this.viewer)==null?void 0:a.loadModels(s)),this.hub.emit("models-loaded",{models:s}),n.globalContext.hub.emit("models-loaded",{models:s,emitter:this})),t!=null&&t.viewpoint&&this.viewer&&this.setViewpoint(t.viewpoint),t!=null&&t.storey){const l=s.flatMap(c=>c.storeys).find(c=>c.key===t.storey);l&&this.selectStorey(l)}return s}unloadModels(e){var r;const{loadedModels:t,$viewer:n}=this;if(!Array.isArray(e))throw new Error("[BIMDataViewer - Local State] unloadModels requires an array of ids.");const o=e.map(s=>n.state.modelsMap.get(s)).filter(Boolean);return o.length===0?!1:(this._loadedModels.value=t.filter(s=>!o.includes(s)),(r=this.viewer)==null||r.unloadModels(o),this.selectedStorey&&o.some(s=>s.storeys.some(a=>a.key===this.selectedStorey.key))&&this.selectStorey(null),this.hub.emit("models-unloaded",{models:o}),n.globalContext.hub.emit("models-unloaded",{models:o,emitter:this}),o)}get automaticFirstModelsLoading(){return this._automaticFirstModelsLoading}set automaticFirstModelsLoading(e){this._automaticFirstModelsLoading=e,e?this._onAutomaticFirstModelsLoading():this._$viewer.globalContext.hub.off(this._globalContextSubscription)}async _onAutomaticFirstModelsLoading(){const{_loadedModels:e,_loadingModelIds:t,$viewer:n}=this,o=n.globalContext.loadedModels.filter(a=>{var l;return((l=this.modelTypes)==null?void 0:l.includes(a.type))??!0});o.length>0&&this.loadModels(o.map(a=>a.id)),n.globalContext.hub.off(this._globalContextSubscription);const r=a=>{a=a.filter(l=>{var c;return((c=this.modelTypes)==null?void 0:c.includes(l.type))??!0}),a.length>0&&e.value.length===0&&t.value.length===0&&this.loadModels(a.map(l=>l.id))};await Sn();let s=!0;this._globalContextSubscription=n.globalContext.hub.on("models-loaded",({models:a,emitter:l})=>{!s&&l===this||r(a)},{getLastEvent:!0}),s=!1}selectStorey(e,t=!0){this._selectedStorey.value=e,this.shownPlans.length>0&&this.shownPlans.forEach(n=>this.hidePlan(n)),t&&(e==null?void 0:e.plans.length)>0&&e.plans.forEach(n=>this.showPlan(n)),this.hub.emit("storey-selected",{storey:e})}get shownPlans(){return this._shownPlans.value}showPlan(e){return this._shownPlans.value.some(t=>t.key===e.key)?!1:(this._shownPlans.value=[...this._shownPlans.value,e],this.hub.emit("plan-shown",{plan:e}),!0)}hidePlan(e){return this._shownPlans.value.some(t=>t.key===e.key)?(this._shownPlans.value=this._shownPlans.value.filter(t=>t.key!==e.key),this.hub.emit("plan-hidden",{plan:e}),!0):!1}}class ijt extends tjt{constructor(e,t){super(e),this.id=t,this._window=vn(null),this.pluginInstances=new Map,sn(()=>{this.unloadWindow()})}get $viewer(){const e=this;return new Proxy(this._$viewer,{get(t,n,o){return n==="localContext"?e:Reflect.get(t,n,o)}})}get pluginComponentInstances(){return new Map([...this.pluginInstances.values()].filter(e=>e.componentInstance).map(e=>[e.name,e.componentInstance]))}get plugins(){return this.pluginComponentInstances}get window(){return this._window.value}unloadWindow(){if(!this.window)return!1;const e=this.window,t=this.window.name;return this.pluginInstances.clear(),this._window.value=null,this.loadedModelIds.length>0&&this.unloadModels(this.loadedModelIds),this.automaticFirstModelsLoading=!1,this._$viewer.globalContext.hub.emit("window-close",{window:e,name:t,localContext:this}),!0}async loadWindow(e=null,t=null){const n=!!this.window;if(this.unloadWindow(),e===null)return null;if(n&&await Sn(),!this.$viewer.windowManager.registeredWindows.has(e)){const l=`Cannot load window with name "${e}" because it is not registered.`;return console.warn(l),null}this._window.value=this.$viewer.windowManager.registeredWindows.get(e);const o=Array.from(this.window.plugins??[]);this.pluginInstances.clear(),o.map(l=>this.$viewer.pluginManager.getPluginInstance(l,this)).filter(Boolean).sort(({button:{stance:l=0}={}},{button:{stance:c=0}={}})=>l-c).forEach(l=>this.pluginInstances.set(l.name,l)),this.modelTypes=Array.isArray(this.window.modelTypes)?this.window.modelTypes:null,this.multiModel=this.window.multiModel??!0,this._loadedModels.value=[],this._loadingModelIds.value=[];const{modelIds:r,viewpoint:s,storey:a}=t??{};return this.window.noModel!==!0&&((r==null?void 0:r.length)>0?(this.automaticFirstModelsLoading=!1,this.loadModels(r,{viewpoint:s,storey:a})):this.automaticFirstModelsLoading=!0),this._$viewer.globalContext.hub.emit("window-open",{window:this.window,name:this.window.name,localContext:this}),this.window}close(){return this._$viewer.globalContext.close(this.id)}getPlugin(e){return console.warn("[BIMData Viewer] DEPRECATED - Ambigous name. Do not use localContext.getPlugin(name), use the localContext.pluginComponentInstances Map instead."),this.pluginComponentInstances.get(e)}}const njt={name:"WindowContainer",components:{PluginComponentInstanceContainer:g5,LayoutSettings:Xzt,SidePanel:yzt,SideColumn:Dzt,ModalManager:pfe},inject:["$viewer"],props:{windowName:{type:String,default:null},windowState:{type:Object,default:null},zoneId:{type:Number,required:!0}},setup(i){const e=mt("$viewer"),{globalContext:t}=e,n=new ijt(e,i.zoneId);fn("$viewer",n.$viewer);const{templateRef:o}=n,r=()=>{o.value&&(o.value.scrollTop=0,o.value.scrollLeft=0)};Ii(()=>{o.value.addEventListener("scroll",r,{passive:!0})});const s=()=>{t.activeLocalContext=n},a=()=>{t.activeLocalContext===n&&(t.activeLocalContext=null)},l=et(()=>{var g;const u=[];let d=null,h=null;const f=[],A=[],p=[];return n.window?p.push(...n.pluginInstances.values()):((g=e.windowManager.defaultWindow)==null?void 0:g.plugins.length)>0&&p.push(...e.windowManager.defaultWindow.plugins.map(m=>e.pluginManager.getPluginInstance(m,this)).filter(Boolean).sort(({button:{stance:m=0}={}},{button:{stance:w=0}={}})=>m-w)),p.forEach(m=>{!m.button&&!m.sidePanel?m.isViewer?u.unshift(m):u.push(m):m.sidePanel?m.sidePanel.position==="left"?(d&&console.warn(`[BIMDataViewer - WindowContainer] Window ${n.window.name}, Multiple left side panels are not supported. Only the last one will be displayed.`),d=m):m.sidePanel.position==="right"&&(h&&console.warn(`[BIMDataViewer - WindowContainer] Window ${n.window.name}, Multiple right side panels are not supported. Only the last one will be displayed.`),h=m):m.button.position==="left"?f.push(m):m.button.position==="right"&&A.push(m)}),u.reverse(),{free:u,leftSidePanel:d,rightSidePanel:h,leftButtonColumn:f,rightButtonColumn:A}});n.loadWindow(i.windowName,i.windowState);const c=et(()=>{const u=l.value.leftSidePanel,d=u!=null&&u.shown?u.sidePanel.width:0,h=l.value.rightSidePanel,f=h!=null&&h.shown?h.sidePanel.width:0;return n.width-d-f});return{onMouseEnter:s,onMouseLeave:a,templateRef:o,modalManagerTemplateRef:n.modalManagerTemplateRef,windowPlugins:l,layoutSettingsDisplayed:et(()=>e.layout.settings.edit),spinner:et(()=>n.spinner),loading:et(()=>n.loading),width:et(()=>n.width),height:et(()=>n.height),resolution:et(()=>n.resolution),localContext:n,centerWidth:c}},created(){this.$viewer.windowManager.windowContainers.push(this)},unmounted(){const i=this.$viewer.windowManager.windowContainers.indexOf(this);i!==-1&&this.$viewer.windowManager.windowContainers.splice(i,1)}},ojt={class:"window-container__content"},sjt={class:"window-container__content__center"},rjt={key:0,class:"global-spinner",style:{"z-index":"2"}},ajt={key:1,class:"window-container__layout-settings",style:{"z-index":"5"}};function ljt(i,e,t,n,o,r){const s=k("ModalManager"),a=k("SidePanel"),l=k("PluginComponentInstanceContainer"),c=k("SideColumn"),u=k("BIMDataSpinner"),d=k("LayoutSettings");return B(),O("div",{ref:"templateRef",class:"window-container",style:ue(`
@@ -5495,5 +5495,5 @@ void main() {
5495
5495
  --bimdata-local-context-width: ${n.width}px;
5496
5496
  --bimdata-local-context-center-width: ${n.centerWidth}px;
5497
5497
  --bimdata-local-context-resolution: ${n.resolution};
5498
- `),onMouseenter:e[0]||(e[0]=(...h)=>n.onMouseEnter&&n.onMouseEnter(...h)),onMouseleave:e[1]||(e[1]=(...h)=>n.onMouseLeave&&n.onMouseLeave(...h))},[D(s,{ref:"modalManagerTemplateRef"},null,512),b("div",ojt,[n.windowPlugins.leftSidePanel?(B(),Z(a,{key:0,plugin:n.windowPlugins.leftSidePanel},null,8,["plugin"])):ne("",!0),b("div",sjt,[(B(!0),O(ct,null,Bt(n.windowPlugins.free,h=>(B(),Z(l,{key:h.name,class:de({"window-container__content__center__viewer":h.isViewer}),plugin:h},null,8,["class","plugin"]))),128)),D(c,{position:"left",plugins:n.windowPlugins.leftButtonColumn},null,8,["plugins"]),D(c,{position:"right",plugins:n.windowPlugins.rightButtonColumn},null,8,["plugins"])]),n.windowPlugins.rightSidePanel?(B(),Z(a,{key:1,plugin:n.windowPlugins.rightSidePanel},null,8,["plugin"])):ne("",!0)]),n.loading?(B(),O("div",rjt,[n.spinner&&n.spinner.component?(B(),Z(bn(n.spinner.component),_r(Cs({key:0},n.spinner.props)),null,16)):(B(),Z(u,{key:1,size:"20px",border:"3px"}))])):ne("",!0),n.layoutSettingsDisplayed?(B(),O("div",ajt,[D(d)])):ne("",!0)],36)}const cjt=z(njt,[["render",ljt]]);class ujt{constructor(e=!0){const t=ezt(TV,null,{resizable:e});t.registerContent("default",cjt),this.settings=Hs({edit:!1,swap:!1,full:!1}),this.areas=t}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?tzt(e):null}copy(e,t=!0){return izt(this.areas.layout,e,t)}open({ratio:e,direction:t,insertAfter:n,windowName:o=null,windowState:r=null,localContextId:s=null}={}){const a=o?{options:{windowName:o,windowState:r}}:null;return s===null?this.areas.splitLayout(e,t,n,a):this.areas.split(s,e,t,n,a)}swap(e,t){return this.areas.swap(e,t)}close(e){return this.areas.delete(e)}compare(e,t){var n,o;if(!e&&!t)return!0;if(!e||!t)return!1;if(typeof e=="string"&&typeof t=="string")return e===t;if(typeof e=="string"||typeof t=="string")return!1;if(e.windowName&&t.windowName){if(e.windowName!==t.windowName)return!1;const r=new Set((n=e.windowState)==null?void 0:n.modelIds),s=new Set((o=t.windowState)==null?void 0:o.modelIds);return r.size===s.size&&[...r].every(l=>s.has(l))}return e.windowName||t.windowName||e.direction!==t.direction||e.children.length!==t.children.length?!1:e.children.every((r,s)=>this.compare(r,t.children[s]))}}const djt={version:"2.8.0-beta.3"};class hjt{constructor({plugins:e,api:t,ui:n,locale:o="fr"}){this.pluginManager=new MUt(e),this.windowManager=new BUt,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new iHt(t),this.globalContext=new $3e(this),this.state=vHt(this),this.shortcutManager=T1e(this.state),this.uiSettings=n||{},this.i18n=new X3e(o),this._contextMenu=null,this.layout=new ujt(this.uiSettings.resizable!==!1),this.localContext=null,window.$viewer=this}get version(){return djt.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||S1e}set contextMenu(e){this._contextMenu=e}get registeredWindows(){return[...this.windowManager.registeredWindows.keys()]}get registeredPlugins(){return[...this.pluginManager.registeredPlugins.keys()]}get pluginsCfg(){return this.pluginManager.cfg}registerPlugin(e){this.pluginManager.registerPlugin(e),this.windowManager.registerAndAddPluginsToWindows([e])}}function pjt(i,e={}){e.backgroundColor&&(i.style.setProperty("--bimdata-viewer-background-color",e.backgroundColor),e.backgroundColor==="transparent"&&i.style.setProperty("--areas-separator-color","transparent")),e.colorPrimary&&i.style.setProperty("--color-primary",e.colorPrimary),e.colorPrimaryLighter&&i.style.setProperty("--color-primary-lighter",e.colorPrimaryLighter),e.colorPrimaryLight&&i.style.setProperty("--color-primary-light",e.colorPrimaryLight),e.colorPrimaryDark&&i.style.setProperty("--color-primary-dark",e.colorPrimaryDark),e.colorSecondary&&i.style.setProperty("--color-secondary",e.colorSecondary),e.colorSecondaryLighter&&i.style.setProperty("--color-secondary-lighter",e.colorSecondaryLighter),e.colorSecondaryLight&&i.style.setProperty("--color-secondary-light",e.colorSecondaryLight),e.colorSecondaryDark&&i.style.setProperty("--color-secondary-dark",e.colorSecondaryDark),e.colorSilverLight&&i.style.setProperty("--color-silver-light",e.colorSilverLight),e.colorSilver&&i.style.setProperty("--color-silver",e.colorSilver),e.colorSilverDark&&i.style.setProperty("--color-silver-dark",e.colorSilverDark),e.colorGraniteLight&&i.style.setProperty("--color-granite-light",e.colorGraniteLight),e.colorGranite&&i.style.setProperty("--color-granite",e.colorGranite),e.colorSuccess&&i.style.setProperty("--color-success",e.colorSuccess),e.colorSuccessLighter&&i.style.setProperty("--color-success-Lighter",e.colorSuccessLighter),e.colorSuccessLight&&i.style.setProperty("--color-success-Light",e.colorSuccessLight),e.colorSuccessDark&&i.style.setProperty("--color-success-Dark",e.colorSuccessDark),e.colorWarning&&i.style.setProperty("--color-warning",e.colorWarning),e.colorWarningLighter&&i.style.setProperty("--color-warning-Lighter",e.colorWarningLighter),e.colorWarningLight&&i.style.setProperty("--color-warning-Light",e.colorWarningLight),e.colorWarningDark&&i.style.setProperty("--color-warning-Dark",e.colorWarningDark),e.colorHigh&&i.style.setProperty("--color-high",e.colorHigh),e.colorHighLighter&&i.style.setProperty("--color-high-lighter",e.colorHighLighter),e.colorHighLight&&i.style.setProperty("--color-high-light",e.colorHighLight),e.colorHighDark&&i.style.setProperty("--color-high-dark",e.colorHighDark),e.colorText&&i.style.setProperty("--color-text",e.colorText),(!e.backgroundColor||e.backgroundColor!=="transparent")&&i.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),e.headerHeight!=null&&i.style.setProperty("--bimdata-viewer-header-height",e.headerHeight),i.style.setProperty("--areas-background-color","transparent")}const fjt=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),km=Object.freeze({READ:"read",WRITE:"write"});function mfe(i){const e={};return i.forEach(t=>{const[n,o]=t.split(":");e[n]?e[n].push(o):e[n]=[o]}),e}const Ajt={token_scopes:[],usable_scopes:[],user_role:25};function gfe(i=Ajt){var n,o,r,s,a,l;const e=mfe(i.token_scopes),t=mfe(i.usable_scopes);return{...mq(i),tokenScopes:e,usableScopes:t,userRole:fjt[i.user_role],user:i.user?mq(i.user):null,hasBcfReadPermission:((n=t.bcf)==null?void 0:n.includes(km.READ))??!1,hasBcfWritePermission:((o=t.bcf)==null?void 0:o.includes(km.WRITE))??!1,hasModelReadPermission:((r=t.model)==null?void 0:r.includes(km.READ))??!1,hasModelWritePermission:((s=t.model)==null?void 0:s.includes(km.WRITE))??!1,hasDocReadPermission:((a=t.document)==null?void 0:a.includes(km.READ))??!1,hasDocWritePermission:((l=t.document)==null?void 0:l.includes(km.WRITE))??!1}}const mjt={de:{BcfComponents:{BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorität",statusLabel:"Status",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zurücksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{goBackButton:"Zurück",title:"BCF-Parameter",text:"Erstellen, füllen und listen Sie die BCF-Einstellungen auf, die Sie für dieses Projekt haben möchten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"Fügen Sie Fragen hinzu, um zugehörige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorität",PriorityNotDefined:"Keine Priorität",PriorityTitle:"Prioritäten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorität:",noPriority:"Keine",assignedTo:"Zugewiesen an :",elements:"Elemente",notSpecified:"Nicht definiert",see:"Anzeigen"},BcfTopicCreationCard:{text:"Ein neues BCF-Thema erstellen",createBcfSideTitle:"Ein Problem melden"},BcfTopicForm:{dragDropImageText:"Bitte wählen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"Fügen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorität",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"Fälligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Bestätigen",updateButton:"Änderungen übernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte Änderungen.",cancelButton:"Änderungen verwerfen",continueButton:"Änderungen fortsetzen",createTitle:"Ein Problem melden",dragDropImageTextTablet:"Foto machen",takeSnapshot:"Mach einen Schnappschuss",importFile:"Eine Datei importieren",searchPlaceholder:"Suchen",emptySearch:"kein Ergebnis"},BcfTopicOverview:{openViewer:"Im Viewer öffnen",openViewerNoModels:"Es sind keine Vorlagen zur Ansicht bereit",elements:"{count} Elemente",noElements:"kein Element",type:"Typ",noTypeSpecified:"Kein Typ angegeben",description:"Beschreibung",noDescriptionProvided:"Keine Beschreibung angegeben",assignedTo:"Zugeteilt an",notAssigned:"Nicht zugewiesen",dueDate:"Fälligkeitsdatum",noDueDate:"Kein Fälligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorität",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar veröffentlichen",deleteText:"Sie löschen jetzt {Name}",deleteBcfButton:"Dieses BCF löschen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorität",status:"Status",title:"Titel",creator:"Autor",date:"Datum"}},BcfTopicActionsCell:{seeButton:"Anzeigen"},BcfTopicComments:{commentButton:"Ein Kommentar verfassen",commentLabel:"Ein Kommentar verfassen",commentText:"Kommentar",cancelButton:"Abbrechen",publishButton:"Veröffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar löschen?",deleteButton:"Löschen",takeSnapshot:"Mach einen Schnappschuss"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzufügen",cancelButton:"Abbrechen",validateButton:"Bestätigen",deleteExtensionText:"Diesen Parameter löschen",deleteButton:"Löschen",title:{Priority:"Prioritäten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorität hinzufügen",Label:"Ein neues Etikett hinzufügen",Status:"Einen neuen Status hinzufügen",Type:"Einen neuen Typ hinzufügen",Stage:"Eine neue Phase hinzufügen"},text:{Priority:"Liste der Prioritäten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}}},en:{BcfComponents:{BcfFilters:{filtersButton:"Filters",filtersTitle:"Filters",priorityLabel:"Priority",statusLabel:"Status",assignedToLabel:"Assigned to",creatorsLabel:"Created by",tagsLabel:"Tags",resetButton:"Reset",searchButton:"Search",undefined:"Not defined",datePlaceholder:"Creation date"},BcfSettings:{goBackButton:"Back",title:"BCF Settings",text:"Create, enter in, and list the BCF settings you would like to have for this project",validateButton:"Validate BCF settings"},BcfStatistics:{emptyText:"Add BCF Topics to start to have some stats here.",issues:"issues",extension:{Priority:"Priority",PriorityNotDefined:"No priority",PriorityTitle:"Priorities",Status:"Status",StatusNotDefined:"No status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priority: ",noPriority:"None",assignedTo:"Assigned to: ",elements:"Elements",notSpecified:"Not specified",see:"See"},BcfTopicCreationCard:{text:"Create a new BCF topic",createBcfSideTitle:"Report a problem"},BcfTopicForm:{dragDropImageText:"Please select a file",addObjectButton:"Object",addAnnotationButton:"Annotation",annotationButtonTooltip:"This topic has no viewpoint",addPictureButton:"Add a picture",titlePlaceholder:"Title *",titleErrorMessage:"Missing title",typeLabel:"Type",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",dueDateLabel:"Due date",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Validate",updateButton:"Modify this BCF",modalText:"You are about to quit editing issue {name} but there are unsaved changes.",cancelButton:"Discard changes",continueButton:"Continue editing",createTitle:"Report a problem",dragDropImageTextTablet:"Take a picture",takeSnapshot:"Take a snapshot",importFile:"Import a file",searchPlaceholder:"Search",emptySearch:"No result"},BcfTopicOverview:{openViewer:"Open in viewer",openViewerNoModels:"No model to open",elements:"{count} Elements",noElements:"No element",type:"Type",noTypeSpecified:"No type specified",description:"Description",noDescriptionProvided:"No description provided",assignedTo:"Assigned to",notAssigned:"Not assigned",dueDate:"Due date",noDueDate:"No due date",informations:"Informations",status:"Status",noStatusSpecified:"No status specified",stage:"Stage",noStageProvided:"No stage provided",priority:"Priority",priorityNotDefined:"Not defined",tags:"Tags",noTags:"No tags",commentButton:"Post a comment",deleteText:"You are about to delete {name}",deleteBcfButton:"Delete this BCF",keepBcfButton:"Keep this BCF",author:"Author"},BcfTopicsTable:{headers:{index:"#",priority:"Priority",status:"Status",title:"Title",creator:"Author",date:"Date"}},BcfTopicActionsCell:{seeButton:"See"},BcfTopicComments:{commentButton:"Post a comment",commentLabel:"Post a comment",commentText:"Comment",cancelButton:"Cancel",publishButton:"Publish",commentsText:"Comments",deleteCommentText:"Delete this comment ?",deleteButton:"Delete",takeSnapshot:"Take a snapshot"},BcfTopicPriorityCell:{noPriority:"None"},SettingCard:{addButton:"add an element",cancelButton:"Cancel",validateButton:"Validate",deleteExtensionText:"Remove this setting",deleteButton:"Delete",title:{Priority:"Priorities",Label:"Labels",Status:"Status",Type:"Types",Stage:"Stages"},input:{Priority:"Add a new priority",Label:"Add a new label",Status:"Add new status",Type:"Add a new type",Stage:"Add a new stage"},text:{Priority:"Priority list",Label:"Labels list",Status:"Status list",Type:"Type list",Stage:"Stage list"}}}},es:{BcfComponents:{BcfFilters:{filtersButton:"Filtros",filtersTitle:"Filtros",priorityLabel:"Prioridad",statusLabel:"Estado",assignedToLabel:"Asignado a",creatorsLabel:"Creado por",tagsLabel:"Etiquetas:",resetButton:"Restablecer",searchButton:"Buscar en",undefined:"No definido",datePlaceholder:"Fecha de creación"},BcfSettings:{goBackButton:"Volver",title:"Parámetros del BCF",text:"Cree, rellene y enumere los parámetros del BCF que desea tener en este proyecto",validateButton:"Validar los parámetros del BCF"},BcfStatistics:{emptyText:"Añada preguntas para ver las estadísticas asociadas aquí.",issues:"problemas",extension:{Priority:"Prioridad",PriorityNotDefined:"Sin prioridad",PriorityTitle:"Prioridades",Status:"Estado",StatusNotDefined:"Sin estado",StatusTitle:"Estatutos"}},BcfTopicCard:{priority:"Prioridad :",noPriority:"Sin",assignedTo:"Asignado a :",elements:"Elementos",notSpecified:"No definido",see:"Ver"},BcfTopicCreationCard:{text:"Crear un nuevo tema BCF",createBcfSideTitle:"Informar de un problema"},BcfTopicForm:{dragDropImageText:"Seleccione un archivo",addObjectButton:"Objeto",addAnnotationButton:"Anotación",annotationButtonTooltip:"Actualmente este tema no posee ningún punto de vista",addPictureButton:"Añadir una imagen",titlePlaceholder:"Título *",titleErrorMessage:"Falta el título",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripción",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Está a punto de salir de la edición del problema de {name} pero hay cambios sin guardar.",cancelButton:"Cancelar los cambios",continueButton:"Continuar con los cambios",createTitle:"Informar de un problema",dragDropImageTextTablet:"Tomar una fotografía",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ningún modelo listo para la visualización",elements:"{count} Elementos",noElements:"Ningún elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripción",noDescriptionProvided:"No hay descripción",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Información",status:"Estado",noStatusSpecified:"No se especifica el estado",stage:"Fase",noStageProvided:"No se indica ninguna fase",priority:"Prioridad",priorityNotDefined:"No definido",tags:"Etiquetas",noTags:"Sin etiquetas",commentButton:"Publicar un comentario",deleteText:"Estás a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"Título",creator:"Autor",date:"Fecha"}},BcfTopicActionsCell:{seeButton:"Ver"},BcfTopicComments:{commentButton:"Publicar un comentario",commentLabel:"Publicar un comentario",commentText:"Comentario",cancelButton:"Cancelar",publishButton:"Publicar",commentsText:"comentarios",deleteCommentText:"¿Borrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"añadir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuración",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"Añadir una nueva prioridad",Label:"Añadir una nueva etiqueta",Status:"Añadir un nuevo estado",Type:"Añadir un nuevo tipo",Stage:"Añadir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}}},fr:{BcfComponents:{BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorité",statusLabel:"Statut",assignedToLabel:"Assigné à",creatorsLabel:"Créé par",tagsLabel:"Tags",resetButton:"Réinitialiser",searchButton:"Rechercher",undefined:"Non défini",datePlaceholder:"Date de création"},BcfSettings:{goBackButton:"Retour",title:"Paramètres BCF",text:"Créez, renseignez et listez les paramètres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les paramètres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associées ici.",issues:"problèmes",extension:{Priority:"Priorité",PriorityNotDefined:"Aucune priorité",PriorityTitle:"Priorités",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorité : ",noPriority:"Aucune",assignedTo:"Assigné à : ",elements:"{n} Élements",notSpecified:"Non défini",see:"Voir"},BcfTopicCreationCard:{text:"Créer un nouveau topic BCF",createBcfSideTitle:"Signaler un problème"},BcfTopicForm:{dragDropImageText:"Veuillez sélectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne possède actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorité",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assigné à",dueDateLabel:"Date d'échéance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous êtes sur le point de quitter l'édition de l'issue {name} mais il y'a des modifications non enregistrées.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un problème",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de résultat"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun modèle prêt pour une visualisation",elements:"{count} Élements",noElements:"Aucun élément concerné",type:"Type",noTypeSpecified:"Pas de type spécifié",description:"Description",noDescriptionProvided:"Pas de description renseignée",assignedTo:"Assigné à",notAssigned:"Non assigné",dueDate:"Échéance",noDueDate:"Pas de date d'échéance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut spécifié",stage:"Phase",noStageProvided:"Pas de phase renseignée",priority:"Priorité",priorityNotDefined:"Non défini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous êtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorité",status:"Statut",title:"Titre",creator:"Auteur",date:"Date"}},BcfTopicActionsCell:{seeButton:"Voir"},BcfTopicComments:{commentButton:"Poster un commentaire",commentLabel:"Poster un commentaire",commentText:"Commentaire",cancelButton:"Annuler",publishButton:"Publier",commentsText:"commentaires",deleteCommentText:"Supprimer ce commentaire ?",deleteButton:"Supprimer",takeSnapshot:"Prendre un snapshot"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un élément",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce paramètre",deleteButton:"Supprimer",title:{Priority:"Priorités",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorité",Label:"Ajouter un nouveau label",Status:"Ajouter un nouveau statut",Type:"Ajouter un nouveau type",Stage:"Ajouter une nouvelle phase"},text:{Priority:"Liste des priorités",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}}},it:{BcfComponents:{BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorità",statusLabel:"Stato",datePlaceholder:"Data di creazione",assignedToLabel:"Assegnato a",creatorsLabel:"Creato da",tagsLabel:"Etichette",resetButton:"Ripristina",searchButton:"Cerca",undefined:"Non definito"},BcfSettings:{goBackButton:"Indietro",title:"Parametri BCF",text:"Creare, notificare e elencare i parametri BCF che si desidera avere su questo progetto",validateButton:"Conferma i parametri BCF"},BcfStatistics:{emptyText:"Aggiungi delle domande per vedere le statistiche associate qui.",issues:"problemi",extension:{Priority:"Priorità",PriorityNotDefined:"Nessuna priorità",PriorityTitle:"Priorità",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorità:",noPriority:"Nessuno",assignedTo:"Assegnato a:",elements:"Elementi",noElements:"0 elementi",notSpecified:"Non definito",see:"Visualizza"},BcfTopicCreationCard:{text:"Crea un nuovo topic BCF",createBcfSideTitle:"Segnala un problema"},BcfTopicForm:{dragDropImageText:"Selezionare un file",addObjectButton:"Oggetto",addAnnotationButton:"Annotazione",annotationButtonTooltip:"Attualmente questo argomento non presenta alcun punto di vista",addPictureButton:"Aggiungere un'immagine",titlePlaceholder:"Titolo *",titleErrorMessage:"Titolo mancante",typeLabel:"Tipo",priorityLabel:"Priorità",statusLabel:"Stato",stageLabel:"Fase",assignedToLabel:"Assegnato a",dueDateLabel:"Data di scadenza",descriptionLabel:"Descrizione",labelsLabel:"Tag",createButton:"Conferma",updateButton:"Modificare questo BCF",modalText:"State per abbandonare la modifica di {name} ma ci sono modifiche non salvate.",cancelButton:"Annullare le modifiche",continueButton:"Continuare le modifiche",createTitle:"Segnala un problema"},BcfTopicOverview:{openViewer:"Apri nel visualizzatore",openViewerNoModels:"Non esistono modelli pronti per la visualizzazione",elements:"{count} Elementi",noElements:"Nessun elemento",type:"Tipo",noTypeSpecified:"Nessun tipo specificato",description:"Descrizione",noDescriptionProvided:"Nessuna descrizione inserita",assignedTo:"Assegnato a",notAssigned:"Non assegnato",dueDate:"Scadenza",noDueDate:"Nessuna data di scadenza",informations:"Informazioni",status:"Stato",noStatusSpecified:"Nessuno stato specificato",stage:"Fase",noStageProvided:"Nessuna fase inserita",priority:"Priorità",priorityNotDefined:"Non definita",tags:"Etichette",noTags:"Nessuna etichetta",commentButton:"Pubblica un commento",deleteText:"Stai per eliminare {name}",deleteBcfButton:"Elimina questo BCF",keepBcfButton:"Conserva questo BCF",author:"Autore"},BcfTopicsTable:{headers:{index:"#",priority:"Priorità",status:"Stato",title:"Titolo",creator:"Autore",date:"Data"}},BcfTopicActionsCell:{seeButton:"Visualizza"},BcfTopicComments:{commentButton:"Pubblica un commento",commentLabel:"Pubblica un commento",commentText:"Commento",cancelButton:"Annulla",publishButton:"Pubblica",commentsText:"commenti",deleteCommentText:"Eliminare questo commento?",deleteButton:"Elimina"},BcfTopicPriorityCell:{noPriority:"Nessuno"},SettingCard:{addButton:"aggiungi un elemento",cancelButton:"Annulla",validateButton:"Conferma",deleteExtensionText:"Elimina questo parametro",deleteButton:"Elimina",title:{Priority:"Priorità",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorità",Label:"Aggiungi una nuova etichetta",Status:"Aggiungi un nuovo stato",Type:"Aggiungi un nuovo tipo",Stage:"Aggiungi una nuova fase"},text:{Priority:"Elenco delle priorità",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}}}},gjt=({apiClient:i,fetchUsers:e,i18nPlugin:t}={})=>({install(n){i?rn.setup({apiClient:i,fetchUsers:e}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),t?Object.entries(mjt).forEach(([o,r])=>{t.global.mergeLocaleMessage(o,r)}):console.warn("[BCF Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(T6e).forEach(([o,r])=>{n.component(o,r)})}}),vjt={de:{BuildingMaker:{title:"Building Maker",back:"Zurück",list:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschließend Ihre PDFs herunter.",createButton:"Neues Projekt",updateButton:"Umbenennen",deleteButton:"Löschen"},form:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschließend Ihre PDFs herunter.",input:"Name des Gebäudes",error:"Ungültiger Name",createButton:"Erstellen",updateButton:"Bestätigen"},view:{addStoreyButton:"Etage",addPlanButton:"Grundriss",closeButton:"Fertigstellen",submitFilesButton:"Bestätigen"},storeyForm:{title:"Neue Etage",input:"Name",error:"Ungültiger Name",cancelButton:"Abbrechen",submitButton:"Bestätigen"}},FileManager:{creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gelöscht",newFileSuccess:"Datei hinzugefügt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gelöscht",nameInputErrorMessage:"Ungültiger name",cancel:"Abbrechen",submit:"Bestätigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"Löschen",deleteTitle:"Dateien löschen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endgültig zu löschen"}},en:{BIMDataComponents:{t:{back:"Back",cancel:"Cancel",create:"Create",delete:"Delete",download:"Download",finish:"Finish",rename:"Rename",search:"Search",see:"View",storey:"Storey",validate:"Validate"}},BuildingMaker:{title:"Building Maker",list:{text:"Create and edit storeys, then download your PDFs.",new:"New project"},form:{input:"Building name",error:"Invalid"},view:{addStorey:"Add Storey",addFile:"Add File",addPlan:"Add Plan"},storeyForm:{title:"New storey",input:"Name",error:"Invalid name"}},FileManager:{creationFormTitle:"Create folder",renameFormPlaceholder:"Folder/File name",nameInputPlaceholder:"Folder name",emptyFolder:"This folder is empty",newFolderSuccess:"New folder created",renameFolderSuccess:"Folder renamed",deleteFolderSuccess:"Folder deleted",newFileSuccess:"File added",renameFileSuccess:"File renamed",deleteFileSuccess:"File deleted",nameInputErrorMessage:"Invalid name",buttonText:"New folder",addFileButtonText:"Upload a file",deleteTitle:"Deleting Files",deleteDetail:"You are about to permanently delete the following files / folders",dmsRoot:"Root of the project's DMS",pdfPageSelectorTitle:"Select a page"},MetaBuildingStructure:{title:"Meta-Building Structure",tab:{structure:"Structure",zones:"Zones",equipments:"Equipments"},StoreySelector:{placeholder:"Select a storey"}},PhotosphereBuilding:{title:"Photosphere Building"}},es:{BuildingMaker:{title:"Building Maker",back:"Vuelta",list:{text:"Cree y edite los pisos después cargue los PDF.",createButton:"Nuevo proyecto",updateButton:"Renombrar",deleteButton:"Suprimir"},form:{text:"Cree y edite los pisos después cargue los PDF.",input:"Nombre del edificio",error:"Nombre no válido",createButton:"Crear",updateButton:"Validar"},view:{addStoreyButton:"Piso",addPlanButton:"Plano",closeButton:"Terminar",submitFilesButton:"Validar"},storeyForm:{title:"Nuevo piso",input:"Nombre",error:"Nombre no válido",cancelButton:"Anular",submitButton:"Validar"}},FileManager:{creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta está vacía",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inválida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Está a punto de eliminar permanentemente los siguientes archivos / carpetas"}},fr:{BIMDataComponents:{t:{back:"Retour",cancel:"Annuler",create:"Créer",delete:"Supprimer",download:"Télécharger",finish:"Terminer",rename:"Renommer",search:"Rechercher",see:"Voir",storey:"Étage",validate:"Valider"}},BuildingMaker:{title:"Building Maker",list:{text:"Créez et éditez les étages puis téléchagez vos PDF.",new:"Nouveau projet"},form:{input:"Nom du bâtiment",error:"Nom invalide"},view:{addStorey:"Ajouter un Étage",addFile:"Ajouter un fichier",addPlan:"Ajouter un plan"},storeyForm:{title:"Nouvel étage",input:"Nom",error:"Nom invalide"}},FileManager:{creationFormTitle:"Créer un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier créé",renameFolderSuccess:"Dossier renommé",deleteFolderSuccess:"Dossier supprimé",newFileSuccess:"Fichier ajouté",renameFileSuccess:"Fichier renommé",deleteFileSuccess:"Fichier supprimé",nameInputErrorMessage:"Nom invalide",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",deleteTitle:"Supression de fichiers",deleteDetail:"Vous êtes sur le point de supprimer définitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",pdfPageSelectorTitle:"Sélectionner une page"},MetaBuildingStructure:{title:"Structure Méta-Building",tab:{structure:"Structure",zones:"Zones",equipments:"Équipements"},StoreySelector:{placeholder:"Sélectionner un étage"}},PhotosphereBuilding:{title:"Photosphère Building"}},it:{BuildingMaker:{title:"Building Maker",back:"Reso",list:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",createButton:"Nuovo progetto",updateButton:"Rinominare",deleteButton:"Eliminare"},form:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",input:"Nome della costruzione",error:"Nome non corretto",createButton:"Creare",updateButton:"Convalidare"},view:{addStoreyButton:"Piano",addPlanButton:"Mappa",closeButton:"Finire",submitFilesButton:"Convalidare"},storeyForm:{title:"Nuovo piano",input:"Nome",error:"Nome non corretto",cancelButton:"Annullare",submitButton:"Convalidare"}},FileManager:{creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella è vuota",newFolderSuccess:"Nuova cartella creata",renameFolderSuccess:"Cartella rinominata",deleteFolderSuccess:"Cartella eliminata",newFileSuccess:"File aggiunto",renameFileSuccess:"File rinominato",deleteFileSuccess:"File cancellato",nameInputErrorMessage:"Nome non valido",cancel:"Annulla",submit:"Invia",buttonText:"Nuova cartella",addFileButtonText:"Carica un file",rename:"Rinominare",view:"Vedere",download:"Scaricare",delete:"Cancellare",deleteTitle:"Eliminazione di file",deleteDetail:"Stai per eliminare definitivamente i seguenti file/cartelle"}}},yjt=({i18nPlugin:i}={})=>({install(e){i?Object.entries(vjt).forEach(([t,n])=>{i.global.mergeLocaleMessage(t,n)}):console.warn("[BIMData Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(qMt).forEach(([t,n])=>{e.component(t,n)})}}),wjt=Object.freeze(Object.defineProperty({__proto__:null,BIMDataClickAway:Xa,BIMDataClickInputAway:{beforeMount(i,e){if(typeof e.value!="function")throw Error(`click away directive needs function, got ${typeof e.value}`);i.clickAwayHandler=t=>{(t.path||t.composedPath&&t.composedPath()).find(o=>o===i)||e.value()},window.addEventListener("mousedown",i.clickAwayHandler,!0)},unmounted(i){window.removeEventListener("mousedown",i.clickAwayHandler,!0),delete i.clickAwayHandler}}},Symbol.toStringTag,{value:"Module"})),Cjt=i=>({install(e){Object.entries(Nje).forEach(([t,n])=>{e.component(t,n)}),Object.entries(wjt).forEach(([t,n])=>e.directive(t.split("BIMData")[1],n))}}),bjt={name:"LiWrapper",render(){return Wn("li",this.$slots.default())}};function xjt(i,e){var t=new Set([]);return i.forEach(n=>{e.has(n)||t.add(n)}),t}const Pl=Zo("id"),Mjt=({contextMenu:i,objects:e=[],state:t=i.$viewer.state,pictos:n})=>[{name:"selectAll",get group(){return i.groupPositions.select},position:1,get label(){return i.$t("context_menu.select_all")},get picto(){return n.get(this.name)},execute:()=>t.selectObjects(e.filter(Na(Bi("visible"),wd("selected"))).map(Pl)),predicate:()=>e.some(Na(Bi("visible"),wd("selected")))},{name:"deselectAll",get group(){return i.groupPositions.select},position:2,get label(){return i.$t("context_menu.deselect_all")},get picto(){return n.get(this.name)},execute:()=>t.deselectObjects(e.filter(Bi("selected")).map(Pl)),predicate:()=>e.some(Bi("selected"))},{name:"selectSimilar",get group(){return i.groupPositions.select},position:3,get label(){return i.$t("context_menu.select_similar")},get picto(){return n.get(this.name)},execute(){const o=e.filter(r=>r.visible&&r.type===this.selectedObject.type&&r.id!==this.selectedObject.id).map(Pl);t.selectObjects(o)},selectedObject:null,predicate(){const o=e.filter(Na(Bi("visible"),Bi("selected")));return o.length===1&&o[0].type!==void 0?(this.selectedObject=o[0],!0):(this.selectedObject=null,!1)}},{name:"reverseSelection",get label(){return i.$t("context_menu.reverse_selection")},get group(){return i.groupPositions.select},position:4,execute:()=>{const o=new Set(e.filter(Bi("selected")).map(Pl)),r=new Set(e.filter(Bi("visible")).map(Pl));t.selectObjects(Array.from(xjt(r,o)),{exclusive:!0})},predicate:()=>e.some(Na(wd("selected"),Bi("visible")))&&e.some(Na(Bi("selected"),Bi("visible")))},{name:"showAll",get group(){return i.groupPositions.visibility},position:1,get label(){return i.$t("context_menu.show_all")},get picto(){return n.get(this.name)},execute:()=>t.showObjects(e.filter(wd("visible")).map(Pl)),predicate:()=>e.some(wd("visible"))},{name:"hide",get group(){return i.groupPositions.visibility},position:2,get label(){return i.$t("context_menu.hide")},get picto(){return n.get(this.name)},objectsToHide:null,execute(){const o=this.objectsToHide.filter(Bi("selected"));o.length>0&&t.deselectObjects(o.map(Pl)),t.hideObjects(this.objectsToHide.map(Pl))},predicate(){return this.objectsToHide=e.filter(Na(Bi("selected"),Bi("visible"))),this.objectsToHide.length>0}},{name:"hideAll",get group(){return i.groupPositions.visibility},position:3,get label(){return i.$t("context_menu.hide_all")},execute:()=>{const o=e.filter(Bi("visible"));o.some(Bi("selected"))&&t.deselectObjects(o.filter(Bi("selected")).map(Pl)),t.hideObjects(o.map(Pl))},predicate:()=>e.some(Bi("visible"))}].filter(o=>o.predicate()),Ejt={components:{LiWrapper:bjt},inject:["$viewer"],data(){return{defaultPrevented:!1,displayed:!1,top:null,bottom:null,left:null,width:200,nextCommandId:1,currentCommands:[],contextCommands:[],registeredCommands:[],groupPositions:{select:10,visibility:20},asyncPredicateRunning:!1}},computed:{position(){return{top:this.top?this.top+"px":"unset",bottom:this.bottom?this.bottom+"px":"unset",left:this.left+"px",width:this.width+"px"}}},watch:{displayed(i){i?document.addEventListener("keydown",this.onKeyDown):document.removeEventListener("keydown",this.onKeyDown)}},created(){this.$viewer.contextMenu=this,this.asyncPredicates=new Set},methods:{onKeyDown(i){i.key==="Escape"&&this.away()},setPosition(i){const t=(document.fullscreenElement?document.fullscreenElement:this.$parent.$el).getBoundingClientRect();this.left=i.clientX-t.left,this.top=i.clientY-t.top,this.left+this.width>t.width&&(this.left=this.left-this.width),i.clientY>t.top+t.height/2?(this.bottom=t.height-this.top,this.top=null):this.bottom=null},typeCheckCommand(i={}){let e=null;if((!i.execute||typeof i.execute!="function")&!i.component&&(e="Cannot register context menu command. A command must have an execute function or a component property."),i.label||(e="Cannot register context menu command. A command must have a label."),e)throw console.error(e),new Error(e);return i.id=this.nextCommandId++,i},open(i){this.currentCommands=[],this.setPosition(i),this.originEvent=i,i.preventDefault(),this.setCurrentCommands(),this.groupCurrentCommands(),this.defaultPrevented=!1,this.displayed=!0,document.fullscreenElement?(this.$el.parentElement.removeChild(this.$el),this.adoptiveParent=document.fullscreenElement,this.adoptiveParent.appendChild(this.$el)):this.adoptiveParent&&this.adoptiveParent!==this.$viewer.globalContext.el&&(this.adoptiveParent.removeChild(this.$el),this.$viewer.globalContext.el.appendChild(this.$el),this.adoptiveParent=null)},setCurrentCommands(){this.asyncPredicates.clear(),this.asyncPredicateRunning=!1,this.defaultPrevented||this.registeredCommands.forEach(async i=>{if(typeof i.predicate=="function"){const e=i.predicate(this.$viewer.globalContext.activeLocalContext);if(e===!0)this.currentCommands.push(i);else if(typeof(e==null?void 0:e.then)=="function"){this.asyncPredicates.add(e),this.asyncPredicateRunning=!0;const t=await e;this.asyncPredicates.has(e)&&(this.asyncPredicates.delete(e),this.asyncPredicateRunning=this.asyncPredicates.size>0,t===!0&&this.currentCommands.push(i))}}else this.currentCommands.push(i)}),this.currentCommands.push(...this.contextCommands),this.contextCommands=[]},getDefaultCommands({objects:i=[],state:e=this.$viewer.state,context:t=null}){const n=new Map;return t&&this.$viewer.shortcutManager.getShortcuts(t).forEach(o=>n.set(o.name,o.key)),Mjt({contextMenu:this,objects:i,state:e,pictos:n})},executeCommand(i){if(i.execute&&(i.execute(this.originEvent),this.displayed=!1),i.component&&!i.menu)throw new Error("Command with component property must have a `menu` property")},away(){this.displayed=!1},groupCurrentCommands(){const i=new Map;this.currentCommands.forEach(n=>{(n.group===null||n.group===void 0)&&(n.group=0),i.has(n.group)?i.get(n.group).push(n):i.set(n.group,[n])}),i.forEach(n=>n.sort((o,r)=>(o.position=o.position||0,r.position=r.position||0,o.position-r.position)));const t=[...i.keys()].sort((n,o)=>n-o).map(n=>i.get(n)).flat();this.currentCommands=t},isGroupIntersection(i){if(i===0)return!1;const e=this.currentCommands[i-1],t=this.currentCommands[i];return e.group<t.group},registerContextCommand(i){const e=this.typeCheckCommand(i);return this.contextCommands.push(e),i.id},registerCommand(i){const e=this.typeCheckCommand(i);return this.registeredCommands.push(e),i.id},unregisterCommand(i){return this.registeredCommands.find(e=>e.id===i)?(this.registeredCommands=this.registeredCommands.filter(e=>e.id!==i),!0):!1},preventDefault(){this.defaultPrevented=!0}}},Bjt={key:0,class:"separator"},Ijt={class:"menu-text"},Sjt={key:1,class:"menu-picto"},Pjt={key:0,class:"context-menu__spinner"};function Tjt(i,e,t,n,o,r){const s=k("BIMDataIconChevron"),a=k("LiWrapper"),l=k("BIMDataSpinner"),c=fi("click-away");return o.displayed&&(o.currentCommands.length||o.asyncPredicateRunning)?At((B(),O("ul",{key:0,class:"bimdata-list context-menu",style:ue(r.position)},[(B(!0),O(ct,null,Bt(o.currentCommands,(u,d)=>(B(),Z(a,{key:u.label,class:"context-menu__element",onClick:h=>r.executeCommand(u)},{default:V(()=>[r.isGroupIntersection(d)?(B(),O("div",Bjt)):ne("",!0),b("div",Ijt,K(u.label),1),!u.component&&u.picto?(B(),O("span",Sjt,K(u.picto),1)):u.component?(B(),Z(s,{key:2,size:"xxs",class:"fill-primary"})):ne("",!0)]),_:2},1032,["onClick"]))),128)),o.asyncPredicateRunning?(B(),O("li",Pjt,[D(l)])):ne("",!0)],4)),[[c,r.away]]):ne("",!0)}const kjt=z(Ejt,[["render",Tjt],["__scopeId","data-v-5b87d4a3"]]),Rjt={name:"ViewerHeader",inject:["$viewer"],props:{visible:{type:Boolean,default:!0}},setup(){const i=mt("$viewer"),e=Hs(new Map),t=o=>{if(!o.name)throw new TypeError("[Viewer Header] Content must have a name");if(e.has(o.name))throw new Error(`[Viewer Header] Content with name ${o.name} already exists`);e.set(o.name,o)},n=o=>e.has(o)?(e.delete(o),!0):!1;return{logo:i.uiSettings.bimdataLogo!==!1,version:i.uiSettings.version!==!1?i.version:null,headerContent:e,headerRightContentComponents:et(()=>Array.from(e.values()).filter(o=>o.position==="right").sort((o,r)=>o.order-r.order).map(o=>o.component)),headerLeftContentComponents:et(()=>Array.from(e.values()).filter(o=>o.position==="left").sort((o,r)=>o.order-r.order).map(o=>o.component)),addContent:t,removeContent:n}}},Djt={class:"viewer-header"},_jt={class:"viewer-header__content"},Ljt={class:"viewer-header__content__left"},Fjt={class:"viewer-header__content__right"},Ojt={key:0,class:"m-l-6 flex items-center"},Ujt={key:1,class:"viewer-header__version"};function Njt(i,e,t,n,o,r){const s=k("BIMDataIllustration");return At((B(),O("div",Djt,[b("div",_jt,[b("div",Ljt,[(B(!0),O(ct,null,Bt(n.headerLeftContentComponents,a=>(B(),Z(bn(a),{key:a.name}))),128))]),b("div",Fjt,[(B(!0),O(ct,null,Bt(n.headerRightContentComponents,a=>(B(),Z(bn(a),{key:a.name}))),128))])]),n.logo||n.version?(B(),O("div",Ojt,[n.logo?(B(),Z(s,{key:0,name:"logo",width:"30px",height:"30px"})):ne("",!0),n.version?(B(),O("div",Ujt,K(n.version),1)):ne("",!0)])):ne("",!0)],512)),[[Gt,t.visible]])}const Vjt=z(Rjt,[["render",Njt],["__scopeId","data-v-5c9ea6b6"]]),Hjt={emits:["resize"],setup(i,{emit:e}){return{onResizerMousedown:n=>{n.preventDefault();let o=n.clientX;const r=a=>{a.preventDefault();const l=a.clientX-o;o=a.clientX,e("resize",l)},s=a=>{a.preventDefault(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",s)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",s)}}}},zjt={class:"bimdata-separator"};function jjt(i,e,t,n,o,r){return B(),O("div",zjt,[e[1]||(e[1]=b("div",{class:"bimdata-separator__line"},null,-1)),b("div",{class:"bimdata-separator__resizer",onMousedown:e[0]||(e[0]=(...s)=>n.onResizerMousedown&&n.onResizerMousedown(...s))},null,32)])}const Gjt={components:{Separator:z(Hjt,[["render",jjt],["__scopeId","data-v-79a3b3af"]])},props:{position:{type:String,required:!0,validator(i){return["left","right"].includes(i)}},sidePanel:{type:Object,required:!0,validator(i){if(i.width&&(typeof i.width!="number"||i.width<0))return console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof i.width}`),!1;const e=typeof(i==null?void 0:i.component)=="object";return e||console.error("[GlobalSidePanel] sidePanel must have a component property"),e}}},setup(i){const e=me(null),t=me(i.sidePanel.width??400),n=(o,r=1)=>{const s=t.value+o*r;t.value=Math.max(0,s)};return yt(()=>i.sidePanel,()=>{Object.defineProperty(i.sidePanel,"width",{get(){return t.value},set(o){if(typeof o!="number"||o<=0){console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof o}`);return}t.value=o}}),Object.defineProperty(i.sidePanel,"componentInstance",{get(){return e.value},enumerable:!0})},{immediate:!0}),{componentInstance:e,width:t,onResize:n}}},qjt={class:"bimdata-global-side-panel__component"};function Qjt(i,e,t,n,o,r){const s=k("Separator");return B(),O("div",{class:"bimdata-global-side-panel",style:ue(`width: ${n.width}px`)},[t.sidePanel.resizable&&t.position==="right"?(B(),Z(s,{key:0,onResize:e[0]||(e[0]=a=>n.onResize(a,-1))})):ne("",!0),b("div",qjt,[(B(),Z(bn(t.sidePanel.component),{ref:"componentInstance"},null,512))]),t.sidePanel.resizable&&t.position==="left"?(B(),Z(s,{key:1,onResize:e[1]||(e[1]=a=>n.onResize(a))})):ne("",!0)],4)}const Kjt={name:"BimdataViewer",components:{ContextMenu:kjt,ViewerHeader:Vjt,ModalManager:pfe,GlobalSidePanel:z(Gjt,[["render",Qjt],["__scopeId","data-v-82d0d4cb"]])},setup(){const i=mt("$viewer"),{globalContext:e,shortcutManager:t}=i;sn(()=>{t&&t.destroy(),e.hub.clear()}),Ii(()=>{i.pluginManager.runPluginsScripts(i)});const n=et(()=>{var f;return i.uiSettings.bimdataLogo!==!1&&(e.localContexts.length!==1||((f=e.localContexts[0].window)==null?void 0:f.logoAndVersion))}),o=et(()=>{var f;return i.uiSettings.version!==!1&&(e.localContexts.length!==1||(f=e.localContexts[0].window)!=null&&f.logoAndVersion)?i.version:null}),r=et(()=>e.leftSidePanel),s=et(()=>e.rightSidePanel),a=et(()=>{var g;const f=i.uiSettings.header!==!1,A=e.localContexts.length===1&&((g=e.localContexts[0].window)==null?void 0:g.header)===!1,p=!!(r.value||s.value);return f&&(!A||p)}),l=i.uiSettings.contextMenu!==!1,c=me(null);function u(f){l&&c.value.open(f)}function d(){i.shortcutManager.active=!0}function h(){i.shortcutManager.active=!1}return{Layout:i.layout.areas.component,onContextMenu:u,onMouseenter:d,onMouseleave:h,isHeaderVisible:a,viewerTemplateRef:e.templateRef,modalManagerTemplateRef:e.modalManagerTemplateRef,headerTemplateRef:e.headerTemplateRef,contextMenuTemplateRef:c,contextMenuEnabled:l,bimdataLogoOnSingleWindow:n,viewerVersionOnSingleWindow:o,version:i.version,loading:et(()=>e.loading),spinner:et(()=>e.spinner),leftSidePanel:r,rightSidePanel:s}}},Jjt={key:1,class:"global-spinner",style:{"z-index":"3"}},Wjt={key:2,class:"viewer__logo"},Zjt={key:1,class:"version m-t-6"};function Xjt(i,e,t,n,o,r){const s=k("ModalManager"),a=k("ContextMenu"),l=k("ViewerHeader"),c=k("GlobalSidePanel"),u=k("BIMDataSpinner"),d=k("BIMDataIllustration");return B(),O("div",{id:"bimdata-viewer",ref:"viewerTemplateRef",class:"bimdata-viewer bimdata-scrollbar",onContextmenu:e[0]||(e[0]=(...h)=>n.onContextMenu&&n.onContextMenu(...h)),onMouseenter:e[1]||(e[1]=(...h)=>n.onMouseenter&&n.onMouseenter(...h)),onMouseleave:e[2]||(e[2]=(...h)=>n.onMouseleave&&n.onMouseleave(...h))},[D(s,{ref:"modalManagerTemplateRef"},null,512),n.contextMenuEnabled?(B(),Z(a,{key:0,ref:"contextMenuTemplateRef"},null,512)):ne("",!0),D(l,{ref:"headerTemplateRef",visible:n.isHeaderVisible},null,8,["visible"]),b("div",{class:"bimdata-viewer__content",style:ue(n.isHeaderVisible?"height: calc(100% - var(--bimdata-viewer-header-height, 40px))":"height: 100%")},[n.leftSidePanel?(B(),Z(c,{key:0,"side-panel":n.leftSidePanel,position:"left"},null,8,["side-panel"])):ne("",!0),(B(),Z(bn(n.Layout),{style:"height: 100%; flex-grow: 1;"})),n.rightSidePanel?(B(),Z(c,{key:1,"side-panel":n.rightSidePanel,position:"right"},null,8,["side-panel"])):ne("",!0)],4),n.loading?(B(),O("div",Jjt,[n.spinner&&n.spinner.component?(B(),Z(bn(n.spinner.component),_r(Cs({key:0},n.spinner.props)),null,16)):(B(),Z(u,{key:1,size:"40px",border:"5px"}))])):ne("",!0),!n.isHeaderVisible&&(n.bimdataLogoOnSingleWindow||n.viewerVersionOnSingleWindow)?(B(),O("div",Wjt,[n.bimdataLogoOnSingleWindow?(B(),Z(d,{key:0,name:"logo"})):ne("",!0),n.viewerVersionOnSingleWindow?(B(),O("div",Zjt,K(n.version),1)):ne("",!0)])):ne("",!0)],544)}const Yjt=z(Kjt,[["render",Xjt]]),$jt=["src"],eGt={class:"bimdata-models__header"},tGt={key:0,class:"bimdata-models__header__loader"},iGt={class:"bimdata-models__header__picto"},nGt={class:"bimdata-models__header__name"},oGt={key:0,class:"bimdata-models__header__name--empty"},sGt={key:1,class:"bimdata-models__header__name--empty"},rGt={key:3},aGt=["onMousemove","onClick"],vfe={__name:"Models",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(i){const e=i,t=mt("$viewer"),n=me(),o=me(0),r=me(0),s=me(),a=vn([]),l=me(!1),c=et(()=>t.localContext.loadedModels),u=et(()=>t.localContext.loadedModelIds),d=et(()=>t.localContext.loadingModelIds),h=et(()=>t.localContext.multiModel),f=et(()=>(e.customFilter?a.value.filter(e.customFilter):a.value).map(E=>c.value.find(S=>{var I;return((I=S.document)==null?void 0:I.head_id)!=null&&S.document.head_id===E.document.id})??E)),A=M=>u.value.includes(M),p=M=>d.value.includes(M),g=et(()=>{var S;const{x:M,y:E}=((S=s.value)==null?void 0:S.getBoundingClientRect())??{x:0,y:0};return`top:${r.value-E}px; left:${o.value-M}px;`}),m=M=>{!h.value&&A(M.id)||d.value.length>0||(t.localContext.loadedModelIds.includes(M.id)?t.localContext.unloadModels([M.id]):t.localContext.loadModels([M.id]))},w=M=>{switch(M){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},y=(M,E)=>{M!=null&&M.viewer_360_file&&(o.value=E.clientX,r.value=E.clientY),n.value=M==null?void 0:M.viewer_360_file},v=async M=>{l.value=!0;try{return(await t.api.apiClient.modelApi.getModels(t.api.cloudId,t.api.projectId,void 0,void 0,M)).filter(S=>t.state.models.some(I=>I.archived)||!S.archived).sort(wu("updated_at",!1))}catch(E){console.error("[Models] Cannot get project models. Error: ",E)}finally{l.value=!1}return[]},x=M=>{var E;return((E=M.children)==null?void 0:E.some(S=>A(S.id)))??!1};return v(t.localContext.modelTypes).then(M=>{a.value=M}),(M,E)=>{const S=k("BIMDataSpinner"),I=k("BIMDataIconModel3D"),T=k("BIMDataTextbox"),P=k("BIMDataCheckbox"),R=k("BIMDataRadio"),L=k("BIMDataIcon"),U=k("BIMDataDropdownList");return B(),O("div",{ref_key:"templateRef",ref:s,class:de(["bimdata-models",{"bimdata-models--window-positioning":i.windowPositioning}])},[n.value?(B(),O("div",{key:0,class:"bimdata-models__preview",style:ue(g.value)},[b("img",{src:n.value},null,8,$jt)],4)):ne("",!0),D(U,{style:ue(`--bimdata-models-width: ${i.width};`),width:i.width,list:f.value,"element-key":"id","per-page":40,loading:l.value,class:"bimdata-models__list",disabled:f.value.length===0,onElementClick:m},{header:V(({isOpen:H})=>[b("div",eGt,[l.value||d.value.length>0?(B(),O("div",tGt,[D(S)])):(B(),O(ct,{key:1},[b("div",iGt,[D(I)]),b("div",{class:de(["bimdata-models__header__number bimdata-info-length",{"bimdata-models__header__number--empty":u.value.length===0}])},[b("span",null,K(u.value.length),1)],2),b("div",nGt,[f.value.length===0?(B(),O("span",oGt,K(M.$t("model.no_model")),1)):u.value.length===0?(B(),O("span",sGt,K(M.$t("model.no_loaded_model")),1)):u.value.length===1?(B(),Z(T,{key:2,text:c.value[0].name,tooltip:!H},null,8,["text","tooltip"])):u.value.length>1?(B(),O("span",rGt,K(M.$t("model.selected_models")),1)):ne("",!0)])],64))])]),element:V(({element:H,close:N})=>[b("div",{class:"bimdata-models__model",onMousemove:q=>i.preview&&y(H,q),onMouseout:E[0]||(E[0]=q=>i.preview&&y()),onClick:()=>{!h.value&&!A(H.id)&&N()}},[h.value?(B(),Z(P,{key:0,"model-value":A(H.id)||x(H),disabled:H.status!=="C"||d.value.length>0},null,8,["model-value","disabled"])):(B(),Z(R,{key:1,"model-value":A(H.id)||x(H),disabled:H.status!=="C"||d.value.length>0},null,8,["model-value","disabled"])),D(L,{margin:"0 calc(var(--spacing-unit) / 2)",name:w(H.status),size:"xs",class:de({"fill-success":H.status==="C","fill-high":H.status==="E"})},null,8,["name","class"]),D(T,{class:de({"bimdata-models__model__name":!0,"bimdata-models__model__name--disabled":H.status!=="C"||d.value.length>0}),text:H.name,width:`calc(100% -
5498
+ `),onMouseenter:e[0]||(e[0]=(...h)=>n.onMouseEnter&&n.onMouseEnter(...h)),onMouseleave:e[1]||(e[1]=(...h)=>n.onMouseLeave&&n.onMouseLeave(...h))},[D(s,{ref:"modalManagerTemplateRef"},null,512),b("div",ojt,[n.windowPlugins.leftSidePanel?(B(),Z(a,{key:0,plugin:n.windowPlugins.leftSidePanel},null,8,["plugin"])):ne("",!0),b("div",sjt,[(B(!0),O(ct,null,Bt(n.windowPlugins.free,h=>(B(),Z(l,{key:h.name,class:de({"window-container__content__center__viewer":h.isViewer}),plugin:h},null,8,["class","plugin"]))),128)),D(c,{position:"left",plugins:n.windowPlugins.leftButtonColumn},null,8,["plugins"]),D(c,{position:"right",plugins:n.windowPlugins.rightButtonColumn},null,8,["plugins"])]),n.windowPlugins.rightSidePanel?(B(),Z(a,{key:1,plugin:n.windowPlugins.rightSidePanel},null,8,["plugin"])):ne("",!0)]),n.loading?(B(),O("div",rjt,[n.spinner&&n.spinner.component?(B(),Z(bn(n.spinner.component),_r(Cs({key:0},n.spinner.props)),null,16)):(B(),Z(u,{key:1,size:"20px",border:"3px"}))])):ne("",!0),n.layoutSettingsDisplayed?(B(),O("div",ajt,[D(d)])):ne("",!0)],36)}const cjt=z(njt,[["render",ljt]]);class ujt{constructor(e=!0){const t=ezt(TV,null,{resizable:e});t.registerContent("default",cjt),this.settings=Hs({edit:!1,swap:!1,full:!1}),this.areas=t}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?tzt(e):null}copy(e,t=!0){return izt(this.areas.layout,e,t)}open({ratio:e,direction:t,insertAfter:n,windowName:o=null,windowState:r=null,localContextId:s=null}={}){const a=o?{options:{windowName:o,windowState:r}}:null;return s===null?this.areas.splitLayout(e,t,n,a):this.areas.split(s,e,t,n,a)}swap(e,t){return this.areas.swap(e,t)}close(e){return this.areas.delete(e)}compare(e,t){var n,o;if(!e&&!t)return!0;if(!e||!t)return!1;if(typeof e=="string"&&typeof t=="string")return e===t;if(typeof e=="string"||typeof t=="string")return!1;if(e.windowName&&t.windowName){if(e.windowName!==t.windowName)return!1;const r=new Set((n=e.windowState)==null?void 0:n.modelIds),s=new Set((o=t.windowState)==null?void 0:o.modelIds);return r.size===s.size&&[...r].every(l=>s.has(l))}return e.windowName||t.windowName||e.direction!==t.direction||e.children.length!==t.children.length?!1:e.children.every((r,s)=>this.compare(r,t.children[s]))}}const djt={version:"2.8.0-beta.4"};class hjt{constructor({plugins:e,api:t,ui:n,locale:o="fr"}){this.pluginManager=new MUt(e),this.windowManager=new BUt,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new iHt(t),this.globalContext=new $3e(this),this.state=vHt(this),this.shortcutManager=T1e(this.state),this.uiSettings=n||{},this.i18n=new X3e(o),this._contextMenu=null,this.layout=new ujt(this.uiSettings.resizable!==!1),this.localContext=null,window.$viewer=this}get version(){return djt.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||S1e}set contextMenu(e){this._contextMenu=e}get registeredWindows(){return[...this.windowManager.registeredWindows.keys()]}get registeredPlugins(){return[...this.pluginManager.registeredPlugins.keys()]}get pluginsCfg(){return this.pluginManager.cfg}registerPlugin(e){this.pluginManager.registerPlugin(e),this.windowManager.registerAndAddPluginsToWindows([e])}}function pjt(i,e={}){e.backgroundColor&&(i.style.setProperty("--bimdata-viewer-background-color",e.backgroundColor),e.backgroundColor==="transparent"&&i.style.setProperty("--areas-separator-color","transparent")),e.colorPrimary&&i.style.setProperty("--color-primary",e.colorPrimary),e.colorPrimaryLighter&&i.style.setProperty("--color-primary-lighter",e.colorPrimaryLighter),e.colorPrimaryLight&&i.style.setProperty("--color-primary-light",e.colorPrimaryLight),e.colorPrimaryDark&&i.style.setProperty("--color-primary-dark",e.colorPrimaryDark),e.colorSecondary&&i.style.setProperty("--color-secondary",e.colorSecondary),e.colorSecondaryLighter&&i.style.setProperty("--color-secondary-lighter",e.colorSecondaryLighter),e.colorSecondaryLight&&i.style.setProperty("--color-secondary-light",e.colorSecondaryLight),e.colorSecondaryDark&&i.style.setProperty("--color-secondary-dark",e.colorSecondaryDark),e.colorSilverLight&&i.style.setProperty("--color-silver-light",e.colorSilverLight),e.colorSilver&&i.style.setProperty("--color-silver",e.colorSilver),e.colorSilverDark&&i.style.setProperty("--color-silver-dark",e.colorSilverDark),e.colorGraniteLight&&i.style.setProperty("--color-granite-light",e.colorGraniteLight),e.colorGranite&&i.style.setProperty("--color-granite",e.colorGranite),e.colorSuccess&&i.style.setProperty("--color-success",e.colorSuccess),e.colorSuccessLighter&&i.style.setProperty("--color-success-Lighter",e.colorSuccessLighter),e.colorSuccessLight&&i.style.setProperty("--color-success-Light",e.colorSuccessLight),e.colorSuccessDark&&i.style.setProperty("--color-success-Dark",e.colorSuccessDark),e.colorWarning&&i.style.setProperty("--color-warning",e.colorWarning),e.colorWarningLighter&&i.style.setProperty("--color-warning-Lighter",e.colorWarningLighter),e.colorWarningLight&&i.style.setProperty("--color-warning-Light",e.colorWarningLight),e.colorWarningDark&&i.style.setProperty("--color-warning-Dark",e.colorWarningDark),e.colorHigh&&i.style.setProperty("--color-high",e.colorHigh),e.colorHighLighter&&i.style.setProperty("--color-high-lighter",e.colorHighLighter),e.colorHighLight&&i.style.setProperty("--color-high-light",e.colorHighLight),e.colorHighDark&&i.style.setProperty("--color-high-dark",e.colorHighDark),e.colorText&&i.style.setProperty("--color-text",e.colorText),(!e.backgroundColor||e.backgroundColor!=="transparent")&&i.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),e.headerHeight!=null&&i.style.setProperty("--bimdata-viewer-header-height",e.headerHeight),i.style.setProperty("--areas-background-color","transparent")}const fjt=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),km=Object.freeze({READ:"read",WRITE:"write"});function mfe(i){const e={};return i.forEach(t=>{const[n,o]=t.split(":");e[n]?e[n].push(o):e[n]=[o]}),e}const Ajt={token_scopes:[],usable_scopes:[],user_role:25};function gfe(i=Ajt){var n,o,r,s,a,l;const e=mfe(i.token_scopes),t=mfe(i.usable_scopes);return{...mq(i),tokenScopes:e,usableScopes:t,userRole:fjt[i.user_role],user:i.user?mq(i.user):null,hasBcfReadPermission:((n=t.bcf)==null?void 0:n.includes(km.READ))??!1,hasBcfWritePermission:((o=t.bcf)==null?void 0:o.includes(km.WRITE))??!1,hasModelReadPermission:((r=t.model)==null?void 0:r.includes(km.READ))??!1,hasModelWritePermission:((s=t.model)==null?void 0:s.includes(km.WRITE))??!1,hasDocReadPermission:((a=t.document)==null?void 0:a.includes(km.READ))??!1,hasDocWritePermission:((l=t.document)==null?void 0:l.includes(km.WRITE))??!1}}const mjt={de:{BcfComponents:{BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorität",statusLabel:"Status",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zurücksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{goBackButton:"Zurück",title:"BCF-Parameter",text:"Erstellen, füllen und listen Sie die BCF-Einstellungen auf, die Sie für dieses Projekt haben möchten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"Fügen Sie Fragen hinzu, um zugehörige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorität",PriorityNotDefined:"Keine Priorität",PriorityTitle:"Prioritäten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorität:",noPriority:"Keine",assignedTo:"Zugewiesen an :",elements:"Elemente",notSpecified:"Nicht definiert",see:"Anzeigen"},BcfTopicCreationCard:{text:"Ein neues BCF-Thema erstellen",createBcfSideTitle:"Ein Problem melden"},BcfTopicForm:{dragDropImageText:"Bitte wählen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"Fügen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorität",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"Fälligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Bestätigen",updateButton:"Änderungen übernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte Änderungen.",cancelButton:"Änderungen verwerfen",continueButton:"Änderungen fortsetzen",createTitle:"Ein Problem melden",dragDropImageTextTablet:"Foto machen",takeSnapshot:"Mach einen Schnappschuss",importFile:"Eine Datei importieren",searchPlaceholder:"Suchen",emptySearch:"kein Ergebnis"},BcfTopicOverview:{openViewer:"Im Viewer öffnen",openViewerNoModels:"Es sind keine Vorlagen zur Ansicht bereit",elements:"{count} Elemente",noElements:"kein Element",type:"Typ",noTypeSpecified:"Kein Typ angegeben",description:"Beschreibung",noDescriptionProvided:"Keine Beschreibung angegeben",assignedTo:"Zugeteilt an",notAssigned:"Nicht zugewiesen",dueDate:"Fälligkeitsdatum",noDueDate:"Kein Fälligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorität",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar veröffentlichen",deleteText:"Sie löschen jetzt {Name}",deleteBcfButton:"Dieses BCF löschen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorität",status:"Status",title:"Titel",creator:"Autor",date:"Datum"}},BcfTopicActionsCell:{seeButton:"Anzeigen"},BcfTopicComments:{commentButton:"Ein Kommentar verfassen",commentLabel:"Ein Kommentar verfassen",commentText:"Kommentar",cancelButton:"Abbrechen",publishButton:"Veröffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar löschen?",deleteButton:"Löschen",takeSnapshot:"Mach einen Schnappschuss"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzufügen",cancelButton:"Abbrechen",validateButton:"Bestätigen",deleteExtensionText:"Diesen Parameter löschen",deleteButton:"Löschen",title:{Priority:"Prioritäten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorität hinzufügen",Label:"Ein neues Etikett hinzufügen",Status:"Einen neuen Status hinzufügen",Type:"Einen neuen Typ hinzufügen",Stage:"Eine neue Phase hinzufügen"},text:{Priority:"Liste der Prioritäten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}}},en:{BcfComponents:{BcfFilters:{filtersButton:"Filters",filtersTitle:"Filters",priorityLabel:"Priority",statusLabel:"Status",assignedToLabel:"Assigned to",creatorsLabel:"Created by",tagsLabel:"Tags",resetButton:"Reset",searchButton:"Search",undefined:"Not defined",datePlaceholder:"Creation date"},BcfSettings:{goBackButton:"Back",title:"BCF Settings",text:"Create, enter in, and list the BCF settings you would like to have for this project",validateButton:"Validate BCF settings"},BcfStatistics:{emptyText:"Add BCF Topics to start to have some stats here.",issues:"issues",extension:{Priority:"Priority",PriorityNotDefined:"No priority",PriorityTitle:"Priorities",Status:"Status",StatusNotDefined:"No status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priority: ",noPriority:"None",assignedTo:"Assigned to: ",elements:"Elements",notSpecified:"Not specified",see:"See"},BcfTopicCreationCard:{text:"Create a new BCF topic",createBcfSideTitle:"Report a problem"},BcfTopicForm:{dragDropImageText:"Please select a file",addObjectButton:"Object",addAnnotationButton:"Annotation",annotationButtonTooltip:"This topic has no viewpoint",addPictureButton:"Add a picture",titlePlaceholder:"Title *",titleErrorMessage:"Missing title",typeLabel:"Type",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",dueDateLabel:"Due date",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Validate",updateButton:"Modify this BCF",modalText:"You are about to quit editing issue {name} but there are unsaved changes.",cancelButton:"Discard changes",continueButton:"Continue editing",createTitle:"Report a problem",dragDropImageTextTablet:"Take a picture",takeSnapshot:"Take a snapshot",importFile:"Import a file",searchPlaceholder:"Search",emptySearch:"No result"},BcfTopicOverview:{openViewer:"Open in viewer",openViewerNoModels:"No model to open",elements:"{count} Elements",noElements:"No element",type:"Type",noTypeSpecified:"No type specified",description:"Description",noDescriptionProvided:"No description provided",assignedTo:"Assigned to",notAssigned:"Not assigned",dueDate:"Due date",noDueDate:"No due date",informations:"Informations",status:"Status",noStatusSpecified:"No status specified",stage:"Stage",noStageProvided:"No stage provided",priority:"Priority",priorityNotDefined:"Not defined",tags:"Tags",noTags:"No tags",commentButton:"Post a comment",deleteText:"You are about to delete {name}",deleteBcfButton:"Delete this BCF",keepBcfButton:"Keep this BCF",author:"Author"},BcfTopicsTable:{headers:{index:"#",priority:"Priority",status:"Status",title:"Title",creator:"Author",date:"Date"}},BcfTopicActionsCell:{seeButton:"See"},BcfTopicComments:{commentButton:"Post a comment",commentLabel:"Post a comment",commentText:"Comment",cancelButton:"Cancel",publishButton:"Publish",commentsText:"Comments",deleteCommentText:"Delete this comment ?",deleteButton:"Delete",takeSnapshot:"Take a snapshot"},BcfTopicPriorityCell:{noPriority:"None"},SettingCard:{addButton:"add an element",cancelButton:"Cancel",validateButton:"Validate",deleteExtensionText:"Remove this setting",deleteButton:"Delete",title:{Priority:"Priorities",Label:"Labels",Status:"Status",Type:"Types",Stage:"Stages"},input:{Priority:"Add a new priority",Label:"Add a new label",Status:"Add new status",Type:"Add a new type",Stage:"Add a new stage"},text:{Priority:"Priority list",Label:"Labels list",Status:"Status list",Type:"Type list",Stage:"Stage list"}}}},es:{BcfComponents:{BcfFilters:{filtersButton:"Filtros",filtersTitle:"Filtros",priorityLabel:"Prioridad",statusLabel:"Estado",assignedToLabel:"Asignado a",creatorsLabel:"Creado por",tagsLabel:"Etiquetas:",resetButton:"Restablecer",searchButton:"Buscar en",undefined:"No definido",datePlaceholder:"Fecha de creación"},BcfSettings:{goBackButton:"Volver",title:"Parámetros del BCF",text:"Cree, rellene y enumere los parámetros del BCF que desea tener en este proyecto",validateButton:"Validar los parámetros del BCF"},BcfStatistics:{emptyText:"Añada preguntas para ver las estadísticas asociadas aquí.",issues:"problemas",extension:{Priority:"Prioridad",PriorityNotDefined:"Sin prioridad",PriorityTitle:"Prioridades",Status:"Estado",StatusNotDefined:"Sin estado",StatusTitle:"Estatutos"}},BcfTopicCard:{priority:"Prioridad :",noPriority:"Sin",assignedTo:"Asignado a :",elements:"Elementos",notSpecified:"No definido",see:"Ver"},BcfTopicCreationCard:{text:"Crear un nuevo tema BCF",createBcfSideTitle:"Informar de un problema"},BcfTopicForm:{dragDropImageText:"Seleccione un archivo",addObjectButton:"Objeto",addAnnotationButton:"Anotación",annotationButtonTooltip:"Actualmente este tema no posee ningún punto de vista",addPictureButton:"Añadir una imagen",titlePlaceholder:"Título *",titleErrorMessage:"Falta el título",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripción",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Está a punto de salir de la edición del problema de {name} pero hay cambios sin guardar.",cancelButton:"Cancelar los cambios",continueButton:"Continuar con los cambios",createTitle:"Informar de un problema",dragDropImageTextTablet:"Tomar una fotografía",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ningún modelo listo para la visualización",elements:"{count} Elementos",noElements:"Ningún elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripción",noDescriptionProvided:"No hay descripción",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Información",status:"Estado",noStatusSpecified:"No se especifica el estado",stage:"Fase",noStageProvided:"No se indica ninguna fase",priority:"Prioridad",priorityNotDefined:"No definido",tags:"Etiquetas",noTags:"Sin etiquetas",commentButton:"Publicar un comentario",deleteText:"Estás a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"Título",creator:"Autor",date:"Fecha"}},BcfTopicActionsCell:{seeButton:"Ver"},BcfTopicComments:{commentButton:"Publicar un comentario",commentLabel:"Publicar un comentario",commentText:"Comentario",cancelButton:"Cancelar",publishButton:"Publicar",commentsText:"comentarios",deleteCommentText:"¿Borrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"añadir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuración",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"Añadir una nueva prioridad",Label:"Añadir una nueva etiqueta",Status:"Añadir un nuevo estado",Type:"Añadir un nuevo tipo",Stage:"Añadir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}}},fr:{BcfComponents:{BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorité",statusLabel:"Statut",assignedToLabel:"Assigné à",creatorsLabel:"Créé par",tagsLabel:"Tags",resetButton:"Réinitialiser",searchButton:"Rechercher",undefined:"Non défini",datePlaceholder:"Date de création"},BcfSettings:{goBackButton:"Retour",title:"Paramètres BCF",text:"Créez, renseignez et listez les paramètres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les paramètres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associées ici.",issues:"problèmes",extension:{Priority:"Priorité",PriorityNotDefined:"Aucune priorité",PriorityTitle:"Priorités",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorité : ",noPriority:"Aucune",assignedTo:"Assigné à : ",elements:"{n} Élements",notSpecified:"Non défini",see:"Voir"},BcfTopicCreationCard:{text:"Créer un nouveau topic BCF",createBcfSideTitle:"Signaler un problème"},BcfTopicForm:{dragDropImageText:"Veuillez sélectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne possède actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorité",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assigné à",dueDateLabel:"Date d'échéance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous êtes sur le point de quitter l'édition de l'issue {name} mais il y'a des modifications non enregistrées.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un problème",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de résultat"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun modèle prêt pour une visualisation",elements:"{count} Élements",noElements:"Aucun élément concerné",type:"Type",noTypeSpecified:"Pas de type spécifié",description:"Description",noDescriptionProvided:"Pas de description renseignée",assignedTo:"Assigné à",notAssigned:"Non assigné",dueDate:"Échéance",noDueDate:"Pas de date d'échéance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut spécifié",stage:"Phase",noStageProvided:"Pas de phase renseignée",priority:"Priorité",priorityNotDefined:"Non défini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous êtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorité",status:"Statut",title:"Titre",creator:"Auteur",date:"Date"}},BcfTopicActionsCell:{seeButton:"Voir"},BcfTopicComments:{commentButton:"Poster un commentaire",commentLabel:"Poster un commentaire",commentText:"Commentaire",cancelButton:"Annuler",publishButton:"Publier",commentsText:"commentaires",deleteCommentText:"Supprimer ce commentaire ?",deleteButton:"Supprimer",takeSnapshot:"Prendre un snapshot"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un élément",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce paramètre",deleteButton:"Supprimer",title:{Priority:"Priorités",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorité",Label:"Ajouter un nouveau label",Status:"Ajouter un nouveau statut",Type:"Ajouter un nouveau type",Stage:"Ajouter une nouvelle phase"},text:{Priority:"Liste des priorités",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}}},it:{BcfComponents:{BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorità",statusLabel:"Stato",datePlaceholder:"Data di creazione",assignedToLabel:"Assegnato a",creatorsLabel:"Creato da",tagsLabel:"Etichette",resetButton:"Ripristina",searchButton:"Cerca",undefined:"Non definito"},BcfSettings:{goBackButton:"Indietro",title:"Parametri BCF",text:"Creare, notificare e elencare i parametri BCF che si desidera avere su questo progetto",validateButton:"Conferma i parametri BCF"},BcfStatistics:{emptyText:"Aggiungi delle domande per vedere le statistiche associate qui.",issues:"problemi",extension:{Priority:"Priorità",PriorityNotDefined:"Nessuna priorità",PriorityTitle:"Priorità",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorità:",noPriority:"Nessuno",assignedTo:"Assegnato a:",elements:"Elementi",noElements:"0 elementi",notSpecified:"Non definito",see:"Visualizza"},BcfTopicCreationCard:{text:"Crea un nuovo topic BCF",createBcfSideTitle:"Segnala un problema"},BcfTopicForm:{dragDropImageText:"Selezionare un file",addObjectButton:"Oggetto",addAnnotationButton:"Annotazione",annotationButtonTooltip:"Attualmente questo argomento non presenta alcun punto di vista",addPictureButton:"Aggiungere un'immagine",titlePlaceholder:"Titolo *",titleErrorMessage:"Titolo mancante",typeLabel:"Tipo",priorityLabel:"Priorità",statusLabel:"Stato",stageLabel:"Fase",assignedToLabel:"Assegnato a",dueDateLabel:"Data di scadenza",descriptionLabel:"Descrizione",labelsLabel:"Tag",createButton:"Conferma",updateButton:"Modificare questo BCF",modalText:"State per abbandonare la modifica di {name} ma ci sono modifiche non salvate.",cancelButton:"Annullare le modifiche",continueButton:"Continuare le modifiche",createTitle:"Segnala un problema"},BcfTopicOverview:{openViewer:"Apri nel visualizzatore",openViewerNoModels:"Non esistono modelli pronti per la visualizzazione",elements:"{count} Elementi",noElements:"Nessun elemento",type:"Tipo",noTypeSpecified:"Nessun tipo specificato",description:"Descrizione",noDescriptionProvided:"Nessuna descrizione inserita",assignedTo:"Assegnato a",notAssigned:"Non assegnato",dueDate:"Scadenza",noDueDate:"Nessuna data di scadenza",informations:"Informazioni",status:"Stato",noStatusSpecified:"Nessuno stato specificato",stage:"Fase",noStageProvided:"Nessuna fase inserita",priority:"Priorità",priorityNotDefined:"Non definita",tags:"Etichette",noTags:"Nessuna etichetta",commentButton:"Pubblica un commento",deleteText:"Stai per eliminare {name}",deleteBcfButton:"Elimina questo BCF",keepBcfButton:"Conserva questo BCF",author:"Autore"},BcfTopicsTable:{headers:{index:"#",priority:"Priorità",status:"Stato",title:"Titolo",creator:"Autore",date:"Data"}},BcfTopicActionsCell:{seeButton:"Visualizza"},BcfTopicComments:{commentButton:"Pubblica un commento",commentLabel:"Pubblica un commento",commentText:"Commento",cancelButton:"Annulla",publishButton:"Pubblica",commentsText:"commenti",deleteCommentText:"Eliminare questo commento?",deleteButton:"Elimina"},BcfTopicPriorityCell:{noPriority:"Nessuno"},SettingCard:{addButton:"aggiungi un elemento",cancelButton:"Annulla",validateButton:"Conferma",deleteExtensionText:"Elimina questo parametro",deleteButton:"Elimina",title:{Priority:"Priorità",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorità",Label:"Aggiungi una nuova etichetta",Status:"Aggiungi un nuovo stato",Type:"Aggiungi un nuovo tipo",Stage:"Aggiungi una nuova fase"},text:{Priority:"Elenco delle priorità",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}}}},gjt=({apiClient:i,fetchUsers:e,i18nPlugin:t}={})=>({install(n){i?rn.setup({apiClient:i,fetchUsers:e}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),t?Object.entries(mjt).forEach(([o,r])=>{t.global.mergeLocaleMessage(o,r)}):console.warn("[BCF Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(T6e).forEach(([o,r])=>{n.component(o,r)})}}),vjt={de:{BuildingMaker:{title:"Building Maker",back:"Zurück",list:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschließend Ihre PDFs herunter.",createButton:"Neues Projekt",updateButton:"Umbenennen",deleteButton:"Löschen"},form:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschließend Ihre PDFs herunter.",input:"Name des Gebäudes",error:"Ungültiger Name",createButton:"Erstellen",updateButton:"Bestätigen"},view:{addStoreyButton:"Etage",addPlanButton:"Grundriss",closeButton:"Fertigstellen",submitFilesButton:"Bestätigen"},storeyForm:{title:"Neue Etage",input:"Name",error:"Ungültiger Name",cancelButton:"Abbrechen",submitButton:"Bestätigen"}},FileManager:{creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gelöscht",newFileSuccess:"Datei hinzugefügt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gelöscht",nameInputErrorMessage:"Ungültiger name",cancel:"Abbrechen",submit:"Bestätigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"Löschen",deleteTitle:"Dateien löschen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endgültig zu löschen"}},en:{BIMDataComponents:{t:{back:"Back",cancel:"Cancel",create:"Create",delete:"Delete",download:"Download",finish:"Finish",rename:"Rename",search:"Search",see:"View",storey:"Storey",validate:"Validate"}},BuildingMaker:{title:"Building Maker",list:{text:"Create and edit storeys, then download your PDFs.",new:"New project"},form:{input:"Building name",error:"Invalid"},view:{addStorey:"Add Storey",addFile:"Add File",addPlan:"Add Plan"},storeyForm:{title:"New storey",input:"Name",error:"Invalid name"}},FileManager:{creationFormTitle:"Create folder",renameFormPlaceholder:"Folder/File name",nameInputPlaceholder:"Folder name",emptyFolder:"This folder is empty",newFolderSuccess:"New folder created",renameFolderSuccess:"Folder renamed",deleteFolderSuccess:"Folder deleted",newFileSuccess:"File added",renameFileSuccess:"File renamed",deleteFileSuccess:"File deleted",nameInputErrorMessage:"Invalid name",buttonText:"New folder",addFileButtonText:"Upload a file",deleteTitle:"Deleting Files",deleteDetail:"You are about to permanently delete the following files / folders",dmsRoot:"Root of the project's DMS",pdfPageSelectorTitle:"Select a page"},MetaBuildingStructure:{title:"Meta-Building Structure",tab:{structure:"Structure",zones:"Zones",equipments:"Equipments"},StoreySelector:{placeholder:"Select a storey"}},PhotosphereBuilding:{title:"Photosphere Building"}},es:{BuildingMaker:{title:"Building Maker",back:"Vuelta",list:{text:"Cree y edite los pisos después cargue los PDF.",createButton:"Nuevo proyecto",updateButton:"Renombrar",deleteButton:"Suprimir"},form:{text:"Cree y edite los pisos después cargue los PDF.",input:"Nombre del edificio",error:"Nombre no válido",createButton:"Crear",updateButton:"Validar"},view:{addStoreyButton:"Piso",addPlanButton:"Plano",closeButton:"Terminar",submitFilesButton:"Validar"},storeyForm:{title:"Nuevo piso",input:"Nombre",error:"Nombre no válido",cancelButton:"Anular",submitButton:"Validar"}},FileManager:{creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta está vacía",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inválida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Está a punto de eliminar permanentemente los siguientes archivos / carpetas"}},fr:{BIMDataComponents:{t:{back:"Retour",cancel:"Annuler",create:"Créer",delete:"Supprimer",download:"Télécharger",finish:"Terminer",rename:"Renommer",search:"Rechercher",see:"Voir",storey:"Étage",validate:"Valider"}},BuildingMaker:{title:"Building Maker",list:{text:"Créez et éditez les étages puis téléchagez vos PDF.",new:"Nouveau projet"},form:{input:"Nom du bâtiment",error:"Nom invalide"},view:{addStorey:"Ajouter un Étage",addFile:"Ajouter un fichier",addPlan:"Ajouter un plan"},storeyForm:{title:"Nouvel étage",input:"Nom",error:"Nom invalide"}},FileManager:{creationFormTitle:"Créer un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier créé",renameFolderSuccess:"Dossier renommé",deleteFolderSuccess:"Dossier supprimé",newFileSuccess:"Fichier ajouté",renameFileSuccess:"Fichier renommé",deleteFileSuccess:"Fichier supprimé",nameInputErrorMessage:"Nom invalide",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",deleteTitle:"Supression de fichiers",deleteDetail:"Vous êtes sur le point de supprimer définitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",pdfPageSelectorTitle:"Sélectionner une page"},MetaBuildingStructure:{title:"Structure Méta-Building",tab:{structure:"Structure",zones:"Zones",equipments:"Équipements"},StoreySelector:{placeholder:"Sélectionner un étage"}},PhotosphereBuilding:{title:"Photosphère Building"}},it:{BuildingMaker:{title:"Building Maker",back:"Reso",list:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",createButton:"Nuovo progetto",updateButton:"Rinominare",deleteButton:"Eliminare"},form:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",input:"Nome della costruzione",error:"Nome non corretto",createButton:"Creare",updateButton:"Convalidare"},view:{addStoreyButton:"Piano",addPlanButton:"Mappa",closeButton:"Finire",submitFilesButton:"Convalidare"},storeyForm:{title:"Nuovo piano",input:"Nome",error:"Nome non corretto",cancelButton:"Annullare",submitButton:"Convalidare"}},FileManager:{creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella è vuota",newFolderSuccess:"Nuova cartella creata",renameFolderSuccess:"Cartella rinominata",deleteFolderSuccess:"Cartella eliminata",newFileSuccess:"File aggiunto",renameFileSuccess:"File rinominato",deleteFileSuccess:"File cancellato",nameInputErrorMessage:"Nome non valido",cancel:"Annulla",submit:"Invia",buttonText:"Nuova cartella",addFileButtonText:"Carica un file",rename:"Rinominare",view:"Vedere",download:"Scaricare",delete:"Cancellare",deleteTitle:"Eliminazione di file",deleteDetail:"Stai per eliminare definitivamente i seguenti file/cartelle"}}},yjt=({i18nPlugin:i}={})=>({install(e){i?Object.entries(vjt).forEach(([t,n])=>{i.global.mergeLocaleMessage(t,n)}):console.warn("[BIMData Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(qMt).forEach(([t,n])=>{e.component(t,n)})}}),wjt=Object.freeze(Object.defineProperty({__proto__:null,BIMDataClickAway:Xa,BIMDataClickInputAway:{beforeMount(i,e){if(typeof e.value!="function")throw Error(`click away directive needs function, got ${typeof e.value}`);i.clickAwayHandler=t=>{(t.path||t.composedPath&&t.composedPath()).find(o=>o===i)||e.value()},window.addEventListener("mousedown",i.clickAwayHandler,!0)},unmounted(i){window.removeEventListener("mousedown",i.clickAwayHandler,!0),delete i.clickAwayHandler}}},Symbol.toStringTag,{value:"Module"})),Cjt=i=>({install(e){Object.entries(Nje).forEach(([t,n])=>{e.component(t,n)}),Object.entries(wjt).forEach(([t,n])=>e.directive(t.split("BIMData")[1],n))}}),bjt={name:"LiWrapper",render(){return Wn("li",this.$slots.default())}};function xjt(i,e){var t=new Set([]);return i.forEach(n=>{e.has(n)||t.add(n)}),t}const Pl=Zo("id"),Mjt=({contextMenu:i,objects:e=[],state:t=i.$viewer.state,pictos:n})=>[{name:"selectAll",get group(){return i.groupPositions.select},position:1,get label(){return i.$t("context_menu.select_all")},get picto(){return n.get(this.name)},execute:()=>t.selectObjects(e.filter(Na(Bi("visible"),wd("selected"))).map(Pl)),predicate:()=>e.some(Na(Bi("visible"),wd("selected")))},{name:"deselectAll",get group(){return i.groupPositions.select},position:2,get label(){return i.$t("context_menu.deselect_all")},get picto(){return n.get(this.name)},execute:()=>t.deselectObjects(e.filter(Bi("selected")).map(Pl)),predicate:()=>e.some(Bi("selected"))},{name:"selectSimilar",get group(){return i.groupPositions.select},position:3,get label(){return i.$t("context_menu.select_similar")},get picto(){return n.get(this.name)},execute(){const o=e.filter(r=>r.visible&&r.type===this.selectedObject.type&&r.id!==this.selectedObject.id).map(Pl);t.selectObjects(o)},selectedObject:null,predicate(){const o=e.filter(Na(Bi("visible"),Bi("selected")));return o.length===1&&o[0].type!==void 0?(this.selectedObject=o[0],!0):(this.selectedObject=null,!1)}},{name:"reverseSelection",get label(){return i.$t("context_menu.reverse_selection")},get group(){return i.groupPositions.select},position:4,execute:()=>{const o=new Set(e.filter(Bi("selected")).map(Pl)),r=new Set(e.filter(Bi("visible")).map(Pl));t.selectObjects(Array.from(xjt(r,o)),{exclusive:!0})},predicate:()=>e.some(Na(wd("selected"),Bi("visible")))&&e.some(Na(Bi("selected"),Bi("visible")))},{name:"showAll",get group(){return i.groupPositions.visibility},position:1,get label(){return i.$t("context_menu.show_all")},get picto(){return n.get(this.name)},execute:()=>t.showObjects(e.filter(wd("visible")).map(Pl)),predicate:()=>e.some(wd("visible"))},{name:"hide",get group(){return i.groupPositions.visibility},position:2,get label(){return i.$t("context_menu.hide")},get picto(){return n.get(this.name)},objectsToHide:null,execute(){const o=this.objectsToHide.filter(Bi("selected"));o.length>0&&t.deselectObjects(o.map(Pl)),t.hideObjects(this.objectsToHide.map(Pl))},predicate(){return this.objectsToHide=e.filter(Na(Bi("selected"),Bi("visible"))),this.objectsToHide.length>0}},{name:"hideAll",get group(){return i.groupPositions.visibility},position:3,get label(){return i.$t("context_menu.hide_all")},execute:()=>{const o=e.filter(Bi("visible"));o.some(Bi("selected"))&&t.deselectObjects(o.filter(Bi("selected")).map(Pl)),t.hideObjects(o.map(Pl))},predicate:()=>e.some(Bi("visible"))}].filter(o=>o.predicate()),Ejt={components:{LiWrapper:bjt},inject:["$viewer"],data(){return{defaultPrevented:!1,displayed:!1,top:null,bottom:null,left:null,width:200,nextCommandId:1,currentCommands:[],contextCommands:[],registeredCommands:[],groupPositions:{select:10,visibility:20},asyncPredicateRunning:!1}},computed:{position(){return{top:this.top?this.top+"px":"unset",bottom:this.bottom?this.bottom+"px":"unset",left:this.left+"px",width:this.width+"px"}}},watch:{displayed(i){i?document.addEventListener("keydown",this.onKeyDown):document.removeEventListener("keydown",this.onKeyDown)}},created(){this.$viewer.contextMenu=this,this.asyncPredicates=new Set},methods:{onKeyDown(i){i.key==="Escape"&&this.away()},setPosition(i){const t=(document.fullscreenElement?document.fullscreenElement:this.$parent.$el).getBoundingClientRect();this.left=i.clientX-t.left,this.top=i.clientY-t.top,this.left+this.width>t.width&&(this.left=this.left-this.width),i.clientY>t.top+t.height/2?(this.bottom=t.height-this.top,this.top=null):this.bottom=null},typeCheckCommand(i={}){let e=null;if((!i.execute||typeof i.execute!="function")&!i.component&&(e="Cannot register context menu command. A command must have an execute function or a component property."),i.label||(e="Cannot register context menu command. A command must have a label."),e)throw console.error(e),new Error(e);return i.id=this.nextCommandId++,i},open(i){this.currentCommands=[],this.setPosition(i),this.originEvent=i,i.preventDefault(),this.setCurrentCommands(),this.groupCurrentCommands(),this.defaultPrevented=!1,this.displayed=!0,document.fullscreenElement?(this.$el.parentElement.removeChild(this.$el),this.adoptiveParent=document.fullscreenElement,this.adoptiveParent.appendChild(this.$el)):this.adoptiveParent&&this.adoptiveParent!==this.$viewer.globalContext.el&&(this.adoptiveParent.removeChild(this.$el),this.$viewer.globalContext.el.appendChild(this.$el),this.adoptiveParent=null)},setCurrentCommands(){this.asyncPredicates.clear(),this.asyncPredicateRunning=!1,this.defaultPrevented||this.registeredCommands.forEach(async i=>{if(typeof i.predicate=="function"){const e=i.predicate(this.$viewer.globalContext.activeLocalContext);if(e===!0)this.currentCommands.push(i);else if(typeof(e==null?void 0:e.then)=="function"){this.asyncPredicates.add(e),this.asyncPredicateRunning=!0;const t=await e;this.asyncPredicates.has(e)&&(this.asyncPredicates.delete(e),this.asyncPredicateRunning=this.asyncPredicates.size>0,t===!0&&this.currentCommands.push(i))}}else this.currentCommands.push(i)}),this.currentCommands.push(...this.contextCommands),this.contextCommands=[]},getDefaultCommands({objects:i=[],state:e=this.$viewer.state,context:t=null}){const n=new Map;return t&&this.$viewer.shortcutManager.getShortcuts(t).forEach(o=>n.set(o.name,o.key)),Mjt({contextMenu:this,objects:i,state:e,pictos:n})},executeCommand(i){if(i.execute&&(i.execute(this.originEvent),this.displayed=!1),i.component&&!i.menu)throw new Error("Command with component property must have a `menu` property")},away(){this.displayed=!1},groupCurrentCommands(){const i=new Map;this.currentCommands.forEach(n=>{(n.group===null||n.group===void 0)&&(n.group=0),i.has(n.group)?i.get(n.group).push(n):i.set(n.group,[n])}),i.forEach(n=>n.sort((o,r)=>(o.position=o.position||0,r.position=r.position||0,o.position-r.position)));const t=[...i.keys()].sort((n,o)=>n-o).map(n=>i.get(n)).flat();this.currentCommands=t},isGroupIntersection(i){if(i===0)return!1;const e=this.currentCommands[i-1],t=this.currentCommands[i];return e.group<t.group},registerContextCommand(i){const e=this.typeCheckCommand(i);return this.contextCommands.push(e),i.id},registerCommand(i){const e=this.typeCheckCommand(i);return this.registeredCommands.push(e),i.id},unregisterCommand(i){return this.registeredCommands.find(e=>e.id===i)?(this.registeredCommands=this.registeredCommands.filter(e=>e.id!==i),!0):!1},preventDefault(){this.defaultPrevented=!0}}},Bjt={key:0,class:"separator"},Ijt={class:"menu-text"},Sjt={key:1,class:"menu-picto"},Pjt={key:0,class:"context-menu__spinner"};function Tjt(i,e,t,n,o,r){const s=k("BIMDataIconChevron"),a=k("LiWrapper"),l=k("BIMDataSpinner"),c=fi("click-away");return o.displayed&&(o.currentCommands.length||o.asyncPredicateRunning)?At((B(),O("ul",{key:0,class:"bimdata-list context-menu",style:ue(r.position)},[(B(!0),O(ct,null,Bt(o.currentCommands,(u,d)=>(B(),Z(a,{key:u.label,class:"context-menu__element",onClick:h=>r.executeCommand(u)},{default:V(()=>[r.isGroupIntersection(d)?(B(),O("div",Bjt)):ne("",!0),b("div",Ijt,K(u.label),1),!u.component&&u.picto?(B(),O("span",Sjt,K(u.picto),1)):u.component?(B(),Z(s,{key:2,size:"xxs",class:"fill-primary"})):ne("",!0)]),_:2},1032,["onClick"]))),128)),o.asyncPredicateRunning?(B(),O("li",Pjt,[D(l)])):ne("",!0)],4)),[[c,r.away]]):ne("",!0)}const kjt=z(Ejt,[["render",Tjt],["__scopeId","data-v-5b87d4a3"]]),Rjt={name:"ViewerHeader",inject:["$viewer"],props:{visible:{type:Boolean,default:!0}},setup(){const i=mt("$viewer"),e=Hs(new Map),t=o=>{if(!o.name)throw new TypeError("[Viewer Header] Content must have a name");if(e.has(o.name))throw new Error(`[Viewer Header] Content with name ${o.name} already exists`);e.set(o.name,o)},n=o=>e.has(o)?(e.delete(o),!0):!1;return{logo:i.uiSettings.bimdataLogo!==!1,version:i.uiSettings.version!==!1?i.version:null,headerContent:e,headerRightContentComponents:et(()=>Array.from(e.values()).filter(o=>o.position==="right").sort((o,r)=>o.order-r.order).map(o=>o.component)),headerLeftContentComponents:et(()=>Array.from(e.values()).filter(o=>o.position==="left").sort((o,r)=>o.order-r.order).map(o=>o.component)),addContent:t,removeContent:n}}},Djt={class:"viewer-header"},_jt={class:"viewer-header__content"},Ljt={class:"viewer-header__content__left"},Fjt={class:"viewer-header__content__right"},Ojt={key:0,class:"m-l-6 flex items-center"},Ujt={key:1,class:"viewer-header__version"};function Njt(i,e,t,n,o,r){const s=k("BIMDataIllustration");return At((B(),O("div",Djt,[b("div",_jt,[b("div",Ljt,[(B(!0),O(ct,null,Bt(n.headerLeftContentComponents,a=>(B(),Z(bn(a),{key:a.name}))),128))]),b("div",Fjt,[(B(!0),O(ct,null,Bt(n.headerRightContentComponents,a=>(B(),Z(bn(a),{key:a.name}))),128))])]),n.logo||n.version?(B(),O("div",Ojt,[n.logo?(B(),Z(s,{key:0,name:"logo",width:"30px",height:"30px"})):ne("",!0),n.version?(B(),O("div",Ujt,K(n.version),1)):ne("",!0)])):ne("",!0)],512)),[[Gt,t.visible]])}const Vjt=z(Rjt,[["render",Njt],["__scopeId","data-v-5c9ea6b6"]]),Hjt={emits:["resize"],setup(i,{emit:e}){return{onResizerMousedown:n=>{n.preventDefault();let o=n.clientX;const r=a=>{a.preventDefault();const l=a.clientX-o;o=a.clientX,e("resize",l)},s=a=>{a.preventDefault(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",s)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",s)}}}},zjt={class:"bimdata-separator"};function jjt(i,e,t,n,o,r){return B(),O("div",zjt,[e[1]||(e[1]=b("div",{class:"bimdata-separator__line"},null,-1)),b("div",{class:"bimdata-separator__resizer",onMousedown:e[0]||(e[0]=(...s)=>n.onResizerMousedown&&n.onResizerMousedown(...s))},null,32)])}const Gjt={components:{Separator:z(Hjt,[["render",jjt],["__scopeId","data-v-79a3b3af"]])},props:{position:{type:String,required:!0,validator(i){return["left","right"].includes(i)}},sidePanel:{type:Object,required:!0,validator(i){if(i.width&&(typeof i.width!="number"||i.width<0))return console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof i.width}`),!1;const e=typeof(i==null?void 0:i.component)=="object";return e||console.error("[GlobalSidePanel] sidePanel must have a component property"),e}}},setup(i){const e=me(null),t=me(i.sidePanel.width??400),n=(o,r=1)=>{const s=t.value+o*r;t.value=Math.max(0,s)};return yt(()=>i.sidePanel,()=>{Object.defineProperty(i.sidePanel,"width",{get(){return t.value},set(o){if(typeof o!="number"||o<=0){console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof o}`);return}t.value=o}}),Object.defineProperty(i.sidePanel,"componentInstance",{get(){return e.value},enumerable:!0})},{immediate:!0}),{componentInstance:e,width:t,onResize:n}}},qjt={class:"bimdata-global-side-panel__component"};function Qjt(i,e,t,n,o,r){const s=k("Separator");return B(),O("div",{class:"bimdata-global-side-panel",style:ue(`width: ${n.width}px`)},[t.sidePanel.resizable&&t.position==="right"?(B(),Z(s,{key:0,onResize:e[0]||(e[0]=a=>n.onResize(a,-1))})):ne("",!0),b("div",qjt,[(B(),Z(bn(t.sidePanel.component),{ref:"componentInstance"},null,512))]),t.sidePanel.resizable&&t.position==="left"?(B(),Z(s,{key:1,onResize:e[1]||(e[1]=a=>n.onResize(a))})):ne("",!0)],4)}const Kjt={name:"BimdataViewer",components:{ContextMenu:kjt,ViewerHeader:Vjt,ModalManager:pfe,GlobalSidePanel:z(Gjt,[["render",Qjt],["__scopeId","data-v-82d0d4cb"]])},setup(){const i=mt("$viewer"),{globalContext:e,shortcutManager:t}=i;sn(()=>{t&&t.destroy(),e.hub.clear()}),Ii(()=>{i.pluginManager.runPluginsScripts(i)});const n=et(()=>{var f;return i.uiSettings.bimdataLogo!==!1&&(e.localContexts.length!==1||((f=e.localContexts[0].window)==null?void 0:f.logoAndVersion))}),o=et(()=>{var f;return i.uiSettings.version!==!1&&(e.localContexts.length!==1||(f=e.localContexts[0].window)!=null&&f.logoAndVersion)?i.version:null}),r=et(()=>e.leftSidePanel),s=et(()=>e.rightSidePanel),a=et(()=>{var g;const f=i.uiSettings.header!==!1,A=e.localContexts.length===1&&((g=e.localContexts[0].window)==null?void 0:g.header)===!1,p=!!(r.value||s.value);return f&&(!A||p)}),l=i.uiSettings.contextMenu!==!1,c=me(null);function u(f){l&&c.value.open(f)}function d(){i.shortcutManager.active=!0}function h(){i.shortcutManager.active=!1}return{Layout:i.layout.areas.component,onContextMenu:u,onMouseenter:d,onMouseleave:h,isHeaderVisible:a,viewerTemplateRef:e.templateRef,modalManagerTemplateRef:e.modalManagerTemplateRef,headerTemplateRef:e.headerTemplateRef,contextMenuTemplateRef:c,contextMenuEnabled:l,bimdataLogoOnSingleWindow:n,viewerVersionOnSingleWindow:o,version:i.version,loading:et(()=>e.loading),spinner:et(()=>e.spinner),leftSidePanel:r,rightSidePanel:s}}},Jjt={key:1,class:"global-spinner",style:{"z-index":"3"}},Wjt={key:2,class:"viewer__logo"},Zjt={key:1,class:"version m-t-6"};function Xjt(i,e,t,n,o,r){const s=k("ModalManager"),a=k("ContextMenu"),l=k("ViewerHeader"),c=k("GlobalSidePanel"),u=k("BIMDataSpinner"),d=k("BIMDataIllustration");return B(),O("div",{id:"bimdata-viewer",ref:"viewerTemplateRef",class:"bimdata-viewer bimdata-scrollbar",onContextmenu:e[0]||(e[0]=(...h)=>n.onContextMenu&&n.onContextMenu(...h)),onMouseenter:e[1]||(e[1]=(...h)=>n.onMouseenter&&n.onMouseenter(...h)),onMouseleave:e[2]||(e[2]=(...h)=>n.onMouseleave&&n.onMouseleave(...h))},[D(s,{ref:"modalManagerTemplateRef"},null,512),n.contextMenuEnabled?(B(),Z(a,{key:0,ref:"contextMenuTemplateRef"},null,512)):ne("",!0),D(l,{ref:"headerTemplateRef",visible:n.isHeaderVisible},null,8,["visible"]),b("div",{class:"bimdata-viewer__content",style:ue(n.isHeaderVisible?"height: calc(100% - var(--bimdata-viewer-header-height, 40px))":"height: 100%")},[n.leftSidePanel?(B(),Z(c,{key:0,"side-panel":n.leftSidePanel,position:"left"},null,8,["side-panel"])):ne("",!0),(B(),Z(bn(n.Layout),{style:"height: 100%; flex-grow: 1;"})),n.rightSidePanel?(B(),Z(c,{key:1,"side-panel":n.rightSidePanel,position:"right"},null,8,["side-panel"])):ne("",!0)],4),n.loading?(B(),O("div",Jjt,[n.spinner&&n.spinner.component?(B(),Z(bn(n.spinner.component),_r(Cs({key:0},n.spinner.props)),null,16)):(B(),Z(u,{key:1,size:"40px",border:"5px"}))])):ne("",!0),!n.isHeaderVisible&&(n.bimdataLogoOnSingleWindow||n.viewerVersionOnSingleWindow)?(B(),O("div",Wjt,[n.bimdataLogoOnSingleWindow?(B(),Z(d,{key:0,name:"logo"})):ne("",!0),n.viewerVersionOnSingleWindow?(B(),O("div",Zjt,K(n.version),1)):ne("",!0)])):ne("",!0)],544)}const Yjt=z(Kjt,[["render",Xjt]]),$jt=["src"],eGt={class:"bimdata-models__header"},tGt={key:0,class:"bimdata-models__header__loader"},iGt={class:"bimdata-models__header__picto"},nGt={class:"bimdata-models__header__name"},oGt={key:0,class:"bimdata-models__header__name--empty"},sGt={key:1,class:"bimdata-models__header__name--empty"},rGt={key:3},aGt=["onMousemove","onClick"],vfe={__name:"Models",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(i){const e=i,t=mt("$viewer"),n=me(),o=me(0),r=me(0),s=me(),a=vn([]),l=me(!1),c=et(()=>t.localContext.loadedModels),u=et(()=>t.localContext.loadedModelIds),d=et(()=>t.localContext.loadingModelIds),h=et(()=>t.localContext.multiModel),f=et(()=>(e.customFilter?a.value.filter(e.customFilter):a.value).map(E=>c.value.find(S=>{var I;return((I=S.document)==null?void 0:I.head_id)!=null&&S.document.head_id===E.document.id})??E)),A=M=>u.value.includes(M),p=M=>d.value.includes(M),g=et(()=>{var S;const{x:M,y:E}=((S=s.value)==null?void 0:S.getBoundingClientRect())??{x:0,y:0};return`top:${r.value-E}px; left:${o.value-M}px;`}),m=M=>{!h.value&&A(M.id)||d.value.length>0||(t.localContext.loadedModelIds.includes(M.id)?t.localContext.unloadModels([M.id]):t.localContext.loadModels([M.id]))},w=M=>{switch(M){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},y=(M,E)=>{M!=null&&M.viewer_360_file&&(o.value=E.clientX,r.value=E.clientY),n.value=M==null?void 0:M.viewer_360_file},v=async M=>{l.value=!0;try{return(await t.api.apiClient.modelApi.getModels(t.api.cloudId,t.api.projectId,void 0,void 0,M)).filter(S=>t.state.models.some(I=>I.archived)||!S.archived).sort(wu("updated_at",!1))}catch(E){console.error("[Models] Cannot get project models. Error: ",E)}finally{l.value=!1}return[]},x=M=>{var E;return((E=M.children)==null?void 0:E.some(S=>A(S.id)))??!1};return v(t.localContext.modelTypes).then(M=>{a.value=M}),(M,E)=>{const S=k("BIMDataSpinner"),I=k("BIMDataIconModel3D"),T=k("BIMDataTextbox"),P=k("BIMDataCheckbox"),R=k("BIMDataRadio"),L=k("BIMDataIcon"),U=k("BIMDataDropdownList");return B(),O("div",{ref_key:"templateRef",ref:s,class:de(["bimdata-models",{"bimdata-models--window-positioning":i.windowPositioning}])},[n.value?(B(),O("div",{key:0,class:"bimdata-models__preview",style:ue(g.value)},[b("img",{src:n.value},null,8,$jt)],4)):ne("",!0),D(U,{style:ue(`--bimdata-models-width: ${i.width};`),width:i.width,list:f.value,"element-key":"id","per-page":40,loading:l.value,class:"bimdata-models__list",disabled:f.value.length===0,onElementClick:m},{header:V(({isOpen:H})=>[b("div",eGt,[l.value||d.value.length>0?(B(),O("div",tGt,[D(S)])):(B(),O(ct,{key:1},[b("div",iGt,[D(I)]),b("div",{class:de(["bimdata-models__header__number bimdata-info-length",{"bimdata-models__header__number--empty":u.value.length===0}])},[b("span",null,K(u.value.length),1)],2),b("div",nGt,[f.value.length===0?(B(),O("span",oGt,K(M.$t("model.no_model")),1)):u.value.length===0?(B(),O("span",sGt,K(M.$t("model.no_loaded_model")),1)):u.value.length===1?(B(),Z(T,{key:2,text:c.value[0].name,tooltip:!H},null,8,["text","tooltip"])):u.value.length>1?(B(),O("span",rGt,K(M.$t("model.selected_models")),1)):ne("",!0)])],64))])]),element:V(({element:H,close:N})=>[b("div",{class:"bimdata-models__model",onMousemove:q=>i.preview&&y(H,q),onMouseout:E[0]||(E[0]=q=>i.preview&&y()),onClick:()=>{!h.value&&!A(H.id)&&N()}},[h.value?(B(),Z(P,{key:0,"model-value":A(H.id)||x(H),disabled:H.status!=="C"||d.value.length>0},null,8,["model-value","disabled"])):(B(),Z(R,{key:1,"model-value":A(H.id)||x(H),disabled:H.status!=="C"||d.value.length>0},null,8,["model-value","disabled"])),D(L,{margin:"0 calc(var(--spacing-unit) / 2)",name:w(H.status),size:"xs",class:de({"fill-success":H.status==="C","fill-high":H.status==="E"})},null,8,["name","class"]),D(T,{class:de({"bimdata-models__model__name":!0,"bimdata-models__model__name--disabled":H.status!=="C"||d.value.length>0}),text:H.name,width:`calc(100% -
5499
5499
  ${h.value?13:23}px - 2 * 6px - 16px)`},null,8,["class","text","width"]),H.document&&!H.document.is_head_version?(B(),Z(L,{key:2,name:"versioning",fill:"",color:"default",size:"xs",margin:"0 0 0 6px"})):ne("",!0)],40,aGt),p(H.id)?(B(),Z(S,{key:0,class:"bimdata-models__model__spinner"})):ne("",!0)]),_:1},8,["style","width","list","loading","disabled"])],2)}}},lGt={data(){return{shown:!1}},mounted(){setTimeout(()=>{this.shown=!0},500)}};function cGt(i,e,t,n,o,r){const s=k("BIMDataIllustration");return B(),O("div",{class:"bimdata__no-model",style:ue({"--no-model--opacity":o.shown?1:0})},[D(s,{name:"emptyViewer",x:"90",y:"90"}),b("span",null,K(i.$t("model.select_model")),1)],4)}const yfe=z(lGt,[["render",cGt],["__scopeId","data-v-5ffd9bc0"]]);window.BIMDataViewerVue=TV;class uGt{constructor(e={}){var o,r;const{api:t={},ui:n}=e;this.uiCfg=n,t.apiUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `apiUrl` not set, use 'https://api.bimdata.io' by default."),t.apiUrl="https://api.bimdata.io"),t.archiveUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `archiveUrl` not set, use 'https://archive.bimdata.io' by default."),t.archiveUrl="https://archive.bimdata.io"),t.pdfBackendUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `pdfBackendUrl` not set, use 'https://pdf-backend.bimdata.io' by default."),t.pdfBackendUrl="https://pdf-backend.bimdata.io"),t.ifcIds&&(console.warn("[BIMData Viewer] DEPRECATED - Viewer config - please use the `modelIds` property instead of `ifcIds`."),t.modelIds===void 0&&(t.modelIds=t.ifcIds)),t.modelIds||(t.modelIds=[]),(o=t.offline)!=null&&o.dataFile&&(t.offline.data=t.offline.dataFile),this.$viewer=new hjt(e),(r=t.offline)!=null&&r.enabled?this.$viewer.api.enableOfflineMode(t.offline.data,t.offline.options).then(()=>this.state.loadModels(t.modelIds)):(this.$viewer.globalContext.loadingProcessStart(),this.state.loadModels(t.modelIds).finally(()=>this.$viewer.globalContext.loadingProcessEnd())),this.vueApp=null}get state(){return this.$viewer.state}get api(){return this.$viewer.api}async mount(e,t="3d"){var u;const{$viewer:n}=this;await n.api.ready;try{const d=await n.api.apiClient.collaborationApi.checkProjectAccess(n.api.cloudId,n.api.projectId);n.api.permissions=gfe(d)}catch{n.api.permissions=gfe()}const o=this.api.accessToken,{i18n:r}=n;r.registerTranslations(n.pluginManager.pluginTranslations),n.layout.apply(t);const s={i18n:r.i18nVuePlugin,data(){return{accessToken:o}},render(){return Wn(Yjt,{style:"height: 100%"})}},a=lg(s).use(r.i18nVuePlugin).use(Cjt()).use(yjt({i18nPlugin:r.i18nVuePlugin})).use(gjt({apiClient:n.api.apiClient,i18nPlugin:r.i18nVuePlugin}));a.provide("$viewer",n),a.component("BIMDataModelLoader",vfe),a.component("BIMDataNoModelWindowPlaceHolder",yfe),a.component("BIMDataStoreySelector",KB),a.component("ModelsLoader",vfe),a.component("NoModelWindowPlaceHolder",yfe);const l=e instanceof HTMLElement?e:document.querySelector(e);l&&(l.style.height="100%");const c=a.mount(e);return c.$viewer=n,pjt(c.$el,(u=this.uiCfg)==null?void 0:u.style),typeof window<"u"&&(window.bimdataViewer=c),this.vueApp=a,c}destroy(){var e;(e=this.vueApp)==null||e.unmount()}setLocale(e){if(!JV.includes(e))throw new Error(`Viewer available locales are ${JV.join(", ")}.`);this.$viewer.i18n.locale=e}registerPlugin(e){this.$viewer.registerPlugin(e)}registerWindow(e){return this.$viewer.windowManager.registerWindow(e)}unregisterWindow(e){return this.$viewer.windowManager.unregisterWindow(e)}setAccessToken(e){this.api.accessToken=e}async loadModels(e){this.$viewer.globalContext.loadingProcessStart();const t=await this.state.loadModels(e);return this.$viewer.globalContext.loadingProcessEnd(),t}loadIfcs(e){return console.warn("[BIMData Viewer] DEPRECATED - Viewer - please use the loadModels method instead of loadIfcs."),this.loadModels(e)}}const wfe=(i={})=>new uGt(i);return window.makeBIMDataViewer=wfe,wfe});