@mappedin/mappedin-js 6.0.1-beta.44 → 6.0.1-beta.45
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 +1 -20
- package/lib/esm/{GLTFExporter-4THLS4PM.js → GLTFExporter-33O74ZRA.js} +1 -1
- package/lib/esm/{GLTFLoader-KOQIUT25.js → GLTFLoader-TFEUICFY.js} +1 -1
- package/lib/esm/{browser-LGW6JLJT.js → browser-IE62BVYL.js} +1 -1
- package/lib/esm/{chunk-5SY5TZBS.js → chunk-7QYC6UYU.js} +1 -1
- package/lib/esm/chunk-AGPZKMLJ.js +1 -0
- package/lib/esm/chunk-HALSTKAB.js +1 -0
- package/lib/esm/{chunk-A5SAO63E.js → chunk-HTXG2WUL.js} +1 -1
- package/lib/esm/chunk-L5IJY45Y.js +1 -0
- package/lib/esm/chunk-N5U7Y27D.js +1 -0
- package/lib/esm/{chunk-QO7JQA7V.js → chunk-O57EU3PO.js} +1 -1
- package/lib/esm/index.d.ts +0 -10
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-KJE2KP6V.js → inspector-CC3UZQDZ.js} +1 -1
- package/lib/esm/{internal-RS3PVAR3.js → internal-MEGLEQC5.js} +1 -1
- package/lib/esm/outdoor-context-v4-5DHMHSDP.js +1 -0
- package/lib/esm/{roboto-regular-PKVZDOB2.js → roboto-regular-E2V4PXOH.js} +1 -1
- package/lib/esm/{text3d-QIM5QGO6.js → text3d-3PC3DCSJ.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/chunk-KNDTFHOY.js +0 -1
- package/lib/esm/chunk-M46A4YQ5.js +0 -1
- package/lib/esm/chunk-Q2KR5YO7.js +0 -1
- package/lib/esm/chunk-XGYIT3MM.js +0 -1
- package/lib/esm/outdoor-context-v4-6CUOE2HW.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -313,7 +313,6 @@ declare module '@mappedin/mappedin-js' {
|
|
|
313
313
|
export type THydrateMapDataBundle = {
|
|
314
314
|
type: 'binary';
|
|
315
315
|
options?: {
|
|
316
|
-
version?: '2.0.0' | '3.0.0';
|
|
317
316
|
enterprise?: boolean;
|
|
318
317
|
};
|
|
319
318
|
languagePacks?: {
|
|
@@ -327,7 +326,6 @@ declare module '@mappedin/mappedin-js' {
|
|
|
327
326
|
} | {
|
|
328
327
|
type: 'json';
|
|
329
328
|
options?: {
|
|
330
|
-
version?: '2.0.0' | '3.0.0';
|
|
331
329
|
enterprise?: boolean;
|
|
332
330
|
};
|
|
333
331
|
languagePacks?: {
|
|
@@ -4215,7 +4213,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
4215
4213
|
export type THydrateMapDataBundle = {
|
|
4216
4214
|
type: 'binary';
|
|
4217
4215
|
options?: {
|
|
4218
|
-
version?: '2.0.0' | '3.0.0';
|
|
4219
4216
|
enterprise?: boolean;
|
|
4220
4217
|
};
|
|
4221
4218
|
languagePacks?: {
|
|
@@ -4229,7 +4226,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
|
|
|
4229
4226
|
} | {
|
|
4230
4227
|
type: 'json';
|
|
4231
4228
|
options?: {
|
|
4232
|
-
version?: '2.0.0' | '3.0.0';
|
|
4233
4229
|
enterprise?: boolean;
|
|
4234
4230
|
};
|
|
4235
4231
|
languagePacks?: {
|
|
@@ -4897,11 +4893,6 @@ declare module '@mappedin/mappedin-js/packages/mvf-utils/mvf-utils' {
|
|
|
4897
4893
|
* @internal
|
|
4898
4894
|
*/
|
|
4899
4895
|
layoutId?: 'draft';
|
|
4900
|
-
/**
|
|
4901
|
-
* @hidden
|
|
4902
|
-
* @internal
|
|
4903
|
-
*/
|
|
4904
|
-
mvfVersion?: '2.0.0' | '3.0.0';
|
|
4905
4896
|
};
|
|
4906
4897
|
/**
|
|
4907
4898
|
* @interface
|
|
@@ -5075,7 +5066,6 @@ declare module '@mappedin/mappedin-js/packages/mvf-utils/mvf-utils' {
|
|
|
5075
5066
|
* outdoor map. If a map is not a multi-building map, an empty array is returned.
|
|
5076
5067
|
*/
|
|
5077
5068
|
export const getBuildingIds: (mvf: ParsedMVF) => string[];
|
|
5078
|
-
export function unzipAndParseMVFv2(data: Uint8Array, inputVersion?: '2.0.0' | '3.0.0'): Promise<ParsedMVF>;
|
|
5079
5069
|
}
|
|
5080
5070
|
|
|
5081
5071
|
declare module '@mappedin/mappedin-js/packages/mvf-utils/geometry' {
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as 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,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,v as w,w as x,y,z}from"./chunk-
|
|
1
|
+
import{B as 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,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,v as w,w as x,y,z}from"./chunk-AGPZKMLJ.js";import{b as a,c as b}from"./chunk-HTXG2WUL.js";import"./chunk-L5IJY45Y.js";import"./chunk-7QYC6UYU.js";import"./chunk-O57EU3PO.js";import"./chunk-N5U7Y27D.js";import"./chunk-HALSTKAB.js";export{o as Annotation,g as Area,l as Connection,c as Coordinate,B as DOORS,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,x as LocationCategory,w as LocationProfile,k as MAPPEDIN_COLORS,m as MapObject,d as Node,n as PointOfInterest,i as Space,A as WALLS,E as __setWatermarkOnClickFn,K as createMapLibreOverlay,C as disableText3DWorker,y as enableTestMode,I as getMapData,J as getMapDataEnterprise,H as hydrateMapData,F as hydrateMapDataFromMVF,u as parseMVF,z as preloadFont,b as setLoggerLevel,G as setUseEnterpriseAPI,D as setWorkersUrl,L as show3dMap,M as show3dMapGeojson,v as unzipMVF};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as ge,a as pe,g as N,p as T,q as R}from"./chunk-M46A4YQ5.js";import{r as G}from"./chunk-A5SAO63E.js";import"./chunk-XGYIT3MM.js";import"./chunk-5SY5TZBS.js";import{S as ue}from"./chunk-QO7JQA7V.js";import{a as y}from"./chunk-KNDTFHOY.js";import{e as O,f as C,g as D,h as he,i as B}from"./chunk-Q2KR5YO7.js";y();y();y();y();var S=class i{constructor(e,o,t,n,s="div"){this.parent=e,this.object=o,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(s),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-".concat(++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",r=>r.stopPropagation()),this.domElement.addEventListener("keyup",r=>r.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 o=this.parent.add(this.object,this.property,e);return o.name(this._name),this.destroy(),o}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)}},Z=class extends S{constructor(e,o,t){super(e,o,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 Q(i){let e,o;return(e=i.match(/(#|0x)?([a-f0-9]{6})/i))?o=e[2]:(e=i.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?o=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=i.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(o=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),o?"#"+o:!1}var Te={isPrimitive:!0,match:i=>typeof i=="string",fromHexString:Q,toHexString:Q},U={isPrimitive:!0,match:i=>typeof i=="number",fromHexString:i=>parseInt(i.substring(1),16),toHexString:i=>"#"+i.toString(16).padStart(6,0)},Pe={isPrimitive:!1,match:i=>Array.isArray(i),fromHexString(i,e,o=1){let t=U.fromHexString(i);e[0]=(t>>16&255)/255*o,e[1]=(t>>8&255)/255*o,e[2]=(t&255)/255*o},toHexString([i,e,o],t=1){t=255/t;let n=i*t<<16^e*t<<8^o*t<<0;return U.toHexString(n)}},Be={isPrimitive:!1,match:i=>Object(i)===i,fromHexString(i,e,o=1){let t=U.fromHexString(i);e.r=(t>>16&255)/255*o,e.g=(t>>8&255)/255*o,e.b=(t&255)/255*o},toHexString({r:i,g:e,b:o},t=1){t=255/t;let n=i*t<<16^e*t<<8^o*t<<0;return U.toHexString(n)}},Ge=[Te,U,Pe,Be];function ze(i){return Ge.find(e=>e.match(i))}var q=class extends S{constructor(e,o,t,n){super(e,o,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=ze(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 s=Q(this.$text.value);s&&this._setValueFromHexString(s)}),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 o=this._format.fromHexString(e);this.setValue(o)}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}},z=class extends S{constructor(e,o,t){super(e,o,t,"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}},V=class extends S{constructor(e,o,t,n,s,r){super(e,o,t,"number"),this._initInput(),this.min(n),this.max(s);let a=r!==void 0;this.step(a?r:this._getImplicitStep(),a),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,o=!0){return this._step=e,this._stepExplicit=o,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let o=(e-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?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 o=()=>{let b=parseFloat(this.$input.value);isNaN(b)||(this._stepExplicit&&(b=this._snap(b)),this.setValue(this._clamp(b)))},t=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(),t(this._step*this._arrowKeyMultiplier(b))),b.code==="ArrowDown"&&(b.preventDefault(),t(this._step*this._arrowKeyMultiplier(b)*-1))},s=b=>{this._inputFocused&&(b.preventDefault(),t(this._step*this._normalizeMouseWheel(b)))},r=!1,a,l,p,c,u,g=5,d=b=>{a=b.clientX,l=p=b.clientY,r=!0,c=this.getValue(),u=0,window.addEventListener("mousemove",h),window.addEventListener("mouseup",m)},h=b=>{if(r){let A=b.clientX-a,I=b.clientY-l;Math.abs(I)>g?(b.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(A)>g&&m()}if(!r){let A=b.clientY-p;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)}p=b.clientY},m=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",m)},v=()=>{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",s,{passive:!1}),this.$input.addEventListener("mousedown",d),this.$input.addEventListener("focus",v),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,b,A,I,Y)=>(f-b)/(A-b)*(Y-I)+I,o=f=>{let b=this.$slider.getBoundingClientRect(),A=e(f,b.left,b.right,this._min,this._max);this._snapClampSetValue(A)},t=f=>{this._setDraggingStyle(!0),o(f.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",s)},n=f=>{o(f.clientX)},s=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",s)},r=!1,a,l,p=f=>{f.preventDefault(),this._setDraggingStyle(!0),o(f.touches[0].clientX),r=!1},c=f=>{f.touches.length>1||(this._hasScrollBar?(a=f.touches[0].clientX,l=f.touches[0].clientY,r=!0):p(f),window.addEventListener("touchmove",u,{passive:!1}),window.addEventListener("touchend",g))},u=f=>{if(r){let b=f.touches[0].clientX-a,A=f.touches[0].clientY-l;Math.abs(b)>Math.abs(A)?p(f):(window.removeEventListener("touchmove",u),window.removeEventListener("touchend",g))}else f.preventDefault(),o(f.touches[0].clientX)},g=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",g)},d=this._callOnFinishChange.bind(this),h=400,m,v=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(d,h)};this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",c,{passive:!1}),this.$slider.addEventListener("wheel",v,{passive:!1})}_setDraggingStyle(e,o="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-".concat(o),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:o,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(o=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),o+-t}_arrowKeyMultiplier(e){let o=this._stepExplicit?1:10;return e.shiftKey?o*=10:e.altKey&&(o/=10),o}_snap(e){let o=Math.round(e/this._step)*this._step;return parseFloat(o.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}},ee=class extends S{constructor(e,o,t,n){super(e,o,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(n)}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(o=>{let t=document.createElement("option");t.textContent=o,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),o=this._values.indexOf(e);return this.$select.selectedIndex=o,this.$display.textContent=o===-1?e:this._names[o],this}},te=class extends S{constructor(e,o,t){super(e,o,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",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}},Ue='.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 He(i){let e=document.createElement("style");e.innerHTML=i;let o=document.querySelector("head link[rel=stylesheet], head style");o?document.head.insertBefore(e,o):document.head.appendChild(e)}var fe=!1,P=class i{constructor({parent:e,autoPlace:o=e===void 0,container:t,width:n,title:s="Controls",closeFolders:r=!1,injectStyles:a=!0,touchStyles:l=!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(s),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),l&&this.domElement.classList.add("allow-touch-styles"),!fe&&a&&(He(Ue),fe=!0),t?t.appendChild(this.domElement):o&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=r}add(e,o,t,n,s){if(Object(t)===t)return new ee(this,e,o,t);let r=e[o];switch(typeof r){case"number":return new V(this,e,o,t,n,s);case"boolean":return new Z(this,e,o);case"string":return new te(this,e,o);case"function":return new z(this,e,o)}console.error("gui.add failed\n property:",o,"\n object:",e,"\n value:",r)}addColor(e,o,t=1){return new q(this,e,o,t)}addFolder(e){let o=new i({parent:this,title:e});return this.root._closeFolders&&o.close(),o}load(e,o=!0){return e.controllers&&this.controllers.forEach(t=>{t instanceof z||t._name in e.controllers&&t.load(e.controllers[t._name])}),o&&e.folders&&this.folders.forEach(t=>{t._title in e.folders&&t.load(e.folders[t._title])}),this}save(e=!0){let o={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof z)){if(t._name in o.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(t._name,'"'));o.controllers[t._name]=t.save()}}),e&&this.folders.forEach(t=>{if(t._title in o.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(t._title,'"'));o.folders[t._title]=t.save()}),o}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 o=this.$children.clientHeight;this.$children.style.height=o+"px",this.domElement.classList.add("transition");let t=s=>{s.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",t))};this.$children.addEventListener("transitionend",t);let n=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=n+"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(o=>{e=e.concat(o.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(o=>{e=e.concat(o.foldersRecursive())}),e}},J=P;y();y();var E=(()=>{let i=new ue;return function(o){return i.set(o),"#".concat(i.getHexString())}})();function me(i){let e;for(e of i)e()}function ie(i,e){let o=window.location.href,t=new URL(o),n=new URLSearchParams(t.search);for(let s in i)if(i.hasOwnProperty(s)){let r="".concat(e,".").concat(s);n.set(r,i[s])}t.search=n.toString(),history.pushState({path:t.toString()},"",t.toString())}function oe(i,e){let o=new URLSearchParams(window.location.search),t={};for(let[n,s]of o)if(n.startsWith("".concat(i,"."))){let r=n.slice(i.length+1);s==="true"||s==="false"?t[r]=s==="true":typeof(e==null?void 0:e[r])=="number"?t[r]=Number(s):t[r]=s}return{namespace:i,params:t}}var je=["interactive"];function W(i,e,o){var n,s;let t=o.addFolder("".concat(e.type,"-").concat(e.id));for(let r in e){if(r==="visible"&&t.add(e,r).onChange(a=>{i.updateState(e.id,{[r]:a})}),r==="color"||r==="hoverColor"){e[r]=E(e[r]),t.addColor(e,r).onChange(a=>{i.updateState(e.id,{[r]:a})});continue}if(r==="height"){t.add(e,r,0,20,1).onChange(a=>{i.updateState(e.id,{[r]:a})});continue}if(r==="texture"&&e.texture){(n=t.addFolder("Texture - side").add(e,"texture"))==null||n.onChange(l=>{i.updateState(e.id,{texture:{url:l}})});continue}if(r==="topTexture"&&e.topTexture){(s=t.addFolder("Texture - top").add(e,"topTexture"))==null||s.onChange(l=>{i.updateState(e.id,{topTexture:{url:l}})});continue}if(r==="opacity"){t.add(e,r,0,1,.1).onChange(a=>{i.updateState(e.id,{[r]:a})});continue}je.includes(r)&&t.add(e,r).onChange(a=>{i.updateState(e.id,{[r]:a})})}return e.isInView&&(t.add(e,"isInView").listen().disable(),t.add(e,"isInViewCheck")),{cleanup(){t.destroy()}}}y();y();function Ye(){let i=[];function e(n,s){var l;let r=Object.values(n.getMapData())[0],a=s;if(a&&N.is(a)){let p=(l=r.getByType("enterprise-location"))==null?void 0:l.find(c=>c.spaces.some(u=>u.id===a.id));p&&(a=p)}return a}async function o(n,s){return s instanceof R?n.Camera.focusOn(s.locations.flatMap(r=>r.spaces),H):s instanceof T?n.Camera.focusOn(s.spaces,H):n.Camera.focusOn(s,H)}function t(n,s,{focus:r=!1}={}){if(!window.enableHighlightCard)return()=>{};let a=e(n,s),l=document.createElement("div");if(l.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 a){let c=document.createElement("h3");c.textContent=a.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 ",l.appendChild(c)}if(a instanceof T){if(a.description){let c=document.createElement("p");c.textContent=a.description,c.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",l.appendChild(c)}if(a.tags&&a.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 ",a.tags.forEach(u=>{let g=document.createElement("span");g.textContent=u,g.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(g)}),l.appendChild(c)}}let p;if(!(s instanceof R)){let c=new J({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 u=n.getState(s);u&&(W(n,{id:s.id,...u},c),l.appendChild(c.domElement)),p=c}return document.body.appendChild(l),r&&o(n,a),()=>{l.style.opacity="0",l.style.transform="translateY(-10px)",setTimeout(()=>l.remove(),300),p==null||p.destroy()}}return{highlightCard:t,highlight:(n,s,{focus:r=!0}={})=>{i.length>0&&i.forEach(l=>n.Markers.remove(l));let a=e(n,s);if(a instanceof T)r&&n.Camera.focusOn(a.spaces,H),i.push(...a.spaces.map(l=>n.Markers.add(l,'<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(a.name,"</h3>\n ").concat(a.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(a.description,"</p>"):"","\n ").concat(a.tags?a.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",anchor:"top"})));else if(a instanceof R){r&&n.Camera.focusOn(a.locations.flatMap(c=>c.spaces),H);let l=new Map,p=new Set;a.locations.forEach(c=>{l.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;">\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"}))}),l.set(c.name,!0))}),a.locations.forEach(c=>{c.coordinates.forEach(u=>{let g="".concat(u.latitude,",").concat(u.longitude);if(!p.has(g)&&!l.has(c.name)){let d=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);">\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(g),i.push(d)}})})}return()=>{i.forEach(l=>n.Markers.remove(l))}}}}var H={duration:300,easing:"ease-in-out"},X=Ye();y();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 Ne(i){i.add(_.options.places.fields,"name").name("Places: Name"),i.add(_.options.places.fields,"description").name("Places: Description"),i.add(_.options.places.fields,"link").name("Places: Link"),i.add(_.options.places.fields,"category").name("Places: Category"),i.add(_.options.places,"limit"),i.add(_.options.locations.fields,"name").name("Locations: Name"),i.add(_.options.locations.fields,"tag").name("Locations: Tag"),i.add(_.options.locations.fields,"description").name("Locations: Description"),i.add(_.options.places,"limit"),i.add(_.options.categories.fields,"name").name("Categories: Name")}function be(i,e,o){var c;let t=new G,n=o.addFolder("Search");n.open();let s=n.add(_,"search").onChange(async u=>{let g=await e.Search.query(u,_.options);g&&(_.results=g,a(g,t))}),r=document.createElement("div");r.style.marginLeft="10px",(c=s.domElement.parentElement)==null||c.appendChild(r);let{renderSearch:a,close:l}=Re(i,e,r,s.$input),p=n.addFolder("Advanced");return p.close(),Ne(p),document.addEventListener("keydown",u=>{(u.metaKey||u.ctrlKey)&&u.key==="k"?(u.preventDefault(),n._closed&&n.open(),s.$input.focus()):u.key==="Escape"&&(l(),t.publish("highlight",void 0))}),{pubsub:t}}function Re(i,e,o,t){let n,s;t.addEventListener("input",async a=>{a instanceof InputEvent&&(a.inputType==="insertText"||a.inputType==="insertCompositionText")&&(clearTimeout(n),n=setTimeout(async()=>{var p;let l=await e.Search.suggest(t.value);l&&l.length>0&&r((p=l[0])==null?void 0:p.suggestion)},100))});function r(a){if(!a){t.placeholder="";return}let l=t.value;t.value=a,t.setSelectionRange(l.length,a.length)}return{renderSearch(a,l){var p,c;if(a.places.length===0&&((p=a.enterpriseCategories)==null?void 0:p.length)===0&&((c=a.enterpriseLocations)==null?void 0:c.length)===0){o.textContent="No results found.";return}s=Je(o,a,i,l)},close(){s.destroy()}}}function Je(i,e,o,t){i.innerHTML="";let n=document.createElement("div");Object.assign(n.style,K.dropdownContainer);let s=document.createElement("ul");s.className="options-list",Object.assign(s.style,K.optionsList),s.style.display="block";let r=[],a=(g,d)=>{if(d&&d.length>0){let h=document.createElement("li");h.textContent=g,Object.assign(h.style,K.sectionHeader),s.appendChild(h),d.forEach((m,v)=>{let f=document.createElement("li");f.textContent="".concat("name"in m.item?m.item.name:""," (").concat(m.type,")"),Object.assign(f.style,K.option),f.tabIndex=0,f.addEventListener("focus",()=>{p(r.indexOf(f))}),f.addEventListener("mouseover",()=>{f.style.backgroundColor="#f0f0f0"}),f.addEventListener("mouseout",()=>{f.style.backgroundColor=""}),f.addEventListener("click",()=>{}),f.setAttribute("data-type",g),f.setAttribute("data-index",v.toString()),s.appendChild(f),r.push(f)})}};a("enterpriseLocations",e.enterpriseLocations),a("enterpriseCategories",e.enterpriseCategories),a("Places",e.places),n.appendChild(s),i.appendChild(n);let l=[],p=g=>{l.forEach(f=>f()),l=[],r.forEach((f,b)=>{b===g?f.style.backgroundColor="#e0e0e0":f.style.backgroundColor=""});let d=r[g],h=d.getAttribute("data-type"),m=parseInt(d.getAttribute("data-index")||"0",10);if(!h)return;let{item:v}=e[h.toLowerCase()][m];t.publish("highlight",v)},c=g=>{!n.contains(g.target)&&g.target!==i&&u()};document.addEventListener("click",c);let u=()=>{i.innerHTML="",document.removeEventListener("click",c)};return{destroy(){i.innerHTML="",t.publish("highlight",void 0)}}}var K={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 ve(i,e,o){o.domElement.id="interactionPanel";let t=[],{pubsub:n}=be(i,e,o);n.on("highlight",c=>{if(c){t.forEach(g=>g()),t=[];let u=c instanceof T?c.spaces[0]:c;if(i.Camera.focusOn(c),u&&!N.is(u))return;t.push(X.highlightCard(i,u,{focus:!0}))}else t.forEach(u=>u()),t=[]});let s=o.addFolder("Click \u{1F447}").close(),{sub:r}=We(i,s);r.on("click",c=>{t.forEach(u=>u()),t=[],c.spaces[0]&&(t=[X.highlightCard(i,c.spaces[0])])});let a=o.addFolder("Hover \u{1F681}").close(),{sub:l}=Xe(i,a),p;l.on("hover",c=>{c.spaces[0]?(p==null||p(),t.length===0&&(p=X.highlightCard(i,c.spaces[0]))):(p==null||p(),p=void 0)})}function We(i,e){let o=new G,t={position:"",hoverColor:E(i.getHoverColor())},n=e.add(t,"position").disable(),s=[];function r(){s.forEach(l=>l()),s.length=0}let a=0;return i.on("click",l=>{var h;let{labels:p,markers:c,coordinate:u}=l;r(),o.publish("click",l),clearInterval(a),n.load(JSON.stringify([u.longitude,u.latitude]));let g=p[0]||c[0];if(g){let m=re(i,g,e);if(!m)return;s.push(m.destroy),m.labelItemFolder.openAnimated()}let d=(h=l.spaces[0])!=null?h:l.objects[0];if(d){let m={id:d.id,...i.getState(d.id),type:d.type,isInView:!1,isInViewCheck:ne(i,d.id)},{cleanup:v}=W(i,m,e);a=setInterval(()=>{m.isInView=i.isInView(g||d)},500),s.push(v)}}),{sub:o}}function Xe(i,e){let o=new G;i.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(i.getHoverColor()),intersected:"",type:"",id:""},n=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(a=>{i.setHoverColor(a)});let s=[];function r(){s.forEach(a=>a()),s.length=0}return i.on("hover",a=>{var m,v,f;let{coordinate:l,spaces:p,objects:c,markers:u,labels:g}=a;r(),o.publish("hover",a),n.load(JSON.stringify([l.longitude,l.latitude]));let d=(f=(v=(m=p[0])!=null?m:c[0])!=null?v:u[0])!=null?f:g[0];if(!d)return;let h=i.getState(d);h&&(t.type=h.type,t.id=d.id)}),{sub:o}}function ne(i,e){return function(){console.log("isInView",i.isInView(e))}}function ye(i,e,o){let t={labels:{},all(){o.Labels.all().forEach(d=>{this.labels[d.id]=d}),l()},removeAllLabels(){o.Labels.removeAll().forEach(d=>{delete this.labels[d.id]}),l()}},{addLabel:n,destroy:s}=Ke(i,o);i.add(t,"all"),i.add(t,"removeAllLabels");let r=i.addFolder("Label List");i.close();let a=new Map,{rerender:l}=p();function p(){function g(m){var v;delete t.labels[m.id],(v=a.get(m.id))==null||v.destroy()}function d(m){let v=re(o,m,r,{onRemove:b=>{g(b)}});if(!v)return;let{labelItemFolder:f}=v;a.set(m.id,f)}function h(){r.destroy(),r=i.addFolder("Label");for(let m in t.labels){let v=t.labels[m];d(v)}}return{rerender:h,add:d,remove:g}}i.domElement.classList.add("list-items");let c;o.on("click",({labels:g,coordinate:d})=>{if(!i._closed)if(g[0]){c==null||c.close();let h=a.get(g[0].id);if(i.open(),!h)return;h==null||h.open(),h==null||h.domElement.scrollIntoView({block:"start"}),h==null||h.domElement.focus(),c=h}else n(d)});function u(g){for(let d of g)t.labels[d.id]=d;l()}return{populatelabels:u,destroy(){s()}}}function re(i,e,o,{onRemove:t}={}){var p,c,u,g;let n=o.addFolder("".concat((p=e.text)==null?void 0:p.substring(0,12)));n.onChange(d=>{i.updateState(e,{appearance:l.appearance,interactive:l.interactive})}),n.close();let s=i.getState(e);if((s==null?void 0:s.type)!=="label")throw new Error("error getting state for label: ".concat(e.id));let{appearance:r,interactive:a}=s;if(!r||r.margin==null||a==null)throw new Error("incomplte label state");let l={text:e.text,interactive:a,appearance:{...r,margin:r.margin||0,marker:{foregroundColor:(u=(c=r.marker)==null?void 0:c.foregroundColor)!=null&&u.active?E((g=r.marker.foregroundColor)==null?void 0:g.active):"black"},text:{foregroundColor:E(r.text.foregroundColor)}},remove(){i.Labels.remove(e),t==null||t(e),n.destroy()},isInView:ne(i,e.id)};return n.add(l.appearance,"margin",0,20).name("margin"),n.add(l,"text"),n.add(l,"interactive"),n.addColor(l.appearance.marker,"foregroundColor").name("marker foreground"),n.addColor(l.appearance.text,"foregroundColor").name("text forground"),n.add(l,"isInView"),n.add(l,"remove"),{labelItemFolder:n,destroy(){n.destroy()}}}function Ke(i,e){let o=i.addFolder("Add"),t={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return o.add(t,"onClick"),o.add(t,"margin"),o.add(t,"interactive"),o.add(t,"text"),o.addColor(t,"marginForegroundColor"),o.addColor(t,"marginBackgroundColor"),o.addColor(t,"textForegroundColor"),o.addColor(t,"textBackgroundColor"),{destroy(){o.destroy()},addLabel(n){return o._closed||!t.onClick?void 0:e.Labels.add(n,t.text,{appearance:{margin:t.margin,marker:{foregroundColor:{active:t.marginForegroundColor,inactive:t.marginForegroundColor},backgroundColor:{active:t.marginBackgroundColor,inactive:t.marginBackgroundColor}},text:{foregroundColor:t.textForegroundColor,backgroundColor:t.marginBackgroundColor}},interactive:t.interactive})}}}var Ce={};y();var xe="camera-ui";function Ae(i,e,o){var Y,de;let t=i.addFolder("Camera \u{1F4F7}").onOpenClose(x=>{ie({opened:!x._closed},xe)}),{params:n}=oe(xe);n.opened||t.close();let s=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",zIndex:999,top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),e.__core.container.appendChild(r);let{innerHeight:a,innerWidth:l}=window,[p,c,u,g]=(Y=o==null?void 0:o.padding)!=null?Y:[e.Camera.screenOffsets.top,e.Camera.screenOffsets.right,e.Camera.screenOffsets.bottom,e.Camera.screenOffsets.left],d={center_lat:s.latitude,center_lon:s.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:o!=null&&o.padding?"pixel":e.Camera.screenOffsets.type,inset_top:p!=null?p:0,inset_left:g!=null?g:0,inset_right:c!=null?c:0,inset_bottom:u!=null?u:0,animateOnLoad:!0,persist:()=>{ie(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(p||c||u||g),"Focus on click":(de=o==null?void 0:o.focusOnClick)!=null?de:!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function h(){d.inset_type=e.Camera.screenOffsets.type,d.inset_left=e.Camera.screenOffsets.left,d.inset_top=e.Camera.screenOffsets.top,d.inset_right=e.Camera.screenOffsets.right,d.inset_bottom=e.Camera.screenOffsets.bottom,d.inset_type==="portion"?Object.assign(r.style,{left:d.inset_left*l+"px",top:d.inset_top*a+"px",bottom:d.inset_bottom*a+"px",right:d.inset_right*l+"px"}):Object.assign(r.style,{left:d.inset_left+"px",top:d.inset_top+"px",bottom:d.inset_bottom+"px",right:d.inset_right+"px"})}t.add(d,"center_lat").listen().disable(),t.add(d,"center_lon").listen().disable(),t.add(d,"zoomLevel",16,22,.5).listen().disable(),t.add(d,"pitch").listen().disable(),t.add(d,"bearing").listen().disable(),t.add(d,"minZoomLevel",5,22,.5).onChange(x=>{e.Camera.setMinZoomLevel(x)}),t.add(d,"maxZoomLevel",10,22,.5).onChange(x=>{e.Camera.setMaxZoomLevel(x)}),t.add(d,"animateOnLoad"),t.add(d,"visualizeInset").onChange(I),I(d.visualizeInset),t.add(d,"inset_type",["pixel","portion"]).onChange(A),t.add(d,"inset_top",0,a).onChange(A),t.add(d,"inset_bottom",0,a).onChange(A),t.add(d,"inset_left",0,l).onChange(A),t.add(d,"inset_right",0,l).onChange(A);let m=Qe(e);t.add(d,"Focus on click").onChange(x=>{x?e.on("click",m):e.off("click",m)}),d["Focus on click"]&&e.on("click",m),t.add(d,"persist"),t.add(d,"Focus on current floor");let v=x=>{t._closed||(d.center_lat=x.center.latitude,d.center_lon=x.center.longitude,d.zoomLevel=x.zoomLevel,d.bearing=x.bearing,d.pitch=x.pitch)};e.on("camera-change",v);let{params:f}=oe("camera",d);if(Object.keys(f).length>0){let x=f;e.Camera.setScreenOffsets({top:x.inset_top,left:x.inset_left,right:x.inset_right,bottom:x.inset_bottom,type:x.inset_type});let ce={pitch:x.pitch,center:new pe(x.center_lat,x.center_lon),bearing:x.bearing,zoomLevel:x.zoomLevel};x.animateOnLoad?e.Camera.animateTo(ce):e.Camera.set(ce),t.load({controllers:x,folders:{}}),h()}let b=[()=>{e.off("camera-change",v)}];function A(){e.Camera.setScreenOffsets({top:d.inset_top,left:d.inset_left,right:d.inset_right,bottom:d.inset_bottom,type:d.inset_type}),h()}(d.inset_top||d.inset_right||d.inset_bottom||d.inset_left)&&A();function I(x){h(),x?r.style.display="block":r.style.display="none"}return()=>({destroy(){t.destroy(),me(b)}})}function Qe(i){return function(o){var r;let{spaces:t,objects:n}=o,s=(r=t[0])!=null?r:n[0];s&&i.Camera.focusOn(s)}}y();function ke(i,e,o){let t={markers:{},removeAllMarkers(){o.Markers.removeAll().forEach(d=>{delete this.markers[d.id]}),l()}},{addMarker:n,destroy:s}=Ve(i,o);i.add(t,"removeAllMarkers");let r=i.addFolder("Marker List");i.close();let a=new Map,{rerender:l}=p();function p(){function g(m){var v;delete t.markers[m.id],(v=a.get(m.id))==null||v.destroy()}function d(m){let v=qe(o,m,r,{onRemove:b=>{g(b)}});if(!v)return;let{markerItemFolder:f}=v;a.set(m.id,f)}function h(){r.destroy(),r=i.addFolder("marker");for(let m in t.markers){let v=t.markers[m];d(v)}}return{rerender:h,add:d,remove:g}}i.domElement.classList.add("list-items");let c;o.on("click",({markers:g,coordinate:d})=>{if(!i._closed)if(g[0]){c==null||c.close();let h=a.get(g[0].id);if(i.open(),!h)return;h==null||h.open(),h==null||h.domElement.scrollIntoView({block:"start"}),h==null||h.domElement.focus(),c=h}else n(d)});function u(g){for(let d of g)t.markers[d.id]=d;l()}return{populateMarkers:u,destroy(){s()}}}function qe(i,e,o,{onRemove:t}={}){let n=o.addFolder("".concat(e.id.toString().substring(0,8)));n.onChange(l=>{i.updateState(e,{interactive:a.interactive})}),n.close();let s=i.getState(e);if((s==null?void 0:s.type)!=="marker")throw new Error("error getting state for marker: ".concat(e.id));let{interactive:r}=s;if(r==null)throw new Error("incomplte label state");let a={interactive:r,remove(){i.Markers.remove(e),t==null||t(e),n.destroy()}};return n.add(a,"interactive"),n.add(a,"remove"),{markerItemFolder:n,destroy(){n.destroy()}}}function Ve(i,e){let o=i.addFolder("Add"),t={onClick:!1,interactive:!0};return o.add(t,"onClick"),o.add(t,"interactive"),{destroy(){o.destroy()},addMarker(n){return o._closed||!t.onClick?void 0:e.Markers.add(n,"<div>New Marker</div>",{interactive:t.interactive})}}}y();function Me(i,e){let o=i.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};o.add(t,"visible").onChange(r=>{e.updateState("walls",{visible:r})}),o.addColor(t,"topColor").onChange(r=>{e.updateState("walls",{topColor:r})}),o.addColor(t,"color").onChange(r=>{e.updateState("walls",{color:r})}),o.addFolder("Texture - side").add(t.texture,"url").onFinishChange(r=>{e.updateState("walls",{texture:{url:r}})}),o.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(r=>{e.updateState("walls",{topTexture:{url:r}})}),e.updateState("walls",{topColor:t.topColor}),e.updateState("walls",{color:t.color})}y();function _e(i,e,o){var s,r;i.close();let t={language:(r=(s=o.currentLanguage)==null?void 0:s.code)!=null?r:"en"},n=o.getByType("enterprise-venue");i.add(t,"language",n==null?void 0:n.languages.map(a=>a.code)).onChange(a=>{o.changeLanguage(a)})}y();function Ee(i,e,o){let t=i.addFolder("Debug");t.close();let n=e.Debug.state,s={showPolygonLabelTextAreaMesh:n.showPolygonLabelTextAreaMesh,showCollisionBoxes:n.showCollisionBoxes,showEnvMap:n.showEnvMap};t.add(s,"showPolygonLabelTextAreaMesh").onChange(r=>{e.Debug.update({showPolygonLabelTextAreaMesh:r})}).name("Show Flat Label Text Area Mesh"),t.add(s,"showCollisionBoxes").onChange(r=>{e.Debug.update({showCollisionBoxes:r})}).name("Show Collision Boxes"),t.add(s,"showEnvMap").onChange(r=>{e.Debug.update({showEnvMap:r})}).name("Show Environment Map"),e.Debug.update(s)}y();function we(i,e,o){let t=i.addFolder("Text3D").close(),n={all:()=>{e.Text3D.labelAll()},removeAll:()=>{e.Text3D.removeAll()}};t.add(n,"all").name("Show All"),t.add(n,"removeAll").name("Remove All")}y();y();y();var w,j,L,k,$,F,Fe,ae,Se,se=class{constructor(e=new P({autoPlace:!0})){D(this,F);D(this,w);D(this,j,[]);D(this,L,{});D(this,k,{});D(this,$,{});he(this,w,e),C(this,w).domElement.style.left="0"}add(e,o,t){if(C(this,k)[e])throw new Error("Control ".concat(e," already exists"));C(this,L)[e]=o,C(this,$)[e]=o.default,B(this,F,Fe).call(this,e,o,t),this.show()}addColor(e,o,t){if(C(this,k)[e])throw new Error("Control ".concat(e," already exists"));C(this,L)[e]=o,C(this,$)[e]=o.default,B(this,F,Se).call(this,e,o,t),this.show()}update(e,o){if(!C(this,k)[e])throw new Error("Control ".concat(e," does not exist"));C(this,k)[e].setValue(o),C(this,L)[e].onChange&&C(this,L)[e].onChange(o,e)}replace(e,o,t){if(!C(this,k)[e]){this.add(e,o,t);return}o.args&&C(this,k)[e].options(o.args),o.default&&C(this,k)[e].setValue(o.default),o.onChange&&C(this,k)[e].onChange(n=>{o.onChange(n,e)})}remove(e){if(!C(this,k)[e])throw new Error("Control ".concat(e," does not exist"));C(this,k)[e].destroy(),C(this,k)[e].parent.children.length===0&&C(this,k)[e].parent.hide(),delete C(this,k)[e],delete C(this,L)[e],delete C(this,$)[e]}show(){C(this,w).show()}hide(){C(this,w).hide()}removeAll(){for(let e in C(this,k))this.remove(e)}destroy(){C(this,w).destroy()}};w=new WeakMap,j=new WeakMap,L=new WeakMap,k=new WeakMap,$=new WeakMap,F=new WeakSet,Fe=function(e,o,t){let s=B(this,F,ae).call(this,t).add(C(this,$),e,o.args,o.max,o.step);o.onChange&&s.onChange(r=>{o.onChange(r,e)}),o.onAdd&&o.onAdd(o.default,e),C(this,k)[e]=s},ae=function(e){if(!e)return C(this,w);let o=C(this,j).find(t=>t._title===e);return o?(o.show(),o):(o=C(this,w).addFolder(e),C(this,j).push(o),o)},Se=function(e,o,t){let s=B(this,F,ae).call(this,t).addColor(C(this,$),e);o.onChange&&s.onChange(r=>{o.onChange(r,e)}),C(this,k)[e]=s};function et(i,e,o){var a;let t={},n=i.getByType("floor"),s=i.getByType("floor-stack");s.length>1&&(t.FloorStack={default:e.currentFloorStack.id,args:s.reduce((l,{id:p,name:c})=>({...l,[c]:p}),{}),onChange:l=>{l!==e.currentFloorStack.id&&(e.setFloorStack(l),o.replace("Floor",{default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((p,{id:c,name:u})=>({...p,[u]:c}),{})}))}}),n.length>1&&(t.Floor={default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((l,{id:p,name:c})=>({...l,[c]:p}),{}),onChange:l=>{l!==e.currentFloor.id&&e.setFloor(l)},onAdd:()=>{e.on("floor-change",l=>{l!=null&&l.floor.id&&(s.length>1&&o.replace("FloorStack",{default:e.currentFloorStack.id}),o.replace("Floor",{default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((c,{id:u,name:g})=>({...c,[g]:u}),{})}))})}});let r=i.getByType("enterprise-venue");return r&&r.languages.length>1&&(t.Language={default:((a=i.currentLanguage)==null?void 0:a.code)||r.languages[0].code,args:r.languages.reduce((l,{code:p,name:c})=>({...l,[c]:p}),{}),onChange:l=>{i.changeLanguage(l)}}),t}function Le(i,e,o=new P){let t=new se(o),n=et(i,e,t);Object.keys(n).length||t.hide();for(let s in n)t.add(s,n[s]);return t}async function $e(i,e,{initialfloorsInStack:o,root:t,floorsInDirections:n,showLabelsPerFloor:s=!0}){async function r(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 l(h){await i.Camera.animateElevation(h.elevation*i.StackedMaps.distanceBetweenFloors)}let p=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(p,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90,duration:500}),i.StackedMaps.changeFloorOnElevationChanges(!0),await l(i.currentFloor),await r(i.currentFloor),i.StackedMaps.setFloorVisiblityMode("only-current-floor")),p=i.currentFloor}),i.on("stacked-maps-state-change",({state:h})=>{console.log("stacked-maps-state-change",h)});let c=e.getByType("space");if(s){let h=c.reduce((m,v)=>(m.has(v.floor)||m.set(v.floor,[]),v.name&&v.name!==""&&m.get(v.floor).push(i.Labels.add(v,v.name)),m),new Map);i.on("floor-change",()=>{h.forEach((m,v)=>{m.forEach(f=>{i.updateState(f,{enabled:i.currentFloor===v})})})})}let u=Le(e,i,t),g=o!=null?o:[];async function d(){i.Outdoor.setOpacity(.25),g=e.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 d()}},"Stack Maps"),n&&u.add("Expand - Only Navigation",{default:async()=>{i.Outdoor.setOpacity(.25),g=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()=>{g=e.getByType("floor"),i.Outdoor.setOpacity(.25),i.StackedMaps.setFloorVisiblityMode("all-floors"),i.StackedMaps.changeFloorOnElevationChanges(!1),i.Camera.setPanMode("elevation"),i.Camera.focusOn(g,{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()=>{r(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=g.findIndex(v=>v.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=g.find(m=>m.elevation===i.currentFloor.elevation+1);h&&await l(h)}},"Floors Up/Down"),u.add("Down",{default:async()=>{let h=g.find(m=>m.elevation===i.currentFloor.elevation-1);h&&await l(h)}},"Floors Up/Down"),{zoomToFloor:r,expandAll:d}}function Ie(i,e,o){let t=i.addFolder("StackedMaps");t.close(),$e(e,o,{root:t,showLabelsPerFloor:!1})}function De(i,e,o){tt();let t=new J({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),ve(e,i,t),Ae(t,e,o==null?void 0:o.camera);let n=t.addFolder("Levels").close(),s=t.addFolder("Scene Controls");s.close();let r=t.addFolder("Labels");we(t,e,i);let a=t.addFolder("Markers");Me(t,e),Ie(t,e,i);let l=t.addFolder("misc");Ee(t,e,i),_e(l,e,i);let p={level:e.currentFloor.id},{populatelabels:c}=ye(r,i,e),{populateMarkers:u}=ke(a,i,e),g=i.getByType("floor").reduce((h,m)=>(h[m.name]=m.id,h),{}),d=n.add(p,"level",g).onChange(h=>{e.setFloor(h),p.level=e.currentFloor.id,d.updateDisplay()});return e.on("floor-change-start",h=>{n.controllers[0].setValue(h.floor.id)}),i.getByType("space").forEach(h=>{e.updateState(h,{interactive:!0})}),i.getByType("object").forEach(h=>{e.updateState(h,{interactive:!0})}),i.getByType("object").forEach(h=>{e.updateState(h,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:c,sceneFolder:s,populateMarkers:u}}var Oe="mappedin-sdk-debug-css";function tt(){if(document.getElementById(Oe))return;let i=document.createElement("style");i.id=Oe,i.textContent=Ce,document.head.appendChild(i)}var le=class{constructor(e,o){O(this,"_enabled",!1);O(this,"mv");O(this,"api");O(this,"mapData");O(this,"scenegraphVisualizerMounted",!1);O(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=o,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:o}=De(this.mapData,this.mv,e);o.onOpenClose(n=>{n===o&&!n._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,ge(this.api.core,o))}),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(n=>{this.mv.updateState(n.id,{interactive:!0})})}get enabled(){return this._enabled}};export{le as Inspector};
|
|
1
|
+
import{A as ge,a as pe,g as N,p as T,q as R}from"./chunk-AGPZKMLJ.js";import{r as G}from"./chunk-HTXG2WUL.js";import"./chunk-L5IJY45Y.js";import"./chunk-7QYC6UYU.js";import{S as ue}from"./chunk-O57EU3PO.js";import{a as y}from"./chunk-N5U7Y27D.js";import{e as O,f as C,g as D,h as he,i as B}from"./chunk-HALSTKAB.js";y();y();y();y();var S=class i{constructor(e,o,t,n,s="div"){this.parent=e,this.object=o,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(s),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-".concat(++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",r=>r.stopPropagation()),this.domElement.addEventListener("keyup",r=>r.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 o=this.parent.add(this.object,this.property,e);return o.name(this._name),this.destroy(),o}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)}},Z=class extends S{constructor(e,o,t){super(e,o,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 Q(i){let e,o;return(e=i.match(/(#|0x)?([a-f0-9]{6})/i))?o=e[2]:(e=i.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?o=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=i.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(o=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),o?"#"+o:!1}var Te={isPrimitive:!0,match:i=>typeof i=="string",fromHexString:Q,toHexString:Q},U={isPrimitive:!0,match:i=>typeof i=="number",fromHexString:i=>parseInt(i.substring(1),16),toHexString:i=>"#"+i.toString(16).padStart(6,0)},Pe={isPrimitive:!1,match:i=>Array.isArray(i),fromHexString(i,e,o=1){let t=U.fromHexString(i);e[0]=(t>>16&255)/255*o,e[1]=(t>>8&255)/255*o,e[2]=(t&255)/255*o},toHexString([i,e,o],t=1){t=255/t;let n=i*t<<16^e*t<<8^o*t<<0;return U.toHexString(n)}},Be={isPrimitive:!1,match:i=>Object(i)===i,fromHexString(i,e,o=1){let t=U.fromHexString(i);e.r=(t>>16&255)/255*o,e.g=(t>>8&255)/255*o,e.b=(t&255)/255*o},toHexString({r:i,g:e,b:o},t=1){t=255/t;let n=i*t<<16^e*t<<8^o*t<<0;return U.toHexString(n)}},Ge=[Te,U,Pe,Be];function ze(i){return Ge.find(e=>e.match(i))}var q=class extends S{constructor(e,o,t,n){super(e,o,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=ze(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 s=Q(this.$text.value);s&&this._setValueFromHexString(s)}),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 o=this._format.fromHexString(e);this.setValue(o)}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}},z=class extends S{constructor(e,o,t){super(e,o,t,"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}},V=class extends S{constructor(e,o,t,n,s,r){super(e,o,t,"number"),this._initInput(),this.min(n),this.max(s);let a=r!==void 0;this.step(a?r:this._getImplicitStep(),a),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,o=!0){return this._step=e,this._stepExplicit=o,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let o=(e-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?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 o=()=>{let b=parseFloat(this.$input.value);isNaN(b)||(this._stepExplicit&&(b=this._snap(b)),this.setValue(this._clamp(b)))},t=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(),t(this._step*this._arrowKeyMultiplier(b))),b.code==="ArrowDown"&&(b.preventDefault(),t(this._step*this._arrowKeyMultiplier(b)*-1))},s=b=>{this._inputFocused&&(b.preventDefault(),t(this._step*this._normalizeMouseWheel(b)))},r=!1,a,l,p,c,u,g=5,d=b=>{a=b.clientX,l=p=b.clientY,r=!0,c=this.getValue(),u=0,window.addEventListener("mousemove",h),window.addEventListener("mouseup",m)},h=b=>{if(r){let A=b.clientX-a,I=b.clientY-l;Math.abs(I)>g?(b.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(A)>g&&m()}if(!r){let A=b.clientY-p;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)}p=b.clientY},m=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",m)},v=()=>{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",s,{passive:!1}),this.$input.addEventListener("mousedown",d),this.$input.addEventListener("focus",v),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,b,A,I,Y)=>(f-b)/(A-b)*(Y-I)+I,o=f=>{let b=this.$slider.getBoundingClientRect(),A=e(f,b.left,b.right,this._min,this._max);this._snapClampSetValue(A)},t=f=>{this._setDraggingStyle(!0),o(f.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",s)},n=f=>{o(f.clientX)},s=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",s)},r=!1,a,l,p=f=>{f.preventDefault(),this._setDraggingStyle(!0),o(f.touches[0].clientX),r=!1},c=f=>{f.touches.length>1||(this._hasScrollBar?(a=f.touches[0].clientX,l=f.touches[0].clientY,r=!0):p(f),window.addEventListener("touchmove",u,{passive:!1}),window.addEventListener("touchend",g))},u=f=>{if(r){let b=f.touches[0].clientX-a,A=f.touches[0].clientY-l;Math.abs(b)>Math.abs(A)?p(f):(window.removeEventListener("touchmove",u),window.removeEventListener("touchend",g))}else f.preventDefault(),o(f.touches[0].clientX)},g=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",g)},d=this._callOnFinishChange.bind(this),h=400,m,v=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(d,h)};this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",c,{passive:!1}),this.$slider.addEventListener("wheel",v,{passive:!1})}_setDraggingStyle(e,o="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-".concat(o),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:o,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(o=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),o+-t}_arrowKeyMultiplier(e){let o=this._stepExplicit?1:10;return e.shiftKey?o*=10:e.altKey&&(o/=10),o}_snap(e){let o=Math.round(e/this._step)*this._step;return parseFloat(o.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}},ee=class extends S{constructor(e,o,t,n){super(e,o,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(n)}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(o=>{let t=document.createElement("option");t.textContent=o,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),o=this._values.indexOf(e);return this.$select.selectedIndex=o,this.$display.textContent=o===-1?e:this._names[o],this}},te=class extends S{constructor(e,o,t){super(e,o,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",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}},Ue='.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 He(i){let e=document.createElement("style");e.innerHTML=i;let o=document.querySelector("head link[rel=stylesheet], head style");o?document.head.insertBefore(e,o):document.head.appendChild(e)}var fe=!1,P=class i{constructor({parent:e,autoPlace:o=e===void 0,container:t,width:n,title:s="Controls",closeFolders:r=!1,injectStyles:a=!0,touchStyles:l=!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(s),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),l&&this.domElement.classList.add("allow-touch-styles"),!fe&&a&&(He(Ue),fe=!0),t?t.appendChild(this.domElement):o&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=r}add(e,o,t,n,s){if(Object(t)===t)return new ee(this,e,o,t);let r=e[o];switch(typeof r){case"number":return new V(this,e,o,t,n,s);case"boolean":return new Z(this,e,o);case"string":return new te(this,e,o);case"function":return new z(this,e,o)}console.error("gui.add failed\n property:",o,"\n object:",e,"\n value:",r)}addColor(e,o,t=1){return new q(this,e,o,t)}addFolder(e){let o=new i({parent:this,title:e});return this.root._closeFolders&&o.close(),o}load(e,o=!0){return e.controllers&&this.controllers.forEach(t=>{t instanceof z||t._name in e.controllers&&t.load(e.controllers[t._name])}),o&&e.folders&&this.folders.forEach(t=>{t._title in e.folders&&t.load(e.folders[t._title])}),this}save(e=!0){let o={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof z)){if(t._name in o.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(t._name,'"'));o.controllers[t._name]=t.save()}}),e&&this.folders.forEach(t=>{if(t._title in o.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(t._title,'"'));o.folders[t._title]=t.save()}),o}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 o=this.$children.clientHeight;this.$children.style.height=o+"px",this.domElement.classList.add("transition");let t=s=>{s.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",t))};this.$children.addEventListener("transitionend",t);let n=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=n+"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(o=>{e=e.concat(o.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(o=>{e=e.concat(o.foldersRecursive())}),e}},J=P;y();y();var E=(()=>{let i=new ue;return function(o){return i.set(o),"#".concat(i.getHexString())}})();function me(i){let e;for(e of i)e()}function ie(i,e){let o=window.location.href,t=new URL(o),n=new URLSearchParams(t.search);for(let s in i)if(i.hasOwnProperty(s)){let r="".concat(e,".").concat(s);n.set(r,i[s])}t.search=n.toString(),history.pushState({path:t.toString()},"",t.toString())}function oe(i,e){let o=new URLSearchParams(window.location.search),t={};for(let[n,s]of o)if(n.startsWith("".concat(i,"."))){let r=n.slice(i.length+1);s==="true"||s==="false"?t[r]=s==="true":typeof(e==null?void 0:e[r])=="number"?t[r]=Number(s):t[r]=s}return{namespace:i,params:t}}var je=["interactive"];function W(i,e,o){var n,s;let t=o.addFolder("".concat(e.type,"-").concat(e.id));for(let r in e){if(r==="visible"&&t.add(e,r).onChange(a=>{i.updateState(e.id,{[r]:a})}),r==="color"||r==="hoverColor"){e[r]=E(e[r]),t.addColor(e,r).onChange(a=>{i.updateState(e.id,{[r]:a})});continue}if(r==="height"){t.add(e,r,0,20,1).onChange(a=>{i.updateState(e.id,{[r]:a})});continue}if(r==="texture"&&e.texture){(n=t.addFolder("Texture - side").add(e,"texture"))==null||n.onChange(l=>{i.updateState(e.id,{texture:{url:l}})});continue}if(r==="topTexture"&&e.topTexture){(s=t.addFolder("Texture - top").add(e,"topTexture"))==null||s.onChange(l=>{i.updateState(e.id,{topTexture:{url:l}})});continue}if(r==="opacity"){t.add(e,r,0,1,.1).onChange(a=>{i.updateState(e.id,{[r]:a})});continue}je.includes(r)&&t.add(e,r).onChange(a=>{i.updateState(e.id,{[r]:a})})}return e.isInView&&(t.add(e,"isInView").listen().disable(),t.add(e,"isInViewCheck")),{cleanup(){t.destroy()}}}y();y();function Ye(){let i=[];function e(n,s){var l;let r=Object.values(n.getMapData())[0],a=s;if(a&&N.is(a)){let p=(l=r.getByType("enterprise-location"))==null?void 0:l.find(c=>c.spaces.some(u=>u.id===a.id));p&&(a=p)}return a}async function o(n,s){return s instanceof R?n.Camera.focusOn(s.locations.flatMap(r=>r.spaces),H):s instanceof T?n.Camera.focusOn(s.spaces,H):n.Camera.focusOn(s,H)}function t(n,s,{focus:r=!1}={}){if(!window.enableHighlightCard)return()=>{};let a=e(n,s),l=document.createElement("div");if(l.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 a){let c=document.createElement("h3");c.textContent=a.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 ",l.appendChild(c)}if(a instanceof T){if(a.description){let c=document.createElement("p");c.textContent=a.description,c.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",l.appendChild(c)}if(a.tags&&a.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 ",a.tags.forEach(u=>{let g=document.createElement("span");g.textContent=u,g.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(g)}),l.appendChild(c)}}let p;if(!(s instanceof R)){let c=new J({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 u=n.getState(s);u&&(W(n,{id:s.id,...u},c),l.appendChild(c.domElement)),p=c}return document.body.appendChild(l),r&&o(n,a),()=>{l.style.opacity="0",l.style.transform="translateY(-10px)",setTimeout(()=>l.remove(),300),p==null||p.destroy()}}return{highlightCard:t,highlight:(n,s,{focus:r=!0}={})=>{i.length>0&&i.forEach(l=>n.Markers.remove(l));let a=e(n,s);if(a instanceof T)r&&n.Camera.focusOn(a.spaces,H),i.push(...a.spaces.map(l=>n.Markers.add(l,'<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(a.name,"</h3>\n ").concat(a.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(a.description,"</p>"):"","\n ").concat(a.tags?a.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",anchor:"top"})));else if(a instanceof R){r&&n.Camera.focusOn(a.locations.flatMap(c=>c.spaces),H);let l=new Map,p=new Set;a.locations.forEach(c=>{l.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;">\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"}))}),l.set(c.name,!0))}),a.locations.forEach(c=>{c.coordinates.forEach(u=>{let g="".concat(u.latitude,",").concat(u.longitude);if(!p.has(g)&&!l.has(c.name)){let d=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);">\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(g),i.push(d)}})})}return()=>{i.forEach(l=>n.Markers.remove(l))}}}}var H={duration:300,easing:"ease-in-out"},X=Ye();y();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 Ne(i){i.add(_.options.places.fields,"name").name("Places: Name"),i.add(_.options.places.fields,"description").name("Places: Description"),i.add(_.options.places.fields,"link").name("Places: Link"),i.add(_.options.places.fields,"category").name("Places: Category"),i.add(_.options.places,"limit"),i.add(_.options.locations.fields,"name").name("Locations: Name"),i.add(_.options.locations.fields,"tag").name("Locations: Tag"),i.add(_.options.locations.fields,"description").name("Locations: Description"),i.add(_.options.places,"limit"),i.add(_.options.categories.fields,"name").name("Categories: Name")}function be(i,e,o){var c;let t=new G,n=o.addFolder("Search");n.open();let s=n.add(_,"search").onChange(async u=>{let g=await e.Search.query(u,_.options);g&&(_.results=g,a(g,t))}),r=document.createElement("div");r.style.marginLeft="10px",(c=s.domElement.parentElement)==null||c.appendChild(r);let{renderSearch:a,close:l}=Re(i,e,r,s.$input),p=n.addFolder("Advanced");return p.close(),Ne(p),document.addEventListener("keydown",u=>{(u.metaKey||u.ctrlKey)&&u.key==="k"?(u.preventDefault(),n._closed&&n.open(),s.$input.focus()):u.key==="Escape"&&(l(),t.publish("highlight",void 0))}),{pubsub:t}}function Re(i,e,o,t){let n,s;t.addEventListener("input",async a=>{a instanceof InputEvent&&(a.inputType==="insertText"||a.inputType==="insertCompositionText")&&(clearTimeout(n),n=setTimeout(async()=>{var p;let l=await e.Search.suggest(t.value);l&&l.length>0&&r((p=l[0])==null?void 0:p.suggestion)},100))});function r(a){if(!a){t.placeholder="";return}let l=t.value;t.value=a,t.setSelectionRange(l.length,a.length)}return{renderSearch(a,l){var p,c;if(a.places.length===0&&((p=a.enterpriseCategories)==null?void 0:p.length)===0&&((c=a.enterpriseLocations)==null?void 0:c.length)===0){o.textContent="No results found.";return}s=Je(o,a,i,l)},close(){s.destroy()}}}function Je(i,e,o,t){i.innerHTML="";let n=document.createElement("div");Object.assign(n.style,K.dropdownContainer);let s=document.createElement("ul");s.className="options-list",Object.assign(s.style,K.optionsList),s.style.display="block";let r=[],a=(g,d)=>{if(d&&d.length>0){let h=document.createElement("li");h.textContent=g,Object.assign(h.style,K.sectionHeader),s.appendChild(h),d.forEach((m,v)=>{let f=document.createElement("li");f.textContent="".concat("name"in m.item?m.item.name:""," (").concat(m.type,")"),Object.assign(f.style,K.option),f.tabIndex=0,f.addEventListener("focus",()=>{p(r.indexOf(f))}),f.addEventListener("mouseover",()=>{f.style.backgroundColor="#f0f0f0"}),f.addEventListener("mouseout",()=>{f.style.backgroundColor=""}),f.addEventListener("click",()=>{}),f.setAttribute("data-type",g),f.setAttribute("data-index",v.toString()),s.appendChild(f),r.push(f)})}};a("enterpriseLocations",e.enterpriseLocations),a("enterpriseCategories",e.enterpriseCategories),a("Places",e.places),n.appendChild(s),i.appendChild(n);let l=[],p=g=>{l.forEach(f=>f()),l=[],r.forEach((f,b)=>{b===g?f.style.backgroundColor="#e0e0e0":f.style.backgroundColor=""});let d=r[g],h=d.getAttribute("data-type"),m=parseInt(d.getAttribute("data-index")||"0",10);if(!h)return;let{item:v}=e[h.toLowerCase()][m];t.publish("highlight",v)},c=g=>{!n.contains(g.target)&&g.target!==i&&u()};document.addEventListener("click",c);let u=()=>{i.innerHTML="",document.removeEventListener("click",c)};return{destroy(){i.innerHTML="",t.publish("highlight",void 0)}}}var K={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 ve(i,e,o){o.domElement.id="interactionPanel";let t=[],{pubsub:n}=be(i,e,o);n.on("highlight",c=>{if(c){t.forEach(g=>g()),t=[];let u=c instanceof T?c.spaces[0]:c;if(i.Camera.focusOn(c),u&&!N.is(u))return;t.push(X.highlightCard(i,u,{focus:!0}))}else t.forEach(u=>u()),t=[]});let s=o.addFolder("Click \u{1F447}").close(),{sub:r}=We(i,s);r.on("click",c=>{t.forEach(u=>u()),t=[],c.spaces[0]&&(t=[X.highlightCard(i,c.spaces[0])])});let a=o.addFolder("Hover \u{1F681}").close(),{sub:l}=Xe(i,a),p;l.on("hover",c=>{c.spaces[0]?(p==null||p(),t.length===0&&(p=X.highlightCard(i,c.spaces[0]))):(p==null||p(),p=void 0)})}function We(i,e){let o=new G,t={position:"",hoverColor:E(i.getHoverColor())},n=e.add(t,"position").disable(),s=[];function r(){s.forEach(l=>l()),s.length=0}let a=0;return i.on("click",l=>{var h;let{labels:p,markers:c,coordinate:u}=l;r(),o.publish("click",l),clearInterval(a),n.load(JSON.stringify([u.longitude,u.latitude]));let g=p[0]||c[0];if(g){let m=re(i,g,e);if(!m)return;s.push(m.destroy),m.labelItemFolder.openAnimated()}let d=(h=l.spaces[0])!=null?h:l.objects[0];if(d){let m={id:d.id,...i.getState(d.id),type:d.type,isInView:!1,isInViewCheck:ne(i,d.id)},{cleanup:v}=W(i,m,e);a=setInterval(()=>{m.isInView=i.isInView(g||d)},500),s.push(v)}}),{sub:o}}function Xe(i,e){let o=new G;i.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(i.getHoverColor()),intersected:"",type:"",id:""},n=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(a=>{i.setHoverColor(a)});let s=[];function r(){s.forEach(a=>a()),s.length=0}return i.on("hover",a=>{var m,v,f;let{coordinate:l,spaces:p,objects:c,markers:u,labels:g}=a;r(),o.publish("hover",a),n.load(JSON.stringify([l.longitude,l.latitude]));let d=(f=(v=(m=p[0])!=null?m:c[0])!=null?v:u[0])!=null?f:g[0];if(!d)return;let h=i.getState(d);h&&(t.type=h.type,t.id=d.id)}),{sub:o}}function ne(i,e){return function(){console.log("isInView",i.isInView(e))}}function ye(i,e,o){let t={labels:{},all(){o.Labels.all().forEach(d=>{this.labels[d.id]=d}),l()},removeAllLabels(){o.Labels.removeAll().forEach(d=>{delete this.labels[d.id]}),l()}},{addLabel:n,destroy:s}=Ke(i,o);i.add(t,"all"),i.add(t,"removeAllLabels");let r=i.addFolder("Label List");i.close();let a=new Map,{rerender:l}=p();function p(){function g(m){var v;delete t.labels[m.id],(v=a.get(m.id))==null||v.destroy()}function d(m){let v=re(o,m,r,{onRemove:b=>{g(b)}});if(!v)return;let{labelItemFolder:f}=v;a.set(m.id,f)}function h(){r.destroy(),r=i.addFolder("Label");for(let m in t.labels){let v=t.labels[m];d(v)}}return{rerender:h,add:d,remove:g}}i.domElement.classList.add("list-items");let c;o.on("click",({labels:g,coordinate:d})=>{if(!i._closed)if(g[0]){c==null||c.close();let h=a.get(g[0].id);if(i.open(),!h)return;h==null||h.open(),h==null||h.domElement.scrollIntoView({block:"start"}),h==null||h.domElement.focus(),c=h}else n(d)});function u(g){for(let d of g)t.labels[d.id]=d;l()}return{populatelabels:u,destroy(){s()}}}function re(i,e,o,{onRemove:t}={}){var p,c,u,g;let n=o.addFolder("".concat((p=e.text)==null?void 0:p.substring(0,12)));n.onChange(d=>{i.updateState(e,{appearance:l.appearance,interactive:l.interactive})}),n.close();let s=i.getState(e);if((s==null?void 0:s.type)!=="label")throw new Error("error getting state for label: ".concat(e.id));let{appearance:r,interactive:a}=s;if(!r||r.margin==null||a==null)throw new Error("incomplte label state");let l={text:e.text,interactive:a,appearance:{...r,margin:r.margin||0,marker:{foregroundColor:(u=(c=r.marker)==null?void 0:c.foregroundColor)!=null&&u.active?E((g=r.marker.foregroundColor)==null?void 0:g.active):"black"},text:{foregroundColor:E(r.text.foregroundColor)}},remove(){i.Labels.remove(e),t==null||t(e),n.destroy()},isInView:ne(i,e.id)};return n.add(l.appearance,"margin",0,20).name("margin"),n.add(l,"text"),n.add(l,"interactive"),n.addColor(l.appearance.marker,"foregroundColor").name("marker foreground"),n.addColor(l.appearance.text,"foregroundColor").name("text forground"),n.add(l,"isInView"),n.add(l,"remove"),{labelItemFolder:n,destroy(){n.destroy()}}}function Ke(i,e){let o=i.addFolder("Add"),t={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return o.add(t,"onClick"),o.add(t,"margin"),o.add(t,"interactive"),o.add(t,"text"),o.addColor(t,"marginForegroundColor"),o.addColor(t,"marginBackgroundColor"),o.addColor(t,"textForegroundColor"),o.addColor(t,"textBackgroundColor"),{destroy(){o.destroy()},addLabel(n){return o._closed||!t.onClick?void 0:e.Labels.add(n,t.text,{appearance:{margin:t.margin,marker:{foregroundColor:{active:t.marginForegroundColor,inactive:t.marginForegroundColor},backgroundColor:{active:t.marginBackgroundColor,inactive:t.marginBackgroundColor}},text:{foregroundColor:t.textForegroundColor,backgroundColor:t.marginBackgroundColor}},interactive:t.interactive})}}}var Ce={};y();var xe="camera-ui";function Ae(i,e,o){var Y,de;let t=i.addFolder("Camera \u{1F4F7}").onOpenClose(x=>{ie({opened:!x._closed},xe)}),{params:n}=oe(xe);n.opened||t.close();let s=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",zIndex:999,top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),e.__core.container.appendChild(r);let{innerHeight:a,innerWidth:l}=window,[p,c,u,g]=(Y=o==null?void 0:o.padding)!=null?Y:[e.Camera.screenOffsets.top,e.Camera.screenOffsets.right,e.Camera.screenOffsets.bottom,e.Camera.screenOffsets.left],d={center_lat:s.latitude,center_lon:s.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:o!=null&&o.padding?"pixel":e.Camera.screenOffsets.type,inset_top:p!=null?p:0,inset_left:g!=null?g:0,inset_right:c!=null?c:0,inset_bottom:u!=null?u:0,animateOnLoad:!0,persist:()=>{ie(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(p||c||u||g),"Focus on click":(de=o==null?void 0:o.focusOnClick)!=null?de:!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function h(){d.inset_type=e.Camera.screenOffsets.type,d.inset_left=e.Camera.screenOffsets.left,d.inset_top=e.Camera.screenOffsets.top,d.inset_right=e.Camera.screenOffsets.right,d.inset_bottom=e.Camera.screenOffsets.bottom,d.inset_type==="portion"?Object.assign(r.style,{left:d.inset_left*l+"px",top:d.inset_top*a+"px",bottom:d.inset_bottom*a+"px",right:d.inset_right*l+"px"}):Object.assign(r.style,{left:d.inset_left+"px",top:d.inset_top+"px",bottom:d.inset_bottom+"px",right:d.inset_right+"px"})}t.add(d,"center_lat").listen().disable(),t.add(d,"center_lon").listen().disable(),t.add(d,"zoomLevel",16,22,.5).listen().disable(),t.add(d,"pitch").listen().disable(),t.add(d,"bearing").listen().disable(),t.add(d,"minZoomLevel",5,22,.5).onChange(x=>{e.Camera.setMinZoomLevel(x)}),t.add(d,"maxZoomLevel",10,22,.5).onChange(x=>{e.Camera.setMaxZoomLevel(x)}),t.add(d,"animateOnLoad"),t.add(d,"visualizeInset").onChange(I),I(d.visualizeInset),t.add(d,"inset_type",["pixel","portion"]).onChange(A),t.add(d,"inset_top",0,a).onChange(A),t.add(d,"inset_bottom",0,a).onChange(A),t.add(d,"inset_left",0,l).onChange(A),t.add(d,"inset_right",0,l).onChange(A);let m=Qe(e);t.add(d,"Focus on click").onChange(x=>{x?e.on("click",m):e.off("click",m)}),d["Focus on click"]&&e.on("click",m),t.add(d,"persist"),t.add(d,"Focus on current floor");let v=x=>{t._closed||(d.center_lat=x.center.latitude,d.center_lon=x.center.longitude,d.zoomLevel=x.zoomLevel,d.bearing=x.bearing,d.pitch=x.pitch)};e.on("camera-change",v);let{params:f}=oe("camera",d);if(Object.keys(f).length>0){let x=f;e.Camera.setScreenOffsets({top:x.inset_top,left:x.inset_left,right:x.inset_right,bottom:x.inset_bottom,type:x.inset_type});let ce={pitch:x.pitch,center:new pe(x.center_lat,x.center_lon),bearing:x.bearing,zoomLevel:x.zoomLevel};x.animateOnLoad?e.Camera.animateTo(ce):e.Camera.set(ce),t.load({controllers:x,folders:{}}),h()}let b=[()=>{e.off("camera-change",v)}];function A(){e.Camera.setScreenOffsets({top:d.inset_top,left:d.inset_left,right:d.inset_right,bottom:d.inset_bottom,type:d.inset_type}),h()}(d.inset_top||d.inset_right||d.inset_bottom||d.inset_left)&&A();function I(x){h(),x?r.style.display="block":r.style.display="none"}return()=>({destroy(){t.destroy(),me(b)}})}function Qe(i){return function(o){var r;let{spaces:t,objects:n}=o,s=(r=t[0])!=null?r:n[0];s&&i.Camera.focusOn(s)}}y();function ke(i,e,o){let t={markers:{},removeAllMarkers(){o.Markers.removeAll().forEach(d=>{delete this.markers[d.id]}),l()}},{addMarker:n,destroy:s}=Ve(i,o);i.add(t,"removeAllMarkers");let r=i.addFolder("Marker List");i.close();let a=new Map,{rerender:l}=p();function p(){function g(m){var v;delete t.markers[m.id],(v=a.get(m.id))==null||v.destroy()}function d(m){let v=qe(o,m,r,{onRemove:b=>{g(b)}});if(!v)return;let{markerItemFolder:f}=v;a.set(m.id,f)}function h(){r.destroy(),r=i.addFolder("marker");for(let m in t.markers){let v=t.markers[m];d(v)}}return{rerender:h,add:d,remove:g}}i.domElement.classList.add("list-items");let c;o.on("click",({markers:g,coordinate:d})=>{if(!i._closed)if(g[0]){c==null||c.close();let h=a.get(g[0].id);if(i.open(),!h)return;h==null||h.open(),h==null||h.domElement.scrollIntoView({block:"start"}),h==null||h.domElement.focus(),c=h}else n(d)});function u(g){for(let d of g)t.markers[d.id]=d;l()}return{populateMarkers:u,destroy(){s()}}}function qe(i,e,o,{onRemove:t}={}){let n=o.addFolder("".concat(e.id.toString().substring(0,8)));n.onChange(l=>{i.updateState(e,{interactive:a.interactive})}),n.close();let s=i.getState(e);if((s==null?void 0:s.type)!=="marker")throw new Error("error getting state for marker: ".concat(e.id));let{interactive:r}=s;if(r==null)throw new Error("incomplte label state");let a={interactive:r,remove(){i.Markers.remove(e),t==null||t(e),n.destroy()}};return n.add(a,"interactive"),n.add(a,"remove"),{markerItemFolder:n,destroy(){n.destroy()}}}function Ve(i,e){let o=i.addFolder("Add"),t={onClick:!1,interactive:!0};return o.add(t,"onClick"),o.add(t,"interactive"),{destroy(){o.destroy()},addMarker(n){return o._closed||!t.onClick?void 0:e.Markers.add(n,"<div>New Marker</div>",{interactive:t.interactive})}}}y();function Me(i,e){let o=i.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};o.add(t,"visible").onChange(r=>{e.updateState("walls",{visible:r})}),o.addColor(t,"topColor").onChange(r=>{e.updateState("walls",{topColor:r})}),o.addColor(t,"color").onChange(r=>{e.updateState("walls",{color:r})}),o.addFolder("Texture - side").add(t.texture,"url").onFinishChange(r=>{e.updateState("walls",{texture:{url:r}})}),o.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(r=>{e.updateState("walls",{topTexture:{url:r}})}),e.updateState("walls",{topColor:t.topColor}),e.updateState("walls",{color:t.color})}y();function _e(i,e,o){var s,r;i.close();let t={language:(r=(s=o.currentLanguage)==null?void 0:s.code)!=null?r:"en"},n=o.getByType("enterprise-venue");i.add(t,"language",n==null?void 0:n.languages.map(a=>a.code)).onChange(a=>{o.changeLanguage(a)})}y();function Ee(i,e,o){let t=i.addFolder("Debug");t.close();let n=e.Debug.state,s={showPolygonLabelTextAreaMesh:n.showPolygonLabelTextAreaMesh,showCollisionBoxes:n.showCollisionBoxes,showEnvMap:n.showEnvMap};t.add(s,"showPolygonLabelTextAreaMesh").onChange(r=>{e.Debug.update({showPolygonLabelTextAreaMesh:r})}).name("Show Flat Label Text Area Mesh"),t.add(s,"showCollisionBoxes").onChange(r=>{e.Debug.update({showCollisionBoxes:r})}).name("Show Collision Boxes"),t.add(s,"showEnvMap").onChange(r=>{e.Debug.update({showEnvMap:r})}).name("Show Environment Map"),e.Debug.update(s)}y();function we(i,e,o){let t=i.addFolder("Text3D").close(),n={all:()=>{e.Text3D.labelAll()},removeAll:()=>{e.Text3D.removeAll()}};t.add(n,"all").name("Show All"),t.add(n,"removeAll").name("Remove All")}y();y();y();var w,j,L,k,$,F,Fe,ae,Se,se=class{constructor(e=new P({autoPlace:!0})){D(this,F);D(this,w);D(this,j,[]);D(this,L,{});D(this,k,{});D(this,$,{});he(this,w,e),C(this,w).domElement.style.left="0"}add(e,o,t){if(C(this,k)[e])throw new Error("Control ".concat(e," already exists"));C(this,L)[e]=o,C(this,$)[e]=o.default,B(this,F,Fe).call(this,e,o,t),this.show()}addColor(e,o,t){if(C(this,k)[e])throw new Error("Control ".concat(e," already exists"));C(this,L)[e]=o,C(this,$)[e]=o.default,B(this,F,Se).call(this,e,o,t),this.show()}update(e,o){if(!C(this,k)[e])throw new Error("Control ".concat(e," does not exist"));C(this,k)[e].setValue(o),C(this,L)[e].onChange&&C(this,L)[e].onChange(o,e)}replace(e,o,t){if(!C(this,k)[e]){this.add(e,o,t);return}o.args&&C(this,k)[e].options(o.args),o.default&&C(this,k)[e].setValue(o.default),o.onChange&&C(this,k)[e].onChange(n=>{o.onChange(n,e)})}remove(e){if(!C(this,k)[e])throw new Error("Control ".concat(e," does not exist"));C(this,k)[e].destroy(),C(this,k)[e].parent.children.length===0&&C(this,k)[e].parent.hide(),delete C(this,k)[e],delete C(this,L)[e],delete C(this,$)[e]}show(){C(this,w).show()}hide(){C(this,w).hide()}removeAll(){for(let e in C(this,k))this.remove(e)}destroy(){C(this,w).destroy()}};w=new WeakMap,j=new WeakMap,L=new WeakMap,k=new WeakMap,$=new WeakMap,F=new WeakSet,Fe=function(e,o,t){let s=B(this,F,ae).call(this,t).add(C(this,$),e,o.args,o.max,o.step);o.onChange&&s.onChange(r=>{o.onChange(r,e)}),o.onAdd&&o.onAdd(o.default,e),C(this,k)[e]=s},ae=function(e){if(!e)return C(this,w);let o=C(this,j).find(t=>t._title===e);return o?(o.show(),o):(o=C(this,w).addFolder(e),C(this,j).push(o),o)},Se=function(e,o,t){let s=B(this,F,ae).call(this,t).addColor(C(this,$),e);o.onChange&&s.onChange(r=>{o.onChange(r,e)}),C(this,k)[e]=s};function et(i,e,o){var a;let t={},n=i.getByType("floor"),s=i.getByType("floor-stack");s.length>1&&(t.FloorStack={default:e.currentFloorStack.id,args:s.reduce((l,{id:p,name:c})=>({...l,[c]:p}),{}),onChange:l=>{l!==e.currentFloorStack.id&&(e.setFloorStack(l),o.replace("Floor",{default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((p,{id:c,name:u})=>({...p,[u]:c}),{})}))}}),n.length>1&&(t.Floor={default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((l,{id:p,name:c})=>({...l,[c]:p}),{}),onChange:l=>{l!==e.currentFloor.id&&e.setFloor(l)},onAdd:()=>{e.on("floor-change",l=>{l!=null&&l.floor.id&&(s.length>1&&o.replace("FloorStack",{default:e.currentFloorStack.id}),o.replace("Floor",{default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((c,{id:u,name:g})=>({...c,[g]:u}),{})}))})}});let r=i.getByType("enterprise-venue");return r&&r.languages.length>1&&(t.Language={default:((a=i.currentLanguage)==null?void 0:a.code)||r.languages[0].code,args:r.languages.reduce((l,{code:p,name:c})=>({...l,[c]:p}),{}),onChange:l=>{i.changeLanguage(l)}}),t}function Le(i,e,o=new P){let t=new se(o),n=et(i,e,t);Object.keys(n).length||t.hide();for(let s in n)t.add(s,n[s]);return t}async function $e(i,e,{initialfloorsInStack:o,root:t,floorsInDirections:n,showLabelsPerFloor:s=!0}){async function r(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 l(h){await i.Camera.animateElevation(h.elevation*i.StackedMaps.distanceBetweenFloors)}let p=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(p,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90,duration:500}),i.StackedMaps.changeFloorOnElevationChanges(!0),await l(i.currentFloor),await r(i.currentFloor),i.StackedMaps.setFloorVisiblityMode("only-current-floor")),p=i.currentFloor}),i.on("stacked-maps-state-change",({state:h})=>{console.log("stacked-maps-state-change",h)});let c=e.getByType("space");if(s){let h=c.reduce((m,v)=>(m.has(v.floor)||m.set(v.floor,[]),v.name&&v.name!==""&&m.get(v.floor).push(i.Labels.add(v,v.name)),m),new Map);i.on("floor-change",()=>{h.forEach((m,v)=>{m.forEach(f=>{i.updateState(f,{enabled:i.currentFloor===v})})})})}let u=Le(e,i,t),g=o!=null?o:[];async function d(){i.Outdoor.setOpacity(.25),g=e.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 d()}},"Stack Maps"),n&&u.add("Expand - Only Navigation",{default:async()=>{i.Outdoor.setOpacity(.25),g=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()=>{g=e.getByType("floor"),i.Outdoor.setOpacity(.25),i.StackedMaps.setFloorVisiblityMode("all-floors"),i.StackedMaps.changeFloorOnElevationChanges(!1),i.Camera.setPanMode("elevation"),i.Camera.focusOn(g,{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()=>{r(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=g.findIndex(v=>v.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=g.find(m=>m.elevation===i.currentFloor.elevation+1);h&&await l(h)}},"Floors Up/Down"),u.add("Down",{default:async()=>{let h=g.find(m=>m.elevation===i.currentFloor.elevation-1);h&&await l(h)}},"Floors Up/Down"),{zoomToFloor:r,expandAll:d}}function Ie(i,e,o){let t=i.addFolder("StackedMaps");t.close(),$e(e,o,{root:t,showLabelsPerFloor:!1})}function De(i,e,o){tt();let t=new J({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),ve(e,i,t),Ae(t,e,o==null?void 0:o.camera);let n=t.addFolder("Levels").close(),s=t.addFolder("Scene Controls");s.close();let r=t.addFolder("Labels");we(t,e,i);let a=t.addFolder("Markers");Me(t,e),Ie(t,e,i);let l=t.addFolder("misc");Ee(t,e,i),_e(l,e,i);let p={level:e.currentFloor.id},{populatelabels:c}=ye(r,i,e),{populateMarkers:u}=ke(a,i,e),g=i.getByType("floor").reduce((h,m)=>(h[m.name]=m.id,h),{}),d=n.add(p,"level",g).onChange(h=>{e.setFloor(h),p.level=e.currentFloor.id,d.updateDisplay()});return e.on("floor-change-start",h=>{n.controllers[0].setValue(h.floor.id)}),i.getByType("space").forEach(h=>{e.updateState(h,{interactive:!0})}),i.getByType("object").forEach(h=>{e.updateState(h,{interactive:!0})}),i.getByType("object").forEach(h=>{e.updateState(h,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:c,sceneFolder:s,populateMarkers:u}}var Oe="mappedin-sdk-debug-css";function tt(){if(document.getElementById(Oe))return;let i=document.createElement("style");i.id=Oe,i.textContent=Ce,document.head.appendChild(i)}var le=class{constructor(e,o){O(this,"_enabled",!1);O(this,"mv");O(this,"api");O(this,"mapData");O(this,"scenegraphVisualizerMounted",!1);O(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=o,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:o}=De(this.mapData,this.mv,e);o.onOpenClose(n=>{n===o&&!n._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,ge(this.api.core,o))}),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(n=>{this.mv.updateState(n.id,{interactive:!0})})}get enabled(){return this._enabled}};export{le as Inspector};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as X,n as ee,o as te,p as se,q as ie,u as g,x as Se}from"./chunk-M46A4YQ5.js";import{o as H}from"./chunk-A5SAO63E.js";import"./chunk-XGYIT3MM.js";import"./chunk-5SY5TZBS.js";import"./chunk-QO7JQA7V.js";import{a as L}from"./chunk-KNDTFHOY.js";import{d as be,e as C,f as K,g as D,h as Y,i as Z}from"./chunk-Q2KR5YO7.js";L();L();function E(n,e,t,s){function i(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function c(u){try{d(s.next(u))}catch(h){r(h)}}function a(u){try{d(s.throw(u))}catch(h){r(h)}}function d(u){u.done?o(u.value):i(u.value).then(c,a)}d((s=s.apply(n,e||[])).next())})}var xe="ENTRIES",ae="KEYS",ue="VALUES",y="",O=class{constructor(e,t){let s=e._tree,i=Array.from(s.keys());this.set=e,this._type=t,this._path=i.length>0?[{node:s,keys:i}]:[]}next(){let e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};let{node:e,keys:t}=z(this._path);if(z(t)===y)return{done:!1,value:this.result()};let s=e.get(z(t));return this._path.push({node:s,keys:Array.from(s.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;let e=z(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>z(e)).filter(e=>e!==y).join("")}value(){return z(this._path).node.get(y)}result(){switch(this._type){case ue:return this.value();case ae:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}},z=n=>n[n.length-1],ze=(n,e,t)=>{let s=new Map;if(e===void 0)return s;let i=e.length+1,o=i+t,r=new Uint8Array(o*i).fill(t+1);for(let c=0;c<i;++c)r[c]=c;for(let c=1;c<o;++c)r[c*i]=c;return de(n,e,t,s,r,1,i,""),s},de=(n,e,t,s,i,o,r,c)=>{let a=o*r;e:for(let d of n.keys())if(d===y){let u=i[a-1];u<=t&&s.set(c,[n.get(d),u])}else{let u=o;for(let h=0;h<d.length;++h,++u){let l=d[h],p=r*u,_=p-r,f=i[p],m=Math.max(0,u-t-1),S=Math.min(r-1,u+t);for(let b=m;b<S;++b){let V=l!==e[b],R=i[_+b]+ +V,M=i[_+b+1]+1,w=i[p+b]+1,I=i[p+b+1]=Math.min(R,M,w);I<f&&(f=I)}if(f>t)continue e}de(n.get(d),e,t,s,i,u,r,c+d)}},v=class n{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");let[t,s]=j(this._tree,e.slice(this._prefix.length));if(t===void 0){let[i,o]=Q(s);for(let r of i.keys())if(r!==y&&r.startsWith(o)){let c=new Map;return c.set(r.slice(o.length),i.get(r)),new n(c,e)}}return new n(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,Ie(this._tree,e)}entries(){return new O(this,xe)}forEach(e){for(let[t,s]of this)e(t,s,this)}fuzzyGet(e,t){return ze(this._tree,e,t)}get(e){let t=$(this._tree,e);return t!==void 0?t.get(y):void 0}has(e){let t=$(this._tree,e);return t!==void 0&&t.has(y)}keys(){return new O(this,ae)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,P(this._tree,e).set(y,t),this}get size(){if(this._size)return this._size;this._size=0;let e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let s=P(this._tree,e);return s.set(y,t(s.get(y))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let s=P(this._tree,e),i=s.get(y);return i===void 0&&s.set(y,i=t()),i}values(){return new O(this,ue)}[Symbol.iterator](){return this.entries()}static from(e){let t=new n;for(let[s,i]of e)t.set(s,i);return t}static fromObject(e){return n.from(Object.entries(e))}},j=(n,e,t=[])=>{if(e.length===0||n==null)return[n,t];for(let s of n.keys())if(s!==y&&e.startsWith(s))return t.push([n,s]),j(n.get(s),e.slice(s.length),t);return t.push([n,e]),j(void 0,"",t)},$=(n,e)=>{if(e.length===0||n==null)return n;for(let t of n.keys())if(t!==y&&e.startsWith(t))return $(n.get(t),e.slice(t.length))},P=(n,e)=>{let t=e.length;e:for(let s=0;n&&s<t;){for(let o of n.keys())if(o!==y&&e[s]===o[0]){let r=Math.min(t-s,o.length),c=1;for(;c<r&&e[s+c]===o[c];)++c;let a=n.get(o);if(c===o.length)n=a;else{let d=new Map;d.set(o.slice(c),a),n.set(e.slice(s,s+c),d),n.delete(o),n=d}s+=c;continue e}let i=new Map;return n.set(e.slice(s),i),i}return n},Ie=(n,e)=>{let[t,s]=j(n,e);if(t!==void 0){if(t.delete(y),t.size===0)le(s);else if(t.size===1){let[i,o]=t.entries().next().value;he(s,i,o)}}},le=n=>{if(n.length===0)return;let[e,t]=Q(n);if(e.delete(t),e.size===0)le(n.slice(0,-1));else if(e.size===1){let[s,i]=e.entries().next().value;s!==y&&he(n.slice(0,-1),s,i)}},he=(n,e,t)=>{if(n.length===0)return;let[s,i]=Q(n);s.set(i+e,t),s.delete(i)},Q=n=>n[n.length-1],U="or",fe="and",Oe="and_not",x=class n{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');let t=e.autoVacuum==null||e.autoVacuum===!0?N:e.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},B),e),{autoVacuum:t,searchOptions:Object.assign(Object.assign({},ne),e.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},Le),e.autoSuggestOptions||{})}),this._index=new v,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=q,this.addFields(this._options.fields)}add(e){let{extractField:t,tokenize:s,processTerm:i,fields:o,idField:r}=this._options,c=t(e,r);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(r,'"'));if(this._idToShortId.has(c))throw new Error("MiniSearch: duplicate ID ".concat(c));let a=this.addDocumentId(c);this.saveStoredFields(a,e);for(let d of o){let u=t(e,d);if(u==null)continue;let h=s(u.toString(),d),l=this._fieldIds[d],p=new Set(h).size;this.addFieldLength(a,l,this._documentCount-1,p);for(let _ of h){let f=i(_,d);if(Array.isArray(f))for(let m of f)this.addTerm(l,a,m);else f&&this.addTerm(l,a,f)}}}addAll(e){for(let t of e)this.add(t)}addAllAsync(e,t={}){let{chunkSize:s=10}=t,i={chunk:[],promise:Promise.resolve()},{chunk:o,promise:r}=e.reduce(({chunk:c,promise:a},d,u)=>(c.push(d),(u+1)%s===0?{chunk:[],promise:a.then(()=>new Promise(h=>setTimeout(h,0))).then(()=>this.addAll(c))}:{chunk:c,promise:a}),i);return r.then(()=>this.addAll(o))}remove(e){let{tokenize:t,processTerm:s,extractField:i,fields:o,idField:r}=this._options,c=i(e,r);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(r,'"'));let a=this._idToShortId.get(c);if(a==null)throw new Error("MiniSearch: cannot remove document with ID ".concat(c,": it is not in the index"));for(let d of o){let u=i(e,d);if(u==null)continue;let h=t(u.toString(),d),l=this._fieldIds[d],p=new Set(h).size;this.removeFieldLength(a,l,this._documentCount,p);for(let _ of h){let f=s(_,d);if(Array.isArray(f))for(let m of f)this.removeTerm(l,a,m);else f&&this.removeTerm(l,a,f)}}this._storedFields.delete(a),this._documentIds.delete(a),this._idToShortId.delete(c),this._fieldLength.delete(a),this._documentCount-=1}removeAll(e){if(e)for(let t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new v,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){let t=this._idToShortId.get(e);if(t==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(e,": it is not in the index"));this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((s,i)=>{this.removeFieldLength(t,i,this._documentCount,s)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;let{minDirtFactor:e,minDirtCount:t,batchSize:s,batchWait:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:s,batchWait:i},{minDirtCount:t,minDirtFactor:e})}discardAll(e){let t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(let s of e)this.discard(s)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){let{idField:t,extractField:s}=this._options,i=s(e,t);this.discard(i),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{let s=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=q,this.performVacuuming(e,s)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}performVacuuming(e,t){return E(this,void 0,void 0,function*(){let s=this._dirtCount;if(this.vacuumConditionsMet(t)){let i=e.batchSize||J.batchSize,o=e.batchWait||J.batchWait,r=1;for(let[c,a]of this._index){for(let[d,u]of a)for(let[h]of u)this._documentIds.has(h)||(u.size<=1?a.delete(d):u.delete(h));this._index.get(c).size===0&&this._index.delete(c),r%i===0&&(yield new Promise(d=>setTimeout(d,o))),r+=1}this._dirtCount-=s}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:s}=e;return t=t||N.minDirtCount,s=s||N.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=s}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){let t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){let s=this.executeQuery(e,t),i=[];for(let[o,{score:r,terms:c,match:a}]of s){let d=c.length||1,u={id:this._documentIds.get(o),score:r*d,terms:Object.keys(a),queryTerms:c,match:a};Object.assign(u,this._storedFields.get(o)),(t.filter==null||t.filter(u))&&i.push(u)}return e===n.wildcard&&t.boostDocument==null&&this._options.searchOptions.boostDocument==null||i.sort(re),i}autoSuggest(e,t={}){t=Object.assign(Object.assign({},this._options.autoSuggestOptions),t);let s=new Map;for(let{score:o,terms:r}of this.search(e,t)){let c=r.join(" "),a=s.get(c);a!=null?(a.score+=o,a.count+=1):s.set(c,{score:o,terms:r,count:1})}let i=[];for(let[o,{score:r,terms:c,count:a}]of s)i.push({suggestion:o,terms:c,score:r/a});return i.sort(re),i}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static loadJSONAsync(e,t){return E(this,void 0,void 0,function*(){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)})}static getDefault(e){if(B.hasOwnProperty(e))return W(B,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))}static loadJS(e,t){let{index:s,documentIds:i,fieldLength:o,storedFields:r,serializationVersion:c}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=k(i),a._fieldLength=k(o),a._storedFields=k(r);for(let[d,u]of a._documentIds)a._idToShortId.set(u,d);for(let[d,u]of s){let h=new Map;for(let l of Object.keys(u)){let p=u[l];c===1&&(p=p.ds),h.set(parseInt(l,10),k(p))}a._index.set(d,h)}return a}static loadJSAsync(e,t){return E(this,void 0,void 0,function*(){let{index:s,documentIds:i,fieldLength:o,storedFields:r,serializationVersion:c}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=yield A(i),a._fieldLength=yield A(o),a._storedFields=yield A(r);for(let[u,h]of a._documentIds)a._idToShortId.set(h,u);let d=0;for(let[u,h]of s){let l=new Map;for(let p of Object.keys(h)){let _=h[p];c===1&&(_=_.ds),l.set(parseInt(p,10),yield A(_))}++d%1e3===0&&(yield pe(0)),a._index.set(u,l)}return a})}static instantiateMiniSearch(e,t){let{documentCount:s,nextId:i,fieldIds:o,averageFieldLength:r,dirtCount:c,serializationVersion:a}=e;if(a!==1&&a!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");let d=new n(t);return d._documentCount=s,d._nextId=i,d._idToShortId=new Map,d._fieldIds=o,d._avgFieldLength=r,d._dirtCount=c||0,d._index=new v,d}executeQuery(e,t={}){if(e===n.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){let l=Object.assign(Object.assign(Object.assign({},t),e),{queries:void 0}),p=e.queries.map(_=>this.executeQuery(_,l));return this.combineResults(p,l.combineWith)}let{tokenize:s,processTerm:i,searchOptions:o}=this._options,r=Object.assign(Object.assign({tokenize:s,processTerm:i},o),t),{tokenize:c,processTerm:a}=r,h=c(e).flatMap(l=>a(l)).filter(l=>!!l).map(Ce(r)).map(l=>this.executeQuerySpec(l,r));return this.combineResults(h,r.combineWith)}executeQuerySpec(e,t){let s=Object.assign(Object.assign({},this._options.searchOptions),t),i=(s.fields||this._options.fields).reduce((f,m)=>Object.assign(Object.assign({},f),{[m]:W(s.boost,m)||1}),{}),{boostDocument:o,weights:r,maxFuzzy:c,bm25:a}=s,{fuzzy:d,prefix:u}=Object.assign(Object.assign({},ne.weights),r),h=this._index.get(e.term),l=this.termResults(e.term,e.term,1,e.termBoost,h,i,o,a),p,_;if(e.prefix&&(p=this._index.atPrefix(e.term)),e.fuzzy){let f=e.fuzzy===!0?.2:e.fuzzy,m=f<1?Math.min(c,Math.round(e.term.length*f)):f;m&&(_=this._index.fuzzyGet(e.term,m))}if(p)for(let[f,m]of p){let S=f.length-e.term.length;if(!S)continue;_==null||_.delete(f);let b=u*f.length/(f.length+.3*S);this.termResults(e.term,f,b,e.termBoost,m,i,o,a,l)}if(_)for(let f of _.keys()){let[m,S]=_.get(f);if(!S)continue;let b=d*f.length/(f.length+S);this.termResults(e.term,f,b,e.termBoost,m,i,o,a,l)}return l}executeWildcardQuery(e){let t=new Map,s=Object.assign(Object.assign({},this._options.searchOptions),e);for(let[i,o]of this._documentIds){let r=s.boostDocument?s.boostDocument(o,"",this._storedFields.get(i)):1;t.set(i,{score:r,terms:[],match:{}})}return t}combineResults(e,t=U){if(e.length===0)return new Map;let s=t.toLowerCase(),i=ve[s];if(!i)throw new Error("Invalid combination operator: ".concat(t));return e.reduce(i)||new Map}toJSON(){let e=[];for(let[t,s]of this._index){let i={};for(let[o,r]of s)i[o]=Object.fromEntries(r);e.push([t,i])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,s,i,o,r,c,a,d=new Map){if(o==null)return d;for(let u of Object.keys(r)){let h=r[u],l=this._fieldIds[u],p=o.get(l);if(p==null)continue;let _=p.size,f=this._avgFieldLength[l];for(let m of p.keys()){if(!this._documentIds.has(m)){this.removeTerm(l,m,t),_-=1;continue}let S=c?c(this._documentIds.get(m),t,this._storedFields.get(m)):1;if(!S)continue;let b=p.get(m),V=this._fieldLength.get(m)[l],R=Me(b,_,this._documentCount,V,f,a),M=s*i*h*S*R,w=d.get(m);if(w){w.score+=M,ke(w.terms,e);let I=W(w.match,t);I?I.push(u):w.match[t]=[u]}else d.set(m,{score:M,terms:[e],match:{[t]:[u]}})}}return d}addTerm(e,t,s){let i=this._index.fetch(s,ce),o=i.get(e);if(o==null)o=new Map,o.set(t,1),i.set(e,o);else{let r=o.get(t);o.set(t,(r||0)+1)}}removeTerm(e,t,s){if(!this._index.has(s)){this.warnDocumentChanged(t,e,s);return}let i=this._index.fetch(s,ce),o=i.get(e);o==null||o.get(t)==null?this.warnDocumentChanged(t,e,s):o.get(t)<=1?o.size<=1?i.delete(e):o.delete(t):o.set(t,o.get(t)-1),this._index.get(s).size===0&&this._index.delete(s)}warnDocumentChanged(e,t,s){for(let i of Object.keys(this._fieldIds))if(this._fieldIds[i]===t){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(s,'" was not present in field "').concat(i,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}addDocumentId(e){let t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,s,i){let o=this._fieldLength.get(e);o==null&&this._fieldLength.set(e,o=[]),o[t]=i;let c=(this._avgFieldLength[t]||0)*s+i;this._avgFieldLength[t]=c/(s+1)}removeFieldLength(e,t,s,i){if(s===1){this._avgFieldLength[t]=0;return}let o=this._avgFieldLength[t]*s-i;this._avgFieldLength[t]=o/(s-1)}saveStoredFields(e,t){let{storeFields:s,extractField:i}=this._options;if(s==null||s.length===0)return;let o=this._storedFields.get(e);o==null&&this._storedFields.set(e,o={});for(let r of s){let c=i(t,r);c!==void 0&&(o[r]=c)}}};x.wildcard=Symbol("*");var W=(n,e)=>Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0,ve={[U]:(n,e)=>{for(let t of e.keys()){let s=n.get(t);if(s==null)n.set(t,e.get(t));else{let{score:i,terms:o,match:r}=e.get(t);s.score=s.score+i,s.match=Object.assign(s.match,r),oe(s.terms,o)}}return n},[fe]:(n,e)=>{let t=new Map;for(let s of e.keys()){let i=n.get(s);if(i==null)continue;let{score:o,terms:r,match:c}=e.get(s);oe(i.terms,r),t.set(s,{score:i.score+o,terms:i.terms,match:Object.assign(i.match,c)})}return t},[Oe]:(n,e)=>{for(let t of e.keys())n.delete(t);return n}},Fe={k:1.2,b:.7,d:.5},Me=(n,e,t,s,i,o)=>{let{k:r,b:c,d:a}=o;return Math.log(1+(t-e+.5)/(e+.5))*(a+n*(r+1)/(n+r*(1-c+c*s/i)))},Ce=n=>(e,t,s)=>{let i=typeof n.fuzzy=="function"?n.fuzzy(e,t,s):n.fuzzy||!1,o=typeof n.prefix=="function"?n.prefix(e,t,s):n.prefix===!0,r=typeof n.boostTerm=="function"?n.boostTerm(e,t,s):1;return{term:e,fuzzy:i,prefix:o,termBoost:r}},B={idField:"id",extractField:(n,e)=>n[e],tokenize:n=>n.split(Ae),processTerm:n=>n.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(n,e)=>{typeof(console==null?void 0:console[n])=="function"&&console[n](e)},autoVacuum:!0},ne={combineWith:U,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Fe},Le={combineWith:fe,prefix:(n,e,t)=>e===t.length-1},J={batchSize:1e3,batchWait:10},q={minDirtFactor:.1,minDirtCount:20},N=Object.assign(Object.assign({},J),q),ke=(n,e)=>{n.includes(e)||n.push(e)},oe=(n,e)=>{for(let t of e)n.includes(t)||n.push(t)},re=({score:n},{score:e})=>e-n,ce=()=>new Map,k=n=>{let e=new Map;for(let t of Object.keys(n))e.set(parseInt(t,10),n[t]);return e},A=n=>E(void 0,void 0,void 0,function*(){let e=new Map,t=0;for(let s of Object.keys(n))e.set(parseInt(s,10),n[s]),++t%1e3===0&&(yield pe(0));return e}),pe=n=>new Promise(e=>setTimeout(e,n)),Ae=/[\n\r\p{Z}\p{P}]+/u;var _e=be(Se(),1);var F,T,ye,me=class{constructor(e){D(this,T);C(this,"mapData");C(this,"indexes");C(this,"ready");D(this,F);this.mapData=e,this.indexes=Te(e),this.ready=this.populate(),Y(this,F,H(Z(this,T,ye).bind(this),2e3))}async populate(){let{places:e,enterpriseLocations:t,enterpriseCategories:s}=this.indexes,i=this.mapData,o=[];return e.removeAll(),o=o.concat([e.addAllAsync(i.getByType("space")),e.addAllAsync(i.getByType("point-of-interest")),e.addAllAsync(i.getByType("connection")),e.addAllAsync(i.getByType("floor")),e.addAllAsync(i.getByType("door")),e.addAllAsync(i.getByType("annotation")),e.addAllAsync(i.getByType("area"))]),t&&(t==null||t.removeAll(),o.push(t.addAllAsync(i.getByType("enterprise-location")))),s&&(s==null||s.removeAll(),o.push(s.addAllAsync(i.getByType("enterprise-category")))),Promise.all(o)}async search(e,t={}){var a,d;await this.ready,Ve.parse(t);let s=(0,_e.default)({},t,je),i=this.indexes.places.search(e,{fields:Object.keys(s.places.fields).filter(u=>s.places.fields[u])});s.places.limit&&(i=i.slice(0,s.places.limit));let o=(a=this.indexes.enterpriseLocations)==null?void 0:a.search(e,{fields:Object.keys(s.enterpriseLocations.fields).filter(u=>s.enterpriseLocations.fields[u])});o&&s.enterpriseLocations.limit&&(o=o.slice(0,s.enterpriseLocations.limit));let r=(d=this.indexes.enterpriseCategories)==null?void 0:d.search(e,{fields:Object.keys(s.enterpriseCategories.fields).filter(u=>s.enterpriseCategories.fields[u])});r&&s.enterpriseCategories.limit&&(r=r.slice(0,s.enterpriseCategories.limit));let c=Ee(this.mapData,{placesResult:i,locationsResult:o,categoriesResult:r});return K(this,F).call(this,e),c}async suggest(e,t={}){await this.ready,Re.parse(t);let s=[],{places:{enabled:i=!0}={},enterpriseLocations:{enabled:o=!0}={}}=t;return o&&this.indexes.enterpriseLocations&&this.indexes.enterpriseLocations.autoSuggest(e,{fields:["name","tags"],combineWith:"AND",prefix:!0,boost:{name:2,tags:1}}).forEach(r=>s.push(r)),i&&this.indexes.places.autoSuggest(e,{fields:["name"],combineWith:"AND",prefix:!0}).forEach(r=>s.push(r)),s.sort((r,c)=>c.score-r.score),this.mapData.Analytics.capture("$query-suggest",{query:e,suggestions:s.map(r=>r.suggestion)}),s}};F=new WeakMap,T=new WeakSet,ye=function(e){this.mapData.Analytics.capture("$query-search",{query:e})};function Ee(n,{placesResult:e,locationsResult:t,categoriesResult:s}){let i=e.reduce((c,{id:a,match:d,score:u,__type:h})=>{let l=n.getById(h,a);return l!=null&&!X.is(l)&&!ee.is(l)&&!te.is(l)&&!se.is(l)&&!ie.is(l)&&c.push({type:l.__type,match:d,score:u,item:l}),c},[]),o;if(t){o=[];for(let{id:c,match:a,score:d}of t){let u=n.getById("enterprise-location",c);u&&o.push({type:u.__type,match:a,score:d,item:u})}}let r;if(s){r=[];for(let{id:c,match:a,score:d}of s){let u=n.getById("enterprise-category",c);u&&r.push({type:u.__type,match:a,score:d,item:u})}}return{places:i,enterpriseLocations:o,enterpriseCategories:r}}var je={places:{fields:{name:!0,description:!0}},enterpriseCategories:{fields:{name:!0,description:!1,"locations.name":!0}},enterpriseLocations:{fields:{name:!0,tags:!0,description:!0}}};function G(n){return n.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()}function Te(n){let e=new x({fields:["name","description"],storeFields:["id","__type"],searchOptions:{fuzzy:.2,prefix:!0,boost:{name:2},combineWith:"AND"},extractField:(r,c)=>{let a=r[c];return typeof a=="string"?G(a):r[c]},processTerm:r=>De.has(r)?"":r.toLowerCase()}),t=n.getByType("enterprise-location"),s;t&&(s=new x({fields:["name","tags","description"],storeFields:["id","__type"],searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:3,tags:2,description:1}},extractField:(r,c)=>Array.isArray(r[c])?r[c].join(" "):typeof r[c]=="string"?G(r[c]):r[c]}));let i=n.getByType("enterprise-category"),o;return i&&(o=new x({fields:["name","description","locations.name"],storeFields:["id","__type"],extractField(r,c){return c==="locations.name"?r.locations.reduce((d,u)=>d+" ".concat(ge," ")+u.name,"")+" ".concat(ge):typeof r[c]=="string"?G(r[c]):r[c]},searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:2,"locations.name":2}}})),{enterpriseCategories:o,enterpriseLocations:s,places:e}}var Ve=g.object({places:g.object({fields:g.object({name:g.boolean().optional(),description:g.boolean().optional()}).optional(),limit:g.number().positive().optional()}).optional(),enterpriseCategories:g.object({fields:g.object({name:g.boolean().optional(),description:g.boolean().optional(),"locations.name":g.boolean().optional()}).optional(),limit:g.number().positive().optional()}).optional(),enterpriseLocations:g.object({fields:g.object({name:g.boolean().optional(),tags:g.boolean().optional(),description:g.boolean().optional()}).optional(),limit:g.number().positive().optional()}).optional()}),Re=g.object({places:g.object({enabled:g.boolean().optional()}).optional(),enterpriseLocations:g.object({enabled:g.boolean().optional()}).optional()}),De=new Set(["the","an","and","or","of","in","on","at","to","from","with","by","for"]),ge="";export{me as InternalSearch,G as removeAccents};
|
|
1
|
+
import{b as X,n as ee,o as te,p as se,q as ie,u as g,x as Se}from"./chunk-AGPZKMLJ.js";import{o as H}from"./chunk-HTXG2WUL.js";import"./chunk-L5IJY45Y.js";import"./chunk-7QYC6UYU.js";import"./chunk-O57EU3PO.js";import{a as L}from"./chunk-N5U7Y27D.js";import{d as be,e as C,f as K,g as D,h as Y,i as Z}from"./chunk-HALSTKAB.js";L();L();function E(n,e,t,s){function i(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function c(u){try{d(s.next(u))}catch(h){r(h)}}function a(u){try{d(s.throw(u))}catch(h){r(h)}}function d(u){u.done?o(u.value):i(u.value).then(c,a)}d((s=s.apply(n,e||[])).next())})}var xe="ENTRIES",ae="KEYS",ue="VALUES",y="",O=class{constructor(e,t){let s=e._tree,i=Array.from(s.keys());this.set=e,this._type=t,this._path=i.length>0?[{node:s,keys:i}]:[]}next(){let e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};let{node:e,keys:t}=z(this._path);if(z(t)===y)return{done:!1,value:this.result()};let s=e.get(z(t));return this._path.push({node:s,keys:Array.from(s.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;let e=z(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>z(e)).filter(e=>e!==y).join("")}value(){return z(this._path).node.get(y)}result(){switch(this._type){case ue:return this.value();case ae:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}},z=n=>n[n.length-1],ze=(n,e,t)=>{let s=new Map;if(e===void 0)return s;let i=e.length+1,o=i+t,r=new Uint8Array(o*i).fill(t+1);for(let c=0;c<i;++c)r[c]=c;for(let c=1;c<o;++c)r[c*i]=c;return de(n,e,t,s,r,1,i,""),s},de=(n,e,t,s,i,o,r,c)=>{let a=o*r;e:for(let d of n.keys())if(d===y){let u=i[a-1];u<=t&&s.set(c,[n.get(d),u])}else{let u=o;for(let h=0;h<d.length;++h,++u){let l=d[h],p=r*u,_=p-r,f=i[p],m=Math.max(0,u-t-1),S=Math.min(r-1,u+t);for(let b=m;b<S;++b){let V=l!==e[b],R=i[_+b]+ +V,M=i[_+b+1]+1,w=i[p+b]+1,I=i[p+b+1]=Math.min(R,M,w);I<f&&(f=I)}if(f>t)continue e}de(n.get(d),e,t,s,i,u,r,c+d)}},v=class n{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");let[t,s]=j(this._tree,e.slice(this._prefix.length));if(t===void 0){let[i,o]=Q(s);for(let r of i.keys())if(r!==y&&r.startsWith(o)){let c=new Map;return c.set(r.slice(o.length),i.get(r)),new n(c,e)}}return new n(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,Ie(this._tree,e)}entries(){return new O(this,xe)}forEach(e){for(let[t,s]of this)e(t,s,this)}fuzzyGet(e,t){return ze(this._tree,e,t)}get(e){let t=$(this._tree,e);return t!==void 0?t.get(y):void 0}has(e){let t=$(this._tree,e);return t!==void 0&&t.has(y)}keys(){return new O(this,ae)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,P(this._tree,e).set(y,t),this}get size(){if(this._size)return this._size;this._size=0;let e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let s=P(this._tree,e);return s.set(y,t(s.get(y))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let s=P(this._tree,e),i=s.get(y);return i===void 0&&s.set(y,i=t()),i}values(){return new O(this,ue)}[Symbol.iterator](){return this.entries()}static from(e){let t=new n;for(let[s,i]of e)t.set(s,i);return t}static fromObject(e){return n.from(Object.entries(e))}},j=(n,e,t=[])=>{if(e.length===0||n==null)return[n,t];for(let s of n.keys())if(s!==y&&e.startsWith(s))return t.push([n,s]),j(n.get(s),e.slice(s.length),t);return t.push([n,e]),j(void 0,"",t)},$=(n,e)=>{if(e.length===0||n==null)return n;for(let t of n.keys())if(t!==y&&e.startsWith(t))return $(n.get(t),e.slice(t.length))},P=(n,e)=>{let t=e.length;e:for(let s=0;n&&s<t;){for(let o of n.keys())if(o!==y&&e[s]===o[0]){let r=Math.min(t-s,o.length),c=1;for(;c<r&&e[s+c]===o[c];)++c;let a=n.get(o);if(c===o.length)n=a;else{let d=new Map;d.set(o.slice(c),a),n.set(e.slice(s,s+c),d),n.delete(o),n=d}s+=c;continue e}let i=new Map;return n.set(e.slice(s),i),i}return n},Ie=(n,e)=>{let[t,s]=j(n,e);if(t!==void 0){if(t.delete(y),t.size===0)le(s);else if(t.size===1){let[i,o]=t.entries().next().value;he(s,i,o)}}},le=n=>{if(n.length===0)return;let[e,t]=Q(n);if(e.delete(t),e.size===0)le(n.slice(0,-1));else if(e.size===1){let[s,i]=e.entries().next().value;s!==y&&he(n.slice(0,-1),s,i)}},he=(n,e,t)=>{if(n.length===0)return;let[s,i]=Q(n);s.set(i+e,t),s.delete(i)},Q=n=>n[n.length-1],U="or",fe="and",Oe="and_not",x=class n{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');let t=e.autoVacuum==null||e.autoVacuum===!0?N:e.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},B),e),{autoVacuum:t,searchOptions:Object.assign(Object.assign({},ne),e.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},Le),e.autoSuggestOptions||{})}),this._index=new v,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=q,this.addFields(this._options.fields)}add(e){let{extractField:t,tokenize:s,processTerm:i,fields:o,idField:r}=this._options,c=t(e,r);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(r,'"'));if(this._idToShortId.has(c))throw new Error("MiniSearch: duplicate ID ".concat(c));let a=this.addDocumentId(c);this.saveStoredFields(a,e);for(let d of o){let u=t(e,d);if(u==null)continue;let h=s(u.toString(),d),l=this._fieldIds[d],p=new Set(h).size;this.addFieldLength(a,l,this._documentCount-1,p);for(let _ of h){let f=i(_,d);if(Array.isArray(f))for(let m of f)this.addTerm(l,a,m);else f&&this.addTerm(l,a,f)}}}addAll(e){for(let t of e)this.add(t)}addAllAsync(e,t={}){let{chunkSize:s=10}=t,i={chunk:[],promise:Promise.resolve()},{chunk:o,promise:r}=e.reduce(({chunk:c,promise:a},d,u)=>(c.push(d),(u+1)%s===0?{chunk:[],promise:a.then(()=>new Promise(h=>setTimeout(h,0))).then(()=>this.addAll(c))}:{chunk:c,promise:a}),i);return r.then(()=>this.addAll(o))}remove(e){let{tokenize:t,processTerm:s,extractField:i,fields:o,idField:r}=this._options,c=i(e,r);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(r,'"'));let a=this._idToShortId.get(c);if(a==null)throw new Error("MiniSearch: cannot remove document with ID ".concat(c,": it is not in the index"));for(let d of o){let u=i(e,d);if(u==null)continue;let h=t(u.toString(),d),l=this._fieldIds[d],p=new Set(h).size;this.removeFieldLength(a,l,this._documentCount,p);for(let _ of h){let f=s(_,d);if(Array.isArray(f))for(let m of f)this.removeTerm(l,a,m);else f&&this.removeTerm(l,a,f)}}this._storedFields.delete(a),this._documentIds.delete(a),this._idToShortId.delete(c),this._fieldLength.delete(a),this._documentCount-=1}removeAll(e){if(e)for(let t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new v,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){let t=this._idToShortId.get(e);if(t==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(e,": it is not in the index"));this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((s,i)=>{this.removeFieldLength(t,i,this._documentCount,s)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;let{minDirtFactor:e,minDirtCount:t,batchSize:s,batchWait:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:s,batchWait:i},{minDirtCount:t,minDirtFactor:e})}discardAll(e){let t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(let s of e)this.discard(s)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){let{idField:t,extractField:s}=this._options,i=s(e,t);this.discard(i),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{let s=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=q,this.performVacuuming(e,s)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}performVacuuming(e,t){return E(this,void 0,void 0,function*(){let s=this._dirtCount;if(this.vacuumConditionsMet(t)){let i=e.batchSize||J.batchSize,o=e.batchWait||J.batchWait,r=1;for(let[c,a]of this._index){for(let[d,u]of a)for(let[h]of u)this._documentIds.has(h)||(u.size<=1?a.delete(d):u.delete(h));this._index.get(c).size===0&&this._index.delete(c),r%i===0&&(yield new Promise(d=>setTimeout(d,o))),r+=1}this._dirtCount-=s}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:s}=e;return t=t||N.minDirtCount,s=s||N.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=s}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){let t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){let s=this.executeQuery(e,t),i=[];for(let[o,{score:r,terms:c,match:a}]of s){let d=c.length||1,u={id:this._documentIds.get(o),score:r*d,terms:Object.keys(a),queryTerms:c,match:a};Object.assign(u,this._storedFields.get(o)),(t.filter==null||t.filter(u))&&i.push(u)}return e===n.wildcard&&t.boostDocument==null&&this._options.searchOptions.boostDocument==null||i.sort(re),i}autoSuggest(e,t={}){t=Object.assign(Object.assign({},this._options.autoSuggestOptions),t);let s=new Map;for(let{score:o,terms:r}of this.search(e,t)){let c=r.join(" "),a=s.get(c);a!=null?(a.score+=o,a.count+=1):s.set(c,{score:o,terms:r,count:1})}let i=[];for(let[o,{score:r,terms:c,count:a}]of s)i.push({suggestion:o,terms:c,score:r/a});return i.sort(re),i}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static loadJSONAsync(e,t){return E(this,void 0,void 0,function*(){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)})}static getDefault(e){if(B.hasOwnProperty(e))return W(B,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))}static loadJS(e,t){let{index:s,documentIds:i,fieldLength:o,storedFields:r,serializationVersion:c}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=k(i),a._fieldLength=k(o),a._storedFields=k(r);for(let[d,u]of a._documentIds)a._idToShortId.set(u,d);for(let[d,u]of s){let h=new Map;for(let l of Object.keys(u)){let p=u[l];c===1&&(p=p.ds),h.set(parseInt(l,10),k(p))}a._index.set(d,h)}return a}static loadJSAsync(e,t){return E(this,void 0,void 0,function*(){let{index:s,documentIds:i,fieldLength:o,storedFields:r,serializationVersion:c}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=yield A(i),a._fieldLength=yield A(o),a._storedFields=yield A(r);for(let[u,h]of a._documentIds)a._idToShortId.set(h,u);let d=0;for(let[u,h]of s){let l=new Map;for(let p of Object.keys(h)){let _=h[p];c===1&&(_=_.ds),l.set(parseInt(p,10),yield A(_))}++d%1e3===0&&(yield pe(0)),a._index.set(u,l)}return a})}static instantiateMiniSearch(e,t){let{documentCount:s,nextId:i,fieldIds:o,averageFieldLength:r,dirtCount:c,serializationVersion:a}=e;if(a!==1&&a!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");let d=new n(t);return d._documentCount=s,d._nextId=i,d._idToShortId=new Map,d._fieldIds=o,d._avgFieldLength=r,d._dirtCount=c||0,d._index=new v,d}executeQuery(e,t={}){if(e===n.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){let l=Object.assign(Object.assign(Object.assign({},t),e),{queries:void 0}),p=e.queries.map(_=>this.executeQuery(_,l));return this.combineResults(p,l.combineWith)}let{tokenize:s,processTerm:i,searchOptions:o}=this._options,r=Object.assign(Object.assign({tokenize:s,processTerm:i},o),t),{tokenize:c,processTerm:a}=r,h=c(e).flatMap(l=>a(l)).filter(l=>!!l).map(Ce(r)).map(l=>this.executeQuerySpec(l,r));return this.combineResults(h,r.combineWith)}executeQuerySpec(e,t){let s=Object.assign(Object.assign({},this._options.searchOptions),t),i=(s.fields||this._options.fields).reduce((f,m)=>Object.assign(Object.assign({},f),{[m]:W(s.boost,m)||1}),{}),{boostDocument:o,weights:r,maxFuzzy:c,bm25:a}=s,{fuzzy:d,prefix:u}=Object.assign(Object.assign({},ne.weights),r),h=this._index.get(e.term),l=this.termResults(e.term,e.term,1,e.termBoost,h,i,o,a),p,_;if(e.prefix&&(p=this._index.atPrefix(e.term)),e.fuzzy){let f=e.fuzzy===!0?.2:e.fuzzy,m=f<1?Math.min(c,Math.round(e.term.length*f)):f;m&&(_=this._index.fuzzyGet(e.term,m))}if(p)for(let[f,m]of p){let S=f.length-e.term.length;if(!S)continue;_==null||_.delete(f);let b=u*f.length/(f.length+.3*S);this.termResults(e.term,f,b,e.termBoost,m,i,o,a,l)}if(_)for(let f of _.keys()){let[m,S]=_.get(f);if(!S)continue;let b=d*f.length/(f.length+S);this.termResults(e.term,f,b,e.termBoost,m,i,o,a,l)}return l}executeWildcardQuery(e){let t=new Map,s=Object.assign(Object.assign({},this._options.searchOptions),e);for(let[i,o]of this._documentIds){let r=s.boostDocument?s.boostDocument(o,"",this._storedFields.get(i)):1;t.set(i,{score:r,terms:[],match:{}})}return t}combineResults(e,t=U){if(e.length===0)return new Map;let s=t.toLowerCase(),i=ve[s];if(!i)throw new Error("Invalid combination operator: ".concat(t));return e.reduce(i)||new Map}toJSON(){let e=[];for(let[t,s]of this._index){let i={};for(let[o,r]of s)i[o]=Object.fromEntries(r);e.push([t,i])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,s,i,o,r,c,a,d=new Map){if(o==null)return d;for(let u of Object.keys(r)){let h=r[u],l=this._fieldIds[u],p=o.get(l);if(p==null)continue;let _=p.size,f=this._avgFieldLength[l];for(let m of p.keys()){if(!this._documentIds.has(m)){this.removeTerm(l,m,t),_-=1;continue}let S=c?c(this._documentIds.get(m),t,this._storedFields.get(m)):1;if(!S)continue;let b=p.get(m),V=this._fieldLength.get(m)[l],R=Me(b,_,this._documentCount,V,f,a),M=s*i*h*S*R,w=d.get(m);if(w){w.score+=M,ke(w.terms,e);let I=W(w.match,t);I?I.push(u):w.match[t]=[u]}else d.set(m,{score:M,terms:[e],match:{[t]:[u]}})}}return d}addTerm(e,t,s){let i=this._index.fetch(s,ce),o=i.get(e);if(o==null)o=new Map,o.set(t,1),i.set(e,o);else{let r=o.get(t);o.set(t,(r||0)+1)}}removeTerm(e,t,s){if(!this._index.has(s)){this.warnDocumentChanged(t,e,s);return}let i=this._index.fetch(s,ce),o=i.get(e);o==null||o.get(t)==null?this.warnDocumentChanged(t,e,s):o.get(t)<=1?o.size<=1?i.delete(e):o.delete(t):o.set(t,o.get(t)-1),this._index.get(s).size===0&&this._index.delete(s)}warnDocumentChanged(e,t,s){for(let i of Object.keys(this._fieldIds))if(this._fieldIds[i]===t){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(s,'" was not present in field "').concat(i,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}addDocumentId(e){let t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,s,i){let o=this._fieldLength.get(e);o==null&&this._fieldLength.set(e,o=[]),o[t]=i;let c=(this._avgFieldLength[t]||0)*s+i;this._avgFieldLength[t]=c/(s+1)}removeFieldLength(e,t,s,i){if(s===1){this._avgFieldLength[t]=0;return}let o=this._avgFieldLength[t]*s-i;this._avgFieldLength[t]=o/(s-1)}saveStoredFields(e,t){let{storeFields:s,extractField:i}=this._options;if(s==null||s.length===0)return;let o=this._storedFields.get(e);o==null&&this._storedFields.set(e,o={});for(let r of s){let c=i(t,r);c!==void 0&&(o[r]=c)}}};x.wildcard=Symbol("*");var W=(n,e)=>Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0,ve={[U]:(n,e)=>{for(let t of e.keys()){let s=n.get(t);if(s==null)n.set(t,e.get(t));else{let{score:i,terms:o,match:r}=e.get(t);s.score=s.score+i,s.match=Object.assign(s.match,r),oe(s.terms,o)}}return n},[fe]:(n,e)=>{let t=new Map;for(let s of e.keys()){let i=n.get(s);if(i==null)continue;let{score:o,terms:r,match:c}=e.get(s);oe(i.terms,r),t.set(s,{score:i.score+o,terms:i.terms,match:Object.assign(i.match,c)})}return t},[Oe]:(n,e)=>{for(let t of e.keys())n.delete(t);return n}},Fe={k:1.2,b:.7,d:.5},Me=(n,e,t,s,i,o)=>{let{k:r,b:c,d:a}=o;return Math.log(1+(t-e+.5)/(e+.5))*(a+n*(r+1)/(n+r*(1-c+c*s/i)))},Ce=n=>(e,t,s)=>{let i=typeof n.fuzzy=="function"?n.fuzzy(e,t,s):n.fuzzy||!1,o=typeof n.prefix=="function"?n.prefix(e,t,s):n.prefix===!0,r=typeof n.boostTerm=="function"?n.boostTerm(e,t,s):1;return{term:e,fuzzy:i,prefix:o,termBoost:r}},B={idField:"id",extractField:(n,e)=>n[e],tokenize:n=>n.split(Ae),processTerm:n=>n.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(n,e)=>{typeof(console==null?void 0:console[n])=="function"&&console[n](e)},autoVacuum:!0},ne={combineWith:U,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Fe},Le={combineWith:fe,prefix:(n,e,t)=>e===t.length-1},J={batchSize:1e3,batchWait:10},q={minDirtFactor:.1,minDirtCount:20},N=Object.assign(Object.assign({},J),q),ke=(n,e)=>{n.includes(e)||n.push(e)},oe=(n,e)=>{for(let t of e)n.includes(t)||n.push(t)},re=({score:n},{score:e})=>e-n,ce=()=>new Map,k=n=>{let e=new Map;for(let t of Object.keys(n))e.set(parseInt(t,10),n[t]);return e},A=n=>E(void 0,void 0,void 0,function*(){let e=new Map,t=0;for(let s of Object.keys(n))e.set(parseInt(s,10),n[s]),++t%1e3===0&&(yield pe(0));return e}),pe=n=>new Promise(e=>setTimeout(e,n)),Ae=/[\n\r\p{Z}\p{P}]+/u;var _e=be(Se(),1);var F,T,ye,me=class{constructor(e){D(this,T);C(this,"mapData");C(this,"indexes");C(this,"ready");D(this,F);this.mapData=e,this.indexes=Te(e),this.ready=this.populate(),Y(this,F,H(Z(this,T,ye).bind(this),2e3))}async populate(){let{places:e,enterpriseLocations:t,enterpriseCategories:s}=this.indexes,i=this.mapData,o=[];return e.removeAll(),o=o.concat([e.addAllAsync(i.getByType("space")),e.addAllAsync(i.getByType("point-of-interest")),e.addAllAsync(i.getByType("connection")),e.addAllAsync(i.getByType("floor")),e.addAllAsync(i.getByType("door")),e.addAllAsync(i.getByType("annotation")),e.addAllAsync(i.getByType("area"))]),t&&(t==null||t.removeAll(),o.push(t.addAllAsync(i.getByType("enterprise-location")))),s&&(s==null||s.removeAll(),o.push(s.addAllAsync(i.getByType("enterprise-category")))),Promise.all(o)}async search(e,t={}){var a,d;await this.ready,Ve.parse(t);let s=(0,_e.default)({},t,je),i=this.indexes.places.search(e,{fields:Object.keys(s.places.fields).filter(u=>s.places.fields[u])});s.places.limit&&(i=i.slice(0,s.places.limit));let o=(a=this.indexes.enterpriseLocations)==null?void 0:a.search(e,{fields:Object.keys(s.enterpriseLocations.fields).filter(u=>s.enterpriseLocations.fields[u])});o&&s.enterpriseLocations.limit&&(o=o.slice(0,s.enterpriseLocations.limit));let r=(d=this.indexes.enterpriseCategories)==null?void 0:d.search(e,{fields:Object.keys(s.enterpriseCategories.fields).filter(u=>s.enterpriseCategories.fields[u])});r&&s.enterpriseCategories.limit&&(r=r.slice(0,s.enterpriseCategories.limit));let c=Ee(this.mapData,{placesResult:i,locationsResult:o,categoriesResult:r});return K(this,F).call(this,e),c}async suggest(e,t={}){await this.ready,Re.parse(t);let s=[],{places:{enabled:i=!0}={},enterpriseLocations:{enabled:o=!0}={}}=t;return o&&this.indexes.enterpriseLocations&&this.indexes.enterpriseLocations.autoSuggest(e,{fields:["name","tags"],combineWith:"AND",prefix:!0,boost:{name:2,tags:1}}).forEach(r=>s.push(r)),i&&this.indexes.places.autoSuggest(e,{fields:["name"],combineWith:"AND",prefix:!0}).forEach(r=>s.push(r)),s.sort((r,c)=>c.score-r.score),this.mapData.Analytics.capture("$query-suggest",{query:e,suggestions:s.map(r=>r.suggestion)}),s}};F=new WeakMap,T=new WeakSet,ye=function(e){this.mapData.Analytics.capture("$query-search",{query:e})};function Ee(n,{placesResult:e,locationsResult:t,categoriesResult:s}){let i=e.reduce((c,{id:a,match:d,score:u,__type:h})=>{let l=n.getById(h,a);return l!=null&&!X.is(l)&&!ee.is(l)&&!te.is(l)&&!se.is(l)&&!ie.is(l)&&c.push({type:l.__type,match:d,score:u,item:l}),c},[]),o;if(t){o=[];for(let{id:c,match:a,score:d}of t){let u=n.getById("enterprise-location",c);u&&o.push({type:u.__type,match:a,score:d,item:u})}}let r;if(s){r=[];for(let{id:c,match:a,score:d}of s){let u=n.getById("enterprise-category",c);u&&r.push({type:u.__type,match:a,score:d,item:u})}}return{places:i,enterpriseLocations:o,enterpriseCategories:r}}var je={places:{fields:{name:!0,description:!0}},enterpriseCategories:{fields:{name:!0,description:!1,"locations.name":!0}},enterpriseLocations:{fields:{name:!0,tags:!0,description:!0}}};function G(n){return n.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()}function Te(n){let e=new x({fields:["name","description"],storeFields:["id","__type"],searchOptions:{fuzzy:.2,prefix:!0,boost:{name:2},combineWith:"AND"},extractField:(r,c)=>{let a=r[c];return typeof a=="string"?G(a):r[c]},processTerm:r=>De.has(r)?"":r.toLowerCase()}),t=n.getByType("enterprise-location"),s;t&&(s=new x({fields:["name","tags","description"],storeFields:["id","__type"],searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:3,tags:2,description:1}},extractField:(r,c)=>Array.isArray(r[c])?r[c].join(" "):typeof r[c]=="string"?G(r[c]):r[c]}));let i=n.getByType("enterprise-category"),o;return i&&(o=new x({fields:["name","description","locations.name"],storeFields:["id","__type"],extractField(r,c){return c==="locations.name"?r.locations.reduce((d,u)=>d+" ".concat(ge," ")+u.name,"")+" ".concat(ge):typeof r[c]=="string"?G(r[c]):r[c]},searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:2,"locations.name":2}}})),{enterpriseCategories:o,enterpriseLocations:s,places:e}}var Ve=g.object({places:g.object({fields:g.object({name:g.boolean().optional(),description:g.boolean().optional()}).optional(),limit:g.number().positive().optional()}).optional(),enterpriseCategories:g.object({fields:g.object({name:g.boolean().optional(),description:g.boolean().optional(),"locations.name":g.boolean().optional()}).optional(),limit:g.number().positive().optional()}).optional(),enterpriseLocations:g.object({fields:g.object({name:g.boolean().optional(),tags:g.boolean().optional(),description:g.boolean().optional()}).optional(),limit:g.number().positive().optional()}).optional()}),Re=g.object({places:g.object({enabled:g.boolean().optional()}).optional(),enterpriseLocations:g.object({enabled:g.boolean().optional()}).optional()}),De=new Set(["the","an","and","or","of","in","on","at","to","from","with","by","for"]),ge="";export{me as InternalSearch,G as removeAccents};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as _,A as z,B as 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,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,Z as Y,_ as Z,a,aa as $,b,ba as aa,c,ca as ba,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,v as u,w as v,x as w,y as x,z as y}from"./chunk-L5IJY45Y.js";import"./chunk-N5U7Y27D.js";import"./chunk-HALSTKAB.js";var export_Point=T.default;export{d as AJAXError,J as AttributionControl,y as BoxZoomHandler,q as CanvasSource,I as CooperativeGesturesHandler,E as DoubleClickZoomHandler,F as DragPanHandler,G as DragRotateHandler,t as EdgeInsets,e as Evented,Q as FullscreenControl,n as GeoJSONSource,O as GeolocateControl,u as Hash,o as ImageSource,C as KeyboardHandler,h as LngLat,i as LngLatBounds,K as LogoControl,L as Map,v as MapMouseEvent,w as MapTouchEvent,x as MapWheelEvent,N as Marker,j as MercatorCoordinate,M as NavigationControl,export_Point as Point,S as Popup,m as RasterDEMTileSource,l as RasterTileSource,P as ScaleControl,D as ScrollZoomHandler,s as Style,R as TerrainControl,B as TwoFingersTouchPitchHandler,A as TwoFingersTouchRotateHandler,z as TwoFingersTouchZoomHandler,H as TwoFingersTouchZoomRotateHandler,k as VectorTileSource,p as VideoSource,b as addProtocol,r as addSourceType,g as clearPrewarmedResources,a as config,Z as getMaxParallelImageRequests,V as getRTLTextPluginStatus,W as getVersion,X as getWorkerCount,$ as getWorkerUrl,ba as importScriptInWorkers,f as prewarm,c as removeProtocol,_ as setMaxParallelImageRequests,U as setRTLTextPlugin,Y as setWorkerCount,aa as setWorkerUrl};
|