PageSourceSearch

https://selfwalkmarriotttucson.web.app/assets/AdminView.df1c866f.js

js selfwalkmarriotttucson.web.app collected 2026-10-03 12:35:29 UTC 288,351 bytes, 8 lines download raw bytes

1var ma=Object.defineProperty;var ga=(i,e,t)=>e in i?ma(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var kn=(i,e,t)=>(ga(i,typeof e!="symbol"?e+"":e,t),t);import{v as te,b as U,e as xt,d as Zt,a as va}from"./runtime-dom.esm-bundler.0e07a42a.js";import{E as wa,V as J,M as wn,T as bn,Q as Le,S as qo,f as It,L as ba,h as un,F as Ms,C as Lt,i as ya,P as _a,D as Is,j as en,k as dn,l as pn,I as Ca,O as Un,m as xa,n as Ps,o as Sa,q as Aa,B as Go,r as Ls,t as ks,R as ao,v as Ta,w as go,x as Es,y as Ro,z as zs,A as Ma,G as To,H as Ia,J as le,K as Pa,N as Yt,U as La,W as ka,X as vo,Y as Oo,Z as Ds,_ as Ea,$ as Rs,a0 as za,a1 as Da,a2 as Ra,a3 as Os,a4 as Hn,a5 as Oa,a6 as Na,a7 as $a,a8 as Fa,a9 as Ua,aa as Ba,ab as Za,ac as ja,ad as Xa,ae as Yo,af as Va,ag as Ha,ah as Wo,ai as qa,aj as Ga,ak as Ya,al as Wa,am as Ns,an as _t,ao as ft,ap as Ko,aq as Wn,ar as $s,as as En,at as Ka,au as Qa,av as Fs,aw as Us,u as nn,b as Ja,ax as ei,ay as ti,az as ot,aA as ni,aB as oi,aC as si}from"./index.3eaba8f3.js";import{g as qn,r as cn,u as xn,a as Sn,d as Qo}from"./index.esm2017.f2c182a0.js";import{o as io,A as An,O as Bs,U as Zs,T as Bn,d as _n,s as ai,h as ii,q as js,Q as Jo,K as es,G as li,B as ri}from"./index.c4324cc7.js";import{c as ci,d as ui}from"./ToolUI.a03e5197.js";import{c as E,d as R,e as a,r as S,m as an,t as Q,f as Y,_ as on,a2 as di,o as Mn,h as X,u as w,F as Ne,I as je,a1 as In,p as hn,g as fn,w as Mo,j as Cn,J as St,n as No,k as Zn,i as pi,l as Ut}from"./_plugin-vue_export-helper.f09dc1ee.js";import{l as tn}from"./index.6c9a2d6e.js";/* empty css                                                                       */import"./TopLeftMenu.vue_vue_type_style_index_0_scoped_f4dbed34_lang.809c15c5.js";import"./storeDiagrams.d8ba2106.js";/* empty css                                                                             *//* empty css                                                                         *//* empty css                                                                         */import{g as $o,a as jn}from"./CustWalls.e0078c1e.js";import"./qrcode.vue.esm.4be65f4b.js";import"./vue-router.51ed5a46.js";import"./morecapbutton.44e58599.js";const hi={"pointer-events":"all",cursor:"pointer",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fi=["fill"],mi=["fill"],gi={__name:"PhotoIcon",props:{fillColor:{type:String,default:"white"}},setup(i){const e=i;return(t,n)=>(E(),R("svg",hi,[a("path",{d:"M13 4C13 3.73478 12.8946 3.48043 12.7071 3.29289C12.5196 3.10536 12.2652 3 12 3H1C0.734784 3 0.480444 3.10536 0.292908 3.29289C0.105371 3.48043 0 3.73478 0 4V15C0 15.2652 0.105371 15.5196 0.292908 15.7071C0.480444 15.8946 0.734784 16 1 16H12C12.2652 16 12.5196 15.8946 12.7071 15.7071C12.8946 15.5196 13 15.2652 13 15V4ZM8.45901 5C8.75569 5 9.04568 5.08797 9.29236 5.25279C9.53903 5.41761 9.73129 5.65189 9.84482 5.92598C9.95835 6.20007 9.98805 6.50166 9.93018 6.79263C9.8723 7.0836 9.72943 7.35087 9.51965 7.56065C9.30987 7.77043 9.04262 7.9133 8.75165 7.97118C8.46068 8.02905 8.15907 7.99935 7.88498 7.88582C7.61089 7.77229 7.37661 7.58003 7.21179 7.33336C7.04697 7.08669 6.95901 6.79667 6.95901 6.5C6.95901 6.10218 7.11704 5.72065 7.39835 5.43935C7.67965 5.15804 8.06119 5 8.45901 5ZM2 13.5V9.125C2.07998 8.79307 2.26202 8.49457 2.52051 8.2715L3.89651 6.9785C3.99849 6.88433 4.13219 6.83203 4.271 6.83203C4.40981 6.83203 4.54353 6.88433 4.64551 6.9785L7.31351 10.625L8.9697 8.9785C9.0646 8.88467 9.19268 8.83205 9.32614 8.83205C9.4596 8.83205 9.58768 8.88467 9.68259 8.9785L10.8105 10.2715C10.9613 10.4827 11.0288 10.7421 11 11V13.5C11 13.6326 10.9473 13.7598 10.8535 13.8535C10.7598 13.9473 10.6326 14 10.5 14H2.5C2.36739 14 2.24022 13.9473 2.14645 13.8535C2.05269 13.7598 2 13.6326 2 13.5Z",fill:e.fillColor},null,8,fi),a("path",{d:"M4 0C3.73478 0 3.48044 0.105356 3.29291 0.292892C3.10537 0.480429 3 0.734784 3 1V2H13C13.2652 2 13.5196 2.10536 13.7071 2.29289C13.8946 2.48043 14 2.73478 14 3V13H15C15.2652 13 15.5196 12.8946 15.7071 12.7071C15.8946 12.5196 16 12.2652 16 12V1C16 0.734784 15.8946 0.480429 15.7071 0.292892C15.5196 0.105356 15.2652 0 15 0H4Z",fill:e.fillColor},null,8,mi)]))}},vi={style:{height:"100%",width:"100%",margin:"10px",display:"flex","align-items":"center"}},wi={key:0},bi=["src"],yi=["value"],yn={__name:"photoFire",props:{collectionName:String,documentId:String,docRef:Object,storageBucket:String,documentField:String,iconColor:{type:String,default:"white"}},emits:["urlSaved"],setup(i,{emit:e}){const t=i;S(!1);const n=S(null),o=S(null),r=S(0),s=S(null);function u(I){if(I.target.files&&I.target.files.length>0)return;I.preventDefault(),s.value.click(),console.log("selectPhoto clicked")}function d(I){if(I.target.files.length===0)return;const x=I.target.files[0],z=new FileReader;z.onload=()=>{n.value=z.result,o.value=x}
1,z.readAsDataURL(x)}async function h(I){const x=io(),z=An(x,"images",I),M=await Bs(z);return M.exists()?M.data():null}async function v(I){const x=io(),z=An(x,"images",I.name);await Zs(z,{name:I.name,url:I.url})}async function p(){const I=qn(),x=cn(I,t.storageBucket+"/"+o.value.name),z=xn(x,o.value),M=await h(o.value.name);if(M){const D=M;console.log("emited before upload",D),e("urlSaved",D),alert("A file with the same name already exists. Using the existing file.  If you want to upload a new file, please rename the file and try again.");return}z.on("state_changed",D=>{const j=D.bytesTransferred/D.totalBytes*100;r.value=j},D=>{console.log(D),alert("Error:",D)},async()=>{const j={url:await Sn(x),name:o.value.name};e("urlSaved",j),console.log("emited after upload",j),await v(j),O()})}function P(){O()}function O(){n.value=null,o.value=null,r.value=0;const I=s.value;I.value=null}return(I,x)=>(E(),R("div",vi,[a("label",{style:{width:"25px",height:"25px",cursor:"pointer","border-radius":"5px",margin:"5px"},for:"photo-input",onClick:u},[an(gi,{fillColor:i.iconColor},null,8,["fillColor"])]),a("input",{id:"photo-input",ref_key:"photoInput",ref:s,type:"file",style:{display:"none"},onChange:d},null,544),n.value?(E(),R("div",wi,[a("img",{style:{width:"100px",height:"100px"},src:n.value,alt:"Preview of selected photo or video"},null,8,bi),r.value>0?(E(),R("progress",{key:0,value:r.value,max:"100"},Q(r.value)+"%",9,yi)):Y("",!0),a("button",{onClick:p},"Upload"),a("button",{onClick:P},"Cancel")])):Y("",!0)]))}},ts={type:"change"},wo={type:"start"},ns={type:"end"};class Xs extends wa{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new J,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:wn.ROTATE,MIDDLE:wn.DOLLY,RIGHT:wn.PAN},this.touches={ONE:bn.ROTATE,TWO:bn.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return u.phi},this.getAzimuthalAngle=function(){return u.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(f){f.addEventListener("keydown",qt),this._domElementKeyEvents=f},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(ts),n.update(),r=o.NONE},this.update=function(){const f=new J,g=new Le().setFromUnitVectors(e.up,new J(0,1,0)),m=g.clone().invert(),_=new J,A=new Le,C=2*Math.PI;return function(){const fe=n.object.position;f.copy(fe).sub(n.target),f.applyQuaternion(g),u.setFromVector3(f),n.autoRotate&&r===o.NONE&&pe(be()),n.enableDamping?(u.theta+=d.theta*n.dampingFactor,u.phi+=d.phi*n.dampingFactor):(u.theta+=d.theta,u.phi+=d.phi);let re=n.minAzimuthAngle,B=n.maxAzimuthAngle;return isFinite(re)&&isFinite(B)&&(re<-Math.PI?re+=C:re>Math.PI&&(re-=C),B<-Math.PI?B+=C:B>Math.PI&&(B-=C),re<=B?u.theta=Math.max(re,Math.min(B,u.theta)):u.theta=u.theta>(re+B)/2?Math.max(re,u.theta):Math.min(B,u.theta)),u.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,u.phi)),u.makeSafe(),u.radius*=h,u.radius=Math.max(n.minDistance,Math.min(n.maxDistance,u.radius)),n.enableDamping===!0?n.target.addScaledVector(v,n.dampingFactor):n.target.add(v),f.setFromSpherical(u),f.applyQuaternion(m),fe.copy(n.target).add(f),n.object.lookAt(n.target),n.enableDamping===!0?(d.theta*=1-n.dampingFactor,d.phi*=1-n.dampingFactor,v.multiplyScalar(1-n.dampingFactor)):(d.set(0,0,0),v.set(0,0,0)),h=1,p||_.distanceToSquared(n.object.position)>s||8*(1-A.dot(n.object.quaternion))>s?(n.dispatchEvent(ts),_.copy(n.object.position),A.copy(n.object.quaternion),p=!1,!0):!1}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",c),n.domElement.removeEventListener("pointerdown",ce),n.domElement.removeEventListener("pointercancel",lt),n.domElement.removeEventListener("wheel",ae),n.domElement.removeEventListener("pointermove",Nt),n.domElement.removeEventListener("pointerup",dt),n._domElementKeyEvents!==null&&n._domElementKeyEvents.removeEventListener("keydown",qt)};const n=this,o={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let r=o.NONE;const s=1e-6,u=new qo,d=new qo;let h=1;const v=new J;let p=!1;const P=new It,O=new It,I=new It,x=new It,z=new It,M=new It,D=new It,j=new It,y=new It,oe=[],Ae={};function be(){return 2*Math.PI/60/60*n.autoRotateSpeed}function ze(){return Math.pow(.95,n.zoomSpeed)}function pe(f){d.theta-=f}function ye(f){d.phi-=f}const ue=function(){const f=new J;return function(m,_){f.setFromMatrixColumn(_,0),f.multiplyScalar(-m),v.add(f)}}(),De=function(){const f=new J;return function(m,_){n.screenSpacePanning===!0?f.setFromMatrixColumn(_,1):(f.setFromMatrixColumn(_,0),f.crossVectors(n.object.up,f)),f.multiplyScalar(m),v.add(f)}}(),_e=function(){const f=new J;return function(m,_){const A=n.domElement;if(n.object.isPerspectiveCamera){const C=n.object.position;f.copy(C).sub(n.target);let q=f.length();q*=Math.tan(n.object.fov/2*Math.PI/180),ue(2*m*q/A.clientHeight,n.object.matrix),De(2*_*q/A.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(ue(m*(n.object.right-n.object.left)/n.object.zoom/A.clientWidth,n.object.matrix),De(_*(n.object.top-n.object.bottom)/n.object.zoom/A.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function de(f){n.object.isPerspectiveCamera?h/=f:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*f)),n.object.updateProjectionMatrix(),p=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function G(f){n.object.isPerspectiveCamera?h*=f:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/f)),n.object.updateProjectionMatrix(),p=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function xe(f){P.set(f.clientX,f.clientY)}function Te(f){D.set(f.clientX,f.clientY)}function se(f){x.set(f.clientX,f.clientY)}function $(f){O.set(f.clientX,f.clientY),I.subVectors(O,P).multiplyScalar(n.rotateSpeed);const g=n.domElement;pe(2*Math.PI*I.x/g.clientHeight),ye(2*Math.PI*I.y/g.clientHeight),P.copy(O),n.update()}function ee(f){j.set(f.clientX,f.clientY),y.subVectors(j,D),y.y>0?de(ze()):y.y<0&&G(ze()),D.copy(j),n.update()}function Me(f){z.set(f.clientX,f.clientY),M.subVectors(z,x).multiplyScalar(n.panSpeed),_e(M.x,M.y),x.copy(z),n.update()}function ve(f){f.deltaY<0?G(ze()):f.deltaY>0&&de(ze()),n.update()}function Ze(f){let g=!1;switch(f.code){case n.keys.UP:_e(0,n.keyPanSpeed),g=!0;break;case n.keys.BOTTOM:_e(0,-n.keyPanSpeed),g=!0;break;case n.keys.LEFT:_e(n.keyPanSpeed,0),g=!0;break;case n.keys.RIGHT:_e(-n.keyPanSpeed,0),g=!0;break}g&&(f.preventDefault(),n.update())}
1function Xe(){if(oe.length===1)P.set(oe[0].pageX,oe[0].pageY);else{const f=.5*(oe[0].pageX+oe[1].pageX),g=.5*(oe[0].pageY+oe[1].pageY);P.set(f,g)}}function ut(){if(oe.length===1)x.set(oe[0].pageX,oe[0].pageY);else{const f=.5*(oe[0].pageX+oe[1].pageX),g=.5*(oe[0].pageY+oe[1].pageY);x.set(f,g)}}function Ot(){const f=oe[0].pageX-oe[1].pageX,g=oe[0].pageY-oe[1].pageY,m=Math.sqrt(f*f+g*g);D.set(0,m)}function gt(){n.enableZoom&&Ot(),n.enablePan&&ut()}function Et(){n.enableZoom&&Ot(),n.enableRotate&&Xe()}function zt(f){if(oe.length==1)O.set(f.pageX,f.pageY);else{const m=T(f),_=.5*(f.pageX+m.x),A=.5*(f.pageY+m.y);O.set(_,A)}I.subVectors(O,P).multiplyScalar(n.rotateSpeed);const g=n.domElement;pe(2*Math.PI*I.x/g.clientHeight),ye(2*Math.PI*I.y/g.clientHeight),P.copy(O)}function vt(f){if(oe.length===1)z.set(f.pageX,f.pageY);else{const g=T(f),m=.5*(f.pageX+g.x),_=.5*(f.pageY+g.y);z.set(m,_)}M.subVectors(z,x).multiplyScalar(n.panSpeed),_e(M.x,M.y),x.copy(z)}function Ht(f){const g=T(f),m=f.pageX-g.x,_=f.pageY-g.y,A=Math.sqrt(m*m+_*_);j.set(0,A),y.set(0,Math.pow(j.y/D.y,n.zoomSpeed)),de(y.y),D.copy(j)}function at(f){n.enableZoom&&Ht(f),n.enablePan&&vt(f)}function He(f){n.enableZoom&&Ht(f),n.enableRotate&&zt(f)}function ce(f){n.enabled!==!1&&(oe.length===0&&(n.domElement.setPointerCapture(f.pointerId),n.domElement.addEventListener("pointermove",Nt),n.domElement.addEventListener("pointerup",dt)),l(f),f.pointerType==="touch"?F(f):Dt(f))}function Nt(f){n.enabled!==!1&&(f.pointerType==="touch"?L(f):$t(f))}function dt(f){b(f),oe.length===0&&(n.domElement.releasePointerCapture(f.pointerId),n.domElement.removeEventListener("pointermove",Nt),n.domElement.removeEventListener("pointerup",dt)),n.dispatchEvent(ns),r=o.NONE}function lt(f){b(f)}function Dt(f){let g;switch(f.button){case 0:g=n.mouseButtons.LEFT;break;case 1:g=n.mouseButtons.MIDDLE;break;case 2:g=n.mouseButtons.RIGHT;break;default:g=-1}switch(g){case wn.DOLLY:if(n.enableZoom===!1)return;Te(f),r=o.DOLLY;break;case wn.ROTATE:if(f.ctrlKey||f.metaKey||f.shiftKey){if(n.enablePan===!1)return;se(f),r=o.PAN}else{if(n.enableRotate===!1)return;xe(f),r=o.ROTATE}break;case wn.PAN:if(f.ctrlKey||f.metaKey||f.shiftKey){if(n.enableRotate===!1)return;xe(f),r=o.ROTATE}else{if(n.enablePan===!1)return;se(f),r=o.PAN}break;default:r=o.NONE}r!==o.NONE&&n.dispatchEvent(wo)}function $t(f){switch(r){case o.ROTATE:if(n.enableRotate===!1)return;$(f);break;case o.DOLLY:if(n.enableZoom===!1)return;ee(f);break;case o.PAN:if(n.enablePan===!1)return;Me(f);break}}function ae(f){n.enabled===!1||n.enableZoom===!1||r!==o.NONE||(f.preventDefault(),n.dispatchEvent(wo),ve(f),n.dispatchEvent(ns))}function qt(f){n.enabled===!1||n.enablePan===!1||Ze(f)}function F(f){switch(k(f),oe.length){case 1:switch(n.touches.ONE){case bn.ROTATE:if(n.enableRotate===!1)return;Xe(),r=o.TOUCH_ROTATE;break;case bn.PAN:if(n.enablePan===!1)return;ut(),r=o.TOUCH_PAN;break;default:r=o.NONE}break;case 2:switch(n.touches.TWO){case bn.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;gt(),r=o.TOUCH_DOLLY_PAN;break;case bn.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;Et(),r=o.TOUCH_DOLLY_ROTATE;break;default:r=o.NONE}break;default:r=o.NONE}r!==o.NONE&&n.dispatchEvent(wo)}function L(f){switch(k(f),r){case o.TOUCH_ROTATE:if(n.enableRotate===!1)return;zt(f),n.update();break;case o.TOUCH_PAN:if(n.enablePan===!1)return;vt(f),n.update();break;case o.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;at(f),n.update();break;case o.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;He(f),n.update();break;default:r=o.NONE}}function c(f){n.enabled!==!1&&f.preventDefault()}function l(f){oe.push(f)}function b(f){delete Ae[f.pointerId];for(let g=0;g<oe.length;g++)if(oe[g].pointerId==f.pointerId){oe.splice(g,1);return}}function k(f){let g=Ae[f.pointerId];g===void 0&&(g=new It,Ae[f.pointerId]=g),g.set(f.pageX,f.pageY)}function T(f){const g=f.pointerId===oe[0].pointerId?oe[1]:oe[0];return Ae[g.pointerId]}n.domElement.addEventListener("contextmenu",c),n.domElement.addEventListener("pointerdown",ce),n.domElement.addEventListener("pointercancel",lt),n.domElement.addEventListener("wheel",ae,{passive:!1}),this.update()}}class Vs extends ba{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new Ai(t)}),this.register(function(t){return new Ei(t)}),this.register(function(t){return new zi(t)}),this.register(function(t){return new Mi(t)}),this.register(function(t){return new Ii(t)}),this.register(function(t){return new Pi(t)}),this.register(function(t){return new Li(t)}),this.register(function(t){return new Si(t)}),this.register(function(t){return new ki(t)}),this.register(function(t){return new Ti(t)}),this.register(function(t){return new Ci(t)}),this.register(function(t){return new Di(t)}),this.register(function(t){return new Ri(t)})}load(e,t,n,o){const r=this;let s;this.resourcePath!==""?s=this.resourcePath:this.path!==""?s=this.path:s=un.extractUrlBase(e),this.manager.itemStart(e);const u=function(h){o?o(h):console.error(h),r.manager.itemError(e),r.manager.itemEnd(e)},d=new Ms(this.manager);d.setPath(this.path),d.setResponseType("arraybuffer"),d.setRequestHeader(this.requestHeader),d.setWithCredentials(this.withCredentials),d.load(e,function(h){try{r.parse(h,s,function(v){t(v),r.manager.itemEnd(e)},u)}catch(v){u(v)}},n,u)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,o){let r;const s={},u={};if(typeof e=="string")r=JSON.parse(e);else if(e instanceof ArrayBuffer)if(un.decodeText(new Uint8Array(e,0,4))===Hs){try{
vendor: 8,970 bytes, line 1
1s[Ce.KHR_BINARY_GLTF]=new Oi(e)}catch(v){o&&o(v);return}r=JSON.parse(s[Ce.KHR_BINARY_GLTF].content)}else r=JSON.parse(un.decodeText(new Uint8Array(e)));else r=e;if(r.asset===void 0||r.asset.version[0]<2){o&&o(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const d=new Yi(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});d.fileLoader.setRequestHeader(this.requestHeader);for(let h=0;h<this.pluginCallbacks.length;h++){const v=this.pluginCallbacks[h](d);u[v.name]=v,s[v.name]=!0}if(r.extensionsUsed)for(let h=0;h<r.extensionsUsed.length;++h){const v=r.extensionsUsed[h],p=r.extensionsRequired||[];switch(v){case Ce.KHR_MATERIALS_UNLIT:s[v]=new xi;break;case Ce.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:s[v]=new Fi;break;case Ce.KHR_DRACO_MESH_COMPRESSION:s[v]=new Ni(r,this.dracoLoader);break;case Ce.KHR_TEXTURE_TRANSFORM:s[v]=new $i;break;case Ce.KHR_MESH_QUANTIZATION:s[v]=new Ui;break;default:p.indexOf(v)>=0&&u[v]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+v+'".')}}d.setExtensions(s),d.setPlugins(u),d.parse(n,o)}parseAsync(e,t){const n=this;return new Promise(function(o,r){n.parse(e,t,o,r)})}}function _i(){let i={};return{get:function(e){return i[e]},add:function(e,t){i[e]=t},remove:function(e){delete i[e]},removeAll:function(){i={}}}}const Ce={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Ci{constructor(e){this.parser=e,this.name=Ce.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,o=t.length;n<o;n++){const r=t[n];r.extensions&&r.extensions[this.name]&&r.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let o=t.cache.get(n);if(o)return o;const r=t.json,d=((r.extensions&&r.extensions[this.name]||{}).lights||[])[e];let h;const v=new Lt(16777215);d.color!==void 0&&v.fromArray(d.color);const p=d.range!==void 0?d.range:0;switch(d.type){case"directional":h=new Is(v),h.target.position.set(0,0,-1),h.add(h.target);break;case"point":h=new _a(v),h.distance=p;break;case"spot":h=new ya(v),h.distance=p,d.spot=d.spot||{},d.spot.innerConeAngle=d.spot.innerConeAngle!==void 0?d.spot.innerConeAngle:0,d.spot.outerConeAngle=d.spot.outerConeAngle!==void 0?d.spot.outerConeAngle:Math.PI/4,h.angle=d.spot.outerConeAngle,h.penumbra=1-d.spot.innerConeAngle/d.spot.outerConeAngle,h.target.position.set(0,0,-1),h.add(h.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+d.type)}return h.position.set(0,0,0),h.decay=2,d.intensity!==void 0&&(h.intensity=d.intensity),h.name=t.createUniqueName(d.name||"light_"+e),o=Promise.resolve(h),t.cache.add(n,o),o}createNodeAttachment(e){const t=this,n=this.parser,r=n.json.nodes[e],u=(r.extensions&&r.extensions[this.name]||{}).light;return u===void 0?null:this._loadLight(u).then(function(d){return n._getNodeRef(t.cache,u,d)})}}class xi{constructor(){this.name=Ce.KHR_MATERIALS_UNLIT}getMaterialType(){return en}extendParams(e,t,n){const o=[];e.color=new Lt(1,1,1),e.opacity=1;const r=t.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){const s=r.baseColorFactor;e.color.fromArray(s),e.opacity=s[3]}r.baseColorTexture!==void 0&&o.push(n.assignTexture(e,"map",r.baseColorTexture,dn))}return Promise.all(o)}}class Si{constructor(e){this.parser=e,this.name=Ce.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const o=this.parser.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const r=o.extensions[this.name].emissiveStrength;return r!==void 0&&(t.emissiveIntensity=r),Promise.resolve()}}class Ai{constructor(e){this.parser=e,this.name=Ce.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:pn}extendMaterialParams(e,t){const n=this.parser,o=n.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const r=[],s=o.extensions[this.name];if(s.clearcoatFactor!==void 0&&(t.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0&&r.push(n.assignTexture(t,"clearcoatMap",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0&&r.push(n.assignTexture(t,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0&&(r.push(n.assignTexture(t,"clearcoatNormalMap",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const u=s.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new It(u,u)}return Promise.all(r)}}class Ti{constructor(e){this.parser=e,this.name=Ce.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:pn}extendMaterialParams(e,t){const n=this.parser,o=n.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const r=[],s=o.extensions[this.name];return s.iridescenceFactor!==void 0&&(t.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0&&r.push(n.assignTexture(t,"iridescenceMap",s.iridescenceTexture)),s.iridescenceIor!==void 0&&(t.iridescenceIOR=s.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0&&r.push(n.assignTexture(t,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(r)}}class Mi{constructor(e){this.parser=e,this.name=Ce.KHR_MATERIALS_SHEEN}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:pn}extendMaterialParams(e,t){const n=this.parser,o=n.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const r=[];t.sheenColor=new Lt(0,0,0),t.sheenRoughness=0,t.sheen=1;const s=o.extensions[this.name];return s.sheenColorFactor!==void 0&&t.sheenColor.fromArray(s.sheenColorFactor),s.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0&&r.push(n.assignTexture(t,"sheenColorMap",s.sheenColorTexture,dn)),s.sheenRoughnessTexture!==void 0&&r.push(n.assignTexture(t,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(r)}}class Ii{constructor(e){this.parser=e,this.name=Ce.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:pn}extendMaterialParams(e,t){const n=this.parser,o=n.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const r=[],s=o.extensions[this.name];return s.transmissionFactor!==void 0&&(t.transmission=s.transmissionFactor),s.transmissionTexture!==void 0&&r.push(n.assignTexture(t,"transmissionMap",s.transmissionTexture)),Promise.all(r)}}class Pi{constructor(e){this.parser=e,this.name=Ce.KHR_MATERIALS_VOLUME}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:pn}extendMaterialParams(e,t){const n=this.parser,o=n.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const r=[],s=o.extensions[this.name];t.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0&&r.push(n.assignTexture(t,"thicknessMap",s.thicknessTexture)),t.attenuationDistance=s.attenuationDistance||1/0;const u=s.attenuationColor||[1,1,1];return t.attenuationColor=new Lt(u[0],u[1],u[2]),Promise.all(r)}}class Li{constructor(e){this.parser=e,this.name=Ce.KHR_MATERIALS_IOR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:pn}extendMaterialParams(e,t){const o=this.parser.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const r=o.extensions[this.name];
vendor: 7,319 bytes, lines 1-5
1return t.ior=r.ior!==void 0?r.ior:1.5,Promise.resolve()}}class ki{constructor(e){this.parser=e,this.name=Ce.KHR_MATERIALS_SPECULAR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:pn}extendMaterialParams(e,t){const n=this.parser,o=n.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const r=[],s=o.extensions[this.name];t.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0&&r.push(n.assignTexture(t,"specularIntensityMap",s.specularTexture));const u=s.specularColorFactor||[1,1,1];return t.specularColor=new Lt(u[0],u[1],u[2]),s.specularColorTexture!==void 0&&r.push(n.assignTexture(t,"specularColorMap",s.specularColorTexture,dn)),Promise.all(r)}}class Ei{constructor(e){this.parser=e,this.name=Ce.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,o=n.textures[e];if(!o.extensions||!o.extensions[this.name])return null;const r=o.extensions[this.name],s=t.options.ktx2Loader;if(!s){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,s)}}class zi{constructor(e){this.parser=e,this.name=Ce.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,o=n.json,r=o.textures[e];if(!r.extensions||!r.extensions[t])return null;const s=r.extensions[t],u=o.images[s.source];let d=n.textureLoader;if(u.uri){const h=n.options.manager.getHandler(u.uri);h!==null&&(d=h)}return this.detectSupport().then(function(h){if(h)return n.loadTextureImage(e,s.source,d);if(o.extensionsRequired&&o.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Di{constructor(e){this.name=Ce.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const o=n.extensions[this.name],r=this.parser.getDependency("buffer",o.buffer),s=this.parser.options.meshoptDecoder;if(!s||!s.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(u){const d=o.byteOffset||0,h=o.byteLength||0,v=o.count,p=o.byteStride,P=new Uint8Array(u,d,h);return s.decodeGltfBufferAsync?s.decodeGltfBufferAsync(v,p,P,o.mode,o.filter).then(function(O){return O.buffer}):s.ready.then(function(){const O=new ArrayBuffer(v*p);return s.decodeGltfBuffer(new Uint8Array(O),v,p,P,o.mode,o.filter),O})})}else return null}}class Ri{constructor(e){this.name=Ce.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const o=t.meshes[n.mesh];for(const h of o.primitives)if(h.mode!==Pt.TRIANGLES&&h.mode!==Pt.TRIANGLE_STRIP&&h.mode!==Pt.TRIANGLE_FAN&&h.mode!==void 0)return null;const s=n.extensions[this.name].attributes,u=[],d={};for(const h in s)u.push(this.parser.getDependency("accessor",s[h]).then(v=>(d[h]=v,d[h])));return u.length<1?null:(u.push(this.parser.createNodeMesh(e)),Promise.all(u).then(h=>{const v=h.pop(),p=v.isGroup?v.children:[v],P=h[0].count,O=[];for(const I of p){const x=new Hn,z=new J,M=new Le,D=new J(1,1,1),j=new Ca(I.geometry,I.material,P);for(let y=0;y<P;y++)d.TRANSLATION&&z.fromBufferAttribute(d.TRANSLATION,y),d.ROTATION&&M.fromBufferAttribute(d.ROTATION,y),d.SCALE&&D.fromBufferAttribute(d.SCALE,y),j.setMatrixAt(y,x.compose(z,M,D));for(const y in d)y!=="TRANSLATION"&&y!=="ROTATION"&&y!=="SCALE"&&I.geometry.setAttribute(y,d[y]);Un.prototype.copy.call(j,I),j.frustumCulled=!1,this.parser.assignFinalMaterial(j),O.push(j)}return v.isGroup?(v.clear(),v.add(...O),v):O[0]}))}}const Hs="glTF",zn=12,os={JSON:1313821514,BIN:5130562};class Oi{constructor(e){this.name=Ce.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,zn);if(this.header={magic:un.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Hs)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-zn,o=new DataView(e,zn);let r=0;for(;r<n;){const s=o.getUint32(r,!0);r+=4;const u=o.getUint32(r,!0);if(r+=4,u===os.JSON){const d=new Uint8Array(e,zn+r,s);this.content=un.decodeText(d)}else if(u===os.BIN){const d=zn+r;this.body=e.slice(d,d+s)}r+=s}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Ni{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Ce.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,o=this.dracoLoader,r=e.extensions[this.name].bufferView,s=e.extensions[this.name].attributes,u={},d={},h={};for(const v in s){const p=Po[v]||v.toLowerCase();u[p]=s[v]}for(const v in e.attributes){const p=Po[v]||v.toLowerCase();if(s[v]!==void 0){const P=n.accessors[e.attributes[v]],O=Xn[P.componentType];h[p]=O.name,d[p]=P.normalized===!0}}return t.getDependency("bufferView",r).then(function(v){return new Promise(function(p){o.decodeDracoFile(v,function(P){for(const O in P.attributes){const I=P.attributes[O],x=d[O];x!==void 0&&(I.normalized=x)}p(P)},u,h)})})}}class $i{constructor(){this.name=Ce.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return t.texCoord!==void 0&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class Io extends Ro{constructor(e){super(),this.isGLTFSpecularGlossinessMaterial=!0;const t=["#ifdef USE_SPECULARMAP","	uniform sampler2D specularMap;","#endif"].join(`
2`),n=["#ifdef USE_GLOSSINESSMAP","	uniform sampler2D glossinessMap;","#endif"].join(`
3`),o=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","	vec4 texelSpecular = texture2D( specularMap, vUv );","	// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","	specularFactor *= texelSpecular.rgb;","#endif"].join(`
4`),r=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","	vec4 texelGlossiness = texture2D( glossinessMap, vUv );","	// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","	glossinessFactor *= texelGlossiness.a;","#endif"].join(`
5`),s=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
5","material.roughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.","material.roughness += geometryRoughness;","material.roughness = min( material.roughness, 1.0 );","material.specularColor = specularFactor;"].join(`
6`),u={specular:{value:new Lt().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=u,this.onBeforeCompile=function(d){for(const h in u)d.uniforms[h]=u[h];d.fragmentShader=d.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",t).replace("#include <metalnessmap_pars_fragment>",n).replace("#include <roughnessmap_fragment>",o).replace("#include <metalnessmap_fragment>",r).replace("#include <lights_physical_fragment>",s)},Object.defineProperties(this,{specular:{get:function(){return u.specular.value},set:function(d){u.specular.value=d}},specularMap:{get:function(){return u.specularMap.value},set:function(d){u.specularMap.value=d,d?this.defines.USE_SPECULARMAP="":delete this.defines.USE_SPECULARMAP}},glossiness:{get:function(){return u.glossiness.value},set:function(d){u.glossiness.value=d}},glossinessMap:{get:function(){return u.glossinessMap.value},set:function(d){u.glossinessMap.value=d,d?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_UV=""):(delete this.defines.USE_GLOSSINESSMAP,delete this.defines.USE_UV)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}copy(e){return super.copy(e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this}}class Fi{constructor(){this.name=Ce.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,this.specularGlossinessParams=["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity"]}getMaterialType(){return Io}extendParams(e,t,n){const o=t.extensions[this.name];e.color=new Lt(1,1,1),e.opacity=1;const r=[];if(Array.isArray(o.diffuseFactor)){const s=o.diffuseFactor;e.color.fromArray(s),e.opacity=s[3]}if(o.diffuseTexture!==void 0&&r.push(n.assignTexture(e,"map",o.diffuseTexture,dn)),e.emissive=new Lt(0,0,0),e.glossiness=o.glossinessFactor!==void 0?o.glossinessFactor:1,e.specular=new Lt(1,1,1),Array.isArray(o.specularFactor)&&e.specular.fromArray(o.specularFactor),o.specularGlossinessTexture!==void 0){const s=o.specularGlossinessTexture;r.push(n.assignTexture(e,"glossinessMap",s)),r.push(n.assignTexture(e,"specularMap",s,dn))}return Promise.all(r)}createMaterial(e){const t=new Io(e);return t.fog=!0,t.color=e.color,t.map=e.map===void 0?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=e.aoMap===void 0?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=e.emissiveIntensity===void 0?1:e.emissiveIntensity,t.emissiveMap=e.emissiveMap===void 0?null:e.emissiveMap,t.bumpMap=e.bumpMap===void 0?null:e.bumpMap,t.bumpScale=1,t.normalMap=e.normalMap===void 0?null:e.normalMap,t.normalMapType=xa,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=e.specularMap===void 0?null:e.specularMap,t.specular=e.specular,t.glossinessMap=e.glossinessMap===void 0?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=e.envMap===void 0?null:e.envMap,t.envMapIntensity=1,t}}class Ui{constructor(){this.name=Ce.KHR_MESH_QUANTIZATION}}class qs extends Wa{constructor(e,t,n,o){super(e,t,n,o)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,o=this.valueSize,r=e*o*3+o;for(let s=0;s!==o;s++)t[s]=n[r+s];return t}interpolate_(e,t,n,o){const r=this.resultBuffer,s=this.sampleValues,u=this.valueSize,d=u*2,h=u*3,v=o-t,p=(n-t)/v,P=p*p,O=P*p,I=e*h,x=I-h,z=-2*O+3*P,M=O-P,D=1-z,j=M-P+p;for(let y=0;y!==u;y++){const oe=s[x+y+u],Ae=s[x+y+d]*v,be=s[I+y+u],ze=s[I+y]*v;r[y]=D*oe+j*Ae+z*be+M*ze}return r}}const Bi=new Le;class Zi extends qs{interpolate_(e,t,n,o){const r=super.interpolate_(e,t,n,o);return Bi.fromArray(r).normalize().toArray(r),r}}const Pt={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Xn={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ss={9728:Oa,9729:Ls,9984:Na,9985:$a,9986:Fa,9987:ks},as={33071:Ua,33648:Ba,10497:ao},is={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Po={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Kt={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},ji={CUBICSPLINE:void 0,LINEAR:Rs,STEP:Za},bo={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Xi(i){return i.DefaultMaterial===void 0&&(i.DefaultMaterial=new Ro({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:ja})),i.DefaultMaterial}function Dn(i,e,t){for(const n in t.extensions)i[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function ln(i,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(i.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function Vi(i,e,t){let n=!1,o=!1,r=!1;for(let h=0,v=e.length;h<v;h++){const p=e[h];if(p.POSITION!==void 0&&(n=!0),p.NORMAL!==void 0&&(o=!0),p.COLOR_0!==void 0&&(r=!0),n&&o&&r)break}if(!n&&!o&&!r)return Promise.resolve(i);const s=[],u=[],d=[];for(let h=0,v=e.length;h<v;h++){const p=e[h];if(n){const P=p.POSITION!==void 0?t.getDependency("accessor",p.POSITION):i.attributes.position;s.push(P)}if(o){const P=p.NORMAL!==void 0?t.getDependency("accessor",p.NORMAL):i.attributes.normal;u.push(P)}if(r){const P=p.COLOR_0!==void 0?t.getDependency("accessor",p.COLOR_0):i.attributes.color;d.push(P)}}return Promise.all([Promise.all(s),Promise.all(u),Promise.all(d)]).then(function(h){const v=h[0],p=h[1],P=h[2];return n&&(i.morphAttributes.position=v),o&&(i.morphAttributes.normal=p),r&&(i.morphAttributes.color=P),i.morphTargetsRelative=!0,i})}function Hi(i,e){if(i.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)i.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(i.morphTargetInfluences.length===t.length){i.morphTargetDictionary={};for(let n=0,o=t.length;n<o;n++)i.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function qi(i){const e=i.extensions&&i.extensions[Ce.KHR_DRACO_MESH_COMPRESSION];let t;return e?t="draco:"+e.bufferView+":"+e.indices+":"+ls(e.attributes):t=i.indices+":"+ls(i.attributes)+":"+i.mode,t}function ls(i){let e="";const t=Object.keys(i).sort();for(let n=0,o=t.length;n<o;n++)e+=t[n]+":"+i[t[n]]+";";return e}function Lo(i){switch(i){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Gi(i){return i.search(/\.jpe?g($|\?)/i)>0||i.search(/^data\:image\/jpeg/)===0?"image/jpeg":i.search(/\.webp($|\?)/i)>0||i.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}class Yi{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new _i,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};const n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,o=navigator.userAgent.indexOf("Firefox")>-1,r=o?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1;typeof createImageBitmap>"u"||n||o&&r<98?this.textureLoader=new Ps(this.options.manager):this.textureLoader=new Sa(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ms(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,o=this.json,r=this.extensions;this.cache.removeAll(),this._invokeAll(function(s){return s._markDefs&&s._markDefs()}),Promise.all(this._invokeAll(function(s){return s.beforeRoot&&s.beforeRoot()}
vendor: 8,824 bytes, line 6
6)).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(s){const u={scene:s[0][o.scene||0],scenes:s[0],animations:s[1],cameras:s[2],asset:o.asset,parser:n,userData:{}};Dn(r,u,o),ln(u,o),Promise.all(n._invokeAll(function(d){return d.afterRoot&&d.afterRoot(u)})).then(function(){e(u)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let o=0,r=t.length;o<r;o++){const s=t[o].joints;for(let u=0,d=s.length;u<d;u++)e[s[u]].isBone=!0}for(let o=0,r=e.length;o<r;o++){const s=e[o];s.mesh!==void 0&&(this._addNodeRef(this.meshCache,s.mesh),s.skin!==void 0&&(n[s.mesh].isSkinnedMesh=!0)),s.camera!==void 0&&this._addNodeRef(this.cameraCache,s.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const o=n.clone(),r=(s,u)=>{const d=this.associations.get(s);d!=null&&this.associations.set(u,d);for(const[h,v]of s.children.entries())r(v,u.children[h])};return r(n,o),o.name+="_instance_"+e.uses[t]++,o}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const o=e(t[n]);if(o)return o}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let o=0;o<t.length;o++){const r=e(t[o]);r&&n.push(r)}return n}getDependency(e,t){const n=e+":"+t;let o=this.cache.get(n);if(!o){switch(e){case"scene":o=this.loadScene(t);break;case"node":o=this.loadNode(t);break;case"mesh":o=this._invokeOne(function(r){return r.loadMesh&&r.loadMesh(t)});break;case"accessor":o=this.loadAccessor(t);break;case"bufferView":o=this._invokeOne(function(r){return r.loadBufferView&&r.loadBufferView(t)});break;case"buffer":o=this.loadBuffer(t);break;case"material":o=this._invokeOne(function(r){return r.loadMaterial&&r.loadMaterial(t)});break;case"texture":o=this._invokeOne(function(r){return r.loadTexture&&r.loadTexture(t)});break;case"skin":o=this.loadSkin(t);break;case"animation":o=this._invokeOne(function(r){return r.loadAnimation&&r.loadAnimation(t)});break;case"camera":o=this.loadCamera(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,o)}return o}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,o=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(o.map(function(r,s){return n.getDependency(e,s)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[Ce.KHR_BINARY_GLTF].body);const o=this.options;return new Promise(function(r,s){n.load(un.resolveURL(t.uri,o.path),r,void 0,function(){s(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){const o=t.byteLength||0,r=t.byteOffset||0;return n.slice(r,r+o)})}loadAccessor(e){const t=this,n=this.json,o=this.json.accessors[e];if(o.bufferView===void 0&&o.sparse===void 0)return Promise.resolve(null);const r=[];return o.bufferView!==void 0?r.push(this.getDependency("bufferView",o.bufferView)):r.push(null),o.sparse!==void 0&&(r.push(this.getDependency("bufferView",o.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",o.sparse.values.bufferView))),Promise.all(r).then(function(s){const u=s[0],d=is[o.type],h=Xn[o.componentType],v=h.BYTES_PER_ELEMENT,p=v*d,P=o.byteOffset||0,O=o.bufferView!==void 0?n.bufferViews[o.bufferView].byteStride:void 0,I=o.normalized===!0;let x,z;if(O&&O!==p){const M=Math.floor(P/O),D="InterleavedBuffer:"+o.bufferView+":"+o.componentType+":"+M+":"+o.count;let j=t.cache.get(D);j||(x=new h(u,M*O,o.count*O/v),j=new Aa(x,O/v),t.cache.add(D,j)),z=new Xa(j,d,P%O/v,I)}else u===null?x=new h(o.count*d):x=new h(u,P,o.count*d),z=new Go(x,d,I);if(o.sparse!==void 0){const M=is.SCALAR,D=Xn[o.sparse.indices.componentType],j=o.sparse.indices.byteOffset||0,y=o.sparse.values.byteOffset||0,oe=new D(s[1],j,o.sparse.count*M),Ae=new h(s[2],y,o.sparse.count*d);u!==null&&(z=new Go(z.array.slice(),z.itemSize,z.normalized));for(let be=0,ze=oe.length;be<ze;be++){const pe=oe[be];if(z.setX(pe,Ae[be*d]),d>=2&&z.setY(pe,Ae[be*d+1]),d>=3&&z.setZ(pe,Ae[be*d+2]),d>=4&&z.setW(pe,Ae[be*d+3]),d>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return z})}loadTexture(e){const t=this.json,n=this.options,r=t.textures[e].source,s=t.images[r];let u=this.textureLoader;if(s.uri){const d=n.manager.getHandler(s.uri);d!==null&&(u=d)}return this.loadTextureImage(e,r,u)}loadTextureImage(e,t,n){const o=this,r=this.json,s=r.textures[e],u=r.images[t],d=(u.uri||u.bufferView)+":"+s.sampler;if(this.textureCache[d])return this.textureCache[d];const h=this.loadImageSource(t,n).then(function(v){v.flipY=!1,v.name=s.name||u.name||"";const P=(r.samplers||{})[s.sampler]||{};return v.magFilter=ss[P.magFilter]||Ls,v.minFilter=ss[P.minFilter]||ks,v.wrapS=as[P.wrapS]||ao,v.wrapT=as[P.wrapT]||ao,o.associations.set(v,{textures:e}),v}).catch(function(){return null});return this.textureCache[d]=h,h}loadImageSource(e,t){const n=this,o=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(p=>p.clone());const s=o.images[e],u=self.URL||self.webkitURL;let d=s.uri||"",h=!1;if(s.bufferView!==void 0)d=n.getDependency("bufferView",s.bufferView).then(function(p){h=!0;const P=new Blob([p],{type:s.mimeType});return d=u.createObjectURL(P),d});else if(s.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const v=Promise.resolve(d).then(function(p){return new Promise(function(P,O){let I=P;t.isImageBitmapLoader===!0&&(I=function(x){const z=new Yo(x);z.needsUpdate=!0,P(z)}),t.load(un.resolveURL(p,r.path),I,void 0,O)})}).then(function(p){return h===!0&&u.revokeObjectURL(d),p.userData.mimeType=s.mimeType||Gi(s.uri),p}).catch(function(p){throw console.error("THREE.GLTFLoader: Couldn't load texture",d),p});return this.sourceCache[e]=v,v}assignTexture(e,t,n,o){const r=this;return this.getDependency("texture",n.index).then(function(s){if(n.texCoord!==void 0&&n.texCoord!=0&&!(t==="aoMap"&&n.texCoord==1)&&console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+t+" not yet supported."),r.extensions[Ce.KHR_TEXTURE_TRANSFORM]){const u=n.extensions!==void 0?n.extensions[Ce.KHR_TEXTURE_TRANSFORM]:void 0;if(u){const d=r.associations.get(s);s=r.extensions[Ce.KHR_TEXTURE_TRANSFORM].extendTexture(s,u),r.associations.set(s,d)}}return o!==void 0&&(s.encoding=o),e[t]=s,s})}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const o=t.attributes.tangent===void 0,r=t.attributes.color!==void 0,s=t.attributes.normal===void 0;if(e.isPoints){const u="PointsMaterial:"+n.uuid;let d=this.cache.get(u);d||(d=new Ta,go.prototype.copy.call(d,n),d.color.copy(n.color),d.map=n.map,d.sizeAttenuation=!1,this.cache.add(u,d)),n=d}else if(e.isLine){const u="LineBasicMaterial:"+n.uuid;let d=this.cache.get(u);d||(d=new Es,go.prototype.copy.call(d,n),d.color.copy(n.color),this.cache.add(u,d)),n=d}if(o||r||s){let u="ClonedMaterial:"+n.uuid+":";n.isGLTFSpecularGlossinessMaterial&&(u+="specular-glossiness:"),o&&(u+="derivative-tangents:"),r&&(u+="vertex-colors:"),s&&(u+="flat-shading:");let d=this.cache.get(u);d||(d=n.clone(),r&&(d.vertexColors=!0),s&&(d.flatShading=!0),o&&(d.normalScale&&(d.normalScale.y*=-1),d.clearcoatNormalScale&&(d.clearcoatNormalScale.y*=-1)),this.cache.add(u,d),this.associations.set(d,this.associations.get(n))),n=d}n.aoMap&&t.attributes.uv2===void 0&&t.attributes.uv!==void 0&&t.setAttribute("uv2",t.attributes.uv),e.material=n}getMaterialType(){return Ro}loadMaterial(e){const t=this,n=this.json,o=this.extensions,r=n.materials[e];let s;const u={},d=r.extensions||{},h=[];if(d[Ce.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){const p=o[Ce.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];s=p.getMaterialType(),h.push(p.extendParams(u,r,t))}else if(d[Ce.KHR_MATERIALS_UNLIT]){const p=o[Ce.KHR_MATERIALS_UNLIT];s=p.getMaterialType(),h.push(p.extendParams(u,r,t))}else{const p=r.pbrMetallicRoughness||{};if(u.color=new Lt(1,1,1),u.opacity=1,Array.isArray(p.baseColorFactor)){const P=p.baseColorFactor;u.color.fromArray(P),u.opacity=P[3]}p.baseColorTexture!==void 0&&h.push(t.assignTexture(u,"map",p.baseColorTexture,dn)),u.metalness=p.metallicFactor!==void 0?p.metallicFactor:1,u.roughness=p.roughnessFactor!==void 0?p.roughnessFactor:1,p.metallicRoughnessTexture!==void 0&&(h.push(t.assignTexture(u,"metalnessMap",p.metallicRoughnessTexture)),h.push(t.assignTexture(u,"roughnessMap",p.metallicRoughnessTexture))),s=this._invokeOne(function(P){return P.getMaterialType&&P.getMaterialType(e)}
6),h.push(Promise.all(this._invokeAll(function(P){return P.extendMaterialParams&&P.extendMaterialParams(e,u)})))}r.doubleSided===!0&&(u.side=zs);const v=r.alphaMode||bo.OPAQUE;if(v===bo.BLEND?(u.transparent=!0,u.depthWrite=!1):(u.transparent=!1,v===bo.MASK&&(u.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&s!==en&&(h.push(t.assignTexture(u,"normalMap",r.normalTexture)),u.normalScale=new It(1,1),r.normalTexture.scale!==void 0)){const p=r.normalTexture.scale;u.normalScale.set(p,p)}return r.occlusionTexture!==void 0&&s!==en&&(h.push(t.assignTexture(u,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(u.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&s!==en&&(u.emissive=new Lt().fromArray(r.emissiveFactor)),r.emissiveTexture!==void 0&&s!==en&&h.push(t.assignTexture(u,"emissiveMap",r.emissiveTexture,dn)),Promise.all(h).then(function(){let p;return s===Io?p=o[Ce.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(u):p=new s(u),r.name&&(p.name=r.name),ln(p,r),t.associations.set(p,{materials:e}),r.extensions&&Dn(o,p,r),p})}createUniqueName(e){const t=Ma.sanitizeNodeName(e||"");let n=t;for(let o=1;this.nodeNamesUsed[n];++o)n=t+"_"+o;return this.nodeNamesUsed[n]=!0,n}loadGeometries(e){const t=this,n=this.extensions,o=this.primitiveCache;function r(u){return n[Ce.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,t).then(function(d){return rs(d,u,t)})}const s=[];for(let u=0,d=e.length;u<d;u++){const h=e[u],v=qi(h),p=o[v];if(p)s.push(p.promise);else{let P;h.extensions&&h.extensions[Ce.KHR_DRACO_MESH_COMPRESSION]?P=r(h):P=rs(new To,h,t),o[v]={primitive:h,promise:P},s.push(P)}}return Promise.all(s)}loadMesh(e){const t=this,n=this.json,o=this.extensions,r=n.meshes[e],s=r.primitives,u=[];for(let d=0,h=s.length;d<h;d++){const v=s[d].material===void 0?Xi(this.cache):this.getDependency("material",s[d].material);u.push(v)}return u.push(t.loadGeometries(s)),Promise.all(u).then(function(d){const h=d.slice(0,d.length-1),v=d[d.length-1],p=[];for(let O=0,I=v.length;O<I;O++){const x=v[O],z=s[O];let M;const D=h[O];if(z.mode===Pt.TRIANGLES||z.mode===Pt.TRIANGLE_STRIP||z.mode===Pt.TRIANGLE_FAN||z.mode===void 0)M=r.isSkinnedMesh===!0?new Ia(x,D):new le(x,D),M.isSkinnedMesh===!0&&!M.geometry.attributes.skinWeight.normalized&&M.normalizeSkinWeights(),z.mode===Pt.TRIANGLE_STRIP?M.geometry=cs(M.geometry,Va):z.mode===Pt.TRIANGLE_FAN&&(M.geometry=cs(M.geometry,Os));else if(z.mode===Pt.LINES)M=new Pa(x,D);else if(z.mode===Pt.LINE_STRIP)M=new Yt(x,D);else if(z.mode===Pt.LINE_LOOP)M=new La(x,D);else if(z.mode===Pt.POINTS)M=new ka(x,D);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+z.mode);Object.keys(M.geometry.morphAttributes).length>0&&Hi(M,r),M.name=t.createUniqueName(r.name||"mesh_"+e),ln(M,r),z.extensions&&Dn(o,M,z),t.assignFinalMaterial(M),p.push(M)}for(let O=0,I=p.length;O<I;O++)t.associations.set(p[O],{meshes:e,primitives:O});if(p.length===1)return p[0];const P=new vo;t.associations.set(P,{meshes:e});for(let O=0,I=p.length;O<I;O++)P.add(p[O]);return P})}loadCamera(e){let t;const n=this.json.cameras[e],o=n[n.type];if(!o){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new Oo(Ds.radToDeg(o.yfov),o.aspectRatio||1,o.znear||1,o.zfar||2e6):n.type==="orthographic"&&(t=new Ea(-o.xmag,o.xmag,o.ymag,-o.ymag,o.znear,o.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),ln(t,n),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],n={joints:t.joints};return t.inverseBindMatrices===void 0?Promise.resolve(n):this.getDependency("accessor",t.inverseBindMatrices).then(function(o){return n.inverseBindMatrices=o,n})}loadAnimation(e){const n=this.json.animations[e],o=[],r=[],s=[],u=[],d=[];for(let h=0,v=n.channels.length;h<v;h++){const p=n.channels[h],P=n.samplers[p.sampler],O=p.target,I=O.node,x=n.parameters!==void 0?n.parameters[P.input]:P.input,z=n.parameters!==void 0?n.parameters[P.output]:P.output;o.push(this.getDependency("node",I)),r.push(this.getDependency("accessor",x)),s.push(this.getDependency("accessor",z)),u.push(P),d.push(O)}return Promise.all([Promise.all(o),Promise.all(r),Promise.all(s),Promise.all(u),Promise.all(d)]).then(function(h){const v=h[0],p=h[1],P=h[2],O=h[3],I=h[4],x=[];for(let M=0,D=v.length;M<D;M++){const j=v[M],y=p[M],oe=P[M],Ae=O[M],be=I[M];if(j===void 0)continue;j.updateMatrix();let ze;switch(Kt[be.path]){case Kt.weights:ze=qa;break;case Kt.rotation:ze=Wo;break;case Kt.position:case Kt.scale:default:ze=Ha;break}const pe=j.name?j.name:j.uuid,ye=Ae.interpolation!==void 0?ji[Ae.interpolation]:Rs,ue=[];Kt[be.path]===Kt.weights?j.traverse(function(_e){_e.morphTargetInfluences&&ue.push(_e.name?_e.name:_e.uuid)}):ue.push(pe);let De=oe.array;if(oe.normalized){const _e=Lo(De.constructor),de=new Float32Array(De.length);for(let G=0,xe=De.length;G<xe;G++)de[G]=De[G]*_e;De=de}for(let _e=0,de=ue.length;_e<de;_e++){const G=new ze(ue[_e]+"."+Kt[be.path],y.array,De,ye);Ae.interpolation==="CUBICSPLINE"&&(G.createInterpolant=function(Te){const se=this instanceof Wo?Zi:qs;return new se(this.times,this.values,this.getValueSize()/3,Te)},G.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),x.push(G)}}const z=n.name?n.name:"animation_"+e;return new za(z,void 0,x)})}createNodeMesh(e){const t=this.json,n=this,o=t.nodes[e];return o.mesh===void 0?null:n.getDependency("mesh",o.mesh).then(function(r){const s=n._getNodeRef(n.meshCache,o.mesh,r);return o.weights!==void 0&&s.traverse(function(u){if(u.isMesh)for(let d=0,h=o.weights.length;d<h;d++)u.morphTargetInfluences[d]=o.weights[d]}),s})}loadNode(e){const t=this.json,n=this.extensions,o=this,r=t.nodes[e],s=r.name?o.createUniqueName(r.name):"";return function(){const u=[],d=o._invokeOne(function(h){return h.createNodeMesh&&h.createNodeMesh(e)});return d&&u.push(d),r.camera!==void 0&&u.push(o.getDependency("camera",r.camera).then(function(h){return o._getNodeRef(o.cameraCache,r.camera,h)})),o._invokeAll(function(h){return h.createNodeAttachment&&h.createNodeAttachment(e)}
6).forEach(function(h){u.push(h)}),Promise.all(u)}().then(function(u){let d;if(r.isBone===!0?d=new Da:u.length>1?d=new vo:u.length===1?d=u[0]:d=new Un,d!==u[0])for(let h=0,v=u.length;h<v;h++)d.add(u[h]);if(r.name&&(d.userData.name=r.name,d.name=s),ln(d,r),r.extensions&&Dn(n,d,r),r.matrix!==void 0){const h=new Hn;h.fromArray(r.matrix),d.applyMatrix4(h)}else r.translation!==void 0&&d.position.fromArray(r.translation),r.rotation!==void 0&&d.quaternion.fromArray(r.rotation),r.scale!==void 0&&d.scale.fromArray(r.scale);return o.associations.has(d)||o.associations.set(d,{}),o.associations.get(d).nodes=e,d})}loadScene(e){const t=this.json,n=this.extensions,o=this.json.scenes[e],r=this,s=new vo;o.name&&(s.name=r.createUniqueName(o.name)),ln(s,o),o.extensions&&Dn(n,s,o);const u=o.nodes||[],d=[];for(let h=0,v=u.length;h<v;h++)d.push(Gs(u[h],s,t,r));return Promise.all(d).then(function(){const h=v=>{const p=new Map;for(const[P,O]of r.associations)(P instanceof go||P instanceof Yo)&&p.set(P,O);return v.traverse(P=>{const O=r.associations.get(P);O!=null&&p.set(P,O)}),p};return r.associations=h(s),s})}}function Gs(i,e,t,n){const o=t.nodes[i];return n.getDependency("node",i).then(function(r){if(o.skin===void 0)return r;let s;return n.getDependency("skin",o.skin).then(function(u){s=u;const d=[];for(let h=0,v=s.joints.length;h<v;h++)d.push(n.getDependency("node",s.joints[h]));return Promise.all(d)}).then(function(u){return r.traverse(function(d){if(!d.isMesh)return;const h=[],v=[];for(let p=0,P=u.length;p<P;p++){const O=u[p];if(O){h.push(O);const I=new Hn;s.inverseBindMatrices!==void 0&&I.fromArray(s.inverseBindMatrices.array,p*16),v.push(I)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',s.joints[p])}d.bind(new Ra(h,v),d.matrixWorld)}),r})}).then(function(r){e.add(r);const s=[];if(o.children){const u=o.children;for(let d=0,h=u.length;d<h;d++){const v=u[d];s.push(Gs(v,r,t,n))}}return Promise.all(s)})}function Wi(i,e,t){const n=e.attributes,o=new Ga;
6if(n.POSITION!==void 0){const u=t.json.accessors[n.POSITION],d=u.min,h=u.max;if(d!==void 0&&h!==void 0){if(o.set(new J(d[0],d[1],d[2]),new J(h[0],h[1],h[2])),u.normalized){const v=Lo(Xn[u.componentType]);o.min.multiplyScalar(v),o.max.multiplyScalar(v)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const r=e.targets;if(r!==void 0){const u=new J,d=new J;for(let h=0,v=r.length;h<v;h++){const p=r[h];if(p.POSITION!==void 0){const P=t.json.accessors[p.POSITION],O=P.min,I=P.max;if(O!==void 0&&I!==void 0){if(d.setX(Math.max(Math.abs(O[0]),Math.abs(I[0]))),d.setY(Math.max(Math.abs(O[1]),Math.abs(I[1]))),d.setZ(Math.max(Math.abs(O[2]),Math.abs(I[2]))),P.normalized){const x=Lo(Xn[P.componentType]);d.multiplyScalar(x)}u.max(d)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}o.expandByVector(u)}i.boundingBox=o;const s=new Ya;o.getCenter(s.center),s.radius=o.min.distanceTo(o.max)/2,i.boundingSphere=s}function rs(i,e,t){const n=e.attributes,o=[];function r(s,u){return t.getDependency("accessor",s).then(function(d){i.setAttribute(u,d)})}for(const s in n){const u=Po[s]||s.toLowerCase();u in i.attributes||o.push(r(n[s],u))}if(e.indices!==void 0&&!i.index){const s=t.getDependency("accessor",e.indices).then(function(u){i.setIndex(u)});o.push(s)}return ln(i,e),Wi(i,e,t),Promise.all(o).then(function(){return e.targets!==void 0?Vi(i,e.targets,t):i})}function cs(i,e){let t=i.getIndex();if(t===null){const s=[],u=i.getAttribute("position");if(u!==void 0){for(let d=0;d<u.count;d++)s.push(d);i.setIndex(s),t=i.getIndex()}else return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i}const n=t.count-2,o=[];if(e===Os)for(let s=1;s<=n;s++)o.push(t.getX(0)),o.push(t.getX(s)),o.push(t.getX(s+1));else for(let s=0;s<n;s++)s%2===0?(o.push(t.getX(s)),o.push(t.getX(s+1)),o.push(t.getX(s+2))):(o.push(t.getX(s+2)),o.push(t.getX(s+1)),o.push(t.getX(s)));o.length/3!==n&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const r=i.clone();return r.setIndex(o),r}const sn=new Ns,Ct=new J,Qt=new J,qe=new Le,us={X:new J(1,0,0),Y:new J(0,1,0),Z:new J(0,0,1)},yo={type:"change"},ds={type:"mouseDown"},ps={type:"mouseUp",mode:null},hs={type:"objectChange"};class Ki extends Un{constructor(e,t){super(),t===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),t=document),this.isTransformControls=!0,this.visible=!1,this.domElement=t,this.domElement.style.touchAction="none";const n=new ol;this._gizmo=n,this.add(n);const o=new sl;this._plane=o,this.add(o);const r=this;function s(D,j){let y=j;Object.defineProperty(r,D,{get:function(){return y!==void 0?y:j},set:function(oe){y!==oe&&(y=oe,o[D]=oe,n[D]=oe,r.dispatchEvent({type:D+"-changed",value:oe}),r.dispatchEvent(yo))}}),r[D]=j,o[D]=j,n[D]=j}s("camera",e),s("object",void 0),s("enabled",!0),s("axis",null),s("mode","translate"),s("translationSnap",null),s("rotationSnap",null),s("scaleSnap",null),s("space","world"),s("size",1),s("dragging",!1),s("showX",!0),s("showY",!0),s("showZ",!0);const u=new J,d=new J,h=new Le,v=new Le,p=new J,P=new Le,O=new J,I=new J,x=new J,z=0,M=new J;s("worldPosition",u),s("worldPositionStart",d),s("worldQuaternion",h),s("worldQuaternionStart",v),s("cameraPosition",p),s("cameraQuaternion",P),s("pointStart",O),s("pointEnd",I),s("rotationAxis",x),s("rotationAngle",z),s("eye",M),this._offset=new J,this._startNorm=new J,this._endNorm=new J,this._cameraScale=new J,this._parentPosition=new J,this._parentQuaternion=new Le,this._parentQuaternionInv=new Le,this._parentScale=new J,this._worldScaleStart=new J,this._worldQuaternionInv=new Le,this._worldScale=new J,this._positionStart=new J,this._quaternionStart=new Le,this._scaleStart=new J,this._getPointer=Qi.bind(this),this._onPointerDown=el.bind(this),this._onPointerHover=Ji.bind(this),this._onPointerMove=tl.bind(this),this._onPointerUp=nl.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(this)}pointerHover(e){if(this.object===void 0||this.dragging===!0)return;sn.setFromCamera(e,this.camera);const t=_o(this._gizmo.picker[this.mode],sn);t?this.axis=t.object.name:this.axis=null}pointerDown(e){if(!(this.object===void 0||this.dragging===!0||e.button!==0)&&this.axis!==null){sn.setFromCamera(e,this.camera);const t=_o(this._plane,sn,!0);t&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(t.point).sub(this.worldPositionStart)),this.dragging=!0,ds.mode=this.mode,this.dispatchEvent(ds)}}pointerMove(e){const t=this.axis,n=this.mode,o=this.object;let r=this.space;if(n==="scale"?r="local":(t==="E"||t==="XYZE"||t==="XYZ")&&(r="world"),o===void 0||t===null||this.dragging===!1||e.button!==-1)return;sn.setFromCamera(e,this.camera);const s=_o(this._plane,sn,!0);
6if(s){if(this.pointEnd.copy(s.point).sub(this.worldPositionStart),n==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),r==="local"&&t!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),t.indexOf("X")===-1&&(this._offset.x=0),t.indexOf("Y")===-1&&(this._offset.y=0),t.indexOf("Z")===-1&&(this._offset.z=0),r==="local"&&t!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),o.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(r==="local"&&(o.position.applyQuaternion(qe.copy(this._quaternionStart).invert()),t.search("X")!==-1&&(o.position.x=Math.round(o.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(o.position.y=Math.round(o.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(o.position.z=Math.round(o.position.z/this.translationSnap)*this.translationSnap),o.position.applyQuaternion(this._quaternionStart)),r==="world"&&(o.parent&&o.position.add(Ct.setFromMatrixPosition(o.parent.matrixWorld)),t.search("X")!==-1&&(o.position.x=Math.round(o.position.x/this.translationSnap)*this.translationSnap),t.search("Y")!==-1&&(o.position.y=Math.round(o.position.y/this.translationSnap)*this.translationSnap),t.search("Z")!==-1&&(o.position.z=Math.round(o.position.z/this.translationSnap)*this.translationSnap),o.parent&&o.position.sub(Ct.setFromMatrixPosition(o.parent.matrixWorld))));else if(n==="scale"){if(t.search("XYZ")!==-1){let u=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(u*=-1),Qt.set(u,u,u)}else Ct.copy(this.pointStart),Qt.copy(this.pointEnd),Ct.applyQuaternion(this._worldQuaternionInv),Qt.applyQuaternion(this._worldQuaternionInv),Qt.divide(Ct),t.search("X")===-1&&(Qt.x=1),t.search("Y")===-1&&(Qt.y=1),t.search("Z")===-1&&(Qt.z=1);o.scale.copy(this._scaleStart).multiply(Qt),this.scaleSnap&&(t.search("X")!==-1&&(o.scale.x=Math.round(o.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Y")!==-1&&(o.scale.y=Math.round(o.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search("Z")!==-1&&(o.scale.z=Math.round(o.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(n==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const u=20/this.worldPosition.distanceTo(Ct.setFromMatrixPosition(this.camera.matrixWorld));t==="E"?(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1):t==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(Ct.copy(this.rotationAxis).cross(this.eye))*u):(t==="X"||t==="Y"||t==="Z")&&(this.rotationAxis.copy(us[t]),Ct.copy(us[t]),r==="local"&&Ct.applyQuaternion(this.worldQuaternion),this.rotationAngle=this._offset.dot(Ct.cross(this.eye).normalize())*u),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),r==="local"&&t!=="E"&&t!=="XYZE"?(o.quaternion.copy(this._quaternionStart),o.quaternion.multiply(qe.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),o.quaternion.copy(qe.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),o.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(yo),this.dispatchEvent(hs)}}pointerUp(e){e.button===0&&(this.dragging&&this.axis!==null&&(ps.mode=this.mode,this.dispatchEvent(ps)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(e){e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()})}attach(e){return this.object=e,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(yo),this.dispatchEvent(hs),this.pointStart.copy(this.pointEnd))}getRaycaster(){return sn}getMode(){return this.mode}setMode(e){this.mode=e}setTranslationSnap(e){this.translationSnap=e}setRotationSnap(e){this.rotationSnap=e}setScaleSnap(e){this.scaleSnap=e}setSize(e){this.size=e}setSpace(e){this.space=e}}function Qi(i){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:i.button};{const e=this.domElement.getBoundingClientRect();return{x:(i.clientX-e.left)/e.width*2-1,y:-(i.clientY-e.top)/e.height*2+1,button:i.button}}}function Ji(i){if(this.enabled)switch(i.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(i));break}}function el(i){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(i.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(i)),this.pointerDown(this._getPointer(i)))}function tl(i){this.enabled&&this.pointerMove(this._getPointer(i))}function nl(i){this.enabled&&(this.domElement.releasePointerCapture(i.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(i)))}function _o(i,e,t){const n=e.intersectObject(i,!0);for(let o=0;o<n.length;o++)if(n[o].object.visible||t)return n[o];return!1}const Kn=new Qa,Be=new J(0,1,0),fs=new J(0,0,0),ms=new Hn,Qn=new Le,eo=new Le,Bt=new J,gs=new Hn,$n=new J(1,0,0),rn=new J(0,1,0),Fn=new J(0,0,1),Jn=new J,Rn=new J,On=new J;class ol extends Un{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const e=new en({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),t=new Es({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),n=e.clone();n.opacity=.15;const o=t.clone();o.opacity=.5;const r=e.clone();r.color.setHex(16711680);const s=e.clone();s.color.setHex(65280);const u=e.clone();u.color.setHex(255);const d=e.clone();d.color.setHex(16711680),d.opacity=.5;const h=e.clone();h.color.setHex(65280),h.opacity=.5;const v=e.clone();v.color.setHex(255),v.opacity=.5;const p=e.clone();p.opacity=.25;const P=e.clone();P.color.setHex(16776960),P.opacity=.25,e.clone().color.setHex(16776960);const I=e.clone();I.color.setHex(7895160);const x=new _t(0,.04,.1,12);x.translate(0,.05,0);const z=new ft(.08,.08,.08);z.translate(0,.04,0);const M=new To;M.setAttribute("position",new Ko([0,0,0,1,0,0],3));const D=new _t(.0075,.0075,.5,3);D.translate(0,.25,0);function j(G,xe){const Te=new En(G,.0075,3,64,xe*Math.PI*2);return Te.rotateY(Math.PI/2),Te.rotateX(Math.PI/2),Te}function y(){const G=new To;return G.setAttribute("position",new Ko([0,0,0,1,1,1],3)),G}
6const oe={X:[[new le(x,r),[.5,0,0],[0,0,-Math.PI/2]],[new le(x,r),[-.5,0,0],[0,0,Math.PI/2]],[new le(D,r),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new le(x,s),[0,.5,0]],[new le(x,s),[0,-.5,0],[Math.PI,0,0]],[new le(D,s)]],Z:[[new le(x,u),[0,0,.5],[Math.PI/2,0,0]],[new le(x,u),[0,0,-.5],[-Math.PI/2,0,0]],[new le(D,u),null,[Math.PI/2,0,0]]],XYZ:[[new le(new Wn(.1,0),p.clone()),[0,0,0]]],XY:[[new le(new ft(.15,.15,.01),v.clone()),[.15,.15,0]]],YZ:[[new le(new ft(.15,.15,.01),d.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new le(new ft(.15,.15,.01),h.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},Ae={X:[[new le(new _t(.2,0,.6,4),n),[.3,0,0],[0,0,-Math.PI/2]],[new le(new _t(.2,0,.6,4),n),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new le(new _t(.2,0,.6,4),n),[0,.3,0]],[new le(new _t(.2,0,.6,4),n),[0,-.3,0],[0,0,Math.PI]]],Z:[[new le(new _t(.2,0,.6,4),n),[0,0,.3],[Math.PI/2,0,0]],[new le(new _t(.2,0,.6,4),n),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new le(new Wn(.2,0),n)]],XY:[[new le(new ft(.2,.2,.01),n),[.15,.15,0]]],YZ:[[new le(new ft(.2,.2,.01),n),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new le(new ft(.2,.2,.01),n),[.15,0,.15],[-Math.PI/2,0,0]]]},be={START:[[new le(new Wn(.01,2),o),null,null,null,"helper"]],END:[[new le(new Wn(.01,2),o),null,null,null,"helper"]],DELTA:[[new Yt(y(),o),null,null,null,"helper"]],X:[[new Yt(M,o.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Yt(M,o.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Yt(M,o.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},ze={XYZE:[[new le(j(.5,1),I),null,[0,Math.PI/2,0]]],X:[[new le(j(.5,.5),r)]],Y:[[new le(j(.5,.5),s),null,[0,0,-Math.PI/2]]],Z:[[new le(j(.5,.5),u),null,[0,Math.PI/2,0]]],E:[[new le(j(.75,1),P),null,[0,Math.PI/2,0]]]},pe={AXIS:[[new Yt(M,o.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},ye={XYZE:[[new le(new $s(.25,10,8),n)]],X:[[new le(new En(.5,.1,4,24),n),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new le(new En(.5,.1,4,24),n),[0,0,0],[Math.PI/2,0,0]]],Z:[[new le(new En(.5,.1,4,24),n),[0,0,0],[0,0,-Math.PI/2]]],E:[[new le(new En(.75,.1,2,24),n)]]},ue={X:[[new le(z,r),[.5,0,0],[0,0,-Math.PI/2]],[new le(D,r),[0,0,0],[0,0,-Math.PI/2]],[new le(z,r),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new le(z,s),[0,.5,0]],[new le(D,s)],[new le(z,s),[0,-.5,0],[0,0,Math.PI]]],Z:[[new le(z,u),[0,0,.5],[Math.PI/2,0,0]],[new le(D,u),[0,0,0],[Math.PI/2,0,0]],[new le(z,u),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new le(new ft(.15,.15,.01),v),[.15,.15,0]]],YZ:[[new le(new ft(.15,.15,.01),d),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new le(new ft(.15,.15,.01),h),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new le(new ft(.1,.1,.1),p.clone())]]},De={X:[[new le(new _t(.2,0,.6,4),n),[.3,0,0],[0,0,-Math.PI/2]],[new le(new _t(.2,0,.6,4),n),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new le(new _t(.2,0,.6,4),n),[0,.3,0]],[new le(new _t(.2,0,.6,4),n),[0,-.3,0],[0,0,Math.PI]]],Z:[[new le(new _t(.2,0,.6,4),n),[0,0,.3],[Math.PI/2,0,0]],[new le(new _t(.2,0,.6,4),n),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new le(new ft(.2,.2,.01),n),[.15,.15,0]]],YZ:[[new le(new ft(.2,.2,.01),n),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new le(new ft(.2,.2,.01),n),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new le(new ft(.2,.2,.2),n),[0,0,0]]]},_e={X:[[new Yt(M,o.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Yt(M,o.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Yt(M,o.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function de(G){const xe=new Un;for(const Te in G)for(let se=G[Te].length;se--;){const $=G[Te][se][0].clone(),ee=G[Te][se][1],Me=G[Te][se][2],ve=G[Te][se][3],Ze=G[Te][se][4];$.name=Te,$.tag=Ze,ee&&$.position.set(ee[0],ee[1],ee[2]),Me&&$.rotation.set(Me[0],Me[1],Me[2]),ve&&$.scale.set(ve[0],ve[1],ve[2]),$.updateMatrix();const Xe=$.geometry.clone();
6Xe.applyMatrix4($.matrix),$.geometry=Xe,$.renderOrder=1/0,$.position.set(0,0,0),$.rotation.set(0,0,0),$.scale.set(1,1,1),xe.add($)}return xe}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=de(oe)),this.add(this.gizmo.rotate=de(ze)),this.add(this.gizmo.scale=de(ue)),this.add(this.picker.translate=de(Ae)),this.add(this.picker.rotate=de(ye)),this.add(this.picker.scale=de(De)),this.add(this.helper.translate=de(be)),this.add(this.helper.rotate=de(pe)),this.add(this.helper.scale=de(_e)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(e){const n=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:eo;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let o=[];o=o.concat(this.picker[this.mode].children),o=o.concat(this.gizmo[this.mode].children),o=o.concat(this.helper[this.mode].children);for(let r=0;r<o.length;r++){const s=o[r];s.visible=!0,s.rotation.set(0,0,0),s.position.copy(this.worldPosition);let u;if(this.camera.isOrthographicCamera?u=(this.camera.top-this.camera.bottom)/this.camera.zoom:u=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),s.scale.set(1,1,1).multiplyScalar(u*this.size/4),s.tag==="helper"){s.visible=!1,s.name==="AXIS"?(s.position.copy(this.worldPositionStart),s.visible=!!this.axis,this.axis==="X"&&(qe.setFromEuler(Kn.set(0,0,0)),s.quaternion.copy(n).multiply(qe),Math.abs(Be.copy($n).applyQuaternion(n).dot(this.eye))>.9&&(s.visible=!1)),this.axis==="Y"&&(qe.setFromEuler(Kn.set(0,0,Math.PI/2)),s.quaternion.copy(n).multiply(qe),Math.abs(Be.copy(rn).applyQuaternion(n).dot(this.eye))>.9&&(s.visible=!1)),this.axis==="Z"&&(qe.setFromEuler(Kn.set(0,Math.PI/2,0)),s.quaternion.copy(n).multiply(qe),Math.abs(Be.copy(Fn).applyQuaternion(n).dot(this.eye))>.9&&(s.visible=!1)),this.axis==="XYZE"&&(qe.setFromEuler(Kn.set(0,Math.PI/2,0)),Be.copy(this.rotationAxis),s.quaternion.setFromRotationMatrix(ms.lookAt(fs,Be,rn)),s.quaternion.multiply(qe),s.visible=this.dragging),this.axis==="E"&&(s.visible=!1)):s.name==="START"?(s.position.copy(this.worldPositionStart),s.visible=this.dragging):s.name==="END"?(s.position.copy(this.worldPosition),s.visible=this.dragging):s.name==="DELTA"?(s.position.copy(this.worldPositionStart),s.quaternion.copy(this.worldQuaternionStart),Ct.set(1e-10,
61e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),Ct.applyQuaternion(this.worldQuaternionStart.clone().invert()),s.scale.copy(Ct),s.visible=this.dragging):(s.quaternion.copy(n),this.dragging?s.position.copy(this.worldPositionStart):s.position.copy(this.worldPosition),this.axis&&(s.visible=this.axis.search(s.name)!==-1));continue}s.quaternion.copy(n),this.mode==="translate"||this.mode==="scale"?(s.name==="X"&&Math.abs(Be.copy($n).applyQuaternion(n).dot(this.eye))>.99&&(s.scale.set(1e-10,1e-10,1e-10),s.visible=!1),s.name==="Y"&&Math.abs(Be.copy(rn).applyQuaternion(n).dot(this.eye))>.99&&(s.scale.set(1e-10,1e-10,1e-10),s.visible=!1),s.name==="Z"&&Math.abs(Be.copy(Fn).applyQuaternion(n).dot(this.eye))>.99&&(s.scale.set(1e-10,1e-10,1e-10),s.visible=!1),s.name==="XY"&&Math.abs(Be.copy(Fn).applyQuaternion(n).dot(this.eye))<.2&&(s.scale.set(1e-10,1e-10,1e-10),s.visible=!1),s.name==="YZ"&&Math.abs(Be.copy($n).applyQuaternion(n).dot(this.eye))<.2&&(s.scale.set(1e-10,1e-10,1e-10),s.visible=!1),s.name==="XZ"&&Math.abs(Be.copy(rn).applyQuaternion(n).dot(this.eye))<.2&&(s.scale.set(1e-10,
61e-10,1e-10),s.visible=!1)):this.mode==="rotate"&&(Qn.copy(n),Be.copy(this.eye).applyQuaternion(qe.copy(n).invert()),s.name.search("E")!==-1&&s.quaternion.setFromRotationMatrix(ms.lookAt(this.eye,fs,rn)),s.name==="X"&&(qe.setFromAxisAngle($n,Math.atan2(-Be.y,Be.z)),qe.multiplyQuaternions(Qn,qe),s.quaternion.copy(qe)),s.name==="Y"&&(qe.setFromAxisAngle(rn,Math.atan2(Be.x,Be.z)),qe.multiplyQuaternions(Qn,qe),s.quaternion.copy(qe)),s.name==="Z"&&(qe.setFromAxisAngle(Fn,Math.atan2(Be.y,Be.x)),qe.multiplyQuaternions(Qn,qe),s.quaternion.copy(qe))),s.visible=s.visible&&(s.name.indexOf("X")===-1||this.showX),s.visible=s.visible&&(s.name.indexOf("Y")===-1||this.showY),s.visible=s.visible&&(s.name.indexOf("Z")===-1||this.showZ),s.visible=s.visible&&(s.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),s.material._color=s.material._color||s.material.color.clone(),s.material._opacity=s.material._opacity||s.material.opacity,s.material.color.copy(s.material._color),s.material.opacity=s.material._opacity,this.enabled&&this.axis&&(s.name===this.axis||this.axis.split("").some(function(d){return s.name===d}))&&(s.material.color.setHex(16776960),s.material.opacity=1)}super.updateMatrixWorld(e)}}class sl extends le{constructor(){super(new Ka(1e5,1e5,2,2),new en({visible:!1,wireframe:!0,side:zs,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(e){let t=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(t="local"),Jn.copy($n).applyQuaternion(t==="local"?this.worldQuaternion:eo),Rn.copy(rn).applyQuaternion(t==="local"?this.worldQuaternion:eo),On.copy(Fn).applyQuaternion(t==="local"?this.worldQuaternion:eo),Be.copy(Rn),this.mode){case"translate":case"scale":switch(this.axis){case"X":Be.copy(this.eye).cross(Jn),Bt.copy(Jn).cross(Be);break;case"Y":Be.copy(this.eye).cross(Rn),Bt.copy(Rn).cross(Be);break;case"Z":Be.copy(this.eye).cross(On),Bt.copy(On).cross(Be);break;case"XY":Bt.copy(On);break;case"YZ":Bt.copy(Jn);break;case"XZ":Be.copy(On),Bt.copy(Rn);break;case"XYZ":case"E":Bt.set(0,0,0);break}break;case"rotate":default:Bt.set(0,0,0)}Bt.length()===0?this.quaternion.copy(this.cameraQuaternion):(gs.lookAt(Ct.set(0,0,0),Bt,Be),this.quaternion.setFromRotationMatrix(gs)),super.updateMatrixWorld(e)}}const al={ref:"container",class:"viewer-container"},il={__name:"PanoramaViewer",props:{panoramaId:{type:String,required:!0}},emits:["close"],setup(i,{emit:e}){const t=i,n=S(null),o=S(null);let r,s,u,d,h,v=new Ns,p=new It,P=null,O=!1;const I=30,x=90,z=async()=>{const pe=io(),ye=An(pe,"panoramas",t.panoramaId),ue=await Bs(ye);ue.exists()?(n.value=ue.data().imageUrl,M()):console.log("No such document!")},M=()=>{const pe=o.value;r=new Fs,s=new Oo(75,pe.clientWidth/pe.clientHeight,.1,2e3),s.position.set(0,0,.1),u=new Us({antialias:!0}),u.setSize(pe.clientWidth,pe.clientHeight),u.setPixelRatio(window.devicePixelRatio),pe.appendChild(u.domElement),window.addEventListener("resize",oe),d=new Xs(s,u.domElement),d.enableZoom=!1,d.enablePan=!0,d.enableDamping=!0,d.dampingFactor=.05,new Ps().load(n.value,ue=>{ue.wrapS=ao,ue.repeat.x=-1;const De=new $s(500,60,40);De.scale(-1,1,1);const _e=new en({map:ue}),de=new le(De,_e);r.add(de),D(),j(),Ae()}),window.addEventListener("wheel",be),window.addEventListener("mousedown",y)},D=()=>{const pe=new Vs;pe.load("https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek.appspot.com/o/updatedDiagramAssets%2F003_SelfWalk_BasicRoundTable_Asset_LOD2.gltf?alt=media&token=e5335755-ab25-4065-832d-51e3dce062be",ye=>{const ue=ye.scene;ue.position.set(0,-1,3),ue.scale.set(.5,.5,.5),ue.name="chair",r.add(ue)}),pe.load("https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek.appspot.com/o/updatedDiagramAssets%2F003_SelfWalk_BasicRoundTable_Asset_LOD2.gltf?alt=media&token=e5335755-ab25-4065-832d-51e3dce062be",ye=>{const ue=ye.scene;ue.position.set(2,-1,4),ue.scale.set(.7,.7,.7),ue.name="table",r.add(ue)})},j=()=>{h=new Ki(s,u.domElement),r.add(h),h.addEventListener("dragging-changed",function(pe){d.enabled=!pe.value})},y=pe=>{p.x=pe.clientX/window.innerWidth*2-1,p.y=-(pe.clientY/window.innerHeight)*2+1,v.setFromCamera(p,s);const ye=v.intersectObjects(r.children,!0);ye.length>0&&(P=ye[0].object,h.attach(P))},oe=()=>{const pe=o.value;s.aspect=pe.clientWidth/pe.clientHeight,s.updateProjectionMatrix(),u.setSize(pe.clientWidth,pe.clientHeight)},Ae=()=>{O||(requestAnimationFrame(Ae),d.update(),u.render(r,s))},be=pe=>{const ye=pe.deltaY*.05;s.fov=Ds.clamp(s.fov+ye,I,x),s.updateProjectionMatrix()};di(()=>{O=!0,u&&u.dispose(),r=null,s=null,d.dispose(),window.removeEventListener("resize",oe),window.removeEventListener("wheel",be),window.removeEventListener("mousedown",y)});const ze=()=>{e("close")};return Mn(()=>{O=!1,z()}),(pe,ye)=>(E(),R("div",al,[a("button",{class:"close-btn",onClick:ze},"Close"),a("div",{ref_key:"panoramaContainer",ref:o,class:"panorama-viewer"},null,512)],512))}},ll=on(il,[["__scopeId","data-v-0641b581"]]),Pn=i=>(hn("data-v-14398d3e"),i=i(),fn(),i),rl={class:"docInfo"},cl={class:"addDocs"},ul={class:"uploadDoc"},dl=Pn(()=>a("label",{class:"upload-btn",for:"file"},"Upload PDF",-1)),pl={key:0},hl={class:"addDocLink"},fl=Pn(()=>a("div",null,null,-1)),ml={class:"venueCheckField"},gl=Pn(()=>a("label",{for:"inroomdiningtab"},"Show Doc Menu Pills",-1)),vl={class:"venueCheckField"},wl=Pn(()=>a("label",{for:"inroomdiningtab"},"Use Doc Menu Builder",-1)),bl={class:"docList"},yl={class:"docItem"},_l=In('<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewB
6ox="0 0 50 50" fill="none" data-v-14398d3e><mask id="mask0_728_2024" style="mask-type:alpha;" maskUnits="userSpaceOnUse" x="0" y="0" width="50" height="50" data-v-14398d3e><path d="M0 12C0 5.37258 5.37258 0 12 0H38C44.6274 0 50 5.37258 50 12V38C50 44.6274 44.6274 50 38 50H12C5.37258 50 0 44.6274 0 38V12Z" fill="white" data-v-14398d3e></path></mask><g mask="url(#mask0_728_2024)" data-v-14398d3e><rect opacity="0.1" x="-10" y="-2" width="70" height="54" fill="white" data-v-14398d3e></rect><path d="M29.0007 13.3C29.7065 13.542 30.3487 13.9398 30.8797 14.464L32.5357 16.122C33.0605 16.6523 33.4587 17.2943 33.7007 18H29.0007V13.3ZM34.0007 20V32C33.9991 33.3256 33.4718 34.5964 32.5345 35.5338C31.5971 36.4711 30.3263 36.9984 29.0007 37H21.0007C19.6751 36.9984 18.4043 36.4711 17.4669 35.5338C16.5296 34.5964 16.0023 33.3256 16.0007 32C15.9991 30.6744 16.0007 18 16.0007 18C16.0023 16.6744 16.5296 15.4036 17.4669 14.4662C18.4043 13.5289 19.6751 13.0016 21.0007 13H27.0007V18C27.0007 18.5304 27.2114 19.0391 27.5865 19.4142C27.9616 19.7893 28.4703 20 29.0007 20H34.0007ZM30.0007 27C30.0007 26.7348 29.8953 26.4804 29.7078 26.2929C29.5203 26.1054 29.2659 26 29.0007 26H21.0007C20.7355 26 20.4811 26.1054 20.2936 26.2929C20.1061 26.4804 20.0007 26.7348 20.0007 27C20.0007 27.2652 20.1061 27.5196 20.2936 27.7071C20.4811 27.8946 20.7355 28 21.0007 28H29.0007C29.2659 28 29.5203 27.8946 29.7078 27.7071C29.8953 27.5196 30.0007 27.2652 30.0007 27ZM30.0007 23C30.0007 22.7348 29.8953 22.4804 29.7078 22.2929C29.5203 22.1054 29.2659 22 29.0007 22H21.0007C20.7355 22 20.4811 22.1054 20.2936 22.2929C20.1061 22.4804 20.0007 22.7348 20.0007 23C20.0007 23.2652 20.1061 23.5196 20.2936 23.7071C20.4811 23.8946 20.7355 24 21.0007 24H29.0007C29.2659 24 29.5203 23.8946 29.7078 23.7071C29.8953 23.5196 30.0007 23.2652 30.0007 23Z" fill="white" data-v-14398d3e></path></g></svg>',1),Cl={class:"docItemDetails"},xl=["onUpdate:modelValue"],Sl=["onUpdate:modelValue"],Al={class:"docItemButtons"},Tl=["onClick"],Ml=Pn(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),Il=[Ml],Pl=["onClick"],Ll=Pn(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),a("path",{d:"M11.5367 8.14941C11.4931 8.1023 11.4403 8.06471 11.3814 8.039C11.3226 8.01329 11.2591 8 11.1949 8C11.1308 8 11.0672 8.01329 11.0084 8.039C10.9496 8.06471 10.8967 8.1023 10.8531 8.14941L10.1696 8.86621C10.0783 8.96287 10.0275 9.09072 10.0275 9.22363C10.0275 9.35654 10.0783 9.48445 10.1696 9.58112L13.4645 12.9863L10.1422 16.4199C10.051 16.5167 10.0001 16.6447 10.0001 16.7778C10.0001 16.9108 10.051 17.0389 10.1422 17.1357L10.8258 17.8525C10.8697 17.8992 10.9226 17.9365 10.9814 17.9619C11.0402 17.9874 11.1036 18.0005 11.1676 18.0005C11.2317 18.0005 11.2951 17.9874 11.3539 17.9619C11.4127 17.9365 11.4656 17.8992 11.5094 17.8525L15.8594 13.3447C15.9498 13.2473 16.0001 13.1193 16.0001 12.9863C16.0001 12.8534 15.9498 12.7254 15.8594 12.6279L11.5367 8.14941Z",fill:"white"})],-1)),kl=[Ll],El={__name:"DocAdmin",setup(i){const e=nn();S(!1);const t=tn(e.updateAdminField,500),n=S({}),o=S(null);function r(){console.log("document",n.value),n.value!=={}&&(console.log(n.value),e.siteProInfo.documents.push(n.value),e.updateAdminField("documents",e.siteProInfo.documents),n.value={})}function s(p){e.siteProInfo.documents.splice(p,1),e.updateAdminField("documents",e.siteProInfo.documents)}function u(p){let P=e.siteProInfo.documents[p].link;window.open(P,"_blank")}const d=qn(),h=S(!1),v=p=>{const P=p.target.files[0];if(!P)return;const O=P.name;console.log("File name:",O);const I=cn(d,`pdfs/${P.name}`),x=xn(I,P);x.on("state_changed",z=>{const M=z.bytesTransferred/z.totalBytes*100;console.log("Upload is "+M+"% done"),o.value=M.toFixed(2)},z=>{console.error("Error during upload: ",z),o.value=null},()=>{Sn(x.snapshot.ref).then(z=>{n.value.link=z,n.value.name=O,console.log("adding doc",n.value),r(n.value),o.value=null,n.value={}})}),h.value=!1};return(p,P)=>(E(),R("div",rl,[a("div",cl,[a("div",ul,[dl,a("input",{type:"file",id:"file",onChange:v,accept:"application/pdf",style:{display:"none"}},null,32),o.value!==null?(E(),R("div",pl," Upload Progress: "+Q(o.value)+"% ",1)):Y("",!0)]),a("div",hl,[a("div",null,[X(a("input",{id:"documents","onUpdate:modelValue":P[0]||(P[0]=O=>n.value.name=O),type:"text",placeholder:"Document Name"},null,512),[[te,n.value.name]])]),a("div",null,[X(a("input",{id:"documents","onUpdate:modelValue":P[1]||(P[1]=O=>
6n.value.link=O),type:"text",placeholder:"Document Link"},null,512),[[te,n.value.link]])]),a("button",{class:"addButton",onClick:P[2]||(P[2]=U(O=>r(n.value),["prevent"]))},"Add")])]),fl,a("div",ml,[X(a("input",{id:"inroomdiningtab","onUpdate:modelValue":P[3]||(P[3]=O=>w(e).siteProInfo.showDocPills=O),onChange:P[4]||(P[4]=O=>w(t)("showDocPills",w(e).siteProInfo.showDocPills)),type:"checkbox",placeholder:"Show Doc Menu Pills"},null,544),[[xt,w(e).siteProInfo.showDocPills]]),gl]),a("div",vl,[X(a("input",{id:"inroomdiningtab","onUpdate:modelValue":P[5]||(P[5]=O=>w(e).siteProInfo.useDocMenuBuilder=O),onChange:P[6]||(P[6]=O=>w(t)("useDocMenuBuilder",w(e).siteProInfo.useDocMenuBuilder)),type:"checkbox",placeholder:"Use Doc Menu Builder"},null,544),[[xt,w(e).siteProInfo.useDocMenuBuilder]]),wl]),a("div",bl,[(E(!0),R(Ne,null,je(w(e).siteProInfo.documents,(O,I)=>(E(),R("div",yl,[_l,a("div",Cl,[X(a("input",{"onUpdate:modelValue":x=>O.name=x,onChange:P[7]||(P[7]=x=>w(t)("documents",w(e).siteProInfo.documents))},null,40,xl),[[te,O.name]]),X(a("input",{"onUpdate:modelValue":x=>O.link=x,onChange:P[8]||(P[8]=x=>w(t)("documents",w(e).siteProInfo.documents))},null,40,Sl),[[te,O.link]])]),a("div",Al,[a("button",{class:"removeButton",onClick:U(x=>s(I),["prevent"])},Il,8,Tl),a("button",{class:"removeButton",onClick:U(x=>u(I),["prevent"])},kl,8,Pl)])]))),256))])]))}},zl=on(El,[["__scopeId","data-v-14398d3e"]]),ro=i=>(hn("data-v-4e593a05"),i=i(),fn(),i),Dl={class:"modeladd"},Rl=ro(()=>a("label",{for:"model-add"},"Add a Model to Hotel",-1)),Ol={class:"modelinputs"},Nl=["onClick"],$l={class:"modelList"},Fl={class:"modelListItem"},Ul={class:"modelBtns"},Bl=ro(()=>a("img",{class:"modelThumb"},null,-1)),Zl={class:"modelName"},jl={class:"modelBtns"},Xl=["onClick"],Vl=ro(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),Hl=[Vl],ql=["onClick"],Gl=ro(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),a("path",{d:"M11.5366 8.14941C11.493 8.1023 11.4401 8.06471 11.3813 8.039C11.3225 8.01329 11.259 8 11.1948 8C11.1306 8 11.0671 8.01329 11.0083 8.039C10.9495 8.06471 10.8966 8.1023 10.853 8.14941L10.1694 8.86621C10.0782 8.96287 10.0274 9.09072 10.0274 9.22363C10.0274 9.35654 10.0782 9.48445 10.1694 9.58112L13.4644 12.9863L10.1421 16.4199C10.0508 16.5167 10 16.6447 10 16.7778C10 16.9108 10.0508 17.0389 10.1421 17.1357L10.8257 17.8525C10.8695 17.8992 10.9225 17.9365 10.9813 17.9619C11.0401 17.9874 11.1034 18.0005 11.1675 18.0005C11.2316 18.0005 11.295 17.9874 11.3538 17.9619C11.4125 17.9365 11.4655 17.8992 11.5093 17.8525L15.8593 13.3447C15.9497 13.2473 15.9999 13.1193 15.9999 12.9863C15.9999 12.8534 15.9497 12.7254 15.8593 12.6279L11.5366 8.14941Z",fill:"white"})],-1)),Yl=[Gl],Wl={__name:"ModelAdmin",setup(i){const e=nn();S(!1);const t=S("");S("");async function n(s){await e.navToMPLink(s.link)}async function o(){let s;console.log("model to visit",t.value);try{console.log("cur sweep bef move",e.currentSweep);let u=e.currentSweep;await e.navToMPLink(t.value),await new Promise(h=>{let v=setInterval(()=>{e.currentSweep!==u&&(clearInterval(v),h())},100)}),console.log("cur sweep aft move",e.currentSweep);const d=await e.mpSdk.Model.getDetails();console.log("model det",d),console.log("Model sid:"+d.sid),console.log("Model name:"+d.name),console.log("Model summary:"+d.summary),s={link:t.value,name:d.name,sid:d.sid,summary:d.summary},console.log("model: ",s),e.siteProInfo.models.push(s),e.updateAdminField("models",e.siteProInfo.models),t.value=""}catch(u){console.error("Error retrieving model details:",u)}}function r(s){e.siteProInfo.models.splice(s,1),e.updateAdminField("models",e.siteProInfo.models)}return(s,u)=>(E(),R("div",Dl,[Rl,a("div",Ol,[X(a("input",{id:"model-add","onUpdate:modelValue":u[0]||(u[0]=d=>t.value=d),type:"text",class:"modeladdInput",placeholder:"Model URL"},null,512),[[te,t.value]]),a("button",{class:"modeladdButton",onClick:U(o,["prevent"])},"Add Model",8,Nl)]),a("div",$l,[(E(!0),R(Ne,null,je(w(e).siteProInfo.models,(d,h)=>(E(),R("div",Fl,[a("div",Ul,[Bl,a("span",Zl,Q(d.name),1)]),a("div",jl,[a("button",{class:"modelRemove",onClick:U(v=>r(h),["prevent"])},Hl,8,Xl),a("button",{class:"modelGo",onClick:v=>n(d)}
6,Yl,8,ql)])]))),256))])]))}},Kl=on(Wl,[["__scopeId","data-v-4e593a05"]]),ie=i=>(hn("data-v-f1a74fc9"),i=i(),fn(),i),Ql={key:0},Jl={class:"locationInfo"},er={class:"locInputField"},tr={key:0},nr=ie(()=>a("label",{for:"mainstart-select"},"Select a MainStart Location: ",-1)),or=["value"],sr={style:{display:"flex","justify-content":"space-between",width:"450px","padding-top":"10px"}},ar=["onClick"],ir=ie(()=>a("div",{class:"locationsFilter"},[a("div",null,"Locations"),a("div",null,"Date Added"),a("div",null,"ASC")],-1)),lr=ie(()=>a("div",{class:"locSpaceBar"},[a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"500",height:"1",viewBox:"0 0 550 1",fill:"none"},[a("path",{opacity:"0.2",d:"M0 0H550V1H0V0Z",fill:"#F2F1ED"})])],-1)),rr={class:"locationList"},cr={style:{display:"flex",gap:"0.5rem"}},ur=["onClick"],dr=ie(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),pr=[dr],hr={key:0,class:"locIconBtn"},fr=ie(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{width:"26",height:"26",rx:"4",fill:"#F19539"}),a("path",{d:"M18.874 11.2041L15.8067 14.5219L17.0049 18.5224C17.0958 18.8224 17.0254 19 16.8481 19C16.761 18.9956 16.6767 18.9683 16.6035 18.9209L13 16.8965L9.44051 18.918C9.36651 18.965 9.28187 18.9927 9.19437 18.9985C9.01572 18.9985 8.94536 18.8227 9.03326 18.521L10.1934 14.5219L7.126 11.2041C6.88435 10.8628 7 10.5844 7.3897 10.5844L10.8966 10.5625L12.6397 7.28276C12.7393 7.09526 12.8682 7 12.9997 7C13.1313 7 13.2604 7.09526 13.3597 7.28276L15.1029 10.5625L18.6097 10.5844C19 10.585 19.1157 10.8628 18.874 11.2041Z",fill:"white"})],-1)),mr=[fr],gr=["onClick"],vr=ie(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00537 18.0004V15.8573L13.363 10.4998L15.506 12.6428L10.1484 18.0004H8.00537Z",fill:"white"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.4346 9.42834L15.5489 8.31396C15.6484 8.21443 15.7665 8.13547 15.8965 8.0816C16.0265 8.02773 16.1658 8 16.3065 8C16.4473 8 16.5866 8.02773 16.7166 8.0816C16.8466 8.13547 16.9647 8.21443 17.0642 8.31396L17.692 8.94181C17.7915 9.04127 17.8705 9.15937 17.9244 9.28937C17.9782 9.41936 18.006 9.55869 18.006 9.6994C18.006 9.84012 17.9782 9.97945 17.9244 10.1094C17.8705 10.2394 17.7915 10.3575 17.692 10.457L16.5776 11.5714L14.4346 9.42834Z",fill:"white"})],-1)),wr=[vr],br=["onClick"],yr=ie(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),a("path",{d:"M11.5366 8.14941C11.493 8.1023 11.4401 8.06471 11.3813 8.039C11.3225 8.01329 11.259 8 11.1948 8C11.1306 8 11.0671 8.01329 11.0083 8.039C10.9495 8.06471 10.8966 8.1023 10.853 8.14941L10.1694 8.86621C10.0782 8.96287 10.0274 9.09072 10.0274 9.22363C10.0274 9.35654 10.0782 9.48445 10.1694 9.58112L13.4644 12.9863L10.1421 16.4199C10.0508 16.5167 10 16.6447 10 16.7778C10 16.9108 10.0508 17.0389 10.1421 17.1357L10.8257 17.8525C10.8695 17.8992 10.9225 17.9365 10.9813 17.9619C11.0401 17.9874 11.1034 18.0005 11.1675 18.0005C11.2316 18.0005 11.295 17.9874 11.3538 17.9619C11.4125 17.9365 11.4655 17.8992 11.5093 17.8525L15.8593 13.3447C15.9497 13.2473 15.9999 13.1193 15.9999 12.9863C15.9999 12.8534 15.9497 12.7254 15.8593 12.6279L11.5366 8.14941Z",fill:"white"})],-1)),_r=[yr],Cr={key:0,class:"locPopOut"},xr={class:"locTitle"},Sr=["onClick"],Ar={class:"pills"},Tr={class:"menu-container"},Mr=["onClick"],Ir={style:{display:"flex","align-items":"center"}
6,width:"8",height:"12",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Pr=ie(()=>a("path",{d:"M4.46338 9.85059C4.50698 9.8977 4.55986 9.93529 4.61868 9.961C4.6775 9.98671 4.74098 10 4.80518 10C4.86937 10 4.93288 9.98671 4.9917 9.961C5.05052 9.93529 5.10337 9.8977 5.14697 9.85059L5.83057 9.13379C5.92179 9.03713 5.97263 8.90928 5.97263 8.77637C5.97263 8.64346 5.92179 8.51555 5.83057 8.41888L2.53558 5.01367L5.85788 1.58008C5.94916 1.48327 6 1.35529 6 1.22223C6 1.08917 5.94916 0.961129 5.85788 0.864319L5.17429 0.147522C5.13045 0.100804 5.0775 0.0635404 5.01871 0.0380859C4.95992 0.0126313 4.89655 -0.000488378 4.83249 -0.000488383C4.76843 -0.000488389 4.70503 0.0126313 4.64624 0.0380858C4.58745 0.0635403 4.53453 0.100804 4.49069 0.147522L0.140687 4.65527C0.0502858 4.75273 6.14827e-05 4.88074 6.14711e-05 5.01367C6.14595e-05 5.1466 0.0502858 5.27461 0.140686 5.37207L4.46338 9.85059Z",fill:"white"},null,-1)),Lr=[Pr],kr={style:{display:"flex","align-items":"center"},width:"8",height:"12",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Er=ie(()=>a("path",{d:"M1.53662 0.149414C1.49302 0.1023 1.44014 0.0647104 1.38132 0.0390015C1.3225 0.0132926 1.25902 0 1.19482 0C1.13063 0 1.06712 0.0132926 1.0083 0.0390015C0.949481 0.0647104 0.896627 0.1023 0.853027 0.149414L0.169434 0.866211C0.0782118 0.962872 0.0273743 1.09072 0.0273743 1.22363C0.0273743 1.35654 0.0782118 1.48445 0.169434 1.58112L3.46442 4.98633L0.14212 8.41992C0.0508384 8.51673 0 8.64471 0 8.77777C0 8.91083 0.0508384 9.03887 0.14212 9.13568L0.825714 9.85248C0.869548 9.8992 0.922505 9.93646 0.981293 9.96191C1.04008 9.98737 1.10345 10.0005 1.16751 10.0005C1.23157 10.0005 1.29497 9.98737 1.35376 9.96191C1.41255 9.93646 1.46547 9.8992 1.50931 9.85248L5.85931 5.34473C5.94971 5.24727 5.99994 5.11926 5.99994 4.98633C5.99994 4.8534 5.94971 4.72538 5.85931 4.62793L1.53662 0.149414Z",fill:"white"},null,-1)),zr=[Er],Dr=ie(()=>a("div",{class:"adminSpaceBar"},[a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"500",height:"1",viewBox:"0 0 550 1",fill:"none"},[a("path",{opacity:"0.2",d:"M0 0H550V1H0V0Z",fill:"#F2F1ED"})])],-1)),Rr={key:0,class:"locPopOutInfo"},Or={key:0,class:"locInputField"},Nr={for:"menu-select"},$r=["onUpdate:modelValue","onChange"],Fr=["value"],Ur={key:1},Br={class:"locInputField"},Zr=ie(()=>a("label",{for:"breakoutAirwalls"},"Breakout (Airwall Option)",-1)),jr=["onUpdate:modelValue","onChange"],Xr=ie(()=>a("option",{value:""},null,-1)),Vr=ie(()=>a("option",{value:"Ballrooms"},"Combined Rooms",-1)),Hr=ie(()=>a("option",{value:"Salons"},"Single Room",-1)),qr=[Xr,Vr,Hr],Gr={key:2,class:"locInputField"},Yr={for:"complex-select"},Wr=["onUpdate:modelValue","onChange"],Kr=["value"],Qr={class:"locInputField"},Jr=ie(()=>a("label",{for:"locations"},"Name",-1)),ec=["onUpdate:modelValue","onInput"],tc={class:"locInputField"},nc=ie(()=>a("label",{for:"locations"},"Order",-1)),oc=["onUpdate:modelValue","onInput"],sc={class:"locInputField"},ac=ie(()=>a("label",{for:"info"},"Space Info",-1)),ic=["onUpdate:modelValue","onInput"],lc={class:"locInputField"},rc=ie(()=>a("label",{for:"amenities"},"Amenities",-1)),cc=["onUpdate:modelValue","onInput"],uc={class:"locInputField"},dc=ie(()=>a("label",{for:"more-info"},"More info (optional)",-1)),pc=["onUpdate:modelValue","onInput"],hc={class:"locInputField"},fc=ie(()=>a("label",{for:"pro-tip"},"Pro Tip (optional)",-1)),mc=["onUpdate:modelValue","onInput"],gc={class:"locInputField"},vc=ie(()=>a("label",{for:"menu-link-on-click"},"Room Fact Link",-1)),wc=["onUpdate:modelValue","onInput"],bc={class:"locInputField"},yc=ie(()=>a("label",{for:"menu-link-on-click"},"Menu Link",-1)),_c=["onUpdate:modelValue","onInput"],Cc={key:1,class:"locPopOutInfo"},xc={class:"locInputField"},Sc={style:{display:"flex","flex-direction":"row","justify-content":"space-between","padding-top":"10px","padding-right":"10px"}},Ac=["onClick"],Tc=["onClick"],Mc={style:{display:"flex","flex-direction":"row",gap:"0.5rem","align-items":"center"}},Ic=["onClick"],Pc=ie(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),Lc=[Pc],kc=["onClick"],Ec=ie(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00537 18.0004V15.8573L13.363 10.4998L15.506 12.6428L10.1484 18.0004H8.00537Z",fill:"white"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.4346 9.42834L15.5489 8.31396C15.6484 8.21443 15.7665 8.13547 15.89
665 8.0816C16.0265 8.02773 16.1658 8 16.3065 8C16.4473 8 16.5866 8.02773 16.7166 8.0816C16.8466 8.13547 16.9647 8.21443 17.0642 8.31396L17.692 8.94181C17.7915 9.04127 17.8705 9.15937 17.9244 9.28937C17.9782 9.41936 18.006 9.55869 18.006 9.6994C18.006 9.84012 17.9782 9.97945 17.9244 10.1094C17.8705 10.2394 17.7915 10.3575 17.692 10.457L16.5776 11.5714L14.4346 9.42834Z",fill:"white"})],-1)),zc=[Ec],Dc=["onClick"],Rc=In('<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-f1a74fc9><rect opacity="0.3" width="26" height="26" rx="4" fill="white" data-v-f1a74fc9></rect><path fill-rule="evenodd" clip-rule="evenodd" d="M8.00537 21.0004V18.8573L13.363 13.4998L15.506 15.6428L10.1484 21.0004H8.00537Z" fill="white" data-v-f1a74fc9></path><path fill-rule="evenodd" clip-rule="evenodd" d="M14.4346 12.4283L15.5489 11.314C15.6484 11.2144 15.7665 11.1355 15.8965 11.0816C16.0265 11.0277 16.1658 11 16.3065 11C16.4473 11 16.5866 11.0277 16.7166 11.0816C16.8466 11.1355 16.9647 11.2144 17.0642 11.314L17.692 11.9418C17.7915 12.0413 17.8705 12.1594 17.9244 12.2894C17.9782 12.4194 18.006 12.5587 18.006 12.6994C18.006 12.8401 17.9782 12.9795 17.9244 13.1094C17.8705 13.2394 17.7915 13.3575 17.692 13.457L16.5776 14.5714L14.4346 12.4283Z" fill="white" data-v-f1a74fc9></path><path d="M3.52841 7V2.63636H4.05682V6.53125H6.08523V7H3.52841ZM8.20739 7.06818C7.89205 7.06818 7.62003 6.99858 7.39134 6.85938C7.16406 6.71875 6.98864 6.52273 6.86506 6.27131C6.7429 6.01847 6.68182 5.72443 6.68182 5.3892C6.68182 5.05398 6.7429 4.75852 6.86506 4.50284C6.98864 4.24574 7.16051 4.04545 7.38068 3.90199C7.60227 3.7571 7.8608 3.68466 8.15625 3.68466C8.3267 3.68466 8.49503 3.71307 8.66122 3.76989C8.82741 3.8267 8.97869 3.91903 9.11506 4.04688C9.25142 4.1733 9.36009 4.34091 9.44105 4.54972C9.52202 4.75852 9.5625 5.01562 9.5625 5.32102V5.53409H7.03977V5.09943H9.05114C9.05114 4.91477 9.0142 4.75 8.94034 4.60511C8.8679 4.46023 8.7642 4.34588 8.62926 4.26207C8.49574 4.17827 8.33807 4.13636 8.15625 4.13636C7.95597 4.13636 7.78267 4.18608 7.63636 4.28551C7.49148 4.38352 7.37997 4.51136 7.30185 4.66903C7.22372 4.8267 7.18466 4.99574 7.18466 5.17614V5.46591C7.18466 5.71307 7.22727 5.92259 7.3125 6.09446C7.39915 6.26491 7.51918 6.39489 7.67259 6.48438C7.82599 6.57244 8.00426 6.61648 8.20739 6.61648C8.33949 6.61648 8.45881 6.59801 8.56534 6.56108C8.6733 6.52273 8.76634 6.46591 8.84446 6.39062C8.92259 6.31392 8.98295 6.21875 9.02557 6.10511L9.51136 6.24148C9.46023 6.40625 9.37429 6.55114 9.25355 6.67614C9.13281 6.79972 8.98366 6.89631 8.80611 6.96591C8.62855 7.03409 8.42898 7.06818 8.20739 7.06818ZM11.6484 8.29545C11.4055 8.29545 11.1967 8.2642 11.022 8.2017C10.8473 8.14062 10.7017 8.05966 10.5852 7.95881C10.4702 7.85938 10.3786 7.75284 10.3104 7.6392L10.7109 7.35795C10.7564 7.41761 10.8139 7.4858 10.8835 7.5625C10.9531 7.64062 11.0483 7.7081 11.169 7.76491C11.2912 7.82315 11.451 7.85227 11.6484 7.85227C11.9126 7.85227 12.1307 7.78835 12.3026 7.66051C12.4744 7.53267 12.5604 7.33239 12.5604 7.05966V6.39489H12.5178C12.4808 6.45455 12.4283 6.52841 12.3601 6.61648C12.2933 6.70312 12.1967 6.78054 12.0703 6.84872C11.9453 6.91548 11.7763 6.94886 11.5632 6.94886C11.299 6.94886 11.0618 6.88636 10.8516 6.76136C10.6428 6.63636 10.4773 6.45455 10.3551 6.21591C10.2344 5.97727 10.174 5.6875 10.174 5.34659C10.174 5.01136 10.233 4.71946 10.3509 4.47088C10.4688 4.22088 10.6328 4.0277 10.843 3.89134C11.0533 3.75355 11.2962 3.68466 11.5717 3.68466C11.7848 3.68466 11.9538 3.72017 12.0788 3.79119C12.2053 3.8608 12.3018 3.94034 12.3686 4.02983C12.4368 4.1179 12.4893 4.19034 12.5263 4.24716H12.5774V3.72727H13.0632V7.09375C13.0632 7.375 12.9993 7.60369 12.8714 7.77983C12.745 7.95739 12.5746 8.08736 12.3601 8.16974C12.147 8.25355 11.9098 8.29545 11.6484 8.29545ZM11.6314 6.49716C11.8331 6.49716 12.0036 6.45099 12.1428 6.35866C12.282 6.26634 12.3878 6.13352 12.4602 5.96023C12.5327 5.78693 12.5689 5.57955 12.5689 5.33807C12.5689 5.10227 12.5334 4.89418 12.4624 4.71378C12.3913 4.53338 12.2862 4.39205 12.147 4.28977C12.0078 4.1875 11.8359 4.13636 11.6314 4.13636C11.4183 4.13636 11.2408 4.19034 11.0987 4.2983C10.9581 4.40625 10.8523 4.55114 10.7812 4.73295C10.7116 4.91477 10.6768 5.11648 10.6768 5.33807C10.6768 5.56534 10.7124 5.76634 10.7834 5.94105C10.8558 6.11435 10.9624 6.25071 11.103 6.35014C11.245 6.44815 11.4212 6.49716 11.6314 6.49716ZM14.9467 7.0767C14.7393 7.0767 14.5511 7.03764 14.3821 6.95952C14.2131 6.87997 14.0788 6.76562 13.9794 6.61648C13.88 6.46591 13.8303 6.28409 13.8303 6.07102C13.8303 5.88352 13.8672 5.73153 13.9411 5.61506C14.0149 5.49716 14.1136 5.40483 14.2372 5.33807C14.3608 5.27131 14.4972 5.22159 14.6463 5.18892C14.7969 5.15483 14.9482 5.12784 15.1001 5.10795C15.299 5.08239 15.4602 5.06321 15.5838 5.05043C15.7088 5.03622 15.7997 5.01278 15.8565 4.98011C15.9148 4.94744 15.9439 4.89062 15.9439 4.80966V4.79261C15.9439 4.58239 15.8864 4.41903 15.7713 4.30256C15.6577 4.18608 15.4851 4.12784 15.2536 4.12784C15.0135 4.12784 14.8253 4.1804 14.6889 4.28551C14.5526 4.39062 14.4567 4.50284 14.4013 4.62216L13.924 4.4517C14.0092 4.25284 14.1229 4.09801 14.2649 3.98722C14.4084 3.875 14.5646 3.79687 14.7337 3.75284C14.9041 3.70739 15.0717 3.68466 15.2365 3.68466C15.3416 3.68466 15.4624 3.69744 15.5987 3.72301C15.7365 3.74716 15.8693 3.79759 15.9972 3.87429C16.1264 3.95099 16.2337 4.06676 16.3189 4.22159C16.4041 4.37642 16.4467 4.58381 16.4467 4.84375V7H15.9439V6.55682H15.9183C15.8842 6.62784 15.8274 6.70384 15.7479 6.7848C15.6683 6.86577 15.5625 6.93466 15.4304 6.99148C15.2983 7.0483 15.1371 7.0767 14.9467 7.0767ZM15.0234 6.625C15.2223 6.625 15.3899 6.58594 15.5263 6.50781C15.6641 6.42969 15.7678 6.32884 15.8374 6.20526C15.9084 6.08168 15.9439 5.9517 15.9439 5.81534V5.35511C15.9226 5.38068 15.8757 5.40412 15.8033 5.42543C15.7322 5.44531 15.6499 5.46307 15.5561 5.47869C15.4638 5.4929 15.3736 5.50568 15.2855 5.51705C15.1989 5.52699 15.1286 5.53551 15.0746 5.54261C14.9439 5.55966 14.8217 5.58736 14.7081 5.62571C14.5959 5.66264 14.505 5.71875 14.4354 5.79403C14.3672 5.8679 14.3331 5.96875 14.3331 6.09659C14.3331 6.27131 14.3977 6.40341 14.527 6.4929C14.6577 6.58097 14.8232 6.625 15.0234 6.625ZM18.6941 7.06818C18.3873 7.06818 18.123 6.99574 17.9015 6.85085C17.6799 6.70597 17.5094 6.50639 17.3901 6.25213C17.2708 5.99787 17.2111 5.70739 17.2111 5.38068C17.2111 5.0483 17.2722 4.75497 17.3944 4.50071C17.5179 4.24503 17.6898 4.04545 17.91 3.90199C18.1316 3.7571 18.3901 3.68466 18.6855 3.68466C18.9157 3.68466 19.123 3.72727 19.3077 3.8125C19.4924 3.89773 19.6436 4.01705 19.7615 4.17045C19.8794 4.32386 19.9526 4.50284 19.981 4.70739H19.4782C19.4398 4.55824 19.3546 4.42614 19.2225 4.31108C19.0918 4.1946 18.9157 4.13636 18.6941 4.13636C18.498 4.13636 18.3262 4.1875 18.1784 4.28977C18.0321 4.39062 17.9178 4.53338 17.8354 4.71804C17.7544 4.90128 17.714 5.11648 17.714 5.36364C17.714 5.61648 17.7537 5.83665 17.8333 6.02415C17.9142 6.21165 18.0279 6.35724 18.1742 6.46094C18.3219 6.56463 18.4952 6.61648 18.6941 6.61648C18.8248 6.61648 18.9434 6.59375 19.0499 6.5483C19.1564 6.50284 19.2466 6.4375 19.3205 6.35227C19.3944 6.26705 19.4469 6.16477 19.4782 6.04545H19.981C19.9526 6.23864 19.8823 6.412
664 19.7701 6.56747C19.6593 6.72088 19.5123 6.84304 19.329 6.93395C19.1472 7.02344 18.9355 7.06818 18.6941 7.06818ZM21.04 8.22727C20.9547 8.22727 20.8787 8.22017 20.812 8.20597C20.7452 8.19318 20.699 8.1804 20.6735 8.16761L20.8013 7.72443C20.9235 7.75568 21.0314 7.76705 21.1252 7.75852C21.2189 7.75 21.302 7.7081 21.3745 7.63281C21.4483 7.55895 21.5158 7.43892 21.5769 7.27273L21.6706 7.01705L20.4604 3.72727H21.0059L21.9093 6.33523H21.9434L22.8468 3.72727H23.3922L22.003 7.47727C21.9405 7.64631 21.8631 7.78622 21.7708 7.89702C21.6784 8.00923 21.5712 8.09233 21.449 8.14631C21.3283 8.20028 21.1919 8.22727 21.04 8.22727Z" fill="white" data-v-f1a74fc9></path></svg>',1),Oc=[Rc],Nc={key:0},$c={style:{"font-size":"14px"}},Fc=["onClick"],Uc=["onClick"],Bc=ie(()=>a("label",{for:"centerx"},"Left / Right",-1)),Zc=["onClick"],jc=["onClick"],Xc=["onClick"],Vc=["onClick"],Hc=ie(()=>a("label",{for:"centery"},"Floor / Box Height",-1)),qc=["onClick"],Gc=["onClick"],Yc=["onClick"],Wc=["onClick"],Kc=ie(()=>a("label",{for:"centerz"},"Up / Down",-1)),Qc=["onClick"],Jc=["onClick"],eu=["onClick"],tu=["onClick"],nu=ie(()=>a("label",{for:"sizex"}," Width ",-1)),ou=["onClick"],su=["onClick"],au=["onClick"],iu=["onClick"],lu=ie(()=>a("label",{for:"size.z"}," Length",-1)),ru=["onClick"],cu=["onClick"],uu=["onClick"],du=["onClick"],pu=ie(()=>a("label",{for:" orientation.yaw"}," Yaw",-1)),hu=["onClick"],fu=["onClick"],mu={key:1},gu=["onClick"],vu=["onClick"],wu=["onClick"],bu={class:"boxButtons"}
6,yu=["onClick"],_u=["onClick"],Cu=["onClick"],xu=["src"],Su={key:2,class:"locPopOutInfo"},Au={class:"locInputField"},Tu=ie(()=>a("label",{for:"cta-button-display-text"},"CTA Text",-1)),Mu=["onUpdate:modelValue","onInput"],Iu={class:"locInputField"},Pu=ie(()=>a("label",{for:"cta-email-on-click"},"CTA Email",-1)),Lu=["onUpdate:modelValue","onInput"],ku={class:"locInputField"},Eu=ie(()=>a("label",{for:"cta-link-on-click"},"CTA Link",-1)),zu=["onUpdate:modelValue","onInput"],Du={class:"locCheckField"},Ru=["onUpdate:modelValue","onChange"],Ou=ie(()=>a("label",{for:"cta-link-newtab"},"CTA Link New tab",-1)),Nu={class:"locCheckField"},$u=["onUpdate:modelValue","onChange"],Fu=ie(()=>a("label",{for:"cta-link-newtab"},"CTA Location OverRide",-1)),Uu={key:0,class:"ctaOverideBox"},Bu={class:"locInputField2"},Zu=ie(()=>a("label",{for:"cta-button-display-text"},"CTA Override dialog Text",-1)),ju=["onUpdate:modelValue","onInput"],Xu={class:"locInputField3"},Vu={class:"locContactField"},Hu=["onUpdate:modelValue","onChange"],qu=In('<option value="text" data-v-f1a74fc9>text</option><option value="number" data-v-f1a74fc9>number</option><option value="email" data-v-f1a74fc9>email</option><option value="tel" data-v-f1a74fc9>telephone</option><option value="date" data-v-f1a74fc9>date</option>',5),Gu=[qu],Yu=["onClick"],Wu=ie(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),Ku=[Wu],Qu={key:0,class:"form-group"},Ju={key:0,open:""},ed={method:"dialog"},td=ie(()=>a("h2",null,"Add a custom field to space override contact",-1)),nd=["onClick"],od={key:3,class:"locPopOutInfo"},sd={class:"locInputField"},ad=ie(()=>a("label",{for:"cvent-3d"},"CVENT 3D/Pin Link (requires a max set box)",-1)),id=["onUpdate:modelValue","onInput"],ld={class:"locInputField"},rd=ie(()=>a("label",{for:"cvent-3d"},"CVENT FloorId",-1)),cd=["onUpdate:modelValue","onInput"],ud={class:"locInputField"},dd=ie(()=>a("label",{for:"cvent-3d"},"CVENT BuildingId",-1)),pd=["onUpdate:modelValue","onInput"],hd={class:"locInputField"},fd=ie(()=>a("label",{for:"cvent-3d"},"CVENT RoomId",-1)),md=["onUpdate:modelValue","onInput"],gd={class:"locInputField"},vd=ie(()=>a("label",{for:"cvent-3d"},"CVENT Floorplan Thumbnail",-1)),wd=["onUpdate:modelValue","onInput"],bd={class:"locInputField"},yd=ie(()=>a("label",{for:"cvent-3d"},"CVENT Floorplan Download",-1)),_d=["onUpdate:modelValue","onInput"],Cd={style:{display:"flex","flex-direction":"row","justify-content":"space-between",width:"420px"}},xd=ie(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00537 18.0004V15.8573L13.363 10.4998L15.506 12.6428L10.1484 18.0004H8.00537Z",fill:"white"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.4346 9.42834L15.5489 8.31396C15.6484 8.21443 15.7665 8.13547 15.8965 8.0816C16.0265 8.02773 16.1658 8 16.3065 8C16.4473 8 16.5866 8.02773 16.7166 8.0816C16.8466 8.13547 16.9647 8.21443 17.0642 8.31396L17.692 8.94181C17.7915 9.04127 17.8705 9.15937 17.9244 9.28937C17.9782 9.41936 18.006 9.55869 18.006 9.6994C18.006 9.84012 17.9782 9.97945 17.9244 10.1094C17.8705 10.2394 17.7915 10.3575 17.692 10.457L16.5776 11.5714L14.4346 9.42834Z",fill:"white"})],-1)),Sd=[xd],Ad=ie(()=>a("div",{class:"adminSpaceBar"},[a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"500",height:"1",viewBox:"0 0 550 1",fill:"none"},[a("path",{opacity:"0.2",d:"M0 0H550V1H0V0Z",fill:"#F2F1ED"})])],-1)),Td={key:0},Md={for:"diagramType.label"},Id={class:"capItemDetails"},Pd=["onUpdate:modelValue","onInput"],Ld=["onUpdate:modelValue","onInput"],kd=ie(()=>a("h3",null,"Max Sets Capacity Chart",-1)),Ed=ie(()=>a("div",{class:"adminSpaceBar"},[a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"500",height:"1",viewBox:"0 0 550 1",fill:"none"},[a("path",{opacity:"0.2",d:"M0 0H550V1H0V0Z",fill:"#F2F1ED"})])],-1)),zd={class:"locListItem"},Dd={style:{display:"flex",gap:"0.5rem"}},Rd=["onClick"],Od=ie(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),Nd=[Od],$d=["onClick"],Fd=ie(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00537 18.0004V15.8573L13.363 10.4998L15.506 12.6428L10.1484 18.0004H8.00537Z",fill:"white"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.4346 9.42834L15.5489 8.31396C15.6484 8.21443 15.7665 8.13547 15.89
665 8.0816C16.0265 8.02773 16.1658 8 16.3065 8C16.4473 8 16.5866 8.02773 16.7166 8.0816C16.8466 8.13547 16.9647 8.21443 17.0642 8.31396L17.692 8.94181C17.7915 9.04127 17.8705 9.15937 17.9244 9.28937C17.9782 9.41936 18.006 9.55869 18.006 9.6994C18.006 9.84012 17.9782 9.97945 17.9244 10.1094C17.8705 10.2394 17.7915 10.3575 17.692 10.457L16.5776 11.5714L14.4346 9.42834Z",fill:"white"})],-1)),Ud=[Fd],Bd={class:"locListItem"},Zd={style:{display:"flex",gap:"0.5rem"}},jd=ie(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00537 18.0004V15.8573L13.363 10.4998L15.506 12.6428L10.1484 18.0004H8.00537Z",fill:"white"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.4346 9.42834L15.5489 8.31396C15.6484 8.21443 15.7665 8.13547 15.8965 8.0816C16.0265 8.02773 16.1658 8 16.3065 8C16.4473 8 16.5866 8.02773 16.7166 8.0816C16.8466 8.13547 16.9647 8.21443 17.0642 8.31396L17.692 8.94181C17.7915 9.04127 17.8705 9.15937 17.9244 9.28937C17.9782 9.41936 18.006 9.55869 18.006 9.6994C18.006 9.84012 17.9782 9.97945 17.9244 10.1094C17.8705 10.2394 17.7915 10.3575 17.692 10.457L16.5776 11.5714L14.4346 9.42834Z",fill:"white"})],-1)),Xd=[jd],Vd={key:0},Hd=["onClick"],qd=["onClick"],Gd=["onClick"],Yd=["onClick"],Wd={key:1,class:"",style:{display:"flex","flex-direction":"column"}},Kd=["onClick"],Qd=ie(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{opacity:"0.3",width:"26",height:"26",rx:"4",fill:"white"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00537 18.0004V15.8573L13.363 10.4998L15.506 12.6428L10.1484 18.0004H8.00537Z",fill:"white"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.4346 9.42834L15.5489 8.31396C15.6484 8.21443 15.7665 8.13547 15.8965 8.0816C16.0265 8.02773 16.1658 8 16.3065 8C16.4473 8 16.5866 8.02773 16.7166 8.0816C16.8466 8.13547 16.9647 8.21443 17.0642 8.31396L17.692 8.94181C17.7915 9.04127 17.8705 9.15937 17.9244 9.28937C17.9782 9.41936 18.006 9.55869 18.006 9.6994C18.006 9.84012 17.9782 9.97945 17.9244 10.1094C17.8705 10.2394 17.7915 10.3575 17.692 10.457L16.5776 11.5714L14.4346 9.42834Z",fill:"white"})],-1)),Jd=[Qd],e1={key:0,style:{padding:"15px"}},t1=ie(()=>a("label",null,"Skip Set",-1)),n1=["onChange","onUpdate:modelValue"],o1=ie(()=>a("label",null,"Show in Large Room",-1)),s1=["onChange","onUpdate:modelValue"],a1=ie(()=>a("label",null,"Show in Small Room",-1)),i1=["onChange","onUpdate:modelValue"],l1=ie(()=>a("label",null,"Aisle Horizontal",-1)),r1=["onChange","onUpdate:modelValue"],c1=ie(()=>a("label",null,"Aisle Vertical",-1)),u1=["onChange","onUpdate:modelValue"],d1=ie(()=>a("label",null,"Column Per Block",-1)),p1=["onChange","onUpdate:modelValue"],h1=ie(()=>a("label",null,"Row Per Block",-1)),f1=["onChange","onUpdate:modelValue"],m1=ie(()=>a("label",null,"Object Space Horizontal",-1)),g1=["onChange","onUpdate:modelValue"],v1=ie(()=>a("label",null,"Object Space Vertical",-1)),w1=["onChange","onUpdate:modelValue"],b1=ie(()=>a("label",null,"Room Perimeter",-1)),y1=["onChange","onUpdate:modelValue"],_1=["onClick"],C1=["onClick"],x1={__name:"LocationAdmin2",setup(i){const e=nn(),t=Ja(),n=Bn(_n,"spaces"),o=S("createdAt"),r=S("asc");s(),Mo(o,s),Mo(r,s);function s(){const F=ai(n,ii(o.value,r.value));js(F,L=>{e.spaceInfo=L.docs.map(c=>({...c.data(),id:c.id}))})}const u=tn(e.updateField,500);tn(e.updateAdminField,500),tn(e.updateMultiFields,500),S(!1);const d=S(!1),h=S(!1);S("");const v=S(!1);S(null),S(),S(""),S(""),S({}),S(""),S(""),S(""),S(""),S(""),S(""),S(!1),S(""),S(""),S(""),S(""),S([]),S(""),S({}),S();const p=S(),P=S(null);S("");const O=S(""),I=S(["dining","guest rooms","event space","amenities"]),x={width:1280,height:720},z={mattertags:!1,sweeps:!0};S(!0);const M=S([{name:"SMART BAR"},{name:"BOXES"},{name:"CTA"},{name:"CAPACITIES"}]);function D(){e.locMenuPillIndex<M.value.length-1?e.locMenuPillIndex=e.locMenuPillIndex+1:e.locMenuPillIndex=0,console.log("increment",e.locMenuPillIndex,"len",M.value.length)}function j(){e.locMenuPillIndex>0?e.locMenuPillIndex=e.locMenuPillIndex-1:e.locMenuPillIndex=M.value.length-1,console.log("decrement",e.locMenuPillIndex,"len",M.value.length)}const y=S(null),oe=85,Ae=Cn(()=>e.locMenuPillIndex*oe*.5);function be(F){e.locMenuPillIndex=F,ze()}function ze(){const F=M[e.locMenuPillIndex];if(F&&y.value){const L=F.getBoundingClientRect(),c=y.value.getBoundingClientRect();(L.left<c.left||L.right>c.right)&&(y.value.scrollLeft=F.offsetLeft)}}S();async function pe(F){await $([]);try{const L=await e.mpSdk.Renderer.takeScreenShot(x,z);if(O.value=L,!L.startsWith("data:image/"))throw new Error("Invalid screenshot URI");const c=atob(L.split(",")[1]),l=L.split(",")[0].split(":")[1].split(";")[0],b=new ArrayBuffer(c.length),k=new Uint8Array(b);for(let _=0;_<c.length;_++)k[_]=c.charCodeAt(_);const T=new Blob([b],{type:l});if(T.size===0)throw new Error("Generated Blob is empty");const f=qn(),g=cn(f,`images/spacethumb/${F}_thumb.jpg`);console.log("Uploading thumbnail to:",`images/spacethumb/${F}_thumb.jpg`),xn(g,T).on("state_changed",_=>{const A=_.bytesTransferred/_.totalBytes*100;console.log(`Upload is ${A}% done`)},_=>{console.error("Error uploading screenshot:",_.serverResponse||_.message)},async()=>{try{const _=await Sn(g);console.log("Download URL:",_),await e.updateField(F,"thumb",_),console.log("Screenshot uploaded to Firebase Storage and URL saved to Firestore!")}catch(_){console.error("Error saving download URL to Firestore:",_)}})}catch(L){console.error("Error capturing or uploading screenshot:",L)}}S(null),S(null),S(!1),S(),S(null),S(null),S(null),S(null),S(),Cn(()=>e.siteProInfo.walls.filter(F=>F.model===e.selectedModel));function ye(){console.log("box dimensions are:",t.diagramBox,"node is:",e.diagramtemplatenode)}function ue(){e.myBoxControl.inputs.mode="rotate",e.myBoxControl.inputs.showX=!1,e.myBoxControl.inputs.showY=!0,e.myBoxControl.inputs.showZ=!1}function De(){e.myBoxControl.inputs.mode="scale",e.myBoxControl.inputs.showX=!0,e.myBoxControl.inputs.showY=!0,e.myBoxControl.inputs.showZ=!0}function _e(){e.myBoxControl.inputs.mode="translate",e.myBoxControl.inputs.showX=!0,e.myBoxControl.inputs.showY=!0,e.myBoxControl.inputs.showZ=!0}
6async function de(F){if(t.editingArea=await t.defineArea(65280,.7),t.areaSubmitted=!1,await t.visualBox(t.editingArea.startX,t.editingArea.startZ,t.editingArea.endX,t.editingArea.endZ,t.editingArea.startY,t.editingArea.endY,!1,"0x00ff00",.85,{x:0,y:0,z:0,w:1}),t.editingArea.quat={x:e.diagramtemplatenode.quaternion.x,y:e.diagramtemplatenode.quaternion.y,z:e.diagramtemplatenode.quaternion.z,w:e.diagramtemplatenode.quaternion.w},t.editingArea.euler=ve(t.editingArea.quat.x,t.editingArea.quat.y,t.editingArea.quat.z,t.editingArea.quat.w),console.log("setting area",e.diagramtemplatenode,t.editingArea),await new Promise(c=>{const l=setInterval(()=>{t.areaSubmitted?(console.log("old area",t.editingArea,"diagramNode",e.diagramtemplatenode),console.log("box dimensions are:",e.diagramtemplatenode.scale,e.diagramtemplatenode.position),t.editingArea.startX=e.diagramtemplatenode.position.x-e.diagramtemplatenode.scale.x/2,t.editingArea.endX=e.diagramtemplatenode.position.x+e.diagramtemplatenode.scale.x/2,t.editingArea.startZ=e.diagramtemplatenode.position.z-e.diagramtemplatenode.scale.z/2,t.editingArea.endZ=e.diagramtemplatenode.position.z+e.diagramtemplatenode.scale.z/2,t.editingArea.widthX=Math.abs(t.editingArea.startX-t.editingArea.endX),t.editingArea.depthZ=Math.abs(t.editingArea.startZ-t.editingArea.endZ),t.editingArea.quat={x:e.diagramtemplatenode.quaternion.x,y:e.diagramtemplatenode.quaternion.y,z:e.diagramtemplatenode.quaternion.z,w:e.diagramtemplatenode.quaternion.w},console.log("new area",t.editingArea),clearInterval(l),c(!0)):console.log("interval update box")},500)}),t.areaSubmitted){await t.visualBox(t.editingArea.startX,t.editingArea.startZ,t.editingArea.endX,t.editingArea.endZ,t.editingArea.startY,t.editingArea.endY,!0,"0x00ff00",.5,t.editingArea.quat);let c=t.editingArea,l=!1;if(l=window.confirm("Is the area correct?  If not cancel and draw again."),l){e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null;let b=prompt("Pick a default direction to display, (N, S, E, W)","N"),k=window.confirm("Is the Ceiling Tall? Confirm to use Risers, cancel to skip risers.");const T=["N","S","E","W"];for(;!b;){const f=prompt("Pick a default direction to display, (N, S, E, W)","N");T.includes(f.toUpperCase())?b=f.toUpperCase():alert("Invalid direction. Please enter one of the following: N, S, E, W.")}console.log(`Area is correct and the default direction is: ${b}`),console.log("maxSetArea will be:",c),e.updateField(F.id,"maxSetArea",c),e.updateField(F.id,"maxSetDefaultDir",b),e.updateField(F.id,"maxSetTallCeiling",k),c.widthX*c.depthZ*10.76391042,console.log("updated capacities",e.spaceInfo[e.selectedSpace].capacities)}else console.log("Area is not correct. Please draw again."),e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null;t.areaModal=!1,t.areaSubmitted=!1,e.showAdminPanel=!0}}async function G(F){if(window.confirm("Are you sure you want to delete the Max Sets?")){let L=null,c={exhibit:F.capacities.exhibit??null,theater:F.capacities.theater??null,classroom2per6:F.capacities.classroom2per6??null,banquet:F.capacities.banquet??null,rounds10:F.capacities.rounds10??null,hollowSquare:F.capacities.hollowSquare??null,rounds6:F.capacities.rounds6??null,conference:F.capacities.conference??null,uShape:F.capacities.uShape??null,reception:F.capacities.reception??null};e.updateField(F.id,"capacities",c),e.updateField(F.id,"maxSetArea",L)}}const xe=(F,L)=>{if(!F.setTemplate||!F.setTemplate[L]){const c=t.setTemplates.find(l=>l.diagramType===L);F.setTemplate||(F.setTemplate={}),F.setTemplate[L]=c?{...c,skipSet:!1}:{skipSet:!1,largeRoomType:!1,smallRoomType:!1,aisleHor:0,aisleVert:0,objSpaceHori:0,objSpaceVert:0,objPerBlockHori:0,objPerBlockVert:0,serPer:0}}return F.setTemplate[L]},Te=S(1),se=S();async function $(F){let L=[];for(let l=0;l<F.length;l++){F[l].orientation||(F[l].orientation={yaw:0,pitch:0,roll:0});let b=await e.mpSdk.Sensor.createSource(e.mpSdk.Sensor.SourceType.BOX,{center:{x:F[l].center.x,y:F[l].center.y,z:F[l].center.z},size:{x:F[l].size.x,y:F[l].size.y,z:F[l].size.z},orientation:{yaw:F[l].orientation.yaw*-1,pitch:F[l].orientation.pitch,roll:F[l].orientation.roll}});console.log("box created",l,F[l]),L.push(b)}const c=await e.mpSdk.Sensor.createSensor(e.mpSdk.Sensor.SensorType.CAMERA);console.log("sensor created",c),c.addSource(...L),c.showDebug(!0)}S(0),S(0),S(0);async function ee(){e.debugger=!e.debugger;const F=await e.mpSdk.Model.getDetails();if(console.log("Model sid:"+F.sid),e.debugger){let L=e.spaceInfo.filter(l=>l.space===F.sid);console.log("filteredSpaces",L);let c=L.flatMap(l=>l.sourceBox);console.log("boxes",c),await $(c)}else await $([])}async function Me(F){window.confirm("Are you sure you want to remove this location?")&&await e.removeLocation(F)}
6function ve(F,L,c,l){const b=2*(l*F+L*c),k=1-2*(F*F+L*L),T=Math.atan2(b,k),f=2*(l*L-c*F);let g;Math.abs(f)>=1?g=Math.sign(f)*Math.PI/2:g=Math.asin(f);const m=g*-180/Math.PI,_=T*180/Math.PI,A=T*180/Math.PI;return{yaw:m,pitch:_,roll:A}}function Ze(F,L,c){const l=F*Math.PI/180,b=L*Math.PI/180,k=c*Math.PI/180,T=Math.cos(l*.5),f=Math.sin(l*.5),g=Math.cos(b*.5),m=Math.sin(b*.5),_=Math.cos(k*.5),A=Math.sin(k*.5),C=_*g*T+A*m*f,q=A*g*T-_*m*f,fe=_*m*T+A*g*f,re=_*g*f-A*m*T;return{qx:q,qy:fe,qz:re,qw:C}}async function Xe(F){t.sourceAreaModal=!0,t.sourceArea=await t.defineArea("0x00ff00",.7),t.sourceSubmitted=!1;let L=t.sourceArea;if(L.endY=L.startY+4,await t.visualBox(t.sourceArea.startX,t.sourceArea.startZ,t.sourceArea.endX,t.sourceArea.endZ,L.startY,L.endY,!1,"0x00ff00",.85,{x:0,y:0,z:0,w:1}),t.sourceArea.quat={x:e.diagramtemplatenode.quaternion.x,y:e.diagramtemplatenode.quaternion.y,z:e.diagramtemplatenode.quaternion.z,w:e.diagramtemplatenode.quaternion.w},t.sourceArea.euler=ve(t.sourceArea.quat.x,t.sourceArea.quat.y,t.sourceArea.quat.z,t.sourceArea.quat.w),await new Promise(l=>{const b=setInterval(()=>{t.sourceSubmitted?(console.log("old area",t.sourceArea),console.log("box dimensions are:",e.diagramtemplatenode.scale,e.diagramtemplatenode.position),t.sourceArea.startX=e.diagramtemplatenode.position.x-e.diagramtemplatenode.scale.x/2,t.sourceArea.endX=e.diagramtemplatenode.position.x+e.diagramtemplatenode.scale.x/2,t.sourceArea.startZ=e.diagramtemplatenode.position.z-e.diagramtemplatenode.scale.z/2,t.sourceArea.endZ=e.diagramtemplatenode.position.z+e.diagramtemplatenode.scale.z/2,t.sourceArea.startY=e.diagramtemplatenode.position.y-e.diagramtemplatenode.scale.y/2,t.sourceArea.endY=e.diagramtemplatenode.position.y+e.diagramtemplatenode.scale.y/2,t.sourceArea.widthX=Math.abs(t.sourceArea.startX-t.sourceArea.endX),t.sourceArea.depthZ=Math.abs(t.sourceArea.startZ-t.sourceArea.endZ),t.sourceArea.quat={x:e.diagramtemplatenode.quaternion.x,y:e.diagramtemplatenode.quaternion.y,z:e.diagramtemplatenode.quaternion.z,w:e.diagramtemplatenode.quaternion.w},t.sourceArea.euler=ve(t.sourceArea.quat.x,t.sourceArea.quat.y,t.sourceArea.quat.z,t.sourceArea.quat.w),console.log("new area",t.sourceArea),clearInterval(b),l(!0)):console.log("interval update box")},500)}),t.sourceSubmitted){await t.visualBox(t.sourceArea.startX,t.sourceArea.startZ,t.sourceArea.endX,t.sourceArea.endZ,t.sourceArea.startY,t.sourceArea.endY,!0,"0x00ff00",.5,t.sourceArea.quat);let l=!1;l=window.confirm("Is the area correct?  If not cancel and draw again."),l?(vt.value=!0,F.push({center:{x:(t.sourceArea.endX+t.sourceArea.startX)/2,y:(t.sourceArea.endY+t.sourceArea.startY)/2,z:(t.sourceArea.endZ+t.sourceArea.startZ)/2},size:{x:t.sourceArea.widthX,y:t.sourceArea.endY-t.sourceArea.startY,z:t.sourceArea.depthZ},orientation:{yaw:t.sourceArea.euler.yaw,pitch:t.sourceArea.euler.pitch,roll:t.sourceArea.euler.roll}}),e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null,$(F)):(console.log("Area is not correct. Please draw again."),e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null),t.sourceAreaModal=!1,t.sourceSubmitted=!1}console.log("source box",F)}const ut=S(!1);async function Ot(F,L){ut.value=!0,p.value=L,$([]),F[L]}async function gt(F,L){p.value=L,ut.value=!1,$([]);let c=F[L];t.sourceAreaModal=!0,t.sourceArea.startX=c.center.x-c.size.x/2,t.sourceArea.startZ=c.center.z-c.size.z/2,t.sourceArea.startY=c.center.y-c.size.y/2,t.sourceArea.endX=c.center.x+c.size.x/2,t.sourceArea.endZ=c.center.z+c.size.z/2,t.sourceArea.endY=c.center.y+c.size.y/2,t.sourceArea.widthX=c.size.x,t.sourceArea.depthZ=c.size.z,t.sourceSubmitted=!1;let l=Ze(c.orientation.pitch,-c.orientation.yaw,c.orientation.roll);if(await t.visualBox(t.sourceArea.startX,t.sourceArea.startZ,t.sourceArea.endX,t.sourceArea.endZ,t.sourceArea.startY,t.sourceArea.endY,!1,"0x00ff00",.85,{x:l.qx,y:l.qy,z:l.qz,w:l.qw}),t.sourceArea.quat={x:e.diagramtemplatenode.quaternion.x,y:e.diagramtemplatenode.quaternion.y,z:e.diagramtemplatenode.quaternion.z,w:e.diagramtemplatenode.quaternion.w},t.sourceArea.euler=ve(t.sourceArea.quat.x,t.sourceArea.quat.y,t.sourceArea.quat.z,t.sourceArea.quat.w),await new Promise(k=>{const T=setInterval(()=>{t.sourceSubmitted?(console.log("old area",t.sourceArea),console.log("box dimensions are:",e.diagramtemplatenode.scale,e.diagramtemplatenode.position),t.sourceArea.startX=e.diagramtemplatenode.position.x-e.diagramtemplatenode.scale.x/2,t.sourceArea.endX=e.diagramtemplatenode.position.x+e.diagramtemplatenode.scale.x/2,t.sourceArea.startZ=e.diagramtemplatenode.position.z-e.diagramtemplatenode.scale.z/2,t.sourceArea.endZ=e.diagramtemplatenode.position.z+e.diagramtemplatenode.scale.z/2,t.sourceArea.startY=e.diagramtemplatenode.position.y-e.diagramtemplatenode.scale.y/2,t.sourceArea.endY=e.diagramtemplatenode.position.y+e.diagramtemplatenode.scale.y/2,t.sourceArea.widthX=Math.abs(t.sourceArea.startX-t.sourceArea.endX),t.sourceArea.depthZ=Math.abs(t.sourceArea.startZ-t.sourceArea.endZ),t.sourceArea.quat={x:e.diagramtemplatenode.quaternion.x,y:e.diagramtemplatenode.quaternion.y,z:e.diagramtemplatenode.quaternion.z,w:e.diagramtemplatenode.quaternion.w},t.sourceArea.euler=ve(t.sourceArea.quat.x,t.sourceArea.quat.y,t.sourceArea.quat.z,t.sourceArea.quat.w),console.log("new area",t.sourceArea),clearInterval(T),k(!0)):console.log("interval update box")},500)}),t.sourceSubmitted){e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null,await t.visualBox(t.sourceArea.startX,t.sourceArea.startZ,t.sourceArea.endX,t.sourceArea.endZ,t.sourceArea.startY,t.sourceArea.endY,!0,"0x00ff00",.5,t.sourceArea.quat);let k=!1;k=window.confirm("Is the area correct?  If not cancel and draw again."),k?(vt.value=!0,F[L]={center:{x:(t.sourceArea.endX+t.sourceArea.startX)/2,y:(t.sourceArea.endY+t.sourceArea.startY)/2,z:(t.sourceArea.endZ+t.sourceArea.startZ)/2},size:{x:t.sourceArea.widthX,y:t.sourceArea.endY-t.sourceArea.startY,z:t.sourceArea.depthZ},orientation:{yaw:t.sourceArea.euler.yaw,pitch:t.sourceArea.euler.pitch,roll:t.sourceArea.euler.roll}},e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null,$(F)):(console.log("Area is not correct. Please draw again."),e.controlBoxNode.stop(),e.myBoxControl.inputs.selection=null),t.sourceAreaModal=!1,t.sourceSubmitted=!1}console.log("source box",F)}function Et(F,L){F.splice(L,1),console.log("source box",F),$(F)}function zt(F){u(F.id,"sourceBox",F.sourceBox),vt.value=!1,ut.value=!1}const vt=S(!1);function Ht(){vt.value?window.confirm("You did not save boxes, are you sure you want to leave?")&&(v.value=!1,e.selectedLocID=null,e.showStartPanel=!1):(v.value=!1,e.selectedLocID=null,e.showStartPanel=!1)}function at(F){console.log("space selected at: ",F.id,F.name),e.selectedLocID=F.id}async function He(){console.log("useZoomControl"),e.mpSdk&&(se.value=await e.mpSdk.Camera.zoom.subscribe(function(F){console.log("Current zoom2 is ",F.level),Te.value=F.level,console.log("Current zoom ref is ",Te.value)}),console.log("Current zoomL is ",Te.value))}function ce(){console.log("cancelZoomControl"),se.value.cancel()}function Nt(F){e.selectedSpace=e.spaceInfo.findIndex(L=>L.id===F),e.selectedModel=e.spaceInfo[e.selectedSpace].space,console.log("id, nav menu mode",F,e.spaceInfo[e.selectedSpace].subCategory.toLowerCase()),e.spaceInfo[e.selectedSpace].subCategory&&e.spaceInfo[e.selectedSpace].subCategory.toLowerCase()==="salons"||e.spaceInfo[e.selectedSpace].breakoutAirwall&&e.spaceInfo[e.selectedSpace].breakoutAirwall.toLowerCase()==="salons"?e.currentMode="Salons":e.currentMode="Ballrooms",console.log("nav mode",e.currentMode),e.navToSpot(e.selectedSpace),console.log("space",e.selectedSpace,"sel model",e.selectedModel)}async function dt(){console.log(),e.updateAdminField("mainStart",e.siteProInfo.mainStart),e.updateAdminField("fallbackM",e.siteProInfo.mainStart.space),e.updateAdminField("fallbackStart",e.siteProInfo.mainStart.spaceStart)}const lt=S(!1),Dt=S(),$t=S();function ae(){let F={name:Dt.value,type:$t.value};e.updateField(e.selectedLocID,`ctaLocOverForm.${Dt.value}`,F),lt.value=!1}function qt(F,L){let c={...F};delete c[L],e.updateField(e.selectedLocID,"ctaLocOverForm",c)}return(F,L)=>w(e).isLoaded?(E(),R("div",Ql,[a("div",Jl,[a("div",er,[w(e).siteProInfo.mainStart?(E(),R("label",tr,"Selected: "+Q(w(e).siteProInfo.mainStart.name),1)):Y("",!0),nr,X(a("select",{id:"mainstart-select","onUpdate:modelValue":L[0]||(L[0]=c=>w(e).siteProInfo.mainStart=c),onChange:L[1]||(L[1]=c=>
6dt())},[(E(!0),R(Ne,null,je(w(e).spaceInfo,c=>(E(),R("option",{key:c,value:c},Q(c.name),9,or))),128))],544),[[Zt,w(e).siteProInfo.mainStart]])]),a("div",sr,[v.value?Y("",!0):(E(),R("button",{key:0,class:"addLocButton",onClick:L[2]||(L[2]=U((...c)=>w(e).addLocation&&w(e).addLocation(...c),["prevent"]))},"Add Location")),a("button",{class:"debugBtn",onClick:U(ee,["prevent"]),id:"debugger-btn"},"Boxes On/Off",8,ar)]),ir,lr,a("div",rr,[(E(!0),R(Ne,null,je(w(e).spaceInfo,c=>(E(),R("li",{class:"locListItem",key:c.id},[a("span",null,Q(c.name),1),a("div",cr,[a("button",{class:"locIconBtn",onClick:U(l=>Me(c.id),["prevent"])},pr,8,ur),w(e).selectedLocID===c.id?(E(),R("button",hr,mr)):Y("",!0),a("button",{class:"locIconBtn",onClick:U(l=>at(c),["prevent"])},wr,8,gr),a("button",{class:"locIconBtn",onClick:U(l=>Nt(c.id),["prevent"])},_r,8,br)]),w(e).selectedLocID===c.id?(E(),R("div",Cr,[a("div",xr,[a("span",null,Q(c.name),1),St(),w(t).sourceAreaModal?Y("",!0):(E(),R("button",{key:0,class:"removeButton",onClick:U(Ht,["prevent"])},"Close",8,Sr))]),a("div",Ar,[a("div",Tr,[a("ul",{class:"menu-header-list",style:No([{"padding-left":"0px"},{transform:`translateX(-${w(Ae)}px)`}])},[(E(!0),R(Ne,null,je(M.value,(l,b)=>(E(),R("li",{key:b,class:Zn({active:b===w(e).locMenuPillIndex}),onClick:k=>be(b)},Q(l.name),11,Mr))),128))],4)]),a("button",{class:"pillButton-left","aria-label":"prev",onClick:j},[(E(),R("svg",Ir,Lr))]),a("button",{class:"pillButton-right","aria-label":"next",onClick:D},[(E(),R("svg",kr,zr))])]),Dr,w(e).locMenuPillIndex==0?(E(),R("div",Rr,[w(t).sourceAreaModal?Y("",!0):(E(),R("div",Or,[a("label",Nr,"Select a Function Category Icon: ("+Q(c.categoryIcon)+")",1),X(a("select",{id:"menu-select","onUpdate:modelValue":l=>c.categoryIcon=l,onChange:l=>w(u)(c.id,"categoryIcon",c.categoryIcon)},[(E(!0),R(Ne,null,je(I.value,l=>(E(),R("option",{key:l,value:l},Q(l),9,Fr))),128))],40,$r),[[Zt,c.categoryIcon]])])),w(t).sourceAreaModal?Y("",!0):(E(),R("div",Ur,[a("div",Br,[Zr,X(a("select",{id:"breakoutAirwalls","onUpdate:modelValue":l=>c.breakoutAirwall=l,onChange:l=>w(u)(c.id,"breakoutAirwall",c.breakoutAirwall)},qr,40,jr),[[Zt,c.breakoutAirwall]])])])),w(t).sourceAreaModal?Y("",!0):(E(),R("div",Gr,[a("label",Yr,"Select a Complex: ("+Q(c.complex)+")",1),X(a("select",{id:"complex-select","onUpdate:modelValue":l=>c.complex=l,onChange:l=>w(u)(c.id,"complex",c.complex)},[(E(!0),R(Ne,null,je(w(e).siteProInfo.complex,l=>(E(),R("option",{key:l,value:l.name},Q(l.name),9,Kr))),128))],40,Wr),[[Zt,c.complex]])])),a("div",Qr,[Jr,X(a("input",{id:"locations","onUpdate:modelValue":l=>c.name=l,onInput:l=>w(u)(c.id,"name",c.name),type:"text"},null,40,ec),[[te,c.name]])]),a("div",tc,[nc,X(a("input",{id:"locations","onUpdate:modelValue":l=>c.order=l,onInput:l=>w(u)(c.id,"order",c.order),type:"number"},null,40,oc),[[te,c.order]])]),a("div",sc,[ac,X(a("input",{id:"info","onUpdate:modelValue":l=>c.info=l,onInput:l=>w(u)(c.id,"info",c.info),type:"text"},null,40,ic),[[te,c.info]])]),a("div",lc,[rc,X(a("textarea",{id:"amenities","onUpdate:modelValue":l=>c.amenities=l,onInput:l=>w(u)(c.id,"amenities",c.amenities)},null,40,cc),[[te,c.amenities]])]),a("div",uc,[dc,X(a("input",{id:"more-info","onUpdate:modelValue":l=>c.moreInfo=l,onInput:l=>w(u)(c.id,"moreInfo",c.moreInfo),type:"text"},null,40,pc),[[te,c.moreInfo]])]),a("div",hc,[fc,X(a("input",{id:"pro-tip","onUpdate:modelValue":l=>c.proTip=l,onInput:l=>w(u)(c.id,"proTip",c.proTip),type:"text"},null,40,mc),[[te,c.proTip]])]),a("div",gc,[vc,X(a("input",{id:"menu-link-on-click","onUpdate:modelValue":l=>c.roomFactLink=l,onInput:l=>w(u)(c.id,"roomFactLink",c.roomFactLink),type:"text"},null,40,wc),[[te,c.roomFactLink]])]),a("div",bc,[yc,X(a("input",{id:"menu-link-on-click","onUpdate:modelValue":l=>c.menuLink=l,onInput:l=>w(u)(c.id,"menuLink",c.menuLink),type:"text"},null,40,_c),[[te,c.menuLink]])])])):Y("",!0),w(e).locMenuPillIndex==1?(E(),R("div",Cc,[a("div",xc,[a("label",null,"Current: "+Q(c.space)+", sweepv1: "+Q(c.sweep)+" sweepv2: "+Q(c.sweep2)+" "+Q(c.spaceStart),1),a("button",{onClick:L[3]||(L[3]=U(l=>w(e).showStartPanel=!0,["prevent"]))},"Set Starting Position")]),a("div",null,[a("div",Sc,[w(t).sourceAreaModal?Y("",!0):(E(),R("button",{key:0,class:"debugBtn",onClick:U(l=>$(c.sourceBox),["prevent"])}
6,"Show Boxes",8,Ac)),w(t).sourceAreaModal?Y("",!0):(E(),R("button",{key:1,onClick:U(ee,["prevent"]),class:"debugBtn"},"Show All Boxes",8,Tc))]),w(t).sourceAreaModal?Y("",!0):(E(!0),R(Ne,{key:0},je(c.sourceBox,(l,b)=>(E(),R("div",null,[a("div",Mc,[a("p",null," Source: "+Q(b),1),a("button",{onClick:U(k=>Et(c.sourceBox,b),["prevent"]),class:"locIconBtn"},Lc,8,Ic),a("button",{onClick:U(k=>gt(c.sourceBox,b),["prevent"]),class:"locIconBtn"},zc,8,kc),a("button",{onClick:U(k=>Ot(c.sourceBox,b),["prevent"]),class:"locIconBtn"},Oc,8,Dc)]),b==p.value&&ut.value?(E(),R("div",Nc,[a("button",{onClick:L[4]||(L[4]=U(k=>(p.value=null,ut.value=!1),["prevent"]))},"X"),a("p",$c,Q(l),1),a("ul",null,[a("button",{class:"sizeBtn",onClick:U(k=>(l.center.x-=10,$(c.sourceBox)),["prevent"])},"◀◀",8,Fc),a("button",{class:"sizeBtn",onClick:U(k=>(l.center.x-=1,$(c.sourceBox)),["prevent"])},"◀",8,Uc),Bc,a("button",{class:"sizeBtn",onClick:U(k=>(l.center.x+=1,$(c.sourceBox)),["prevent"])},"▶",8,Zc),a("button",{class:"sizeBtn",onClick:U(k=>(l.center.x+=10,$(c.sourceBox)),["prevent"])},"▶▶",8,jc)]),a("ul",null,[a("button",{class:"sizeBtn",onClick:U(k=>(l.center.y-=10,$(c.sourceBox)),["prevent"])},"Down",8,Xc),a("button",{class:"sizeBtn",onClick:U(k=>(l.center.y-=1,$(c.sourceBox)),["prevent"])},"Down",8,Vc),Hc,a("button",{class:"sizeBtn",onClick:U(k=>(l.center.y+=1,$(c.sourceBox)),["prevent"])},"Up",8,qc),a("button",{class:"sizeBtn",onClick:U(k=>(l.center.y+=10,$(c.sourceBox)),["prevent"])},"Up",8,Gc)]),a("ul",null,[a("button",{class:"sizeBtn",onClick:U(k=>(l.center.z-=10,$(c.sourceBox)),["prevent"])},"▲▲",8,Yc),a("button",{class:"sizeBtn",onClick:U(k=>(l.center.z-=1,$(c.sourceBox)),["prevent"])},"▲",8,Wc),Kc,a("button",{class:"sizeBtn",onClick:U(k=>(l.center.z+=1,$(c.sourceBox)),["prevent"])},"▼",8,Qc),a("button",{class:"sizeBtn",onClick:U(k=>(l.center.z+=10,$(c.sourceBox)),["prevent"])},"▼▼",8,Jc)]),a("ul",null,[a("button",{class:"sizeBtn",onClick:U(k=>(l.size.x-=10,$(c.sourceBox)),["prevent"])},"-10",8,eu),a("button",{class:"sizeBtn",onClick:U(k=>(l.size.x-=1,$(c.sourceBox)),["prevent"])},"-1",8,tu),nu,a("button",{class:"sizeBtn",onClick:U(k=>(l.size.x+=1,$(c.sourceBox)),["prevent"])},"+",8,ou),a("button",{class:"sizeBtn",onClick:U(k=>(l.size.x+=10,$(c.sourceBox)),["prevent"])},"+++",8,su)]),a("ul",null,[a("button",{class:"sizeBtn",onClick:U(k=>(l.size.z-=10,$(c.sourceBox)),["prevent"])},"---",8,au),a("button",{class:"sizeBtn",onClick:U(k=>(l.size.z-=1,$(c.sourceBox)),["prevent"])},"-",8,iu),lu,a("button",{class:"sizeBtn",onClick:U(k=>(l.size.z+=1,$(c.sourceBox)),["prevent"])},"+",8,ru),a("button",{class:"sizeBtn",onClick:U(k=>(l.size.z+=10,$(c.sourceBox)),["prevent"])},"+++",8,cu)]),a("ul",null,[a("button",{class:"sizeBtn",onClick:U(k=>(l.orientation.yaw-=10,$(c.sourceBox)),["prevent"])},"---",8,uu),a("button",{class:"sizeBtn",onClick:U(k=>(l.orientation.yaw-=1,$(c.sourceBox)),["prevent"])},"-",8,du),pu,a("button",{class:"sizeBtn",onClick:U(k=>(l.orientation.yaw+=1,$(c.sourceBox)),["prevent"])},"+",8,hu),a("button",{class:"sizeBtn",onClick:U(k=>(l.orientation.yaw+=10,$(c.sourceBox)),["prevent"])},"+++",8,fu)])])):Y("",!0)]))),256)),w(t).sourceAreaModal?(E(),R("div",mu,[w(t).sourceAreaModal?(E(),R("button",{key:0,onClick:L[5]||(L[5]=U(l=>w(t).sourceSubmitted=!0,["prevent"]))},"Box Submit")):Y("",!0),a("button",{onClick:U(De,["prevent"])},"S",8,gu),a("button",{onClick:U(_e,["prevent"])},"T",8,vu),a("button",{onClick:U(ue,["prevent"])},"R",8,wu)])):Y("",!0),a("div",bu,[w(t).sourceAreaModal?Y("",!0):(E(),R("button",{key:0,onClick:U(l=>Xe(c.sourceBox),["prevent"])},"Add a Box",8,yu)),w(t).sourceAreaModal?Y("",!0):(E(),R("button",{key:1,onClick:U(l=>zt(c),["prevent"])},"Save Boxes",8,_u)),w(t).sourceAreaModal?Y("",!0):(E(),R("button",{key:2,onClick:U(l=>pe(c.id),["prevent"])}," Gen Thumb",8,Cu))]),c.thumb&&!w(t).sourceAreaModal?(E(),R("img",{key:2,style:{"border-radius":"15px",height:"200px"},src:c.thumb,alt:"thumb"},null,8,xu)):Y("",!0)])])):Y("",!0),w(e).locMenuPillIndex==2?(E(),R("div",Su,[a("div",Au,[Tu,X(a("input",{id:"cta-button-display-text","onUpdate:modelValue":l=>c.ctaText=l,onInput:l=>w(u)(c.id,"ctaText",c.ctaText),type:"text"},null,40,Mu),[[te,c.ctaText]])]),a("div",Iu,[Pu,X(a("input",{id:"cta-email-on-click","onUpdate:modelValue":l=>c.ctaEmail=l,onInput:l=>w(u)(c.id,"ctaEmail",c.ctaEmail),type:"text"},null,40,Lu),[[te,c.ctaEmail]])]),a("div",ku,[Eu,X(a("input",{id:"cta-link-on-cl
6ick","onUpdate:modelValue":l=>c.ctaLink=l,onInput:l=>w(u)(c.id,"ctaLink",c.ctaLink),type:"text"},null,40,zu),[[te,c.ctaLink]])]),a("div",Du,[X(a("input",{id:"cta-link-newtab","onUpdate:modelValue":l=>c.ctaNewTab=l,onChange:l=>w(u)(c.id,"ctaNewTab",c.ctaNewTab),type:"checkbox"},null,40,Ru),[[xt,c.ctaNewTab]]),Ou]),a("div",Nu,[X(a("input",{id:"cta-link-newtab","onUpdate:modelValue":l=>c.ctaLocOverride=l,onChange:l=>w(u)(c.id,"ctaLocOverride",c.ctaLocOverride),type:"checkbox"},null,40,$u),[[xt,c.ctaLocOverride]]),Fu]),c.ctaLocOverride?(E(),R("div",Uu,[a("div",Bu,[Zu,X(a("textarea",{id:"cta-button-display-text","onUpdate:modelValue":l=>c.ctaOverRideDiaText=l,onInput:l=>w(u)(c.id,"ctaOverRideDiaText",c.ctaOverRideDiaText),type:"text"},null,40,ju),[[te,c.ctaOverRideDiaText]])]),(E(!0),R(Ne,null,je(c.ctaLocOverForm,(l,b)=>(E(),R("div",Xu,[a("label",null,Q(l.name),1),a("div",Vu,[X(a("select",{id:"cta-type-newtab","onUpdate:modelValue":k=>l.type=k,onChange:k=>w(u)(c.id,`ctaLocOverForm.${b}.type`,l.type)},Gu,40,Hu),[[Zt,l.type]]),a("button",{class:"locIconBtn",onClick:U(k=>qt(c.ctaLocOverForm,b),["prevent"])},Ku,8,Yu)])]))),256)),c.ctaLocOverride?(E(),R("div",Qu,[a("button",{onClick:L[6]||(L[6]=U(l=>lt.value=!0,["prevent"]))},"Add Custom Contact Field"),lt.value?(E(),R("div",Ju,[a("form",ed,[td,a("div",null,[X(a("textarea",{"onUpdate:modelValue":L[7]||(L[7]=l=>Dt.value=l),placeholder:"Enter Field Name"},null,512),[[te,Dt.value]]),X(a("textarea",{"onUpdate:modelValue":L[8]||(L[8]=l=>$t.value=l),placeholder:"Enter Field type (number, text, etc)"},null,512),[[te,$t.value]])]),a("menu",null,[a("button",{type:"reset",onClick:L[9]||(L[9]=U(l=>lt.value=!1,["prevent"]))},"Cancel"),a("button",{type:"submit.prevent",onClick:U(ae,["prevent"])},"Confirm",8,nd)])])])):Y("",!0)])):Y("",!0)])):Y("",!0)])):Y("",!0),w(e).locMenuPillIndex==3?(E(),R("div",od,[a("div",sd,[ad,X(a("input",{id:"cvent-3d","onUpdate:modelValue":l=>c.cvent3d=l,onInput:l=>w(u)(c.id,"cvent3d",c.cvent3d),type:"text"},null,40,id),[[te,c.cvent3d]])]),a("div",ld,[rd,X(a("input",{id:"cvent-3d","onUpdate:modelValue":l=>c.cventFloorId=l,onInput:l=>w(u)(c.id,"cventFloorId",c.cventFloorId),type:"text"},null,40,cd),[[te,c.cventFloorId]])]),a("div",ud,[dd,X(a("input",{id:"cvent-3d","onUpdate:modelValue":l=>c.cventBuildingId=l,onInput:l=>w(u)(c.id,"cventBuildingId",c.cventBuildingId),type:"text"},null,40,pd),[[te,c.cventBuildingId]])]),a("div",hd,[fd,X(a("input",{id:"cvent-3d","onUpdate:modelValue":l=>c.cventRoomId=l,onInput:l=>w(u)(c.id,"cventRoomId",c.cventRoomId),type:"text"},null,40,md),[[te,c.cventRoomId]])]),a("div",gd,[vd,X(a("input",{id:"cvent-3d","onUpdate:modelValue":l=>c.cventFloorThumb=l,onInput:l=>w(u)(c.id,"cventFloorThumb",c.cventFloorThumb),type:"text"},null,40,wd),[[te,c.cventFloorThumb]])]),a("div",bd,[yd,X(a("input",{id:"cvent-3d","onUpdate:modelValue":l=>c.cventFloorDown=l,onInput:l=>w(u)(c.id,"cventFloorDown",c.cventFloorDown),type:"text"},null,40,_d),[[te,c.cventFloorDown]])]),a("h3",Cd,[St(" Linkable Capacity Chart "),a("button",{class:"locIconBtn",onClick:L[10]||(L[10]=l=>(d.value=!d.value,h.value=!1))},Sd)]),Ad,d.value?(E(),R("div",Td,[a("div",null,[(E(!0),R(Ne,null,je(w(e).diagramTypes,(l,b)=>(E(),R("div",{key:b,class:"capItem"},[a("label",Md,Q(l.label),1),a("div",Id,[X(a("input",{type:"number",placeholder:"capacity","onUpdate:modelValue":k=>c.capacities[l.field]=k,onInput:k=>w(u)(c.id,`capacities.${l.field}`,c.capacities[l.field])},null,40,Pd),[[te,c.capacities[l.field]]]),X(a("input",{type:"text",placeholder:"room set link","onUpdate:modelValue":k=>c.capacities[l.linkField]=k,onInput:k=>w(u)(c.id,`capacities.${l.linkField}`,c.capacities[l.linkField])},null,40,Ld),[[te,c.capacities[l.linkField]]])])]))),128))])])):Y("",!0),kd,Ed,a("div",null,[a("div",zd,[St(" Max Set Area: "),a("div",Dd,[c.maxSetArea?(E(),R("button",{key:0,onClick:U(l=>G(c),["prevent"]),class:"locIconBtn"},Nd,8,Rd)):Y("",!0),a("button",{onClick:U(l=>de(c),["prevent"]),class:"locIconBtn"},Ud,8,$d)])]),a("div",Bd,[St(" Edit Area Templates: "),a("div",Zd,[c.maxSetArea?(E(),R("button",{key:0,class:"locIconBtn",onClick:L[11]||(L[11]=l=>(h.value=!h.value,d.value=!1))},Xd)):Y("",!0)])]),w(t).areaModal?(E(),R("div",Vd,[St(" Area Modal "),a("button",{onClick:L[12]||(L[12]=U(l=>w(t).areaSubmitted=!0,["prevent"]))},"Save Area"),a("div",null,[a("button",{onClick:U(De,["prevent"])},"S",8,Hd),a("button",{onClick:U(_e,["prevent"])},"T",8,qd),a("button",{onClick:U(ue,["prevent"])},"R",8,Gd),a("button",{onClick:U(ye,["prevent"])},"Log Box",8,Yd)])])):Y("",!0),h.value?(E(),R("div",Wd,[(E(!0),R(Ne,null,je(w(t).setTemplates,(l,b)=>(E(),R("div",{key:b},[St(" SetType: "+Q(l.diagramType)+" ",1),a("button",{class:"locIconBtn",onClick:k=>P.value=b},Jd,8,Kd),P.value===b?(E(),R("div",e1,[a("div",null,[t1,X(a("input",{type:"checkbox",onChange:k=>w(u)(c.id,"setTemplate",c.setTemplate),"onUpdate:modelValue":k=>xe(c,l.diagramType).skipSet=k},null,40,n1),[[xt,xe(c,l.diagramType).skipSet]])]),a("div",null,[o1,X(a("input",{type:"checkbox",onChange:k=>w(u)(c.id,"setTemplate",c.setTemplate),"onUpdate:modelValue":k=>xe(c,l.diagramType).largeRoomType=k},null,40,s1),[[xt,xe(c,l.diagramType).largeRoomType]])]),a("div",null,[a1,X(a("input",{type:"checkbox",onChange:k=>w(u)(c.id,"setTemplate",c.setTemplate),"onUpdate:modelValue":k=>xe(c,l.diagramType).smallRoomType=k},null,40,i1),[[xt,xe(c,l.diagramType).smallRoomType]])]),a("div",null,[l1,X(a("input",{type:"number",onChange:k=>w(u)(c.id,"setTemplate",c.setTemplate),"onUpdate:modelValue":k=>xe(c,l.diagramType).aisleHor=k},null,40,r1),[[te,xe(c,l.diagramType).aisleHor]])]),a("div",null,[c1,X(a("input",{type:"number",onChange:k=>w(u)(c.id,"setTemplate",c.setTemplate),"onUpdate:modelValue":k=>xe(c,l.diagramType).aisleVert=k},null,40,u1),[[te,xe(c,l.diagramType).aisleVert]])]),a("div",null,[d1,X(a("input",{type:"number",onChange:k=>w(u)(c.id,"setTemplate",c.setTemplate),"onUpdate:modelValue":k=>xe(c,l.diagramType).objPerBlockVert=k},null,40,p1),[[te,xe(c,l.diagramType).objPerBlockVert]])]),a("div",null,[h1,
6X(a("input",{type:"number",onChange:k=>w(u)(c.id,"setTemplate",c.setTemplate),"onUpdate:modelValue":k=>xe(c,l.diagramType).objPerBlockHor=k},null,40,f1),[[te,xe(c,l.diagramType).objPerBlockHor]])]),a("div",null,[m1,X(a("input",{type:"number",onChange:k=>w(u)(c.id,"setTemplate",c.setTemplate),"onUpdate:modelValue":k=>xe(c,l.diagramType).objSpaceHori=k},null,40,g1),[[te,xe(c,l.diagramType).objSpaceHori]])]),a("div",null,[v1,X(a("input",{type:"number",onChange:k=>w(u)(c.id,"setTemplate",c.setTemplate),"onUpdate:modelValue":k=>xe(c,l.diagramType).objSpaceVert=k},null,40,w1),[[te,xe(c,l.diagramType).objSpaceVert]])]),a("div",null,[b1,X(a("input",{type:"number",onChange:k=>w(u)(c.id,"setTemplate",c.setTemplate),"onUpdate:modelValue":k=>xe(c,l.diagramType).serPer=k},null,40,y1),[[te,xe(c,l.diagramType).serPer]])])])):Y("",!0)]))),128))])):Y("",!0)])])):Y("",!0)])):Y("",!0),w(e).showStartPanel?(E(),R("button",{key:1,class:"startLocZoom",onClick:U(He,["prevent"])},"Set Zoom",8,_1)):Y("",!0),w(e).showStartPanel?(E(),R("button",{key:2,class:"startLocZoomCanc",onClick:U(ce,["prevent"])},"Cancel Zoom",8,C1)):Y("",!0)]))),128))])])])):Y("",!0)}},S1=on(x1,[["__scopeId","data-v-f1a74fc9"]]);const Xt=i=>(hn("data-v-30266023"),i=i(),fn(),i),A1={class:"airwall-info"},T1={style:{display:"flex","flex-direction":"column",gap:"1rem"}},M1=Xt(()=>a("label",{for:"gltfUrl"},"Select Object:",-1)),I1=["value"],P1={style:{display:"flex","flex-direction":"row",gap:"1rem","justify-content":"start","align-items":"start"}},L1={style:{display:"flex","flex-direction":"column",gap:"1rem"}},k1=Xt(()=>a("label",{for:"servicePerimeter"},"Service Perimeter Inches:",-1)),E1={style:{display:"flex","flex-direction":"column",gap:"1rem"}},z1=In('<label for="spaceBetweenBlocksHor" data-v-30266023> Aisle <svg fill="none" height="23" viewBox="0 0 31 23" width="31" xmlns="http://www.w3.org/2000/svg" data-v-30266023><g fill="#fff" data-v-30266023><path d="m30.7071 15.7071c.3905-.3905.3905-1.0237 0-1.4142l-6.364-6.36397c-.3905-.39052-1.0236-.39052-1.4142 0-.3905.39053-.3905 1.02369 0 1.41422l5.6569 5.65685-5.6569 5.6569c-.3905.3905-.3905 1.0236 0 1.4142.3906.3905 1.0237.3905 1.4142 0zm-29.7071.2929h29v-2h-29z" data-v-30266023></path><path d="m.292893 14.2929c-.3905241.3905-.3905241 1.0237 0 1.4142l6.363957 6.364c.39053.3905 1.02369.3905 1.41422 0 .39052-.3906.39052-1.0237 0-1.4142l-5.65686-5.6569 5.65686-5.65685c.39052-.39053.39052-1.02369 0-1.41422-.39053-.39052-1.02369-.39052-1.41422 0zm1.707107-.2929h-1v2h1z" data-v-30266023></path><path d="m11.7614 2.72727v7.27273h-.8807v-7.27273zm2.4902 3.99148v3.28125h-.8381v-5.45455h.8097v.85228h.071c.1279-.27699.322-.49953.5824-.66762.2604-.17045.5966-.25568 1.0085-.25568.3693 0 .6925.07576.9695.22727.277.14915.4924.37642.6463.68182.1539.30303.2308.68656.2308 1.15057v3.46591h-.8381v-3.40909c0-.4285-.1112-.76231-.3338-1.00142-.2225-.24148-.5279-.36222-.9162-.36222-.2675 0-.5066.058-.7173.17401-.2083.116-.3729.28527-.4936.50781s-.1811.49243-.1811.80966zm5.6223 3.33805c-.1752 0-.3255-.06272-.451-.18819-.1254-.12548-.1882-.27581-.1882-.451s.0628-.32552.1882-.45099c.1255-.12547.2758-.18821.451-.18821s.3256.06274.451.18821c.1255.12547.1882.2758.1882.45099 0 .11601-.0296.22254-.0887.31961-.0569.09706-.1338.17519-.2309.23437-.0947.05681-.2012.08521-.3196.08521z" data-v-30266023></path></g></svg></label>',1),D1={style:{display:"flex","flex-direction":"column",gap:"1rem"}},R1=In('<label for="spaceBetweenBlocksVert" data-v-30266023> Aisle <svg width="24" height="29" viewBox="0 0 24 29" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-30266023><path d="M8.70711 0.790231C8.31658 0.399706 7.68342 0.399706 7.29289 0.790231L0.928932 7.15419C0.538408 7.54472 0.538408 8.17788 0.928932 8.56841C1.31946 8.95893 1.95262 8.95893 2.34315 8.56841L8 2.91155L13.6569 8.56841C14.0474 8.95893 14.6805 8.95893 15.0711 8.56841C15.4616 8.17788 15.4616 7.54472 15.0711 7.15419L8.70711 0.790231ZM9 25.0027L9 1.49734H7L7 25.0027H9Z" fill="white" data-v-30266023></path><path d="M7.29289 28.7071C7.68342 29.0976 8.31658 29.0976 8.70711 28.7071L15.0711 22.3431C15.4616 21.9526 15.4616 21.3195 15.0711 20.9289C14.6805 20.5384 14.0474 20.5384 13.6569 20.9289L8 26.5858L2.34315 20.9289C1.95262 20.5384 1.31946 20.5384 0.928932 20.9289C0.538408 21.3195 0.538408 21.9526 0.928932 22.3431L7.29289 28.7071ZM7 25V28H9V25H7Z" fill="white" data-v-30266023></path><path d="M11.7614 9.72727V17H10.8807V9.72727H11.7614ZM14.2516 13.7188V17H13.4135V11.5455H14.2232V12.3977H14.2942C14.4221 12.1207 14.6162 11.8982 14.8766 11.7301C15.137 11.5597 15.4732 11.4744 15.8851 11.4744C16.2544 11.4744 16.5776 11.5502 16.8546 11.7017C17.1316 11.8509 17.347 12.0781 17.5009 12.3835C17.6548 12.6866 17.7317 13.0701 17.7317 13.5341V17H16.8936V13.5909C16.8936 13.1624 16.7824 12.8286 16.5598 12.5895C16.3373 12.348 16.0319 12.2273 15.6436 12.2273C15.3761 12.2273 15.137 12.2853 14.9263 12.4013C14.718 12.5173 14.5
6534 12.6866 14.4327 12.9091C14.312 13.1316 14.2516 13.4015 14.2516 13.7188ZM19.8739 17.0568C19.6987 17.0568 19.5484 16.9941 19.4229 16.8686C19.2975 16.7431 19.2347 16.5928 19.2347 16.4176C19.2347 16.2424 19.2975 16.0921 19.4229 15.9666C19.5484 15.8411 19.6987 15.7784 19.8739 15.7784C20.0491 15.7784 20.1995 15.8411 20.3249 15.9666C20.4504 16.0921 20.5131 16.2424 20.5131 16.4176C20.5131 16.5336 20.4835 16.6402 20.4244 16.7372C20.3675 16.8343 20.2906 16.9124 20.1935 16.9716C20.0988 17.0284 19.9923 17.0568 19.8739 17.0568Z" fill="white" data-v-30266023></path></svg></label>',1),O1={style:{display:"flex","flex-direction":"column",gap:"1rem"}},N1=Xt(()=>a("label",{for:"spaceBetweenRow"}," Obj Space ",-1)),$1={style:{display:"flex","flex-direction":"column",gap:"1rem"}},F1=Xt(()=>a("label",{for:"spaceBetweenColumn"}," Obj Space ",-1)),U1={style:{display:"flex","flex-direction":"column",gap:"1rem"}},B1=Xt(()=>a("label",{for:"numObjInBlockVert"},"# Obj Vert:",-1)),Z1={style:{display:"flex","flex-direction":"column",gap:"1rem"}},j1=Xt(()=>a("label",{for:"numObjInBlockHor"},"# Obj Hori:",-1)),X1={style:{display:"flex","flex-direction":"column",gap:"1rem"}},V1=Xt(()=>a("label",{for:"numScreens"},"Num Screens:",-1)),H1={id:"mobileToolBar"},q1=Xt(()=>a("div",{id:"spacerBarMobile"},null,-1)),G1=["onClick"],Y1=["onClick"],W1={id:"mobileToolBar2"},K1=Xt(()=>a("div",{id:"spacerBarMobile"},null,-1)),Q1={key:0,class:"modal"},J1={class:"modal-content"},e0=Xt(()=>a("h2",null,"Please select the direction",-1)),t0={class:"modal-body"},n0=["value"],o0={__name:"AddMaxSetGroupsAuto",props:{space:Object,diagramType:String},setup(i){const e=i,t=nn();Bn(_n,"spaces");const n=tn(t.updateField,500);S(null),S(null);const o=S(!1),r=S(),s=S(null),u=S(null),d=S(null),h=S(null),v=S(),p=S([]),P=S(0),O=S(),I=S(),x=S([]),z=S([]);S([]),S([]);const M=S(0);S(5),S();const D=S(0);function j(){console.log("setting control"),D.value<3?D.value++:D.value=0,console.log("aircontrol",D.value),D.value===0||(D.value===1?I.value.inputs.mode="translate":D.value===2?I.value.inputs.mode="scale":D.value===3&&(I.value.inputs.mode="rotate")),console.log("mode",I.value.inputs.mode)}const y=S({name:"roundsOf6LOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek.appspot.com/o/updatedDiagramAssets%2F003_SelfWalk_BasicRoundTable_Asset_LOD2.gltf?alt=media&token=e5335755-ab25-4065-832d-51e3dce062be",loader:"",tableType:"round",tableChairs:6,type:"",seats:0,size:{x:2.969,y:.749,z:2.995}});S(),S(),S(),S(),S(1),S(1);const oe=S(24),Ae=S(24),be=S(24),ze=S(24),pe=S(1),ye=S(1),ue=S(0),De=S(0);S(0),S(5),S(-10);const _e=S(0);S(0);function de(c,l,b,k,T,f,g,m){console.log("setting template"),ue.value=l,be.value=b,ze.value=k,oe.value=T,Ae.value=f,pe.value=g,ye.value=m,y.value=t.diagramObjects.find(_=>_.name===c)}const G=S([]);class xe{constructor(l,b){this.path=l,this.node=b}onEvent(l){l.input.type=="hover",l.input.type=="unhover"||(l.input.type=="click"?console.log("Clicked emit"):l.input.type==="dragend"&&console.log("Drag ended"))}}const Te=S(null),se=S([]),$=S([]),ee=S(null);async function Me(c){console.log("showDiagramming",c,"props",e.space.capacities,"diagramType",e.diagramType),x.value=[];let l=[];if(t.diagrammingSceneObject)console.log("diagrammingSceneObject.stop()"),t.diagrammingSceneObject.stop(),t.diagrammingSceneObject=null,l.forEach(b=>b.cancel()),l=[];else{await t.mpSdk.Scene.registerComponents([{factory:$o(t.mpSdk),name:"gltfType"}]),console.log("creating wallsceneobj"),t.diagrammingSceneObject=(await t.mpSdk.Scene.createObjects(1))[0],console.log("creating wallsceneobj");for(let T=0;T<c.length;T++){x.value[T]=t.diagrammingSceneObject.addNode();const f=c[T];x.value[T].obj3D.position.set(f.position.x,f.position.y,f.position.z),x.value[T].obj3D.scale.set(f.scale.x,f.scale.y,f.scale.z),f.quaternion&&x.value[T].obj3D.quaternion.set(f.quaternion.x,f.quaternion.y,f.quaternion.z,f.quaternion.w),x.value[T].model=f.model,x.value[T].rows=f.rows,x.value[T].columns=f.columns,x.value[T].width=f.width,x.value[T].depth=f.depth,x.value[T].rowSpace=f.rowSpace,x.value[T].boundingBox=f.boundingBox,x.value[T].colSpace=f.colSpace,x.value[T].diagramID=f.diagramID,x.value[T].url=f.url,x.value[T].loader=f.loader,x.value[T].type=f.type,x.value[T].seats=f.seats,x.value[T].size=f.size,O[T]={pos:x.value[T].obj3D.position,rot:x.value[T].obj3D.rotation,quat:x.value[T].obj3D.quaternion,scale:x.value[T].obj3D.scale},console.log("wall"+T,O[T]),console.log("registering gltf"),z[T]=x.value[T].addComponent(jn,{url:f.url,type:f.type,seats:f.seats,tableChairs:f.tableChairs,tableType:f.tableType,size:f.size,width:f.width,depth:f.depth,rows:f.rows,columns:f.columns,boundingBox:f.boundingBox,rowSpace:f.rowSpace,colSpace:f.colSpace,diagramID:f.diagramID,loader:f.loader,materialColor:"white",materialColor2:"white"}),console.log("wallnodecomp",z[T]);const g=await t.diagrammingSceneObject.addEmitPath(z[T],"gltfevents"),m=t.diagrammingSceneObject.spyOnEvent(new xe(g,x.value[T]));l.push(m);const _=await t.diagrammingSceneObject.addEmitPath(z[T],"gltfevents","wallNodeComp_"+T);class A{constructor(){kn(this,"path",_)}onEvent(fe){console.log("click evnet12 log"),fe.input.type=="hover",fe.input.type=="unhover"&&console.log("userNavigationEnabled = true"),fe.input.type=="click"&&(console.log("click evnet log"),I.value.inputs.mode="translate",I.value.inputs.selection==null?(I.value.inputs.selection=x.value[T],Te.value=x.value[T].diagramID,console.log("selID",Te.value,x.value[T].diagramID),P.value=(x.value[T].obj3D.rotation.y*(180/Math.PI)).toFixed(2),M.value=T):(I.value.inputs.selection=null,t.inputComponent.inputs.userNavigationEnabled=!0))}}const C=t.diagrammingSceneObject.spyOnEvent(new A);l.push(C),console.log("registered gltf")}const b=t.diagrammingSceneObject.addNode();I.value=b.addComponent("mp.transformControls",{mode:"scale",selection:null,size:1}),t.diagrammingSceneObject.addNode().addComponent("mp.ambientLight",{intensity:1,color:{r:1,g:1,b:1}}),t.diagrammingSceneObject.start()}
6I.value.inputs.selection=null,D.value=0}async function ve(){Xe.value=[];let c=await at("0x00ff00");console.log("area",c);for(let g=0;g<x.value.length;g++){const m=x.value[g];m.position.x>c.startX&&m.position.x<c.endX&&m.position.z>c.startZ&&m.position.z<c.endZ&&(se.value.push(m.diagramID),$.value.push(m),Xe.value.push(m.diagramID))}Te.value=se.value[0];let l=x.value.findIndex(g=>g.diagramID===se.value[0]);console.log("index",l,Te.value,x.value[l],"selectedObject",se.value[0]);let b=x.value[l],k=b.obj3D.position.clone(),T=b.obj3D.quaternion.clone();console.log("ogrot",T),I.value.inputs.selection=x.value[l],I.value.inputs.mode="translate",console.log("selectedObjects",se.value),console.log("obj",x.value[l]),$.value.forEach(g=>{let m=x.value.findIndex(_=>_.diagramID===g.diagramID);console.log("index",m,g.diagramID,x.value[m],"comp",z[m]),z[m].inputs.boundingBox=!0,console.log("comp boundingbox",z[m])});function f(){let g=b.obj3D.position.x-k.x,m=b.obj3D.position.z-k.z,_=b.obj3D.quaternion.clone().multiply(T.clone().invert());$.value.forEach(A=>{if(A!==b){let C={x:A.obj3D.position.x-b.obj3D.position.x,z:A.obj3D.position.z-b.obj3D.position.z},q=new J(C.x,0,C.z);q.applyQuaternion(_),A.obj3D.position.x=b.obj3D.position.x+q.x+g,A.obj3D.position.z=b.obj3D.position.z+q.z+m,A.obj3D.quaternion.multiplyQuaternions(_,A.obj3D.quaternion)}}),k.copy(b.obj3D.position),T.copy(b.obj3D.quaternion),ee.value=requestAnimationFrame(f),console.log("updatePositions",ee.value)}ee.value=requestAnimationFrame(f)}async function Ze(){$.value.forEach(c=>{let l=x.value.findIndex(b=>b.diagramID===c.diagramID);z[l].inputs.boundingBox=!1}),Te.value=null,$.value=[],se.value=[],Xe.value=[],I.value.inputs.selection=null,ee.value!==null&&(console.log("before cancelAnimationFrame",ee.value),cancelAnimationFrame(ee.value),console.log("after cancelAnimationFrame",ee.value),ee.value=null,console.log("finished cancelAnimationFrame",ee.value))}const Xe=S([]);async function ut(){await at("0x808080",.7)}async function Ot(c,l,b){if(window.confirm("Are you sure you want to delete this group?")){let k=e.diagramType;for(let T=0;T<Xe.value.length;T++){e.diagramType,p.value=[],G.value?p.value=G.value:p.value=[];let f=p.value.findIndex(g=>g.diagramID===Xe.value[T]);p.value.splice(f,1)}G.value=p.value,Ze(),lt(c,l,b),t.updateMaxSet(p.value,e.space.id,k),Me(p.value),Me(p.value)}}const gt=S(!1),Et=S("N"),zt=["N","S","E","W"],vt=()=>{gt.value=!1},Ht=()=>{console.log(Et.value),vt()};async function at(c,l){return new Promise((b,k)=>{console.log("usernavigation: ",t.inputComponent.inputs.userNavigationEnabled),t.inputComponent.inputs.userNavigationEnabled=!1,console.log("usernavigation: ",t.inputComponent.inputs.userNavigationEnabled),console.log("nav disabled");let T=0,f=!1,g=!1;s.value=null,u.value=null,d.value=null,h.value=null,console.log("Intersection count:",T);const m=Mo(()=>t.showcaseClickCount,(A,C)=>{A>C&&(f||(o.value=!0,console.log("isDragging:",t.showcaseClickCount),console.log("DragPoint",r.value,"count",T)),f&&!g&&(g=!0,m(),console.log("isDragging stopped click watch:",t.showcaseClickCount)),f=!0)});r.value=t.mpSdk.Pointer.intersection.subscribe(A=>{if(f&&!g&&!s.value)console.log("Point 1 first:",A.position),s.value=A.position.x,u.value=A.position.z,_(s.value,u.value,A.position.x,A.position.z,!1,c,l);else if(f&&!g&&s.value)console.log("Point 1:",s.value,"Dragging Point 2:",A.position),_(s.value,u.value,A.position.x,A.position.z,!1,c,l);else if(f&&g&&!d.value){d.value=A.position.x,h.value=A.position.z,console.log("Point 1:",s.value,u.value,"Point 2:",d.value,h.value),r.value.cancel(),_(s.value,u.value,d.value,h.value,!0,c,l),t.inputComponent.inputs.userNavigationEnabled=!0,console.log("usernavigation: ",t.inputComponent.inputs.userNavigationEnabled);const C=h.value-u.value,q=d.value-s.value,fe=Math.atan2(C,q),re=Math.round(fe*(180/Math.PI)),B=Math.round(re/90)*90;console.log("normalizedAngle",B);let V={startX:s.value,startZ:u.value,endX:d.value,endZ:h.value,widthX:Math.abs(d.value-s.value),depthZ:Math.abs(h.value-u.value)};s.value<d.value?(V.startX=s.value,V.endX=d.value):(V.startX=d.value,V.endX=s.value),u.value<h.value?(V.startZ=u.value,V.endZ=h.value):(V.startZ=h.value,V.endZ=u.value),console.log("arealog",V),console.log("diagramtemplatenode1",t.diagramtemplatenode),console.log("diagramtemplatenode2",t.diagramtemplatenode),b(V)}});async function _(A,C,q,fe,re,B,V){await t.mpSdk.Scene.registerComponents([{factory:ei(t.mpSdk),name:ti}]);try{t.diagramtemplateobject!=null&&(console.log("checking if obj null",t.diagramtemplateobject),t.diagramtemplateobject.stop(),t.diagramtemplateobject=null),t.diagramtemplateobject=(await t.mpSdk.Scene.createObjects(1))[0],t.diagramtemplatenode=await t.diagramtemplateobject.addNode(),console.log("trying to add box"),v.value=t.diagramtemplatenode.addComponent("mp.box",{width:Math.abs(q-A),height:.4,depth:Math.abs(fe-C),color:B,opacity:V??.3,localScale:{x:1,y:1,z:1},localPosition:{x:(q+A)/2,y:.1,z:(fe+C)/2},localRotation:{x:0,y:0,z:0}}),console.log("component added",t.diagramtemplatenode,v.value),t.diagramtemplateobject.start()}catch(ne){console.error("Error adding box to Matterport scene:",ne)}re&&(t.diagramtemplatenode.stop(),t.diagramtemplatenode=null)}})}async function He(c,l,b,k,T,f){console.log("adding diagram with",c,l,b,k,T,"gltf val1",y.value);let g;k?g=dt(k):g=await at("0x00ff00");let m=ue.value*.0254;console.log("serPer",m,ue.value,g,"area start",g.startX,g.startZ),g.startX=g.startX+m,g.startZ=g.startZ+m,g.endZ=g.endZ-m,g.endX=g.endX-m,console.log(g,"area with serPer",g.startX,g.startZ),console.log("area1",g,"square area",g.widthX*g.depth
6Z),g.widthX=Math.abs(g.startX-g.endX),g.depthZ=Math.abs(g.startZ-g.endZ),console.log("area2",g,"square area",g.widthX*g.depthZ),console.log("add diagram",c,l,b);let _=b,A=ot();console.log("diagramID",A),p.value=[],console.log("maxsetarray",G.value,"diagramset",p.value),G.value||(G.value=[]),G.value?p.value=G.value:p.value=[],console.log("maxsetarray2",G.value,"diagramset2",p.value);let C=g.startX,q=g.startZ;_e.value*(Math.PI/180);let fe=g.widthX,re=g.depthZ;try{let B=Ae.value*.0254,V=oe.value*.0254,ne=be.value*.0254,W=ze.value*.0254,Z;T?Z=T:Z=prompt("Please enter the direction of the area (N, S, E, W)","N"),g.direction=Z,console.log("area",g,"roomdir",T,"roomarea",k);let Ft,tt,Ve,Pe,mn;console.log(g.direction),(g.direction=="N"||g.direction=="n")&&(Ft=new Le().setFromAxisAngle(new J(0,1,0),-Math.PI/2),tt=y.value.size.z+B,Pe=y.value.size.x+V),(g.direction=="S"||g.direction=="s")&&(Ft=new Le().setFromAxisAngle(new J(0,1,0),Math.PI/2),tt=y.value.size.z+B,Pe=y.value.size.x+V),(g.direction=="E"||g.direction=="e")&&(Ft=new Le().setFromAxisAngle(new J(0,1,0),Math.PI),B=oe.value*.0254,V=Ae.value*.0254,ne=ze.value*.0254,W=be.value*.0254,tt=y.value.size.x+B,Pe=y.value.size.z+V),(g.direction=="W"||g.direction=="w")&&(Ft=new Le().setFromAxisAngle(new J(0,1,0),0),B=oe.value*.0254,V=Ae.value*.0254,ne=ze.value*.0254,W=be.value*.0254,tt=y.value.size.x+B,Pe=y.value.size.z+V),(pe.value*tt>fe||ye.value*Pe>re)&&console.log("Too many objects for the area");let We=fe/(pe.value*tt+ne),Ke=re/(ye.value*Pe+W),pt=We-Math.floor(We),ht=Ke-Math.floor(Ke),Fe=Math.max(1,fe/(pe.value*tt+ne)),$e=Math.max(1,re/(ye.value*Pe+W));console.log("requested hori",pe.value,"blockCountHor",Fe,"blockCountVert",$e,"remainHor",pt,"remainVert",ht),Ve=pe.value,mn=ye.value;let Qe=[];if(console.log("tableType",y.value.tableType),y.value.tableType=="roun
6d"||y.value.tableType=="classroom"||y.value.tableType=="crescent"||y.value.tableType=="theater")for(let H=0;H<$e;H++)for(let Ie=0;Ie<Fe;Ie++)for(let Re=0;Re<mn;Re++)for(let it=0;it<Ve;it++){let wt=Ft,bt=ot(),Je={position:{x:it*tt+ne*Ie+Ve*tt*Ie+(C+tt/2),y:.05,z:Re*Pe+W*H+mn*Pe*H+(q+Pe/2)},scale:{x:1,y:1,z:1},quaternion:{x:wt.x,y:wt.y,z:wt.z,w:wt.w},boundingBox:!1,url:y.value.url,seats:y.value.seats,tableType:y.value.tableType,tableChairs:y.value.tableChairs,size:y.value.size,materialColor:"white",diagramID:bt};Qe.push(Je),console.log("new params",Je),Je={}}if(y.value.tableType=="conference"||y.value.tableType=="ushape"||y.value.tableType=="hollowsquare"){let Ue=function(he){if(he=="n"||he=="s")return he="e";if(he=="e"||he=="w")return he="n"},rt=function(he,we,me,Oe,Ee,ct,nt,et,Gt,Tt,Mt){let ge,K,Ye=Oe+fe/2,Se=Ee+re/2;return me==="n"||me==="s"?(Ee=Se-Tt-y.value.size.x/2,Oe=Oe+Mt+fe/et/2+y.value.size.z/2,ge=he*ct+(Oe+ct/2),K=we*nt+(Ee+nt/2)):(Oe=Ye-Tt-y.value.size.x/2,Ee=Ee+Mt+re/Gt/2+y.value.size.z/2,ge=he*ct+(Oe+ct/2),K=we*nt+(Ee+nt/2)),{x:ge,y:.05,z:K}},At=function(he,we,me){let Oe,Ee,ct;return(he==="n"||he==="s")&&(ct=re,Ee=Math.floor(re/y.value.size.z)),(he==="e"||he==="w")&&(ct=fe,Ee=Math.floor(fe/y.value.size.z)),y.value.tableType=="conference"&&((he==="n"||he==="s")&&(Oe=y.value.size.x/2),(he==="e"||he==="w")&&(Oe=-(y.value.size.x/2))),(y.value.tableType=="hollowsquare"||y.value.tableType=="ushape")&&(Oe=(y.value.size.z*Ee-y.value.size.x)/2),console.log("tableOffset",he,we,"oppTable",Ee,"tableOpp",Math.floor(me),Oe),Oe},H,Ie,Re;switch(g.direction.toLowerCase()){case"n":Re=new Le().setFromAxisAngle(new J(0,1,0),-Math.PI/2),H=Math.floor(Fe-1),Ie=1;break;case"s":Re=new Le().setFromAxisAngle(new J(0,1,0),-Math.PI/2),H=Math.floor(Fe-1),Ie=1;break;case"e":Re=new Le().setFromAxisAngle(new J(0,1,0),Math.PI),H=1,Ie=Math.floor($e-1);break;case"w":Re=new Le().setFromAxisAngle(new J(0,1,0),Math.PI),H=1,Ie=Math.floor($e-1);break}let it=new Le().setFromAxisAngle(new J(0,1,0),-Math.PI/2),wt=new Le().setFromAxisAngle(new J(0,1,0),Math.PI/2),bt=new Le().setFromAxisAngle(new J(0,1,0),Math.PI),Je=Re.clone().multiply(bt),gn=Re.clone().multiply(it),vn=Re.clone().multiply(wt);if(y.value.tableType=="conference")for(let he=0;he<Ie;he++)for(let we=0;we<H;we++){console.log("conX",H,"conZ",Ie);const me=rt(we,he,g.direction.toLowerCase(),C,q,tt,Pe,H,Ie,-At(g.direction.toLowerCase(),!0,H),0);let Oe=ot(),Ee={position:{x:me.x,y:.05,z:me.z},scale:{x:1,y:1,z:1},quaternion:{x:Re.x,y:Re.y,z:Re.z,w:Re.w},boundingBox:!1,url:y.value.url,seats:y.value.seats,tableType:y.value.tableType,tableChairs:y.value.tableChairs,size:y.value.size,materialColor:"white",diagramID:Oe};Qe.push(Ee),console.log("new params",Ee),Ee={}}if(y.value.tableType=="conference")for(let he=0;he<Ie;he++)for(let we=0;we<H;we++){const me=rt(we,he,g.direction.toLowerCase(),C,q,tt,Pe,H,Ie,At(g.direction.toLowerCase(),!0,H),0);let Oe=ot(),Ee={position:{x:me.x,y:.05,z:me.z},scale:{x:1,y:1,z:1},quaternion:{x:Je.x,y:Je.y,z:Je.z,w:Je.w},boundingBox:!1,url:y.value.url,seats:y.value.seats,tableType:y.value.tableType,tableChairs:y.value.tableChairs,size:y.value.size,materialColor:"white",diagramID:Oe};Qe.push(Ee),console.log("new params",Ee),Ee={}}if(y.value.tableType=="ushape"||y.value.tableType=="hollowsquare"){let Oe=function(ge,K,Ye){console.log("setPos",K);let Se,yt;return(g.direction.toLowerCase()=="n"||g.direction.toLowerCase()=="s")&&(K=="n"&&(Se=C+(fe-we*y.value.size.z)/2+ge*y.value.size.z+y.value.size.z/2,yt=q+re-(re-y.value.size.x-me*y.value.size.z)/2+y.value.size.x/2),K=="s"&&(Se=C+(fe-we*y.value.size.z)/2+ge*y.value.size.z+y.value.size.z/2,yt=q+(re-y.value.size.x-me*y.value.size.z)/2+y.value.size.x/2),K=="e"&&(Se=C+y.value.size.x/2+(fe-we*y.value.size.z)/2,yt=q+(re-y.value.size.x-me*y.value.size.z)/2+y.value.size.x/2+y.value.size.x/2+y.value.size.z/2+ge*y.value.size.z),K=="w"&&(Se=C+fe-y.value.size.x/2-(fe-we*y.value.size.z)/2,yt=q+(re-y.value.size.x-me*y.value.size.z)/2+y.value.size.x/2+y.value.size.x/2+y.value.size.z/2+ge*y.value.size.z)),(g.direction.toLowerCase()=="e"||g.direction.toLowerCase()=="w")&&(K=="n"&&(Se=C+(fe-we*y.value.size.z)/2+ge*y.value.size.z+y.value.size.z/2,yt=q+re-(re-y.value.size.x-me*y.value.size.z)/2+y.value.size.x/2),K=="s"&&(Se=C+(fe-we*y.value.size.z)/2+ge*y.value.size.z+y.value.size.z/2,yt=q+(re-y.value.size.x-me*y.value.size.z)/2+y.value.size.x/2),K=="e"&&(Se=C+y.value.size.x/2+(fe-we*y.value.size.z)/2,yt=q+(re-y.value.size.x-me*y.value.size.z)/2+y.value.size.x/2+y.value.size.x/2+y.value.size.z/2+ge*y.value.size.z),K=="w"&&(Se=C+fe-y.value.size.x/2-(fe-we*y.value.size.z)/2,yt=q+(re-y.value.size.x-me*y.value.size.z)/2+y.value.size.x/2+y.value.size.x/2+y.value.size.z/2+ge*y.value.size.z)),{x:Se,y:.05,z:yt}},Ee=function(ge){let K=ge;if(K=="n")return K="s",K;if(K=="e")return K="w",K;if(K=="s")return K="n",K;if(K=="w")return K="e",K;console.log("settingDir180",K)},ct=function(ge){let K=ge;if(K=="n")return K="e",K;if(K=="e")return K="s",K;if(K=="s")return K="w",K;if(K=="w")return K="n",K;console.log("settingDir90",K)},nt=function(ge){let K=ge;if(K=="n")return K="w",K;if(K=="w")return K="s",K;if(K=="s")return K="e",K;if(K=="e")return K="n",K},he,we,me;y.value.tableType=="ushape"?he=3:he=4,(g.direction.toLowerCase()=="n"||g.direction.toLowerCase()=="s")&&(we=Math.floor(fe/y.value.size.z)-1,me=Math.floor((re-y.value.size.x)/y.value.size.z)-1,console.log("dir n/s","numX, numZ",we,me)),(g.direction.toLowerCase()=="e"||g.direction.toLowerCase()=="w")&&(we=Math.floor(fe/y.value.size.z)-1,me=Math.floor((re-y.value.size.x)/y.value.size.z)-1,console.log("dir e/w","numX, numZ",we,me));let et,Gt,Tt,Mt;(g.direction.toLowerCase()=="n"||g.direction.toLowerCase()=="s")&&(et=we,Mt=we,Gt=me,Tt=me),(g.direction.toLowerCase()=="w"||g.direction.toLowerCase()=="e")&&(et=me,Mt=me,Gt=we,Tt=we),(g.direction.toLowerCase()=="s"||g.direction.toLowerCase()=="w")&&(Re=Re.clone().multiply(bt),Je=Re.clone().multiply(bt),gn=Re.clone().multiply(it),vn=Re.clone().multiply(wt));for(let ge=0;ge<et;ge++){let K=ot(),Ye=Oe(ge,g.direction.toLowerCase()),Se={position:{x:Ye.x,y:.05,z:Ye.z},scale:{x:1,y:1,z:1},quaternion:{x:Re.x,y:Re.y,z:Re.z,w:Re.w},boundingBox:!1,url:y.value.url,seats:y.value.seats,tableType:y.value.tableType,tableChairs:y.value.tableChairs,size:y.value.size,materialColor:"white",diagramID:K};Qe.push(Se),console.log("new params",Se),Se={}}for(let ge=0;ge<Gt;ge++){let K=ot(),Ye=Oe(ge,nt(g.direction.toLowerCase())),Se={position:{x:Ye.x,y:.05,z:Ye.z},scale:{x:1,y:1,z:1},quaternion:{x:vn.x,y:vn.y,z:vn.z,w:vn.w},boundingBox:!1,url:y.value.url,seats:y.value.seats,tableType:y.value.tableType,tableChairs:y.value.tableChairs,size:y.value.size,materialColor:"white",diagramID:K};Qe.push(Se),console.log("new params",Se),Se={}}for(let ge=0;ge<Tt;ge++){let K=ot(),Ye=Oe(ge,ct(g.direction.toLowerCase())),Se={position:{x:Ye.x,y:.05,z:Ye.z},scale:{x:1,y:1,z:1},quaternion:{x:gn.x,y:gn.y,z:gn.z,w:gn.w},boundingBox:!1,url:y.value.url,seats:y.value.seats,tableType:y.value.tableType,tableChairs:y.value.tableChairs,size:y.value.size,materialColor:"white",diagramID:K};Qe.push(Se),console.log("new params",Se),Se={}}if(y.value.tableType=="hollowsquare")for(let ge=0;ge<Mt;ge++){let K=ot(),Ye=Oe(ge,Ee(g.direction.toLowerCase())),Se={position:{x:Ye.x,y:.05,z:Ye.z},scale:{x:1,y:1,z:1},quaternion:{x:Je.x,y:Je.y,z:Je.z,w:Je.w},boundingBox:!1,url:y.value.url,seats:y.value.seats,tableType:y.value.tableType,tableChairs:y.value.tableChairs,size:y.value.size,materialColor:"white",diagramID:K};Qe.push(Se),console.log("new params",Se),Se={}}}}console.log("overflowArray",Qe,"area",g);for(let H=Qe.length-1;H>=0;H--){let Ie=Qe[H].position;(Ie.x>g.startX+g.widthX||Ie.z>g.startZ+g.depthZ||Ie.x<g.startX||Ie.z<g.startZ)&&(console.log("splicing because overflow","pos x",Ie.x,">",g.startX+g.widthX," or pos z",Ie.z,">",g.startZ+g.depthZ,"or pos.x",Ie.x,"<",g.startX,"or pos.z",Ie.z,"<",g.startZ),Qe.splice(H,1))}Qe.forEach(H=>{p.value.push(H)});for(let H=p.value.length-1;H>=0;H--)if(p.value[H].tableChairs>0){let Ie={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},Re=p.value[H].position.x,it=p.value[H].position.y,wt=p.value[H].position.z,bt=p.value[H].tableChairs,Je=(p.value[H].size.x+Ie.size.x)/1.95,gn=p.value[H].size.x,vn=p.value[H].size.z;
6if(p.value[H].tableType=="round"&&!p.value[H].tableID)for(let Ue=0;Ue<p.value[H].tableChairs;Ue++){let rt={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},At=ot(),he=-2*Math.PI/bt*Ue,we=2*Math.PI/bt*Ue,me=new Le().setFromAxisAngle(new J(0,1,0),we),Oe={position:{x:Re+Je*Math.cos(he),y:p.value[H].position.y,z:wt+Je*Math.sin(he)},scale:{x:1,y:1,z:1},quaternion:{x:me.x,y:me.y,z:me.z,w:me.w},boundingBox:!1,url:rt.url,seats:rt.seats,tableType:rt.tableType,tableChairs:rt.tableChairs,tableID:p.value[H].diagramID,size:rt.size,materialColor:"white",diagramID:At};p.value.push(Oe),Oe={}}if(p.value[H].tableType=="classroom"&&!p.value[H].tableID){let Ue=Ft,rt=_e.value*(Math.PI/180),At=p.value[H].size.z,he=p.value[H].size.x,we=p.value[H].position.x,me=p.value[H].position.z,Oe={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},Ee=p.value[H].tableChairs,ct=he/1.25;for(let nt=0;nt<p.value[H].tableChairs;nt++){let et={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},Gt=ot(),Tt,Mt,ge=(At-et.size.x*Ee)/Ee,K=et.size.x,Ye=K/2+ge/2,Se=Ye+nt*K+ge;switch(nt==0&&(Se=Ye+nt*K+ge/2),nt==p.value[H].tableChairs-1&&(Se=Ye+nt*K+ge/2),g.direction.toLowerCase()){case"n":Tt=we-At/2+Se,Mt=me+he/2+ct;break;case"s":Tt=we-At/2+Se,Mt=me-he/2-ct;break;case"e":Tt=we-he/2-ct,Mt=me+At/2-Se;break;case"w":Tt=we+he/2+ct,Mt=me-At/2+Se;break}let yt={position:{x:Tt,y:p.value[H].position.y,z:Mt},scale:{x:1,y:1,z:1},quaternion:{x:Ue.x,y:Ue.y,z:Ue.z,w:Ue.w},boundingBox:!1,url:et.url,seats:et.seats,tableType:et.tableType,tableChairs:et.tableChairs,tableID:p.value[H].diagramID,size:et.size,materialColor:"white",diagramID:Gt};p.value.push(yt),yt={}}}if((p.value[H].tableType=="conference"||p.value[H].tableType=="ushape"||p.value[H].tableType=="hollowsquare")&&!p.value[H].tableID){let Ue=p.value[H].quaternion,rt=_e.value*(Math.PI/180),At=p.value[H].size.z,he=p.value[H].size.x,we=p.value[H].position.x,me=p.value[H].position.z,Oe={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},Ee=p.value[H].tableChairs,ct=he;for(let nt=0;nt<p.value[H].tableChairs;nt++){let et={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},Gt=ot(),Tt,Mt,ge=new J(p.value[H].size.x,p.value[H].size.y,p.value[H].size.z),K=(ge.z-et.size.z*Ee)/Ee,Ye=et.size.x;nt==0||nt==p.value[H].tableChairs-1?K=(ge.z-Ye*Ee)/Ee/2:K=(ge.z-Ye*Ee)/Ee;let Se=new Le(Ue.x,Ue.y,Ue.z,Ue.w),yt=new J(we,p.value[H].position.y,me),fa=-(ge.z/2)+Ye/2+nt*(Ye+K),Xo=new J(ct,0,fa);Xo.applyQuaternion(Se);let Vo=Xo.add(yt),Ho={position:{x:Vo.x,y:p.value[H].position.y,z:Vo.z},scale:{x:1,y:1,z:1},quaternion:{x:Ue.x,y:Ue.y,z:Ue.z,w:Ue.w},boundingBox:!1,url:et.url,seats:et.seats,tableType:et.tableType,tableChairs:et.tableChairs,tableID:p.value[H].diagramID,size:et.size,materialColor:"white",diagramID:Gt};p.value.push(Ho),Ho={}}}if(p.value[H].tableType=="crescent"&&!p.value[H].tableID)for(let Ue=0;Ue<p.value[H].tableChairs;Ue++){let rt={name:"grayChairLOD2",url:"https://firebasestorage.googleapis.com/v0/b/selfwalksigniabonnetcreek-dev.appspot.com/o/Chair2020.glb?alt=media&token=2567ce39-24dc-486e-a62d-e88652e2afbc",loader:"",tableType:"",tableChairs:0,type:"",seats:1,size:{x:.608,y:.983,z:.506}},At=ot(),he;switch(g.direction.toLowerCase()){case"n":he=-1*Math.PI/(p.value[H].tableChairs-1)*Ue-Math.PI;break;case"s":he=1*Math.PI/(p.value[H].tableChairs-1)*Ue-Math.PI;break;case"e":he=-1*Math.PI/(p.value[H].tableChairs-1)*Ue-Math.PI/2;break;case"w":he=1*Math.PI/(p.value[H].tableChairs-1)*Ue-Math.PI/2;break}let we=2*Math.PI/bt*Ue,me=Ft,Oe={position:{x:Re+Je*Math.cos(he),y:p.value[H].position.y,z:wt+Je*Math.sin(he)},scale:{x:1,y:1,z:1},quaternion:{x:me.x,y:me.y,z:me.z,w:me.w},boundingBox:!1,url:rt.url,seats:rt.seats,tableType:rt.tableType,tableChairs:rt.tableChairs,tableID:p.value[H].diagramID,size:rt.size,materialColor:"white",diagramID:At};p.value.push(Oe),Oe={}}p.value[H].tableID=p.value[H].diagramID}G.value=p.value,console.log("New wall params added:",A,p.value,G.value),lt(c,l,b),t.updateMaxSet(p.value,e.space.id,_),console.log("New wall params added:",p.value),f?
6console.log("not showing diagrams created"):(Me(p.value),Me(p.value))}catch(B){console.error("Error in addWall function:",B)}}async function ce(c,l,b,k,T,f,g,m,_,A){let C=t.diagramObjects.find(it=>it.name==="stage6ftx8ft"),q=m;console.log("area",q);let fe=_;f||(k=0,T=0),console.log("screenside",g),q.direction=fe,console.log("area",q),console.log("add diagram",c,l,b);let re=b,B=ot();p.value=[],G.value||(G.value=[]),G.value?p.value=G.value:p.value=[];let V=q.startX,ne=q.startZ;_e.value*(Math.PI/180);let W=q.widthX,Z=q.depthZ,Ft=ot(),tt,Ve,Pe,mn=t.diagramObjects.find(it=>it.name==="screentripod"),We,Ke,pt,ht,Fe,$e,Qe,H,Ie;switch((q.direction.toLowerCase()=="s"||q.direction.toLowerCase()=="n")&&(k?Ve=k:Ve=0,T?Pe=T:Pe=0),(q.direction.toLowerCase()=="w"||q.direction.toLowerCase()=="e")&&(k?Ve=T:Ve=0,T?Pe=k:Pe=0),q.direction.toLowerCase()){case"n":tt=new Le().setFromAxisAngle(new J(0,1,0),-Math.PI/2),Ie=tt,Fe=C.size.z,$e=C.size.x,Qe=V-C.size.z/2+C.size.z*Ve/2,H=ne-C.size.x/2+C.size.x*Pe/2,We=Qe,Ke=H-$e/2+.24,pt=V+(W-Fe*Ve)/2,ht=ne+$e/2,f&&(g=="left"&&(We=pt-Fe*.5-1.9),g=="right"&&(We=pt+Fe*(Ve-.5)+1.9),g=="center"&&(Ke=ne+.5,We=pt-Fe*.5+Fe*(Ve/2))),f||(Ke=ne+.5,We=pt-Fe*.5+Fe*(Ve/2));break;case"s":tt=new Le().setFromAxisAngle(new J(0,1,0),Math.PI/2),Ie=tt,Fe=C.size.z,$e=C.size.x,Qe=V-C.size.z/2+C.size.z*Ve/2,H=ne-C.size.x/2+C.size.x*Pe/2,We=Qe,Ke=H-C.size.x/2+C.size.x*Pe/2,pt=V+(W-Fe*Ve)/2,ht=ne+Z-$e*Pe+$e/2,f&&(g=="left"&&(We=pt-Fe*.5-1.9,Ke=ne+Z-.5),g=="right"&&(We=pt+Fe*(Ve-.5)+1.9,Ke=ne+Z-.5),g=="center"&&(Ke=ne+Z-.5,We=pt-Fe*.5+Fe*(Ve/2))),f||(Ke=ne+Z-.5,We=pt-Fe*.5+Fe*(Ve/2));break;case"e":tt=new Le().setFromAxisAngle(new J(0,1,0),Math.PI),Ie=new Le().setFromAxisAngle(new J(0,1,0),0),Fe=C.size.x,$e=C.size.z,Qe=V-C.size.x/2+C.size.x*Ve/2,H=ne-C.size.z/2+C.size.z*Pe/2,We=Qe+C.size.x/2-C.size.x*Ve/2+.25,Ke=H,pt=V+Fe/2,ht=ne+(Z-$e*Pe)/2,f&&(g=="left"&&(Ke=ht+$e*(Pe-.5)+1.9),g=="right"&&(Ke=ht-$e*.5-1.9),g=="center"&&(Ke=ht+$e*(Pe/2)-$e*.5,We=V+.5)),f||(Ke=ht+$e*(Pe/2)-$e*.5,We=V+.5);break;case"w":tt=new Le().setFromAxisAngle(new J(0,1,0),0),Ie=new Le().setFromAxisAngle(new J(0,1,0),Math.PI),Fe=C.size.x,$e=C.size.z,Qe=V-C.size.x/2+C.size.x*Ve/2,H=ne-C.size.z/2+C.size.z*Pe/2,We=Qe+C.size.x/2+C.size.x*Ve/2,Ke=H,pt=V+W-Fe*Ve+Fe/2,ht=ne+(Z-$e*Pe)/2,f&&(g=="right"&&(Ke=ht+$e*(Pe-.5)+1.9,We=V+W-.5),g=="left"&&(Ke=ht-$e*.5-1.9,We=V+W-.5),g=="center"&&(Ke=ht-$e*.5+$e*(Pe/2),We=V+W-.5)),f||(Ke=ht-$e*.5+$e*(Pe/2),We=V+W-.5);break}console.log("positions","initialX",V,"initialZ",ne,"stageNumEleWidth","stageNumEleDepth","templateWidth","templateDepth",Ve,Pe,W,Z);for(let it=0;it<Ve;it++)for(let wt=0;wt<Pe;wt++){let bt=tt,Je={position:{x:Fe*it+pt,y:.05,z:$e*wt+ht},scale:{x:1,y:1,z:1},quaternion:{x:bt.x,y:bt.y,z:bt.z,w:bt.w},boundingBox:!1,url:C.url,seats:C.seats,materialColor:"white",diagramID:Ft};p.value.push(Je),Je={}}let Re={position:{x:We,y:.05,z:Ke},scale:{x:1,y:1,z:1},quaternion:{x:Ie.x,y:Ie.y,z:Ie.z,w:Ie.w},boundingBox:!1,url:mn.url,seats:mn.seats,materialColor:"white",diagramID:Ft};p.value.push(Re),Re={};try{G.value=p.value,console.log("New wall params added:",B,p.value,G.value),lt(c,l,b),t.updateMaxSet(p.value,e.space.id,re),console.log("New wall params added:",p.value)}catch(it){console.error("Error in addWall function:",it)}G.value=p.value,console.log("New wall params added:",B,p.value,G.value),A?console.log("not showing diagrams created"):(Me(p.value),Me(p.value))}function Nt(c,l,b,k){if(window.confirm("Are you sure you want to remove this diagram?")){let T=b;p.value=[],G.value?p.value=G.value:p.value=[];for(let f=0;f<p.value.length;f++)if(p.value[f].diagramID===k){p.value.splice(f,1);break}G.value=p.value,lt(c,l,b),t.updateMaxSet(p.value,e.space.id,T),Me(p.value),Me(p.value)}}function dt(c){if(c===null||typeof c!="object")return c;let l=Array.isArray(c)?[]:{};for(let b in c)c.hasOwnProperty(b)&&(l[b]=dt(c[b]));return l}async function lt(c,l,b){let k=0;for(let T=0;T<p.value.length;T++)k+=p.value[T].seats;c.capacities[b]=k,n(l,"capacities",c.capacities)}async function Dt(c,l,b){let k=b;p.value=[];for(let T=0;T<x.value.length;T++){let f={position:{x:x.value[T].obj3D.position.x,y:x.value[T].obj3D.position.y,z:x.value[T].obj3D.position.z},rotation:{x:x.value[T].obj3D.rotation.x,y:x.value[T].obj3D.rotation.y,z:x.value[T].obj3D.rotation.z},quaternion:{x:x.value[T].obj3D.quaternion.x,y:x.value[T].obj3D.quaternion.y,z:x.value[T].obj3D.quaternion.z,w:x.value[T].obj3D.quaternion.w},scale:{x:x.value[T].obj3D.scale.x,y:x.value[T].obj3D.scale.y,z:x.value[T].obj3D.scale.z},boundingBox:x.value[T].boundingBox,url:x.value[T].url,seats:x.value[T].seats,diagramID:x.value[T].diagramID};p.value.push(f)}console.log("diagramSet.value",p.value,G.value),G.value=p.value,lt(c,l,b),t.updateMaxSet(p.value,e.space.id,k)}function $t(c,l,b,k){let T=b;p.value=[],G.value?p.value=G.value:p.value=[];for(let f=0;f<p.value.length;f++)if(p.value[f].diagramID===k){let g=ot();console.log("newID",g);let m={...p.value[f],diagramID:g};p.value.push(m);break}G.value=p.value,t.updateMaxSet(p.value,e.space.id,T),Me(p.value),Me(p.value)}function ae(c){return new Promise(l=>setTimeout(l,c))}async function qt(c,l,b){let k=["N","S","E","W"],T=window.confirm("Is the Ceiling Tall? Confirm to use Risers, cancel to skip risers."),f=c.maxSetArea||await at("0x00ff00"),g=!1;if(c.maxSetArea?g=!0:g=window.confirm("Is Area box good?"),g){for(let m of k)await F(c,l,f,m,T),await ae(3e3),await L(c,l,f,m),await ae(3e3);alert("Diagrams created!")}}async function F(c,l,b,k,T){let f=!1;b?f=!0:window.confirm("Is Area box good?")||(b=await at("0x00ff00")),t.diagramObjects.find(m=>m.name==="screentripod");let g=t.diagramObjects.find(m=>m.name==="stage6ftx8ft");if(f){let m=dt(b),_=dt(b);console.log("avarea2",_);
6let A=dt(b),C,q,fe=b.widthX*b.depthZ*10.76391042,re,B=k??prompt("Please enter the direction of the area (N, S, E, W)","N").toUpperCase(),V=T??window.confirm("Is the Ceiling Tall? Confirm to use Risers, cancel to skip risers.");fe>6e3&&(re=30,C=3,V?q=g.size.z*2:q=g.size.z*1),fe>3e3&&fe<6e3&&(re=30,C=2,V?q=g.size.z*2:q=g.size.z*1),fe<=3e3&&(re=20,C=1,V?q=g.size.z*2:q=g.size.z*1);let ne=dt(b);console.log("roomsetarea",ne);let W,Z=re*.0254;B.toLowerCase()=="n"&&(ne.startZ=ne.startZ+q,ne.depthZ=Math.abs(ne.startZ-ne.endZ),W="n",ne.widthX-Z*2<50&&(C=2),ne.widthX-Z*2<30&&(C=1),C==3&&(m.startX=m.startX+g.size.x+Z,m.endX=m.endX-Z-(m.widthX-2*Z)/C*(C-1),m.endZ=m.startZ+q,m.widthX=Math.abs(m.endX-m.startX),m.depthZ=Math.abs(m.endZ-m.startZ),_.startX=_.startX+Z+(_.widthX-2*Z)/C*(C-2),_.endX=_.endX-Z-(_.widthX-2*Z)/C*(C-2),_.endZ=_.startZ+q,_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ),A.startX=A.startX+(A.widthX-2*Z)/C*(C-1),A.endX=A.endX-Z,A.endZ=A.startZ+q,A.widthX=Math.abs(A.endX-A.startX),A.depthZ=Math.abs(A.endZ-A.startZ)),C==2&&(m.startX=m.startX+g.size.x+Z,m.endX=m.endX-Z-(m.widthX-2*Z)/C*(C-1),m.endZ=m.startZ+q,m.widthX=Math.abs(m.endX-m.startX),m.depthZ=Math.abs(m.endZ-m.startZ),_.startX=_.startX+Z+(_.widthX-2*Z)/C*(C-2),_.endX=_.endX-(_.widthX-2*Z)/C*(C-2),_.endZ=_.startZ+q,_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ),A.startX=A.startX+Z+(A.widthX-2*Z)/C*(C-1),A.endX=A.endX-Z,A.endZ=A.startZ+q,A.widthX=Math.abs(A.endX-A.startX),A.depthZ=Math.abs(A.endZ-A.startZ)),C==1&&(m.startX=m.startX+g.size.x,m.endX=m.endX,m.endZ=m.startZ+q,m.widthX=Math.abs(m.endX-m.startX),m.depthZ=Math.abs(m.endZ-m.startZ)),console.log("avarea2 after north",_,"screennum",C),console.log("roomsetarea after north",ne)),B.toLowerCase()=="s"&&(ne.endZ=ne.endZ-q,ne.depthZ=Math.abs(ne.startZ-ne.endZ),W="s",ne.widthX-Z*2<50&&(C=2),ne.widthX-Z*2<30&&(C=1),C==3&&(m.startX=m.startX+g.size.x+Z,m.endX=m.endX-Z-(m.widthX-2*Z)/C*(C-1),m.startZ=m.endZ-q,m.widthX=Math.abs(m.endX-m.startX),m.depthZ=Math.abs(m.endZ-m.startZ),_.startX=_.startX+Z+(_.widthX-2*Z)/C*(C-2),_.endX=_.endX-Z-(_.widthX-2*Z)/C*(C-2),_.startZ=_.endZ-q,_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ),A.startX=A.startX+(A.widthX-2*Z)/C*(C-1),A.endX=A.endX-Z,A.startZ=A.endZ-q,A.widthX=Math.abs(A.endX-A.startX),A.depthZ=Math.abs(A.endZ-A.startZ)),C==2&&(m.startX=m.startX+g.size.x+Z,m.endX=m.endX-Z-(m.widthX-2*Z)*(C-1),m.startZ=m.endZ-q,m.widthX=Math.abs(m.endX-m.startX),m.depthZ=Math.abs(m.endZ-m.startZ),_.startX=_.startX+Z+(_.widthX-2*Z)/C*(C-2),_.endX=_.endX-(_.widthX-2*Z)/C*(C-2),_.startZ=_.endZ-q,_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ),A.startX=A.startX+Z+(A.widthX-2*Z)/C*(C-1),A.endX=A.endX-Z,A.startZ=A.endZ-q,A.widthX=Math.abs(A.endX-A.startX),A.depthZ=Math.abs(A.endZ-A.startZ)),C==1&&(m.startX=m.startX+g.size.x,m.endX=m.endX,m.startZ=m.endZ-q,m.widthX=Math.abs(m.endX-m.startX),m.depthZ=Math.abs(m.endZ-m.startZ))),B.toLowerCase()=="w"&&(ne.startX=ne.startX+q,ne.widthX=Math.abs(ne.startX-ne.endX),W="e",ne.depthZ-Z*2<50&&(C=2),ne.depthZ-Z*2<30&&(C=1),C==3&&(A.endX=A.startX+q,A.startZ=A.startZ+g.size.x+Z,A.endZ=A.endZ-Z-(A.depthZ-2*Z)/C*(C-1),A.widthX=Math.abs(A.endX-A.startX),A.depthZ=Math.abs(A.endZ-A.startZ),_.endX=_.startX+q,_.startZ=_.startZ+Z+(_.depthZ-2*Z)/C*(C-2),_.endZ=_.endZ-Z-(_.depthZ-2*Z)/C*(C-2),_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ),m.startZ=m.startZ+(m.depthZ-2*Z)/C*(C-1),m.endZ=m.endZ-Z,m.endX=m.startX+q,m.widthX=Math.abs(m.endX-m.startX),m.depthZ=Math.abs(m.endZ-m.startZ)),C==2&&(A.endX=A.startX+q,A.startZ=A.startZ+g.size.x+Z,A.endZ=A.endZ-(A.depthZ-2*Z)/C*(C-1),A.widthX=Math.abs(A.endX-A.startX),A.depthZ=Math.abs(A.endZ-A.startZ),_.endX=_.startX+q,_.startZ=_.startZ+Z+(_.depthZ-2*Z)/C*(C-2),_.endZ=_.endZ-Z-(_.depthZ-2*Z)/C*(C-2),_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ),m.startZ=m.startZ+Z+(m.depthZ-2*Z)/C*(C-1),m.endZ=m.endZ-Z,m.endX=m.startX+q,m.widthX=Math.abs(m.endX-m.startX),m.depthZ=Math.abs(m.endZ-m.startZ)),C==1&&(m.endX=m.startX+q,m.startZ=m.startZ+g.size.x,m.endZ=m.endZ,m.widthX=Math.abs(m.endX-m.startX),m.depthZ=Math.abs(m.endZ-m.startZ))),B.toLowerCase()=="e"&&(ne.endX=ne.endX-q,ne.widthX=Math.abs(ne.startX-ne.endX),W="w",ne.depthZ-Z*2<50&&(C=2),ne.depthZ-Z*2<30&&(C=1),C==3&&(m.startX=m.endX-q,m.startZ=m.startZ+g.size.x+Z,m.endZ=m.endZ-Z-(m.depthZ-2*Z)/C*(C-1),m.widthX=Math.abs(m.endX-m.startX),m.depthZ=Math.abs(m.endZ-m.startZ),_.startX=_.endX-q,_.startZ=_.startZ+Z+(_.depthZ-2*Z)/C*(C-2),_.endZ=_.endZ-Z-(_.depthZ-2*Z)/C*(C-2),_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ),A.startZ=A.startZ+(A.depthZ-2*Z)/C*(C-1),A.endZ=A.endZ-Z,A.startX=A.endX-q,A.widthX=Math.abs(A.endX-A.startX),A.depthZ=Math.abs(A.endZ-A.startZ)),C==2&&(m.startX=m.endX-q,m.startZ=m.startZ+g.size.x+Z,m.endZ=m.endZ-(m.depthZ-2*Z)/C*(C-1),m.widthX=Math.abs(m.endX-m.startX),m.depthZ=Math.abs(m.endZ-m.startZ),_.startX=_.endX-q,_.startZ=_.startZ+Z+(_.depthZ-2*Z)/C*(C-2),_.endZ=_.endZ-Z-(_.depthZ-2*Z)/C*(C-2),_.widthX=Math.abs(_.endX-_.startX),_.depthZ=Math.abs(_.endZ-_.startZ),A.startZ=A.startZ+Z+(A.depthZ-2*Z)/C*(C-1),A.endZ=A.endZ-Z,A.startX=A.endX-q,A.widthX=Math.abs(A.endX-A.startX),A.depthZ=Math.abs(A.endZ-A.startZ)),C==1&&(m.startX=m.endX-q,m.startZ=m.startZ+g.size.x,m.endZ=m.endZ,m.widthX=Math.abs(m.endX-m.startX),m.depthZ=Math.abs(m.endZ-m.startZ))),G.value=[],console.log("adding diagrams theater av, roomserper",re),await ae(3e3),await de("grayChairLOD2",re,60,48,20,0,14,7),await ae(1e3),await He(c,l,`theaterDiagramAV${B}`,ne,B,!0),await ae(3e3),console.log("avarea2 placing screens",_,"screennum",C),C==1&&await ce(c,l,`theaterDiagramAV${B}`,3,2,V,"center",m,W,!0),C==2&&(await ce(c,l,`theaterDiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`theaterDiagramAV${B}`,3,2,V,"right",A,W,!0)),C==3&&(await ce(c,l,`theaterDiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`theaterDiagramAV${B}`,3,2,V,"center",_,W,!0),await ce(c,l,`theaterDiagramAV${B}`,3,2,V,"right",A,W,!0)),await ae(3e3),G.value=[],console.log("adding diagrams classroom av roomserper",re),await ae(3e3),await de("classroomtablexblend",re,60,36,36,0,5,5),await ae(1e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`classroom2per6DiagramAV${B}`,ne,B,!0),await ae(3e3),console.log("avarea2 placing screens",_,"screennum",C),C==1&&await ce(c,l,`classroom2per6DiagramAV${B}`,3,2,V,"center",m,W,!0),C==2&&(await ce(c,l,`classroom2per6DiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`classroom2per6DiagramAV${B}`,3,2,V,"right",A,W,!0)),C==3&&(await ce(c,l,`classroom2per6DiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`classroom2per6DiagramAV${B}`,3,2,V,"center",_,W,!0),await ce(c,l,`classroom2per6DiagramAV${B}`,3,2,V,"right",A,W,!0)),await ae(3e3),G.value=[],console.log("adding diagrams crescent 6 av roomserper",re),await ae(3e3),await de("crescentOf6LOD2",re,60,60,0,0,1,1),await ae(1e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`crescent6DiagramAV${B}`,ne,B,!0),await ae(3e3),console.log("avarea2 placing screens",_,"screennum",C),C==1&&await ce(c,l,`crescent6DiagramAV${B}`,3,2,V,"center",m,W,!0),C==2&&(await ce(c,l,`crescent6DiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`crescent6DiagramAV${B}`,3,2,V,"right",A,W,!0)),C==3&&(await ce(c,l,`crescent6DiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`crescent6DiagramAV${B}`,3,2,V,"center",_,W,!0),await ce(c,l,`crescent6DiagramAV${B}`,3,2,V,"right",A,W,!0)),await ae(3e3),G.value=[],console.log("adding diagrams rounds 10 av roomserper",re),await de("roundsOf10LOD2",re,60,60,0,0,1,1),await ae(2e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`rounds10DiagramAV${B}`,ne,B,!0),await ae(3e3),console.log("avarea2 placing screens",_,"screennum",C),C==1&&await ce(c,l,`rounds10DiagramAV${B}`,3,2,V,"center",m,W,!0),C==2&&(await ce(c,l,`rounds10DiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`rounds10DiagramAV${B}`,3,2,V,"right",A,W,!0)),C==3&&(await ce(c,l,`rounds10DiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`rounds10DiagramAV${B}`,3,2,V,"center",_,W,!0),await ce(c,l,`rounds10DiagramAV${B}`,3,2,V,"right",A,W,!0)),await ae(3e3),G.value=[],console.log("adding diagrams reception av roomserper",re),await ae(3e3),await de("cocktail",re,120,120,60,60,5,4),await ae(1e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`receptionDiagramAV${B}`,ne,B,!0),await ae(3e3),console.log("avarea2 placing screens",_,"screennum",C),C==1&&await ce(c,l,`receptionDiagramAV${B}`,3,2,V,"center",m,W,!0),C==2&&(await ce(c,l,`receptionDiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`receptionDiagramAV${B}`,3,2,V,"right",A,W,!0)),C==3&&(await ce(c,l,`receptionDiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`receptionDiagramAV${B}`,3,2,V,"center",_,W,!0),await ce(c,l,`receptionDiagramAV${B}`,3,2,V,"right",A,W,!0)),fe<3100&&(await ae(3e3),G.value=[],console.log("adding diagrams ushape av roomserper",re),await ae(3e3),await de("ushape",re,60,60,60,60,5,4),await ae(1e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`ushapeDiagramAV${B}`,ne,B,!0),await ae(3e3),console.log("avarea2 placing screens",_,"screennum",C),C==1&&await ce(c,l,`ushapeDiagramAV${B}`,3,2,V,"center",m,W,!0),C==2&&(await ce(c,l,`ushapeDiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`ushapeDiagramAV${B}`,3,2,V,"right",A,W,!0)),C==3&&(await ce(c,l,`ushapeDiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`ushapeDiagramAV${B}`,3,2,V,"center",_,W,!0),await ce(c,l,`ushapeDiagramAV${B}`,3,2,V,"right",A,W,!0)),await ae(3e3),G.value=[],console.log("adding diagrams conferene av roomserper",re),await ae(3e3),await de("conferencetablexblend",re,60,60,60,60,5,4),await ae(1e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`conferenceDiagramAV${B}`,ne,B,!0),await ae(3e3),console.log("avarea2 placing screens",_,"screennum",C),C==1&&await ce(c,l,`conferenceDiagramAV${B}`,3,2,V,"center",m,W,!0),C==2&&(await ce(c,l,`conferenceDiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`conferenceDiagramAV${B}`,3,2,V,"right",A,W,!0)),C==3&&(await ce(c,l,`conferenceDiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`conferenceDiagramAV${B}`,3,2,V,"center",_,W,!0),await ce(c,l,`conferenceDiagramAV${B}`,3,2,V,"right",A,W,!0)),await ae(3e3),G.value=[],console.log("adding diagrams conferene av roomserper",re),await ae(3e3),await de("hollowsquare",re,60,60,60,60,5,4),console.log("roomSerPer servicePerimeter.value",ue.value),await ae(1e3),await He(c,l,`hollowsquareDiagramAV${B}`,ne,B,!0),await ae(3e3),console.log("avarea2 placing screens",_,"screennum",C),C==1&&await ce(c,l,`hollowsquareDiagramAV${B}`,3,2,V,"center",m,W,!0),C==2&&(await ce(c,l,`hollowsquareDiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`hollowsquareDiagramAV${B}`,3,2,V,"right",A,W,!0)),C==3&&(await ce(c,l,`hollowsquareDiagramAV${B}`,3,2,V,"left",m,W,!0),await ce(c,l,`hollowsquareDiagramAV${B}`,3,2,V,"center",_,W,!0),await ce(c,l,`hollowsquareDiagramAV${B}
6`,3,2,V,"right",A,W,!0))),console.log("finshed adding av sets")}}async function L(c,l,b,k){let T=!1;if(b?T=!0:window.confirm("Is Area box good?")||(b=await at("0x00ff00")),T){let f=b.widthX*b.depthZ*10.76391042,g;f>4e3?g=60:g=5;let m=k??prompt("Please enter the direction of the area (N, S, E, W)","N").toUpperCase();console.log("adding diagrams theater"),G.value=[],await ae(3e3),await de("grayChairLOD2",g,60,48,20,0,14,7),await ae(3e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`theaterDiagram${m}`,b,m,!0),await ae(3e3),G.value=[],console.log("adding diagrams classroom"),await ae(3e3),await de("classroomtablexblend",g,60,36,36,0,5,5),await ae(1e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`classroom2per6Diagram${m}`,b,m,!0),await ae(3e3),console.log("adding diagrams crescent"),G.value=[],await ae(3e3),await de("crescentOf6LOD2",g,60,60,0,0,1,1),await ae(1e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`crescent6Diagram${m}`,b,m,!0),await ae(3e3),console.log("adding diagrams rounds10"),G.value=[],await de("roundsOf10LOD2",g,60,60,0,0,1,1),await ae(2e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`rounds10Diagram${m}`,b,m,!0),await ae(3e3),console.log("adding diagrams reception"),G.value=[],await ae(3e3),await de("cocktail",g,120,120,60,60,5,4),await ae(1e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`receptionDiagram${m}`,b,m,!0),await ae(3e3),f<3100&&(console.log("adding diagrams ushape"),G.value=[],await ae(3e3),await de("ushape",g,60,60,60,60,5,4),await ae(1e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`ushapeDiagram${m}`,b,m,!0),await ae(3e3),console.log("adding diagrams conference"),G.value=[],await ae(3e3),await de("conferencetablexblend",g,60,60,60,60,5,4),await ae(1e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`conferenceDiagram${m}`,b,m,!0),await ae(3e3),console.log("adding diagrams hollowsquare"),G.value=[],await ae(3e3),await de("hollowsquare",g,60,60,60,60,5,4),await ae(1e3),console.log("roomSerPer servicePerimeter.value",ue.value),await He(c,l,`hollowsquareDiagram${m}`,b,m,!0),await ae(3e3)),console.log("finished adding diagrams")}}return Mn(async()=>{console.log("pre load mounting","type",e.diagramType,G.value),G.value=await t.retrieveMaxSet(e.space.id,e.diagramType),console.log("mounted",G.value)}),(c,l)=>(E(),R(Ne,null,[a("div",A1,[a("div",T1,[M1,X(a("select",{id:"gltfUrl","onUpdate:modelValue":l[0]||(l[0]=b=>y.value=b)},[(E(!0),R(Ne,null,je(w(t).diagramObjects,b=>(E(),R("option",{value:b},Q(b.name),9,I1))),256))],512),[[Zt,y.value]])]),a("div",P1,[a("div",L1,[k1,X(a("input",{id:"servicePerimeter","onUpdate:modelValue":l[1]||(l[1]=b=>ue.value=b),type:"number"},null,512),[[te,ue.value,void 0,{number:!0}]])]),a("div",E1,[z1,X(a("input",{id:"spaceBetweenBlocksHor","onUpdate:modelValue":l[2]||(l[2]=b=>be.value=b),type:"number"},null,512),[[te,be.value,void 0,{number:!0}]])]),a("div",D1,[R1,X(a("input",{id:"spaceBetweenBlocksVert","onUpdate:modelValue":l[3]||(l[3]=b=>ze.value=b),type:"number"},null,512),[[te,ze.value,void 0,{number:!0}]])]),a("div",O1,[N1,X(a("input",{id:"spaceBetweenRow","onUpdate:modelValue":l[4]||(l[4]=b=>oe.value=b),type:"number"},null,512),[[te,oe.value,void 0,{number:!0}]])]),a("div",$1,[F1,X(a("input",{id:"spaceBetweenColumn","onUpdate:modelValue":l[5]||(l[5]=b=>Ae.value=b),type:"number"},null,512),[[te,Ae.value,void 0,{number:!0}]])]),a("div",U1,[B1,X(a("input",{id:"numObjInBlockVert","onUpdate:modelValue":l[6]||(l[6]=b=>ye.value=b),type:"number"},null,512),[[te,ye.value,void 0,{number:!0}]])]),a("div",Z1,[j1,X(a("input",{id:"numObjInBlockHor","onUpdate:modelValue":l[7]||(l[7]=b=>pe.value=b),type:"number"},null,512),[[te,pe.value,void 0,{number:!0}]])]),a("div",X1,[V1,X(a("input",{id:"numScreens","onUpdate:modelValue":l[8]||(l[8]=b=>De.value=b),type:"number"},null,512),[[te,De.value,void 0,{number:!0}]])])])]),a("div",H1,[a("div",{class:Zn({mobileToolBack:!0,helpHighlight:w(t).isHighlighted==5})},[a("button",{class:"actionbtn",onClick:l[9]||(l[9]=U(b=>w(t).showMaxSetTool=!1,["prevent"]))},"X"),q1,a("button",{class:"actionbtn",onClick:U(j,["prevent"]),id:"airwallcontrol"},"S/R/T",8,G1),a("button",{class:"actionbtn",onClick:U(Ze,["prevent"]),id:"airwallcontrol"},"Unselect",8,Y1),a("button",{class:"actionbtn",onClick:l[10]||(l[10]=U(b=>He(e.space,e.space.id,e.diagramType),["prevent"]))},"Add "),a("button",{class:"actionbtn",onClick:l[11]||(l[11]=U(b=>L(e.space,e.space.id),["prevent"]))},"Auto Main "),a("button",{class:"actionbtn",onClick:l[12]||(l[12]=U(b=>ut(),["prevent"]))},"Floor"),a("button",{class:"actionbtn",onClick:l[13]||(l[13]=U(b=>qt(e.space,e.space.id),["prevent"]))},"ALL SET"),a("button",{class:"actionbtn",onClick:l[14]||(l[14]=U(b=>F(e.space,e.space.id),["prevent"]))},"AV SET "),a("button",{class:"actionbtn",onClick:l[15]||(l[15]=U(b=>Me(G.value),["prevent"]))},"Show "),a("button",{class:"actionbtn",onClick:l[16]||(l[16]=U(b=>Dt(e.space,e.space.id,e.diagramType),["prevent"]))},"Save "),a("button",{class:"actionbtn",onClick:l[17]||(l[17]=U(b=>$t(e.space,e.space.id,e.diagramType,Te.value),["prevent"]))},"copy"),a("button",{class:"actionbtn",onClick:l[18]||(l[18]=U(b=>Nt(e.space,e.space.id,e.diagramType,Te.value),["prevent"]))},"Delete"),a("div",null,"ID:"+Q(Te.value),1),a("button",{class:"actionbtn",onClick:l[19]||(l[19]=U(b=>ve(),["prevent"]))},"Group"),a("button",{class:"actionbtn",onClick:l[20]||(l[20]=U(b=>Ot(e.space,e.space.id,e.diagramType),["prevent"]))},"Delete Group")],2)]),a("div",W1,[a("div",{class:Zn({mobileToolBack:!0,helpHighlight:w(t).isHighlighted==5})},[a("button",{class:"actionbtn",onClick:l[21]||(l[21]=U(b=>w(t).showMaxSetTool=!1,["prevent"]))},"X"),K1,a("button",{class:"actionbtn",onClick:l[22]||(l[22]=U(b=>ce(e.space,e.space.id,e.diagramType,3,2,!0,"left"),["prevent"]))},"Stage"),a("button",{class:"actionbtn",onClick:l[23]||(l[23]=U(b=>de(c.typeName="roundsOf6LOD2",c.servicePer=0,c.aisleHori=60,c.aisleVert=60,c.objSpaceHori=60,c.objSpaceVert=60,c.objPerBlockHori=4,c.objPerBlockVert=5),["prevent"]))},"rounds "),a("button",{class:"actionbtn",onClick:l[24]||(l[24]=U(b=>de("grayChairLOD2",0,60,48,20,0,14,7),["prevent"]))},"Theater"),a("button",{class:"actionbtn",onClick:l[25]||(l[25]=U(b=>de("classroomtablexblend",0,60,36,36,0,5,5),["prevent"]))},"classroom"),a("button",{class:"actionbtn",onClick:l[26]||(l[26]=U(b=>de("hollowsquare",0,0,0,20,0,1,1),["prevent"]))},"hollowSquare"),a("button",{class:"actionbtn",onClick:l[27]||(l[27]=U(b=>de("conferencetablexblend",0,0,0,20,0,1,1),["prevent"]))},"conference"),a("button",{class:"actionbtn",onClick:l[28]||(l[28]=U(b=>de("ushape",0,0,0,20,0,1,1),["prevent"]))},"u-shape"),a("button",{class:"actionbtn",onClick:l[29]||(l[29]=U(b=>de("banquet8",0,36,36,20,0,5,5),["prevent"]))},"reception")],2)]),gt.value?(E(),R("div",Q1,[a("div",J1,[a("div",{class:"modal-header"},[a("span",{class:"close-button",onClick:vt},"×"),e0]),a("div",t0,[X(a("select",{"onUpdate:modelValue":l[30]||(l[30]=b=>Et.value=b)},[(E(),R(Ne,null,je(zt,b=>a("option",{key:b,value:b},Q(b),9,n0)),64))],512),[[Zt,Et.value]])]),a("div",{class:"modal-footer"},[a("button",{onClick:Ht},"Confirm")])])])):Y("",!0)],64))}},s0=on(o0,[["__scopeId","data-v-30266023"]]);const Ge=i=>(hn("data-v-0d1c865d"),i=i(),fn(),i),a0={class:"venueInfo"},i0={key:0,class:"venuLogo"},l0=Ge(()=>a("label",{for:"images"},"SmartBar Logo",-1)),r0={class:"photoUpload"},c0=["src"],u0={key:1,class:"venuLogo"},d0=Ge(()=>a("label",{for:"landing-page-image"},"Landing Page Logo",-1)),p0={class:"photoUpload"},h0=["src"],f0={key:2,class:"venuLogo"},m0=Ge(()=>a("label",{for:"landing-page-image"},"Award Landing Page Logo",-1)),g0={class:"photoUpload"},v0=["src"],w0={key:3,class:"form-group"},b0={class:"venuLogo"},y0=["onInput","onUpdate:modelValue"],_0=["onInput","onUpdate:modelValue"],C0=Ge(()=>a("label",{for:"landing-page-image"},"Landing Page Logo",-1)),x0=["src"],S0=Ge(()=>a("label",{for:"landing-page-image"},"Landing Page Award Logo",-1)),A0=["src"],T0=Ge(()=>a("label",{for:"images"},"SmartBar Logo",-1)),M0=["src"],I0=Ge(()=>a("label",{for:"mainstart-select"},"Select a MainStart Location:",-1)),P0=["onUpdate:modelValue","onChange"],L0=["value"],k0={key:3},E0={key:4},z0={class:"venueFields"},D0={class:"venueCheckField"},R0=Ge(()=>a("label",{for:"inroomdiningtab"},"Dining Link New Tab",-1)),O0={class:"venueInputField"},N0=Ge(()=>a("label",{for:"inroomdining"},"Mobile Dining Link",-1)),$0={class:"venueCheckField"},F0=Ge(()=>a("label",{for:"maxSetsCheck"},"Use Max Sets In SmartBar",-1)),U0={class:"venueCheckField"},B0=Ge(()=>a("label",{for:"maxSetsCheck"},"Use 3d Vista as Base",-1)),Z0={class:"venueCheckField"},j0=Ge(()=>a("label",{for:"maxSetsCheck"},"Hide Square Logo in Dash",-1)),X0={class:"venueCheckField"},V0=Ge(()=>a("label",{for:"maxSetsCheck"},"Hide Vertical Logo in Dash",-1)),H0={class:"venueCheckField"},q0=Ge(()=>a("label",{for:"maxSetsCheck"},"Hide Horizontal Logo in Dash",-1)),G0={class:"venueInputField"},Y0=Ge(()=>a("label",{for:"typeselect"},"Venue Type",-1)),W0=In('<option value="hotel" data-v-0d1c865d>Hotel</option><option value="bar" data-v-0d1c865d>Bar</option><option value="restaurant" data-v-0d1c865d>Restaurant</option><option value="art" data-v-0d1c865d>Art</option><option value="golf" data-v-0d1c865d>Golf</option>',5),K0=[W0],Q0={class:"venueInputField"},J0=Ge(()=>a("label",{for:"planselect"},"Plan Select",-1)),ep=Ge(()=>a("option",{value:"Basic"},"Basic",-1)),tp=Ge(()=>a("option",{value:"BasicPlus"},"Basic Plus",-1)),np=Ge(()=>a("option",{value:"SitePro"},"SitePro",-1)),op=Ge(()=>a("option",{value:"SiteProPlus"},"SitePro Plus",-1)),sp=[ep,tp,np,op],ap={class:"venueInputField2"},ip=Ge(()=>a("label",{for:"venueContacts"},"Venue Contacts",-1)),lp={style:{display:"flex",gap:"0.5rem","justify-content":"space-between"}},rp=["onClick"],cp=Ge(()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none"},[a("rect",{width:"26",height:"26",rx:"4",fill:"#B46C26"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 8C20 7.44772 19.5523 7 19 7L17 7C16.4477 7 16 6.55228 16 6C16 5.44772 15.5523 5 15 5L11 5C10.4477 5 10 5.44772 10 6C10 6.55229 9.55228 7 9 7L7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9L7.00003 17.3333C7.00003 19.3584 8.64166 21 10.6667 21L15.3333 21C17.3584 21 19 19.3584 19 17.3333L19 9C19.5523 9 20 8.55228 20 8ZM10 11C10 10.4477 10.4477 10 11 10C11.5523 10 12 10.4477 12 11L12 17C12 17.5523 11.5523 18 11 18C10.4477 18 10 17.5523 10 17L10 11ZM15 10C14.4477 10 14 10.4477 14 11L14 17C14 17.5523 14.4477 18 15 18C15.5523 18 16 17.5523 16 17L16 11C16 10.4477 15.5523 10 15 10Z",fill:"white"})],-1)),up=[cp],dp={class:"venueInputField"},pp=Ge(()=>a("label",{for:"map"},"3D Vista Map Link:",-1)),hp={class:"venueInputField"},fp=Ge(()=>a("label",{for:"map"}
6,"Cvent PropertyId:",-1)),mp={__name:"VenueAdmin",setup(i){const e=nn(),t=tn(e.updateAdminField,500),n=S("");function o(){console.log("cur email",n.value),n.value&&r(n.value)&&(e.siteProInfo.hotelLeadEmail||(e.siteProInfo.hotelLeadEmail=[]),e.siteProInfo.hotelLeadEmail.push(n.value),n.value="",e.updateAdminField("hotelLeadEmail",e.siteProInfo.hotelLeadEmail))}function r(z){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(z)}function s(z){e.siteProInfo.hotelLeadEmail.splice(z,1),e.updateAdminField("hotelLeadEmail",e.siteProInfo.hotelLeadEmail)}const u=S(null),d=S(""),h=S("");function v(z){console.log("photoobj is: ",z),console.log("url",z.url),e.siteProInfo.logoUrl=z.url,e.updateAdminField("logoUrl",e.siteProInfo.logoUrl)}function p(z){console.log("photoobj is: ",z,"val is:"),console.log("url",z.url),e.siteProInfo.landingLogoUrl=z.url,e.updateAdminField("landingLogoUrl",e.siteProInfo.landingLogoUrl)}function P(z){console.log("photoobj is: ",z,"val is:"),console.log("url",z.url),e.siteProInfo.landingAwardLogoUrl=z.url,e.updateAdminField("landingAwardLogoUrl",e.siteProInfo.landingAwardLogoUrl)}function O(z,M){console.log("photoobj is: ",z,M),e.siteProInfo.complex||(e.siteProInfo.complex=[]);const D=e.siteProInfo.complex.findIndex(j=>j.name===M.name);D!==-1?e.siteProInfo.complex[D].landingLogoUrl=z.url:e.siteProInfo.complex.push({name:M,landingLogoUrl:z.url}),e.updateAdminField("complex",e.siteProInfo.complex)}function I(z,M){console.log("photoobj is: ",z,M),e.siteProInfo.complex||(e.siteProInfo.complex=[]);const D=e.siteProInfo.complex.findIndex(j=>j.name===M.name);D!==-1?e.siteProInfo.complex[D].landingAwardLogoUrl=z.url:e.siteProInfo.complex.push({name:M,landingAwardLogoUrl:z.url}),e.updateAdminField("complex",e.siteProInfo.complex)}function x(z,M){console.log("photoobj is: ",z,M),e.siteProInfo.complex||(e.siteProInfo.complex=[]);const D=e.siteProInfo.complex.findIndex(j=>j.name===M.name);D!==-1?e.siteProInfo.complex[D].logoUrl=z.url:e.siteProInfo.complex.push({name:M,logoUrl:z.url}),e.updateAdminField("complex",e.siteProInfo.complex)}return Mn(()=>{d.value="url",h.value="images"}),(z,M)=>(E(),R("div",a0,[w(e).siteProInfo.complex.length==0?(E(),R("div",i0,[l0,a("div",r0,[an(yn,{id:"images",style:{width:"40px","max-height":"250px"},docRef:u.value,storageBucket:h.value,iconColor:"orange",onUrlSaved:v},null,8,["docRef","storageBucket"]),w(e).siteProInfo.logoUrl?(E(),R("img",{key:0,src:w(e).siteProInfo.logoUrl,style:{width:"60px","margin-left":"20px",height:"60px","border-radius":"0.5rem"}},null,8,c0)):Y("",!0)])])):Y("",!0),w(e).siteProInfo.complex.length==0?(E(),R("div",u0,[d0,a("div",p0,[an(yn,{id:"landing-page-image",style:{width:"40px","max-height":"250px"},docRef:u.value,storageBucket:h.value,iconColor:"orange",onUrlSaved:p},null,8,["docRef","storageBucket"]),w(e).siteProInfo.landingLogoUrl?(E(),R("img",{key:0,src:w(e).siteProInfo.landingLogoUrl,style:{width:"60px","margin-left":"20px",height:"60px","border-radius":"0.5rem","background-color":"white"}},null,8,h0)):Y("",!0)])])):Y("",!0),w(e).siteProInfo.complex.length==0?(E(),R("div",f0,[m0,a("div",g0,[an(yn,{id:"landing-page-image",style:{width:"40px","max-height":"250px"},docRef:u.value,storageBucket:h.value,iconColor:"orange",onUrlSaved:P},null,8,["docRef","storageBucket"]),w(e).siteProInfo.landingAwardLogoUrl?(E(),R("img",{key:0,src:w(e).siteProInfo.landingAwardLogoUrl,style:{width:"60px","margin-left":"20px",height:"60px","border-radius":"0.5rem","background-color":"white"}},null,8,v0)):Y("",!0)])])):Y("",!0),w(e).siteProInfo.complex.length>0?(E(),R("div",w0,[(E(!0),R(Ne,null,je(w(e).siteProInfo.complex,D=>(E(),R("div",b0,[St(Q(D.name)+" ",1),X(a("input",{onInput:j=>w(t)("complex",w(e).siteProInfo.complex),placeholder:"webdomain","onUpdate:modelValue":j=>D.webdomain=j},null,40,y0),[[te,D.webdomain]]),X(a("input",{onInput:j=>w(t)("complex",w(e).siteProInfo.complex),placeholder:"hotelName","onUpdate:modelValue":j=>D.hotelName=j},null,40,_0),[[te,D.hotelName]]),C0,an(yn,{id:"landing-page-image",style:{width:"30px","max-height":"250px"},docRef:u.value,storageBucket:h.value,iconColor:"orange",onUrlSaved:j=>O(j,D)},null,8,["docRef","storageBucket","onUrlSaved"]),D.landingLogoUrl?(E(),R("img",{key:0,src:D.landingLogoUrl,style:{width:"60px","margin-left":"20px",height:"60px","background-color":"white"}},null,8,x0)):Y("",!0),S0,an(yn,{id:"landing-page-image",style:{width:"30px","max-height":"250px"},docRef:u.value,storageBucket:h.value,iconColor:"orange",onUrlSaved:j=>I(j,D)},null,8,["docRef","storageBucket","onUrlSaved"]),D.landingAwardLogoUrl?(E(),R("img",{key:1,src:D.landingAwardLogoUrl,style:{width:"60px","margin-left":"20px",height:"60px","background-color":"white"}},null,8,A0)):Y("",!0),T0,an(yn,{id:"images",style:{width:"30px","max-height":"250px"},docRef:u.value,storageBucket:h.value,iconColor:"orange",onUrlSaved:j=>x(j,D)},null,8,["docRef","storageBucket","onUrlSaved"]),D.logoUrl?(E(),R("img",{key:2,src:D.logoUrl,
6style:{width:"60px","margin-left":"20px",height:"60px"}},null,8,M0)):Y("",!0),I0,X(a("select",{id:"mainstart-select","onUpdate:modelValue":j=>D.mainStart=j,onChange:j=>w(t)("complex",w(e).siteProInfo.complex)},[(E(!0),R(Ne,null,je(w(e).spaceInfo,j=>(E(),R("option",{key:j,value:j},Q(j.name),9,L0))),128))],40,P0),[[Zt,D.mainStart]]),D.mainStart?(E(),R("p",k0,"Selected: "+Q(D.mainStart.name),1)):Y("",!0),w(e).spaceInfo[w(e).selectedSpace]?(E(),R("p",E0,"Current Source: "+Q(w(e).spaceInfo[w(e).selectedSpace].name),1)):Y("",!0)]))),256))])):Y("",!0),a("div",z0,[a("div",D0,[X(a("input",{id:"inroomdiningtab","onUpdate:modelValue":M[0]||(M[0]=D=>w(e).siteProInfo.mobileDiningNewTab=D),onChange:M[1]||(M[1]=D=>w(t)("mobileDiningNewTab",w(e).siteProInfo.mobileDiningNewTab)),type:"checkbox",placeholder:"Mobile Dining Link"},null,544),[[xt,w(e).siteProInfo.mobileDiningNewTab]]),R0]),a("div",O0,[N0,X(a("input",{id:"inroomdining","onUpdate:modelValue":M[2]||(M[2]=D=>w(e).siteProInfo.mobileDiningLink=D),type:"text",onInput:M[3]||(M[3]=D=>w(t)("mobileDiningLink",w(e).siteProInfo.mobileDiningLink)),placeholder:"Mobile Dining Link"},null,544),[[te,w(e).siteProInfo.mobileDiningLink]])]),a("div",$0,[X(a("input",{id:"maxSetsCheck","onUpdate:modelValue":M[4]||(M[4]=D=>w(e).siteProInfo.useMaxSets=D),onChange:M[5]||(M[5]=D=>w(t)("useMaxSets",w(e).siteProInfo.useMaxSets)),type:"checkbox",placeholder:"Use Max sets"},null,544),[[xt,w(e).siteProInfo.useMaxSets]]),F0]),a("div",U0,[X(a("input",{id:"maxSetsCheck","onUpdate:modelValue":M[6]||(M[6]=D=>w(e).siteProInfo.vistaBase=D),onChange:M[7]||(M[7]=D=>w(t)("vistaBase",w(e).siteProInfo.vistaBase)),type:"checkbox",placeholder:"Use Max sets"},null,544),[[xt,w(e).siteProInfo.vistaBase]]),B0]),a("div",Z0,[X(a("input",{id:"maxSetsCheck","onUpdate:modelValue":M[8]||(M[8]=D=>w(e).siteProInfo.hideSquareDash=D),onChange:M[9]||(M[9]=D=>w(t)("hideSquareDash",w(e).siteProInfo.hideSquareDash)),type:"checkbox",placeholder:"Use Max sets"},null,544),[[xt,w(e).siteProInfo.hideSquareDash]]),j0]),a("div",X0,[X(a("input",{id:"maxSetsCheck","onUpdate:modelValue":M[10]||(M[10]=D=>
6w(e).siteProInfo.hideVertDash=D),onChange:M[11]||(M[11]=D=>w(t)("hideVertDash",w(e).siteProInfo.hideVertDash)),type:"checkbox",placeholder:"Use Max sets"},null,544),[[xt,w(e).siteProInfo.hideVertDash]]),V0]),a("div",H0,[X(a("input",{id:"maxSetsCheck","onUpdate:modelValue":M[12]||(M[12]=D=>w(e).siteProInfo.hideHorDash=D),onChange:M[13]||(M[13]=D=>w(t)("hideHorDash",w(e).siteProInfo.hideHorDash)),type:"checkbox",placeholder:"Use Max sets"},null,544),[[xt,w(e).siteProInfo.hideHorDash]]),q0]),a("div",G0,[Y0,X(a("select",{id:"typeselect","onUpdate:modelValue":M[14]||(M[14]=D=>w(e).siteProInfo.venueType=D),onChange:M[15]||(M[15]=D=>w(t)("venueType",w(e).siteProInfo.venueType))},K0,544),[[Zt,w(e).siteProInfo.venueType]])]),a("div",Q0,[J0,X(a("select",{id:"planselect","onUpdate:modelValue":M[16]||(M[16]=D=>w(e).siteProInfo.plan=D),onChange:M[17]||(M[17]=D=>w(t)("plan",w(e).siteProInfo.plan))},sp,544),[[Zt,w(e).siteProInfo.plan]])]),a("div",ap,[ip,a("div",lp,[X(a("input",{id:"venueContacts","onUpdate:modelValue":M[18]||(M[18]=D=>n.value=D),type:"email",placeholder:"Enter an email and press Add"},null,512),[[te,n.value]]),a("button",{class:"addContact",onClick:o},"Add")]),a("ul",null,[(E(!0),R(Ne,null,je(w(e).siteProInfo.hotelLeadEmail,(D,j)=>(E(),R("div",{class:"contactEmail",key:j},[St(" O "+Q(D)+" ",1),a("button",{class:"removeButton",onClick:y=>s(j)},up,8,rp)]))),128))])]),a("div",dp,[pp,X(a("input",{id:"map","onUpdate:modelValue":M[19]||(M[19]=D=>w(e).siteProInfo.mapLink=D),type:"text",onInput:M[20]||(M[20]=D=>w(t)("mapLink",w(e).siteProInfo.mapLink))},null,544),[[te,w(e).siteProInfo.mapLink]])]),a("div",hp,[fp,X(a("input",{id:"map","onUpdate:modelValue":M[21]||(M[21]=D=>w(e).siteProInfo.cventPropId=D),type:"text",onInput:M[22]||(M[22]=D=>w(t)("cventPropId",w(e).siteProInfo.cventPropId))},null,544),[[te,w(e).siteProInfo.cventPropId]])])])]))}},gp=on(mp,[["__scopeId","data-v-0d1c865d"]]);function Ys(i,e){return function(){return i.apply(e,arguments)}}const{toString:vp}=Object.prototype,{getPrototypeOf:Fo}=Object,co=(i=>e=>{const t=vp.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Vt=i=>(i=i.toLowerCase(),e=>co(e)===i),uo=i=>e=>typeof e===i,{isArray:Ln}=Array,Vn=uo("undefined");function wp(i){return i!==null&&!Vn(i)&&i.constructor!==null&&!Vn(i.constructor)&&kt(i.constructor.isBuffer)&&i.constructor.isBuffer(i)}const Ws=Vt("ArrayBuffer");function bp(i){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(i):e=i&&i.buffer&&Ws(i.buffer),e}const yp=uo("string"),kt=uo("function"),Ks=uo("number"),po=i=>i!==null&&typeof i=="object",_p=i=>i===!0||i===!1,to=i=>{if(co(i)!=="object")return!1;const e=Fo(i);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)},Cp=Vt("Date"),xp=Vt("File"),Sp=Vt("Blob"),Ap=Vt("FileList"),Tp=i=>po(i)&&kt(i.pipe),Mp=i=>{let e;return i&&(typeof FormData=="function"&&i instanceof FormData||kt(i.append)&&((e=co(i))==="formdata"||e==="object"&&kt(i.toString)&&i.toString()==="[object FormData]"))},Ip=Vt("URLSearchParams"),Pp=i=>i.trim?i.trim():i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Gn(i,e,{allOwnKeys:t=!1}={}){if(i===null||typeof i>"u")return;let n,o;if(typeof i!="object"&&(i=[i]),Ln(i))for(n=0,o=i.length;n<o;n++)e.call(null,i[n],n,i);else{const r=t?Object.getOwnPropertyNames(i):Object.keys(i),s=r.length;let u;for(n=0;n<s;n++)u=r[n],e.call(null,i[u],u,i)}}function Qs(i,e){e=e.toLowerCase();const t=Object.keys(i);let n=t.length,o;for(;n-- >0;)if(o=t[n],e===o.toLowerCase())return o;return null}const Js=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),ea=i=>!Vn(i)&&i!==Js;function ko(){const{caseless:i}=ea(this)&&this||{},e={},t=(n,o)=>{const r=i&&Qs(e,o)||o;to(e[r])&&to(n)?e[r]=ko(e[r],n):to(n)?e[r]=ko({},n):Ln(n)?e[r]=n.slice():e[r]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Gn(arguments[n],t);return e}const Lp=(i,e,t,{allOwnKeys:n}={})=>(Gn(e,(o,r)=>{t&&kt(o)?i[r]=Ys(o,t):i[r]=o},{allOwnKeys:n}),i),kp=i=>(i.charCodeAt(0)===65279&&(i=i.slice(1)),i),Ep=(i,e,t,n)=>{i.prototype=Object.create(e.prototype,n),i.prototype.constructor=i,Object.defineProperty(i,"super",{value:e.prototype}),t&&Object.assign(i.prototype,t)},zp=(i,e,t,n)=>{let o,r,s;const u={};if(e=e||{},i==null)return e;do{for(o=Object.getOwnPropertyNames(i),r=o.length;r-- >0;)s=o[r],(!n||n(s,i,e))&&!u[s]&&(e[s]=i[s],u[s]=!0);i=t!==!1&&Fo(i)}while(i&&(!t||t(i,e))&&i!==Object.prototype);return e},Dp=(i,e,t)=>{i=String(i),(t===void 0||t>i.length)&&(t=i.length),t-=e.length;const n=i.indexOf(e,t);return n!==-1&&n===t},Rp=i=>{if(!i)return null;if(Ln(i))return i;let e=i.length;if(!Ks(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=i[e];return t},Op=(i=>e=>i&&e instanceof i)(typeof Uint8Array<"u"&&Fo(Uint8Array)),Np=(i,e)=>{const n=(i&&i[Symbol.iterator]).call(i);let o;for(;(o=n.next())&&!o.done;){const r=o.value;e.call(i,r[0],r[1])}},$p=(i,e)=>{let t;const n=[];for(;(t=i.exec(e))!==null;)n.push(t);return n},Fp=Vt("HTMLFormElement"),Up=i=>i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,o){return n.toUpperCase()+o}),vs=(({hasOwnProperty:i})=>(e,t)=>i.call(e,t))(Object.prototype),Bp=Vt("RegExp"),ta=(i,e)=>{const t=Object.getOwnPropertyDescriptors(i),n={};Gn(t,(o,r)=>{e(o,r,i)!==!1&&(n[r]=o)}),Object.defineProperties(i,n)},Zp=i=>{ta(i,(e,t)=>{if(kt(i)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=i[t];
vendor: 23,950 bytes, lines 6-8
6if(kt(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},jp=(i,e)=>{const t={},n=o=>{o.forEach(r=>{t[r]=!0})};return Ln(i)?n(i):n(String(i).split(e)),t},Xp=()=>{},Vp=(i,e)=>(i=+i,Number.isFinite(i)?i:e),Co="abcdefghijklmnopqrstuvwxyz",ws="0123456789",na={DIGIT:ws,ALPHA:Co,ALPHA_DIGIT:Co+Co.toUpperCase()+ws},Hp=(i=16,e=na.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;i--;)t+=e[Math.random()*n|0];return t};function qp(i){return!!(i&&kt(i.append)&&i[Symbol.toStringTag]==="FormData"&&i[Symbol.iterator])}const Gp=i=>{const e=new Array(10),t=(n,o)=>{if(po(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[o]=n;const r=Ln(n)?[]:{};return Gn(n,(s,u)=>{const d=t(s,o+1);!Vn(d)&&(r[u]=d)}),e[o]=void 0,r}}return n};return t(i,0)},Yp=Vt("AsyncFunction"),Wp=i=>i&&(po(i)||kt(i))&&kt(i.then)&&kt(i.catch),N={isArray:Ln,isArrayBuffer:Ws,isBuffer:wp,isFormData:Mp,isArrayBufferView:bp,isString:yp,isNumber:Ks,isBoolean:_p,isObject:po,isPlainObject:to,isUndefined:Vn,isDate:Cp,isFile:xp,isBlob:Sp,isRegExp:Bp,isFunction:kt,isStream:Tp,isURLSearchParams:Ip,isTypedArray:Op,isFileList:Ap,forEach:Gn,merge:ko,extend:Lp,trim:Pp,stripBOM:kp,inherits:Ep,toFlatObject:zp,kindOf:co,kindOfTest:Vt,endsWith:Dp,toArray:Rp,forEachEntry:Np,matchAll:$p,isHTMLForm:Fp,hasOwnProperty:vs,hasOwnProp:vs,reduceDescriptors:ta,freezeMethods:Zp,toObjectSet:jp,toCamelCase:Up,noop:Xp,toFiniteNumber:Vp,findKey:Qs,global:Js,isContextDefined:ea,ALPHABET:na,generateString:Hp,isSpecCompliantForm:qp,toJSONObject:Gp,isAsyncFn:Yp,isThenable:Wp};function ke(i,e,t,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=i,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),o&&(this.response=o)}N.inherits(ke,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:N.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const oa=ke.prototype,sa={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(i=>{sa[i]={value:i}});Object.defineProperties(ke,sa);Object.defineProperty(oa,"isAxiosError",{value:!0});ke.from=(i,e,t,n,o,r)=>{const s=Object.create(oa);return N.toFlatObject(i,s,function(d){return d!==Error.prototype},u=>u!=="isAxiosError"),ke.call(s,i.message,e,t,n,o),s.cause=i,s.name=i.name,r&&Object.assign(s,r),s};const Kp=null;function Eo(i){return N.isPlainObject(i)||N.isArray(i)}function aa(i){return N.endsWith(i,"[]")?i.slice(0,-2):i}function bs(i,e,t){return i?i.concat(e).map(function(o,r){return o=aa(o),!t&&r?"["+o+"]":o}).join(t?".":""):e}function Qp(i){return N.isArray(i)&&!i.some(Eo)}const Jp=N.toFlatObject(N,{},null,function(e){return/^is[A-Z]/.test(e)});function ho(i,e,t){if(!N.isObject(i))throw new TypeError("target must be an object");e=e||new FormData,t=N.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,z){return!N.isUndefined(z[x])});const n=t.metaTokens,o=t.visitor||v,r=t.dots,s=t.indexes,d=(t.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(e);if(!N.isFunction(o))throw new TypeError("visitor must be a function");function h(I){if(I===null)return"";if(N.isDate(I))return I.toISOString();if(!d&&N.isBlob(I))throw new ke("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(I)||N.isTypedArray(I)?d&&typeof Blob=="function"?new Blob([I]):Buffer.from(I):I}function v(I,x,z){let M=I;if(I&&!z&&typeof I=="object"){if(N.endsWith(x,"{}"))x=n?x:x.slice(0,-2),I=JSON.stringify(I);else if(N.isArray(I)&&Qp(I)||(N.isFileList(I)||N.endsWith(x,"[]"))&&(M=N.toArray(I)))return x=aa(x),M.forEach(function(j,y){!(N.isUndefined(j)||j===null)&&e.append(s===!0?bs([x],y,r):s===null?x:x+"[]",h(j))}),!1}return Eo(I)?!0:(e.append(bs(z,x,r),h(I)),!1)}const p=[],P=Object.assign(Jp,{defaultVisitor:v,convertValue:h,isVisitable:Eo});function O(I,x){if(!N.isUndefined(I)){if(p.indexOf(I)!==-1)throw Error("Circular reference detected in "+x.join("."));p.push(I),N.forEach(I,function(M,D){(!(N.isUndefined(M)||M===null)&&o.call(e,M,N.isString(D)?D.trim():D,x,P))===!0&&O(M,x?x.concat(D):[D])}),p.pop()}}if(!N.isObject(i))throw new TypeError("data must be an object");return O(i),e}function ys(i){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(i).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Uo(i,e){this._pairs=[],i&&ho(i,this,e)}const ia=Uo.prototype;ia.append=function(e,t){this._pairs.push([e,t])};ia.toString=function(e){const t=e?function(n){return e.call(this,n,ys)}:ys;return this._pairs.map(function(o){return t(o[0])+"="+t(o[1])},"").join("&")};function eh(i){return encodeURIComponent(i).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function la(i,e,t){if(!e)return i;const n=t&&t.encode||eh,o=t&&t.serialize;let r;if(o?r=o(e,t):r=N.isURLSearchParams(e)?e.toString():new Uo(e,t).toString(n),r){const s=i.indexOf("#");s!==-1&&(i=i.slice(0,s)),i+=(i.indexOf("?")===-1?"?":"&")+r}return i}class th{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){N.forEach(this.handlers,function(n){n!==null&&e(n)})}}const _s=th,ra={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nh=typeof URLSearchParams<"u"?URLSearchParams:Uo,oh=typeof FormData<"u"?FormData:null,sh=typeof Blob<"u"?Blob:null,ah=(()=>{let i;return typeof navigator<"u"&&((i=navigator.product)==="ReactNative"||i==="NativeScript"||i==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),ih=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),jt={isBrowser:!0,classes:{URLSearchParams:nh,FormData:oh,Blob:sh},isStandardBrowserEnv:ah,isStandardBrowserWebWorkerEnv:ih,protocols:["http","https","file","blob","url","data"]};function lh(i,e){return ho(i,new jt.classes.URLSearchParams,Object.assign({visitor:function(t,n,o,r){return jt.isNode&&N.isBuffer(t)?(this.append(n,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function rh(i){return N.matchAll(/\w+|\[(\w*)]/g,i).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ch(i){const e={},t=Object.keys(i);let n;const o=t.length;let r;for(n=0;n<o;n++)r=t[n],e[r]=i[r];return e}function ca(i){function e(t,n,o,r){let s=t[r++];const u=Number.isFinite(+s),d=r>=t.length;return s=!s&&N.isArray(o)?o.length:s,d?(N.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!u):((!o[s]||!N.isObject(o[s]))&&(o[s]=[]),e(t,n,o[s],r)&&N.isArray(o[s])&&(o[s]=ch(o[s])),!u)}if(N.isFormData(i)&&N.isFunction(i.entries)){const t={};return N.forEachEntry(i,(n,o)=>{e(rh(n),o,t,0)}),t}return null}const uh={"Content-Type":void 0};function dh(i,e,t){if(N.isString(i))try{return(e||JSON.parse)(i),N.trim(i)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(i)}const fo={transitional:ra,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",o=n.indexOf("application/json")>-1,r=N.isObject(e);if(r&&N.isHTMLForm(e)&&(e=new FormData(e)),N.isFormData(e))return o&&o?JSON.stringify(ca(e)):e;if(N.isArrayBuffer(e)||N.isBuffer(e)||N.isStream(e)||N.isFile(e)||N.isBlob(e))return e;if(N.isArrayBufferView(e))return e.buffer;if(N.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return lh(e,this.formSerializer).toString();if((u=N.isFileList(e))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ho(u?{"files[]":e}:e,d&&new d,this.formSerializer)}}return r||o?(t.setContentType("application/json",!1),dh(e)):e}],transformResponse:[function(e){const t=this.transitional||fo.transitional,n=t&&t.forcedJSONParsing,o=this.responseType==="json";if(e&&N.isString(e)&&(n&&!this.responseType||o)){const s=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(u){if(s)throw u.name==="SyntaxError"?ke.from(u,ke.ERR_BAD_RESPONSE,this,null,this.response):u}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:jt.classes.FormData,Blob:jt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};N.forEach(["delete","get","head"],function(e){fo.headers[e]={}});N.forEach(["post","put","patch"],function(e){fo.headers[e]=N.merge(uh)});const Bo=fo,ph=N.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hh=i=>{const e={};let t,n,o;return i&&i.split(`
7`).forEach(function(s){o=s.indexOf(":"),t=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!t||e[t]&&ph[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},Cs=Symbol("internals");function Nn(i){return i&&String(i).trim().toLowerCase()}function no(i){return i===!1||i==null?i:N.isArray(i)?i.map(no):String(i)}function fh(i){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(i);)e[n[1]]=n[2];return e}const mh=i=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim());function xo(i,e,t,n,o){if(N.isFunction(n))return n.call(this,e,t);if(o&&(e=t),!!N.isString(e)){if(N.isString(n))return e.indexOf(n)!==-1;if(N.isRegExp(n))return n.test(e)}}function gh(i){return i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function vh(i,e){const t=N.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(i,n+t,{value:function(o,r,s){return this[n].call(this,e,o,r,s)},configurable:!0})})}class mo{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function r(u,d,h){const v=Nn(d);if(!v)throw new Error("header name must be a non-empty string");const p=N.findKey(o,v);(!p||o[p]===void 0||h===!0||h===void 0&&o[p]!==!1)&&(o[p||d]=no(u))}const s=(u,d)=>N.forEach(u,(h,v)=>r(h,v,d));return N.isPlainObject(e)||e instanceof this.constructor?s(e,t):N.isString(e)&&(e=e.trim())&&!mh(e)?s(hh(e),t):e!=null&&r(t,e,n),this}get(e,t){if(e=Nn(e),e){const n=N.findKey(this,e);if(n){const o=this[n];if(!t)return o;if(t===!0)return fh(o);if(N.isFunction(t))return t.call(this,o,n);if(N.isRegExp(t))return t.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Nn(e),e){const n=N.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||xo(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let o=!1;function r(s){if(s=Nn(s),s){const u=N.findKey(n,s);u&&(!t||xo(n,n[u],u,t))&&(delete n[u],o=!0)}}return N.isArray(e)?e.forEach(r):r(e),o}clear(e){const t=Object.keys(this);let n=t.length,o=!1;for(;n--;){const r=t[n];(!e||xo(this,this[r],r,e,!0))&&(delete this[r],o=!0)}return o}normalize(e){const t=this,n={};return N.forEach(this,(o,r)=>{const s=N.findKey(n,r);if(s){t[s]=no(o),delete t[r];return}const u=e?gh(r):String(r).trim();u!==r&&delete t[r],t[u]=no(o),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return N.forEach(this,(n,o)=>{n!=null&&n!==!1&&(t[o]=e&&N.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
8`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(o=>n.set(o)),n}static accessor(e){const n=(this[Cs]=this[Cs]={accessors:{}}).accessors,o=this.prototype;function r(s){const u=Nn(s);n[u]||(vh(o,s),n[u]=!0)}return N.isArray(e)?e.forEach(r):r(e),this}}mo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.freezeMethods(mo.prototype);N.freezeMethods(mo);const Wt=mo;function So(i,e){const t=this||Bo,n=e||t,o=Wt.from(n.headers);let r=n.data;return N.forEach(i,function(u){r=u.call(t,r,o.normalize(),e?e.status:void 0)}),o.normalize(),r}function ua(i){return!!(i&&i.__CANCEL__)}function Yn(i,e,t){ke.call(this,i??"canceled",ke.ERR_CANCELED,e,t),this.name="CanceledError"}N.inherits(Yn,ke,{__CANCEL__:!0});function wh(i,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?i(t):e(new ke("Request failed with status code "+t.status,[ke.ERR_BAD_REQUEST,ke.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const bh=jt.isStandardBrowserEnv?function(){return{write:function(t,n,o,r,s,u){const d=[];d.push(t+"="+encodeURIComponent(n)),N.isNumber(o)&&d.push("expires="+new Date(o).toGMTString()),N.isString(r)&&d.push("path="+r),N.isString(s)&&d.push("domain="+s),u===!0&&d.push("secure"),document.cookie=d.join("; ")},read:function(t){const n=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function yh(i){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)}function _h(i,e){return e?i.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):i}function da(i,e){return i&&!yh(e)?_h(i,e):e}const Ch=jt.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function o(r){let s=r;return e&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=o(window.location.href),function(s){const u=N.isString(s)?o(s):s;return u.protocol===n.protocol&&u.host===n.host}}():function(){return function(){return!0}}();function xh(i){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i);return e&&e[1]||""}function Sh(i,e){i=i||10;const t=new Array(i),n=new Array(i);let o=0,r=0,s;return e=e!==void 0?e:1e3,function(d){const h=Date.now(),v=n[r];s||(s=h),t[o]=d,n[o]=h;let p=r,P=0;for(;p!==o;)P+=t[p++],p=p%i;if(o=(o+1)%i,o===r&&(r=(r+1)%i),h-s<e)return;const O=v&&h-v;return O?Math.round(P*1e3/O):void 0}}function xs(i,e){let t=0;const n=Sh(50,250);return o=>{const r=o.loaded,s=o.lengthComputable?o.total:void 0,u=r-t,d=n(u),h=r<=s;t=r;const v={loaded:r,total:s,progress:s?r/s:void 0,bytes:u,rate:d||void 0,estimated:d&&s&&h?(s-r)/d:void 0,event:o};v[e?"download":"upload"]=!0,i(v)}}const Ah=typeof XMLHttpRequest<"u",Th=Ah&&function(i){return new Promise(function(t,n){let o=i.data;const r=Wt.from(i.headers).normalize(),s=i.responseType;let u;function d(){i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}N.isFormData(o)&&(jt.isStandardBrowserEnv||jt.isStandardBrowserWebWorkerEnv?r.setContentType(!1):r.setContentType("multipart/form-data;",!1));let h=new XMLHttpRequest;if(i.auth){const O=i.auth.username||"",I=i.auth.password?unescape(encodeURIComponent(i.auth.password)):"";r.set("Authorization","Basic "+btoa(O+":"+I))}const v=da(i.baseURL,i.url);h.open(i.method.toUpperCase(),la(v,i.params,i.paramsSerializer),!0),h.timeout=i.timeout;function p(){if(!h)return;const O=Wt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:O,config:i,request:h};wh(function(M){t(M),d()},function(M){n(M),d()},x),h=null}if("onloadend"in h?h.onloadend=p:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(p)},h.onabort=function(){h&&(n(new ke("Request aborted",ke.ECONNABORTED,i,h)),h=null)},h.onerror=function(){n(new ke("Network Error",ke.ERR_NETWORK,i,h)),h=null},h.ontimeout=function(){let I=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||ra;i.timeoutErrorMessage&&(I=i.timeoutErrorMessage),n(new ke(I,x.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,i,h)),h=null},jt.isStandardBrowserEnv){const O=(i.withCredentials||Ch(v))&&i.xsrfCookieName&&bh.read(i.xsrfCookieName);O&&r.set(i.xsrfHeaderName,O)}o===void 0&&r.setContentType(null),"setRequestHeader"in h&&N.forEach(r.toJSON(),function(I,x){h.setRequestHeader(x,I)}),N.isUndefined(i.withCredentials)||(h.withCredentials=!!i.withCredentials),s&&s!=="json"&&(h.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&h.addEventListener("progress",xs(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",xs(i.onUploadProgress)),(i.cancelToken||i.signal)&&(u=O=>{h&&(n(!O||O.type?new Yn(null,i,h):O),h.abort(),h=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const P=xh(v);if(P&&jt.protocols.indexOf(P)===-1){n(new ke("Unsupported protocol "+P+":",ke.ERR_BAD_REQUEST,i));return}h.send(o||null)})},oo={http:Kp,xhr:Th};N.forEach(oo,(i,e)=>{if(i){try{Object.defineProperty(i,"name",{value:e})}catch{}Object.defineProperty(i,"adapterName",{value:e})}});const Mh={getAdapter:i=>{i=N.isArray(i)?i:[i];const{length:e}=i;let t,n;for(let o=0;o<e&&(t=i[o],!(n=N.isString(t)?oo[t.toLowerCase()]:t));o++);if(!n)throw n===!1?new ke(`Adapter ${t} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(N.hasOwnProp(oo,t)?`Adapter '${t}' is not available in the build`:`Unknown adapter '${t}'`);if(!N.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:oo};function Ao(i){if(i.cancelToken&&i.cancelToken.throwIfRequested(),i.signal&&i.signal.aborted)throw new Yn(null,i)}function Ss(i){return Ao(i),i.headers=Wt.from(i.headers),i.data=So.call(i,i.transformRequest),["post","put","patch"].indexOf(i.method)!==-1&&i.headers.setContentType("application/x-www-form-urlencoded",!1),Mh.getAdapter(i.adapter||Bo.adapter)(i).then(function(n){return Ao(i),n.data=So.call(i,i.transformResponse,n),n.headers=Wt.from(n.headers),n},function(n){return ua(n)||(Ao(i),n&&n.response&&(n.response.data=So.call(i,i.transformResponse,n.response),n.response.headers=Wt.from(n.response.headers))),Promise.reject(n)})}const As=i=>i instanceof Wt?i.toJSON():i;function Tn(i,e){e=e||{};const t={};function n(h,v,p){return N.isPlainObject(h)&&N.isPlainObject(v)?N.merge.call({caseless:p},h,v):N.isPlainObject(v)?N.merge({},v):N.isArray(v)?v.slice():v}function o(h,v,p){if(N.isUndefined(v)){if(!N.isUndefined(h))return n(void 0,h,p)}else return n(h,v,p)}function r(h,v){if(!N.isUndefined(v))return n(void 0,v)}function s(h,v){if(N.isUndefined(v)){if(!N.isUndefined(h))return n(void 0,h)}else return n(void 0,v)}function u(h,v,p){if(p in e)return n(h,v);if(p in i)return n(void 0,h)}const d={url:r,method:r,data:r,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(h,v)=>o(As(h),As(v),!0)};return N.forEach(Object.keys(Object.assign({},i,e)),function(v){const p=d[v]||o,P=p(i[v],e[v],v);N.isUndefined(P)&&p!==u||(t[v]=P)}),t}const pa="1.4.0",Zo={};["object","boolean","number","function","string","symbol"].forEach((i,e)=>{Zo[i]=function(n){return typeof n===i||"a"+(e<1?"n ":" ")+i}});const Ts={};Zo.transitional=function(e,t,n){function o(r,s){return"[Axios v"+pa+"] Transitional option '"+r+"'"+s+(n?". "+n:"")}return(r,s,u)=>{if(e===!1)throw new ke(o(s," has been removed"+(t?" in "+t:"")),ke.ERR_DEPRECATED);return t&&!Ts[s]&&(Ts[s]=!0,console.warn(o(s," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(r,s,u):!0}};function Ih(i,e,t){if(typeof i!="object")throw new ke("options must be an object",ke.ERR_BAD_OPTION_VALUE);const n=Object.keys(i);let o=n.length;for(;o-- >0;){const r=n[o],s=e[r];if(s){const u=i[r],d=u===void 0||s(u,r,i);if(d!==!0)throw new ke("option "+r+" must be "+d,ke.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ke("Unknown option "+r,ke.ERR_BAD_OPTION)}}const zo={assertOptions:Ih,validators:Zo},Jt=zo.validators;class lo{constructor(e){this.defaults=e,this.interceptors={request:new _s,response:new _s}}request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Tn(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:r}=t;n!==void 0&&zo.assertOptions(n,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean)},!1),o!=null&&(N.isFunction(o)?t.paramsSerializer={serialize:o}:zo.assertOptions(o,{encode:Jt.function,serialize:Jt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s;s=r&&N.merge(r.common,r[t.method]),s&&N.forEach(["delete","get","head","post","put","patch","common"],I=>{delete r[I]}),t.headers=Wt.concat(s,r);const u=[];let d=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(t)===!1||(d=d&&x.synchronous,u.unshift(x.fulfilled,x.rejected))});const h=[];this.interceptors.response.forEach(function(x){h.push(x.fulfilled,x.rejected)});let v,p=0,P;if(!d){const I=[Ss.bind(this),void 0];for(I.unshift.apply(I,u),I.push.apply(I,h),P=I.length,v=Promise.resolve(t);p<P;)v=v.then(I[p++],I[p++]);return v}P=u.length;let O=t;for(p=0;p<P;){const I=u[p++],x=u[p++];try{O=I(O)}catch(z){x.call(this,z);break}}try{v=Ss.call(this,O)}catch(I){return Promise.reject(I)}for(p=0,P=h.length;p<P;)v=v.then(h[p++],h[p++]);return v}getUri(e){e=Tn(this.defaults,e);const t=da(e.baseURL,e.url);return la(t,e.params,e.paramsSerializer)}}N.forEach(["delete","get","head","options"],function(e){lo.prototype[e]=function(t,n){return this.request(Tn(n||{},{method:e,url:t,data:(n||{}).data}))}});N.forEach(["post","put","patch"],function(e){function t(n){return function(r,s,u){return this.request(Tn(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:s}))}}lo.prototype[e]=t(),lo.prototype[e+"Form"]=t(!0)});const so=lo;class jo{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(r){t=r});const n=this;this.promise.then(o=>{if(!n._listeners)return;let r=n._listeners.length;for(;r-- >0;)n._listeners[r](o);n._listeners=null}),this.promise.then=o=>{let r;const s=new Promise(u=>{n.subscribe(u),r=u}).then(o);return s.cancel=function(){n.unsubscribe(r)},s},e(function(r,s,u){n.reason||(n.reason=new Yn(r,s,u),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new jo(function(o){e=o}),cancel:e}}}const Ph=jo;function Lh(i){return function(t){return i.apply(null,t)}}function kh(i){return N.isObject(i)&&i.isAxiosError===!0}const Do={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
8alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Do).forEach(([i,e])=>{Do[e]=i});const Eh=Do;function ha(i){const e=new so(i),t=Ys(so.prototype.request,e);return N.extend(t,so.prototype,e,{allOwnKeys:!0}),N.extend(t,e,null,{allOwnKeys:!0}),t.create=function(o){return ha(Tn(i,o))},t}const st=ha(Bo);st.Axios=so;st.CanceledError=Yn;st.CancelToken=Ph;st.isCancel=ua;st.VERSION=pa;st.toFormData=ho;st.AxiosError=ke;st.Cancel=st.CanceledError;st.all=function(e){return Promise.all(e)};st.spread=Lh;st.isAxiosError=kh;st.mergeConfig=Tn;st.AxiosHeaders=Wt;st.formToJSON=i=>ca(N.isHTMLForm(i)?new FormData(i):i);st.HttpStatusCode=Eh;st.default=st;const zh=st;const mt=i=>(hn("data-v-913f6fe9"),i=i(),fn(),i),Dh={class:"mycontainer"},Rh=["onClick"],Oh={key:1,class:"dimension-label"},Nh={key:2,class:"catalog-modal"},$h={class:"catalog-content"},Fh=mt(()=>a("h2",null,"Select Internal Model",-1)),Uh={key:0,class:"loading-overlay"},Bh=mt(()=>a("div",{class:"spinner"},null,-1)),Zh=mt(()=>a("p",null,"Updating Selection...",-1)),jh=[Bh,Zh],Xh={class:"filters"},Vh={class:"catalog-flex"},Hh=["src","alt"],qh={class:"itemName"},Gh=["onClick","disabled"],Yh={key:3,class:"extcatalog-modal"},Wh={class:"catalog-content"},Kh=mt(()=>a("h2",null,"Select External Model",-1)),Qh={key:0,class:"loading-overlay"},Jh=mt(()=>a("div",{class:"spinner"},null,-1)),ef=mt(()=>a("p",null,"Updating Selection...",-1)),tf=[Jh,ef],nf={class:"filters"},of={class:"catalog-flex"},sf=["onClick","disabled"],af={class:"itemName"},lf=["src","alt"],rf={class:"itemName"},cf={class:"venueInfo"},uf={class:"venueFields"},df={class:"venueCheckField"},pf=mt(()=>a("label",{for:"maxSetsCheck"},"Use Max Sets In SmartBar",-1)),hf={class:"addDocs"},ff={class:"uploadDoc"},mf=mt(()=>a("label",{class:"upload-btn",for:"file"},"Upload Object",-1)),gf={key:0},vf=["onClick"],wf={class:"venueInputField"},bf={key:0,class:"selection-card"},yf=["onClick"],_f={key:0,class:"selection-header"},Cf={class:"selection-thumbnail"},xf=["src","alt"],Sf={key:1,class:"no-thumbnail"},Af={class:"selection-details"},Tf={key:1,class:"selection-stats"},Mf={key:2,class:"selection-stats"},If=mt(()=>a("label",null,"X:",-1)),Pf=["onUpdate:modelValue"],Lf=mt(()=>a("label",null,"Y:",-1)),kf=["onUpdate:modelValue"],Ef=mt(()=>a("label",null,"Z:",-1)),zf=["onUpdate:modelValue"],Df=mt(()=>a("label",null,"Scale X:",-1)),Rf=["onUpdate:modelValue"],Of=mt(()=>a("label",null,"Scale Y:",-1)),Nf=["onUpdate:modelValue"],$f=mt(()=>a("label",null,"Scale Z:",-1)),Ff=["onUpdate:modelValue"],Uf=["onClick"],Bf=["onClick"],Zf=["onClick"],jf=["onClick"],Xf={class:"locInputField3"},Vf={class:"locContactField"},Hf={class:"locContactField"},qf=mt(()=>a("label",null,"File Name",-1)),Gf={class:"locContactField"},Yf={class:"locContactField"},Wf={class:"locContactField"},Kf=["onClick"],Qf={__name:"MaxSetsAdmin",setup(i){var at,He,ce,Nt,dt,lt,Dt,$t,ae,qt,F;const e=qn(),t=nn(),n=S([]),o=S(),r=S(0);S(((at=t.siteProInfo.chairObjSel)==null?void 0:at.id)??""),S(((He=t.siteProInfo.classroomTableObjSel)==null?void 0:He.id)??""),S(((ce=t.siteProInfo.conferenceTableObjSel)==null?void 0:ce.id)??""),S(((Nt=t.siteProInfo.ushapeTableObjSel)==null?void 0:Nt.id)??""),S(((dt=t.siteProInfo.hollowTableObjSel)==null?void 0:dt.id)??""),S(((lt=t.siteProInfo.roundsTableObjSel)==null?void 0:lt.id)??""),S(((Dt=t.siteProInfo.crescentsTableObjSel)==null?void 0:Dt.id)??""),S((($t=t.siteProInfo.podiumObjSel)==null?void 0:$t.id)??""),S(((ae=t.siteProInfo.stageOb
8jSel)==null?void 0:ae.id)??""),S(((qt=t.siteProInfo.screenObjSel)==null?void 0:qt.id)??""),S(((F=t.siteProInfo.screen2ObjSel)==null?void 0:F.id)??""),S(!1),S(null),S([]);const s=S([{obj:t.siteProInfo.stageObjSel,fieldName:"stageObjSel"},{obj:t.siteProInfo.screenObjSel,fieldName:"screenObjSel"},{obj:t.siteProInfo.screen2ObjSel,fieldName:"screen2ObjSel"}]),u=S([{obj:t.siteProInfo.chairObjSel,fieldName:"chairObjSel",label:"Chair Model",catTableType:"theater",catChairs:0,catSeats:1},{obj:t.siteProInfo.classroomTableObjSel,fieldName:"classroomTableObjSel",label:"Classroom Table Model",catTableType:"classroom",catChairs:3,catSeats:0},{obj:t.siteProInfo.conferenceTableObjSel,fieldName:"conferenceTableObjSel",label:"Conference Table Model",catTableType:"conference",catChairs:3,catSeats:0},{obj:t.siteProInfo.ushapeTableObjSel,fieldName:"ushapeTableObjSel",label:"U-Shape Table Model",catTableType:"ushape",catChairs:3,catSeats:0},{obj:t.siteProInfo.hollowTableObjSel,fieldName:"hollowTableObjSel",label:"Hollow Square Table Model",catTableType:"hollowsquare",catChairs:3,catSeats:0},{obj:t.siteProInfo.roundsTableObjSel,fieldName:"roundsTableObjSel",label:"Rounds of 10 Table Model",catTableType:"round",catChairs:10,catSeats:0},{obj:t.siteProInfo.crescentsTableObjSel,fieldName:"crescentsTableObjSel",label:"Crescents of 6 Table Model",catTableType:"crescent",catChairs:6,catSeats:0},{obj:t.siteProInfo.screenObjSel,fieldName:"screenObjSel",label:"Screen 1 Model",catTableType:"screen",catChairs:0,catSeats:0},{obj:t.siteProInfo.screen2ObjSel,fieldName:"screen2ObjSel",label:"Screen 2 Model",catTableType:"screen",catChairs:0,catSeats:0},{obj:t.siteProInfo.stageObjSel,fieldName:"stageObjSel",label:"Stage Model",catTableType:"stage",catChairs:0,catSeats:0}]),d=S(!1),h=S(!1),v=S("");Cn(()=>v.value.trim()?be.value.filter(L=>(L.displayName||L.name).toLowerCase().includes(v.value.toLowerCase())):be.value);const p=S({tableType:null,tableChairs:0,seats:1,fieldName:null,editObj:null});function P(L,c,l,b,k){p.value.tableType=L,p.value.tableChairs=c,p.value.seats=l,p.value.fieldName=b,p.value.editObj=k,d.value=!0}async function O(L,c,l,b,k){z.value=!0,console.log("setobjs",be.value),await ye(),console.log("setobjs",be.value),z.value=!1,h.value=!0}function I(){p.value={tableType:null,tableChairs:0,seats:0,fieldName:null,editObj:null},d.value=!1}function x(){p.value={tableType:null,tableChairs:0,seats:0,fieldName:null,editObj:null},h.value=!1}const z=S(!1);function M(L){try{if(console.log("Selecting item from internal store: item, selectingfor",L,p.value),L.tableType=p.value.tableType,(L.tableType=="classroom"||L.tableType=="conference"||L.tableType=="ushape"||L.tableType=="hollowsquare"||L.tableType=="roun
8d"||L.tableType=="crescent")&&window.confirm(`Do you wish to change the default number of chairs? Currently set to [ ${p.value.tableChairs} ] for this set type.`)){let l;do if(l=prompt("Please enter number of chairs per table:"),l===null)return;while(l.trim()===""||isNaN(l));p.value.tableChairs=Number(l)}L.tableChairs=p.value.tableChairs,L.seats=p.value.seats,L.brandPos||(L.brandPos=[]),t.updateAdminField(p.value.fieldName,L);const c=u.value.findIndex(l=>l.fieldName===p.value.fieldName);c!==-1&&(u.value[c].obj=L),I(),console.log("Item selected:",L)}catch(c){console.error("selectItem error:",c)}}async function D(L){z.value=!0;try{console.log("Importing external item into internal store:",L);const c=await oe(L.url),l=L.name||`catalogModel_${ot()}.gltf`,b=await Ae(c,`setObjects/${l}`),k=ot(),T={id:k,name:l,thumbFileName:null,displayName:L.displayName||L.name||"Untitled",url:b,type:L.type||"",loader:L.loader||"",tableType:p.value.tableType||0,tableChairs:p.value.tableChairs||0,seats:p.value.seats,size:L.size||{x:.608,y:.608,z:.608},brandPos:L.brandPos||null};if(L.thumbnail){const g=await oe(L.thumbnail),m=`thumbnail_${k}_${Date.now()}.png`,_=await Ae(g,`setObjects/${m}`);T.thumbnail=_,T.thumbFileName=m}const f=await Jo(Bn(_n,"setObjects"),T);await es(f,{id:f.id}),T.id=f.id,t.propSetObjects.push(T),x(),console.log("Item imported successfully",T)}catch(c){console.error("importItem error:",c)}finally{z.value=!1}}async function j(L){const c=u.value.findIndex(l=>l.fieldName===L);c!==-1&&(u.value[c].obj=null,Xe(L,null))}function y(L){console.log("item is",L)}async function oe(L){const c=await fetch(L);if(!c.ok)throw new Error(`Failed to fetch from ${L}`);return await c.blob()}async function Ae(L,c){return new Promise((l,b)=>{const k=cn(e,c),T=xn(k,L);T.on("state_changed",null,f=>b(f),async()=>{const f=await Sn(T.snapshot.ref);l(f)})})}S("local"),S(null);const be=S([]),ze=S(!0),pe="https://us-central1-selfwalksiteproadmin.cloudfunctions.net/getSetObjects";async function ye(){try{const L=await zh.get(pe);console.log("catalog response",L),be.value=L.data.items}catch(L){console.error("Error fetching setObjects:",L)}finally{ze.value=!1}}const ue=S(null);let De,_e,de,G,xe=null;const Te=S(null),se=S("400px"),$=S("400px");function ee(){De=new Fs,De.background=new Lt(3355443);const L=parseInt(se.value),c=parseInt($.value);_e=new Oo(45,L/c,.1,1e3),_e.position.set(0,0,2);const l=new Is(16777215,1);l.position.set(3,3,3),De.add(l);const b=new ni(16777215,.3);De.add(b);const k=new oi(10,10);De.add(k);const T=new si(1);De.add(T),de=new Us({antialias:!0}
8),de.setSize(L,c),ue.value.appendChild(de.domElement),new Vs,G=new Xs(_e,de.domElement),G.enableDamping=!0,G.dampingFactor=.05,G.screenSpacePanning=!1,G.minDistance=.1,G.maxDistance=1e3,Me()}function Me(){requestAnimationFrame(Me),de.render(De,_e)}const ve=S(!1);function Ze(){console.log("clearing model",xe),ve.value=!1}S(s.value.map(()=>!0));const Xe=tn(t.updateAdminField,500),ut=L=>{console.log("obj",L),L&&!L.brandPos&&(L.brandPos=[]),L.brandPos.push({oX:0,oY:0,oZ:0,sX:1,sY:1,sZ:1})},Ot=(L,c)=>{L.brandPos&&L.brandPos.splice(c,1)},gt=S(null),Et=async L=>{try{await li(An(_n,"setObjects",L.id)),t.propSetObjects=t.propSetObjects.filter(c=>c.id!==L.id),console.log("Document successfully deleted!")}catch(c){console.error("Error deleting Firestore doc:",c)}if(L.thumbnail)try{const c=cn(e,`setObjects/${L.thumbFileName}`);await Qo(c),console.log("Thumbnail file successfully deleted from storage!")}catch(c){console.error("Failed to delete thumbnail:",c)}try{const c=cn(e,`setObjects/${L.name}`);await Qo(c),console.log("File successfully deleted from storage!")}catch(c){console.error("Failed to delete main file:",c)}};S(null);
8const zt=S(!1),vt=L=>{t.uploadModelSize=null,t.modelUploadSceneObject&&(t.modelUploadSceneObject.stop(),t.modelUploadSceneObject=null,t.modelUploadSubs.forEach(T=>T.cancel()),t.modelUploadSubs=[]);const c=L.target.files[0];if(!c)return;const l=c.name;console.log("File name:",l);const b=cn(e,`setObjects/${c.name}`),k=xn(b,c);k.on("state_changed",T=>{const f=T.bytesTransferred/T.totalBytes*100;console.log("Upload is "+f+"% done"),gt.value=f.toFixed(2)},T=>{console.error("Error during upload: ",T),gt.value=null},()=>{Sn(k.snapshot.ref).then(async T=>{await Ht(T),console.log("upload model size124",t.uploadModelSize),await new Promise((g,m)=>{let _=1e3,A=5e3,C=0;const q=setInterval(()=>{C+=_,t.uploadModelSize!==null?(console.log("upload model size is set:",t.uploadModelSize),clearInterval(q),t.modelUploadSceneObject&&(t.modelUploadSceneObject.stop(),t.modelUploadSceneObject=null,t.modelUploadSubs.forEach(fe=>fe.cancel()),t.modelUploadSubs=[]),g()):C>=A?(console.log("Timed out waiting for uploadModelSize"),clearInterval(q),m(new Error("Timed out waiting for uploadModelSize"))):console.log("Waiting for uploadModelSize...")},_)}).then(()=>{console.log("Final upload model size:",t.uploadModelSize)}).catch(g=>{console.error("Error:",g)});const f={name:l,displayName:l,url:T,loader:"",tableType:"theater",tableChairs:0,type:"",seats:1,id:ot(),size:{x:t.uploadModelSize.x||.608,y:t.uploadModelSize.y||.608,z:t.uploadModelSize.z||.608}};console.log("Adding document:",f),console.log("add obj from url:",T);try{const g=await Jo(Bn(_n,"setObjects"),f);await es(g,{id:g.id}),console.log("Document successfully added with ID: ",g.id)}catch(g){console.error("Error adding document: ",g)}t.propSetObjects.push(f),gt.value=null,zt.value=!1})}),zt.value=!1};async function Ht(L){class c{constructor(T,f){this.path=T,this.node=f}onEvent(T){T.input.type=="hover",T.input.type=="unhover"||(T.input.type=="click"?console.log("Clicked emit"):T.input.type==="dragend"&&console.log("Drag ended"))}}class l{constructor(T,f){this.path=T,this.node=f}onEvent(T){(T.input.type="modelSize")&&(console.log("modelSize123",T.input.modelSize),T.input.modelSize&&(t.uploadModelSize=T.input.modelSize,console.log("modelSize54",T.input.modelSize),console.log("uploadModelSize",t.uploadModelSize)))}}n.value=[],console.log("adding url obj to get size",L);let b=0;if(t.modelUploadSceneObject)console.log("modelUploadSceneObject.stop()"),t.modelUploadSceneObject.stop(),t.modelUploadSceneObject=null,t.modelUploadSubs.forEach(k=>k.cancel()),t.modelUploadSubs=[];else{await t.mpSdk.Scene.registerComponents([{factory:$o(t.mpSdk),name:jn}]),console.log("creating wallsceneobj"),t.modelUploadSceneObject=(await t.mpSdk.Scene.createObjects(1))[0],console.log("creating wallsceneobj"),n.value[b]=await t.modelUploadSceneObject.addNode();const k=await n.value[b].addComponent(jn,{url:L});console.log("wallnodecomp",k,"wallnode123",n.value[b]);const T=await t.modelUploadSceneObject.addEmitPath(k,"gltfevents"),f=t.modelUploadSceneObject.spyOnEvent(new c(T,n.value[b])),g=await t.modelUploadSceneObject.addEmitPath(k,"gltfevents2"),m=t.modelUploadSceneObject.spyOnEvent(new l(g,n.value[b]));t.modelUploadSubs.push(f),t.modelUploadSubs.push(m);const _=await t.modelUploadSceneObject.addEmitPath(k,"gltfevents","wallNodeComp_"+b),A=await t.modelUploadSceneObject.addEmitPath(k,"gltfevents2","wallNodeComp2_"+b);class C{constructor(){kn(this,"path",_)}onEvent(W){console.log("click evnet12 log"),W.input.type=="hover",W.input.type=="unhover"&&(console.log("userNavigationEnabled = true"),t.inputComponent.inputs.userNavigationEnabled=!0),W.input.type=="click"&&(console.log("click evnet log"),o.value.inputs.mode="translate",o.value.inputs.selection==null?(o.value.inputs.selection=n.value[b],selID.value=n.value[b].docid,console.log("selID",n.value[b]),rotateDeg.value=(n.value[b].obj3D.rotation.y*(180/Math.PI)).toFixed(2),picker.value=b):o.value.inputs.selection=null,t.inputComponent.inputs.userNavigationEnabled=!0)}}const q=t.modelUploadSceneObject.spyOnEvent(new C);t.modelUploadSubs.push(q),console.log("registered gltf");class fe{constructor(){kn(this,"path",A)}onEvent(W){console.log("click evnet12 log"),(W.input.type="modelSize")&&(console.log("modelSize123",W.input.modelSize),W.input.modelSize&&(t.uploadModelSize=W.input.modelSize,console.log("modelSize52",W.input.modelSize),console.log("uploadModelSize",t.uploadModelSize)))}}const re=t.modelUploadSceneObject.spyOnEvent(new fe);t.modelUploadSubs.push(re),console.log("registered gltf2");const B=t.modelUploadSceneObject.addNode();o.value=B.addComponent("mp.transformControls",{mode:"scale",selection:null,size:1}),t.modelUploadSceneObject.addNode().addComponent("mp.ambientLight",{intensity:1,color:{r:1,g:1,b:1}}),t.modelUploadSceneObject.start(),console.log("Object root",k.outputs)}o.value.inputs.selection=null,r.value=0}return Mn(()=>{ee()}),(L,c)=>(E(),R(Ne,null,[a("div",Dh,[ve.value?(E(),R("button",{key:0,class:"threeClose",onClick:U(Ze,["prevent"])},"X",8,Rh)):Y("",!0),a("div",{style:No({display:ve.value?"flex":"none"},{width:se.value,height:$.value}),ref_key:"threeContainer",ref:ue,class:"three-container"},null,4),Te.value?(E(),R("div",Oh," Size: "+Q(Te.value.x)+'" x '+Q(Te.value.y)+'" x '+Q(Te.value.z)+'" ',1)):Y("",!0),d.value?(E(),R("div",Nh,[a("div",$h,[a("div",{class:"modal-header"},[Fh,a("button",{onClick:I},"X")]),z.value?(E(),R("div",Uh,jh)):Y("",!0),a("div",Xh,[X(a("input",{type:"text","onUpdate:modelValue":c[0]||(c[0]=l=>v.value=l),placeholder:"Search by name"},null,512),[[te,v.value]])]),a("div",Vh,[(E(!0),R(Ne,null,je(w(t).propSetObjects,l=>(E(),R("div",{key:l.id,class:"catalog-item"},[l.thumbnail?(E(),R("img",{key:0,src:l.thumbnail,alt:l.displayName,class:"thumbnail"},null,8,Hh)):Y("",!0),a("div",qh,Q(l.displayName||l.name),1),a("button",{class:"item-button",onClick:U(b=>M(l),["prevent"]),disabled:z.value},"Select",8,Gh)]))),128))])])])):Y("",!0),h.value?(E(),R("div",Yh,[a("div",Wh,[a("div",{class:"modal-header"},[Kh,a("button",{onClick:x},"X")]),z.value?(E(),R("div",Qh,tf)):Y("",!0),a("div",nf,[X(a("input",{type:"text","onUpdate:modelValue":c[1]||(c[1]=l=>v.value=l),placeholder:"Search by name"},null,512),[[te,v.value]])]),a("div",of,[(E(!0),R(Ne,null,je(be.value,l=>(E(),R("div",{key:l.id,class:"catalog-item"},[a("button",{class:"item-button",onClick:U(b=>D(l),["prevent"]),disabled:z.value},"Select",8,sf),a("div",af,"L: "+Q((l.size.x*39.37007874).toFixed(2))+" W: "+Q((l.size.z*39.37007874).toFixed(2))+" H: "+Q((l.size.y*39.37007874).toFixed(2)),1),l.thumbnail?(E(),R("img",{key:0,src:l.thumbnail,alt:l.displayName,class:"thumbnail"},null,8,lf)):Y("",!0),a("div",rf,Q(l.displayName||l.name),1),St(" "+Q(l.brandPos),1)]))),128))])])])):Y("",!0)]),a("div",cf,[a("div",uf,[a("div",df,[X(a("input",{id:"maxSetsCheck","onUpdate:modelValue":c[2]||(c[2]=l=>w(t).siteProInfo.useMaxSets=l),onChange:c[3]||(c[3]=l=>w(Xe)("useMaxSets",w(t).siteProInfo.useMaxSets)),type:"checkbox",placeholder:"Use Max sets"},null,544),[[xt,w(t).siteProInfo.useMaxSets]]),pf]),a("div",hf,[a("div",ff,[mf,a("input",{type:"file",id:"file",onChange:vt,accept:".gltf,.glb",style:{display:"none"}},null,32),gt.value!==null?(E(),R("div",gf," Upload Progress: "+Q(gt.value)+"% ",1)):Y("",!0)]),a("div",null,[a("button",{onClick:U(O,["prevent"])},"Import from External",8,vf)])]),(E(!0),R(Ne,null,je(u.value,l=>(E(),R("div",wf,[l?(E(),R("div",bf,[a("label",{for:"typeselect",onClick:b=>y(l)},Q(l.label),9,yf),l.obj?(E(),R("div",_f,[a("div",Cf,[l.obj.thumbnail?(E(),R("img",{key:0,src:l.obj.thumbnail,alt:l.obj.displayName},null,8,xf)):(E(),R("div",Sf," No Thumbnail "))]),a("div",Af,[a("p",null,Q(l.obj.displayName),1),a("p",null,"ID: "+Q(l.obj.id),1)])])):Y("",!0),l.obj?(E(),R("div",Tf,[a("p",null," Type: "+Q(l.obj.tableType),1),a("p",null," Seats: "+Q(l.obj.seats),1),a("p",null," Chairs: "+Q(l.obj.tableChairs),1),a("p",null," Dimensions (in): X: "+Q((l.obj.size.x*39.37007874).toFixed(2))+", Y: "+Q((l.obj.size.y*39.37007874).toFixed(2))+", Z: "+Q((l.obj.size.z*39.37007874).toFixed(2)),1)])):Y("",!0),l.obj&&l.obj.brandPos&&l.obj.brandPos.length>0&&(l.catTableType=="screen"||l.catTableType=="stage")?(E(),R("div",Mf,[(E(!0),R(Ne,null,je(l.obj.brandPos,(b,k)=>(E(),R("div",{key:k,class:"brandPos-input"},[a("label",null,"Brand Position "+Q(k+1),1),a("div",null,[If,X(a("input",{"onUpdate:modelValue":T=>b.oX=T,type:"number",placeholder:"Offset X"},null,8,Pf),[[te,b.oX,void 0,{number:!0}]]),Lf,X(a("input",{"onUpdate:modelValue":T=>b.oY=T,type:"number",placeholder:"Offset Y"},null,8,kf),[[te,b.oY,void 0,{number:!0}]]),Ef,X(a("input",{"onUpdate:modelValue":T=>b.oZ=T,type:"number",placeholder:"Offset Z"},null,8,zf),[[te,b.oZ,void 0,{number:!0}]])]),a("div",null,[Df,X(a("input",{"onUpdate:modelValue":T=>b.sX=T,type:"number",placeholder:"Scale X"},null,8,Rf),[[te,b.sX,void 0,{number:!0}]]),Of,X(a("input",{"onUpdate:modelValue":T=>b.sY=T,type:"number",placeholder:"Scale Y"},null,8,Nf),[[te,b.sY,void 0,{number:!0}]]),$f,X(a("input",{"onUpdate:modelValue":T=>b.sZ=T,type:"number",placeholder:"Scale Z"},null,8,Ff),[[te,b.sZ,void 0,{number:!0}]])]),a("button",{onClick:T=>Ot(L.obj,k)},"Remove",8,Uf)]))),128))])):Y("",!0),l.obj&&(l.catTableType=="screen"||l.catTableType=="stage")?(E(),R("button",{key:3,onClick:b=>ut(l.obj)},"Add Another Branding Position",8,Bf)):Y("",!0),a("button",{onClick:b=>P(l.catTableType,l.catChairs,l.catSeats,l.fieldName,l.obj),class:"select-button"}," Select "+Q(l.label),9,Zf),l.obj?(E(),R("button",{key:4,onClick:U(b=>j(l.fieldName),["prevent"])},"Clear Selection",8,jf)):Y("",!0)])):Y("",!0)]))),256)),(E(!0),R(Ne,null,je(w(t).propSetObjects,l=>(E(),R("div",{key:l.id,class:"ctaOverideBox"},[a("div",Xf,[a("div",Vf,[a("label",null,"Display Name "+Q(l.displayName),1)]),a("div",Hf,[qf,a("label",null,Q(l.name),1)]),a("div",Gf,[a("label",null,"Size in inches (x) "+Q((l.size.x*39.37007874).toFixed(2)),1)]),a("div",Yf,[a("label",null,"Size in inches (y) "+Q((l.size.y*39.37007874).toFixed(2)),1)]),a("div",Wf,[a("label",null,"Size in inches (z) "+Q((l.size.z*39.37007874).toFixed(2)),1)]),a("button",{onClick:b=>Et(l)},"Remove",8,Kf)])]))),128))])])],64))}},Jf=on(Qf,[["__scopeId","data-v-913f6fe9"]]),em=a("h2",null,"Upload 360 Image",-1),tm=["disabled"],nm={key:0},om={key:1},sm=a("h2",null,"Uploaded Panoramas",-1),am=["onClick"],im={__name:"Admin360Edit",setup(i){const e=S(null),t=S(!1),n=S(0),o=S(null),r=S([]),s=nn(),u=qn(),d=io();Mn(async()=>{await h()});const h=async()=>{const I=await ri(Bn(d,"panoramas"));r.value=I.docs.map(x=>({id:x.id,...x.data()}))},v=I=>
8{e.value=I.target.files[0]},p=async()=>{if(!e.value)return;const I=ot(),x=S(u,`360-images/${e.value.name}`),z=xn(x,e.value);t.value=!0,z.on("state_changed",M=>{n.value=Math.floor(M.bytesTransferred/M.totalBytes*100)},M=>{o.value=M.message,t.value=!1},async()=>{try{const M=await Sn(z.snapshot.ref);await P(M,I),await h()}catch(M){o.value="Error saving to Firestore: "+M.message}})},P=async(I,x)=>{const z=An(d,"panoramas",x);try{await Zs(z,{imageUrl:I,name:e.value.name,createdAt:new Date}),t.value=!1,n.value=0,e.value=null}catch(M){o.value="Error saving to Firestore: "+M.message}},O=I=>{s.selectedPanoramaId=I};return(I,x)=>(E(),R(Ne,null,[a("div",null,[em,a("input",{type:"file",onChange:v,accept:"image/*"},null,32),a("button",{onClick:p,disabled:!e.value},"Upload",8,tm),t.value?(E(),R("p",nm,"Uploading: "+Q(n.value)+"%",1)):Y("",!0),o.value?(E(),R("p",om,Q(o.value),1)):Y("",!0)]),a("div",null,[sm,a("ul",null,[(E(!0),R(Ne,null,je(r.value,z=>(E(),R("li",{key:z.id},[St(Q(z.name)+" ",1),a("button",{onClick:M=>O(z.id)},"View",8,am)]))),128))])])],64))}};const Rt=i=>(hn("data-v-057fc221"),i=i(),fn(),i),lm={key:0},rm={class:"pills"},cm={class:"menu-container"},um=["onClick"],dm={style:{display:"flex","align-items":"center"},width:"8",height:"12",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pm=Rt(()=>a("path",{d:"M4.46338 9.85059C4.50698 9.8977 4.55986 9.93529 4.61868 9.961C4.6775 9.98671 4.74098 10 4.80518 10C4.86937 10 4.93288 9.98671 4.9917 9.961C5.05052 9.93529 5.10337 9.8977 5.14697 9.85059L5.83057 9.13379C5.92179 9.03713 5.97263 8.90928 5.97263 8.77637C5.97263 8.64346 5.92179 8.51555 5.83057 8.41888L2.53558 5.01367L5.85788 1.58008C5.94916 1.48327 6 1.35529 6 1.22223C6 1.08917 5.94916 0.961129 5.85788 0.864319L5.17429 0.147522C5.13045 0.100804 5.0775 0.0635404 5.01871 0.0380859C4.95992 0.0126313 4.89655 -0.000488378 4.83249 -0.000488383C4.76843 -0.000488389 4.70503 0.0126313 4.64624 0.0380858C4.58745 0.0635403 4.53453 0.100804 4.49069 0.147522L0.140687 4.65527C0.0502858 4.75273 6.14827e-05 4.88074 6.14711e-05 5.01367C6.14595e-05 5.1466 0.0502858 5.27461 0.140686 5.37207L4.46338 9.85059Z",fill:"white"},null,-1)),hm=[pm],fm={style:{display:"flex","align-items":"center"},width:"8",height:"12",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},mm=Rt(()=>a("path",{d:"M1.53662 0.149414C1.49302 0.1023 1.44014 0.0647104 1.38132 0.0390015C1.3225 0.0132926 1.25902 0 1.19482 0C1.13063 0 1.06712 0.0132926 1.0083 0.0390015C0.949481 0.0647104 0.896627 0.1023 0.853027 0.149414L0.169434 0.866211C0.0782118 0.962872 0.0273743 1.09072 0.0273743 1.22363C0.0273743 1.35654 0.0782118 1.48445 0.169434 1.58112L3.46442 4.98633L0.14212 8.41992C0.0508384 8.51673 0 8.64471 0 8.77777C0 8.91083 0.0508384 9.03887 0.14212 9.13568L0.825714 9.85248C0.869548 9.8992 0.922505 9.93646 0.981293 9.96191C1.04008 9.98737 1.10345 10.0005 1.16751 10.0005C1.23157 10.0005 1.29497 9.98737 1.35376 9.96191C1.41255 9.93646 1.46547 9.8992 1.50931 9.85248L5.85931 5.34473C5.94971 5.24727 5.99994 5.11926 5.99994 4.98633C5.99994 4.8534 5.94971 4.72538 5.85931 4.62793L1.53662 0.149414Z",fill:"white"},null,-1)),gm=[mm],vm=Rt(()=>a("div",{class:"adminSpaceBar"},[a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"500",height:"1",viewBox:"0 0 550 1",fill:"none"},[a("path",{opacity:"0.2",d:"M0 0H550V1H0V0Z",fill:"#F2F1ED"})])],-1)),wm={key:4},bm={class:"form-group",style:{display:"flex","flex-direction":"column","justify-content":"start","align-items":"start"}},ym=Rt(()=>a("label",{for:"menusList"},"Menus",-1)),_m=Rt(()=>a("label",{for:"menusList"},"Menu Order",-1)),Cm={class:"listItem"},xm={class:"listText"},Sm=["onUpdate:modelValue"],Am=["onUpdate:modelValue"],Tm=Rt(()=>a("button",{class:"editButton"},"Edit",-1)),Mm=["onClick"],Im={class:"form-group",style:{display:"flex","flex-direction":"column","justify-content":"start","align-items":"start"}},Pm=Rt(()=>a("label",{for:"subCategoryList"},"SubCategory/SubMenu",-1)),Lm=Rt(()=>a("label",{for:"subCategoryList"},"SubMenu Order",-1)),km={class:"listItem"},Em={class:"listText"},zm=["onUpdate:modelValue"],Dm=["onUpdate:modelValue"],Rm=["onClick"],Om={class:"form-group"},Nm=Rt(()=>a("label",{for:"complexsList"},"Complex",-1)),$m={class:"listItem"},Fm={class:"listText"},Um=Rt(()=>a("button",{class:"editButton"}
8,"Edit",-1)),Bm=["onClick"],Zm={key:0},jm={key:1},Xm=Rt(()=>a("div",{id:"sourceFloorDiv"},null,-1)),Vm={__name:"AdminView",setup(i){const e=nn();S(!1),S(!1),S(!1);const t=S(!1),n=An(_n,"sitePro","info");js(n,se=>{se.exists()?e.siteProInfo=se.data():console.error("No such document!")},se=>{console.error("Error fetching document:",se)});const o=tn(e.updateAdminField,500);S({name:"",url:"",type:"",loader:"",type:"",seats:1,size:{x:1,y:1,z:1}});const r=S({name:"",order:0}),s=S({name:"",order:0});function u(){console.log("mneu",r.value),r.value.name.trim()!==""&&(console.log(r.value),e.siteProInfo.menus.push(r.value),e.updateAdminField("menus",e.siteProInfo.menus),r.value={name:"",order:0})}function d(se){e.siteProInfo.menus.splice(se,1),e.updateAdminField("menus",e.siteProInfo.menus)}function h(){console.log("mneu",s.value),s.value.name.trim()!==""&&(console.log(s.value),e.siteProInfo.subMenus.push(s.value),e.updateAdminField("subMenus",e.siteProInfo.subMenus),s.value={name:"",order:0})}function v(se){e.siteProInfo.subMenus.splice(se,1),e.updateAdminField("subMenus",e.siteProInfo.subMenus)}const p=S("");function P(){console.log("menu",p.value),p.value.trim()!==""&&(console.log(p.value),e.siteProInfo.complex.push(p.value),e.updateAdminField("complex",e.siteProInfo.complex),p.value="")}function O(se){e.siteProInfo.complex.splice(se,1),e.updateAdminField("complex",e.siteProInfo.complex)}pi(()=>{e.readWallsFromFire()}),Mn(()=>{console.log("testLoad",e.isLoaded),e.mpViewWidth="calc(100% - 500px)",e.mpViewLeft="500px"});const I=S(!1),x=S(0),z=S(null),M=S([]),D=S(null),j=S(!1),y=Cn(()=>{var se,$;return(($=(se=e.siteProInfo)==null?void 0:se.walls)==null?void 0:$.filter(ee=>ee.model===e.selectedModel))||[]});Cn(()=>{const se=e.spaceInfo[e.selectedSpace];return e.siteProInfo.walls.some($=>$.model===e.selectedModel)&&(e.currentMpMode==="mode.dollhouse"||se.subCategory&&["ballrooms","salons"].includes(se.subCategory.toLowerCase())||se.breakoutAirwall&&["ballrooms","salons"].includes(se.breakoutAirwall.toLowerCase()))});async function oe(){console.log("walls?",y.value,e.selectedModel),Ae(y.value,j.value),j.value=!j.value,console.log("toggle changed, showing/hiding walls",I.value)}async function Ae(se,$=!0){if(e.custWallsSub||(e.custWallsSub=[]),e.wallsceneObject&&(e.wallsceneObject.stop(),e.wallsceneObject=null,e.custWallsSub.forEach(ee=>ee.cancel()),e.custWallsSub=[],I.value=!1),!e.wallsceneObject&&$){await e.mpSdk.Scene.registerComponents([{factory:$o(e.mpSdk),name:jn}]),e.wallsceneObject=(await e.mpSdk.Scene.createObjects(1))[0],M.value=[];for(let ve=0;ve<se.length;ve++){const Ze=se[ve],Xe=e.wallsceneObject.addNode();Xe.obj3D.position.set(Ze.position.x,Ze.position.y,Ze.position.z),Xe.obj3D.scale.set(Ze.scale.x,Ze.scale.y,Ze.scale.z),Ze.rotation&&Xe.obj3D.rotation.set(Ze.rotation.x,Ze.rotation.y,Ze.rotation.z),Xe.url=Ze.url,Xe.materialColor=Ze.materialColor,M.value.push(Xe);const ut=Xe.addComponent(jn,{url:Ze.url,wallRepeat:Ze.scale.z,materialColor:Ze.materialColor}),Ot=await e.wallsceneObject.addEmitPath(ut,"gltfevents"),gt=e.wallsceneObject.spyOnEvent(new be(Ot,Xe));e.custWallsSub.push(gt);const Et=await e.wallsceneObject.addEmitPath(ut,"gltfevents","wallNodeComp_"+ve);class zt{constructor(){kn(this,"path",Et)}onEvent(at){at.input.type=="hover"&&console.log("userNavigationEnabled = false"),at.input.type=="unhover"&&(console.log("userNavigationEnabled = true"),e.inputComponent.inputs.userNavigationEnabled=!0),at.input.type=="click"&&(console.log("click evnet log"),D.value=ve,ze(D.value),e.inputComponent.inputs.userNavigationEnabled=!0)}}const vt=e.wallsceneObject.spyOnEvent(new zt);e.custWallsSub.push(vt)}const ee=e.wallsceneObject.addNode();z.value=ee.addComponent("mp.transformControls",{mode:"scale",selection:null,size:1}),e.wallsceneObject.addNode().addComponent("mp.ambientLight",{intensity:1,color:{r:1,g:1,b:1}}),e.wallsceneObject.start(),I.value=!0}z.value&&(z.value.inputs.selection=null),x.value=0}class be{constructor($,ee){this.path=$,this.node=ee}onEvent($){$.input.type=="hover",$.input.type=="unhover"?e.inputComponent.inputs.userNavigationEnabled=!0:$.input.type=="click"?console.log("Clicked emit"):$.input.type==="dragend"&&c
8onsole.log("Drag ended")}}function ze(se){console.log("shrinkWall",se,y.value[se],y.value),y.value[se].collapse=!y.value[se].collapse,y.value[se].collapse?y.value[se].scale.z=e.hiddenWallSize:y.value[se].scale.z=y.value[se].extendedSizeZ,D.value=null,Ae(y.value)}function pe(){t.value=!t.value,t.value?e.setLocBtnTransform="translateX(140%)":e.setLocBtnTransform="translateX(-50%)"}const ye=S([{name:"MODELS"},{name:"VENUE INFO"},{name:"DOCUMENTS"},{name:"LOCATIONS"},{name:"LOCATIONS MENUS"},{name:"MAX SETS"},{name:"PANOS"}]);function ue(){e.adminPillIndex<ye.value.length-1?e.adminPillIndex=e.adminPillIndex+1:e.adminPillIndex=0,console.log("increment",e.adminPillIndex,"len",ye.value.length)}function De(){e.adminPillIndex>0?e.adminPillIndex=e.adminPillIndex-1:e.adminPillIndex=ye.value.length-1,console.log("decrement",e.adminPillIndex,"len",ye.value.length)}const _e=S(null),de=85,G=Cn(()=>e.adminPillIndex*de*.5);function xe(se){e.adminPillIndex=se,Te()}function Te(){const se=ye[e.adminPillIndex];if(se&&_e.value){const $=se.getBoundingClientRect(),ee=_e.value.getBoundingClientRect();($.left<ee.left||$.right>ee.right)&&(_e.value.scrollLeft=se.offsetLeft)}}return(se,$)=>(E(),R(Ne,null,[w(e).isLoaded?(E(),R("div",lm,[w(e).siteProInfo.plan!="Basic"?(E(),Ut(ci,{key:0,role:"region","aria-label":"smartbar",style:{"max-width":"100%","max-height":"100%"},navTitle:"Space Info"})):Y("",!0),a("button",{onClick:oe,class:"centerWallBtn"},Q(I.value?"Hide Air Walls":"Show AirWalls"),1),X(a("div",{class:Zn(["adminHiZ",{"adminHiZ-shifted":t.value}])},[a("h3",null,Q(w(e).siteProInfo.hotelName)+": SitePro ver. "+Q(w(e).siteProStatus.ver)+" | "+Q(w(e).adminPillIndex),1),a("div",rm,[a("div",cm,[a("ul",{class:"menu-header-list",style:No({transform:`translateX(-${w(G)}px)`})},[(E(!0),R(Ne,null,je(ye.value,(ee,Me)=>(E(),R("li",{key:Me,class:Zn({active:Me===w(e).adminPillIndex}),onClick:ve=>xe(Me)},Q(ee.name),11,um))),128))],4)]),a("button",{class:"pillButton-left","aria-label":"prev",onClick:De},[(E(),R("svg",dm,hm))]),a("button",{class:"pillButton-right","aria-label":"next",onClick:ue},[(E(),R("svg",fm,gm))])]),vm,w(e).adminPillIndex==0?(E(),Ut(Kl,{key:0})):Y("",!0),w(e).adminPillIndex==1?(E(),Ut(gp,{key:1})):Y("",!0),w(e).adminPillIndex==2?(E(),Ut(zl,{key:2})):Y("",!0),w(e).adminPillIndex==3?(E(),Ut(S1,{key:3})):Y("",!0),w(e).adminPillIndex==4?(E(),R("div",wm,[a("div",bm,[a("div",null,[ym,X(a("input",{id:"menusList","onUpdate:modelValue":$[0]||($[0]=ee=>r.value.name=ee),type:"text"},null,512),[[te,r.value.name]])]),a("div",null,[_m,X(a("input",{id:"menusList","onUpdate:modelValue":$[1]||($[1]=ee=>r.value.order=ee),type:"text"},null,512),[[te,r.value.order]])]),a("button",{class:"addButton",onClick:$[2]||($[2]=U(ee=>u(r.value),["prevent"]))},"Add")]),a("div",null,[a("div",null,[(E(!0),R(Ne,null,je(w(e).siteProInfo.menus,(ee,Me)=>(E(),R("li",Cm,[a("span",xm,[St(" Name: "+Q(ee.name)+" | Order: "+Q(ee.order),1),X(a("input",{"onUpdate:modelValue":ve=>ee.name=ve,onChange:$[3]||($[3]=ve=>w(o)("menus",w(e).siteProInfo.menus))},null,40,Sm),[[te,ee.name]]),X(a("input",{"onUpdate:modelValue":ve=>ee.order=ve,onChange:$[4]||($[4]=ve=>w(o)("menus",w(e).siteProInfo.menus))},null,40,Am),[[te,ee.order]])]),Tm,St(),a("button",{class:"removeButton",onClick:U(ve=>d(Me),["prevent"])},"Remove",8,Mm)]))),256))])]),a("div",Im,[a("div",null,[Pm,X(a("input",{id:"subCategoryList","onUpdate:modelValue":$[5]||($[5]=ee=>s.value.name=ee),type:"text"},null,512),[[te,s.value.name]])]),a("div",null,[Lm,X(a("input",{id:"subCategoryList","onUpdate:modelValue":$[6]||($[6]=ee=>s.value.order=ee),type:"text"},null,512),[[te,s.value.order]])]),a("button",{class:"addButton",onClick:$[7]||($[7]=U(ee=>h(s.value),["prevent"]))},"Add")]),a("div",null,[a("div",null,[(E(!0),R(Ne,null,je(w(e).siteProInfo.subMenus,(ee,Me)=>(E(),R("li",km,[a("span",Em,[St(Q(ee),1),X(a("input",{"onUpdate:modelValue":ve=>ee.name=ve,onChange:$[8]||($[8]=ve=>w(o)("subMenus",w(e).siteProInfo.subMenus))},null,40,zm),[[te,ee.name]]),X(a("input",{"onUpdate:modelValue":ve=>ee.order=ve,onChange:$[9]||($[9]=ve=>w(o)("subMenus",w(e).siteProInfo.subMenus))},null,40,Dm),[[te,ee.order]])]),a("button",{class:"removeButton",onClick:U(ve=>v(Me),["prevent"])},"Remove",8,Rm)]))),256))])]),a("div",Om,[Nm,X(a("input",{id:"complexsList","onUpdate:modelValue":$[10]||($[10]=ee=>p.value=ee),type:"text"},null,512),[[te,p.value]]),a("button",{class:"addButton",onClick:$[11]||($[11]=U(ee=>P(p.value),["prevent"]))},"Add")]),a("div",null,[a("div",null,[(E(!0),R(Ne,null,je(w(e).siteProInfo.complex,(ee,Me)=>(E(),R("li",$m,[a("span",Fm,Q(ee),1),Um,St(),a("button",{class:"removeButton",onClick:U(ve=>O(Me),["prevent"])},"Remove",8,Bm)]))),256))])])])):Y("",!0),w(e).adminPillIndex==5?(E(),Ut(Jf,{key:5})):Y("",!0),w(e).adminPillIndex==6?(E(),Ut(im,{key:6}
8)):Y("",!0)],2),[[va,w(e).showAdminPanel]]),a("button",{class:"adminToggleBtn",onClick:$[12]||($[12]=ee=>w(e).showAdminPanel=!w(e).showAdminPanel)},[w(e).showAdminPanel?(E(),R("span",Zm,"Hide")):Y("",!0),w(e).showAdminPanel?Y("",!0):(E(),R("span",jm,"Show"))]),a("button",{class:"adminSizeToggleBtn",onClick:pe},Q(t.value?"Collapse":"Expand"),1),w(e).showMaxSetTool?(E(),Ut(s0,{key:1,space:w(e).selectedMaxSetSpace,diagramType:`${w(e).selectedMaxSetType.type}Diagram`},null,8,["space","diagramType"])):Y("",!0),w(e).photoFrameOn==!1?(E(),Ut(ui,{key:2,role:"toolbar"})):Y("",!0),Xm])):Y("",!0),w(e).showStartPanel?(E(),R("button",{key:1,class:"startLocSet2",onClick:$[13]||($[13]=U(ee=>w(e).makeLocation2(w(e).selectedLocID),["prevent"]))},"Set Start Position ")):Y("",!0),w(e).selectedPanoramaId?(E(),Ut(ll,{key:2,panoramaId:w(e).selectedPanoramaId,onClose:$[14]||($[14]=ee=>w(e).selectedPanoramaId=null),class:"adminPanoView"},null,8,["panoramaId"])):Y("",!0)],64))}},d2=on(Vm,[["__scopeId","data-v-057fc221"]]);export{d2 as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.