@mappedin/react-sdk 6.0.1-beta.12 → 6.0.1-beta.13
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 +227 -1
- package/lib/esm/{GLTFExporter-HSPBCS24.js → GLTFExporter-GMBZKZG6.js} +1 -1
- package/lib/esm/{GLTFLoader-55WKPMRN.js → GLTFLoader-4SSZFWXF.js} +1 -1
- package/lib/esm/{browser-2NJLGV4C.js → browser-ENXYWC6X.js} +1 -1
- package/lib/esm/{chunk-GZ7LZ5UP.js → chunk-MG6EK6W7.js} +1 -1
- package/lib/esm/chunk-OK66GZXY.js +1 -0
- package/lib/esm/{chunk-SQXYZZBW.js → chunk-TZI6DH4C.js} +1 -1
- package/lib/esm/{chunk-QKN6JD4F.js → chunk-VDJHTKPS.js} +1 -1
- package/lib/esm/{chunk-G7WXEQJ3.js → chunk-XIJRG3TO.js} +1 -1
- package/lib/esm/index.d.ts +408 -128
- package/lib/esm/index.js +1 -1
- package/lib/esm/inspector-ML7LZYH5.js +1 -0
- package/lib/esm/{inspector-OZDC5DPH.css → inspector-OBUMFTII.css} +1 -1
- package/lib/esm/internal-D4VRRTBS.js +1 -0
- package/lib/esm/internal-NBBO7CQY.css +1 -0
- package/lib/esm/{outdoor-context-v4-W7UZ2JSB.js → outdoor-context-v4-YJILSBMT.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/chunk-DMHXIEU4.js +0 -1
- package/lib/esm/chunk-NLGPMWPZ.js +0 -1
- package/lib/esm/inspector-H2JBX7J4.js +0 -1
- package/lib/esm/internal-HNUWP4XZ.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o,b as Zr,j as ze}from"./chunk-GZ7LZ5UP.js";var As=Zr((ke,de)=>{ze();var Dr=200,nr="__lodash_hash_undefined__",zr=800,Vr=16,sr=9007199254740991,ar="[object Arguments]",Lr="[object Array]",Ur="[object AsyncFunction]",Br="[object Boolean]",Wr="[object Date]",qr="[object Error]",ir="[object Function]",Hr="[object GeneratorFunction]",Gr="[object Map]",Yr="[object Number]",Jr="[object Null]",or="[object Object]",Fr="[object Proxy]",Kr="[object RegExp]",Xr="[object Set]",Qr="[object String]",en="[object Undefined]",tn="[object WeakMap]",rn="[object ArrayBuffer]",nn="[object DataView]",sn="[object Float32Array]",an="[object Float64Array]",on="[object Int8Array]",cn="[object Int16Array]",un="[object Int32Array]",dn="[object Uint8Array]",ln="[object Uint8ClampedArray]",fn="[object Uint16Array]",hn="[object Uint32Array]",pn=/[\\^$.*+?()[\]{}|]/g,mn=/^\[object .+?Constructor\]$/,gn=/^(?:0|[1-9]\d*)$/,x={};x[sn]=x[an]=x[on]=x[cn]=x[un]=x[dn]=x[ln]=x[fn]=x[hn]=!0;x[ar]=x[Lr]=x[rn]=x[Br]=x[nn]=x[Wr]=x[qr]=x[ir]=x[Gr]=x[Yr]=x[or]=x[Kr]=x[Xr]=x[Qr]=x[tn]=!1;var cr=typeof global=="object"&&global&&global.Object===Object&&global,yn=typeof self=="object"&&self&&self.Object===Object&&self,Se=cr||yn||Function("return this")(),ur=typeof ke=="object"&&ke&&!ke.nodeType&&ke,Te=ur&&typeof de=="object"&&de&&!de.nodeType&&de,dr=Te&&Te.exports===ur,it=dr&&cr.process,Yt=function(){try{var t=Te&&Te.require&&Te.require("util").types;return t||it&&it.binding&&it.binding("util")}catch{}}(),Jt=Yt&&Yt.isTypedArray;function lr(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}o(lr,"apply");function vn(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}o(vn,"baseTimes");function _n(t){return function(e){return t(e)}}o(_n,"baseUnary");function bn(t,e){return t==null?void 0:t[e]}o(bn,"getValue");function xn(t,e){return function(r){return t(e(r))}}o(xn,"overArg");var wn=Array.prototype,kn=Function.prototype,Ue=Object.prototype,ot=Se["__core-js_shared__"],Be=kn.toString,$=Ue.hasOwnProperty,Ft=function(){var t=/[^.]+$/.exec(ot&&ot.keys&&ot.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),fr=Ue.toString,Tn=Be.call(Object),On=RegExp("^"+Be.call($).replace(pn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=dr?Se.Buffer:void 0,Kt=Se.Symbol,Xt=Se.Uint8Array,Qt=Ve?Ve.allocUnsafe:void 0,hr=xn(Object.getPrototypeOf,Object),er=Object.create,Sn=Ue.propertyIsEnumerable,Cn=wn.splice,q=Kt?Kt.toStringTag:void 0,Le=function(){try{var t=pt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),jn=Ve?Ve.isBuffer:void 0,tr=Math.max,En=Date.now,pr=pt(Se,"Map"),Oe=pt(Object,"create"),An=function(){function t(){}return o(t,"object"),function(e){if(!M(e))return{};if(er)return er(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function H(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}o(H,"Hash");function In(){this.__data__=Oe?Oe(null):{},this.size=0}o(In,"hashClear");function Nn(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}o(Nn,"hashDelete");function Rn(t){var e=this.__data__;if(Oe){var r=e[t];return r===nr?void 0:r}return $.call(e,t)?e[t]:void 0}o(Rn,"hashGet");function Mn(t){var e=this.__data__;return Oe?e[t]!==void 0:$.call(e,t)}o(Mn,"hashHas");function $n(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Oe&&e===void 0?nr:e,this}o($n,"hashSet");H.prototype.clear=In;H.prototype.delete=Nn;H.prototype.get=Rn;H.prototype.has=Mn;H.prototype.set=$n;function Z(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}o(Z,"ListCache");function Zn(){this.__data__=[],this.size=0}o(Zn,"listCacheClear");function Pn(t){var e=this.__data__,r=We(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Cn.call(e,r,1),--this.size,!0}o(Pn,"listCacheDelete");function Dn(t){var e=this.__data__,r=We(e,t);return r<0?void 0:e[r][1]}o(Dn,"listCacheGet");function zn(t){return We(this.__data__,t)>-1}o(zn,"listCacheHas");function Vn(t,e){var r=this.__data__,n=We(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}o(Vn,"listCacheSet");Z.prototype.clear=Zn;Z.prototype.delete=Pn;Z.prototype.get=Dn;Z.prototype.has=zn;Z.prototype.set=Vn;function le(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}o(le,"MapCache");function Ln(){this.size=0,this.__data__={hash:new H,map:new(pr||Z),string:new H}}o(Ln,"mapCacheClear");function Un(t){var e=He(this,t).delete(t);return this.size-=e?1:0,e}o(Un,"mapCacheDelete");function Bn(t){return He(this,t).get(t)}o(Bn,"mapCacheGet");function Wn(t){return He(this,t).has(t)}o(Wn,"mapCacheHas");function qn(t,e){var r=He(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}o(qn,"mapCacheSet");le.prototype.clear=Ln;le.prototype.delete=Un;le.prototype.get=Bn;le.prototype.has=Wn;le.prototype.set=qn;function fe(t){var e=this.__data__=new Z(t);this.size=e.size}o(fe,"Stack");function Hn(){this.__data__=new Z,this.size=0}o(Hn,"stackClear");function Gn(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}o(Gn,"stackDelete");function Yn(t){return this.__data__.get(t)}o(Yn,"stackGet");function Jn(t){return this.__data__.has(t)}o(Jn,"stackHas");function Fn(t,e){var r=this.__data__;if(r instanceof Z){var n=r.__data__;if(!pr||n.length<Dr-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new le(n)}return r.set(t,e),this.size=r.size,this}o(Fn,"stackSet");fe.prototype.clear=Hn;fe.prototype.delete=Gn;fe.prototype.get=Yn;fe.prototype.has=Jn;fe.prototype.set=Fn;function Kn(t,e){var r=lt(t),n=!r&&dt(t),s=!r&&!n&&_r(t),a=!r&&!n&&!s&&xr(t),c=r||n||s||a,i=c?vn(t.length,String):[],u=i.length;for(var l in t)(e||$.call(t,l))&&!(c&&(l=="length"||s&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||yr(l,u)))&&i.push(l);return i}o(Kn,"arrayLikeKeys");function ct(t,e,r){(r!==void 0&&!Ge(t[e],r)||r===void 0&&!(e in t))&&ft(t,e,r)}o(ct,"assignMergeValue");function Xn(t,e,r){var n=t[e];(!($.call(t,e)&&Ge(n,r))||r===void 0&&!(e in t))&&ft(t,e,r)}o(Xn,"assignValue");function We(t,e){for(var r=t.length;r--;)if(Ge(t[r][0],e))return r;return-1}o(We,"assocIndexOf");function ft(t,e,r){e=="__proto__"&&Le?Le(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}o(ft,"baseAssignValue");var Qn=ls();function qe(t){return t==null?t===void 0?en:Jr:q&&q in Object(t)?fs(t):vs(t)}o(qe,"baseGetTag");function rr(t){return Ce(t)&&qe(t)==ar}o(rr,"baseIsArguments");function es(t){if(!M(t)||gs(t))return!1;var e=gt(t)?On:mn;return e.test(ws(t))}o(es,"baseIsNative");function ts(t){return Ce(t)&&br(t.length)&&!!x[qe(t)]}o(ts,"baseIsTypedArray");function rs(t){if(!M(t))return ys(t);var e=vr(t),r=[];for(var n in t)n=="constructor"&&(e||!$.call(t,n))||r.push(n);return r}o(rs,"baseKeysIn");function ht(t,e,r,n,s){t!==e&&Qn(e,function(a,c){if(s||(s=new fe),M(a))ns(t,e,c,r,ht,n,s);else{var i=n?n(ut(t,c),a,c+"",t,e,s):void 0;i===void 0&&(i=a),ct(t,c,i)}},wr)}o(ht,"baseMerge");function ns(t,e,r,n,s,a,c){var i=ut(t,r),u=ut(e,r),l=c.get(u);if(l){ct(t,r,l);return}var p=a?a(i,u,r+"",t,e,c):void 0,w=p===void 0;if(w){var ue=lt(u),W=!ue&&_r(u),Gt=!ue&&!W&&xr(u);p=u,ue||W||Gt?lt(i)?p=i:ks(i)?p=cs(i):W?(w=!1,p=as(u,!0)):Gt?(w=!1,p=os(u,!0)):p=[]:Ts(u)||dt(u)?(p=i,dt(i)?p=Os(i):(!M(i)||gt(i))&&(p=hs(u))):w=!1}w&&(c.set(u,p),s(p,u,n,a,c),c.delete(u)),ct(t,r,p)}o(ns,"baseMergeDeep");function mr(t,e){return bs(_s(t,e,kr),t+"")}o(mr,"baseRest");var ss=Le?function(t,e){return Le(t,"toString",{configurable:!0,enumerable:!1,value:js(e),writable:!0})}:kr;function as(t,e){if(e)return t.slice();var r=t.length,n=Qt?Qt(r):new t.constructor(r);return t.copy(n),n}o(as,"cloneBuffer");function is(t){var e=new t.constructor(t.byteLength);return new Xt(e).set(new Xt(t)),e}o(is,"cloneArrayBuffer");function os(t,e){var r=e?is(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}o(os,"cloneTypedArray");function cs(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}o(cs,"copyArray");function us(t,e,r,n){var s=!r;r||(r={});for(var a=-1,c=e.length;++a<c;){var i=e[a],u=n?n(r[i],t[i],i,r,t):void 0;u===void 0&&(u=t[i]),s?ft(r,i,u):Xn(r,i,u)}return r}o(us,"copyObject");function ds(t){return mr(function(e,r){var n=-1,s=r.length,a=s>1?r[s-1]:void 0,c=s>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(s--,a):void 0,c&&ps(r[0],r[1],c)&&(a=s<3?void 0:a,s=1),e=Object(e);++n<s;){var i=r[n];i&&t(e,i,n,a)}return e})}o(ds,"createAssigner");function ls(t){return function(e,r,n){for(var s=-1,a=Object(e),c=n(e),i=c.length;i--;){var u=c[t?i:++s];if(r(a[u],u,a)===!1)break}return e}}o(ls,"createBaseFor");function gr(t,e,r,n,s,a){return M(t)&&M(e)&&(a.set(e,t),ht(t,e,void 0,gr,a),a.delete(e)),t}o(gr,"customDefaultsMerge");function He(t,e){var r=t.__data__;return ms(e)?r[typeof e=="string"?"string":"hash"]:r.map}o(He,"getMapData");function pt(t,e){var r=bn(t,e);return es(r)?r:void 0}o(pt,"getNative");function fs(t){var e=$.call(t,q),r=t[q];try{t[q]=void 0;var n=!0}catch{}var s=fr.call(t);return n&&(e?t[q]=r:delete t[q]),s}o(fs,"getRawTag");function hs(t){return typeof t.constructor=="function"&&!vr(t)?An(hr(t)):{}}o(hs,"initCloneObject");function yr(t,e){var r=typeof t;return e=e==null?sr:e,!!e&&(r=="number"||r!="symbol"&&gn.test(t))&&t>-1&&t%1==0&&t<e}o(yr,"isIndex");function ps(t,e,r){if(!M(r))return!1;var n=typeof e;return(n=="number"?mt(r)&&yr(e,r.length):n=="string"&&e in r)?Ge(r[e],t):!1}o(ps,"isIterateeCall");function ms(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}o(ms,"isKeyable");function gs(t){return!!Ft&&Ft in t}o(gs,"isMasked");function vr(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Ue;return t===r}o(vr,"isPrototype");function ys(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}o(ys,"nativeKeysIn");function vs(t){return fr.call(t)}o(vs,"objectToString");function _s(t,e,r){return e=tr(e===void 0?t.length-1:e,0),function(){for(var n=arguments,s=-1,a=tr(n.length-e,0),c=Array(a);++s<a;)c[s]=n[e+s];s=-1;for(var i=Array(e+1);++s<e;)i[s]=n[s];return i[e]=r(c),lr(t,this,i)}}o(_s,"overRest");function ut(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}o(ut,"safeGet");var bs=xs(ss);function xs(t){var e=0,r=0;return function(){var n=En(),s=Vr-(n-r);if(r=n,s>0){if(++e>=zr)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}o(xs,"shortOut");function ws(t){if(t!=null){try{return Be.call(t)}catch{}try{return t+""}catch{}}return""}o(ws,"toSource");function Ge(t,e){return t===e||t!==t&&e!==e}o(Ge,"eq");var dt=rr(function(){return arguments}())?rr:function(t){return Ce(t)&&$.call(t,"callee")&&!Sn.call(t,"callee")},lt=Array.isArray;function mt(t){return t!=null&&br(t.length)&&!gt(t)}o(mt,"isArrayLike");function ks(t){return Ce(t)&&mt(t)}o(ks,"isArrayLikeObject");var _r=jn||Es;function gt(t){if(!M(t))return!1;var e=qe(t);return e==ir||e==Hr||e==Ur||e==Fr}o(gt,"isFunction");function br(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=sr}o(br,"isLength");function M(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}o(M,"isObject");function Ce(t){return t!=null&&typeof t=="object"}o(Ce,"isObjectLike");function Ts(t){if(!Ce(t)||qe(t)!=or)return!1;var e=hr(t);if(e===null)return!0;var r=$.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Be.call(r)==Tn}o(Ts,"isPlainObject");var xr=Jt?_n(Jt):ts;function Os(t){return us(t,wr(t))}o(Os,"toPlainObject");var Ss=mr(function(t){return t.push(void 0,gr),lr(Cs,void 0,t)});function wr(t){return mt(t)?Kn(t,!0):rs(t)}o(wr,"keysIn");var Cs=ds(function(t,e,r,n){ht(t,e,r,n)});function js(t){return function(){return t}}o(js,"constant");function kr(t){return t}o(kr,"identity");function Es(){return!1}o(Es,"stubFalse");de.exports=Ss});ze();var b;(function(t){t.assertEqual=s=>s;function e(s){}o(e,"assertIs"),t.assertIs=e;function r(s){throw new Error}o(r,"assertNever"),t.assertNever=r,t.arrayToEnum=s=>{let a={};for(let c of s)a[c]=c;return a},t.getValidEnumValues=s=>{let a=t.objectKeys(s).filter(i=>typeof s[s[i]]!="number"),c={};for(let i of a)c[i]=s[i];return t.objectValues(c)},t.objectValues=s=>t.objectKeys(s).map(function(a){return s[a]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let a=[];for(let c in s)Object.prototype.hasOwnProperty.call(s,c)&&a.push(c);return a},t.find=(s,a)=>{for(let c of s)if(a(c))return c},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(c=>typeof c=="string"?"'".concat(c,"'"):c).join(a)}o(n,"joinValues"),t.joinValues=n,t.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(b||(b={}));var vt;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(vt||(vt={}));var h=b.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),V=o(t=>{switch(typeof t){case"undefined":return h.undefined;case"string":return h.string;case"number":return isNaN(t)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":return Array.isArray(t)?h.array:t===null?h.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?h.promise:typeof Map<"u"&&t instanceof Map?h.map:typeof Set<"u"&&t instanceof Set?h.set:typeof Date<"u"&&t instanceof Date?h.date:h.object;default:return h.unknown}},"getParsedType"),d=b.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"]),Is=o(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),et=class et extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(a){return a.message},n={_errors:[]},s=o(a=>{for(let c of a.issues)if(c.code==="invalid_union")c.unionErrors.map(s);else if(c.code==="invalid_return_type")s(c.returnTypeError);else if(c.code==="invalid_arguments")s(c.argumentsError);else if(c.path.length===0)n._errors.push(r(c));else{let i=n,u=0;for(;u<c.path.length;){let l=c.path[u];u===c.path.length-1?(i[l]=i[l]||{_errors:[]},i[l]._errors.push(r(c))):i[l]=i[l]||{_errors:[]},i=i[l],u++}}},"processError");return s(this),n}static assert(e){if(!(e instanceof et))throw new Error("Not a ZodError: ".concat(e))}toString(){return this.message}get message(){return JSON.stringify(this.issues,b.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};o(et,"ZodError");var C=et;C.create=t=>new C(t);var ye=o((t,e)=>{let r;switch(t.code){case d.invalid_type:t.received===h.undefined?r="Required":r="Expected ".concat(t.expected,", received ").concat(t.received);break;case d.invalid_literal:r="Invalid literal value, expected ".concat(JSON.stringify(t.expected,b.jsonStringifyReplacer));break;case d.unrecognized_keys:r="Unrecognized key(s) in object: ".concat(b.joinValues(t.keys,", "));break;case d.invalid_union:r="Invalid input";break;case d.invalid_union_discriminator:r="Invalid discriminator value. Expected ".concat(b.joinValues(t.options));break;case d.invalid_enum_value:r="Invalid enum value. Expected ".concat(b.joinValues(t.options),", received '").concat(t.received,"'");break;case d.invalid_arguments:r="Invalid function arguments";break;case d.invalid_return_type:r="Invalid function return type";break;case d.invalid_date:r="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r='Invalid input: must include "'.concat(t.validation.includes,'"'),typeof t.validation.position=="number"&&(r="".concat(r," at one or more positions greater than or equal to ").concat(t.validation.position))):"startsWith"in t.validation?r='Invalid input: must start with "'.concat(t.validation.startsWith,'"'):"endsWith"in t.validation?r='Invalid input: must end with "'.concat(t.validation.endsWith,'"'):b.assertNever(t.validation):t.validation!=="regex"?r="Invalid ".concat(t.validation):r="Invalid";break;case d.too_small:t.type==="array"?r="Array must contain ".concat(t.exact?"exactly":t.inclusive?"at least":"more than"," ").concat(t.minimum," element(s)"):t.type==="string"?r="String must contain ".concat(t.exact?"exactly":t.inclusive?"at least":"over"," ").concat(t.minimum," character(s)"):t.type==="number"?r="Number must be ".concat(t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than ").concat(t.minimum):t.type==="date"?r="Date must be ".concat(t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(t.minimum))):r="Invalid input";break;case d.too_big:t.type==="array"?r="Array must contain ".concat(t.exact?"exactly":t.inclusive?"at most":"less than"," ").concat(t.maximum," element(s)"):t.type==="string"?r="String must contain ".concat(t.exact?"exactly":t.inclusive?"at most":"under"," ").concat(t.maximum," character(s)"):t.type==="number"?r="Number must be ".concat(t.exact?"exactly":t.inclusive?"less than or equal to":"less than"," ").concat(t.maximum):t.type==="bigint"?r="BigInt must be ".concat(t.exact?"exactly":t.inclusive?"less than or equal to":"less than"," ").concat(t.maximum):t.type==="date"?r="Date must be ".concat(t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(t.maximum))):r="Invalid input";break;case d.custom:r="Invalid input";break;case d.invalid_intersection_types:r="Intersection results could not be merged";break;case d.not_multiple_of:r="Number must be a multiple of ".concat(t.multipleOf);break;case d.not_finite:r="Number must be finite";break;default:r=e.defaultError,b.assertNever(t)}return{message:r}},"errorMap"),Sr=ye;function Ns(t){Sr=t}o(Ns,"setErrorMap");function Ye(){return Sr}o(Ye,"getErrorMap");var Je=o(t=>{let{data:e,path:r,errorMaps:n,issueData:s}=t,a=[...r,...s.path||[]],c={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let i="",u=n.filter(l=>!!l).slice().reverse();for(let l of u)i=l(c,{data:e,defaultError:i}).message;return{...s,path:a,message:i}},"makeIssue"),Rs=[];function f(t,e){let r=Ye(),n=Je({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===ye?void 0:ye].filter(s=>!!s)});t.common.issues.push(n)}o(f,"addIssueToContext");var tt=class tt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let s of r){if(s.status==="aborted")return y;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let s of r){let a=await s.key,c=await s.value;n.push({key:a,value:c})}return tt.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let s of r){let{key:a,value:c}=s;if(a.status==="aborted"||c.status==="aborted")return y;a.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof c.value<"u"||s.alwaysSet)&&(n[a.value]=c.value)}return{status:e.value,value:n}}};o(tt,"ParseStatus");var k=tt,y=Object.freeze({status:"aborted"}),pe=o(t=>({status:"dirty",value:t}),"DIRTY"),T=o(t=>({status:"valid",value:t}),"OK"),_t=o(t=>t.status==="aborted","isAborted"),bt=o(t=>t.status==="dirty","isDirty"),$e=o(t=>t.status==="valid","isValid"),Ze=o(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");function Fe(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}o(Fe,"__classPrivateFieldGet");function Cr(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r}o(Cr,"__classPrivateFieldSet");var m;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(m||(m={}));var je,Ee,wt=class wt{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}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}};o(wt,"ParseInputLazyPath");var A=wt,Tr=o((t,e)=>{if($e(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new C(t.common.issues);return this._error=r,this._error}}},"handleResult");function v(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return e?{errorMap:e,description:s}:{errorMap:o((c,i)=>{var u,l;let{message:p}=t;return c.code==="invalid_enum_value"?{message:p!=null?p:i.defaultError}:typeof i.data>"u"?{message:(u=p!=null?p:n)!==null&&u!==void 0?u:i.defaultError}:c.code!=="invalid_type"?{message:i.defaultError}:{message:(l=p!=null?p:r)!==null&&l!==void 0?l:i.defaultError}},"customMap"),description:s}}o(v,"processCreateParams");var kt=class kt{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 V(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:V(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:V(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Ze(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let s={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:V(e)},a=this._parseSync({data:e,path:s.path,parent:s});return Tr(s,a)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:V(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(Ze(s)?s:Promise.resolve(s));return Tr(n,a)}refine(e,r){let n=o(s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r,"getIssueProperties");return this._refinement((s,a)=>{let c=e(s),i=o(()=>a.addIssue({code:d.custom,...n(s)}),"setError");return typeof Promise<"u"&&c instanceof Promise?c.then(u=>u?!0:(i(),!1)):c?!0:(i(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new j({schema:this,typeName:g.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return E.create(this,this._def)}nullable(){return R.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return z.create(this,this._def)}promise(){return B.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return te.create(this,e,this._def)}transform(e){return new j({...v(this._def),schema:this,typeName:g.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new ie({...v(this._def),innerType:this,defaultValue:r,typeName:g.ZodDefault})}brand(){return new Pe({typeName:g.ZodBranded,type:this,...v(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new oe({...v(this._def),innerType:this,catchValue:r,typeName:g.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return De.create(this,e)}readonly(){return ce.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};o(kt,"ZodType");var _=kt,Ms=/^c[^\s-]{8,}$/i,$s=/^[0-9a-z]+$/,Zs=/^[0-9A-HJKMNP-TV-Z]{26}$/,Ps=/^[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,Ds=/^[a-z0-9_-]{21}$/i,zs=/^[-+]?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)?)??$/,Vs=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ls="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",yt,Us=/^(?:(?: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])$/,Bs=/^(([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})))$/,Ws=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,jr="((\\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])))",qs=new RegExp("^".concat(jr,"$"));function Er(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e="".concat(e,"\\.\\d{").concat(t.precision,"}"):t.precision==null&&(e="".concat(e,"(\\.\\d+)?")),e}o(Er,"timeRegexSource");function Hs(t){return new RegExp("^".concat(Er(t),"$"))}o(Hs,"timeRegex");function Ar(t){let e="".concat(jr,"T").concat(Er(t)),r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e="".concat(e,"(").concat(r.join("|"),")"),new RegExp("^".concat(e,"$"))}o(Ar,"datetimeRegex");function Gs(t,e){return!!((e==="v4"||!e)&&Us.test(t)||(e==="v6"||!e)&&Bs.test(t))}o(Gs,"isValidIP");var G=class G extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){let a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:h.string,received:a.parsedType}),y}let n=new k,s;for(let a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),f(s,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),f(s,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){let c=e.data.length>a.value,i=e.data.length<a.value;(c||i)&&(s=this._getOrReturnCtx(e,s),c?f(s,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):i&&f(s,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")Vs.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"email",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")yt||(yt=new RegExp(Ls,"u")),yt.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"emoji",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")Ps.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"uuid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")Ds.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"nanoid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")Ms.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"cuid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")$s.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"cuid2",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")Zs.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"ulid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),f(s,{validation:"url",code:d.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"regex",code:d.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),f(s,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),f(s,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),f(s,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Ar(a).test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{code:d.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?qs.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{code:d.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?Hs(a).test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{code:d.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?zs.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"duration",code:d.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?Gs(e.data,a.version)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"ip",code:d.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Ws.test(e.data)||(s=this._getOrReturnCtx(e,s),f(s,{validation:"base64",code:d.invalid_string,message:a.message}),n.dirty()):b.assertNever(a);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:d.invalid_string,...m.errToObj(n)})}_addCheck(e){return new G({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...m.errToObj(e)})}url(e){return this._addCheck({kind:"url",...m.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...m.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...m.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...m.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...m.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...m.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...m.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...m.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...m.errToObj(e)})}datetime(e){var r,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:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...m.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,...m.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...m.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...m.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...m.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...m.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...m.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...m.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...m.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...m.errToObj(r)})}nonempty(e){return this.min(1,m.errToObj(e))}trim(){return new G({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new G({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new G({...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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};o(G,"ZodString");var L=G;L.create=t=>{var e;return new L({checks:[],typeName:g.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...v(t)})};function Ys(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,a=parseInt(t.toFixed(s).replace(".","")),c=parseInt(e.toFixed(s).replace(".",""));return a%c/Math.pow(10,s)}o(Ys,"floatSafeRemainder");var Ae=class Ae extends _{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)!==h.number){let a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:h.number,received:a.parsedType}),y}let n,s=new k;for(let a of this._def.checks)a.kind==="int"?b.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),f(n,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),f(n,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?Ys(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),f(n,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{code:d.not_finite,message:a.message}),s.dirty()):b.assertNever(a);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,m.toString(r))}gt(e,r){return this.setLimit("min",e,!1,m.toString(r))}lte(e,r){return this.setLimit("max",e,!0,m.toString(r))}lt(e,r){return this.setLimit("max",e,!1,m.toString(r))}setLimit(e,r,n,s){return new Ae({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:m.toString(s)}]})}_addCheck(e){return new Ae({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:m.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:m.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:m.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:m.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:m.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:m.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:m.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:m.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:m.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&b.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};o(Ae,"ZodNumber");var Y=Ae;Y.create=t=>new Y({checks:[],typeName:g.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...v(t)});var Ie=class Ie extends _{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)!==h.bigint){let a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:h.bigint,received:a.parsedType}),y}let n,s=new k;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),f(n,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),f(n,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),f(n,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):b.assertNever(a);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,m.toString(r))}gt(e,r){return this.setLimit("min",e,!1,m.toString(r))}lte(e,r){return this.setLimit("max",e,!0,m.toString(r))}lt(e,r){return this.setLimit("max",e,!1,m.toString(r))}setLimit(e,r,n,s){return new Ie({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:m.toString(s)}]})}_addCheck(e){return new Ie({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:m.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:m.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:m.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:m.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:m.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};o(Ie,"ZodBigInt");var J=Ie;J.create=t=>{var e;return new J({checks:[],typeName:g.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...v(t)})};var Tt=class Tt extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){let n=this._getOrReturnCtx(e);return f(n,{code:d.invalid_type,expected:h.boolean,received:n.parsedType}),y}return T(e.data)}};o(Tt,"ZodBoolean");var F=Tt;F.create=t=>new F({typeName:g.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...v(t)});var rt=class rt extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){let a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:h.date,received:a.parsedType}),y}if(isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_date}),y}let n=new k,s;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),f(s,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),f(s,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):b.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new rt({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:m.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:m.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};o(rt,"ZodDate");var K=rt;K.create=t=>new K({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:g.ZodDate,...v(t)});var Ot=class Ot extends _{_parse(e){if(this._getType(e)!==h.symbol){let n=this._getOrReturnCtx(e);return f(n,{code:d.invalid_type,expected:h.symbol,received:n.parsedType}),y}return T(e.data)}};o(Ot,"ZodSymbol");var ve=Ot;ve.create=t=>new ve({typeName:g.ZodSymbol,...v(t)});var St=class St extends _{_parse(e){if(this._getType(e)!==h.undefined){let n=this._getOrReturnCtx(e);return f(n,{code:d.invalid_type,expected:h.undefined,received:n.parsedType}),y}return T(e.data)}};o(St,"ZodUndefined");var X=St;X.create=t=>new X({typeName:g.ZodUndefined,...v(t)});var Ct=class Ct extends _{_parse(e){if(this._getType(e)!==h.null){let n=this._getOrReturnCtx(e);return f(n,{code:d.invalid_type,expected:h.null,received:n.parsedType}),y}return T(e.data)}};o(Ct,"ZodNull");var Q=Ct;Q.create=t=>new Q({typeName:g.ZodNull,...v(t)});var jt=class jt extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return T(e.data)}};o(jt,"ZodAny");var U=jt;U.create=t=>new U({typeName:g.ZodAny,...v(t)});var Et=class Et extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return T(e.data)}};o(Et,"ZodUnknown");var D=Et;D.create=t=>new D({typeName:g.ZodUnknown,...v(t)});var At=class At extends _{_parse(e){let r=this._getOrReturnCtx(e);return f(r,{code:d.invalid_type,expected:h.never,received:r.parsedType}),y}};o(At,"ZodNever");var I=At;I.create=t=>new I({typeName:g.ZodNever,...v(t)});var It=class It extends _{_parse(e){if(this._getType(e)!==h.undefined){let n=this._getOrReturnCtx(e);return f(n,{code:d.invalid_type,expected:h.void,received:n.parsedType}),y}return T(e.data)}};o(It,"ZodVoid");var _e=It;_e.create=t=>new _e({typeName:g.ZodVoid,...v(t)});var me=class me extends _{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==h.array)return f(r,{code:d.invalid_type,expected:h.array,received:r.parsedType}),y;if(s.exactLength!==null){let c=r.data.length>s.exactLength.value,i=r.data.length<s.exactLength.value;(c||i)&&(f(r,{code:c?d.too_big:d.too_small,minimum:i?s.exactLength.value:void 0,maximum:c?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(f(r,{code:d.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(f(r,{code:d.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((c,i)=>s.type._parseAsync(new A(r,c,r.path,i)))).then(c=>k.mergeArray(n,c));let a=[...r.data].map((c,i)=>s.type._parseSync(new A(r,c,r.path,i)));return k.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new me({...this._def,minLength:{value:e,message:m.toString(r)}})}max(e,r){return new me({...this._def,maxLength:{value:e,message:m.toString(r)}})}length(e,r){return new me({...this._def,exactLength:{value:e,message:m.toString(r)}})}nonempty(e){return this.min(1,e)}};o(me,"ZodArray");var z=me;z.create=(t,e)=>new z({type:t,minLength:null,maxLength:null,exactLength:null,typeName:g.ZodArray,...v(e)});function he(t){if(t instanceof O){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=E.create(he(n))}return new O({...t._def,shape:()=>e})}else return t instanceof z?new z({...t._def,type:he(t.element)}):t instanceof E?E.create(he(t.unwrap())):t instanceof R?R.create(he(t.unwrap())):t instanceof N?N.create(t.items.map(e=>he(e))):t}o(he,"deepPartialify");var S=class S extends _{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(),r=b.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==h.object){let l=this._getOrReturnCtx(e);return f(l,{code:d.invalid_type,expected:h.object,received:l.parsedType}),y}let{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:c}=this._getCached(),i=[];if(!(this._def.catchall instanceof I&&this._def.unknownKeys==="strip"))for(let l in s.data)c.includes(l)||i.push(l);let u=[];for(let l of c){let p=a[l],w=s.data[l];u.push({key:{status:"valid",value:l},value:p._parse(new A(s,w,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof I){let l=this._def.unknownKeys;if(l==="passthrough")for(let p of i)u.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});else if(l==="strict")i.length>0&&(f(s,{code:d.unrecognized_keys,keys:i}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let p of i){let w=s.data[p];u.push({key:{status:"valid",value:p},value:l._parse(new A(s,w,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let l=[];for(let p of u){let w=await p.key,ue=await p.value;l.push({key:w,value:ue,alwaysSet:p.alwaysSet})}return l}).then(l=>k.mergeObjectSync(n,l)):k.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return m.errToObj,new S({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var s,a,c,i;let u=(c=(a=(s=this._def).errorMap)===null||a===void 0?void 0:a.call(s,r,n).message)!==null&&c!==void 0?c:n.defaultError;return r.code==="unrecognized_keys"?{message:(i=m.errToObj(e).message)!==null&&i!==void 0?i:u}:{message:u}}}:{}})}strip(){return new S({...this._def,unknownKeys:"strip"})}passthrough(){return new S({...this._def,unknownKeys:"passthrough"})}extend(e){return new S({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new S({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:g.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new S({...this._def,catchall:e})}pick(e){let r={};return b.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new S({...this._def,shape:()=>r})}omit(e){let r={};return b.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new S({...this._def,shape:()=>r})}deepPartial(){return he(this)}partial(e){let r={};return b.objectKeys(this.shape).forEach(n=>{let s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}),new S({...this._def,shape:()=>r})}required(e){let r={};return b.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof E;)a=a._def.innerType;r[n]=a}}),new S({...this._def,shape:()=>r})}keyof(){return Ir(b.objectKeys(this.shape))}};o(S,"ZodObject");var O=S;O.create=(t,e)=>new O({shape:()=>t,unknownKeys:"strip",catchall:I.create(),typeName:g.ZodObject,...v(e)});O.strictCreate=(t,e)=>new O({shape:()=>t,unknownKeys:"strict",catchall:I.create(),typeName:g.ZodObject,...v(e)});O.lazycreate=(t,e)=>new O({shape:t,unknownKeys:"strip",catchall:I.create(),typeName:g.ZodObject,...v(e)});var Nt=class Nt extends _{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function s(a){for(let i of a)if(i.result.status==="valid")return i.result;for(let i of a)if(i.result.status==="dirty")return r.common.issues.push(...i.ctx.common.issues),i.result;let c=a.map(i=>new C(i.ctx.common.issues));return f(r,{code:d.invalid_union,unionErrors:c}),y}if(o(s,"handleResults"),r.common.async)return Promise.all(n.map(async a=>{let c={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(s);{let a,c=[];for(let u of n){let l={...r,common:{...r.common,issues:[]},parent:null},p=u._parseSync({data:r.data,path:r.path,parent:l});if(p.status==="valid")return p;p.status==="dirty"&&!a&&(a={result:p,ctx:l}),l.common.issues.length&&c.push(l.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let i=c.map(u=>new C(u));return f(r,{code:d.invalid_union,unionErrors:i}),y}}get options(){return this._def.options}};o(Nt,"ZodUnion");var ee=Nt;ee.create=(t,e)=>new ee({options:t,typeName:g.ZodUnion,...v(e)});var P=o(t=>t instanceof re?P(t.schema):t instanceof j?P(t.innerType()):t instanceof ne?[t.value]:t instanceof se?t.options:t instanceof ae?b.objectValues(t.enum):t instanceof ie?P(t._def.innerType):t instanceof X?[void 0]:t instanceof Q?[null]:t instanceof E?[void 0,...P(t.unwrap())]:t instanceof R?[null,...P(t.unwrap())]:t instanceof Pe||t instanceof ce?P(t.unwrap()):t instanceof oe?P(t._def.innerType):[],"getDiscriminator"),nt=class nt extends _{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==h.object)return f(r,{code:d.invalid_type,expected:h.object,received:r.parsedType}),y;let n=this.discriminator,s=r.data[n],a=this.optionsMap.get(s);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(f(r,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let s=new Map;for(let a of r){let c=P(a.shape[e]);if(!c.length)throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));for(let i of c){if(s.has(i))throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(i)));s.set(i,a)}}return new nt({typeName:g.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:s,...v(n)})}};o(nt,"ZodDiscriminatedUnion");var Ke=nt;function xt(t,e){let r=V(t),n=V(e);if(t===e)return{valid:!0,data:t};if(r===h.object&&n===h.object){let s=b.objectKeys(e),a=b.objectKeys(t).filter(i=>s.indexOf(i)!==-1),c={...t,...e};for(let i of a){let u=xt(t[i],e[i]);if(!u.valid)return{valid:!1};c[i]=u.data}return{valid:!0,data:c}}else if(r===h.array&&n===h.array){if(t.length!==e.length)return{valid:!1};let s=[];for(let a=0;a<t.length;a++){let c=t[a],i=e[a],u=xt(c,i);if(!u.valid)return{valid:!1};s.push(u.data)}return{valid:!0,data:s}}else return r===h.date&&n===h.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}o(xt,"mergeValues");var Rt=class Rt extends _{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=o((a,c)=>{if(_t(a)||_t(c))return y;let i=xt(a.value,c.value);return i.valid?((bt(a)||bt(c))&&r.dirty(),{status:r.value,value:i.data}):(f(n,{code:d.invalid_intersection_types}),y)},"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(([a,c])=>s(a,c)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};o(Rt,"ZodIntersection");var te=Rt;te.create=(t,e,r)=>new te({left:t,right:e,typeName:g.ZodIntersection,...v(r)});var st=class st extends _{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==h.array)return f(n,{code:d.invalid_type,expected:h.array,received:n.parsedType}),y;if(n.data.length<this._def.items.length)return f(n,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),y;!this._def.rest&&n.data.length>this._def.items.length&&(f(n,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...n.data].map((c,i)=>{let u=this._def.items[i]||this._def.rest;return u?u._parse(new A(n,c,n.path,i)):null}).filter(c=>!!c);return n.common.async?Promise.all(a).then(c=>k.mergeArray(r,c)):k.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new st({...this._def,rest:e})}};o(st,"ZodTuple");var N=st;N.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new N({items:t,typeName:g.ZodTuple,rest:null,...v(e)})};var Ne=class Ne extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==h.object)return f(n,{code:d.invalid_type,expected:h.object,received:n.parsedType}),y;let s=[],a=this._def.keyType,c=this._def.valueType;for(let i in n.data)s.push({key:a._parse(new A(n,i,n.path,i)),value:c._parse(new A(n,n.data[i],n.path,i)),alwaysSet:i in n.data});return n.common.async?k.mergeObjectAsync(r,s):k.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof _?new Ne({keyType:e,valueType:r,typeName:g.ZodRecord,...v(n)}):new Ne({keyType:L.create(),valueType:e,typeName:g.ZodRecord,...v(r)})}};o(Ne,"ZodRecord");var Xe=Ne,Mt=class Mt extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==h.map)return f(n,{code:d.invalid_type,expected:h.map,received:n.parsedType}),y;let s=this._def.keyType,a=this._def.valueType,c=[...n.data.entries()].map(([i,u],l)=>({key:s._parse(new A(n,i,n.path,[l,"key"])),value:a._parse(new A(n,u,n.path,[l,"value"]))}));if(n.common.async){let i=new Map;return Promise.resolve().then(async()=>{for(let u of c){let l=await u.key,p=await u.value;if(l.status==="aborted"||p.status==="aborted")return y;(l.status==="dirty"||p.status==="dirty")&&r.dirty(),i.set(l.value,p.value)}return{status:r.value,value:i}})}else{let i=new Map;for(let u of c){let l=u.key,p=u.value;if(l.status==="aborted"||p.status==="aborted")return y;(l.status==="dirty"||p.status==="dirty")&&r.dirty(),i.set(l.value,p.value)}return{status:r.value,value:i}}}};o(Mt,"ZodMap");var be=Mt;be.create=(t,e,r)=>new be({valueType:e,keyType:t,typeName:g.ZodMap,...v(r)});var Re=class Re extends _{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==h.set)return f(n,{code:d.invalid_type,expected:h.set,received:n.parsedType}),y;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(f(n,{code:d.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(f(n,{code:d.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let a=this._def.valueType;function c(u){let l=new Set;for(let p of u){if(p.status==="aborted")return y;p.status==="dirty"&&r.dirty(),l.add(p.value)}return{status:r.value,value:l}}o(c,"finalizeSet");let i=[...n.data.values()].map((u,l)=>a._parse(new A(n,u,n.path,l)));return n.common.async?Promise.all(i).then(u=>c(u)):c(i)}min(e,r){return new Re({...this._def,minSize:{value:e,message:m.toString(r)}})}max(e,r){return new Re({...this._def,maxSize:{value:e,message:m.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};o(Re,"ZodSet");var xe=Re;xe.create=(t,e)=>new xe({valueType:t,minSize:null,maxSize:null,typeName:g.ZodSet,...v(e)});var ge=class ge extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==h.function)return f(r,{code:d.invalid_type,expected:h.function,received:r.parsedType}),y;function n(i,u){return Je({data:i,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ye(),ye].filter(l=>!!l),issueData:{code:d.invalid_arguments,argumentsError:u}})}o(n,"makeArgsIssue");function s(i,u){return Je({data:i,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ye(),ye].filter(l=>!!l),issueData:{code:d.invalid_return_type,returnTypeError:u}})}o(s,"makeReturnsIssue");let a={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof B){let i=this;return T(async function(...u){let l=new C([]),p=await i._def.args.parseAsync(u,a).catch(W=>{throw l.addIssue(n(u,W)),l}),w=await Reflect.apply(c,this,p);return await i._def.returns._def.type.parseAsync(w,a).catch(W=>{throw l.addIssue(s(w,W)),l})})}else{let i=this;return T(function(...u){let l=i._def.args.safeParse(u,a);if(!l.success)throw new C([n(u,l.error)]);let p=Reflect.apply(c,this,l.data),w=i._def.returns.safeParse(p,a);if(!w.success)throw new C([s(p,w.error)]);return w.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ge({...this._def,args:N.create(e).rest(D.create())})}returns(e){return new ge({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new ge({args:e||N.create([]).rest(D.create()),returns:r||D.create(),typeName:g.ZodFunction,...v(n)})}};o(ge,"ZodFunction");var Qe=ge,$t=class $t extends _{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};o($t,"ZodLazy");var re=$t;re.create=(t,e)=>new re({getter:t,typeName:g.ZodLazy,...v(e)});var Zt=class Zt extends _{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return f(r,{received:r.data,code:d.invalid_literal,expected:this._def.value}),y}return{status:"valid",value:e.data}}get value(){return this._def.value}};o(Zt,"ZodLiteral");var ne=Zt;ne.create=(t,e)=>new ne({value:t,typeName:g.ZodLiteral,...v(e)});function Ir(t,e){return new se({values:t,typeName:g.ZodEnum,...v(e)})}o(Ir,"createZodEnum");var Me=class Me extends _{constructor(){super(...arguments),je.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return f(r,{expected:b.joinValues(n),received:r.parsedType,code:d.invalid_type}),y}if(Fe(this,je,"f")||Cr(this,je,new Set(this._def.values),"f"),!Fe(this,je,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return f(r,{received:r.data,code:d.invalid_enum_value,options:n}),y}return T(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Me.create(e,{...this._def,...r})}exclude(e,r=this._def){return Me.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};o(Me,"ZodEnum");var se=Me;je=new WeakMap;se.create=Ir;var Pt=class Pt extends _{constructor(){super(...arguments),Ee.set(this,void 0)}_parse(e){let r=b.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==h.string&&n.parsedType!==h.number){let s=b.objectValues(r);return f(n,{expected:b.joinValues(s),received:n.parsedType,code:d.invalid_type}),y}if(Fe(this,Ee,"f")||Cr(this,Ee,new Set(b.getValidEnumValues(this._def.values)),"f"),!Fe(this,Ee,"f").has(e.data)){let s=b.objectValues(r);return f(n,{received:n.data,code:d.invalid_enum_value,options:s}),y}return T(e.data)}get enum(){return this._def.values}};o(Pt,"ZodNativeEnum");var ae=Pt;Ee=new WeakMap;ae.create=(t,e)=>new ae({values:t,typeName:g.ZodNativeEnum,...v(e)});var Dt=class Dt extends _{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==h.promise&&r.common.async===!1)return f(r,{code:d.invalid_type,expected:h.promise,received:r.parsedType}),y;let n=r.parsedType===h.promise?r.data:Promise.resolve(r.data);return T(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};o(Dt,"ZodPromise");var B=Dt;B.create=(t,e)=>new B({type:t,typeName:g.ZodPromise,...v(e)});var zt=class zt extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===g.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:c=>{f(n,c),c.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){let c=s.transform(n.data,a);if(n.common.async)return Promise.resolve(c).then(async i=>{if(r.value==="aborted")return y;let u=await this._def.schema._parseAsync({data:i,path:n.path,parent:n});return u.status==="aborted"?y:u.status==="dirty"||r.value==="dirty"?pe(u.value):u});{if(r.value==="aborted")return y;let i=this._def.schema._parseSync({data:c,path:n.path,parent:n});return i.status==="aborted"?y:i.status==="dirty"||r.value==="dirty"?pe(i.value):i}}if(s.type==="refinement"){let c=o(i=>{let u=s.refinement(i,a);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i},"executeRefinement");if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?y:(i.status==="dirty"&&r.dirty(),c(i.value),{status:r.value,value:i.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>i.status==="aborted"?y:(i.status==="dirty"&&r.dirty(),c(i.value).then(()=>({status:r.value,value:i.value}))))}if(s.type==="transform")if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!$e(c))return c;let i=s.transform(c.value,a);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:i}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>$e(c)?Promise.resolve(s.transform(c.value,a)).then(i=>({status:r.value,value:i})):c);b.assertNever(s)}};o(zt,"ZodEffects");var j=zt;j.create=(t,e,r)=>new j({schema:t,typeName:g.ZodEffects,effect:e,...v(r)});j.createWithPreprocess=(t,e,r)=>new j({schema:e,effect:{type:"preprocess",transform:t},typeName:g.ZodEffects,...v(r)});var Vt=class Vt extends _{_parse(e){return this._getType(e)===h.undefined?T(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};o(Vt,"ZodOptional");var E=Vt;E.create=(t,e)=>new E({innerType:t,typeName:g.ZodOptional,...v(e)});var Lt=class Lt extends _{_parse(e){return this._getType(e)===h.null?T(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};o(Lt,"ZodNullable");var R=Lt;R.create=(t,e)=>new R({innerType:t,typeName:g.ZodNullable,...v(e)});var Ut=class Ut extends _{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===h.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};o(Ut,"ZodDefault");var ie=Ut;ie.create=(t,e)=>new ie({innerType:t,typeName:g.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});var Bt=class Bt extends _{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ze(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new C(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new C(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};o(Bt,"ZodCatch");var oe=Bt;oe.create=(t,e)=>new oe({innerType:t,typeName:g.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});var Wt=class Wt extends _{_parse(e){if(this._getType(e)!==h.nan){let n=this._getOrReturnCtx(e);return f(n,{code:d.invalid_type,expected:h.nan,received:n.parsedType}),y}return{status:"valid",value:e.data}}};o(Wt,"ZodNaN");var we=Wt;we.create=t=>new we({typeName:g.ZodNaN,...v(t)});var Js=Symbol("zod_brand"),qt=class qt extends _{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}};o(qt,"ZodBranded");var Pe=qt,at=class at extends _{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return o(async()=>{let a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?y:a.status==="dirty"?(r.dirty(),pe(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})},"handleAsync")();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?y:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new at({in:e,out:r,typeName:g.ZodPipeline})}};o(at,"ZodPipeline");var De=at,Ht=class Ht extends _{_parse(e){let r=this._def.innerType._parse(e),n=o(s=>($e(s)&&(s.value=Object.freeze(s.value)),s),"freeze");return Ze(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};o(Ht,"ZodReadonly");var ce=Ht;ce.create=(t,e)=>new ce({innerType:t,typeName:g.ZodReadonly,...v(e)});function Nr(t,e={},r){return t?U.create().superRefine((n,s)=>{var a,c;if(!t(n)){let i=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,u=(c=(a=i.fatal)!==null&&a!==void 0?a:r)!==null&&c!==void 0?c:!0,l=typeof i=="string"?{message:i}:i;s.addIssue({code:"custom",...l,fatal:u})}}):U.create()}o(Nr,"custom");var Fs={object:O.lazycreate},g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(g||(g={}));var Ks=o((t,e={message:"Input not instance of ".concat(t.name)})=>Nr(r=>r instanceof t,e),"instanceOfType"),Rr=L.create,Mr=Y.create,Xs=we.create,Qs=J.create,$r=F.create,ea=K.create,ta=ve.create,ra=X.create,na=Q.create,sa=U.create,aa=D.create,ia=I.create,oa=_e.create,ca=z.create,ua=O.create,da=O.strictCreate,la=ee.create,fa=Ke.create,ha=te.create,pa=N.create,ma=Xe.create,ga=be.create,ya=xe.create,va=Qe.create,_a=re.create,ba=ne.create,xa=se.create,wa=ae.create,ka=B.create,Or=j.create,Ta=E.create,Oa=R.create,Sa=j.createWithPreprocess,Ca=De.create,ja=o(()=>Rr().optional(),"ostring"),Ea=o(()=>Mr().optional(),"onumber"),Aa=o(()=>$r().optional(),"oboolean"),Ia={string:t=>L.create({...t,coerce:!0}),number:t=>Y.create({...t,coerce:!0}),boolean:t=>F.create({...t,coerce:!0}),bigint:t=>J.create({...t,coerce:!0}),date:t=>K.create({...t,coerce:!0})},Na=y,$a=Object.freeze({__proto__:null,defaultErrorMap:ye,setErrorMap:Ns,getErrorMap:Ye,makeIssue:Je,EMPTY_PATH:Rs,addIssueToContext:f,ParseStatus:k,INVALID:y,DIRTY:pe,OK:T,isAborted:_t,isDirty:bt,isValid:$e,isAsync:Ze,get util(){return b},get objectUtil(){return vt},ZodParsedType:h,getParsedType:V,ZodType:_,datetimeRegex:Ar,ZodString:L,ZodNumber:Y,ZodBigInt:J,ZodBoolean:F,ZodDate:K,ZodSymbol:ve,ZodUndefined:X,ZodNull:Q,ZodAny:U,ZodUnknown:D,ZodNever:I,ZodVoid:_e,ZodArray:z,ZodObject:O,ZodUnion:ee,ZodDiscriminatedUnion:Ke,ZodIntersection:te,ZodTuple:N,ZodRecord:Xe,ZodMap:be,ZodSet:xe,ZodFunction:Qe,ZodLazy:re,ZodLiteral:ne,ZodEnum:se,ZodNativeEnum:ae,ZodPromise:B,ZodEffects:j,ZodTransformer:j,ZodOptional:E,ZodNullable:R,ZodDefault:ie,ZodCatch:oe,ZodNaN:we,BRAND:Js,ZodBranded:Pe,ZodPipeline:De,ZodReadonly:ce,custom:Nr,Schema:_,ZodSchema:_,late:Fs,get ZodFirstPartyTypeKind(){return g},coerce:Ia,any:sa,array:ca,bigint:Qs,boolean:$r,date:ea,discriminatedUnion:fa,effect:Or,enum:xa,function:va,instanceof:Ks,intersection:ha,lazy:_a,literal:ba,map:ga,nan:Xs,nativeEnum:wa,never:ia,null:na,nullable:Oa,number:Mr,object:ua,oboolean:Aa,onumber:Ea,optional:Ta,ostring:ja,pipeline:Ca,preprocess:Sa,promise:ka,record:ma,set:ya,strictObject:da,string:Rr,symbol:ta,transformer:Or,tuple:pa,undefined:ra,union:la,unknown:aa,void:oa,NEVER:Na,ZodIssueCode:d,quotelessJson:Is,ZodError:C});export{As as a,$a as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as S,c as se,d as O,e as L,f as H,g as le}from"./chunk-DMHXIEU4.js";import"./chunk-NLGPMWPZ.js";import"./chunk-G7WXEQJ3.js";import"./chunk-QKN6JD4F.js";import{J as ae}from"./chunk-SQXYZZBW.js";import{a,e as k,j as x}from"./chunk-GZ7LZ5UP.js";x();x();x();x();var $=class ${constructor(e,t,i,o,s="div"){this.parent=e,this.object=t,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(s),this.domElement.classList.add("controller"),this.domElement.classList.add(o),this.$name=document.createElement("div"),this.$name.classList.add("name"),$.nextNameID=$.nextNameID||0,this.$name.id="lil-gui-name-".concat(++$.nextNameID),this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",r=>r.stopPropagation()),this.domElement.addEventListener("keyup",r=>r.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let t=this.parent.add(this.object,this.property,e);return t.name(this._name),this.destroy(),t}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}};a($,"Controller");var _=$,W=class W extends _{constructor(e,t,i){super(e,t,i,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};a(W,"BooleanController");var U=W;function j(n){let e,t;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?t=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?t=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),t?"#"+t:!1}a(j,"normalizeColorString");var we={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:j,toHexString:j},I={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},Ee={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,t=1){let i=I.fromHexString(n);e[0]=(i>>16&255)/255*t,e[1]=(i>>8&255)/255*t,e[2]=(i&255)/255*t},toHexString([n,e,t],i=1){i=255/i;let o=n*i<<16^e*i<<8^t*i<<0;return I.toHexString(o)}},_e={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,t=1){let i=I.fromHexString(n);e.r=(i>>16&255)/255*t,e.g=(i>>8&255)/255*t,e.b=(i&255)/255*t},toHexString({r:n,g:e,b:t},i=1){i=255/i;let o=n*i<<16^e*i<<8^t*i<<0;return I.toHexString(o)}},ke=[we,I,Ee,_e];function Le(n){return ke.find(e=>e.match(n))}a(Le,"getColorFormat");var X=class X extends _{constructor(e,t,i,o){super(e,t,i,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=Le(this.initialValue),this._rgbScale=o,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let s=j(this.$text.value);s&&this._setValueFromHexString(s)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let t=this._format.fromHexString(e);this.setValue(t)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}};a(X,"ColorController");var N=X,K=class K extends _{constructor(e,t,i){super(e,t,i,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",o=>{o.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};a(K,"FunctionController");var F=K,Z=class Z extends _{constructor(e,t,i,o,s,r){super(e,t,i,"number"),this._initInput(),this.min(o),this.max(s);let l=r!==void 0;this.step(l?r:this._getImplicitStep(),l),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,t=!0){return this._step=e,this._stepExplicit=t,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let t=(e-this._min)/(this._max-this._min);t=Math.max(0,Math.min(t,1)),this.$fill.style.width=t*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let t=a(()=>{let v=parseFloat(this.$input.value);isNaN(v)||(this._stepExplicit&&(v=this._snap(v)),this.setValue(this._clamp(v)))},"onInput"),i=a(v=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+v),this.$input.value=this.getValue())},"increment"),o=a(v=>{v.key==="Enter"&&this.$input.blur(),v.code==="ArrowUp"&&(v.preventDefault(),i(this._step*this._arrowKeyMultiplier(v))),v.code==="ArrowDown"&&(v.preventDefault(),i(this._step*this._arrowKeyMultiplier(v)*-1))},"onKeyDown"),s=a(v=>{this._inputFocused&&(v.preventDefault(),i(this._step*this._normalizeMouseWheel(v)))},"onWheel"),r=!1,l,c,g,d,m,p=5,u=a(v=>{l=v.clientX,c=g=v.clientY,r=!0,d=this.getValue(),m=0,window.addEventListener("mousemove",b),window.addEventListener("mouseup",h)},"onMouseDown"),b=a(v=>{if(r){let C=v.clientX-l,T=v.clientY-c;Math.abs(T)>p?(v.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>p&&h()}if(!r){let C=v.clientY-g;m-=C*this._step*this._arrowKeyMultiplier(v),d+m>this._max?m=this._max-d:d+m<this._min&&(m=this._min-d),this._snapClampSetValue(d+m)}g=v.clientY},"onMouseMove"),h=a(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",h)},"onMouseUp"),y=a(()=>{this._inputFocused=!0},"onFocus"),f=a(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",t),this.$input.addEventListener("keydown",o),this.$input.addEventListener("wheel",s,{passive:!1}),this.$input.addEventListener("mousedown",u),this.$input.addEventListener("focus",y),this.$input.addEventListener("blur",f)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=a((f,v,C,T,Ae)=>(f-v)/(C-v)*(Ae-T)+T,"map"),t=a(f=>{let v=this.$slider.getBoundingClientRect(),C=e(f,v.left,v.right,this._min,this._max);this._snapClampSetValue(C)},"setValueFromX"),i=a(f=>{this._setDraggingStyle(!0),t(f.clientX),window.addEventListener("mousemove",o),window.addEventListener("mouseup",s)},"mouseDown"),o=a(f=>{t(f.clientX)},"mouseMove"),s=a(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",s)},"mouseUp"),r=!1,l,c,g=a(f=>{f.preventDefault(),this._setDraggingStyle(!0),t(f.touches[0].clientX),r=!1},"beginTouchDrag"),d=a(f=>{f.touches.length>1||(this._hasScrollBar?(l=f.touches[0].clientX,c=f.touches[0].clientY,r=!0):g(f),window.addEventListener("touchmove",m,{passive:!1}),window.addEventListener("touchend",p))},"onTouchStart"),m=a(f=>{if(r){let v=f.touches[0].clientX-l,C=f.touches[0].clientY-c;Math.abs(v)>Math.abs(C)?g(f):(window.removeEventListener("touchmove",m),window.removeEventListener("touchend",p))}else f.preventDefault(),t(f.touches[0].clientX)},"onTouchMove"),p=a(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",m),window.removeEventListener("touchend",p)},"onTouchEnd"),u=this._callOnFinishChange.bind(this),b=400,h,y=a(f=>{if(Math.abs(f.deltaX)<Math.abs(f.deltaY)&&this._hasScrollBar)return;f.preventDefault();let C=this._normalizeMouseWheel(f)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(h),h=setTimeout(u,b)},"onWheel");this.$slider.addEventListener("mousedown",i),this.$slider.addEventListener("touchstart",d,{passive:!1}),this.$slider.addEventListener("wheel",y,{passive:!1})}_setDraggingStyle(e,t="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-".concat(t),e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:t,deltaY:i}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(t=0,i=-e.wheelDelta/120,i*=this._stepExplicit?1:10),t+-i}_arrowKeyMultiplier(e){let t=this._stepExplicit?1:10;return e.shiftKey?t*=10:e.altKey&&(t/=10),t}_snap(e){let t=Math.round(e/this._step)*this._step;return parseFloat(t.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}};a(Z,"NumberController");var Y=Z,Q=class Q extends _{constructor(e,t,i,o){super(e,t,i,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(o)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(t=>{let i=document.createElement("option");i.textContent=t,this.$select.appendChild(i)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),t=this._values.indexOf(e);return this.$select.selectedIndex=t,this.$display.textContent=t===-1?e:this._names[t],this}};a(Q,"OptionController");var V=Q,q=class q extends _{constructor(e,t,i){super(e,t,i,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",o=>{o.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}};a(q,"StringController");var R=q,$e='.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "\u2195";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n line-height: calc(var(--title-height) - 4px);\n font-weight: 600;\n padding: 0 var(--padding);\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n outline: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "\u25BE";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "\u25B8";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "\u2713";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n border: none;\n}\n@media (hover: hover) {\n .lil-gui button:hover {\n background: var(--hover-color);\n }\n .lil-gui button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}';function Me(n){let e=document.createElement("style");e.innerHTML=n;let t=document.querySelector("head link[rel=stylesheet], head style");t?document.head.insertBefore(e,t):document.head.appendChild(e)}a(Me,"_injectStyles");var de=!1,z=class z{constructor({parent:e,autoPlace:t=e===void 0,container:i,width:o,title:s="Controls",closeFolders:r=!1,injectStyles:l=!0,touchStyles:c=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",g=>{(g.code==="Enter"||g.code==="Space")&&(g.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(s),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),c&&this.domElement.classList.add("allow-touch-styles"),!de&&l&&(Me($e),de=!0),i?i.appendChild(this.domElement):t&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),o&&this.domElement.style.setProperty("--width",o+"px"),this._closeFolders=r}add(e,t,i,o,s){if(Object(i)===i)return new V(this,e,t,i);let r=e[t];switch(typeof r){case"number":return new Y(this,e,t,i,o,s);case"boolean":return new U(this,e,t);case"string":return new R(this,e,t);case"function":return new F(this,e,t)}console.error("gui.add failed\n property:",t,"\n object:",e,"\n value:",r)}addColor(e,t,i=1){return new N(this,e,t,i)}addFolder(e){let t=new z({parent:this,title:e});return this.root._closeFolders&&t.close(),t}load(e,t=!0){return e.controllers&&this.controllers.forEach(i=>{i instanceof F||i._name in e.controllers&&i.load(e.controllers[i._name])}),t&&e.folders&&this.folders.forEach(i=>{i._title in e.folders&&i.load(e.folders[i._title])}),this}save(e=!0){let t={controllers:{},folders:{}};return this.controllers.forEach(i=>{if(!(i instanceof F)){if(i._name in t.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(i._name,'"'));t.controllers[i._name]=i.save()}}),e&&this.folders.forEach(i=>{if(i._title in t.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(i._title,'"'));t.folders[i._title]=i.save()}),t}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let t=this.$children.clientHeight;this.$children.style.height=t+"px",this.domElement.classList.add("transition");let i=a(s=>{s.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",i))},"onTransitionEnd");this.$children.addEventListener("transitionend",i);let o=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=o+"px"})}),this}title(e){return this._title=e,this.$title.textContent=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(i=>i.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),this._onOpenClose!==void 0&&this._onOpenClose.call(this,e)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(t=>{e=e.concat(t.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(t=>{e=e.concat(t.foldersRecursive())}),e}};a(z,"GUI");var J=z,P=J;x();x();var E=(()=>{let n=new ae;return a(function(t){return n.set(t),"#".concat(n.getHexString())},"normalize")})();function ce(n){let e;for(e of n)e()}a(ce,"runAll");function ee(n,e){let t=window.location.href,i=new URL(t),o=new URLSearchParams(i.search);for(let s in n)if(n.hasOwnProperty(s)){let r="".concat(e,".").concat(s);o.set(r,n[s])}i.search=o.toString(),history.pushState({path:i.toString()},"",i.toString())}a(ee,"updateCurrentUrlParamsWithNamespace");function te(n,e){let t=new URLSearchParams(window.location.search),i={};for(let[o,s]of t)if(o.startsWith("".concat(n,"."))){let r=o.slice(n.length+1);s==="true"||s==="false"?i[r]=s==="true":typeof(e==null?void 0:e[r])=="number"?i[r]=Number(s):i[r]=s}return{namespace:n,params:i}}a(te,"getUrlParamsWithNamespace");var Se=["interactive"];function G(n,e,t){let i=t.addFolder("".concat(e.type,"-").concat(e.id));for(let o in e){if(o==="visible"&&i.add(e,o).onChange(s=>{n.updateState(e.id,{[o]:s})}),o==="color"||o==="hoverColor"){e[o]=E(e[o]),i.addColor(e,o).onChange(s=>{n.updateState(e.id,{[o]:s})});continue}if(o==="height"){i.add(e,o,0,20,1).onChange(s=>{n.updateState(e.id,{[o]:s})});continue}if(o==="texture"){i.addFolder("Texture - side").add(e,"texture").onChange(r=>{n.updateState(e.id,{texture:{url:r}})});continue}if(o==="topTexture"){i.addFolder("Texture - top").add(e,"topTexture").onChange(r=>{n.updateState(e.id,{topTexture:{url:r}})});continue}if(o==="opacity"){i.add(e,o,0,1,.1).onChange(s=>{n.updateState(e.id,{[o]:s})});continue}Se.includes(o)&&i.add(e,o).onChange(s=>{n.updateState(e.id,{[o]:s})})}return e.isInView&&(i.add(e,"isInView").listen().disable(),i.add(e,"isInViewCheck")),{cleanup(){i.destroy()}}}a(G,"renderByProp");x();x();function Fe(){let n=[];function e(o,s){var c;let r=Object.values(o.getMapData())[0],l=s;if(l&&O.is(l)){let g=(c=r.getByType("enterprise-location"))==null?void 0:c.find(d=>d.spaces.some(m=>m.id===l.id));g&&(l=g)}return l}a(e,"getHighlightTarget");async function t(o,s){return s instanceof H?o.Camera.focusOn(s.locations.flatMap(r=>r.spaces),D):s instanceof L?o.Camera.focusOn(s.spaces,D):o.Camera.focusOn(s,D)}a(t,"focusOn");function i(o,s,{focus:r=!1}={}){if(!window.enableHighlightCard)return()=>{};let l=e(o,s),c=document.createElement("div");if(c.style.cssText="\n position: absolute;\n top: 20px;\n left: 20px;\n background-color: rgba(30, 30, 30, 0.95);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);\n border-radius: 12px;\n padding: 24px;\n max-width: 320px;\n z-index: 1000;\n font-family: 'Arial', sans-serif;\n transition: all 0.3s ease;\n color: #e0e0e0;\n ","name"in l){let d=document.createElement("h3");d.textContent=l.name,d.style.cssText="\n margin: 0 0 16px;\n font-size: 22px;\n font-weight: 600;\n color: #ffffff;\n letter-spacing: -0.5px;\n ",c.appendChild(d)}if(l instanceof L){if(l.description){let d=document.createElement("p");d.textContent=l.description,d.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",c.appendChild(d)}if(l.tags&&l.tags.length>0){let d=document.createElement("div");d.style.cssText="\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n margin-bottom: 16px;\n overflow-x: hidden;\n max-height: 30px; /* Adjust this value based on your font size and padding */\n ",l.tags.forEach(m=>{let p=document.createElement("span");p.textContent=m,p.style.cssText="\n background-color: #3a3a3a;\n color: #e0e0e0;\n padding: 6px 12px;\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n white-space: nowrap;\n ",d.appendChild(p)}),c.appendChild(d)}}let g;if(!(s instanceof H)){let d=new P({autoPlace:!1});d.domElement.style.cssText="\n position: relative;\n overflow-y: auto;\n margin-top: 16px;\n border-top: 1px solid #444;\n padding-top: 16px;\n ";let m=o.getState(s);m&&(G(o,{id:s.id,...m},d),c.appendChild(d.domElement)),g=d}return document.body.appendChild(c),r&&t(o,l),()=>{c.style.opacity="0",c.style.transform="translateY(-10px)",setTimeout(()=>c.remove(),300),g==null||g.destroy()}}return a(i,"highlightCard"),{highlightCard:i,highlight:(o,s,{focus:r=!0}={})=>{n.length>0&&n.forEach(c=>o.Markers.remove(c));let l=e(o,s);if(l instanceof L)r&&o.Camera.focusOn(l.spaces,D),n.push(...l.spaces.map(c=>o.Markers.add(c,'<div style="padding: 15px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); max-width: 250px; position: relative;">\n <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">'.concat(l.name,"</h3>\n ").concat(l.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(l.description,"</p>"):"","\n ").concat(l.tags?l.tags.map(g=>'<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">'.concat(g,"</span>")).join(" "):"",'\n <div style="position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #ffffff;"></div>\n </div>'),{rank:"always-visible",anchor:"top"})));else if(l instanceof H){r&&o.Camera.focusOn(l.locations.flatMap(d=>d.spaces),D);let c=new Map,g=new Set;l.locations.forEach(d=>{c.has(d.name)||(d.spaces.forEach(m=>{n.push(o.Markers.add(m,'<div style="padding: 12px; background-color: rgba(0, 153, 51, 0.95); border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transform: translateY(-4px); transition: all 0.3s ease;">\n <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">'.concat(d.name,"</span>\n </div>"),{rank:"always-visible"}))}),c.set(d.name,!0))}),l.locations.forEach(d=>{d.coordinates.forEach(m=>{let p="".concat(m.latitude,",").concat(m.longitude);if(!g.has(p)&&!c.has(d.name)){let u=o.Markers.add(m,'<div style="padding: 10px; background-color: rgba(51, 102, 204, 0.9); border-radius: 6px; box-shadow: 0 3px 6px rgba(0,0,0,0.2);">\n <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">'.concat(d.name,'</span>\n <br>\n <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>\n </div>'),{rank:"always-visible"});g.add(p),n.push(u)}})})}}}}a(Fe,"createHighlightControl");var D={duration:300,easing:"ease-in-out"},M=Fe();x();var A={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function Ie(n){n.add(A.options.places.fields,"name").name("Places: Name"),n.add(A.options.places.fields,"description").name("Places: Description"),n.add(A.options.places.fields,"link").name("Places: Link"),n.add(A.options.places.fields,"category").name("Places: Category"),n.add(A.options.places,"limit"),n.add(A.options.locations.fields,"name").name("Locations: Name"),n.add(A.options.locations.fields,"tag").name("Locations: Tag"),n.add(A.options.locations.fields,"description").name("Locations: Description"),n.add(A.options.places,"limit"),n.add(A.options.categories.fields,"name").name("Categories: Name")}a(Ie,"createAdvancedSettings");function he(n,e,t){var d;let i=new S,o=t.addFolder("Search");o.open();let s=o.add(A,"search").onChange(async m=>{let p=await e.Search.query(m,A.options);p&&(A.results=p,l(p,i))}),r=document.createElement("div");r.style.marginLeft="10px",(d=s.domElement.parentElement)==null||d.appendChild(r);let{renderSearch:l,close:c}=De(n,e,r,s.$input),g=o.addFolder("Advanced");return g.close(),Ie(g),document.addEventListener("keydown",m=>{(m.metaKey||m.ctrlKey)&&m.key==="k"?(m.preventDefault(),o._closed&&o.open(),s.$input.focus()):m.key==="Escape"&&(c(),i.publish("highlight",void 0))}),{pubsub:i}}a(he,"createSearchControl");function De(n,e,t,i){let o,s;i.addEventListener("input",async l=>{l instanceof InputEvent&&(l.inputType==="insertText"||l.inputType==="insertCompositionText")&&(clearTimeout(o),o=setTimeout(async()=>{var g;let c=await e.Search.suggest(i.value);c&&c.length>0&&r((g=c[0])==null?void 0:g.suggestion)},100))});function r(l){if(!l){i.placeholder="";return}let c=i.value;i.value=l,i.setSelectionRange(c.length,l.length)}return a(r,"renderSuggestion"),{renderSearch(l,c){var g,d;if(l.places.length===0&&((g=l.enterpriseCategories)==null?void 0:g.length)===0&&((d=l.enterpriseLocations)==null?void 0:d.length)===0){t.textContent="No results found.";return}s=Te(t,l,n,c)},close(){s.destroy()}}}a(De,"mount");function Te(n,e,t,i){n.innerHTML="";let o=document.createElement("div");Object.assign(o.style,B.dropdownContainer);let s=document.createElement("ul");s.className="options-list",Object.assign(s.style,B.optionsList),s.style.display="block";let r=[],l=a((p,u)=>{if(u&&u.length>0){let b=document.createElement("li");b.textContent=p,Object.assign(b.style,B.sectionHeader),s.appendChild(b),u.forEach((h,y)=>{let f=document.createElement("li");f.textContent="".concat("name"in h.item?h.item.name:""," (").concat(h.type,")"),Object.assign(f.style,B.option),f.tabIndex=0,f.addEventListener("focus",()=>{g(r.indexOf(f))}),f.addEventListener("mouseover",()=>{f.style.backgroundColor="#f0f0f0"}),f.addEventListener("mouseout",()=>{f.style.backgroundColor=""}),f.addEventListener("click",()=>{}),f.setAttribute("data-type",p),f.setAttribute("data-index",y.toString()),s.appendChild(f),r.push(f)})}},"addSection");l("enterpriseLocations",e.enterpriseLocations),l("enterpriseCategories",e.enterpriseCategories),l("Places",e.places),o.appendChild(s),n.appendChild(o);let c=[],g=a(p=>{c.forEach(f=>f()),c=[],r.forEach((f,v)=>{v===p?f.style.backgroundColor="#e0e0e0":f.style.backgroundColor=""});let u=r[p],b=u.getAttribute("data-type"),h=parseInt(u.getAttribute("data-index")||"0",10);if(!b)return;let{item:y}=e[b][h];M.highlight(t,y),i.publish("highlight",y)},"highlightOption"),d=a(p=>{!o.contains(p.target)&&p.target!==n&&m()},"handleClickOutside");document.addEventListener("click",d);let m=a(()=>{n.innerHTML="",document.removeEventListener("click",d)},"destroy");return{destroy(){n.innerHTML="",i.publish("highlight",void 0)}}}a(Te,"createCustomDropdown");var B={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function ue(n,e,t){t.domElement.id="interactionPanel";let i=[],{pubsub:o}=he(n,e,t);o.on("highlight",d=>{if(d){i.forEach(p=>p()),i=[];let m=d instanceof L?d.spaces[0]:d;if(m&&!O.is(m))return;i.push(M.highlightCard(n,m,{focus:!0}))}else i.forEach(m=>m()),i=[]});let s=t.addFolder("Click \u{1F447}").close(),{sub:r}=Oe(n,s);r.on("click",d=>{i.forEach(m=>m()),i=[],d.spaces[0]&&(i=[M.highlightCard(n,d.spaces[0])])});let l=t.addFolder("Hover \u{1F681}").close(),{sub:c}=He(n,l),g;c.on("hover",d=>{d.spaces[0]?(g==null||g(),i.length===0&&(g=M.highlightCard(n,d.spaces[0]))):(g==null||g(),g=void 0)})}a(ue,"createInteractionControls");function Oe(n,e){let t=new S,i={position:"",hoverColor:E(n.getHoverColor())},o=e.add(i,"position").disable(),s=[];function r(){s.forEach(c=>c()),s.length=0}a(r,"reset");let l=0;return n.on("click",c=>{var b;let{labels:g,markers:d,coordinate:m}=c;r(),t.publish("click",c),clearInterval(l),o.load(JSON.stringify([m.longitude,m.latitude]));let p=g[0]||d[0];if(p){let h=ne(n,p,e);if(!h)return;s.push(h.destroy),h.labelItemFolder.openAnimated()}let u=(b=c.spaces[0])!=null?b:c.objects[0];if(u){let h={id:u.id,...n.getState(u.id),type:u.type,isInView:!1,isInViewCheck:ie(n,u.id)},{cleanup:y}=G(n,h,e);l=setInterval(()=>{h.isInView=n.isInView(p||u)},500),s.push(y)}}),{sub:t}}a(Oe,"createClickControls");function He(n,e){let t=new S;n.setHoverColor("#1f3a7a");let i={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},o=e.add(i,"position").disable();e.add(i,"id").disable().listen(),e.add(i,"type").disable().listen(),e.addColor(i,"hoverColor").onChange(l=>{n.setHoverColor(l)});let s=[];function r(){s.forEach(l=>l()),s.length=0}return a(r,"reset"),n.on("hover",l=>{var h,y,f;let{coordinate:c,spaces:g,objects:d,markers:m,labels:p}=l;r(),t.publish("hover",l),o.load(JSON.stringify([c.longitude,c.latitude]));let u=(f=(y=(h=g[0])!=null?h:d[0])!=null?y:m[0])!=null?f:p[0];if(!u)return;let b=n.getState(u);b&&(i.type=b.type,i.id=u.id)}),{sub:t}}a(He,"createHoverControls");function ie(n,e){return a(function(){console.log("isInView",n.isInView(e))},"isInView")}a(ie,"createIsInViewHandler");function pe(n,e,t){let i={labels:{},all(){t.Labels.all().forEach(u=>{this.labels[u.id]=u}),c()},removeAllLabels(){t.Labels.removeAll().forEach(u=>{delete this.labels[u.id]}),c()}},{addLabel:o,destroy:s}=ze(n,t);n.add(i,"all"),n.add(i,"removeAllLabels");let r=n.addFolder("Label List");n.close();let l=new Map,{rerender:c}=g();function g(){function p(h){var y;delete i.labels[h.id],(y=l.get(h.id))==null||y.destroy()}a(p,"remove");function u(h){let y=ne(t,h,r,{onRemove:v=>{p(v)}});if(!y)return;let{labelItemFolder:f}=y;l.set(h.id,f)}a(u,"add");function b(){r.destroy(),r=n.addFolder("Label");for(let h in i.labels){let y=i.labels[h];u(y)}}return a(b,"rerender"),{rerender:b,add:u,remove:p}}a(g,"createLabelControls"),n.domElement.classList.add("list-items");let d;t.on("click",({labels:p,coordinate:u})=>{if(!n._closed)if(p[0]){d==null||d.close();let b=l.get(p[0].id);if(n.open(),!b)return;b==null||b.open(),b==null||b.domElement.scrollIntoView({block:"start"}),b==null||b.domElement.focus(),d=b}else o(u)});function m(p){for(let u of p)i.labels[u.id]=u;c()}return a(m,"populatelabels"),{populatelabels:m,destroy(){s()}}}a(pe,"createLabelControls");function ne(n,e,t,{onRemove:i}={}){var g,d,m,p;let o=t.addFolder("".concat((g=e.text)==null?void 0:g.substring(0,12)));o.onChange(u=>{n.updateState(e,{appearance:c.appearance,interactive:c.interactive})}),o.close();let s=n.getState(e);if((s==null?void 0:s.type)!=="label")throw new Error("error getting state for label: ".concat(e.id));let{appearance:r,interactive:l}=s;if(!r||r.margin==null||l==null)throw new Error("incomplte label state");let c={text:e.text,interactive:l,appearance:{...r,margin:r.margin||0,marker:{foregroundColor:(m=(d=r.marker)==null?void 0:d.foregroundColor)!=null&&m.active?E((p=r.marker.foregroundColor)==null?void 0:p.active):"black"},text:{foregroundColor:E(r.text.foregroundColor)}},remove(){n.Labels.remove(e),i==null||i(e),o.destroy()},isInView:ie(n,e.id)};return o.add(c.appearance,"margin",0,20).name("margin"),o.add(c,"text"),o.add(c,"interactive"),o.addColor(c.appearance.marker,"foregroundColor").name("marker foreground"),o.addColor(c.appearance.text,"foregroundColor").name("text forground"),o.add(c,"isInView"),o.add(c,"remove"),{labelItemFolder:o,destroy(){o.destroy()}}}a(ne,"addLabelControlToFolder");function ze(n,e){let t=n.addFolder("Add"),i={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return t.add(i,"onClick"),t.add(i,"margin"),t.add(i,"interactive"),t.add(i,"text"),t.addColor(i,"marginForegroundColor"),t.addColor(i,"marginBackgroundColor"),t.addColor(i,"textForegroundColor"),t.addColor(i,"textBackgroundColor"),{destroy(){t.destroy()},addLabel(o){return t._closed||!i.onClick?void 0:e.Labels.add(o,i.text,{appearance:{margin:i.margin,marker:{foregroundColor:{active:i.marginForegroundColor,inactive:i.marginForegroundColor},backgroundColor:{active:i.marginBackgroundColor,inactive:i.marginBackgroundColor}},text:{foregroundColor:i.textForegroundColor,backgroundColor:i.marginBackgroundColor}},interactive:i.interactive})}}}a(ze,"createAddControl");var ge={};x();var me="camera-ui";function fe(n,e){let t=n.addFolder("Camera \u{1F4F7}").onOpenClose(h=>{ee({opened:!h._closed},me)}),{params:i}=te(me);i.opened||t.close();let o=e.Camera.center.toJSON(),s=document.createElement("div");Object.assign(s.style,{display:"none",position:"absolute",left:"0px",top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),document.body.appendChild(s);let r={center_lat:o.latitude,center_lon:o.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_top:0,inset_left:0,inset_right:0,inset_bottom:0,animateOnLoad:!0,share:()=>{ee(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!1,"Focus on click":!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function l(){Object.assign(s.style,{left:r.inset_left+"px",top:r.inset_top+"px",bottom:r.inset_bottom+"px",right:r.inset_right+"px"})}a(l,"updateInsetVisualizer"),t.add(r,"center_lat").listen().disable(),t.add(r,"center_lon").listen().disable(),t.add(r,"zoomLevel",16,22,.5).listen().disable(),t.add(r,"pitch").listen().disable(),t.add(r,"bearing").listen().disable(),t.add(r,"minZoomLevel",5,22,.5).onChange(h=>{e.Camera.setMinZoomLevel(h)}),t.add(r,"maxZoomLevel",10,22,.5).onChange(h=>{e.Camera.setMaxZoomLevel(h)}),t.add(r,"animateOnLoad"),t.add(r,"visualizeInset").onChange(h=>{h?s.style.display="block":s.style.display="none"});let{innerHeight:c,innerWidth:g}=window;t.add(r,"inset_top",0,c,1).onChange(b),t.add(r,"inset_bottom",0,c,1).onChange(b),t.add(r,"inset_left",0,g,1).onChange(b),t.add(r,"inset_right",0,g,1).onChange(b);let d=Ge(e);t.add(r,"Focus on click").onChange(h=>{h?e.on("click",d):e.off("click",d)}),r["Focus on click"]&&e.on("click",d),t.add(r,"share"),t.add(r,"Focus on current floor");let m=a(h=>{t._closed||(r.center_lat=h.center.latitude,r.center_lon=h.center.longitude,r.zoomLevel=h.zoomLevel,r.bearing=h.bearing,r.pitch=h.pitch)},"onCameraChanged");e.on("camera-change",m);let{params:p}=te("camera",r);if(Object.keys(p).length>0){let h=p;e.Camera.setScreenOffsets({top:h.inset_top,left:h.inset_left,right:h.inset_right,bottom:h.inset_bottom});let y={pitch:h.pitch,center:new se(h.center_lat,h.center_lon),bearing:h.bearing,zoomLevel:h.zoomLevel};h.animateOnLoad?e.Camera.animateTo(y):e.Camera.set(y),t.load({controllers:h,folders:{}}),l()}let u=[()=>{e.off("camera-change",m)}];function b(){e.Camera.setScreenOffsets({top:r.inset_top,left:r.inset_left,right:r.inset_right,bottom:r.inset_bottom}),l()}return a(b,"updateInset"),()=>({destroy(){t.destroy(),ce(u)}})}a(fe,"createCameraControls");function Ge(n){return a(function(t){var r;let{spaces:i,objects:o}=t,s=(r=i[0])!=null?r:o[0];s&&n.Camera.focusOn(s)},"handler")}a(Ge,"createHandler");x();function be(n,e,t){let i={markers:{},removeAllMarkers(){t.Markers.removeAll().forEach(u=>{delete this.markers[u.id]}),c()}},{addMarker:o,destroy:s}=Ue(n,t);n.add(i,"removeAllMarkers");let r=n.addFolder("Marker List");n.close();let l=new Map,{rerender:c}=g();function g(){function p(h){var y;delete i.markers[h.id],(y=l.get(h.id))==null||y.destroy()}a(p,"remove");function u(h){let y=Be(t,h,r,{onRemove:v=>{p(v)}});if(!y)return;let{markerItemFolder:f}=y;l.set(h.id,f)}a(u,"add");function b(){r.destroy(),r=n.addFolder("marker");for(let h in i.markers){let y=i.markers[h];u(y)}}return a(b,"rerender"),{rerender:b,add:u,remove:p}}a(g,"createMarkerControls"),n.domElement.classList.add("list-items");let d;t.on("click",({markers:p,coordinate:u})=>{if(!n._closed)if(p[0]){d==null||d.close();let b=l.get(p[0].id);if(n.open(),!b)return;b==null||b.open(),b==null||b.domElement.scrollIntoView({block:"start"}),b==null||b.domElement.focus(),d=b}else o(u)});function m(p){for(let u of p)i.markers[u.id]=u;c()}return a(m,"populateMarkers"),{populateMarkers:m,destroy(){s()}}}a(be,"createMarkerControls");function Be(n,e,t,{onRemove:i}={}){let o=t.addFolder("".concat(e.id.toString().substring(0,8)));o.onChange(c=>{n.updateState(e,{interactive:l.interactive})}),o.close();let s=n.getState(e);if((s==null?void 0:s.type)!=="marker")throw new Error("error getting state for marker: ".concat(e.id));let{interactive:r}=s;if(r==null)throw new Error("incomplte label state");let l={interactive:r,remove(){n.Markers.remove(e),i==null||i(e),o.destroy()}};return o.add(l,"interactive"),o.add(l,"remove"),{markerItemFolder:o,destroy(){o.destroy()}}}a(Be,"addMarkerControlToFolder");function Ue(n,e){let t=n.addFolder("Add"),i={onClick:!1,interactive:!0};return t.add(i,"onClick"),t.add(i,"interactive"),{destroy(){t.destroy()},addMarker(o){return t._closed||!i.onClick?void 0:e.Markers.add(o,"<div>New Marker</div>",{interactive:i.interactive})}}}a(Ue,"createAddControl");x();function ve(n,e){let t=n.addFolder("Walls").close(),i={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};t.add(i,"visible").onChange(r=>{e.updateState("walls",{visible:r})}),t.addColor(i,"topColor").onChange(r=>{e.updateState("walls",{topColor:r})}),t.addColor(i,"color").onChange(r=>{e.updateState("walls",{color:r})}),t.addFolder("Texture - side").add(i.texture,"url").onFinishChange(r=>{e.updateState("walls",{texture:{url:r}})}),t.addFolder("Texture - top").add(i.topTexture,"url").onFinishChange(r=>{e.updateState("walls",{topTexture:{url:r}})}),e.updateState("walls",{topColor:i.topColor}),e.updateState("walls",{color:i.color})}a(ve,"createGeometryControl");x();function ye(n,e,t){var s,r;n.close();let i={language:(r=(s=t.currentLanguage)==null?void 0:s.code)!=null?r:"en"},o=t.getByType("enterprise-venue");n.add(i,"language",o.languages.map(l=>l.code)).onChange(l=>{t.changeLanguage(l)})}a(ye,"createMiscControl");function Ce(n,e){je();let t=new P({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),ue(e,n,t),fe(t,e);let i=t.addFolder("Levels").close(),o=t.addFolder("Scene Controls"),s=t.addFolder("Labels"),r=t.addFolder("Markers");ve(t,e);let l=t.addFolder("misc");ye(l,e,n);let c={level:e.currentFloor.id},{populatelabels:g}=pe(s,n,e),{populateMarkers:d}=be(r,n,e),m=n.getByType("floor").reduce((u,b)=>(u[b.name]=b.id,u),{}),p=i.add(c,"level",m).onChange(u=>{e.setFloor(u),c.level=e.currentFloor.id,p.updateDisplay()});return e.on("floor-change-start",u=>{i.controllers[0].setValue(u.floor.id)}),n.getByType("space").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:g,sceneFolder:o,populateMarkers:d}}a(Ce,"createUi");var xe="mappedin-sdk-debug-css";function je(){if(document.getElementById(xe))return;let n=document.createElement("style");n.id=xe,n.textContent=ge,document.head.appendChild(n)}a(je,"injectCss");var re=class re{constructor(e,t){k(this,"_enabled",!1);k(this,"mv");k(this,"api");k(this,"mapData");k(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=t,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(){var t;if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:e}=Ce(this.mapData,this.mv);le(this.api.core,e),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(i=>{this.mv.updateState(i.id,{interactive:!0})})}get enabled(){return this._enabled}storeState(e,t){if(!this.storeStateToLocalStorageEnabled)return;let i=localStorage.getItem("mappedin-debug"),o=i?JSON.parse(i):{};o[e]={...o[e],...t},localStorage.setItem("mappedin-debug",JSON.stringify(o))}};a(re,"Inspector");var oe=re;export{oe as Inspector};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as he,b as _}from"./chunk-NLGPMWPZ.js";import{a as f,d as le,e as E,j}from"./chunk-GZ7LZ5UP.js";j();j();function T(r,e,t,s){function i(n){return n instanceof t?n:new t(function(o){o(n)})}return f(i,"adopt"),new(t||(t=Promise))(function(n,o){function c(u){try{d(s.next(u))}catch(h){o(h)}}f(c,"fulfilled");function a(u){try{d(s.throw(u))}catch(h){o(h)}}f(a,"rejected");function d(u){u.done?n(u.value):i(u.value).then(c,a)}f(d,"step"),d((s=s.apply(r,e||[])).next())})}f(T,"__awaiter");var pe="ENTRIES",te="KEYS",se="VALUES",b="",G=class G{constructor(e,t){let s=e._tree,i=Array.from(s.keys());this.set=e,this._type=t,this._path=i.length>0?[{node:s,keys:i}]:[]}next(){let e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};let{node:e,keys:t}=v(this._path);if(v(t)===b)return{done:!1,value:this.result()};let s=e.get(v(t));return this._path.push({node:s,keys:Array.from(s.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;let e=v(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>v(e)).filter(e=>e!==b).join("")}value(){return v(this._path).node.get(b)}result(){switch(this._type){case se:return this.value();case te:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}};f(G,"TreeIterator");var M=G,v=f(r=>r[r.length-1],"last$1"),me=f((r,e,t)=>{let s=new Map;if(e===void 0)return s;let i=e.length+1,n=i+t,o=new Uint8Array(n*i).fill(t+1);for(let c=0;c<i;++c)o[c]=c;for(let c=1;c<n;++c)o[c*i]=c;return ie(r,e,t,s,o,1,i,""),s},"fuzzySearch"),ie=f((r,e,t,s,i,n,o,c)=>{let a=n*o;e:for(let d of r.keys())if(d===b){let u=i[a-1];u<=t&&s.set(c,[r.get(d),u])}else{let u=n;for(let h=0;h<d.length;++h,++u){let l=d[h],m=o*u,y=m-o,p=i[m],g=Math.max(0,u-t-1),w=Math.min(o-1,u+t);for(let S=g;S<w;++S){let R=l!==e[S],D=i[y+S]+ +R,L=i[y+S+1]+1,x=i[m+S]+1,F=i[m+S+1]=Math.min(D,L,x);F<p&&(p=F)}if(p>t)continue e}ie(r.get(d),e,t,s,i,u,o,c+d)}},"recurse"),z=class z{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");let[t,s]=V(this._tree,e.slice(this._prefix.length));if(t===void 0){let[i,n]=Q(s);for(let o of i.keys())if(o!==b&&o.startsWith(n)){let c=new Map;return c.set(o.slice(n.length),i.get(o)),new z(c,e)}}return new z(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,ge(this._tree,e)}entries(){return new M(this,pe)}forEach(e){for(let[t,s]of this)e(t,s,this)}fuzzyGet(e,t){return me(this._tree,e,t)}get(e){let t=N(this._tree,e);return t!==void 0?t.get(b):void 0}has(e){let t=N(this._tree,e);return t!==void 0&&t.has(b)}keys(){return new M(this,te)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,P(this._tree,e).set(b,t),this}get size(){if(this._size)return this._size;this._size=0;let e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let s=P(this._tree,e);return s.set(b,t(s.get(b))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let s=P(this._tree,e),i=s.get(b);return i===void 0&&s.set(b,i=t()),i}values(){return new M(this,se)}[Symbol.iterator](){return this.entries()}static from(e){let t=new z;for(let[s,i]of e)t.set(s,i);return t}static fromObject(e){return z.from(Object.entries(e))}};f(z,"SearchableMap");var C=z,V=f((r,e,t=[])=>{if(e.length===0||r==null)return[r,t];for(let s of r.keys())if(s!==b&&e.startsWith(s))return t.push([r,s]),V(r.get(s),e.slice(s.length),t);return t.push([r,e]),V(void 0,"",t)},"trackDown"),N=f((r,e)=>{if(e.length===0||r==null)return r;for(let t of r.keys())if(t!==b&&e.startsWith(t))return N(r.get(t),e.slice(t.length))},"lookup"),P=f((r,e)=>{let t=e.length;e:for(let s=0;r&&s<t;){for(let n of r.keys())if(n!==b&&e[s]===n[0]){let o=Math.min(t-s,n.length),c=1;for(;c<o&&e[s+c]===n[c];)++c;let a=r.get(n);if(c===n.length)r=a;else{let d=new Map;d.set(n.slice(c),a),r.set(e.slice(s,s+c),d),r.delete(n),r=d}s+=c;continue e}let i=new Map;return r.set(e.slice(s),i),i}return r},"createPath"),ge=f((r,e)=>{let[t,s]=V(r,e);if(t!==void 0){if(t.delete(b),t.size===0)ne(s);else if(t.size===1){let[i,n]=t.entries().next().value;oe(s,i,n)}}},"remove"),ne=f(r=>{if(r.length===0)return;let[e,t]=Q(r);if(e.delete(t),e.size===0)ne(r.slice(0,-1));else if(e.size===1){let[s,i]=e.entries().next().value;s!==b&&oe(r.slice(0,-1),s,i)}},"cleanup"),oe=f((r,e,t)=>{if(r.length===0)return;let[s,i]=Q(r);s.set(i+e,t),s.delete(i)},"merge"),Q=f(r=>r[r.length-1],"last"),U="or",re="and",_e="and_not",I=class I{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');let t=e.autoVacuum==null||e.autoVacuum===!0?$:e.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},B),e),{autoVacuum:t,searchOptions:Object.assign(Object.assign({},Z),e.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},xe),e.autoSuggestOptions||{})}),this._index=new C,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=q,this.addFields(this._options.fields)}add(e){let{extractField:t,tokenize:s,processTerm:i,fields:n,idField:o}=this._options,c=t(e,o);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(o,'"'));if(this._idToShortId.has(c))throw new Error("MiniSearch: duplicate ID ".concat(c));let a=this.addDocumentId(c);this.saveStoredFields(a,e);for(let d of n){let u=t(e,d);if(u==null)continue;let h=s(u.toString(),d),l=this._fieldIds[d],m=new Set(h).size;this.addFieldLength(a,l,this._documentCount-1,m);for(let y of h){let p=i(y,d);if(Array.isArray(p))for(let g of p)this.addTerm(l,a,g);else p&&this.addTerm(l,a,p)}}}addAll(e){for(let t of e)this.add(t)}addAllAsync(e,t={}){let{chunkSize:s=10}=t,i={chunk:[],promise:Promise.resolve()},{chunk:n,promise:o}=e.reduce(({chunk:c,promise:a},d,u)=>(c.push(d),(u+1)%s===0?{chunk:[],promise:a.then(()=>new Promise(h=>setTimeout(h,0))).then(()=>this.addAll(c))}:{chunk:c,promise:a}),i);return o.then(()=>this.addAll(n))}remove(e){let{tokenize:t,processTerm:s,extractField:i,fields:n,idField:o}=this._options,c=i(e,o);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(o,'"'));let a=this._idToShortId.get(c);if(a==null)throw new Error("MiniSearch: cannot remove document with ID ".concat(c,": it is not in the index"));for(let d of n){let u=i(e,d);if(u==null)continue;let h=t(u.toString(),d),l=this._fieldIds[d],m=new Set(h).size;this.removeFieldLength(a,l,this._documentCount,m);for(let y of h){let p=s(y,d);if(Array.isArray(p))for(let g of p)this.removeTerm(l,a,g);else p&&this.removeTerm(l,a,p)}}this._storedFields.delete(a),this._documentIds.delete(a),this._idToShortId.delete(c),this._fieldLength.delete(a),this._documentCount-=1}removeAll(e){if(e)for(let t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new C,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){let t=this._idToShortId.get(e);if(t==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(e,": it is not in the index"));this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((s,i)=>{this.removeFieldLength(t,i,this._documentCount,s)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;let{minDirtFactor:e,minDirtCount:t,batchSize:s,batchWait:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:s,batchWait:i},{minDirtCount:t,minDirtFactor:e})}discardAll(e){let t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(let s of e)this.discard(s)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){let{idField:t,extractField:s}=this._options,i=s(e,t);this.discard(i),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{let s=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=q,this.performVacuuming(e,s)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}performVacuuming(e,t){return T(this,void 0,void 0,function*(){let s=this._dirtCount;if(this.vacuumConditionsMet(t)){let i=e.batchSize||J.batchSize,n=e.batchWait||J.batchWait,o=1;for(let[c,a]of this._index){for(let[d,u]of a)for(let[h]of u)this._documentIds.has(h)||(u.size<=1?a.delete(d):u.delete(h));this._index.get(c).size===0&&this._index.delete(c),o%i===0&&(yield new Promise(d=>setTimeout(d,n))),o+=1}this._dirtCount-=s}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:s}=e;return t=t||$.minDirtCount,s=s||$.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=s}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){let t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){let s=this.executeQuery(e,t),i=[];for(let[n,{score:o,terms:c,match:a}]of s){let d=c.length||1,u={id:this._documentIds.get(n),score:o*d,terms:Object.keys(a),queryTerms:c,match:a};Object.assign(u,this._storedFields.get(n)),(t.filter==null||t.filter(u))&&i.push(u)}return e===I.wildcard&&t.boostDocument==null&&this._options.searchOptions.boostDocument==null||i.sort(X),i}autoSuggest(e,t={}){t=Object.assign(Object.assign({},this._options.autoSuggestOptions),t);let s=new Map;for(let{score:n,terms:o}of this.search(e,t)){let c=o.join(" "),a=s.get(c);a!=null?(a.score+=n,a.count+=1):s.set(c,{score:n,terms:o,count:1})}let i=[];for(let[n,{score:o,terms:c,count:a}]of s)i.push({suggestion:n,terms:c,score:o/a});return i.sort(X),i}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static loadJSONAsync(e,t){return T(this,void 0,void 0,function*(){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)})}static getDefault(e){if(B.hasOwnProperty(e))return W(B,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))}static loadJS(e,t){let{index:s,documentIds:i,fieldLength:n,storedFields:o,serializationVersion:c}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=A(i),a._fieldLength=A(n),a._storedFields=A(o);for(let[d,u]of a._documentIds)a._idToShortId.set(u,d);for(let[d,u]of s){let h=new Map;for(let l of Object.keys(u)){let m=u[l];c===1&&(m=m.ds),h.set(parseInt(l,10),A(m))}a._index.set(d,h)}return a}static loadJSAsync(e,t){return T(this,void 0,void 0,function*(){let{index:s,documentIds:i,fieldLength:n,storedFields:o,serializationVersion:c}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=yield k(i),a._fieldLength=yield k(n),a._storedFields=yield k(o);for(let[u,h]of a._documentIds)a._idToShortId.set(h,u);let d=0;for(let[u,h]of s){let l=new Map;for(let m of Object.keys(h)){let y=h[m];c===1&&(y=y.ds),l.set(parseInt(m,10),yield k(y))}++d%1e3===0&&(yield ce(0)),a._index.set(u,l)}return a})}static instantiateMiniSearch(e,t){let{documentCount:s,nextId:i,fieldIds:n,averageFieldLength:o,dirtCount:c,serializationVersion:a}=e;if(a!==1&&a!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");let d=new I(t);return d._documentCount=s,d._nextId=i,d._idToShortId=new Map,d._fieldIds=n,d._avgFieldLength=o,d._dirtCount=c||0,d._index=new C,d}executeQuery(e,t={}){if(e===I.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){let l=Object.assign(Object.assign(Object.assign({},t),e),{queries:void 0}),m=e.queries.map(y=>this.executeQuery(y,l));return this.combineResults(m,l.combineWith)}let{tokenize:s,processTerm:i,searchOptions:n}=this._options,o=Object.assign(Object.assign({tokenize:s,processTerm:i},n),t),{tokenize:c,processTerm:a}=o,h=c(e).flatMap(l=>a(l)).filter(l=>!!l).map(we(o)).map(l=>this.executeQuerySpec(l,o));return this.combineResults(h,o.combineWith)}executeQuerySpec(e,t){let s=Object.assign(Object.assign({},this._options.searchOptions),t),i=(s.fields||this._options.fields).reduce((p,g)=>Object.assign(Object.assign({},p),{[g]:W(s.boost,g)||1}),{}),{boostDocument:n,weights:o,maxFuzzy:c,bm25:a}=s,{fuzzy:d,prefix:u}=Object.assign(Object.assign({},Z.weights),o),h=this._index.get(e.term),l=this.termResults(e.term,e.term,1,e.termBoost,h,i,n,a),m,y;if(e.prefix&&(m=this._index.atPrefix(e.term)),e.fuzzy){let p=e.fuzzy===!0?.2:e.fuzzy,g=p<1?Math.min(c,Math.round(e.term.length*p)):p;g&&(y=this._index.fuzzyGet(e.term,g))}if(m)for(let[p,g]of m){let w=p.length-e.term.length;if(!w)continue;y==null||y.delete(p);let S=u*p.length/(p.length+.3*w);this.termResults(e.term,p,S,e.termBoost,g,i,n,a,l)}if(y)for(let p of y.keys()){let[g,w]=y.get(p);if(!w)continue;let S=d*p.length/(p.length+w);this.termResults(e.term,p,S,e.termBoost,g,i,n,a,l)}return l}executeWildcardQuery(e){let t=new Map,s=Object.assign(Object.assign({},this._options.searchOptions),e);for(let[i,n]of this._documentIds){let o=s.boostDocument?s.boostDocument(n,"",this._storedFields.get(i)):1;t.set(i,{score:o,terms:[],match:{}})}return t}combineResults(e,t=U){if(e.length===0)return new Map;let s=t.toLowerCase(),i=ye[s];if(!i)throw new Error("Invalid combination operator: ".concat(t));return e.reduce(i)||new Map}toJSON(){let e=[];for(let[t,s]of this._index){let i={};for(let[n,o]of s)i[n]=Object.fromEntries(o);e.push([t,i])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,s,i,n,o,c,a,d=new Map){if(n==null)return d;for(let u of Object.keys(o)){let h=o[u],l=this._fieldIds[u],m=n.get(l);if(m==null)continue;let y=m.size,p=this._avgFieldLength[l];for(let g of m.keys()){if(!this._documentIds.has(g)){this.removeTerm(l,g,t),y-=1;continue}let w=c?c(this._documentIds.get(g),t,this._storedFields.get(g)):1;if(!w)continue;let S=m.get(g),R=this._fieldLength.get(g)[l],D=Se(S,y,this._documentCount,R,p,a),L=s*i*h*w*D,x=d.get(g);if(x){x.score+=L,ze(x.terms,e);let F=W(x.match,t);F?F.push(u):x.match[t]=[u]}else d.set(g,{score:L,terms:[e],match:{[t]:[u]}})}}return d}addTerm(e,t,s){let i=this._index.fetch(s,ee),n=i.get(e);if(n==null)n=new Map,n.set(t,1),i.set(e,n);else{let o=n.get(t);n.set(t,(o||0)+1)}}removeTerm(e,t,s){if(!this._index.has(s)){this.warnDocumentChanged(t,e,s);return}let i=this._index.fetch(s,ee),n=i.get(e);n==null||n.get(t)==null?this.warnDocumentChanged(t,e,s):n.get(t)<=1?n.size<=1?i.delete(e):n.delete(t):n.set(t,n.get(t)-1),this._index.get(s).size===0&&this._index.delete(s)}warnDocumentChanged(e,t,s){for(let i of Object.keys(this._fieldIds))if(this._fieldIds[i]===t){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(s,'" was not present in field "').concat(i,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}addDocumentId(e){let t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,s,i){let n=this._fieldLength.get(e);n==null&&this._fieldLength.set(e,n=[]),n[t]=i;let c=(this._avgFieldLength[t]||0)*s+i;this._avgFieldLength[t]=c/(s+1)}removeFieldLength(e,t,s,i){if(s===1){this._avgFieldLength[t]=0;return}let n=this._avgFieldLength[t]*s-i;this._avgFieldLength[t]=n/(s-1)}saveStoredFields(e,t){let{storeFields:s,extractField:i}=this._options;if(s==null||s.length===0)return;let n=this._storedFields.get(e);n==null&&this._storedFields.set(e,n={});for(let o of s){let c=i(t,o);c!==void 0&&(n[o]=c)}}};f(I,"MiniSearch");var O=I;O.wildcard=Symbol("*");var W=f((r,e)=>Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0,"getOwnProperty"),ye={[U]:(r,e)=>{for(let t of e.keys()){let s=r.get(t);if(s==null)r.set(t,e.get(t));else{let{score:i,terms:n,match:o}=e.get(t);s.score=s.score+i,s.match=Object.assign(s.match,o),H(s.terms,n)}}return r},[re]:(r,e)=>{let t=new Map;for(let s of e.keys()){let i=r.get(s);if(i==null)continue;let{score:n,terms:o,match:c}=e.get(s);H(i.terms,o),t.set(s,{score:i.score+n,terms:i.terms,match:Object.assign(i.match,c)})}return t},[_e]:(r,e)=>{for(let t of e.keys())r.delete(t);return r}},be={k:1.2,b:.7,d:.5},Se=f((r,e,t,s,i,n)=>{let{k:o,b:c,d:a}=n;return Math.log(1+(t-e+.5)/(e+.5))*(a+r*(o+1)/(r+o*(1-c+c*s/i)))},"calcBM25Score"),we=f(r=>(e,t,s)=>{let i=typeof r.fuzzy=="function"?r.fuzzy(e,t,s):r.fuzzy||!1,n=typeof r.prefix=="function"?r.prefix(e,t,s):r.prefix===!0,o=typeof r.boostTerm=="function"?r.boostTerm(e,t,s):1;return{term:e,fuzzy:i,prefix:n,termBoost:o}},"termToQuerySpec"),B={idField:"id",extractField:(r,e)=>r[e],tokenize:r=>r.split(Oe),processTerm:r=>r.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(r,e)=>{typeof(console==null?void 0:console[r])=="function"&&console[r](e)},autoVacuum:!0},Z={combineWith:U,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:be},xe={combineWith:re,prefix:(r,e,t)=>e===t.length-1},J={batchSize:1e3,batchWait:10},q={minDirtFactor:.1,minDirtCount:20},$=Object.assign(Object.assign({},J),q),ze=f((r,e)=>{r.includes(e)||r.push(e)},"assignUniqueTerm"),H=f((r,e)=>{for(let t of e)r.includes(t)||r.push(t)},"assignUniqueTerms"),X=f(({score:r},{score:e})=>e-r,"byScore"),ee=f(()=>new Map,"createMap"),A=f(r=>{let e=new Map;for(let t of Object.keys(r))e.set(parseInt(t,10),r[t]);return e},"objectToNumericMap"),k=f(r=>T(void 0,void 0,void 0,function*(){let e=new Map,t=0;for(let s of Object.keys(r))e.set(parseInt(s,10),r[s]),++t%1e3===0&&(yield ce(0));return e}),"objectToNumericMapAsync"),ce=f(r=>new Promise(e=>setTimeout(e,r)),"wait"),Oe=/[\n\r\p{Z}\p{P}]+/u;var de=le(he());var Y=class Y{constructor(e){E(this,"mapData");E(this,"indexes");E(this,"ready");this.mapData=e,this.indexes=Fe(e),this.ready=this.populate()}async populate(){let{places:e,enterpriseLocations:t,enterpriseCategories:s}=this.indexes,i=this.mapData,n=[];return e.removeAll(),n.concat([e.addAllAsync(i.getByType("space")),e.addAllAsync(i.getByType("point-of-interest")),e.addAllAsync(i.getByType("connection")),e.addAllAsync(i.getByType("floor")),e.addAllAsync(i.getByType("door")),e.addAllAsync(i.getByType("annotation"))]),t&&(t==null||t.removeAll(),n.push(t.addAllAsync(i.getByType("enterprise-location")))),s&&(s==null||s.removeAll(),n.push(s.addAllAsync(i.getByType("enterprise-category")))),Promise.all(n)}async search(e,t={}){var a,d;await this.ready,Me.parse(t);let s=(0,de.default)({},t,Ie),i=this.indexes.places.search(e,{fields:Object.keys(s.places.fields).filter(u=>s.places.fields[u])}).slice(0,s.places.limit),n=(a=this.indexes.enterpriseLocations)==null?void 0:a.search(e,{fields:Object.keys(s.enterpriseLocations.fields).filter(u=>s.enterpriseLocations.fields[u])}).slice(0,s.enterpriseLocations.limit),o=(d=this.indexes.enterpriseCategories)==null?void 0:d.search(e,{fields:Object.keys(s.enterpriseCategories.fields).filter(u=>s.enterpriseCategories.fields[u])}).slice(0,s.enterpriseCategories.limit),c=ve(this.mapData,{placesResult:i,locationsResult:n,categoriesResult:o});return this.mapData.Analytics.capture("$query-search",{query:e}),c}async suggest(e,t={}){await this.ready,Ce.parse(t);let s=[],{places:{enabled:i=!0}={},enterpriseLocations:{enabled:n=!0}={}}=t;return n&&this.indexes.enterpriseLocations&&this.indexes.enterpriseLocations.autoSuggest(e,{fields:["name","tags"],combineWith:"AND",prefix:!0,boost:{name:2,tags:1}}).forEach(o=>s.push(o)),i&&this.indexes.places.autoSuggest(e,{fields:["name"],combineWith:"AND",prefix:!0}).forEach(o=>s.push(o)),s.sort((o,c)=>c.score-o.score),this.mapData.Analytics.capture("$query-suggest",{query:e,suggestions:s.map(o=>o.suggestion)}),s}};f(Y,"InternalSearch");var ae=Y;function ve(r,{placesResult:e,locationsResult:t,categoriesResult:s}){let i=e.reduce((c,{id:a,match:d,score:u,__type:h})=>{let l=r.getById(h,a);return l&&c.push({type:l.__type,match:d,score:u,item:l}),c},[]),n;if(t){n=[];for(let{id:c,match:a,score:d}of t){let u=r.getById("enterprise-location",c);u&&n.push({type:u.__type,match:a,score:d,item:u})}}let o;if(s){o=[];for(let{id:c,match:a,score:d}of s){let u=r.getById("enterprise-category",c);u&&o.push({type:u.__type,match:a,score:d,item:u})}}return{places:i,enterpriseLocations:n,enterpriseCategories:o}}f(ve,"processSearchResult");var Ie={places:{fields:{name:!0,description:!0},limit:5},enterpriseCategories:{fields:{name:!0,description:!1,"locations.name":!0},limit:5},enterpriseLocations:{fields:{name:!0,tags:!0,description:!0},limit:5}};function K(r){return r.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()}f(K,"removeAccents");function Fe(r){let e=new O({fields:["name","description"],storeFields:["id","__type"],searchOptions:{fuzzy:.2,prefix:!0,boost:{name:2},combineWith:"AND"},extractField:(o,c)=>{let a=o[c];return typeof a=="string"?K(a):o[c]},processTerm:o=>Le.has(o)?"":o.toLowerCase()}),t=r.getByType("enterprise-location"),s;t&&(s=new O({fields:["name","tags","description"],storeFields:["id","__type"],searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:3,tags:2,description:1}},extractField:(o,c)=>Array.isArray(o[c])?o[c].join(" "):typeof o[c]=="string"?K(o[c]):o[c]}));let i=r.getByType("enterprise-category"),n;return i&&(n=new O({fields:["name","description","locations.name"],storeFields:["id","__type"],extractField(o,c){return c==="locations.name"?o.locations.reduce((d,u)=>d+" ".concat(ue," ")+u.name,"")+" ".concat(ue):typeof o[c]=="string"?K(o[c]):o[c]},searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:2,"locations.name":2}}})),{enterpriseCategories:n,enterpriseLocations:s,places:e}}f(Fe,"buildIndexes");var Me=_.object({places:_.object({fields:_.object({name:_.boolean().optional(),description:_.boolean().optional()}).optional(),limit:_.number().positive().optional()}).optional(),enterpriseCategories:_.object({fields:_.object({name:_.boolean().optional(),description:_.boolean().optional(),"locations.name":_.boolean().optional()}).optional(),limit:_.number().positive().optional()}).optional(),enterpriseLocations:_.object({fields:_.object({name:_.boolean().optional(),tags:_.boolean().optional(),description:_.boolean().optional()}).optional(),limit:_.number().positive().optional()}).optional()}),Ce=_.object({places:_.object({enabled:_.boolean().optional()}).optional(),enterpriseLocations:_.object({enabled:_.boolean().optional()}).optional()}),Le=new Set(["the","an","and","or","of","in","on","at","to","from","with","by","for"]),ue="";export{ae as InternalSearch,K as removeAccents};
|