@mappedin/mappedin-js 6.5.0 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_LICENSES.txt +31 -0
- package/lib/esm/{GLTFExporter-IJ34CDQB.js → GLTFExporter-RQ4X3IWO.js} +1 -1
- package/lib/esm/{GLTFLoader-PXCR6USU.js → GLTFLoader-VJHWNKS5.js} +1 -1
- package/lib/esm/{chunk-WD5FGIM2.js → chunk-6SFEDLKY.js} +1 -1
- package/lib/esm/chunk-CJ52KBIE.js +1 -0
- package/lib/esm/chunk-D53OXR7Z.js +1 -0
- package/lib/esm/{chunk-LUNYQOMN.js → chunk-RJF4TTOJ.js} +1 -1
- package/lib/esm/index.d.ts +205 -36
- package/lib/esm/index.js +1 -1
- package/lib/esm/inspector-X3O45PWP.js +1 -0
- package/lib/esm/{internal-65WQUW6L.js → internal-YSYMTO44.js} +1 -1
- package/lib/esm/{text3d-6ACSQOS4.js → text3d-24KWRIMN.js} +1 -1
- package/package.json +1 -1
- package/lib/esm/chunk-CBDJZJXS.js +0 -1
- package/lib/esm/chunk-PGIGUASH.js +0 -1
- package/lib/esm/inspector-IOGM6LC5.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{G as ce,J as X,K as he,a as de,h as G,q as I,r as B}from"./chunk-PGIGUASH.js";import{v as T}from"./chunk-CBDJZJXS.js";import"./chunk-LUNYQOMN.js";import{$ as le,a as x}from"./chunk-WD5FGIM2.js";import{a as $,b as H,i as S}from"./chunk-5W2UDR4H.js";x();x();x();x();var M=class n{constructor(e,i,t,r,l="div"){this.parent=e,this.object=i,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(l),this.domElement.classList.add("controller"),this.domElement.classList.add(r),this.$name=document.createElement("div"),this.$name.classList.add("name"),n.nextNameID=n.nextNameID||0,this.$name.id="lil-gui-name-".concat(++n.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",a=>a.stopPropagation()),this.domElement.addEventListener("keyup",a=>a.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(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,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(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let i=this.parent.add(this.object,this.property,e);return i.name(this._name),this.destroy(),i}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),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)}},K=class extends M{constructor(e,i,t){super(e,i,t,"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 V(n){let e,i;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),i?"#"+i:!1}var Le={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:V,toHexString:V},D={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},$e={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,i=1){let t=D.fromHexString(n);e[0]=(t>>16&255)/255*i,e[1]=(t>>8&255)/255*i,e[2]=(t&255)/255*i},toHexString([n,e,i],t=1){t=255/t;let r=n*t<<16^e*t<<8^i*t<<0;return D.toHexString(r)}},Se={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,i=1){let t=D.fromHexString(n);e.r=(t>>16&255)/255*i,e.g=(t>>8&255)/255*i,e.b=(t&255)/255*i},toHexString({r:n,g:e,b:i},t=1){t=255/t;let r=n*t<<16^e*t<<8^i*t<<0;return D.toHexString(r)}},Ie=[Le,D,$e,Se];function Te(n){return Ie.find(e=>e.match(n))}var Z=class extends M{constructor(e,i,t,r){super(e,i,t,"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=Te(this.initialValue),this._rgbScale=r,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 l=V(this.$text.value);l&&this._setValueFromHexString(l)}),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(e){if(this._format.isPrimitive){let i=this._format.fromHexString(e);this.setValue(i)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),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}},F=class extends M{constructor(e,i,t){super(e,i,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",r=>{r.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},Q=class extends M{constructor(e,i,t,r,l,a){super(e,i,t,"number"),this._initInput(),this.min(r),this.max(l);let s=a!==void 0;this.step(s?a:this._getImplicitStep(),s),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,i=!0){return this._step=e,this._stepExplicit=i,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let i=(e-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=i*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.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 i=()=>{let m=parseFloat(this.$input.value);isNaN(m)||(this._stepExplicit&&(m=this._snap(m)),this.setValue(this._clamp(m)))},t=m=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+m),this.$input.value=this.getValue())},r=m=>{m.key==="Enter"&&this.$input.blur(),m.code==="ArrowUp"&&(m.preventDefault(),t(this._step*this._arrowKeyMultiplier(m))),m.code==="ArrowDown"&&(m.preventDefault(),t(this._step*this._arrowKeyMultiplier(m)*-1))},l=m=>{this._inputFocused&&(m.preventDefault(),t(this._step*this._normalizeMouseWheel(m)))},a=!1,s,d,p,c,g,o=5,h=m=>{s=m.clientX,d=p=m.clientY,a=!0,c=this.getValue(),g=0,window.addEventListener("mousemove",u),window.addEventListener("mouseup",b)},u=m=>{if(a){let C=m.clientX-s,L=m.clientY-d;Math.abs(L)>o?(m.preventDefault(),this.$input.blur(),a=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>o&&b()}if(!a){let C=m.clientY-p;g-=C*this._step*this._arrowKeyMultiplier(m),c+g>this._max?g=this._max-c:c+g<this._min&&(g=this._min-c),this._snapClampSetValue(c+g)}p=m.clientY},b=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",b)},y=()=>{this._inputFocused=!0},f=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",i),this.$input.addEventListener("keydown",r),this.$input.addEventListener("wheel",l,{passive:!1}),this.$input.addEventListener("mousedown",h),this.$input.addEventListener("focus",y),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 e=(f,m,C,L,P)=>(f-m)/(C-m)*(P-L)+L,i=f=>{let m=this.$slider.getBoundingClientRect(),C=e(f,m.left,m.right,this._min,this._max);this._snapClampSetValue(C)},t=f=>{this._setDraggingStyle(!0),i(f.clientX),window.addEventListener("mousemove",r),window.addEventListener("mouseup",l)},r=f=>{i(f.clientX)},l=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",l)},a=!1,s,d,p=f=>{f.preventDefault(),this._setDraggingStyle(!0),i(f.touches[0].clientX),a=!1},c=f=>{f.touches.length>1||(this._hasScrollBar?(s=f.touches[0].clientX,d=f.touches[0].clientY,a=!0):p(f),window.addEventListener("touchmove",g,{passive:!1}),window.addEventListener("touchend",o))},g=f=>{if(a){let m=f.touches[0].clientX-s,C=f.touches[0].clientY-d;Math.abs(m)>Math.abs(C)?p(f):(window.removeEventListener("touchmove",g),window.removeEventListener("touchend",o))}else f.preventDefault(),i(f.touches[0].clientX)},o=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",g),window.removeEventListener("touchend",o)},h=this._callOnFinishChange.bind(this),u=400,b,y=f=>{if(Math.abs(f.deltaX)<Math.abs(f.deltaY)&&this._hasScrollBar)return;f.preventDefault();let C=this._normalizeMouseWheel(f)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(h,u)};this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",c,{passive:!1}),this.$slider.addEventListener("wheel",y,{passive:!1})}_setDraggingStyle(e,i="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-".concat(i),e)}_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(e){let{deltaX:i,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(i=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),i+-t}_arrowKeyMultiplier(e){let i=this._stepExplicit?1:10;return e.shiftKey?i*=10:e.altKey&&(i/=10),i}_snap(e){let i=Math.round(e/this._step)*this._step;return parseFloat(i.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}},q=class extends M{constructor(e,i,t,r){super(e,i,t,"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(r)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(i=>{let t=document.createElement("option");t.textContent=i,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),i=this._values.indexOf(e);return this.$select.selectedIndex=i,this.$display.textContent=i===-1?e:this._names[i],this}},ee=class extends M{constructor(e,i,t){super(e,i,t,"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",r=>{r.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}},Fe='.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "\u2195";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n line-height: calc(var(--title-height) - 4px);\n font-weight: 600;\n padding: 0 var(--padding);\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n outline: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "\u25BE";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "\u25B8";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "\u2713";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n border: none;\n}\n@media (hover: hover) {\n .lil-gui button:hover {\n background: var(--hover-color);\n }\n .lil-gui button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n 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");\n}';function De(n){let e=document.createElement("style");e.innerHTML=n;let i=document.querySelector("head link[rel=stylesheet], head style");i?document.head.insertBefore(e,i):document.head.appendChild(e)}var ue=!1,te=class n{constructor({parent:e,autoPlace:i=e===void 0,container:t,width:r,title:l="Controls",closeFolders:a=!1,injectStyles:s=!0,touchStyles:d=!0}={}){if(this.parent=e,this.root=e?e.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",p=>{(p.code==="Enter"||p.code==="Space")&&(p.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(l),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"),!ue&&s&&(De(Fe),ue=!0),t?t.appendChild(this.domElement):i&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),r&&this.domElement.style.setProperty("--width",r+"px"),this._closeFolders=a}add(e,i,t,r,l){if(Object(t)===t)return new q(this,e,i,t);let a=e[i];switch(typeof a){case"number":return new Q(this,e,i,t,r,l);case"boolean":return new K(this,e,i);case"string":return new ee(this,e,i);case"function":return new F(this,e,i)}console.error("gui.add failed\n property:",i,"\n object:",e,"\n value:",a)}addColor(e,i,t=1){return new Z(this,e,i,t)}addFolder(e){let i=new n({parent:this,title:e});return this.root._closeFolders&&i.close(),i}load(e,i=!0){return e.controllers&&this.controllers.forEach(t=>{t instanceof F||t._name in e.controllers&&t.load(e.controllers[t._name])}),i&&e.folders&&this.folders.forEach(t=>{t._title in e.folders&&t.load(e.folders[t._title])}),this}save(e=!0){let i={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof F)){if(t._name in i.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(t._name,'"'));i.controllers[t._name]=t.save()}}),e&&this.folders.forEach(t=>{if(t._title in i.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(t._title,'"'));i.folders[t._title]=t.save()}),i}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let i=this.$children.clientHeight;this.$children.style.height=i+"px",this.domElement.classList.add("transition");let t=l=>{l.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",t))};this.$children.addEventListener("transitionend",t);let r=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=r+"px"})}),this}title(e){return this._title=e,this.$title.textContent=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),this._onOpenClose!==void 0&&this._onOpenClose.call(this,e)}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(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(i=>{e=e.concat(i.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(i=>{e=e.concat(i.foldersRecursive())}),e}},U=te;x();x();var E=(()=>{let n=new le;return function(i){return n.set(i),"#".concat(n.getHexString())}})();function pe(n){let e;for(e of n)e()}function ie(n,e){let i=window.location.href,t=new URL(i),r=new URLSearchParams(t.search);for(let l in n)if(n.hasOwnProperty(l)){let a="".concat(e,".").concat(l);r.set(a,n[l])}t.search=r.toString(),history.pushState({path:t.toString()},"",t.toString())}function ne(n,e){let i=new URLSearchParams(window.location.search),t={};for(let[r,l]of i)if(r.startsWith("".concat(n,"."))){let a=r.slice(n.length+1);l==="true"||l==="false"?t[a]=l==="true":typeof(e==null?void 0:e[a])=="number"?t[a]=Number(l):t[a]=l}return{namespace:n,params:t}}var Oe=["interactive"];function R(n,e,i){var l,a;let t={id:e.id,__type:e.__type},r=i.addFolder("".concat(e.type,"-").concat(e.id));for(let s in e){if(s==="visible"&&r.add(e,s).onChange(d=>{n.updateState(t,{[s]:d})}),s==="color"||s==="hoverColor"){e[s]=E(e[s]),r.addColor(e,s).onChange(d=>{n.updateState(t,{[s]:d})});continue}if(s==="height"){r.add(e,s,0,20,1).onChange(d=>{n.updateState(t,{[s]:d})});continue}if(s==="texture"&&e.texture){(l=r.addFolder("Texture - side").add(e,"texture"))==null||l.onChange(p=>{n.updateState(t,{texture:{url:p}})});continue}if(s==="topTexture"&&e.topTexture){(a=r.addFolder("Texture - top").add(e,"topTexture"))==null||a.onChange(p=>{n.updateState(t,{topTexture:{url:p}})});continue}if(s==="opacity"){r.add(e,s,0,1,.1).onChange(d=>{n.updateState(t,{[s]:d})});continue}if(s==="altitude"){r.add(e,s,0,100,1).onChange(d=>{n.updateState(t,{[s]:d})});continue}Oe.includes(s)&&r.add(e,s).onChange(d=>{n.updateState(t,{[s]:d})})}return e.isInView&&(r.add(e,"isInView").listen().disable(),r.add(e,"isInViewCheck")),{cleanup(){r.destroy()}}}x();x();function ze(){let n=[];function e(r,l){var d;let a=Object.values(r.getMapData())[0],s=l;if(s&&G.is(s)){let p=(d=a.getByType("enterprise-location"))==null?void 0:d.find(c=>c.spaces.some(g=>g.id===s.id));p&&(s=p)}return s}async function i(r,l){return l instanceof B?r.Camera.focusOn(l.locations.flatMap(a=>a.spaces),O):l instanceof I?r.Camera.focusOn(l.spaces,O):r.Camera.focusOn(l,O)}function t(r,l,{focus:a=!1}={}){if(!window.enableHighlightCard)return()=>{};let s=e(r,l),d=document.createElement("div");if(d.style.cssText="\n position: absolute;\n top: 20px;\n left: 20px;\n background-color: rgba(30, 30, 30, 0.95);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);\n border-radius: 12px;\n padding: 24px;\n max-width: 320px;\n z-index: 1000;\n font-family: 'Arial', sans-serif;\n transition: all 0.3s ease;\n color: #e0e0e0;\n ","name"in s){let c=document.createElement("h3");c.textContent=s.name,c.style.cssText="\n margin: 0 0 16px;\n font-size: 22px;\n font-weight: 600;\n color: #ffffff;\n letter-spacing: -0.5px;\n ",d.appendChild(c)}if(s instanceof I){if(s.description){let c=document.createElement("p");c.textContent=s.description,c.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",d.appendChild(c)}if(s.tags&&s.tags.length>0){let c=document.createElement("div");c.style.cssText="\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n margin-bottom: 16px;\n overflow-x: hidden;\n max-height: 30px; /* Adjust this value based on your font size and padding */\n ",s.tags.forEach(g=>{let o=document.createElement("span");o.textContent=g,o.style.cssText="\n background-color: #3a3a3a;\n color: #e0e0e0;\n padding: 6px 12px;\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n white-space: nowrap;\n ",c.appendChild(o)}),d.appendChild(c)}}let p;if(!(l instanceof B)){let c=new U({autoPlace:!1});c.domElement.style.cssText="\n position: relative;\n overflow-y: auto;\n margin-top: 16px;\n border-top: 1px solid #444;\n padding-top: 16px;\n ";let g=r.getState(l);g&&(R(r,$({id:l.id},g),c),d.appendChild(c.domElement)),p=c}return document.body.appendChild(d),a&&i(r,s),()=>{d.style.opacity="0",d.style.transform="translateY(-10px)",setTimeout(()=>d.remove(),300),p==null||p.destroy()}}return{highlightCard:t,highlight:(r,l,{focus:a=!0}={})=>{n.length>0&&n.forEach(d=>r.Markers.remove(d));let s=e(r,l);if(s instanceof I)a&&r.Camera.focusOn(s.spaces,O),n.push(...s.spaces.map(d=>r.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;">\n <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">'.concat(s.name,"</h3>\n ").concat(s.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(s.description,"</p>"):"","\n ").concat(s.tags?s.tags.map(p=>'<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">'.concat(p,"</span>")).join(" "):"",'\n <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>\n </div>'),{rank:"always-visible",placement:"top"})));else if(s instanceof B){a&&r.Camera.focusOn(s.locations.flatMap(c=>c.spaces),O);let d=new Map,p=new Set;s.locations.forEach(c=>{d.has(c.name)||(c.spaces.forEach(g=>{n.push(r.Markers.add(g,'<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;">\n <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">'.concat(c.name,"</span>\n </div>"),{rank:"always-visible"}))}),d.set(c.name,!0))}),s.locations.forEach(c=>{c.coordinates.forEach(g=>{let o="".concat(g.latitude,",").concat(g.longitude);if(!p.has(o)&&!d.has(c.name)){let h=r.Markers.add(g,'<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);">\n <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">'.concat(c.name,'</span>\n <br>\n <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>\n </div>'),{rank:"always-visible"});p.add(o),n.push(h)}})})}return()=>{n.forEach(d=>r.Markers.remove(d))}}}}var O={duration:300,easing:"ease-in-out"},j=ze();x();var _={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 Pe(n){n.add(_.options.places.fields,"name").name("Places: Name"),n.add(_.options.places.fields,"description").name("Places: Description"),n.add(_.options.places.fields,"link").name("Places: Link"),n.add(_.options.places.fields,"category").name("Places: Category"),n.add(_.options.places,"limit"),n.add(_.options.locations.fields,"name").name("Locations: Name"),n.add(_.options.locations.fields,"tag").name("Locations: Tag"),n.add(_.options.locations.fields,"description").name("Locations: Description"),n.add(_.options.places,"limit"),n.add(_.options.categories.fields,"name").name("Categories: Name")}function ge(n,e,i){var c;let t=new T,r=i.addFolder("Search");r.open();let l=r.add(_,"search").onChange(async g=>{let o=await e.Search.query(g,_.options);o&&(_.results=o,s(o,t))}),a=document.createElement("div");a.style.marginLeft="10px",(c=l.domElement.parentElement)==null||c.appendChild(a);let{renderSearch:s,close:d}=He(n,e,a,l.$input),p=r.addFolder("Advanced");return p.close(),Pe(p),document.addEventListener("keydown",g=>{(g.metaKey||g.ctrlKey)&&g.key==="k"?(g.preventDefault(),r._closed&&r.open(),l.$input.focus()):g.key==="Escape"&&(d(),t.publish("highlight",void 0))}),{pubsub:t}}function He(n,e,i,t){let r,l;t.addEventListener("input",async s=>{s instanceof InputEvent&&(s.inputType==="insertText"||s.inputType==="insertCompositionText")&&(clearTimeout(r),r=setTimeout(async()=>{var p;let d=await e.Search.suggest(t.value);d&&d.length>0&&a((p=d[0])==null?void 0:p.suggestion)},100))});function a(s){if(!s){t.placeholder="";return}let d=t.value;t.value=s,t.setSelectionRange(d.length,s.length)}return{renderSearch(s,d){var p,c;if(s.places.length===0&&((p=s.enterpriseCategories)==null?void 0:p.length)===0&&((c=s.enterpriseLocations)==null?void 0:c.length)===0){i.textContent="No results found.";return}l=Ge(i,s,n,d)},close(){l.destroy()}}}function Ge(n,e,i,t){n.innerHTML="";let r=document.createElement("div");Object.assign(r.style,N.dropdownContainer);let l=document.createElement("ul");l.className="options-list",Object.assign(l.style,N.optionsList),l.style.display="block";let a=[],s=(o,h)=>{if(h&&h.length>0){let u=document.createElement("li");u.textContent=o,Object.assign(u.style,N.sectionHeader),l.appendChild(u),h.forEach((b,y)=>{let f=document.createElement("li");f.textContent="".concat("name"in b.item?b.item.name:""," (").concat(b.type,")"),Object.assign(f.style,N.option),f.tabIndex=0,f.addEventListener("focus",()=>{p(a.indexOf(f))}),f.addEventListener("mouseover",()=>{f.style.backgroundColor="#f0f0f0"}),f.addEventListener("mouseout",()=>{f.style.backgroundColor=""}),f.addEventListener("click",()=>{}),f.setAttribute("data-type",o),f.setAttribute("data-index",y.toString()),l.appendChild(f),a.push(f)})}};s("enterpriseLocations",e.enterpriseLocations),s("enterpriseCategories",e.enterpriseCategories),s("Places",e.places),r.appendChild(l),n.appendChild(r);let d=[],p=o=>{d.forEach(f=>f()),d=[],a.forEach((f,m)=>{m===o?f.style.backgroundColor="#e0e0e0":f.style.backgroundColor=""});let h=a[o],u=h.getAttribute("data-type"),b=parseInt(h.getAttribute("data-index")||"0",10);if(!u)return;let{item:y}=e[u.toLowerCase()][b];t.publish("highlight",y)},c=o=>{!r.contains(o.target)&&o.target!==n&&g()};document.addEventListener("click",c);let g=()=>{n.innerHTML="",document.removeEventListener("click",c)};return{destroy(){n.innerHTML="",t.publish("highlight",void 0)}}}var N={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 fe(n,e,i){i.domElement.id="interactionPanel";let t=[],{pubsub:r}=ge(n,e,i);r.on("highlight",c=>{if(c){t.forEach(o=>o()),t=[];let g=c instanceof I?c.spaces[0]:c;if(n.Camera.focusOn(c),g&&!G.is(g))return;t.push(j.highlightCard(n,g,{focus:!0}))}else t.forEach(g=>g()),t=[]});let l=i.addFolder("Click \u{1F447}").close(),{sub:a}=Be(n,l);a.on("click",c=>{var g;t.forEach(o=>o()),t=[],(g=c.spaces)!=null&&g[0]&&(t=[j.highlightCard(n,c.spaces[0])])});let s=i.addFolder("Hover \u{1F681}").close(),{sub:d}=Ue(n,s),p;d.on("hover",c=>{var g;(g=c.spaces)!=null&&g[0]?(p==null||p(),t.length===0&&(p=j.highlightCard(n,c.spaces[0]))):(p==null||p(),p=void 0)})}function Be(n,e){let i=new T,t={position:"",hoverColor:E(n.getHoverColor())},r=e.add(t,"position").disable(),l=[];function a(){l.forEach(d=>d()),l.length=0}let s=0;return n.on("click",d=>{var h,u,b;let{labels:p,coordinate:c}=d;a(),i.publish("click",d),clearInterval(s),r.load(JSON.stringify([c.longitude,c.latitude]));let g=p==null?void 0:p[0];if(g!=null){let y=z(n,g,e);if(!y)return;l.push(y.destroy),y.labelItemFolder.openAnimated()}let o=(b=(h=d.spaces)==null?void 0:h[0])!=null?b:(u=d.objects)==null?void 0:u[0];if(o){let y=H($($({},o),n.getState(o)),{isInView:!1,isInViewCheck:Y(n,o.id)}),{cleanup:f}=R(n,y,e);s=setInterval(()=>{y.isInView=n.isInView(g||o)},500),l.push(f)}}),{sub:i}}function Ue(n,e){let i=new T;n.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},r=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(s=>{n.setHoverColor(s)});let l=[];function a(){l.forEach(s=>s()),l.length=0}return n.on("hover",s=>{var b,y,f;let{coordinate:d,spaces:p,objects:c,markers:g,labels:o}=s;a(),i.publish("hover",s),r.load(JSON.stringify([d.longitude,d.latitude]));let h=(f=(y=(b=p==null?void 0:p[0])!=null?b:c==null?void 0:c[0])!=null?y:g==null?void 0:g[0])!=null?f:o==null?void 0:o[0];if(!h)return;let u=n.getState(h);u&&(t.type=u.type,t.id=h.id)}),{sub:i}}function Y(n,e){return function(){console.log("isInView",n.isInView(e))}}function me(n,e,i){let t={labels:{},all(){i.Labels.__EXPERIMENTAL__all().forEach(h=>{this.labels[h.id]=h}),d()},removeAllLabels(){i.Labels.removeAll().forEach(h=>{delete this.labels[h.id]}),d()}},{addLabel:r,destroy:l}=Ne(n,i);n.add(t,"all"),n.add(t,"removeAllLabels");let a=n.addFolder("Label List");n.close();let s=new Map,{rerender:d}=p();function p(){function o(b){var y;delete t.labels[b.id],(y=s.get(b.id))==null||y.destroy()}function h(b){let y=z(i,b,a,{onRemove:m=>{o(m)}});if(!y)return;let{labelItemFolder:f}=y;s.set(b.id,f)}function u(){a.destroy(),a=n.addFolder("Label");for(let b in t.labels){let y=t.labels[b];h(y)}}return{rerender:u,add:h,remove:o}}n.domElement.classList.add("list-items");let c;i.on("click",({labels:o,coordinate:h})=>{if(!n._closed)if(o!=null&&o[0]){c==null||c.close();let u=s.get(o[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),c=u}else r(h)});function g(o){for(let h of o)t.labels[h.id]=h;d()}return{populatelabels:g,destroy(){l()}}}function Re(n,e,i,t,r){var b,y,f;let{interactive:l,enabled:a,rank:s,anchor:d,dynamicResize:p,zIndex:c,contentHTML:g,lowPriorityPin:o}=t;if(l==null||a==null)throw new Error("incomplete marker state");let h={interactive:l,enabled:a,rank:s||"medium",anchor:Array.isArray(d)?d.join(", "):d||"center",dynamicResize:p||!1,zIndex:c||0,contentHTML:g||"",lowPriorityPin:{enabled:(b=o==null?void 0:o.enabled)!=null?b:!0,size:(y=o==null?void 0:o.size)!=null?y:8,color:E((f=o==null?void 0:o.color)!=null?f:"#666")},remove(){n.Markers.remove(e),r==null||r(e),i.destroy()},isInView:Y(n,e.id)};i.onChange(m=>{let C={interactive:h.interactive,enabled:h.enabled,rank:h.rank,dynamicResize:h.dynamicResize,contentHTML:h.contentHTML,lowPriorityPin:{enabled:h.lowPriorityPin.enabled,size:h.lowPriorityPin.size,color:h.lowPriorityPin.color}};h.rank==="always-visible"&&(C.zIndex=h.zIndex),n.updateState(e,C)}),i.add(h,"interactive"),i.add(h,"enabled"),i.add(h,"rank",["medium","high","always-visible","initial"]).name("rank"),i.add(h,"anchor").name("anchor (read-only)").disable(),i.add(h,"dynamicResize").name("dynamic resize"),h.rank==="always-visible"&&i.add(h,"zIndex",0,1e3,1).name("z-index"),i.add(h,"contentHTML").name("content HTML");let u=i.addFolder("Low Priority Pin");u.add(h.lowPriorityPin,"enabled"),u.add(h.lowPriorityPin,"size",1,20,1),u.addColor(h.lowPriorityPin,"color"),u.close(),i.add(h,"isInView"),i.add(h,"remove")}function je(n,e,i,t,r){let{appearance:l,interactive:a}=t;if(!l||l.margin==null||a==null)throw new Error("incomplte label state");let s={text:e.text,interactive:a,appearance:H($({},l),{margin:l.margin||0,pinColor:l.pinColor?E(l.pinColor):"black",textColor:l.textColor?E(l.textColor):"black"}),remove(){n.Labels.remove(e),r==null||r(e),i.destroy()},isInView:Y(n,e.id)};i.onChange(d=>{n.updateState(e,{appearance:s.appearance,interactive:s.interactive})}),i.add(s.appearance,"margin",0,20).name("margin"),i.add(s,"text"),i.add(s,"interactive"),i.addColor(s.appearance,"pinColor").name("pin color"),i.addColor(s.appearance,"pinOutlineColor").name("pin outline color"),i.addColor(s.appearance,"textColor").name("text color"),i.addColor(s.appearance,"textOutlineColor").name("text outline color"),i.add(s,"isInView"),i.add(s,"remove")}function z(n,e,i,{onRemove:t}={}){var s;let r=n.getState(e);if(!r)throw new Error("error getting state for entity: ".concat(e.id));let l=r.type===X?((s=e.text)==null?void 0:s.substring(0,12))||"Label":"Marker ".concat(e.id.toString().substring(0,8)),a=i.addFolder(l);if(a.close(),r.type===X)je(n,e,a,r,t);else if(r.type===he)Re(n,e,a,r,t);else throw new Error("unsupported entity type: ".concat(r.type));return{labelItemFolder:a,destroy(){a.destroy()}}}function Ne(n,e){let i=n.addFolder("Add"),t={onClick:!1,margin:6,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return i.add(t,"onClick"),i.add(t,"margin"),i.add(t,"interactive"),i.add(t,"text"),{destroy(){i.destroy()},addLabel(r){return i._closed||!t.onClick?void 0:e.Labels.add(r,t.text,{appearance:{margin:t.margin,pinColor:t.marginForegroundColor,pinOutlineColor:t.marginBackgroundColor,textColor:t.textForegroundColor,textOutlineColor:t.textBackgroundColor},interactive:t.interactive})}}}var be={};x();var ye="camera-ui";function ve(n,e,i){var se,ae;let t=n.addFolder("Camera \u{1F4F7}").onOpenClose(v=>{ie({opened:!v._closed},ye)}),{params:r}=ne(ye);r.opened||t.close();let l=e.Camera.center.toJSON(),a=document.createElement("div");Object.assign(a.style,{display:"none",position:"absolute",left:"0px",zIndex:999,top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),e.container.appendChild(a);let s=()=>e.getDimensions(),[d,p,c,g]=(se=i==null?void 0:i.padding)!=null?se:[e.Camera.screenOffsets.top,e.Camera.screenOffsets.right,e.Camera.screenOffsets.bottom,e.Camera.screenOffsets.left],o={center_lat:l.latitude,center_lon:l.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:i!=null&&i.padding?"pixel":e.Camera.screenOffsets.type,inset_top:d,inset_left:g,inset_right:p,inset_bottom:c,animateOnLoad:!0,persist:()=>{ie(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(d||p||c||g),"Focus on click":(ae=i==null?void 0:i.focusOnClick)!=null?ae:!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function h(){o.inset_type=e.Camera.screenOffsets.type,o.inset_left=e.Camera.screenOffsets.left,o.inset_top=e.Camera.screenOffsets.top,o.inset_right=e.Camera.screenOffsets.right,o.inset_bottom=e.Camera.screenOffsets.bottom;let{width:v,height:A}=s();o.inset_type==="portion"?Object.assign(a.style,{left:o.inset_left*v+"px",top:o.inset_top*A+"px",bottom:o.inset_bottom*A+"px",right:o.inset_right*v+"px"}):Object.assign(a.style,{left:o.inset_left+"px",top:o.inset_top+"px",bottom:o.inset_bottom+"px",right:o.inset_right+"px"})}t.add(o,"center_lat").listen().disable(),t.add(o,"center_lon").listen().disable(),t.add(o,"zoomLevel",16,22,.5).listen().disable(),t.add(o,"pitch").listen().disable(),t.add(o,"bearing").listen().disable(),t.add(o,"minZoomLevel",5,22,.5).onChange(v=>{e.Camera.setMinZoomLevel(v)}),t.add(o,"maxZoomLevel",10,22,.5).onChange(v=>{e.Camera.setMaxZoomLevel(v)}),t.add(o,"animateOnLoad"),t.add(o,"visualizeInset").onChange(re),re(o.visualizeInset);let u,b,y,f;function m(){let{width:v,height:A}=s(),J=e.Camera.screenOffsets.type,W=o.inset_type;J!==W&&(W==="portion"&&J==="pixel"?(o.inset_top=v>0?Math.min(o.inset_top/A,1):0,o.inset_bottom=v>0?Math.min(o.inset_bottom/A,1):0,o.inset_left=A>0?Math.min(o.inset_left/v,1):0,o.inset_right=A>0?Math.min(o.inset_right/v,1):0):W==="pixel"&&J==="portion"&&(o.inset_top=Math.round(o.inset_top*A),o.inset_bottom=Math.round(o.inset_bottom*A),o.inset_left=Math.round(o.inset_left*v),o.inset_right=Math.round(o.inset_right*v))),u&&u.destroy(),b&&b.destroy(),y&&y.destroy(),f&&f.destroy(),o.inset_type==="portion"?(u=t.add(o,"inset_top",0,1,.01).onChange(k),b=t.add(o,"inset_bottom",0,1,.01).onChange(k),y=t.add(o,"inset_left",0,1,.01).onChange(k),f=t.add(o,"inset_right",0,1,.01).onChange(k)):(u=t.add(o,"inset_top",0,A,1).onChange(k),b=t.add(o,"inset_bottom",0,A,1).onChange(k),y=t.add(o,"inset_left",0,v,1).onChange(k),f=t.add(o,"inset_right",0,v,1).onChange(k))}t.add(o,"inset_type",["pixel","portion"]).onChange(()=>{m(),k()}),m();let C=Je(e);t.add(o,"Focus on click").onChange(v=>{v?e.on("click",C):e.off("click",C)}),o["Focus on click"]&&e.on("click",C),t.add(o,"persist"),t.add(o,"Focus on current floor");let L=v=>{t._closed||(o.center_lat=v.center.latitude,o.center_lon=v.center.longitude,o.zoomLevel=v.zoomLevel,o.bearing=v.bearing,o.pitch=v.pitch)};e.on("camera-change",L);let{params:P}=ne("camera",o);if(Object.keys(P).length>0){let v=P;e.Camera.setScreenOffsets({top:v.inset_top,left:v.inset_left,right:v.inset_right,bottom:v.inset_bottom,type:v.inset_type});let A={pitch:v.pitch,center:new de(v.center_lat,v.center_lon),bearing:v.bearing,zoomLevel:v.zoomLevel};v.animateOnLoad?e.Camera.animateTo(A):e.Camera.set(A),t.load({controllers:v,folders:{}}),h()}let Me=[()=>{e.off("camera-change",L)}];function k(){e.Camera.setScreenOffsets({top:o.inset_top,left:o.inset_left,right:o.inset_right,bottom:o.inset_bottom,type:o.inset_type}),h()}(o.inset_top||o.inset_right||o.inset_bottom||o.inset_left)&&k();function re(v){h(),v?a.style.display="block":a.style.display="none"}return()=>({destroy(){t.destroy(),pe(Me)}})}function Je(n){return function(i){var a;let{spaces:t,objects:r}=i,l=(a=t==null?void 0:t[0])!=null?a:r==null?void 0:r[0];l&&n.Camera.focusOn(l)}}x();function xe(n,e,i){let t={markers:{},removeAllMarkers(){i.Markers.removeAll().forEach(h=>{delete this.markers[h.id]}),d()}},{addMarker:r,destroy:l}=We(n,i);n.add(t,"removeAllMarkers");let a=n.addFolder("Marker List");n.close();let s=new Map,{rerender:d}=p();function p(){function o(b){var y;delete t.markers[b.id],(y=s.get(b.id))==null||y.destroy()}function h(b){let y=z(i,b,a,{onRemove:m=>{o(m)}});if(!y)return;let{labelItemFolder:f}=y;s.set(b.id,f)}function u(){a.destroy(),a=n.addFolder("marker");for(let b in t.markers){let y=t.markers[b];h(y)}}return{rerender:u,add:h,remove:o}}n.domElement.classList.add("list-items");let c;i.on("click",({markers:o,coordinate:h})=>{if(!n._closed)if(o!=null&&o[0]){c==null||c.close();let u=s.get(o[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),c=u}else r(h)});function g(o){for(let h of o)t.markers[h.id]=h;d()}return{populateMarkers:g,destroy(){l()}}}function We(n,e){let i=n.addFolder("Add"),t={onClick:!1,interactive:!0,rank:"medium",anchor:"center",dynamicResize:!1,enabled:!0,zIndex:0,lowPriorityPin:{enabled:!0,size:8,color:"#666"},contentHTML:'<div style="padding: 8px; background: white; border: 2px solid #333; border-radius: 4px;">New Marker</div>'};i.add(t,"onClick"),i.add(t,"interactive"),i.add(t,"enabled"),i.add(t,"rank",["medium","high","always-visible","initial"]).name("rank"),i.add(t,"anchor",["center","top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]).name("anchor"),i.add(t,"dynamicResize").name("dynamic resize"),i.add(t,"zIndex",0,1e3,1).name("z-index (always-visible only)"),i.add(t,"contentHTML").name("content HTML");let r=i.addFolder("Low Priority Pin");return r.add(t.lowPriorityPin,"enabled"),r.add(t.lowPriorityPin,"size",1,20,1),r.addColor(t.lowPriorityPin,"color"),r.close(),{destroy(){i.destroy()},addMarker(l){if(i._closed||!t.onClick)return;let a={interactive:t.interactive,enabled:t.enabled,rank:t.rank,anchor:t.anchor,dynamicResize:t.dynamicResize,lowPriorityPin:{enabled:t.lowPriorityPin.enabled,size:t.lowPriorityPin.size,color:t.lowPriorityPin.color}};return t.rank==="always-visible"&&(a.zIndex=t.zIndex),e.Markers.add(l,t.contentHTML,a)}}}x();function Ce(n,e){let i=n.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};i.add(t,"visible").onChange(a=>{e.updateState("exterior-walls",{visible:a})}),i.addColor(t,"topColor").onChange(a=>{e.updateState("exterior-walls",{topColor:a})}),i.addColor(t,"color").onChange(a=>{e.updateState("exterior-walls",{color:a})}),i.addFolder("Texture - side").add(t.texture,"url").onFinishChange(a=>{e.updateState("exterior-walls",{texture:{url:a}})}),i.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(a=>{e.updateState("exterior-walls",{topTexture:{url:a}})}),e.updateState("exterior-walls",{topColor:t.topColor}),e.updateState("exterior-walls",{color:t.color})}x();function Ae(n,e,i){var l,a;n.close();let t={language:(a=(l=i.currentLanguage)==null?void 0:l.code)!=null?a:"en"},r=i.getByType("enterprise-venue");n.add(t,"language",r==null?void 0:r.languages.map(s=>s.code)).onChange(s=>{i.changeLanguage(s)})}x();function we(n,e,i){let t=n.addFolder("Debug");t.close();let r=e.Debug.state,l={showPolygonLabelTextAreaMesh:r.showPolygonLabelTextAreaMesh,showCollisionBoxes:r.showCollisionBoxes,showEnvMap:r.showEnvMap};t.add(l,"showPolygonLabelTextAreaMesh").onChange(a=>{e.Debug.update({showPolygonLabelTextAreaMesh:a})}).name("Show Flat Label Text Area Mesh"),t.add(l,"showCollisionBoxes").onChange(a=>{e.Debug.update({showCollisionBoxes:a})}).name("Show Collision Boxes"),t.add(l,"showEnvMap").onChange(a=>{e.Debug.update({showEnvMap:a})}).name("Show Environment Map"),e.Debug.update(l)}x();function _e(n,e,i){let t=n.addFolder("Text3D").close(),r={all:()=>{e.Text3D.labelAll()},removeAll:()=>{e.Text3D.removeAll()}};t.add(r,"all").name("Show All"),t.add(r,"removeAll").name("Remove All")}function ke(n,e,i){Xe();let t=new U({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),fe(e,n,t),ve(t,e,i==null?void 0:i.camera);let r=t.addFolder("Levels").close(),l=t.addFolder("Scene Controls");l.close();let a=t.addFolder("Labels");_e(t,e,n);let s=t.addFolder("Markers");Ce(t,e);let d=t.addFolder("misc");we(t,e,n),Ae(d,e,n);let p={level:e.currentFloor.id},{populatelabels:c}=me(a,n,e),{populateMarkers:g}=xe(s,n,e),o=n.getByType("floor").reduce((u,b)=>(u[b.name]=b.id,u),{}),h=r.add(p,"level",o).onChange(u=>{e.setFloor(u),p.level=e.currentFloor.id,h.updateDisplay()});return e.on("floor-change-start",u=>{r.controllers[0].setValue(u.floor.id)}),n.getByType("space").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:c,sceneFolder:l,populateMarkers:g}}var Ee="mappedin-sdk-debug-css";function Xe(){if(document.getElementById(Ee))return;let n=document.createElement("style");n.id=Ee,n.textContent=be,document.head.appendChild(n)}var oe=class{constructor(e,i){S(this,"_enabled",!1);S(this,"mv");S(this,"api");S(this,"mapData");S(this,"scenegraphVisualizerMounted",!1);S(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=i,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(e={}){var t;if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:i}=ke(this.mapData,this.mv,e);i.onOpenClose(r=>{r===i&&!r._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,ce(this.api.core,i))}),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(r=>{this.mv.updateState(r,{interactive:!0})})}get enabled(){return this._enabled}};export{oe as Inspector};
|