@mappedin/mappedin-js 6.0.1-beta.5 → 6.0.1-beta.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +80 -6
  2. package/THIRD_PARTY_LICENSES.txt +9297 -21275
  3. package/lib/esm/GLTFExporter-NSCWM6JS.js +2 -0
  4. package/lib/esm/GLTFExporter-NSCWM6JS.js.map +7 -0
  5. package/lib/esm/GLTFLoader-P7OIN6GY.js +2 -0
  6. package/lib/esm/GLTFLoader-P7OIN6GY.js.map +7 -0
  7. package/lib/esm/browser-6V77MKQS.js +2 -0
  8. package/lib/esm/browser-6V77MKQS.js.map +7 -0
  9. package/lib/esm/chunk-3JJZGEB7.js +2229 -0
  10. package/lib/esm/chunk-3JJZGEB7.js.map +7 -0
  11. package/lib/esm/chunk-AHC6OWNT.js +2 -0
  12. package/lib/esm/chunk-AHC6OWNT.js.map +7 -0
  13. package/lib/esm/chunk-DSSOZXRM.js +2 -0
  14. package/lib/esm/chunk-DSSOZXRM.js.map +7 -0
  15. package/lib/esm/chunk-I5GOIM6Y.js +578 -0
  16. package/lib/esm/chunk-I5GOIM6Y.js.map +7 -0
  17. package/lib/esm/chunk-JEQGUEFF.js +2 -0
  18. package/lib/esm/chunk-JEQGUEFF.js.map +7 -0
  19. package/lib/esm/chunk-SPVBFPOK.js +3820 -0
  20. package/lib/esm/chunk-SPVBFPOK.js.map +7 -0
  21. package/lib/esm/chunk-YDKOKGLT.js +2 -0
  22. package/lib/esm/chunk-YDKOKGLT.js.map +7 -0
  23. package/lib/esm/fonts/roboto-regular.ttf +0 -0
  24. package/lib/esm/index.css +2 -1
  25. package/lib/esm/index.css.map +7 -0
  26. package/lib/esm/index.d.ts +11858 -4851
  27. package/lib/esm/index.js +2 -1
  28. package/lib/esm/index.js.map +7 -0
  29. package/lib/esm/inspector-GKTULNKY.js +483 -0
  30. package/lib/esm/inspector-GKTULNKY.js.map +7 -0
  31. package/lib/esm/inspector-S63NMDZZ.css +2 -0
  32. package/lib/esm/inspector-S63NMDZZ.css.map +7 -0
  33. package/lib/esm/internal-CE37LADZ.js +2 -0
  34. package/lib/esm/internal-CE37LADZ.js.map +7 -0
  35. package/lib/esm/internal-WH523TQS.css +2 -0
  36. package/lib/esm/internal-WH523TQS.css.map +7 -0
  37. package/lib/esm/outdoor-context-v4-OHJPVR4U.js +2 -0
  38. package/lib/esm/outdoor-context-v4-OHJPVR4U.js.map +7 -0
  39. package/lib/esm/roboto-regular-25PMWR2T.js +2 -0
  40. package/lib/esm/roboto-regular-25PMWR2T.js.map +7 -0
  41. package/lib/esm/text3d-QUUOTI5N.js +253 -0
  42. package/lib/esm/text3d-QUUOTI5N.js.map +7 -0
  43. package/lib/esm/workers/collision-worker.csp.js +1 -0
  44. package/lib/esm/workers/maplibre-worker.csp.js +2 -0
  45. package/lib/index-rn.js +649 -0
  46. package/lib/index.css +2 -1
  47. package/package.json +17 -14
  48. package/lib/esm/GLTFExporter-7Y4D6ZCC.js +0 -1
  49. package/lib/esm/GLTFLoader-ZJM7FISZ.js +0 -1
  50. package/lib/esm/browser-B7ZG64S7.js +0 -1
  51. package/lib/esm/chunk-FO75RVA4.js +0 -1
  52. package/lib/esm/chunk-OPKWNXJZ.js +0 -1
  53. package/lib/esm/chunk-TQW6Y4JF.js +0 -1
  54. package/lib/esm/chunk-WIRGVYAE.js +0 -1
  55. package/lib/esm/chunk-WJRLWIOO.js +0 -1
  56. package/lib/esm/inspector-L7HL2664.js +0 -1
  57. package/lib/esm/inspector-OZDC5DPH.css +0 -1
  58. package/lib/esm/outdoor-context-v4-R6AN2YQ4.js +0 -1
package/lib/esm/index.js CHANGED
@@ -1 +1,2 @@
1
- import{a,b,c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t,v as u,w as v,x as w,y as x}from"./chunk-WIRGVYAE.js";import"./chunk-WJRLWIOO.js";import"./chunk-TQW6Y4JF.js";import"./chunk-FO75RVA4.js";import"./chunk-OPKWNXJZ.js";export{o as Annotation,k as Connection,f as Coordinate,q as DOORS,h as Door,a as E_SDK_LOG_LEVEL,j as Floor,g as Hyperlink,m as Image,l as MapObject,n as PointOfInterest,i as Space,p as WALLS,v as createMapLibreOverlay,c as enableTestMode,u as getMapData,s as getMapDataEnterprise,r as hydrateMapDataFromMVF,d as parseMVF,b as setLoggerLevel,t as setUseEnterpriseAPI,x as show3dMap,w as show3dMapGeojson,e as unzipMVF};
1
+ import{A,C as B,D as C,E as D,F as E,G as F,H as G,I as H,J as I,K as J,L as K,M as L,N as M,O as N,a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p,o as q,p as r,q as s,r as t,s as u,t as v,u as w,w as x,x as y,z}from"./chunk-3JJZGEB7.js";import{b as a,c as b}from"./chunk-DSSOZXRM.js";import"./chunk-I5GOIM6Y.js";import"./chunk-YDKOKGLT.js";import"./chunk-SPVBFPOK.js";import"./chunk-JEQGUEFF.js";import"./chunk-AHC6OWNT.js";export{o as Annotation,g as Area,l as Connection,c as Coordinate,C as DOORS,w as Directions,h as Door,a as E_SDK_LOG_LEVEL,s as EnterpriseCategory,r as EnterpriseLocation,t as EnterpriseVenue,q as Facade,j as Floor,p as FloorStack,e as Hyperlink,f as ImageMetaData,y as LocationCategory,x as LocationProfile,k as MAPPEDIN_COLORS,m as MapObject,d as Node,n as PointOfInterest,i as Space,B as WALLS,G as __setWatermarkOnClickFn,L as createMapLibreOverlay,D as disableText3DWorker,z as enableTestMode,J as getMapData,K as getMapDataEnterprise,F as hydrateMapData,H as hydrateMapDataFromMVF,u as parseMVF,A as preloadFont,b as setLoggerLevel,I as setUseEnterpriseAPI,E as setWorkersUrl,M as show3dMap,N as show3dMapGeojson,v as unzipMVF};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,483 @@
1
+ import{B as ut,a as ht,g as j,p as T,q as X}from"./chunk-3JJZGEB7.js";import{r as H}from"./chunk-DSSOZXRM.js";import"./chunk-I5GOIM6Y.js";import"./chunk-YDKOKGLT.js";import{W as ct}from"./chunk-SPVBFPOK.js";import{a as v}from"./chunk-JEQGUEFF.js";import{f as O,g as y,h as D,i as dt,j as B}from"./chunk-AHC6OWNT.js";v();v();v();v();var S=class i{constructor(t,o,e,n,r="div"){this.parent=t,this.object=o,this.property=e,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),i.nextNameID=i.nextNameID||0,this.$name.id=`lil-gui-name-${++i.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",s=>s.stopPropagation()),this.domElement.addEventListener("keyup",s=>s.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(e)}name(t){return this._name=t,this.$name.textContent=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled?this:(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t),this)}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){let o=this.parent.add(this.object,this.property,t);return o.name(this._name),this.destroy(),o}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}},Z=class extends S{constructor(t,o,e){super(t,o,e,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};function Q(i){let t,o;return(t=i.match(/(#|0x)?([a-f0-9]{6})/i))?o=t[2]:(t=i.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?o=parseInt(t[1]).toString(16).padStart(2,0)+parseInt(t[2]).toString(16).padStart(2,0)+parseInt(t[3]).toString(16).padStart(2,0):(t=i.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(o=t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),o?"#"+o:!1}var Ot={isPrimitive:!0,match:i=>typeof i=="string",fromHexString:Q,toHexString:Q},z={isPrimitive:!0,match:i=>typeof i=="number",fromHexString:i=>parseInt(i.substring(1),16),toHexString:i=>"#"+i.toString(16).padStart(6,0)},Dt={isPrimitive:!1,match:i=>Array.isArray(i),fromHexString(i,t,o=1){let e=z.fromHexString(i);t[0]=(e>>16&255)/255*o,t[1]=(e>>8&255)/255*o,t[2]=(e&255)/255*o},toHexString([i,t,o],e=1){e=255/e;let n=i*e<<16^t*e<<8^o*e<<0;return z.toHexString(n)}},Tt={isPrimitive:!1,match:i=>Object(i)===i,fromHexString(i,t,o=1){let e=z.fromHexString(i);t.r=(e>>16&255)/255*o,t.g=(e>>8&255)/255*o,t.b=(e&255)/255*o},toHexString({r:i,g:t,b:o},e=1){e=255/e;let n=i*e<<16^t*e<<8^o*e<<0;return z.toHexString(n)}},Gt=[Ot,z,Dt,Tt];function Bt(i){return Gt.find(t=>t.match(i))}var K=class extends S{constructor(t,o,e,n){super(t,o,e,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=Bt(this.initialValue),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let r=Q(this.$text.value);r&&this._setValueFromHexString(r)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){let o=this._format.fromHexString(t);this.setValue(o)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}},U=class extends S{constructor(t,o,e){super(t,o,e,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",n=>{n.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},q=class extends S{constructor(t,o,e,n,r,s){super(t,o,e,"number"),this._initInput(),this.min(n),this.max(r);let a=s!==void 0;this.step(a?s:this._getImplicitStep(),a),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,o=!0){return this._step=t,this._stepExplicit=o,this}updateDisplay(){let t=this.getValue();if(this._hasSlider){let o=(t-this._min)/(this._max-this._min);o=Math.max(0,Math.min(o,1)),this.$fill.style.width=o*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let o=()=>{let b=parseFloat(this.$input.value);isNaN(b)||(this._stepExplicit&&(b=this._snap(b)),this.setValue(this._clamp(b)))},e=b=>{let A=parseFloat(this.$input.value);isNaN(A)||(this._snapClampSetValue(A+b),this.$input.value=this.getValue())},n=b=>{b.key==="Enter"&&this.$input.blur(),b.code==="ArrowUp"&&(b.preventDefault(),e(this._step*this._arrowKeyMultiplier(b))),b.code==="ArrowDown"&&(b.preventDefault(),e(this._step*this._arrowKeyMultiplier(b)*-1))},r=b=>{this._inputFocused&&(b.preventDefault(),e(this._step*this._normalizeMouseWheel(b)))},s=!1,a,d,g,c,u,p=5,l=b=>{a=b.clientX,d=g=b.clientY,s=!0,c=this.getValue(),u=0,window.addEventListener("mousemove",h),window.addEventListener("mouseup",m)},h=b=>{if(s){let A=b.clientX-a,I=b.clientY-d;Math.abs(I)>p?(b.preventDefault(),this.$input.blur(),s=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(A)>p&&m()}if(!s){let A=b.clientY-g;u-=A*this._step*this._arrowKeyMultiplier(b),c+u>this._max?u=this._max-c:c+u<this._min&&(u=this._min-c),this._snapClampSetValue(c+u)}g=b.clientY},m=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",m)},C=()=>{this._inputFocused=!0},f=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",o),this.$input.addEventListener("keydown",n),this.$input.addEventListener("wheel",r,{passive:!1}),this.$input.addEventListener("mousedown",l),this.$input.addEventListener("focus",C),this.$input.addEventListener("blur",f)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let t=(f,b,A,I,x)=>(f-b)/(A-b)*(x-I)+I,o=f=>{let b=this.$slider.getBoundingClientRect(),A=t(f,b.left,b.right,this._min,this._max);this._snapClampSetValue(A)},e=f=>{this._setDraggingStyle(!0),o(f.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",r)},n=f=>{o(f.clientX)},r=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",r)},s=!1,a,d,g=f=>{f.preventDefault(),this._setDraggingStyle(!0),o(f.touches[0].clientX),s=!1},c=f=>{f.touches.length>1||(this._hasScrollBar?(a=f.touches[0].clientX,d=f.touches[0].clientY,s=!0):g(f),window.addEventListener("touchmove",u,{passive:!1}),window.addEventListener("touchend",p))},u=f=>{if(s){let b=f.touches[0].clientX-a,A=f.touches[0].clientY-d;Math.abs(b)>Math.abs(A)?g(f):(window.removeEventListener("touchmove",u),window.removeEventListener("touchend",p))}else f.preventDefault(),o(f.touches[0].clientX)},p=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",p)},l=this._callOnFinishChange.bind(this),h=400,m,C=f=>{if(Math.abs(f.deltaX)<Math.abs(f.deltaY)&&this._hasScrollBar)return;f.preventDefault();let A=this._normalizeMouseWheel(f)*this._step;this._snapClampSetValue(this.getValue()+A),this.$input.value=this.getValue(),clearTimeout(m),m=setTimeout(l,h)};this.$slider.addEventListener("mousedown",e),this.$slider.addEventListener("touchstart",c,{passive:!1}),this.$slider.addEventListener("wheel",C,{passive:!1})}_setDraggingStyle(t,o="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle(`lil-gui-${o}`,t)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(t){let{deltaX:o,deltaY:e}=t;return Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(o=0,e=-t.wheelDelta/120,e*=this._stepExplicit?1:10),o+-e}_arrowKeyMultiplier(t){let o=this._stepExplicit?1:10;return t.shiftKey?o*=10:t.altKey&&(o/=10),o}_snap(t){let o=Math.round(t/this._step)*this._step;return parseFloat(o.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){let t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}},V=class extends S{constructor(t,o,e,n){super(t,o,e,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(t){return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach(o=>{let e=document.createElement("option");e.textContent=o,this.$select.appendChild(e)}),this.updateDisplay(),this}updateDisplay(){let t=this.getValue(),o=this._values.indexOf(t);return this.$select.selectedIndex=o,this.$display.textContent=o===-1?t:this._names[o],this}},tt=class extends S{constructor(t,o,e){super(t,o,e,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",n=>{n.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}},Ht=`.lil-gui {
2
+ font-family: var(--font-family);
3
+ font-size: var(--font-size);
4
+ line-height: 1;
5
+ font-weight: normal;
6
+ font-style: normal;
7
+ text-align: left;
8
+ color: var(--text-color);
9
+ user-select: none;
10
+ -webkit-user-select: none;
11
+ touch-action: manipulation;
12
+ --background-color: #1f1f1f;
13
+ --text-color: #ebebeb;
14
+ --title-background-color: #111111;
15
+ --title-text-color: #ebebeb;
16
+ --widget-color: #424242;
17
+ --hover-color: #4f4f4f;
18
+ --focus-color: #595959;
19
+ --number-color: #2cc9ff;
20
+ --string-color: #a2db3c;
21
+ --font-size: 11px;
22
+ --input-font-size: 11px;
23
+ --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
24
+ --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;
25
+ --padding: 4px;
26
+ --spacing: 4px;
27
+ --widget-height: 20px;
28
+ --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);
29
+ --name-width: 45%;
30
+ --slider-knob-width: 2px;
31
+ --slider-input-width: 27%;
32
+ --color-input-width: 27%;
33
+ --slider-input-min-width: 45px;
34
+ --color-input-min-width: 45px;
35
+ --folder-indent: 7px;
36
+ --widget-padding: 0 0 0 3px;
37
+ --widget-border-radius: 2px;
38
+ --checkbox-size: calc(0.75 * var(--widget-height));
39
+ --scrollbar-width: 5px;
40
+ }
41
+ .lil-gui, .lil-gui * {
42
+ box-sizing: border-box;
43
+ margin: 0;
44
+ padding: 0;
45
+ }
46
+ .lil-gui.root {
47
+ width: var(--width, 245px);
48
+ display: flex;
49
+ flex-direction: column;
50
+ background: var(--background-color);
51
+ }
52
+ .lil-gui.root > .title {
53
+ background: var(--title-background-color);
54
+ color: var(--title-text-color);
55
+ }
56
+ .lil-gui.root > .children {
57
+ overflow-x: hidden;
58
+ overflow-y: auto;
59
+ }
60
+ .lil-gui.root > .children::-webkit-scrollbar {
61
+ width: var(--scrollbar-width);
62
+ height: var(--scrollbar-width);
63
+ background: var(--background-color);
64
+ }
65
+ .lil-gui.root > .children::-webkit-scrollbar-thumb {
66
+ border-radius: var(--scrollbar-width);
67
+ background: var(--focus-color);
68
+ }
69
+ @media (pointer: coarse) {
70
+ .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {
71
+ --widget-height: 28px;
72
+ --padding: 6px;
73
+ --spacing: 6px;
74
+ --font-size: 13px;
75
+ --input-font-size: 16px;
76
+ --folder-indent: 10px;
77
+ --scrollbar-width: 7px;
78
+ --slider-input-min-width: 50px;
79
+ --color-input-min-width: 65px;
80
+ }
81
+ }
82
+ .lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {
83
+ --widget-height: 28px;
84
+ --padding: 6px;
85
+ --spacing: 6px;
86
+ --font-size: 13px;
87
+ --input-font-size: 16px;
88
+ --folder-indent: 10px;
89
+ --scrollbar-width: 7px;
90
+ --slider-input-min-width: 50px;
91
+ --color-input-min-width: 65px;
92
+ }
93
+ .lil-gui.autoPlace {
94
+ max-height: 100%;
95
+ position: fixed;
96
+ top: 0;
97
+ right: 15px;
98
+ z-index: 1001;
99
+ }
100
+
101
+ .lil-gui .controller {
102
+ display: flex;
103
+ align-items: center;
104
+ padding: 0 var(--padding);
105
+ margin: var(--spacing) 0;
106
+ }
107
+ .lil-gui .controller.disabled {
108
+ opacity: 0.5;
109
+ }
110
+ .lil-gui .controller.disabled, .lil-gui .controller.disabled * {
111
+ pointer-events: none !important;
112
+ }
113
+ .lil-gui .controller > .name {
114
+ min-width: var(--name-width);
115
+ flex-shrink: 0;
116
+ white-space: pre;
117
+ padding-right: var(--spacing);
118
+ line-height: var(--widget-height);
119
+ }
120
+ .lil-gui .controller .widget {
121
+ position: relative;
122
+ display: flex;
123
+ align-items: center;
124
+ width: 100%;
125
+ min-height: var(--widget-height);
126
+ }
127
+ .lil-gui .controller.string input {
128
+ color: var(--string-color);
129
+ }
130
+ .lil-gui .controller.boolean {
131
+ cursor: pointer;
132
+ }
133
+ .lil-gui .controller.color .display {
134
+ width: 100%;
135
+ height: var(--widget-height);
136
+ border-radius: var(--widget-border-radius);
137
+ position: relative;
138
+ }
139
+ @media (hover: hover) {
140
+ .lil-gui .controller.color .display:hover:before {
141
+ content: " ";
142
+ display: block;
143
+ position: absolute;
144
+ border-radius: var(--widget-border-radius);
145
+ border: 1px solid #fff9;
146
+ top: 0;
147
+ right: 0;
148
+ bottom: 0;
149
+ left: 0;
150
+ }
151
+ }
152
+ .lil-gui .controller.color input[type=color] {
153
+ opacity: 0;
154
+ width: 100%;
155
+ height: 100%;
156
+ cursor: pointer;
157
+ }
158
+ .lil-gui .controller.color input[type=text] {
159
+ margin-left: var(--spacing);
160
+ font-family: var(--font-family-mono);
161
+ min-width: var(--color-input-min-width);
162
+ width: var(--color-input-width);
163
+ flex-shrink: 0;
164
+ }
165
+ .lil-gui .controller.option select {
166
+ opacity: 0;
167
+ position: absolute;
168
+ width: 100%;
169
+ max-width: 100%;
170
+ }
171
+ .lil-gui .controller.option .display {
172
+ position: relative;
173
+ pointer-events: none;
174
+ border-radius: var(--widget-border-radius);
175
+ height: var(--widget-height);
176
+ line-height: var(--widget-height);
177
+ max-width: 100%;
178
+ overflow: hidden;
179
+ word-break: break-all;
180
+ padding-left: 0.55em;
181
+ padding-right: 1.75em;
182
+ background: var(--widget-color);
183
+ }
184
+ @media (hover: hover) {
185
+ .lil-gui .controller.option .display.focus {
186
+ background: var(--focus-color);
187
+ }
188
+ }
189
+ .lil-gui .controller.option .display.active {
190
+ background: var(--focus-color);
191
+ }
192
+ .lil-gui .controller.option .display:after {
193
+ font-family: "lil-gui";
194
+ content: "\u2195";
195
+ position: absolute;
196
+ top: 0;
197
+ right: 0;
198
+ bottom: 0;
199
+ padding-right: 0.375em;
200
+ }
201
+ .lil-gui .controller.option .widget,
202
+ .lil-gui .controller.option select {
203
+ cursor: pointer;
204
+ }
205
+ @media (hover: hover) {
206
+ .lil-gui .controller.option .widget:hover .display {
207
+ background: var(--hover-color);
208
+ }
209
+ }
210
+ .lil-gui .controller.number input {
211
+ color: var(--number-color);
212
+ }
213
+ .lil-gui .controller.number.hasSlider input {
214
+ margin-left: var(--spacing);
215
+ width: var(--slider-input-width);
216
+ min-width: var(--slider-input-min-width);
217
+ flex-shrink: 0;
218
+ }
219
+ .lil-gui .controller.number .slider {
220
+ width: 100%;
221
+ height: var(--widget-height);
222
+ background: var(--widget-color);
223
+ border-radius: var(--widget-border-radius);
224
+ padding-right: var(--slider-knob-width);
225
+ overflow: hidden;
226
+ cursor: ew-resize;
227
+ touch-action: pan-y;
228
+ }
229
+ @media (hover: hover) {
230
+ .lil-gui .controller.number .slider:hover {
231
+ background: var(--hover-color);
232
+ }
233
+ }
234
+ .lil-gui .controller.number .slider.active {
235
+ background: var(--focus-color);
236
+ }
237
+ .lil-gui .controller.number .slider.active .fill {
238
+ opacity: 0.95;
239
+ }
240
+ .lil-gui .controller.number .fill {
241
+ height: 100%;
242
+ border-right: var(--slider-knob-width) solid var(--number-color);
243
+ box-sizing: content-box;
244
+ }
245
+
246
+ .lil-gui-dragging .lil-gui {
247
+ --hover-color: var(--widget-color);
248
+ }
249
+ .lil-gui-dragging * {
250
+ cursor: ew-resize !important;
251
+ }
252
+
253
+ .lil-gui-dragging.lil-gui-vertical * {
254
+ cursor: ns-resize !important;
255
+ }
256
+
257
+ .lil-gui .title {
258
+ height: var(--title-height);
259
+ line-height: calc(var(--title-height) - 4px);
260
+ font-weight: 600;
261
+ padding: 0 var(--padding);
262
+ -webkit-tap-highlight-color: transparent;
263
+ cursor: pointer;
264
+ outline: none;
265
+ text-decoration-skip: objects;
266
+ }
267
+ .lil-gui .title:before {
268
+ font-family: "lil-gui";
269
+ content: "\u25BE";
270
+ padding-right: 2px;
271
+ display: inline-block;
272
+ }
273
+ .lil-gui .title:active {
274
+ background: var(--title-background-color);
275
+ opacity: 0.75;
276
+ }
277
+ @media (hover: hover) {
278
+ body:not(.lil-gui-dragging) .lil-gui .title:hover {
279
+ background: var(--title-background-color);
280
+ opacity: 0.85;
281
+ }
282
+ .lil-gui .title:focus {
283
+ text-decoration: underline var(--focus-color);
284
+ }
285
+ }
286
+ .lil-gui.root > .title:focus {
287
+ text-decoration: none !important;
288
+ }
289
+ .lil-gui.closed > .title:before {
290
+ content: "\u25B8";
291
+ }
292
+ .lil-gui.closed > .children {
293
+ transform: translateY(-7px);
294
+ opacity: 0;
295
+ }
296
+ .lil-gui.closed:not(.transition) > .children {
297
+ display: none;
298
+ }
299
+ .lil-gui.transition > .children {
300
+ transition-duration: 300ms;
301
+ transition-property: height, opacity, transform;
302
+ transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);
303
+ overflow: hidden;
304
+ pointer-events: none;
305
+ }
306
+ .lil-gui .children:empty:before {
307
+ content: "Empty";
308
+ padding: 0 var(--padding);
309
+ margin: var(--spacing) 0;
310
+ display: block;
311
+ height: var(--widget-height);
312
+ font-style: italic;
313
+ line-height: var(--widget-height);
314
+ opacity: 0.5;
315
+ }
316
+ .lil-gui.root > .children > .lil-gui > .title {
317
+ border: 0 solid var(--widget-color);
318
+ border-width: 1px 0;
319
+ transition: border-color 300ms;
320
+ }
321
+ .lil-gui.root > .children > .lil-gui.closed > .title {
322
+ border-bottom-color: transparent;
323
+ }
324
+ .lil-gui + .controller {
325
+ border-top: 1px solid var(--widget-color);
326
+ margin-top: 0;
327
+ padding-top: var(--spacing);
328
+ }
329
+ .lil-gui .lil-gui .lil-gui > .title {
330
+ border: none;
331
+ }
332
+ .lil-gui .lil-gui .lil-gui > .children {
333
+ border: none;
334
+ margin-left: var(--folder-indent);
335
+ border-left: 2px solid var(--widget-color);
336
+ }
337
+ .lil-gui .lil-gui .controller {
338
+ border: none;
339
+ }
340
+
341
+ .lil-gui label, .lil-gui input, .lil-gui button {
342
+ -webkit-tap-highlight-color: transparent;
343
+ }
344
+ .lil-gui input {
345
+ border: 0;
346
+ outline: none;
347
+ font-family: var(--font-family);
348
+ font-size: var(--input-font-size);
349
+ border-radius: var(--widget-border-radius);
350
+ height: var(--widget-height);
351
+ background: var(--widget-color);
352
+ color: var(--text-color);
353
+ width: 100%;
354
+ }
355
+ @media (hover: hover) {
356
+ .lil-gui input:hover {
357
+ background: var(--hover-color);
358
+ }
359
+ .lil-gui input:active {
360
+ background: var(--focus-color);
361
+ }
362
+ }
363
+ .lil-gui input:disabled {
364
+ opacity: 1;
365
+ }
366
+ .lil-gui input[type=text],
367
+ .lil-gui input[type=number] {
368
+ padding: var(--widget-padding);
369
+ -moz-appearance: textfield;
370
+ }
371
+ .lil-gui input[type=text]:focus,
372
+ .lil-gui input[type=number]:focus {
373
+ background: var(--focus-color);
374
+ }
375
+ .lil-gui input[type=checkbox] {
376
+ appearance: none;
377
+ width: var(--checkbox-size);
378
+ height: var(--checkbox-size);
379
+ border-radius: var(--widget-border-radius);
380
+ text-align: center;
381
+ cursor: pointer;
382
+ }
383
+ .lil-gui input[type=checkbox]:checked:before {
384
+ font-family: "lil-gui";
385
+ content: "\u2713";
386
+ font-size: var(--checkbox-size);
387
+ line-height: var(--checkbox-size);
388
+ }
389
+ @media (hover: hover) {
390
+ .lil-gui input[type=checkbox]:focus {
391
+ box-shadow: inset 0 0 0 1px var(--focus-color);
392
+ }
393
+ }
394
+ .lil-gui button {
395
+ outline: none;
396
+ cursor: pointer;
397
+ font-family: var(--font-family);
398
+ font-size: var(--font-size);
399
+ color: var(--text-color);
400
+ width: 100%;
401
+ height: var(--widget-height);
402
+ text-transform: none;
403
+ background: var(--widget-color);
404
+ border-radius: var(--widget-border-radius);
405
+ border: none;
406
+ }
407
+ @media (hover: hover) {
408
+ .lil-gui button:hover {
409
+ background: var(--hover-color);
410
+ }
411
+ .lil-gui button:focus {
412
+ box-shadow: inset 0 0 0 1px var(--focus-color);
413
+ }
414
+ }
415
+ .lil-gui button:active {
416
+ background: var(--focus-color);
417
+ }
418
+
419
+ @font-face {
420
+ font-family: "lil-gui";
421
+ src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");
422
+ }`;function Ut(i){let t=document.createElement("style");t.innerHTML=i;let o=document.querySelector("head link[rel=stylesheet], head style");o?document.head.insertBefore(t,o):document.head.appendChild(t)}var pt=!1,G=class i{constructor({parent:t,autoPlace:o=t===void 0,container:e,width:n,title:r="Controls",closeFolders:s=!1,injectStyles:a=!0,touchStyles:d=!0}={}){if(this.parent=t,this.root=t?t.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",g=>{(g.code==="Enter"||g.code==="Space")&&(g.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(r),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),d&&this.domElement.classList.add("allow-touch-styles"),!pt&&a&&(Ut(Ht),pt=!0),e?e.appendChild(this.domElement):o&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=s}add(t,o,e,n,r){if(Object(e)===e)return new V(this,t,o,e);let s=t[o];switch(typeof s){case"number":return new q(this,t,o,e,n,r);case"boolean":return new Z(this,t,o);case"string":return new tt(this,t,o);case"function":return new U(this,t,o)}console.error(`gui.add failed
423
+ property:`,o,`
424
+ object:`,t,`
425
+ value:`,s)}addColor(t,o,e=1){return new K(this,t,o,e)}addFolder(t){let o=new i({parent:this,title:t});return this.root._closeFolders&&o.close(),o}load(t,o=!0){return t.controllers&&this.controllers.forEach(e=>{e instanceof U||e._name in t.controllers&&e.load(t.controllers[e._name])}),o&&t.folders&&this.folders.forEach(e=>{e._title in t.folders&&e.load(t.folders[e._title])}),this}save(t=!0){let o={controllers:{},folders:{}};return this.controllers.forEach(e=>{if(!(e instanceof U)){if(e._name in o.controllers)throw new Error(`Cannot save GUI with duplicate property "${e._name}"`);o.controllers[e._name]=e.save()}}),t&&this.folders.forEach(e=>{if(e._title in o.folders)throw new Error(`Cannot save GUI with duplicate folder "${e._title}"`);o.folders[e._title]=e.save()}),o}open(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(t){this._closed!==t&&(this._closed=t,this._callOnOpenClose(this))}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let o=this.$children.clientHeight;this.$children.style.height=o+"px",this.domElement.classList.add("transition");let e=r=>{r.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",e))};this.$children.addEventListener("transitionend",e);let n=t?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!t),requestAnimationFrame(()=>{this.$children.style.height=n+"px"})}),this}title(t){return this._title=t,this.$title.textContent=t,this}reset(t=!0){return(t?this.controllersRecursive():this.controllers).forEach(e=>e.reset()),this}onChange(t){return this._onChange=t,this}_callOnChange(t){this.parent&&this.parent._callOnChange(t),this._onChange!==void 0&&this._onChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(t){this.parent&&this.parent._callOnFinishChange(t),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onOpenClose(t){return this._onOpenClose=t,this}_callOnOpenClose(t){this.parent&&this.parent._callOnOpenClose(t),this._onOpenClose!==void 0&&this._onOpenClose.call(this,t)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(t=>t.destroy())}controllersRecursive(){let t=Array.from(this.controllers);return this.folders.forEach(o=>{t=t.concat(o.controllersRecursive())}),t}foldersRecursive(){let t=Array.from(this.folders);return this.folders.forEach(o=>{t=t.concat(o.foldersRecursive())}),t}},Y=G;v();v();var w=(()=>{let i=new ct;return function(o){return i.set(o),`#${i.getHexString()}`}})();function gt(i){let t;for(t of i)t()}function et(i,t){let o=window.location.href,e=new URL(o),n=new URLSearchParams(e.search);for(let r in i)if(i.hasOwnProperty(r)){let s=`${t}.${r}`;n.set(s,i[r])}e.search=n.toString(),history.pushState({path:e.toString()},"",e.toString())}function it(i,t){let o=new URLSearchParams(window.location.search),e={};for(let[n,r]of o)if(n.startsWith(`${i}.`)){let s=n.slice(i.length+1);r==="true"||r==="false"?e[s]=r==="true":typeof t?.[s]=="number"?e[s]=Number(r):e[s]=r}return{namespace:i,params:e}}var zt=["interactive"];function N(i,t,o){let e=o.addFolder(`${t.type}-${t.id}`);for(let n in t){if(n==="visible"&&e.add(t,n).onChange(r=>{i.updateState(t.id,{[n]:r})}),n==="color"||n==="hoverColor"){t[n]=w(t[n]),e.addColor(t,n).onChange(r=>{i.updateState(t.id,{[n]:r})});continue}if(n==="height"){e.add(t,n,0,20,1).onChange(r=>{i.updateState(t.id,{[n]:r})});continue}if(n==="texture"&&t.texture){e.addFolder("Texture - side").add(t,"texture")?.onChange(s=>{i.updateState(t.id,{texture:{url:s}})});continue}if(n==="topTexture"&&t.topTexture){e.addFolder("Texture - top").add(t,"topTexture")?.onChange(s=>{i.updateState(t.id,{topTexture:{url:s}})});continue}if(n==="opacity"){e.add(t,n,0,1,.1).onChange(r=>{i.updateState(t.id,{[n]:r})});continue}if(n==="altitude"){e.add(t,n,0,100,1).onChange(r=>{i.updateState(t.id,{[n]:r})});continue}zt.includes(n)&&e.add(t,n).onChange(r=>{i.updateState(t.id,{[n]:r})})}return t.isInView&&(e.add(t,"isInView").listen().disable(),e.add(t,"isInViewCheck")),{cleanup(){e.destroy()}}}v();v();function Pt(){let i=[];function t(n,r){let s=Object.values(n.getMapData())[0],a=r;if(a&&j.is(a)){let d=s.getByType("enterprise-location")?.find(g=>g.spaces.some(c=>c.id===a.id));d&&(a=d)}return a}async function o(n,r){return r instanceof X?n.Camera.focusOn(r.locations.flatMap(s=>s.spaces),P):r instanceof T?n.Camera.focusOn(r.spaces,P):n.Camera.focusOn(r,P)}function e(n,r,{focus:s=!1}={}){if(!window.enableHighlightCard)return()=>{};let a=t(n,r),d=document.createElement("div");if(d.style.cssText=`
426
+ position: absolute;
427
+ top: 20px;
428
+ left: 20px;
429
+ background-color: rgba(30, 30, 30, 0.95);
430
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
431
+ border-radius: 12px;
432
+ padding: 24px;
433
+ max-width: 320px;
434
+ z-index: 1000;
435
+ font-family: 'Arial', sans-serif;
436
+ transition: all 0.3s ease;
437
+ color: #e0e0e0;
438
+ `,"name"in a){let c=document.createElement("h3");c.textContent=a.name,c.style.cssText=`
439
+ margin: 0 0 16px;
440
+ font-size: 22px;
441
+ font-weight: 600;
442
+ color: #ffffff;
443
+ letter-spacing: -0.5px;
444
+ `,d.appendChild(c)}if(a instanceof T){if(a.description){let c=document.createElement("p");c.textContent=a.description,c.style.cssText=`
445
+ margin: 0 0 16px;
446
+ font-size: 14px;
447
+ color: #b0b0b0;
448
+ line-height: 1.5;
449
+ `,d.appendChild(c)}if(a.tags&&a.tags.length>0){let c=document.createElement("div");c.style.cssText=`
450
+ display: flex;
451
+ flex-wrap: nowrap;
452
+ gap: 8px;
453
+ margin-bottom: 16px;
454
+ overflow-x: hidden;
455
+ max-height: 30px; /* Adjust this value based on your font size and padding */
456
+ `,a.tags.forEach(u=>{let p=document.createElement("span");p.textContent=u,p.style.cssText=`
457
+ background-color: #3a3a3a;
458
+ color: #e0e0e0;
459
+ padding: 6px 12px;
460
+ border-radius: 16px;
461
+ font-size: 12px;
462
+ font-weight: 500;
463
+ text-transform: uppercase;
464
+ white-space: nowrap;
465
+ `,c.appendChild(p)}),d.appendChild(c)}}let g;if(!(r instanceof X)){let c=new Y({autoPlace:!1});c.domElement.style.cssText=`
466
+ position: relative;
467
+ overflow-y: auto;
468
+ margin-top: 16px;
469
+ border-top: 1px solid #444;
470
+ padding-top: 16px;
471
+ `;let u=n.getState(r);u&&(N(n,{id:r.id,...u},c),d.appendChild(c.domElement)),g=c}return document.body.appendChild(d),s&&o(n,a),()=>{d.style.opacity="0",d.style.transform="translateY(-10px)",setTimeout(()=>d.remove(),300),g?.destroy()}}return{highlightCard:e,highlight:(n,r,{focus:s=!0}={})=>{i.length>0&&i.forEach(d=>n.Markers.remove(d));let a=t(n,r);if(a instanceof T)s&&n.Camera.focusOn(a.spaces,P),i.push(...a.spaces.map(d=>n.Markers.add(d,`<div style="padding: 15px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); max-width: 250px; position: relative;">
472
+ <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">${a.name}</h3>
473
+ ${a.description?`<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">${a.description}</p>`:""}
474
+ ${a.tags?a.tags.map(g=>`<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">${g}</span>`).join(" "):""}
475
+ <div style="position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #ffffff;"></div>
476
+ </div>`,{rank:"always-visible",anchor:"top"})));else if(a instanceof X){s&&n.Camera.focusOn(a.locations.flatMap(c=>c.spaces),P);let d=new Map,g=new Set;a.locations.forEach(c=>{d.has(c.name)||(c.spaces.forEach(u=>{i.push(n.Markers.add(u,`<div style="padding: 12px; background-color: rgba(0, 153, 51, 0.95); border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transform: translateY(-4px); transition: all 0.3s ease;">
477
+ <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">${c.name}</span>
478
+ </div>`,{rank:"always-visible"}))}),d.set(c.name,!0))}),a.locations.forEach(c=>{c.coordinates.forEach(u=>{let p=`${u.latitude},${u.longitude}`;if(!g.has(p)&&!d.has(c.name)){let l=n.Markers.add(u,`<div style="padding: 10px; background-color: rgba(51, 102, 204, 0.9); border-radius: 6px; box-shadow: 0 3px 6px rgba(0,0,0,0.2);">
479
+ <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">${c.name}</span>
480
+ <br>
481
+ <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>
482
+ </div>`,{rank:"always-visible"});g.add(p),i.push(l)}})})}return()=>{i.forEach(d=>n.Markers.remove(d))}}}}var P={duration:300,easing:"ease-in-out"},W=Pt();v();var E={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function Rt(i){i.add(E.options.places.fields,"name").name("Places: Name"),i.add(E.options.places.fields,"description").name("Places: Description"),i.add(E.options.places.fields,"link").name("Places: Link"),i.add(E.options.places.fields,"category").name("Places: Category"),i.add(E.options.places,"limit"),i.add(E.options.locations.fields,"name").name("Locations: Name"),i.add(E.options.locations.fields,"tag").name("Locations: Tag"),i.add(E.options.locations.fields,"description").name("Locations: Description"),i.add(E.options.places,"limit"),i.add(E.options.categories.fields,"name").name("Categories: Name")}function ft(i,t,o){let e=new H,n=o.addFolder("Search");n.open();let r=n.add(E,"search").onChange(async c=>{let u=await t.Search.query(c,E.options);u&&(E.results=u,a(u,e))}),s=document.createElement("div");s.style.marginLeft="10px",r.domElement.parentElement?.appendChild(s);let{renderSearch:a,close:d}=jt(i,t,s,r.$input),g=n.addFolder("Advanced");return g.close(),Rt(g),document.addEventListener("keydown",c=>{(c.metaKey||c.ctrlKey)&&c.key==="k"?(c.preventDefault(),n._closed&&n.open(),r.$input.focus()):c.key==="Escape"&&(d(),e.publish("highlight",void 0))}),{pubsub:e}}function jt(i,t,o,e){let n,r;e.addEventListener("input",async a=>{a instanceof InputEvent&&(a.inputType==="insertText"||a.inputType==="insertCompositionText")&&(clearTimeout(n),n=setTimeout(async()=>{let d=await t.Search.suggest(e.value);d&&d.length>0&&s(d[0]?.suggestion)},100))});function s(a){if(!a){e.placeholder="";return}let d=e.value;e.value=a,e.setSelectionRange(d.length,a.length)}return{renderSearch(a,d){if(a.places.length===0&&a.enterpriseCategories?.length===0&&a.enterpriseLocations?.length===0){o.textContent="No results found.";return}r=Xt(o,a,i,d)},close(){r.destroy()}}}function Xt(i,t,o,e){i.innerHTML="";let n=document.createElement("div");Object.assign(n.style,J.dropdownContainer);let r=document.createElement("ul");r.className="options-list",Object.assign(r.style,J.optionsList),r.style.display="block";let s=[],a=(p,l)=>{if(l&&l.length>0){let h=document.createElement("li");h.textContent=p,Object.assign(h.style,J.sectionHeader),r.appendChild(h),l.forEach((m,C)=>{let f=document.createElement("li");f.textContent=`${"name"in m.item?m.item.name:""} (${m.type})`,Object.assign(f.style,J.option),f.tabIndex=0,f.addEventListener("focus",()=>{g(s.indexOf(f))}),f.addEventListener("mouseover",()=>{f.style.backgroundColor="#f0f0f0"}),f.addEventListener("mouseout",()=>{f.style.backgroundColor=""}),f.addEventListener("click",()=>{}),f.setAttribute("data-type",p),f.setAttribute("data-index",C.toString()),r.appendChild(f),s.push(f)})}};a("enterpriseLocations",t.enterpriseLocations),a("enterpriseCategories",t.enterpriseCategories),a("Places",t.places),n.appendChild(r),i.appendChild(n);let d=[],g=p=>{d.forEach(f=>f()),d=[],s.forEach((f,b)=>{b===p?f.style.backgroundColor="#e0e0e0":f.style.backgroundColor=""});let l=s[p],h=l.getAttribute("data-type"),m=parseInt(l.getAttribute("data-index")||"0",10);if(!h)return;let{item:C}=t[h.toLowerCase()][m];e.publish("highlight",C)},c=p=>{!n.contains(p.target)&&p.target!==i&&u()};document.addEventListener("click",c);let u=()=>{i.innerHTML="",document.removeEventListener("click",c)};return{destroy(){i.innerHTML="",e.publish("highlight",void 0)}}}var J={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function mt(i,t,o){o.domElement.id="interactionPanel";let e=[],{pubsub:n}=ft(i,t,o);n.on("highlight",c=>{if(c){e.forEach(p=>p()),e=[];let u=c instanceof T?c.spaces[0]:c;if(i.Camera.focusOn(c),u&&!j.is(u))return;e.push(W.highlightCard(i,u,{focus:!0}))}else e.forEach(u=>u()),e=[]});let r=o.addFolder("Click \u{1F447}").close(),{sub:s}=Yt(i,r);s.on("click",c=>{e.forEach(u=>u()),e=[],c.spaces[0]&&(e=[W.highlightCard(i,c.spaces[0])])});let a=o.addFolder("Hover \u{1F681}").close(),{sub:d}=Nt(i,a),g;d.on("hover",c=>{c.spaces[0]?(g?.(),e.length===0&&(g=W.highlightCard(i,c.spaces[0]))):(g?.(),g=void 0)})}function Yt(i,t){let o=new H,e={position:"",hoverColor:w(i.getHoverColor())},n=t.add(e,"position").disable(),r=[];function s(){r.forEach(d=>d()),r.length=0}let a=0;return i.on("click",d=>{let{labels:g,markers:c,coordinate:u}=d;s(),o.publish("click",d),clearInterval(a),n.load(JSON.stringify([u.longitude,u.latitude]));let p=g[0]||c[0];if(p){let h=nt(i,p,t);if(!h)return;r.push(h.destroy),h.labelItemFolder.openAnimated()}let l=d.spaces[0]??d.objects[0];if(l){let h={id:l.id,...i.getState(l.id),type:l.type,isInView:!1,isInViewCheck:ot(i,l.id)},{cleanup:m}=N(i,h,t);a=setInterval(()=>{h.isInView=i.isInView(p||l)},500),r.push(m)}}),{sub:o}}function Nt(i,t){let o=new H;i.setHoverColor("#1f3a7a");let e={position:"",hoverColor:w(i.getHoverColor()),intersected:"",type:"",id:""},n=t.add(e,"position").disable();t.add(e,"id").disable().listen(),t.add(e,"type").disable().listen(),t.addColor(e,"hoverColor").onChange(a=>{i.setHoverColor(a)});let r=[];function s(){r.forEach(a=>a()),r.length=0}return i.on("hover",a=>{let{coordinate:d,spaces:g,objects:c,markers:u,labels:p}=a;s(),o.publish("hover",a),n.load(JSON.stringify([d.longitude,d.latitude]));let l=g[0]??c[0]??u[0]??p[0];if(!l)return;let h=i.getState(l);h&&(e.type=h.type,e.id=l.id)}),{sub:o}}function ot(i,t){return function(){console.log("isInView",i.isInView(t))}}function bt(i,t,o){let e={labels:{},all(){o.Labels.all().forEach(l=>{this.labels[l.id]=l}),d()},removeAllLabels(){o.Labels.removeAll().forEach(l=>{delete this.labels[l.id]}),d()}},{addLabel:n,destroy:r}=Wt(i,o);i.add(e,"all"),i.add(e,"removeAllLabels");let s=i.addFolder("Label List");i.close();let a=new Map,{rerender:d}=g();function g(){function p(m){delete e.labels[m.id],a.get(m.id)?.destroy()}function l(m){let C=nt(o,m,s,{onRemove:b=>{p(b)}});if(!C)return;let{labelItemFolder:f}=C;a.set(m.id,f)}function h(){s.destroy(),s=i.addFolder("Label");for(let m in e.labels){let C=e.labels[m];l(C)}}return{rerender:h,add:l,remove:p}}i.domElement.classList.add("list-items");let c;o.on("click",({labels:p,coordinate:l})=>{if(!i._closed)if(p[0]){c?.close();let h=a.get(p[0].id);if(i.open(),!h)return;h?.open(),h?.domElement.scrollIntoView({block:"start"}),h?.domElement.focus(),c=h}else n(l)});function u(p){for(let l of p)e.labels[l.id]=l;d()}return{populatelabels:u,destroy(){r()}}}function nt(i,t,o,{onRemove:e}={}){let n=o.addFolder(`${t.text?.substring(0,12)}`);n.onChange(g=>{i.updateState(t,{appearance:d.appearance,interactive:d.interactive})}),n.close();let r=i.getState(t);if(r?.type!=="label")throw new Error(`error getting state for label: ${t.id}`);let{appearance:s,interactive:a}=r;if(!s||s.margin==null||a==null)throw new Error("incomplte label state");let d={text:t.text,interactive:a,appearance:{...s,margin:s.margin||0,marker:{foregroundColor:s.marker?.foregroundColor?.active?w(s.marker.foregroundColor?.active):"black"},text:{foregroundColor:w(s.text.foregroundColor)}},remove(){i.Labels.remove(t),e?.(t),n.destroy()},isInView:ot(i,t.id)};return n.add(d.appearance,"margin",0,20).name("margin"),n.add(d,"text"),n.add(d,"interactive"),n.addColor(d.appearance.marker,"foregroundColor").name("marker foreground"),n.addColor(d.appearance.text,"foregroundColor").name("text forground"),n.add(d,"isInView"),n.add(d,"remove"),{labelItemFolder:n,destroy(){n.destroy()}}}function Wt(i,t){let o=i.addFolder("Add"),e={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:w("skyblue"),marginBackgroundColor:w("coral"),textForegroundColor:w("slategray"),textBackgroundColor:w("white")};return o.add(e,"onClick"),o.add(e,"margin"),o.add(e,"interactive"),o.add(e,"text"),o.addColor(e,"marginForegroundColor"),o.addColor(e,"marginBackgroundColor"),o.addColor(e,"textForegroundColor"),o.addColor(e,"textBackgroundColor"),{destroy(){o.destroy()},addLabel(n){return o._closed||!e.onClick?void 0:t.Labels.add(n,e.text,{appearance:{margin:e.margin,marker:{foregroundColor:{active:e.marginForegroundColor,inactive:e.marginForegroundColor},backgroundColor:{active:e.marginBackgroundColor,inactive:e.marginBackgroundColor}},text:{foregroundColor:e.textForegroundColor,backgroundColor:e.marginBackgroundColor}},interactive:e.interactive})}}}var vt={};v();var yt="camera-ui";function Ct(i,t,o){let e=i.addFolder("Camera \u{1F4F7}").onOpenClose(x=>{et({opened:!x._closed},yt)}),{params:n}=it(yt);n.opened||e.close();let r=t.Camera.center.toJSON(),s=document.createElement("div");Object.assign(s.style,{display:"none",position:"absolute",left:"0px",zIndex:999,top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),t.__core.container.appendChild(s);let{innerHeight:a,innerWidth:d}=window,[g,c,u,p]=o?.padding??[t.Camera.screenOffsets.top,t.Camera.screenOffsets.right,t.Camera.screenOffsets.bottom,t.Camera.screenOffsets.left],l={center_lat:r.latitude,center_lon:r.longitude,zoomLevel:t.Camera.zoomLevel,pitch:t.Camera.pitch,bearing:t.Camera.bearing,minZoomLevel:t.Camera.minZoomLevel,maxZoomLevel:t.Camera.maxZoomLevel,inset_type:o?.padding?"pixel":t.Camera.screenOffsets.type,inset_top:g??0,inset_left:p??0,inset_right:c??0,inset_bottom:u??0,animateOnLoad:!0,persist:()=>{et(e.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(g||c||u||p),"Focus on click":o?.focusOnClick??!0,"Focus on current floor":()=>{t.Camera.focusOn([t.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function h(){l.inset_type=t.Camera.screenOffsets.type,l.inset_left=t.Camera.screenOffsets.left,l.inset_top=t.Camera.screenOffsets.top,l.inset_right=t.Camera.screenOffsets.right,l.inset_bottom=t.Camera.screenOffsets.bottom,l.inset_type==="portion"?Object.assign(s.style,{left:l.inset_left*d+"px",top:l.inset_top*a+"px",bottom:l.inset_bottom*a+"px",right:l.inset_right*d+"px"}):Object.assign(s.style,{left:l.inset_left+"px",top:l.inset_top+"px",bottom:l.inset_bottom+"px",right:l.inset_right+"px"})}e.add(l,"center_lat").listen().disable(),e.add(l,"center_lon").listen().disable(),e.add(l,"zoomLevel",16,22,.5).listen().disable(),e.add(l,"pitch").listen().disable(),e.add(l,"bearing").listen().disable(),e.add(l,"minZoomLevel",5,22,.5).onChange(x=>{t.Camera.setMinZoomLevel(x)}),e.add(l,"maxZoomLevel",10,22,.5).onChange(x=>{t.Camera.setMaxZoomLevel(x)}),e.add(l,"animateOnLoad"),e.add(l,"visualizeInset").onChange(I),I(l.visualizeInset),e.add(l,"inset_type",["pixel","portion"]).onChange(A),e.add(l,"inset_top",0,a).onChange(A),e.add(l,"inset_bottom",0,a).onChange(A),e.add(l,"inset_left",0,d).onChange(A),e.add(l,"inset_right",0,d).onChange(A);let m=Zt(t);e.add(l,"Focus on click").onChange(x=>{x?t.on("click",m):t.off("click",m)}),l["Focus on click"]&&t.on("click",m),e.add(l,"persist"),e.add(l,"Focus on current floor");let C=x=>{e._closed||(l.center_lat=x.center.latitude,l.center_lon=x.center.longitude,l.zoomLevel=x.zoomLevel,l.bearing=x.bearing,l.pitch=x.pitch)};t.on("camera-change",C);let{params:f}=it("camera",l);if(Object.keys(f).length>0){let x=f;t.Camera.setScreenOffsets({top:x.inset_top,left:x.inset_left,right:x.inset_right,bottom:x.inset_bottom,type:x.inset_type});let lt={pitch:x.pitch,center:new ht(x.center_lat,x.center_lon),bearing:x.bearing,zoomLevel:x.zoomLevel};x.animateOnLoad?t.Camera.animateTo(lt):t.Camera.set(lt),e.load({controllers:x,folders:{}}),h()}let b=[()=>{t.off("camera-change",C)}];function A(){t.Camera.setScreenOffsets({top:l.inset_top,left:l.inset_left,right:l.inset_right,bottom:l.inset_bottom,type:l.inset_type}),h()}(l.inset_top||l.inset_right||l.inset_bottom||l.inset_left)&&A();function I(x){h(),x?s.style.display="block":s.style.display="none"}return()=>({destroy(){e.destroy(),gt(b)}})}function Zt(i){return function(o){let{spaces:e,objects:n}=o,r=e[0]??n[0];r&&i.Camera.focusOn(r)}}v();function xt(i,t,o){let e={markers:{},removeAllMarkers(){o.Markers.removeAll().forEach(l=>{delete this.markers[l.id]}),d()}},{addMarker:n,destroy:r}=Kt(i,o);i.add(e,"removeAllMarkers");let s=i.addFolder("Marker List");i.close();let a=new Map,{rerender:d}=g();function g(){function p(m){delete e.markers[m.id],a.get(m.id)?.destroy()}function l(m){let C=Qt(o,m,s,{onRemove:b=>{p(b)}});if(!C)return;let{markerItemFolder:f}=C;a.set(m.id,f)}function h(){s.destroy(),s=i.addFolder("marker");for(let m in e.markers){let C=e.markers[m];l(C)}}return{rerender:h,add:l,remove:p}}i.domElement.classList.add("list-items");let c;o.on("click",({markers:p,coordinate:l})=>{if(!i._closed)if(p[0]){c?.close();let h=a.get(p[0].id);if(i.open(),!h)return;h?.open(),h?.domElement.scrollIntoView({block:"start"}),h?.domElement.focus(),c=h}else n(l)});function u(p){for(let l of p)e.markers[l.id]=l;d()}return{populateMarkers:u,destroy(){r()}}}function Qt(i,t,o,{onRemove:e}={}){let n=o.addFolder(`${t.id.toString().substring(0,8)}`);n.onChange(d=>{i.updateState(t,{interactive:a.interactive})}),n.close();let r=i.getState(t);if(r?.type!=="marker")throw new Error(`error getting state for marker: ${t.id}`);let{interactive:s}=r;if(s==null)throw new Error("incomplte label state");let a={interactive:s,remove(){i.Markers.remove(t),e?.(t),n.destroy()}};return n.add(a,"interactive"),n.add(a,"remove"),{markerItemFolder:n,destroy(){n.destroy()}}}function Kt(i,t){let o=i.addFolder("Add"),e={onClick:!1,interactive:!0};return o.add(e,"onClick"),o.add(e,"interactive"),{destroy(){o.destroy()},addMarker(n){return o._closed||!e.onClick?void 0:t.Markers.add(n,"<div>New Marker</div>",{interactive:e.interactive})}}}v();function At(i,t){let o=i.addFolder("Walls").close(),e={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};o.add(e,"visible").onChange(s=>{t.updateState("walls",{visible:s})}),o.addColor(e,"topColor").onChange(s=>{t.updateState("walls",{topColor:s})}),o.addColor(e,"color").onChange(s=>{t.updateState("walls",{color:s})}),o.addFolder("Texture - side").add(e.texture,"url").onFinishChange(s=>{t.updateState("walls",{texture:{url:s}})}),o.addFolder("Texture - top").add(e.topTexture,"url").onFinishChange(s=>{t.updateState("walls",{topTexture:{url:s}})}),t.updateState("walls",{topColor:e.topColor}),t.updateState("walls",{color:e.color})}v();function kt(i,t,o){i.close();let e={language:o.currentLanguage?.code??"en"},n=o.getByType("enterprise-venue");i.add(e,"language",n?.languages.map(r=>r.code)).onChange(r=>{o.changeLanguage(r)})}v();function Mt(i,t,o){let e=i.addFolder("Debug");e.close();let n=t.Debug.state,r={showPolygonLabelTextAreaMesh:n.showPolygonLabelTextAreaMesh,showCollisionBoxes:n.showCollisionBoxes,showEnvMap:n.showEnvMap};e.add(r,"showPolygonLabelTextAreaMesh").onChange(s=>{t.Debug.update({showPolygonLabelTextAreaMesh:s})}).name("Show Flat Label Text Area Mesh"),e.add(r,"showCollisionBoxes").onChange(s=>{t.Debug.update({showCollisionBoxes:s})}).name("Show Collision Boxes"),e.add(r,"showEnvMap").onChange(s=>{t.Debug.update({showEnvMap:s})}).name("Show Environment Map"),t.Debug.update(r)}v();function Et(i,t,o){let e=i.addFolder("Text3D").close(),n={all:()=>{t.Text3D.labelAll()},removeAll:()=>{t.Text3D.removeAll()}};e.add(n,"all").name("Show All"),e.add(n,"removeAll").name("Remove All")}v();v();v();var _,R,L,k,$,F,wt,st,_t,rt=class{constructor(t=new G({autoPlace:!0})){D(this,F);D(this,_);D(this,R,[]);D(this,L,{});D(this,k,{});D(this,$,{});dt(this,_,t),y(this,_).domElement.style.left="0"}add(t,o,e){if(y(this,k)[t])throw new Error(`Control ${t} already exists`);y(this,L)[t]=o,y(this,$)[t]=o.default,B(this,F,wt).call(this,t,o,e),this.show()}addColor(t,o,e){if(y(this,k)[t])throw new Error(`Control ${t} already exists`);y(this,L)[t]=o,y(this,$)[t]=o.default,B(this,F,_t).call(this,t,o,e),this.show()}update(t,o){if(!y(this,k)[t])throw new Error(`Control ${t} does not exist`);y(this,k)[t].setValue(o),y(this,L)[t].onChange&&y(this,L)[t].onChange(o,t)}replace(t,o,e){if(!y(this,k)[t]){this.add(t,o,e);return}o.args&&y(this,k)[t].options(o.args),o.default&&y(this,k)[t].setValue(o.default),o.onChange&&y(this,k)[t].onChange(n=>{o.onChange(n,t)})}remove(t){if(!y(this,k)[t])throw new Error(`Control ${t} does not exist`);y(this,k)[t].destroy(),y(this,k)[t].parent.children.length===0&&y(this,k)[t].parent.hide(),delete y(this,k)[t],delete y(this,L)[t],delete y(this,$)[t]}show(){y(this,_).show()}hide(){y(this,_).hide()}removeAll(){for(let t in y(this,k))this.remove(t)}destroy(){y(this,_).destroy()}};_=new WeakMap,R=new WeakMap,L=new WeakMap,k=new WeakMap,$=new WeakMap,F=new WeakSet,wt=function(t,o,e){let r=B(this,F,st).call(this,e).add(y(this,$),t,o.args,o.max,o.step);o.onChange&&r.onChange(s=>{o.onChange(s,t)}),o.onAdd&&o.onAdd(o.default,t),y(this,k)[t]=r},st=function(t){if(!t)return y(this,_);let o=y(this,R).find(e=>e._title===t);return o?(o.show(),o):(o=y(this,_).addFolder(t),y(this,R).push(o),o)},_t=function(t,o,e){let r=B(this,F,st).call(this,e).addColor(y(this,$),t);o.onChange&&r.onChange(s=>{o.onChange(s,t)}),y(this,k)[t]=r};function qt(i,t,o){let e={},n=i.getByType("floor"),r=i.getByType("floor-stack");r.length>1&&(e.FloorStack={default:t.currentFloorStack.id,args:r.reduce((a,{id:d,name:g})=>({...a,[g]:d}),{}),onChange:a=>{a!==t.currentFloorStack.id&&(t.setFloorStack(a),o.replace("Floor",{default:t.currentFloor.id,args:t.currentFloorStack.floors.reduce((d,{id:g,name:c})=>({...d,[c]:g}),{})}))}}),n.length>1&&(e.Floor={default:t.currentFloor.id,args:[...t.currentFloorStack.floors.sort((a,d)=>d.elevation-a.elevation)].reduce((a,{id:d,name:g})=>({...a,[g]:d}),{}),onChange:a=>{a!==t.currentFloor.id&&t.setFloor(a)},onAdd:()=>{t.on("floor-change",a=>{a?.floor.id&&(r.length>1&&o.replace("FloorStack",{default:t.currentFloorStack.id}),o.replace("Floor",{default:t.currentFloor.id,args:t.currentFloorStack.floors.reduce((g,{id:c,name:u})=>({...g,[u]:c}),{})}))})}});let s=i.getByType("enterprise-venue");return s&&s.languages.length>1&&(e.Language={default:i.currentLanguage?.code||s.languages[0].code,args:s.languages.reduce((a,{code:d,name:g})=>({...a,[g]:d}),{}),onChange:a=>{i.changeLanguage(a)}}),e}function Ft(i,t,o=new G){let e=new rt(o),n=qt(i,t,e);Object.keys(n).length||e.hide();for(let r in n)e.add(r,n[r]);return e}async function St(i,t,{initialfloorsInStack:o,root:e,floorsInDirections:n,showLabelsPerFloor:r=!0}){async function s(h){i.StackedMaps.changeFloorOnElevationChanges(!1),i.Outdoor.setOpacity(.15),i.StackedMaps.setFloorVisiblityMode("only-current-floor"),i.Camera.setPanMode("default"),await i.Camera.focusOn(h,{pitch:10})}async function a(){i.Outdoor.setOpacity(.25),i.StackedMaps.changeFloorOnElevationChanges(!0),i.Camera.setPanMode("elevation"),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.focusOn(i.currentFloor,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90})}async function d(h){await i.Camera.animateElevation(h.elevation*i.StackedMaps.distanceBetweenFloors)}let g=i.currentFloor;i.on("floor-change",async h=>{i.StackedMaps.expanded&&h.reason!=="stacked-maps-elevation-change"&&(i.StackedMaps.changeFloorOnElevationChanges(!1),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.focusOn(g,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90,duration:500}),i.StackedMaps.changeFloorOnElevationChanges(!0),await d(i.currentFloor),await s(i.currentFloor),i.StackedMaps.setFloorVisiblityMode("only-current-floor")),g=i.currentFloor}),i.on("stacked-maps-state-change",({state:h})=>{console.log("stacked-maps-state-change",h)});let c=t.getByType("space");if(r){let h=c.reduce((m,C)=>(m.has(C.floor)||m.set(C.floor,[]),C.name&&C.name!==""&&m.get(C.floor).push(i.Labels.add(C,C.name)),m),new Map);i.on("floor-change",()=>{h.forEach((m,C)=>{m.forEach(f=>{i.updateState(f,{enabled:i.currentFloor===C})})})})}let u=Ft(t,i,e),p=o??[];async function l(){i.Outdoor.setOpacity(.25),p=t.getByType("floor"),await i.Camera.animateTo({pitch:90}),await i.StackedMaps.collapse(),i.StackedMaps.clearCachedFloorSeparationDistance(),await i.StackedMaps.expand({distanceBetweenFloors:"auto"})}return u.add("Expand - All",{default:async()=>{await l()}},"Stack Maps"),n&&u.add("Expand - Only Navigation",{default:async()=>{i.Outdoor.setOpacity(.25),p=n,await i.StackedMaps.collapse(),i.setFloor(n[0]),await i.StackedMaps.expand({includedFloors:n,distanceBetweenFloors:"auto"})}},"Stack Maps"),u.add("Show All Floors",{default:async()=>{p=t.getByType("floor"),i.Outdoor.setOpacity(.25),i.StackedMaps.setFloorVisiblityMode("all-floors"),i.StackedMaps.changeFloorOnElevationChanges(!1),i.Camera.setPanMode("elevation"),i.Camera.focusOn(p,{pitch:90})}},"Stack Maps"),u.add("Show Current Floor with padding",{default:async()=>{await a()}},"Stack Maps"),u.add("Zoom to Current Floor",{default:async()=>{s(i.currentFloor)}},"Stack Maps"),u.add("Collapse",{default:()=>{i.Outdoor.setOpacity("initial"),i.StackedMaps.collapse()}},"Stack Maps"),u.add("Default",{default:async()=>{i.Camera.setPanMode("default")}},"Camera Pan Mode"),u.add("Elevation",{default:async()=>{i.Camera.setPanMode("elevation")}},"Camera Pan Mode"),u.add("zoom in to floor 2",{default:async()=>{i.Outdoor.setOpacity(.25),console.log(i.currentFloor.name),await i.Camera.focusOn(i.currentFloor,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90}),i.StackedMaps.expanded||await i.StackedMaps.expand({distanceBetweenFloors:i.StackedMaps.distanceBetweenFloors});let h=i.StackedMaps.includedFloors[2],m=p.findIndex(C=>C.id===h.id);i.StackedMaps.changeFloorOnElevationChanges(!0),i.Camera.setPanMode("elevation"),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.animateElevation(m*i.StackedMaps.distanceBetweenFloors),i.Outdoor.setOpacity(.15),console.log("focusing on",h.name),await i.Camera.focusOn(h,{pitch:10}),i.StackedMaps.setFloorVisiblityMode("only-current-floor"),i.Camera.setPanMode("default"),i.StackedMaps.changeFloorOnElevationChanges(!1)}},"Camera Pan Mode"),u.add("All Floors",{default:async()=>{i.StackedMaps.setFloorVisiblityMode("all-floors")}},"Visibility Mode"),u.add("Only Active Floor",{default:async()=>{i.StackedMaps.setFloorVisiblityMode("only-current-floor")}},"Visibility Mode"),u.add("Up",{default:async()=>{let h=p.find(m=>m.elevation===i.currentFloor.elevation+1);h&&await d(h)}},"Floors Up/Down"),u.add("Down",{default:async()=>{let h=p.find(m=>m.elevation===i.currentFloor.elevation-1);h&&await d(h)}},"Floors Up/Down"),{zoomToFloor:s,expandAll:l}}function Lt(i,t,o){let e=i.addFolder("StackedMaps");e.close(),St(t,o,{root:e,showLabelsPerFloor:!1})}function It(i,t,o){Vt();let e=new Y({title:"SDK Controls"});e.domElement.classList.add("mappedin-js-inspector"),mt(t,i,e),Ct(e,t,o?.camera);let n=e.addFolder("Levels").close(),r=e.addFolder("Scene Controls");r.close();let s=e.addFolder("Labels");Et(e,t,i);let a=e.addFolder("Markers");At(e,t),Lt(e,t,i);let d=e.addFolder("misc");Mt(e,t,i),kt(d,t,i);let g={level:t.currentFloor.id},{populatelabels:c}=bt(s,i,t),{populateMarkers:u}=xt(a,i,t),p=i.getByType("floor").reduce((h,m)=>(h[m.name]=m.id,h),{}),l=n.add(g,"level",p).onChange(h=>{t.setFloor(h),g.level=t.currentFloor.id,l.updateDisplay()});return t.on("floor-change-start",h=>{n.controllers[0].setValue(h.floor.id)}),i.getByType("space").forEach(h=>{t.updateState(h,{interactive:!0})}),i.getByType("object").forEach(h=>{t.updateState(h,{interactive:!0})}),i.getByType("object").forEach(h=>{t.updateState(h,{interactive:!0})}),t.setHoverColor("#a2b7e6"),t.Camera.setMaxZoomLevel(20),{populatelabels:c,sceneFolder:r,populateMarkers:u}}var $t="mappedin-sdk-debug-css";function Vt(){if(document.getElementById($t))return;let i=document.createElement("style");i.id=$t,i.textContent=vt,document.head.appendChild(i)}var at=class{constructor(t,o){O(this,"_enabled",!1);O(this,"mv");O(this,"api");O(this,"mapData");O(this,"scenegraphVisualizerMounted",!1);O(this,"storeStateToLocalStorageEnabled",!1);this.mv=t,this.api=o,this.mapData=this.api.getMapData()}setMapData(t){this.mapData=t}async enable(t={}){if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:o}=It(this.mapData,this.mv,t);o.onOpenClose(e=>{e===o&&!e._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,ut(this.api.core,o))}),this.api.getMapDataInternal()?.spaces.forEach(e=>{this.mv.updateState(e.id,{interactive:!0})})}get enabled(){return this._enabled}};export{at as Inspector};
483
+ //# sourceMappingURL=inspector-GKTULNKY.js.map