@mappedin/react-sdk 6.0.1-beta.37 → 6.0.1-beta.39
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 +289 -654
- package/lib/esm/{GLTFExporter-3DPEZKOC.js → GLTFExporter-LCJJ2XME.js} +1 -1
- package/lib/esm/GLTFLoader-EOECKSEX.js +1 -0
- package/lib/esm/browser-LSWKTFI4.js +1 -0
- package/lib/esm/{chunk-7H7HYUVU.js → chunk-3QBLXB2D.js} +1 -1
- package/lib/esm/chunk-5IJAS5ZC.js +1 -0
- package/lib/esm/chunk-BYBJJK7K.js +1 -0
- package/lib/esm/chunk-BYMKRV3A.js +1 -0
- package/lib/esm/chunk-D44H7KGD.js +1 -0
- package/lib/esm/chunk-MNQRLYHZ.js +1 -0
- package/lib/esm/chunk-SBBKLBAA.js +1 -0
- package/lib/esm/index.d.ts +575 -300
- package/lib/esm/index.js +1 -1
- package/lib/esm/inspector-MBXNQKQ4.js +1 -0
- package/lib/esm/{internal-OHZQTK3N.js → internal-IZKKNLJQ.js} +1 -1
- package/lib/esm/outdoor-context-v4-PH7UY7HA.js +1 -0
- package/lib/esm/{roboto-regular-V36DLM4S.js → roboto-regular-E5TUWU5Q.js} +1 -1
- package/lib/esm/text3d-D7RMMBLN.js +1 -0
- package/package.json +2 -2
- package/lib/esm/GLTFLoader-FNDPGHTV.js +0 -1
- package/lib/esm/browser-PUDTREP5.js +0 -1
- package/lib/esm/chunk-CBBFEVN4.js +0 -1
- package/lib/esm/chunk-J5IUISYU.js +0 -1
- package/lib/esm/chunk-PFDTT6ZZ.js +0 -1
- package/lib/esm/chunk-RGA6MUTU.js +0 -1
- package/lib/esm/chunk-S7CLJZMO.js +0 -1
- package/lib/esm/chunk-YP5ZSRNK.js +0 -1
- package/lib/esm/inspector-4J34N3O3.js +0 -1
- package/lib/esm/outdoor-context-v4-VQWUPKMU.js +0 -1
- package/lib/esm/text3d-ZXEDJBSG.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var h=Object.create;var f=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var m=(b,a,c)=>a in b?f(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c;var o=(b,a)=>f(b,"name",{value:a,configurable:!0});var p=(b,a)=>()=>(b&&(a=b(b=0)),a);var q=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),r=(b,a)=>{for(var c in a)f(b,c,{get:a[c],enumerable:!0})},n=(b,a,c,d)=>{if(a&&typeof a=="object"||typeof a=="function")for(let e of j(a))!l.call(b,e)&&e!==c&&f(b,e,{get:()=>a[e],enumerable:!(d=i(a,e))||d.enumerable});return b};var s=(b,a,c)=>(c=b!=null?h(k(b)):{},n(a||!b||!b.__esModule?f(c,"default",{value:b,enumerable:!0}):c,b));var t=(b,a,c)=>(m(b,typeof a!="symbol"?a+"":a,c),c),g=(b,a,c)=>{if(!a.has(b))throw TypeError("Cannot "+c)};var u=(b,a,c)=>(g(b,a,"read from private field"),c?c.call(b):a.get(b)),v=(b,a,c)=>{if(a.has(b))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(b):a.set(b,c)},w=(b,a,c,d)=>(g(b,a,"write to private field"),d?d.call(b,c):a.set(b,c),c);var x=(b,a,c)=>(g(b,a,"access private method"),c);export{o as a,p as b,q as c,r as d,s as e,t as f,u as g,v as h,w as i,x as j};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as $r,i as Hi,j as Zi}from"./chunk-RGA6MUTU.js";import{a as $i}from"./chunk-7H7HYUVU.js";import{Aa as Vi,E as or,Fa as Ui,L as Hr,M as B,P as Ae,Q as Zr,R as ae,S as fe,U as Gi,X as Ni,c as Oi,d as Ai,e as Pi,g as It,ha as ji,ma as Bi,na as zi,pa as ar,q as Ri,r as Li,xa as Fi,z as Ur}from"./chunk-CBBFEVN4.js";import{a as p,b as _}from"./chunk-S7CLJZMO.js";import{a,c as Ea,e as Ia,f as u,g as P,h as $,i as N}from"./chunk-J5IUISYU.js";var Fo=Ea((Ht,gt)=>{p();var Bs=200,xo="__lodash_hash_undefined__",zs=800,Fs=16,_o=9007199254740991,To="[object Arguments]",Vs="[object Array]",Us="[object AsyncFunction]",Hs="[object Boolean]",Zs="[object Date]",$s="[object Error]",So="[object Function]",Ws="[object GeneratorFunction]",Ys="[object Map]",qs="[object Number]",Ks="[object Null]",Mo="[object Object]",Xs="[object Proxy]",Js="[object RegExp]",Qs="[object Set]",el="[object String]",tl="[object Undefined]",rl="[object WeakMap]",nl="[object ArrayBuffer]",il="[object DataView]",ol="[object Float32Array]",al="[object Float64Array]",sl="[object Int8Array]",ll="[object Int16Array]",ul="[object Int32Array]",cl="[object Uint8Array]",dl="[object Uint8ClampedArray]",fl="[object Uint16Array]",pl="[object Uint32Array]",hl=/[\\^$.*+?()[\]{}|]/g,ml=/^\[object .+?Constructor\]$/,gl=/^(?:0|[1-9]\d*)$/,R={};R[ol]=R[al]=R[sl]=R[ll]=R[ul]=R[cl]=R[dl]=R[fl]=R[pl]=!0;R[To]=R[Vs]=R[nl]=R[Hs]=R[il]=R[Zs]=R[$s]=R[So]=R[Ys]=R[qs]=R[Mo]=R[Js]=R[Qs]=R[el]=R[rl]=!1;var wo=typeof global=="object"&&global&&global.Object===Object&&global,yl=typeof self=="object"&&self&&self.Object===Object&&self,Wt=wo||yl||Function("return this")(),ko=typeof Ht=="object"&&Ht&&!Ht.nodeType&&Ht,Zt=ko&&typeof gt=="object"&>&&!gt.nodeType&>,Co=Zt&&Zt.exports===ko,Dn=Co&&wo.process,co=function(){try{var r=Zt&&Zt.require&&Zt.require("util").types;return r||Dn&&Dn.binding&&Dn.binding("util")}catch{}}(),fo=co&&co.isTypedArray;function Do(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}a(Do,"apply");function bl(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}a(bl,"baseTimes");function vl(r){return function(e){return r(e)}}a(vl,"baseUnary");function xl(r,e){return r==null?void 0:r[e]}a(xl,"getValue");function _l(r,e){return function(t){return r(e(t))}}a(_l,"overArg");var Tl=Array.prototype,Sl=Function.prototype,Tr=Object.prototype,En=Wt["__core-js_shared__"],Sr=Sl.toString,be=Tr.hasOwnProperty,po=function(){var r=/[^.]+$/.exec(En&&En.keys&&En.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Eo=Tr.toString,Ml=Sr.call(Object),wl=RegExp("^"+Sr.call(be).replace(hl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xr=Co?Wt.Buffer:void 0,ho=Wt.Symbol,mo=Wt.Uint8Array,go=xr?xr.allocUnsafe:void 0,Io=_l(Object.getPrototypeOf,Object),yo=Object.create,kl=Tr.propertyIsEnumerable,Cl=Tl.splice,Je=ho?ho.toStringTag:void 0,_r=function(){try{var r=Gn(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Dl=xr?xr.isBuffer:void 0,bo=Math.max,El=Date.now,Oo=Gn(Wt,"Map"),$t=Gn(Object,"create"),Il=function(){function r(){}return a(r,"object"),function(e){if(!ye(e))return{};if(yo)return yo(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();function Qe(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}a(Qe,"Hash");function Ol(){this.__data__=$t?$t(null):{},this.size=0}a(Ol,"hashClear");function Al(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}a(Al,"hashDelete");function Pl(r){var e=this.__data__;if($t){var t=e[r];return t===xo?void 0:t}return be.call(e,r)?e[r]:void 0}a(Pl,"hashGet");function Rl(r){var e=this.__data__;return $t?e[r]!==void 0:be.call(e,r)}a(Rl,"hashHas");function Ll(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=$t&&e===void 0?xo:e,this}a(Ll,"hashSet");Qe.prototype.clear=Ol;Qe.prototype.delete=Al;Qe.prototype.get=Pl;Qe.prototype.has=Rl;Qe.prototype.set=Ll;function ve(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}a(ve,"ListCache");function Gl(){this.__data__=[],this.size=0}a(Gl,"listCacheClear");function Nl(r){var e=this.__data__,t=Mr(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():Cl.call(e,t,1),--this.size,!0}a(Nl,"listCacheDelete");function jl(r){var e=this.__data__,t=Mr(e,r);return t<0?void 0:e[t][1]}a(jl,"listCacheGet");function Bl(r){return Mr(this.__data__,r)>-1}a(Bl,"listCacheHas");function zl(r,e){var t=this.__data__,n=Mr(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}a(zl,"listCacheSet");ve.prototype.clear=Gl;ve.prototype.delete=Nl;ve.prototype.get=jl;ve.prototype.has=Bl;ve.prototype.set=zl;function yt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}a(yt,"MapCache");function Fl(){this.size=0,this.__data__={hash:new Qe,map:new(Oo||ve),string:new Qe}}a(Fl,"mapCacheClear");function Vl(r){var e=kr(this,r).delete(r);return this.size-=e?1:0,e}a(Vl,"mapCacheDelete");function Ul(r){return kr(this,r).get(r)}a(Ul,"mapCacheGet");function Hl(r){return kr(this,r).has(r)}a(Hl,"mapCacheHas");function Zl(r,e){var t=kr(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}a(Zl,"mapCacheSet");yt.prototype.clear=Fl;yt.prototype.delete=Vl;yt.prototype.get=Ul;yt.prototype.has=Hl;yt.prototype.set=Zl;function bt(r){var e=this.__data__=new ve(r);this.size=e.size}a(bt,"Stack");function $l(){this.__data__=new ve,this.size=0}a($l,"stackClear");function Wl(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}a(Wl,"stackDelete");function Yl(r){return this.__data__.get(r)}a(Yl,"stackGet");function ql(r){return this.__data__.has(r)}a(ql,"stackHas");function Kl(r,e){var t=this.__data__;if(t instanceof ve){var n=t.__data__;if(!Oo||n.length<Bs-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new yt(n)}return t.set(r,e),this.size=t.size,this}a(Kl,"stackSet");bt.prototype.clear=$l;bt.prototype.delete=Wl;bt.prototype.get=Yl;bt.prototype.has=ql;bt.prototype.set=Kl;function Xl(r,e){var t=Pn(r),n=!t&&An(r),i=!t&&!n&&Go(r),o=!t&&!n&&!i&&jo(r),s=t||n||i||o,l=s?bl(r.length,String):[],c=l.length;for(var d in r)(e||be.call(r,d))&&!(s&&(d=="length"||i&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Ro(d,c)))&&l.push(d);return l}a(Xl,"arrayLikeKeys");function In(r,e,t){(t!==void 0&&!Cr(r[e],t)||t===void 0&&!(e in r))&&Rn(r,e,t)}a(In,"assignMergeValue");function Jl(r,e,t){var n=r[e];(!(be.call(r,e)&&Cr(n,t))||t===void 0&&!(e in r))&&Rn(r,e,t)}a(Jl,"assignValue");function Mr(r,e){for(var t=r.length;t--;)if(Cr(r[t][0],e))return t;return-1}a(Mr,"assocIndexOf");function Rn(r,e,t){e=="__proto__"&&_r?_r(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}a(Rn,"baseAssignValue");var Ql=du();function wr(r){return r==null?r===void 0?tl:Ks:Je&&Je in Object(r)?fu(r):bu(r)}a(wr,"baseGetTag");function vo(r){return Yt(r)&&wr(r)==To}a(vo,"baseIsArguments");function eu(r){if(!ye(r)||gu(r))return!1;var e=jn(r)?wl:ml;return e.test(Tu(r))}a(eu,"baseIsNative");function tu(r){return Yt(r)&&No(r.length)&&!!R[wr(r)]}a(tu,"baseIsTypedArray");function ru(r){if(!ye(r))return yu(r);var e=Lo(r),t=[];for(var n in r)n=="constructor"&&(e||!be.call(r,n))||t.push(n);return t}a(ru,"baseKeysIn");function Ln(r,e,t,n,i){r!==e&&Ql(e,function(o,s){if(i||(i=new bt),ye(o))nu(r,e,s,t,Ln,n,i);else{var l=n?n(On(r,s),o,s+"",r,e,i):void 0;l===void 0&&(l=o),In(r,s,l)}},Bo)}a(Ln,"baseMerge");function nu(r,e,t,n,i,o,s){var l=On(r,t),c=On(e,t),d=s.get(c);if(d){In(r,t,d);return}var f=o?o(l,c,t+"",r,e,s):void 0,m=f===void 0;if(m){var E=Pn(c),w=!E&&Go(c),A=!E&&!w&&jo(c);f=c,E||w||A?Pn(l)?f=l:Su(l)?f=lu(l):w?(m=!1,f=ou(c,!0)):A?(m=!1,f=su(c,!0)):f=[]:Mu(c)||An(c)?(f=l,An(l)?f=wu(l):(!ye(l)||jn(l))&&(f=pu(c))):m=!1}m&&(s.set(c,f),i(f,c,n,o,s),s.delete(c)),In(r,t,f)}a(nu,"baseMergeDeep");function Ao(r,e){return xu(vu(r,e,zo),r+"")}a(Ao,"baseRest");var iu=_r?function(r,e){return _r(r,"toString",{configurable:!0,enumerable:!1,value:Du(e),writable:!0})}:zo;function ou(r,e){if(e)return r.slice();var t=r.length,n=go?go(t):new r.constructor(t);return r.copy(n),n}a(ou,"cloneBuffer");function au(r){var e=new r.constructor(r.byteLength);return new mo(e).set(new mo(r)),e}a(au,"cloneArrayBuffer");function su(r,e){var t=e?au(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}a(su,"cloneTypedArray");function lu(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}a(lu,"copyArray");function uu(r,e,t,n){var i=!t;t||(t={});for(var o=-1,s=e.length;++o<s;){var l=e[o],c=n?n(t[l],r[l],l,t,r):void 0;c===void 0&&(c=r[l]),i?Rn(t,l,c):Jl(t,l,c)}return t}a(uu,"copyObject");function cu(r){return Ao(function(e,t){var n=-1,i=t.length,o=i>1?t[i-1]:void 0,s=i>2?t[2]:void 0;for(o=r.length>3&&typeof o=="function"?(i--,o):void 0,s&&hu(t[0],t[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var l=t[n];l&&r(e,l,n,o)}return e})}a(cu,"createAssigner");function du(r){return function(e,t,n){for(var i=-1,o=Object(e),s=n(e),l=s.length;l--;){var c=s[r?l:++i];if(t(o[c],c,o)===!1)break}return e}}a(du,"createBaseFor");function Po(r,e,t,n,i,o){return ye(r)&&ye(e)&&(o.set(e,r),Ln(r,e,void 0,Po,o),o.delete(e)),r}a(Po,"customDefaultsMerge");function kr(r,e){var t=r.__data__;return mu(e)?t[typeof e=="string"?"string":"hash"]:t.map}a(kr,"getMapData");function Gn(r,e){var t=xl(r,e);return eu(t)?t:void 0}a(Gn,"getNative");function fu(r){var e=be.call(r,Je),t=r[Je];try{r[Je]=void 0;var n=!0}catch{}var i=Eo.call(r);return n&&(e?r[Je]=t:delete r[Je]),i}a(fu,"getRawTag");function pu(r){return typeof r.constructor=="function"&&!Lo(r)?Il(Io(r)):{}}a(pu,"initCloneObject");function Ro(r,e){var t=typeof r;return e=e==null?_o:e,!!e&&(t=="number"||t!="symbol"&&gl.test(r))&&r>-1&&r%1==0&&r<e}a(Ro,"isIndex");function hu(r,e,t){if(!ye(t))return!1;var n=typeof e;return(n=="number"?Nn(t)&&Ro(e,t.length):n=="string"&&e in t)?Cr(t[e],r):!1}a(hu,"isIterateeCall");function mu(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}a(mu,"isKeyable");function gu(r){return!!po&&po in r}a(gu,"isMasked");function Lo(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Tr;return r===t}a(Lo,"isPrototype");function yu(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}a(yu,"nativeKeysIn");function bu(r){return Eo.call(r)}a(bu,"objectToString");function vu(r,e,t){return e=bo(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,o=bo(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=n[i];return l[e]=t(s),Do(r,this,l)}}a(vu,"overRest");function On(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}a(On,"safeGet");var xu=_u(iu);function _u(r){var e=0,t=0;return function(){var n=El(),i=Fs-(n-t);if(t=n,i>0){if(++e>=zs)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}a(_u,"shortOut");function Tu(r){if(r!=null){try{return Sr.call(r)}catch{}try{return r+""}catch{}}return""}a(Tu,"toSource");function Cr(r,e){return r===e||r!==r&&e!==e}a(Cr,"eq");var An=vo(function(){return arguments}())?vo:function(r){return Yt(r)&&be.call(r,"callee")&&!kl.call(r,"callee")},Pn=Array.isArray;function Nn(r){return r!=null&&No(r.length)&&!jn(r)}a(Nn,"isArrayLike");function Su(r){return Yt(r)&&Nn(r)}a(Su,"isArrayLikeObject");var Go=Dl||Eu;function jn(r){if(!ye(r))return!1;var e=wr(r);return e==So||e==Ws||e==Us||e==Xs}a(jn,"isFunction");function No(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=_o}a(No,"isLength");function ye(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}a(ye,"isObject");function Yt(r){return r!=null&&typeof r=="object"}a(Yt,"isObjectLike");function Mu(r){if(!Yt(r)||wr(r)!=Mo)return!1;var e=Io(r);if(e===null)return!0;var t=be.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Sr.call(t)==Ml}a(Mu,"isPlainObject");var jo=fo?vl(fo):tu;function wu(r){return uu(r,Bo(r))}a(wu,"toPlainObject");var ku=Ao(function(r){return r.push(void 0,Po),Do(Cu,void 0,r)});function Bo(r){return Nn(r)?Xl(r,!0):ru(r)}a(Bo,"keysIn");var Cu=cu(function(r,e,t,n){Ln(r,e,t,n)});function Du(r){return function(){return r}}a(Du,"constant");function zo(r){return r}a(zo,"identity");function Eu(){return!1}a(Eu,"stubFalse");gt.exports=ku});p();function Uc(r,e,t=!1){let n=null,i=0;return function(...o){i++,i===1&&t===!0&&r(...o);let s=a(()=>{(!t||i>1)&&r(...o),n=null,i=0},"later");clearTimeout(n),n=setTimeout(s,e)}}a(Uc,"debounce");p();p();var sr="[MappedinJS]",Oa=(i=>(i[i.LOG=0]="LOG",i[i.WARN=1]="WARN",i[i.ERROR=2]="ERROR",i[i.SILENT=3]="SILENT",i))(Oa||{});function Wc(r){0<=r&&r<=3&&(Wi.logState=r)}a(Wc,"setLoggerLevel");var Wi={logState:_.env.NODE_ENV==="test"?3:0,log(...r){this.logState<=0&&console.log(sr,...r)},warn(...r){this.logState<=1&&console.warn(sr,...r)},error(...r){this.logState<=2&&console.error(sr,...r)},assert(...r){console.assert(...r)},time(r){console.time(r)},timeEnd(r){console.timeEnd(r)},throw(r,e){throw new Error("".concat(sr," ").concat(r),e)}},pe=Wi;p();p();var Wr=class Wr extends Error{};a(Wr,"InvalidTokenError");var Pe=Wr;Pe.prototype.name="InvalidTokenError";function Aa(r){return decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}a(Aa,"b64DecodeUnicode");function Pa(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Aa(e)}catch{return atob(e)}}a(Pa,"base64UrlDecode");function Yi(r,e){if(typeof r!="string")throw new Pe("Invalid token specified: must be a string");e||(e={});let t=e.header===!0?0:1,n=r.split(".")[t];if(typeof n!="string")throw new Pe("Invalid token specified: missing part #".concat(t+1));let i;try{i=Pa(n)}catch(o){throw new Pe("Invalid token specified: invalid base64 for part #".concat(t+1," (").concat(o.message,")"))}try{return JSON.parse(i)}catch(o){throw new Pe("Invalid token specified: invalid json for part #".concat(t+1," (").concat(o.message,")"))}}a(Yi,"jwtDecode");p();var Re=63710088e-1;function id(r){var t,n;let e=Yi(r);if(e.sub==null)throw new Error("Access token is missing sub claim.");return{sub:e.sub,aud:typeof e.aud=="string"?[e.aud]:(t=e.aud)!=null?t:[],capabilities:(n=e.capabilities)!=null?n:{}}}a(id,"decodeAccessToken");function Te(r){return r*(Math.PI/180)}a(Te,"toRadians");function Ra(r){return r*(180/Math.PI)}a(Ra,"toDegrees");function qi(r,e){return(r%e+e)%e}a(qi,"euclideanModulo");function od([r,e],[t,n]){let i=Te(n-e),o=Te(t-r),s=Te(e),l=Te(n),c=Math.sin(i/2)*Math.sin(i/2)+Math.sin(o/2)*Math.sin(o/2)*Math.cos(s)*Math.cos(l),d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return Re*d}a(od,"haversineDistance");function ad([r,e],[t,n]){let i=Te(e),o=Te(r),s=Te(n),c=Te(t)-o,d=Math.sin(c)*Math.cos(s),f=Math.cos(i)*Math.sin(s)-Math.sin(i)*Math.cos(s)*Math.cos(c);return Ra((Math.atan2(d,f)+Math.PI*2)%(Math.PI*2))}a(ad,"getForwardBearing");function sd(r,e){let t=qi(r,Math.PI*2),n=qi(e,Math.PI*2),i=n-t,o=n+(i>Math.PI?-Math.PI*2:i<-Math.PI?Math.PI*2:0);return{start:t,end:o}}a(sd,"shortestTweenRotation");function La(r){return Number.isFinite(r.min.x)&&Number.isFinite(r.min.y)&&Number.isFinite(r.max.x)&&Number.isFinite(r.max.y)&&Number.isFinite(r.min.z)&&Number.isFinite(r.max.z)}a(La,"isFiniteBox");p();function Ga(r){if(r==null)throw new Error("Expected value to be defined, but received ".concat(r))}a(Ga,"assertExists");function dd(r,e,t){if(Ga(r),(r==null?void 0:r.type)!==e){let n="Expected type ".concat(e," but got ").concat(r==null?void 0:r.type);throw new Error(t!=null?t:n)}}a(dd,"assertType");p();var Yr=class Yr{constructor(){u(this,"_subscribers",{})}publish(e,t){!this._subscribers||!this._subscribers[e]||this._subscribers[e].forEach(function(n){typeof n=="function"&&n(t)})}on(e,t){this._subscribers||(this._subscribers={}),this._subscribers[e]=this._subscribers[e]||[],this._subscribers[e].push(t)}off(e,t){if(!this._subscribers||this._subscribers[e]==null)return;let n=this._subscribers[e].indexOf(t);n!==-1&&this._subscribers[e].splice(n,1)}destroy(){this._subscribers={}}};a(Yr,"PubSub");var Ot=Yr;p();p();var qr=[0,4,6,8,10],F=a(()=>{let r=new Array(16).fill(0),e=Math.random()*4294967296;for(let n=0;n<r.length;n++)n>0&&!(n&3)&&(e=Math.random()*4294967296),r[n]=e>>>((n&3)<<3)&255;let t=r.map(n=>n.toString(16).padStart(2,"0"));return t[6]="4"+t[6][1],t[8]=["8","9","a","b"].includes(t[7][0])?t[7]:"a"+t[7][1],qr.map((n,i)=>t.slice(n,i===qr.length-1?void 0:qr[i+1]).join("")).join("-")},"randomId");var Ki="mi-session-data",Xi="mi-local-data",Le,ee,te,At=class At{constructor(){$(this,ee,void 0);$(this,te,void 0);try{let e=sessionStorage.getItem(Ki);e?N(this,ee,JSON.parse(e)):N(this,ee,{id:F()})}catch{N(this,ee,{id:F()})}try{let e=localStorage.getItem(Xi);e?N(this,te,JSON.parse(e)):N(this,te,{deviceId:F()})}catch{N(this,te,{deviceId:F()})}P(this,ee).id||(P(this,ee).id=F()),P(this,te).deviceId||(P(this,te).deviceId=F())}static getInstance(){return P(this,Le)||N(this,Le,new At),P(this,Le)}static ___clearInstance(){N(this,Le,void 0)}saveSessionData(e,t){P(this,ee)[e]=t;try{return sessionStorage.setItem(Ki,JSON.stringify(P(this,ee))),!0}catch{return!1}}loadSessionData(e){let t=P(this,ee)[e];if(t!=null)return t}saveLocalData(e,t){P(this,te)[e]=t;try{return localStorage.setItem(Xi,JSON.stringify(P(this,te))),!0}catch{return!1}}loadLocalData(e){let t=P(this,te)[e];if(t!=null)return t}};Le=new WeakMap,ee=new WeakMap,te=new WeakMap,a(At,"SafeStorage"),$(At,Le,void 0);var Kr=At;p();var I;(function(r){r.assertEqual=i=>i;function e(i){}a(e,"assertIs"),r.assertIs=e;function t(i){throw new Error}a(t,"assertNever"),r.assertNever=t,r.arrayToEnum=i=>{let o={};for(let s of i)o[s]=s;return o},r.getValidEnumValues=i=>{let o=r.objectKeys(i).filter(l=>typeof i[i[l]]!="number"),s={};for(let l of o)s[l]=i[l];return r.objectValues(s)},r.objectValues=i=>r.objectKeys(i).map(function(o){return i[o]}),r.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},r.find=(i,o)=>{for(let s of i)if(o(s))return s},r.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(s=>typeof s=="string"?"'".concat(s,"'"):s).join(o)}a(n,"joinValues"),r.joinValues=n,r.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(I||(I={}));var Jr;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Jr||(Jr={}));var b=I.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Se=a(r=>{switch(typeof r){case"undefined":return b.undefined;case"string":return b.string;case"number":return isNaN(r)?b.nan:b.number;case"boolean":return b.boolean;case"function":return b.function;case"bigint":return b.bigint;case"symbol":return b.symbol;case"object":return Array.isArray(r)?b.array:r===null?b.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?b.promise:typeof Map<"u"&&r instanceof Map?b.map:typeof Set<"u"&&r instanceof Set?b.set:typeof Date<"u"&&r instanceof Date?b.date:b.object;default:return b.unknown}},"getParsedType"),h=I.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Na=a(r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),hr=class hr extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(o){return o.message},n={_errors:[]},i=a(o=>{for(let s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(t(s));else{let l=n,c=0;for(;c<s.path.length;){let d=s.path[c];c===s.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(s))):l[d]=l[d]||{_errors:[]},l=l[d],c++}}},"processError");return i(this),n}static assert(e){if(!(e instanceof hr))throw new Error("Not a ZodError: ".concat(e))}toString(){return this.message}get message(){return JSON.stringify(this.issues,I.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},n=[];for(let i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};a(hr,"ZodError");var Y=hr;Y.create=r=>new Y(r);var ct=a((r,e)=>{let t;switch(r.code){case h.invalid_type:r.received===b.undefined?t="Required":t="Expected ".concat(r.expected,", received ").concat(r.received);break;case h.invalid_literal:t="Invalid literal value, expected ".concat(JSON.stringify(r.expected,I.jsonStringifyReplacer));break;case h.unrecognized_keys:t="Unrecognized key(s) in object: ".concat(I.joinValues(r.keys,", "));break;case h.invalid_union:t="Invalid input";break;case h.invalid_union_discriminator:t="Invalid discriminator value. Expected ".concat(I.joinValues(r.options));break;case h.invalid_enum_value:t="Invalid enum value. Expected ".concat(I.joinValues(r.options),", received '").concat(r.received,"'");break;case h.invalid_arguments:t="Invalid function arguments";break;case h.invalid_return_type:t="Invalid function return type";break;case h.invalid_date:t="Invalid date";break;case h.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t='Invalid input: must include "'.concat(r.validation.includes,'"'),typeof r.validation.position=="number"&&(t="".concat(t," at one or more positions greater than or equal to ").concat(r.validation.position))):"startsWith"in r.validation?t='Invalid input: must start with "'.concat(r.validation.startsWith,'"'):"endsWith"in r.validation?t='Invalid input: must end with "'.concat(r.validation.endsWith,'"'):I.assertNever(r.validation):r.validation!=="regex"?t="Invalid ".concat(r.validation):t="Invalid";break;case h.too_small:r.type==="array"?t="Array must contain ".concat(r.exact?"exactly":r.inclusive?"at least":"more than"," ").concat(r.minimum," element(s)"):r.type==="string"?t="String must contain ".concat(r.exact?"exactly":r.inclusive?"at least":"over"," ").concat(r.minimum," character(s)"):r.type==="number"?t="Number must be ".concat(r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than ").concat(r.minimum):r.type==="date"?t="Date must be ".concat(r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(r.minimum))):t="Invalid input";break;case h.too_big:r.type==="array"?t="Array must contain ".concat(r.exact?"exactly":r.inclusive?"at most":"less than"," ").concat(r.maximum," element(s)"):r.type==="string"?t="String must contain ".concat(r.exact?"exactly":r.inclusive?"at most":"under"," ").concat(r.maximum," character(s)"):r.type==="number"?t="Number must be ".concat(r.exact?"exactly":r.inclusive?"less than or equal to":"less than"," ").concat(r.maximum):r.type==="bigint"?t="BigInt must be ".concat(r.exact?"exactly":r.inclusive?"less than or equal to":"less than"," ").concat(r.maximum):r.type==="date"?t="Date must be ".concat(r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(r.maximum))):t="Invalid input";break;case h.custom:t="Invalid input";break;case h.invalid_intersection_types:t="Intersection results could not be merged";break;case h.not_multiple_of:t="Number must be a multiple of ".concat(r.multipleOf);break;case h.not_finite:t="Number must be finite";break;default:t=e.defaultError,I.assertNever(r)}return{message:t}},"errorMap"),eo=ct;function ja(r){eo=r}a(ja,"setErrorMap");function lr(){return eo}a(lr,"getErrorMap");var ur=a(r=>{let{data:e,path:t,errorMaps:n,issueData:i}=r,o=[...t,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let l="",c=n.filter(d=>!!d).slice().reverse();for(let d of c)l=d(s,{data:e,defaultError:l}).message;return{...i,path:o,message:l}},"makeIssue"),Ba=[];function y(r,e){let t=lr(),n=ur({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===ct?void 0:ct].filter(i=>!!i)});r.common.issues.push(n)}a(y,"addIssueToContext");var mr=class mr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let i of t){if(i.status==="aborted")return S;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let i of t){let o=await i.key,s=await i.value;n.push({key:o,value:s})}return mr.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let i of t){let{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return S;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[o.value]=s.value)}return{status:e.value,value:n}}};a(mr,"ParseStatus");var z=mr,S=Object.freeze({status:"aborted"}),st=a(r=>({status:"dirty",value:r}),"DIRTY"),V=a(r=>({status:"valid",value:r}),"OK"),Qr=a(r=>r.status==="aborted","isAborted"),en=a(r=>r.status==="dirty","isDirty"),zt=a(r=>r.status==="valid","isValid"),Ft=a(r=>typeof Promise<"u"&&r instanceof Promise,"isAsync");function cr(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)}a(cr,"__classPrivateFieldGet");function to(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t}a(to,"__classPrivateFieldSet");var x;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(x||(x={}));var Pt,Rt,rn=class rn{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};a(rn,"ParseInputLazyPath");var J=rn,Ji=a((r,e)=>{if(zt(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new Y(r.common.issues);return this._error=t,this._error}}},"handleResult");function k(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:n,description:i}=r;if(e&&(t||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return e?{errorMap:e,description:i}:{errorMap:a((s,l)=>{var c,d;let{message:f}=r;return s.code==="invalid_enum_value"?{message:f!=null?f:l.defaultError}:typeof l.data>"u"?{message:(c=f!=null?f:n)!==null&&c!==void 0?c:l.defaultError}:s.code!=="invalid_type"?{message:l.defaultError}:{message:(d=f!=null?f:t)!==null&&d!==void 0?d:l.defaultError}},"customMap"),description:i}}a(k,"processCreateParams");var nn=class nn{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Se(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Se(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new z,ctx:{common:e.parent.common,data:e.data,parsedType:Se(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Ft(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;let i={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Se(e)},o=this._parseSync({data:e,path:i.path,parent:i});return Ji(i,o)}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Se(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(Ft(i)?i:Promise.resolve(i));return Ji(n,o)}refine(e,t){let n=a(i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t,"getIssueProperties");return this._refinement((i,o)=>{let s=e(i),l=a(()=>o.addIssue({code:h.custom,...n(i)}),"setError");return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(l(),!1)):s?!0:(l(),!1)})}refinement(e,t){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof t=="function"?t(n,i):t),!1))}_refinement(e){return new q({schema:this,typeName:T.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return X.create(this,this._def)}nullable(){return le.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ge.create(this,this._def)}promise(){return ke.create(this,this._def)}or(e){return Ue.create([this,e],this._def)}and(e){return He.create(this,e,this._def)}transform(e){return new q({...k(this._def),schema:this,typeName:T.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new qe({...k(this._def),innerType:this,defaultValue:t,typeName:T.ZodDefault})}brand(){return new Vt({typeName:T.ZodBranded,type:this,...k(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new Ke({...k(this._def),innerType:this,catchValue:t,typeName:T.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Ut.create(this,e)}readonly(){return Xe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};a(nn,"ZodType");var C=nn,za=/^c[^\s-]{8,}$/i,Fa=/^[0-9a-z]+$/,Va=/^[0-9A-HJKMNP-TV-Z]{26}$/,Ua=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ha=/^[a-z0-9_-]{21}$/i,Za=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,$a=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Wa="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Xr,Ya=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qa=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Ka=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ro="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Xa=new RegExp("^".concat(ro,"$"));function no(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e="".concat(e,"\\.\\d{").concat(r.precision,"}"):r.precision==null&&(e="".concat(e,"(\\.\\d+)?")),e}a(no,"timeRegexSource");function Ja(r){return new RegExp("^".concat(no(r),"$"))}a(Ja,"timeRegex");function io(r){let e="".concat(ro,"T").concat(no(r)),t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e="".concat(e,"(").concat(t.join("|"),")"),new RegExp("^".concat(e,"$"))}a(io,"datetimeRegex");function Qa(r,e){return!!((e==="v4"||!e)&&Ya.test(r)||(e==="v6"||!e)&&qa.test(r))}a(Qa,"isValidIP");var Ge=class Ge extends C{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==b.string){let o=this._getOrReturnCtx(e);return y(o,{code:h.invalid_type,expected:b.string,received:o.parsedType}),S}let n=new z,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),y(i,{code:h.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),y(i,{code:h.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let s=e.data.length>o.value,l=e.data.length<o.value;(s||l)&&(i=this._getOrReturnCtx(e,i),s?y(i,{code:h.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):l&&y(i,{code:h.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")$a.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"email",code:h.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Xr||(Xr=new RegExp(Wa,"u")),Xr.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"emoji",code:h.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Ua.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"uuid",code:h.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Ha.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"nanoid",code:h.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")za.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"cuid",code:h.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Fa.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"cuid2",code:h.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Va.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"ulid",code:h.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),y(i,{validation:"url",code:h.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"regex",code:h.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),y(i,{code:h.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),y(i,{code:h.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),y(i,{code:h.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?io(o).test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{code:h.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?Xa.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{code:h.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Ja(o).test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{code:h.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Za.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"duration",code:h.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Qa(e.data,o.version)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"ip",code:h.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?Ka.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"base64",code:h.invalid_string,message:o.message}),n.dirty()):I.assertNever(o);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(i=>e.test(i),{validation:t,code:h.invalid_string,...x.errToObj(n)})}_addCheck(e){return new Ge({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...x.errToObj(e)})}url(e){return this._addCheck({kind:"url",...x.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...x.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...x.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...x.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...x.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...x.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...x.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...x.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...x.errToObj(e)})}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...x.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...x.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...x.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...x.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...x.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...x.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...x.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...x.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...x.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...x.errToObj(t)})}nonempty(e){return this.min(1,x.errToObj(e))}trim(){return new Ge({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ge({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ge({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};a(Ge,"ZodString");var Me=Ge;Me.create=r=>{var e;return new Me({checks:[],typeName:T.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...k(r)})};function es(r,e){let t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=t>n?t:n,o=parseInt(r.toFixed(i).replace(".","")),s=parseInt(e.toFixed(i).replace(".",""));return o%s/Math.pow(10,i)}a(es,"floatSafeRemainder");var Lt=class Lt extends C{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==b.number){let o=this._getOrReturnCtx(e);return y(o,{code:h.invalid_type,expected:b.number,received:o.parsedType}),S}let n,i=new z;for(let o of this._def.checks)o.kind==="int"?I.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:h.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),y(n,{code:h.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),y(n,{code:h.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?es(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),y(n,{code:h.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:h.not_finite,message:o.message}),i.dirty()):I.assertNever(o);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,x.toString(t))}gt(e,t){return this.setLimit("min",e,!1,x.toString(t))}lte(e,t){return this.setLimit("max",e,!0,x.toString(t))}lt(e,t){return this.setLimit("max",e,!1,x.toString(t))}setLimit(e,t,n,i){return new Lt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:x.toString(i)}]})}_addCheck(e){return new Lt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:x.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:x.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:x.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:x.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:x.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&I.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}};a(Lt,"ZodNumber");var Ne=Lt;Ne.create=r=>new Ne({checks:[],typeName:T.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...k(r)});var Gt=class Gt extends C{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==b.bigint){let o=this._getOrReturnCtx(e);return y(o,{code:h.invalid_type,expected:b.bigint,received:o.parsedType}),S}let n,i=new z;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),y(n,{code:h.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),y(n,{code:h.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),y(n,{code:h.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):I.assertNever(o);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,x.toString(t))}gt(e,t){return this.setLimit("min",e,!1,x.toString(t))}lte(e,t){return this.setLimit("max",e,!0,x.toString(t))}lt(e,t){return this.setLimit("max",e,!1,x.toString(t))}setLimit(e,t,n,i){return new Gt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:x.toString(i)}]})}_addCheck(e){return new Gt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:x.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};a(Gt,"ZodBigInt");var je=Gt;je.create=r=>{var e;return new je({checks:[],typeName:T.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...k(r)})};var on=class on extends C{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==b.boolean){let n=this._getOrReturnCtx(e);return y(n,{code:h.invalid_type,expected:b.boolean,received:n.parsedType}),S}return V(e.data)}};a(on,"ZodBoolean");var Be=on;Be.create=r=>new Be({typeName:T.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...k(r)});var gr=class gr extends C{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==b.date){let o=this._getOrReturnCtx(e);return y(o,{code:h.invalid_type,expected:b.date,received:o.parsedType}),S}if(isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return y(o,{code:h.invalid_date}),S}let n=new z,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),y(i,{code:h.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),y(i,{code:h.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):I.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new gr({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:x.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:x.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};a(gr,"ZodDate");var ze=gr;ze.create=r=>new ze({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:T.ZodDate,...k(r)});var an=class an extends C{_parse(e){if(this._getType(e)!==b.symbol){let n=this._getOrReturnCtx(e);return y(n,{code:h.invalid_type,expected:b.symbol,received:n.parsedType}),S}return V(e.data)}};a(an,"ZodSymbol");var dt=an;dt.create=r=>new dt({typeName:T.ZodSymbol,...k(r)});var sn=class sn extends C{_parse(e){if(this._getType(e)!==b.undefined){let n=this._getOrReturnCtx(e);return y(n,{code:h.invalid_type,expected:b.undefined,received:n.parsedType}),S}return V(e.data)}};a(sn,"ZodUndefined");var Fe=sn;Fe.create=r=>new Fe({typeName:T.ZodUndefined,...k(r)});var ln=class ln extends C{_parse(e){if(this._getType(e)!==b.null){let n=this._getOrReturnCtx(e);return y(n,{code:h.invalid_type,expected:b.null,received:n.parsedType}),S}return V(e.data)}};a(ln,"ZodNull");var Ve=ln;Ve.create=r=>new Ve({typeName:T.ZodNull,...k(r)});var un=class un extends C{constructor(){super(...arguments),this._any=!0}_parse(e){return V(e.data)}};a(un,"ZodAny");var we=un;we.create=r=>new we({typeName:T.ZodAny,...k(r)});var cn=class cn extends C{constructor(){super(...arguments),this._unknown=!0}_parse(e){return V(e.data)}};a(cn,"ZodUnknown");var me=cn;me.create=r=>new me({typeName:T.ZodUnknown,...k(r)});var dn=class dn extends C{_parse(e){let t=this._getOrReturnCtx(e);return y(t,{code:h.invalid_type,expected:b.never,received:t.parsedType}),S}};a(dn,"ZodNever");var re=dn;re.create=r=>new re({typeName:T.ZodNever,...k(r)});var fn=class fn extends C{_parse(e){if(this._getType(e)!==b.undefined){let n=this._getOrReturnCtx(e);return y(n,{code:h.invalid_type,expected:b.void,received:n.parsedType}),S}return V(e.data)}};a(fn,"ZodVoid");var ft=fn;ft.create=r=>new ft({typeName:T.ZodVoid,...k(r)});var lt=class lt extends C{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==b.array)return y(t,{code:h.invalid_type,expected:b.array,received:t.parsedType}),S;if(i.exactLength!==null){let s=t.data.length>i.exactLength.value,l=t.data.length<i.exactLength.value;(s||l)&&(y(t,{code:s?h.too_big:h.too_small,minimum:l?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&t.data.length<i.minLength.value&&(y(t,{code:h.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&t.data.length>i.maxLength.value&&(y(t,{code:h.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((s,l)=>i.type._parseAsync(new J(t,s,t.path,l)))).then(s=>z.mergeArray(n,s));let o=[...t.data].map((s,l)=>i.type._parseSync(new J(t,s,t.path,l)));return z.mergeArray(n,o)}get element(){return this._def.type}min(e,t){return new lt({...this._def,minLength:{value:e,message:x.toString(t)}})}max(e,t){return new lt({...this._def,maxLength:{value:e,message:x.toString(t)}})}length(e,t){return new lt({...this._def,exactLength:{value:e,message:x.toString(t)}})}nonempty(e){return this.min(1,e)}};a(lt,"ZodArray");var ge=lt;ge.create=(r,e)=>new ge({type:r,minLength:null,maxLength:null,exactLength:null,typeName:T.ZodArray,...k(e)});function at(r){if(r instanceof H){let e={};for(let t in r.shape){let n=r.shape[t];e[t]=X.create(at(n))}return new H({...r._def,shape:()=>e})}else return r instanceof ge?new ge({...r._def,type:at(r.element)}):r instanceof X?X.create(at(r.unwrap())):r instanceof le?le.create(at(r.unwrap())):r instanceof se?se.create(r.items.map(e=>at(e))):r}a(at,"deepPartialify");var W=class W extends C{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=I.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==b.object){let d=this._getOrReturnCtx(e);return y(d,{code:h.invalid_type,expected:b.object,received:d.parsedType}),S}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),l=[];if(!(this._def.catchall instanceof re&&this._def.unknownKeys==="strip"))for(let d in i.data)s.includes(d)||l.push(d);let c=[];for(let d of s){let f=o[d],m=i.data[d];c.push({key:{status:"valid",value:d},value:f._parse(new J(i,m,i.path,d)),alwaysSet:d in i.data})}if(this._def.catchall instanceof re){let d=this._def.unknownKeys;if(d==="passthrough")for(let f of l)c.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(d==="strict")l.length>0&&(y(i,{code:h.unrecognized_keys,keys:l}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let f of l){let m=i.data[f];c.push({key:{status:"valid",value:f},value:d._parse(new J(i,m,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let d=[];for(let f of c){let m=await f.key,E=await f.value;d.push({key:m,value:E,alwaysSet:f.alwaysSet})}return d}).then(d=>z.mergeObjectSync(n,d)):z.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return x.errToObj,new W({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var i,o,s,l;let c=(s=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,t,n).message)!==null&&s!==void 0?s:n.defaultError;return t.code==="unrecognized_keys"?{message:(l=x.errToObj(e).message)!==null&&l!==void 0?l:c}:{message:c}}}:{}})}strip(){return new W({...this._def,unknownKeys:"strip"})}passthrough(){return new W({...this._def,unknownKeys:"passthrough"})}extend(e){return new W({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new W({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:T.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new W({...this._def,catchall:e})}pick(e){let t={};return I.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new W({...this._def,shape:()=>t})}omit(e){let t={};return I.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new W({...this._def,shape:()=>t})}deepPartial(){return at(this)}partial(e){let t={};return I.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}),new W({...this._def,shape:()=>t})}required(e){let t={};return I.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof X;)o=o._def.innerType;t[n]=o}}),new W({...this._def,shape:()=>t})}keyof(){return oo(I.objectKeys(this.shape))}};a(W,"ZodObject");var H=W;H.create=(r,e)=>new H({shape:()=>r,unknownKeys:"strip",catchall:re.create(),typeName:T.ZodObject,...k(e)});H.strictCreate=(r,e)=>new H({shape:()=>r,unknownKeys:"strict",catchall:re.create(),typeName:T.ZodObject,...k(e)});H.lazycreate=(r,e)=>new H({shape:r,unknownKeys:"strip",catchall:re.create(),typeName:T.ZodObject,...k(e)});var pn=class pn extends C{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function i(o){for(let l of o)if(l.result.status==="valid")return l.result;for(let l of o)if(l.result.status==="dirty")return t.common.issues.push(...l.ctx.common.issues),l.result;let s=o.map(l=>new Y(l.ctx.common.issues));return y(t,{code:h.invalid_union,unionErrors:s}),S}if(a(i,"handleResults"),t.common.async)return Promise.all(n.map(async o=>{let s={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(i);{let o,s=[];for(let c of n){let d={...t,common:{...t.common,issues:[]},parent:null},f=c._parseSync({data:t.data,path:t.path,parent:d});if(f.status==="valid")return f;f.status==="dirty"&&!o&&(o={result:f,ctx:d}),d.common.issues.length&&s.push(d.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;let l=s.map(c=>new Y(c));return y(t,{code:h.invalid_union,unionErrors:l}),S}}get options(){return this._def.options}};a(pn,"ZodUnion");var Ue=pn;Ue.create=(r,e)=>new Ue({options:r,typeName:T.ZodUnion,...k(e)});var he=a(r=>r instanceof Ze?he(r.schema):r instanceof q?he(r.innerType()):r instanceof $e?[r.value]:r instanceof We?r.options:r instanceof Ye?I.objectValues(r.enum):r instanceof qe?he(r._def.innerType):r instanceof Fe?[void 0]:r instanceof Ve?[null]:r instanceof X?[void 0,...he(r.unwrap())]:r instanceof le?[null,...he(r.unwrap())]:r instanceof Vt||r instanceof Xe?he(r.unwrap()):r instanceof Ke?he(r._def.innerType):[],"getDiscriminator"),yr=class yr extends C{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==b.object)return y(t,{code:h.invalid_type,expected:b.object,received:t.parsedType}),S;let n=this.discriminator,i=t.data[n],o=this.optionsMap.get(i);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._parseSync({data:t.data,path:t.path,parent:t}):(y(t,{code:h.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),S)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let i=new Map;for(let o of t){let s=he(o.shape[e]);if(!s.length)throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));for(let l of s){if(i.has(l))throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(l)));i.set(l,o)}}return new yr({typeName:T.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...k(n)})}};a(yr,"ZodDiscriminatedUnion");var dr=yr;function tn(r,e){let t=Se(r),n=Se(e);if(r===e)return{valid:!0,data:r};if(t===b.object&&n===b.object){let i=I.objectKeys(e),o=I.objectKeys(r).filter(l=>i.indexOf(l)!==-1),s={...r,...e};for(let l of o){let c=tn(r[l],e[l]);if(!c.valid)return{valid:!1};s[l]=c.data}return{valid:!0,data:s}}else if(t===b.array&&n===b.array){if(r.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<r.length;o++){let s=r[o],l=e[o],c=tn(s,l);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return t===b.date&&n===b.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}a(tn,"mergeValues");var hn=class hn extends C{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),i=a((o,s)=>{if(Qr(o)||Qr(s))return S;let l=tn(o.value,s.value);return l.valid?((en(o)||en(s))&&t.dirty(),{status:t.value,value:l.data}):(y(n,{code:h.invalid_intersection_types}),S)},"handleParsed");return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};a(hn,"ZodIntersection");var He=hn;He.create=(r,e,t)=>new He({left:r,right:e,typeName:T.ZodIntersection,...k(t)});var br=class br extends C{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==b.array)return y(n,{code:h.invalid_type,expected:b.array,received:n.parsedType}),S;if(n.data.length<this._def.items.length)return y(n,{code:h.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),S;!this._def.rest&&n.data.length>this._def.items.length&&(y(n,{code:h.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let o=[...n.data].map((s,l)=>{let c=this._def.items[l]||this._def.rest;return c?c._parse(new J(n,s,n.path,l)):null}).filter(s=>!!s);return n.common.async?Promise.all(o).then(s=>z.mergeArray(t,s)):z.mergeArray(t,o)}get items(){return this._def.items}rest(e){return new br({...this._def,rest:e})}};a(br,"ZodTuple");var se=br;se.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new se({items:r,typeName:T.ZodTuple,rest:null,...k(e)})};var Nt=class Nt extends C{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==b.object)return y(n,{code:h.invalid_type,expected:b.object,received:n.parsedType}),S;let i=[],o=this._def.keyType,s=this._def.valueType;for(let l in n.data)i.push({key:o._parse(new J(n,l,n.path,l)),value:s._parse(new J(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?z.mergeObjectAsync(t,i):z.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof C?new Nt({keyType:e,valueType:t,typeName:T.ZodRecord,...k(n)}):new Nt({keyType:Me.create(),valueType:e,typeName:T.ZodRecord,...k(t)})}};a(Nt,"ZodRecord");var fr=Nt,mn=class mn extends C{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==b.map)return y(n,{code:h.invalid_type,expected:b.map,received:n.parsedType}),S;let i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([l,c],d)=>({key:i._parse(new J(n,l,n.path,[d,"key"])),value:o._parse(new J(n,c,n.path,[d,"value"]))}));if(n.common.async){let l=new Map;return Promise.resolve().then(async()=>{for(let c of s){let d=await c.key,f=await c.value;if(d.status==="aborted"||f.status==="aborted")return S;(d.status==="dirty"||f.status==="dirty")&&t.dirty(),l.set(d.value,f.value)}return{status:t.value,value:l}})}else{let l=new Map;for(let c of s){let d=c.key,f=c.value;if(d.status==="aborted"||f.status==="aborted")return S;(d.status==="dirty"||f.status==="dirty")&&t.dirty(),l.set(d.value,f.value)}return{status:t.value,value:l}}}};a(mn,"ZodMap");var pt=mn;pt.create=(r,e,t)=>new pt({valueType:e,keyType:r,typeName:T.ZodMap,...k(t)});var jt=class jt extends C{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==b.set)return y(n,{code:h.invalid_type,expected:b.set,received:n.parsedType}),S;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(y(n,{code:h.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(y(n,{code:h.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());let o=this._def.valueType;function s(c){let d=new Set;for(let f of c){if(f.status==="aborted")return S;f.status==="dirty"&&t.dirty(),d.add(f.value)}return{status:t.value,value:d}}a(s,"finalizeSet");let l=[...n.data.values()].map((c,d)=>o._parse(new J(n,c,n.path,d)));return n.common.async?Promise.all(l).then(c=>s(c)):s(l)}min(e,t){return new jt({...this._def,minSize:{value:e,message:x.toString(t)}})}max(e,t){return new jt({...this._def,maxSize:{value:e,message:x.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};a(jt,"ZodSet");var ht=jt;ht.create=(r,e)=>new ht({valueType:r,minSize:null,maxSize:null,typeName:T.ZodSet,...k(e)});var ut=class ut extends C{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==b.function)return y(t,{code:h.invalid_type,expected:b.function,received:t.parsedType}),S;function n(l,c){return ur({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,lr(),ct].filter(d=>!!d),issueData:{code:h.invalid_arguments,argumentsError:c}})}a(n,"makeArgsIssue");function i(l,c){return ur({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,lr(),ct].filter(d=>!!d),issueData:{code:h.invalid_return_type,returnTypeError:c}})}a(i,"makeReturnsIssue");let o={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof ke){let l=this;return V(async function(...c){let d=new Y([]),f=await l._def.args.parseAsync(c,o).catch(w=>{throw d.addIssue(n(c,w)),d}),m=await Reflect.apply(s,this,f);return await l._def.returns._def.type.parseAsync(m,o).catch(w=>{throw d.addIssue(i(m,w)),d})})}else{let l=this;return V(function(...c){let d=l._def.args.safeParse(c,o);if(!d.success)throw new Y([n(c,d.error)]);let f=Reflect.apply(s,this,d.data),m=l._def.returns.safeParse(f,o);if(!m.success)throw new Y([i(f,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ut({...this._def,args:se.create(e).rest(me.create())})}returns(e){return new ut({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new ut({args:e||se.create([]).rest(me.create()),returns:t||me.create(),typeName:T.ZodFunction,...k(n)})}};a(ut,"ZodFunction");var pr=ut,gn=class gn extends C{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};a(gn,"ZodLazy");var Ze=gn;Ze.create=(r,e)=>new Ze({getter:r,typeName:T.ZodLazy,...k(e)});var yn=class yn extends C{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return y(t,{received:t.data,code:h.invalid_literal,expected:this._def.value}),S}return{status:"valid",value:e.data}}get value(){return this._def.value}};a(yn,"ZodLiteral");var $e=yn;$e.create=(r,e)=>new $e({value:r,typeName:T.ZodLiteral,...k(e)});function oo(r,e){return new We({values:r,typeName:T.ZodEnum,...k(e)})}a(oo,"createZodEnum");var Bt=class Bt extends C{constructor(){super(...arguments),Pt.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),n=this._def.values;return y(t,{expected:I.joinValues(n),received:t.parsedType,code:h.invalid_type}),S}if(cr(this,Pt,"f")||to(this,Pt,new Set(this._def.values),"f"),!cr(this,Pt,"f").has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return y(t,{received:t.data,code:h.invalid_enum_value,options:n}),S}return V(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Bt.create(e,{...this._def,...t})}exclude(e,t=this._def){return Bt.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}};a(Bt,"ZodEnum");var We=Bt;Pt=new WeakMap;We.create=oo;var bn=class bn extends C{constructor(){super(...arguments),Rt.set(this,void 0)}_parse(e){let t=I.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==b.string&&n.parsedType!==b.number){let i=I.objectValues(t);return y(n,{expected:I.joinValues(i),received:n.parsedType,code:h.invalid_type}),S}if(cr(this,Rt,"f")||to(this,Rt,new Set(I.getValidEnumValues(this._def.values)),"f"),!cr(this,Rt,"f").has(e.data)){let i=I.objectValues(t);return y(n,{received:n.data,code:h.invalid_enum_value,options:i}),S}return V(e.data)}get enum(){return this._def.values}};a(bn,"ZodNativeEnum");var Ye=bn;Rt=new WeakMap;Ye.create=(r,e)=>new Ye({values:r,typeName:T.ZodNativeEnum,...k(e)});var vn=class vn extends C{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==b.promise&&t.common.async===!1)return y(t,{code:h.invalid_type,expected:b.promise,received:t.parsedType}),S;let n=t.parsedType===b.promise?t.data:Promise.resolve(t.data);return V(n.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}};a(vn,"ZodPromise");var ke=vn;ke.create=(r,e)=>new ke({type:r,typeName:T.ZodPromise,...k(e)});var xn=class xn extends C{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===T.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s=>{y(n,s),s.fatal?t.abort():t.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let s=i.transform(n.data,o);if(n.common.async)return Promise.resolve(s).then(async l=>{if(t.value==="aborted")return S;let c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?S:c.status==="dirty"||t.value==="dirty"?st(c.value):c});{if(t.value==="aborted")return S;let l=this._def.schema._parseSync({data:s,path:n.path,parent:n});return l.status==="aborted"?S:l.status==="dirty"||t.value==="dirty"?st(l.value):l}}if(i.type==="refinement"){let s=a(l=>{let c=i.refinement(l,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l},"executeRefinement");if(n.common.async===!1){let l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?S:(l.status==="dirty"&&t.dirty(),s(l.value),{status:t.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?S:(l.status==="dirty"&&t.dirty(),s(l.value).then(()=>({status:t.value,value:l.value}))))}if(i.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!zt(s))return s;let l=i.transform(s.value,o);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>zt(s)?Promise.resolve(i.transform(s.value,o)).then(l=>({status:t.value,value:l})):s);I.assertNever(i)}};a(xn,"ZodEffects");var q=xn;q.create=(r,e,t)=>new q({schema:r,typeName:T.ZodEffects,effect:e,...k(t)});q.createWithPreprocess=(r,e,t)=>new q({schema:e,effect:{type:"preprocess",transform:r},typeName:T.ZodEffects,...k(t)});var _n=class _n extends C{_parse(e){return this._getType(e)===b.undefined?V(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};a(_n,"ZodOptional");var X=_n;X.create=(r,e)=>new X({innerType:r,typeName:T.ZodOptional,...k(e)});var Tn=class Tn extends C{_parse(e){return this._getType(e)===b.null?V(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};a(Tn,"ZodNullable");var le=Tn;le.create=(r,e)=>new le({innerType:r,typeName:T.ZodNullable,...k(e)});var Sn=class Sn extends C{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===b.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};a(Sn,"ZodDefault");var qe=Sn;qe.create=(r,e)=>new qe({innerType:r,typeName:T.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...k(e)});var Mn=class Mn extends C{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ft(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Y(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Y(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};a(Mn,"ZodCatch");var Ke=Mn;Ke.create=(r,e)=>new Ke({innerType:r,typeName:T.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...k(e)});var wn=class wn extends C{_parse(e){if(this._getType(e)!==b.nan){let n=this._getOrReturnCtx(e);return y(n,{code:h.invalid_type,expected:b.nan,received:n.parsedType}),S}return{status:"valid",value:e.data}}};a(wn,"ZodNaN");var mt=wn;mt.create=r=>new mt({typeName:T.ZodNaN,...k(r)});var ts=Symbol("zod_brand"),kn=class kn extends C{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}};a(kn,"ZodBranded");var Vt=kn,vr=class vr extends C{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return a(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?S:o.status==="dirty"?(t.dirty(),st(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})},"handleAsync")();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?S:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,t){return new vr({in:e,out:t,typeName:T.ZodPipeline})}};a(vr,"ZodPipeline");var Ut=vr,Cn=class Cn extends C{_parse(e){let t=this._def.innerType._parse(e),n=a(i=>(zt(i)&&(i.value=Object.freeze(i.value)),i),"freeze");return Ft(t)?t.then(i=>n(i)):n(t)}unwrap(){return this._def.innerType}};a(Cn,"ZodReadonly");var Xe=Cn;Xe.create=(r,e)=>new Xe({innerType:r,typeName:T.ZodReadonly,...k(e)});function ao(r,e={},t){return r?we.create().superRefine((n,i)=>{var o,s;if(!r(n)){let l=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,c=(s=(o=l.fatal)!==null&&o!==void 0?o:t)!==null&&s!==void 0?s:!0,d=typeof l=="string"?{message:l}:l;i.addIssue({code:"custom",...d,fatal:c})}}):we.create()}a(ao,"custom");var rs={object:H.lazycreate},T;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(T||(T={}));var ns=a((r,e={message:"Input not instance of ".concat(r.name)})=>ao(t=>t instanceof r,e),"instanceOfType"),so=Me.create,lo=Ne.create,is=mt.create,os=je.create,uo=Be.create,as=ze.create,ss=dt.create,ls=Fe.create,us=Ve.create,cs=we.create,ds=me.create,fs=re.create,ps=ft.create,hs=ge.create,ms=H.create,gs=H.strictCreate,ys=Ue.create,bs=dr.create,vs=He.create,xs=se.create,_s=fr.create,Ts=pt.create,Ss=ht.create,Ms=pr.create,ws=Ze.create,ks=$e.create,Cs=We.create,Ds=Ye.create,Es=ke.create,Qi=q.create,Is=X.create,Os=le.create,As=q.createWithPreprocess,Ps=Ut.create,Rs=a(()=>so().optional(),"ostring"),Ls=a(()=>lo().optional(),"onumber"),Gs=a(()=>uo().optional(),"oboolean"),Ns={string:r=>Me.create({...r,coerce:!0}),number:r=>Ne.create({...r,coerce:!0}),boolean:r=>Be.create({...r,coerce:!0}),bigint:r=>je.create({...r,coerce:!0}),date:r=>ze.create({...r,coerce:!0})},js=S,g=Object.freeze({__proto__:null,defaultErrorMap:ct,setErrorMap:ja,getErrorMap:lr,makeIssue:ur,EMPTY_PATH:Ba,addIssueToContext:y,ParseStatus:z,INVALID:S,DIRTY:st,OK:V,isAborted:Qr,isDirty:en,isValid:zt,isAsync:Ft,get util(){return I},get objectUtil(){return Jr},ZodParsedType:b,getParsedType:Se,ZodType:C,datetimeRegex:io,ZodString:Me,ZodNumber:Ne,ZodBigInt:je,ZodBoolean:Be,ZodDate:ze,ZodSymbol:dt,ZodUndefined:Fe,ZodNull:Ve,ZodAny:we,ZodUnknown:me,ZodNever:re,ZodVoid:ft,ZodArray:ge,ZodObject:H,ZodUnion:Ue,ZodDiscriminatedUnion:dr,ZodIntersection:He,ZodTuple:se,ZodRecord:fr,ZodMap:pt,ZodSet:ht,ZodFunction:pr,ZodLazy:Ze,ZodLiteral:$e,ZodEnum:We,ZodNativeEnum:Ye,ZodPromise:ke,ZodEffects:q,ZodTransformer:q,ZodOptional:X,ZodNullable:le,ZodDefault:qe,ZodCatch:Ke,ZodNaN:mt,BRAND:ts,ZodBranded:Vt,ZodPipeline:Ut,ZodReadonly:Xe,custom:ao,Schema:C,ZodSchema:C,late:rs,get ZodFirstPartyTypeKind(){return T},coerce:Ns,any:cs,array:hs,bigint:os,boolean:uo,date:as,discriminatedUnion:bs,effect:Qi,enum:Cs,function:Ms,instanceof:ns,intersection:vs,lazy:ws,literal:ks,map:Ts,nan:is,nativeEnum:Ds,never:fs,null:us,nullable:Os,number:lo,object:ms,oboolean:Gs,onumber:Ls,optional:Is,ostring:Rs,pipeline:Ps,preprocess:As,promise:Es,record:_s,set:Ss,strictObject:gs,string:so,symbol:ss,transformer:Qi,tuple:xs,undefined:ls,union:ys,unknown:ds,void:ps,NEVER:js,ZodIssueCode:h,quotelessJson:Na,ZodError:Y});p();function Dr(r){return(r%(2*Math.PI)+2*Math.PI)%(2*Math.PI)}a(Dr,"normalizeAngle");p();p();var Bn=class Bn extends ae{};a(Bn,"Geometry2DObject3D");var et=Bn,zn=class zn{constructor(e,t,n=0){u(this,"id");u(this,"verticalOffset");u(this,"positionDirty",!0);u(this,"occluderId");u(this,"object3d",new et);u(this,"components");u(this,"disposed",!1);u(this,"worldPosition",new B);this.id=e.id||F(),this.components=[e],this.verticalOffset=n,this.object3d=new et,this.object3d.position.set(t.x,t.y,t.z+n),this.object3d.userData.entityId=this.id,this.object3d.userData.type=this.type}get type(){return this.components[0].type}get parentObject3D(){return this.object3d.parent}get position(){return this.object3d.getWorldPosition(this.worldPosition),this.worldPosition}setAltitude(e){this.object3d.position.z=e}};a(zn,"Geometry2D");var xe=zn;p();p();p();p();p();p();p();var U=63710088e-1,Uo={centimeters:U*100,centimetres:U*100,degrees:U/111325,feet:U*3.28084,inches:U*39.37,kilometers:U/1e3,kilometres:U/1e3,meters:U,metres:U,miles:U/1609.344,millimeters:U*1e3,millimetres:U*1e3,nauticalmiles:U/1852,radians:1,yards:U*1.0936},$d={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/U,yards:1.0936133};function Ce(r,e,t){t===void 0&&(t={});var n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=e||{},n.geometry=r,n}a(Ce,"feature");function Iu(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Vo(r[0])||!Vo(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return Ce(n,e,t)}a(Iu,"point");function Wd(r,e,t){t===void 0&&(t={});for(var n=0,i=r;n<i.length;n++){var o=i[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:r};return Ce(l,e,t)}a(Wd,"polygon");function Ho(r,e,t){if(t===void 0&&(t={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:r};return Ce(n,e,t)}a(Ho,"lineString");function Yd(r,e){e===void 0&&(e={});var t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=r,t}a(Yd,"featureCollection");function qd(r,e,t){t===void 0&&(t={});var n={type:"MultiLineString",coordinates:r};return Ce(n,e,t)}a(qd,"multiLineString");function Kd(r,e,t){t===void 0&&(t={});var n={type:"MultiPolygon",coordinates:r};return Ce(n,e,t)}a(Kd,"multiPolygon");function Xd(r,e){e===void 0&&(e="kilometers");var t=Uo[e];if(!t)throw new Error(e+" units is invalid");return r*t}a(Xd,"radiansToLength");function Jd(r,e){e===void 0&&(e="kilometers");var t=Uo[e];if(!t)throw new Error(e+" units is invalid");return r/t}a(Jd,"lengthToRadians");function Qd(r){var e=r%(2*Math.PI);return e*180/Math.PI}a(Qd,"radiansToDegrees");function ef(r){var e=r%360;return e*Math.PI/180}a(ef,"degreesToRadians");function Vo(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}a(Vo,"isNumber");function Er(r,e,t){if(r!==null)for(var n,i,o,s,l,c,d,f=0,m=0,E,w=r.type,A=w==="FeatureCollection",M=w==="Feature",O=A?r.features.length:1,G=0;G<O;G++){d=A?r.features[G].geometry:M?r.geometry:r,E=d?d.type==="GeometryCollection":!1,l=E?d.geometries.length:1;for(var j=0;j<l;j++){var D=0,Z=0;if(s=E?d.geometries[j]:d,s!==null){c=s.coordinates;var oe=s.type;switch(f=t&&(oe==="Polygon"||oe==="MultiPolygon")?1:0,oe){case null:break;case"Point":if(e(c,m,G,D,Z)===!1)return!1;m++,D++;break;case"LineString":case"MultiPoint":for(n=0;n<c.length;n++){if(e(c[n],m,G,D,Z)===!1)return!1;m++,oe==="MultiPoint"&&D++}oe==="LineString"&&D++;break;case"Polygon":case"MultiLineString":for(n=0;n<c.length;n++){for(i=0;i<c[n].length-f;i++){if(e(c[n][i],m,G,D,Z)===!1)return!1;m++}oe==="MultiLineString"&&D++,oe==="Polygon"&&Z++}oe==="Polygon"&&D++;break;case"MultiPolygon":for(n=0;n<c.length;n++){for(Z=0,i=0;i<c[n].length;i++){for(o=0;o<c[n][i].length-f;o++){if(e(c[n][i][o],m,G,D,Z)===!1)return!1;m++}Z++}D++}break;case"GeometryCollection":for(n=0;n<s.geometries.length;n++)if(Er(s.geometries[n],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}a(Er,"coordEach");function sf(r,e){if(r.type==="Feature")e(r,0);else if(r.type==="FeatureCollection")for(var t=0;t<r.features.length&&e(r.features[t],t)!==!1;t++);}a(sf,"featureEach");function Ou(r,e){var t,n,i,o,s,l,c,d,f,m,E=0,w=r.type==="FeatureCollection",A=r.type==="Feature",M=w?r.features.length:1;for(t=0;t<M;t++){for(l=w?r.features[t].geometry:A?r.geometry:r,d=w?r.features[t].properties:A?r.properties:{},f=w?r.features[t].bbox:A?r.bbox:void 0,m=w?r.features[t].id:A?r.id:void 0,c=l?l.type==="GeometryCollection":!1,s=c?l.geometries.length:1,i=0;i<s;i++){if(o=c?l.geometries[i]:l,o===null){if(e(null,E,d,f,m)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(o,E,d,f,m)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<o.geometries.length;n++)if(e(o.geometries[n],E,d,f,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}E++}}a(Ou,"geomEach");function Au(r,e){Ou(r,function(t,n,i,o,s){var l=t===null?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return e(Ce(t,i,{bbox:o,id:s}),n,0)===!1?!1:void 0}var c;switch(l){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}for(var d=0;d<t.coordinates.length;d++){var f=t.coordinates[d],m={type:c,coordinates:f};if(e(Ce(m,i),n,d)===!1)return!1}})}a(Au,"flattenEach");function Pu(r,e){Au(r,function(t,n,i){var o=0;if(t.geometry){var s=t.geometry.type;if(!(s==="Point"||s==="MultiPoint")){var l,c=0,d=0,f=0;if(Er(t,function(m,E,w,A,M){if(l===void 0||n>c||A>d||M>f){l=m,c=n,d=A,f=M,o=0;return}var O=Ho([l,m],t.properties);if(e(O,n,i,M,o)===!1)return!1;o++,l=m})===!1)return!1}}})}a(Pu,"segmentEach");function lf(r,e,t){var n=t,i=!1;return Pu(r,function(o,s,l,c,d){i===!1&&t===void 0?n=o:n=e(n,o,s,l,c,d),i=!0}),n}a(lf,"segmentReduce");function Fn(r){var e=[1/0,1/0,-1/0,-1/0];return Er(r,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}a(Fn,"bbox");Fn.default=Fn;var Zo=Fn;function $o(r){return Zo(r)}a($o,"getBoundingBoxFromFeature");p();var Vn="#ffffff";var Hn=class Hn{constructor(e={}){u(this,"initialColor",Vn);u(this,"color",Vn);u(this,"initialTopColor");u(this,"topColor");u(this,"topTexture");u(this,"texture");u(this,"hoverColor");u(this,"dirty",!0);u(this,"visible",!0);u(this,"opacity",1);u(this,"width",.1);u(this,"height",.1);u(this,"initialHeight",.1);u(this,"altitude",0);u(this,"join","round");u(this,"cap","round");u(this,"outline",!0);u(this,"showImage",!0);u(this,"flipImageToFaceCamera",!0);u(this,"url");u(this,"side","double");u(this,"renderOrder",0);this.color=(e==null?void 0:e.color)!==void 0?e.color:this.color,this.initialColor=this.color,this.width=(e==null?void 0:e.width)!==void 0?e.width:this.width,this.opacity=(e==null?void 0:e.opacity)!==void 0?e.opacity:this.opacity,this.visible=(e==null?void 0:e.visible)!==void 0?e.visible:this.visible,this.height=(e==null?void 0:e.height)!==void 0?e.height:this.height,this.initialHeight=this.height,this.altitude=(e==null?void 0:e.altitude)!==void 0?e.altitude:this.altitude,this.join=(e==null?void 0:e.join)!==void 0?e.join:this.join,this.cap=(e==null?void 0:e.cap)!==void 0?e.cap:this.cap,this.topColor=e==null?void 0:e.topColor,this.initialTopColor=this.topColor,this.texture=e==null?void 0:e.texture,this.topTexture=e==null?void 0:e.topTexture,this.outline=(e==null?void 0:e.outline)!==void 0?!!e.outline:this.outline,this.showImage=(e==null?void 0:e.showImage)!==void 0?e.showImage:this.showImage,this.flipImageToFaceCamera=(e==null?void 0:e.flipImageToFaceCamera)!==void 0?e.flipImageToFaceCamera:this.flipImageToFaceCamera,this.url=e==null?void 0:e.url,this.side=(e==null?void 0:e.side)!==void 0?e.side:this.side,this.renderOrder=(e==null?void 0:e.renderOrder)!==void 0?e.renderOrder:this.renderOrder}};a(Hn,"StyleComponent");var Un=Hn;var Zn=class Zn extends Bi{constructor(){super(...arguments);u(this,"type","entityBatchedMesh");u(this,"userData",{entities:{}})}};a(Zn,"EntityBatchedMesh");var De=Zn,qt,Kt,tt,$n=class $n{constructor(e){u(this,"mesh");u(this,"focusMesh");u(this,"outline");u(this,"imageMesh");u(this,"textMesh");u(this,"textEntityId");u(this,"type","geometry");u(this,"dirty",!0);u(this,"detached",!1);u(this,"instanceIndex",-1);u(this,"geometry");u(this,"material");u(this,"feature");u(this,"currentHeight",.1);u(this,"focusable",!1);u(this,"color",new fe);u(this,"topColor",new fe);u(this,"position",new B);$(this,qt,0);$(this,Kt,1);$(this,tt,void 0);u(this,"texturesVisible",!1);this.feature=e}get visible(){return this.mesh&&this.instanceIndex!==-1?this.mesh.getVisibleAt(this.instanceIndex):!1}set visible(e){this.mesh&&this.instanceIndex!==-1&&this.mesh.setVisibleAt(this.instanceIndex,e)}get renderOrder(){return this.mesh?this.mesh.renderOrder:0}set renderOrder(e){this.mesh&&(this.mesh.renderOrder=e)}setColor(e,t){this.color.set(e),this.topColor.set(t),this.material&&this.material.setColor(this.instanceIndex,this.color,this.topColor)}getColor(){var e;return(e=this.material)==null?void 0:e.getColor(this.instanceIndex)}get altitude(){return P(this,qt)}set altitude(e){this.mesh&&(this.mesh.position.z=e,N(this,qt,e))}get opacity(){return P(this,Kt)}set opacity(e){if(this.material&&(this.material.opacity=e,this.material.transparent=e<1,this.material.needsUpdate=!0),this.imageMesh){let t=Array.isArray(this.imageMesh.material)?this.imageMesh.material:[this.imageMesh.material];for(let n of t)n.opacity=e,n.needsUpdate=!0}N(this,Kt,e)}get texture(){var e,t;return(t=(e=this.material)==null?void 0:e.texture)==null?void 0:t.image.src}set texture(e){this.material&&(this.material.texture=e)}get textureInstance(){var e;return(e=this.material)==null?void 0:e.texture}set topTexture(e){this.material&&(this.material.topTexture=e)}get topTexture(){var e,t;return(t=(e=this.material)==null?void 0:e.topTexture)==null?void 0:t.image.src}get topTextureInstance(){var e;return(e=this.material)==null?void 0:e.topTexture}get featureBbox(){return P(this,tt)?P(this,tt):(N(this,tt,$o(this.feature)),P(this,tt))}showTextures(){this.material&&(this.material.showTextures(this.instanceIndex),this.texturesVisible=!0)}hideTextures(){this.material&&(this.material.hideTextures(this.instanceIndex),this.texturesVisible=!1)}removeSideTexture(){this.material&&this.material.removeSideTexture(this.instanceIndex)}removeTopTexture(){this.material&&this.material.removeTopTexture(this.instanceIndex)}};qt=new WeakMap,Kt=new WeakMap,tt=new WeakMap,a($n,"MeshComponent");var ue=$n;p();var Wo="#ffffff",Ee,Wn=class Wn{constructor(e={}){u(this,"color",Wo);u(this,"initialColor",Wo);u(this,"topColor");u(this,"initialTopColor");u(this,"opacity",1);u(this,"height");$(this,Ee,void 0);u(this,"outline",!0);u(this,"texture");u(this,"topTexture");u(this,"dirty",!0);var t,n;this.color=(t=e==null?void 0:e.color)!=null?t:this.color,this.initialColor=this.color,this.topColor=e==null?void 0:e.topColor,this.initialTopColor=this.topColor,this.opacity=(n=e==null?void 0:e.opacity)!=null?n:this.opacity,this.height=e==null?void 0:e.height,this.shading=e==null?void 0:e.shading,this.outline=(e==null?void 0:e.outline)!==void 0?!!e.outline:this.outline}get shading(){return P(this,Ee)}set shading(e){var t;if(!e){N(this,Ee,void 0);return}N(this,Ee,(t=P(this,Ee))!=null?t:{start:0,end:0,intensity:0}),Object.assign(P(this,Ee),e)}};Ee=new WeakMap,a(Wn,"GeometryGroupStyleComponent");var Ir=Wn;p();p();function vt(r){var t;let e=(t=r.parent)==null?void 0:t.children.find(n=>n.userData.outlineOfEntityId===r.userData.entityId);return e instanceof ar?e:void 0}a(vt,"findOutline");p();p();p();p();var Yn=class Yn{constructor(){u(this,"hover",!1);u(this,"dirty",!1)}};a(Yn,"InteractionComponent");var xt=Yn;p();p();var Yo=["","","low","medium","high","always-visible"];function qo(r){return Math.min(5,Math.max(2,r))}a(qo,"clampTierNumber");function _t(r){if(typeof r=="number")return qo(r);let e=Yo.indexOf(r);return e===-1?3:e}a(_t,"convertCollisionRankingTierToNumber");function Ff(r){let e=qo(r);return Yo[e]}a(Ff,"convertNumberToCollisionRankingTier");var Or=4,qn=g.object({rank:g.union([g.enum(["low","medium","high","always-visible"]),g.number()]).optional(),interactive:g.union([g.boolean(),g.literal("pointer-events-auto")]).optional(),id:g.string().optional(),anchor:g.union([g.enum(["top","bottom","left","right","center","top-left","top-right","bottom-left","bottom-right"]),g.array(g.enum(["top","bottom","left","right","center","top-left","top-right","bottom-left","bottom-right"]))]).optional(),dynamicResize:g.boolean().optional(),zIndex:g.number().optional()});function Kf(r,e,t){g.array(g.number()).min(2).max(3).parse(r),g.string().parse(e),qn.parse(t)}a(Kf,"validateMarker");var rt=class rt{constructor(e,t={}){u(this,"id");u(this,"type","marker");u(this,"rank",0);u(this,"initialRank",0);u(this,"activeAnchor","center");u(this,"pointerEvents","none");u(this,"options",{rank:"low",interactive:!1,id:"",anchor:"center",dynamicResize:!1,occluderId:0,zIndex:void 0,verticalOffset:0});u(this,"projection",new or);u(this,"enabled",!0);u(this,"canShow",!1);u(this,"visible",!0);u(this,"isOccluded",!1);u(this,"offscreen",!1);u(this,"strategyIndex",-1);u(this,"activeBoundingBox",{x:0,y:0,w:0,h:0});u(this,"dimensions",{width:0,height:0});u(this,"containerEl");u(this,"contentEl",null);u(this,"contentHtml","");u(this,"style",{top:"0px",left:"0px"});u(this,"dirty",!1);u(this,"parentDirty",!0);u(this,"collisionDirty",!0);u(this,"visibilityNeedsUpdate","show");u(this,"animation",null);u(this,"currentStrategyIndex",-1);u(this,"onStrategySelected",a((e,t=!1)=>{if(this.currentStrategyIndex===e||t)return;this.currentStrategyIndex=e,this.activeAnchor=this.strategies[e].name,this.containerEl.getAttribute("data-anchor")!==this.activeAnchor&&this.containerEl.setAttribute("data-anchor",this.activeAnchor);let{width:n,height:i}=this.dimensions,o=-i/2+"px",s=-n/2+"px";switch(this.style.top=o,this.style.left=s,this.activeAnchor){case"top":{this.style.top=-i+"px";break}case"bottom":{this.style.top="0px";break}case"left":{this.style.left=-n+"px";break}case"right":{this.style.left="0px";break}case"top-left":{this.style.top=-i+"px",this.style.left=-n+"px";break}case"top-right":{this.style.top=-i+"px",this.style.left="0px";break}case"bottom-left":{this.style.top="0px",this.style.left=-n+"px";break}case"bottom-right":{this.style.top="0px",this.style.left="0px";break}default:this.style.top=o,this.style.left=s}this.containerEl.style.top=this.style.top,this.containerEl.style.left=this.style.left},"onStrategySelected"));u(this,"packedMessage",{x:0,y:0,enabled:!1,rank:0,bboxes:[],lockedToStrategyIndex:-1,shouldCollideWithScreenEdges:!1});if(this.id=(t==null?void 0:t.id)||F(),this.options={...this.options,...t},typeof t.rank=="string")this.rank=_t(t.rank);else if(t.rank!=null&&t.rank>0)this.rank=t.rank;else{let i=Math.trunc(_.env.NODE_ENV==="test"?rt.testId:rt.testId*10)/10;rt.testId+=.001,this.rank=i}typeof t.interactive=="string"&&(this.pointerEvents=t.interactive==="pointer-events-auto"?"auto":"none"),this.contentHtml=e,this.initialRank=this.rank;let n=document.createElement("div");n.style.opacity="0",n.innerHTML='<div class="mappedin-marker">'.concat(this.contentHtml,"</div>"),this.containerEl=n.querySelector(".mappedin-marker"),this.containerEl.setAttribute("data-marker-id",this.id.toString()),this.contentEl=this.containerEl?this.containerEl.firstElementChild:null}updateDimensions(e,t){if(e!=null&&t!=null)this.dimensions={width:e,height:t};else{let{width:n,height:i}=this.containerEl.getBoundingClientRect();this.dimensions={width:n,height:i}}Object.assign(this.containerEl,{width:this.dimensions.width+"px",height:this.dimensions.height+"px"}),this.currentStrategyIndex=-1}get strategies(){let{width:e,height:t}=this.dimensions;return(Array.isArray(this.options.anchor)?this.options.anchor:[this.options.anchor]).map(i=>({name:i,getBoundingBox:()=>{let o=t/2,s=t/2,l=e/2,c=e/2;switch(i){case"top":{o=t,s=0;break}case"bottom":{o=0,s=t;break}case"left":{l=e,c=0;break}case"right":{l=0,c=e;break}case"top-left":{o=t,l=e,s=0,c=0;break}case"top-right":{o=t,c=e,s=0,l=0;break}case"bottom-left":{s=t,l=e,o=0,c=0;break}case"bottom-right":{s=t,c=e,o=0,l=0;break}}return[o+Or,s+Or,l+Or,c+Or]}}))}toPackedMessage(e=!1){return this.packedMessage.x=this.projection.x,this.packedMessage.y=this.projection.y,this.packedMessage.enabled=this.enabled,this.packedMessage.rank=this.rank,this.packedMessage.shouldCollideWithScreenEdges=!0,this.visible&&e&&this.currentStrategyIndex!==-1?this.packedMessage.lockedToStrategyIndex=this.currentStrategyIndex:this.packedMessage.lockedToStrategyIndex=-1,this.collisionDirty?(this.packedMessage.bboxes=this.strategies.map((t,n)=>[...t.getBoundingBox(),n]),this.collisionDirty=!1,this.packedMessage):this.packedMessage}destroy(){}};a(rt,"MarkerComponent"),u(rt,"testId",0);var Ko=rt;p();var Xt=class Xt extends ae{constructor(t){super();u(this,"childrenIds",new Set);u(this,"children",[]);u(this,"type","group-container");u(this,"userData",{entityId:"",entities2D:new Set,dirty:!0,occluderDirty:!1});u(this,"components",[]);this.userData.entityId=t}addOccluderFeature(t,n){this.userData.occluderFeature=t,this.userData.occluderId=n,this.userData.occluderDirty=!0}addEntity(t){t instanceof Xt?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof xe?(this.childrenIds.add(t.id),this.add(t.object3d),this.userData.entities2D.add(t.id)):t instanceof de?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof ce&&t.object3d&&(this.childrenIds.add(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childadded",child:this})}removeEntity(t){t instanceof Xt?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof xe?(this.childrenIds.delete(t.id),this.userData.entities2D.delete(t.id),this.remove(t.object3d)):t instanceof de?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof ce&&t.object3d&&(this.childrenIds.delete(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childremoved",child:this})}setVisible(t){this.visible!==t&&(this.visible=t,this.dispatchEvent({type:"childremoved",child:this}))}setAltitude(t){this.position.z!==t&&(this.position.z=t,this.dispatchEvent({type:"childremoved",child:this}))}get altitude(){return this.position.z}};a(Xt,"GroupContainerObject3D");var Ie=Xt;p();p();function Ar(r){"@babel/helpers - typeof";return Ar=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ar(r)}a(Ar,"_typeof");var Lu=/^\s+/,Gu=/\s+$/;function v(r,e){if(r=r||"",e=e||{},r instanceof v)return r;if(!(this instanceof v))return new v(r,e);var t=Nu(r);this._originalInput=r,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}a(v,"tinycolor");v.prototype={isDark:a(function(){return this.getBrightness()<128},"isDark"),isLight:a(function(){return!this.isDark()},"isLight"),isValid:a(function(){return this._ok},"isValid"),getOriginalInput:a(function(){return this._originalInput},"getOriginalInput"),getFormat:a(function(){return this._format},"getFormat"),getAlpha:a(function(){return this._a},"getAlpha"),getBrightness:a(function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},"getBrightness"),getLuminance:a(function(){var e=this.toRgb(),t,n,i,o,s,l;return t=e.r/255,n=e.g/255,i=e.b/255,t<=.03928?o=t/12.92:o=Math.pow((t+.055)/1.055,2.4),n<=.03928?s=n/12.92:s=Math.pow((n+.055)/1.055,2.4),i<=.03928?l=i/12.92:l=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*s+.0722*l},"getLuminance"),setAlpha:a(function(e){return this._a=na(e),this._roundA=Math.round(100*this._a)/100,this},"setAlpha"),toHsv:a(function(){var e=Jo(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},"toHsv"),toHsvString:a(function(){var e=Jo(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+n+"%, "+i+"%)":"hsva("+t+", "+n+"%, "+i+"%, "+this._roundA+")"},"toHsvString"),toHsl:a(function(){var e=Xo(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},"toHsl"),toHslString:a(function(){var e=Xo(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+n+"%, "+i+"%)":"hsla("+t+", "+n+"%, "+i+"%, "+this._roundA+")"},"toHslString"),toHex:a(function(e){return Qo(this._r,this._g,this._b,e)},"toHex"),toHexString:a(function(e){return"#"+this.toHex(e)},"toHexString"),toHex8:a(function(e){return Fu(this._r,this._g,this._b,this._a,e)},"toHex8"),toHex8String:a(function(e){return"#"+this.toHex8(e)},"toHex8String"),toRgb:a(function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},"toRgb"),toRgbString:a(function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},"toRgbString"),toPercentageRgb:a(function(){return{r:Math.round(L(this._r,255)*100)+"%",g:Math.round(L(this._g,255)*100)+"%",b:Math.round(L(this._b,255)*100)+"%",a:this._a}},"toPercentageRgb"),toPercentageRgbString:a(function(){return this._a==1?"rgb("+Math.round(L(this._r,255)*100)+"%, "+Math.round(L(this._g,255)*100)+"%, "+Math.round(L(this._b,255)*100)+"%)":"rgba("+Math.round(L(this._r,255)*100)+"%, "+Math.round(L(this._g,255)*100)+"%, "+Math.round(L(this._b,255)*100)+"%, "+this._roundA+")"},"toPercentageRgbString"),toName:a(function(){return this._a===0?"transparent":this._a<1?!1:Qu[Qo(this._r,this._g,this._b,!0)]||!1},"toName"),toFilter:a(function(e){var t="#"+ea(this._r,this._g,this._b,this._a),n=t,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=v(e);n="#"+ea(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+t+",endColorstr="+n+")"},"toFilter"),toString:a(function(e){var t=!!e;e=e||this._format;var n=!1,i=this._a<1&&this._a>=0,o=!t&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},"toString"),clone:a(function(){return v(this.toString())},"clone"),_applyModification:a(function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},"_applyModification"),lighten:a(function(){return this._applyModification(Zu,arguments)},"lighten"),brighten:a(function(){return this._applyModification($u,arguments)},"brighten"),darken:a(function(){return this._applyModification(Wu,arguments)},"darken"),desaturate:a(function(){return this._applyModification(Vu,arguments)},"desaturate"),saturate:a(function(){return this._applyModification(Uu,arguments)},"saturate"),greyscale:a(function(){return this._applyModification(Hu,arguments)},"greyscale"),spin:a(function(){return this._applyModification(Yu,arguments)},"spin"),_applyCombination:a(function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},"_applyCombination"),analogous:a(function(){return this._applyCombination(Xu,arguments)},"analogous"),complement:a(function(){return this._applyCombination(qu,arguments)},"complement"),monochromatic:a(function(){return this._applyCombination(Ju,arguments)},"monochromatic"),splitcomplement:a(function(){return this._applyCombination(Ku,arguments)},"splitcomplement"),triad:a(function(){return this._applyCombination(ta,[3])},"triad"),tetrad:a(function(){return this._applyCombination(ta,[4])},"tetrad")};v.fromRatio=function(r,e){if(Ar(r)=="object"){var t={};for(var n in r)r.hasOwnProperty(n)&&(n==="a"?t[n]=r[n]:t[n]=Jt(r[n]));r=t}return v(r,e)};function Nu(r){var e={r:0,g:0,b:0},t=1,n=null,i=null,o=null,s=!1,l=!1;return typeof r=="string"&&(r=nc(r)),Ar(r)=="object"&&(_e(r.r)&&_e(r.g)&&_e(r.b)?(e=ju(r.r,r.g,r.b),s=!0,l=String(r.r).substr(-1)==="%"?"prgb":"rgb"):_e(r.h)&&_e(r.s)&&_e(r.v)?(n=Jt(r.s),i=Jt(r.v),e=zu(r.h,n,i),s=!0,l="hsv"):_e(r.h)&&_e(r.s)&&_e(r.l)&&(n=Jt(r.s),o=Jt(r.l),e=Bu(r.h,n,o),s=!0,l="hsl"),r.hasOwnProperty("a")&&(t=r.a)),t=na(t),{ok:s,format:r.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}a(Nu,"inputToRGB");function ju(r,e,t){return{r:L(r,255)*255,g:L(e,255)*255,b:L(t,255)*255}}a(ju,"rgbToRgb");function Xo(r,e,t){r=L(r,255),e=L(e,255),t=L(t,255);var n=Math.max(r,e,t),i=Math.min(r,e,t),o,s,l=(n+i)/2;if(n==i)o=s=0;else{var c=n-i;switch(s=l>.5?c/(2-n-i):c/(n+i),n){case r:o=(e-t)/c+(e<t?6:0);break;case e:o=(t-r)/c+2;break;case t:o=(r-e)/c+4;break}o/=6}return{h:o,s,l}}a(Xo,"rgbToHsl");function Bu(r,e,t){var n,i,o;r=L(r,360),e=L(e,100),t=L(t,100);function s(d,f,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?d+(f-d)*6*m:m<1/2?f:m<2/3?d+(f-d)*(2/3-m)*6:d}if(a(s,"hue2rgb"),e===0)n=i=o=t;else{var l=t<.5?t*(1+e):t+e-t*e,c=2*t-l;n=s(c,l,r+1/3),i=s(c,l,r),o=s(c,l,r-1/3)}return{r:n*255,g:i*255,b:o*255}}a(Bu,"hslToRgb");function Jo(r,e,t){r=L(r,255),e=L(e,255),t=L(t,255);var n=Math.max(r,e,t),i=Math.min(r,e,t),o,s,l=n,c=n-i;if(s=n===0?0:c/n,n==i)o=0;else{switch(n){case r:o=(e-t)/c+(e<t?6:0);break;case e:o=(t-r)/c+2;break;case t:o=(r-e)/c+4;break}o/=6}return{h:o,s,v:l}}a(Jo,"rgbToHsv");function zu(r,e,t){r=L(r,360)*6,e=L(e,100),t=L(t,100);var n=Math.floor(r),i=r-n,o=t*(1-e),s=t*(1-i*e),l=t*(1-(1-i)*e),c=n%6,d=[t,s,o,o,l,t][c],f=[l,t,t,s,o,o][c],m=[o,o,l,t,t,s][c];return{r:d*255,g:f*255,b:m*255}}a(zu,"hsvToRgb");function Qo(r,e,t,n){var i=[ie(Math.round(r).toString(16)),ie(Math.round(e).toString(16)),ie(Math.round(t).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}a(Qo,"rgbToHex");function Fu(r,e,t,n,i){var o=[ie(Math.round(r).toString(16)),ie(Math.round(e).toString(16)),ie(Math.round(t).toString(16)),ie(ia(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}a(Fu,"rgbaToHex");function ea(r,e,t,n){var i=[ie(ia(n)),ie(Math.round(r).toString(16)),ie(Math.round(e).toString(16)),ie(Math.round(t).toString(16))];return i.join("")}a(ea,"rgbaToArgbHex");v.equals=function(r,e){return!r||!e?!1:v(r).toRgbString()==v(e).toRgbString()};v.random=function(){return v.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Vu(r,e){e=e===0?0:e||10;var t=v(r).toHsl();return t.s-=e/100,t.s=Pr(t.s),v(t)}a(Vu,"_desaturate");function Uu(r,e){e=e===0?0:e||10;var t=v(r).toHsl();return t.s+=e/100,t.s=Pr(t.s),v(t)}a(Uu,"_saturate");function Hu(r){return v(r).desaturate(100)}a(Hu,"_greyscale");function Zu(r,e){e=e===0?0:e||10;var t=v(r).toHsl();return t.l+=e/100,t.l=Pr(t.l),v(t)}a(Zu,"_lighten");function $u(r,e){e=e===0?0:e||10;var t=v(r).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),v(t)}a($u,"_brighten");function Wu(r,e){e=e===0?0:e||10;var t=v(r).toHsl();return t.l-=e/100,t.l=Pr(t.l),v(t)}a(Wu,"_darken");function Yu(r,e){var t=v(r).toHsl(),n=(t.h+e)%360;return t.h=n<0?360+n:n,v(t)}a(Yu,"_spin");function qu(r){var e=v(r).toHsl();return e.h=(e.h+180)%360,v(e)}a(qu,"_complement");function ta(r,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var t=v(r).toHsl(),n=[v(r)],i=360/e,o=1;o<e;o++)n.push(v({h:(t.h+o*i)%360,s:t.s,l:t.l}));return n}a(ta,"polyad");function Ku(r){var e=v(r).toHsl(),t=e.h;return[v(r),v({h:(t+72)%360,s:e.s,l:e.l}),v({h:(t+216)%360,s:e.s,l:e.l})]}a(Ku,"_splitcomplement");function Xu(r,e,t){e=e||6,t=t||30;var n=v(r).toHsl(),i=360/t,o=[v(r)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,o.push(v(n));return o}a(Xu,"_analogous");function Ju(r,e){e=e||6;for(var t=v(r).toHsv(),n=t.h,i=t.s,o=t.v,s=[],l=1/e;e--;)s.push(v({h:n,s:i,v:o})),o=(o+l)%1;return s}a(Ju,"_monochromatic");v.mix=function(r,e,t){t=t===0?0:t||50;var n=v(r).toRgb(),i=v(e).toRgb(),o=t/100,s={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return v(s)};v.readability=function(r,e){var t=v(r),n=v(e);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)};v.isReadable=function(r,e,t){var n=v.readability(r,e),i,o;switch(o=!1,i=ic(t),i.level+i.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o};v.mostReadable=function(r,e,t){var n=null,i=0,o,s,l,c;t=t||{},s=t.includeFallbackColors,l=t.level,c=t.size;for(var d=0;d<e.length;d++)o=v.readability(r,e[d]),o>i&&(i=o,n=v(e[d]));return v.isReadable(r,n,{level:l,size:c})||!s?n:(t.includeFallbackColors=!1,v.mostReadable(r,["#fff","#000"],t))};var Kn=v.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Qu=v.hexNames=ec(Kn);function ec(r){var e={};for(var t in r)r.hasOwnProperty(t)&&(e[r[t]]=t);return e}a(ec,"flip");function na(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}a(na,"boundAlpha");function L(r,e){tc(r)&&(r="100%");var t=rc(r);return r=Math.min(e,Math.max(0,parseFloat(r))),t&&(r=parseInt(r*e,10)/100),Math.abs(r-e)<1e-6?1:r%e/parseFloat(e)}a(L,"bound01");function Pr(r){return Math.min(1,Math.max(0,r))}a(Pr,"clamp01");function K(r){return parseInt(r,16)}a(K,"parseIntFromHex");function tc(r){return typeof r=="string"&&r.indexOf(".")!=-1&&parseFloat(r)===1}a(tc,"isOnePointZero");function rc(r){return typeof r=="string"&&r.indexOf("%")!=-1}a(rc,"isPercentage");function ie(r){return r.length==1?"0"+r:""+r}a(ie,"pad2");function Jt(r){return r<=1&&(r=r*100+"%"),r}a(Jt,"convertToPercentage");function ia(r){return Math.round(parseFloat(r)*255).toString(16)}a(ia,"convertDecimalToHex");function ra(r){return K(r)/255}a(ra,"convertHexToDecimal");var ne=function(){var r="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+r+")",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",i="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function _e(r){return!!ne.CSS_UNIT.exec(r)}a(_e,"isValidCSSUnit");function nc(r){r=r.replace(Lu,"").replace(Gu,"").toLowerCase();var e=!1;if(Kn[r])r=Kn[r],e=!0;else if(r=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=ne.rgb.exec(r))?{r:t[1],g:t[2],b:t[3]}:(t=ne.rgba.exec(r))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=ne.hsl.exec(r))?{h:t[1],s:t[2],l:t[3]}:(t=ne.hsla.exec(r))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=ne.hsv.exec(r))?{h:t[1],s:t[2],v:t[3]}:(t=ne.hsva.exec(r))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=ne.hex8.exec(r))?{r:K(t[1]),g:K(t[2]),b:K(t[3]),a:ra(t[4]),format:e?"name":"hex8"}:(t=ne.hex6.exec(r))?{r:K(t[1]),g:K(t[2]),b:K(t[3]),format:e?"name":"hex"}:(t=ne.hex4.exec(r))?{r:K(t[1]+""+t[1]),g:K(t[2]+""+t[2]),b:K(t[3]+""+t[3]),a:ra(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=ne.hex3.exec(r))?{r:K(t[1]+""+t[1]),g:K(t[2]+""+t[2]),b:K(t[3]+""+t[3]),format:e?"name":"hex"}:!1}a(nc,"stringInputToObject");function ic(r){var e,t;return r=r||{level:"AA",size:"small"},e=(r.level||"AA").toUpperCase(),t=(r.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}a(ic,"validateWCAG2Parms");var Xn=Ia(Fo());var Qn=g.object({rank:g.union([g.enum(["low","medium","high","always-visible"]),g.number()]).optional(),interactive:g.boolean().optional(),appearance:g.object({margin:g.number().min(6).optional(),text:g.object({numLines:g.number().optional(),lineHeight:g.number().optional(),size:g.number().optional(),maxWidth:g.number().optional(),foregroundColor:g.string().optional(),backgroundColor:g.string().optional()}).optional(),marker:g.object({size:g.number().optional(),foregroundColor:g.object({active:g.string().optional(),inactive:g.string().optional()}).optional(),backgroundColor:g.object({active:g.string().optional(),inactive:g.string().optional()}).optional()}).optional()}).optional()});function mp(r,e,t){g.array(g.number()).min(2).max(3).parse(r),g.string().parse(e),Qn.parse(t||{})}a(mp,"validateLabel");var Tt={margin:6,text:{numLines:2,lineHeight:1.2,size:11.5,maxWidth:150,foregroundColor:"white",backgroundColor:"#333"},marker:{size:5,foregroundColor:{active:"white",inactive:void 0},backgroundColor:{active:"#333",inactive:void 0}}},oc={lightOnDark:{...Tt,text:{...Tt.text,foregroundColor:"white",backgroundColor:"#333"},marker:{...Tt.marker,foregroundColor:{active:"white",inactive:void 0},backgroundColor:{active:"#333",inactive:void 0}}},darkOnLight:{...Tt,text:{...Tt.text,foregroundColor:"#333",backgroundColor:"white"},marker:{...Tt.marker,foregroundColor:{active:"#333",inactive:void 0},backgroundColor:{active:"white",inactive:void 0}}}},ac="LOW_PRIORITY",oa=4,sc=6,lc=20,uc=2.5,cc=2,dc="cover",aa=.5,sa=6.5,la={heightAbovePolygon:0,appearance:oc.darkOnLight};var nt=class nt{constructor(e,t,n){u(this,"lines",0);u(this,"id");u(this,"rank");u(this,"type","label");u(this,"initialRank");u(this,"contextConfigured",!1);u(this,"fillText");u(this,"newStyle",{});u(this,"opacity",0);u(this,"visibilityNeedsUpdate",!1);u(this,"text");u(this,"style",{top:0,left:0,textLabelVisible:!0,pinVisibility:1,textAlign:"left"});u(this,"projection",new or);u(this,"_cache",{});u(this,"appearance");u(this,"options");u(this,"visible",!0);u(this,"enabled",!0);u(this,"isOccluded",!1);u(this,"offscreen",!1);u(this,"canShow",!1);u(this,"activeBoundingBox",{x:0,y:0,w:0,h:0});u(this,"dimensions",{width:0,height:0});u(this,"currentStrategyIndex",-1);u(this,"totalMarkerSize",0);u(this,"dirty",!0);u(this,"parentDirty",!0);u(this,"collisionDirty",!0);u(this,"lastTextAlign");u(this,"imageHash");u(this,"markerSize",0);u(this,"iconVisible",!1);u(this,"zoomProportion",0);u(this,"dp");u(this,"animate",!0);u(this,"onStrategySelected",a(e=>{if(this.currentStrategyIndex===e)return;let t=this.strategies[e];t&&t.onStrategySelected(this),this.currentStrategyIndex=e;let n=this.style;this.style=this.newStyle,this.newStyle=n},"onStrategySelected"));u(this,"packedMessage",{x:0,y:0,enabled:!1,rank:0,bboxes:[],shouldCollideWithScreenEdges:!1,lockedToStrategyIndex:-1});var o,s;if(this.id=(o=t.id)!=null?o:F(),this.options=(0,Xn.default)({},t,la),this.text=e,this.dp=(l=1)=>l*n.pixelRatio,typeof t.rank=="string")this.rank=_t(t.rank),this.initialRank=this.rank;else if(t.rank!=null&&t.rank>0)this.rank=t.rank,this.initialRank=t.rank;else{let l=Math.trunc(_.env.NODE_ENV==="test"?nt.testId:nt.testId*10)/10;nt.testId+=.001,this.rank=l,this.initialRank=l}let i=(0,Xn.default)({},this.options.appearance,la.appearance);this.appearance={margin:i.margin,text:{lineHeight:i.text.lineHeight,numLines:i.text.numLines,size:i.text.size,maxWidth:i.text.maxWidth,foregroundColor:i.text.foregroundColor,backgroundColor:i.text.backgroundColor},marker:{foregroundColor:{active:i.marker.foregroundColor.active,inactive:i.marker.foregroundColor.inactive||v(i.marker.foregroundColor.active).setAlpha(.5).toRgbString()},backgroundColor:{active:i.marker.backgroundColor.active,inactive:i.marker.backgroundColor.inactive||v(i.marker.backgroundColor.active).setAlpha(.5).toRgbString()},icon:i.marker.icon,iconSize:i.marker.iconSize||lc,iconPadding:(s=i.marker.iconPadding)!=null?s:cc,iconFit:i.marker.iconFit||dc,iconVisibilityThreshold:i.marker.iconVisibilityThreshold==null?aa:i.marker.iconVisibilityThreshold}},this.calculateMarkerSize()}setEntity(){}calculateMarkerSize(){let{iconVisibilityThreshold:e=aa}=this.appearance.marker,t=this.dp();this.zoomProportion<=e&&typeof this.appearance.marker.iconSize<"u"&&this.imageHash?(this.markerSize=this.dp(this.appearance.marker.iconSize),this.iconVisible=!0):(this.iconVisible=!1,this.markerSize=this.dp(sa)),this.totalMarkerSize=Math.ceil((this.markerSize+uc)/t)}get lowPriorityStrategyIndex(){return this.text===""?-1:3}get strategies(){let{width:e,height:t}=this.dimensions,{margin:n}=this.appearance;this.calculateMarkerSize();let i=Math.max(sc,n),o=this.iconVisible?i/2:0,s=this.iconVisible?this.totalMarkerSize:sa*2,l=[{name:"RIGHT",getBoundingBox:()=>{let c=Math.max(this.totalMarkerSize,t);return[c/2+i,c/2+i,this.totalMarkerSize/2+i,this.totalMarkerSize/2+e+i]},onStrategySelected:()=>{this.newStyle.textAlign="left",this.newStyle.pinVisibility=1,this.newStyle.top=-t/2,this.newStyle.left=this.totalMarkerSize/2+oa,this.newStyle.textLabelVisible=!0}},{name:"LEFT",getBoundingBox:()=>{let c=Math.max(this.totalMarkerSize,t);return[c/2+i,c/2+i,this.totalMarkerSize/2+e+i,this.totalMarkerSize/2+i]},onStrategySelected:()=>{this.newStyle.textAlign="right",this.newStyle.pinVisibility=1,this.newStyle.top=-t/2,this.newStyle.left=-e-this.totalMarkerSize/2-oa,this.newStyle.textLabelVisible=!0}},{name:"TOP",getBoundingBox:()=>{let c=this.dp();return[t+this.totalMarkerSize/2/c+i,this.totalMarkerSize/2+i,e/2+i,e/2+i]},onStrategySelected:()=>{this.newStyle.pinVisibility=1,this.newStyle.textAlign="center",this.newStyle.textLabelVisible=!0,this.newStyle.top=-t-this.totalMarkerSize/2,this.newStyle.left=-e/2}},{name:ac,getBoundingBox:()=>[s/2+o,s/2+o,s/2+o,s/2+o],onStrategySelected:()=>{this.newStyle.pinVisibility=.5,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0}}];return this.text===""?[{name:"ICON_ONLY",getBoundingBox:()=>[this.totalMarkerSize/2+i,this.totalMarkerSize/2+i,this.totalMarkerSize/2+i,this.totalMarkerSize/2+i],onStrategySelected:()=>{this.newStyle.pinVisibility=1,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0}}]:l}updatePosition(){}disable(){this.visible=!1}toPackedMessage(e=!1){return this.visible&&e&&this.currentStrategyIndex!=null&&this.currentStrategyIndex!==-1&&this.currentStrategyIndex!==this.lowPriorityStrategyIndex?this.packedMessage.lockedToStrategyIndex=this.currentStrategyIndex:this.packedMessage.lockedToStrategyIndex=-1,this.packedMessage.x=this.projection.x,this.packedMessage.y=this.projection.y,this.packedMessage.enabled=this.enabled,this.packedMessage.rank=this.rank,this.collisionDirty?(this.packedMessage.bboxes=this.strategies.map((t,n)=>[...t.getBoundingBox(),n]),this.packedMessage.shouldCollideWithScreenEdges=!1,this.collisionDirty=!1,this.packedMessage):this.packedMessage}destroy(){}};a(nt,"LabelComponent"),u(nt,"testId",0);var Jn=nt,gp=Jn;p();p();var ii=class ii extends Ot{constructor(t,n){super();u(this,"rendererState");u(this,"convertTo3DMapPosition");u(this,"textSet",new Set);u(this,"batchedTextMap",new Map);u(this,"debugTextAreaMesh",new Map);this.rendererState=t,this.convertTo3DMapPosition=n}remove(t){this.textSet.delete(t)}update(t){var l,c,d;let n,i,o,s=[];for(let f of this.rendererState.geometry3DIdsInScene)if(n=this.rendererState.geometry3DMap.get(f),(n==null?void 0:n.type)==="text3d"){i=n.components[0],o=n.components[1];let m=(l=i.mesh)==null?void 0:l.parent;if(!m||!(m instanceof Ie)||!(i instanceof Lr))continue;if((c=i.feature.properties)!=null&&c.textArea&&i.mesh!=null&&i.polygonEntityId!=null&&i.textMesh==null&&i.mesh.parent!=null&&((d=i.feature.properties)==null?void 0:d.textArea.position)!=null){if(this.textSet.has(i.polygonEntityId))continue;this.textSet.add(i.polygonEntityId),this.batchedTextMap.has(m)||this.batchedTextMap.set(m,ri().then(({BatchedText:A})=>{let M=new A;return M.type="batchedtext",m.add(M),M}));let w=this.batchedTextMap.get(m);if(!w)throw new Error("batched text required");s.push(fc({entityId:f,textComponent:i,styleComponent:o,convertTo3DMapPosition:this.convertTo3DMapPosition,batchedMeshPromise:w,rendererState:this.rendererState}).then(()=>{this.publish("render")}))}let E=this.batchedTextMap.get(m);i.textMesh&&E&&Promise.all([E,Promise.resolve({meshComponent:i,styleComponent:o})]).then(([w,{meshComponent:A,styleComponent:M}])=>{let{textMesh:O}=A;if(w&&O){let G=ni(w,O);A.visible&&!G?w.add(O):!A.visible&&G&&w.remove(O)}M.flipToFaceCamera&&this.flipIfNeeded(A,t)})}return Promise.all(s)}flipIfNeeded(t,n){let i=t.textMesh;if(!i)return!1;let o=i.rotation.z,s=Dr(o+n);s>Math.PI/2&&s<3*Math.PI/2&&(i.rotation.z=Dr(o+Math.PI))}showTextAreaMesh(){let t,n;for(let i of this.rendererState.geometry3DIdsInScene)if(t=this.rendererState.geometry3DMap.get(i),(t==null?void 0:t.type)==="text3d"){n=t.components[0];let o=n.feature.properties.textArea;if(!o)continue;let s=new Vi(o.maxWidth,o.maxHeight),l=new Ni(s,new Gi({color:"pink"})),{textMesh:c}=n;if(!c)continue;let d=this.convertTo3DMapPosition(o.position,Qt);l.position.copy(d),l.position.z=c.position.z-.1,l.rotation.z=c.rotation.z,ei.identity(),ei.makeRotationAxis(new B(0,0,1),c.userData.rotationZ),Qt.set(o.maxWidth/2,0,0),Qt.applyMatrix4(ei),l.position.x-=Qt.x,l.position.y-=Qt.y,this.rendererState.entityScene.add(l),this.debugTextAreaMesh.set(i,l)}this.publish("render")}hideTextAreaMesh(){this.debugTextAreaMesh.forEach(t=>{this.rendererState.entityScene.remove(t)}),this.debugTextAreaMesh.clear(),this.publish("render")}};a(ii,"Text3DSystem");var ua=ii,ei=new Ae,Qt=new B,ti;async function kp(r){let{preloadFont:e}=await ri();return e(r)}a(kp,"preloadFont");function ri(){return ti||(ti=import("./text3d-ZXEDJBSG.js").then(r=>r)),ti}a(ri,"getText3DService");async function fc({entityId:r,textComponent:e,styleComponent:t,convertTo3DMapPosition:n,batchedMeshPromise:i,rendererState:o}){return Promise.all([ri(),Promise.resolve({entityId:r,meshComponent:e,styleComponent:t})]).then(([{createTroikaText:s},l])=>s(l.entityId,l.meshComponent,l.styleComponent,n)).catch(s=>{pe.warn("Trouble creating text: ",s)}).then(s=>{if(s!=null&&s.text){if(e.polygonEntityId){let l=o.geometry3DMap.get(e.polygonEntityId);if((l==null?void 0:l.type)==="geometry"){let c=l.components[0],d=l.components[1];c.textMesh=s.text,c.mesh!=null&&(s.text.position.z=d.altitude+d.height+pc)}}return Promise.all([Promise.resolve(s.text),i])}}).then(s=>{if(!s)return;let[l,c]=s;c.add(l),e.batchedText||(e.batchedText=c)})}a(fc,"createText");function ni(r,e){return r._members.has(e)}a(ni,"doesBatchedTextContainsText");var pc=.5;var hc=g.object({visible:g.boolean(),color:g.string(),flipToFaceCamera:g.boolean(),font:g.string().optional(),fontSize:g.number(),margin:g.union([g.number(),g.tuple([g.number(),g.number(),g.number(),g.number()])]),outlineColor:g.string(),outlineOpacity:g.number(),outlineBlur:g.union([g.number(),g.string()]),outlineWidth:g.number(),outlineOffsetX:g.number(),outlineOffsetY:g.number(),strokeWidth:g.number(),maxWidth:g.number().optional(),maxHeight:g.number().optional(),strokeOpacity:g.number(),strokeColor:g.string(),fillOpacity:g.number(),hoverColor:g.string().optional(),id:g.union([g.string(),g.number()]),type:g.literal("text3d"),position:g.tuple([g.number(),g.number(),g.number()]),content:g.string()}),ca=hc.partial().omit({id:!0,type:!0}).strict(),da=ca.omit({margin:!0,position:!0,maxWidth:!0,maxHeight:!0,content:!0}).strict(),Pp=g.object({appearance:ca.optional(),parentId:g.string().optional()}).strict(),oi=class oi{constructor(e){u(this,"mesh",new it);u(this,"textMesh");u(this,"type","text3d");u(this,"feature");u(this,"parent");u(this,"batchedText");u(this,"polygonEntityId");this.feature=e}get visible(){return this.batchedText&&this.textMesh?ni(this.batchedText,this.textMesh):this.textMesh?this.textMesh.visible:!1}set visible(e){this.batchedText&&this.textMesh?e?this.batchedText.addText(this.textMesh):this.batchedText.removeText(this.textMesh):this.textMesh&&(this.textMesh.visible=e),this.mesh.visible=e}};a(oi,"Text3DComponent");var Lr=oi;function er(r,e,t){if(e!==void 0){if(r.type==="model"||r.type==="path"||r.type==="marker"||r.type==="label"||r.type==="geometry"||r.type==="group-container")return e===!0?(r instanceof xe&&r.components[1]===void 0?(r.components[1]=new xt,r.components[1].dirty=!0):r instanceof ce&&r.components[2]===void 0?(r.components[2]=new xt,r.components[2].dirty=!0):r instanceof Ie&&r.components[1]===void 0&&(r.components[1]=new xt,r.components[1].dirty=!0),!0):(r instanceof xe?r.components[1]=void 0:r instanceof ce?r.components[2]=void 0:r instanceof Ie&&(r.components[1]=void 0),!0);if(r.type==="geometry-group"){let n;for(let i of r.userData.entities3D.values())n=t.geometry3DMap.get(i),er(n,e,t);return!0}}return!1}a(er,"updateInteractivity");function qp(r,e,t){if(!(!(t!=null&&t.color)&&!("topColor"in t))){if(t!==void 0&&r.type==="geometry-group"&&r.components[0]!=null){let n,i,o=r.components[0];for(let s of r.userData.entities3D.values())n=e.geometry3DMap.get(s),n&&(i=n.components[1],i.color===o.color&&(i.initialColor=t.color||o.color,i.color=t.color||o.color,i.dirty=!0),i.topColor===o.topColor&&(i.topColor=t.topColor||o.topColor,i.dirty=!0));return t.color!==void 0&&(o.color=t.color,o.dirty=!0),"topColor"in t&&(o.topColor=t.topColor,o.dirty=!0),!0}return!1}}a(qp,"updateGroupColor");function Kp(r,e){if(e!==void 0&&r.type==="geometry-group"&&r.components[0]!=null){let t=r.components[0];return t.shading=t.shading||{},t.shading&&(e.start!==t.shading.start||e.end!==t.shading.end||e.intensity!==t.shading.intensity)&&(Object.assign(t.shading,e),r.userData.shadingDirty=!0),!0}return!1}a(Kp,"updateGroupShading");function Xp(r,e){e!==void 0&&r.type==="geometry"&&(e.showImage!==void 0&&(r.components[1].showImage=e.showImage),e.flipImageToFaceCamera!==void 0&&(r.components[1].flipImageToFaceCamera=e.flipImageToFaceCamera))}a(Xp,"updateImageProps");function Jp(r,e,t){var n;if(t!==void 0){if(r.type==="geometry"){let i=r.components[1];if(i.height!==t)return i.height=t,i.dirty=!0,((n=r.parentObject3D)==null?void 0:n.type)==="geometry-group"&&(r.parentObject3D.userData.outlineDirty=!0),!0}else if(r.type==="geometry-group"){let i=r.components[0];for(let o of r.userData.entities3D.values()){let s=e.geometry3DMap.get(o),l;((s==null?void 0:s.type)==="geometry"||(s==null?void 0:s.type)==="model")&&(l=s.components[1],l.height===i.height&&(s.components[1].height=t,s.components[1].dirty=!0))}return r.components[0].height=t,r.userData.outlineDirty=!0,!0}}return!1}a(Jp,"updateHeight");function gc(r,e){e!==void 0&&(r.type==="path"||r.type==="geometry")&&(e.initialColor!==void 0&&(r.components[1].initialColor=e.initialColor),e.color!==void 0&&(r.components[1].color=e.color),"topColor"in e&&(r.components[1].topColor=e.topColor),r.components[1].dirty=!0)}a(gc,"updateColor");function Qp(r,e,t){e!==void 0&&(r.type==="label"||r.type==="marker"?(r.object3d.position.copy(t(e[1],e[0],e[2]||0)),r.positionDirty=!0):r.type==="custom-geometry"&&r.components[0].position.copy(t(e[1],e[0],e[2]||0)))}a(Qp,"updatePosition");function eh(r,e){var t;return e!==void 0&&(r.type==="marker"||r.type==="label"||r.type==="custom-geometry")&&r.parentObject3D!==e&&r.parentObject3D instanceof Ie?((t=r.parentObject3D)==null||t.removeEntity(r),e.addEntity(r),!0):!1}a(eh,"updateParent");function th(r,e){e!==void 0&&(r.type==="marker"||r.type==="label")&&r.components[0].enabled!==e&&(r.components[0].enabled=e)}a(th,"updateEnabled");function rh(r,e,t){if(e!==void 0&&r.type==="marker"){let n=r.components[0];if(e.contentHTML!==void 0)return n.containerEl.innerHTML=e.contentHTML,!0;if(e.anchor!==void 0&&(n.options.anchor=e.anchor,n.collisionDirty=!0),e.dynamicResize!==void 0)return n.options.dynamicResize=e.dynamicResize,!0;if(e.options!=null){try{qn.parse(e.options||{})}catch(i){return pe.error(i),!1}return e.options.interactive==="pointer-events-auto"?(n.pointerEvents="auto",er(r,!1,t)):(n.pointerEvents="none",er(r,e.options.interactive,t)),fa(r,e.options.rank),!0}}return!1}a(rh,"updateMarker");function fa(r,e){return e!==void 0&&(r.type==="marker"||r.type==="label")?(r.components[0].rank=_t(e),!0):!1}a(fa,"updateRank");function nh(r,e,t){var n,i,o,s,l;if(e!==void 0&&r.type==="label"){let c=r.components[0];e.text!==void 0&&(c.text=e.text,c.dirty=!0);try{Qn.parse(e.options||{})}catch(d){pe.error(d);return}((n=e.options)==null?void 0:n.appearance)!==void 0&&Object.keys((i=e.options)==null?void 0:i.appearance).length>0&&(si(c.appearance,((o=e.options)==null?void 0:o.appearance)||{}),c.dirty=!0),er(r,(s=e.options)==null?void 0:s.interactive,t),fa(r,(l=e.options)==null?void 0:l.rank)}}a(nh,"updateLabel");function ih(r,e){e!==void 0&&r.type==="geometry"&&(r.components[1].hoverColor=e,r.components[1].dirty=!0)}a(ih,"updateHoverColor");function oh(r,e){if(e!==void 0){let t=r.components[2];if(r.type==="geometry"&&t!=null)return t.hover=e,t.dirty=!0,!0}return!1}a(oh,"updateHovered");function ah(r,e){e!==void 0&&r.type==="image"&&(r.components[1].flipImageToFaceCamera=e)}a(ah,"updateFlipImageToFaceCamera");function pa(r,e){if(e!==void 0){if(r.type==="model"||r.type==="path"||r.type==="geometry"||r.type==="custom-geometry"||r.type==="image"||r.type==="text3d"){r.components[1].visible=e,r.components[1].dirty=!0;let t=r.parentObject3D;t instanceof de&&(t.userData.outlineDirty=!0)}else r.type==="group-container"||r.type==="geometry-group"?r.setVisible(e):r.type==="label"&&(r.components[0].visible=e);return!0}return!1}a(pa,"updateVisibility");function sh(r,e,t){if(t!==void 0&&r.type==="geometry-group"){let n=r.components[0];for(let i of r.userData.entities3D.values()){let o=e.geometry3DMap.get(i),s;((o==null?void 0:o.type)==="geometry"||(o==null?void 0:o.type)==="model")&&(s=o.components[1],(!s.opacity||s.opacity===n.opacity)&&(s.opacity=t,s.dirty=!0))}return r.setOpacity(t),n.opacity=t,!0}return!1}a(sh,"updateOpacity");function lh(r,e){if(e!==void 0&&r.type==="geometry-group"){let t=r.components[0];(e==null?void 0:e.texture)!=null&&t.texture!==(e==null?void 0:e.texture)&&(t.texture=e.texture,t.dirty=!0),(e==null?void 0:e.topTexture)!=null&&t.topTexture!==(e==null?void 0:e.topTexture)&&(t.topTexture=e.topTexture,t.dirty=!0)}}a(lh,"updateGroupTexture");function uh(r,e){if(r.type==="geometry"){let t=!1,n=r.components[1];if((e==null?void 0:e.texture)!=null&&n.texture!==(e==null?void 0:e.texture)&&(n.texture=e.texture,t=!0),(e==null?void 0:e.topTexture)!=null&&n.topTexture!==(e==null?void 0:e.topTexture)&&(n.topTexture=e.topTexture,t=!0),t&&r.components[0]instanceof ue){let i=r.components[0];return i.detached===!1&&(i.detached=!0,i.dirty=!0),!0}}return!1}a(uh,"updateIndividualGeometryTexture");function ch(r,e){if(e!==void 0&&r.type==="geometry"){let t=r.components[1];if(t.opacity!==e){t.opacity=e;let n=r.components[0];n.detached===!1&&(n.detached=!0,n.dirty=!0),e===0?t.visible=!1:t.visible=!0,t.dirty=!0;let i=r.parentObject3D;return(i==null?void 0:i.type)==="geometry-group"&&(i.userData.outlineDirty=!0,i.userData.shadingDirty=!0),!0}}return!1}a(ch,"updateIndividualGeometryOpacity");function dh(r,e){if(e!==void 0){if(r.type==="path"||r.type==="geometry"||r.type==="custom-geometry")r.components[1].altitude=e,r.components[1].dirty=!0;else if(r.type==="group-container"&&r.altitude!==e)return r.setAltitude(e),!0}return!1}a(dh,"updateAltitude");function fh(r,e){if(e!==void 0){if(r.type==="geometry-group"&&r.components[0]!=null)r.components[0].outline=e,r.userData.outlineDirty=!0;else if(r.type==="geometry"){r.components[1].outline=e,r.components[1].dirty=!0;let t=r.parentObject3D;t instanceof de&&(t.userData.outlineDirty=!0)}return!0}return!1}a(fh,"updateOutline");function ph(r,e){return e!==void 0&&r.type==="geometry"&&r.components[0]&&r.components[0]instanceof ue?(r.components[0].focusable=e,!0):!1}a(ph,"updateFocusable");function hh(r,e){if(e!==void 0&&r.type==="geometry"){let t=r.components[1];if(t.renderOrder!==e){t.renderOrder=e;let n=r.components[0];return n.detached===!1&&(n.detached=!0,n.dirty=!0),n.imageMesh&&(n.imageMesh.renderOrder=e+1),t.dirty=!0,!0}}return!1}a(hh,"updateIndividualGeometryRenderOrder");function mh(r,e){let{visible:t,color:n}=e;if(r.type!=="path")return;let i=r.components[0];t!=null&&pa(r,t),n!=null&&gc(r,{color:n}),Object.assign(i,yc(e)),ai(e)||(i.materialDirty=!0,(e.nearRadius!=null||e.farRadius!=null)&&(i.dirty=!0))}a(mh,"handlePathUpdate");function yc(r){return tr(r,bc)}a(yc,"pickPathOptions");var bc=["animateArrowsOnPath","displayArrowsOnPath","nearRadius","farRadius","accentColor","completeFraction"];function gh(r){if(!(r instanceof ce&&r.type==="text3d"))throw new Error("expect target is TextGeometry3D")}a(gh,"assetGeometryIsText3D");var vc=["visible","color","strokeWidth","outlineOffsetX","outlineOffsetY","outlineWidth","outlineBlur","outlineOpacity","outlineColor","strokeWidth","strokeColor","strokeOpacity","maxWidth","maxHeight","font","hoverColor","fillOpacity","fontSize","flipToFaceCamera"];function yh(r,e){pa(r,e.visible);let t=r.components[1],n=tr(e,vc);"margin"in e&&pe.warn("update to margin is not supported atm"),"content"in e&&pe.warn("content update is not supported atm");try{da.parse(n)}catch(i){pe.error(i);return}Object.keys(n).length>0&&(Object.assign(t,n),t.dirty=!0)}a(yh,"handleText3DUpdate");var xc=["color","material","opacity","verticalOffset"];function bh(r,e){let t=tr(e,xc),n=r.components[1];Object.keys(t).length>0&&(t.material&&(n.material=t.material),t.opacity!=null&&(n.opacity=t.opacity,t.opacity===0?n.visible=!1:n.visible=!0,n.dirty=!0),t.verticalOffset!=null&&(n.verticalOffset=t.verticalOffset),t.color!=null&&(n.color=t.color),n.dirty=!0)}a(bh,"handleModelStyleUpdate");p();p();p();p();var li=class li extends ji{constructor(t){let n=t,i=3,o=i*4;super(new Float32Array(t*o),i,t,Li,Ri);u(this,"_width");u(this,"_height");u(this,"_propertiesLength");this._width=o,this._height=n,this._propertiesLength=i}setColor(t,n,i){let o=this.image.data,s=t*this._width;o[s]=n.r,o[s+1]=n.g,o[s+2]=n.b,o[s+3]=0,o[s+4]=i.r,o[s+5]=i.g,o[s+6]=i.b,o[s+7]=0,this.needsUpdate=!0}getColor(t){let n=this.image.data,i=t*this._width,o=new fe(n[i],n[i+1],n[i+2]),s=new fe(n[i+4],n[i+5],n[i+6]);return{color:o,topColor:s}}setTexture(t,n,i){let o=this.image.data,s=t*this._width;o[s+8]=n?1:0,o[s+9]=i?1:0,o[s+10]=0,o[s+11]=0,this.needsUpdate=!0}};a(li,"BatchedPropertiesTexture");var Gr=li;var ha="#define LAMBERT\nvarying vec3 vViewPosition;\nvarying vec4 vPosition;\nvarying vec2 vUv;\nvarying vec4 finalPosition;\nvarying vec3 vWorldPosition;\nvarying vec3 worldNormal;\nvarying float vBatchId;\n\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\nvoid main() {\n\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n\n vViewPosition = - mvPosition.xyz;\n\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n \n // To mitigate visual defects on machines such as windows and iOS\n vBatchId = getIndirectIndex(gl_DrawID) + 0.5;\n vViewPosition = - mvPosition.xyz;\n worldNormal = normal;\n vUv = uv;\n vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n}\n";var ma="#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nuniform float uGradientEnd;\nuniform float uGradientIntensity;\nuniform float uMinSideAlpha;\nuniform float uMaxSideAlpha;\nuniform float uGradientStart;\nuniform highp sampler2D uPropertiesTexture;\nuniform highp sampler2D uTopTexture;\nuniform highp sampler2D uTexture;\nuniform float uRepeatYFactor;\nvarying float vBatchId;\n\nvarying vec2 vUv;\nvarying vec3 vWorldPosition;\nvarying vec3 worldNormal;\n\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvoid main() {\n #include <clipping_planes_fragment>\n\n // get the normalized world normal of vertex fragment\n vec3 surfaceNormal = normalize(worldNormal);\n\n // get angle relative to Z up\n float angle = degrees(acos(abs(dot(surfaceNormal, vec3(0.0, 0.0, 1.0)))));\n\n int idx = int(vBatchId) * 1;\n vec3 diffuse = vec3(texelFetch(uPropertiesTexture, ivec2(0, idx), 0).rgb);\n bool shouldShowTexture = texelFetch(uPropertiesTexture, ivec2(2, idx), 0).r > 0.99;\n\n if(shouldShowTexture) {\n diffuse = texture2D(uTexture, vec2(vUv.x, vUv.y * uRepeatYFactor)).rgb;\n }\n\n // if this is a fragment facing upwards, use topColor. Avoid any sort of `==` comparison, due to floating point precision issue\n if(angle < 0.02) {\n bool shouldShowTopTexture = texelFetch(uPropertiesTexture, ivec2(2, idx), 0).g > 0.99;\n\n if(shouldShowTopTexture) {\n diffuse = texture2D(uTopTexture, vUv).rgb;\n } else {\n diffuse = vec3(texelFetch(uPropertiesTexture, ivec2(1, idx), 0).rgb);\n }\n }\n\n vec4 diffuseColor = vec4(diffuse, opacity);\n\n // only for vertical surfaces\n if(angle > 89.0 && angle < 91.0) {\n\n // get the percentage of the z position from the ground, up\n float percentFromZeroZ = max((abs(vWorldPosition.z) - uGradientStart) / uGradientEnd, 0.0);\n\n // gradient based on percentage\n float alpha = smoothstep(uMinSideAlpha, uMaxSideAlpha, percentFromZeroZ);\n\n // mix the shadow color with the diffuse color based on the alpha and opacity\n diffuseColor = vec4(mix(diffuseColor.rgb, diffuseColor.rgb * (1.0 - uGradientIntensity), 1.0 - alpha), opacity);\n }\n\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n\n // accumulation\n #include <lights_lambert_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n\n // modulation\n #include <aomap_fragment>\n\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n\n}\n";var Mc=-.05,wc=1,ui=class ui extends Ui{constructor(t,n,i=1){super(t);u(this,"propertiesTexture");u(this,"uniforms",{uGradientIntensity:{value:0},uGradientEnd:{value:0},uGradientStart:{value:0},uTopTexture:{value:null},uTexture:{value:null},uRepeatYFactor:{value:1}});u(this,"showTextures",a(t=>{let n=!!this.uniforms.uTexture.value,i=!!this.uniforms.uTopTexture.value;(n||i)&&(this.propertiesTexture.setTexture(t,n,i),this.needsUpdate=!0)},"showTextures"));this.propertiesTexture=new Gr(n),this.uniforms.uRepeatYFactor.value=i,this.onBeforeCompile=o=>{let s=this.uniforms.uGradientIntensity,l=this.uniforms.uGradientEnd,c=this.uniforms.uGradientStart,d=this.uniforms.uTopTexture,f=this.uniforms.uTexture,m=this.uniforms.uRepeatYFactor;this.uniforms=o.uniforms,o.vertexShader=ha,o.fragmentShader=ma,Object.assign(this.uniforms,{uGradientIntensity:s,uGradientEnd:l,uGradientStart:c,uMinSideAlpha:{value:Mc},uMaxSideAlpha:{value:wc},uPropertiesTexture:{value:this.propertiesTexture},uTopTexture:d,uTexture:f,uRepeatYFactor:m})}}get repeatYFactor(){return this.uniforms.uRepeatYFactor.value}set repeatYFactor(t){t!==this.uniforms.uRepeatYFactor.value&&(this.uniforms.uRepeatYFactor.value=t,this.needsUpdate=!0)}get texture(){return this.uniforms.uTexture.value}set texture(t){t.wrapS=It,t.wrapT=It,t.colorSpace=Ur,this.uniforms.uTexture.value=t}get topTexture(){return this.uniforms.uTopTexture.value}set topTexture(t){t.wrapS=It,t.wrapT=It,t.colorSpace=Ur,this.uniforms.uTopTexture.value=t}setGradientShading(t,n,i){this.uniforms.uGradientStart.value=t,this.uniforms.uGradientEnd.value=n,this.uniforms.uGradientIntensity.value=i}setColor(t,n,i){this.propertiesTexture.setColor(t,n,i)}getColor(t){return this.propertiesTexture.getColor(t)}hideTextures(t){let n=!!this.uniforms.uTexture.value,i=!!this.uniforms.uTopTexture.value;(n||i)&&(this.propertiesTexture.setTexture(t,!1,!1),this.needsUpdate=!0)}removeSideTexture(t){if(this.texture){this.texture.dispose(),this.uniforms.uTexture.value=null;let n=!!this.uniforms.uTopTexture.value;this.propertiesTexture.setTexture(t,!1,n),this.needsUpdate=!0}}removeTopTexture(t){if(this.topTexture){this.topTexture.dispose(),this.uniforms.uTopTexture.value=null;let n=!!this.uniforms.uTexture.value;this.propertiesTexture.setTexture(t,n,!1),this.needsUpdate=!0}}dispose(){super.dispose(),this.propertiesTexture.dispose()}};a(ui,"BatchedStandardMaterial");var rr=ui;p();var Uh={top:0,bottom:0,left:0,right:0,type:"pixel"},ga="mappedin";var Cc=80;function em(r,e){var l,c,d;let t=0;for(let f of r)t+=((c=(l=f.components[0])==null?void 0:l.geometry)==null?void 0:c.attributes.position.count)||0;let n=new fe(e.color),i;i=new rr({color:n,side:e.side==="back"?Ai:e.side==="front"?Oi:Pi,opacity:(d=e.opacity)!=null?d:1,transparent:e.opacity!==void 0?e.opacity<1:!1},r.length);let o=new De(r.length,t,0,i),s;for(let f of r)s=f.components[0],!(!(s instanceof ue)||!s.geometry)&&(s.mesh=o,s.material=i,s.instanceIndex=o.addGeometry(s.geometry),o.addInstance(s.instanceIndex),o.userData.entities[s.instanceIndex]=f.id,i instanceof rr&&i.setColor(s.instanceIndex,n,e.topColor?new fe(e.topColor):n));return o.perObjectFrustumCulled=!0,o.matrixAutoUpdate=!1,o}a(em,"batchGeometries");function ci(r,e){e.polygonOffset=!0,e.polygonOffsetFactor=1,e.polygonOffsetUnits=1;let t=new Fi(r,Cc),n=Dc(e.color.getHexString()),i=new zi({linewidth:1,color:n,transparent:!0}),o=new ar(t,i);return o.layers.set(1),o}a(ci,"createOutlines");function Dc(r){return v(r).darken(30).toRgbString()}a(Dc,"darkenColorForOutline");function tm(r,e,t,n){if(e.length<1)return;r.boundingBox||r.computeBoundingBox();let i=r.boundingBox,o=r.getAttribute("position"),s=r.getAttribute("normal"),l=r.getAttribute("uv"),c,d;r.index?(c=r.index.count/3,d=a(function(D,Z){return r.index.getX(D*3+Z)},"meshIndex")):(c=o.count/3,d=a(function(D,Z){return D*3+Z},"meshIndex"));let f=new Ae;f.makeRotationFromQuaternion(new Hr().setFromEuler(new Zr(0,0,t/180*Math.PI)));let m=e.find(D=>D.face==="top"),E;m&&(E={min:n(m.bounds[1],m.bounds[0],0),max:n(m.bounds[3],m.bounds[2],i.max.z)});let w=e.find(D=>D.face==="side"),A;if(w&&(A={min:n(w.bounds[1],w.bounds[0],0),max:n(w.bounds[3],w.bounds[2],i.max.z)}),!(!A&&!E))for(let D=0;D<c;++D){let Z=s.getX(d(D,0))+s.getX(d(D,1))+s.getX(d(D,2)),oe=s.getY(d(D,0))+s.getY(d(D,1))+s.getY(d(D,2)),Ta=s.getZ(d(D,0))+s.getZ(d(D,1))+s.getZ(d(D,2)),Mt=Math.abs(Z),wt=Math.abs(oe),ir=Math.abs(Ta);var M,O;Mt<=wt&&Mt<=ir?(M="x",wt<=ir?O="y":O="z"):wt<=Mt&&wt<=ir?(M="y",Mt<=ir?O="x":O="z"):(M="z",Mt<=wt?O="x":O="y"),M==="z"&&(M=O,O="z");let kt,Ct,Dt,Et,jr,Br;if(O==="z"||M==="z"){if(!w||!A)continue;kt=w.repeat.u,Ct=w.repeat.v,Dt=w.offset.u,Et=w.offset.v,jr=w.rotation,Br=A}else{if(!m||!E)continue;kt=m.repeat.u,Ct=m.repeat.v,Dt=m.offset.u,Et=m.offset.v,jr=(360-t+m.rotation)%360,Br=E}let{min:Q,max:xi}=Br,ot=new ae;ot.position.set(Q.x,Q.y,0),ot.updateMatrix(),ot.updateMatrixWorld();let _i=Q.clone().applyMatrix4(f),Ti=xi.clone().applyMatrix4(f),Sa=Math.abs(Ti.x-_i.x),Ma=Math.abs(Ti.y-_i.y),Si=new B(Sa,Ma,xi.z).applyMatrix4(ot.matrixWorld),zr=Math.abs(Si[M]-Q[M]),Fr=Math.abs(Si[O]-Q[O]),Mi=jr*Math.PI/180||0,wi=Math.cos(Mi),ki=Math.sin(Mi),wa=ot.matrixWorld.clone().invert(),ka=new Hr().setFromEuler(new Zr(0,0,t/180*Math.PI));for(let Oe=0;Oe<3;Oe++){let Ci=new B(o.getX(d(D,Oe)),o.getY(d(D,Oe)),o.getZ(d(D,Oe))).applyMatrix4(wa);Ci.applyQuaternion(ka);let Vr=Ci.applyMatrix4(ot.matrixWorld),Di=Vr.x,Ei=Vr.y,Ii=Vr.z;var G,j;M==="x"?G=kt*(Di-Q[M])/zr+Dt:M==="y"?G=kt*(Ei-Q[M])/zr+Dt:G=kt*(Ii-Q[M])/zr+Dt,O==="x"?j=Ct*(Di-Q[O])/Fr+Et:O==="y"?j=Ct*(Ei-Q[O])/Fr+Et:j=Ct*(Ii-Q[O])/Fr+Et,G-=.5,j-=.5;let Ca=G*wi-j*ki+.5,Da=G*ki+j*wi+.5;l.setX(d(D,Oe),Ca),l.setY(d(D,Oe),Da)}}}a(tm,"updateUVsLegacy");p();function ya(r){r&&(r.map&&(r.map.dispose(),r.map=void 0),r.dispose())}a(ya,"scrubMaterial");function Nr(r){for(let e=r.children.length-1;e>=0;e--)Nr(r.children[e]);"geometry"in r&&r.geometry&&r.geometry.dispose(),r.parent&&r.parent.remove(r),"material"in r&&Array.isArray(r.material)?r.material.forEach(function(e){ya(e)}):"material"in r&&typeof r.material<"u"&&ya(r.material)}a(Nr,"destroyObject3D");var nr,St,fi=class fi{constructor(e){u(this,"rendererState");u(this,"dirty",!0);$(this,nr,!0);$(this,St,0);this.rendererState=e}get geometries3DDirty(){return P(this,nr)}set geometries3DDirty(e){N(this,nr,e)}update(e,t=!1){var o,s;let n;if(this.geometries3DDirty){let l;for(let c of this.rendererState.geometry3DIdsInScene)if(n=this.rendererState.geometry3DMap.get(c),n&&n.type==="geometry-group"&&n.userData.modelURL===void 0&&n.userData.dirty===!1&&n.userData.outlineDirty===!0){let d=n.children[0];n.userData.outlineDirty=!1;let f=vt(n);if(f&&Nr(f),!n.components[0].outline||!n.visible)continue;if(n.children.length>0){let m;if(d instanceof De){let A=[],M,O,G,j;for(let D of n.userData.entities3D)j=this.rendererState.geometry3DMap.get(D),(j==null?void 0:j.type)==="geometry"&&(O=j.components[0],G=j.components[1],O instanceof ue&&G.visible&&G.opacity>0&&G.outline&&!O.detached&&(M=O==null?void 0:O.geometry,M&&A.push(M)));A.length>0&&(m=$i(A))}else m=d.geometry;m&&(l=ci(m,d.material),l.position.z=n.altitude,l.userData.outlineOfEntityId=n.userData.entityId);let E,w;for(let A of n.userData.entities3D.values()){let M=this.rendererState.geometry3DMap.get(A);(M==null?void 0:M.type)==="geometry"&&(E=M.components[0],w=M.components[1],l&&(M==null?void 0:M.type)==="geometry"&&!E.detached?(M.components[0].outline=l,(o=n.parent)==null||o.add(l)):(M==null?void 0:M.type)==="geometry"&&E.geometry!=null&&E.material!=null&&E.detached&&(E.outline&&Nr(E.outline),w&&w.opacity>0&&w.visible&&w.outline&&(E.outline=ci(E.geometry,E.material),(s=n.parent)==null||s.add(E.outline))))}}this.dirty=!0}this.geometries3DDirty=!1}let i=t?ba(e,16,19,0,1):P(this,St);if((i!==P(this,St)||this.dirty)&&this.rendererState.geometry3DIdsInScene.size>0){let l;for(let c of this.rendererState.geometry3DIdsInScene)if(l=this.rendererState.geometry3DMap.get(c),(l==null?void 0:l.type)==="geometry-group"&&l.components[0]!=null&&l.components[0].outline&&l.visible){let d=vt(l);if(d&&d.visible){let f=Array.isArray(d.material)?d.material:[d.material];for(let m of f)m.opacity=Math.min(i,l.components[0].opacity)}}else if((l==null?void 0:l.type)==="geometry"&&l.components[0]instanceof ue&&l.components[0].detached){let d=l.components[0].outline;if(d){let f=Array.isArray(d.material)?d.material:[d.material];for(let m of f)m.opacity=Math.min(i,l.components[1].opacity)}}}N(this,St,i),this.dirty=!1}};nr=new WeakMap,St=new WeakMap,a(fi,"OutlineInterpolationSystem");var di=fi;var pi=class pi extends ae{constructor(t,n=new Ir){super();u(this,"visible",!0);u(this,"type","geometry-group");u(this,"components");u(this,"userData",{entityId:"",entities3D:new Set,opacity:1,dirty:!0,outlineDirty:!0,shadingDirty:!0});this.components=[n],this.userData.entityId=t}setVisible(t){if(this.visible!==t){this.visible=t;let n=vt(this);n&&(n.visible=t),this.dispatchEvent({type:"childremoved",child:this})}}getOpacity(){return this.userData.opacity}setOpacity(t){this.userData.opacity=t}removeEntity(){this.dispatchEvent({type:"childremoved",child:this})}getfirstChildEntityId(){let t;for(let i of this.children)if(!i.userData.detached){t=i;break}return t instanceof De?Object.values(t.userData.entities)[0]:void 0}setAltitude(t){this.position.z!==t&&(this.position.z=t,this.dispatchEvent({type:"childremoved",child:this}))}get altitude(){return this.position.z}};a(pi,"GeometryGroupObject3D");var de=pi;var hi=class hi extends ae{constructor(){super(...arguments);u(this,"type","geometry");u(this,"userData",{entityId:"",type:"geometry"})}};a(hi,"Geometry3DObject3D");var it=hi,mi=class mi{constructor(e,t){u(this,"id",F());u(this,"components");u(this,"entities2D",new Map);this.components=[e,t]}get object3d(){return this.components[0].mesh}get parentObject3D(){var e;return(e=this.components[0].mesh)==null?void 0:e.parent}get type(){return this.components[0].type}addEntity(e){this.parentObject3D instanceof de?(this.parentObject3D.add(e.object3d),e.object3d.userData.parentEntityId=this.id):this.entities2D.set(e.id,e)}removeEntity(e){var t;(t=e.parentObject3D)==null||t.remove(e.object3d),this.entities2D.delete(e.id)}removeAllEntities(){for(let e of this.entities2D.values())this.removeEntity(e)}};a(mi,"Geometry3D");var ce=mi;p();function Oc(r){let e=r.min,t=r.max,n=new B(e.x,e.y,e.z),i=new B(t.x,e.y,e.z),o=new B(e.x,t.y,e.z),s=new B(t.x,t.y,e.z);return[n,i,o,s]}a(Oc,"getCornersOfBoundingBox");p();function Ac(){return typeof window>"u"?1:Math.min(window.devicePixelRatio,2)}a(Ac,"getPixelRatio");p();function Pc(r,e,t=!1){let n=null,i=0;return function(...o){i++,i===1&&t===!0&&r(...o);let s=a(()=>{(!t||i>1)&&r(...o),n=null,i=0},"later");clearTimeout(n),n=setTimeout(s,e)}}a(Pc,"debounce");p();var Rc=(()=>{let r;return{getDeviceType(){if(r)return r;let{userAgent:e,platform:t,maxTouchPoints:n}=window.navigator,i=/(iphone|ipod|ipad)/i.test(e),o=t==="iPad"||t.indexOf("Mac")===0&&n>0&&!window.MSStream,s=/android/i.test(e);return r={isIpad:o,isMobile:s||i||o,isSafari12:/Version\/12.+Safari/.test(e),isFirefox:/Firefox/.test(e),isWindows:/windows/i.test(e)},r},_reset(){r=void 0}}})(),va=Rc.getDeviceType,xa=(()=>{let r,e,t;function n(){if(e!==void 0)return e;r||(r=document.createElement("canvas"));let o=r.getContext("webgl")||r.getContext("experimental-webgl");if(!o)return e;try{let s=va().isFirefox?null:o.getExtension("WEBGL_debug_renderer_info");return e=s?o.getParameter(s.UNMASKED_RENDERER_WEBGL):o.getParameter(o.RENDERER),e}catch{let l=new Error("Failed getting device info");throw l.name="FailedGettingDeviceInfo",l}}a(n,"getInfo");function i(){var s,l;if(!va().isWindows)return!1;if(t!==void 0)return t;let o=(l=(s=Lc())==null?void 0:s.toLowerCase())!=null?l:"";return t=o.includes("intel")&&(o.includes("uhd")||o.includes("iris")),t}return a(i,"shouldDisableOffscreenCanvas"),{getInfo:n,shouldDisableOffscreenCanvas:i,_setCanvas(o){r=o,e=void 0,t=void 0}}})(),Lc=xa.getInfo,Gc=xa.shouldDisableOffscreenCanvas;p();function tr(r,e){let t={};for(let n=0;n<e.length;n++){let i=e[n];i in r&&(t[i]=r[i])}return t}a(tr,"pick");function ai(r){return Object.keys(r).length===0}a(ai,"isEmpty");p();var Nc=a(r=>e=>{if(!e.includes("mappedin")){let t={};for(let n in r){let i=r[n];e.includes("mappedin")||(r[n]=i)}return{url:e,headers:t}}return{url:e,headers:r}},"transformRequest");function ug(r,e,t,n){let i=r*(Math.PI/180),o=n/Re,s=r+o*180/Math.PI,l=t/Re/Math.cos(i),c=e+l*180/Math.PI;return{lat:s,lon:c}}a(ug,"cartesianToGeographic");function cg(r,e,t,n){let i=t*(Math.PI/180),o=n*(Math.PI/180),s=r*(Math.PI/180),l=e*(Math.PI/180),c=i-s,d=o-l,f=Re*d*Math.cos(s),m=Re*c;return{x:f,y:m}}a(cg,"geographicToCartesian");var jc=a((r,e)=>{var t;if(r.children&&r.visible)for(let n of r.children){if(n.visible&&n.type)if("entities3D"in n.userData&&((t=n.userData)!=null&&t.entities3D)&&n.type==="geometry-group"){e.add(n.userData.entityId);for(let i of n.userData.entities3D.values())e.add(i)}else(n.type==="group-container"||n.type==="custom-geometry"||n instanceof it)&&e.add(n.userData.entityId);jc(n,e)}return e},"populateGeometry3DIdsInScene"),Bc=a((r,e)=>{var t;if(r.children&&r.visible&&!((t=r.userData)!=null&&t.hidden))for(let n of r.children)n.visible&&n instanceof et&&e.add(n.userData.entityId),Bc(n,e);return e},"populateGeometry2DIdsInScene");function si(r,e){for(let t in e){if(e[t]==null){r[t]=void 0;continue}typeof e[t]=="object"?si(r[t],e[t]):r[t]=e[t]}return r}a(si,"mergeObjects");function dg(r,e,t,n){let i={translateX:r.x,translateY:r.y,translateZ:r.z,scale:r.meterInMercatorCoordinateUnits()},o=new Ae,s=new B(i.scale,-i.scale,i.scale),l=new Ae().makeTranslation(i.translateX,i.translateY,i.translateZ).scale(s),c=t.elevation;return{id:ga,type:"custom",renderingMode:"3d",render:(d,f)=>{if(o.fromArray(f),c!==t.elevation){let m=Zi.fromLngLat(r.toLngLat(),t.elevation);l.makeTranslation(i.translateX,i.translateY,-m.z).scale(s)}e.projectionMatrix=o.multiply(l),c=t.elevation,n()}}}a(dg,"createCustomLayer");function zc(r){return fetch(r,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"client_credentials"})})}a(zc,"fetchToken");async function fg(r){let e=await zc(r),{access_token:t}=await e.json();return{"x-mappedin-tiles-key":t}}a(fg,"getRequestHeaders");function pg(r,e=0){let t=3735928559^e,n=1103547991^e;for(let i=0,o;i<r.length;i++)o=r.charCodeAt(i),t=Math.imul(t^o,2654435761),n=Math.imul(n^o,1597334677);return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&n)+(t>>>0)}a(pg,"cyrb53");var Fc=a(r=>r,"linearEase");var hg=a(r=>1-Math.cos(r*Math.PI/2),"easeIn");function ba(r,e,t,n,i,o=Fc){r=Math.max(e,Math.min(r,t));let s=(r-Math.min(e,t))/Math.abs(t-e),l=o(s);return n+l*(i-n)}a(ba,"interpolate");function mg(r,e,t){let n=r*(Math.PI/180)/2,i=e/2;return t*Math.tan(n)/i}a(mg,"getProjectionScaleFactor");function gg(r,e){let t;return typeof e=="string"||typeof e=="number"?(t=r.geometry2DMap.get(e),t==null&&(t=r.geometry3DMap.get(e))):typeof(e==null?void 0:e.id)=="string"||typeof(e==null?void 0:e.id)=="number"?(t=r.geometry2DMap.get(e.id),t==null&&(t=r.geometry3DMap.get(e.id))):t=e,t}a(gg,"getGeometryByGeometryId");function yg(r){return new Hi(new $r(r[0][0],r[0][1]),new $r(r[1][0],r[1][1])).getCenter().toArray()}a(yg,"getBoundingBoxCenter");function bg(r,e){return r<e||e<=12}a(bg,"shouldExpandZoomLevel");p();var yi=class yi{constructor(e){u(this,"visible");u(this,"altitude");u(this,"color");u(this,"dirty",!0);u(this,"maxWidth");u(this,"maxHeight");u(this,"hoverByPolygon");u(this,"flipToFaceCamera",_a.flipToFaceCamera);u(this,"font");u(this,"fillOpacity");u(this,"fontSize");u(this,"margin");u(this,"outlineWidth");u(this,"outlineBlur");u(this,"outlineOffsetX");u(this,"strokeColor");u(this,"strokeOpacity");u(this,"strokeWidth");u(this,"hoverColor");u(this,"outlineOffsetY");u(this,"outlineColor");u(this,"outlineOpacity");e&&Object.assign(this,e)}getState(e=!1){let t={};for(let n in this)!e&&n==="dirty"||this[n]!==void 0&&(t[n]=this[n]);return t}};a(yi,"Text3DStyleComponent");var gi=yi,_a=Object.freeze({visible:!0,color:"black",flipToFaceCamera:!0,fillOpacity:1,font:void 0,fontSize:2,margin:[.2,1,.2,1.5],outlineColor:"black",outlineOpacity:1,outlineWidth:0,outlineOffsetX:0,outlineOffsetY:0,outlineBlur:0,strokeOpacity:1,strokeWidth:0,maxWidth:void 0,maxHeight:void 0,strokeColor:"black",hoverColor:void 0});p();p();var vi=class vi{constructor(e){u(this,"dirty",!0);u(this,"visible",!0);u(this,"opacity",1);u(this,"verticalOffset",0);u(this,"color");u(this,"material");e&&Object.assign(this,e)}};a(vi,"ModelStyleComponnet");var bi=vi;export{Oa as a,Wc as b,pe as c,Re as d,id as e,Te as f,od as g,ad as h,sd as i,La as j,Uc as k,dd as l,Ot as m,F as n,Kr as o,Ce as p,Iu as q,Wd as r,Ho as s,Yd as t,qd as u,Kd as v,Xd as w,Jd as x,Qd as y,ef as z,sf as A,Au as B,lf as C,Zo as D,g as E,Fo as F,Vn as G,Un as H,De as I,ue as J,Ir as K,vt as L,Ff as M,Kf as N,Ko as O,xe as P,it as Q,ce as R,Uh as S,ga as T,Oc as U,Ac as V,Pc as W,Gc as X,tr as Y,Nc as Z,Dr as _,ug as $,cg as aa,jc as ba,Bc as ca,dg as da,fg as ea,pg as fa,Fc as ga,hg as ha,ba as ia,mg as ja,gg as ka,yg as la,bg as ma,v as na,mp as oa,gp as pa,gi as qa,_a as ra,bi as sa,ua as ta,kp as ua,Pp as va,Lr as wa,er as xa,qp as ya,Kp as za,Xp as Aa,Jp as Ba,gc as Ca,Qp as Da,eh as Ea,th as Fa,rh as Ga,nh as Ha,ih as Ia,oh as Ja,ah as Ka,pa as La,sh as Ma,lh as Na,uh as Oa,ch as Pa,dh as Qa,fh as Ra,ph as Sa,hh as Ta,mh as Ua,yc as Va,gh as Wa,vc as Xa,yh as Ya,bh as Za,rr as _a,em as $a,Dc as ab,tm as bb,Nr as cb,di as db,de as eb,Ie as fb};
|