From 44c737cf306626fa506d6d2c1ff29c820a2ba7b9 Mon Sep 17 00:00:00 2001 From: h0lybyte <5599058+h0lybyte@users.noreply.github.com> Date: Tue, 23 Jul 2024 03:09:31 +0000 Subject: [PATCH] Merge pull request #2455 from KBVE/beta Preparing Release Branch --- .../{App.BSevNEVi.js => App.DyKrbSQd.js} | 85 +++++++++--------- docs/_astro/index.C407iWx6.css | 1 - docs/_astro/index.s0AqZbUS.css | 1 + docs/assets/items/npc/avatars/chip_bard.webp | Bin 0 -> 182074 bytes docs/index.html | 45 ++++------ 5 files changed, 62 insertions(+), 70 deletions(-) rename docs/_astro/{App.BSevNEVi.js => App.DyKrbSQd.js} (97%) delete mode 100644 docs/_astro/index.C407iWx6.css create mode 100644 docs/_astro/index.s0AqZbUS.css create mode 100644 docs/assets/items/npc/avatars/chip_bard.webp diff --git a/docs/_astro/App.BSevNEVi.js b/docs/_astro/App.DyKrbSQd.js similarity index 97% rename from docs/_astro/App.BSevNEVi.js rename to docs/_astro/App.DyKrbSQd.js index 6674450..372b99d 100644 --- a/docs/_astro/App.BSevNEVi.js +++ b/docs/_astro/App.DyKrbSQd.js @@ -1,4 +1,4 @@ -import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as kd,R as Ou,r as Ce,c as Ty}from"./index.SSXOyoI7.js";import{p as FL,a as jd}from"./index.DxhZiom7.js";import{t as Ir}from"./index.BH1EYZ08.js";var PM={exports:{}},ln={};/** +import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as kd,R as Ou,r as Me,c as Ty}from"./index.SSXOyoI7.js";import{p as FL,a as jd}from"./index.DxhZiom7.js";import{t as Ir}from"./index.BH1EYZ08.js";var PM={exports:{}},ln={};/** * @license React * react-is.production.min.js * @@ -13,10 +13,10 @@ import{j as Yt}from"./jsx-runtime.BPj4-Rfu.js";import{g as kd,R as Ou,r as Ce,c * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Nr=typeof Symbol=="function"&&Symbol.for,Ux=Nr?Symbol.for("react.element"):60103,zx=Nr?Symbol.for("react.portal"):60106,Hm=Nr?Symbol.for("react.fragment"):60107,Wm=Nr?Symbol.for("react.strict_mode"):60108,Xm=Nr?Symbol.for("react.profiler"):60114,Ym=Nr?Symbol.for("react.provider"):60109,km=Nr?Symbol.for("react.context"):60110,Gx=Nr?Symbol.for("react.async_mode"):60111,jm=Nr?Symbol.for("react.concurrent_mode"):60111,Km=Nr?Symbol.for("react.forward_ref"):60112,Zm=Nr?Symbol.for("react.suspense"):60113,zL=Nr?Symbol.for("react.suspense_list"):60120,Jm=Nr?Symbol.for("react.memo"):60115,$m=Nr?Symbol.for("react.lazy"):60116,GL=Nr?Symbol.for("react.block"):60121,VL=Nr?Symbol.for("react.fundamental"):60117,HL=Nr?Symbol.for("react.responder"):60118,WL=Nr?Symbol.for("react.scope"):60119;function sa(g){if(typeof g=="object"&&g!==null){var t=g.$$typeof;switch(t){case Ux:switch(g=g.type,g){case Gx:case jm:case Hm:case Xm:case Wm:case Zm:return g;default:switch(g=g&&g.$$typeof,g){case km:case Km:case $m:case Jm:case Ym:return g;default:return t}}case zx:return t}}}function FM(g){return sa(g)===jm}hn.AsyncMode=Gx;hn.ConcurrentMode=jm;hn.ContextConsumer=km;hn.ContextProvider=Ym;hn.Element=Ux;hn.ForwardRef=Km;hn.Fragment=Hm;hn.Lazy=$m;hn.Memo=Jm;hn.Portal=zx;hn.Profiler=Xm;hn.StrictMode=Wm;hn.Suspense=Zm;hn.isAsyncMode=function(g){return FM(g)||sa(g)===Gx};hn.isConcurrentMode=FM;hn.isContextConsumer=function(g){return sa(g)===km};hn.isContextProvider=function(g){return sa(g)===Ym};hn.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===Ux};hn.isForwardRef=function(g){return sa(g)===Km};hn.isFragment=function(g){return sa(g)===Hm};hn.isLazy=function(g){return sa(g)===$m};hn.isMemo=function(g){return sa(g)===Jm};hn.isPortal=function(g){return sa(g)===zx};hn.isProfiler=function(g){return sa(g)===Xm};hn.isStrictMode=function(g){return sa(g)===Wm};hn.isSuspense=function(g){return sa(g)===Zm};hn.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===Hm||g===jm||g===Xm||g===Wm||g===Zm||g===zL||typeof g=="object"&&g!==null&&(g.$$typeof===$m||g.$$typeof===Jm||g.$$typeof===Ym||g.$$typeof===km||g.$$typeof===Km||g.$$typeof===VL||g.$$typeof===HL||g.$$typeof===WL||g.$$typeof===GL)};hn.typeOf=sa;LM.exports=hn;var XL=LM.exports,Vx=XL,YL={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},kL={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},jL={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},OM={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Hx={};Hx[Vx.ForwardRef]=jL;Hx[Vx.Memo]=OM;function XS(g){return Vx.isMemo(g)?OM:Hx[g.$$typeof]||YL}var KL=Object.defineProperty,ZL=Object.getOwnPropertyNames,YS=Object.getOwnPropertySymbols,JL=Object.getOwnPropertyDescriptor,$L=Object.getPrototypeOf,kS=Object.prototype;function DM(g,t,i){if(typeof t!="string"){if(kS){var x=$L(t);x&&x!==kS&&DM(g,x,i)}var T=ZL(t);YS&&(T=T.concat(YS(t)));for(var E=XS(g),s=XS(t),y=0;y1?t-1:0),x=1;x0?" Args: "+i.join(", "):""))}var tF=function(){function g(i){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=i}var t=g.prototype;return t.indexOfGroup=function(i){for(var x=0,T=0;T=this.groupSizes.length){for(var T=this.groupSizes,E=T.length,s=E;i>=s;)(s<<=1)<0&&Kd(16,""+i);this.groupSizes=new Uint32Array(s),this.groupSizes.set(T),this.length=s;for(var y=E;y=this.length||this.groupSizes[i]===0)return x;for(var T=this.groupSizes[i],E=this.indexOfGroup(i),s=E+T,y=E;y=od&&(od=t+1),_v.set(g,t),vm.set(t,g)},nF="style["+Zf+'][data-styled-version="5.3.6"]',rF=new RegExp("^"+Zf+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),sF=function(g,t,i){for(var x,T=i.split(","),E=0,s=T.length;E=0;r--){var p=e[r];if(p&&p.nodeType===1&&p.hasAttribute(Zf))return p}}(i),E=T!==void 0?T.nextSibling:null;x.setAttribute(Zf,"active"),x.setAttribute("data-styled-version","5.3.6");var s=oF();return s&&x.setAttribute("nonce",s),i.insertBefore(x,E),x},lF=function(){function g(i){var x=this.element=IM(i);x.appendChild(document.createTextNode("")),this.sheet=function(T){if(T.sheet)return T.sheet;for(var E=document.styleSheets,s=0,y=E.length;s=0){var T=document.createTextNode(x),E=this.nodes[i];return this.element.insertBefore(T,E||null),this.length++,!0}return!1},t.deleteRule=function(i){this.element.removeChild(this.nodes[i]),this.length--},t.getRule=function(i){return i0&&(h+=a+",")}),E+=""+r+p+'{content:"'+h+`"}/*!sc*/ -`}}}return E}(this)},g}(),cF=/(a)(d)/gi,JS=function(g){return String.fromCharCode(g+(g>25?39:97))};function My(g){var t,i="";for(t=Math.abs(g);t>52;t=t/52|0)i=JS(t%52)+i;return(JS(t%52)+i).replace(cF,"$1-$2")}var Bf=function(g,t){for(var i=t.length;i;)g=33*g^t.charCodeAt(--i);return g},BM=function(g){return Bf(5381,g)};function dF(g){for(var t=0;t>>0);if(!i.hasNameForId(T,y)){var e=x(s,"."+y,void 0,T);i.insertRules(T,y,e)}E.push(y),this.staticRulesId=y}else{for(var r=this.rules.length,p=Bf(this.baseHash,x.hash),h="",a=0;a>>0);if(!i.hasNameForId(T,f)){var o=x(h,"."+f,void 0,T);i.insertRules(T,f,o)}E.push(f)}}return E.join(" ")},g}(),mF=/^\s*\/\/.*$/gm,gF=[":","[",".","#"];function yF(g){var t,i,x,T,E=g===void 0?fh:g,s=E.options,y=s===void 0?fh:s,e=E.plugins,r=e===void 0?pm:e,p=new IL(y),h=[],a=function(u){function f(o){if(o)try{u(o+"}")}catch{}}return function(o,c,d,v,m,S,M,w,C,A){switch(o){case 1:if(C===0&&c.charCodeAt(0)===64)return u(c+";"),"";break;case 2:if(w===0)return c+"/*|*/";break;case 3:switch(w){case 102:case 112:return u(d[0]+c),"";default:return c+(A===0?"/*|*/":"")}case-2:c.split("/*|*/}").forEach(f)}}}(function(u){h.push(u)}),l=function(u,f,o){return f===0&&gF.indexOf(o[i.length])!==-1||o.match(T)?u:"."+t};function n(u,f,o,c){c===void 0&&(c="&");var d=u.replace(mF,""),v=f&&o?o+" "+f+" { "+d+" }":d;return t=c,i=f,x=new RegExp("\\"+i+"\\b","g"),T=new RegExp("(\\"+i+"\\b){2,}"),p(o||!f?"":f,v)}return p.use([].concat(r,[function(u,f,o){u===2&&o.length&&o[0].lastIndexOf(i)>0&&(o[0]=o[0].replace(x,l))},a,function(u){if(u===-2){var f=h;return h=[],f}}])),n.hash=r.length?r.reduce(function(u,f){return f.name||Kd(15),Bf(u,f.name)},5381).toString():"",n}var UM=Ou.createContext();UM.Consumer;var zM=Ou.createContext(),xF=(zM.Consumer,new NM),Cy=yF();function SF(){return Ce.useContext(UM)||xF}function TF(){return Ce.useContext(zM)||Cy}var EF=function(){function g(t,i){var x=this;this.inject=function(T,E){E===void 0&&(E=Cy);var s=x.name+E.hash;T.hasNameForId(x.id,s)||T.insertRules(x.id,s,E(x.rules,s,"@keyframes"))},this.toString=function(){return Kd(12,String(x.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=i}return g.prototype.getName=function(t){return t===void 0&&(t=Cy),this.name+t.hash},g}(),MF=/([A-Z])/,CF=/([A-Z])/g,wF=/^ms-/,AF=function(g){return"-"+g.toLowerCase()};function $S(g){return MF.test(g)?g.replace(CF,AF).replace(wF,"-ms-"):g}var QS=function(g){return g==null||g===!1||g===""};function Jf(g,t,i,x){if(Array.isArray(g)){for(var T,E=[],s=0,y=g.length;s1?t-1:0),x=1;x?@[\\\]^`{|}~-]+/g,LF=/(^-|-$)/g;function d0(g){return g.replace(bF,"-").replace(LF,"")}var FF=function(g){return My(BM(g)>>>0)};function iv(g){return typeof g=="string"&&!0}var wy=function(g){return typeof g=="function"||typeof g=="object"&&g!==null&&!Array.isArray(g)},OF=function(g){return g!=="__proto__"&&g!=="constructor"&&g!=="prototype"};function DF(g,t,i){var x=g[i];wy(t)&&wy(x)?GM(x,t):g[i]=t}function GM(g){for(var t=arguments.length,i=new Array(t>1?t-1:0),x=1;x=0||(A[w]=S[w]);return A}(t,["componentId"]),m=d&&d+"-"+(iv(c)?c:d0(KS(c)));return HM(c,Sl({},v,{attrs:a,componentId:m}),i)},Object.defineProperty(n,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(c){this._foldedDefaultProps=x?GM({},g.defaultProps,c):c}}),n.toString=function(){return"."+n.styledComponentId},T&&_L(n,g,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),n}var mm=function(g){return function t(i,x,T){if(T===void 0&&(T=fh),!bM.isValidElementType(x))return Kd(1,String(x));var E=function(){return i(x,T,PF.apply(void 0,arguments))};return E.withConfig=function(s){return t(i,x,Sl({},T,{},s))},E.attrs=function(s){return t(i,x,Sl({},T,{attrs:Array.prototype.concat(T.attrs,s).filter(Boolean)}))},E}(HM,g)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(g){mm[g]=mm(g)});var WM={exports:{}};(function(g,t){(function(x,T){g.exports=T()})(Ty,()=>(()=>{var i={50792:s=>{var y=Object.prototype.hasOwnProperty,e="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(e=!1));function p(n,u,f){this.fn=n,this.context=u,this.once=f||!1}function h(n,u,f,o,c){if(typeof f!="function")throw new TypeError("The listener must be a function");var d=new p(f,o||n,c),v=e?e+u:u;return n._events[v]?n._events[v].fn?n._events[v]=[n._events[v],d]:n._events[v].push(d):(n._events[v]=d,n._eventsCount++),n}function a(n,u){--n._eventsCount===0?n._events=new r:delete n._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],f,o;if(this._eventsCount===0)return u;for(o in f=this._events)y.call(f,o)&&u.push(e?o.slice(1):o);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},l.prototype.listeners=function(u){var f=e?e+u:u,o=this._events[f];if(!o)return[];if(o.fn)return[o.fn];for(var c=0,d=o.length,v=new Array(d);c{/** + */var Nr=typeof Symbol=="function"&&Symbol.for,Ux=Nr?Symbol.for("react.element"):60103,zx=Nr?Symbol.for("react.portal"):60106,Hm=Nr?Symbol.for("react.fragment"):60107,Wm=Nr?Symbol.for("react.strict_mode"):60108,Xm=Nr?Symbol.for("react.profiler"):60114,Ym=Nr?Symbol.for("react.provider"):60109,km=Nr?Symbol.for("react.context"):60110,Gx=Nr?Symbol.for("react.async_mode"):60111,jm=Nr?Symbol.for("react.concurrent_mode"):60111,Km=Nr?Symbol.for("react.forward_ref"):60112,Zm=Nr?Symbol.for("react.suspense"):60113,zL=Nr?Symbol.for("react.suspense_list"):60120,Jm=Nr?Symbol.for("react.memo"):60115,$m=Nr?Symbol.for("react.lazy"):60116,GL=Nr?Symbol.for("react.block"):60121,VL=Nr?Symbol.for("react.fundamental"):60117,HL=Nr?Symbol.for("react.responder"):60118,WL=Nr?Symbol.for("react.scope"):60119;function sa(g){if(typeof g=="object"&&g!==null){var t=g.$$typeof;switch(t){case Ux:switch(g=g.type,g){case Gx:case jm:case Hm:case Xm:case Wm:case Zm:return g;default:switch(g=g&&g.$$typeof,g){case km:case Km:case $m:case Jm:case Ym:return g;default:return t}}case zx:return t}}}function FM(g){return sa(g)===jm}hn.AsyncMode=Gx;hn.ConcurrentMode=jm;hn.ContextConsumer=km;hn.ContextProvider=Ym;hn.Element=Ux;hn.ForwardRef=Km;hn.Fragment=Hm;hn.Lazy=$m;hn.Memo=Jm;hn.Portal=zx;hn.Profiler=Xm;hn.StrictMode=Wm;hn.Suspense=Zm;hn.isAsyncMode=function(g){return FM(g)||sa(g)===Gx};hn.isConcurrentMode=FM;hn.isContextConsumer=function(g){return sa(g)===km};hn.isContextProvider=function(g){return sa(g)===Ym};hn.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===Ux};hn.isForwardRef=function(g){return sa(g)===Km};hn.isFragment=function(g){return sa(g)===Hm};hn.isLazy=function(g){return sa(g)===$m};hn.isMemo=function(g){return sa(g)===Jm};hn.isPortal=function(g){return sa(g)===zx};hn.isProfiler=function(g){return sa(g)===Xm};hn.isStrictMode=function(g){return sa(g)===Wm};hn.isSuspense=function(g){return sa(g)===Zm};hn.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===Hm||g===jm||g===Xm||g===Wm||g===Zm||g===zL||typeof g=="object"&&g!==null&&(g.$$typeof===$m||g.$$typeof===Jm||g.$$typeof===Ym||g.$$typeof===km||g.$$typeof===Km||g.$$typeof===VL||g.$$typeof===HL||g.$$typeof===WL||g.$$typeof===GL)};hn.typeOf=sa;LM.exports=hn;var XL=LM.exports,Vx=XL,YL={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},kL={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},jL={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},OM={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Hx={};Hx[Vx.ForwardRef]=jL;Hx[Vx.Memo]=OM;function XS(g){return Vx.isMemo(g)?OM:Hx[g.$$typeof]||YL}var KL=Object.defineProperty,ZL=Object.getOwnPropertyNames,YS=Object.getOwnPropertySymbols,JL=Object.getOwnPropertyDescriptor,$L=Object.getPrototypeOf,kS=Object.prototype;function DM(g,t,i){if(typeof t!="string"){if(kS){var x=$L(t);x&&x!==kS&&DM(g,x,i)}var T=ZL(t);YS&&(T=T.concat(YS(t)));for(var E=XS(g),s=XS(t),y=0;y1?t-1:0),x=1;x0?" Args: "+i.join(", "):""))}var tF=function(){function g(i){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=i}var t=g.prototype;return t.indexOfGroup=function(i){for(var x=0,T=0;T=this.groupSizes.length){for(var T=this.groupSizes,E=T.length,s=E;i>=s;)(s<<=1)<0&&Kd(16,""+i);this.groupSizes=new Uint32Array(s),this.groupSizes.set(T),this.length=s;for(var y=E;y=this.length||this.groupSizes[i]===0)return x;for(var T=this.groupSizes[i],E=this.indexOfGroup(i),s=E+T,y=E;y=ld&&(ld=t+1),_v.set(g,t),vm.set(t,g)},nF="style["+Jf+'][data-styled-version="5.3.6"]',rF=new RegExp("^"+Jf+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),sF=function(g,t,i){for(var x,T=i.split(","),E=0,s=T.length;E=0;r--){var p=e[r];if(p&&p.nodeType===1&&p.hasAttribute(Jf))return p}}(i),E=T!==void 0?T.nextSibling:null;x.setAttribute(Jf,"active"),x.setAttribute("data-styled-version","5.3.6");var s=oF();return s&&x.setAttribute("nonce",s),i.insertBefore(x,E),x},lF=function(){function g(i){var x=this.element=IM(i);x.appendChild(document.createTextNode("")),this.sheet=function(T){if(T.sheet)return T.sheet;for(var E=document.styleSheets,s=0,y=E.length;s=0){var T=document.createTextNode(x),E=this.nodes[i];return this.element.insertBefore(T,E||null),this.length++,!0}return!1},t.deleteRule=function(i){this.element.removeChild(this.nodes[i]),this.length--},t.getRule=function(i){return i0&&(h+=a+",")}),E+=""+r+p+'{content:"'+h+`"}/*!sc*/ +`}}}return E}(this)},g}(),cF=/(a)(d)/gi,JS=function(g){return String.fromCharCode(g+(g>25?39:97))};function My(g){var t,i="";for(t=Math.abs(g);t>52;t=t/52|0)i=JS(t%52)+i;return(JS(t%52)+i).replace(cF,"$1-$2")}var Bf=function(g,t){for(var i=t.length;i;)g=33*g^t.charCodeAt(--i);return g},BM=function(g){return Bf(5381,g)};function dF(g){for(var t=0;t>>0);if(!i.hasNameForId(T,y)){var e=x(s,"."+y,void 0,T);i.insertRules(T,y,e)}E.push(y),this.staticRulesId=y}else{for(var r=this.rules.length,p=Bf(this.baseHash,x.hash),h="",a=0;a>>0);if(!i.hasNameForId(T,f)){var o=x(h,"."+f,void 0,T);i.insertRules(T,f,o)}E.push(f)}}return E.join(" ")},g}(),mF=/^\s*\/\/.*$/gm,gF=[":","[",".","#"];function yF(g){var t,i,x,T,E=g===void 0?fh:g,s=E.options,y=s===void 0?fh:s,e=E.plugins,r=e===void 0?pm:e,p=new IL(y),h=[],a=function(u){function f(o){if(o)try{u(o+"}")}catch{}}return function(o,c,d,v,m,S,M,w,C,A){switch(o){case 1:if(C===0&&c.charCodeAt(0)===64)return u(c+";"),"";break;case 2:if(w===0)return c+"/*|*/";break;case 3:switch(w){case 102:case 112:return u(d[0]+c),"";default:return c+(A===0?"/*|*/":"")}case-2:c.split("/*|*/}").forEach(f)}}}(function(u){h.push(u)}),l=function(u,f,o){return f===0&&gF.indexOf(o[i.length])!==-1||o.match(T)?u:"."+t};function n(u,f,o,c){c===void 0&&(c="&");var d=u.replace(mF,""),v=f&&o?o+" "+f+" { "+d+" }":d;return t=c,i=f,x=new RegExp("\\"+i+"\\b","g"),T=new RegExp("(\\"+i+"\\b){2,}"),p(o||!f?"":f,v)}return p.use([].concat(r,[function(u,f,o){u===2&&o.length&&o[0].lastIndexOf(i)>0&&(o[0]=o[0].replace(x,l))},a,function(u){if(u===-2){var f=h;return h=[],f}}])),n.hash=r.length?r.reduce(function(u,f){return f.name||Kd(15),Bf(u,f.name)},5381).toString():"",n}var UM=Ou.createContext();UM.Consumer;var zM=Ou.createContext(),xF=(zM.Consumer,new NM),Cy=yF();function SF(){return Me.useContext(UM)||xF}function TF(){return Me.useContext(zM)||Cy}var EF=function(){function g(t,i){var x=this;this.inject=function(T,E){E===void 0&&(E=Cy);var s=x.name+E.hash;T.hasNameForId(x.id,s)||T.insertRules(x.id,s,E(x.rules,s,"@keyframes"))},this.toString=function(){return Kd(12,String(x.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=i}return g.prototype.getName=function(t){return t===void 0&&(t=Cy),this.name+t.hash},g}(),MF=/([A-Z])/,CF=/([A-Z])/g,wF=/^ms-/,AF=function(g){return"-"+g.toLowerCase()};function $S(g){return MF.test(g)?g.replace(CF,AF).replace(wF,"-ms-"):g}var QS=function(g){return g==null||g===!1||g===""};function $f(g,t,i,x){if(Array.isArray(g)){for(var T,E=[],s=0,y=g.length;s1?t-1:0),x=1;x?@[\\\]^`{|}~-]+/g,LF=/(^-|-$)/g;function d0(g){return g.replace(bF,"-").replace(LF,"")}var FF=function(g){return My(BM(g)>>>0)};function iv(g){return typeof g=="string"&&!0}var wy=function(g){return typeof g=="function"||typeof g=="object"&&g!==null&&!Array.isArray(g)},OF=function(g){return g!=="__proto__"&&g!=="constructor"&&g!=="prototype"};function DF(g,t,i){var x=g[i];wy(t)&&wy(x)?GM(x,t):g[i]=t}function GM(g){for(var t=arguments.length,i=new Array(t>1?t-1:0),x=1;x=0||(A[w]=S[w]);return A}(t,["componentId"]),m=d&&d+"-"+(iv(c)?c:d0(KS(c)));return HM(c,Sl({},v,{attrs:a,componentId:m}),i)},Object.defineProperty(n,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(c){this._foldedDefaultProps=x?GM({},g.defaultProps,c):c}}),n.toString=function(){return"."+n.styledComponentId},T&&_L(n,g,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),n}var mm=function(g){return function t(i,x,T){if(T===void 0&&(T=fh),!bM.isValidElementType(x))return Kd(1,String(x));var E=function(){return i(x,T,PF.apply(void 0,arguments))};return E.withConfig=function(s){return t(i,x,Sl({},T,{},s))},E.attrs=function(s){return t(i,x,Sl({},T,{attrs:Array.prototype.concat(T.attrs,s).filter(Boolean)}))},E}(HM,g)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(g){mm[g]=mm(g)});var WM={exports:{}};(function(g,t){(function(x,T){g.exports=T()})(Ty,()=>(()=>{var i={50792:s=>{var y=Object.prototype.hasOwnProperty,e="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(e=!1));function p(n,u,f){this.fn=n,this.context=u,this.once=f||!1}function h(n,u,f,o,c){if(typeof f!="function")throw new TypeError("The listener must be a function");var d=new p(f,o||n,c),v=e?e+u:u;return n._events[v]?n._events[v].fn?n._events[v]=[n._events[v],d]:n._events[v].push(d):(n._events[v]=d,n._eventsCount++),n}function a(n,u){--n._eventsCount===0?n._events=new r:delete n._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],f,o;if(this._eventsCount===0)return u;for(o in f=this._events)y.call(f,o)&&u.push(e?o.slice(1):o);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},l.prototype.listeners=function(u){var f=e?e+u:u,o=this._events[f];if(!o)return[];if(o.fn)return[o.fn];for(var c=0,d=o.length,v=new Array(d);c{/** * @author samme * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} @@ -6360,11 +6360,11 @@ return new `+this.key+`(); * @author Richard Davey * @copyright 2013-2024 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} - */s.exports={Format:e(27902),Pad:e(41836),RemoveAt:e(33628),Reverse:e(27671),UppercaseFirst:e(35355),UUID:e(45650)}}},x={};function T(s){var y=x[s];if(y!==void 0)return y.exports;var e=x[s]={exports:{}};return i[s](e,e.exports,T),e.exports}T.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var E=T(85454);return E})())})(WM);var Qm=WM.exports;const ld=kd(Qm);var IF=Object.create,Yx=Object.defineProperty,NF=Object.defineProperties,BF=Object.getOwnPropertyDescriptor,UF=Object.getOwnPropertyDescriptors,zF=Object.getOwnPropertyNames,qS=Object.getOwnPropertySymbols,GF=Object.getPrototypeOf,XM=Object.prototype.hasOwnProperty,VF=Object.prototype.propertyIsEnumerable,tT=(g,t,i)=>t in g?Yx(g,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):g[t]=i,Pn=(g,t)=>{for(var i in t||(t={}))XM.call(t,i)&&tT(g,i,t[i]);if(qS)for(var i of qS(t))VF.call(t,i)&&tT(g,i,t[i]);return g},mh=(g,t)=>NF(g,UF(t)),ai=(g,t)=>()=>(t||g((t={exports:{}}).exports,t),t.exports),HF=(g,t,i,x)=>{if(t&&typeof t=="object"||typeof t=="function")for(let T of zF(t))!XM.call(g,T)&&T!==i&&Yx(g,T,{get:()=>t[T],enumerable:!(x=BF(t,T))||x.enumerable});return g},YM=(g,t,i)=>(i=g!=null?IF(GF(g)):{},HF(t||!g||!g.__esModule?Yx(i,"default",{value:g,enumerable:!0}):i,g)),_m=ai(g=>{var t=function(E,s){return Es?1:0},i=function(E,s){return Es?-1:0};function x(E){return function(s,y){return E(y,s)}}function T(E){return E===2?function(s,y){return s[0]y[0]?1:s[1]y[1]?1:0}:function(s,y){for(var e=0;ey[e])return 1;e++}return 0}}g.DEFAULT_COMPARATOR=t,g.DEFAULT_REVERSE_COMPARATOR=i,g.reverseComparator=x,g.createTupleComparator=T}),WF=ai(g=>{g.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",g.SYMBOL_SUPPORT=typeof Symbol<"u"}),Gn=ai((g,t)=>{var i=WF(),x=i.ARRAY_BUFFER_SUPPORT,T=i.SYMBOL_SUPPORT;t.exports=function(E,s){var y,e,r,p,h;if(!E)throw new Error("obliterator/forEach: invalid iterable.");if(typeof s!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(E)||x&&ArrayBuffer.isView(E)||typeof E=="string"||E.toString()==="[object Arguments]"){for(r=0,p=E.length;r{var i=_m(),x=Gn(),T=i.DEFAULT_COMPARATOR,E=i.reverseComparator;function s(u){if(this.clear(),this.comparator=u||T,typeof this.comparator!="function")throw new Error("mnemonist/FibonacciHeap.constructor: given comparator should be a function.")}s.prototype.clear=function(){this.root=null,this.min=null,this.size=0};function y(u){return{item:u,degree:0}}function e(u,f){u.root?(f.right=u.root.right,f.left=u.root,u.root.right.left=f,u.root.right=f):u.root=f}s.prototype.push=function(u){var f=y(u);return f.left=f,f.right=f,e(this,f),(!this.min||this.comparator(f.item,this.min.item)<=0)&&(this.min=f),++this.size},s.prototype.peek=function(){return this.min?this.min.item:void 0};function r(u){for(var f=[],o=u,c=!1;!(o===u&&c);)o===u&&(c=!0),f.push(o),o=o.right;return f}function p(u,f){u.root===f&&(u.root=f.right),f.left.right=f.right,f.right.left=f.left}function h(u,f){u.child?(f.right=u.child.right,f.left=u.child,u.child.right.left=f,u.child.right=f):u.child=f}function a(u,f,o){p(u,f),f.left=f,f.right=f,h(o,f),o.degree++,f.parent=o}function l(u){var f=new Array(u.size),o=r(u.root),c,d,v,m,S,M;for(c=0,d=o.length;c0&&(M=v,v=m,m=M),a(u,m,v),f[S]=null,S++;f[S]=v}for(c=0;c{var t=Math.pow(2,8)-1,i=Math.pow(2,16)-1,x=Math.pow(2,32)-1,T=Math.pow(2,7)-1,E=Math.pow(2,15)-1,s=Math.pow(2,31)-1;g.getPointerArray=function(e){var r=e-1;if(r<=t)return Uint8Array;if(r<=i)return Uint16Array;if(r<=x)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},g.getSignedPointerArray=function(e){var r=e-1;return r<=T?Int8Array:r<=E?Int16Array:r<=s?Int32Array:Float64Array},g.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var y={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};g.getMinimalRepresentation=function(e,r){var p=null,h=0,a,l,n,u,f;for(u=0,f=e.length;uh&&(h=a,p=l);return p},g.isTypedArray=function(e){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(e)},g.concat=function(){var e=0,r,p,h;for(r=0,h=arguments.length;r{var t=Gn(),i=Ns();function x(y){return Array.isArray(y)||i.isTypedArray(y)}function T(y){if(typeof y.length=="number")return y.length;if(typeof y.size=="number")return y.size}function E(y){var e=T(y),r=typeof e=="number"?new Array(e):[],p=0;return t(y,function(h){r[p++]=h}),r}function s(y){var e=T(y),r=typeof e=="number"?i.getPointerArray(e):Array,p=typeof e=="number"?new Array(e):[],h=typeof e=="number"?new r(e):[],a=0;return t(y,function(l){p[a]=l,h[a]=a++}),[p,h]}g.isArrayLike=x,g.guessLength=T,g.toArray=E,g.toArrayWithIndices=s}),jx=ai((g,t)=>{var i=Gn(),x=_m(),T=aa(),E=x.DEFAULT_COMPARATOR,s=x.reverseComparator;function y(d,v,m,S){for(var M=v[S],w,C;S>m;){if(w=S-1>>1,C=v[w],d(M,C)<0){v[S]=C,S=w;continue}break}v[S]=M}function e(d,v,m){for(var S=v.length,M=m,w=v[m],C=2*m+1,A;C=0&&(C=A),v[m]=v[C],m=C,C=2*m+1;v[m]=w,y(d,v,M,m)}function r(d,v,m){v.push(m),y(d,v,0,v.length-1)}function p(d,v){var m=v.pop();if(v.length!==0){var S=v[0];return v[0]=m,e(d,v,0),S}return m}function h(d,v,m){if(v.length===0)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var S=v[0];return v[0]=m,e(d,v,0),S}function a(d,v,m){var S;return v.length!==0&&d(v[0],m)<0&&(S=v[0],v[0]=m,m=S,e(d,v,0)),m}function l(d,v){for(var m=v.length,S=m>>1,M=S;--M>=0;)e(d,v,M)}function n(d,v){for(var m=v.length,S=0,M=new Array(m);S=m.length)return m.slice().sort(d);for(P=m.slice(0,v),l(S,P),M=v,w=m.length;M0&&h(S,P,m[M]);return P.sort(d)}var b=T.guessLength(m);return b!==null&&b0&&h(S,P,O)),M++}),P.length>M&&(P.length=M),P.sort(d)}function f(d,v,m){arguments.length===2&&(m=v,v=d,d=E);var S=s(d),M,w,C,A=-1/0,P;if(v===1){if(T.isArrayLike(m)){for(M=0,w=m.length;M0)&&(A=C);return P=new m.constructor(1),P[0]=A,P}return i(m,function(O){(A===-1/0||d(O,A)>0)&&(A=O)}),[A]}if(T.isArrayLike(m)){if(v>=m.length)return m.slice().sort(S);for(P=m.slice(0,v),l(d,P),M=v,w=m.length;M0&&h(d,P,m[M]);return P.sort(S)}var b=T.guessLength(m);return b!==null&&b0&&h(d,P,O)),M++}),P.length>M&&(P.length=M),P.sort(S)}function o(d){if(this.clear(),this.comparator=d||E,typeof this.comparator!="function")throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}o.prototype.clear=function(){this.items=[],this.size=0},o.prototype.push=function(d){return r(this.comparator,this.items,d),++this.size},o.prototype.peek=function(){return this.items[0]},o.prototype.pop=function(){return this.size!==0&&this.size--,p(this.comparator,this.items)},o.prototype.replace=function(d){return h(this.comparator,this.items,d)},o.prototype.pushpop=function(d){return a(this.comparator,this.items,d)},o.prototype.consume=function(){return this.size=0,n(this.comparator,this.items)},o.prototype.toArray=function(){return n(this.comparator,this.items.slice())},o.prototype.inspect=function(){var d=this.toArray();return Object.defineProperty(d,"constructor",{value:o,enumerable:!1}),d},typeof Symbol<"u"&&(o.prototype[Symbol.for("nodejs.util.inspect.custom")]=o.prototype.inspect);function c(d){if(this.clear(),this.comparator=d||E,typeof this.comparator!="function")throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=s(this.comparator)}c.prototype=o.prototype,o.from=function(d,v){var m=new o(v),S;return T.isArrayLike(d)?S=d.slice():S=T.toArray(d),l(m.comparator,S),m.items=S,m.size=S.length,m},c.from=function(d,v){var m=new c(v),S;return T.isArrayLike(d)?S=d.slice():S=T.toArray(d),l(m.comparator,S),m.items=S,m.size=S.length,m},o.siftUp=e,o.siftDown=y,o.push=r,o.pop=p,o.replace=h,o.pushpop=a,o.heapify=l,o.consume=n,o.nsmallest=u,o.nlargest=f,o.MinHeap=o,o.MaxHeap=c,t.exports=o}),XF=ai((g,t)=>{var i="";function x(r,p,h){for(var a=p.length,l=[],n=a,u=-1,f,o=0,c;n--;)u=Math.max(r[p[n]+h],u);for(c=u>>24&&32||u>>16&&24||u>>8&&16||8;o>o&15].push(p[n]);for(f=0;f<16;f++)for(u=l[f].length;u--;)p[++n]=l[f][u]}}function T(r,p,h,a){return r[h]-r[a]||(h%3===2?r[h+1]-r[a+1]||p[h+2]-p[a+2]:p[h+1]-p[a+1])}function E(r,p){var h=[],a=[],l=2*p/3|0,n=p-l,u=l+1>>1,f=l,o=0,c,d=[],v=[];if(p===1)return[0];for(;f--;)h[f]=(f*3>>1)+1;for(f=3;f--;)x(r,h,f);for(o=a[(h[0]/3|0)+(h[0]%3===1?0:u)]=1,f=1;fthis.firstLength&&n>this.firstLength)){for(p=Math.min(this.length-l,this.length-n),a=0;ar.length&&(r=this.text.slice(l,l+p))}return r},e.prototype.toString=function(){return this.array.join(",")},e.prototype.toJSON=function(){return this.array},e.prototype.inspect=function(){for(var r=new Array(this.length),p=0;p{var i=Gn();function x(r){this.size=0,this.items=new Map,this.inverse=r}function T(){this.size=0,this.items=new Map,this.inverse=new x(this)}function E(){this.size=0,this.items.clear(),this.inverse.items.clear()}T.prototype.clear=E,x.prototype.clear=E;function s(r,p){if(this.items.has(r)){var h=this.items.get(r);if(h===p)return this;this.inverse.items.delete(h)}if(this.inverse.items.has(p)){var a=this.inverse.items.get(p);if(a===r)return this;this.items.delete(a)}return this.items.set(r,p),this.inverse.items.set(p,r),this.size=this.items.size,this.inverse.size=this.inverse.items.size,this}T.prototype.set=s,x.prototype.set=s;function y(r){if(this.items.has(r)){var p=this.items.get(r);return this.items.delete(r),this.inverse.items.delete(p),this.size=this.items.size,this.inverse.size=this.inverse.items.size,!0}return!1}T.prototype.delete=y,x.prototype.delete=y;var e=["has","get","forEach","keys","values","entries"];e.forEach(function(r){T.prototype[r]=x.prototype[r]=function(){return Map.prototype[r].apply(this.items,arguments)}}),typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.entries,x.prototype[Symbol.iterator]=x.prototype.entries),T.prototype.inspect=function(){var r={left:this.items,right:this.inverse.items};return Object.defineProperty(r,"constructor",{value:T,enumerable:!1}),r},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),x.prototype.inspect=function(){var r={left:this.inverse.items,right:this.items};return Object.defineProperty(r,"constructor",{value:x,enumerable:!1}),r},typeof Symbol<"u"&&(x.prototype[Symbol.for("nodejs.util.inspect.custom")]=x.prototype.inspect),T.from=function(r){var p=new T;return i(r,function(h,a){p.set(a,h)}),p},t.exports=T}),Hr=ai((g,t)=>{function i(x){if(typeof x!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=x}typeof Symbol<"u"&&(i.prototype[Symbol.iterator]=function(){return this}),i.of=function(){var x=arguments,T=x.length,E=0;return new i(function(){return E>=T?{done:!0}:{done:!1,value:x[E++]}})},i.empty=function(){var x=new i(function(){return{done:!0}});return x},i.fromSequence=function(x){var T=0,E=x.length;return new i(function(){return T>=E?{done:!0}:{done:!1,value:x[T++]}})},i.is=function(x){return x instanceof i?!0:typeof x=="object"&&x!==null&&typeof x.next=="function"},t.exports=i}),kM=ai(g=>{function t(s){return s|=s>>1,s|=s>>2,s|=s>>4,s|=s>>8,s|=s>>16,s&~(s>>1)}g.msb32=t;function i(s){return s|=s>>1,s|=s>>2,s|=s>>4,s&~(s>>1)}g.msb8=i,g.test=function(s,y){return s>>y&1},g.criticalBit8=function(s,y){return i(s^y)},g.criticalBit8Mask=function(s,y){return~i(s^y)>>>0&255},g.testCriticalBit8=function(s,y){return 1+(s|y)>>8},g.criticalBit32Mask=function(s,y){return~t(s^y)>>>0&4294967295},g.popcount=function(s){return s-=s>>1&1431655765,s=(s&858993459)+(s>>2&858993459),s=s+(s>>4)&252645135,s+=s>>8,s+=s>>16,s&127};var x=new Uint8Array(Math.pow(2,8));for(T=0,E=x.length;T>8&255]+x[s>>16&255]+x[s>>24&255]}}),kF=ai((g,t)=>{var i=Hr(),x=kM();function T(E){this.length=E,this.clear()}T.prototype.clear=function(){this.size=0,this.array=new Uint32Array(Math.ceil(this.length/32))},T.prototype.set=function(E,s){var y=E>>5,e=E&31,r=this.array[y],p;return s===0||s===!1?p=this.array[y]&=~(1<>>0,p>r?this.size++:p>5,y=E&31,e=this.array[s],r;return r=this.array[s]&=~(1<>5,y=E&31,e=this.array[s],r=this.array[s]^=1<>>0,r>e?this.size++:r>5,y=E&31;return this.array[s]>>y&1},T.prototype.test=function(E){return!!this.get(E)},T.prototype.rank=function(E){if(this.size===0)return 0;for(var s=E>>5,y=E&31,e=0,r=0;r=this.length)return-1;for(var s,y=32,e=0,r=0,p=0,h=this.array.length;p>a&1,r===E)return e}},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=this.length,e,r,p=32,h=0,a=this.array.length;h>l&1,E.call(s,r,h*32+l)}},T.prototype.values=function(){var E=this.length,s=!1,y,e,r=this.array,p=r.length,h=0,a=-1,l=32;return new i(function n(){if(!s){if(h>=p)return{done:!0};h===p-1&&(l=E%32||32),y=r[h++],s=!0,a=-1}return a++,a>=l?(s=!1,n()):(e=y>>a&1,{value:e})})},T.prototype.entries=function(){var E=this.length,s=!1,y,e,r=this.array,p,h=r.length,a=0,l=-1,n=32;return new i(function u(){if(!s){if(a>=h)return{done:!0};a===h-1&&(n=E%32||32),y=r[a++],s=!0,l=-1}return l++,p=~-a*32+l,l>=n?(s=!1,u()):(e=y>>l&1,{value:[p,e]})})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=new Uint8Array(this.length);return this.forEach(function(s,y){E[y]=s}),Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.prototype.toJSON=function(){return Array.from(this.array)},t.exports=T}),jF=ai((g,t)=>{var i=Hr(),x=kM(),T=function(y){return Math.max(1,Math.ceil(y*1.5))};function E(y){return new Uint32Array(Math.ceil(y/32))}function s(y){var e=y||0,r=T;typeof y=="object"&&(e=y.initialLength||y.initialCapacity||0,r=y.policy||r),this.size=0,this.length=e,this.capacity=Math.ceil(this.length/32)*32,this.policy=r,this.array=E(this.capacity)}s.prototype.set=function(y,e){if(this.length>5,p=y&31,h=this.array[r],a;return e===0||e===!1?a=this.array[r]&=~(1<>>0,a>h?this.size++:a>5,r=y&31,p=this.array[e],h;return h=this.array[e]&=~(1<>5,r=y&31,p=this.array[e],h=this.array[e]^=1<>>0,h>p?this.size++:hthis.array.length?(this.array=new Uint32Array(p),this.array.set(r,0)):this.array=r.slice(0,p),this.capacity=y,this)},s.prototype.grow=function(y){var e;if(typeof y=="number"){if(this.capacity>=y)return this;for(e=this.capacity;e>5,p=e&31;return this.array[r]|=1<>5,r=y&31;return this.array[e]>>r&1}},s.prototype.get=function(y){if(!(this.length>5,r=y&31;return this.array[e]>>r&1}},s.prototype.test=function(y){return this.length>5,r=y&31,p=0,h=0;h=this.length)return-1;for(var e,r=32,p=0,h=0,a=0,l=this.array.length;a>n&1,h===y)return p}},s.prototype.forEach=function(y,e){e=arguments.length>1?e:this;for(var r=this.length,p,h,a=32,l=0,n=this.array.length;l>u&1,y.call(e,h,l*32+u)}},s.prototype.values=function(){var y=this.length,e=!1,r,p,h=this.array,a=h.length,l=0,n=-1,u=32;return new i(function f(){if(!e){if(l>=a)return{done:!0};l===a-1&&(u=y%32||32),r=h[l++],e=!0,n=-1}return n++,n>=u?(e=!1,f()):(p=r>>n&1,{value:p})})},s.prototype.entries=function(){var y=this.length,e=!1,r,p,h=this.array,a,l=h.length,n=0,u=-1,f=32;return new i(function o(){if(!e){if(n>=l)return{done:!0};n===l-1&&(f=y%32||32),r=h[n++],e=!0,u=-1}return u++,a=~-n*32+u,u>=f?(e=!1,o()):(p=r>>u&1,{value:[a,p]})})},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.values),s.prototype.inspect=function(){var y=new Uint8Array(this.length);return this.forEach(function(e,r){y[r]=e}),Object.defineProperty(y,"constructor",{value:s,enumerable:!1}),y},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.prototype.toJSON=function(){return Array.from(this.array.slice(0,(this.length>>5)+1))},t.exports=s}),KF=ai((g,t)=>{function i(E,s){return(E&65535)*s+(((E>>>16)*s&65535)<<16)&4294967295}function x(E,s){return(E&65535)+(s>>>16)+(((E>>>16)+s&65535)<<16)&4294967295}function T(E,s){return E<>>32-s}t.exports=function(E,s){var y=3432918353,e=461845907,r=15,p=13,h=5,a=1801774676,l=E,n,u,f;for(u=0,f=s.length-4;u<=f;u+=4)n=s[u]|s[u+1]<<8|s[u+2]<<16|s[u+3]<<24,n=i(n,y),n=T(n,r),n=i(n,e),l^=n,l=T(l,p),l=i(l,h),l=x(l,a);switch(n=0,s.length&3){case 3:n^=s[u+2]<<16;case 2:n^=s[u+1]<<8;case 1:n^=s[u],n=i(n,y),n=T(n,r),n=i(n,e),l^=n}return l^=s.length,l^=l>>>16,l=i(l,2246822507),l^=l>>>13,l=i(l,3266489909),l^=l>>>16,l>>>0}}),ZF=ai((g,t)=>{var i=KF(),x=Gn(),T=Math.LN2*Math.LN2,E={errorRate:.005};function s(r){var p=new Uint16Array(r.length),h,a;for(h=0,a=r.length;h>3]|=n}return this},e.prototype.test=function(r){for(var p=s(r),h=0,a=this.hashFunctions;h>3]&1<<(7&l)))return!1}return!0},e.prototype.toJSON=function(){return this.data},e.from=function(r,p){if(!p&&(p=r.length||r.size,typeof p!="number"))throw new Error("BloomFilter.from: could not infer the filter's capacity. Try passing it as second argument.");var h=new e(p);return x(r,function(a){h.add(a)}),h},t.exports=e}),JF=ai((g,t)=>{var i=Gn();function x(T){if(typeof T!="function")throw new Error("mnemonist/BKTree.constructor: given `distance` should be a function.");this.distance=T,this.clear()}x.prototype.add=function(T){if(!this.root)return this.root={item:T,children:{}},this.size++,this;for(var E=this.root,s;s=this.distance(T,E.item),!!E.children[s];)E=E.children[s];return E.children[s]={item:T,children:{}},this.size++,this},x.prototype.search=function(T,E){if(!this.root)return[];for(var s=[],y=[this.root],e,r,p,h,a;y.length;)for(e=y.pop(),p=this.distance(E,e.item),p<=T&&s.push({item:e.item,distance:p}),h=p-T,a=p+T+1;h{var i=aa(),x=Hr();function T(E,s){if(arguments.length<2)throw new Error("mnemonist/fixed-deque: expecting an Array class and a capacity.");if(typeof s!="number"||s<=0)throw new Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=E,this.capacity=s,this.items=new E(this.capacity),this.clear()}T.prototype.clear=function(){this.start=0,this.size=0},T.prototype.push=function(E){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.push: deque capacity ("+this.capacity+") exceeded!");var s=this.start+this.size;return s>=this.capacity&&(s-=this.capacity),this.items[s]=E,++this.size},T.prototype.unshift=function(E){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.unshift: deque capacity ("+this.capacity+") exceeded!");var s=this.start-1;return this.start===0&&(s=this.capacity-1),this.items[s]=E,this.start=s,++this.size},T.prototype.pop=function(){if(this.size!==0){this.size--;var E=this.start+this.size;return E>=this.capacity&&(E-=this.capacity),this.items[E]}},T.prototype.shift=function(){if(this.size!==0){var E=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[E]}},T.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},T.prototype.peekLast=function(){if(this.size!==0){var E=this.start+this.size-1;return E>=this.capacity&&(E-=this.capacity),this.items[E]}},T.prototype.get=function(E){if(!(this.size===0||E>=this.capacity))return E=this.start+E,E>=this.capacity&&(E-=this.capacity),this.items[E]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=this.capacity,e=this.size,r=this.start,p=0;p=y)return{done:!0};var p=E[e];return e++,r++,e===s&&(e=0),{value:p,done:!1}})},T.prototype.entries=function(){var E=this.items,s=this.capacity,y=this.size,e=this.start,r=0;return new x(function(){if(r>=y)return{done:!0};var p=E[e];return e++,e===s&&(e=0),{value:[r++,p],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=this.toArray();return E.type=this.ArrayClass.name,E.capacity=this.capacity,Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E,s,y){if(arguments.length<3&&(y=i.guessLength(E),typeof y!="number"))throw new Error("mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.");var e=new T(s,y);if(i.isArrayLike(E)){var r,p;for(r=0,p=E.length;r{var i=aa(),x=jM();function T(s,y){if(arguments.length<2)throw new Error("mnemonist/circular-buffer: expecting an Array class and a capacity.");if(typeof y!="number"||y<=0)throw new Error("mnemonist/circular-buffer: `capacity` should be a positive number.");this.ArrayClass=s,this.capacity=y,this.items=new s(this.capacity),this.clear()}function E(s){T.prototype[s]=x.prototype[s]}Object.keys(x.prototype).forEach(E),typeof Symbol<"u"&&Object.getOwnPropertySymbols(x.prototype).forEach(E),T.prototype.push=function(s){var y=this.start+this.size;return y>=this.capacity&&(y-=this.capacity),this.items[y]=s,this.size===this.capacity?(y++,y>=this.capacity?this.start=0:this.start=y,this.size):++this.size},T.prototype.unshift=function(s){var y=this.start-1;return this.start===0&&(y=this.capacity-1),this.items[y]=s,this.size===this.capacity?(this.start=y,this.size):(this.start=y,++this.size)},T.from=function(s,y,e){if(arguments.length<3&&(e=i.guessLength(s),typeof e!="number"))throw new Error("mnemonist/circular-buffer.from: could not guess iterable length. Please provide desired capacity as last argument.");var r=new T(y,e);if(i.isArrayLike(s)){var p,h;for(p=0,h=s.length;p{function i(x){if(typeof x!="function")throw new Error("mnemonist/DefaultMap.constructor: expecting a function.");this.items=new Map,this.factory=x,this.size=0}i.prototype.clear=function(){this.items.clear(),this.size=0},i.prototype.get=function(x){var T=this.items.get(x);return typeof T>"u"&&(T=this.factory(x,this.size),this.items.set(x,T),this.size++),T},i.prototype.peek=function(x){return this.items.get(x)},i.prototype.set=function(x,T){return this.items.set(x,T),this.size=this.items.size,this},i.prototype.has=function(x){return this.items.has(x)},i.prototype.delete=function(x){var T=this.items.delete(x);return this.size=this.items.size,T},i.prototype.forEach=function(x,T){T=arguments.length>1?T:this,this.items.forEach(x,T)},i.prototype.entries=function(){return this.items.entries()},i.prototype.keys=function(){return this.items.keys()},i.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(i.prototype[Symbol.iterator]=i.prototype.entries),i.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(i.prototype[Symbol.for("nodejs.util.inspect.custom")]=i.prototype.inspect),i.autoIncrement=function(){var x=0;return function(){return x++}},t.exports=i}),_F=ai((g,t)=>{function i(x){if(typeof x!="function")throw new Error("mnemonist/DefaultWeakMap.constructor: expecting a function.");this.items=new WeakMap,this.factory=x}i.prototype.clear=function(){this.items=new WeakMap},i.prototype.get=function(x){var T=this.items.get(x);return typeof T>"u"&&(T=this.factory(x),this.items.set(x,T)),T},i.prototype.peek=function(x){return this.items.get(x)},i.prototype.set=function(x,T){return this.items.set(x,T),this},i.prototype.has=function(x){return this.items.has(x)},i.prototype.delete=function(x){return this.items.delete(x)},i.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(i.prototype[Symbol.for("nodejs.util.inspect.custom")]=i.prototype.inspect),t.exports=i}),qF=ai((g,t)=>{var i=Ns();function x(T){var E=i.getPointerArray(T),s=i.getPointerArray(Math.log2(T));this.size=T,this.dimension=T,this.parents=new E(T),this.ranks=new s(T);for(var y=0;yr?this.parents[y]=s:(this.parents[y]=s,this.ranks[s]++),this},x.prototype.connected=function(T,E){var s=this.find(T);return s===this.find(E)},x.prototype.mapping=function(){for(var T=i.getPointerArray(this.dimension),E={},s=new T(this.size),y=0,e,r=0,p=this.parents.length;r"u"?(s[r]=y,E[e]=y++):s[r]=E[e];return s},x.prototype.compile=function(){for(var T={},E=new Array(this.dimension),s=0,y,e=0,r=this.parents.length;e"u"?(E[s]=[e],T[y]=s++):E[T[y]].push(e);return E},x.prototype.inspect=function(){var T=this.compile();return Object.defineProperty(T,"constructor",{value:x,enumerable:!1}),T},typeof Symbol<"u"&&(x.prototype[Symbol.for("nodejs.util.inspect.custom")]=x.prototype.inspect),t.exports=x}),Kx=ai((g,t)=>{var i=_m(),x=jx(),T=i.DEFAULT_COMPARATOR,E=i.reverseComparator;function s(r,p,h,a){for(var l=h,n=a,u=p[a],f=2*a+1,o;f=0&&(f=o),p[a]=p[f],a=f,f=2*a+1;p[a]=u,x.siftDown(r,p,n,a)}function y(r,p,h,a){for(var l=a,n=l,u=new r(a),f,o;n>0;)f=h[--n],n!==0&&(o=h[0],h[0]=f,s(p,h,--a,0),f=o),u[n]=f;return u}function e(r,p,h){if(arguments.length===2&&(h=p,p=null),this.ArrayClass=r,this.capacity=h,this.items=new r(h),this.clear(),this.comparator=p||T,typeof h!="number"&&h<=0)throw new Error("mnemonist/FixedReverseHeap.constructor: capacity should be a number > 0.");if(typeof this.comparator!="function")throw new Error("mnemonist/FixedReverseHeap.constructor: given comparator should be a function.");this.comparator=E(this.comparator)}e.prototype.clear=function(){this.size=0},e.prototype.push=function(r){return this.size0&&x.replace(this.comparator,this.items,r),this.size},e.prototype.peek=function(){return this.items[0]},e.prototype.consume=function(){var r=y(this.ArrayClass,this.comparator,this.items,this.size);return this.size=0,r},e.prototype.toArray=function(){return y(this.ArrayClass,this.comparator,this.items.slice(0,this.size),this.size)},e.prototype.inspect=function(){var r=this.toArray();return Object.defineProperty(r,"constructor",{value:e,enumerable:!1}),r},typeof Symbol<"u"&&(e.prototype[Symbol.for("nodejs.util.inspect.custom")]=e.prototype.inspect),t.exports=e}),t4=ai((g,t)=>{var i=Gn(),x=function(E){return E};function T(E){if(this.items=new Map,this.clear(),Array.isArray(E)?(this.writeHashFunction=E[0],this.readHashFunction=E[1]):(this.writeHashFunction=E,this.readHashFunction=E),this.writeHashFunction||(this.writeHashFunction=x),this.readHashFunction||(this.readHashFunction=x),typeof this.writeHashFunction!="function")throw new Error("mnemonist/FuzzyMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMap.constructor: invalid hash function given.")}T.prototype.clear=function(){this.items.clear(),this.size=0},T.prototype.add=function(E){var s=this.writeHashFunction(E);return this.items.set(s,E),this.size=this.items.size,this},T.prototype.set=function(E,s){return E=this.writeHashFunction(E),this.items.set(E,s),this.size=this.items.size,this},T.prototype.get=function(E){return E=this.readHashFunction(E),this.items.get(E)},T.prototype.has=function(E){return E=this.readHashFunction(E),this.items.has(E)},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this,this.items.forEach(function(y){E.call(s,y,y)})},T.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=Array.from(this.items.values());return Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E,s,y){var e=new T(s);return i(E,function(r,p){y?e.set(p,r):e.add(r)}),e},t.exports=T}),KM=ai((g,t)=>{var i=Hr(),x=Gn();function T(E){this.Container=E||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,"constructor",{value:T,enumerable:!1})}T.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},T.prototype.set=function(E,s){var y=this.items.get(E),e;return y||(this.dimension++,y=new this.Container,this.items.set(E,y)),this.Container===Set?(e=y.size,y.add(s),e"u"?0:this.Container===Set?s.size:s.length},T.prototype.count=T.prototype.multiplicity,T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;var y;function e(r){E.call(s,r,y)}this.items.forEach(function(r,p){y=p,r.forEach(e)})},T.prototype.forEachAssociation=function(E,s){s=arguments.length>1?s:this,this.items.forEach(E,s)},T.prototype.keys=function(){return this.items.keys()},T.prototype.values=function(){var E=this.items.values(),s=!1,y,e,r,p;return this.Container===Set?new i(function h(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,y=e.value.values()}return e=y.next(),e.done?(s=!1,h()):{done:!1,value:e.value}}):new i(function h(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,y=e.value,r=0,p=y.length}return r>=p?(s=!1,h()):{done:!1,value:y[r++]}})},T.prototype.entries=function(){var E=this.items.entries(),s=!1,y,e,r,p,h;return this.Container===Set?new i(function a(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,r=e.value[0],y=e.value[1].values()}return e=y.next(),e.done?(s=!1,a()):{done:!1,value:[r,e.value]}}):new i(function a(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,r=e.value[0],y=e.value[1],p=0,h=y.length}return p>=h?(s=!1,a()):{done:!1,value:[r,y[p++]]}})},T.prototype.containers=function(){return this.items.values()},T.prototype.associations=function(){return this.items.entries()},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.entries),T.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.prototype.toJSON=function(){return this.items},T.from=function(E,s){var y=new T(s);return x(E,function(e,r){y.set(r,e)}),y},t.exports=T}),e4=ai((g,t)=>{var i=KM(),x=Gn(),T=function(s){return s};function E(s,y){if(this.items=new i(y),this.clear(),Array.isArray(s)?(this.writeHashFunction=s[0],this.readHashFunction=s[1]):(this.writeHashFunction=s,this.readHashFunction=s),this.writeHashFunction||(this.writeHashFunction=T),this.readHashFunction||(this.readHashFunction=T),typeof this.writeHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.")}E.prototype.clear=function(){this.items.clear(),this.size=0,this.dimension=0},E.prototype.add=function(s){var y=this.writeHashFunction(s);return this.items.set(y,s),this.size=this.items.size,this.dimension=this.items.dimension,this},E.prototype.set=function(s,y){return s=this.writeHashFunction(s),this.items.set(s,y),this.size=this.items.size,this.dimension=this.items.dimension,this},E.prototype.get=function(s){return s=this.readHashFunction(s),this.items.get(s)},E.prototype.has=function(s){return s=this.readHashFunction(s),this.items.has(s)},E.prototype.forEach=function(s,y){y=arguments.length>1?y:this,this.items.forEach(function(e){s.call(y,e,e)})},E.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.values),E.prototype.inspect=function(){var s=Array.from(this);return Object.defineProperty(s,"constructor",{value:E,enumerable:!1}),s},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.from=function(s,y,e,r){arguments.length===3&&typeof e=="boolean"&&(r=e,e=Array);var p=new E(y,e);return x(s,function(h,a){r?p.set(a,h):p.add(h)}),p},t.exports=E}),i4=ai((g,t)=>{var i=1024;function x(E){return(E&E-1)===0}function T(E,s){if(arguments.length<1)throw new Error("mnemonist/hashed-array-tree: expecting at least a byte array constructor.");var y=s||0,e=i,r=0;if(typeof s=="object"&&(y=s.initialCapacity||0,r=s.initialLength||0,e=s.blockSize||i),!e||!x(e))throw new Error("mnemonist/hashed-array-tree: block size should be a power of two.");var p=Math.max(r,y),h=Math.ceil(p/e);this.ArrayClass=E,this.length=r,this.capacity=h*e,this.blockSize=e,this.offsetMask=e-1,this.blockMask=Math.log2(e),this.blocks=new Array(h);for(var a=0;a>this.blockMask,e=E&this.offsetMask;return this.blocks[y][e]=s,this},T.prototype.get=function(E){if(!(this.length>this.blockMask,y=E&this.offsetMask;return this.blocks[s][y]}},T.prototype.grow=function(E){if(typeof E!="number"&&(E=this.capacity+this.blockSize),this.capacity>=E)return this;for(;this.capacity>this.blockMask,e=s&this.offsetMask;return this.blocks[y][e]=E,++this.length},T.prototype.pop=function(){if(this.length!==0){var E=this.blocks[this.blocks.length-1],s=--this.length&this.offsetMask;return E[s]}},T.prototype.inspect=function(){for(var E=new this.ArrayClass(this.length),s,y=0,e=this.length;y>this.blockMask,E[y]=this.blocks[s][y&this.offsetMask];return E.type=this.ArrayClass.name,E.items=this.length,E.capacity=this.capacity,E.blockSize=this.blockSize,Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),t.exports=T}),ZM=ai((g,t)=>{var i=Hr(),x=aa();function T(E,s){if(arguments.length<2)throw new Error("mnemonist/fixed-stack: expecting an Array class and a capacity.");if(typeof s!="number"||s<=0)throw new Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=s,this.ArrayClass=E,this.items=new this.ArrayClass(this.capacity),this.clear()}T.prototype.clear=function(){this.size=0},T.prototype.push=function(E){if(this.size===this.capacity)throw new Error("mnemonist/fixed-stack.push: stack capacity ("+this.capacity+") exceeded!");return this.items[this.size++]=E,this.size},T.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]},T.prototype.peek=function(){return this.items[this.size-1]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=0,e=this.items.length;y=s)return{done:!0};var e=E[s-y-1];return y++,{value:e,done:!1}})},T.prototype.entries=function(){var E=this.items,s=this.size,y=0;return new i(function(){if(y>=s)return{done:!0};var e=E[s-y-1];return{value:[y++,e],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.toString=function(){return this.toArray().join(",")},T.prototype.toJSON=function(){return this.toArray()},T.prototype.inspect=function(){var E=this.toArray();return E.type=this.ArrayClass.name,E.capacity=this.capacity,Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E,s,y){if(arguments.length<3&&(y=x.guessLength(E),typeof y!="number"))throw new Error("mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.");var e=new T(s,y);if(x.isArrayLike(E)){var r,p;for(r=0,p=E.length;r{var i=aa(),x=Ns(),T=ZM();function E(y,e,r,p,h,a,l,n){var u=l+(n-l)/2|0,f=~-u,o=-~u,c=r[u];p[a]=c+1;var d=e?e(y[c]):y[c][1],v=a*2+1,m=a*2+2,S=-1/0,M=-1/0;l<=f&&(S=E(y,e,r,p,h,v,l,f)),o<=n&&(M=E(y,e,r,p,h,m,o,n));var w=Math.max(d,S,M),C=c;return w===S?C=h[p[v]-1]:w===M&&(C=h[p[m]-1]),h[c]=C,w}function s(y,e){this.size=y.length,this.intervals=y;var r=null,p=null;Array.isArray(e)&&(r=e[0],p=e[1]);var h=y.length,a=x.getPointerArray(h+1),l=new a(h),n;for(n=1;nv?1:0});var u=Math.ceil(Math.log2(h+1)),f=Math.pow(2,u)-1,o=new a(f),c=new a(h);E(y,p,l,o,c,0,0,h-1),l=null,this.height=u,this.tree=o,this.augmentations=c,this.startGetter=r,this.endGetter=p,this.stack=new T(a,this.height)}s.prototype.intervalsContainingPoint=function(y){var e=[],r=this.stack;r.clear(),r.push(0);for(var p=this.tree.length,h,a,l,n,u,f,o,c,d;r.size;)h=r.pop(),a=this.tree[h]-1,l=this.intervals[a],n=this.intervals[this.augmentations[a]],o=this.endGetter?this.endGetter(n):n[1],!(y>o)&&(c=h*2+1,c=u&&y<=f&&e.push(l),!(yd)&&(v=l*2+1,v=o&&e<=c&&p.push(u),!(r{g.search=function(t,i,x,T){var E=0;x=typeof x<"u"?x:0,T=typeof T<"u"?T:t.length,T--;for(var s;x<=T;)if(E=x+T>>>1,s=t[E],s>i)T=~-E;else if(s>>1,y=t(i[T],x),y>0)s=~-T;else if(y<0)E=-~T;else return T;return-1},g.lowerBound=function(t,i,x,T){var E=0;for(x=typeof x<"u"?x:0,T=typeof T<"u"?T:t.length;x>>1,i<=t[E]?T=E:x=-~E;return x},g.lowerBoundWithComparator=function(t,i,x){for(var T=0,E=0,s=i.length;E>>1,t(x,i[T])<=0?s=T:E=-~T;return E},g.lowerBoundIndices=function(t,i,x,T,E){var s=0;for(T=typeof T<"u"?T:0,E=typeof E<"u"?E:t.length;T>>1,x<=t[i[s]]?E=s:T=-~s;return T},g.upperBound=function(t,i,x,T){var E=0;for(x=typeof x<"u"?x:0,T=typeof T<"u"?T:t.length;x>>1,i>=t[E]?x=-~E:T=E;return x},g.upperBoundWithComparator=function(t,i,x){for(var T=0,E=0,s=i.length;E>>1,t(x,i[T])>=0?E=-~T:s=T;return E}}),r4=ai(g=>{var t=Ns(),i=aa().isArrayLike,x=JM(),T=kx();function E(r,p){if(r.length===0)return p.slice();if(p.length===0)return r.slice();var h;r[0]>p[0]&&(h=r,r=p,p=h);var a=r[r.length-1],l=p[0];if(a<=l)return t.isTypedArray(r)?t.concat(r,p):r.concat(p);var n=new r.constructor(r.length+p.length),u,f,o;for(u=0,f=r.length;up[0]&&(h=r,r=p,p=h);var a=r[r.length-1],l=p[0];if(ap[0]&&(h=r,r=p,p=h);var a=r[r.length-1],l=p[0];if(av?o=x.lowerBound(p,d,o+1):(n.push(d),u++,o++);return n};function y(r){var p=0,h=-1/0,a,l,n,u=[];for(l=0,n=r.length;lh&&(h=a));if(u.length===0)return new r[0].constructor(0);if(u.length===1)return u[0].slice();if(u.length===2)return E(u[0],u[1]);r=u;var f=new r[0].constructor(p),o=t.getPointerArray(h),c=new o(r.length),d=new T(function(S,M){return S=r[S][c[S]],M=r[M][c[M]],SM?1:0});for(l=0;lp&&(p=h));if(n.length===0)return new r[0].constructor(0);if(n.length===1)return n[0].slice();if(n.length===2)return s(n[0],n[1]);r=n;var u=new r[0].constructor,f=t.getPointerArray(p),o=new f(r.length),c=new T(function(m,S){return m=r[m][o[m]],S=r[S][o[S]],mS?1:0});for(a=0;ap&&(p=a),lh)return[];if(p===h)return[p];var o,c,d=r[0],v,m,S,M,w,C,A=p;for(u=1;uC?m=x.lowerBound(c,w,m+1):(d.push(w),v++,m++);if(d.length===0)return d;A=d[0]}return d},g.merge=function(){if(arguments.length===2){if(i(arguments[0]))return E(arguments[0],arguments[1])}else if(i(arguments[0]))return y(arguments);return null},g.unionUnique=function(){if(arguments.length===2){if(i(arguments[0]))return s(arguments[0],arguments[1])}else if(i(arguments[0]))return e(arguments);return null},g.intersectionUnique=function(){if(arguments.length===2){if(i(arguments[0]))return g.intersectionUniqueArrays(arguments[0],arguments[1])}else if(i(arguments[0]))return g.kWayIntersectionUniqueArrays(arguments);return null}}),s4=ai((g,t)=>{var i=Hr(),x=Gn(),T=r4();function E(y){return y}function s(y){if(this.clear(),Array.isArray(y)?(this.documentTokenizer=y[0],this.queryTokenizer=y[1]):(this.documentTokenizer=y,this.queryTokenizer=y),this.documentTokenizer||(this.documentTokenizer=E),this.queryTokenizer||(this.queryTokenizer=E),typeof this.documentTokenizer!="function")throw new Error("mnemonist/InvertedIndex.constructor: document tokenizer is not a function.");if(typeof this.queryTokenizer!="function")throw new Error("mnemonist/InvertedIndex.constructor: query tokenizer is not a function.")}s.prototype.clear=function(){this.items=[],this.mapping=new Map,this.size=0,this.dimension=0},s.prototype.add=function(y){this.size++;var e=this.items.length;this.items.push(y);var r=this.documentTokenizer(y);if(!Array.isArray(r))throw new Error("mnemonist/InvertedIndex.add: tokenizer function should return an array of tokens.");for(var p=new Set,h,a,l=0,n=r.length;l"u"||r.length===0)return[];if(e.length>1)for(h=1,a=e.length;h"u"||p.length===0)return[];r=T.intersectionUniqueArrays(r,p)}var l=new Array(r.length);for(h=0,a=l.length;h1?e:this;for(var r=0,p=this.documents.length;r=e)return{done:!0};var p=y[r++];return{value:p,done:!1}})},s.prototype.tokens=function(){return this.mapping.keys()},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.documents),s.prototype.inspect=function(){var y=this.items.slice();return Object.defineProperty(y,"constructor",{value:s,enumerable:!1}),y},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.from=function(y,e){var r=new s(e);return x(y,function(p){r.add(p)}),r},t.exports=s}),$M=ai(g=>{var t=new Float64Array(64),i=new Float64Array(64);function x(E,s,y){var e,r,p,h,a;for(t[0]=s,i[0]=y,r=0;r>=0;)if(p=t[r],h=i[r]-1,p=e&&pi[r-1]-t[r-1]&&(a=t[r],t[r]=t[r-1],t[r-1]=a,a=i[r],i[r]=i[r-1],i[r-1]=a)}else r--;return E}g.inplaceQuickSort=x;function T(E,s,y,e){var r,p,h,a,l,n;for(t[0]=y,i[0]=e,p=0;p>=0;)if(h=t[p],a=i[p]-1,h=r&&hi[p-1]-t[p-1]&&(n=t[p],t[p]=t[p-1],t[p-1]=n,n=i[p],i[p]=i[p-1],i[p-1]=n)}else p--;return s}g.inplaceQuickSortIndices=T}),a4=ai((g,t)=>{var i=aa(),x=Ns(),T=_m().createTupleComparator,E=Kx(),s=$M().inplaceQuickSortIndices;function y(l,n,u,f){var o,c=0,d;for(o=0;o>>1),P=u[A],d[D]=P,w>-1&&(C===0?v[w]=D+1:m[w]=D+1),I=(I+1)%l,A!==b&&A!==O-1&&S.push([I,A+1,O,D,1]),A!==b&&S.push([I,b,A,D,0]),D++;return{axes:n,labels:f,pivots:d,lefts:v,rights:m}}function p(l,n){this.dimensions=l,this.visited=0,this.axes=n.axes,this.labels=n.labels,this.pivots=n.pivots,this.lefts=n.lefts,this.rights=n.rights,this.size=this.labels.length}p.prototype.nearestNeighbor=function(l){var n=1/0,u=null,f=this.dimensions,o=this.axes,c=this.pivots,d=this.lefts,v=this.rights,m=0;function S(M,w){m++;var C=d[w],A=v[w],P=c[w],b=y(f,o,P,l);if(!(b0?C!==0&&S(M,C-1):A!==0&&S(M,A-1),O*O0?A!==0&&S(M,A-1):C!==0&&S(M,C-1))}}return S(0,0),this.visited=m,this.labels[u]};var h=T(3),a=T(2);p.prototype.kNearestNeighbors=function(l,n){if(l<=0)throw new Error("mnemonist/kd-tree.kNearestNeighbors: k should be a positive number.");if(l=Math.min(l,this.size),l===1)return[this.nearestNeighbor(n)];var u=new E(Array,h,l),f=this.dimensions,o=this.axes,c=this.pivots,d=this.lefts,v=this.rights,m=0;function S(C,A){var P=d[A],b=v[A],O=c[A],I=y(f,o,O,n);u.push([I,m++,O]);var D=n[C],B=o[C][O],G=D-B;C=(C+1)%f,D{var i=Hr(),x=Gn();function T(){this.clear()}T.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},T.prototype.first=function(){return this.head?this.head.item:void 0},T.prototype.peek=T.prototype.first,T.prototype.last=function(){return this.tail?this.tail.item:void 0},T.prototype.push=function(E){var s={item:E,next:null};return this.head?(this.tail.next=s,this.tail=s):(this.head=s,this.tail=s),this.size++,this.size},T.prototype.unshift=function(E){var s={item:E,next:null};return this.head?(this.head.next||(this.tail=this.head),s.next=this.head,this.head=s):(this.head=s,this.tail=s),this.size++,this.size},T.prototype.shift=function(){if(this.size){var E=this.head;return this.head=E.next,this.size--,E.item}},T.prototype.forEach=function(E,s){if(this.size){s=arguments.length>1?s:this;for(var y=this.head,e=0;y;)E.call(s,y.item,e,this),y=y.next,e++}},T.prototype.toArray=function(){if(!this.size)return[];for(var E=new Array(this.size),s=0,y=this.size,e=this.head;s{var i=Hr(),x=Gn(),T=Ns(),E=aa();function s(y,e,r){if(arguments.length<2&&(r=y,y=null,e=null),this.capacity=r,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-cache: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-cache: capacity should be a finite positive integer.");var p=T.getPointerArray(r);this.forward=new p(r),this.backward=new p(r),this.K=typeof y=="function"?new y(r):new Array(r),this.V=typeof e=="function"?new e(r):new Array(r),this.size=0,this.head=0,this.tail=0,this.items={}}s.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},s.prototype.splayOnTop=function(y){var e=this.head;if(this.head===y)return this;var r=this.backward[y],p=this.forward[y];return this.tail===y?this.tail=r:this.backward[p]=r,this.forward[r]=p,this.backward[e]=y,this.head=y,this.forward[y]=e,this},s.prototype.set=function(y,e){var r=this.items[y];if(typeof r<"u"){this.splayOnTop(r),this.V[r]=e;return}this.size1?e:this;for(var r=0,p=this.size,h=this.head,a=this.K,l=this.V,n=this.forward;r=e)return{done:!0};var a=p[r];return y++,y=e)return{done:!0};var a=p[r];return y++,y=e)return{done:!0};var l=p[r],n=h[r];return y++,y{var i=Zx(),x=Gn(),T=Ns(),E=aa();function s(e,r,p){arguments.length<2?i.call(this,e):i.call(this,e,r,p);var h=T.getPointerArray(this.capacity);this.deleted=new h(this.capacity),this.deletedSize=0}for(y in i.prototype)s.prototype[y]=i.prototype[y];var y;typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=i.prototype[Symbol.iterator]),s.prototype.clear=function(){i.prototype.clear.call(this),this.deletedSize=0},s.prototype.set=function(e,r){var p=this.items[e];if(typeof p<"u"){this.splayOnTop(p),this.V[p]=r;return}this.size0?p=this.deleted[--this.deletedSize]:p=this.size,this.size++):(p=this.tail,this.tail=this.backward[p],delete this.items[this.K[p]]),this.items[e]=p,this.K[p]=e,this.V[p]=r,this.forward[p]=this.head,this.backward[this.head]=p,this.head=p},s.prototype.setpop=function(e,r){var p=null,h=null,a=this.items[e];return typeof a<"u"?(this.splayOnTop(a),p=this.V[a],this.V[a]=r,{evicted:!1,key:e,value:p}):(this.size0?a=this.deleted[--this.deletedSize]:a=this.size,this.size++):(a=this.tail,this.tail=this.backward[a],p=this.V[a],h=this.K[a],delete this.items[h]),this.items[e]=a,this.K[a]=e,this.V[a]=r,this.forward[a]=this.head,this.backward[this.head]=a,this.head=a,h?{evicted:!0,key:h,value:p}:null)},s.prototype.delete=function(e){var r=this.items[e];if(typeof r>"u")return!1;if(delete this.items[e],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var p=this.backward[r],h=this.forward[r];return this.head===r&&(this.head=h),this.tail===r&&(this.tail=p),this.forward[p]=h,this.backward[h]=p,this.size--,this.deleted[this.deletedSize++]=r,!0},s.prototype.remove=function(e,r=void 0){var p=this.items[e];if(typeof p>"u")return r;var h=this.V[p];if(delete this.items[e],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,h;var a=this.backward[p],l=this.forward[p];return this.head===p&&(this.head=l),this.tail===p&&(this.tail=a),this.forward[a]=l,this.backward[l]=a,this.size--,this.deleted[this.deletedSize++]=p,h},s.from=function(e,r,p,h){if(arguments.length<2){if(h=E.guessLength(e),typeof h!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(h=r,r=null,p=null);var a=new s(r,p,h);return x(e,function(l,n){a.set(n,l)}),a},t.exports=s}),QM=ai((g,t)=>{var i=Zx(),x=Gn(),T=Ns(),E=aa();function s(y,e,r){if(arguments.length<2&&(r=y,y=null,e=null),this.capacity=r,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-map: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-map: capacity should be a finite positive integer.");var p=T.getPointerArray(r);this.forward=new p(r),this.backward=new p(r),this.K=typeof y=="function"?new y(r):new Array(r),this.V=typeof e=="function"?new e(r):new Array(r),this.size=0,this.head=0,this.tail=0,this.items=new Map}s.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},s.prototype.set=function(y,e){var r=this.items.get(y);if(typeof r<"u"){this.splayOnTop(r),this.V[r]=e;return}this.size{var i=QM(),x=Gn(),T=Ns(),E=aa();function s(e,r,p){arguments.length<2?i.call(this,e):i.call(this,e,r,p);var h=T.getPointerArray(this.capacity);this.deleted=new h(this.capacity),this.deletedSize=0}for(y in i.prototype)s.prototype[y]=i.prototype[y];var y;typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=i.prototype[Symbol.iterator]),s.prototype.clear=function(){i.prototype.clear.call(this),this.deletedSize=0},s.prototype.set=function(e,r){var p=this.items.get(e);if(typeof p<"u"){this.splayOnTop(p),this.V[p]=r;return}this.size0?p=this.deleted[--this.deletedSize]:p=this.size,this.size++):(p=this.tail,this.tail=this.backward[p],this.items.delete(this.K[p])),this.items.set(e,p),this.K[p]=e,this.V[p]=r,this.forward[p]=this.head,this.backward[this.head]=p,this.head=p},s.prototype.setpop=function(e,r){var p=null,h=null,a=this.items.get(e);return typeof a<"u"?(this.splayOnTop(a),p=this.V[a],this.V[a]=r,{evicted:!1,key:e,value:p}):(this.size0?a=this.deleted[--this.deletedSize]:a=this.size,this.size++):(a=this.tail,this.tail=this.backward[a],p=this.V[a],h=this.K[a],this.items.delete(h)),this.items.set(e,a),this.K[a]=e,this.V[a]=r,this.forward[a]=this.head,this.backward[this.head]=a,this.head=a,h?{evicted:!0,key:h,value:p}:null)},s.prototype.delete=function(e){var r=this.items.get(e);if(typeof r>"u")return!1;if(this.items.delete(e),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var p=this.backward[r],h=this.forward[r];return this.head===r&&(this.head=h),this.tail===r&&(this.tail=p),this.forward[p]=h,this.backward[h]=p,this.size--,this.deleted[this.deletedSize++]=r,!0},s.prototype.remove=function(e,r=void 0){var p=this.items.get(e);if(typeof p>"u")return r;var h=this.V[p];if(this.items.delete(e),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,h;var a=this.backward[p],l=this.forward[p];return this.head===p&&(this.head=l),this.tail===p&&(this.tail=a),this.forward[a]=l,this.backward[l]=a,this.size--,this.deleted[this.deletedSize++]=p,h},s.from=function(e,r,p,h){if(arguments.length<2){if(h=E.guessLength(e),typeof h!="number")throw new Error("mnemonist/lru-map.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(h=r,r=null,p=null);var a=new s(r,p,h);return x(e,function(l,n){a.set(n,l)}),a},t.exports=s}),u4=ai((g,t)=>{var i=Hr(),x=Gn(),T=Kx(),E=function(y,e){return y[1]>e[1]?-1:y[1]"u"?0:e},s.prototype.get=s.prototype.multiplicity,s.prototype.count=s.prototype.multiplicity,s.prototype.frequency=function(y){if(this.size===0)return 0;var e=this.multiplicity(y);return e/this.size},s.prototype.top=function(y){if(typeof y!="number"||y<=0)throw new Error("mnemonist/multi-set.top: n must be a number > 0.");for(var e=new T(Array,E,y),r=this.items.entries(),p;p=r.next(),!p.done;)e.push(p.value);return e.consume()},s.prototype.forEach=function(y,e){e=arguments.length>1?e:this;var r;this.items.forEach(function(p,h){for(r=0;r1?e:this,this.items.forEach(y,e)},s.prototype.keys=function(){return this.items.keys()},s.prototype.values=function(){var y=this.items.entries(),e=!1,r,p,h,a;return new i(function l(){if(!e){if(r=y.next(),r.done)return{done:!0};e=!0,p=r.value[0],h=r.value[1],a=0}return a>=h?(e=!1,l()):(a++,{done:!1,value:p})})},s.prototype.multiplicities=function(){return this.items.entries()},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.values),s.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.prototype.toJSON=function(){return this.items},s.from=function(y){var e=new s;return x(y,function(r){e.add(r)}),e},s.isSubset=function(y,e){var r=y.multiplicities(),p,h,a;if(y===e)return!0;if(y.dimension>e.dimension)return!1;for(;p=r.next(),!p.done;)if(h=p.value[0],a=p.value[1],e.multiplicity(h){var i=Hr(),x=Gn();function T(l,n,u){return((Math.pow(l,2)-Math.pow(Math.abs(n-u),2))/2|0)+l+1}function E(l,n){for(var u=0,f=0,o=n+1;fn.length?-1:l.lengthn?1:0}function y(l,n){var u=l+1,f=n/u|0,o=f+1,c,d,v=n-f*u,m=u-v,S=new Array(l+1);for(c=0;c 0");this.levenshtein=l,this.k=n,this.clear()}a.prototype.clear=function(){this.size=0,this.strings=[],this.invertedIndices={}},a.prototype.add=function(l){var n=l.length,u=this.size;this.strings.push(l),this.size++;var f=e(this.k,l),o=this.invertedIndices[n];typeof o>"u"&&(o={},this.invertedIndices[n]=o);var c,d,v,m,S;for(m=0,S=f.length;m"u"?(d=[u],o[v]=d):d.push(u);return this},a.prototype.search=function(l){var n=l.length,u=this.k,f=new Set,o,c,d,v,m,S,M,w,C,A,P,b,O,I,D;for(w=Math.max(0,n-u),C=n+u+1;w1?n:this;for(var u=0,f=this.strings.length;u=n)return{done:!0};var f=l[u];return u++,{value:f,done:!1}})},typeof Symbol<"u"&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.inspect=function(){var l=this.strings.slice();return Object.defineProperty(l,"constructor",{value:a,enumerable:!1}),l},typeof Symbol<"u"&&(a.prototype[Symbol.for("nodejs.util.inspect.custom")]=a.prototype.inspect),a.from=function(l,n,u){var f=new a(n,u);return x(l,function(o){f.add(o)}),f},a.countKeys=E,a.comparator=s,a.partition=y,a.segments=e,a.segmentPos=r,a.multiMatchAwareInterval=p,a.multiMatchAwareSubstrings=h,t.exports=a}),c4=ai((g,t)=>{var i=Hr(),x=Gn();function T(){this.clear()}T.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},T.prototype.enqueue=function(E){return this.items.push(E),++this.size},T.prototype.dequeue=function(){if(this.size){var E=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,E}},T.prototype.peek=function(){if(this.size)return this.items[this.offset]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=this.offset,e=0,r=this.items.length;y=E.length)return{done:!0};var y=E[s];return s++,{value:y,done:!1}})},T.prototype.entries=function(){var E=this.items,s=this.offset,y=0;return new i(function(){if(s>=E.length)return{done:!0};var e=E[s];return s++,{value:[y++,e],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.toString=function(){return this.toArray().join(",")},T.prototype.toJSON=function(){return this.toArray()},T.prototype.inspect=function(){var E=this.toArray();return Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E){var s=new T;return x(E,function(y){s.enqueue(y)}),s},T.of=function(){return T.from(arguments)},t.exports=T}),d4=ai((g,t)=>{var i=Hr(),x=Gn();function T(){this.clear()}T.prototype.clear=function(){this.items=[],this.size=0},T.prototype.push=function(E){return this.items.push(E),++this.size},T.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},T.prototype.peek=function(){return this.items[this.size-1]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=0,e=this.items.length;y=s)return{done:!0};var e=E[s-y-1];return y++,{value:e,done:!1}})},T.prototype.entries=function(){var E=this.items,s=E.length,y=0;return new i(function(){if(y>=s)return{done:!0};var e=E[s-y-1];return{value:[y++,e],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.toString=function(){return this.toArray().join(",")},T.prototype.toJSON=function(){return this.toArray()},T.prototype.inspect=function(){var E=this.toArray();return Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E){var s=new T;return x(E,function(y){s.push(y)}),s},T.of=function(){return T.from(arguments)},t.exports=T}),p4=ai(g=>{g.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var t=new Set,i=1/0,x=null,T,E,s=arguments.length;for(E=0;Ei.size)return!1;for(;T=x.next(),!T.done;)if(!i.has(T.value))return!1;return!0},g.isSuperset=function(t,i){return g.isSubset(i,t)},g.add=function(t,i){for(var x=i.values(),T;T=x.next(),!T.done;)t.add(T.value)},g.subtract=function(t,i){for(var x=i.values(),T;T=x.next(),!T.done;)t.delete(T.value)},g.intersect=function(t,i){for(var x=t.values(),T;T=x.next(),!T.done;)i.has(T.value)||t.delete(T.value)},g.disjunct=function(t,i){for(var x=t.values(),T,E=[];T=x.next(),!T.done;)i.has(T.value)&&E.push(T.value);for(x=i.values();T=x.next(),!T.done;)t.has(T.value)||t.add(T.value);for(var s=0,y=E.length;si.size&&(x=t,t=i,i=x),t.size===0)return 0;if(t===i)return t.size;for(var T=t.values(),E,s=0;E=T.next(),!E.done;)i.has(E.value)&&s++;return s},g.unionSize=function(t,i){var x=g.intersectionSize(t,i);return t.size+i.size-x},g.jaccard=function(t,i){var x=g.intersectionSize(t,i);if(x===0)return 0;var T=t.size+i.size-x;return x/T},g.overlap=function(t,i){var x=g.intersectionSize(t,i);return x===0?0:x/Math.min(t.size,i.size)}}),v4=ai((g,t)=>{var i=Hr(),x=Ns().getPointerArray;function T(E){var s=x(E);this.start=0,this.size=0,this.capacity=E,this.dense=new s(E),this.sparse=new s(E)}T.prototype.clear=function(){this.start=0,this.size=0},T.prototype.has=function(E){if(this.size===0)return!1;var s=this.sparse[E],y=s=this.start&&s=this.start&&s1?s:this;for(var y=this.capacity,e=this.size,r=this.start,p=0;p=y)return{done:!0};var p=E[e];return e++,r++,e===s&&(e=0),{value:p,done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=[];return this.forEach(function(s){E.push(s)}),Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E.capacity=this.capacity,E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),t.exports=T}),m4=ai((g,t)=>{var i=Hr(),x=Ns().getPointerArray;function T(E,s){arguments.length<2&&(s=E,E=Array);var y=x(s);this.size=0,this.length=s,this.dense=new y(s),this.sparse=new y(s),this.vals=new E(s)}T.prototype.clear=function(){this.size=0},T.prototype.has=function(E){var s=this.sparse[E];return s=this.size||this.dense[s]!==E?!1:(s=this.dense[this.size-1],this.dense[this.sparse[E]]=s,this.sparse[s]=this.sparse[E],this.size--,!0)},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=0;y{var i=Hr(),x=Ns().getPointerArray;function T(E){var s=x(E);this.size=0,this.length=E,this.dense=new s(E),this.sparse=new s(E)}T.prototype.clear=function(){this.size=0},T.prototype.has=function(E){var s=this.sparse[E];return s=this.size||this.dense[s]!==E?!1:(s=this.dense[this.size-1],this.dense[this.sparse[E]]=s,this.sparse[s]=this.sparse[E],this.size--,!0)},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y,e=0;e{var i=Gn(),x=2,T=2,E=new Set([0,1,2]),s={0:"Returns only the top suggestion",1:"Returns suggestions with the smallest edit distance",2:"Returns every suggestion (no early termination)"};function y(n){var u=new Set;return typeof n=="number"&&u.add(n),{suggestions:u,count:0}}function e(n,u,f){return{term:n||"",distance:u||0,count:f||0}}function r(n,u,f,o){o=o||new Set,u++;var c,d=n.length,v;if(d>1)for(v=0;v0&&n[v].length-d.length>o.length-d.length&&(f.suggestions=new Set,f.count=0),(u===2||!f.suggestions.size||n[v].length-d.length>=o.length-d.length)&&f.suggestions.add(c)}function h(n,u){var f=n.length,o=u.length,c=[[]],d=f+o,v=new Map,m,S,M;for(c[0][0]=d,m=0;m<=f;m++)c[m+1]||(c[m+1]=[]),c[m+1][1]=m,c[m+1][0]=d;for(M=0;M<=o;M++)c[1][M+1]=M,c[0][M+1]=d;var w=n+u,C;for(m=0,S=w.length;mc)return[];for(var m=[d],S=new Set,M=new Set,w=[],C,A;m.length>0&&(C=m.shift(),!(f<2&&w.length>0&&v-C.length>w[0].distance));){if(A=n[C],A!==void 0){if(typeof A=="number"&&(A=y(A)),A.count>0&&!M.has(C)){M.add(C);var P=e(C,v-C.length,A.count);if(w.push(P),f<2&&v-C.length===0)break}A.suggestions.forEach(D=>{var B=u[D];if(!M.has(B)){M.add(B);var G=0;if(d!==B)if(B.length===C.length)G=v-C.length;else if(v===C.length)G=B.length-C.length;else{for(var z=0,X=0,j=B.length;z0||X>0?G=h(B.substr(z,j-z-X),d.substr(z,v-z-X)):G=h(B,d)}if(f<2&&w.length>0&&w[0].distance>G&&(w=[]),!(f<2&&w.length>0&&G>w[0].distance)&&G<=o){var Q=n[B];Q!==void 0&&w.push(e(B,G,Q.count))}}})}if(v-C.length0&&v-C.length>=w[0].distance)continue;for(var b=0,O=C.length;bthis.maxLength&&(this.maxLength=n.length)),u.count===1){var f=this.words.length;this.words.push(n);var o=r(n,0,this.maxDistance);o.forEach(c=>{var d=this.dictionary[c];d!==void 0?(typeof d=="number"&&(d=y(d),this.dictionary[c]=d),d.suggestions.has(f)||p(this.words,this.verbosity,d,n,f,c)):this.dictionary[c]=f})}return this.size++,this},l.prototype.search=function(n){return a(this.dictionary,this.words,this.verbosity,this.maxDistance,this.maxLength,n)},l.prototype.inspect=function(){var n=[];n.size=this.size,n.maxDistance=this.maxDistance,n.verbosity=this.verbosity,n.behavior=s[this.verbosity];for(var u in this.dictionary)typeof this.dictionary[u]=="object"&&this.dictionary[u].count&&n.push([u,this.dictionary[u].count]);return Object.defineProperty(n,"constructor",{value:l,enumerable:!1}),n},typeof Symbol<"u"&&(l.prototype[Symbol.for("nodejs.util.inspect.custom")]=l.prototype.inspect),l.from=function(n,u){var f=new l(u);return i(n,function(o){f.add(o)}),f},t.exports=l}),_M=ai((g,t)=>{var i=Gn(),x=Hr(),T="\0";function E(s){this.mode=s===Array?"array":"string",this.clear()}E.prototype.clear=function(){this.root={},this.size=0},E.prototype.set=function(s,y){for(var e=this.root,r,p=0,h=s.length;p"u")return;if(T in y)return y[T]},E.prototype.delete=function(s){var y=this.root,e=null,r=null,p,h,a,l;for(a=0,l=s.length;a"u")return!1;e!==null?Object.keys(y).length>1&&(e=null,r=null):Object.keys(y).length<2&&(e=p,r=h)}return T in y?(this.size--,e?delete e[r]:delete y[T],!0):!1},E.prototype.has=function(s){for(var y=this.root,e,r=0,p=s.length;r"u")return!1;return T in y},E.prototype.find=function(s){var y=typeof s=="string",e=this.root,r=[],p,h,a;for(h=0,a=s.length;h"u")return r;for(var l=[e],n=[s],u;l.length;){s=n.pop(),e=l.pop();for(u in e){if(u===T){r.push([s,e[T]]);continue}l.push(e[u]),n.push(y?s+u:s.concat(u))}}return r},E.prototype.values=function(s){var y=this.root,e=[],r,p,h;if(s){for(p=0,h=s.length;p"u")return x.empty()}return e.push(y),new x(function(){for(var a,l=!1,n;e.length;){a=e.pop();for(n in a){if(n===T){l=!0;continue}e.push(a[n])}if(l)return{done:!1,value:a[T]}}return{done:!0}})},E.prototype.prefixes=function(s){var y=this.root,e=[],r=[],p,h,a,l=this.mode==="string";if(s){for(h=0,a=s.length;h"u")return x.empty()}else s=l?"":[];return e.push(y),r.push(s),new x(function(){for(var n,u,f=!1,o;e.length;){n=e.pop(),u=r.pop();for(o in n){if(o===T){f=!0;continue}e.push(n[o]),r.push(l?u+o:u.concat(o))}if(f)return{done:!1,value:u}}return{done:!0}})},E.prototype.keys=E.prototype.prefixes,E.prototype.entries=function(s){var y=this.root,e=[],r=[],p,h,a,l=this.mode==="string";if(s){for(h=0,a=s.length;h"u")return x.empty()}else s=l?"":[];return e.push(y),r.push(s),new x(function(){for(var n,u,f=!1,o;e.length;){n=e.pop(),u=r.pop();for(o in n){if(o===T){f=!0;continue}e.push(n[o]),r.push(l?u+o:u.concat(o))}if(f)return{done:!1,value:[u,n[T]]}}return{done:!0}})},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.entries),E.prototype.inspect=function(){for(var s=new Array(this.size),y=this.entries(),e,r=0;e=y.next(),!e.done;)s[r++]=e.value;return Object.defineProperty(s,"constructor",{value:E,enumerable:!1}),s},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.prototype.toJSON=function(){return this.root},E.from=function(s){var y=new E;return i(s,function(e,r){y.set(r,e)}),y},E.SENTINEL=T,t.exports=E}),x4=ai((g,t)=>{var i=Gn(),x=_M(),T="\0";function E(y){this.mode=y===Array?"array":"string",this.clear()}for(s in x.prototype)E.prototype[s]=x.prototype[s];var s;delete E.prototype.set,delete E.prototype.get,delete E.prototype.values,delete E.prototype.entries,E.prototype.add=function(y){for(var e=this.root,r,p=0,h=y.length;p"u")return p;for(var n=[r],u=[y],f;n.length;){y=u.pop(),r=n.pop();for(f in r){if(f===T){p.push(y);continue}n.push(r[f]),u.push(e?y+f:y.concat(f))}}return p},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.keys),E.prototype.inspect=function(){for(var y=new Set,e=this.keys(),r;r=e.next(),!r.done;)y.add(r.value);return Object.defineProperty(y,"constructor",{value:E,enumerable:!1}),y},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.prototype.toJSON=function(){return this.root},E.from=function(y){var e=new E;return i(y,function(r){e.add(r)}),e},E.SENTINEL=T,t.exports=E}),S4=ai((g,t)=>{var i=Hr(),x=Gn(),T=aa(),E=Ns(),s=function(p){return Math.max(1,Math.ceil(p*1.5))},y=function(p){var h=E.getPointerArray(p);return new h(p)};function e(p,h){if(arguments.length<1)throw new Error("mnemonist/vector: expecting at least a byte array constructor.");var a=h||0,l=s,n=0,u=!1;typeof h=="object"&&(a=h.initialCapacity||0,n=h.initialLength||0,l=h.policy||l,u=h.factory===!0),this.factory=u?p:null,this.ArrayClass=p,this.length=n,this.capacity=Math.max(n,a),this.policy=l,this.array=new p(this.capacity)}e.prototype.set=function(p,h){if(this.lengththis.capacity)if(this.factory===null?this.array=new this.ArrayClass(p):this.array=this.factory(p),E.isTypedArray(this.array))this.array.set(h,0);else for(var a=0,l=this.length;a=p)return this;for(h=this.capacity;h=h)return{done:!0};var l=p[a];return a++,{value:l,done:!1}})},e.prototype.entries=function(){var p=this.array,h=this.length,a=0;return new i(function(){if(a>=h)return{done:!0};var l=p[a];return{value:[a++,l],done:!1}})},typeof Symbol<"u"&&(e.prototype[Symbol.iterator]=e.prototype.values),e.prototype.inspect=function(){var p=this.array.slice(0,this.length);return p.type=this.array.constructor.name,p.items=this.length,p.capacity=this.capacity,Object.defineProperty(p,"constructor",{value:e,enumerable:!1}),p},typeof Symbol<"u"&&(e.prototype[Symbol.for("nodejs.util.inspect.custom")]=e.prototype.inspect),e.from=function(p,h,a){if(arguments.length<3&&(a=T.guessLength(p),typeof a!="number"))throw new Error("mnemonist/vector.from: could not guess iterable length. Please provide desired capacity as last argument.");var l=new e(h,a);return x(p,function(n){l.push(n)}),l};function r(p){var h=function(l){e.call(this,p,l)};for(var a in e.prototype)e.prototype.hasOwnProperty(a)&&(h.prototype[a]=e.prototype[a]);return h.from=function(l,n){return e.from(l,p,n)},typeof Symbol<"u"&&(h.prototype[Symbol.iterator]=h.prototype.values),h}e.Int8Vector=r(Int8Array),e.Uint8Vector=r(Uint8Array),e.Uint8ClampedVector=r(Uint8ClampedArray),e.Int16Vector=r(Int16Array),e.Uint16Vector=r(Uint16Array),e.Int32Vector=r(Int32Array),e.Uint32Vector=r(Uint32Array),e.Float32Vector=r(Float32Array),e.Float64Vector=r(Float64Array),e.PointerVector=r(y),t.exports=e}),T4=ai((g,t)=>{var i=aa(),x=Ns(),T=$M().inplaceQuickSortIndices,E=JM().lowerBoundIndices,s=jx(),y=x.getPointerArray;function e(h,a){return h.distancea.distance?-1:0}function r(h,a,l){for(var n=l.length,u=y(n),f=0,o=new u(n),c=new u(n),d=new u(n),v=new Float64Array(n),m=[0,0,n],S=new Float64Array(n),M,w,C,A,P,b,O,I,D;m.length;)if(P=m.pop(),A=m.pop(),M=m.pop(),w=l[P-1],P--,D=P-A,o[M]=w,D!==0){if(D===1){O=h(a[w],a[l[A]]),v[M]=O,f++,d[M]=f,o[f]=l[A];continue}for(I=A;I0&&(f++,d[M]=f,m.push(f,b,P)),b-A>0&&(f++,c[M]=f,m.push(f,A,b))}return{nodes:o,lefts:c,rights:d,mus:v}}function p(h,a){if(typeof h!="function")throw new Error("mnemonist/VPTree.constructor: given `distance` must be a function.");if(!a)throw new Error("mnemonist/VPTree.constructor: you must provide items to the tree. A VPTree cannot be updated after its creation.");this.distance=h,this.heap=new s(e),this.D=0;var l=i.toArrayWithIndices(a);this.items=l[0];var n=l[1];this.size=n.length;var u=r(h,this.items,n);this.nodes=u.nodes,this.lefts=u.lefts,this.rights=u.rights,this.mus=u.mus}p.prototype.nearestNeighbors=function(h,a){var l=this.heap,n=[0],u=1/0,f,o,c,d,v,m,S;for(this.D=0;n.length;)f=n.pop(),o=this.nodes[f],c=this.items[o],S=this.distance(c,a),this.D++,Sh&&l.pop(),l.size>=h&&(u=l.peek().distance)),d=this.lefts[f],v=this.rights[f],!(!d&&!v)&&(m=this.mus[f],S=m-u&&n.push(v)):(v&&S>=m-u&&n.push(v),d&&S=0;w--)M[w]=l.pop();return M},p.prototype.neighbors=function(h,a){var l=[],n=[0],u,f,o,c,d,v,m;for(this.D=0;n.length;)u=n.pop(),f=this.nodes[u],o=this.items[f],m=this.distance(o,a),this.D++,m<=h&&l.push({distance:m,item:o}),c=this.lefts[u],d=this.rights[u],!(!c&&!d)&&(v=this.mus[u],m=v-h&&n.push(d)):(d&&m>=v-h&&n.push(d),c&&m{var i=jx(),x=kx(),T=XF();t.exports={BiMap:YF(),BitSet:kF(),BitVector:jF(),BloomFilter:ZF(),BKTree:JF(),CircularBuffer:$F(),DefaultMap:QF(),DefaultWeakMap:_F(),FixedDeque:jM(),StaticDisjointSet:qF(),FibonacciHeap:x,MinFibonacciHeap:x.MinFibonacciHeap,MaxFibonacciHeap:x.MaxFibonacciHeap,FixedReverseHeap:Kx(),FuzzyMap:t4(),FuzzyMultiMap:e4(),HashedArrayTree:i4(),Heap:i,MinHeap:i.MinHeap,MaxHeap:i.MaxHeap,StaticIntervalTree:n4(),InvertedIndex:s4(),KDTree:a4(),LinkedList:o4(),LRUCache:Zx(),LRUCacheWithDelete:l4(),LRUMap:QM(),LRUMapWithDelete:h4(),MultiMap:KM(),MultiSet:u4(),PassjoinIndex:f4(),Queue:c4(),FixedStack:ZM(),Stack:d4(),SuffixArray:T,GeneralizedSuffixArray:T.GeneralizedSuffixArray,Set:p4(),SparseQueueSet:v4(),SparseMap:m4(),SparseSet:g4(),SymSpell:y4(),Trie:x4(),TrieMap:_M(),Vector:S4(),VPTree:T4()}}),_t=class cr{static get ZERO(){return new cr(0,0)}static get ONE(){return new cr(1,1)}static get UP(){return new cr(0,-1)}static get DOWN(){return new cr(0,1)}static get LEFT(){return new cr(-1,0)}static get RIGHT(){return new cr(1,0)}static get UP_LEFT(){return new cr(-1,-1)}static get UP_RIGHT(){return new cr(1,-1)}static get DOWN_RIGHT(){return new cr(1,1)}static get DOWN_LEFT(){return new cr(-1,1)}constructor(t,i){typeof t=="number"?(this.x=t,this.y=i||0):(this.x=t.x,this.y=t.y)}clone(){return new cr(this.x,this.y)}add(t){return new cr(this.x+t.x,this.y+t.y)}multiply(t){return new cr(this.x*t.x,this.y*t.y)}divide(t){return new cr(this.x/t.x,this.y/t.y)}subtract(t){return new cr(this.x-t.x,this.y-t.y)}equals(t){return this.x===t.x&&this.y===t.y}abs(){return new cr(Math.abs(this.x),Math.abs(this.y))}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}modulo(t){return new cr(this.x%t.x,this.y%t.y)}scalarModulo(t){return new cr(this.x%t,this.y%t)}scalarMult(t){return new cr(this.x*t,this.y*t)}toPosition(){return{x:this.x,y:this.y}}toString(){return`${this.x}#${this.y}`}},Ri=class{static equal(g,t){return g.position.x===t.position.x&&g.position.y===t.position.y&&g.layer===t.layer}static copyOver(g,t){t.position.x=g.position.x,t.position.y=g.position.y,t.layer=g.layer}static clone(g){return{position:g.position.clone(),layer:g.layer}}static toString(g){return`${g.position.toString()}#${g.layer}`}static toInternal(g){return{position:new _t(g.position.x,g.position.y),layer:g.charLayer}}static fromInternal(g){return{position:g.position.toPosition(),charLayer:g.layer}}},M4=(g=>(g.NONE="none",g.LEFT="left",g.UP_LEFT="up-left",g.UP="up",g.UP_RIGHT="up-right",g.RIGHT="right",g.DOWN_RIGHT="down-right",g.DOWN="down",g.DOWN_LEFT="down-left",g))(M4||{}),C4={up:"down",down:"up",left:"right",right:"left",none:"none","up-left":"down-right","up-right":"down-left","down-right":"up-left","down-left":"up-right"},w4={up:_t.UP,down:_t.DOWN,left:_t.LEFT,right:_t.RIGHT,none:_t.ZERO,"up-left":_t.UP_LEFT,"up-right":_t.UP_RIGHT,"down-right":_t.DOWN_RIGHT,"down-left":_t.DOWN_LEFT},gm={up:0,"up-right":1,right:2,"down-right":3,down:4,"down-left":5,left:6,"up-left":7,none:NaN},qM=["up","up-right","right","down-right","down","down-left","left","up-left"],A4=["down-left","down-right","up-right","up-left"];function Jx(){return["up","down","left","right","none","up-left","up-right","down-right","down-left"]}function hd(g){return A4.includes(g)}function P4(g,t=1){return g==="none"?"none":qM[(gm[g]+8-Math.abs(t)%8)%8]}function tC(g,t=1){return g==="none"?"none":qM[(gm[g]+t)%8]}function Au(g){return w4[g]}function R4(g){return C4[g]}function Ca(g,t){if(g.x===t.x){if(g.y>t.y)return"up";if(g.yt.x)return"left";if(g.xt.x){if(g.yt.y)return"up-left"}else if(g.xt.y)return"up-right"}return"none"}var b4=(g=>(g[g.FOUR=4]="FOUR",g[g.EIGHT=8]="EIGHT",g))(b4||{});function Uf(g){return typeof g=="string"&&Jx().includes(g)}var Ay=function(g,t){return Ay=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,x){i.__proto__=x}||function(i,x){for(var T in x)Object.prototype.hasOwnProperty.call(x,T)&&(i[T]=x[T])},Ay(g,t)};function Zd(g,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ay(g,t);function i(){this.constructor=g}g.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}function L4(g,t,i,x){function T(E){return E instanceof i?E:new i(function(s){s(E)})}return new(i||(i=Promise))(function(E,s){function y(p){try{r(x.next(p))}catch(h){s(h)}}function e(p){try{r(x.throw(p))}catch(h){s(h)}}function r(p){p.done?E(p.value):T(p.value).then(y,e)}r((x=x.apply(g,t||[])).next())})}function eC(g,t){var i={label:0,sent:function(){if(E[0]&1)throw E[1];return E[1]},trys:[],ops:[]},x,T,E,s;return s={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function y(r){return function(p){return e([r,p])}}function e(r){if(x)throw new TypeError("Generator is already executing.");for(;s&&(s=0,r[0]&&(i=0)),i;)try{if(x=1,T&&(E=r[0]&2?T.return:r[0]?T.throw||((E=T.return)&&E.call(T),0):T.next)&&!(E=E.call(T,r[1])).done)return E;switch(T=0,E&&(r=[r[0]&2,E.value]),r[0]){case 0:case 1:E=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,T=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(E=i.trys,!(E=E.length>0&&E[E.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!E||r[1]>E[0]&&r[1]=g.length&&(g=void 0),{value:g&&g[x++],done:!g}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function yd(g,t){var i=typeof Symbol=="function"&&g[Symbol.iterator];if(!i)return g;var x=i.call(g),T,E=[],s;try{for(;(t===void 0||t-- >0)&&!(T=x.next()).done;)E.push(T.value)}catch(y){s={error:y}}finally{try{T&&!T.done&&(i=x.return)&&i.call(x)}finally{if(s)throw s.error}}return E}function xd(g,t,i){if(i||arguments.length===2)for(var x=0,T=t.length,E;x1||y(a,l)})})}function y(a,l){try{e(x[a](l))}catch(n){h(E[0][3],n)}}function e(a){a.value instanceof kf?Promise.resolve(a.value.v).then(r,p):h(E[0][2],a)}function r(a){y("next",a)}function p(a){y("throw",a)}function h(a,l){a(l),E.shift(),E.length&&y(E[0][0],E[0][1])}}function O4(g){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=g[Symbol.asyncIterator],i;return t?t.call(g):(g=typeof $f=="function"?$f(g):g[Symbol.iterator](),i={},x("next"),x("throw"),x("return"),i[Symbol.asyncIterator]=function(){return this},i);function x(E){i[E]=g[E]&&function(s){return new Promise(function(y,e){s=g[E](s),T(y,e,s.done,s.value)})}}function T(E,s,y,e){Promise.resolve(e).then(function(r){E({value:r,done:y})},s)}}function gr(g){return typeof g=="function"}function iC(g){var t=function(x){Error.call(x),x.stack=new Error().stack},i=g(t);return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}var v0=iC(function(g){return function(t){g(this),this.message=t?t.length+` errors occurred during unsubscription: + */s.exports={Format:e(27902),Pad:e(41836),RemoveAt:e(33628),Reverse:e(27671),UppercaseFirst:e(35355),UUID:e(45650)}}},x={};function T(s){var y=x[s];if(y!==void 0)return y.exports;var e=x[s]={exports:{}};return i[s](e,e.exports,T),e.exports}T.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var E=T(85454);return E})())})(WM);var Qm=WM.exports;const Uf=kd(Qm);var IF=Object.create,Yx=Object.defineProperty,NF=Object.defineProperties,BF=Object.getOwnPropertyDescriptor,UF=Object.getOwnPropertyDescriptors,zF=Object.getOwnPropertyNames,qS=Object.getOwnPropertySymbols,GF=Object.getPrototypeOf,XM=Object.prototype.hasOwnProperty,VF=Object.prototype.propertyIsEnumerable,tT=(g,t,i)=>t in g?Yx(g,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):g[t]=i,Pn=(g,t)=>{for(var i in t||(t={}))XM.call(t,i)&&tT(g,i,t[i]);if(qS)for(var i of qS(t))VF.call(t,i)&&tT(g,i,t[i]);return g},mh=(g,t)=>NF(g,UF(t)),ai=(g,t)=>()=>(t||g((t={exports:{}}).exports,t),t.exports),HF=(g,t,i,x)=>{if(t&&typeof t=="object"||typeof t=="function")for(let T of zF(t))!XM.call(g,T)&&T!==i&&Yx(g,T,{get:()=>t[T],enumerable:!(x=BF(t,T))||x.enumerable});return g},YM=(g,t,i)=>(i=g!=null?IF(GF(g)):{},HF(t||!g||!g.__esModule?Yx(i,"default",{value:g,enumerable:!0}):i,g)),_m=ai(g=>{var t=function(E,s){return Es?1:0},i=function(E,s){return Es?-1:0};function x(E){return function(s,y){return E(y,s)}}function T(E){return E===2?function(s,y){return s[0]y[0]?1:s[1]y[1]?1:0}:function(s,y){for(var e=0;ey[e])return 1;e++}return 0}}g.DEFAULT_COMPARATOR=t,g.DEFAULT_REVERSE_COMPARATOR=i,g.reverseComparator=x,g.createTupleComparator=T}),WF=ai(g=>{g.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",g.SYMBOL_SUPPORT=typeof Symbol<"u"}),Gn=ai((g,t)=>{var i=WF(),x=i.ARRAY_BUFFER_SUPPORT,T=i.SYMBOL_SUPPORT;t.exports=function(E,s){var y,e,r,p,h;if(!E)throw new Error("obliterator/forEach: invalid iterable.");if(typeof s!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(E)||x&&ArrayBuffer.isView(E)||typeof E=="string"||E.toString()==="[object Arguments]"){for(r=0,p=E.length;r{var i=_m(),x=Gn(),T=i.DEFAULT_COMPARATOR,E=i.reverseComparator;function s(u){if(this.clear(),this.comparator=u||T,typeof this.comparator!="function")throw new Error("mnemonist/FibonacciHeap.constructor: given comparator should be a function.")}s.prototype.clear=function(){this.root=null,this.min=null,this.size=0};function y(u){return{item:u,degree:0}}function e(u,f){u.root?(f.right=u.root.right,f.left=u.root,u.root.right.left=f,u.root.right=f):u.root=f}s.prototype.push=function(u){var f=y(u);return f.left=f,f.right=f,e(this,f),(!this.min||this.comparator(f.item,this.min.item)<=0)&&(this.min=f),++this.size},s.prototype.peek=function(){return this.min?this.min.item:void 0};function r(u){for(var f=[],o=u,c=!1;!(o===u&&c);)o===u&&(c=!0),f.push(o),o=o.right;return f}function p(u,f){u.root===f&&(u.root=f.right),f.left.right=f.right,f.right.left=f.left}function h(u,f){u.child?(f.right=u.child.right,f.left=u.child,u.child.right.left=f,u.child.right=f):u.child=f}function a(u,f,o){p(u,f),f.left=f,f.right=f,h(o,f),o.degree++,f.parent=o}function l(u){var f=new Array(u.size),o=r(u.root),c,d,v,m,S,M;for(c=0,d=o.length;c0&&(M=v,v=m,m=M),a(u,m,v),f[S]=null,S++;f[S]=v}for(c=0;c{var t=Math.pow(2,8)-1,i=Math.pow(2,16)-1,x=Math.pow(2,32)-1,T=Math.pow(2,7)-1,E=Math.pow(2,15)-1,s=Math.pow(2,31)-1;g.getPointerArray=function(e){var r=e-1;if(r<=t)return Uint8Array;if(r<=i)return Uint16Array;if(r<=x)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},g.getSignedPointerArray=function(e){var r=e-1;return r<=T?Int8Array:r<=E?Int16Array:r<=s?Int32Array:Float64Array},g.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var y={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};g.getMinimalRepresentation=function(e,r){var p=null,h=0,a,l,n,u,f;for(u=0,f=e.length;uh&&(h=a,p=l);return p},g.isTypedArray=function(e){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(e)},g.concat=function(){var e=0,r,p,h;for(r=0,h=arguments.length;r{var t=Gn(),i=Ns();function x(y){return Array.isArray(y)||i.isTypedArray(y)}function T(y){if(typeof y.length=="number")return y.length;if(typeof y.size=="number")return y.size}function E(y){var e=T(y),r=typeof e=="number"?new Array(e):[],p=0;return t(y,function(h){r[p++]=h}),r}function s(y){var e=T(y),r=typeof e=="number"?i.getPointerArray(e):Array,p=typeof e=="number"?new Array(e):[],h=typeof e=="number"?new r(e):[],a=0;return t(y,function(l){p[a]=l,h[a]=a++}),[p,h]}g.isArrayLike=x,g.guessLength=T,g.toArray=E,g.toArrayWithIndices=s}),jx=ai((g,t)=>{var i=Gn(),x=_m(),T=aa(),E=x.DEFAULT_COMPARATOR,s=x.reverseComparator;function y(d,v,m,S){for(var M=v[S],w,C;S>m;){if(w=S-1>>1,C=v[w],d(M,C)<0){v[S]=C,S=w;continue}break}v[S]=M}function e(d,v,m){for(var S=v.length,M=m,w=v[m],C=2*m+1,A;C=0&&(C=A),v[m]=v[C],m=C,C=2*m+1;v[m]=w,y(d,v,M,m)}function r(d,v,m){v.push(m),y(d,v,0,v.length-1)}function p(d,v){var m=v.pop();if(v.length!==0){var S=v[0];return v[0]=m,e(d,v,0),S}return m}function h(d,v,m){if(v.length===0)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var S=v[0];return v[0]=m,e(d,v,0),S}function a(d,v,m){var S;return v.length!==0&&d(v[0],m)<0&&(S=v[0],v[0]=m,m=S,e(d,v,0)),m}function l(d,v){for(var m=v.length,S=m>>1,M=S;--M>=0;)e(d,v,M)}function n(d,v){for(var m=v.length,S=0,M=new Array(m);S=m.length)return m.slice().sort(d);for(P=m.slice(0,v),l(S,P),M=v,w=m.length;M0&&h(S,P,m[M]);return P.sort(d)}var b=T.guessLength(m);return b!==null&&b0&&h(S,P,O)),M++}),P.length>M&&(P.length=M),P.sort(d)}function f(d,v,m){arguments.length===2&&(m=v,v=d,d=E);var S=s(d),M,w,C,A=-1/0,P;if(v===1){if(T.isArrayLike(m)){for(M=0,w=m.length;M0)&&(A=C);return P=new m.constructor(1),P[0]=A,P}return i(m,function(O){(A===-1/0||d(O,A)>0)&&(A=O)}),[A]}if(T.isArrayLike(m)){if(v>=m.length)return m.slice().sort(S);for(P=m.slice(0,v),l(d,P),M=v,w=m.length;M0&&h(d,P,m[M]);return P.sort(S)}var b=T.guessLength(m);return b!==null&&b0&&h(d,P,O)),M++}),P.length>M&&(P.length=M),P.sort(S)}function o(d){if(this.clear(),this.comparator=d||E,typeof this.comparator!="function")throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}o.prototype.clear=function(){this.items=[],this.size=0},o.prototype.push=function(d){return r(this.comparator,this.items,d),++this.size},o.prototype.peek=function(){return this.items[0]},o.prototype.pop=function(){return this.size!==0&&this.size--,p(this.comparator,this.items)},o.prototype.replace=function(d){return h(this.comparator,this.items,d)},o.prototype.pushpop=function(d){return a(this.comparator,this.items,d)},o.prototype.consume=function(){return this.size=0,n(this.comparator,this.items)},o.prototype.toArray=function(){return n(this.comparator,this.items.slice())},o.prototype.inspect=function(){var d=this.toArray();return Object.defineProperty(d,"constructor",{value:o,enumerable:!1}),d},typeof Symbol<"u"&&(o.prototype[Symbol.for("nodejs.util.inspect.custom")]=o.prototype.inspect);function c(d){if(this.clear(),this.comparator=d||E,typeof this.comparator!="function")throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=s(this.comparator)}c.prototype=o.prototype,o.from=function(d,v){var m=new o(v),S;return T.isArrayLike(d)?S=d.slice():S=T.toArray(d),l(m.comparator,S),m.items=S,m.size=S.length,m},c.from=function(d,v){var m=new c(v),S;return T.isArrayLike(d)?S=d.slice():S=T.toArray(d),l(m.comparator,S),m.items=S,m.size=S.length,m},o.siftUp=e,o.siftDown=y,o.push=r,o.pop=p,o.replace=h,o.pushpop=a,o.heapify=l,o.consume=n,o.nsmallest=u,o.nlargest=f,o.MinHeap=o,o.MaxHeap=c,t.exports=o}),XF=ai((g,t)=>{var i="";function x(r,p,h){for(var a=p.length,l=[],n=a,u=-1,f,o=0,c;n--;)u=Math.max(r[p[n]+h],u);for(c=u>>24&&32||u>>16&&24||u>>8&&16||8;o>o&15].push(p[n]);for(f=0;f<16;f++)for(u=l[f].length;u--;)p[++n]=l[f][u]}}function T(r,p,h,a){return r[h]-r[a]||(h%3===2?r[h+1]-r[a+1]||p[h+2]-p[a+2]:p[h+1]-p[a+1])}function E(r,p){var h=[],a=[],l=2*p/3|0,n=p-l,u=l+1>>1,f=l,o=0,c,d=[],v=[];if(p===1)return[0];for(;f--;)h[f]=(f*3>>1)+1;for(f=3;f--;)x(r,h,f);for(o=a[(h[0]/3|0)+(h[0]%3===1?0:u)]=1,f=1;fthis.firstLength&&n>this.firstLength)){for(p=Math.min(this.length-l,this.length-n),a=0;ar.length&&(r=this.text.slice(l,l+p))}return r},e.prototype.toString=function(){return this.array.join(",")},e.prototype.toJSON=function(){return this.array},e.prototype.inspect=function(){for(var r=new Array(this.length),p=0;p{var i=Gn();function x(r){this.size=0,this.items=new Map,this.inverse=r}function T(){this.size=0,this.items=new Map,this.inverse=new x(this)}function E(){this.size=0,this.items.clear(),this.inverse.items.clear()}T.prototype.clear=E,x.prototype.clear=E;function s(r,p){if(this.items.has(r)){var h=this.items.get(r);if(h===p)return this;this.inverse.items.delete(h)}if(this.inverse.items.has(p)){var a=this.inverse.items.get(p);if(a===r)return this;this.items.delete(a)}return this.items.set(r,p),this.inverse.items.set(p,r),this.size=this.items.size,this.inverse.size=this.inverse.items.size,this}T.prototype.set=s,x.prototype.set=s;function y(r){if(this.items.has(r)){var p=this.items.get(r);return this.items.delete(r),this.inverse.items.delete(p),this.size=this.items.size,this.inverse.size=this.inverse.items.size,!0}return!1}T.prototype.delete=y,x.prototype.delete=y;var e=["has","get","forEach","keys","values","entries"];e.forEach(function(r){T.prototype[r]=x.prototype[r]=function(){return Map.prototype[r].apply(this.items,arguments)}}),typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.entries,x.prototype[Symbol.iterator]=x.prototype.entries),T.prototype.inspect=function(){var r={left:this.items,right:this.inverse.items};return Object.defineProperty(r,"constructor",{value:T,enumerable:!1}),r},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),x.prototype.inspect=function(){var r={left:this.inverse.items,right:this.items};return Object.defineProperty(r,"constructor",{value:x,enumerable:!1}),r},typeof Symbol<"u"&&(x.prototype[Symbol.for("nodejs.util.inspect.custom")]=x.prototype.inspect),T.from=function(r){var p=new T;return i(r,function(h,a){p.set(a,h)}),p},t.exports=T}),Hr=ai((g,t)=>{function i(x){if(typeof x!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=x}typeof Symbol<"u"&&(i.prototype[Symbol.iterator]=function(){return this}),i.of=function(){var x=arguments,T=x.length,E=0;return new i(function(){return E>=T?{done:!0}:{done:!1,value:x[E++]}})},i.empty=function(){var x=new i(function(){return{done:!0}});return x},i.fromSequence=function(x){var T=0,E=x.length;return new i(function(){return T>=E?{done:!0}:{done:!1,value:x[T++]}})},i.is=function(x){return x instanceof i?!0:typeof x=="object"&&x!==null&&typeof x.next=="function"},t.exports=i}),kM=ai(g=>{function t(s){return s|=s>>1,s|=s>>2,s|=s>>4,s|=s>>8,s|=s>>16,s&~(s>>1)}g.msb32=t;function i(s){return s|=s>>1,s|=s>>2,s|=s>>4,s&~(s>>1)}g.msb8=i,g.test=function(s,y){return s>>y&1},g.criticalBit8=function(s,y){return i(s^y)},g.criticalBit8Mask=function(s,y){return~i(s^y)>>>0&255},g.testCriticalBit8=function(s,y){return 1+(s|y)>>8},g.criticalBit32Mask=function(s,y){return~t(s^y)>>>0&4294967295},g.popcount=function(s){return s-=s>>1&1431655765,s=(s&858993459)+(s>>2&858993459),s=s+(s>>4)&252645135,s+=s>>8,s+=s>>16,s&127};var x=new Uint8Array(Math.pow(2,8));for(T=0,E=x.length;T>8&255]+x[s>>16&255]+x[s>>24&255]}}),kF=ai((g,t)=>{var i=Hr(),x=kM();function T(E){this.length=E,this.clear()}T.prototype.clear=function(){this.size=0,this.array=new Uint32Array(Math.ceil(this.length/32))},T.prototype.set=function(E,s){var y=E>>5,e=E&31,r=this.array[y],p;return s===0||s===!1?p=this.array[y]&=~(1<>>0,p>r?this.size++:p>5,y=E&31,e=this.array[s],r;return r=this.array[s]&=~(1<>5,y=E&31,e=this.array[s],r=this.array[s]^=1<>>0,r>e?this.size++:r>5,y=E&31;return this.array[s]>>y&1},T.prototype.test=function(E){return!!this.get(E)},T.prototype.rank=function(E){if(this.size===0)return 0;for(var s=E>>5,y=E&31,e=0,r=0;r=this.length)return-1;for(var s,y=32,e=0,r=0,p=0,h=this.array.length;p>a&1,r===E)return e}},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=this.length,e,r,p=32,h=0,a=this.array.length;h>l&1,E.call(s,r,h*32+l)}},T.prototype.values=function(){var E=this.length,s=!1,y,e,r=this.array,p=r.length,h=0,a=-1,l=32;return new i(function n(){if(!s){if(h>=p)return{done:!0};h===p-1&&(l=E%32||32),y=r[h++],s=!0,a=-1}return a++,a>=l?(s=!1,n()):(e=y>>a&1,{value:e})})},T.prototype.entries=function(){var E=this.length,s=!1,y,e,r=this.array,p,h=r.length,a=0,l=-1,n=32;return new i(function u(){if(!s){if(a>=h)return{done:!0};a===h-1&&(n=E%32||32),y=r[a++],s=!0,l=-1}return l++,p=~-a*32+l,l>=n?(s=!1,u()):(e=y>>l&1,{value:[p,e]})})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=new Uint8Array(this.length);return this.forEach(function(s,y){E[y]=s}),Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.prototype.toJSON=function(){return Array.from(this.array)},t.exports=T}),jF=ai((g,t)=>{var i=Hr(),x=kM(),T=function(y){return Math.max(1,Math.ceil(y*1.5))};function E(y){return new Uint32Array(Math.ceil(y/32))}function s(y){var e=y||0,r=T;typeof y=="object"&&(e=y.initialLength||y.initialCapacity||0,r=y.policy||r),this.size=0,this.length=e,this.capacity=Math.ceil(this.length/32)*32,this.policy=r,this.array=E(this.capacity)}s.prototype.set=function(y,e){if(this.length>5,p=y&31,h=this.array[r],a;return e===0||e===!1?a=this.array[r]&=~(1<>>0,a>h?this.size++:a>5,r=y&31,p=this.array[e],h;return h=this.array[e]&=~(1<>5,r=y&31,p=this.array[e],h=this.array[e]^=1<>>0,h>p?this.size++:hthis.array.length?(this.array=new Uint32Array(p),this.array.set(r,0)):this.array=r.slice(0,p),this.capacity=y,this)},s.prototype.grow=function(y){var e;if(typeof y=="number"){if(this.capacity>=y)return this;for(e=this.capacity;e>5,p=e&31;return this.array[r]|=1<>5,r=y&31;return this.array[e]>>r&1}},s.prototype.get=function(y){if(!(this.length>5,r=y&31;return this.array[e]>>r&1}},s.prototype.test=function(y){return this.length>5,r=y&31,p=0,h=0;h=this.length)return-1;for(var e,r=32,p=0,h=0,a=0,l=this.array.length;a>n&1,h===y)return p}},s.prototype.forEach=function(y,e){e=arguments.length>1?e:this;for(var r=this.length,p,h,a=32,l=0,n=this.array.length;l>u&1,y.call(e,h,l*32+u)}},s.prototype.values=function(){var y=this.length,e=!1,r,p,h=this.array,a=h.length,l=0,n=-1,u=32;return new i(function f(){if(!e){if(l>=a)return{done:!0};l===a-1&&(u=y%32||32),r=h[l++],e=!0,n=-1}return n++,n>=u?(e=!1,f()):(p=r>>n&1,{value:p})})},s.prototype.entries=function(){var y=this.length,e=!1,r,p,h=this.array,a,l=h.length,n=0,u=-1,f=32;return new i(function o(){if(!e){if(n>=l)return{done:!0};n===l-1&&(f=y%32||32),r=h[n++],e=!0,u=-1}return u++,a=~-n*32+u,u>=f?(e=!1,o()):(p=r>>u&1,{value:[a,p]})})},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.values),s.prototype.inspect=function(){var y=new Uint8Array(this.length);return this.forEach(function(e,r){y[r]=e}),Object.defineProperty(y,"constructor",{value:s,enumerable:!1}),y},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.prototype.toJSON=function(){return Array.from(this.array.slice(0,(this.length>>5)+1))},t.exports=s}),KF=ai((g,t)=>{function i(E,s){return(E&65535)*s+(((E>>>16)*s&65535)<<16)&4294967295}function x(E,s){return(E&65535)+(s>>>16)+(((E>>>16)+s&65535)<<16)&4294967295}function T(E,s){return E<>>32-s}t.exports=function(E,s){var y=3432918353,e=461845907,r=15,p=13,h=5,a=1801774676,l=E,n,u,f;for(u=0,f=s.length-4;u<=f;u+=4)n=s[u]|s[u+1]<<8|s[u+2]<<16|s[u+3]<<24,n=i(n,y),n=T(n,r),n=i(n,e),l^=n,l=T(l,p),l=i(l,h),l=x(l,a);switch(n=0,s.length&3){case 3:n^=s[u+2]<<16;case 2:n^=s[u+1]<<8;case 1:n^=s[u],n=i(n,y),n=T(n,r),n=i(n,e),l^=n}return l^=s.length,l^=l>>>16,l=i(l,2246822507),l^=l>>>13,l=i(l,3266489909),l^=l>>>16,l>>>0}}),ZF=ai((g,t)=>{var i=KF(),x=Gn(),T=Math.LN2*Math.LN2,E={errorRate:.005};function s(r){var p=new Uint16Array(r.length),h,a;for(h=0,a=r.length;h>3]|=n}return this},e.prototype.test=function(r){for(var p=s(r),h=0,a=this.hashFunctions;h>3]&1<<(7&l)))return!1}return!0},e.prototype.toJSON=function(){return this.data},e.from=function(r,p){if(!p&&(p=r.length||r.size,typeof p!="number"))throw new Error("BloomFilter.from: could not infer the filter's capacity. Try passing it as second argument.");var h=new e(p);return x(r,function(a){h.add(a)}),h},t.exports=e}),JF=ai((g,t)=>{var i=Gn();function x(T){if(typeof T!="function")throw new Error("mnemonist/BKTree.constructor: given `distance` should be a function.");this.distance=T,this.clear()}x.prototype.add=function(T){if(!this.root)return this.root={item:T,children:{}},this.size++,this;for(var E=this.root,s;s=this.distance(T,E.item),!!E.children[s];)E=E.children[s];return E.children[s]={item:T,children:{}},this.size++,this},x.prototype.search=function(T,E){if(!this.root)return[];for(var s=[],y=[this.root],e,r,p,h,a;y.length;)for(e=y.pop(),p=this.distance(E,e.item),p<=T&&s.push({item:e.item,distance:p}),h=p-T,a=p+T+1;h{var i=aa(),x=Hr();function T(E,s){if(arguments.length<2)throw new Error("mnemonist/fixed-deque: expecting an Array class and a capacity.");if(typeof s!="number"||s<=0)throw new Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=E,this.capacity=s,this.items=new E(this.capacity),this.clear()}T.prototype.clear=function(){this.start=0,this.size=0},T.prototype.push=function(E){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.push: deque capacity ("+this.capacity+") exceeded!");var s=this.start+this.size;return s>=this.capacity&&(s-=this.capacity),this.items[s]=E,++this.size},T.prototype.unshift=function(E){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.unshift: deque capacity ("+this.capacity+") exceeded!");var s=this.start-1;return this.start===0&&(s=this.capacity-1),this.items[s]=E,this.start=s,++this.size},T.prototype.pop=function(){if(this.size!==0){this.size--;var E=this.start+this.size;return E>=this.capacity&&(E-=this.capacity),this.items[E]}},T.prototype.shift=function(){if(this.size!==0){var E=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[E]}},T.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},T.prototype.peekLast=function(){if(this.size!==0){var E=this.start+this.size-1;return E>=this.capacity&&(E-=this.capacity),this.items[E]}},T.prototype.get=function(E){if(!(this.size===0||E>=this.capacity))return E=this.start+E,E>=this.capacity&&(E-=this.capacity),this.items[E]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=this.capacity,e=this.size,r=this.start,p=0;p=y)return{done:!0};var p=E[e];return e++,r++,e===s&&(e=0),{value:p,done:!1}})},T.prototype.entries=function(){var E=this.items,s=this.capacity,y=this.size,e=this.start,r=0;return new x(function(){if(r>=y)return{done:!0};var p=E[e];return e++,e===s&&(e=0),{value:[r++,p],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=this.toArray();return E.type=this.ArrayClass.name,E.capacity=this.capacity,Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E,s,y){if(arguments.length<3&&(y=i.guessLength(E),typeof y!="number"))throw new Error("mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.");var e=new T(s,y);if(i.isArrayLike(E)){var r,p;for(r=0,p=E.length;r{var i=aa(),x=jM();function T(s,y){if(arguments.length<2)throw new Error("mnemonist/circular-buffer: expecting an Array class and a capacity.");if(typeof y!="number"||y<=0)throw new Error("mnemonist/circular-buffer: `capacity` should be a positive number.");this.ArrayClass=s,this.capacity=y,this.items=new s(this.capacity),this.clear()}function E(s){T.prototype[s]=x.prototype[s]}Object.keys(x.prototype).forEach(E),typeof Symbol<"u"&&Object.getOwnPropertySymbols(x.prototype).forEach(E),T.prototype.push=function(s){var y=this.start+this.size;return y>=this.capacity&&(y-=this.capacity),this.items[y]=s,this.size===this.capacity?(y++,y>=this.capacity?this.start=0:this.start=y,this.size):++this.size},T.prototype.unshift=function(s){var y=this.start-1;return this.start===0&&(y=this.capacity-1),this.items[y]=s,this.size===this.capacity?(this.start=y,this.size):(this.start=y,++this.size)},T.from=function(s,y,e){if(arguments.length<3&&(e=i.guessLength(s),typeof e!="number"))throw new Error("mnemonist/circular-buffer.from: could not guess iterable length. Please provide desired capacity as last argument.");var r=new T(y,e);if(i.isArrayLike(s)){var p,h;for(p=0,h=s.length;p{function i(x){if(typeof x!="function")throw new Error("mnemonist/DefaultMap.constructor: expecting a function.");this.items=new Map,this.factory=x,this.size=0}i.prototype.clear=function(){this.items.clear(),this.size=0},i.prototype.get=function(x){var T=this.items.get(x);return typeof T>"u"&&(T=this.factory(x,this.size),this.items.set(x,T),this.size++),T},i.prototype.peek=function(x){return this.items.get(x)},i.prototype.set=function(x,T){return this.items.set(x,T),this.size=this.items.size,this},i.prototype.has=function(x){return this.items.has(x)},i.prototype.delete=function(x){var T=this.items.delete(x);return this.size=this.items.size,T},i.prototype.forEach=function(x,T){T=arguments.length>1?T:this,this.items.forEach(x,T)},i.prototype.entries=function(){return this.items.entries()},i.prototype.keys=function(){return this.items.keys()},i.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(i.prototype[Symbol.iterator]=i.prototype.entries),i.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(i.prototype[Symbol.for("nodejs.util.inspect.custom")]=i.prototype.inspect),i.autoIncrement=function(){var x=0;return function(){return x++}},t.exports=i}),_F=ai((g,t)=>{function i(x){if(typeof x!="function")throw new Error("mnemonist/DefaultWeakMap.constructor: expecting a function.");this.items=new WeakMap,this.factory=x}i.prototype.clear=function(){this.items=new WeakMap},i.prototype.get=function(x){var T=this.items.get(x);return typeof T>"u"&&(T=this.factory(x),this.items.set(x,T)),T},i.prototype.peek=function(x){return this.items.get(x)},i.prototype.set=function(x,T){return this.items.set(x,T),this},i.prototype.has=function(x){return this.items.has(x)},i.prototype.delete=function(x){return this.items.delete(x)},i.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(i.prototype[Symbol.for("nodejs.util.inspect.custom")]=i.prototype.inspect),t.exports=i}),qF=ai((g,t)=>{var i=Ns();function x(T){var E=i.getPointerArray(T),s=i.getPointerArray(Math.log2(T));this.size=T,this.dimension=T,this.parents=new E(T),this.ranks=new s(T);for(var y=0;yr?this.parents[y]=s:(this.parents[y]=s,this.ranks[s]++),this},x.prototype.connected=function(T,E){var s=this.find(T);return s===this.find(E)},x.prototype.mapping=function(){for(var T=i.getPointerArray(this.dimension),E={},s=new T(this.size),y=0,e,r=0,p=this.parents.length;r"u"?(s[r]=y,E[e]=y++):s[r]=E[e];return s},x.prototype.compile=function(){for(var T={},E=new Array(this.dimension),s=0,y,e=0,r=this.parents.length;e"u"?(E[s]=[e],T[y]=s++):E[T[y]].push(e);return E},x.prototype.inspect=function(){var T=this.compile();return Object.defineProperty(T,"constructor",{value:x,enumerable:!1}),T},typeof Symbol<"u"&&(x.prototype[Symbol.for("nodejs.util.inspect.custom")]=x.prototype.inspect),t.exports=x}),Kx=ai((g,t)=>{var i=_m(),x=jx(),T=i.DEFAULT_COMPARATOR,E=i.reverseComparator;function s(r,p,h,a){for(var l=h,n=a,u=p[a],f=2*a+1,o;f=0&&(f=o),p[a]=p[f],a=f,f=2*a+1;p[a]=u,x.siftDown(r,p,n,a)}function y(r,p,h,a){for(var l=a,n=l,u=new r(a),f,o;n>0;)f=h[--n],n!==0&&(o=h[0],h[0]=f,s(p,h,--a,0),f=o),u[n]=f;return u}function e(r,p,h){if(arguments.length===2&&(h=p,p=null),this.ArrayClass=r,this.capacity=h,this.items=new r(h),this.clear(),this.comparator=p||T,typeof h!="number"&&h<=0)throw new Error("mnemonist/FixedReverseHeap.constructor: capacity should be a number > 0.");if(typeof this.comparator!="function")throw new Error("mnemonist/FixedReverseHeap.constructor: given comparator should be a function.");this.comparator=E(this.comparator)}e.prototype.clear=function(){this.size=0},e.prototype.push=function(r){return this.size0&&x.replace(this.comparator,this.items,r),this.size},e.prototype.peek=function(){return this.items[0]},e.prototype.consume=function(){var r=y(this.ArrayClass,this.comparator,this.items,this.size);return this.size=0,r},e.prototype.toArray=function(){return y(this.ArrayClass,this.comparator,this.items.slice(0,this.size),this.size)},e.prototype.inspect=function(){var r=this.toArray();return Object.defineProperty(r,"constructor",{value:e,enumerable:!1}),r},typeof Symbol<"u"&&(e.prototype[Symbol.for("nodejs.util.inspect.custom")]=e.prototype.inspect),t.exports=e}),t4=ai((g,t)=>{var i=Gn(),x=function(E){return E};function T(E){if(this.items=new Map,this.clear(),Array.isArray(E)?(this.writeHashFunction=E[0],this.readHashFunction=E[1]):(this.writeHashFunction=E,this.readHashFunction=E),this.writeHashFunction||(this.writeHashFunction=x),this.readHashFunction||(this.readHashFunction=x),typeof this.writeHashFunction!="function")throw new Error("mnemonist/FuzzyMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMap.constructor: invalid hash function given.")}T.prototype.clear=function(){this.items.clear(),this.size=0},T.prototype.add=function(E){var s=this.writeHashFunction(E);return this.items.set(s,E),this.size=this.items.size,this},T.prototype.set=function(E,s){return E=this.writeHashFunction(E),this.items.set(E,s),this.size=this.items.size,this},T.prototype.get=function(E){return E=this.readHashFunction(E),this.items.get(E)},T.prototype.has=function(E){return E=this.readHashFunction(E),this.items.has(E)},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this,this.items.forEach(function(y){E.call(s,y,y)})},T.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=Array.from(this.items.values());return Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E,s,y){var e=new T(s);return i(E,function(r,p){y?e.set(p,r):e.add(r)}),e},t.exports=T}),KM=ai((g,t)=>{var i=Hr(),x=Gn();function T(E){this.Container=E||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,"constructor",{value:T,enumerable:!1})}T.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},T.prototype.set=function(E,s){var y=this.items.get(E),e;return y||(this.dimension++,y=new this.Container,this.items.set(E,y)),this.Container===Set?(e=y.size,y.add(s),e"u"?0:this.Container===Set?s.size:s.length},T.prototype.count=T.prototype.multiplicity,T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;var y;function e(r){E.call(s,r,y)}this.items.forEach(function(r,p){y=p,r.forEach(e)})},T.prototype.forEachAssociation=function(E,s){s=arguments.length>1?s:this,this.items.forEach(E,s)},T.prototype.keys=function(){return this.items.keys()},T.prototype.values=function(){var E=this.items.values(),s=!1,y,e,r,p;return this.Container===Set?new i(function h(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,y=e.value.values()}return e=y.next(),e.done?(s=!1,h()):{done:!1,value:e.value}}):new i(function h(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,y=e.value,r=0,p=y.length}return r>=p?(s=!1,h()):{done:!1,value:y[r++]}})},T.prototype.entries=function(){var E=this.items.entries(),s=!1,y,e,r,p,h;return this.Container===Set?new i(function a(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,r=e.value[0],y=e.value[1].values()}return e=y.next(),e.done?(s=!1,a()):{done:!1,value:[r,e.value]}}):new i(function a(){if(!s){if(e=E.next(),e.done)return{done:!0};s=!0,r=e.value[0],y=e.value[1],p=0,h=y.length}return p>=h?(s=!1,a()):{done:!1,value:[r,y[p++]]}})},T.prototype.containers=function(){return this.items.values()},T.prototype.associations=function(){return this.items.entries()},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.entries),T.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.prototype.toJSON=function(){return this.items},T.from=function(E,s){var y=new T(s);return x(E,function(e,r){y.set(r,e)}),y},t.exports=T}),e4=ai((g,t)=>{var i=KM(),x=Gn(),T=function(s){return s};function E(s,y){if(this.items=new i(y),this.clear(),Array.isArray(s)?(this.writeHashFunction=s[0],this.readHashFunction=s[1]):(this.writeHashFunction=s,this.readHashFunction=s),this.writeHashFunction||(this.writeHashFunction=T),this.readHashFunction||(this.readHashFunction=T),typeof this.writeHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.")}E.prototype.clear=function(){this.items.clear(),this.size=0,this.dimension=0},E.prototype.add=function(s){var y=this.writeHashFunction(s);return this.items.set(y,s),this.size=this.items.size,this.dimension=this.items.dimension,this},E.prototype.set=function(s,y){return s=this.writeHashFunction(s),this.items.set(s,y),this.size=this.items.size,this.dimension=this.items.dimension,this},E.prototype.get=function(s){return s=this.readHashFunction(s),this.items.get(s)},E.prototype.has=function(s){return s=this.readHashFunction(s),this.items.has(s)},E.prototype.forEach=function(s,y){y=arguments.length>1?y:this,this.items.forEach(function(e){s.call(y,e,e)})},E.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.values),E.prototype.inspect=function(){var s=Array.from(this);return Object.defineProperty(s,"constructor",{value:E,enumerable:!1}),s},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.from=function(s,y,e,r){arguments.length===3&&typeof e=="boolean"&&(r=e,e=Array);var p=new E(y,e);return x(s,function(h,a){r?p.set(a,h):p.add(h)}),p},t.exports=E}),i4=ai((g,t)=>{var i=1024;function x(E){return(E&E-1)===0}function T(E,s){if(arguments.length<1)throw new Error("mnemonist/hashed-array-tree: expecting at least a byte array constructor.");var y=s||0,e=i,r=0;if(typeof s=="object"&&(y=s.initialCapacity||0,r=s.initialLength||0,e=s.blockSize||i),!e||!x(e))throw new Error("mnemonist/hashed-array-tree: block size should be a power of two.");var p=Math.max(r,y),h=Math.ceil(p/e);this.ArrayClass=E,this.length=r,this.capacity=h*e,this.blockSize=e,this.offsetMask=e-1,this.blockMask=Math.log2(e),this.blocks=new Array(h);for(var a=0;a>this.blockMask,e=E&this.offsetMask;return this.blocks[y][e]=s,this},T.prototype.get=function(E){if(!(this.length>this.blockMask,y=E&this.offsetMask;return this.blocks[s][y]}},T.prototype.grow=function(E){if(typeof E!="number"&&(E=this.capacity+this.blockSize),this.capacity>=E)return this;for(;this.capacity>this.blockMask,e=s&this.offsetMask;return this.blocks[y][e]=E,++this.length},T.prototype.pop=function(){if(this.length!==0){var E=this.blocks[this.blocks.length-1],s=--this.length&this.offsetMask;return E[s]}},T.prototype.inspect=function(){for(var E=new this.ArrayClass(this.length),s,y=0,e=this.length;y>this.blockMask,E[y]=this.blocks[s][y&this.offsetMask];return E.type=this.ArrayClass.name,E.items=this.length,E.capacity=this.capacity,E.blockSize=this.blockSize,Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),t.exports=T}),ZM=ai((g,t)=>{var i=Hr(),x=aa();function T(E,s){if(arguments.length<2)throw new Error("mnemonist/fixed-stack: expecting an Array class and a capacity.");if(typeof s!="number"||s<=0)throw new Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=s,this.ArrayClass=E,this.items=new this.ArrayClass(this.capacity),this.clear()}T.prototype.clear=function(){this.size=0},T.prototype.push=function(E){if(this.size===this.capacity)throw new Error("mnemonist/fixed-stack.push: stack capacity ("+this.capacity+") exceeded!");return this.items[this.size++]=E,this.size},T.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]},T.prototype.peek=function(){return this.items[this.size-1]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=0,e=this.items.length;y=s)return{done:!0};var e=E[s-y-1];return y++,{value:e,done:!1}})},T.prototype.entries=function(){var E=this.items,s=this.size,y=0;return new i(function(){if(y>=s)return{done:!0};var e=E[s-y-1];return{value:[y++,e],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.toString=function(){return this.toArray().join(",")},T.prototype.toJSON=function(){return this.toArray()},T.prototype.inspect=function(){var E=this.toArray();return E.type=this.ArrayClass.name,E.capacity=this.capacity,Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E,s,y){if(arguments.length<3&&(y=x.guessLength(E),typeof y!="number"))throw new Error("mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.");var e=new T(s,y);if(x.isArrayLike(E)){var r,p;for(r=0,p=E.length;r{var i=aa(),x=Ns(),T=ZM();function E(y,e,r,p,h,a,l,n){var u=l+(n-l)/2|0,f=~-u,o=-~u,c=r[u];p[a]=c+1;var d=e?e(y[c]):y[c][1],v=a*2+1,m=a*2+2,S=-1/0,M=-1/0;l<=f&&(S=E(y,e,r,p,h,v,l,f)),o<=n&&(M=E(y,e,r,p,h,m,o,n));var w=Math.max(d,S,M),C=c;return w===S?C=h[p[v]-1]:w===M&&(C=h[p[m]-1]),h[c]=C,w}function s(y,e){this.size=y.length,this.intervals=y;var r=null,p=null;Array.isArray(e)&&(r=e[0],p=e[1]);var h=y.length,a=x.getPointerArray(h+1),l=new a(h),n;for(n=1;nv?1:0});var u=Math.ceil(Math.log2(h+1)),f=Math.pow(2,u)-1,o=new a(f),c=new a(h);E(y,p,l,o,c,0,0,h-1),l=null,this.height=u,this.tree=o,this.augmentations=c,this.startGetter=r,this.endGetter=p,this.stack=new T(a,this.height)}s.prototype.intervalsContainingPoint=function(y){var e=[],r=this.stack;r.clear(),r.push(0);for(var p=this.tree.length,h,a,l,n,u,f,o,c,d;r.size;)h=r.pop(),a=this.tree[h]-1,l=this.intervals[a],n=this.intervals[this.augmentations[a]],o=this.endGetter?this.endGetter(n):n[1],!(y>o)&&(c=h*2+1,c=u&&y<=f&&e.push(l),!(yd)&&(v=l*2+1,v=o&&e<=c&&p.push(u),!(r{g.search=function(t,i,x,T){var E=0;x=typeof x<"u"?x:0,T=typeof T<"u"?T:t.length,T--;for(var s;x<=T;)if(E=x+T>>>1,s=t[E],s>i)T=~-E;else if(s>>1,y=t(i[T],x),y>0)s=~-T;else if(y<0)E=-~T;else return T;return-1},g.lowerBound=function(t,i,x,T){var E=0;for(x=typeof x<"u"?x:0,T=typeof T<"u"?T:t.length;x>>1,i<=t[E]?T=E:x=-~E;return x},g.lowerBoundWithComparator=function(t,i,x){for(var T=0,E=0,s=i.length;E>>1,t(x,i[T])<=0?s=T:E=-~T;return E},g.lowerBoundIndices=function(t,i,x,T,E){var s=0;for(T=typeof T<"u"?T:0,E=typeof E<"u"?E:t.length;T>>1,x<=t[i[s]]?E=s:T=-~s;return T},g.upperBound=function(t,i,x,T){var E=0;for(x=typeof x<"u"?x:0,T=typeof T<"u"?T:t.length;x>>1,i>=t[E]?x=-~E:T=E;return x},g.upperBoundWithComparator=function(t,i,x){for(var T=0,E=0,s=i.length;E>>1,t(x,i[T])>=0?E=-~T:s=T;return E}}),r4=ai(g=>{var t=Ns(),i=aa().isArrayLike,x=JM(),T=kx();function E(r,p){if(r.length===0)return p.slice();if(p.length===0)return r.slice();var h;r[0]>p[0]&&(h=r,r=p,p=h);var a=r[r.length-1],l=p[0];if(a<=l)return t.isTypedArray(r)?t.concat(r,p):r.concat(p);var n=new r.constructor(r.length+p.length),u,f,o;for(u=0,f=r.length;up[0]&&(h=r,r=p,p=h);var a=r[r.length-1],l=p[0];if(ap[0]&&(h=r,r=p,p=h);var a=r[r.length-1],l=p[0];if(av?o=x.lowerBound(p,d,o+1):(n.push(d),u++,o++);return n};function y(r){var p=0,h=-1/0,a,l,n,u=[];for(l=0,n=r.length;lh&&(h=a));if(u.length===0)return new r[0].constructor(0);if(u.length===1)return u[0].slice();if(u.length===2)return E(u[0],u[1]);r=u;var f=new r[0].constructor(p),o=t.getPointerArray(h),c=new o(r.length),d=new T(function(S,M){return S=r[S][c[S]],M=r[M][c[M]],SM?1:0});for(l=0;lp&&(p=h));if(n.length===0)return new r[0].constructor(0);if(n.length===1)return n[0].slice();if(n.length===2)return s(n[0],n[1]);r=n;var u=new r[0].constructor,f=t.getPointerArray(p),o=new f(r.length),c=new T(function(m,S){return m=r[m][o[m]],S=r[S][o[S]],mS?1:0});for(a=0;ap&&(p=a),lh)return[];if(p===h)return[p];var o,c,d=r[0],v,m,S,M,w,C,A=p;for(u=1;uC?m=x.lowerBound(c,w,m+1):(d.push(w),v++,m++);if(d.length===0)return d;A=d[0]}return d},g.merge=function(){if(arguments.length===2){if(i(arguments[0]))return E(arguments[0],arguments[1])}else if(i(arguments[0]))return y(arguments);return null},g.unionUnique=function(){if(arguments.length===2){if(i(arguments[0]))return s(arguments[0],arguments[1])}else if(i(arguments[0]))return e(arguments);return null},g.intersectionUnique=function(){if(arguments.length===2){if(i(arguments[0]))return g.intersectionUniqueArrays(arguments[0],arguments[1])}else if(i(arguments[0]))return g.kWayIntersectionUniqueArrays(arguments);return null}}),s4=ai((g,t)=>{var i=Hr(),x=Gn(),T=r4();function E(y){return y}function s(y){if(this.clear(),Array.isArray(y)?(this.documentTokenizer=y[0],this.queryTokenizer=y[1]):(this.documentTokenizer=y,this.queryTokenizer=y),this.documentTokenizer||(this.documentTokenizer=E),this.queryTokenizer||(this.queryTokenizer=E),typeof this.documentTokenizer!="function")throw new Error("mnemonist/InvertedIndex.constructor: document tokenizer is not a function.");if(typeof this.queryTokenizer!="function")throw new Error("mnemonist/InvertedIndex.constructor: query tokenizer is not a function.")}s.prototype.clear=function(){this.items=[],this.mapping=new Map,this.size=0,this.dimension=0},s.prototype.add=function(y){this.size++;var e=this.items.length;this.items.push(y);var r=this.documentTokenizer(y);if(!Array.isArray(r))throw new Error("mnemonist/InvertedIndex.add: tokenizer function should return an array of tokens.");for(var p=new Set,h,a,l=0,n=r.length;l"u"||r.length===0)return[];if(e.length>1)for(h=1,a=e.length;h"u"||p.length===0)return[];r=T.intersectionUniqueArrays(r,p)}var l=new Array(r.length);for(h=0,a=l.length;h1?e:this;for(var r=0,p=this.documents.length;r=e)return{done:!0};var p=y[r++];return{value:p,done:!1}})},s.prototype.tokens=function(){return this.mapping.keys()},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.documents),s.prototype.inspect=function(){var y=this.items.slice();return Object.defineProperty(y,"constructor",{value:s,enumerable:!1}),y},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.from=function(y,e){var r=new s(e);return x(y,function(p){r.add(p)}),r},t.exports=s}),$M=ai(g=>{var t=new Float64Array(64),i=new Float64Array(64);function x(E,s,y){var e,r,p,h,a;for(t[0]=s,i[0]=y,r=0;r>=0;)if(p=t[r],h=i[r]-1,p=e&&pi[r-1]-t[r-1]&&(a=t[r],t[r]=t[r-1],t[r-1]=a,a=i[r],i[r]=i[r-1],i[r-1]=a)}else r--;return E}g.inplaceQuickSort=x;function T(E,s,y,e){var r,p,h,a,l,n;for(t[0]=y,i[0]=e,p=0;p>=0;)if(h=t[p],a=i[p]-1,h=r&&hi[p-1]-t[p-1]&&(n=t[p],t[p]=t[p-1],t[p-1]=n,n=i[p],i[p]=i[p-1],i[p-1]=n)}else p--;return s}g.inplaceQuickSortIndices=T}),a4=ai((g,t)=>{var i=aa(),x=Ns(),T=_m().createTupleComparator,E=Kx(),s=$M().inplaceQuickSortIndices;function y(l,n,u,f){var o,c=0,d;for(o=0;o>>1),P=u[A],d[D]=P,w>-1&&(C===0?v[w]=D+1:m[w]=D+1),I=(I+1)%l,A!==b&&A!==O-1&&S.push([I,A+1,O,D,1]),A!==b&&S.push([I,b,A,D,0]),D++;return{axes:n,labels:f,pivots:d,lefts:v,rights:m}}function p(l,n){this.dimensions=l,this.visited=0,this.axes=n.axes,this.labels=n.labels,this.pivots=n.pivots,this.lefts=n.lefts,this.rights=n.rights,this.size=this.labels.length}p.prototype.nearestNeighbor=function(l){var n=1/0,u=null,f=this.dimensions,o=this.axes,c=this.pivots,d=this.lefts,v=this.rights,m=0;function S(M,w){m++;var C=d[w],A=v[w],P=c[w],b=y(f,o,P,l);if(!(b0?C!==0&&S(M,C-1):A!==0&&S(M,A-1),O*O0?A!==0&&S(M,A-1):C!==0&&S(M,C-1))}}return S(0,0),this.visited=m,this.labels[u]};var h=T(3),a=T(2);p.prototype.kNearestNeighbors=function(l,n){if(l<=0)throw new Error("mnemonist/kd-tree.kNearestNeighbors: k should be a positive number.");if(l=Math.min(l,this.size),l===1)return[this.nearestNeighbor(n)];var u=new E(Array,h,l),f=this.dimensions,o=this.axes,c=this.pivots,d=this.lefts,v=this.rights,m=0;function S(C,A){var P=d[A],b=v[A],O=c[A],I=y(f,o,O,n);u.push([I,m++,O]);var D=n[C],B=o[C][O],G=D-B;C=(C+1)%f,D{var i=Hr(),x=Gn();function T(){this.clear()}T.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},T.prototype.first=function(){return this.head?this.head.item:void 0},T.prototype.peek=T.prototype.first,T.prototype.last=function(){return this.tail?this.tail.item:void 0},T.prototype.push=function(E){var s={item:E,next:null};return this.head?(this.tail.next=s,this.tail=s):(this.head=s,this.tail=s),this.size++,this.size},T.prototype.unshift=function(E){var s={item:E,next:null};return this.head?(this.head.next||(this.tail=this.head),s.next=this.head,this.head=s):(this.head=s,this.tail=s),this.size++,this.size},T.prototype.shift=function(){if(this.size){var E=this.head;return this.head=E.next,this.size--,E.item}},T.prototype.forEach=function(E,s){if(this.size){s=arguments.length>1?s:this;for(var y=this.head,e=0;y;)E.call(s,y.item,e,this),y=y.next,e++}},T.prototype.toArray=function(){if(!this.size)return[];for(var E=new Array(this.size),s=0,y=this.size,e=this.head;s{var i=Hr(),x=Gn(),T=Ns(),E=aa();function s(y,e,r){if(arguments.length<2&&(r=y,y=null,e=null),this.capacity=r,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-cache: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-cache: capacity should be a finite positive integer.");var p=T.getPointerArray(r);this.forward=new p(r),this.backward=new p(r),this.K=typeof y=="function"?new y(r):new Array(r),this.V=typeof e=="function"?new e(r):new Array(r),this.size=0,this.head=0,this.tail=0,this.items={}}s.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},s.prototype.splayOnTop=function(y){var e=this.head;if(this.head===y)return this;var r=this.backward[y],p=this.forward[y];return this.tail===y?this.tail=r:this.backward[p]=r,this.forward[r]=p,this.backward[e]=y,this.head=y,this.forward[y]=e,this},s.prototype.set=function(y,e){var r=this.items[y];if(typeof r<"u"){this.splayOnTop(r),this.V[r]=e;return}this.size1?e:this;for(var r=0,p=this.size,h=this.head,a=this.K,l=this.V,n=this.forward;r=e)return{done:!0};var a=p[r];return y++,y=e)return{done:!0};var a=p[r];return y++,y=e)return{done:!0};var l=p[r],n=h[r];return y++,y{var i=Zx(),x=Gn(),T=Ns(),E=aa();function s(e,r,p){arguments.length<2?i.call(this,e):i.call(this,e,r,p);var h=T.getPointerArray(this.capacity);this.deleted=new h(this.capacity),this.deletedSize=0}for(y in i.prototype)s.prototype[y]=i.prototype[y];var y;typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=i.prototype[Symbol.iterator]),s.prototype.clear=function(){i.prototype.clear.call(this),this.deletedSize=0},s.prototype.set=function(e,r){var p=this.items[e];if(typeof p<"u"){this.splayOnTop(p),this.V[p]=r;return}this.size0?p=this.deleted[--this.deletedSize]:p=this.size,this.size++):(p=this.tail,this.tail=this.backward[p],delete this.items[this.K[p]]),this.items[e]=p,this.K[p]=e,this.V[p]=r,this.forward[p]=this.head,this.backward[this.head]=p,this.head=p},s.prototype.setpop=function(e,r){var p=null,h=null,a=this.items[e];return typeof a<"u"?(this.splayOnTop(a),p=this.V[a],this.V[a]=r,{evicted:!1,key:e,value:p}):(this.size0?a=this.deleted[--this.deletedSize]:a=this.size,this.size++):(a=this.tail,this.tail=this.backward[a],p=this.V[a],h=this.K[a],delete this.items[h]),this.items[e]=a,this.K[a]=e,this.V[a]=r,this.forward[a]=this.head,this.backward[this.head]=a,this.head=a,h?{evicted:!0,key:h,value:p}:null)},s.prototype.delete=function(e){var r=this.items[e];if(typeof r>"u")return!1;if(delete this.items[e],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var p=this.backward[r],h=this.forward[r];return this.head===r&&(this.head=h),this.tail===r&&(this.tail=p),this.forward[p]=h,this.backward[h]=p,this.size--,this.deleted[this.deletedSize++]=r,!0},s.prototype.remove=function(e,r=void 0){var p=this.items[e];if(typeof p>"u")return r;var h=this.V[p];if(delete this.items[e],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,h;var a=this.backward[p],l=this.forward[p];return this.head===p&&(this.head=l),this.tail===p&&(this.tail=a),this.forward[a]=l,this.backward[l]=a,this.size--,this.deleted[this.deletedSize++]=p,h},s.from=function(e,r,p,h){if(arguments.length<2){if(h=E.guessLength(e),typeof h!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(h=r,r=null,p=null);var a=new s(r,p,h);return x(e,function(l,n){a.set(n,l)}),a},t.exports=s}),QM=ai((g,t)=>{var i=Zx(),x=Gn(),T=Ns(),E=aa();function s(y,e,r){if(arguments.length<2&&(r=y,y=null,e=null),this.capacity=r,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-map: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-map: capacity should be a finite positive integer.");var p=T.getPointerArray(r);this.forward=new p(r),this.backward=new p(r),this.K=typeof y=="function"?new y(r):new Array(r),this.V=typeof e=="function"?new e(r):new Array(r),this.size=0,this.head=0,this.tail=0,this.items=new Map}s.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},s.prototype.set=function(y,e){var r=this.items.get(y);if(typeof r<"u"){this.splayOnTop(r),this.V[r]=e;return}this.size{var i=QM(),x=Gn(),T=Ns(),E=aa();function s(e,r,p){arguments.length<2?i.call(this,e):i.call(this,e,r,p);var h=T.getPointerArray(this.capacity);this.deleted=new h(this.capacity),this.deletedSize=0}for(y in i.prototype)s.prototype[y]=i.prototype[y];var y;typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=i.prototype[Symbol.iterator]),s.prototype.clear=function(){i.prototype.clear.call(this),this.deletedSize=0},s.prototype.set=function(e,r){var p=this.items.get(e);if(typeof p<"u"){this.splayOnTop(p),this.V[p]=r;return}this.size0?p=this.deleted[--this.deletedSize]:p=this.size,this.size++):(p=this.tail,this.tail=this.backward[p],this.items.delete(this.K[p])),this.items.set(e,p),this.K[p]=e,this.V[p]=r,this.forward[p]=this.head,this.backward[this.head]=p,this.head=p},s.prototype.setpop=function(e,r){var p=null,h=null,a=this.items.get(e);return typeof a<"u"?(this.splayOnTop(a),p=this.V[a],this.V[a]=r,{evicted:!1,key:e,value:p}):(this.size0?a=this.deleted[--this.deletedSize]:a=this.size,this.size++):(a=this.tail,this.tail=this.backward[a],p=this.V[a],h=this.K[a],this.items.delete(h)),this.items.set(e,a),this.K[a]=e,this.V[a]=r,this.forward[a]=this.head,this.backward[this.head]=a,this.head=a,h?{evicted:!0,key:h,value:p}:null)},s.prototype.delete=function(e){var r=this.items.get(e);if(typeof r>"u")return!1;if(this.items.delete(e),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var p=this.backward[r],h=this.forward[r];return this.head===r&&(this.head=h),this.tail===r&&(this.tail=p),this.forward[p]=h,this.backward[h]=p,this.size--,this.deleted[this.deletedSize++]=r,!0},s.prototype.remove=function(e,r=void 0){var p=this.items.get(e);if(typeof p>"u")return r;var h=this.V[p];if(this.items.delete(e),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,h;var a=this.backward[p],l=this.forward[p];return this.head===p&&(this.head=l),this.tail===p&&(this.tail=a),this.forward[a]=l,this.backward[l]=a,this.size--,this.deleted[this.deletedSize++]=p,h},s.from=function(e,r,p,h){if(arguments.length<2){if(h=E.guessLength(e),typeof h!="number")throw new Error("mnemonist/lru-map.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(h=r,r=null,p=null);var a=new s(r,p,h);return x(e,function(l,n){a.set(n,l)}),a},t.exports=s}),u4=ai((g,t)=>{var i=Hr(),x=Gn(),T=Kx(),E=function(y,e){return y[1]>e[1]?-1:y[1]"u"?0:e},s.prototype.get=s.prototype.multiplicity,s.prototype.count=s.prototype.multiplicity,s.prototype.frequency=function(y){if(this.size===0)return 0;var e=this.multiplicity(y);return e/this.size},s.prototype.top=function(y){if(typeof y!="number"||y<=0)throw new Error("mnemonist/multi-set.top: n must be a number > 0.");for(var e=new T(Array,E,y),r=this.items.entries(),p;p=r.next(),!p.done;)e.push(p.value);return e.consume()},s.prototype.forEach=function(y,e){e=arguments.length>1?e:this;var r;this.items.forEach(function(p,h){for(r=0;r1?e:this,this.items.forEach(y,e)},s.prototype.keys=function(){return this.items.keys()},s.prototype.values=function(){var y=this.items.entries(),e=!1,r,p,h,a;return new i(function l(){if(!e){if(r=y.next(),r.done)return{done:!0};e=!0,p=r.value[0],h=r.value[1],a=0}return a>=h?(e=!1,l()):(a++,{done:!1,value:p})})},s.prototype.multiplicities=function(){return this.items.entries()},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.values),s.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.prototype.toJSON=function(){return this.items},s.from=function(y){var e=new s;return x(y,function(r){e.add(r)}),e},s.isSubset=function(y,e){var r=y.multiplicities(),p,h,a;if(y===e)return!0;if(y.dimension>e.dimension)return!1;for(;p=r.next(),!p.done;)if(h=p.value[0],a=p.value[1],e.multiplicity(h){var i=Hr(),x=Gn();function T(l,n,u){return((Math.pow(l,2)-Math.pow(Math.abs(n-u),2))/2|0)+l+1}function E(l,n){for(var u=0,f=0,o=n+1;fn.length?-1:l.lengthn?1:0}function y(l,n){var u=l+1,f=n/u|0,o=f+1,c,d,v=n-f*u,m=u-v,S=new Array(l+1);for(c=0;c 0");this.levenshtein=l,this.k=n,this.clear()}a.prototype.clear=function(){this.size=0,this.strings=[],this.invertedIndices={}},a.prototype.add=function(l){var n=l.length,u=this.size;this.strings.push(l),this.size++;var f=e(this.k,l),o=this.invertedIndices[n];typeof o>"u"&&(o={},this.invertedIndices[n]=o);var c,d,v,m,S;for(m=0,S=f.length;m"u"?(d=[u],o[v]=d):d.push(u);return this},a.prototype.search=function(l){var n=l.length,u=this.k,f=new Set,o,c,d,v,m,S,M,w,C,A,P,b,O,I,D;for(w=Math.max(0,n-u),C=n+u+1;w1?n:this;for(var u=0,f=this.strings.length;u=n)return{done:!0};var f=l[u];return u++,{value:f,done:!1}})},typeof Symbol<"u"&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.inspect=function(){var l=this.strings.slice();return Object.defineProperty(l,"constructor",{value:a,enumerable:!1}),l},typeof Symbol<"u"&&(a.prototype[Symbol.for("nodejs.util.inspect.custom")]=a.prototype.inspect),a.from=function(l,n,u){var f=new a(n,u);return x(l,function(o){f.add(o)}),f},a.countKeys=E,a.comparator=s,a.partition=y,a.segments=e,a.segmentPos=r,a.multiMatchAwareInterval=p,a.multiMatchAwareSubstrings=h,t.exports=a}),c4=ai((g,t)=>{var i=Hr(),x=Gn();function T(){this.clear()}T.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},T.prototype.enqueue=function(E){return this.items.push(E),++this.size},T.prototype.dequeue=function(){if(this.size){var E=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,E}},T.prototype.peek=function(){if(this.size)return this.items[this.offset]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=this.offset,e=0,r=this.items.length;y=E.length)return{done:!0};var y=E[s];return s++,{value:y,done:!1}})},T.prototype.entries=function(){var E=this.items,s=this.offset,y=0;return new i(function(){if(s>=E.length)return{done:!0};var e=E[s];return s++,{value:[y++,e],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.toString=function(){return this.toArray().join(",")},T.prototype.toJSON=function(){return this.toArray()},T.prototype.inspect=function(){var E=this.toArray();return Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E){var s=new T;return x(E,function(y){s.enqueue(y)}),s},T.of=function(){return T.from(arguments)},t.exports=T}),d4=ai((g,t)=>{var i=Hr(),x=Gn();function T(){this.clear()}T.prototype.clear=function(){this.items=[],this.size=0},T.prototype.push=function(E){return this.items.push(E),++this.size},T.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},T.prototype.peek=function(){return this.items[this.size-1]},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=0,e=this.items.length;y=s)return{done:!0};var e=E[s-y-1];return y++,{value:e,done:!1}})},T.prototype.entries=function(){var E=this.items,s=E.length,y=0;return new i(function(){if(y>=s)return{done:!0};var e=E[s-y-1];return{value:[y++,e],done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.toString=function(){return this.toArray().join(",")},T.prototype.toJSON=function(){return this.toArray()},T.prototype.inspect=function(){var E=this.toArray();return Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),T.from=function(E){var s=new T;return x(E,function(y){s.push(y)}),s},T.of=function(){return T.from(arguments)},t.exports=T}),p4=ai(g=>{g.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var t=new Set,i=1/0,x=null,T,E,s=arguments.length;for(E=0;Ei.size)return!1;for(;T=x.next(),!T.done;)if(!i.has(T.value))return!1;return!0},g.isSuperset=function(t,i){return g.isSubset(i,t)},g.add=function(t,i){for(var x=i.values(),T;T=x.next(),!T.done;)t.add(T.value)},g.subtract=function(t,i){for(var x=i.values(),T;T=x.next(),!T.done;)t.delete(T.value)},g.intersect=function(t,i){for(var x=t.values(),T;T=x.next(),!T.done;)i.has(T.value)||t.delete(T.value)},g.disjunct=function(t,i){for(var x=t.values(),T,E=[];T=x.next(),!T.done;)i.has(T.value)&&E.push(T.value);for(x=i.values();T=x.next(),!T.done;)t.has(T.value)||t.add(T.value);for(var s=0,y=E.length;si.size&&(x=t,t=i,i=x),t.size===0)return 0;if(t===i)return t.size;for(var T=t.values(),E,s=0;E=T.next(),!E.done;)i.has(E.value)&&s++;return s},g.unionSize=function(t,i){var x=g.intersectionSize(t,i);return t.size+i.size-x},g.jaccard=function(t,i){var x=g.intersectionSize(t,i);if(x===0)return 0;var T=t.size+i.size-x;return x/T},g.overlap=function(t,i){var x=g.intersectionSize(t,i);return x===0?0:x/Math.min(t.size,i.size)}}),v4=ai((g,t)=>{var i=Hr(),x=Ns().getPointerArray;function T(E){var s=x(E);this.start=0,this.size=0,this.capacity=E,this.dense=new s(E),this.sparse=new s(E)}T.prototype.clear=function(){this.start=0,this.size=0},T.prototype.has=function(E){if(this.size===0)return!1;var s=this.sparse[E],y=s=this.start&&s=this.start&&s1?s:this;for(var y=this.capacity,e=this.size,r=this.start,p=0;p=y)return{done:!0};var p=E[e];return e++,r++,e===s&&(e=0),{value:p,done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=[];return this.forEach(function(s){E.push(s)}),Object.defineProperty(E,"constructor",{value:T,enumerable:!1}),E.capacity=this.capacity,E},typeof Symbol<"u"&&(T.prototype[Symbol.for("nodejs.util.inspect.custom")]=T.prototype.inspect),t.exports=T}),m4=ai((g,t)=>{var i=Hr(),x=Ns().getPointerArray;function T(E,s){arguments.length<2&&(s=E,E=Array);var y=x(s);this.size=0,this.length=s,this.dense=new y(s),this.sparse=new y(s),this.vals=new E(s)}T.prototype.clear=function(){this.size=0},T.prototype.has=function(E){var s=this.sparse[E];return s=this.size||this.dense[s]!==E?!1:(s=this.dense[this.size-1],this.dense[this.sparse[E]]=s,this.sparse[s]=this.sparse[E],this.size--,!0)},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y=0;y{var i=Hr(),x=Ns().getPointerArray;function T(E){var s=x(E);this.size=0,this.length=E,this.dense=new s(E),this.sparse=new s(E)}T.prototype.clear=function(){this.size=0},T.prototype.has=function(E){var s=this.sparse[E];return s=this.size||this.dense[s]!==E?!1:(s=this.dense[this.size-1],this.dense[this.sparse[E]]=s,this.sparse[s]=this.sparse[E],this.size--,!0)},T.prototype.forEach=function(E,s){s=arguments.length>1?s:this;for(var y,e=0;e{var i=Gn(),x=2,T=2,E=new Set([0,1,2]),s={0:"Returns only the top suggestion",1:"Returns suggestions with the smallest edit distance",2:"Returns every suggestion (no early termination)"};function y(n){var u=new Set;return typeof n=="number"&&u.add(n),{suggestions:u,count:0}}function e(n,u,f){return{term:n||"",distance:u||0,count:f||0}}function r(n,u,f,o){o=o||new Set,u++;var c,d=n.length,v;if(d>1)for(v=0;v0&&n[v].length-d.length>o.length-d.length&&(f.suggestions=new Set,f.count=0),(u===2||!f.suggestions.size||n[v].length-d.length>=o.length-d.length)&&f.suggestions.add(c)}function h(n,u){var f=n.length,o=u.length,c=[[]],d=f+o,v=new Map,m,S,M;for(c[0][0]=d,m=0;m<=f;m++)c[m+1]||(c[m+1]=[]),c[m+1][1]=m,c[m+1][0]=d;for(M=0;M<=o;M++)c[1][M+1]=M,c[0][M+1]=d;var w=n+u,C;for(m=0,S=w.length;mc)return[];for(var m=[d],S=new Set,M=new Set,w=[],C,A;m.length>0&&(C=m.shift(),!(f<2&&w.length>0&&v-C.length>w[0].distance));){if(A=n[C],A!==void 0){if(typeof A=="number"&&(A=y(A)),A.count>0&&!M.has(C)){M.add(C);var P=e(C,v-C.length,A.count);if(w.push(P),f<2&&v-C.length===0)break}A.suggestions.forEach(D=>{var B=u[D];if(!M.has(B)){M.add(B);var G=0;if(d!==B)if(B.length===C.length)G=v-C.length;else if(v===C.length)G=B.length-C.length;else{for(var z=0,X=0,j=B.length;z0||X>0?G=h(B.substr(z,j-z-X),d.substr(z,v-z-X)):G=h(B,d)}if(f<2&&w.length>0&&w[0].distance>G&&(w=[]),!(f<2&&w.length>0&&G>w[0].distance)&&G<=o){var Q=n[B];Q!==void 0&&w.push(e(B,G,Q.count))}}})}if(v-C.length0&&v-C.length>=w[0].distance)continue;for(var b=0,O=C.length;bthis.maxLength&&(this.maxLength=n.length)),u.count===1){var f=this.words.length;this.words.push(n);var o=r(n,0,this.maxDistance);o.forEach(c=>{var d=this.dictionary[c];d!==void 0?(typeof d=="number"&&(d=y(d),this.dictionary[c]=d),d.suggestions.has(f)||p(this.words,this.verbosity,d,n,f,c)):this.dictionary[c]=f})}return this.size++,this},l.prototype.search=function(n){return a(this.dictionary,this.words,this.verbosity,this.maxDistance,this.maxLength,n)},l.prototype.inspect=function(){var n=[];n.size=this.size,n.maxDistance=this.maxDistance,n.verbosity=this.verbosity,n.behavior=s[this.verbosity];for(var u in this.dictionary)typeof this.dictionary[u]=="object"&&this.dictionary[u].count&&n.push([u,this.dictionary[u].count]);return Object.defineProperty(n,"constructor",{value:l,enumerable:!1}),n},typeof Symbol<"u"&&(l.prototype[Symbol.for("nodejs.util.inspect.custom")]=l.prototype.inspect),l.from=function(n,u){var f=new l(u);return i(n,function(o){f.add(o)}),f},t.exports=l}),_M=ai((g,t)=>{var i=Gn(),x=Hr(),T="\0";function E(s){this.mode=s===Array?"array":"string",this.clear()}E.prototype.clear=function(){this.root={},this.size=0},E.prototype.set=function(s,y){for(var e=this.root,r,p=0,h=s.length;p"u")return;if(T in y)return y[T]},E.prototype.delete=function(s){var y=this.root,e=null,r=null,p,h,a,l;for(a=0,l=s.length;a"u")return!1;e!==null?Object.keys(y).length>1&&(e=null,r=null):Object.keys(y).length<2&&(e=p,r=h)}return T in y?(this.size--,e?delete e[r]:delete y[T],!0):!1},E.prototype.has=function(s){for(var y=this.root,e,r=0,p=s.length;r"u")return!1;return T in y},E.prototype.find=function(s){var y=typeof s=="string",e=this.root,r=[],p,h,a;for(h=0,a=s.length;h"u")return r;for(var l=[e],n=[s],u;l.length;){s=n.pop(),e=l.pop();for(u in e){if(u===T){r.push([s,e[T]]);continue}l.push(e[u]),n.push(y?s+u:s.concat(u))}}return r},E.prototype.values=function(s){var y=this.root,e=[],r,p,h;if(s){for(p=0,h=s.length;p"u")return x.empty()}return e.push(y),new x(function(){for(var a,l=!1,n;e.length;){a=e.pop();for(n in a){if(n===T){l=!0;continue}e.push(a[n])}if(l)return{done:!1,value:a[T]}}return{done:!0}})},E.prototype.prefixes=function(s){var y=this.root,e=[],r=[],p,h,a,l=this.mode==="string";if(s){for(h=0,a=s.length;h"u")return x.empty()}else s=l?"":[];return e.push(y),r.push(s),new x(function(){for(var n,u,f=!1,o;e.length;){n=e.pop(),u=r.pop();for(o in n){if(o===T){f=!0;continue}e.push(n[o]),r.push(l?u+o:u.concat(o))}if(f)return{done:!1,value:u}}return{done:!0}})},E.prototype.keys=E.prototype.prefixes,E.prototype.entries=function(s){var y=this.root,e=[],r=[],p,h,a,l=this.mode==="string";if(s){for(h=0,a=s.length;h"u")return x.empty()}else s=l?"":[];return e.push(y),r.push(s),new x(function(){for(var n,u,f=!1,o;e.length;){n=e.pop(),u=r.pop();for(o in n){if(o===T){f=!0;continue}e.push(n[o]),r.push(l?u+o:u.concat(o))}if(f)return{done:!1,value:[u,n[T]]}}return{done:!0}})},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.entries),E.prototype.inspect=function(){for(var s=new Array(this.size),y=this.entries(),e,r=0;e=y.next(),!e.done;)s[r++]=e.value;return Object.defineProperty(s,"constructor",{value:E,enumerable:!1}),s},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.prototype.toJSON=function(){return this.root},E.from=function(s){var y=new E;return i(s,function(e,r){y.set(r,e)}),y},E.SENTINEL=T,t.exports=E}),x4=ai((g,t)=>{var i=Gn(),x=_M(),T="\0";function E(y){this.mode=y===Array?"array":"string",this.clear()}for(s in x.prototype)E.prototype[s]=x.prototype[s];var s;delete E.prototype.set,delete E.prototype.get,delete E.prototype.values,delete E.prototype.entries,E.prototype.add=function(y){for(var e=this.root,r,p=0,h=y.length;p"u")return p;for(var n=[r],u=[y],f;n.length;){y=u.pop(),r=n.pop();for(f in r){if(f===T){p.push(y);continue}n.push(r[f]),u.push(e?y+f:y.concat(f))}}return p},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.keys),E.prototype.inspect=function(){for(var y=new Set,e=this.keys(),r;r=e.next(),!r.done;)y.add(r.value);return Object.defineProperty(y,"constructor",{value:E,enumerable:!1}),y},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.prototype.toJSON=function(){return this.root},E.from=function(y){var e=new E;return i(y,function(r){e.add(r)}),e},E.SENTINEL=T,t.exports=E}),S4=ai((g,t)=>{var i=Hr(),x=Gn(),T=aa(),E=Ns(),s=function(p){return Math.max(1,Math.ceil(p*1.5))},y=function(p){var h=E.getPointerArray(p);return new h(p)};function e(p,h){if(arguments.length<1)throw new Error("mnemonist/vector: expecting at least a byte array constructor.");var a=h||0,l=s,n=0,u=!1;typeof h=="object"&&(a=h.initialCapacity||0,n=h.initialLength||0,l=h.policy||l,u=h.factory===!0),this.factory=u?p:null,this.ArrayClass=p,this.length=n,this.capacity=Math.max(n,a),this.policy=l,this.array=new p(this.capacity)}e.prototype.set=function(p,h){if(this.lengththis.capacity)if(this.factory===null?this.array=new this.ArrayClass(p):this.array=this.factory(p),E.isTypedArray(this.array))this.array.set(h,0);else for(var a=0,l=this.length;a=p)return this;for(h=this.capacity;h=h)return{done:!0};var l=p[a];return a++,{value:l,done:!1}})},e.prototype.entries=function(){var p=this.array,h=this.length,a=0;return new i(function(){if(a>=h)return{done:!0};var l=p[a];return{value:[a++,l],done:!1}})},typeof Symbol<"u"&&(e.prototype[Symbol.iterator]=e.prototype.values),e.prototype.inspect=function(){var p=this.array.slice(0,this.length);return p.type=this.array.constructor.name,p.items=this.length,p.capacity=this.capacity,Object.defineProperty(p,"constructor",{value:e,enumerable:!1}),p},typeof Symbol<"u"&&(e.prototype[Symbol.for("nodejs.util.inspect.custom")]=e.prototype.inspect),e.from=function(p,h,a){if(arguments.length<3&&(a=T.guessLength(p),typeof a!="number"))throw new Error("mnemonist/vector.from: could not guess iterable length. Please provide desired capacity as last argument.");var l=new e(h,a);return x(p,function(n){l.push(n)}),l};function r(p){var h=function(l){e.call(this,p,l)};for(var a in e.prototype)e.prototype.hasOwnProperty(a)&&(h.prototype[a]=e.prototype[a]);return h.from=function(l,n){return e.from(l,p,n)},typeof Symbol<"u"&&(h.prototype[Symbol.iterator]=h.prototype.values),h}e.Int8Vector=r(Int8Array),e.Uint8Vector=r(Uint8Array),e.Uint8ClampedVector=r(Uint8ClampedArray),e.Int16Vector=r(Int16Array),e.Uint16Vector=r(Uint16Array),e.Int32Vector=r(Int32Array),e.Uint32Vector=r(Uint32Array),e.Float32Vector=r(Float32Array),e.Float64Vector=r(Float64Array),e.PointerVector=r(y),t.exports=e}),T4=ai((g,t)=>{var i=aa(),x=Ns(),T=$M().inplaceQuickSortIndices,E=JM().lowerBoundIndices,s=jx(),y=x.getPointerArray;function e(h,a){return h.distancea.distance?-1:0}function r(h,a,l){for(var n=l.length,u=y(n),f=0,o=new u(n),c=new u(n),d=new u(n),v=new Float64Array(n),m=[0,0,n],S=new Float64Array(n),M,w,C,A,P,b,O,I,D;m.length;)if(P=m.pop(),A=m.pop(),M=m.pop(),w=l[P-1],P--,D=P-A,o[M]=w,D!==0){if(D===1){O=h(a[w],a[l[A]]),v[M]=O,f++,d[M]=f,o[f]=l[A];continue}for(I=A;I0&&(f++,d[M]=f,m.push(f,b,P)),b-A>0&&(f++,c[M]=f,m.push(f,A,b))}return{nodes:o,lefts:c,rights:d,mus:v}}function p(h,a){if(typeof h!="function")throw new Error("mnemonist/VPTree.constructor: given `distance` must be a function.");if(!a)throw new Error("mnemonist/VPTree.constructor: you must provide items to the tree. A VPTree cannot be updated after its creation.");this.distance=h,this.heap=new s(e),this.D=0;var l=i.toArrayWithIndices(a);this.items=l[0];var n=l[1];this.size=n.length;var u=r(h,this.items,n);this.nodes=u.nodes,this.lefts=u.lefts,this.rights=u.rights,this.mus=u.mus}p.prototype.nearestNeighbors=function(h,a){var l=this.heap,n=[0],u=1/0,f,o,c,d,v,m,S;for(this.D=0;n.length;)f=n.pop(),o=this.nodes[f],c=this.items[o],S=this.distance(c,a),this.D++,Sh&&l.pop(),l.size>=h&&(u=l.peek().distance)),d=this.lefts[f],v=this.rights[f],!(!d&&!v)&&(m=this.mus[f],S=m-u&&n.push(v)):(v&&S>=m-u&&n.push(v),d&&S=0;w--)M[w]=l.pop();return M},p.prototype.neighbors=function(h,a){var l=[],n=[0],u,f,o,c,d,v,m;for(this.D=0;n.length;)u=n.pop(),f=this.nodes[u],o=this.items[f],m=this.distance(o,a),this.D++,m<=h&&l.push({distance:m,item:o}),c=this.lefts[u],d=this.rights[u],!(!c&&!d)&&(v=this.mus[u],m=v-h&&n.push(d)):(d&&m>=v-h&&n.push(d),c&&m{var i=jx(),x=kx(),T=XF();t.exports={BiMap:YF(),BitSet:kF(),BitVector:jF(),BloomFilter:ZF(),BKTree:JF(),CircularBuffer:$F(),DefaultMap:QF(),DefaultWeakMap:_F(),FixedDeque:jM(),StaticDisjointSet:qF(),FibonacciHeap:x,MinFibonacciHeap:x.MinFibonacciHeap,MaxFibonacciHeap:x.MaxFibonacciHeap,FixedReverseHeap:Kx(),FuzzyMap:t4(),FuzzyMultiMap:e4(),HashedArrayTree:i4(),Heap:i,MinHeap:i.MinHeap,MaxHeap:i.MaxHeap,StaticIntervalTree:n4(),InvertedIndex:s4(),KDTree:a4(),LinkedList:o4(),LRUCache:Zx(),LRUCacheWithDelete:l4(),LRUMap:QM(),LRUMapWithDelete:h4(),MultiMap:KM(),MultiSet:u4(),PassjoinIndex:f4(),Queue:c4(),FixedStack:ZM(),Stack:d4(),SuffixArray:T,GeneralizedSuffixArray:T.GeneralizedSuffixArray,Set:p4(),SparseQueueSet:v4(),SparseMap:m4(),SparseSet:g4(),SymSpell:y4(),Trie:x4(),TrieMap:_M(),Vector:S4(),VPTree:T4()}}),_t=class cr{static get ZERO(){return new cr(0,0)}static get ONE(){return new cr(1,1)}static get UP(){return new cr(0,-1)}static get DOWN(){return new cr(0,1)}static get LEFT(){return new cr(-1,0)}static get RIGHT(){return new cr(1,0)}static get UP_LEFT(){return new cr(-1,-1)}static get UP_RIGHT(){return new cr(1,-1)}static get DOWN_RIGHT(){return new cr(1,1)}static get DOWN_LEFT(){return new cr(-1,1)}constructor(t,i){typeof t=="number"?(this.x=t,this.y=i||0):(this.x=t.x,this.y=t.y)}clone(){return new cr(this.x,this.y)}add(t){return new cr(this.x+t.x,this.y+t.y)}multiply(t){return new cr(this.x*t.x,this.y*t.y)}divide(t){return new cr(this.x/t.x,this.y/t.y)}subtract(t){return new cr(this.x-t.x,this.y-t.y)}equals(t){return this.x===t.x&&this.y===t.y}abs(){return new cr(Math.abs(this.x),Math.abs(this.y))}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}modulo(t){return new cr(this.x%t.x,this.y%t.y)}scalarModulo(t){return new cr(this.x%t,this.y%t)}scalarMult(t){return new cr(this.x*t,this.y*t)}toPosition(){return{x:this.x,y:this.y}}toString(){return`${this.x}#${this.y}`}},Ri=class{static equal(g,t){return g.position.x===t.position.x&&g.position.y===t.position.y&&g.layer===t.layer}static copyOver(g,t){t.position.x=g.position.x,t.position.y=g.position.y,t.layer=g.layer}static clone(g){return{position:g.position.clone(),layer:g.layer}}static toString(g){return`${g.position.toString()}#${g.layer}`}static toInternal(g){return{position:new _t(g.position.x,g.position.y),layer:g.charLayer}}static fromInternal(g){return{position:g.position.toPosition(),charLayer:g.layer}}},M4=(g=>(g.NONE="none",g.LEFT="left",g.UP_LEFT="up-left",g.UP="up",g.UP_RIGHT="up-right",g.RIGHT="right",g.DOWN_RIGHT="down-right",g.DOWN="down",g.DOWN_LEFT="down-left",g))(M4||{}),C4={up:"down",down:"up",left:"right",right:"left",none:"none","up-left":"down-right","up-right":"down-left","down-right":"up-left","down-left":"up-right"},w4={up:_t.UP,down:_t.DOWN,left:_t.LEFT,right:_t.RIGHT,none:_t.ZERO,"up-left":_t.UP_LEFT,"up-right":_t.UP_RIGHT,"down-right":_t.DOWN_RIGHT,"down-left":_t.DOWN_LEFT},gm={up:0,"up-right":1,right:2,"down-right":3,down:4,"down-left":5,left:6,"up-left":7,none:NaN},qM=["up","up-right","right","down-right","down","down-left","left","up-left"],A4=["down-left","down-right","up-right","up-left"];function Jx(){return["up","down","left","right","none","up-left","up-right","down-right","down-left"]}function hd(g){return A4.includes(g)}function P4(g,t=1){return g==="none"?"none":qM[(gm[g]+8-Math.abs(t)%8)%8]}function tC(g,t=1){return g==="none"?"none":qM[(gm[g]+t)%8]}function Au(g){return w4[g]}function R4(g){return C4[g]}function Ca(g,t){if(g.x===t.x){if(g.y>t.y)return"up";if(g.yt.x)return"left";if(g.xt.x){if(g.yt.y)return"up-left"}else if(g.xt.y)return"up-right"}return"none"}var b4=(g=>(g[g.FOUR=4]="FOUR",g[g.EIGHT=8]="EIGHT",g))(b4||{});function zf(g){return typeof g=="string"&&Jx().includes(g)}var Ay=function(g,t){return Ay=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,x){i.__proto__=x}||function(i,x){for(var T in x)Object.prototype.hasOwnProperty.call(x,T)&&(i[T]=x[T])},Ay(g,t)};function Zd(g,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ay(g,t);function i(){this.constructor=g}g.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}function L4(g,t,i,x){function T(E){return E instanceof i?E:new i(function(s){s(E)})}return new(i||(i=Promise))(function(E,s){function y(p){try{r(x.next(p))}catch(h){s(h)}}function e(p){try{r(x.throw(p))}catch(h){s(h)}}function r(p){p.done?E(p.value):T(p.value).then(y,e)}r((x=x.apply(g,t||[])).next())})}function eC(g,t){var i={label:0,sent:function(){if(E[0]&1)throw E[1];return E[1]},trys:[],ops:[]},x,T,E,s;return s={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function y(r){return function(p){return e([r,p])}}function e(r){if(x)throw new TypeError("Generator is already executing.");for(;s&&(s=0,r[0]&&(i=0)),i;)try{if(x=1,T&&(E=r[0]&2?T.return:r[0]?T.throw||((E=T.return)&&E.call(T),0):T.next)&&!(E=E.call(T,r[1])).done)return E;switch(T=0,E&&(r=[r[0]&2,E.value]),r[0]){case 0:case 1:E=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,T=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(E=i.trys,!(E=E.length>0&&E[E.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!E||r[1]>E[0]&&r[1]=g.length&&(g=void 0),{value:g&&g[x++],done:!g}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function yd(g,t){var i=typeof Symbol=="function"&&g[Symbol.iterator];if(!i)return g;var x=i.call(g),T,E=[],s;try{for(;(t===void 0||t-- >0)&&!(T=x.next()).done;)E.push(T.value)}catch(y){s={error:y}}finally{try{T&&!T.done&&(i=x.return)&&i.call(x)}finally{if(s)throw s.error}}return E}function xd(g,t,i){if(i||arguments.length===2)for(var x=0,T=t.length,E;x1||y(a,l)})})}function y(a,l){try{e(x[a](l))}catch(n){h(E[0][3],n)}}function e(a){a.value instanceof jf?Promise.resolve(a.value.v).then(r,p):h(E[0][2],a)}function r(a){y("next",a)}function p(a){y("throw",a)}function h(a,l){a(l),E.shift(),E.length&&y(E[0][0],E[0][1])}}function O4(g){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=g[Symbol.asyncIterator],i;return t?t.call(g):(g=typeof Qf=="function"?Qf(g):g[Symbol.iterator](),i={},x("next"),x("throw"),x("return"),i[Symbol.asyncIterator]=function(){return this},i);function x(E){i[E]=g[E]&&function(s){return new Promise(function(y,e){s=g[E](s),T(y,e,s.done,s.value)})}}function T(E,s,y,e){Promise.resolve(e).then(function(r){E({value:r,done:y})},s)}}function gr(g){return typeof g=="function"}function iC(g){var t=function(x){Error.call(x),x.stack=new Error().stack},i=g(t);return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}var v0=iC(function(g){return function(t){g(this),this.message=t?t.length+` errors occurred during unsubscription: `+t.map(function(i,x){return x+1+") "+i.toString()}).join(` - `):"",this.name="UnsubscriptionError",this.errors=t}});function Py(g,t){if(g){var i=g.indexOf(t);0<=i&&g.splice(i,1)}}var qm=function(){function g(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return g.prototype.unsubscribe=function(){var t,i,x,T,E;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var y=$f(s),e=y.next();!e.done;e=y.next()){var r=e.value;r.remove(this)}}catch(u){t={error:u}}finally{try{e&&!e.done&&(i=y.return)&&i.call(y)}finally{if(t)throw t.error}}else s.remove(this);var p=this.initialTeardown;if(gr(p))try{p()}catch(u){E=u instanceof v0?u.errors:[u]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var a=$f(h),l=a.next();!l.done;l=a.next()){var n=l.value;try{eT(n)}catch(u){E=E??[],u instanceof v0?E=xd(xd([],yd(E)),yd(u.errors)):E.push(u)}}}catch(u){x={error:u}}finally{try{l&&!l.done&&(T=a.return)&&T.call(a)}finally{if(x)throw x.error}}}if(E)throw new v0(E)}},g.prototype.add=function(t){var i;if(t&&t!==this)if(this.closed)eT(t);else{if(t instanceof g){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(i=this._finalizers)!==null&&i!==void 0?i:[]).push(t)}},g.prototype._hasParent=function(t){var i=this._parentage;return i===t||Array.isArray(i)&&i.includes(t)},g.prototype._addParent=function(t){var i=this._parentage;this._parentage=Array.isArray(i)?(i.push(t),i):i?[i,t]:t},g.prototype._removeParent=function(t){var i=this._parentage;i===t?this._parentage=null:Array.isArray(i)&&Py(i,t)},g.prototype.remove=function(t){var i=this._finalizers;i&&Py(i,t),t instanceof g&&t._removeParent(this)},g.EMPTY=function(){var t=new g;return t.closed=!0,t}(),g}(),nC=qm.EMPTY;function rC(g){return g instanceof qm||g&&"closed"in g&&gr(g.remove)&&gr(g.add)&&gr(g.unsubscribe)}function eT(g){gr(g)?g():g.unsubscribe()}var sC={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},D4={setTimeout:function(g,t){for(var i=[],x=2;x0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(i){return this._throwIfClosed(),g.prototype._trySubscribe.call(this,i)},t.prototype._subscribe=function(i){return this._throwIfClosed(),this._checkFinalizedStatuses(i),this._innerSubscribe(i)},t.prototype._innerSubscribe=function(i){var x=this,T=this,E=T.hasError,s=T.isStopped,y=T.observers;return E||s?nC:(this.currentObservers=null,y.push(i),new qm(function(){x.currentObservers=null,Py(y,i)}))},t.prototype._checkFinalizedStatuses=function(i){var x=this,T=x.hasError,E=x.thrownError,s=x.isStopped;T?i.error(E):s&&i.complete()},t.prototype.asObservable=function(){var i=new Aa;return i.source=this,i},t.create=function(i,x){return new nT(i,x)},t}(Aa),nT=function(g){Zd(t,g);function t(i,x){var T=g.call(this)||this;return T.destination=i,T.source=x,T}return t.prototype.next=function(i){var x,T;(T=(x=this.destination)===null||x===void 0?void 0:x.next)===null||T===void 0||T.call(x,i)},t.prototype.error=function(i){var x,T;(T=(x=this.destination)===null||x===void 0?void 0:x.error)===null||T===void 0||T.call(x,i)},t.prototype.complete=function(){var i,x;(x=(i=this.destination)===null||i===void 0?void 0:i.complete)===null||x===void 0||x.call(i)},t.prototype._subscribe=function(i){var x,T;return(T=(x=this.source)===null||x===void 0?void 0:x.subscribe(i))!==null&&T!==void 0?T:nC},t}(Nn),hC=new Aa(function(g){return g.complete()});function Y4(g){return g&&gr(g.schedule)}function uC(g){return g[g.length-1]}function fC(g){return Y4(uC(g))?g.pop():void 0}function cC(g,t){return typeof uC(g)=="number"?g.pop():t}var dC=function(g){return g&&typeof g.length=="number"&&typeof g!="function"};function pC(g){return gr(g?.then)}function vC(g){return gr(g[Qx])}function mC(g){return Symbol.asyncIterator&&gr(g?.[Symbol.asyncIterator])}function gC(g){return new TypeError("You provided "+(g!==null&&typeof g=="object"?"an invalid object":"'"+g+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function k4(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var yC=k4();function xC(g){return gr(g?.[yC])}function SC(g){return F4(this,arguments,function(){var t,i,x,T;return eC(this,function(E){switch(E.label){case 0:t=g.getReader(),E.label=1;case 1:E.trys.push([1,,9,10]),E.label=2;case 2:return[4,kf(t.read())];case 3:return i=E.sent(),x=i.value,T=i.done,T?[4,kf(void 0)]:[3,5];case 4:return[2,E.sent()];case 5:return[4,kf(x)];case 6:return[4,E.sent()];case 7:return E.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function TC(g){return gr(g?.getReader)}function Du(g){if(g instanceof Aa)return g;if(g!=null){if(vC(g))return j4(g);if(dC(g))return K4(g);if(pC(g))return Z4(g);if(mC(g))return EC(g);if(xC(g))return J4(g);if(TC(g))return $4(g)}throw gC(g)}function j4(g){return new Aa(function(t){var i=g[Qx]();if(gr(i.subscribe))return i.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function K4(g){return new Aa(function(t){for(var i=0;i{let T=this.tilePosInDirection(new _t(i,x),g);return this.tilemap.hasBlockingTile(T,t,R4(g),this.ignoreMissingTiles)})}isCharBlocking(g,t){return this.someCharTile((i,x)=>{let T=this.tilePosInDirection(new _t(i,x),g);return this.tilemap.hasBlockingChar(T,t,this.getCollisionGroups(),new Set([this.getId()]),this.ignoreCollisionGroups)})}isMoving(){return this.movementDirection!="none"}turnTowards(g){this.isMoving()||g!="none"&&this.changeFacingDirection(g)}changeFacingDirection(g){this.facingDirection!==g&&(this.facingDirection=g,this.directionChanged$.next(g))}getFacingDirection(){return this.facingDirection}getFacingPosition(){return this._tilePos.position.add(Au(this.facingDirection))}addCollisionGroup(g){this.collisionGroups.add(g)}setCollisionGroups(g){this.collisionGroups=new Set(g)}setIgnoreCollisionGroups(g){this.ignoreCollisionGroups=new Set(g)}getCollisionGroups(){return Array.from(this.collisionGroups)}getIgnoreCollisionGroups(){return Array.from(this.ignoreCollisionGroups)}hasCollisionGroup(g){return this.collisionGroups.has(g)}removeCollisionGroup(g){this.collisionGroups.delete(g)}removeAllCollisionGroups(){this.collisionGroups.clear()}addLabels(g){for(let t of g)this.labels.add(t)}getLabels(){return[...this.labels.values()]}hasLabel(g){return this.labels.has(g)}clearLabels(){this.labels.clear()}removeLabels(g){for(let t of g)this.labels.delete(t)}getNumberOfDirections(){return this.numberOfDirections}movementStarted(){return this.movementStarted$}movementStopped(){return this.movementStopped$}directionChanged(){return this.directionChanged$}tilePositionSet(){return this.tilePositionSet$}positionChangeStarted(){return this.positionChangeStarted$}positionChangeFinished(){return this.positionChangeFinished$}autoMovementSet(){return this.autoMovementSet$}depthChanged(){return this.depthChanged$}getMovementProgress(){return this.movementProgress}setMovementProgress(g){let t=Math.max(0,Math.min(lu,g));this.movementProgress=t}hasWalkedHalfATile(){return this.movementProgress>lu/2}willCrossTileBorderThisUpdate(g){return this.movementProgress+this.maxProgressForDelta(g)>=lu}updateCharacterPosition(g){let t=this.willCrossTileBorderThisUpdate(g),i=1-(t?lu-this.movementProgress:this.maxProgressForDelta(g))/this.maxProgressForDelta(g);this.movementProgress=Math.min(this.movementProgress+this.maxProgressForDelta(g),lu),t&&(this.movementProgress=0,this.shouldContinueMoving()?(this.fire(this.positionChangeFinished$,this.tilePos,this.getNextTilePos()),this.tilePos=this.getNextTilePos(),this.startMoving(this.lastMovementImpulse),i>0&&this.updateCharacterPosition(g*i)):this.stopMoving())}maxProgressForDelta(g){let t=g/1e3;return Math.floor(t*this.speed*lu)}get tilePos(){return Ri.clone(this._tilePos)}set tilePos(g){Ri.copyOver(g,this._tilePos)}startMoving(g){g!=="none"&&(g!=this.movementDirection&&this.movementStarted$.next(g),this.movementDirection=g,this.facingDirection=g,this.fire(this.positionChangeStarted$,this.tilePos,this.getNextTilePos()))}tilePosInDirection(g,t){return g.add(Au(this.tilemap.toMapDirection(t)))}shouldContinueMoving(){return this.lastMovementImpulse!=="none"&&!this.isBlockingDirection(this.lastMovementImpulse)}stopMoving(){if(this.movementDirection==="none")return;let g=this.tilePos,t=this.getNextTilePos(),i=this.movementDirection;this.tilePos=this.getNextTilePos(),this.movementDirection="none",this.movementStopped$.next(i),this.fire(this.positionChangeFinished$,g,t)}fire(g,{position:t,layer:i},{position:x,layer:T}){g.next({exitTile:t,enterTile:x,exitLayer:i,enterLayer:T})}someCharTile(g){let t=this.getNextTilePos().position;for(let i=t.x;ithis.isLayerAlwaysOnTop(T));this.tilemap.layers.filter(T=>!this.isLayerAlwaysOnTop(T)).forEach(T=>{this.hasLayerProp(T,hu.HEIGHT_SHIFT_PROP_NAME)?(this.createHeightShiftLayers(T,i),t.push(T.tilemapLayer)):this.setDepth(T,++i)}),this.charLayerDepths.set(void 0,i),x.forEach((T,E)=>{T.tilemapLayer.setDepth(E+1+i)}),t.forEach(T=>T.destroy())}setDepth(t,i){t.tilemapLayer.setDepth(i),this.isCharLayer(t)&&this.charLayerDepths.set(this.getLayerProp(t,hu.CHAR_LAYER_PROP_NAME),i)}createHeightShiftLayers(t,i){let x=this.getLayerProp(t,hu.HEIGHT_SHIFT_PROP_NAME);isNaN(x)&&(x=0);let T=1;for(let E=0;ET.name==i);return x?.value}hasLayerProp(t,i){return this.getLayerProp(t,i)!=null}copyLayer(t,i){let x=`${t.name}#${i}`,T=this.tilemap.createBlankLayer(x,t.tilemapLayer.tileset);if(T){if(T.name=x,this.isIsometric())for(let E=i;E>=0;E--){let s=i-E;T.putTileAt(t.data[E][s],s,E)}else for(let E=0;Ey===this.charData.id)).subscribe(({direction:y})=>{var e;(e=this.animation)==null||e.setStandingFrame(y)}),this.sprite&&(this.sprite.setOrigin(0,0),this.resetAnimation(this.sprite),this.updateOverlaySprite(),this.updateGridChar())}destroy(){this.destroy$.next(),this.destroy$.complete(),this.newSpriteSet$.complete()}setSprite(g){g?(this.sprite&&(g.x=this.sprite.x,g.y=this.sprite.y),this.sprite=g,this.newSpriteSet$.next(),this.layerOverlaySprite=this.layerOverlaySprite?this.scene.add.sprite(0,0,this.sprite.texture):void 0,this.updateOverlaySprite(),this.resetAnimation(this.sprite),this.updateDepth()):(this.layerOverlaySprite=void 0,this.sprite=void 0)}getSprite(){return this.sprite}getLayerOverlaySprite(){return this.layerOverlaySprite}setContainer(g){var t;this.container=g,this.cachedContainerHeight=(t=g?.getBounds().height)!=null?t:0}getContainer(){return this.container}getOffsetX(){return this.customOffset.x}setOffsetX(g){this.customOffset.x=g}getOffsetY(){return this.customOffset.y}setOffsetY(g){this.customOffset.y=g}getWalkingAnimationMapping(){return this.walkingAnimationMapping}turnTowards(g){var t;this.geHeadless.isMoving(this.charData.id)||g!="none"&&(this.geHeadless.turnTowards(this.charData.id,g),(t=this.animation)==null||t.setStandingFrame(g))}getAnimation(){return this.animation}setAnimation(g){this.animation=g}update(g){this.updateGridChar()}getEngineOffset(){var g,t,i,x;if(!this.sprite)return _t.ZERO;let T=this.tilemap.getTileWidth()/2-Math.floor(((t=(g=this.sprite)==null?void 0:g.displayWidth)!=null?t:0)/2),E=-((x=(i=this.sprite)==null?void 0:i.displayHeight)!=null?x:0)+this.tilemap.getTileHeight();return new _t(T,E)}updatePixelPos(){let g=new _t(this.geHeadless.getPosition(this.charData.id)),t=this.geHeadless.getMovementProgress(this.charData.id)/1e3,i=this.tilemap.tilePosToPixelPos(g).add(this.getEngineOffset()).add(this.customOffset).add(Au(this.geHeadless.getFacingDirection(this.charData.id)).multiply(this.tilemap.getTileDistance(this.geHeadless.getFacingDirection(this.charData.id)).scalarMult(t))),x=this.getGameObj();x&&(x.x=Math.floor(i.x),x.y=Math.floor(i.y))}getGameObj(){return this.container||this.sprite}updateGridChar(){var g;if(this.updatePixelPos(),this.sprite&&this.geHeadless.isMoving(this.charData.id)){let t=this.geHeadless.getMovementProgress(this.charData.id)>lu/2;(g=this.getAnimation())==null||g.updateCharacterFrame(this.geHeadless.getFacingDirection(this.charData.id),t,Number(this.sprite.frame.name))}this.updateDepth()}resetAnimation(g){let t=new rT(this.walkingAnimationMapping,g.texture.source[0].width/g.width/rT.FRAMES_CHAR_ROW);this.setAnimation(t),t.frameChange().pipe(Ea(this.newSpriteSet$)).subscribe(i=>{g?.setFrame(i)}),t.setIsEnabled(this.walkingAnimationMapping!==void 0),t.setStandingFrame(this.geHeadless.getFacingDirection(this.charData.id))}updateOverlaySprite(){if(!this.layerOverlaySprite||!this.sprite)return;this.layerOverlaySprite.scale=this.sprite.scale;let g=this.tilemap.getTileHeight()/this.layerOverlaySprite.scale;this.layerOverlaySprite.setCrop(0,0,this.layerOverlaySprite.displayWidth,this.sprite.height-g),this.layerOverlaySprite.setOrigin(0,0)}updateDepth(){if(!this.getGameObj())return;let g=new _t(this.geHeadless.getPosition(this.charData.id)),t=this.geHeadless.getCharLayer(this.charData.id);this.container?this.setContainerDepth(this.container,{position:g,layer:t}):this.sprite&&this.setSpriteDepth(this.sprite,{position:g,layer:t});let i=this.getLayerOverlaySprite();if(i){let x=new _t(mh(Pn({},g),{y:g.y-1}));this.setSpriteDepth(i,{position:x,layer:t})}}setSpriteDepth(g,t){g.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(t))+this.getPaddedPixelDepthSprite(g))}setContainerDepth(g,t){g.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(t))+this.getPaddedPixelDepthContainer(g))}getPaddedPixelDepthContainer(g){return Fy.shiftPad(g.y+this.cachedContainerHeight,Dy.Z_INDEX_PADDING)}getPaddedPixelDepthSprite(g){return Fy.shiftPad(g.y+g.displayHeight,Dy.Z_INDEX_PADDING)}getTransitionLayer(g){if(g.layer)return this.geHeadless.getTransition(g.position,g.layer)||g.layer}},cO=(g=>(g.DONT_BLOCK="DONT_BLOCK",g.BLOCK_TWO_TILES="BLOCK_TWO_TILES",g.BLOCK_ONE_TILE_AHEAD="BLOCK_ONE_TILE_AHEAD",g.BLOCK_ONE_TILE_BEHIND="BLOCK_ONE_TILE_BEHIND",g))(cO||{}),bC=(g=>(g.STOP="STOP",g.CLOSEST_REACHABLE="CLOSEST_REACHABLE",g.RETRY="RETRY",g.ALTERNATIVE_TARGETS="ALTERNATIVE_TARGETS",g))(bC||{}),dO=class{distance(g,t){return no.manhattanDistance(g,t)}direction(g,t){if(no.equal(g,t))return"none";let i=g.clone().subtract(t);return Math.abs(i.x)>Math.abs(i.y)?i.x>0?"left":"right":i.y>0?"up":"down"}neighbors(g){return[new _t(g.x,g.y+1),new _t(g.x+1,g.y),new _t(g.x-1,g.y),new _t(g.x,g.y-1)]}getDirections(){return["up","right","down","left"]}},pO=class{distance(g,t){return no.chebyshevDistance(g,t)}neighbors(g){let t=[new _t(g.x,g.y+1),new _t(g.x+1,g.y),new _t(g.x-1,g.y),new _t(g.x,g.y-1)],i=[new _t(g.x+1,g.y+1),new _t(g.x+1,g.y-1),new _t(g.x-1,g.y+1),new _t(g.x-1,g.y-1)];return[...t,...i]}direction(g,t){return t.x>g.x?t.y>g.y?"down-right":t.yg.y?"down-left":t.yg.y?"down":"none"}getDirections(){return["up","right","down","left","down-left","down-right","up-right","up-left"]}},Sd=class{static create(g){switch(g){case 4:return new dO;case 8:return new pO}}},sT=class{constructor(g,t,i){this.backoffMs=g,this.maxRetries=t,this.onFinished=i,this.retries=0,this.elapsed=0}retry(g,t){this.shouldRetry()?(this.elapsed+=g,this.elapsed>=this.backoffMs&&(this.elapsed=0,this.retries++,t())):this.onFinished()}reset(){this.retries=0,this.elapsed=0}getMaxRetries(){return this.maxRetries}getBackoffMs(){return this.backoffMs}shouldRetry(){return this.maxRetries===-1||this.retries(g.WAIT="WAIT",g.RETRY="RETRY",g.STOP="STOP",g))(LC||{}),tg=class{constructor(g,{shortestPathAlgorithm:t="BFS",pathWidth:i=1,pathHeight:x=1,numberOfDirections:T=4,isPositionAllowed:E=(u,f)=>!0,collisionGroups:s=[],ignoredChars:y=[],ignoreTiles:e=!1,ignoreMapBounds:r=!1,ignoreBlockedTarget:p=!1,maxPathLength:h=1/0,ignoreLayers:a=!1,considerCosts:l=!1,calculateClosestToTarget:n=!0}={}){this.gridTilemap=g,this.options={shortestPathAlgorithm:t,pathWidth:i,pathHeight:x,numberOfDirections:T,isPositionAllowed:E,collisionGroups:s,ignoredChars:y,ignoreTiles:e,ignoreMapBounds:r,ignoreBlockedTarget:p,maxPathLength:h,ignoreLayers:a,considerCosts:l,calculateClosestToTarget:n},this.ignoredCharsSet=new Set(y)}findShortestPath(g,t){this.options.ignoreLayers&&(this.gridTilemap.fixCacheLayer(g.layer),t.layer=g.layer);let i=this.findShortestPathImpl(g,t);return this.gridTilemap.unfixCacheLayers(),i}getNeighbors(g,t){var i;return Sd.create((i=this.options.numberOfDirections)!=null?i:4).neighbors(g.position).map(x=>{let T=g.layer;return this.options.ignoreLayers||(T=this.gridTilemap.getTransition(x,g.layer)),{position:x,layer:T||g.layer}}).filter(x=>!this.isBlocking(g,x)||this.options.ignoreBlockedTarget&&Ri.equal(x,t))}getTransition(g,t){if(!this.options.ignoreLayers)return this.gridTilemap.getTransition(g,t)}getCosts(g,t){if(!this.options.considerCosts)return 1;let i=Ca(t.position,g);return this.gridTilemap.getTileCosts(t,i)}isBlocking(g,t){return!(this.options.ignoreMapBounds||this.gridTilemap.isInRange(t.position))||!this.options.isPositionAllowed(t.position,t.layer)||!this.options.ignoreTiles&&this.hasBlockingTileFrom(g,t,this.options.pathWidth,this.options.pathHeight,this.options.ignoreMapBounds,this.gridTilemap)?!0:this.hasBlockingCharFrom(g,t,this.options.pathWidth,this.options.pathHeight,this.options.collisionGroups,this.ignoredCharsSet,this.gridTilemap)}distance(g,t){return(this.options.numberOfDirections===4?no.manhattanDistance:no.chebyshevDistance)(g,t)}getTilePosInDir(g,t){return this.options.ignoreLayers?{position:g.position.add(Au(this.gridTilemap.toMapDirection(t))),layer:g.layer}:this.gridTilemap.getTilePosInDirection(g,t)}getReverseNeighbors(g,t){var i;let x=Sd.create((i=this.options.numberOfDirections)!=null?i:4).neighbors(g.position),T;if(!this.options.ignoreLayers){let E=this.gridTilemap.getReverseTransitions(g.position,g.layer);T=E?[...E]:void 0}return x.map(E=>T?T.map(s=>({position:E,layer:s||g.layer})):[{position:E,layer:g.layer}]).flat().filter(E=>!this.isBlocking(E,g)||this.options.ignoreBlockedTarget&&Ri.equal(g,t))}hasBlockingCharFrom(g,t,i,x,T,E,s){if(i===1&&x===1)return s.hasBlockingChar(t.position,t.layer,T,E);let y=r=>s.hasBlockingChar(r,t.layer,T,E),e=Ca(g.position,t.position);return this.isBlockingMultiTile(g,e,i,x,y)}hasBlockingTileFrom(g,t,i,x,T,E){if(i===1&&x===1)return E.hasBlockingTile(t.position,t.layer,Ca(t.position,g.position),T);let s=Ca(g.position,t.position),y=e=>E.hasBlockingTile(e,t.layer,s,T);return this.isBlockingMultiTile(g,s,i,x,y)}isBlockingMultiTile(g,t,i,x,T){let E={src:new _t(g.position.x+i,g.position.y),dest:new _t(g.position.x+i,g.position.y+x-1)},s={src:new _t(g.position.x-1,g.position.y),dest:new _t(g.position.x-1,g.position.y+x-1)},y={src:new _t(g.position.x,g.position.y-1),dest:new _t(g.position.x+i-1,g.position.y-1)},e={src:new _t(g.position.x,g.position.y+x),dest:new _t(g.position.x+i-1,g.position.y+x)};switch(t){case"right":return this.checkLine(E,T);case"left":return this.checkLine(s,T);case"up":return this.checkLine(y,T);case"down":return this.checkLine(e,T);case"up-left":return this.checkLine({src:y.src,dest:new _t(y.dest.x-1,y.dest.y)},T)||this.checkLine({src:new _t(s.src.x,s.src.y-1),dest:new _t(s.dest.x,s.dest.y-1)},T);case"up-right":return this.checkLine({src:new _t(y.src.x+1,y.src.y),dest:y.dest},T)||this.checkLine({src:new _t(E.src.x,E.src.y-1),dest:new _t(E.dest.x,E.dest.y-1)},T);case"down-left":return this.checkLine({src:new _t(s.src.x,s.src.y+1),dest:new _t(s.dest.x,s.dest.y+1)},T)||this.checkLine({src:e.src,dest:new _t(e.dest.x-1,e.dest.y)},T);case"down-right":return this.checkLine({src:new _t(e.src.x+1,e.src.y),dest:e.dest},T)||this.checkLine({src:new _t(E.src.x,E.src.y+1),dest:new _t(E.dest.x,E.dest.y+1)},T)}return!1}checkLine(g,t){for(let i=g.src.x;i<=g.dest.x;i++)for(let x=g.src.y;x<=g.dest.y;x++)if(t(new _t(i,x)))return!0;return!1}},vO=YM(kx(),1),mO=class extends tg{findShortestPathImpl(g,t){let i=this.shortestPathBfs(g,t);return{path:this.returnPath(i.previous,g,t),closestToTarget:i.closestToTarget,steps:i.steps,maxPathLengthReached:i.maxPathLengthReached,algorithmUsed:"A_STAR"}}shortestPathBfs(g,t){let i=new Map,x=new Map,T=new Map,E=new vO.MinFibonacciHeap((r,p)=>Xc(T,r)-Xc(T,p)),s=g,y=this.distance(g.position,t.position),e=0;for(E.push(g),x.set(Ri.toString(g),0),T.set(Ri.toString(g),this.distance(g.position,t.position));E.size>0;){let r=E.pop();if(!r)break;e++;let p=this.distance(r.position,t.position);if(pthis.options.maxPathLength)return{previous:new Map,closestToTarget:s,steps:e,maxPathLengthReached:!0};for(let h of this.getNeighbors(r,t)){let a=Xc(x,r)+this.getCosts(r.position,h),l=Ri.toString(h);(!x.has(l)||a0;){let e=T.dequeue();if(y++,!e)break;let{node:r,dist:p}=e;if(p>this.options.maxPathLength)return{previous:new Map,closestToTarget:E,steps:y,maxPathLengthReached:!0};let h=this.distance(r.position,t.position);if(hthis.lastDist)}step(g,t,i){var x;this.lastDist=i;for(let T of g){let E=Ri.toString(T);if(!this.visited.has(E)){this.previous.set(E,t),this.queue.enqueue({node:T,dist:i+1}),this.visited.set(E,i+1);let s=(x=this.otherBfs)==null?void 0:x.visited.get(E);s!==void 0&&s0,T.queue.size()>0);){let e=x.queue.dequeue();if(!e)break;let{node:r,dist:p}=e;if(p+1+(((i=T.queue.peek())==null?void 0:i.dist)||0)>this.options.maxPathLength)return{previous:x.previous,previous2:T.previous,closestToTarget:this.maybeClosestToTarget(s),steps:E,maxPathLengthReached:!0};let h=this.distance(r.position,t.position);if(hYc(this.f,T)-Yc(this.f,E)),this.openSet.push(g);let x=Ri.toString(g);for(this.g.set(x,0),this.f.set(x,this.distance(g.position,t.position)),this.maxFrontierSize=Math.max(this.maxFrontierSize,this.openSet.size);this.openSet.size>0;){let T=this.openSet.pop();if(!T)break;if(this.steps++,Ri.equal(T,t))return{previous:i,closestToTarget:t,steps:this.steps,maxPathLengthReached:!1};if(Yc(this.g,T)+1>this.options.maxPathLength)return{previous:new Map,closestToTarget:this.closestToTarget,steps:this.steps,maxPathLengthReached:!0};this.updateClosestToTarget(T,t);for(let E of this.getNeighborsInternal(T,i.get(Ri.toString(T)),t)){let s=Ri.toString(E.p),y=Yc(this.g,T)+E.dist;(!this.g.has(s)||y({p:E,dist:1}));let x=this.prune(t,g).filter(E=>!this.isBlockingIgnoreTarget(g,E,i)).map(E=>{let s=this.getTransition(E.position,g.layer);return{position:E.position,layer:s||g.layer}}),T=[];for(let E of x)if(this.isHorizontal(g.position,E.position))T.push({p:E,dist:1});else{let s=this.jump(g,E,i,1,Ca(g.position,E.position));s&&T.push(s)}return T}isBlockingIgnoreTarget(g,t,i){return this.isBlocking(g,t)&&!(this.options.ignoreBlockedTarget&&Ri.equal(t,i))}jump(g,t,i,x,T){if(!this.isBlockingIgnoreTarget(g,t,i))return Ri.equal(t,i)?{p:t,dist:x}:x>=this.maxJumpSize?{p:t,dist:x}:this.getTransition(t.position,g.layer)!==void 0?{p:t,dist:x}:this.hasForced(g,t)?{p:t,dist:x}:(this.updateClosestToTarget(t,i),this.jump(t,this.getTilePosInDir(t,T),i,x+1,T))}isHorizontal(g,t){return g.y===t.y}getForced(g,t,i,x,T,E){let s=[],y=g;return(this.blockOrTrans(y,i)||this.blockOrTrans(i,x))&&this.addIfNotBlocked(s,t,x),(this.blockOrTrans(y,T)||this.blockOrTrans(T,E))&&this.addIfNotBlocked(s,t,E),s}hasForced(g,t){let{topLeft:i,downLeft:x,top:T,bottom:E}=this.normalizedPositions(g,t);return!!((this.blockOrTrans(g,x)||this.blockOrTrans(x,E))&&!this.blockOrTrans(t,E)||(this.blockOrTrans(g,i)||this.blockOrTrans(i,T))&&!this.blockOrTrans(t,T))}prune(g,t){let{right:i,top:x,bottom:T,downLeft:E,topLeft:s}=this.normalizedPositions(g,t);return this.isHorizontal(g.position,t.position)?[i,x,T]:[i,...this.getForced(g,t,E,T,s,x)]}normalizedPositions(g,t){return g.position.xt.position.x?{topLeft:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},downLeft:{position:new _t(t.position.x+1,t.position.y-1),layer:t.layer},top:{position:new _t(t.position.x,t.position.y+1),layer:t.layer},bottom:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},right:{position:new _t(t.position.x-1,t.position.y),layer:t.layer}}:g.position.y1?this.fillPath(T,E,x):x.push(E),T=E}return x.reverse()}fillPath(g,t,i){let x=g;do{let T=Ca(x.position,t.position);x=this.getTilePosInDir(x,T),i.push(x)}while(!no.equal(x.position,t.position))}};function Yc(g,t){var i;return(i=g.get(Ri.toString(t)))!=null?i:Number.MAX_VALUE}var yO=class{constructor(g,t,i,x={}){this.character=g,this.gridTilemap=t,this.charToFollow=i;let T={distance:0,noPathFoundStrategy:"STOP",maxPathLength:1/0,shortestPathAlgorithm:"BIDIRECTIONAL_SEARCH",ignoreLayers:!1,considerCosts:x.considerCosts||!1,facingDirection:"none"};this.options=Pn(Pn({},T),x),this.options.considerCosts&&this.options.shortestPathAlgorithm!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${this.options.shortestPathAlgorithm}'. It can only be used with A* algorithm.`),this.options.shortestPathAlgorithm==="JPS"&&(this.character.getTileWidth()>1||this.character.getTileHeight()>1)&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.character=g,this.updateTarget(this.charToFollow.getTilePos().position,this.charToFollow.getTilePos().layer),this.charToFollow.positionChangeStarted().pipe(Ea(this.character.autoMovementSet().pipe(gh(E=>E!==this),nc(1)))).subscribe(({enterTile:E,enterLayer:s})=>{this.updateTarget(E,s)})}update(g){var t;(t=this.targetMovement)==null||t.update(g)}getInfo(){return{type:"Follow",config:{charToFollow:this.charToFollow.getId(),distance:this.options.distance,noPathFoundStrategy:this.options.noPathFoundStrategy,maxPathLength:this.options.maxPathLength,ignoreLayers:this.options.ignoreLayers,facingDirection:this.options.facingDirection,shortestPathAlgorithm:this.options.shortestPathAlgorithm}}}getFacingPos(){let g=gm[this.options.facingDirection]+gm[this.charToFollow.getFacingDirection()],t=tC("up",g),i={x:this.charToFollow.getTilePos().position.x,y:this.charToFollow.getTilePos().position.y};return t==="right"?i.x+=this.charToFollow.getTileWidth()-1:t==="down"?i.y+=this.charToFollow.getTileWidth()-1:t==="down-left"?i.y+=this.charToFollow.getTileWidth()-1:t==="down-right"?(i.y+=this.charToFollow.getTileWidth()-1,i.x+=this.charToFollow.getTileWidth()-1):t==="up-right"&&(i.x+=this.charToFollow.getTileWidth()-1),this.gridTilemap.getTilePosInDirection({position:new _t(i),layer:this.charToFollow.getTilePos().layer},t).position}updateTarget(g,t){let i=this.options.facingDirection!=="none"&&this.options.distance===0;i&&(g=this.getFacingPos()),this.targetMovement=new UC(this.character,this.gridTilemap,{position:new _t(g),layer:t},{distance:i?0:this.options.distance+1,config:{algorithm:this.options.shortestPathAlgorithm,noPathFoundStrategy:this.options.noPathFoundStrategy,maxPathLength:this.options.maxPathLength,ignoreLayers:this.options.ignoreLayers,considerCosts:this.options.considerCosts,ignoredChars:[this.charToFollow.getId()]}})}},uT=class{static getRandomInt(g){return Math.floor(Math.random()*Math.floor(g))}},xO=class{constructor(g,t=0,i=-1){this.character=g,this.delay=t,this.radius=i,this.stepSize=0,this.delayLeft=this.delay,this.initialRow=g.getNextTilePos().position.y,this.initialCol=g.getNextTilePos().position.x,this.randomizeStepSize(),this.stepsWalked=0,this.currentMovementDirection="none",this.character.positionChangeStarted().pipe(Ea(this.character.autoMovementSet().pipe(gh(x=>x!==this),nc(1)))).subscribe(()=>{this.stepsWalked++}),this.distanceUtils=Sd.create(g.getNumberOfDirections())}update(g){if(this.shouldContinueWalkingCurrentDirection())this.character.move(this.currentMovementDirection);else if(this.delayLeft-=g,this.delayLeft<=0){this.delayLeft=this.delay;let t=this.getFreeRandomDirection();this.stepsWalked=0,this.character.move(t),this.currentMovementDirection=t,this.randomizeStepSize()}}getInfo(){return{type:"Random",config:{delay:this.delay,radius:this.radius}}}shouldContinueWalkingCurrentDirection(){return this.stepsWalked!this.character.isBlockingDirection(g)).filter(g=>this.isWithinRadius(g))}isWithinRadius(g){return this.radius==-1?!0:this.getDist(g)<=this.radius}getDist(g){return this.distanceUtils.distance(this.character.getNextTilePos().position.add(Au(g)),new _t(this.initialCol,this.initialRow))}getFreeRandomDirection(){let g=this.getFreeDirections();return g.length==0?"none":g[uT.getRandomInt(g.length)]}randomizeStepSize(){this.stepSize=uT.getRandomInt(this.radius)+1}};function SO(g,t){return g.filter(i=>{var x,T,E,s,y,e;return(x=t.labels)!=null&&x.withAllLabels?(T=t.labels)==null?void 0:T.withAllLabels.every(r=>i.hasLabel(r)):(E=t.labels)!=null&&E.withOneOfLabels?(s=t.labels)==null?void 0:s.withOneOfLabels.some(r=>i.hasLabel(r)):(y=t.labels)!=null&&y.withNoneLabels?!((e=t.labels)!=null&&e.withNoneLabels.some(r=>i.hasLabel(r))):!0})}var DC="2.44.6",TO=class{constructor(g,t){this.collistionStrategy=g,this.collisionGroupRelation=t,this.tilePosToCharacters=new EO,this.charRemoved$=new Nn}isCharBlockingAt(g,t,i,x=new Set,T=new Set){if(i.length===0)return!1;let E=this.tilePosToCharacters.get(g,t);return!!(E&&E.size>0&&[...E].filter(s=>!x.has(s.getId())).filter(s=>!this.doIntersect(s.getCollisionGroups(),T)).some(s=>i.some(y=>s.getCollisionGroups().some(e=>this.collidesWith(y,e)))))}doIntersect(g,t){for(let i of g)if(t.has(i))return!0;return!1}collidesWith(g,t){return this.collisionGroupRelation?(this.collisionGroupRelation.get(g)||new Set).has(t):g===t}getCharactersAt(g,t){return this.tilePosToCharacters.get(g,t)||new Set}addCharacter(g){this.addTilePositions(g.getTilePos(),g),this.addTilePositions(g.getNextTilePos(),g),this.addPositionChangeSub(g),this.addPositionChangeFinishedSub(g),this.addTilePosSetSub(g)}removeCharacter(g){let t=g.getId();this.charRemoved$.next(t),this.deleteTilePositions(g.getTilePos(),g),this.deleteTilePositions(g.getNextTilePos(),g)}add(g,t,i){let x=this.tilePosToCharacters.get(g,t);x||this.tilePosToCharacters.set(g,t,new Set([i])),x?.add(i)}addTilePosSetSub(g){g.tilePositionSet().pipe(Ea(this.charRemoved(g.getId()))).subscribe(t=>{this.deleteTilePositions(g.getNextTilePos(),g),this.addTilePositions(t,g)})}charRemoved(g){var t;return(t=this.charRemoved$)==null?void 0:t.pipe(nc(1),gh(i=>i==g))}addPositionChangeSub(g){g.positionChangeStarted().pipe(Ea(this.charRemoved(g.getId())),this.posChangeToLayerPos()).subscribe(t=>{this.collistionStrategy==="BLOCK_ONE_TILE_AHEAD"&&this.deleteTilePositions(t.exit,g),this.addTilePositions(t.enter,g)})}addPositionChangeFinishedSub(g){g.positionChangeFinished().pipe(Ea(this.charRemoved(g.getId())),this.posChangeToLayerPos()).subscribe(t=>{this.deleteTilePositions(t.exit,g),this.addTilePositions(t.enter,g)})}addTilePositions(g,t){this.forEachCharTile(g,t,(i,x)=>{this.add(new _t(i,x),g.layer,t)})}deleteTilePositions(g,t){this.forEachCharTile(g,t,(i,x)=>{var T;(T=this.tilePosToCharacters.get(new _t(i,x),g.layer))==null||T.delete(t)})}forEachCharTile(g,t,i){let x=g.position;for(let T=x.x;T({enter:{position:new _t(g.enterTile),layer:g.enterLayer},exit:{position:new _t(g.exitTile),layer:g.exitLayer}})))}posToString(g,t){return`${g.x}#${g.y}#${t}`}},EO=class{constructor(){this.memo=new Map}set(g,t,i){let x=this.memo.get(g.x);x||(x=new Map,this.memo.set(g.x,x));let T=x.get(g.y);T||(T=new Map,x.set(g.y,T)),T.set(t,i)}get(g,t){let i=this.memo.get(g.x);if(!i)return;let x=i.get(g.y);if(x)return x.get(t)}},_x=class{constructor(g,t,i,x){this.x=g,this.y=t,this.width=i,this.height=x}getX(){return this.x}getY(){return this.y}getWidth(){return this.width}getHeight(){return this.height}isInRange(g){return g.x>=this.x&&g.x=this.y&&g.yi.isCharLayer());for(let i of[...t,void 0]){let x=this.tileCollisionCache.get(i?.getName());if(x===void 0){x=new Array(this.tilemap.getWidth());for(let T=0;T>t&1)==1}var cT="ge_cost",IC=class NC{constructor(t,i,x,T=void 0,E=!1){this.tilemap=t,this.collisionTilePropertyName=i,this.useTileCollisionCache=E,this.characters=new Map,this.transitions=new Map,this.reverseTransitions=new Map,this.collidesPropNames=new Map,this.tileCostPropNames=new Map,this.collisionRelevantLayersFrameCache=new Map,this.charBlockCache=new TO(x,T);for(let s of Jx())this.collidesPropNames.set(s,NC.ONE_WAY_COLLIDE_PROP_PREFIX+s),this.tileCostPropNames.set(s,`${cT}_${s}`);this.useTileCollisionCache&&(this.tileCollisionCache=new CO(t,this),this.tileCollisionCache.rebuild())}fixCacheLayer(t){var i;(i=this.tileCollisionCache)==null||i.fixLayer(t)}unfixCacheLayers(){var t;(t=this.tileCollisionCache)==null||t.unfixLayers()}addCharacter(t){this.characters.set(t.getId(),t);let i=t.getNextTilePos().layer;i===void 0?t.setTilePosition(mh(Pn({},t.getNextTilePos()),{layer:this.getLowestCharLayer()})):this.getCharLayerNames().includes(i)||console.warn(`Char layer '${i}' of character '${t.getId()}' is unknown.`),this.charBlockCache.addCharacter(t)}removeCharacter(t){let i=this.characters.get(t);i&&(this.charBlockCache.removeCharacter(i),this.characters.delete(t))}getCharacters(){return[...this.characters.values()]}getCharactersAt(t,i){return this.charBlockCache.getCharactersAt(t,i)}rebuildTileCollisionCache(t){var i;(i=this.tileCollisionCache)==null||i.rebuild(t)}hasBlockingTileUncached(t,i,x,T){if(!T&&this.hasNoTileUncached(t,i))return!0;let E=this.getCollisionRelevantLayers(i);for(let s of E)if(this.isLayerBlockingAt(s.getName(),t,x))return!0;return!1}hasBlockingTile(t,i,x,T){var E;let s=(E=this.tileCollisionCache)==null?void 0:E.isBlockingFrom(t.x,t.y,i,x,T);return s!==void 0?s:this.hasBlockingTileUncached(t,i,x,T)}getTransition(t,i){let x=this.transitions.get(t.toString());if(x)return x.get(i)}getReverseTransitions(t,i){let x=this.reverseTransitions.get(t.toString());if(x)return x.get(i)}setTransition(t,i,x){var T,E,s,y,e;this.transitions.has(t.toString())||this.transitions.set(t.toString(),new Map),this.reverseTransitions.has(t.toString())||this.reverseTransitions.set(t.toString(),new Map),(T=this.transitions.get(t.toString()))==null||T.set(i,x),(E=this.reverseTransitions.get(t.toString()))!=null&&E.has(x)||(s=this.reverseTransitions.get(t.toString()))==null||s.set(x,new Set),(e=(y=this.reverseTransitions.get(t.toString()))==null?void 0:y.get(x))==null||e.add(i)}getTransitions(){return new Map([...this.transitions].map(([t,i])=>[t,new Map(i)]))}getTileCosts(t,i){let x=this.getCollisionRelevantLayers(t.layer),T=1;for(let E of x)T=Math.max(T,this.getTileCostsForLayer(mh(Pn({},t),{layer:E.getName()}),i));return T}getTileCostsForLayer(t,i){let x=this.tilemap.getTileAt(t.position.x,t.position.y,t.layer);return i&&x?.getProperty(this.tileCostPropNames.get(i)||"")||x?.getProperty(cT)||1}hasNoTileUncached(t,i){return!this.getCollisionRelevantLayers(i).some(x=>this.tilemap.hasTileAt(t.x,t.y,x.getName()))}hasNoTile(t,i){var x;let T=(x=this.tileCollisionCache)==null?void 0:x.hasTileAt(t.x,t.y,i);return T!==void 0?T:this.hasNoTileUncached(t,i)}hasBlockingChar(t,i,x,T=new Set,E=new Set){return this.charBlockCache.isCharBlockingAt(t,i,x,T,E)}isInRange(t){return new _x(0,0,this.tilemap.getWidth(),this.tilemap.getHeight()).isInRange(t)}toMapDirection(t){return this.isIsometric()?P4(t):t}fromMapDirection(t){return this.isIsometric()?tC(t):t}isIsometric(){return this.tilemap.getOrientation()==="isometric"}getTilePosInDirection(t,i){let x=t.position.add(Au(this.toMapDirection(i))),T=this.getTransition(x,t.layer)||t.layer;return{position:x,layer:T}}invalidateFrameCache(){this.collisionRelevantLayersFrameCache.clear()}isLayerBlockingAt(t,i,x){let T=this.tilemap.getTileAt(i.x,i.y,t);return T?!!(T.getProperty(this.collisionTilePropertyName)||x&&T.getProperty(this.collidesPropNames.get(x)||"")):!1}getCharLayerIndexes(){return this.tilemap.getLayers().map((t,i)=>({layer:t,index:i})).filter(({layer:t})=>t.isCharLayer()).map(({index:t})=>t)}findPrevAndCharLayer(t){let i=this.getCharLayerIndexes(),x=this.tilemap.getLayers(),T=i.findIndex(E=>x[E].getProperty(em)==t);return T==0?{prevIndex:-1,charLayerIndex:i[T]}:{prevIndex:i[T-1],charLayerIndex:i[T]}}getCollisionRelevantLayers(t){if(!t)return this.tilemap.getLayers();let i=this.collisionRelevantLayersFrameCache.get(t);if(i)return i;let{prevIndex:x,charLayerIndex:T}=this.findPrevAndCharLayer(t),E=this.tilemap.getLayers().slice(x+1,T+1);return this.collisionRelevantLayersFrameCache.set(t,E),E}getLowestCharLayer(){for(let t of this.tilemap.getLayers())if(t.isCharLayer())return t.getProperty(em)}getCharLayerNames(){return this.tilemap.getLayers().filter(t=>t.isCharLayer()).map(t=>t.getProperty(em)).filter(AO)}};IC.ONE_WAY_COLLIDE_PROP_PREFIX="ge_collide_";var wO=IC;function AO(g){return g!=null}var PO=(g=>(g.REMOVED="REMOVED",g.ADDED="ADDED",g))(PO||{}),RO=(g=>(g.WAIT="WAIT",g.SKIP="SKIP",g.STOP="STOP",g))(RO||{}),bO=class{constructor(g,t){this.character=g,this.tilemap=t,this.queue=new ym,this.finished$=new Nn,this.pathBlockedWaitElapsed=0,this.distanceUtils=Sd.create(g.getNumberOfDirections()),this.character.autoMovementSet().pipe(gh(i=>i!==this),nc(1)).subscribe(()=>{this.queue.size()>0&&this.finishMovementTerminated(),this.finished$.complete()})}update(g){(!this.character.isMoving()||this.character.willCrossTileBorderThisUpdate(g))&&this.queue.size()>0&&this.moveCharOnPath(g)}getInfo(){return{type:"Queue"}}enqueue(g,t={}){var i,x,T;let E={pathBlockedStrategy:(i=t.pathBlockedStrategy)!=null?i:"STOP",pathBlockedWaitTimeoutMs:t?.pathBlockedWaitTimeoutMs||-1,ignoreInvalidPositions:(x=t.ignoreInvalidPositions)!=null?x:!1,skipInvalidPositions:(T=t.skipInvalidPositions)!=null?T:!1};for(let s of g){let y={command:s,config:E};if(Uf(s)){this.queue.enqueue(y);continue}let e=this.queue.peekEnd(),r=e?.command;if(r||(r=this.character.getNextTilePos()),Uf(r)){this.queue.enqueue(y);continue}let p=this.distanceUtils.distance(r.position,s.position)===1;(!t.ignoreInvalidPositions||p)&&this.queue.enqueue(y)}}peekAll(){return this.queue.peekAll()}size(){return this.queue.size()}finished(){return this.finished$}clear(){this.queue.clear()}moveCharOnPath(g){let t=this.queue.peek();if(!t)return;let i=t.command,x=t.config;if(Uf(i)&&(i=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),i)),x.skipInvalidPositions){if(i=this.getNextValidPosition(),!i){this.finishInvalidNextPos(i);return}}else if(!this.isNeighborPos(i)){this.finishInvalidNextPos(i);return}if(this.character.isBlockingDirection(Ca(this.character.getNextTilePos().position,i.position))){if(x.pathBlockedStrategy==="STOP")this.finishPathBlocked(i);else if(x.pathBlockedStrategy==="SKIP"){this.queue.dequeue(),this.moveCharOnPath(g);return}else x.pathBlockedStrategy==="WAIT"&&x.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=g,this.pathBlockedWaitElapsed>=x.pathBlockedWaitTimeoutMs&&this.finishBlockedWaitTimeout(i,x.pathBlockedWaitTimeoutMs));return}this.pathBlockedWaitElapsed=0,this.queue.dequeue(),this.character.move(this.getDir(this.character.getNextTilePos().position,i.position)),this.isLastMovement()&&this.finish("SUCCESS","",i)}getNextValidPosition(){for(var g;this.queue.size()>0;){let t=(g=this.queue.peek())==null?void 0:g.command;if(Uf(t)&&(t=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),t)),t&&this.isNeighborPos(t))return t;this.queue.dequeue()}}isLastMovement(){return this.queue.size()===0}isNeighborPos(g){let t=this.distanceUtils.distance(this.character.getNextTilePos().position,g.position)===1,i=this.tilemap.getTransition(g.position,this.character.getNextTilePos().layer);if(this.character.getNextTilePos().layer!==g.layer)return t&&i===g.layer;let x=i!==void 0&&i!==g.layer;return t&&!x}finishMovementTerminated(){this.finish("MOVEMENT_TERMINATED","New automatic movement has been set to character.")}finishInvalidNextPos(g){g?this.finish("INVALID_NEXT_POS",`Position ${this.posToStr(g)} is not reachable from ${this.posToStr(this.character.getNextTilePos())}.`):this.finish("INVALID_NEXT_POS",`No enqueued position is reachable from ${this.posToStr(this.character.getNextTilePos())}.`)}finishPathBlocked(g){this.finish("PATH_BLOCKED",`Position ${this.posToStr(g)} is blocked.`)}finishBlockedWaitTimeout(g,t){this.finish("PATH_BLOCKED_WAIT_TIMEOUT",`Position ${this.posToStr(g)} is blocked and the wait timeout of ${t} ms has been exceeded.`)}finish(g,t="",i=this.character.getNextTilePos()){this.queue=new ym,this.finished$.next({position:i.position,result:g,description:t,layer:i.layer})}getDir(g,t){return this.tilemap.fromMapDirection(Ca(g,t))}posToStr(g){return`(${g.position.x}, ${g.position.y}, ${g.layer})`}},LO=class{constructor(g=!0){this.isCreatedInternal=!1,g&&console.log(`Using GridEngine v${DC}`)}getCharLayer(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getTilePos().layer}getTransition(g,t){var i;return this.initGuard(),(i=this.gridTilemap)==null?void 0:i.getTransition(new _t(g),t)}setTransition(g,t,i){var x;return this.initGuard(),(x=this.gridTilemap)==null?void 0:x.setTransition(new _t(g),t,i)}create(g,t){this.isCreatedInternal=!0,this.gridCharacters=new Map;let i=this.setConfigDefaults(t);this.config=i,this.movementStopped$=new Nn,this.movementStarted$=new Nn,this.directionChanged$=new Nn,this.positionChangeStarted$=new Nn,this.positionChangeFinished$=new Nn,this.queueMovementFinished$=new Nn,this.charRemoved$=new Nn,this.charAdded$=new Nn,this.gridTilemap=new wO(g,this.config.collisionTilePropertyName,this.config.characterCollisionStrategy,this.recordToMap(this.config.collisionGroupRelation),this.config.cacheTileCollisions),this.addCharacters()}recordToMap(g){return g?new Map(Object.entries(g).map(([t,i])=>[t,new Set(i)])):void 0}getPosition(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getTilePos().position}move(g,t){this.moveChar(g,t)}moveRandomly(g,t=0,i=-1){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(g);if(!T)throw this.createCharUnknownErr(g);let E=new xO(T,t,i);T.setMovement(E)}getMovement(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);let x=i.getMovement();return x?x.getInfo():{type:"None"}}moveTo(g,t,i){var x;let T=this.assembleMoveToConfig(i);this.initGuard();let E=(x=this.gridCharacters)==null?void 0:x.get(g);if(!E)throw this.createCharUnknownErr(g);if(!this.gridTilemap)throw this.createUninitializedErr();let s=new UC(E,this.gridTilemap,{position:new _t(t),layer:i?.targetLayer||E.getNextTilePos().layer},{distance:0,config:T});return E.setMovement(s),s.finishedObs().pipe(ud(y=>({charId:g,position:y.position,result:y.result,description:y.description,layer:y.layer})))}stopMovement(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);i.setMovement(void 0)}setSpeed(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.setSpeed(t)}getSpeed(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getSpeed()}collidesWithTiles(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.collidesWithTiles()}update(g,t){var i;if(this.isCreatedInternal&&this.gridCharacters)for(let[x,T]of this.gridCharacters)T.update(t);(i=this.gridTilemap)==null||i.invalidateFrameCache()}addCharacter(g){var t,i,x,T,E;if(!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let s={speed:g.speed||4,tilemap:this.gridTilemap,collidesWithTiles:!0,collisionGroups:["geDefault"],ignoreCollisionGroups:[],charLayer:g.charLayer,facingDirection:g.facingDirection,labels:g.labels,numberOfDirections:(t=g.numberOfDirections)!=null?t:this.config.numberOfDirections,tileWidth:g.tileWidth,tileHeight:g.tileHeight};typeof g.collides=="boolean"?g.collides===!1&&(s.collidesWithTiles=!1,s.collisionGroups=[]):g.collides!==void 0&&(g.collides.collidesWithTiles===!1&&(s.collidesWithTiles=!1),g.collides.collisionGroups&&(s.collisionGroups=g.collides.collisionGroups),g.collides.ignoreCollisionGroups&&(s.ignoreCollisionGroups=g.collides.ignoreCollisionGroups),s.ignoreMissingTiles=(x=(i=g.collides)==null?void 0:i.ignoreMissingTiles)!=null?x:!1);let y=new uO(g.id,s);g.startPosition&&y.setTilePosition({position:new _t(g.startPosition),layer:y.getTilePos().layer}),(T=this.gridCharacters)==null||T.set(g.id,y),this.gridTilemap.addCharacter(y);let e=y.getId();y.movementStopped().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var p;(p=this.movementStopped$)==null||p.next({charId:e,direction:r})}),y.movementStarted().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var p;(p=this.movementStarted$)==null||p.next({charId:e,direction:r})}),y.directionChanged().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var p;(p=this.directionChanged$)==null||p.next({charId:e,direction:r})}),y.positionChangeStarted().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var p;(p=this.positionChangeStarted$)==null||p.next(Pn({charId:e},r))}),y.positionChangeFinished().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var p;(p=this.positionChangeFinished$)==null||p.next(Pn({charId:e},r))}),(E=this.charAdded$)==null||E.next(e)}hasCharacter(g){var t;return this.initGuard(),!!((t=this.gridCharacters)!=null&&t.has(g))}removeCharacter(g){var t,i,x,T;if(this.initGuard(),!((t=this.gridCharacters)!=null&&t.get(g)))throw this.createCharUnknownErr(g);(i=this.gridTilemap)==null||i.removeCharacter(g),(x=this.gridCharacters)==null||x.delete(g),(T=this.charRemoved$)==null||T.next(g)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters)for(let g of this.gridCharacters.keys())this.removeCharacter(g)}getAllCharacters(g){if(this.initGuard(),!this.gridCharacters)return[];let t=[...this.gridCharacters.values()];return(g?SO(t,g):t).map(i=>i.getId())}getLabels(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getLabels()}addLabels(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.addLabels(t)}removeLabels(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.removeLabels(t)}clearLabels(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);i.clearLabels()}follow(g,t,i,x){var T,E,s,y,e,r;let p;i===void 0?p={distance:0,closestPointIfBlocked:!1}:typeof i=="number"?(p={distance:i,closestPointIfBlocked:!1},x&&(p.closestPointIfBlocked=!0)):p=i,this.initGuard();let h=(T=this.gridCharacters)==null?void 0:T.get(g),a=(E=this.gridCharacters)==null?void 0:E.get(t);if(!h)throw this.createCharUnknownErr(g);if(!a)throw this.createCharUnknownErr(t);if(!this.gridTilemap)throw this.createUninitializedErr();let l=new yO(h,this.gridTilemap,a,{distance:(s=p.distance)!=null?s:0,noPathFoundStrategy:p.closestPointIfBlocked?"CLOSEST_REACHABLE":"STOP",maxPathLength:(y=p.maxPathLength)!=null?y:1/0,shortestPathAlgorithm:(e=p.algorithm)!=null?e:"BIDIRECTIONAL_SEARCH",ignoreLayers:!!p.ignoreLayers,facingDirection:(r=p.facingDirection)!=null?r:"none"});h.setMovement(l)}isMoving(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.isMoving()}getFacingDirection(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getFacingDirection()}getFacingPosition(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);let x=i.getFacingPosition();return{x:x.x,y:x.y}}turnTowards(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);return x.turnTowards(t)}getCharactersAt(g,t){if(this.initGuard(),!this.gridTilemap)return[];let i=this.gridTilemap.getCharactersAt(new _t(g),t);return Array.from(i).map(x=>x.getId())}setPosition(g,t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(g);if(!T)throw this.createCharUnknownErr(g);i||T.setTilePosition({position:new _t(t),layer:T.getTilePos().layer}),T.setTilePosition({position:new _t(t),layer:i})}isBlocked(g,t,i=["geDefault"]){var x,T;this.initGuard();let E=new _t(g);return!!((x=this.gridTilemap)!=null&&x.hasBlockingTile(E,t)||(T=this.gridTilemap)!=null&&T.hasBlockingChar(E,t,i))}isTileBlocked(g,t){var i;return this.initGuard(),!!((i=this.gridTilemap)!=null&&i.hasBlockingTile(new _t(g),t))}getCollisionGroups(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getCollisionGroups()||[]}setCollisionGroups(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.setCollisionGroups(t)}getIgnoreCollisionGroups(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getIgnoreCollisionGroups()||[]}setIgnoreCollisionGroups(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.setIgnoreCollisionGroups(t)}getTilePosInDirection(g,t,i){if(!this.gridTilemap)throw this.createUninitializedErr();let x=this.gridTilemap.getTilePosInDirection({position:new _t(g),layer:t},i);return{position:x.position.toPosition(),charLayer:x.layer}}findShortestPath(g,t,i={}){if(!this.gridTilemap)throw this.createUninitializedErr();let x=i.shortestPathAlgorithm||"BFS";i.considerCosts&&x!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${x}'. It can only be used with A* algorithm.`);let T=i.pathWidth!==void 0&&i.pathWidth!==1,E=i.pathHeight!==void 0&&i.pathHeight!==1;(T||E)&&x==="JPS"&&console.warn("GridEngine: Pathfinding options 'pathWidth' and 'pathHeight' > 1 cannot be used with algorithm 'JPS'.");let s=new BC(this.gridTilemap).findShortestPath(Ri.toInternal(g),Ri.toInternal(t),mh(Pn({},i),{shortestPathAlgorithm:x}));return{path:s.path.map(Ri.fromInternal),closestToTarget:s.closestToTarget?Ri.fromInternal(s.closestToTarget):void 0,reachedMaxPathLength:!1,steps:s.steps}}steppedOn(g,t,i){return this.positionChangeFinished().pipe(gh(x=>g.includes(x.charId)&&t.some(T=>T.x===x.enterTile.x&&T.y===x.enterTile.y)&&(i===void 0||i.includes(x.enterLayer))))}characterShifted(){if(!this.charAdded$||!this.charRemoved$)throw this.createUninitializedErr();return this.charAdded$.pipe(ud(g=>({charId:g,action:"ADDED"})),hO(this.charRemoved$.pipe(ud(g=>({charId:g,action:"REMOVED"})))))}movementStarted(){if(!this.movementStarted$)throw this.createUninitializedErr();return this.movementStarted$}movementStopped(){if(!this.movementStopped$)throw this.createUninitializedErr();return this.movementStopped$}directionChanged(){if(!this.directionChanged$)throw this.createUninitializedErr();return this.directionChanged$}positionChangeStarted(){if(!this.positionChangeStarted$)throw this.createUninitializedErr();return this.positionChangeStarted$}positionChangeFinished(){if(!this.positionChangeFinished$)throw this.createUninitializedErr();return this.positionChangeFinished$}getMovementProgress(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getMovementProgress()}rebuildTileCollisionCache(g,t,i,x){var T;(T=this.gridTilemap)==null||T.rebuildTileCollisionCache(new _x(g,t,i,x))}addQueueMovements(g,t,i){var x,T;this.initGuard();let E=(x=this.gridCharacters)==null?void 0:x.get(g);if(!E)throw this.createCharUnknownErr(g);if(!this.gridTilemap)throw this.createUninitializedErr();let s;((T=E?.getMovement())==null?void 0:T.getInfo().type)==="Queue"?s=E.getMovement():(s=new bO(E,this.gridTilemap),E.setMovement(s),s.finished().pipe(Ea(sO(this.charRemoved(g),E.autoMovementSet()))).subscribe(y=>{var e;(e=this.queueMovementFinished$)==null||e.next(Pn({charId:g},y))})),s.enqueue(t.map(y=>Uf(y)?y:{position:new _t(y.position),layer:y.charLayer}),i)}queueMovementFinished(){if(!this.queueMovementFinished$)throw this.createUninitializedErr();return this.queueMovementFinished$}getEnqueuedMovements(g){var t,i;this.initGuard();let x=(t=this.gridCharacters)==null?void 0:t.get(g);if(!x)throw this.createCharUnknownErr(g);return((i=x.getMovement())==null?void 0:i.getInfo().type)==="Queue"?x.getMovement().peekAll().map(T=>({command:Uf(T.command)?T.command:Ri.fromInternal(T.command),config:T.config})):[]}clearEnqueuedMovements(g){var t,i;this.initGuard();let x=(t=this.gridCharacters)==null?void 0:t.get(g);if(!x)throw this.createCharUnknownErr(g);((i=x.getMovement())==null?void 0:i.getInfo().type)==="Queue"&&x.getMovement().clear()}getTileCost(g,t,i){var x,T;return this.initGuard(),(T=(x=this.gridTilemap)==null?void 0:x.getTileCosts({position:new _t(g),layer:t},i))!=null?T:1}getState(){let g=[];if(this.gridCharacters)for(let[t,i]of this.gridCharacters.entries())g.push({id:t,position:Ri.fromInternal(i.getTilePos()),facingDirection:i.getFacingDirection(),speed:i.getSpeed(),labels:i.getLabels(),movementProgress:i.getMovementProgress(),collisionConfig:{collisionGroups:i.getCollisionGroups(),ignoreCollisionGroups:i.getIgnoreCollisionGroups(),collidesWithTiles:i.collidesWithTiles(),ignoreMissingTiles:i.getIgnoreMissingTiles()}});return{characters:g}}setState(g){if(this.gridCharacters)for(let t of g.characters){let i=this.gridCharacters.get(t.id);if(i){let x=i.getTilePos();Ri.equal(x,Ri.toInternal(t.position))||i.setTilePosition(Ri.toInternal(t.position)),i.setSpeed(t.speed),i.turnTowards(t.facingDirection),t.collisionConfig.collisionGroups&&i.setCollisionGroups(t.collisionConfig.collisionGroups),t.collisionConfig.collidesWithTiles!==void 0&&i.setCollidesWithTiles(t.collisionConfig.collidesWithTiles),t.collisionConfig.ignoreMissingTiles!==void 0&&i.setIgnoreMissingTiles(t.collisionConfig.ignoreMissingTiles),i.setMovementProgress(t.movementProgress),i.clearLabels(),i.addLabels(t.labels)}}}charRemoved(g){var t;if(!this.charRemoved$)throw this.createUninitializedErr();return(t=this.charRemoved$)==null?void 0:t.pipe(nc(1),gh(i=>i==g))}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var g;(g=this.config)==null||g.characters.forEach(t=>this.addCharacter(t))}moveChar(g,t){var i,x,T;this.initGuard();let E=(i=this.gridCharacters)==null?void 0:i.get(g);if(!E)throw this.createCharUnknownErr(g);if(E.getNumberOfDirections()===4){if(!((x=this.gridTilemap)!=null&&x.isIsometric())&&hd(t)){console.warn(`GridEngine: Character '${g}' can't be moved '${t}' in 4 direction mode.`);return}else if((T=this.gridTilemap)!=null&&T.isIsometric()&&!hd(t)){console.warn(`GridEngine: Character '${g}' can't be moved '${t}' in 4 direction isometric mode.`);return}}E.move(t)}createCharUnknownErr(g){return new Error(`Character unknown: ${g}`)}assembleMoveToConfig(g={}){let t=mh(Pn({},g),{noPathFoundStrategy:"STOP",pathBlockedStrategy:"WAIT"});return g!=null&&g.noPathFoundStrategy&&(Object.values(bC).includes(g.noPathFoundStrategy)?t.noPathFoundStrategy=g.noPathFoundStrategy:console.warn(`GridEngine: Unknown NoPathFoundStrategy '${g.noPathFoundStrategy}'. Falling back to 'STOP'`)),g!=null&&g.pathBlockedStrategy&&(Object.values(LC).includes(g.pathBlockedStrategy)?t.pathBlockedStrategy=g.pathBlockedStrategy:console.warn(`GridEngine: Unknown PathBlockedStrategy '${g.pathBlockedStrategy}'. Falling back to 'WAIT'`)),t}setConfigDefaults(g){return Pn({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",cacheTileCollisions:!1},g)}},FO=class extends OC{constructor(g,t={}){super(g,t),this.jumpCache=new dT}findShortestPathImpl(g,t){return this.jumpCache=new dT,super.findShortestPathImpl(g,t)}getNeighborsInternal(g,t,i){if(!t||g.layer!==t.layer)return this.getNeighbors(g,i).map(E=>({p:E,dist:1}));let x=this.prune(t,g).map(E=>{let s=this.getTransition(E.position,g.layer);return{position:E.position,layer:s||g.layer}}),T=[];for(let E of x){let s=this.jump(g,E,i,1,Ca(g.position,E.position));s&&(s.dist=this.distance(g.position,s.p.position),T.push(s))}return T}getForced(g,t){let i=[],{topLeft:x,downLeft:T,top:E,bottom:s,topRight:y,downRight:e}=this.normalizedPositions(g,t),r=Ca(g.position,t.position);return hd(r)?(this.blockOrTrans(g,x)&&(this.addIfNotBlocked(i,t,E),this.addIfNotBlocked(i,t,y),this.blockOrTrans(T,x)&&this.addIfNotBlocked(i,t,x)),this.blockOrTrans(g,T)&&(this.addIfNotBlocked(i,t,s),this.addIfNotBlocked(i,t,e),this.blockOrTrans(x,T)&&this.addIfNotBlocked(i,t,T)),this.blockOrTrans(x,E)&&this.addIfNotBlocked(i,t,E),this.blockOrTrans(T,s)&&this.addIfNotBlocked(i,t,s),this.blockOrTrans(x,y)&&this.addIfNotBlocked(i,t,y),this.blockOrTrans(T,e)&&this.addIfNotBlocked(i,t,e)):((this.blockOrTrans(g,E)||this.blockOrTrans(E,y))&&this.addIfNotBlocked(i,t,y),(this.blockOrTrans(g,s)||this.blockOrTrans(s,e))&&this.addIfNotBlocked(i,t,e),this.blockOrTrans(g,x)&&this.blockOrTrans(g,E)&&(this.addIfNotBlocked(i,t,E),this.addIfNotBlocked(i,t,x)),this.blockOrTrans(g,T)&&this.blockOrTrans(g,s)&&(this.addIfNotBlocked(i,t,s),this.addIfNotBlocked(i,t,T)),this.blockOrTrans(x,E)&&this.blockOrTrans(g,E)&&this.addIfNotBlocked(i,t,E),this.blockOrTrans(T,s)&&this.blockOrTrans(g,s)&&this.addIfNotBlocked(i,t,s)),i}hasForced(g,t){let{topLeft:i,downLeft:x,top:T,bottom:E,topRight:s,downRight:y}=this.normalizedPositions(g,t),e=Ca(g.position,t.position);if(hd(e)){if(this.blockOrTrans(g,i)&&(!this.blockOrTrans(t,T)||!this.blockOrTrans(t,s)||this.blockOrTrans(x,i)&&!this.blockOrTrans(t,i))||this.blockOrTrans(g,x)&&(!this.blockOrTrans(t,E)||!this.blockOrTrans(t,y)||this.blockOrTrans(i,x)&&!this.blockOrTrans(t,x))||this.blockOrTrans(i,T)&&!this.blockOrTrans(t,T)||this.blockOrTrans(x,E)&&!this.blockOrTrans(t,E)||this.blockOrTrans(i,s)&&!this.blockOrTrans(t,s)||this.blockOrTrans(x,y)&&!this.blockOrTrans(t,y))return!0}else if((this.blockOrTrans(g,T)||this.blockOrTrans(T,s))&&!this.blockOrTrans(t,s)||(this.blockOrTrans(g,E)||this.blockOrTrans(E,y))&&!this.blockOrTrans(t,y)||this.blockOrTrans(g,i)&&this.blockOrTrans(g,T)&&(!this.blockOrTrans(t,T)||!this.blockOrTrans(t,i))||this.blockOrTrans(g,x)&&this.blockOrTrans(g,E)&&(!this.blockOrTrans(t,E)||!this.blockOrTrans(t,x))||this.blockOrTrans(i,T)&&this.blockOrTrans(g,T)&&!this.blockOrTrans(t,T)||this.blockOrTrans(x,E)&&this.blockOrTrans(g,E)&&!this.blockOrTrans(t,E))return!0;return!1}prune(g,t){let{top:i,right:x,topRight:T,downRight:E,bottom:s}=this.normalizedPositions(g,t),y=this.getForced(g,t),e=Ca(g.position,t.position);return hd(e)?[i,x,T,E,s,...y]:[x,...y]}jump(g,t,i,x,T){let E=this.jumpCache.get(g,t);if(E!==null)return E;if(this.isBlocking(g,t)&&!(Ri.equal(t,i)&&this.options.ignoreBlockedTarget)){this.jumpCache.set(g,t,void 0);return}if(Ri.equal(t,i))return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(x>=this.maxJumpSize)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.getTransition(t.position,g.layer)!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.hasForced(g,t))return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.updateClosestToTarget(t,i),T==="up-left"){if(this.jump(t,this.getTilePosInDir(t,"up"),i,x+1,"up")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"left"),i,x+1,"left")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}else if(T==="down-left"){if(this.jump(t,this.getTilePosInDir(t,"down"),i,x+1,"down")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"left"),i,x+1,"left")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}else if(T==="up-right"){if(this.jump(t,this.getTilePosInDir(t,"up"),i,x+1,"up")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"right"),i,x+1,"right")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}else if(T==="down-right"){if(this.jump(t,this.getTilePosInDir(t,"down"),i,x+1,"down")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"right"),i,x+1,"right")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}let s=this.jump(t,this.getTilePosInDir(t,T),i,x+1,T);return this.jumpCache.set(g,t,s),s}normalizedPositions(g,t){return g.position.xt.position.x&&g.position.y===t.position.y?{topLeft:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},downLeft:{position:new _t(t.position.x+1,t.position.y-1),layer:t.layer},top:{position:new _t(t.position.x,t.position.y+1),layer:t.layer},bottom:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},right:{position:new _t(t.position.x-1,t.position.y),layer:t.layer},topRight:{position:new _t(t.position.x-1,t.position.y+1),layer:t.layer},downRight:{position:new _t(t.position.x-1,t.position.y-1),layer:t.layer}}:g.position.yt.position.y&&g.position.x===t.position.x?{topLeft:{position:new _t(t.position.x-1,t.position.y+1),layer:t.layer},downLeft:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},top:{position:new _t(t.position.x-1,t.position.y),layer:t.layer},bottom:{position:new _t(t.position.x+1,t.position.y),layer:t.layer},right:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},topRight:{position:new _t(t.position.x-1,t.position.y-1),layer:t.layer},downRight:{position:new _t(t.position.x+1,t.position.y-1),layer:t.layer}}:g.position.yt.position.x?{topLeft:{position:new _t(t.position.x+1,t.position.y),layer:t.layer},downLeft:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},top:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},bottom:{position:new _t(t.position.x-1,t.position.y-1),layer:t.layer},right:{position:new _t(t.position.x-1,t.position.y+1),layer:t.layer},topRight:{position:new _t(t.position.x,t.position.y+1),layer:t.layer},downRight:{position:new _t(t.position.x-1,t.position.y),layer:t.layer}}:g.position.y>t.position.y&&g.position.x(g.SUCCESS="SUCCESS",g.NO_PATH_FOUND_MAX_RETRIES_EXCEEDED="NO_PATH_FOUND_MAX_RETRIES_EXCEEDED",g.PATH_BLOCKED_MAX_RETRIES_EXCEEDED="PATH_BLOCKED_MAX_RETRIES_EXCEEDED",g.PATH_BLOCKED="PATH_BLOCKED",g.NO_PATH_FOUND="NO_PATH_FOUND",g.PATH_BLOCKED_WAIT_TIMEOUT="PATH_BLOCKED_WAIT_TIMEOUT",g.MOVEMENT_TERMINATED="MOVEMENT_TERMINATED",g.MAX_PATH_LENGTH_REACHED="MAX_PATH_LENGTH_REACHED",g))(DO||{}),UC=class{constructor(g,t,i,{config:x,ignoreBlockedTarget:T=!1,distance:E=0}={}){this.character=g,this.tilemap=t,this.targetPos=i,this.shortestPath=[],this.distOffset=0,this.posOnPath=0,this.stopped=!1,this.pathBlockedWaitElapsed=0,this.isPositionAllowed=()=>!0,this.shortestPathAlgorithm="BIDIRECTIONAL_SEARCH",this.maxPathLength=1/0,this.considerCosts=!1,this.ignoredChars=[],this.isBlocking=(e,r)=>e?new FC(this.tilemap,this.getPathfindingOptions()).isBlocking(this.character.getTilePos(),{position:e,layer:r}):!0;var s,y;this.shortestPathAlgorithm=(s=x?.algorithm)!=null?s:this.shortestPathAlgorithm,this.ignoreBlockedTarget=T,this.distance=E,this.noPathFoundStrategy=x?.noPathFoundStrategy||"STOP",this.pathBlockedStrategy=x?.pathBlockedStrategy||"WAIT",this.noPathFoundRetryable=new sT(x?.noPathFoundRetryBackoffMs||200,x?.noPathFoundMaxRetries||-1,()=>{this.stop("NO_PATH_FOUND_MAX_RETRIES_EXCEEDED")}),this.pathBlockedRetryable=new sT(x?.pathBlockedRetryBackoffMs||200,x?.pathBlockedMaxRetries||-1,()=>{this.stop("PATH_BLOCKED_MAX_RETRIES_EXCEEDED")}),x!=null&&x.isPositionAllowedFn&&(this.isPositionAllowed=x.isPositionAllowedFn),x!=null&&x.maxPathLength&&(this.maxPathLength=x.maxPathLength),this.alternativeTargets=x?.alternativeTargets,this.noPathFoundAlternativeTargetsFallbackStrategy=x?.noPathFoundAlternativeTargetsFallbackStrategy,x!=null&&x.considerCosts&&this.shortestPathAlgorithm!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${this.shortestPathAlgorithm}'. It can only be used with A* algorithm.`),this.shortestPathAlgorithm==="JPS"&&(this.character.getTileWidth()>1||this.character.getTileHeight()>1)&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.considerCosts=x?.considerCosts||!1,this.ignoreLayers=!!(x!=null&&x.ignoreLayers),this.distanceUtils=Sd.create(g.getNumberOfDirections()),this.pathBlockedWaitTimeoutMs=x?.pathBlockedWaitTimeoutMs||-1,this.ignoredChars=(y=x?.ignoredChars)!=null?y:[],this.finished$=new Nn,this.setCharacter(g)}setPathBlockedStrategy(g){this.pathBlockedStrategy=g}getPathBlockedStrategy(){return this.pathBlockedStrategy}setCharacter(g){this.character=g,this.noPathFoundRetryable.reset(),this.pathBlockedRetryable.reset(),this.pathBlockedWaitElapsed=0,this.calcShortestPath(),this.character.autoMovementSet().pipe(gh(t=>t!==this),nc(1)).subscribe(()=>{this.stop("MOVEMENT_TERMINATED")})}getPathfindingOptions(){return{shortestPathAlgorithm:this.shortestPathAlgorithm,pathWidth:this.character.getTileWidth(),pathHeight:this.character.getTileHeight(),numberOfDirections:this.character.getNumberOfDirections(),isPositionAllowed:this.isPositionAllowed,collisionGroups:this.character.getCollisionGroups(),ignoredChars:[this.character.getId(),...this.ignoredChars],ignoreTiles:!this.character.collidesWithTiles(),ignoreMapBounds:this.character.getIgnoreMissingTiles(),ignoreBlockedTarget:this.ignoreBlockedTarget,maxPathLength:this.maxPathLength,ignoreLayers:this.ignoreLayers,considerCosts:this.considerCosts,calculateClosestToTarget:!0}}update(g){var t,i,x,T;this.stopped||(this.noPathFound()&&(this.noPathFoundStrategy==="RETRY"?this.noPathFoundRetryable.retry(g,()=>this.calcShortestPath()):this.noPathFoundStrategy==="STOP"&&this.stop("NO_PATH_FOUND")),this.updatePosOnPath(),this.isBlocking((t=this.nextTileOnPath())==null?void 0:t.position,(i=this.character)==null?void 0:i.getNextTilePos().layer)?this.applyPathBlockedStrategy(g):this.pathBlockedWaitElapsed=0,this.hasArrived()?(this.stop("SUCCESS"),this.existsDistToTarget()&&this.turnTowardsTarget()):this.isBlocking((x=this.nextTileOnPath())==null?void 0:x.position,(T=this.character)==null?void 0:T.getNextTilePos().layer)||this.moveCharOnPath())}finishedObs(){return this.finished$}getInfo(){return{type:"Target",state:{pathAhead:this.shortestPath.slice(this.posOnPath).map(g=>Ri.fromInternal(g))},config:{algorithm:this.shortestPathAlgorithm,ignoreBlockedTarget:this.ignoreBlockedTarget,distance:this.distance,targetPos:Ri.fromInternal(this.targetPos),noPathFoundStrategy:this.noPathFoundStrategy,pathBlockedStrategy:this.pathBlockedStrategy,noPathFoundRetryBackoffMs:this.noPathFoundRetryable.getBackoffMs(),noPathFoundMaxRetries:this.noPathFoundRetryable.getMaxRetries()}}}resultToReason(g){switch(g){case"SUCCESS":return"Successfully arrived.";case"MOVEMENT_TERMINATED":return"Movement of character has been replaced before destination was reached.";case"PATH_BLOCKED":return"PathBlockedStrategy STOP: Path blocked.";case"NO_PATH_FOUND_MAX_RETRIES_EXCEEDED":return`NoPathFoundStrategy RETRY: Maximum retries of ${this.noPathFoundRetryable.getMaxRetries()} exceeded.`;case"NO_PATH_FOUND":return"NoPathFoundStrategy STOP: No path found.";case"PATH_BLOCKED_MAX_RETRIES_EXCEEDED":return`PathBlockedStrategy RETRY: Maximum retries of ${this.pathBlockedRetryable.getMaxRetries()} exceeded.`;case"PATH_BLOCKED_WAIT_TIMEOUT":return`PathBlockedStrategy WAIT: Wait timeout of ${this.pathBlockedWaitTimeoutMs}ms exceeded.`}}applyPathBlockedStrategy(g){this.pathBlockedStrategy==="RETRY"?this.pathBlockedRetryable.retry(g,()=>{let t=this.getShortestPath();t.path.length>0&&this.calcShortestPath(t)}):this.pathBlockedStrategy==="STOP"?this.stop("PATH_BLOCKED"):this.pathBlockedStrategy==="WAIT"&&this.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=g,this.pathBlockedWaitElapsed>=this.pathBlockedWaitTimeoutMs&&this.stop("PATH_BLOCKED_WAIT_TIMEOUT"))}moveCharOnPath(){let g=this.nextTileOnPath();if(!g)return;let t=this.getDir(this.character.getNextTilePos().position,g.position);this.character.move(t)}nextTileOnPath(){return this.shortestPath[this.posOnPath+1]}stop(g){this.finished$.next({position:this.character.getTilePos().position,result:g,description:this.resultToReason(g),layer:this.character.getTilePos().layer}),this.finished$.complete(),this.stopped=!0}turnTowardsTarget(){let g=this.shortestPath[this.posOnPath+1],t=this.getDir(this.character.getNextTilePos().position,g.position);this.character.turnTowards(t)}existsDistToTarget(){return this.posOnPath=this.shortestPath.length-1}updatePosOnPath(){let g=this.shortestPath[this.posOnPath];for(;this.posOnPath0)return{path:E,distOffset:s}}return this.noPathFoundStrategy=this.noPathFoundAlternativeTargetsFallbackStrategy||"STOP",this.getShortestPath()}}return{path:i,distOffset:0}}pathToAlternativeTarget(g,t){let i=t.findShortestPath(this.character.getNextTilePos(),g,this.getPathfindingOptions()).path,x=this.distanceUtils.distance(g.position,this.targetPos.position);return{path:i,distOffset:x}}getDir(g,t){return this.tilemap.fromMapDirection(this.distanceUtils.direction(g,t))}},IO=Object.create,zC=Object.defineProperty,NO=Object.getOwnPropertyDescriptor,BO=Object.getOwnPropertyNames,UO=Object.getPrototypeOf,zO=Object.prototype.hasOwnProperty,GO=(g,t)=>()=>(t||g((t={exports:{}}).exports,t),t.exports),VO=(g,t,i,x)=>{if(t&&typeof t=="object"||typeof t=="function")for(let T of BO(t))!zO.call(g,T)&&T!==i&&zC(g,T,{get:()=>t[T],enumerable:!(x=NO(t,T))||x.enumerable});return g},qx=(g,t,i)=>(i=g!=null?IO(UO(g)):{},VO(t||!g||!g.__esModule?zC(i,"default",{value:g,enumerable:!0}):i,g)),t1=GO((g,t)=>{(function(){var i,x="4.17.21",T=200,E="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",y="Invalid `variable` option passed into `_.template`",e="__lodash_hash_undefined__",r=500,p="__lodash_placeholder__",h=1,a=2,l=4,n=1,u=2,f=1,o=2,c=4,d=8,v=16,m=32,S=64,M=128,w=256,C=512,A=30,P="...",b=800,O=16,I=1,D=2,B=3,G=1/0,z=9007199254740991,X=17976931348623157e292,j=NaN,Q=4294967295,tt=Q-1,Y=Q>>>1,Z=[["ary",M],["bind",f],["bindKey",o],["curry",d],["curryRight",v],["flip",C],["partial",m],["partialRight",S],["rearg",w]],U="[object Arguments]",H="[object Array]",J="[object AsyncFunction]",_="[object Boolean]",q="[object Date]",at="[object DOMException]",ot="[object Error]",rt="[object Function]",gt="[object GeneratorFunction]",yt="[object Map]",Et="[object Number]",At="[object Null]",Pt="[object Object]",Vt="[object Promise]",dt="[object Proxy]",ut="[object RegExp]",Rt="[object Set]",Dt="[object String]",Ht="[object Symbol]",Bt="[object Undefined]",re="[object WeakMap]",le="[object WeakSet]",ge="[object ArrayBuffer]",xe="[object DataView]",Pe="[object Float32Array]",te="[object Float64Array]",Ge="[object Int8Array]",Oe="[object Int16Array]",Be="[object Int32Array]",Le="[object Uint8Array]",ne="[object Uint8ClampedArray]",je="[object Uint16Array]",si="[object Uint32Array]",Mi=/\b__p \+= '';/g,he=/\b(__p \+=) '' \+/g,Ti=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bt=/&(?:amp|lt|gt|quot|#39);/g,Me=/[&<>"']/g,we=RegExp(bt.source),Ve=RegExp(Me.source),Je=/<%-([\s\S]+?)%>/g,Gi=/<%([\s\S]+?)%>/g,Ii=/<%=([\s\S]+?)%>/g,nn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jn=/^\w*$/,Vi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pi=/[\\^$.*+?()[\]{}|]/g,Xi=RegExp(pi.source),Ra=/^\s+/,oa=/\s/,Us=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_r=/\{\n\/\* \[wrapped with (.+)\] \*/,lo=/,? & /,qr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zs=/[()=,{}\[\]\/\s]/,Ss=/\\(\\)?/g,ho=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ll=/\w*$/,Tt=/^[-+]0x[0-9a-f]+$/i,Zt=/^0b[01]+$/i,qt=/^\[object .+?Constructor\]$/,ie=/^0o[0-7]+$/i,ee=/^(?:0|[1-9]\d*)$/,Te=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ue=/($^)/,We=/['\n\r\u2028\u2029\\]/g,$e="\\ud800-\\udfff",qe="\\u0300-\\u036f",ii="\\ufe20-\\ufe2f",oi="\\u20d0-\\u20ff",$i=qe+ii+oi,un="\\u2700-\\u27bf",ji="a-z\\xdf-\\xf6\\xf8-\\xff",yn="\\xac\\xb1\\xd7\\xf7",ti="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Se="\\u2000-\\u206f",Br=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",gi="A-Z\\xc0-\\xd6\\xd8-\\xde",fn="\\ufe0e\\ufe0f",Ni=yn+ti+Se+Br,Vn="['’]",vn="["+$e+"]",Ki="["+Ni+"]",pr="["+$i+"]",Gs="\\d+",En="["+un+"]",la="["+ji+"]",$n="[^"+$e+Ni+Gs+un+ji+gi+"]",ba="\\ud83c[\\udffb-\\udfff]",Vs="(?:"+pr+"|"+ba+")",uo="[^"+$e+"]",La="(?:\\ud83c[\\udde6-\\uddff]){2}",fo="[\\ud800-\\udbff][\\udc00-\\udfff]",yi="["+gi+"]",Fa="\\u200d",Gu="(?:"+la+"|"+$n+")",fc="(?:"+yi+"|"+$n+")",sr="(?:"+Vn+"(?:d|ll|m|re|s|t|ve))?",Hs="(?:"+Vn+"(?:D|LL|M|RE|S|T|VE))?",Ws=Vs+"?",Xs="["+fn+"]?",Fl="(?:"+Fa+"(?:"+[uo,La,fo].join("|")+")"+Xs+Ws+")*",Bi="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ur=Xs+Ws+Fl,co="(?:"+[En,La,fo].join("|")+")"+Ur,Yo="(?:"+[uo+pr+"?",pr,La,fo,vn].join("|")+")",wh=RegExp(Vn,"g"),rn=RegExp(pr,"g"),ko=RegExp(ba+"(?="+ba+")|"+Yo+Ur,"g"),Ts=RegExp([yi+"?"+la+"+"+sr+"(?="+[Ki,yi,"$"].join("|")+")",fc+"+"+Hs+"(?="+[Ki,yi+Gu,"$"].join("|")+")",yi+"?"+Gu+"+"+sr,yi+"+"+Hs,Rn,Bi,Gs,co].join("|"),"g"),jo=RegExp("["+Fa+$e+$i+fn+"]"),Vu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,po=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Sr=-1,Zi={};Zi[Pe]=Zi[te]=Zi[Ge]=Zi[Oe]=Zi[Be]=Zi[Le]=Zi[ne]=Zi[je]=Zi[si]=!0,Zi[U]=Zi[H]=Zi[ge]=Zi[_]=Zi[xe]=Zi[q]=Zi[ot]=Zi[rt]=Zi[yt]=Zi[Et]=Zi[Pt]=Zi[ut]=Zi[Rt]=Zi[Dt]=Zi[re]=!1;var Ji={};Ji[U]=Ji[H]=Ji[ge]=Ji[xe]=Ji[_]=Ji[q]=Ji[Pe]=Ji[te]=Ji[Ge]=Ji[Oe]=Ji[Be]=Ji[yt]=Ji[Et]=Ji[Pt]=Ji[ut]=Ji[Rt]=Ji[Dt]=Ji[Ht]=Ji[Le]=Ji[ne]=Ji[je]=Ji[si]=!0,Ji[ot]=Ji[rt]=Ji[re]=!1;var Es={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",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parseFloat,Dl=parseInt,Gr=typeof global=="object"&&global&&global.Object===Object&&global,cc=typeof self=="object"&&self&&self.Object===Object&&self,xn=Gr||cc||Function("return this")(),Ph=typeof g=="object"&&g&&!g.nodeType&&g,bn=Ph&&typeof t=="object"&&t&&!t.nodeType&&t,Oa=bn&&bn.exports===Ph,Da=Oa&&Gr.process,Mn=function(){try{var ct=bn&&bn.require&&bn.require("util").types;return ct||Da&&Da.binding&&Da.binding("util")}catch{}}(),Ia=Mn&&Mn.isArrayBuffer,Na=Mn&&Mn.isDate,Il=Mn&&Mn.isMap,Nl=Mn&&Mn.isRegExp,Ba=Mn&&Mn.isSet,Ys=Mn&&Mn.isTypedArray;function Qi(ct,St,vt){switch(vt.length){case 0:return ct.call(St);case 1:return ct.call(St,vt[0]);case 2:return ct.call(St,vt[0],vt[1]);case 3:return ct.call(St,vt[0],vt[1],vt[2])}return ct.apply(St,vt)}function Xr(ct,St,vt,Ft){for(var Lt=-1,Ut=ct==null?0:ct.length;++Lt-1}function ha(ct,St,vt){for(var Ft=-1,Lt=ct==null?0:ct.length;++Ft-1;);return vt}function mo(ct,St){for(var vt=ct.length;vt--&&es(St,ct[vt],0)>-1;);return vt}function ns(ct,St){for(var vt=ct.length,Ft=0;vt--;)ct[vt]===St&&++Ft;return Ft}var Hu=or(Es),Qo=or(zr);function rs(ct){return"\\"+Ah[ct]}function dn(ct,St){return ct==null?i:ct[St]}function ws(ct){return jo.test(ct)}function hr(ct){return Vu.test(ct)}function go(ct){for(var St,vt=[];!(St=ct.next()).done;)vt.push(St.value);return vt}function Va(ct){var St=-1,vt=Array(ct.size);return ct.forEach(function(Ft,Lt){vt[++St]=[Lt,Ft]}),vt}function Ha(ct,St){return function(vt){return ct(St(vt))}}function _n(ct,St){for(var vt=-1,Ft=ct.length,Lt=0,Ut=[];++vt-1}function Xu(R,N){var k=this.__data__,nt=Mo(k,R);return nt<0?(++this.size,k.push([R,N])):k[nt][1]=N,this}js.prototype.clear=wp,js.prototype.delete=gc,js.prototype.get=Ap,js.prototype.has=Pp,js.prototype.set=Xu;function As(R){var N=-1,k=R==null?0:R.length;for(this.clear();++N=N?R:N)),R}function as(R,N,k,nt,ft,xt){var Ot,Gt=N&h,jt=N&a,fe=N&l;if(k&&(Ot=ft?k(R,nt,ft,xt):k(R)),Ot!==i)return Ot;if(!In(R))return R;var ce=Ei(R);if(ce){if(Ot=aP(R),!Gt)return br(R,Ot)}else{var ye=kr(R),Ie=ye==rt||ye==gt;if(_l(R))return Uc(R,Gt);if(ye==Pt||ye==U||Ie&&!ft){if(Ot=jt||Ie?{}:_1(R),!Gt)return jt?Xp(R,Dp(Ot,R)):Yg(R,Mc(Ot,R))}else{if(!Ji[ye])return ft?R:{};Ot=oP(R,ye,Gt)}}xt||(xt=new tr);var Ke=xt.get(R);if(Ke)return Ke;xt.set(R,Ot),PS(R)?R.forEach(function(ui){Ot.add(as(ui,N,k,ui,R,xt))}):wS(R)&&R.forEach(function(ui,Ui){Ot.set(Ui,as(ui,N,k,Ui,R,xt))});var hi=fe?jt?zi:kn:jt?Fs:Fr,Oi=ce?i:hi(R);return Sn(Oi||R,function(ui,Ui){Oi&&(Ui=ui,ui=R[Ui]),Ks(Ot,Ui,as(ui,N,k,Ui,R,xt))}),Ot}function Cc(R){var N=Fr(R);return function(k){return Ku(k,R,N)}}function Ku(R,N,k){var nt=k.length;if(R==null)return!nt;for(R=It(R);nt--;){var ft=k[nt],xt=N[ft],Ot=R[ft];if(Ot===i&&!(ft in R)||!xt(Ot))return!1}return!0}function wc(R,N,k){if(typeof R!="function")throw new Qt(s);return Hc(function(){R.apply(i,k)},N)}function il(R,N,k,nt){var ft=-1,xt=Tr,Ot=!0,Gt=R.length,jt=[],fe=N.length;if(!Gt)return jt;k&&(N=_i(N,lr(k))),nt?(xt=ha,Ot=!1):N.length>=T&&(xt=Wn,Ot=!1,N=new Eo(N));t:for(;++ftft?0:ft+k),nt=nt===i||nt>ft?ft:bi(nt),nt<0&&(nt+=ft),nt=k>nt?0:bS(nt);k0&&k(Gt)?N>1?ur(Gt,N-1,k,nt,ft):Yr(ft,Gt):nt||(ft[ft.length]=Gt)}return ft}var Xl=af(),Gh=af(!0);function os(R,N){return R&&Xl(R,N,Fr)}function Yl(R,N){return R&&Gh(R,N,Fr)}function nl(R,N){return Cn(N,function(k){return ll(R[k])})}function Js(R,N){N=bo(N,R);for(var k=0,nt=N.length;R!=null&&kN}function Bp(R,N){return R!=null&&me.call(R,N)}function Pc(R,N){return R!=null&&N in It(R)}function Wg(R,N,k){return R>=Mr(N,k)&&R=120&&ce.length>=120)?new Eo(Ot&&ce):i}ce=R[0];var ye=-1,Ie=Gt[0];t:for(;++ye-1;)Gt!==R&&So.call(Gt,jt,1),So.call(R,jt,1);return R}function Ar(R,N){for(var k=R?N.length:0,nt=k-1;k--;){var ft=N[k];if(k==nt||ft!==xt){var xt=ft;ol(ft)?So.call(R,ft,1):Ic(R,ft)}}return R}function ma(R,N){return R+Oh(vc()*(N-R+1))}function Ps(R,N,k,nt){for(var ft=-1,xt=qn(Fh((N-R)/(k||1)),0),Ot=vt(xt);xt--;)Ot[nt?xt:++ft]=R,R+=k;return Ot}function Ql(R,N){var k="";if(!R||N<1||N>z)return k;do N%2&&(k+=R),N=Oh(N/2),N&&(R+=R);while(N);return k}function ei(R,N){return Qg(eS(R,N,Os),R+"")}function Up(R){return Uh(uf(R))}function Fc(R,N){var k=uf(R);return jp(k,Co(N,0,k.length))}function sl(R,N,k,nt){if(!In(R))return R;N=bo(N,R);for(var ft=-1,xt=N.length,Ot=xt-1,Gt=R;Gt!=null&&++ftft?0:ft+N),k=k>ft?ft:k,k<0&&(k+=ft),ft=N>k?0:k-N>>>0,N>>>=0;for(var xt=vt(ft);++nt>>1,Ot=R[xt];Ot!==null&&!Qs(Ot)&&(k?Ot<=N:Ot=T){var fe=N?null:Lr(R);if(fe)return Wa(fe);Ot=!1,ft=Wn,jt=new Eo}else jt=N?[]:Gt;t:for(;++nt=nt?R:hs(R,N,k)}var Hp=Lh||function(R){return xn.clearTimeout(R)};function Uc(R,N){if(N)return R.slice();var k=R.length,nt=yo?yo(k):new R.constructor(k);return R.copy(nt),nt}function rf(R){var N=new R.constructor(R.byteLength);return new wn(N).set(new wn(R)),N}function Xg(R,N){var k=N?rf(R.buffer):R.buffer;return new R.constructor(k,R.byteOffset,R.byteLength)}function Rs(R){var N=new R.constructor(R.source,Ll.exec(R));return N.lastIndex=R.lastIndex,N}function zc(R){return Ya?It(Ya.call(R)):{}}function Wp(R,N){var k=N?rf(R.buffer):R.buffer;return new R.constructor(k,R.byteOffset,R.length)}function Ka(R,N){if(R!==N){var k=R!==i,nt=R===null,ft=R===R,xt=Qs(R),Ot=N!==i,Gt=N===null,jt=N===N,fe=Qs(N);if(!Gt&&!fe&&!xt&&R>N||xt&&Ot&&jt&&!Gt&&!fe||nt&&Ot&&jt||!k&&jt||!ft)return 1;if(!nt&&!xt&&!fe&&R=Gt)return jt;var fe=k[nt];return jt*(fe=="desc"?-1:1)}}return R.index-N.index}function Fo(R,N,k,nt){for(var ft=-1,xt=R.length,Ot=k.length,Gt=-1,jt=N.length,fe=qn(xt-Ot,0),ce=vt(jt+fe),ye=!nt;++Gt1?k[ft-1]:i,Ot=ft>2?k[2]:i;for(xt=R.length>3&&typeof xt=="function"?(ft--,xt):i,Ot&&fs(k[0],k[1],Ot)&&(xt=ft<3?i:xt,ft=1),N=It(N);++nt-1?ft[xt?N[Ot]:Ot]:i}}function it(R){return Ai(function(N){var k=N.length,nt=k,ft=Cr.prototype.thru;for(R&&N.reverse();nt--;){var xt=N[nt];if(typeof xt!="function")throw new Qt(s);if(ft&&!Ot&&of(xt)=="wrapper")var Ot=new Cr([],!0)}for(nt=Ot?nt:k;++nt1&&Hi.reverse(),ce&&jtGt))return!1;var fe=xt.get(R),ce=xt.get(N);if(fe&&ce)return fe==N&&ce==R;var ye=-1,Ie=!0,Ke=k&u?new Eo:i;for(xt.set(R,N),xt.set(N,R);++ye1?"& ":"")+N[nt],N=N.join(k>2?", ":" "),R.replace(Us,`{ + `):"",this.name="UnsubscriptionError",this.errors=t}});function Py(g,t){if(g){var i=g.indexOf(t);0<=i&&g.splice(i,1)}}var qm=function(){function g(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return g.prototype.unsubscribe=function(){var t,i,x,T,E;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var y=Qf(s),e=y.next();!e.done;e=y.next()){var r=e.value;r.remove(this)}}catch(u){t={error:u}}finally{try{e&&!e.done&&(i=y.return)&&i.call(y)}finally{if(t)throw t.error}}else s.remove(this);var p=this.initialTeardown;if(gr(p))try{p()}catch(u){E=u instanceof v0?u.errors:[u]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var a=Qf(h),l=a.next();!l.done;l=a.next()){var n=l.value;try{eT(n)}catch(u){E=E??[],u instanceof v0?E=xd(xd([],yd(E)),yd(u.errors)):E.push(u)}}}catch(u){x={error:u}}finally{try{l&&!l.done&&(T=a.return)&&T.call(a)}finally{if(x)throw x.error}}}if(E)throw new v0(E)}},g.prototype.add=function(t){var i;if(t&&t!==this)if(this.closed)eT(t);else{if(t instanceof g){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(i=this._finalizers)!==null&&i!==void 0?i:[]).push(t)}},g.prototype._hasParent=function(t){var i=this._parentage;return i===t||Array.isArray(i)&&i.includes(t)},g.prototype._addParent=function(t){var i=this._parentage;this._parentage=Array.isArray(i)?(i.push(t),i):i?[i,t]:t},g.prototype._removeParent=function(t){var i=this._parentage;i===t?this._parentage=null:Array.isArray(i)&&Py(i,t)},g.prototype.remove=function(t){var i=this._finalizers;i&&Py(i,t),t instanceof g&&t._removeParent(this)},g.EMPTY=function(){var t=new g;return t.closed=!0,t}(),g}(),nC=qm.EMPTY;function rC(g){return g instanceof qm||g&&"closed"in g&&gr(g.remove)&&gr(g.add)&&gr(g.unsubscribe)}function eT(g){gr(g)?g():g.unsubscribe()}var sC={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},D4={setTimeout:function(g,t){for(var i=[],x=2;x0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(i){return this._throwIfClosed(),g.prototype._trySubscribe.call(this,i)},t.prototype._subscribe=function(i){return this._throwIfClosed(),this._checkFinalizedStatuses(i),this._innerSubscribe(i)},t.prototype._innerSubscribe=function(i){var x=this,T=this,E=T.hasError,s=T.isStopped,y=T.observers;return E||s?nC:(this.currentObservers=null,y.push(i),new qm(function(){x.currentObservers=null,Py(y,i)}))},t.prototype._checkFinalizedStatuses=function(i){var x=this,T=x.hasError,E=x.thrownError,s=x.isStopped;T?i.error(E):s&&i.complete()},t.prototype.asObservable=function(){var i=new Aa;return i.source=this,i},t.create=function(i,x){return new nT(i,x)},t}(Aa),nT=function(g){Zd(t,g);function t(i,x){var T=g.call(this)||this;return T.destination=i,T.source=x,T}return t.prototype.next=function(i){var x,T;(T=(x=this.destination)===null||x===void 0?void 0:x.next)===null||T===void 0||T.call(x,i)},t.prototype.error=function(i){var x,T;(T=(x=this.destination)===null||x===void 0?void 0:x.error)===null||T===void 0||T.call(x,i)},t.prototype.complete=function(){var i,x;(x=(i=this.destination)===null||i===void 0?void 0:i.complete)===null||x===void 0||x.call(i)},t.prototype._subscribe=function(i){var x,T;return(T=(x=this.source)===null||x===void 0?void 0:x.subscribe(i))!==null&&T!==void 0?T:nC},t}(Nn),hC=new Aa(function(g){return g.complete()});function Y4(g){return g&&gr(g.schedule)}function uC(g){return g[g.length-1]}function fC(g){return Y4(uC(g))?g.pop():void 0}function cC(g,t){return typeof uC(g)=="number"?g.pop():t}var dC=function(g){return g&&typeof g.length=="number"&&typeof g!="function"};function pC(g){return gr(g?.then)}function vC(g){return gr(g[Qx])}function mC(g){return Symbol.asyncIterator&&gr(g?.[Symbol.asyncIterator])}function gC(g){return new TypeError("You provided "+(g!==null&&typeof g=="object"?"an invalid object":"'"+g+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function k4(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var yC=k4();function xC(g){return gr(g?.[yC])}function SC(g){return F4(this,arguments,function(){var t,i,x,T;return eC(this,function(E){switch(E.label){case 0:t=g.getReader(),E.label=1;case 1:E.trys.push([1,,9,10]),E.label=2;case 2:return[4,jf(t.read())];case 3:return i=E.sent(),x=i.value,T=i.done,T?[4,jf(void 0)]:[3,5];case 4:return[2,E.sent()];case 5:return[4,jf(x)];case 6:return[4,E.sent()];case 7:return E.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function TC(g){return gr(g?.getReader)}function Du(g){if(g instanceof Aa)return g;if(g!=null){if(vC(g))return j4(g);if(dC(g))return K4(g);if(pC(g))return Z4(g);if(mC(g))return EC(g);if(xC(g))return J4(g);if(TC(g))return $4(g)}throw gC(g)}function j4(g){return new Aa(function(t){var i=g[Qx]();if(gr(i.subscribe))return i.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function K4(g){return new Aa(function(t){for(var i=0;i{let T=this.tilePosInDirection(new _t(i,x),g);return this.tilemap.hasBlockingTile(T,t,R4(g),this.ignoreMissingTiles)})}isCharBlocking(g,t){return this.someCharTile((i,x)=>{let T=this.tilePosInDirection(new _t(i,x),g);return this.tilemap.hasBlockingChar(T,t,this.getCollisionGroups(),new Set([this.getId()]),this.ignoreCollisionGroups)})}isMoving(){return this.movementDirection!="none"}turnTowards(g){this.isMoving()||g!="none"&&this.changeFacingDirection(g)}changeFacingDirection(g){this.facingDirection!==g&&(this.facingDirection=g,this.directionChanged$.next(g))}getFacingDirection(){return this.facingDirection}getFacingPosition(){return this._tilePos.position.add(Au(this.facingDirection))}addCollisionGroup(g){this.collisionGroups.add(g)}setCollisionGroups(g){this.collisionGroups=new Set(g)}setIgnoreCollisionGroups(g){this.ignoreCollisionGroups=new Set(g)}getCollisionGroups(){return Array.from(this.collisionGroups)}getIgnoreCollisionGroups(){return Array.from(this.ignoreCollisionGroups)}hasCollisionGroup(g){return this.collisionGroups.has(g)}removeCollisionGroup(g){this.collisionGroups.delete(g)}removeAllCollisionGroups(){this.collisionGroups.clear()}addLabels(g){for(let t of g)this.labels.add(t)}getLabels(){return[...this.labels.values()]}hasLabel(g){return this.labels.has(g)}clearLabels(){this.labels.clear()}removeLabels(g){for(let t of g)this.labels.delete(t)}getNumberOfDirections(){return this.numberOfDirections}movementStarted(){return this.movementStarted$}movementStopped(){return this.movementStopped$}directionChanged(){return this.directionChanged$}tilePositionSet(){return this.tilePositionSet$}positionChangeStarted(){return this.positionChangeStarted$}positionChangeFinished(){return this.positionChangeFinished$}autoMovementSet(){return this.autoMovementSet$}depthChanged(){return this.depthChanged$}getMovementProgress(){return this.movementProgress}setMovementProgress(g){let t=Math.max(0,Math.min(lu,g));this.movementProgress=t}hasWalkedHalfATile(){return this.movementProgress>lu/2}willCrossTileBorderThisUpdate(g){return this.movementProgress+this.maxProgressForDelta(g)>=lu}updateCharacterPosition(g){let t=this.willCrossTileBorderThisUpdate(g),i=1-(t?lu-this.movementProgress:this.maxProgressForDelta(g))/this.maxProgressForDelta(g);this.movementProgress=Math.min(this.movementProgress+this.maxProgressForDelta(g),lu),t&&(this.movementProgress=0,this.shouldContinueMoving()?(this.fire(this.positionChangeFinished$,this.tilePos,this.getNextTilePos()),this.tilePos=this.getNextTilePos(),this.startMoving(this.lastMovementImpulse),i>0&&this.updateCharacterPosition(g*i)):this.stopMoving())}maxProgressForDelta(g){let t=g/1e3;return Math.floor(t*this.speed*lu)}get tilePos(){return Ri.clone(this._tilePos)}set tilePos(g){Ri.copyOver(g,this._tilePos)}startMoving(g){g!=="none"&&(g!=this.movementDirection&&this.movementStarted$.next(g),this.movementDirection=g,this.facingDirection=g,this.fire(this.positionChangeStarted$,this.tilePos,this.getNextTilePos()))}tilePosInDirection(g,t){return g.add(Au(this.tilemap.toMapDirection(t)))}shouldContinueMoving(){return this.lastMovementImpulse!=="none"&&!this.isBlockingDirection(this.lastMovementImpulse)}stopMoving(){if(this.movementDirection==="none")return;let g=this.tilePos,t=this.getNextTilePos(),i=this.movementDirection;this.tilePos=this.getNextTilePos(),this.movementDirection="none",this.movementStopped$.next(i),this.fire(this.positionChangeFinished$,g,t)}fire(g,{position:t,layer:i},{position:x,layer:T}){g.next({exitTile:t,enterTile:x,exitLayer:i,enterLayer:T})}someCharTile(g){let t=this.getNextTilePos().position;for(let i=t.x;ithis.isLayerAlwaysOnTop(T));this.tilemap.layers.filter(T=>!this.isLayerAlwaysOnTop(T)).forEach(T=>{this.hasLayerProp(T,hu.HEIGHT_SHIFT_PROP_NAME)?(this.createHeightShiftLayers(T,i),t.push(T.tilemapLayer)):this.setDepth(T,++i)}),this.charLayerDepths.set(void 0,i),x.forEach((T,E)=>{T.tilemapLayer.setDepth(E+1+i)}),t.forEach(T=>T.destroy())}setDepth(t,i){t.tilemapLayer.setDepth(i),this.isCharLayer(t)&&this.charLayerDepths.set(this.getLayerProp(t,hu.CHAR_LAYER_PROP_NAME),i)}createHeightShiftLayers(t,i){let x=this.getLayerProp(t,hu.HEIGHT_SHIFT_PROP_NAME);isNaN(x)&&(x=0);let T=1;for(let E=0;ET.name==i);return x?.value}hasLayerProp(t,i){return this.getLayerProp(t,i)!=null}copyLayer(t,i){let x=`${t.name}#${i}`,T=this.tilemap.createBlankLayer(x,t.tilemapLayer.tileset);if(T){if(T.name=x,this.isIsometric())for(let E=i;E>=0;E--){let s=i-E;T.putTileAt(t.data[E][s],s,E)}else for(let E=0;Ey===this.charData.id)).subscribe(({direction:y})=>{var e;(e=this.animation)==null||e.setStandingFrame(y)}),this.sprite&&(this.sprite.setOrigin(0,0),this.resetAnimation(this.sprite),this.updateOverlaySprite(),this.updateGridChar())}destroy(){this.destroy$.next(),this.destroy$.complete(),this.newSpriteSet$.complete()}setSprite(g){g?(this.sprite&&(g.x=this.sprite.x,g.y=this.sprite.y),this.sprite=g,this.newSpriteSet$.next(),this.layerOverlaySprite=this.layerOverlaySprite?this.scene.add.sprite(0,0,this.sprite.texture):void 0,this.updateOverlaySprite(),this.resetAnimation(this.sprite),this.updateDepth()):(this.layerOverlaySprite=void 0,this.sprite=void 0)}getSprite(){return this.sprite}getLayerOverlaySprite(){return this.layerOverlaySprite}setContainer(g){var t;this.container=g,this.cachedContainerHeight=(t=g?.getBounds().height)!=null?t:0}getContainer(){return this.container}getOffsetX(){return this.customOffset.x}setOffsetX(g){this.customOffset.x=g}getOffsetY(){return this.customOffset.y}setOffsetY(g){this.customOffset.y=g}getWalkingAnimationMapping(){return this.walkingAnimationMapping}turnTowards(g){var t;this.geHeadless.isMoving(this.charData.id)||g!="none"&&(this.geHeadless.turnTowards(this.charData.id,g),(t=this.animation)==null||t.setStandingFrame(g))}getAnimation(){return this.animation}setAnimation(g){this.animation=g}update(g){this.updateGridChar()}getEngineOffset(){var g,t,i,x;if(!this.sprite)return _t.ZERO;let T=this.tilemap.getTileWidth()/2-Math.floor(((t=(g=this.sprite)==null?void 0:g.displayWidth)!=null?t:0)/2),E=-((x=(i=this.sprite)==null?void 0:i.displayHeight)!=null?x:0)+this.tilemap.getTileHeight();return new _t(T,E)}updatePixelPos(){let g=new _t(this.geHeadless.getPosition(this.charData.id)),t=this.geHeadless.getMovementProgress(this.charData.id)/1e3,i=this.tilemap.tilePosToPixelPos(g).add(this.getEngineOffset()).add(this.customOffset).add(Au(this.geHeadless.getFacingDirection(this.charData.id)).multiply(this.tilemap.getTileDistance(this.geHeadless.getFacingDirection(this.charData.id)).scalarMult(t))),x=this.getGameObj();x&&(x.x=Math.floor(i.x),x.y=Math.floor(i.y))}getGameObj(){return this.container||this.sprite}updateGridChar(){var g;if(this.updatePixelPos(),this.sprite&&this.geHeadless.isMoving(this.charData.id)){let t=this.geHeadless.getMovementProgress(this.charData.id)>lu/2;(g=this.getAnimation())==null||g.updateCharacterFrame(this.geHeadless.getFacingDirection(this.charData.id),t,Number(this.sprite.frame.name))}this.updateDepth()}resetAnimation(g){let t=new rT(this.walkingAnimationMapping,g.texture.source[0].width/g.width/rT.FRAMES_CHAR_ROW);this.setAnimation(t),t.frameChange().pipe(Ea(this.newSpriteSet$)).subscribe(i=>{g?.setFrame(i)}),t.setIsEnabled(this.walkingAnimationMapping!==void 0),t.setStandingFrame(this.geHeadless.getFacingDirection(this.charData.id))}updateOverlaySprite(){if(!this.layerOverlaySprite||!this.sprite)return;this.layerOverlaySprite.scale=this.sprite.scale;let g=this.tilemap.getTileHeight()/this.layerOverlaySprite.scale;this.layerOverlaySprite.setCrop(0,0,this.layerOverlaySprite.displayWidth,this.sprite.height-g),this.layerOverlaySprite.setOrigin(0,0)}updateDepth(){if(!this.getGameObj())return;let g=new _t(this.geHeadless.getPosition(this.charData.id)),t=this.geHeadless.getCharLayer(this.charData.id);this.container?this.setContainerDepth(this.container,{position:g,layer:t}):this.sprite&&this.setSpriteDepth(this.sprite,{position:g,layer:t});let i=this.getLayerOverlaySprite();if(i){let x=new _t(mh(Pn({},g),{y:g.y-1}));this.setSpriteDepth(i,{position:x,layer:t})}}setSpriteDepth(g,t){g.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(t))+this.getPaddedPixelDepthSprite(g))}setContainerDepth(g,t){g.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(t))+this.getPaddedPixelDepthContainer(g))}getPaddedPixelDepthContainer(g){return Fy.shiftPad(g.y+this.cachedContainerHeight,Dy.Z_INDEX_PADDING)}getPaddedPixelDepthSprite(g){return Fy.shiftPad(g.y+g.displayHeight,Dy.Z_INDEX_PADDING)}getTransitionLayer(g){if(g.layer)return this.geHeadless.getTransition(g.position,g.layer)||g.layer}},cO=(g=>(g.DONT_BLOCK="DONT_BLOCK",g.BLOCK_TWO_TILES="BLOCK_TWO_TILES",g.BLOCK_ONE_TILE_AHEAD="BLOCK_ONE_TILE_AHEAD",g.BLOCK_ONE_TILE_BEHIND="BLOCK_ONE_TILE_BEHIND",g))(cO||{}),bC=(g=>(g.STOP="STOP",g.CLOSEST_REACHABLE="CLOSEST_REACHABLE",g.RETRY="RETRY",g.ALTERNATIVE_TARGETS="ALTERNATIVE_TARGETS",g))(bC||{}),dO=class{distance(g,t){return no.manhattanDistance(g,t)}direction(g,t){if(no.equal(g,t))return"none";let i=g.clone().subtract(t);return Math.abs(i.x)>Math.abs(i.y)?i.x>0?"left":"right":i.y>0?"up":"down"}neighbors(g){return[new _t(g.x,g.y+1),new _t(g.x+1,g.y),new _t(g.x-1,g.y),new _t(g.x,g.y-1)]}getDirections(){return["up","right","down","left"]}},pO=class{distance(g,t){return no.chebyshevDistance(g,t)}neighbors(g){let t=[new _t(g.x,g.y+1),new _t(g.x+1,g.y),new _t(g.x-1,g.y),new _t(g.x,g.y-1)],i=[new _t(g.x+1,g.y+1),new _t(g.x+1,g.y-1),new _t(g.x-1,g.y+1),new _t(g.x-1,g.y-1)];return[...t,...i]}direction(g,t){return t.x>g.x?t.y>g.y?"down-right":t.yg.y?"down-left":t.yg.y?"down":"none"}getDirections(){return["up","right","down","left","down-left","down-right","up-right","up-left"]}},Sd=class{static create(g){switch(g){case 4:return new dO;case 8:return new pO}}},sT=class{constructor(g,t,i){this.backoffMs=g,this.maxRetries=t,this.onFinished=i,this.retries=0,this.elapsed=0}retry(g,t){this.shouldRetry()?(this.elapsed+=g,this.elapsed>=this.backoffMs&&(this.elapsed=0,this.retries++,t())):this.onFinished()}reset(){this.retries=0,this.elapsed=0}getMaxRetries(){return this.maxRetries}getBackoffMs(){return this.backoffMs}shouldRetry(){return this.maxRetries===-1||this.retries(g.WAIT="WAIT",g.RETRY="RETRY",g.STOP="STOP",g))(LC||{}),tg=class{constructor(g,{shortestPathAlgorithm:t="BFS",pathWidth:i=1,pathHeight:x=1,numberOfDirections:T=4,isPositionAllowed:E=(u,f)=>!0,collisionGroups:s=[],ignoredChars:y=[],ignoreTiles:e=!1,ignoreMapBounds:r=!1,ignoreBlockedTarget:p=!1,maxPathLength:h=1/0,ignoreLayers:a=!1,considerCosts:l=!1,calculateClosestToTarget:n=!0}={}){this.gridTilemap=g,this.options={shortestPathAlgorithm:t,pathWidth:i,pathHeight:x,numberOfDirections:T,isPositionAllowed:E,collisionGroups:s,ignoredChars:y,ignoreTiles:e,ignoreMapBounds:r,ignoreBlockedTarget:p,maxPathLength:h,ignoreLayers:a,considerCosts:l,calculateClosestToTarget:n},this.ignoredCharsSet=new Set(y)}findShortestPath(g,t){this.options.ignoreLayers&&(this.gridTilemap.fixCacheLayer(g.layer),t.layer=g.layer);let i=this.findShortestPathImpl(g,t);return this.gridTilemap.unfixCacheLayers(),i}getNeighbors(g,t){var i;return Sd.create((i=this.options.numberOfDirections)!=null?i:4).neighbors(g.position).map(x=>{let T=g.layer;return this.options.ignoreLayers||(T=this.gridTilemap.getTransition(x,g.layer)),{position:x,layer:T||g.layer}}).filter(x=>!this.isBlocking(g,x)||this.options.ignoreBlockedTarget&&Ri.equal(x,t))}getTransition(g,t){if(!this.options.ignoreLayers)return this.gridTilemap.getTransition(g,t)}getCosts(g,t){if(!this.options.considerCosts)return 1;let i=Ca(t.position,g);return this.gridTilemap.getTileCosts(t,i)}isBlocking(g,t){return!(this.options.ignoreMapBounds||this.gridTilemap.isInRange(t.position))||!this.options.isPositionAllowed(t.position,t.layer)||!this.options.ignoreTiles&&this.hasBlockingTileFrom(g,t,this.options.pathWidth,this.options.pathHeight,this.options.ignoreMapBounds,this.gridTilemap)?!0:this.hasBlockingCharFrom(g,t,this.options.pathWidth,this.options.pathHeight,this.options.collisionGroups,this.ignoredCharsSet,this.gridTilemap)}distance(g,t){return(this.options.numberOfDirections===4?no.manhattanDistance:no.chebyshevDistance)(g,t)}getTilePosInDir(g,t){return this.options.ignoreLayers?{position:g.position.add(Au(this.gridTilemap.toMapDirection(t))),layer:g.layer}:this.gridTilemap.getTilePosInDirection(g,t)}getReverseNeighbors(g,t){var i;let x=Sd.create((i=this.options.numberOfDirections)!=null?i:4).neighbors(g.position),T;if(!this.options.ignoreLayers){let E=this.gridTilemap.getReverseTransitions(g.position,g.layer);T=E?[...E]:void 0}return x.map(E=>T?T.map(s=>({position:E,layer:s||g.layer})):[{position:E,layer:g.layer}]).flat().filter(E=>!this.isBlocking(E,g)||this.options.ignoreBlockedTarget&&Ri.equal(g,t))}hasBlockingCharFrom(g,t,i,x,T,E,s){if(i===1&&x===1)return s.hasBlockingChar(t.position,t.layer,T,E);let y=r=>s.hasBlockingChar(r,t.layer,T,E),e=Ca(g.position,t.position);return this.isBlockingMultiTile(g,e,i,x,y)}hasBlockingTileFrom(g,t,i,x,T,E){if(i===1&&x===1)return E.hasBlockingTile(t.position,t.layer,Ca(t.position,g.position),T);let s=Ca(g.position,t.position),y=e=>E.hasBlockingTile(e,t.layer,s,T);return this.isBlockingMultiTile(g,s,i,x,y)}isBlockingMultiTile(g,t,i,x,T){let E={src:new _t(g.position.x+i,g.position.y),dest:new _t(g.position.x+i,g.position.y+x-1)},s={src:new _t(g.position.x-1,g.position.y),dest:new _t(g.position.x-1,g.position.y+x-1)},y={src:new _t(g.position.x,g.position.y-1),dest:new _t(g.position.x+i-1,g.position.y-1)},e={src:new _t(g.position.x,g.position.y+x),dest:new _t(g.position.x+i-1,g.position.y+x)};switch(t){case"right":return this.checkLine(E,T);case"left":return this.checkLine(s,T);case"up":return this.checkLine(y,T);case"down":return this.checkLine(e,T);case"up-left":return this.checkLine({src:y.src,dest:new _t(y.dest.x-1,y.dest.y)},T)||this.checkLine({src:new _t(s.src.x,s.src.y-1),dest:new _t(s.dest.x,s.dest.y-1)},T);case"up-right":return this.checkLine({src:new _t(y.src.x+1,y.src.y),dest:y.dest},T)||this.checkLine({src:new _t(E.src.x,E.src.y-1),dest:new _t(E.dest.x,E.dest.y-1)},T);case"down-left":return this.checkLine({src:new _t(s.src.x,s.src.y+1),dest:new _t(s.dest.x,s.dest.y+1)},T)||this.checkLine({src:e.src,dest:new _t(e.dest.x-1,e.dest.y)},T);case"down-right":return this.checkLine({src:new _t(e.src.x+1,e.src.y),dest:e.dest},T)||this.checkLine({src:new _t(E.src.x,E.src.y+1),dest:new _t(E.dest.x,E.dest.y+1)},T)}return!1}checkLine(g,t){for(let i=g.src.x;i<=g.dest.x;i++)for(let x=g.src.y;x<=g.dest.y;x++)if(t(new _t(i,x)))return!0;return!1}},vO=YM(kx(),1),mO=class extends tg{findShortestPathImpl(g,t){let i=this.shortestPathBfs(g,t);return{path:this.returnPath(i.previous,g,t),closestToTarget:i.closestToTarget,steps:i.steps,maxPathLengthReached:i.maxPathLengthReached,algorithmUsed:"A_STAR"}}shortestPathBfs(g,t){let i=new Map,x=new Map,T=new Map,E=new vO.MinFibonacciHeap((r,p)=>Yc(T,r)-Yc(T,p)),s=g,y=this.distance(g.position,t.position),e=0;for(E.push(g),x.set(Ri.toString(g),0),T.set(Ri.toString(g),this.distance(g.position,t.position));E.size>0;){let r=E.pop();if(!r)break;e++;let p=this.distance(r.position,t.position);if(pthis.options.maxPathLength)return{previous:new Map,closestToTarget:s,steps:e,maxPathLengthReached:!0};for(let h of this.getNeighbors(r,t)){let a=Yc(x,r)+this.getCosts(r.position,h),l=Ri.toString(h);(!x.has(l)||a0;){let e=T.dequeue();if(y++,!e)break;let{node:r,dist:p}=e;if(p>this.options.maxPathLength)return{previous:new Map,closestToTarget:E,steps:y,maxPathLengthReached:!0};let h=this.distance(r.position,t.position);if(hthis.lastDist)}step(g,t,i){var x;this.lastDist=i;for(let T of g){let E=Ri.toString(T);if(!this.visited.has(E)){this.previous.set(E,t),this.queue.enqueue({node:T,dist:i+1}),this.visited.set(E,i+1);let s=(x=this.otherBfs)==null?void 0:x.visited.get(E);s!==void 0&&s0,T.queue.size()>0);){let e=x.queue.dequeue();if(!e)break;let{node:r,dist:p}=e;if(p+1+(((i=T.queue.peek())==null?void 0:i.dist)||0)>this.options.maxPathLength)return{previous:x.previous,previous2:T.previous,closestToTarget:this.maybeClosestToTarget(s),steps:E,maxPathLengthReached:!0};let h=this.distance(r.position,t.position);if(hkc(this.f,T)-kc(this.f,E)),this.openSet.push(g);let x=Ri.toString(g);for(this.g.set(x,0),this.f.set(x,this.distance(g.position,t.position)),this.maxFrontierSize=Math.max(this.maxFrontierSize,this.openSet.size);this.openSet.size>0;){let T=this.openSet.pop();if(!T)break;if(this.steps++,Ri.equal(T,t))return{previous:i,closestToTarget:t,steps:this.steps,maxPathLengthReached:!1};if(kc(this.g,T)+1>this.options.maxPathLength)return{previous:new Map,closestToTarget:this.closestToTarget,steps:this.steps,maxPathLengthReached:!0};this.updateClosestToTarget(T,t);for(let E of this.getNeighborsInternal(T,i.get(Ri.toString(T)),t)){let s=Ri.toString(E.p),y=kc(this.g,T)+E.dist;(!this.g.has(s)||y({p:E,dist:1}));let x=this.prune(t,g).filter(E=>!this.isBlockingIgnoreTarget(g,E,i)).map(E=>{let s=this.getTransition(E.position,g.layer);return{position:E.position,layer:s||g.layer}}),T=[];for(let E of x)if(this.isHorizontal(g.position,E.position))T.push({p:E,dist:1});else{let s=this.jump(g,E,i,1,Ca(g.position,E.position));s&&T.push(s)}return T}isBlockingIgnoreTarget(g,t,i){return this.isBlocking(g,t)&&!(this.options.ignoreBlockedTarget&&Ri.equal(t,i))}jump(g,t,i,x,T){if(!this.isBlockingIgnoreTarget(g,t,i))return Ri.equal(t,i)?{p:t,dist:x}:x>=this.maxJumpSize?{p:t,dist:x}:this.getTransition(t.position,g.layer)!==void 0?{p:t,dist:x}:this.hasForced(g,t)?{p:t,dist:x}:(this.updateClosestToTarget(t,i),this.jump(t,this.getTilePosInDir(t,T),i,x+1,T))}isHorizontal(g,t){return g.y===t.y}getForced(g,t,i,x,T,E){let s=[],y=g;return(this.blockOrTrans(y,i)||this.blockOrTrans(i,x))&&this.addIfNotBlocked(s,t,x),(this.blockOrTrans(y,T)||this.blockOrTrans(T,E))&&this.addIfNotBlocked(s,t,E),s}hasForced(g,t){let{topLeft:i,downLeft:x,top:T,bottom:E}=this.normalizedPositions(g,t);return!!((this.blockOrTrans(g,x)||this.blockOrTrans(x,E))&&!this.blockOrTrans(t,E)||(this.blockOrTrans(g,i)||this.blockOrTrans(i,T))&&!this.blockOrTrans(t,T))}prune(g,t){let{right:i,top:x,bottom:T,downLeft:E,topLeft:s}=this.normalizedPositions(g,t);return this.isHorizontal(g.position,t.position)?[i,x,T]:[i,...this.getForced(g,t,E,T,s,x)]}normalizedPositions(g,t){return g.position.xt.position.x?{topLeft:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},downLeft:{position:new _t(t.position.x+1,t.position.y-1),layer:t.layer},top:{position:new _t(t.position.x,t.position.y+1),layer:t.layer},bottom:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},right:{position:new _t(t.position.x-1,t.position.y),layer:t.layer}}:g.position.y1?this.fillPath(T,E,x):x.push(E),T=E}return x.reverse()}fillPath(g,t,i){let x=g;do{let T=Ca(x.position,t.position);x=this.getTilePosInDir(x,T),i.push(x)}while(!no.equal(x.position,t.position))}};function kc(g,t){var i;return(i=g.get(Ri.toString(t)))!=null?i:Number.MAX_VALUE}var yO=class{constructor(g,t,i,x={}){this.character=g,this.gridTilemap=t,this.charToFollow=i;let T={distance:0,noPathFoundStrategy:"STOP",maxPathLength:1/0,shortestPathAlgorithm:"BIDIRECTIONAL_SEARCH",ignoreLayers:!1,considerCosts:x.considerCosts||!1,facingDirection:"none"};this.options=Pn(Pn({},T),x),this.options.considerCosts&&this.options.shortestPathAlgorithm!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${this.options.shortestPathAlgorithm}'. It can only be used with A* algorithm.`),this.options.shortestPathAlgorithm==="JPS"&&(this.character.getTileWidth()>1||this.character.getTileHeight()>1)&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.character=g,this.updateTarget(this.charToFollow.getTilePos().position,this.charToFollow.getTilePos().layer),this.charToFollow.positionChangeStarted().pipe(Ea(this.character.autoMovementSet().pipe(gh(E=>E!==this),rc(1)))).subscribe(({enterTile:E,enterLayer:s})=>{this.updateTarget(E,s)})}update(g){var t;(t=this.targetMovement)==null||t.update(g)}getInfo(){return{type:"Follow",config:{charToFollow:this.charToFollow.getId(),distance:this.options.distance,noPathFoundStrategy:this.options.noPathFoundStrategy,maxPathLength:this.options.maxPathLength,ignoreLayers:this.options.ignoreLayers,facingDirection:this.options.facingDirection,shortestPathAlgorithm:this.options.shortestPathAlgorithm}}}getFacingPos(){let g=gm[this.options.facingDirection]+gm[this.charToFollow.getFacingDirection()],t=tC("up",g),i={x:this.charToFollow.getTilePos().position.x,y:this.charToFollow.getTilePos().position.y};return t==="right"?i.x+=this.charToFollow.getTileWidth()-1:t==="down"?i.y+=this.charToFollow.getTileWidth()-1:t==="down-left"?i.y+=this.charToFollow.getTileWidth()-1:t==="down-right"?(i.y+=this.charToFollow.getTileWidth()-1,i.x+=this.charToFollow.getTileWidth()-1):t==="up-right"&&(i.x+=this.charToFollow.getTileWidth()-1),this.gridTilemap.getTilePosInDirection({position:new _t(i),layer:this.charToFollow.getTilePos().layer},t).position}updateTarget(g,t){let i=this.options.facingDirection!=="none"&&this.options.distance===0;i&&(g=this.getFacingPos()),this.targetMovement=new UC(this.character,this.gridTilemap,{position:new _t(g),layer:t},{distance:i?0:this.options.distance+1,config:{algorithm:this.options.shortestPathAlgorithm,noPathFoundStrategy:this.options.noPathFoundStrategy,maxPathLength:this.options.maxPathLength,ignoreLayers:this.options.ignoreLayers,considerCosts:this.options.considerCosts,ignoredChars:[this.charToFollow.getId()]}})}},uT=class{static getRandomInt(g){return Math.floor(Math.random()*Math.floor(g))}},xO=class{constructor(g,t=0,i=-1){this.character=g,this.delay=t,this.radius=i,this.stepSize=0,this.delayLeft=this.delay,this.initialRow=g.getNextTilePos().position.y,this.initialCol=g.getNextTilePos().position.x,this.randomizeStepSize(),this.stepsWalked=0,this.currentMovementDirection="none",this.character.positionChangeStarted().pipe(Ea(this.character.autoMovementSet().pipe(gh(x=>x!==this),rc(1)))).subscribe(()=>{this.stepsWalked++}),this.distanceUtils=Sd.create(g.getNumberOfDirections())}update(g){if(this.shouldContinueWalkingCurrentDirection())this.character.move(this.currentMovementDirection);else if(this.delayLeft-=g,this.delayLeft<=0){this.delayLeft=this.delay;let t=this.getFreeRandomDirection();this.stepsWalked=0,this.character.move(t),this.currentMovementDirection=t,this.randomizeStepSize()}}getInfo(){return{type:"Random",config:{delay:this.delay,radius:this.radius}}}shouldContinueWalkingCurrentDirection(){return this.stepsWalked!this.character.isBlockingDirection(g)).filter(g=>this.isWithinRadius(g))}isWithinRadius(g){return this.radius==-1?!0:this.getDist(g)<=this.radius}getDist(g){return this.distanceUtils.distance(this.character.getNextTilePos().position.add(Au(g)),new _t(this.initialCol,this.initialRow))}getFreeRandomDirection(){let g=this.getFreeDirections();return g.length==0?"none":g[uT.getRandomInt(g.length)]}randomizeStepSize(){this.stepSize=uT.getRandomInt(this.radius)+1}};function SO(g,t){return g.filter(i=>{var x,T,E,s,y,e;return(x=t.labels)!=null&&x.withAllLabels?(T=t.labels)==null?void 0:T.withAllLabels.every(r=>i.hasLabel(r)):(E=t.labels)!=null&&E.withOneOfLabels?(s=t.labels)==null?void 0:s.withOneOfLabels.some(r=>i.hasLabel(r)):(y=t.labels)!=null&&y.withNoneLabels?!((e=t.labels)!=null&&e.withNoneLabels.some(r=>i.hasLabel(r))):!0})}var DC="2.44.6",TO=class{constructor(g,t){this.collistionStrategy=g,this.collisionGroupRelation=t,this.tilePosToCharacters=new EO,this.charRemoved$=new Nn}isCharBlockingAt(g,t,i,x=new Set,T=new Set){if(i.length===0)return!1;let E=this.tilePosToCharacters.get(g,t);return!!(E&&E.size>0&&[...E].filter(s=>!x.has(s.getId())).filter(s=>!this.doIntersect(s.getCollisionGroups(),T)).some(s=>i.some(y=>s.getCollisionGroups().some(e=>this.collidesWith(y,e)))))}doIntersect(g,t){for(let i of g)if(t.has(i))return!0;return!1}collidesWith(g,t){return this.collisionGroupRelation?(this.collisionGroupRelation.get(g)||new Set).has(t):g===t}getCharactersAt(g,t){return this.tilePosToCharacters.get(g,t)||new Set}addCharacter(g){this.addTilePositions(g.getTilePos(),g),this.addTilePositions(g.getNextTilePos(),g),this.addPositionChangeSub(g),this.addPositionChangeFinishedSub(g),this.addTilePosSetSub(g)}removeCharacter(g){let t=g.getId();this.charRemoved$.next(t),this.deleteTilePositions(g.getTilePos(),g),this.deleteTilePositions(g.getNextTilePos(),g)}add(g,t,i){let x=this.tilePosToCharacters.get(g,t);x||this.tilePosToCharacters.set(g,t,new Set([i])),x?.add(i)}addTilePosSetSub(g){g.tilePositionSet().pipe(Ea(this.charRemoved(g.getId()))).subscribe(t=>{this.deleteTilePositions(g.getNextTilePos(),g),this.addTilePositions(t,g)})}charRemoved(g){var t;return(t=this.charRemoved$)==null?void 0:t.pipe(rc(1),gh(i=>i==g))}addPositionChangeSub(g){g.positionChangeStarted().pipe(Ea(this.charRemoved(g.getId())),this.posChangeToLayerPos()).subscribe(t=>{this.collistionStrategy==="BLOCK_ONE_TILE_AHEAD"&&this.deleteTilePositions(t.exit,g),this.addTilePositions(t.enter,g)})}addPositionChangeFinishedSub(g){g.positionChangeFinished().pipe(Ea(this.charRemoved(g.getId())),this.posChangeToLayerPos()).subscribe(t=>{this.deleteTilePositions(t.exit,g),this.addTilePositions(t.enter,g)})}addTilePositions(g,t){this.forEachCharTile(g,t,(i,x)=>{this.add(new _t(i,x),g.layer,t)})}deleteTilePositions(g,t){this.forEachCharTile(g,t,(i,x)=>{var T;(T=this.tilePosToCharacters.get(new _t(i,x),g.layer))==null||T.delete(t)})}forEachCharTile(g,t,i){let x=g.position;for(let T=x.x;T({enter:{position:new _t(g.enterTile),layer:g.enterLayer},exit:{position:new _t(g.exitTile),layer:g.exitLayer}})))}posToString(g,t){return`${g.x}#${g.y}#${t}`}},EO=class{constructor(){this.memo=new Map}set(g,t,i){let x=this.memo.get(g.x);x||(x=new Map,this.memo.set(g.x,x));let T=x.get(g.y);T||(T=new Map,x.set(g.y,T)),T.set(t,i)}get(g,t){let i=this.memo.get(g.x);if(!i)return;let x=i.get(g.y);if(x)return x.get(t)}},_x=class{constructor(g,t,i,x){this.x=g,this.y=t,this.width=i,this.height=x}getX(){return this.x}getY(){return this.y}getWidth(){return this.width}getHeight(){return this.height}isInRange(g){return g.x>=this.x&&g.x=this.y&&g.yi.isCharLayer());for(let i of[...t,void 0]){let x=this.tileCollisionCache.get(i?.getName());if(x===void 0){x=new Array(this.tilemap.getWidth());for(let T=0;T>t&1)==1}var cT="ge_cost",IC=class NC{constructor(t,i,x,T=void 0,E=!1){this.tilemap=t,this.collisionTilePropertyName=i,this.useTileCollisionCache=E,this.characters=new Map,this.transitions=new Map,this.reverseTransitions=new Map,this.collidesPropNames=new Map,this.tileCostPropNames=new Map,this.collisionRelevantLayersFrameCache=new Map,this.charBlockCache=new TO(x,T);for(let s of Jx())this.collidesPropNames.set(s,NC.ONE_WAY_COLLIDE_PROP_PREFIX+s),this.tileCostPropNames.set(s,`${cT}_${s}`);this.useTileCollisionCache&&(this.tileCollisionCache=new CO(t,this),this.tileCollisionCache.rebuild())}fixCacheLayer(t){var i;(i=this.tileCollisionCache)==null||i.fixLayer(t)}unfixCacheLayers(){var t;(t=this.tileCollisionCache)==null||t.unfixLayers()}addCharacter(t){this.characters.set(t.getId(),t);let i=t.getNextTilePos().layer;i===void 0?t.setTilePosition(mh(Pn({},t.getNextTilePos()),{layer:this.getLowestCharLayer()})):this.getCharLayerNames().includes(i)||console.warn(`Char layer '${i}' of character '${t.getId()}' is unknown.`),this.charBlockCache.addCharacter(t)}removeCharacter(t){let i=this.characters.get(t);i&&(this.charBlockCache.removeCharacter(i),this.characters.delete(t))}getCharacters(){return[...this.characters.values()]}getCharactersAt(t,i){return this.charBlockCache.getCharactersAt(t,i)}rebuildTileCollisionCache(t){var i;(i=this.tileCollisionCache)==null||i.rebuild(t)}hasBlockingTileUncached(t,i,x,T){if(!T&&this.hasNoTileUncached(t,i))return!0;let E=this.getCollisionRelevantLayers(i);for(let s of E)if(this.isLayerBlockingAt(s.getName(),t,x))return!0;return!1}hasBlockingTile(t,i,x,T){var E;let s=(E=this.tileCollisionCache)==null?void 0:E.isBlockingFrom(t.x,t.y,i,x,T);return s!==void 0?s:this.hasBlockingTileUncached(t,i,x,T)}getTransition(t,i){let x=this.transitions.get(t.toString());if(x)return x.get(i)}getReverseTransitions(t,i){let x=this.reverseTransitions.get(t.toString());if(x)return x.get(i)}setTransition(t,i,x){var T,E,s,y,e;this.transitions.has(t.toString())||this.transitions.set(t.toString(),new Map),this.reverseTransitions.has(t.toString())||this.reverseTransitions.set(t.toString(),new Map),(T=this.transitions.get(t.toString()))==null||T.set(i,x),(E=this.reverseTransitions.get(t.toString()))!=null&&E.has(x)||(s=this.reverseTransitions.get(t.toString()))==null||s.set(x,new Set),(e=(y=this.reverseTransitions.get(t.toString()))==null?void 0:y.get(x))==null||e.add(i)}getTransitions(){return new Map([...this.transitions].map(([t,i])=>[t,new Map(i)]))}getTileCosts(t,i){let x=this.getCollisionRelevantLayers(t.layer),T=1;for(let E of x)T=Math.max(T,this.getTileCostsForLayer(mh(Pn({},t),{layer:E.getName()}),i));return T}getTileCostsForLayer(t,i){let x=this.tilemap.getTileAt(t.position.x,t.position.y,t.layer);return i&&x?.getProperty(this.tileCostPropNames.get(i)||"")||x?.getProperty(cT)||1}hasNoTileUncached(t,i){return!this.getCollisionRelevantLayers(i).some(x=>this.tilemap.hasTileAt(t.x,t.y,x.getName()))}hasNoTile(t,i){var x;let T=(x=this.tileCollisionCache)==null?void 0:x.hasTileAt(t.x,t.y,i);return T!==void 0?T:this.hasNoTileUncached(t,i)}hasBlockingChar(t,i,x,T=new Set,E=new Set){return this.charBlockCache.isCharBlockingAt(t,i,x,T,E)}isInRange(t){return new _x(0,0,this.tilemap.getWidth(),this.tilemap.getHeight()).isInRange(t)}toMapDirection(t){return this.isIsometric()?P4(t):t}fromMapDirection(t){return this.isIsometric()?tC(t):t}isIsometric(){return this.tilemap.getOrientation()==="isometric"}getTilePosInDirection(t,i){let x=t.position.add(Au(this.toMapDirection(i))),T=this.getTransition(x,t.layer)||t.layer;return{position:x,layer:T}}invalidateFrameCache(){this.collisionRelevantLayersFrameCache.clear()}isLayerBlockingAt(t,i,x){let T=this.tilemap.getTileAt(i.x,i.y,t);return T?!!(T.getProperty(this.collisionTilePropertyName)||x&&T.getProperty(this.collidesPropNames.get(x)||"")):!1}getCharLayerIndexes(){return this.tilemap.getLayers().map((t,i)=>({layer:t,index:i})).filter(({layer:t})=>t.isCharLayer()).map(({index:t})=>t)}findPrevAndCharLayer(t){let i=this.getCharLayerIndexes(),x=this.tilemap.getLayers(),T=i.findIndex(E=>x[E].getProperty(em)==t);return T==0?{prevIndex:-1,charLayerIndex:i[T]}:{prevIndex:i[T-1],charLayerIndex:i[T]}}getCollisionRelevantLayers(t){if(!t)return this.tilemap.getLayers();let i=this.collisionRelevantLayersFrameCache.get(t);if(i)return i;let{prevIndex:x,charLayerIndex:T}=this.findPrevAndCharLayer(t),E=this.tilemap.getLayers().slice(x+1,T+1);return this.collisionRelevantLayersFrameCache.set(t,E),E}getLowestCharLayer(){for(let t of this.tilemap.getLayers())if(t.isCharLayer())return t.getProperty(em)}getCharLayerNames(){return this.tilemap.getLayers().filter(t=>t.isCharLayer()).map(t=>t.getProperty(em)).filter(AO)}};IC.ONE_WAY_COLLIDE_PROP_PREFIX="ge_collide_";var wO=IC;function AO(g){return g!=null}var PO=(g=>(g.REMOVED="REMOVED",g.ADDED="ADDED",g))(PO||{}),RO=(g=>(g.WAIT="WAIT",g.SKIP="SKIP",g.STOP="STOP",g))(RO||{}),bO=class{constructor(g,t){this.character=g,this.tilemap=t,this.queue=new ym,this.finished$=new Nn,this.pathBlockedWaitElapsed=0,this.distanceUtils=Sd.create(g.getNumberOfDirections()),this.character.autoMovementSet().pipe(gh(i=>i!==this),rc(1)).subscribe(()=>{this.queue.size()>0&&this.finishMovementTerminated(),this.finished$.complete()})}update(g){(!this.character.isMoving()||this.character.willCrossTileBorderThisUpdate(g))&&this.queue.size()>0&&this.moveCharOnPath(g)}getInfo(){return{type:"Queue"}}enqueue(g,t={}){var i,x,T;let E={pathBlockedStrategy:(i=t.pathBlockedStrategy)!=null?i:"STOP",pathBlockedWaitTimeoutMs:t?.pathBlockedWaitTimeoutMs||-1,ignoreInvalidPositions:(x=t.ignoreInvalidPositions)!=null?x:!1,skipInvalidPositions:(T=t.skipInvalidPositions)!=null?T:!1};for(let s of g){let y={command:s,config:E};if(zf(s)){this.queue.enqueue(y);continue}let e=this.queue.peekEnd(),r=e?.command;if(r||(r=this.character.getNextTilePos()),zf(r)){this.queue.enqueue(y);continue}let p=this.distanceUtils.distance(r.position,s.position)===1;(!t.ignoreInvalidPositions||p)&&this.queue.enqueue(y)}}peekAll(){return this.queue.peekAll()}size(){return this.queue.size()}finished(){return this.finished$}clear(){this.queue.clear()}moveCharOnPath(g){let t=this.queue.peek();if(!t)return;let i=t.command,x=t.config;if(zf(i)&&(i=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),i)),x.skipInvalidPositions){if(i=this.getNextValidPosition(),!i){this.finishInvalidNextPos(i);return}}else if(!this.isNeighborPos(i)){this.finishInvalidNextPos(i);return}if(this.character.isBlockingDirection(Ca(this.character.getNextTilePos().position,i.position))){if(x.pathBlockedStrategy==="STOP")this.finishPathBlocked(i);else if(x.pathBlockedStrategy==="SKIP"){this.queue.dequeue(),this.moveCharOnPath(g);return}else x.pathBlockedStrategy==="WAIT"&&x.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=g,this.pathBlockedWaitElapsed>=x.pathBlockedWaitTimeoutMs&&this.finishBlockedWaitTimeout(i,x.pathBlockedWaitTimeoutMs));return}this.pathBlockedWaitElapsed=0,this.queue.dequeue(),this.character.move(this.getDir(this.character.getNextTilePos().position,i.position)),this.isLastMovement()&&this.finish("SUCCESS","",i)}getNextValidPosition(){for(var g;this.queue.size()>0;){let t=(g=this.queue.peek())==null?void 0:g.command;if(zf(t)&&(t=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),t)),t&&this.isNeighborPos(t))return t;this.queue.dequeue()}}isLastMovement(){return this.queue.size()===0}isNeighborPos(g){let t=this.distanceUtils.distance(this.character.getNextTilePos().position,g.position)===1,i=this.tilemap.getTransition(g.position,this.character.getNextTilePos().layer);if(this.character.getNextTilePos().layer!==g.layer)return t&&i===g.layer;let x=i!==void 0&&i!==g.layer;return t&&!x}finishMovementTerminated(){this.finish("MOVEMENT_TERMINATED","New automatic movement has been set to character.")}finishInvalidNextPos(g){g?this.finish("INVALID_NEXT_POS",`Position ${this.posToStr(g)} is not reachable from ${this.posToStr(this.character.getNextTilePos())}.`):this.finish("INVALID_NEXT_POS",`No enqueued position is reachable from ${this.posToStr(this.character.getNextTilePos())}.`)}finishPathBlocked(g){this.finish("PATH_BLOCKED",`Position ${this.posToStr(g)} is blocked.`)}finishBlockedWaitTimeout(g,t){this.finish("PATH_BLOCKED_WAIT_TIMEOUT",`Position ${this.posToStr(g)} is blocked and the wait timeout of ${t} ms has been exceeded.`)}finish(g,t="",i=this.character.getNextTilePos()){this.queue=new ym,this.finished$.next({position:i.position,result:g,description:t,layer:i.layer})}getDir(g,t){return this.tilemap.fromMapDirection(Ca(g,t))}posToStr(g){return`(${g.position.x}, ${g.position.y}, ${g.layer})`}},LO=class{constructor(g=!0){this.isCreatedInternal=!1,g&&console.log(`Using GridEngine v${DC}`)}getCharLayer(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getTilePos().layer}getTransition(g,t){var i;return this.initGuard(),(i=this.gridTilemap)==null?void 0:i.getTransition(new _t(g),t)}setTransition(g,t,i){var x;return this.initGuard(),(x=this.gridTilemap)==null?void 0:x.setTransition(new _t(g),t,i)}create(g,t){this.isCreatedInternal=!0,this.gridCharacters=new Map;let i=this.setConfigDefaults(t);this.config=i,this.movementStopped$=new Nn,this.movementStarted$=new Nn,this.directionChanged$=new Nn,this.positionChangeStarted$=new Nn,this.positionChangeFinished$=new Nn,this.queueMovementFinished$=new Nn,this.charRemoved$=new Nn,this.charAdded$=new Nn,this.gridTilemap=new wO(g,this.config.collisionTilePropertyName,this.config.characterCollisionStrategy,this.recordToMap(this.config.collisionGroupRelation),this.config.cacheTileCollisions),this.addCharacters()}recordToMap(g){return g?new Map(Object.entries(g).map(([t,i])=>[t,new Set(i)])):void 0}getPosition(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getTilePos().position}move(g,t){this.moveChar(g,t)}moveRandomly(g,t=0,i=-1){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(g);if(!T)throw this.createCharUnknownErr(g);let E=new xO(T,t,i);T.setMovement(E)}getMovement(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);let x=i.getMovement();return x?x.getInfo():{type:"None"}}moveTo(g,t,i){var x;let T=this.assembleMoveToConfig(i);this.initGuard();let E=(x=this.gridCharacters)==null?void 0:x.get(g);if(!E)throw this.createCharUnknownErr(g);if(!this.gridTilemap)throw this.createUninitializedErr();let s=new UC(E,this.gridTilemap,{position:new _t(t),layer:i?.targetLayer||E.getNextTilePos().layer},{distance:0,config:T});return E.setMovement(s),s.finishedObs().pipe(ud(y=>({charId:g,position:y.position,result:y.result,description:y.description,layer:y.layer})))}stopMovement(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);i.setMovement(void 0)}setSpeed(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.setSpeed(t)}getSpeed(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getSpeed()}collidesWithTiles(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.collidesWithTiles()}update(g,t){var i;if(this.isCreatedInternal&&this.gridCharacters)for(let[x,T]of this.gridCharacters)T.update(t);(i=this.gridTilemap)==null||i.invalidateFrameCache()}addCharacter(g){var t,i,x,T,E;if(!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let s={speed:g.speed||4,tilemap:this.gridTilemap,collidesWithTiles:!0,collisionGroups:["geDefault"],ignoreCollisionGroups:[],charLayer:g.charLayer,facingDirection:g.facingDirection,labels:g.labels,numberOfDirections:(t=g.numberOfDirections)!=null?t:this.config.numberOfDirections,tileWidth:g.tileWidth,tileHeight:g.tileHeight};typeof g.collides=="boolean"?g.collides===!1&&(s.collidesWithTiles=!1,s.collisionGroups=[]):g.collides!==void 0&&(g.collides.collidesWithTiles===!1&&(s.collidesWithTiles=!1),g.collides.collisionGroups&&(s.collisionGroups=g.collides.collisionGroups),g.collides.ignoreCollisionGroups&&(s.ignoreCollisionGroups=g.collides.ignoreCollisionGroups),s.ignoreMissingTiles=(x=(i=g.collides)==null?void 0:i.ignoreMissingTiles)!=null?x:!1);let y=new uO(g.id,s);g.startPosition&&y.setTilePosition({position:new _t(g.startPosition),layer:y.getTilePos().layer}),(T=this.gridCharacters)==null||T.set(g.id,y),this.gridTilemap.addCharacter(y);let e=y.getId();y.movementStopped().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var p;(p=this.movementStopped$)==null||p.next({charId:e,direction:r})}),y.movementStarted().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var p;(p=this.movementStarted$)==null||p.next({charId:e,direction:r})}),y.directionChanged().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var p;(p=this.directionChanged$)==null||p.next({charId:e,direction:r})}),y.positionChangeStarted().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var p;(p=this.positionChangeStarted$)==null||p.next(Pn({charId:e},r))}),y.positionChangeFinished().pipe(Ea(this.charRemoved(e))).subscribe(r=>{var p;(p=this.positionChangeFinished$)==null||p.next(Pn({charId:e},r))}),(E=this.charAdded$)==null||E.next(e)}hasCharacter(g){var t;return this.initGuard(),!!((t=this.gridCharacters)!=null&&t.has(g))}removeCharacter(g){var t,i,x,T;if(this.initGuard(),!((t=this.gridCharacters)!=null&&t.get(g)))throw this.createCharUnknownErr(g);(i=this.gridTilemap)==null||i.removeCharacter(g),(x=this.gridCharacters)==null||x.delete(g),(T=this.charRemoved$)==null||T.next(g)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters)for(let g of this.gridCharacters.keys())this.removeCharacter(g)}getAllCharacters(g){if(this.initGuard(),!this.gridCharacters)return[];let t=[...this.gridCharacters.values()];return(g?SO(t,g):t).map(i=>i.getId())}getLabels(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getLabels()}addLabels(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.addLabels(t)}removeLabels(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.removeLabels(t)}clearLabels(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);i.clearLabels()}follow(g,t,i,x){var T,E,s,y,e,r;let p;i===void 0?p={distance:0,closestPointIfBlocked:!1}:typeof i=="number"?(p={distance:i,closestPointIfBlocked:!1},x&&(p.closestPointIfBlocked=!0)):p=i,this.initGuard();let h=(T=this.gridCharacters)==null?void 0:T.get(g),a=(E=this.gridCharacters)==null?void 0:E.get(t);if(!h)throw this.createCharUnknownErr(g);if(!a)throw this.createCharUnknownErr(t);if(!this.gridTilemap)throw this.createUninitializedErr();let l=new yO(h,this.gridTilemap,a,{distance:(s=p.distance)!=null?s:0,noPathFoundStrategy:p.closestPointIfBlocked?"CLOSEST_REACHABLE":"STOP",maxPathLength:(y=p.maxPathLength)!=null?y:1/0,shortestPathAlgorithm:(e=p.algorithm)!=null?e:"BIDIRECTIONAL_SEARCH",ignoreLayers:!!p.ignoreLayers,facingDirection:(r=p.facingDirection)!=null?r:"none"});h.setMovement(l)}isMoving(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.isMoving()}getFacingDirection(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getFacingDirection()}getFacingPosition(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);let x=i.getFacingPosition();return{x:x.x,y:x.y}}turnTowards(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);return x.turnTowards(t)}getCharactersAt(g,t){if(this.initGuard(),!this.gridTilemap)return[];let i=this.gridTilemap.getCharactersAt(new _t(g),t);return Array.from(i).map(x=>x.getId())}setPosition(g,t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(g);if(!T)throw this.createCharUnknownErr(g);i||T.setTilePosition({position:new _t(t),layer:T.getTilePos().layer}),T.setTilePosition({position:new _t(t),layer:i})}isBlocked(g,t,i=["geDefault"]){var x,T;this.initGuard();let E=new _t(g);return!!((x=this.gridTilemap)!=null&&x.hasBlockingTile(E,t)||(T=this.gridTilemap)!=null&&T.hasBlockingChar(E,t,i))}isTileBlocked(g,t){var i;return this.initGuard(),!!((i=this.gridTilemap)!=null&&i.hasBlockingTile(new _t(g),t))}getCollisionGroups(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getCollisionGroups()||[]}setCollisionGroups(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.setCollisionGroups(t)}getIgnoreCollisionGroups(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getIgnoreCollisionGroups()||[]}setIgnoreCollisionGroups(g,t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.setIgnoreCollisionGroups(t)}getTilePosInDirection(g,t,i){if(!this.gridTilemap)throw this.createUninitializedErr();let x=this.gridTilemap.getTilePosInDirection({position:new _t(g),layer:t},i);return{position:x.position.toPosition(),charLayer:x.layer}}findShortestPath(g,t,i={}){if(!this.gridTilemap)throw this.createUninitializedErr();let x=i.shortestPathAlgorithm||"BFS";i.considerCosts&&x!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${x}'. It can only be used with A* algorithm.`);let T=i.pathWidth!==void 0&&i.pathWidth!==1,E=i.pathHeight!==void 0&&i.pathHeight!==1;(T||E)&&x==="JPS"&&console.warn("GridEngine: Pathfinding options 'pathWidth' and 'pathHeight' > 1 cannot be used with algorithm 'JPS'.");let s=new BC(this.gridTilemap).findShortestPath(Ri.toInternal(g),Ri.toInternal(t),mh(Pn({},i),{shortestPathAlgorithm:x}));return{path:s.path.map(Ri.fromInternal),closestToTarget:s.closestToTarget?Ri.fromInternal(s.closestToTarget):void 0,reachedMaxPathLength:!1,steps:s.steps}}steppedOn(g,t,i){return this.positionChangeFinished().pipe(gh(x=>g.includes(x.charId)&&t.some(T=>T.x===x.enterTile.x&&T.y===x.enterTile.y)&&(i===void 0||i.includes(x.enterLayer))))}characterShifted(){if(!this.charAdded$||!this.charRemoved$)throw this.createUninitializedErr();return this.charAdded$.pipe(ud(g=>({charId:g,action:"ADDED"})),hO(this.charRemoved$.pipe(ud(g=>({charId:g,action:"REMOVED"})))))}movementStarted(){if(!this.movementStarted$)throw this.createUninitializedErr();return this.movementStarted$}movementStopped(){if(!this.movementStopped$)throw this.createUninitializedErr();return this.movementStopped$}directionChanged(){if(!this.directionChanged$)throw this.createUninitializedErr();return this.directionChanged$}positionChangeStarted(){if(!this.positionChangeStarted$)throw this.createUninitializedErr();return this.positionChangeStarted$}positionChangeFinished(){if(!this.positionChangeFinished$)throw this.createUninitializedErr();return this.positionChangeFinished$}getMovementProgress(g){var t;this.initGuard();let i=(t=this.gridCharacters)==null?void 0:t.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getMovementProgress()}rebuildTileCollisionCache(g,t,i,x){var T;(T=this.gridTilemap)==null||T.rebuildTileCollisionCache(new _x(g,t,i,x))}addQueueMovements(g,t,i){var x,T;this.initGuard();let E=(x=this.gridCharacters)==null?void 0:x.get(g);if(!E)throw this.createCharUnknownErr(g);if(!this.gridTilemap)throw this.createUninitializedErr();let s;((T=E?.getMovement())==null?void 0:T.getInfo().type)==="Queue"?s=E.getMovement():(s=new bO(E,this.gridTilemap),E.setMovement(s),s.finished().pipe(Ea(sO(this.charRemoved(g),E.autoMovementSet()))).subscribe(y=>{var e;(e=this.queueMovementFinished$)==null||e.next(Pn({charId:g},y))})),s.enqueue(t.map(y=>zf(y)?y:{position:new _t(y.position),layer:y.charLayer}),i)}queueMovementFinished(){if(!this.queueMovementFinished$)throw this.createUninitializedErr();return this.queueMovementFinished$}getEnqueuedMovements(g){var t,i;this.initGuard();let x=(t=this.gridCharacters)==null?void 0:t.get(g);if(!x)throw this.createCharUnknownErr(g);return((i=x.getMovement())==null?void 0:i.getInfo().type)==="Queue"?x.getMovement().peekAll().map(T=>({command:zf(T.command)?T.command:Ri.fromInternal(T.command),config:T.config})):[]}clearEnqueuedMovements(g){var t,i;this.initGuard();let x=(t=this.gridCharacters)==null?void 0:t.get(g);if(!x)throw this.createCharUnknownErr(g);((i=x.getMovement())==null?void 0:i.getInfo().type)==="Queue"&&x.getMovement().clear()}getTileCost(g,t,i){var x,T;return this.initGuard(),(T=(x=this.gridTilemap)==null?void 0:x.getTileCosts({position:new _t(g),layer:t},i))!=null?T:1}getState(){let g=[];if(this.gridCharacters)for(let[t,i]of this.gridCharacters.entries())g.push({id:t,position:Ri.fromInternal(i.getTilePos()),facingDirection:i.getFacingDirection(),speed:i.getSpeed(),labels:i.getLabels(),movementProgress:i.getMovementProgress(),collisionConfig:{collisionGroups:i.getCollisionGroups(),ignoreCollisionGroups:i.getIgnoreCollisionGroups(),collidesWithTiles:i.collidesWithTiles(),ignoreMissingTiles:i.getIgnoreMissingTiles()}});return{characters:g}}setState(g){if(this.gridCharacters)for(let t of g.characters){let i=this.gridCharacters.get(t.id);if(i){let x=i.getTilePos();Ri.equal(x,Ri.toInternal(t.position))||i.setTilePosition(Ri.toInternal(t.position)),i.setSpeed(t.speed),i.turnTowards(t.facingDirection),t.collisionConfig.collisionGroups&&i.setCollisionGroups(t.collisionConfig.collisionGroups),t.collisionConfig.collidesWithTiles!==void 0&&i.setCollidesWithTiles(t.collisionConfig.collidesWithTiles),t.collisionConfig.ignoreMissingTiles!==void 0&&i.setIgnoreMissingTiles(t.collisionConfig.ignoreMissingTiles),i.setMovementProgress(t.movementProgress),i.clearLabels(),i.addLabels(t.labels)}}}charRemoved(g){var t;if(!this.charRemoved$)throw this.createUninitializedErr();return(t=this.charRemoved$)==null?void 0:t.pipe(rc(1),gh(i=>i==g))}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var g;(g=this.config)==null||g.characters.forEach(t=>this.addCharacter(t))}moveChar(g,t){var i,x,T;this.initGuard();let E=(i=this.gridCharacters)==null?void 0:i.get(g);if(!E)throw this.createCharUnknownErr(g);if(E.getNumberOfDirections()===4){if(!((x=this.gridTilemap)!=null&&x.isIsometric())&&hd(t)){console.warn(`GridEngine: Character '${g}' can't be moved '${t}' in 4 direction mode.`);return}else if((T=this.gridTilemap)!=null&&T.isIsometric()&&!hd(t)){console.warn(`GridEngine: Character '${g}' can't be moved '${t}' in 4 direction isometric mode.`);return}}E.move(t)}createCharUnknownErr(g){return new Error(`Character unknown: ${g}`)}assembleMoveToConfig(g={}){let t=mh(Pn({},g),{noPathFoundStrategy:"STOP",pathBlockedStrategy:"WAIT"});return g!=null&&g.noPathFoundStrategy&&(Object.values(bC).includes(g.noPathFoundStrategy)?t.noPathFoundStrategy=g.noPathFoundStrategy:console.warn(`GridEngine: Unknown NoPathFoundStrategy '${g.noPathFoundStrategy}'. Falling back to 'STOP'`)),g!=null&&g.pathBlockedStrategy&&(Object.values(LC).includes(g.pathBlockedStrategy)?t.pathBlockedStrategy=g.pathBlockedStrategy:console.warn(`GridEngine: Unknown PathBlockedStrategy '${g.pathBlockedStrategy}'. Falling back to 'WAIT'`)),t}setConfigDefaults(g){return Pn({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",cacheTileCollisions:!1},g)}},FO=class extends OC{constructor(g,t={}){super(g,t),this.jumpCache=new dT}findShortestPathImpl(g,t){return this.jumpCache=new dT,super.findShortestPathImpl(g,t)}getNeighborsInternal(g,t,i){if(!t||g.layer!==t.layer)return this.getNeighbors(g,i).map(E=>({p:E,dist:1}));let x=this.prune(t,g).map(E=>{let s=this.getTransition(E.position,g.layer);return{position:E.position,layer:s||g.layer}}),T=[];for(let E of x){let s=this.jump(g,E,i,1,Ca(g.position,E.position));s&&(s.dist=this.distance(g.position,s.p.position),T.push(s))}return T}getForced(g,t){let i=[],{topLeft:x,downLeft:T,top:E,bottom:s,topRight:y,downRight:e}=this.normalizedPositions(g,t),r=Ca(g.position,t.position);return hd(r)?(this.blockOrTrans(g,x)&&(this.addIfNotBlocked(i,t,E),this.addIfNotBlocked(i,t,y),this.blockOrTrans(T,x)&&this.addIfNotBlocked(i,t,x)),this.blockOrTrans(g,T)&&(this.addIfNotBlocked(i,t,s),this.addIfNotBlocked(i,t,e),this.blockOrTrans(x,T)&&this.addIfNotBlocked(i,t,T)),this.blockOrTrans(x,E)&&this.addIfNotBlocked(i,t,E),this.blockOrTrans(T,s)&&this.addIfNotBlocked(i,t,s),this.blockOrTrans(x,y)&&this.addIfNotBlocked(i,t,y),this.blockOrTrans(T,e)&&this.addIfNotBlocked(i,t,e)):((this.blockOrTrans(g,E)||this.blockOrTrans(E,y))&&this.addIfNotBlocked(i,t,y),(this.blockOrTrans(g,s)||this.blockOrTrans(s,e))&&this.addIfNotBlocked(i,t,e),this.blockOrTrans(g,x)&&this.blockOrTrans(g,E)&&(this.addIfNotBlocked(i,t,E),this.addIfNotBlocked(i,t,x)),this.blockOrTrans(g,T)&&this.blockOrTrans(g,s)&&(this.addIfNotBlocked(i,t,s),this.addIfNotBlocked(i,t,T)),this.blockOrTrans(x,E)&&this.blockOrTrans(g,E)&&this.addIfNotBlocked(i,t,E),this.blockOrTrans(T,s)&&this.blockOrTrans(g,s)&&this.addIfNotBlocked(i,t,s)),i}hasForced(g,t){let{topLeft:i,downLeft:x,top:T,bottom:E,topRight:s,downRight:y}=this.normalizedPositions(g,t),e=Ca(g.position,t.position);if(hd(e)){if(this.blockOrTrans(g,i)&&(!this.blockOrTrans(t,T)||!this.blockOrTrans(t,s)||this.blockOrTrans(x,i)&&!this.blockOrTrans(t,i))||this.blockOrTrans(g,x)&&(!this.blockOrTrans(t,E)||!this.blockOrTrans(t,y)||this.blockOrTrans(i,x)&&!this.blockOrTrans(t,x))||this.blockOrTrans(i,T)&&!this.blockOrTrans(t,T)||this.blockOrTrans(x,E)&&!this.blockOrTrans(t,E)||this.blockOrTrans(i,s)&&!this.blockOrTrans(t,s)||this.blockOrTrans(x,y)&&!this.blockOrTrans(t,y))return!0}else if((this.blockOrTrans(g,T)||this.blockOrTrans(T,s))&&!this.blockOrTrans(t,s)||(this.blockOrTrans(g,E)||this.blockOrTrans(E,y))&&!this.blockOrTrans(t,y)||this.blockOrTrans(g,i)&&this.blockOrTrans(g,T)&&(!this.blockOrTrans(t,T)||!this.blockOrTrans(t,i))||this.blockOrTrans(g,x)&&this.blockOrTrans(g,E)&&(!this.blockOrTrans(t,E)||!this.blockOrTrans(t,x))||this.blockOrTrans(i,T)&&this.blockOrTrans(g,T)&&!this.blockOrTrans(t,T)||this.blockOrTrans(x,E)&&this.blockOrTrans(g,E)&&!this.blockOrTrans(t,E))return!0;return!1}prune(g,t){let{top:i,right:x,topRight:T,downRight:E,bottom:s}=this.normalizedPositions(g,t),y=this.getForced(g,t),e=Ca(g.position,t.position);return hd(e)?[i,x,T,E,s,...y]:[x,...y]}jump(g,t,i,x,T){let E=this.jumpCache.get(g,t);if(E!==null)return E;if(this.isBlocking(g,t)&&!(Ri.equal(t,i)&&this.options.ignoreBlockedTarget)){this.jumpCache.set(g,t,void 0);return}if(Ri.equal(t,i))return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(x>=this.maxJumpSize)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.getTransition(t.position,g.layer)!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.hasForced(g,t))return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.updateClosestToTarget(t,i),T==="up-left"){if(this.jump(t,this.getTilePosInDir(t,"up"),i,x+1,"up")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"left"),i,x+1,"left")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}else if(T==="down-left"){if(this.jump(t,this.getTilePosInDir(t,"down"),i,x+1,"down")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"left"),i,x+1,"left")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}else if(T==="up-right"){if(this.jump(t,this.getTilePosInDir(t,"up"),i,x+1,"up")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"right"),i,x+1,"right")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}else if(T==="down-right"){if(this.jump(t,this.getTilePosInDir(t,"down"),i,x+1,"down")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0};if(this.jump(t,this.getTilePosInDir(t,"right"),i,x+1,"right")!==void 0)return this.jumpCache.set(g,t,{p:t,dist:0}),{p:t,dist:0}}let s=this.jump(t,this.getTilePosInDir(t,T),i,x+1,T);return this.jumpCache.set(g,t,s),s}normalizedPositions(g,t){return g.position.xt.position.x&&g.position.y===t.position.y?{topLeft:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},downLeft:{position:new _t(t.position.x+1,t.position.y-1),layer:t.layer},top:{position:new _t(t.position.x,t.position.y+1),layer:t.layer},bottom:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},right:{position:new _t(t.position.x-1,t.position.y),layer:t.layer},topRight:{position:new _t(t.position.x-1,t.position.y+1),layer:t.layer},downRight:{position:new _t(t.position.x-1,t.position.y-1),layer:t.layer}}:g.position.yt.position.y&&g.position.x===t.position.x?{topLeft:{position:new _t(t.position.x-1,t.position.y+1),layer:t.layer},downLeft:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},top:{position:new _t(t.position.x-1,t.position.y),layer:t.layer},bottom:{position:new _t(t.position.x+1,t.position.y),layer:t.layer},right:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},topRight:{position:new _t(t.position.x-1,t.position.y-1),layer:t.layer},downRight:{position:new _t(t.position.x+1,t.position.y-1),layer:t.layer}}:g.position.yt.position.x?{topLeft:{position:new _t(t.position.x+1,t.position.y),layer:t.layer},downLeft:{position:new _t(t.position.x,t.position.y-1),layer:t.layer},top:{position:new _t(t.position.x+1,t.position.y+1),layer:t.layer},bottom:{position:new _t(t.position.x-1,t.position.y-1),layer:t.layer},right:{position:new _t(t.position.x-1,t.position.y+1),layer:t.layer},topRight:{position:new _t(t.position.x,t.position.y+1),layer:t.layer},downRight:{position:new _t(t.position.x-1,t.position.y),layer:t.layer}}:g.position.y>t.position.y&&g.position.x(g.SUCCESS="SUCCESS",g.NO_PATH_FOUND_MAX_RETRIES_EXCEEDED="NO_PATH_FOUND_MAX_RETRIES_EXCEEDED",g.PATH_BLOCKED_MAX_RETRIES_EXCEEDED="PATH_BLOCKED_MAX_RETRIES_EXCEEDED",g.PATH_BLOCKED="PATH_BLOCKED",g.NO_PATH_FOUND="NO_PATH_FOUND",g.PATH_BLOCKED_WAIT_TIMEOUT="PATH_BLOCKED_WAIT_TIMEOUT",g.MOVEMENT_TERMINATED="MOVEMENT_TERMINATED",g.MAX_PATH_LENGTH_REACHED="MAX_PATH_LENGTH_REACHED",g))(DO||{}),UC=class{constructor(g,t,i,{config:x,ignoreBlockedTarget:T=!1,distance:E=0}={}){this.character=g,this.tilemap=t,this.targetPos=i,this.shortestPath=[],this.distOffset=0,this.posOnPath=0,this.stopped=!1,this.pathBlockedWaitElapsed=0,this.isPositionAllowed=()=>!0,this.shortestPathAlgorithm="BIDIRECTIONAL_SEARCH",this.maxPathLength=1/0,this.considerCosts=!1,this.ignoredChars=[],this.isBlocking=(e,r)=>e?new FC(this.tilemap,this.getPathfindingOptions()).isBlocking(this.character.getTilePos(),{position:e,layer:r}):!0;var s,y;this.shortestPathAlgorithm=(s=x?.algorithm)!=null?s:this.shortestPathAlgorithm,this.ignoreBlockedTarget=T,this.distance=E,this.noPathFoundStrategy=x?.noPathFoundStrategy||"STOP",this.pathBlockedStrategy=x?.pathBlockedStrategy||"WAIT",this.noPathFoundRetryable=new sT(x?.noPathFoundRetryBackoffMs||200,x?.noPathFoundMaxRetries||-1,()=>{this.stop("NO_PATH_FOUND_MAX_RETRIES_EXCEEDED")}),this.pathBlockedRetryable=new sT(x?.pathBlockedRetryBackoffMs||200,x?.pathBlockedMaxRetries||-1,()=>{this.stop("PATH_BLOCKED_MAX_RETRIES_EXCEEDED")}),x!=null&&x.isPositionAllowedFn&&(this.isPositionAllowed=x.isPositionAllowedFn),x!=null&&x.maxPathLength&&(this.maxPathLength=x.maxPathLength),this.alternativeTargets=x?.alternativeTargets,this.noPathFoundAlternativeTargetsFallbackStrategy=x?.noPathFoundAlternativeTargetsFallbackStrategy,x!=null&&x.considerCosts&&this.shortestPathAlgorithm!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${this.shortestPathAlgorithm}'. It can only be used with A* algorithm.`),this.shortestPathAlgorithm==="JPS"&&(this.character.getTileWidth()>1||this.character.getTileHeight()>1)&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.considerCosts=x?.considerCosts||!1,this.ignoreLayers=!!(x!=null&&x.ignoreLayers),this.distanceUtils=Sd.create(g.getNumberOfDirections()),this.pathBlockedWaitTimeoutMs=x?.pathBlockedWaitTimeoutMs||-1,this.ignoredChars=(y=x?.ignoredChars)!=null?y:[],this.finished$=new Nn,this.setCharacter(g)}setPathBlockedStrategy(g){this.pathBlockedStrategy=g}getPathBlockedStrategy(){return this.pathBlockedStrategy}setCharacter(g){this.character=g,this.noPathFoundRetryable.reset(),this.pathBlockedRetryable.reset(),this.pathBlockedWaitElapsed=0,this.calcShortestPath(),this.character.autoMovementSet().pipe(gh(t=>t!==this),rc(1)).subscribe(()=>{this.stop("MOVEMENT_TERMINATED")})}getPathfindingOptions(){return{shortestPathAlgorithm:this.shortestPathAlgorithm,pathWidth:this.character.getTileWidth(),pathHeight:this.character.getTileHeight(),numberOfDirections:this.character.getNumberOfDirections(),isPositionAllowed:this.isPositionAllowed,collisionGroups:this.character.getCollisionGroups(),ignoredChars:[this.character.getId(),...this.ignoredChars],ignoreTiles:!this.character.collidesWithTiles(),ignoreMapBounds:this.character.getIgnoreMissingTiles(),ignoreBlockedTarget:this.ignoreBlockedTarget,maxPathLength:this.maxPathLength,ignoreLayers:this.ignoreLayers,considerCosts:this.considerCosts,calculateClosestToTarget:!0}}update(g){var t,i,x,T;this.stopped||(this.noPathFound()&&(this.noPathFoundStrategy==="RETRY"?this.noPathFoundRetryable.retry(g,()=>this.calcShortestPath()):this.noPathFoundStrategy==="STOP"&&this.stop("NO_PATH_FOUND")),this.updatePosOnPath(),this.isBlocking((t=this.nextTileOnPath())==null?void 0:t.position,(i=this.character)==null?void 0:i.getNextTilePos().layer)?this.applyPathBlockedStrategy(g):this.pathBlockedWaitElapsed=0,this.hasArrived()?(this.stop("SUCCESS"),this.existsDistToTarget()&&this.turnTowardsTarget()):this.isBlocking((x=this.nextTileOnPath())==null?void 0:x.position,(T=this.character)==null?void 0:T.getNextTilePos().layer)||this.moveCharOnPath())}finishedObs(){return this.finished$}getInfo(){return{type:"Target",state:{pathAhead:this.shortestPath.slice(this.posOnPath).map(g=>Ri.fromInternal(g))},config:{algorithm:this.shortestPathAlgorithm,ignoreBlockedTarget:this.ignoreBlockedTarget,distance:this.distance,targetPos:Ri.fromInternal(this.targetPos),noPathFoundStrategy:this.noPathFoundStrategy,pathBlockedStrategy:this.pathBlockedStrategy,noPathFoundRetryBackoffMs:this.noPathFoundRetryable.getBackoffMs(),noPathFoundMaxRetries:this.noPathFoundRetryable.getMaxRetries()}}}resultToReason(g){switch(g){case"SUCCESS":return"Successfully arrived.";case"MOVEMENT_TERMINATED":return"Movement of character has been replaced before destination was reached.";case"PATH_BLOCKED":return"PathBlockedStrategy STOP: Path blocked.";case"NO_PATH_FOUND_MAX_RETRIES_EXCEEDED":return`NoPathFoundStrategy RETRY: Maximum retries of ${this.noPathFoundRetryable.getMaxRetries()} exceeded.`;case"NO_PATH_FOUND":return"NoPathFoundStrategy STOP: No path found.";case"PATH_BLOCKED_MAX_RETRIES_EXCEEDED":return`PathBlockedStrategy RETRY: Maximum retries of ${this.pathBlockedRetryable.getMaxRetries()} exceeded.`;case"PATH_BLOCKED_WAIT_TIMEOUT":return`PathBlockedStrategy WAIT: Wait timeout of ${this.pathBlockedWaitTimeoutMs}ms exceeded.`}}applyPathBlockedStrategy(g){this.pathBlockedStrategy==="RETRY"?this.pathBlockedRetryable.retry(g,()=>{let t=this.getShortestPath();t.path.length>0&&this.calcShortestPath(t)}):this.pathBlockedStrategy==="STOP"?this.stop("PATH_BLOCKED"):this.pathBlockedStrategy==="WAIT"&&this.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=g,this.pathBlockedWaitElapsed>=this.pathBlockedWaitTimeoutMs&&this.stop("PATH_BLOCKED_WAIT_TIMEOUT"))}moveCharOnPath(){let g=this.nextTileOnPath();if(!g)return;let t=this.getDir(this.character.getNextTilePos().position,g.position);this.character.move(t)}nextTileOnPath(){return this.shortestPath[this.posOnPath+1]}stop(g){this.finished$.next({position:this.character.getTilePos().position,result:g,description:this.resultToReason(g),layer:this.character.getTilePos().layer}),this.finished$.complete(),this.stopped=!0}turnTowardsTarget(){let g=this.shortestPath[this.posOnPath+1],t=this.getDir(this.character.getNextTilePos().position,g.position);this.character.turnTowards(t)}existsDistToTarget(){return this.posOnPath=this.shortestPath.length-1}updatePosOnPath(){let g=this.shortestPath[this.posOnPath];for(;this.posOnPath0)return{path:E,distOffset:s}}return this.noPathFoundStrategy=this.noPathFoundAlternativeTargetsFallbackStrategy||"STOP",this.getShortestPath()}}return{path:i,distOffset:0}}pathToAlternativeTarget(g,t){let i=t.findShortestPath(this.character.getNextTilePos(),g,this.getPathfindingOptions()).path,x=this.distanceUtils.distance(g.position,this.targetPos.position);return{path:i,distOffset:x}}getDir(g,t){return this.tilemap.fromMapDirection(this.distanceUtils.direction(g,t))}},IO=Object.create,zC=Object.defineProperty,NO=Object.getOwnPropertyDescriptor,BO=Object.getOwnPropertyNames,UO=Object.getPrototypeOf,zO=Object.prototype.hasOwnProperty,GO=(g,t)=>()=>(t||g((t={exports:{}}).exports,t),t.exports),VO=(g,t,i,x)=>{if(t&&typeof t=="object"||typeof t=="function")for(let T of BO(t))!zO.call(g,T)&&T!==i&&zC(g,T,{get:()=>t[T],enumerable:!(x=NO(t,T))||x.enumerable});return g},qx=(g,t,i)=>(i=g!=null?IO(UO(g)):{},VO(t||!g||!g.__esModule?zC(i,"default",{value:g,enumerable:!0}):i,g)),t1=GO((g,t)=>{(function(){var i,x="4.17.21",T=200,E="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",y="Invalid `variable` option passed into `_.template`",e="__lodash_hash_undefined__",r=500,p="__lodash_placeholder__",h=1,a=2,l=4,n=1,u=2,f=1,o=2,c=4,d=8,v=16,m=32,S=64,M=128,w=256,C=512,A=30,P="...",b=800,O=16,I=1,D=2,B=3,G=1/0,z=9007199254740991,X=17976931348623157e292,j=NaN,Q=4294967295,tt=Q-1,Y=Q>>>1,Z=[["ary",M],["bind",f],["bindKey",o],["curry",d],["curryRight",v],["flip",C],["partial",m],["partialRight",S],["rearg",w]],U="[object Arguments]",H="[object Array]",J="[object AsyncFunction]",_="[object Boolean]",q="[object Date]",at="[object DOMException]",ot="[object Error]",rt="[object Function]",gt="[object GeneratorFunction]",yt="[object Map]",Et="[object Number]",At="[object Null]",Pt="[object Object]",Vt="[object Promise]",dt="[object Proxy]",ut="[object RegExp]",Rt="[object Set]",Dt="[object String]",Ht="[object Symbol]",Bt="[object Undefined]",re="[object WeakMap]",le="[object WeakSet]",ge="[object ArrayBuffer]",xe="[object DataView]",Pe="[object Float32Array]",te="[object Float64Array]",Ge="[object Int8Array]",Oe="[object Int16Array]",Be="[object Int32Array]",Le="[object Uint8Array]",ne="[object Uint8ClampedArray]",je="[object Uint16Array]",si="[object Uint32Array]",Mi=/\b__p \+= '';/g,he=/\b(__p \+=) '' \+/g,Ti=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bt=/&(?:amp|lt|gt|quot|#39);/g,Ce=/[&<>"']/g,we=RegExp(bt.source),Ve=RegExp(Ce.source),Je=/<%-([\s\S]+?)%>/g,Gi=/<%([\s\S]+?)%>/g,Ii=/<%=([\s\S]+?)%>/g,nn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jn=/^\w*$/,Vi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pi=/[\\^$.*+?()[\]{}|]/g,Xi=RegExp(pi.source),Ra=/^\s+/,oa=/\s/,Us=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_r=/\{\n\/\* \[wrapped with (.+)\] \*/,lo=/,? & /,qr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zs=/[()=,{}\[\]\/\s]/,Ss=/\\(\\)?/g,ho=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ll=/\w*$/,Tt=/^[-+]0x[0-9a-f]+$/i,Zt=/^0b[01]+$/i,qt=/^\[object .+?Constructor\]$/,ie=/^0o[0-7]+$/i,ee=/^(?:0|[1-9]\d*)$/,Te=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ue=/($^)/,We=/['\n\r\u2028\u2029\\]/g,$e="\\ud800-\\udfff",ti="\\u0300-\\u036f",ni="\\ufe20-\\ufe2f",oi="\\u20d0-\\u20ff",$i=ti+ni+oi,un="\\u2700-\\u27bf",ji="a-z\\xdf-\\xf6\\xf8-\\xff",yn="\\xac\\xb1\\xd7\\xf7",ei="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Se="\\u2000-\\u206f",Br=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",gi="A-Z\\xc0-\\xd6\\xd8-\\xde",fn="\\ufe0e\\ufe0f",Ni=yn+ei+Se+Br,Vn="['’]",vn="["+$e+"]",Ki="["+Ni+"]",pr="["+$i+"]",Gs="\\d+",En="["+un+"]",la="["+ji+"]",$n="[^"+$e+Ni+Gs+un+ji+gi+"]",ba="\\ud83c[\\udffb-\\udfff]",Vs="(?:"+pr+"|"+ba+")",uo="[^"+$e+"]",La="(?:\\ud83c[\\udde6-\\uddff]){2}",fo="[\\ud800-\\udbff][\\udc00-\\udfff]",yi="["+gi+"]",Fa="\\u200d",Gu="(?:"+la+"|"+$n+")",cc="(?:"+yi+"|"+$n+")",sr="(?:"+Vn+"(?:d|ll|m|re|s|t|ve))?",Hs="(?:"+Vn+"(?:D|LL|M|RE|S|T|VE))?",Ws=Vs+"?",Xs="["+fn+"]?",Fl="(?:"+Fa+"(?:"+[uo,La,fo].join("|")+")"+Xs+Ws+")*",Bi="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ur=Xs+Ws+Fl,co="(?:"+[En,La,fo].join("|")+")"+Ur,Yo="(?:"+[uo+pr+"?",pr,La,fo,vn].join("|")+")",wh=RegExp(Vn,"g"),rn=RegExp(pr,"g"),ko=RegExp(ba+"(?="+ba+")|"+Yo+Ur,"g"),Ts=RegExp([yi+"?"+la+"+"+sr+"(?="+[Ki,yi,"$"].join("|")+")",cc+"+"+Hs+"(?="+[Ki,yi+Gu,"$"].join("|")+")",yi+"?"+Gu+"+"+sr,yi+"+"+Hs,Rn,Bi,Gs,co].join("|"),"g"),jo=RegExp("["+Fa+$e+$i+fn+"]"),Vu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,po=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Sr=-1,Zi={};Zi[Pe]=Zi[te]=Zi[Ge]=Zi[Oe]=Zi[Be]=Zi[Le]=Zi[ne]=Zi[je]=Zi[si]=!0,Zi[U]=Zi[H]=Zi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",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},zr={"&":"&","<":"<",">":">",'"':""","'":"'"},Ol={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ah={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ko=parseFloat,Dl=parseInt,Gr=typeof global=="object"&&global&&global.Object===Object&&global,dc=typeof self=="object"&&self&&self.Object===Object&&self,xn=Gr||dc||Function("return this")(),Ph=typeof g=="object"&&g&&!g.nodeType&&g,bn=Ph&&typeof t=="object"&&t&&!t.nodeType&&t,Oa=bn&&bn.exports===Ph,Da=Oa&&Gr.process,Mn=function(){try{var ct=bn&&bn.require&&bn.require("util").types;return ct||Da&&Da.binding&&Da.binding("util")}catch{}}(),Ia=Mn&&Mn.isArrayBuffer,Na=Mn&&Mn.isDate,Il=Mn&&Mn.isMap,Nl=Mn&&Mn.isRegExp,Ba=Mn&&Mn.isSet,Ys=Mn&&Mn.isTypedArray;function Qi(ct,St,vt){switch(vt.length){case 0:return ct.call(St);case 1:return ct.call(St,vt[0]);case 2:return ct.call(St,vt[0],vt[1]);case 3:return ct.call(St,vt[0],vt[1],vt[2])}return ct.apply(St,vt)}function Xr(ct,St,vt,Ft){for(var Lt=-1,Ut=ct==null?0:ct.length;++Lt-1}function ha(ct,St,vt){for(var Ft=-1,Lt=ct==null?0:ct.length;++Ft-1;);return vt}function mo(ct,St){for(var vt=ct.length;vt--&&es(St,ct[vt],0)>-1;);return vt}function ns(ct,St){for(var vt=ct.length,Ft=0;vt--;)ct[vt]===St&&++Ft;return Ft}var Hu=or(Es),Qo=or(zr);function rs(ct){return"\\"+Ah[ct]}function dn(ct,St){return ct==null?i:ct[St]}function ws(ct){return jo.test(ct)}function hr(ct){return Vu.test(ct)}function go(ct){for(var St,vt=[];!(St=ct.next()).done;)vt.push(St.value);return vt}function Va(ct){var St=-1,vt=Array(ct.size);return ct.forEach(function(Ft,Lt){vt[++St]=[Lt,Ft]}),vt}function Ha(ct,St){return function(vt){return ct(St(vt))}}function _n(ct,St){for(var vt=-1,Ft=ct.length,Lt=0,Ut=[];++vt-1}function Xu(R,N){var k=this.__data__,nt=Mo(k,R);return nt<0?(++this.size,k.push([R,N])):k[nt][1]=N,this}js.prototype.clear=wp,js.prototype.delete=yc,js.prototype.get=Ap,js.prototype.has=Pp,js.prototype.set=Xu;function As(R){var N=-1,k=R==null?0:R.length;for(this.clear();++N=N?R:N)),R}function as(R,N,k,nt,ft,xt){var Ot,Gt=N&h,jt=N&a,fe=N&l;if(k&&(Ot=ft?k(R,nt,ft,xt):k(R)),Ot!==i)return Ot;if(!In(R))return R;var ce=Ei(R);if(ce){if(Ot=aP(R),!Gt)return br(R,Ot)}else{var ye=kr(R),Ie=ye==rt||ye==gt;if(_l(R))return zc(R,Gt);if(ye==Pt||ye==U||Ie&&!ft){if(Ot=jt||Ie?{}:_1(R),!Gt)return jt?Xp(R,Dp(Ot,R)):Yg(R,Cc(Ot,R))}else{if(!Ji[ye])return ft?R:{};Ot=oP(R,ye,Gt)}}xt||(xt=new tr);var Ke=xt.get(R);if(Ke)return Ke;xt.set(R,Ot),PS(R)?R.forEach(function(ui){Ot.add(as(ui,N,k,ui,R,xt))}):wS(R)&&R.forEach(function(ui,Ui){Ot.set(Ui,as(ui,N,k,Ui,R,xt))});var hi=fe?jt?zi:kn:jt?Fs:Fr,Oi=ce?i:hi(R);return Sn(Oi||R,function(ui,Ui){Oi&&(Ui=ui,ui=R[Ui]),Ks(Ot,Ui,as(ui,N,k,Ui,R,xt))}),Ot}function wc(R){var N=Fr(R);return function(k){return Ku(k,R,N)}}function Ku(R,N,k){var nt=k.length;if(R==null)return!nt;for(R=It(R);nt--;){var ft=k[nt],xt=N[ft],Ot=R[ft];if(Ot===i&&!(ft in R)||!xt(Ot))return!1}return!0}function Ac(R,N,k){if(typeof R!="function")throw new Qt(s);return Wc(function(){R.apply(i,k)},N)}function il(R,N,k,nt){var ft=-1,xt=Tr,Ot=!0,Gt=R.length,jt=[],fe=N.length;if(!Gt)return jt;k&&(N=_i(N,lr(k))),nt?(xt=ha,Ot=!1):N.length>=T&&(xt=Wn,Ot=!1,N=new Eo(N));t:for(;++ftft?0:ft+k),nt=nt===i||nt>ft?ft:bi(nt),nt<0&&(nt+=ft),nt=k>nt?0:bS(nt);k0&&k(Gt)?N>1?ur(Gt,N-1,k,nt,ft):Yr(ft,Gt):nt||(ft[ft.length]=Gt)}return ft}var Xl=af(),Gh=af(!0);function os(R,N){return R&&Xl(R,N,Fr)}function Yl(R,N){return R&&Gh(R,N,Fr)}function nl(R,N){return Cn(N,function(k){return ll(R[k])})}function Js(R,N){N=bo(N,R);for(var k=0,nt=N.length;R!=null&&kN}function Bp(R,N){return R!=null&&me.call(R,N)}function Rc(R,N){return R!=null&&N in It(R)}function Wg(R,N,k){return R>=Mr(N,k)&&R=120&&ce.length>=120)?new Eo(Ot&&ce):i}ce=R[0];var ye=-1,Ie=Gt[0];t:for(;++ye-1;)Gt!==R&&So.call(Gt,jt,1),So.call(R,jt,1);return R}function Ar(R,N){for(var k=R?N.length:0,nt=k-1;k--;){var ft=N[k];if(k==nt||ft!==xt){var xt=ft;ol(ft)?So.call(R,ft,1):Nc(R,ft)}}return R}function ma(R,N){return R+Oh(mc()*(N-R+1))}function Ps(R,N,k,nt){for(var ft=-1,xt=qn(Fh((N-R)/(k||1)),0),Ot=vt(xt);xt--;)Ot[nt?xt:++ft]=R,R+=k;return Ot}function Ql(R,N){var k="";if(!R||N<1||N>z)return k;do N%2&&(k+=R),N=Oh(N/2),N&&(R+=R);while(N);return k}function ii(R,N){return Qg(eS(R,N,Os),R+"")}function Up(R){return Uh(uf(R))}function Oc(R,N){var k=uf(R);return jp(k,Co(N,0,k.length))}function sl(R,N,k,nt){if(!In(R))return R;N=bo(N,R);for(var ft=-1,xt=N.length,Ot=xt-1,Gt=R;Gt!=null&&++ftft?0:ft+N),k=k>ft?ft:k,k<0&&(k+=ft),ft=N>k?0:k-N>>>0,N>>>=0;for(var xt=vt(ft);++nt>>1,Ot=R[xt];Ot!==null&&!Qs(Ot)&&(k?Ot<=N:Ot=T){var fe=N?null:Lr(R);if(fe)return Wa(fe);Ot=!1,ft=Wn,jt=new Eo}else jt=N?[]:Gt;t:for(;++nt=nt?R:hs(R,N,k)}var Hp=Lh||function(R){return xn.clearTimeout(R)};function zc(R,N){if(N)return R.slice();var k=R.length,nt=yo?yo(k):new R.constructor(k);return R.copy(nt),nt}function rf(R){var N=new R.constructor(R.byteLength);return new wn(N).set(new wn(R)),N}function Xg(R,N){var k=N?rf(R.buffer):R.buffer;return new R.constructor(k,R.byteOffset,R.byteLength)}function Rs(R){var N=new R.constructor(R.source,Ll.exec(R));return N.lastIndex=R.lastIndex,N}function Gc(R){return Ya?It(Ya.call(R)):{}}function Wp(R,N){var k=N?rf(R.buffer):R.buffer;return new R.constructor(k,R.byteOffset,R.length)}function Ka(R,N){if(R!==N){var k=R!==i,nt=R===null,ft=R===R,xt=Qs(R),Ot=N!==i,Gt=N===null,jt=N===N,fe=Qs(N);if(!Gt&&!fe&&!xt&&R>N||xt&&Ot&&jt&&!Gt&&!fe||nt&&Ot&&jt||!k&&jt||!ft)return 1;if(!nt&&!xt&&!fe&&R=Gt)return jt;var fe=k[nt];return jt*(fe=="desc"?-1:1)}}return R.index-N.index}function Fo(R,N,k,nt){for(var ft=-1,xt=R.length,Ot=k.length,Gt=-1,jt=N.length,fe=qn(xt-Ot,0),ce=vt(jt+fe),ye=!nt;++Gt1?k[ft-1]:i,Ot=ft>2?k[2]:i;for(xt=R.length>3&&typeof xt=="function"?(ft--,xt):i,Ot&&fs(k[0],k[1],Ot)&&(xt=ft<3?i:xt,ft=1),N=It(N);++nt-1?ft[xt?N[Ot]:Ot]:i}}function it(R){return Ai(function(N){var k=N.length,nt=k,ft=Cr.prototype.thru;for(R&&N.reverse();nt--;){var xt=N[nt];if(typeof xt!="function")throw new Qt(s);if(ft&&!Ot&&of(xt)=="wrapper")var Ot=new Cr([],!0)}for(nt=Ot?nt:k;++nt1&&Hi.reverse(),ce&&jtGt))return!1;var fe=xt.get(R),ce=xt.get(N);if(fe&&ce)return fe==N&&ce==R;var ye=-1,Ie=!0,Ke=k&u?new Eo:i;for(xt.set(R,N),xt.set(N,R);++ye1?"& ":"")+N[nt],N=N.join(k>2?", ":" "),R.replace(Us,`{ /* [wrapped with `+N+`] */ -`)}function hP(R){return Ei(R)||$h(R)||!!(dc&&R&&R[dc])}function ol(R,N){var k=typeof R;return N=N??z,!!N&&(k=="number"||k!="symbol"&&ee.test(R))&&R>-1&&R%1==0&&R0){if(++N>=b)return arguments[0]}else N=0;return R.apply(i,arguments)}}function jp(R,N){var k=-1,nt=R.length,ft=nt-1;for(N=N===i?nt:N;++k1?R[N-1]:i;return k=typeof k=="function"?(R.pop(),k):i,dS(R,k)});function pS(R){var N=mt(R);return N.__chain__=!0,N}function SR(R,N){return N(R),R}function Kp(R,N){return N(R)}var TR=Ai(function(R){var N=R.length,k=N?R[0]:0,nt=this.__wrapped__,ft=function(xt){return ju(xt,R)};return N>1||this.__actions__.length||!(nt instanceof ni)||!ol(k)?this.thru(ft):(nt=nt.slice(k,+k+(N?1:0)),nt.__actions__.push({func:Kp,args:[ft],thisArg:i}),new Cr(nt,this.__chain__).thru(function(xt){return N&&!xt.length&&xt.push(i),xt}))});function ER(){return pS(this)}function MR(){return new Cr(this.value(),this.__chain__)}function CR(){this.__values__===i&&(this.__values__=RS(this.value()));var R=this.__index__>=this.__values__.length,N=R?i:this.__values__[this.__index__++];return{done:R,value:N}}function wR(){return this}function AR(R){for(var N,k=this;k instanceof Bh;){var nt=oS(k);nt.__index__=0,nt.__values__=i,N?ft.__wrapped__=nt:N=nt;var ft=nt;k=k.__wrapped__}return ft.__wrapped__=R,N}function PR(){var R=this.__wrapped__;if(R instanceof ni){var N=R;return this.__actions__.length&&(N=new ni(this)),N=N.reverse(),N.__actions__.push({func:Kp,args:[_g],thisArg:i}),new Cr(N,this.__chain__)}return this.thru(_g)}function RR(){return Po(this.__wrapped__,this.__actions__)}var bR=Kh(function(R,N,k){me.call(R,k)?++R[k]:va(R,k,1)});function LR(R,N,k){var nt=Ei(R)?Ua:Hg;return k&&fs(R,N,k)&&(N=i),nt(R,li(N,3))}function FR(R,N){var k=Ei(R)?Cn:Ac;return k(R,li(N,3))}var OR=$(lS),DR=$(hS);function IR(R,N){return ur(Zp(R,N),1)}function NR(R,N){return ur(Zp(R,N),G)}function BR(R,N,k){return k=k===i?1:bi(k),ur(Zp(R,N),k)}function vS(R,N){var k=Ei(R)?Sn:Zs;return k(R,li(N,3))}function mS(R,N){var k=Ei(R)?Hn:Ip;return k(R,li(N,3))}var UR=Kh(function(R,N,k){me.call(R,k)?R[k].push(N):va(R,k,[N])});function zR(R,N,k,nt){R=Ls(R)?R:uf(R),k=k&&!nt?bi(k):0;var ft=R.length;return k<0&&(k=qn(ft+k,0)),qp(R)?k<=ft&&R.indexOf(N,k)>-1:!!ft&&es(R,N,k)>-1}var GR=ei(function(R,N,k){var nt=-1,ft=typeof N=="function",xt=Ls(R)?vt(R.length):[];return Zs(R,function(Ot){xt[++nt]=ft?Qi(N,Ot,k):pn(Ot,N,k)}),xt}),VR=Kh(function(R,N,k){va(R,k,N)});function Zp(R,N){var k=Ei(R)?_i:rl;return k(R,li(N,3))}function HR(R,N,k,nt){return R==null?[]:(Ei(N)||(N=N==null?[]:[N]),k=nt?i:k,Ei(k)||(k=k==null?[]:[k]),Xh(R,N,k))}var WR=Kh(function(R,N,k){R[k?0:1].push(N)},function(){return[[],[]]});function XR(R,N,k){var nt=Ei(R)?za:ca,ft=arguments.length<3;return nt(R,li(N,4),k,ft,Zs)}function YR(R,N,k){var nt=Ei(R)?Bl:ca,ft=arguments.length<3;return nt(R,li(N,4),k,ft,Ip)}function kR(R,N){var k=Ei(R)?Cn:Ac;return k(R,Qp(li(N,3)))}function jR(R){var N=Ei(R)?Uh:Up;return N(R)}function KR(R,N,k){(k?fs(R,N,k):N===i)?N=1:N=bi(N);var nt=Ei(R)?Sc:Fc;return nt(R,N)}function ZR(R){var N=Ei(R)?Op:Gp;return N(R)}function JR(R){if(R==null)return 0;if(Ls(R))return qp(R)?V(R):R.length;var N=kr(R);return N==yt||N==Rt?R.size:wr(R).length}function $R(R,N,k){var nt=Ei(R)?ts:Oc;return k&&fs(R,N,k)&&(N=i),nt(R,li(N,3))}var QR=ei(function(R,N){if(R==null)return[];var k=N.length;return k>1&&fs(R,N[0],N[1])?N=[]:k>2&&fs(N[0],N[1],N[2])&&(N=[N[0]]),Xh(R,ur(N,1),[])}),Jp=hp||function(){return xn.Date.now()};function _R(R,N){if(typeof N!="function")throw new Qt(s);return R=bi(R),function(){if(--R<1)return N.apply(this,arguments)}}function gS(R,N,k){return N=k?i:N,N=R&&N==null?R.length:N,$t(R,M,i,i,i,i,N)}function yS(R,N){var k;if(typeof N!="function")throw new Qt(s);return R=bi(R),function(){return--R>0&&(k=N.apply(this,arguments)),R<=1&&(N=i),k}}var t0=ei(function(R,N,k){var nt=f;if(k.length){var ft=_n(k,lf(t0));nt|=m}return $t(R,nt,N,k,ft)}),xS=ei(function(R,N,k){var nt=f|o;if(k.length){var ft=_n(k,lf(xS));nt|=m}return $t(N,nt,R,k,ft)});function SS(R,N,k){N=k?i:N;var nt=$t(R,d,i,i,i,i,i,N);return nt.placeholder=SS.placeholder,nt}function TS(R,N,k){N=k?i:N;var nt=$t(R,v,i,i,i,i,i,N);return nt.placeholder=TS.placeholder,nt}function ES(R,N,k){var nt,ft,xt,Ot,Gt,jt,fe=0,ce=!1,ye=!1,Ie=!0;if(typeof R!="function")throw new Qt(s);N=Sa(N)||0,In(k)&&(ce=!!k.leading,ye="maxWait"in k,xt=ye?qn(Sa(k.maxWait)||0,N):xt,Ie="trailing"in k?!!k.trailing:Ie);function Ke(ir){var Ja=nt,ul=ft;return nt=ft=i,fe=ir,Ot=R.apply(ul,Ja),Ot}function hi(ir){return fe=ir,Gt=Hc(Ui,N),ce?Ke(ir):Ot}function Oi(ir){var Ja=ir-jt,ul=ir-fe,HS=N-Ja;return ye?Mr(HS,xt-ul):HS}function ui(ir){var Ja=ir-jt,ul=ir-fe;return jt===i||Ja>=N||Ja<0||ye&&ul>=xt}function Ui(){var ir=Jp();if(ui(ir))return Hi(ir);Gt=Hc(Ui,Oi(ir))}function Hi(ir){return Gt=i,Ie&&nt?Ke(ir):(nt=ft=i,Ot)}function _s(){Gt!==i&&Hp(Gt),fe=0,nt=jt=ft=Gt=i}function cs(){return Gt===i?Ot:Hi(Jp())}function qs(){var ir=Jp(),Ja=ui(ir);if(nt=arguments,ft=this,jt=ir,Ja){if(Gt===i)return hi(jt);if(ye)return Hp(Gt),Gt=Hc(Ui,N),Ke(jt)}return Gt===i&&(Gt=Hc(Ui,N)),Ot}return qs.cancel=_s,qs.flush=cs,qs}var qR=ei(function(R,N){return wc(R,1,N)}),t3=ei(function(R,N,k){return wc(R,Sa(N)||0,k)});function e3(R){return $t(R,C)}function $p(R,N){if(typeof R!="function"||N!=null&&typeof N!="function")throw new Qt(s);var k=function(){var nt=arguments,ft=N?N.apply(this,nt):nt[0],xt=k.cache;if(xt.has(ft))return xt.get(ft);var Ot=R.apply(this,nt);return k.cache=xt.set(ft,Ot)||xt,Ot};return k.cache=new($p.Cache||As),k}$p.Cache=As;function Qp(R){if(typeof R!="function")throw new Qt(s);return function(){var N=arguments;switch(N.length){case 0:return!R.call(this);case 1:return!R.call(this,N[0]);case 2:return!R.call(this,N[0],N[1]);case 3:return!R.call(this,N[0],N[1],N[2])}return!R.apply(this,N)}}function i3(R){return yS(2,R)}var n3=Vp(function(R,N){N=N.length==1&&Ei(N[0])?_i(N[0],lr(li())):_i(ur(N,1),lr(li()));var k=N.length;return ei(function(nt){for(var ft=-1,xt=Mr(nt.length,k);++ft=N}),$h=Ci(function(){return arguments}())?Ci:function(R){return jn(R)&&me.call(R,"callee")&&!xo.call(R,"callee")},Ei=vt.isArray,y3=Ia?lr(Ia):Xn;function Ls(R){return R!=null&&_p(R.length)&&!ll(R)}function er(R){return jn(R)&&Ls(R)}function x3(R){return R===!0||R===!1||jn(R)&&vr(R)==_}var _l=fp||c0,S3=Na?lr(Na):Yn;function T3(R){return jn(R)&&R.nodeType===1&&!Wc(R)}function E3(R){if(R==null)return!0;if(Ls(R)&&(Ei(R)||typeof R=="string"||typeof R.splice=="function"||_l(R)||hf(R)||$h(R)))return!R.length;var N=kr(R);if(N==yt||N==Rt)return!R.size;if(Vc(R))return!wr(R).length;for(var k in R)if(me.call(R,k))return!1;return!0}function M3(R,N){return On(R,N)}function C3(R,N,k){k=typeof k=="function"?k:i;var nt=k?k(R,N):i;return nt===i?On(R,N,i,k):!!nt}function i0(R){if(!jn(R))return!1;var N=vr(R);return N==ot||N==at||typeof R.message=="string"&&typeof R.name=="string"&&!Wc(R)}function w3(R){return typeof R=="number"&&pc(R)}function ll(R){if(!In(R))return!1;var N=vr(R);return N==rt||N==gt||N==J||N==dt}function CS(R){return typeof R=="number"&&R==bi(R)}function _p(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=z}function In(R){var N=typeof R;return R!=null&&(N=="object"||N=="function")}function jn(R){return R!=null&&typeof R=="object"}var wS=Il?lr(Il):jl;function A3(R,N){return R===N||Dn(R,N,jg(N))}function P3(R,N,k){return k=typeof k=="function"?k:i,Dn(R,N,jg(N),k)}function R3(R){return AS(R)&&R!=+R}function b3(R){if(cP(R))throw new Lt(E);return Kl(R)}function L3(R){return R===null}function F3(R){return R==null}function AS(R){return typeof R=="number"||jn(R)&&vr(R)==Et}function Wc(R){if(!jn(R)||vr(R)!=Pt)return!1;var N=Ln(R);if(N===null)return!0;var k=me.call(N,"constructor")&&N.constructor;return typeof k=="function"&&k instanceof k&&Ae.call(k)==fi}var n0=Nl?lr(Nl):Zl;function O3(R){return CS(R)&&R>=-z&&R<=z}var PS=Ba?lr(Ba):Ju;function qp(R){return typeof R=="string"||!Ei(R)&&jn(R)&&vr(R)==Dt}function Qs(R){return typeof R=="symbol"||jn(R)&&vr(R)==Ht}var hf=Ys?lr(Ys):bc;function D3(R){return R===i}function I3(R){return jn(R)&&kr(R)==re}function N3(R){return jn(R)&&vr(R)==le}var B3=Qe(Hh),U3=Qe(function(R,N){return R<=N});function RS(R){if(!R)return[];if(Ls(R))return qp(R)?K(R):br(R);if(To&&R[To])return go(R[To]());var N=kr(R),k=N==yt?Va:N==Rt?Wa:uf;return k(R)}function hl(R){if(!R)return R===0?R:0;if(R=Sa(R),R===G||R===-G){var N=R<0?-1:1;return N*X}return R===R?R:0}function bi(R){var N=hl(R),k=N%1;return N===N?k?N-k:N:0}function bS(R){return R?Co(bi(R),0,Q):0}function Sa(R){if(typeof R=="number")return R;if(Qs(R))return j;if(In(R)){var N=typeof R.valueOf=="function"?R.valueOf():R;R=In(N)?N+"":N}if(typeof R!="string")return R===0?R:+R;R=zl(R);var k=Zt.test(R);return k||ie.test(R)?Dl(R.slice(2),k?2:8):Tt.test(R)?j:+R}function LS(R){return bs(R,Fs(R))}function z3(R){return R?Co(bi(R),-z,z):R===0?R:0}function en(R){return R==null?"":Pr(R)}var G3=al(function(R,N){if(Vc(N)||Ls(N)){bs(N,Fr(N),R);return}for(var k in N)me.call(N,k)&&Ks(R,k,N[k])}),FS=al(function(R,N){bs(N,Fs(N),R)}),tv=al(function(R,N,k,nt){bs(N,Fs(N),R,nt)}),V3=al(function(R,N,k,nt){bs(N,Fr(N),R,nt)}),H3=Ai(ju);function W3(R,N){var k=ka(R);return N==null?k:Mc(k,N)}var X3=ei(function(R,N){R=It(R);var k=-1,nt=N.length,ft=nt>2?N[2]:i;for(ft&&fs(N[0],N[1],ft)&&(nt=1);++k1),xt}),bs(R,zi(R),k),nt&&(k=as(k,h|a|l,Ne));for(var ft=N.length;ft--;)Ic(k,N[ft]);return k});function ob(R,N){return DS(R,Qp(li(N)))}var lb=Ai(function(R,N){return R==null?{}:Yh(R,N)});function DS(R,N){if(R==null)return{};var k=_i(zi(R),function(nt){return[nt]});return N=li(N),_u(R,k,function(nt,ft){return N(nt,ft[0])})}function hb(R,N,k){N=bo(N,R);var nt=-1,ft=N.length;for(ft||(ft=1,R=i);++ntN){var nt=R;R=N,N=nt}if(k||R%1||N%1){var ft=vc();return Mr(R+ft*(N-R+Ko("1e-"+((ft+"").length-1))),N)}return ma(R,N)}var Sb=L(function(R,N,k){return N=N.toLowerCase(),R+(k?BS(N):N)});function BS(R){return a0(en(R).toLowerCase())}function US(R){return R=en(R),R&&R.replace(Te,Hu).replace(rn,"")}function Tb(R,N,k){R=en(R),N=Pr(N);var nt=R.length;k=k===i?nt:Co(bi(k),0,nt);var ft=k;return k-=N.length,k>=0&&R.slice(k,ft)==N}function Eb(R){return R=en(R),R&&Ve.test(R)?R.replace(Me,Qo):R}function Mb(R){return R=en(R),R&&Xi.test(R)?R.replace(pi,"\\$&"):R}var Cb=L(function(R,N,k){return R+(k?"-":"")+N.toLowerCase()}),wb=L(function(R,N,k){return R+(k?" ":"")+N.toLowerCase()}),Ab=Yp("toLowerCase");function Pb(R,N,k){R=en(R),N=bi(N);var nt=N?V(R):0;if(!N||nt>=N)return R;var ft=(N-nt)/2;return Ee(Oh(ft),k)+R+Ee(Fh(ft),k)}function Rb(R,N,k){R=en(R),N=bi(N);var nt=N?V(R):0;return N&&nt>>0,k?(R=en(R),R&&(typeof N=="string"||N!=null&&!n0(N))&&(N=Pr(N),!N&&ws(R))?Lo(K(R),0,k):R.split(N,k)):[]}var Nb=L(function(R,N,k){return R+(k?" ":"")+a0(N)});function Bb(R,N,k){return R=en(R),k=k==null?0:Co(bi(k),0,R.length),N=Pr(N),R.slice(k,k+N.length)==N}function Ub(R,N,k){var nt=mt.templateSettings;k&&fs(R,N,k)&&(N=i),R=en(R),N=tv({},N,nt,kt);var ft=tv({},N.imports,nt.imports,kt),xt=Fr(ft),Ot=Qn(ft,xt),Gt,jt,fe=0,ce=N.interpolate||Ue,ye="__p += '",Ie=Kt((N.escape||Ue).source+"|"+ce.source+"|"+(ce===Ii?ho:Ue).source+"|"+(N.evaluate||Ue).source+"|$","g"),Ke="//# sourceURL="+(me.call(N,"sourceURL")?(N.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Sr+"]")+` +`)}function hP(R){return Ei(R)||$h(R)||!!(pc&&R&&R[pc])}function ol(R,N){var k=typeof R;return N=N??z,!!N&&(k=="number"||k!="symbol"&&ee.test(R))&&R>-1&&R%1==0&&R0){if(++N>=b)return arguments[0]}else N=0;return R.apply(i,arguments)}}function jp(R,N){var k=-1,nt=R.length,ft=nt-1;for(N=N===i?nt:N;++k1?R[N-1]:i;return k=typeof k=="function"?(R.pop(),k):i,dS(R,k)});function pS(R){var N=mt(R);return N.__chain__=!0,N}function SR(R,N){return N(R),R}function Kp(R,N){return N(R)}var TR=Ai(function(R){var N=R.length,k=N?R[0]:0,nt=this.__wrapped__,ft=function(xt){return ju(xt,R)};return N>1||this.__actions__.length||!(nt instanceof ri)||!ol(k)?this.thru(ft):(nt=nt.slice(k,+k+(N?1:0)),nt.__actions__.push({func:Kp,args:[ft],thisArg:i}),new Cr(nt,this.__chain__).thru(function(xt){return N&&!xt.length&&xt.push(i),xt}))});function ER(){return pS(this)}function MR(){return new Cr(this.value(),this.__chain__)}function CR(){this.__values__===i&&(this.__values__=RS(this.value()));var R=this.__index__>=this.__values__.length,N=R?i:this.__values__[this.__index__++];return{done:R,value:N}}function wR(){return this}function AR(R){for(var N,k=this;k instanceof Bh;){var nt=oS(k);nt.__index__=0,nt.__values__=i,N?ft.__wrapped__=nt:N=nt;var ft=nt;k=k.__wrapped__}return ft.__wrapped__=R,N}function PR(){var R=this.__wrapped__;if(R instanceof ri){var N=R;return this.__actions__.length&&(N=new ri(this)),N=N.reverse(),N.__actions__.push({func:Kp,args:[_g],thisArg:i}),new Cr(N,this.__chain__)}return this.thru(_g)}function RR(){return Po(this.__wrapped__,this.__actions__)}var bR=Kh(function(R,N,k){me.call(R,k)?++R[k]:va(R,k,1)});function LR(R,N,k){var nt=Ei(R)?Ua:Hg;return k&&fs(R,N,k)&&(N=i),nt(R,li(N,3))}function FR(R,N){var k=Ei(R)?Cn:Pc;return k(R,li(N,3))}var OR=$(lS),DR=$(hS);function IR(R,N){return ur(Zp(R,N),1)}function NR(R,N){return ur(Zp(R,N),G)}function BR(R,N,k){return k=k===i?1:bi(k),ur(Zp(R,N),k)}function vS(R,N){var k=Ei(R)?Sn:Zs;return k(R,li(N,3))}function mS(R,N){var k=Ei(R)?Hn:Ip;return k(R,li(N,3))}var UR=Kh(function(R,N,k){me.call(R,k)?R[k].push(N):va(R,k,[N])});function zR(R,N,k,nt){R=Ls(R)?R:uf(R),k=k&&!nt?bi(k):0;var ft=R.length;return k<0&&(k=qn(ft+k,0)),qp(R)?k<=ft&&R.indexOf(N,k)>-1:!!ft&&es(R,N,k)>-1}var GR=ii(function(R,N,k){var nt=-1,ft=typeof N=="function",xt=Ls(R)?vt(R.length):[];return Zs(R,function(Ot){xt[++nt]=ft?Qi(N,Ot,k):pn(Ot,N,k)}),xt}),VR=Kh(function(R,N,k){va(R,k,N)});function Zp(R,N){var k=Ei(R)?_i:rl;return k(R,li(N,3))}function HR(R,N,k,nt){return R==null?[]:(Ei(N)||(N=N==null?[]:[N]),k=nt?i:k,Ei(k)||(k=k==null?[]:[k]),Xh(R,N,k))}var WR=Kh(function(R,N,k){R[k?0:1].push(N)},function(){return[[],[]]});function XR(R,N,k){var nt=Ei(R)?za:ca,ft=arguments.length<3;return nt(R,li(N,4),k,ft,Zs)}function YR(R,N,k){var nt=Ei(R)?Bl:ca,ft=arguments.length<3;return nt(R,li(N,4),k,ft,Ip)}function kR(R,N){var k=Ei(R)?Cn:Pc;return k(R,Qp(li(N,3)))}function jR(R){var N=Ei(R)?Uh:Up;return N(R)}function KR(R,N,k){(k?fs(R,N,k):N===i)?N=1:N=bi(N);var nt=Ei(R)?Tc:Oc;return nt(R,N)}function ZR(R){var N=Ei(R)?Op:Gp;return N(R)}function JR(R){if(R==null)return 0;if(Ls(R))return qp(R)?V(R):R.length;var N=kr(R);return N==yt||N==Rt?R.size:wr(R).length}function $R(R,N,k){var nt=Ei(R)?ts:Dc;return k&&fs(R,N,k)&&(N=i),nt(R,li(N,3))}var QR=ii(function(R,N){if(R==null)return[];var k=N.length;return k>1&&fs(R,N[0],N[1])?N=[]:k>2&&fs(N[0],N[1],N[2])&&(N=[N[0]]),Xh(R,ur(N,1),[])}),Jp=hp||function(){return xn.Date.now()};function _R(R,N){if(typeof N!="function")throw new Qt(s);return R=bi(R),function(){if(--R<1)return N.apply(this,arguments)}}function gS(R,N,k){return N=k?i:N,N=R&&N==null?R.length:N,$t(R,M,i,i,i,i,N)}function yS(R,N){var k;if(typeof N!="function")throw new Qt(s);return R=bi(R),function(){return--R>0&&(k=N.apply(this,arguments)),R<=1&&(N=i),k}}var t0=ii(function(R,N,k){var nt=f;if(k.length){var ft=_n(k,lf(t0));nt|=m}return $t(R,nt,N,k,ft)}),xS=ii(function(R,N,k){var nt=f|o;if(k.length){var ft=_n(k,lf(xS));nt|=m}return $t(N,nt,R,k,ft)});function SS(R,N,k){N=k?i:N;var nt=$t(R,d,i,i,i,i,i,N);return nt.placeholder=SS.placeholder,nt}function TS(R,N,k){N=k?i:N;var nt=$t(R,v,i,i,i,i,i,N);return nt.placeholder=TS.placeholder,nt}function ES(R,N,k){var nt,ft,xt,Ot,Gt,jt,fe=0,ce=!1,ye=!1,Ie=!0;if(typeof R!="function")throw new Qt(s);N=Sa(N)||0,In(k)&&(ce=!!k.leading,ye="maxWait"in k,xt=ye?qn(Sa(k.maxWait)||0,N):xt,Ie="trailing"in k?!!k.trailing:Ie);function Ke(ir){var Ja=nt,ul=ft;return nt=ft=i,fe=ir,Ot=R.apply(ul,Ja),Ot}function hi(ir){return fe=ir,Gt=Wc(Ui,N),ce?Ke(ir):Ot}function Oi(ir){var Ja=ir-jt,ul=ir-fe,HS=N-Ja;return ye?Mr(HS,xt-ul):HS}function ui(ir){var Ja=ir-jt,ul=ir-fe;return jt===i||Ja>=N||Ja<0||ye&&ul>=xt}function Ui(){var ir=Jp();if(ui(ir))return Hi(ir);Gt=Wc(Ui,Oi(ir))}function Hi(ir){return Gt=i,Ie&&nt?Ke(ir):(nt=ft=i,Ot)}function _s(){Gt!==i&&Hp(Gt),fe=0,nt=jt=ft=Gt=i}function cs(){return Gt===i?Ot:Hi(Jp())}function qs(){var ir=Jp(),Ja=ui(ir);if(nt=arguments,ft=this,jt=ir,Ja){if(Gt===i)return hi(jt);if(ye)return Hp(Gt),Gt=Wc(Ui,N),Ke(jt)}return Gt===i&&(Gt=Wc(Ui,N)),Ot}return qs.cancel=_s,qs.flush=cs,qs}var qR=ii(function(R,N){return Ac(R,1,N)}),t3=ii(function(R,N,k){return Ac(R,Sa(N)||0,k)});function e3(R){return $t(R,C)}function $p(R,N){if(typeof R!="function"||N!=null&&typeof N!="function")throw new Qt(s);var k=function(){var nt=arguments,ft=N?N.apply(this,nt):nt[0],xt=k.cache;if(xt.has(ft))return xt.get(ft);var Ot=R.apply(this,nt);return k.cache=xt.set(ft,Ot)||xt,Ot};return k.cache=new($p.Cache||As),k}$p.Cache=As;function Qp(R){if(typeof R!="function")throw new Qt(s);return function(){var N=arguments;switch(N.length){case 0:return!R.call(this);case 1:return!R.call(this,N[0]);case 2:return!R.call(this,N[0],N[1]);case 3:return!R.call(this,N[0],N[1],N[2])}return!R.apply(this,N)}}function i3(R){return yS(2,R)}var n3=Vp(function(R,N){N=N.length==1&&Ei(N[0])?_i(N[0],lr(li())):_i(ur(N,1),lr(li()));var k=N.length;return ii(function(nt){for(var ft=-1,xt=Mr(nt.length,k);++ft=N}),$h=Ci(function(){return arguments}())?Ci:function(R){return jn(R)&&me.call(R,"callee")&&!xo.call(R,"callee")},Ei=vt.isArray,y3=Ia?lr(Ia):Xn;function Ls(R){return R!=null&&_p(R.length)&&!ll(R)}function er(R){return jn(R)&&Ls(R)}function x3(R){return R===!0||R===!1||jn(R)&&vr(R)==_}var _l=fp||c0,S3=Na?lr(Na):Yn;function T3(R){return jn(R)&&R.nodeType===1&&!Xc(R)}function E3(R){if(R==null)return!0;if(Ls(R)&&(Ei(R)||typeof R=="string"||typeof R.splice=="function"||_l(R)||hf(R)||$h(R)))return!R.length;var N=kr(R);if(N==yt||N==Rt)return!R.size;if(Hc(R))return!wr(R).length;for(var k in R)if(me.call(R,k))return!1;return!0}function M3(R,N){return On(R,N)}function C3(R,N,k){k=typeof k=="function"?k:i;var nt=k?k(R,N):i;return nt===i?On(R,N,i,k):!!nt}function i0(R){if(!jn(R))return!1;var N=vr(R);return N==ot||N==at||typeof R.message=="string"&&typeof R.name=="string"&&!Xc(R)}function w3(R){return typeof R=="number"&&vc(R)}function ll(R){if(!In(R))return!1;var N=vr(R);return N==rt||N==gt||N==J||N==dt}function CS(R){return typeof R=="number"&&R==bi(R)}function _p(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=z}function In(R){var N=typeof R;return R!=null&&(N=="object"||N=="function")}function jn(R){return R!=null&&typeof R=="object"}var wS=Il?lr(Il):jl;function A3(R,N){return R===N||Dn(R,N,jg(N))}function P3(R,N,k){return k=typeof k=="function"?k:i,Dn(R,N,jg(N),k)}function R3(R){return AS(R)&&R!=+R}function b3(R){if(cP(R))throw new Lt(E);return Kl(R)}function L3(R){return R===null}function F3(R){return R==null}function AS(R){return typeof R=="number"||jn(R)&&vr(R)==Et}function Xc(R){if(!jn(R)||vr(R)!=Pt)return!1;var N=Ln(R);if(N===null)return!0;var k=me.call(N,"constructor")&&N.constructor;return typeof k=="function"&&k instanceof k&&Ae.call(k)==fi}var n0=Nl?lr(Nl):Zl;function O3(R){return CS(R)&&R>=-z&&R<=z}var PS=Ba?lr(Ba):Ju;function qp(R){return typeof R=="string"||!Ei(R)&&jn(R)&&vr(R)==Dt}function Qs(R){return typeof R=="symbol"||jn(R)&&vr(R)==Ht}var hf=Ys?lr(Ys):Lc;function D3(R){return R===i}function I3(R){return jn(R)&&kr(R)==re}function N3(R){return jn(R)&&vr(R)==le}var B3=Qe(Hh),U3=Qe(function(R,N){return R<=N});function RS(R){if(!R)return[];if(Ls(R))return qp(R)?K(R):br(R);if(To&&R[To])return go(R[To]());var N=kr(R),k=N==yt?Va:N==Rt?Wa:uf;return k(R)}function hl(R){if(!R)return R===0?R:0;if(R=Sa(R),R===G||R===-G){var N=R<0?-1:1;return N*X}return R===R?R:0}function bi(R){var N=hl(R),k=N%1;return N===N?k?N-k:N:0}function bS(R){return R?Co(bi(R),0,Q):0}function Sa(R){if(typeof R=="number")return R;if(Qs(R))return j;if(In(R)){var N=typeof R.valueOf=="function"?R.valueOf():R;R=In(N)?N+"":N}if(typeof R!="string")return R===0?R:+R;R=zl(R);var k=Zt.test(R);return k||ie.test(R)?Dl(R.slice(2),k?2:8):Tt.test(R)?j:+R}function LS(R){return bs(R,Fs(R))}function z3(R){return R?Co(bi(R),-z,z):R===0?R:0}function en(R){return R==null?"":Pr(R)}var G3=al(function(R,N){if(Hc(N)||Ls(N)){bs(N,Fr(N),R);return}for(var k in N)me.call(N,k)&&Ks(R,k,N[k])}),FS=al(function(R,N){bs(N,Fs(N),R)}),tv=al(function(R,N,k,nt){bs(N,Fs(N),R,nt)}),V3=al(function(R,N,k,nt){bs(N,Fr(N),R,nt)}),H3=Ai(ju);function W3(R,N){var k=ka(R);return N==null?k:Cc(k,N)}var X3=ii(function(R,N){R=It(R);var k=-1,nt=N.length,ft=nt>2?N[2]:i;for(ft&&fs(N[0],N[1],ft)&&(nt=1);++k1),xt}),bs(R,zi(R),k),nt&&(k=as(k,h|a|l,Ne));for(var ft=N.length;ft--;)Nc(k,N[ft]);return k});function ob(R,N){return DS(R,Qp(li(N)))}var lb=Ai(function(R,N){return R==null?{}:Yh(R,N)});function DS(R,N){if(R==null)return{};var k=_i(zi(R),function(nt){return[nt]});return N=li(N),_u(R,k,function(nt,ft){return N(nt,ft[0])})}function hb(R,N,k){N=bo(N,R);var nt=-1,ft=N.length;for(ft||(ft=1,R=i);++ntN){var nt=R;R=N,N=nt}if(k||R%1||N%1){var ft=mc();return Mr(R+ft*(N-R+Ko("1e-"+((ft+"").length-1))),N)}return ma(R,N)}var Sb=L(function(R,N,k){return N=N.toLowerCase(),R+(k?BS(N):N)});function BS(R){return a0(en(R).toLowerCase())}function US(R){return R=en(R),R&&R.replace(Te,Hu).replace(rn,"")}function Tb(R,N,k){R=en(R),N=Pr(N);var nt=R.length;k=k===i?nt:Co(bi(k),0,nt);var ft=k;return k-=N.length,k>=0&&R.slice(k,ft)==N}function Eb(R){return R=en(R),R&&Ve.test(R)?R.replace(Ce,Qo):R}function Mb(R){return R=en(R),R&&Xi.test(R)?R.replace(pi,"\\$&"):R}var Cb=L(function(R,N,k){return R+(k?"-":"")+N.toLowerCase()}),wb=L(function(R,N,k){return R+(k?" ":"")+N.toLowerCase()}),Ab=Yp("toLowerCase");function Pb(R,N,k){R=en(R),N=bi(N);var nt=N?V(R):0;if(!N||nt>=N)return R;var ft=(N-nt)/2;return Ee(Oh(ft),k)+R+Ee(Fh(ft),k)}function Rb(R,N,k){R=en(R),N=bi(N);var nt=N?V(R):0;return N&&nt>>0,k?(R=en(R),R&&(typeof N=="string"||N!=null&&!n0(N))&&(N=Pr(N),!N&&ws(R))?Lo(K(R),0,k):R.split(N,k)):[]}var Nb=L(function(R,N,k){return R+(k?" ":"")+a0(N)});function Bb(R,N,k){return R=en(R),k=k==null?0:Co(bi(k),0,R.length),N=Pr(N),R.slice(k,k+N.length)==N}function Ub(R,N,k){var nt=mt.templateSettings;k&&fs(R,N,k)&&(N=i),R=en(R),N=tv({},N,nt,kt);var ft=tv({},N.imports,nt.imports,kt),xt=Fr(ft),Ot=Qn(ft,xt),Gt,jt,fe=0,ce=N.interpolate||Ue,ye="__p += '",Ie=Kt((N.escape||Ue).source+"|"+ce.source+"|"+(ce===Ii?ho:Ue).source+"|"+(N.evaluate||Ue).source+"|$","g"),Ke="//# sourceURL="+(me.call(N,"sourceURL")?(N.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Sr+"]")+` `;R.replace(Ie,function(ui,Ui,Hi,_s,cs,qs){return Hi||(Hi=_s),ye+=R.slice(fe,qs).replace(We,rs),Ui&&(Gt=!0,ye+=`' + __e(`+Ui+`) + '`),cs&&(jt=!0,ye+=`'; @@ -6381,7 +6381,7 @@ __p += '`),Hi&&(ye+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+ye+`return __p -}`;var Oi=GS(function(){return Ut(xt,Ke+"return "+ye).apply(i,Ot)});if(Oi.source=ye,i0(Oi))throw Oi;return Oi}function zb(R){return en(R).toLowerCase()}function Gb(R){return en(R).toUpperCase()}function Vb(R,N,k){if(R=en(R),R&&(k||N===i))return zl(R);if(!R||!(N=Pr(N)))return R;var nt=K(R),ft=K(N),xt=qi(nt,ft),Ot=mo(nt,ft)+1;return Lo(nt,xt,Ot).join("")}function Hb(R,N,k){if(R=en(R),R&&(k||N===i))return R.slice(0,et(R)+1);if(!R||!(N=Pr(N)))return R;var nt=K(R),ft=mo(nt,K(N))+1;return Lo(nt,0,ft).join("")}function Wb(R,N,k){if(R=en(R),R&&(k||N===i))return R.replace(Ra,"");if(!R||!(N=Pr(N)))return R;var nt=K(R),ft=qi(nt,K(N));return Lo(nt,ft).join("")}function Xb(R,N){var k=A,nt=P;if(In(N)){var ft="separator"in N?N.separator:ft;k="length"in N?bi(N.length):k,nt="omission"in N?Pr(N.omission):nt}R=en(R);var xt=R.length;if(ws(R)){var Ot=K(R);xt=Ot.length}if(k>=xt)return R;var Gt=k-V(nt);if(Gt<1)return nt;var jt=Ot?Lo(Ot,0,Gt).join(""):R.slice(0,Gt);if(ft===i)return jt+nt;if(Ot&&(Gt+=jt.length-Gt),n0(ft)){if(R.slice(Gt).search(ft)){var fe,ce=jt;for(ft.global||(ft=Kt(ft.source,en(Ll.exec(ft))+"g")),ft.lastIndex=0;fe=ft.exec(ce);)var ye=fe.index;jt=jt.slice(0,ye===i?Gt:ye)}}else if(R.indexOf(Pr(ft),Gt)!=Gt){var Ie=jt.lastIndexOf(ft);Ie>-1&&(jt=jt.slice(0,Ie))}return jt+nt}function Yb(R){return R=en(R),R&&we.test(R)?R.replace(bt,st):R}var kb=L(function(R,N,k){return R+(k?" ":"")+N.toUpperCase()}),a0=Yp("toUpperCase");function zS(R,N,k){return R=en(R),N=k?i:N,N===i?hr(R)?Mt(R):Zo(R):R.match(N)||[]}var GS=ei(function(R,N){try{return Qi(R,i,N)}catch(k){return i0(k)?k:new Lt(k)}}),jb=Ai(function(R,N){return Sn(N,function(k){k=Oo(k),va(R,k,t0(R[k],R))}),R});function Kb(R){var N=R==null?0:R.length,k=li();return R=N?_i(R,function(nt){if(typeof nt[1]!="function")throw new Qt(s);return[k(nt[0]),nt[1]]}):[],ei(function(nt){for(var ft=-1;++ftz)return[];var k=Q,nt=Mr(R,Q);N=li(N),R-=Q;for(var ft=Cs(nt,N);++k0||N<0)?new ni(k):(R<0?k=k.takeRight(-R):R&&(k=k.drop(R)),N!==i&&(N=bi(N),k=N<0?k.dropRight(-N):k.take(N-R)),k)},ni.prototype.takeRightWhile=function(R){return this.reverse().takeWhile(R).reverse()},ni.prototype.toArray=function(){return this.take(Q)},os(ni.prototype,function(R,N){var k=/^(?:filter|find|map|reject)|While$/.test(N),nt=/^(?:head|last)$/.test(N),ft=mt[nt?"take"+(N=="last"?"Right":""):N],xt=nt||/^find/.test(N);ft&&(mt.prototype[N]=function(){var Ot=this.__wrapped__,Gt=nt?[1]:arguments,jt=Ot instanceof ni,fe=Gt[0],ce=jt||Ei(Ot),ye=function(Ui){var Hi=ft.apply(mt,Yr([Ui],Gt));return nt&&Ie?Hi[0]:Hi};ce&&k&&typeof fe=="function"&&fe.length!=1&&(jt=ce=!1);var Ie=this.__chain__,Ke=!!this.__actions__.length,hi=xt&&!Ie,Oi=jt&&!Ke;if(!xt&&ce){Ot=Oi?Ot:new ni(this);var ui=R.apply(Ot,Gt);return ui.__actions__.push({func:Kp,args:[ye],thisArg:i}),new Cr(ui,Ie)}return hi&&Oi?R.apply(this,Gt):(ui=this.thru(ye),hi?nt?ui.value()[0]:ui.value():ui)})}),Sn(["pop","push","shift","sort","splice","unshift"],function(R){var N=ae[R],k=/^(?:push|sort|unshift)$/.test(R)?"tap":"thru",nt=/^(?:pop|shift)$/.test(R);mt.prototype[R]=function(){var ft=arguments;if(nt&&!this.__chain__){var xt=this.value();return N.apply(Ei(xt)?xt:[],ft)}return this[k](function(Ot){return N.apply(Ei(Ot)?Ot:[],ft)})}}),os(ni.prototype,function(R,N){var k=mt[N];if(k){var nt=k.name+"";me.call(tl,nt)||(tl[nt]=[]),tl[nt].push({name:N,func:k})}}),tl[lt(i,o).name]=[{name:"wrapper",func:i}],ni.prototype.clone=Bg,ni.prototype.reverse=Ug,ni.prototype.value=ss,mt.prototype.at=TR,mt.prototype.chain=ER,mt.prototype.commit=MR,mt.prototype.next=CR,mt.prototype.plant=AR,mt.prototype.reverse=PR,mt.prototype.toJSON=mt.prototype.valueOf=mt.prototype.value=RR,mt.prototype.first=mt.prototype.head,To&&(mt.prototype[To]=wR),mt},zt=Nt();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(xn._=zt,define(function(){return zt})):bn?((bn.exports=zt)._=zt,Ph._=zt):xn._=zt}).call(g)}),GC=class extends Set{constructor(g,t=!1){super(g),this.valuesAsFlags=t}};function fd(g){if(g instanceof Map)return Object.fromEntries([...g.entries()].map(([t,i])=>[t,fd(i)]));if(g instanceof Set)return Array.from(g.values()).map(fd);if(g instanceof GC)return{values:[...g.values()],valuesAsFlags:g.valuesAsFlags};if(typeof g=="object"){let t={};return Object.entries(g).forEach(([i,x])=>{t[i]=fd(x)}),t}else return g}qx(t1(),1);var HO=qx(t1(),1);function uu(g,t){if(typeof g!="object")throw new Error(`Cannot merge into non-object objectToMergeWith. Received: ${JSON.stringify(g)}`);if(typeof t!="object")throw new Error(`Cannot merge using non-object objectToMergeWith. Received: ${JSON.stringify(t)}`);let i=(0,HO.cloneDeep)(g);for(let[x,T]of Object.entries(t))typeof T!="object"||T instanceof Set||i[x]===void 0?i[x]=T:i[x]=uu(i[x],T);return i}function VC(g,t){if(!(g===void 0||typeof g!="object"))for(let i of Object.keys(g)){if(i===t)return g[i];let x=g[i];if(typeof x=="object"){let T=VC(x,t);if(T!==void 0)return T}}}var x0="@composite:",WO="@inherit:",XO=class{constructor(g,t,i){this.tiledClassToMembersMap=g,this.enumNameToValuesMap=t,this.parserOptions=i,this.memoiser=new Map}flattenMembers(g,t){return this.memoiser.has(g)?{[g]:this.memoiser.get(g)}:(this.memoiser.set(g,t.reduce((i,x)=>Pn(Pn({},i),this.flattenMemberProperty(x)),{})),{[g]:this.memoiser.get(g)})}flattenMemberProperty(g){var t;let i=(t=g.propertyType)!=null?t:g.propertytype;if(g.type==="class"){if(!this.memoiser.has(i)){let E=this.tiledClassToMembersMap.get(i).reduce((s,y)=>uu(this.flattenMemberProperty(y),s),{});this.memoiser.set(i,E)}let x=this.memoiser.get(i),T=uu(x,this.flattenValue(g.value,x));return this.checkIfShouldFlatten(g.name)?T:{[g.name.replace(x0,"")]:T}}else return this.enumNameToValuesMap.has(i)?this.enumNameToValuesMap.get(i).valuesAsFlags?{[g.name]:new Set(g.value.split(",").filter(x=>x!==""))}:{[g.name]:g.value}:{[g.name]:g.value}}get memoisedFlattenedProperties(){return this.memoiser}flattenValue(g,t){return Object.entries(g).reduce((i,[x,T])=>{if(typeof T!="object")return VC(t,x)instanceof Set?uu({[x]:new Set(T.split(",").filter(E=>E!==""))},i):uu({[x]:T},i);if(this.checkIfShouldFlatten(x))return uu(this.flattenValue(T,t),i);{let E=x.replace(x0,"");return uu({[E]:this.flattenValue(T,t)},i)}},{})}checkIfShouldFlatten(g){var t;return((t=this.parserOptions)==null?void 0:t.defaultComposite)===!0?g.startsWith(WO):!g.startsWith(x0)}},pT=qx(t1(),1),YO=class{constructor(g){this.flattener=g}flattenPropertiesOnObject(g){var t,i,x,T;return mh(Pn(Pn({},this.flattener.memoisedFlattenedProperties.get((t=g.class)!=null?t:g.type)),(i=g.properties)==null?void 0:i.reduce((E,s)=>Pn(Pn({},E),this.flattener.flattenMemberProperty(s)),{})),{name:g.name,id:g.id,class:(T=(x=g.class)!=null?x:g.type)!=null?T:null,x:g.x,y:g.y})}flattenPropertiesOnTile(g){var t,i,x,T;return mh(Pn(Pn({},this.flattener.memoisedFlattenedProperties.get((t=g.class)!=null?t:g.type)),(i=g.properties)==null?void 0:i.reduce((E,s)=>Pn(Pn({},E),this.flattener.flattenMemberProperty(s)),{})),{id:g.id,class:(T=(x=g.class)!=null?x:g.type)!=null?T:null})}getCustomTypesMap(){return new Map([...this.flattener.memoisedFlattenedProperties.entries()].map(([g,t])=>[g,(0,pT.cloneDeep)(t)]))}getEnumsMap(){return new Map([...this.flattener.enumNameToValuesMap.entries()].map(([g,t])=>[g,(0,pT.cloneDeep)(t)]))}toJSON(){return JSON.stringify({customTypes:fd(this.getCustomTypesMap()),enums:fd(this.getEnumsMap())},null,4)}};function kO(g,t){let i=new Map(g.propertyTypes.filter(E=>E.type==="enum").map(E=>[E.name,new GC(E.values,E.valuesAsFlags)])),x=new Map(g.propertyTypes.filter(E=>E.type==="class").map(E=>[E.name,E.members])),T=new XO(x,i,t);return x.forEach((E,s)=>{T.flattenMembers(s,E)}),new YO(T)}var jO={parse:kO},HC=class{constructor(g,t){this.phaserTile=g,this.tiledProject=t}getProperty(g){var t,i;let x={};if(this.tiledProject){let T=jO.parse(this.tiledProject),E=this.getType();if(E){let s=(t=T.getCustomTypesMap())==null?void 0:t.get(E);if(s)for(let[y,e]of Object.entries(s))x[y]=e}}return(i=this.phaserTile.properties[g])!=null?i:x[g]}hasProperty(g){return this.getProperty(g)!=null}getType(){var g,t;return(t=(g=this.phaserTile.tileset)==null?void 0:g.tileData[this.phaserTile.index-1])==null?void 0:t.type}},KO=class{constructor(g,t){this.phaserTilemapLayer=g,this.tiledProject=t}getName(){return this.phaserTilemapLayer.layer.name}getProperty(g){let t=this.phaserTilemapLayer.layer.properties,i=t?.find(x=>x.name==g);return i?.value}hasProperty(g){return this.getProperty(g)!=null}isCharLayer(){return this.hasProperty(em)}getData(){return this.phaserTilemapLayer.layer.data.map(g=>g.map(t=>new HC(t,this.tiledProject)))}},ZO=class{constructor(g,t){this.phaserTilemap=g,this.tiledProject=t;for(let i of this.phaserTilemap.layers)if(i.tilemapLayer==null)throw new Error(`Error initializing tilemap. Layer '${i.name}' has no 'tilemapLayer'. This can happen if you call 'createLayer' with the wrong layer ID.`)}getTileWidth(){return this.phaserTilemap.tileWidth}getTileHeight(){return this.phaserTilemap.tileHeight}getWidth(){return this.phaserTilemap.width}getHeight(){return this.phaserTilemap.height}getOrientation(){return this.phaserTilemap.orientation==Phaser.Tilemaps.Orientation.ISOMETRIC.toString()?"isometric":"orthogonal"}getLayers(){return this.phaserTilemap.layers.map(g=>new KO(g.tilemapLayer,this.tiledProject))}hasTileAt(g,t,i){return!!this.phaserTilemap.hasTileAt(g,t,i)}getTileAt(g,t,i){let x=this.phaserTilemap.getTileAt(g,t,!1,i);if(x)return new HC(x,this.tiledProject)}},WC=class Iy{constructor(t){this.scene=t,this.geHeadless=new LO(!1),this.isCreatedInternal=!1,Iy.welcomeMessagePrinted||(console.log(`Using GridEngine Phaser Plugin v${DC}`),Iy.welcomeMessagePrinted=!0),this.scene.sys.events.once("boot",this.boot,this)}boot(){this.scene.sys.events.on("update",this.update,this)}getCharLayer(t){return this.geHeadless.getCharLayer(t)}getTransition(t,i){return this.geHeadless.getTransition(t,i)}setTransition(t,i,x){this.geHeadless.setTransition(t,i,x)}create(t,i){this.geHeadless.create(new ZO(t,i.tiledProject),i),this.isCreatedInternal=!0,this.gridCharacters=new Map;let x=this.setConfigDefaults(i);this.config=x,this.gridTilemap=new Dy(t),this.addCharacters()}getPosition(t){return this.geHeadless.getPosition(t)}move(t,i){this.geHeadless.move(t,i)}moveRandomly(t,i=0,x=-1){this.geHeadless.moveRandomly(t,i,x)}getMovement(t){return this.geHeadless.getMovement(t)}moveTo(t,i,x){return this.geHeadless.moveTo(t,i,x)}stopMovement(t){this.geHeadless.stopMovement(t)}setSpeed(t,i){this.geHeadless.setSpeed(t,i)}getSpeed(t){return this.geHeadless.getSpeed(t)}setContainer(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);T.setContainer(i)}getContainer(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);return x.getContainer()}getOffsetX(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);return x.getOffsetX()}setOffsetX(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);T.setOffsetX(i)}getOffsetY(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);return x.getOffsetY()}setOffsetY(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);T.setOffsetY(i)}collidesWithTiles(t){return this.geHeadless.collidesWithTiles(t)}getWalkingAnimationMapping(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);let T=x.getAnimation();return T?.getWalkingAnimationMapping()}hasLayerOverlay(){var t;return this.initGuard(),!!((t=this.config)!=null&&t.layerOverlay)}setWalkingAnimationMapping(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);let E=T.getAnimation();E?.setWalkingAnimationMapping(i)}update(t,i){if(this.isCreatedInternal&&this.gridCharacters)for(let[x,T]of this.gridCharacters)T.update(i);this.geHeadless.update(t,i)}addCharacter(t){this.geHeadless.addCharacter(t),this.addCharacterInternal(t)}hasCharacter(t){return this.geHeadless.hasCharacter(t)}removeCharacter(t){var i,x;this.initGuard();let T=(i=this.gridCharacters)==null?void 0:i.get(t);if(!T)throw this.createCharUnknownErr(t);T.destroy(),(x=this.gridCharacters)==null||x.delete(t),this.geHeadless.removeCharacter(t)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters){for(let t of this.gridCharacters.keys())this.removeCharacter(t);this.geHeadless.removeAllCharacters()}}getAllCharacters(t){return this.geHeadless.getAllCharacters(t)}getLabels(t){return this.geHeadless.getLabels(t)}addLabels(t,i){this.geHeadless.addLabels(t,i)}removeLabels(t,i){this.geHeadless.removeLabels(t,i)}clearLabels(t){this.geHeadless.clearLabels(t)}follow(t,i,x,T){let E;x===void 0?E={distance:0,closestPointIfBlocked:!1}:typeof x=="number"?(E={distance:x,closestPointIfBlocked:!1},T&&(E.closestPointIfBlocked=!0)):E=x,this.geHeadless.follow(t,i,E)}isMoving(t){return this.geHeadless.isMoving(t)}getFacingDirection(t){return this.geHeadless.getFacingDirection(t)}getFacingPosition(t){return this.geHeadless.getFacingPosition(t)}turnTowards(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);T.turnTowards(i),this.geHeadless.turnTowards(t,i)}getCharactersAt(t,i){return this.geHeadless.getCharactersAt(t,i)}setPosition(t,i,x){this.geHeadless.setPosition(t,i,x)}getSprite(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);return x.getSprite()}setSprite(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);i.setOrigin(0,0),T.setSprite(i)}isBlocked(t,i,x=["geDefault"]){return this.geHeadless.isBlocked(t,i,x)}isTileBlocked(t,i){return this.geHeadless.isTileBlocked(t,i)}getCollisionGroups(t){return this.geHeadless.getCollisionGroups(t)}setCollisionGroups(t,i){this.geHeadless.setCollisionGroups(t,i)}getIgnoreCollisionGroups(t){return this.geHeadless.getIgnoreCollisionGroups(t)}setIgnoreCollisionGroups(t,i){this.geHeadless.setIgnoreCollisionGroups(t,i)}getTilePosInDirection(t,i,x){return this.geHeadless.getTilePosInDirection(t,i,x)}findShortestPath(t,i,x={}){return this.geHeadless.findShortestPath(t,i,x)}steppedOn(t,i,x){return this.geHeadless.steppedOn(t,i,x)}characterShifted(){return this.geHeadless.characterShifted()}movementStarted(){return this.geHeadless.movementStarted()}movementStopped(){return this.geHeadless.movementStopped()}directionChanged(){return this.geHeadless.directionChanged()}positionChangeStarted(){return this.geHeadless.positionChangeStarted()}positionChangeFinished(){return this.geHeadless.positionChangeFinished()}getMovementProgress(t){return this.geHeadless.getMovementProgress(t)}rebuildTileCollisionCache(t,i,x,T){this.geHeadless.rebuildTileCollisionCache(t,i,x,T)}addQueueMovements(t,i,x){this.geHeadless.addQueueMovements(t,i,x)}getEnqueuedMovements(t){return this.geHeadless.getEnqueuedMovements(t)}queueMovementFinished(){return this.geHeadless.queueMovementFinished()}clearEnqueuedMovements(t){return this.geHeadless.clearEnqueuedMovements(t)}getState(){return{characters:this.geHeadless.getState().characters.map(t=>mh(Pn({},t),{offsetX:this.getOffsetX(t.id),offsetY:this.getOffsetY(t.id)}))}}setState(t){if(this.geHeadless.setState(t),this.gridCharacters)for(let i of t.characters){let x=this.gridCharacters.get(i.id);x&&(x.setOffsetX(i.offsetX),x.setOffsetY(i.offsetY))}}getTileCost(t,i,x){return this.initGuard(),this.geHeadless.getTileCost(t,i,x)}setConfigDefaults(t){return Pn({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",layerOverlay:!1,cacheTileCollisions:!1},t)}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var t;(t=this.config)==null||t.characters.forEach(i=>this.addCharacterInternal(i))}createCharUnknownErr(t){return new Error(`Character unknown: ${t}`)}addCharacterInternal(t){var i;if(this.initGuard(),!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let x=new fO(t,this.scene,this.gridTilemap,this.config.layerOverlay,this.geHeadless);(i=this.gridCharacters)==null||i.set(t.id,x)}};WC.welcomeMessagePrinted=!1;var JO=WC,$O=JO;/*! Bundled license information: +}`;var Oi=GS(function(){return Ut(xt,Ke+"return "+ye).apply(i,Ot)});if(Oi.source=ye,i0(Oi))throw Oi;return Oi}function zb(R){return en(R).toLowerCase()}function Gb(R){return en(R).toUpperCase()}function Vb(R,N,k){if(R=en(R),R&&(k||N===i))return zl(R);if(!R||!(N=Pr(N)))return R;var nt=K(R),ft=K(N),xt=qi(nt,ft),Ot=mo(nt,ft)+1;return Lo(nt,xt,Ot).join("")}function Hb(R,N,k){if(R=en(R),R&&(k||N===i))return R.slice(0,et(R)+1);if(!R||!(N=Pr(N)))return R;var nt=K(R),ft=mo(nt,K(N))+1;return Lo(nt,0,ft).join("")}function Wb(R,N,k){if(R=en(R),R&&(k||N===i))return R.replace(Ra,"");if(!R||!(N=Pr(N)))return R;var nt=K(R),ft=qi(nt,K(N));return Lo(nt,ft).join("")}function Xb(R,N){var k=A,nt=P;if(In(N)){var ft="separator"in N?N.separator:ft;k="length"in N?bi(N.length):k,nt="omission"in N?Pr(N.omission):nt}R=en(R);var xt=R.length;if(ws(R)){var Ot=K(R);xt=Ot.length}if(k>=xt)return R;var Gt=k-V(nt);if(Gt<1)return nt;var jt=Ot?Lo(Ot,0,Gt).join(""):R.slice(0,Gt);if(ft===i)return jt+nt;if(Ot&&(Gt+=jt.length-Gt),n0(ft)){if(R.slice(Gt).search(ft)){var fe,ce=jt;for(ft.global||(ft=Kt(ft.source,en(Ll.exec(ft))+"g")),ft.lastIndex=0;fe=ft.exec(ce);)var ye=fe.index;jt=jt.slice(0,ye===i?Gt:ye)}}else if(R.indexOf(Pr(ft),Gt)!=Gt){var Ie=jt.lastIndexOf(ft);Ie>-1&&(jt=jt.slice(0,Ie))}return jt+nt}function Yb(R){return R=en(R),R&&we.test(R)?R.replace(bt,st):R}var kb=L(function(R,N,k){return R+(k?" ":"")+N.toUpperCase()}),a0=Yp("toUpperCase");function zS(R,N,k){return R=en(R),N=k?i:N,N===i?hr(R)?Mt(R):Zo(R):R.match(N)||[]}var GS=ii(function(R,N){try{return Qi(R,i,N)}catch(k){return i0(k)?k:new Lt(k)}}),jb=Ai(function(R,N){return Sn(N,function(k){k=Oo(k),va(R,k,t0(R[k],R))}),R});function Kb(R){var N=R==null?0:R.length,k=li();return R=N?_i(R,function(nt){if(typeof nt[1]!="function")throw new Qt(s);return[k(nt[0]),nt[1]]}):[],ii(function(nt){for(var ft=-1;++ftz)return[];var k=Q,nt=Mr(R,Q);N=li(N),R-=Q;for(var ft=Cs(nt,N);++k0||N<0)?new ri(k):(R<0?k=k.takeRight(-R):R&&(k=k.drop(R)),N!==i&&(N=bi(N),k=N<0?k.dropRight(-N):k.take(N-R)),k)},ri.prototype.takeRightWhile=function(R){return this.reverse().takeWhile(R).reverse()},ri.prototype.toArray=function(){return this.take(Q)},os(ri.prototype,function(R,N){var k=/^(?:filter|find|map|reject)|While$/.test(N),nt=/^(?:head|last)$/.test(N),ft=mt[nt?"take"+(N=="last"?"Right":""):N],xt=nt||/^find/.test(N);ft&&(mt.prototype[N]=function(){var Ot=this.__wrapped__,Gt=nt?[1]:arguments,jt=Ot instanceof ri,fe=Gt[0],ce=jt||Ei(Ot),ye=function(Ui){var Hi=ft.apply(mt,Yr([Ui],Gt));return nt&&Ie?Hi[0]:Hi};ce&&k&&typeof fe=="function"&&fe.length!=1&&(jt=ce=!1);var Ie=this.__chain__,Ke=!!this.__actions__.length,hi=xt&&!Ie,Oi=jt&&!Ke;if(!xt&&ce){Ot=Oi?Ot:new ri(this);var ui=R.apply(Ot,Gt);return ui.__actions__.push({func:Kp,args:[ye],thisArg:i}),new Cr(ui,Ie)}return hi&&Oi?R.apply(this,Gt):(ui=this.thru(ye),hi?nt?ui.value()[0]:ui.value():ui)})}),Sn(["pop","push","shift","sort","splice","unshift"],function(R){var N=ae[R],k=/^(?:push|sort|unshift)$/.test(R)?"tap":"thru",nt=/^(?:pop|shift)$/.test(R);mt.prototype[R]=function(){var ft=arguments;if(nt&&!this.__chain__){var xt=this.value();return N.apply(Ei(xt)?xt:[],ft)}return this[k](function(Ot){return N.apply(Ei(Ot)?Ot:[],ft)})}}),os(ri.prototype,function(R,N){var k=mt[N];if(k){var nt=k.name+"";me.call(tl,nt)||(tl[nt]=[]),tl[nt].push({name:N,func:k})}}),tl[lt(i,o).name]=[{name:"wrapper",func:i}],ri.prototype.clone=Bg,ri.prototype.reverse=Ug,ri.prototype.value=ss,mt.prototype.at=TR,mt.prototype.chain=ER,mt.prototype.commit=MR,mt.prototype.next=CR,mt.prototype.plant=AR,mt.prototype.reverse=PR,mt.prototype.toJSON=mt.prototype.valueOf=mt.prototype.value=RR,mt.prototype.first=mt.prototype.head,To&&(mt.prototype[To]=wR),mt},zt=Nt();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(xn._=zt,define(function(){return zt})):bn?((bn.exports=zt)._=zt,Ph._=zt):xn._=zt}).call(g)}),GC=class extends Set{constructor(g,t=!1){super(g),this.valuesAsFlags=t}};function fd(g){if(g instanceof Map)return Object.fromEntries([...g.entries()].map(([t,i])=>[t,fd(i)]));if(g instanceof Set)return Array.from(g.values()).map(fd);if(g instanceof GC)return{values:[...g.values()],valuesAsFlags:g.valuesAsFlags};if(typeof g=="object"){let t={};return Object.entries(g).forEach(([i,x])=>{t[i]=fd(x)}),t}else return g}qx(t1(),1);var HO=qx(t1(),1);function uu(g,t){if(typeof g!="object")throw new Error(`Cannot merge into non-object objectToMergeWith. Received: ${JSON.stringify(g)}`);if(typeof t!="object")throw new Error(`Cannot merge using non-object objectToMergeWith. Received: ${JSON.stringify(t)}`);let i=(0,HO.cloneDeep)(g);for(let[x,T]of Object.entries(t))typeof T!="object"||T instanceof Set||i[x]===void 0?i[x]=T:i[x]=uu(i[x],T);return i}function VC(g,t){if(!(g===void 0||typeof g!="object"))for(let i of Object.keys(g)){if(i===t)return g[i];let x=g[i];if(typeof x=="object"){let T=VC(x,t);if(T!==void 0)return T}}}var x0="@composite:",WO="@inherit:",XO=class{constructor(g,t,i){this.tiledClassToMembersMap=g,this.enumNameToValuesMap=t,this.parserOptions=i,this.memoiser=new Map}flattenMembers(g,t){return this.memoiser.has(g)?{[g]:this.memoiser.get(g)}:(this.memoiser.set(g,t.reduce((i,x)=>Pn(Pn({},i),this.flattenMemberProperty(x)),{})),{[g]:this.memoiser.get(g)})}flattenMemberProperty(g){var t;let i=(t=g.propertyType)!=null?t:g.propertytype;if(g.type==="class"){if(!this.memoiser.has(i)){let E=this.tiledClassToMembersMap.get(i).reduce((s,y)=>uu(this.flattenMemberProperty(y),s),{});this.memoiser.set(i,E)}let x=this.memoiser.get(i),T=uu(x,this.flattenValue(g.value,x));return this.checkIfShouldFlatten(g.name)?T:{[g.name.replace(x0,"")]:T}}else return this.enumNameToValuesMap.has(i)?this.enumNameToValuesMap.get(i).valuesAsFlags?{[g.name]:new Set(g.value.split(",").filter(x=>x!==""))}:{[g.name]:g.value}:{[g.name]:g.value}}get memoisedFlattenedProperties(){return this.memoiser}flattenValue(g,t){return Object.entries(g).reduce((i,[x,T])=>{if(typeof T!="object")return VC(t,x)instanceof Set?uu({[x]:new Set(T.split(",").filter(E=>E!==""))},i):uu({[x]:T},i);if(this.checkIfShouldFlatten(x))return uu(this.flattenValue(T,t),i);{let E=x.replace(x0,"");return uu({[E]:this.flattenValue(T,t)},i)}},{})}checkIfShouldFlatten(g){var t;return((t=this.parserOptions)==null?void 0:t.defaultComposite)===!0?g.startsWith(WO):!g.startsWith(x0)}},pT=qx(t1(),1),YO=class{constructor(g){this.flattener=g}flattenPropertiesOnObject(g){var t,i,x,T;return mh(Pn(Pn({},this.flattener.memoisedFlattenedProperties.get((t=g.class)!=null?t:g.type)),(i=g.properties)==null?void 0:i.reduce((E,s)=>Pn(Pn({},E),this.flattener.flattenMemberProperty(s)),{})),{name:g.name,id:g.id,class:(T=(x=g.class)!=null?x:g.type)!=null?T:null,x:g.x,y:g.y})}flattenPropertiesOnTile(g){var t,i,x,T;return mh(Pn(Pn({},this.flattener.memoisedFlattenedProperties.get((t=g.class)!=null?t:g.type)),(i=g.properties)==null?void 0:i.reduce((E,s)=>Pn(Pn({},E),this.flattener.flattenMemberProperty(s)),{})),{id:g.id,class:(T=(x=g.class)!=null?x:g.type)!=null?T:null})}getCustomTypesMap(){return new Map([...this.flattener.memoisedFlattenedProperties.entries()].map(([g,t])=>[g,(0,pT.cloneDeep)(t)]))}getEnumsMap(){return new Map([...this.flattener.enumNameToValuesMap.entries()].map(([g,t])=>[g,(0,pT.cloneDeep)(t)]))}toJSON(){return JSON.stringify({customTypes:fd(this.getCustomTypesMap()),enums:fd(this.getEnumsMap())},null,4)}};function kO(g,t){let i=new Map(g.propertyTypes.filter(E=>E.type==="enum").map(E=>[E.name,new GC(E.values,E.valuesAsFlags)])),x=new Map(g.propertyTypes.filter(E=>E.type==="class").map(E=>[E.name,E.members])),T=new XO(x,i,t);return x.forEach((E,s)=>{T.flattenMembers(s,E)}),new YO(T)}var jO={parse:kO},HC=class{constructor(g,t){this.phaserTile=g,this.tiledProject=t}getProperty(g){var t,i;let x={};if(this.tiledProject){let T=jO.parse(this.tiledProject),E=this.getType();if(E){let s=(t=T.getCustomTypesMap())==null?void 0:t.get(E);if(s)for(let[y,e]of Object.entries(s))x[y]=e}}return(i=this.phaserTile.properties[g])!=null?i:x[g]}hasProperty(g){return this.getProperty(g)!=null}getType(){var g,t;return(t=(g=this.phaserTile.tileset)==null?void 0:g.tileData[this.phaserTile.index-1])==null?void 0:t.type}},KO=class{constructor(g,t){this.phaserTilemapLayer=g,this.tiledProject=t}getName(){return this.phaserTilemapLayer.layer.name}getProperty(g){let t=this.phaserTilemapLayer.layer.properties,i=t?.find(x=>x.name==g);return i?.value}hasProperty(g){return this.getProperty(g)!=null}isCharLayer(){return this.hasProperty(em)}getData(){return this.phaserTilemapLayer.layer.data.map(g=>g.map(t=>new HC(t,this.tiledProject)))}},ZO=class{constructor(g,t){this.phaserTilemap=g,this.tiledProject=t;for(let i of this.phaserTilemap.layers)if(i.tilemapLayer==null)throw new Error(`Error initializing tilemap. Layer '${i.name}' has no 'tilemapLayer'. This can happen if you call 'createLayer' with the wrong layer ID.`)}getTileWidth(){return this.phaserTilemap.tileWidth}getTileHeight(){return this.phaserTilemap.tileHeight}getWidth(){return this.phaserTilemap.width}getHeight(){return this.phaserTilemap.height}getOrientation(){return this.phaserTilemap.orientation==Phaser.Tilemaps.Orientation.ISOMETRIC.toString()?"isometric":"orthogonal"}getLayers(){return this.phaserTilemap.layers.map(g=>new KO(g.tilemapLayer,this.tiledProject))}hasTileAt(g,t,i){return!!this.phaserTilemap.hasTileAt(g,t,i)}getTileAt(g,t,i){let x=this.phaserTilemap.getTileAt(g,t,!1,i);if(x)return new HC(x,this.tiledProject)}},WC=class Iy{constructor(t){this.scene=t,this.geHeadless=new LO(!1),this.isCreatedInternal=!1,Iy.welcomeMessagePrinted||(console.log(`Using GridEngine Phaser Plugin v${DC}`),Iy.welcomeMessagePrinted=!0),this.scene.sys.events.once("boot",this.boot,this)}boot(){this.scene.sys.events.on("update",this.update,this)}getCharLayer(t){return this.geHeadless.getCharLayer(t)}getTransition(t,i){return this.geHeadless.getTransition(t,i)}setTransition(t,i,x){this.geHeadless.setTransition(t,i,x)}create(t,i){this.geHeadless.create(new ZO(t,i.tiledProject),i),this.isCreatedInternal=!0,this.gridCharacters=new Map;let x=this.setConfigDefaults(i);this.config=x,this.gridTilemap=new Dy(t),this.addCharacters()}getPosition(t){return this.geHeadless.getPosition(t)}move(t,i){this.geHeadless.move(t,i)}moveRandomly(t,i=0,x=-1){this.geHeadless.moveRandomly(t,i,x)}getMovement(t){return this.geHeadless.getMovement(t)}moveTo(t,i,x){return this.geHeadless.moveTo(t,i,x)}stopMovement(t){this.geHeadless.stopMovement(t)}setSpeed(t,i){this.geHeadless.setSpeed(t,i)}getSpeed(t){return this.geHeadless.getSpeed(t)}setContainer(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);T.setContainer(i)}getContainer(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);return x.getContainer()}getOffsetX(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);return x.getOffsetX()}setOffsetX(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);T.setOffsetX(i)}getOffsetY(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);return x.getOffsetY()}setOffsetY(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);T.setOffsetY(i)}collidesWithTiles(t){return this.geHeadless.collidesWithTiles(t)}getWalkingAnimationMapping(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);let T=x.getAnimation();return T?.getWalkingAnimationMapping()}hasLayerOverlay(){var t;return this.initGuard(),!!((t=this.config)!=null&&t.layerOverlay)}setWalkingAnimationMapping(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);let E=T.getAnimation();E?.setWalkingAnimationMapping(i)}update(t,i){if(this.isCreatedInternal&&this.gridCharacters)for(let[x,T]of this.gridCharacters)T.update(i);this.geHeadless.update(t,i)}addCharacter(t){this.geHeadless.addCharacter(t),this.addCharacterInternal(t)}hasCharacter(t){return this.geHeadless.hasCharacter(t)}removeCharacter(t){var i,x;this.initGuard();let T=(i=this.gridCharacters)==null?void 0:i.get(t);if(!T)throw this.createCharUnknownErr(t);T.destroy(),(x=this.gridCharacters)==null||x.delete(t),this.geHeadless.removeCharacter(t)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters){for(let t of this.gridCharacters.keys())this.removeCharacter(t);this.geHeadless.removeAllCharacters()}}getAllCharacters(t){return this.geHeadless.getAllCharacters(t)}getLabels(t){return this.geHeadless.getLabels(t)}addLabels(t,i){this.geHeadless.addLabels(t,i)}removeLabels(t,i){this.geHeadless.removeLabels(t,i)}clearLabels(t){this.geHeadless.clearLabels(t)}follow(t,i,x,T){let E;x===void 0?E={distance:0,closestPointIfBlocked:!1}:typeof x=="number"?(E={distance:x,closestPointIfBlocked:!1},T&&(E.closestPointIfBlocked=!0)):E=x,this.geHeadless.follow(t,i,E)}isMoving(t){return this.geHeadless.isMoving(t)}getFacingDirection(t){return this.geHeadless.getFacingDirection(t)}getFacingPosition(t){return this.geHeadless.getFacingPosition(t)}turnTowards(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);T.turnTowards(i),this.geHeadless.turnTowards(t,i)}getCharactersAt(t,i){return this.geHeadless.getCharactersAt(t,i)}setPosition(t,i,x){this.geHeadless.setPosition(t,i,x)}getSprite(t){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(t);if(!x)throw this.createCharUnknownErr(t);return x.getSprite()}setSprite(t,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(t);if(!T)throw this.createCharUnknownErr(t);i.setOrigin(0,0),T.setSprite(i)}isBlocked(t,i,x=["geDefault"]){return this.geHeadless.isBlocked(t,i,x)}isTileBlocked(t,i){return this.geHeadless.isTileBlocked(t,i)}getCollisionGroups(t){return this.geHeadless.getCollisionGroups(t)}setCollisionGroups(t,i){this.geHeadless.setCollisionGroups(t,i)}getIgnoreCollisionGroups(t){return this.geHeadless.getIgnoreCollisionGroups(t)}setIgnoreCollisionGroups(t,i){this.geHeadless.setIgnoreCollisionGroups(t,i)}getTilePosInDirection(t,i,x){return this.geHeadless.getTilePosInDirection(t,i,x)}findShortestPath(t,i,x={}){return this.geHeadless.findShortestPath(t,i,x)}steppedOn(t,i,x){return this.geHeadless.steppedOn(t,i,x)}characterShifted(){return this.geHeadless.characterShifted()}movementStarted(){return this.geHeadless.movementStarted()}movementStopped(){return this.geHeadless.movementStopped()}directionChanged(){return this.geHeadless.directionChanged()}positionChangeStarted(){return this.geHeadless.positionChangeStarted()}positionChangeFinished(){return this.geHeadless.positionChangeFinished()}getMovementProgress(t){return this.geHeadless.getMovementProgress(t)}rebuildTileCollisionCache(t,i,x,T){this.geHeadless.rebuildTileCollisionCache(t,i,x,T)}addQueueMovements(t,i,x){this.geHeadless.addQueueMovements(t,i,x)}getEnqueuedMovements(t){return this.geHeadless.getEnqueuedMovements(t)}queueMovementFinished(){return this.geHeadless.queueMovementFinished()}clearEnqueuedMovements(t){return this.geHeadless.clearEnqueuedMovements(t)}getState(){return{characters:this.geHeadless.getState().characters.map(t=>mh(Pn({},t),{offsetX:this.getOffsetX(t.id),offsetY:this.getOffsetY(t.id)}))}}setState(t){if(this.geHeadless.setState(t),this.gridCharacters)for(let i of t.characters){let x=this.gridCharacters.get(i.id);x&&(x.setOffsetX(i.offsetX),x.setOffsetY(i.offsetY))}}getTileCost(t,i,x){return this.initGuard(),this.geHeadless.getTileCost(t,i,x)}setConfigDefaults(t){return Pn({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",layerOverlay:!1,cacheTileCollisions:!1},t)}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var t;(t=this.config)==null||t.characters.forEach(i=>this.addCharacterInternal(i))}createCharUnknownErr(t){return new Error(`Character unknown: ${t}`)}addCharacterInternal(t){var i;if(this.initGuard(),!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let x=new fO(t,this.scene,this.gridTilemap,this.config.layerOverlay,this.geHeadless);(i=this.gridCharacters)==null||i.set(t.id,x)}};WC.welcomeMessagePrinted=!1;var JO=WC,$O=JO;/*! Bundled license information: tiled-property-flattener/dist/tiled_property_flattener.min.js: (*! Bundled license information: @@ -6396,21 +6396,21 @@ tiled-property-flattener/dist/tiled_property_flattener.min.js: * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) *) -*/function vT(g){return g.type==="ROLL_DICE"}class vu{constructor(t,i=4){this.bounds=t,this.capacity=i,this.points=[],this.divided=!1,this.cache=new Map}subdivide(){const{xMin:t,yMin:i,xMax:x,yMax:T}=this.bounds,E=(x-t)/2,s=(T-i)/2,y=t,e=i;this.northeast=new vu({xMin:y+E,xMax:y+2*E,yMin:i,yMax:e+s},this.capacity),this.northwest=new vu({xMin:t,xMax:y+E,yMin:i,yMax:e+s},this.capacity),this.southeast=new vu({xMin:y+E,xMax:y+2*E,yMin:e+s,yMax:e+2*s},this.capacity),this.southwest=new vu({xMin:t,xMax:y+E,yMin:e+s,yMax:e+2*s},this.capacity),this.divided=!0}insert(t){return this.contains(t.bounds)?this.points.length=i&&t.xMax<=T&&t.yMin>=x&&t.yMax<=E}generateCacheKey(t){const{xMin:i,xMax:x,yMin:T,yMax:E}=t;return`${i},${x},${T},${E}`}queryRange(t,i=[]){if(!this.intersects(t))return i;for(const x of this.points)this.isWithinBounds(x.bounds,t)&&i.push(x);return this.divided&&(this.northwest?.queryRange(t,i),this.northeast?.queryRange(t,i),this.southwest?.queryRange(t,i),this.southeast?.queryRange(t,i)),i}query(t,i=[]){const x=`${t.x},${t.y}`,T=this.cache.get(x);if(T)return T;if(!this.intersects({xMin:t.x,xMax:t.x,yMin:t.y,yMax:t.y}))return i;for(const E of this.points)this.isWithinRange(t,E.bounds)&&i.push(E);return this.divided&&(this.northwest?.query(t,i),this.northeast?.query(t,i),this.southwest?.query(t,i),this.southeast?.query(t,i)),this.cache.set(x,i),i}intersects(t){const{xMin:i,yMin:x,xMax:T,yMax:E}=this.bounds;return!(t.xMin>T||t.xMaxE||t.yMax=i.xMin&&t.xMin<=i.xMax&&t.yMax>=i.yMin&&t.yMin<=i.yMax}isWithinRange(t,i){return t.x>=i.xMin&&t.x<=i.xMax&&t.y>=i.yMin&&t.y<=i.yMax}}function QO(g,t,i){let x=new Set([...t,void 0]);return g.listen((T,E)=>{x.has(E)&&i(T,E)})}function XC(g,t){return function(){return g.apply(t,arguments)}}const{toString:_O}=Object.prototype,{getPrototypeOf:e1}=Object,eg=(g=>t=>{const i=_O.call(t);return g[i]||(g[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),Wo=g=>(g=g.toLowerCase(),t=>eg(t)===g),ig=g=>t=>typeof t===g,{isArray:rc}=Array,Td=ig("undefined");function qO(g){return g!==null&&!Td(g)&&g.constructor!==null&&!Td(g.constructor)&&wa(g.constructor.isBuffer)&&g.constructor.isBuffer(g)}const YC=Wo("ArrayBuffer");function tD(g){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(g):t=g&&g.buffer&&YC(g.buffer),t}const eD=ig("string"),wa=ig("function"),kC=ig("number"),ng=g=>g!==null&&typeof g=="object",iD=g=>g===!0||g===!1,im=g=>{if(eg(g)!=="object")return!1;const t=e1(g);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in g)&&!(Symbol.iterator in g)},nD=Wo("Date"),rD=Wo("File"),sD=Wo("Blob"),aD=Wo("FileList"),oD=g=>ng(g)&&wa(g.pipe),lD=g=>{let t;return g&&(typeof FormData=="function"&&g instanceof FormData||wa(g.append)&&((t=eg(g))==="formdata"||t==="object"&&wa(g.toString)&&g.toString()==="[object FormData]"))},hD=Wo("URLSearchParams"),uD=g=>g.trim?g.trim():g.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jd(g,t,{allOwnKeys:i=!1}={}){if(g===null||typeof g>"u")return;let x,T;if(typeof g!="object"&&(g=[g]),rc(g))for(x=0,T=g.length;x0;)if(T=i[x],t===T.toLowerCase())return T;return null}const KC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ZC=g=>!Td(g)&&g!==KC;function Ny(){const{caseless:g}=ZC(this)&&this||{},t={},i=(x,T)=>{const E=g&&jC(t,T)||T;im(t[E])&&im(x)?t[E]=Ny(t[E],x):im(x)?t[E]=Ny({},x):rc(x)?t[E]=x.slice():t[E]=x};for(let x=0,T=arguments.length;x(Jd(t,(T,E)=>{i&&wa(T)?g[E]=XC(T,i):g[E]=T},{allOwnKeys:x}),g),cD=g=>(g.charCodeAt(0)===65279&&(g=g.slice(1)),g),dD=(g,t,i,x)=>{g.prototype=Object.create(t.prototype,x),g.prototype.constructor=g,Object.defineProperty(g,"super",{value:t.prototype}),i&&Object.assign(g.prototype,i)},pD=(g,t,i,x)=>{let T,E,s;const y={};if(t=t||{},g==null)return t;do{for(T=Object.getOwnPropertyNames(g),E=T.length;E-- >0;)s=T[E],(!x||x(s,g,t))&&!y[s]&&(t[s]=g[s],y[s]=!0);g=i!==!1&&e1(g)}while(g&&(!i||i(g,t))&&g!==Object.prototype);return t},vD=(g,t,i)=>{g=String(g),(i===void 0||i>g.length)&&(i=g.length),i-=t.length;const x=g.indexOf(t,i);return x!==-1&&x===i},mD=g=>{if(!g)return null;if(rc(g))return g;let t=g.length;if(!kC(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=g[t];return i},gD=(g=>t=>g&&t instanceof g)(typeof Uint8Array<"u"&&e1(Uint8Array)),yD=(g,t)=>{const x=(g&&g[Symbol.iterator]).call(g);let T;for(;(T=x.next())&&!T.done;){const E=T.value;t.call(g,E[0],E[1])}},xD=(g,t)=>{let i;const x=[];for(;(i=g.exec(t))!==null;)x.push(i);return x},SD=Wo("HTMLFormElement"),TD=g=>g.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,x,T){return x.toUpperCase()+T}),mT=(({hasOwnProperty:g})=>(t,i)=>g.call(t,i))(Object.prototype),ED=Wo("RegExp"),JC=(g,t)=>{const i=Object.getOwnPropertyDescriptors(g),x={};Jd(i,(T,E)=>{let s;(s=t(T,E,g))!==!1&&(x[E]=s||T)}),Object.defineProperties(g,x)},MD=g=>{JC(g,(t,i)=>{if(wa(g)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const x=g[i];if(wa(x)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},CD=(g,t)=>{const i={},x=T=>{T.forEach(E=>{i[E]=!0})};return rc(g)?x(g):x(String(g).split(t)),i},wD=()=>{},AD=(g,t)=>(g=+g,Number.isFinite(g)?g:t),S0="abcdefghijklmnopqrstuvwxyz",gT="0123456789",$C={DIGIT:gT,ALPHA:S0,ALPHA_DIGIT:S0+S0.toUpperCase()+gT},PD=(g=16,t=$C.ALPHA_DIGIT)=>{let i="";const{length:x}=t;for(;g--;)i+=t[Math.random()*x|0];return i};function RD(g){return!!(g&&wa(g.append)&&g[Symbol.toStringTag]==="FormData"&&g[Symbol.iterator])}const bD=g=>{const t=new Array(10),i=(x,T)=>{if(ng(x)){if(t.indexOf(x)>=0)return;if(!("toJSON"in x)){t[T]=x;const E=rc(x)?[]:{};return Jd(x,(s,y)=>{const e=i(s,T+1);!Td(e)&&(E[y]=e)}),t[T]=void 0,E}}return x};return i(g,0)},LD=Wo("AsyncFunction"),FD=g=>g&&(ng(g)||wa(g))&&wa(g.then)&&wa(g.catch),de={isArray:rc,isArrayBuffer:YC,isBuffer:qO,isFormData:lD,isArrayBufferView:tD,isString:eD,isNumber:kC,isBoolean:iD,isObject:ng,isPlainObject:im,isUndefined:Td,isDate:nD,isFile:rD,isBlob:sD,isRegExp:ED,isFunction:wa,isStream:oD,isURLSearchParams:hD,isTypedArray:gD,isFileList:aD,forEach:Jd,merge:Ny,extend:fD,trim:uD,stripBOM:cD,inherits:dD,toFlatObject:pD,kindOf:eg,kindOfTest:Wo,endsWith:vD,toArray:mD,forEachEntry:yD,matchAll:xD,isHTMLForm:SD,hasOwnProperty:mT,hasOwnProp:mT,reduceDescriptors:JC,freezeMethods:MD,toObjectSet:CD,toCamelCase:TD,noop:wD,toFiniteNumber:AD,findKey:jC,global:KC,isContextDefined:ZC,ALPHABET:$C,generateString:PD,isSpecCompliantForm:RD,toJSONObject:bD,isAsyncFn:LD,isThenable:FD};function Wi(g,t,i,x,T){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=g,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),x&&(this.request=x),T&&(this.response=T)}de.inherits(Wi,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const QC=Wi.prototype,_C={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(g=>{_C[g]={value:g}});Object.defineProperties(Wi,_C);Object.defineProperty(QC,"isAxiosError",{value:!0});Wi.from=(g,t,i,x,T,E)=>{const s=Object.create(QC);return de.toFlatObject(g,s,function(e){return e!==Error.prototype},y=>y!=="isAxiosError"),Wi.call(s,g.message,t,i,x,T),s.cause=g,s.name=g.name,E&&Object.assign(s,E),s};const OD=null;function By(g){return de.isPlainObject(g)||de.isArray(g)}function qC(g){return de.endsWith(g,"[]")?g.slice(0,-2):g}function yT(g,t,i){return g?g.concat(t).map(function(T,E){return T=qC(T),!i&&E?"["+T+"]":T}).join(i?".":""):t}function DD(g){return de.isArray(g)&&!g.some(By)}const ID=de.toFlatObject(de,{},null,function(t){return/^is[A-Z]/.test(t)});function rg(g,t,i){if(!de.isObject(g))throw new TypeError("target must be an object");t=t||new FormData,i=de.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,f){return!de.isUndefined(f[u])});const x=i.metaTokens,T=i.visitor||p,E=i.dots,s=i.indexes,e=(i.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(t);if(!de.isFunction(T))throw new TypeError("visitor must be a function");function r(n){if(n===null)return"";if(de.isDate(n))return n.toISOString();if(!e&&de.isBlob(n))throw new Wi("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(n)||de.isTypedArray(n)?e&&typeof Blob=="function"?new Blob([n]):Buffer.from(n):n}function p(n,u,f){let o=n;if(n&&!f&&typeof n=="object"){if(de.endsWith(u,"{}"))u=x?u:u.slice(0,-2),n=JSON.stringify(n);else if(de.isArray(n)&&DD(n)||(de.isFileList(n)||de.endsWith(u,"[]"))&&(o=de.toArray(n)))return u=qC(u),o.forEach(function(d,v){!(de.isUndefined(d)||d===null)&&t.append(s===!0?yT([u],v,E):s===null?u:u+"[]",r(d))}),!1}return By(n)?!0:(t.append(yT(f,u,E),r(n)),!1)}const h=[],a=Object.assign(ID,{defaultVisitor:p,convertValue:r,isVisitable:By});function l(n,u){if(!de.isUndefined(n)){if(h.indexOf(n)!==-1)throw Error("Circular reference detected in "+u.join("."));h.push(n),de.forEach(n,function(o,c){(!(de.isUndefined(o)||o===null)&&T.call(t,o,de.isString(c)?c.trim():c,u,a))===!0&&l(o,u?u.concat(c):[c])}),h.pop()}}if(!de.isObject(g))throw new TypeError("data must be an object");return l(g),t}function xT(g){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(g).replace(/[!'()~]|%20|%00/g,function(x){return t[x]})}function i1(g,t){this._pairs=[],g&&rg(g,this,t)}const tw=i1.prototype;tw.append=function(t,i){this._pairs.push([t,i])};tw.toString=function(t){const i=t?function(x){return t.call(this,x,xT)}:xT;return this._pairs.map(function(T){return i(T[0])+"="+i(T[1])},"").join("&")};function ND(g){return encodeURIComponent(g).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ew(g,t,i){if(!t)return g;const x=i&&i.encode||ND,T=i&&i.serialize;let E;if(T?E=T(t,i):E=de.isURLSearchParams(t)?t.toString():new i1(t,i).toString(x),E){const s=g.indexOf("#");s!==-1&&(g=g.slice(0,s)),g+=(g.indexOf("?")===-1?"?":"&")+E}return g}class ST{constructor(){this.handlers=[]}use(t,i,x){return this.handlers.push({fulfilled:t,rejected:i,synchronous:x?x.synchronous:!1,runWhen:x?x.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){de.forEach(this.handlers,function(x){x!==null&&t(x)})}}const iw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},BD=typeof URLSearchParams<"u"?URLSearchParams:i1,UD=typeof FormData<"u"?FormData:null,zD=typeof Blob<"u"?Blob:null,GD={isBrowser:!0,classes:{URLSearchParams:BD,FormData:UD,Blob:zD},protocols:["http","https","file","blob","url","data"]},nw=typeof window<"u"&&typeof document<"u",VD=(g=>nw&&["ReactNative","NativeScript","NS"].indexOf(g)<0)(typeof navigator<"u"&&navigator.product),HD=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",WD=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:nw,hasStandardBrowserEnv:VD,hasStandardBrowserWebWorkerEnv:HD},Symbol.toStringTag,{value:"Module"})),No={...WD,...GD};function XD(g,t){return rg(g,new No.classes.URLSearchParams,Object.assign({visitor:function(i,x,T,E){return No.isNode&&de.isBuffer(i)?(this.append(x,i.toString("base64")),!1):E.defaultVisitor.apply(this,arguments)}},t))}function YD(g){return de.matchAll(/\w+|\[(\w*)]/g,g).map(t=>t[0]==="[]"?"":t[1]||t[0])}function kD(g){const t={},i=Object.keys(g);let x;const T=i.length;let E;for(x=0;x=i.length;return s=!s&&de.isArray(T)?T.length:s,e?(de.hasOwnProp(T,s)?T[s]=[T[s],x]:T[s]=x,!y):((!T[s]||!de.isObject(T[s]))&&(T[s]=[]),t(i,x,T[s],E)&&de.isArray(T[s])&&(T[s]=kD(T[s])),!y)}if(de.isFormData(g)&&de.isFunction(g.entries)){const i={};return de.forEachEntry(g,(x,T)=>{t(YD(x),T,i,0)}),i}return null}function jD(g,t,i){if(de.isString(g))try{return(t||JSON.parse)(g),de.trim(g)}catch(x){if(x.name!=="SyntaxError")throw x}return(i||JSON.stringify)(g)}const n1={transitional:iw,adapter:["xhr","http"],transformRequest:[function(t,i){const x=i.getContentType()||"",T=x.indexOf("application/json")>-1,E=de.isObject(t);if(E&&de.isHTMLForm(t)&&(t=new FormData(t)),de.isFormData(t))return T?JSON.stringify(rw(t)):t;if(de.isArrayBuffer(t)||de.isBuffer(t)||de.isStream(t)||de.isFile(t)||de.isBlob(t))return t;if(de.isArrayBufferView(t))return t.buffer;if(de.isURLSearchParams(t))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let y;if(E){if(x.indexOf("application/x-www-form-urlencoded")>-1)return XD(t,this.formSerializer).toString();if((y=de.isFileList(t))||x.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return rg(y?{"files[]":t}:t,e&&new e,this.formSerializer)}}return E||T?(i.setContentType("application/json",!1),jD(t)):t}],transformResponse:[function(t){const i=this.transitional||n1.transitional,x=i&&i.forcedJSONParsing,T=this.responseType==="json";if(t&&de.isString(t)&&(x&&!this.responseType||T)){const s=!(i&&i.silentJSONParsing)&&T;try{return JSON.parse(t)}catch(y){if(s)throw y.name==="SyntaxError"?Wi.from(y,Wi.ERR_BAD_RESPONSE,this,null,this.response):y}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:No.classes.FormData,Blob:No.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],g=>{n1.headers[g]={}});const r1=n1,KD=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ZD=g=>{const t={};let i,x,T;return g&&g.split(` -`).forEach(function(s){T=s.indexOf(":"),i=s.substring(0,T).trim().toLowerCase(),x=s.substring(T+1).trim(),!(!i||t[i]&&KD[i])&&(i==="set-cookie"?t[i]?t[i].push(x):t[i]=[x]:t[i]=t[i]?t[i]+", "+x:x)}),t},TT=Symbol("internals");function kc(g){return g&&String(g).trim().toLowerCase()}function nm(g){return g===!1||g==null?g:de.isArray(g)?g.map(nm):String(g)}function JD(g){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let x;for(;x=i.exec(g);)t[x[1]]=x[2];return t}const $D=g=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(g.trim());function T0(g,t,i,x,T){if(de.isFunction(x))return x.call(this,t,i);if(T&&(t=i),!!de.isString(t)){if(de.isString(x))return t.indexOf(x)!==-1;if(de.isRegExp(x))return x.test(t)}}function QD(g){return g.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,i,x)=>i.toUpperCase()+x)}function _D(g,t){const i=de.toCamelCase(" "+t);["get","set","has"].forEach(x=>{Object.defineProperty(g,x+i,{value:function(T,E,s){return this[x].call(this,t,T,E,s)},configurable:!0})})}class sg{constructor(t){t&&this.set(t)}set(t,i,x){const T=this;function E(y,e,r){const p=kc(e);if(!p)throw new Error("header name must be a non-empty string");const h=de.findKey(T,p);(!h||T[h]===void 0||r===!0||r===void 0&&T[h]!==!1)&&(T[h||e]=nm(y))}const s=(y,e)=>de.forEach(y,(r,p)=>E(r,p,e));return de.isPlainObject(t)||t instanceof this.constructor?s(t,i):de.isString(t)&&(t=t.trim())&&!$D(t)?s(ZD(t),i):t!=null&&E(i,t,x),this}get(t,i){if(t=kc(t),t){const x=de.findKey(this,t);if(x){const T=this[x];if(!i)return T;if(i===!0)return JD(T);if(de.isFunction(i))return i.call(this,T,x);if(de.isRegExp(i))return i.exec(T);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,i){if(t=kc(t),t){const x=de.findKey(this,t);return!!(x&&this[x]!==void 0&&(!i||T0(this,this[x],x,i)))}return!1}delete(t,i){const x=this;let T=!1;function E(s){if(s=kc(s),s){const y=de.findKey(x,s);y&&(!i||T0(x,x[y],y,i))&&(delete x[y],T=!0)}}return de.isArray(t)?t.forEach(E):E(t),T}clear(t){const i=Object.keys(this);let x=i.length,T=!1;for(;x--;){const E=i[x];(!t||T0(this,this[E],E,t,!0))&&(delete this[E],T=!0)}return T}normalize(t){const i=this,x={};return de.forEach(this,(T,E)=>{const s=de.findKey(x,E);if(s){i[s]=nm(T),delete i[E];return}const y=t?QD(E):String(E).trim();y!==E&&delete i[E],i[y]=nm(T),x[y]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const i=Object.create(null);return de.forEach(this,(x,T)=>{x!=null&&x!==!1&&(i[T]=t&&de.isArray(x)?x.join(", "):x)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,i])=>t+": "+i).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...i){const x=new this(t);return i.forEach(T=>x.set(T)),x}static accessor(t){const x=(this[TT]=this[TT]={accessors:{}}).accessors,T=this.prototype;function E(s){const y=kc(s);x[y]||(_D(T,s),x[y]=!0)}return de.isArray(t)?t.forEach(E):E(t),this}}sg.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);de.reduceDescriptors(sg.prototype,({value:g},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>g,set(x){this[i]=x}}});de.freezeMethods(sg);const Cl=sg;function E0(g,t){const i=this||r1,x=t||i,T=Cl.from(x.headers);let E=x.data;return de.forEach(g,function(y){E=y.call(i,E,T.normalize(),t?t.status:void 0)}),T.normalize(),E}function sw(g){return!!(g&&g.__CANCEL__)}function $d(g,t,i){Wi.call(this,g??"canceled",Wi.ERR_CANCELED,t,i),this.name="CanceledError"}de.inherits($d,Wi,{__CANCEL__:!0});function qD(g,t,i){const x=i.config.validateStatus;!i.status||!x||x(i.status)?g(i):t(new Wi("Request failed with status code "+i.status,[Wi.ERR_BAD_REQUEST,Wi.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}const tI=No.hasStandardBrowserEnv?{write(g,t,i,x,T,E){const s=[g+"="+encodeURIComponent(t)];de.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),de.isString(x)&&s.push("path="+x),de.isString(T)&&s.push("domain="+T),E===!0&&s.push("secure"),document.cookie=s.join("; ")},read(g){const t=document.cookie.match(new RegExp("(^|;\\s*)("+g+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(g){this.write(g,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function eI(g){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(g)}function iI(g,t){return t?g.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):g}function aw(g,t){return g&&!eI(t)?iI(g,t):t}const nI=No.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");let x;function T(E){let s=E;return t&&(i.setAttribute("href",s),s=i.href),i.setAttribute("href",s),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return x=T(window.location.href),function(s){const y=de.isString(s)?T(s):s;return y.protocol===x.protocol&&y.host===x.host}}():function(){return function(){return!0}}();function rI(g){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(g);return t&&t[1]||""}function sI(g,t){g=g||10;const i=new Array(g),x=new Array(g);let T=0,E=0,s;return t=t!==void 0?t:1e3,function(e){const r=Date.now(),p=x[E];s||(s=r),i[T]=e,x[T]=r;let h=E,a=0;for(;h!==T;)a+=i[h++],h=h%g;if(T=(T+1)%g,T===E&&(E=(E+1)%g),r-s{const E=T.loaded,s=T.lengthComputable?T.total:void 0,y=E-i,e=x(y),r=E<=s;i=E;const p={loaded:E,total:s,progress:s?E/s:void 0,bytes:y,rate:e||void 0,estimated:e&&s&&r?(s-E)/e:void 0,event:T};p[t?"download":"upload"]=!0,g(p)}}const aI=typeof XMLHttpRequest<"u",oI=aI&&function(g){return new Promise(function(i,x){let T=g.data;const E=Cl.from(g.headers).normalize();let{responseType:s,withXSRFToken:y}=g,e;function r(){g.cancelToken&&g.cancelToken.unsubscribe(e),g.signal&&g.signal.removeEventListener("abort",e)}let p;if(de.isFormData(T)){if(No.hasStandardBrowserEnv||No.hasStandardBrowserWebWorkerEnv)E.setContentType(!1);else if((p=E.getContentType())!==!1){const[u,...f]=p?p.split(";").map(o=>o.trim()).filter(Boolean):[];E.setContentType([u||"multipart/form-data",...f].join("; "))}}let h=new XMLHttpRequest;if(g.auth){const u=g.auth.username||"",f=g.auth.password?unescape(encodeURIComponent(g.auth.password)):"";E.set("Authorization","Basic "+btoa(u+":"+f))}const a=aw(g.baseURL,g.url);h.open(g.method.toUpperCase(),ew(a,g.params,g.paramsSerializer),!0),h.timeout=g.timeout;function l(){if(!h)return;const u=Cl.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),o={data:!s||s==="text"||s==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:u,config:g,request:h};qD(function(d){i(d),r()},function(d){x(d),r()},o),h=null}if("onloadend"in h?h.onloadend=l:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(l)},h.onabort=function(){h&&(x(new Wi("Request aborted",Wi.ECONNABORTED,g,h)),h=null)},h.onerror=function(){x(new Wi("Network Error",Wi.ERR_NETWORK,g,h)),h=null},h.ontimeout=function(){let f=g.timeout?"timeout of "+g.timeout+"ms exceeded":"timeout exceeded";const o=g.transitional||iw;g.timeoutErrorMessage&&(f=g.timeoutErrorMessage),x(new Wi(f,o.clarifyTimeoutError?Wi.ETIMEDOUT:Wi.ECONNABORTED,g,h)),h=null},No.hasStandardBrowserEnv&&(y&&de.isFunction(y)&&(y=y(g)),y||y!==!1&&nI(a))){const u=g.xsrfHeaderName&&g.xsrfCookieName&&tI.read(g.xsrfCookieName);u&&E.set(g.xsrfHeaderName,u)}T===void 0&&E.setContentType(null),"setRequestHeader"in h&&de.forEach(E.toJSON(),function(f,o){h.setRequestHeader(o,f)}),de.isUndefined(g.withCredentials)||(h.withCredentials=!!g.withCredentials),s&&s!=="json"&&(h.responseType=g.responseType),typeof g.onDownloadProgress=="function"&&h.addEventListener("progress",ET(g.onDownloadProgress,!0)),typeof g.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",ET(g.onUploadProgress)),(g.cancelToken||g.signal)&&(e=u=>{h&&(x(!u||u.type?new $d(null,g,h):u),h.abort(),h=null)},g.cancelToken&&g.cancelToken.subscribe(e),g.signal&&(g.signal.aborted?e():g.signal.addEventListener("abort",e)));const n=rI(a);if(n&&No.protocols.indexOf(n)===-1){x(new Wi("Unsupported protocol "+n+":",Wi.ERR_BAD_REQUEST,g));return}h.send(T||null)})},Uy={http:OD,xhr:oI};de.forEach(Uy,(g,t)=>{if(g){try{Object.defineProperty(g,"name",{value:t})}catch{}Object.defineProperty(g,"adapterName",{value:t})}});const MT=g=>`- ${g}`,lI=g=>de.isFunction(g)||g===null||g===!1,ow={getAdapter:g=>{g=de.isArray(g)?g:[g];const{length:t}=g;let i,x;const T={};for(let E=0;E`adapter ${y} `+(e===!1?"is not supported by the environment":"is not available in the build"));let s=t?E.length>1?`since : +*/function vT(g){return g.type==="ROLL_DICE"}class vu{constructor(t,i=4){this.bounds=t,this.capacity=i,this.points=[],this.divided=!1,this.cache=new Map}subdivide(){const{xMin:t,yMin:i,xMax:x,yMax:T}=this.bounds,E=(x-t)/2,s=(T-i)/2,y=t,e=i;this.northeast=new vu({xMin:y+E,xMax:y+2*E,yMin:i,yMax:e+s},this.capacity),this.northwest=new vu({xMin:t,xMax:y+E,yMin:i,yMax:e+s},this.capacity),this.southeast=new vu({xMin:y+E,xMax:y+2*E,yMin:e+s,yMax:e+2*s},this.capacity),this.southwest=new vu({xMin:t,xMax:y+E,yMin:e+s,yMax:e+2*s},this.capacity),this.divided=!0}insert(t){return this.contains(t.bounds)?this.points.length=i&&t.xMax<=T&&t.yMin>=x&&t.yMax<=E}generateCacheKey(t){const{xMin:i,xMax:x,yMin:T,yMax:E}=t;return`${i},${x},${T},${E}`}queryRange(t,i=[]){if(!this.intersects(t))return i;for(const x of this.points)this.isWithinBounds(x.bounds,t)&&i.push(x);return this.divided&&(this.northwest?.queryRange(t,i),this.northeast?.queryRange(t,i),this.southwest?.queryRange(t,i),this.southeast?.queryRange(t,i)),i}query(t,i=[]){const x=`${t.x},${t.y}`,T=this.cache.get(x);if(T)return T;if(!this.intersects({xMin:t.x,xMax:t.x,yMin:t.y,yMax:t.y}))return i;for(const E of this.points)this.isWithinRange(t,E.bounds)&&i.push(E);return this.divided&&(this.northwest?.query(t,i),this.northeast?.query(t,i),this.southwest?.query(t,i),this.southeast?.query(t,i)),this.cache.set(x,i),i}intersects(t){const{xMin:i,yMin:x,xMax:T,yMax:E}=this.bounds;return!(t.xMin>T||t.xMaxE||t.yMax=i.xMin&&t.xMin<=i.xMax&&t.yMax>=i.yMin&&t.yMin<=i.yMax}isWithinRange(t,i){return t.x>=i.xMin&&t.x<=i.xMax&&t.y>=i.yMin&&t.y<=i.yMax}}function QO(g,t,i){let x=new Set([...t,void 0]);return g.listen((T,E)=>{x.has(E)&&i(T,E)})}function XC(g,t){return function(){return g.apply(t,arguments)}}const{toString:_O}=Object.prototype,{getPrototypeOf:e1}=Object,eg=(g=>t=>{const i=_O.call(t);return g[i]||(g[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),Wo=g=>(g=g.toLowerCase(),t=>eg(t)===g),ig=g=>t=>typeof t===g,{isArray:sc}=Array,Td=ig("undefined");function qO(g){return g!==null&&!Td(g)&&g.constructor!==null&&!Td(g.constructor)&&wa(g.constructor.isBuffer)&&g.constructor.isBuffer(g)}const YC=Wo("ArrayBuffer");function tD(g){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(g):t=g&&g.buffer&&YC(g.buffer),t}const eD=ig("string"),wa=ig("function"),kC=ig("number"),ng=g=>g!==null&&typeof g=="object",iD=g=>g===!0||g===!1,im=g=>{if(eg(g)!=="object")return!1;const t=e1(g);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in g)&&!(Symbol.iterator in g)},nD=Wo("Date"),rD=Wo("File"),sD=Wo("Blob"),aD=Wo("FileList"),oD=g=>ng(g)&&wa(g.pipe),lD=g=>{let t;return g&&(typeof FormData=="function"&&g instanceof FormData||wa(g.append)&&((t=eg(g))==="formdata"||t==="object"&&wa(g.toString)&&g.toString()==="[object FormData]"))},hD=Wo("URLSearchParams"),uD=g=>g.trim?g.trim():g.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jd(g,t,{allOwnKeys:i=!1}={}){if(g===null||typeof g>"u")return;let x,T;if(typeof g!="object"&&(g=[g]),sc(g))for(x=0,T=g.length;x0;)if(T=i[x],t===T.toLowerCase())return T;return null}const KC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ZC=g=>!Td(g)&&g!==KC;function Ny(){const{caseless:g}=ZC(this)&&this||{},t={},i=(x,T)=>{const E=g&&jC(t,T)||T;im(t[E])&&im(x)?t[E]=Ny(t[E],x):im(x)?t[E]=Ny({},x):sc(x)?t[E]=x.slice():t[E]=x};for(let x=0,T=arguments.length;x(Jd(t,(T,E)=>{i&&wa(T)?g[E]=XC(T,i):g[E]=T},{allOwnKeys:x}),g),cD=g=>(g.charCodeAt(0)===65279&&(g=g.slice(1)),g),dD=(g,t,i,x)=>{g.prototype=Object.create(t.prototype,x),g.prototype.constructor=g,Object.defineProperty(g,"super",{value:t.prototype}),i&&Object.assign(g.prototype,i)},pD=(g,t,i,x)=>{let T,E,s;const y={};if(t=t||{},g==null)return t;do{for(T=Object.getOwnPropertyNames(g),E=T.length;E-- >0;)s=T[E],(!x||x(s,g,t))&&!y[s]&&(t[s]=g[s],y[s]=!0);g=i!==!1&&e1(g)}while(g&&(!i||i(g,t))&&g!==Object.prototype);return t},vD=(g,t,i)=>{g=String(g),(i===void 0||i>g.length)&&(i=g.length),i-=t.length;const x=g.indexOf(t,i);return x!==-1&&x===i},mD=g=>{if(!g)return null;if(sc(g))return g;let t=g.length;if(!kC(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=g[t];return i},gD=(g=>t=>g&&t instanceof g)(typeof Uint8Array<"u"&&e1(Uint8Array)),yD=(g,t)=>{const x=(g&&g[Symbol.iterator]).call(g);let T;for(;(T=x.next())&&!T.done;){const E=T.value;t.call(g,E[0],E[1])}},xD=(g,t)=>{let i;const x=[];for(;(i=g.exec(t))!==null;)x.push(i);return x},SD=Wo("HTMLFormElement"),TD=g=>g.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,x,T){return x.toUpperCase()+T}),mT=(({hasOwnProperty:g})=>(t,i)=>g.call(t,i))(Object.prototype),ED=Wo("RegExp"),JC=(g,t)=>{const i=Object.getOwnPropertyDescriptors(g),x={};Jd(i,(T,E)=>{let s;(s=t(T,E,g))!==!1&&(x[E]=s||T)}),Object.defineProperties(g,x)},MD=g=>{JC(g,(t,i)=>{if(wa(g)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const x=g[i];if(wa(x)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},CD=(g,t)=>{const i={},x=T=>{T.forEach(E=>{i[E]=!0})};return sc(g)?x(g):x(String(g).split(t)),i},wD=()=>{},AD=(g,t)=>(g=+g,Number.isFinite(g)?g:t),S0="abcdefghijklmnopqrstuvwxyz",gT="0123456789",$C={DIGIT:gT,ALPHA:S0,ALPHA_DIGIT:S0+S0.toUpperCase()+gT},PD=(g=16,t=$C.ALPHA_DIGIT)=>{let i="";const{length:x}=t;for(;g--;)i+=t[Math.random()*x|0];return i};function RD(g){return!!(g&&wa(g.append)&&g[Symbol.toStringTag]==="FormData"&&g[Symbol.iterator])}const bD=g=>{const t=new Array(10),i=(x,T)=>{if(ng(x)){if(t.indexOf(x)>=0)return;if(!("toJSON"in x)){t[T]=x;const E=sc(x)?[]:{};return Jd(x,(s,y)=>{const e=i(s,T+1);!Td(e)&&(E[y]=e)}),t[T]=void 0,E}}return x};return i(g,0)},LD=Wo("AsyncFunction"),FD=g=>g&&(ng(g)||wa(g))&&wa(g.then)&&wa(g.catch),de={isArray:sc,isArrayBuffer:YC,isBuffer:qO,isFormData:lD,isArrayBufferView:tD,isString:eD,isNumber:kC,isBoolean:iD,isObject:ng,isPlainObject:im,isUndefined:Td,isDate:nD,isFile:rD,isBlob:sD,isRegExp:ED,isFunction:wa,isStream:oD,isURLSearchParams:hD,isTypedArray:gD,isFileList:aD,forEach:Jd,merge:Ny,extend:fD,trim:uD,stripBOM:cD,inherits:dD,toFlatObject:pD,kindOf:eg,kindOfTest:Wo,endsWith:vD,toArray:mD,forEachEntry:yD,matchAll:xD,isHTMLForm:SD,hasOwnProperty:mT,hasOwnProp:mT,reduceDescriptors:JC,freezeMethods:MD,toObjectSet:CD,toCamelCase:TD,noop:wD,toFiniteNumber:AD,findKey:jC,global:KC,isContextDefined:ZC,ALPHABET:$C,generateString:PD,isSpecCompliantForm:RD,toJSONObject:bD,isAsyncFn:LD,isThenable:FD};function Wi(g,t,i,x,T){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=g,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),x&&(this.request=x),T&&(this.response=T)}de.inherits(Wi,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const QC=Wi.prototype,_C={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(g=>{_C[g]={value:g}});Object.defineProperties(Wi,_C);Object.defineProperty(QC,"isAxiosError",{value:!0});Wi.from=(g,t,i,x,T,E)=>{const s=Object.create(QC);return de.toFlatObject(g,s,function(e){return e!==Error.prototype},y=>y!=="isAxiosError"),Wi.call(s,g.message,t,i,x,T),s.cause=g,s.name=g.name,E&&Object.assign(s,E),s};const OD=null;function By(g){return de.isPlainObject(g)||de.isArray(g)}function qC(g){return de.endsWith(g,"[]")?g.slice(0,-2):g}function yT(g,t,i){return g?g.concat(t).map(function(T,E){return T=qC(T),!i&&E?"["+T+"]":T}).join(i?".":""):t}function DD(g){return de.isArray(g)&&!g.some(By)}const ID=de.toFlatObject(de,{},null,function(t){return/^is[A-Z]/.test(t)});function rg(g,t,i){if(!de.isObject(g))throw new TypeError("target must be an object");t=t||new FormData,i=de.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,f){return!de.isUndefined(f[u])});const x=i.metaTokens,T=i.visitor||p,E=i.dots,s=i.indexes,e=(i.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(t);if(!de.isFunction(T))throw new TypeError("visitor must be a function");function r(n){if(n===null)return"";if(de.isDate(n))return n.toISOString();if(!e&&de.isBlob(n))throw new Wi("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(n)||de.isTypedArray(n)?e&&typeof Blob=="function"?new Blob([n]):Buffer.from(n):n}function p(n,u,f){let o=n;if(n&&!f&&typeof n=="object"){if(de.endsWith(u,"{}"))u=x?u:u.slice(0,-2),n=JSON.stringify(n);else if(de.isArray(n)&&DD(n)||(de.isFileList(n)||de.endsWith(u,"[]"))&&(o=de.toArray(n)))return u=qC(u),o.forEach(function(d,v){!(de.isUndefined(d)||d===null)&&t.append(s===!0?yT([u],v,E):s===null?u:u+"[]",r(d))}),!1}return By(n)?!0:(t.append(yT(f,u,E),r(n)),!1)}const h=[],a=Object.assign(ID,{defaultVisitor:p,convertValue:r,isVisitable:By});function l(n,u){if(!de.isUndefined(n)){if(h.indexOf(n)!==-1)throw Error("Circular reference detected in "+u.join("."));h.push(n),de.forEach(n,function(o,c){(!(de.isUndefined(o)||o===null)&&T.call(t,o,de.isString(c)?c.trim():c,u,a))===!0&&l(o,u?u.concat(c):[c])}),h.pop()}}if(!de.isObject(g))throw new TypeError("data must be an object");return l(g),t}function xT(g){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(g).replace(/[!'()~]|%20|%00/g,function(x){return t[x]})}function i1(g,t){this._pairs=[],g&&rg(g,this,t)}const tw=i1.prototype;tw.append=function(t,i){this._pairs.push([t,i])};tw.toString=function(t){const i=t?function(x){return t.call(this,x,xT)}:xT;return this._pairs.map(function(T){return i(T[0])+"="+i(T[1])},"").join("&")};function ND(g){return encodeURIComponent(g).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ew(g,t,i){if(!t)return g;const x=i&&i.encode||ND,T=i&&i.serialize;let E;if(T?E=T(t,i):E=de.isURLSearchParams(t)?t.toString():new i1(t,i).toString(x),E){const s=g.indexOf("#");s!==-1&&(g=g.slice(0,s)),g+=(g.indexOf("?")===-1?"?":"&")+E}return g}class ST{constructor(){this.handlers=[]}use(t,i,x){return this.handlers.push({fulfilled:t,rejected:i,synchronous:x?x.synchronous:!1,runWhen:x?x.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){de.forEach(this.handlers,function(x){x!==null&&t(x)})}}const iw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},BD=typeof URLSearchParams<"u"?URLSearchParams:i1,UD=typeof FormData<"u"?FormData:null,zD=typeof Blob<"u"?Blob:null,GD={isBrowser:!0,classes:{URLSearchParams:BD,FormData:UD,Blob:zD},protocols:["http","https","file","blob","url","data"]},nw=typeof window<"u"&&typeof document<"u",VD=(g=>nw&&["ReactNative","NativeScript","NS"].indexOf(g)<0)(typeof navigator<"u"&&navigator.product),HD=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",WD=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:nw,hasStandardBrowserEnv:VD,hasStandardBrowserWebWorkerEnv:HD},Symbol.toStringTag,{value:"Module"})),No={...WD,...GD};function XD(g,t){return rg(g,new No.classes.URLSearchParams,Object.assign({visitor:function(i,x,T,E){return No.isNode&&de.isBuffer(i)?(this.append(x,i.toString("base64")),!1):E.defaultVisitor.apply(this,arguments)}},t))}function YD(g){return de.matchAll(/\w+|\[(\w*)]/g,g).map(t=>t[0]==="[]"?"":t[1]||t[0])}function kD(g){const t={},i=Object.keys(g);let x;const T=i.length;let E;for(x=0;x=i.length;return s=!s&&de.isArray(T)?T.length:s,e?(de.hasOwnProp(T,s)?T[s]=[T[s],x]:T[s]=x,!y):((!T[s]||!de.isObject(T[s]))&&(T[s]=[]),t(i,x,T[s],E)&&de.isArray(T[s])&&(T[s]=kD(T[s])),!y)}if(de.isFormData(g)&&de.isFunction(g.entries)){const i={};return de.forEachEntry(g,(x,T)=>{t(YD(x),T,i,0)}),i}return null}function jD(g,t,i){if(de.isString(g))try{return(t||JSON.parse)(g),de.trim(g)}catch(x){if(x.name!=="SyntaxError")throw x}return(i||JSON.stringify)(g)}const n1={transitional:iw,adapter:["xhr","http"],transformRequest:[function(t,i){const x=i.getContentType()||"",T=x.indexOf("application/json")>-1,E=de.isObject(t);if(E&&de.isHTMLForm(t)&&(t=new FormData(t)),de.isFormData(t))return T?JSON.stringify(rw(t)):t;if(de.isArrayBuffer(t)||de.isBuffer(t)||de.isStream(t)||de.isFile(t)||de.isBlob(t))return t;if(de.isArrayBufferView(t))return t.buffer;if(de.isURLSearchParams(t))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let y;if(E){if(x.indexOf("application/x-www-form-urlencoded")>-1)return XD(t,this.formSerializer).toString();if((y=de.isFileList(t))||x.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return rg(y?{"files[]":t}:t,e&&new e,this.formSerializer)}}return E||T?(i.setContentType("application/json",!1),jD(t)):t}],transformResponse:[function(t){const i=this.transitional||n1.transitional,x=i&&i.forcedJSONParsing,T=this.responseType==="json";if(t&&de.isString(t)&&(x&&!this.responseType||T)){const s=!(i&&i.silentJSONParsing)&&T;try{return JSON.parse(t)}catch(y){if(s)throw y.name==="SyntaxError"?Wi.from(y,Wi.ERR_BAD_RESPONSE,this,null,this.response):y}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:No.classes.FormData,Blob:No.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],g=>{n1.headers[g]={}});const r1=n1,KD=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ZD=g=>{const t={};let i,x,T;return g&&g.split(` +`).forEach(function(s){T=s.indexOf(":"),i=s.substring(0,T).trim().toLowerCase(),x=s.substring(T+1).trim(),!(!i||t[i]&&KD[i])&&(i==="set-cookie"?t[i]?t[i].push(x):t[i]=[x]:t[i]=t[i]?t[i]+", "+x:x)}),t},TT=Symbol("internals");function jc(g){return g&&String(g).trim().toLowerCase()}function nm(g){return g===!1||g==null?g:de.isArray(g)?g.map(nm):String(g)}function JD(g){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let x;for(;x=i.exec(g);)t[x[1]]=x[2];return t}const $D=g=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(g.trim());function T0(g,t,i,x,T){if(de.isFunction(x))return x.call(this,t,i);if(T&&(t=i),!!de.isString(t)){if(de.isString(x))return t.indexOf(x)!==-1;if(de.isRegExp(x))return x.test(t)}}function QD(g){return g.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,i,x)=>i.toUpperCase()+x)}function _D(g,t){const i=de.toCamelCase(" "+t);["get","set","has"].forEach(x=>{Object.defineProperty(g,x+i,{value:function(T,E,s){return this[x].call(this,t,T,E,s)},configurable:!0})})}class sg{constructor(t){t&&this.set(t)}set(t,i,x){const T=this;function E(y,e,r){const p=jc(e);if(!p)throw new Error("header name must be a non-empty string");const h=de.findKey(T,p);(!h||T[h]===void 0||r===!0||r===void 0&&T[h]!==!1)&&(T[h||e]=nm(y))}const s=(y,e)=>de.forEach(y,(r,p)=>E(r,p,e));return de.isPlainObject(t)||t instanceof this.constructor?s(t,i):de.isString(t)&&(t=t.trim())&&!$D(t)?s(ZD(t),i):t!=null&&E(i,t,x),this}get(t,i){if(t=jc(t),t){const x=de.findKey(this,t);if(x){const T=this[x];if(!i)return T;if(i===!0)return JD(T);if(de.isFunction(i))return i.call(this,T,x);if(de.isRegExp(i))return i.exec(T);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,i){if(t=jc(t),t){const x=de.findKey(this,t);return!!(x&&this[x]!==void 0&&(!i||T0(this,this[x],x,i)))}return!1}delete(t,i){const x=this;let T=!1;function E(s){if(s=jc(s),s){const y=de.findKey(x,s);y&&(!i||T0(x,x[y],y,i))&&(delete x[y],T=!0)}}return de.isArray(t)?t.forEach(E):E(t),T}clear(t){const i=Object.keys(this);let x=i.length,T=!1;for(;x--;){const E=i[x];(!t||T0(this,this[E],E,t,!0))&&(delete this[E],T=!0)}return T}normalize(t){const i=this,x={};return de.forEach(this,(T,E)=>{const s=de.findKey(x,E);if(s){i[s]=nm(T),delete i[E];return}const y=t?QD(E):String(E).trim();y!==E&&delete i[E],i[y]=nm(T),x[y]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const i=Object.create(null);return de.forEach(this,(x,T)=>{x!=null&&x!==!1&&(i[T]=t&&de.isArray(x)?x.join(", "):x)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,i])=>t+": "+i).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...i){const x=new this(t);return i.forEach(T=>x.set(T)),x}static accessor(t){const x=(this[TT]=this[TT]={accessors:{}}).accessors,T=this.prototype;function E(s){const y=jc(s);x[y]||(_D(T,s),x[y]=!0)}return de.isArray(t)?t.forEach(E):E(t),this}}sg.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);de.reduceDescriptors(sg.prototype,({value:g},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>g,set(x){this[i]=x}}});de.freezeMethods(sg);const Cl=sg;function E0(g,t){const i=this||r1,x=t||i,T=Cl.from(x.headers);let E=x.data;return de.forEach(g,function(y){E=y.call(i,E,T.normalize(),t?t.status:void 0)}),T.normalize(),E}function sw(g){return!!(g&&g.__CANCEL__)}function $d(g,t,i){Wi.call(this,g??"canceled",Wi.ERR_CANCELED,t,i),this.name="CanceledError"}de.inherits($d,Wi,{__CANCEL__:!0});function qD(g,t,i){const x=i.config.validateStatus;!i.status||!x||x(i.status)?g(i):t(new Wi("Request failed with status code "+i.status,[Wi.ERR_BAD_REQUEST,Wi.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}const tI=No.hasStandardBrowserEnv?{write(g,t,i,x,T,E){const s=[g+"="+encodeURIComponent(t)];de.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),de.isString(x)&&s.push("path="+x),de.isString(T)&&s.push("domain="+T),E===!0&&s.push("secure"),document.cookie=s.join("; ")},read(g){const t=document.cookie.match(new RegExp("(^|;\\s*)("+g+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(g){this.write(g,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function eI(g){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(g)}function iI(g,t){return t?g.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):g}function aw(g,t){return g&&!eI(t)?iI(g,t):t}const nI=No.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");let x;function T(E){let s=E;return t&&(i.setAttribute("href",s),s=i.href),i.setAttribute("href",s),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return x=T(window.location.href),function(s){const y=de.isString(s)?T(s):s;return y.protocol===x.protocol&&y.host===x.host}}():function(){return function(){return!0}}();function rI(g){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(g);return t&&t[1]||""}function sI(g,t){g=g||10;const i=new Array(g),x=new Array(g);let T=0,E=0,s;return t=t!==void 0?t:1e3,function(e){const r=Date.now(),p=x[E];s||(s=r),i[T]=e,x[T]=r;let h=E,a=0;for(;h!==T;)a+=i[h++],h=h%g;if(T=(T+1)%g,T===E&&(E=(E+1)%g),r-s{const E=T.loaded,s=T.lengthComputable?T.total:void 0,y=E-i,e=x(y),r=E<=s;i=E;const p={loaded:E,total:s,progress:s?E/s:void 0,bytes:y,rate:e||void 0,estimated:e&&s&&r?(s-E)/e:void 0,event:T};p[t?"download":"upload"]=!0,g(p)}}const aI=typeof XMLHttpRequest<"u",oI=aI&&function(g){return new Promise(function(i,x){let T=g.data;const E=Cl.from(g.headers).normalize();let{responseType:s,withXSRFToken:y}=g,e;function r(){g.cancelToken&&g.cancelToken.unsubscribe(e),g.signal&&g.signal.removeEventListener("abort",e)}let p;if(de.isFormData(T)){if(No.hasStandardBrowserEnv||No.hasStandardBrowserWebWorkerEnv)E.setContentType(!1);else if((p=E.getContentType())!==!1){const[u,...f]=p?p.split(";").map(o=>o.trim()).filter(Boolean):[];E.setContentType([u||"multipart/form-data",...f].join("; "))}}let h=new XMLHttpRequest;if(g.auth){const u=g.auth.username||"",f=g.auth.password?unescape(encodeURIComponent(g.auth.password)):"";E.set("Authorization","Basic "+btoa(u+":"+f))}const a=aw(g.baseURL,g.url);h.open(g.method.toUpperCase(),ew(a,g.params,g.paramsSerializer),!0),h.timeout=g.timeout;function l(){if(!h)return;const u=Cl.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),o={data:!s||s==="text"||s==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:u,config:g,request:h};qD(function(d){i(d),r()},function(d){x(d),r()},o),h=null}if("onloadend"in h?h.onloadend=l:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(l)},h.onabort=function(){h&&(x(new Wi("Request aborted",Wi.ECONNABORTED,g,h)),h=null)},h.onerror=function(){x(new Wi("Network Error",Wi.ERR_NETWORK,g,h)),h=null},h.ontimeout=function(){let f=g.timeout?"timeout of "+g.timeout+"ms exceeded":"timeout exceeded";const o=g.transitional||iw;g.timeoutErrorMessage&&(f=g.timeoutErrorMessage),x(new Wi(f,o.clarifyTimeoutError?Wi.ETIMEDOUT:Wi.ECONNABORTED,g,h)),h=null},No.hasStandardBrowserEnv&&(y&&de.isFunction(y)&&(y=y(g)),y||y!==!1&&nI(a))){const u=g.xsrfHeaderName&&g.xsrfCookieName&&tI.read(g.xsrfCookieName);u&&E.set(g.xsrfHeaderName,u)}T===void 0&&E.setContentType(null),"setRequestHeader"in h&&de.forEach(E.toJSON(),function(f,o){h.setRequestHeader(o,f)}),de.isUndefined(g.withCredentials)||(h.withCredentials=!!g.withCredentials),s&&s!=="json"&&(h.responseType=g.responseType),typeof g.onDownloadProgress=="function"&&h.addEventListener("progress",ET(g.onDownloadProgress,!0)),typeof g.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",ET(g.onUploadProgress)),(g.cancelToken||g.signal)&&(e=u=>{h&&(x(!u||u.type?new $d(null,g,h):u),h.abort(),h=null)},g.cancelToken&&g.cancelToken.subscribe(e),g.signal&&(g.signal.aborted?e():g.signal.addEventListener("abort",e)));const n=rI(a);if(n&&No.protocols.indexOf(n)===-1){x(new Wi("Unsupported protocol "+n+":",Wi.ERR_BAD_REQUEST,g));return}h.send(T||null)})},Uy={http:OD,xhr:oI};de.forEach(Uy,(g,t)=>{if(g){try{Object.defineProperty(g,"name",{value:t})}catch{}Object.defineProperty(g,"adapterName",{value:t})}});const MT=g=>`- ${g}`,lI=g=>de.isFunction(g)||g===null||g===!1,ow={getAdapter:g=>{g=de.isArray(g)?g:[g];const{length:t}=g;let i,x;const T={};for(let E=0;E`adapter ${y} `+(e===!1?"is not supported by the environment":"is not available in the build"));let s=t?E.length>1?`since : `+E.map(MT).join(` -`):" "+MT(E[0]):"as no adapter specified";throw new Wi("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return x},adapters:Uy};function M0(g){if(g.cancelToken&&g.cancelToken.throwIfRequested(),g.signal&&g.signal.aborted)throw new $d(null,g)}function CT(g){return M0(g),g.headers=Cl.from(g.headers),g.data=E0.call(g,g.transformRequest),["post","put","patch"].indexOf(g.method)!==-1&&g.headers.setContentType("application/x-www-form-urlencoded",!1),ow.getAdapter(g.adapter||r1.adapter)(g).then(function(x){return M0(g),x.data=E0.call(g,g.transformResponse,x),x.headers=Cl.from(x.headers),x},function(x){return sw(x)||(M0(g),x&&x.response&&(x.response.data=E0.call(g,g.transformResponse,x.response),x.response.headers=Cl.from(x.response.headers))),Promise.reject(x)})}const wT=g=>g instanceof Cl?g.toJSON():g;function Qf(g,t){t=t||{};const i={};function x(r,p,h){return de.isPlainObject(r)&&de.isPlainObject(p)?de.merge.call({caseless:h},r,p):de.isPlainObject(p)?de.merge({},p):de.isArray(p)?p.slice():p}function T(r,p,h){if(de.isUndefined(p)){if(!de.isUndefined(r))return x(void 0,r,h)}else return x(r,p,h)}function E(r,p){if(!de.isUndefined(p))return x(void 0,p)}function s(r,p){if(de.isUndefined(p)){if(!de.isUndefined(r))return x(void 0,r)}else return x(void 0,p)}function y(r,p,h){if(h in t)return x(r,p);if(h in g)return x(void 0,r)}const e={url:E,method:E,data:E,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:y,headers:(r,p)=>T(wT(r),wT(p),!0)};return de.forEach(Object.keys(Object.assign({},g,t)),function(p){const h=e[p]||T,a=h(g[p],t[p],p);de.isUndefined(a)&&h!==y||(i[p]=a)}),i}const lw="1.6.7",s1={};["object","boolean","number","function","string","symbol"].forEach((g,t)=>{s1[g]=function(x){return typeof x===g||"a"+(t<1?"n ":" ")+g}});const AT={};s1.transitional=function(t,i,x){function T(E,s){return"[Axios v"+lw+"] Transitional option '"+E+"'"+s+(x?". "+x:"")}return(E,s,y)=>{if(t===!1)throw new Wi(T(s," has been removed"+(i?" in "+i:"")),Wi.ERR_DEPRECATED);return i&&!AT[s]&&(AT[s]=!0,console.warn(T(s," has been deprecated since v"+i+" and will be removed in the near future"))),t?t(E,s,y):!0}};function hI(g,t,i){if(typeof g!="object")throw new Wi("options must be an object",Wi.ERR_BAD_OPTION_VALUE);const x=Object.keys(g);let T=x.length;for(;T-- >0;){const E=x[T],s=t[E];if(s){const y=g[E],e=y===void 0||s(y,E,g);if(e!==!0)throw new Wi("option "+E+" must be "+e,Wi.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new Wi("Unknown option "+E,Wi.ERR_BAD_OPTION)}}const zy={assertOptions:hI,validators:s1},ql=zy.validators;class xm{constructor(t){this.defaults=t,this.interceptors={request:new ST,response:new ST}}async request(t,i){try{return await this._request(t,i)}catch(x){if(x instanceof Error){let T;Error.captureStackTrace?Error.captureStackTrace(T={}):T=new Error;const E=T.stack?T.stack.replace(/^.+\n/,""):"";x.stack?E&&!String(x.stack).endsWith(E.replace(/^.+\n.+\n/,""))&&(x.stack+=` -`+E):x.stack=E}throw x}}_request(t,i){typeof t=="string"?(i=i||{},i.url=t):i=t||{},i=Qf(this.defaults,i);const{transitional:x,paramsSerializer:T,headers:E}=i;x!==void 0&&zy.assertOptions(x,{silentJSONParsing:ql.transitional(ql.boolean),forcedJSONParsing:ql.transitional(ql.boolean),clarifyTimeoutError:ql.transitional(ql.boolean)},!1),T!=null&&(de.isFunction(T)?i.paramsSerializer={serialize:T}:zy.assertOptions(T,{encode:ql.function,serialize:ql.function},!0)),i.method=(i.method||this.defaults.method||"get").toLowerCase();let s=E&&de.merge(E.common,E[i.method]);E&&de.forEach(["delete","get","head","post","put","patch","common"],n=>{delete E[n]}),i.headers=Cl.concat(s,E);const y=[];let e=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(i)===!1||(e=e&&u.synchronous,y.unshift(u.fulfilled,u.rejected))});const r=[];this.interceptors.response.forEach(function(u){r.push(u.fulfilled,u.rejected)});let p,h=0,a;if(!e){const n=[CT.bind(this),void 0];for(n.unshift.apply(n,y),n.push.apply(n,r),a=n.length,p=Promise.resolve(i);h{if(!x._listeners)return;let E=x._listeners.length;for(;E-- >0;)x._listeners[E](T);x._listeners=null}),this.promise.then=T=>{let E;const s=new Promise(y=>{x.subscribe(y),E=y}).then(T);return s.cancel=function(){x.unsubscribe(E)},s},t(function(E,s,y){x.reason||(x.reason=new $d(E,s,y),i(x.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const i=this._listeners.indexOf(t);i!==-1&&this._listeners.splice(i,1)}static source(){let t;return{token:new a1(function(T){t=T}),cancel:t}}}const uI=a1;function fI(g){return function(i){return g.apply(null,i)}}function cI(g){return de.isObject(g)&&g.isAxiosError===!0}const Gy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Gy).forEach(([g,t])=>{Gy[t]=g});const dI=Gy;function hw(g){const t=new rm(g),i=XC(rm.prototype.request,t);return de.extend(i,rm.prototype,t,{allOwnKeys:!0}),de.extend(i,t,null,{allOwnKeys:!0}),i.create=function(T){return hw(Qf(g,T))},i}const gn=hw(r1);gn.Axios=rm;gn.CanceledError=$d;gn.CancelToken=uI;gn.isCancel=sw;gn.VERSION=lw;gn.toFormData=rg;gn.AxiosError=Wi;gn.Cancel=gn.CanceledError;gn.all=function(t){return Promise.all(t)};gn.spread=fI;gn.isAxiosError=cI;gn.mergeConfig=Qf;gn.AxiosHeaders=Cl;gn.formToJSON=g=>rw(de.isHTMLForm(g)?new FormData(g):g);gn.getAdapter=ow.getAdapter;gn.HttpStatusCode=dI;gn.default=gn;const zf="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function pI(g,t,i){for(;g.length=0;x--){const T=g%zf.length;i=zf.charAt(T)+i,g=Math.floor(g/zf.length)}return pI(i,t,zf[0])}function o1(){const g=Date.now(),t=gI(g,10),i=mI(16);return t+i}const yI={id:"",title:"",description:"",journals:[],isComplete:!1,reward:""},xI={backpack:[],equipment:{head:null,body:null,legs:null,feet:null,hands:null,weapon:null,shield:null,accessory:null}},uw={},SI={inCombat:!1,isDead:!1,isResting:!1,activeBoosts:{}},TI={username:"Guest",health:"100",mana:"100",energy:"100",maxHealth:"100",maxMana:"100",maxEnergy:"100",armour:"0",agility:"0",strength:"0",intelligence:"0",experience:"0",reputation:"0",faith:"0"},EI={stats:TI,inventory:xI,state:SI},MI={tooltipItem:{id:null,position:{x:0,y:0}},submenuItem:{id:null,position:{x:0,y:0}},tooltipNPC:{id:null,position:{x:0,y:0}},isStatsMenuCollapsed:!1,isSettingsMenuCollapsed:!1,debugMode:!1},CI={gamemode:"Idle",action:{type:"ROLL_DICE",diceValues:[],isRolling:!1},textures:{side1:"",side2:"",side3:"",side4:"",side5:"",side6:""}},wI=g=>{Ir(async()=>{Jr.set({...Jr.get(),[g.id]:g})})},AI=g=>{Ir(async()=>{const t=Jr.get(),{[g]:i,...x}=t;Jr.set(x)})};function Iu(g,t){return FL(g,t,{encode(i){return JSON.stringify(i)},decode(i){try{return JSON.parse(i)}catch{return t}}})}const Tn=Iu("playerData",EI),PI=Iu("quest",yI),Jr=Iu("items",uw),Qh=Iu("notifications",[]),fw=Iu("itemDB",uw),Sm=Iu("settings",MI),Ed=Iu("minigameState",CI),gl=g=>Sm.get()[g],uh=(g,t)=>{Ir(async()=>{const i=Sm.get();Sm.set({...i,[g]:t})})},RI=()=>{Ir(async()=>{try{const t=(await gn.get("https://kbve.com/api/itemdb.json")).data,i={};Object.keys(t.key).forEach(x=>{const T=t.key[x];i[T.id]=T,i[T.name]=T}),fw.set(i)}catch(g){console.error("Failed to reload item database:",g)}})},bI=g=>fw.get()[g],LI=g=>{Ir(async()=>{const t=Tn.get();t.inventory.backpack.push(g),Tn.set({...t})})},Tl=g=>{const i=Jr.get()[g];if(i)return i;console.warn(`Item with ID ${g} not found.`)},FI=g=>{Ir(async()=>{const t=o1(),i={...g,id:t};wI(i),LI(i.id),Si.emit("notification",{title:"Success",message:`You got a ${i.name}, verified by E Corp ID ${i.id}`,notificationType:Ru.success})})},OI=(g,t)=>{Ir(async()=>{const i=Tn.get(),x=Jr.get()[t];if(x){const T=i.inventory.equipment[g];if(T){const E=Jr.get()[T];E.equipped=!1,Jr.set({...Jr.get(),[E.id]:E})}x.equipped=!0,Jr.set({...Jr.get(),[x.id]:x}),i.inventory.equipment[g]=t,Tn.set({...i})}})},DI=g=>{Ir(async()=>{const t=Tn.get(),i=t.inventory.equipment[g];if(i){const x=Jr.get()[i];x&&(x.equipped=!1,Jr.set({...Jr.get(),[x.id]:x}),t.inventory.equipment[g]=null,Tn.set({...t}))}})},PT=g=>{Ir(async()=>{const t=Tn.get(),i=Jr.get()[g];i&&!i.equipped?(t.inventory.backpack=t.inventory.backpack.filter(x=>x!==g),Tn.set({...t}),AI(g)):Si.emit("notification",{title:"Warning",message:"Cannot remove item that is currently equipped.",notificationType:Ru.warning})})},cw=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.health,10),x=Math.max(i-g,0);t.stats={...t.stats,health:x.toString()},Tn.set({...t})})},II=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.health,10),x=parseInt(t.stats.maxHealth,10),T=Math.min(i+g,x);t.stats={...t.stats,health:T.toString()},Tn.set({...t})})},NI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.mana,10),x=Math.max(i-g,0);t.stats={...t.stats,mana:x.toString()},Tn.set({...t})})},BI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.mana,10),x=parseInt(t.stats.maxMana,10),T=Math.min(i+g,x);t.stats={...t.stats,mana:T.toString()},Tn.set({...t})})},UI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.energy,10),x=Math.max(i-g,0);t.stats={...t.stats,energy:x.toString()},Tn.set({...t})})},zI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.energy,10),x=parseInt(t.stats.maxEnergy,10),T=Math.min(i+g,x);t.stats={...t.stats,energy:T.toString()},Tn.set({...t})})},GI=g=>{if(g.health!==void 0){const t=parseInt(g.health,10);t>0?II(t):cw(Math.abs(t))}if(g.mana!==void 0){const t=parseInt(g.mana,10);t>0?BI(t):NI(Math.abs(t))}if(g.energy!==void 0){const t=parseInt(g.energy,10);t>0?zI(t):UI(Math.abs(t))}},VI=async g=>{const t=o1();Ir(async()=>{const i=Tn.get();i.state.activeBoosts[t]={...g,expiry:Date.now()+g.duration*1e3},Tn.set({...i})})},HI=g=>{Ir(async()=>{const t=Tn.get(),i=g.bonuses,x={health:i?.health!==void 0?i.health.toString():void 0,mana:i?.mana!==void 0?i.mana.toString():void 0,energy:i?.energy!==void 0?i.energy.toString():void 0};GI(x),g.boost&&VI(g.boost),g.action&&console.log(`Action: ${g.action}`),Tn.set({...t})})},WI=g=>{const t=Tl(g);if(!t)return[];const i=["view","discard"];return t.consumable&&i.push("consume"),t.equipped?i.push("unequip"):t.consumable||i.push("equip"),i},Ru={caution:{type:"caution",color:"bg-yellow-200 border-yellow-300 text-yellow-700",imgUrl:"/assets/icons/notification.svg"},warning:{type:"warning",color:"bg-orange-200 border-orange-300 text-orange-700",imgUrl:"/assets/icons/notification.svg"},danger:{type:"danger",color:"bg-red-200 border-red-300 text-red-700",imgUrl:"/assets/icons/notification.svg"},success:{type:"success",color:"bg-green-200 border-green-300 text-green-700",imgUrl:"/assets/icons/notification.svg"},info:{type:"info",color:"bg-blue-200 border-blue-300 text-blue-700",imgUrl:"/assets/icons/notification.svg"}};function Qd(g){try{Ir(async()=>{const t=Ed.get();Ed.set({...t,...g})})}catch(t){console.error("Error updating minigame state:",t)}}function XI(g){Qd({gamemode:g})}function YI(g){Qd({action:g})}function kI(g){Qd({textures:g})}function dw(g){const t=Ed.get();t.gamemode==="Dice"&&t.action.type==="ROLL_DICE"&&Qd({action:{...t.action,diceValues:g}})}function RT(g){const t=Ed.get();t.gamemode==="Dice"&&t.action.type==="ROLL_DICE"&&Qd({action:{...t.action,isRolling:g}})}const jI=()=>{uh("debugMode",!0)},KI=()=>{uh("debugMode",!1)},ag=()=>gl("debugMode"),Tm=g=>typeof g=="string"?g:JSON.stringify(g,null,2),ZI=g=>{ag()&&console.log(`[DEBUG] ${Tm(g)}`)},JI=g=>{ag()&&console.warn(`[DEBUG] ${Tm(g)}`)},$I=(g,t)=>{ag()&&(t instanceof Error?console.error(`[DEBUG] ${Tm(g)} - Error: ${t.message} -${t.stack}`):console.error(`[DEBUG] ${Tm(g)}`))},ri={enable:jI,disable:KI,isEnabled:ag,log:ZI,warn:JI,error:$I};class QI{constructor(){this.events={},this.lastEmitted=new Map}on(t,i){this.events[t]||(this.events[t]=[]),this.events[t]?.push(i)}off(t,i){this.events[t]&&(this.events[t]=this.events[t]?.filter(x=>x!==i))}emit(t,i,x=0,T){const E=Date.now(),s=this.lastEmitted.get(t)||0;if(E-s>=x){if(!this.events[t])return;this.events[t]?.forEach(y=>y(i)),T&&ri.isEnabled()&&ri.log(`Event: ${String(t)} - Message: ${T}`),ri.isEnabled()&&ri.log(`Event Data: ${String(t)} - Data: ${i?JSON.stringify(i):"No data"}`),this.lastEmitted.set(t,E)}}}const Si=new QI,_I=({styleClass:g,size:t=32,color:i="#000",onClick:x,...T})=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:t,height:t,className:g,onClick:x,...T,children:Yt.jsx("path",{stroke:i,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M11.493 8.757L8.039 5.304 5.374 7.969l3.454 3.453-2.59 2.59 7.797.004-.017-7.784-2.525 2.525zm11.679 2.665l3.454-3.453-2.665-2.665-3.454 3.453-2.525-2.525-.017 7.784 7.797-.004-2.59-2.59zM8.828 20.578l-3.454 3.453 2.665 2.665 3.454-3.453 2.526 2.525.017-7.784-7.797.004 2.589 2.59zm16.934-2.59l-7.797-.004.017 7.784 2.525-2.525 3.454 3.453 2.665-2.665-3.454-3.453 2.59-2.59z"})}),qI=({styleClass:g,size:t=24,color:i="#000",onClick:x,...T})=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:t,height:t,className:g,onClick:x,...T,children:Yt.jsx("path",{stroke:i,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 8.5V4m0 0h4.5M4 4l5.5 5.5m10.5-1V4m0 0h-4.5M20 4l-5.5 5.5M4 15.5V20m0 0h4.5M4 20l5.5-5.5m10.5 1V20m0 0h-4.5m4.5 0l-5.5-5.5"})});/** +`):" "+MT(E[0]):"as no adapter specified";throw new Wi("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return x},adapters:Uy};function M0(g){if(g.cancelToken&&g.cancelToken.throwIfRequested(),g.signal&&g.signal.aborted)throw new $d(null,g)}function CT(g){return M0(g),g.headers=Cl.from(g.headers),g.data=E0.call(g,g.transformRequest),["post","put","patch"].indexOf(g.method)!==-1&&g.headers.setContentType("application/x-www-form-urlencoded",!1),ow.getAdapter(g.adapter||r1.adapter)(g).then(function(x){return M0(g),x.data=E0.call(g,g.transformResponse,x),x.headers=Cl.from(x.headers),x},function(x){return sw(x)||(M0(g),x&&x.response&&(x.response.data=E0.call(g,g.transformResponse,x.response),x.response.headers=Cl.from(x.response.headers))),Promise.reject(x)})}const wT=g=>g instanceof Cl?g.toJSON():g;function _f(g,t){t=t||{};const i={};function x(r,p,h){return de.isPlainObject(r)&&de.isPlainObject(p)?de.merge.call({caseless:h},r,p):de.isPlainObject(p)?de.merge({},p):de.isArray(p)?p.slice():p}function T(r,p,h){if(de.isUndefined(p)){if(!de.isUndefined(r))return x(void 0,r,h)}else return x(r,p,h)}function E(r,p){if(!de.isUndefined(p))return x(void 0,p)}function s(r,p){if(de.isUndefined(p)){if(!de.isUndefined(r))return x(void 0,r)}else return x(void 0,p)}function y(r,p,h){if(h in t)return x(r,p);if(h in g)return x(void 0,r)}const e={url:E,method:E,data:E,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:y,headers:(r,p)=>T(wT(r),wT(p),!0)};return de.forEach(Object.keys(Object.assign({},g,t)),function(p){const h=e[p]||T,a=h(g[p],t[p],p);de.isUndefined(a)&&h!==y||(i[p]=a)}),i}const lw="1.6.7",s1={};["object","boolean","number","function","string","symbol"].forEach((g,t)=>{s1[g]=function(x){return typeof x===g||"a"+(t<1?"n ":" ")+g}});const AT={};s1.transitional=function(t,i,x){function T(E,s){return"[Axios v"+lw+"] Transitional option '"+E+"'"+s+(x?". "+x:"")}return(E,s,y)=>{if(t===!1)throw new Wi(T(s," has been removed"+(i?" in "+i:"")),Wi.ERR_DEPRECATED);return i&&!AT[s]&&(AT[s]=!0,console.warn(T(s," has been deprecated since v"+i+" and will be removed in the near future"))),t?t(E,s,y):!0}};function hI(g,t,i){if(typeof g!="object")throw new Wi("options must be an object",Wi.ERR_BAD_OPTION_VALUE);const x=Object.keys(g);let T=x.length;for(;T-- >0;){const E=x[T],s=t[E];if(s){const y=g[E],e=y===void 0||s(y,E,g);if(e!==!0)throw new Wi("option "+E+" must be "+e,Wi.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new Wi("Unknown option "+E,Wi.ERR_BAD_OPTION)}}const zy={assertOptions:hI,validators:s1},ql=zy.validators;class xm{constructor(t){this.defaults=t,this.interceptors={request:new ST,response:new ST}}async request(t,i){try{return await this._request(t,i)}catch(x){if(x instanceof Error){let T;Error.captureStackTrace?Error.captureStackTrace(T={}):T=new Error;const E=T.stack?T.stack.replace(/^.+\n/,""):"";x.stack?E&&!String(x.stack).endsWith(E.replace(/^.+\n.+\n/,""))&&(x.stack+=` +`+E):x.stack=E}throw x}}_request(t,i){typeof t=="string"?(i=i||{},i.url=t):i=t||{},i=_f(this.defaults,i);const{transitional:x,paramsSerializer:T,headers:E}=i;x!==void 0&&zy.assertOptions(x,{silentJSONParsing:ql.transitional(ql.boolean),forcedJSONParsing:ql.transitional(ql.boolean),clarifyTimeoutError:ql.transitional(ql.boolean)},!1),T!=null&&(de.isFunction(T)?i.paramsSerializer={serialize:T}:zy.assertOptions(T,{encode:ql.function,serialize:ql.function},!0)),i.method=(i.method||this.defaults.method||"get").toLowerCase();let s=E&&de.merge(E.common,E[i.method]);E&&de.forEach(["delete","get","head","post","put","patch","common"],n=>{delete E[n]}),i.headers=Cl.concat(s,E);const y=[];let e=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(i)===!1||(e=e&&u.synchronous,y.unshift(u.fulfilled,u.rejected))});const r=[];this.interceptors.response.forEach(function(u){r.push(u.fulfilled,u.rejected)});let p,h=0,a;if(!e){const n=[CT.bind(this),void 0];for(n.unshift.apply(n,y),n.push.apply(n,r),a=n.length,p=Promise.resolve(i);h{if(!x._listeners)return;let E=x._listeners.length;for(;E-- >0;)x._listeners[E](T);x._listeners=null}),this.promise.then=T=>{let E;const s=new Promise(y=>{x.subscribe(y),E=y}).then(T);return s.cancel=function(){x.unsubscribe(E)},s},t(function(E,s,y){x.reason||(x.reason=new $d(E,s,y),i(x.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const i=this._listeners.indexOf(t);i!==-1&&this._listeners.splice(i,1)}static source(){let t;return{token:new a1(function(T){t=T}),cancel:t}}}const uI=a1;function fI(g){return function(i){return g.apply(null,i)}}function cI(g){return de.isObject(g)&&g.isAxiosError===!0}const Gy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Gy).forEach(([g,t])=>{Gy[t]=g});const dI=Gy;function hw(g){const t=new rm(g),i=XC(rm.prototype.request,t);return de.extend(i,rm.prototype,t,{allOwnKeys:!0}),de.extend(i,t,null,{allOwnKeys:!0}),i.create=function(T){return hw(_f(g,T))},i}const gn=hw(r1);gn.Axios=rm;gn.CanceledError=$d;gn.CancelToken=uI;gn.isCancel=sw;gn.VERSION=lw;gn.toFormData=rg;gn.AxiosError=Wi;gn.Cancel=gn.CanceledError;gn.all=function(t){return Promise.all(t)};gn.spread=fI;gn.isAxiosError=cI;gn.mergeConfig=_f;gn.AxiosHeaders=Cl;gn.formToJSON=g=>rw(de.isHTMLForm(g)?new FormData(g):g);gn.getAdapter=ow.getAdapter;gn.HttpStatusCode=dI;gn.default=gn;const Gf="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function pI(g,t,i){for(;g.length=0;x--){const T=g%Gf.length;i=Gf.charAt(T)+i,g=Math.floor(g/Gf.length)}return pI(i,t,Gf[0])}function o1(){const g=Date.now(),t=gI(g,10),i=mI(16);return t+i}const yI={id:"",title:"",description:"",journals:[],isComplete:!1,reward:""},xI={backpack:[],equipment:{head:null,body:null,legs:null,feet:null,hands:null,weapon:null,shield:null,accessory:null}},uw={},SI={inCombat:!1,isDead:!1,isResting:!1,activeBoosts:{}},TI={username:"Guest",health:"100",mana:"100",energy:"100",maxHealth:"100",maxMana:"100",maxEnergy:"100",armour:"0",agility:"0",strength:"0",intelligence:"0",experience:"0",reputation:"0",faith:"0"},EI={stats:TI,inventory:xI,state:SI},MI={tooltipItem:{id:null,position:{x:0,y:0}},submenuItem:{id:null,position:{x:0,y:0}},tooltipNPC:{id:null,position:{x:0,y:0}},isStatsMenuCollapsed:!1,isSettingsMenuCollapsed:!1,debugMode:!1},CI={gamemode:"Idle",action:{type:"ROLL_DICE",diceValues:[],isRolling:!1},textures:{side1:"",side2:"",side3:"",side4:"",side5:"",side6:""}},wI=g=>{Ir(async()=>{Jr.set({...Jr.get(),[g.id]:g})})},AI=g=>{Ir(async()=>{const t=Jr.get(),{[g]:i,...x}=t;Jr.set(x)})};function Iu(g,t){return FL(g,t,{encode(i){return JSON.stringify(i)},decode(i){try{return JSON.parse(i)}catch{return t}}})}const Tn=Iu("playerData",EI),PI=Iu("quest",yI),Jr=Iu("items",uw),Qh=Iu("notifications",[]),fw=Iu("itemDB",uw),Sm=Iu("settings",MI),Ed=Iu("minigameState",CI),gl=g=>Sm.get()[g],uh=(g,t)=>{Ir(async()=>{const i=Sm.get();Sm.set({...i,[g]:t})})},RI=()=>{Ir(async()=>{try{const t=(await gn.get("https://kbve.com/api/itemdb.json")).data,i={};Object.keys(t.key).forEach(x=>{const T=t.key[x];i[T.id]=T,i[T.name]=T}),fw.set(i)}catch(g){console.error("Failed to reload item database:",g)}})},bI=g=>fw.get()[g],LI=g=>{Ir(async()=>{const t=Tn.get();t.inventory.backpack.push(g),Tn.set({...t})})},Tl=g=>{const i=Jr.get()[g];if(i)return i;console.warn(`Item with ID ${g} not found.`)},FI=g=>{Ir(async()=>{const t=o1(),i={...g,id:t};wI(i),LI(i.id),Si.emit("notification",{title:"Success",message:`You got a ${i.name}, verified by E Corp ID ${i.id}`,notificationType:Ru.success})})},OI=(g,t)=>{Ir(async()=>{const i=Tn.get(),x=Jr.get()[t];if(x){const T=i.inventory.equipment[g];if(T){const E=Jr.get()[T];E.equipped=!1,Jr.set({...Jr.get(),[E.id]:E})}x.equipped=!0,Jr.set({...Jr.get(),[x.id]:x}),i.inventory.equipment[g]=t,Tn.set({...i})}})},DI=g=>{Ir(async()=>{const t=Tn.get(),i=t.inventory.equipment[g];if(i){const x=Jr.get()[i];x&&(x.equipped=!1,Jr.set({...Jr.get(),[x.id]:x}),t.inventory.equipment[g]=null,Tn.set({...t}))}})},PT=g=>{Ir(async()=>{const t=Tn.get(),i=Jr.get()[g];i&&!i.equipped?(t.inventory.backpack=t.inventory.backpack.filter(x=>x!==g),Tn.set({...t}),AI(g)):Si.emit("notification",{title:"Warning",message:"Cannot remove item that is currently equipped.",notificationType:Ru.warning})})},cw=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.health,10),x=Math.max(i-g,0);t.stats={...t.stats,health:x.toString()},Tn.set({...t})})},II=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.health,10),x=parseInt(t.stats.maxHealth,10),T=Math.min(i+g,x);t.stats={...t.stats,health:T.toString()},Tn.set({...t})})},NI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.mana,10),x=Math.max(i-g,0);t.stats={...t.stats,mana:x.toString()},Tn.set({...t})})},BI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.mana,10),x=parseInt(t.stats.maxMana,10),T=Math.min(i+g,x);t.stats={...t.stats,mana:T.toString()},Tn.set({...t})})},UI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.energy,10),x=Math.max(i-g,0);t.stats={...t.stats,energy:x.toString()},Tn.set({...t})})},zI=g=>{Ir(async()=>{const t=Tn.get(),i=parseInt(t.stats.energy,10),x=parseInt(t.stats.maxEnergy,10),T=Math.min(i+g,x);t.stats={...t.stats,energy:T.toString()},Tn.set({...t})})},GI=g=>{if(g.health!==void 0){const t=parseInt(g.health,10);t>0?II(t):cw(Math.abs(t))}if(g.mana!==void 0){const t=parseInt(g.mana,10);t>0?BI(t):NI(Math.abs(t))}if(g.energy!==void 0){const t=parseInt(g.energy,10);t>0?zI(t):UI(Math.abs(t))}},VI=async g=>{const t=o1();Ir(async()=>{const i=Tn.get();i.state.activeBoosts[t]={...g,expiry:Date.now()+g.duration*1e3},Tn.set({...i})})},HI=g=>{Ir(async()=>{const t=Tn.get(),i=g.bonuses,x={health:i?.health!==void 0?i.health.toString():void 0,mana:i?.mana!==void 0?i.mana.toString():void 0,energy:i?.energy!==void 0?i.energy.toString():void 0};GI(x),g.boost&&VI(g.boost),g.action&&console.log(`Action: ${g.action}`),Tn.set({...t})})},WI=g=>{const t=Tl(g);if(!t)return[];const i=["view","discard"];return t.consumable&&i.push("consume"),t.equipped?i.push("unequip"):t.consumable||i.push("equip"),i},Ru={caution:{type:"caution",color:"bg-yellow-200 border-yellow-300 text-yellow-700",imgUrl:"/assets/icons/notification.svg"},warning:{type:"warning",color:"bg-orange-200 border-orange-300 text-orange-700",imgUrl:"/assets/icons/notification.svg"},danger:{type:"danger",color:"bg-red-200 border-red-300 text-red-700",imgUrl:"/assets/icons/notification.svg"},success:{type:"success",color:"bg-green-200 border-green-300 text-green-700",imgUrl:"/assets/icons/notification.svg"},info:{type:"info",color:"bg-blue-200 border-blue-300 text-blue-700",imgUrl:"/assets/icons/notification.svg"}};function Qd(g){try{Ir(async()=>{const t=Ed.get();Ed.set({...t,...g})})}catch(t){console.error("Error updating minigame state:",t)}}function XI(g){Qd({gamemode:g})}function YI(g){Qd({action:g})}function kI(g){Qd({textures:g})}function dw(g){const t=Ed.get();t.gamemode==="Dice"&&t.action.type==="ROLL_DICE"&&Qd({action:{...t.action,diceValues:g}})}function RT(g){const t=Ed.get();t.gamemode==="Dice"&&t.action.type==="ROLL_DICE"&&Qd({action:{...t.action,isRolling:g}})}const jI=()=>{uh("debugMode",!0)},KI=()=>{uh("debugMode",!1)},ag=()=>gl("debugMode"),Tm=g=>typeof g=="string"?g:JSON.stringify(g,null,2),ZI=g=>{ag()&&console.log(`[DEBUG] ${Tm(g)}`)},JI=g=>{ag()&&console.warn(`[DEBUG] ${Tm(g)}`)},$I=(g,t)=>{ag()&&(t instanceof Error?console.error(`[DEBUG] ${Tm(g)} - Error: ${t.message} +${t.stack}`):console.error(`[DEBUG] ${Tm(g)}`))},qe={enable:jI,disable:KI,isEnabled:ag,log:ZI,warn:JI,error:$I};class QI{constructor(){this.events={},this.lastEmitted=new Map}on(t,i){this.events[t]||(this.events[t]=[]),this.events[t]?.push(i)}off(t,i){this.events[t]&&(this.events[t]=this.events[t]?.filter(x=>x!==i))}emit(t,i,x=0,T){const E=Date.now(),s=this.lastEmitted.get(t)||0;if(E-s>=x){if(!this.events[t])return;this.events[t]?.forEach(y=>y(i)),T&&qe.isEnabled()&&qe.log(`Event: ${String(t)} - Message: ${T}`),qe.isEnabled()&&qe.log(`Event Data: ${String(t)} - Data: ${i?JSON.stringify(i):"No data"}`),this.lastEmitted.set(t,E)}}}const Si=new QI,_I=({styleClass:g,size:t=32,color:i="#000",onClick:x,...T})=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:t,height:t,className:g,onClick:x,...T,children:Yt.jsx("path",{stroke:i,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M11.493 8.757L8.039 5.304 5.374 7.969l3.454 3.453-2.59 2.59 7.797.004-.017-7.784-2.525 2.525zm11.679 2.665l3.454-3.453-2.665-2.665-3.454 3.453-2.525-2.525-.017 7.784 7.797-.004-2.59-2.59zM8.828 20.578l-3.454 3.453 2.665 2.665 3.454-3.453 2.526 2.525.017-7.784-7.797.004 2.589 2.59zm16.934-2.59l-7.797-.004.017 7.784 2.525-2.525 3.454 3.453 2.665-2.665-3.454-3.453 2.59-2.59z"})}),qI=({styleClass:g,size:t=24,color:i="#000",onClick:x,...T})=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:t,height:t,className:g,onClick:x,...T,children:Yt.jsx("path",{stroke:i,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 8.5V4m0 0h4.5M4 4l5.5 5.5m10.5-1V4m0 0h-4.5M20 4l-5.5 5.5M4 15.5V20m0 0h4.5M4 20l5.5-5.5m10.5 1V20m0 0h-4.5m4.5 0l-5.5-5.5"})});/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const og="161",t5={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},e5={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},pw=0,Vy=1,vw=2,i5=3,mw=0,lg=1,cd=2,qa=3,Al=0,gs=1,Io=2,wl=0,Su=1,Hy=2,Wy=3,Xy=4,gw=5,hh=100,yw=101,xw=102,Yy=103,ky=104,Sw=200,Tw=201,Ew=202,Mw=203,Em=204,Mm=205,Cw=206,ww=207,Aw=208,Pw=209,Rw=210,bw=211,Lw=212,Fw=213,Ow=214,Dw=0,Iw=1,Nw=2,Md=3,Bw=4,Uw=5,zw=6,Gw=7,_d=0,Vw=1,Hw=2,zo=0,Ww=1,Xw=2,Yw=3,l1=4,kw=5,jw=6,jy="attached",Kw="detached",hg=300,Pl=301,yh=302,Cd=303,wd=304,sc=306,Ad=1e3,$r=1001,Pd=1002,rr=1003,Cm=1004,n5=1004,du=1005,r5=1005,Bn=1006,dd=1007,s5=1007,Bo=1008,a5=1008,Go=1009,Zw=1010,Jw=1011,ug=1012,h1=1013,El=1014,Ma=1015,_f=1016,u1=1017,f1=1018,dh=1020,$w=1021,vs=1023,Qw=1024,_w=1025,ph=1026,bu=1027,qw=1028,c1=1029,t2=1030,d1=1031,p1=1033,sm=33776,am=33777,om=33778,lm=33779,Ky=35840,Zy=35841,Jy=35842,$y=35843,v1=36196,Qy=37492,_y=37496,qy=37808,tx=37809,ex=37810,ix=37811,nx=37812,rx=37813,sx=37814,ax=37815,ox=37816,lx=37817,hx=37818,ux=37819,fx=37820,cx=37821,hm=36492,dx=36494,px=36495,e2=36283,vx=36284,mx=36285,gx=36286,i2=2200,n2=2201,r2=2202,Rd=2300,bd=2301,um=2302,mu=2400,gu=2401,Ld=2402,fg=2500,m1=2501,o5=0,l5=1,h5=2,g1=3e3,vh=3001,s2=3200,a2=3201,Th=0,o2=1,ia="",mr="srgb",Ho="srgb-linear",cg="display-p3",qd="display-p3-linear",Fd="linear",mn="srgb",Od="rec709",Dd="p3",u5=0,fu=7680,f5=7681,c5=7682,d5=7683,p5=34055,v5=34056,m5=5386,g5=512,y5=513,x5=514,S5=515,T5=516,E5=517,M5=518,yx=519,l2=512,h2=513,u2=514,y1=515,f2=516,c2=517,d2=518,p2=519,Id=35044,C5=35048,w5=35040,A5=35045,P5=35049,R5=35041,b5=35046,L5=35050,F5=35042,O5="100",xx="300 es",wm=1035,Uo=2e3,Nd=2001;class bl{addEventListener(t,i){this._listeners===void 0&&(this._listeners={});const x=this._listeners;x[t]===void 0&&(x[t]=[]),x[t].indexOf(i)===-1&&x[t].push(i)}hasEventListener(t,i){if(this._listeners===void 0)return!1;const x=this._listeners;return x[t]!==void 0&&x[t].indexOf(i)!==-1}removeEventListener(t,i){if(this._listeners===void 0)return;const T=this._listeners[t];if(T!==void 0){const E=T.indexOf(i);E!==-1&&T.splice(E,1)}}dispatchEvent(t){if(this._listeners===void 0)return;const x=this._listeners[t.type];if(x!==void 0){t.target=this;const T=x.slice(0);for(let E=0,s=T.length;E>8&255]+jr[g>>16&255]+jr[g>>24&255]+"-"+jr[t&255]+jr[t>>8&255]+"-"+jr[t>>16&15|64]+jr[t>>24&255]+"-"+jr[i&63|128]+jr[i>>8&255]+"-"+jr[i>>16&255]+jr[i>>24&255]+jr[x&255]+jr[x>>8&255]+jr[x>>16&255]+jr[x>>24&255]).toLowerCase()}function Zn(g,t,i){return Math.max(t,Math.min(i,g))}function x1(g,t){return(g%t+t)%t}function D5(g,t,i,x,T){return x+(g-t)*(T-x)/(i-t)}function I5(g,t,i){return g!==t?(i-g)/(t-g):0}function pd(g,t,i){return(1-i)*g+i*t}function N5(g,t,i,x){return pd(g,t,1-Math.exp(-i*x))}function B5(g,t=1){return t-Math.abs(x1(g,t*2)-t)}function U5(g,t,i){return g<=t?0:g>=i?1:(g=(g-t)/(i-t),g*g*(3-2*g))}function z5(g,t,i){return g<=t?0:g>=i?1:(g=(g-t)/(i-t),g*g*g*(g*(g*6-15)+10))}function G5(g,t){return g+Math.floor(Math.random()*(t-g+1))}function V5(g,t){return g+Math.random()*(t-g)}function H5(g){return g*(.5-Math.random())}function W5(g){g!==void 0&&(bT=g);let t=bT+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function X5(g){return g*Tu}function Y5(g){return g*qf}function Sx(g){return(g&g-1)===0&&g!==0}function k5(g){return Math.pow(2,Math.ceil(Math.log(g)/Math.LN2))}function Am(g){return Math.pow(2,Math.floor(Math.log(g)/Math.LN2))}function j5(g,t,i,x,T){const E=Math.cos,s=Math.sin,y=E(i/2),e=s(i/2),r=E((t+x)/2),p=s((t+x)/2),h=E((t-x)/2),a=s((t-x)/2),l=E((x-t)/2),n=s((x-t)/2);switch(T){case"XYX":g.set(y*p,e*h,e*a,y*r);break;case"YZY":g.set(e*a,y*p,e*h,y*r);break;case"ZXZ":g.set(e*h,e*a,y*p,y*r);break;case"XZX":g.set(y*p,e*n,e*l,y*r);break;case"YXY":g.set(e*l,y*p,e*n,y*r);break;case"ZYZ":g.set(e*n,e*l,y*p,y*r);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+T)}}function ms(g,t){switch(t.constructor){case Float32Array:return g;case Uint32Array:return g/4294967295;case Uint16Array:return g/65535;case Uint8Array:return g/255;case Int32Array:return Math.max(g/2147483647,-1);case Int16Array:return Math.max(g/32767,-1);case Int8Array:return Math.max(g/127,-1);default:throw new Error("Invalid component type.")}}function Pi(g,t){switch(t.constructor){case Float32Array:return g;case Uint32Array:return Math.round(g*4294967295);case Uint16Array:return Math.round(g*65535);case Uint8Array:return Math.round(g*255);case Int32Array:return Math.round(g*2147483647);case Int16Array:return Math.round(g*32767);case Int8Array:return Math.round(g*127);default:throw new Error("Invalid component type.")}}const fm={DEG2RAD:Tu,RAD2DEG:qf,generateUUID:ra,clamp:Zn,euclideanModulo:x1,mapLinear:D5,inverseLerp:I5,lerp:pd,damp:N5,pingpong:B5,smoothstep:U5,smootherstep:z5,randInt:G5,randFloat:V5,randFloatSpread:H5,seededRandom:W5,degToRad:X5,radToDeg:Y5,isPowerOfTwo:Sx,ceilPowerOfTwo:k5,floorPowerOfTwo:Am,setQuaternionFromProperEuler:j5,normalize:Pi,denormalize:ms};class ve{constructor(t=0,i=0){ve.prototype.isVector2=!0,this.x=t,this.y=i}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,i){return this.x=t,this.y=i,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this}addScaledVector(t,i){return this.x+=t.x*i,this.y+=t.y*i,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const i=this.x,x=this.y,T=t.elements;return this.x=T[0]*i+T[3]*x+T[6],this.y=T[1]*i+T[4]*x+T[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this}clampScalar(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this}clampLength(t,i){const x=this.length();return this.divideScalar(x||1).multiplyScalar(Math.max(t,Math.min(i,x)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const i=Math.sqrt(this.lengthSq()*t.lengthSq());if(i===0)return Math.PI/2;const x=this.dot(t)/i;return Math.acos(Zn(x,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const i=this.x-t.x,x=this.y-t.y;return i*i+x*x}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this}lerpVectors(t,i,x){return this.x=t.x+(i.x-t.x)*x,this.y=t.y+(i.y-t.y)*x,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,i=0){return this.x=t[i],this.y=t[i+1],this}toArray(t=[],i=0){return t[i]=this.x,t[i+1]=this.y,t}fromBufferAttribute(t,i){return this.x=t.getX(i),this.y=t.getY(i),this}rotateAround(t,i){const x=Math.cos(i),T=Math.sin(i),E=this.x-t.x,s=this.y-t.y;return this.x=E*x-s*T+t.x,this.y=E*T+s*x+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Di{constructor(t,i,x,T,E,s,y,e,r){Di.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,i,x,T,E,s,y,e,r)}set(t,i,x,T,E,s,y,e,r){const p=this.elements;return p[0]=t,p[1]=T,p[2]=y,p[3]=i,p[4]=E,p[5]=e,p[6]=x,p[7]=s,p[8]=r,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const i=this.elements,x=t.elements;return i[0]=x[0],i[1]=x[1],i[2]=x[2],i[3]=x[3],i[4]=x[4],i[5]=x[5],i[6]=x[6],i[7]=x[7],i[8]=x[8],this}extractBasis(t,i,x){return t.setFromMatrix3Column(this,0),i.setFromMatrix3Column(this,1),x.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const i=t.elements;return this.set(i[0],i[4],i[8],i[1],i[5],i[9],i[2],i[6],i[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,i){const x=t.elements,T=i.elements,E=this.elements,s=x[0],y=x[3],e=x[6],r=x[1],p=x[4],h=x[7],a=x[2],l=x[5],n=x[8],u=T[0],f=T[3],o=T[6],c=T[1],d=T[4],v=T[7],m=T[2],S=T[5],M=T[8];return E[0]=s*u+y*c+e*m,E[3]=s*f+y*d+e*S,E[6]=s*o+y*v+e*M,E[1]=r*u+p*c+h*m,E[4]=r*f+p*d+h*S,E[7]=r*o+p*v+h*M,E[2]=a*u+l*c+n*m,E[5]=a*f+l*d+n*S,E[8]=a*o+l*v+n*M,this}multiplyScalar(t){const i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=t,i[4]*=t,i[7]*=t,i[2]*=t,i[5]*=t,i[8]*=t,this}determinant(){const t=this.elements,i=t[0],x=t[1],T=t[2],E=t[3],s=t[4],y=t[5],e=t[6],r=t[7],p=t[8];return i*s*p-i*y*r-x*E*p+x*y*e+T*E*r-T*s*e}invert(){const t=this.elements,i=t[0],x=t[1],T=t[2],E=t[3],s=t[4],y=t[5],e=t[6],r=t[7],p=t[8],h=p*s-y*r,a=y*e-p*E,l=r*E-s*e,n=i*h+x*a+T*l;if(n===0)return this.set(0,0,0,0,0,0,0,0,0);const u=1/n;return t[0]=h*u,t[1]=(T*r-p*x)*u,t[2]=(y*x-T*s)*u,t[3]=a*u,t[4]=(p*i-T*e)*u,t[5]=(T*E-y*i)*u,t[6]=l*u,t[7]=(x*e-r*i)*u,t[8]=(s*i-x*E)*u,this}transpose(){let t;const i=this.elements;return t=i[1],i[1]=i[3],i[3]=t,t=i[2],i[2]=i[6],i[6]=t,t=i[5],i[5]=i[7],i[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const i=this.elements;return t[0]=i[0],t[1]=i[3],t[2]=i[6],t[3]=i[1],t[4]=i[4],t[5]=i[7],t[6]=i[2],t[7]=i[5],t[8]=i[8],this}setUvTransform(t,i,x,T,E,s,y){const e=Math.cos(E),r=Math.sin(E);return this.set(x*e,x*r,-x*(e*s+r*y)+s+t,-T*r,T*e,-T*(-r*s+e*y)+y+i,0,0,1),this}scale(t,i){return this.premultiply(C0.makeScale(t,i)),this}rotate(t){return this.premultiply(C0.makeRotation(-t)),this}translate(t,i){return this.premultiply(C0.makeTranslation(t,i)),this}makeTranslation(t,i){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,i,0,0,1),this}makeRotation(t){const i=Math.cos(t),x=Math.sin(t);return this.set(i,-x,0,x,i,0,0,0,1),this}makeScale(t,i){return this.set(t,0,0,0,i,0,0,0,1),this}equals(t){const i=this.elements,x=t.elements;for(let T=0;T<9;T++)if(i[T]!==x[T])return!1;return!0}fromArray(t,i=0){for(let x=0;x<9;x++)this.elements[x]=t[x+i];return this}toArray(t=[],i=0){const x=this.elements;return t[i]=x[0],t[i+1]=x[1],t[i+2]=x[2],t[i+3]=x[3],t[i+4]=x[4],t[i+5]=x[5],t[i+6]=x[6],t[i+7]=x[7],t[i+8]=x[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const C0=new Di;function v2(g){for(let t=g.length-1;t>=0;--t)if(g[t]>=65535)return!0;return!1}const K5={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Gf(g,t){return new K5[g](t)}function Bd(g){return document.createElementNS("http://www.w3.org/1999/xhtml",g)}function m2(){const g=Bd("canvas");return g.style.display="block",g}const LT={};function Eu(g){g in LT||(LT[g]=!0,console.warn(g))}const FT=new Di().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),OT=new Di().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),sv={[Ho]:{transfer:Fd,primaries:Od,toReference:g=>g,fromReference:g=>g},[mr]:{transfer:mn,primaries:Od,toReference:g=>g.convertSRGBToLinear(),fromReference:g=>g.convertLinearToSRGB()},[qd]:{transfer:Fd,primaries:Dd,toReference:g=>g.applyMatrix3(OT),fromReference:g=>g.applyMatrix3(FT)},[cg]:{transfer:mn,primaries:Dd,toReference:g=>g.convertSRGBToLinear().applyMatrix3(OT),fromReference:g=>g.applyMatrix3(FT).convertLinearToSRGB()}},Z5=new Set([Ho,qd]),sn={enabled:!0,_workingColorSpace:Ho,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(g){if(!Z5.has(g))throw new Error(`Unsupported working color space, "${g}".`);this._workingColorSpace=g},convert:function(g,t,i){if(this.enabled===!1||t===i||!t||!i)return g;const x=sv[t].toReference,T=sv[i].fromReference;return T(x(g))},fromWorkingColorSpace:function(g,t){return this.convert(g,this._workingColorSpace,t)},toWorkingColorSpace:function(g,t){return this.convert(g,t,this._workingColorSpace)},getPrimaries:function(g){return sv[g].primaries},getTransfer:function(g){return g===ia?Fd:sv[g].transfer}};function jf(g){return g<.04045?g*.0773993808:Math.pow(g*.9478672986+.0521327014,2.4)}function w0(g){return g<.0031308?g*12.92:1.055*Math.pow(g,.41666)-.055}let ff;class S1{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let i;if(t instanceof HTMLCanvasElement)i=t;else{ff===void 0&&(ff=Bd("canvas")),ff.width=t.width,ff.height=t.height;const x=ff.getContext("2d");t instanceof ImageData?x.putImageData(t,0,0):x.drawImage(t,0,0,t.width,t.height),i=ff}return i.width>2048||i.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),i.toDataURL("image/jpeg",.6)):i.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const i=Bd("canvas");i.width=t.width,i.height=t.height;const x=i.getContext("2d");x.drawImage(t,0,0,t.width,t.height);const T=x.getImageData(0,0,t.width,t.height),E=T.data;for(let s=0;s0&&(x.userData=this.userData),i||(t.textures[this.uuid]=x),x}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==hg)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Ad:t.x=t.x-Math.floor(t.x);break;case $r:t.x=t.x<0?0:1;break;case Pd:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Ad:t.y=t.y-Math.floor(t.y);break;case $r:t.y=t.y<0?0:1;break;case Pd:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Eu("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===mr?vh:g1}set encoding(t){Eu("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=t===vh?mr:ia}}zn.DEFAULT_IMAGE=null;zn.DEFAULT_MAPPING=hg;zn.DEFAULT_ANISOTROPY=1;class an{constructor(t=0,i=0,x=0,T=1){an.prototype.isVector4=!0,this.x=t,this.y=i,this.z=x,this.w=T}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,i,x,T){return this.x=t,this.y=i,this.z=x,this.w=T,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;case 3:this.w=i;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this.z=t.z+i.z,this.w=t.w+i.w,this}addScaledVector(t,i){return this.x+=t.x*i,this.y+=t.y*i,this.z+=t.z*i,this.w+=t.w*i,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this.z=t.z-i.z,this.w=t.w-i.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const i=this.x,x=this.y,T=this.z,E=this.w,s=t.elements;return this.x=s[0]*i+s[4]*x+s[8]*T+s[12]*E,this.y=s[1]*i+s[5]*x+s[9]*T+s[13]*E,this.z=s[2]*i+s[6]*x+s[10]*T+s[14]*E,this.w=s[3]*i+s[7]*x+s[11]*T+s[15]*E,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const i=Math.sqrt(1-t.w*t.w);return i<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/i,this.y=t.y/i,this.z=t.z/i),this}setAxisAngleFromRotationMatrix(t){let i,x,T,E;const e=t.elements,r=e[0],p=e[4],h=e[8],a=e[1],l=e[5],n=e[9],u=e[2],f=e[6],o=e[10];if(Math.abs(p-a)<.01&&Math.abs(h-u)<.01&&Math.abs(n-f)<.01){if(Math.abs(p+a)<.1&&Math.abs(h+u)<.1&&Math.abs(n+f)<.1&&Math.abs(r+l+o-3)<.1)return this.set(1,0,0,0),this;i=Math.PI;const d=(r+1)/2,v=(l+1)/2,m=(o+1)/2,S=(p+a)/4,M=(h+u)/4,w=(n+f)/4;return d>v&&d>m?d<.01?(x=0,T=.707106781,E=.707106781):(x=Math.sqrt(d),T=S/x,E=M/x):v>m?v<.01?(x=.707106781,T=0,E=.707106781):(T=Math.sqrt(v),x=S/T,E=w/T):m<.01?(x=.707106781,T=.707106781,E=0):(E=Math.sqrt(m),x=M/E,T=w/E),this.set(x,T,E,i),this}let c=Math.sqrt((f-n)*(f-n)+(h-u)*(h-u)+(a-p)*(a-p));return Math.abs(c)<.001&&(c=1),this.x=(f-n)/c,this.y=(h-u)/c,this.z=(a-p)/c,this.w=Math.acos((r+l+o-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this.z=Math.max(t.z,Math.min(i.z,this.z)),this.w=Math.max(t.w,Math.min(i.w,this.w)),this}clampScalar(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this.z=Math.max(t,Math.min(i,this.z)),this.w=Math.max(t,Math.min(i,this.w)),this}clampLength(t,i){const x=this.length();return this.divideScalar(x||1).multiplyScalar(Math.max(t,Math.min(i,x)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this.z+=(t.z-this.z)*i,this.w+=(t.w-this.w)*i,this}lerpVectors(t,i,x){return this.x=t.x+(i.x-t.x)*x,this.y=t.y+(i.y-t.y)*x,this.z=t.z+(i.z-t.z)*x,this.w=t.w+(i.w-t.w)*x,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,i=0){return this.x=t[i],this.y=t[i+1],this.z=t[i+2],this.w=t[i+3],this}toArray(t=[],i=0){return t[i]=this.x,t[i+1]=this.y,t[i+2]=this.z,t[i+3]=this.w,t}fromBufferAttribute(t,i){return this.x=t.getX(i),this.y=t.getY(i),this.z=t.getZ(i),this.w=t.getW(i),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class g2 extends bl{constructor(t=1,i=1,x={}){super(),this.isRenderTarget=!0,this.width=t,this.height=i,this.depth=1,this.scissor=new an(0,0,t,i),this.scissorTest=!1,this.viewport=new an(0,0,t,i);const T={width:t,height:i,depth:1};x.encoding!==void 0&&(Eu("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),x.colorSpace=x.encoding===vh?mr:ia),x=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Bn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},x),this.texture=new zn(T,x.mapping,x.wrapS,x.wrapT,x.magFilter,x.minFilter,x.format,x.type,x.anisotropy,x.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=x.generateMipmaps,this.texture.internalFormat=x.internalFormat,this.depthBuffer=x.depthBuffer,this.stencilBuffer=x.stencilBuffer,this.depthTexture=x.depthTexture,this.samples=x.samples}setSize(t,i,x=1){(this.width!==t||this.height!==i||this.depth!==x)&&(this.width=t,this.height=i,this.depth=x,this.texture.image.width=t,this.texture.image.height=i,this.texture.image.depth=x,this.dispose()),this.viewport.set(0,0,t,i),this.scissor.set(0,0,t,i)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.isRenderTargetTexture=!0;const i=Object.assign({},t.texture.image);return this.texture.source=new yu(i),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class ro extends g2{constructor(t=1,i=1,x={}){super(t,i,x),this.isWebGLRenderTarget=!0}}class dg extends zn{constructor(t=null,i=1,x=1,T=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:i,height:x,depth:T},this.magFilter=rr,this.minFilter=rr,this.wrapR=$r,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Q5 extends ro{constructor(t=1,i=1,x=1,T={}){super(t,i,T),this.isWebGLArrayRenderTarget=!0,this.depth=x,this.texture=new dg(null,t,i,x),this.texture.isRenderTargetTexture=!0}}class T1 extends zn{constructor(t=null,i=1,x=1,T=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:i,height:x,depth:T},this.magFilter=rr,this.minFilter=rr,this.wrapR=$r,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class _5 extends ro{constructor(t=1,i=1,x=1,T={}){super(t,i,T),this.isWebGL3DRenderTarget=!0,this.depth=x,this.texture=new T1(null,t,i,x),this.texture.isRenderTargetTexture=!0}}class q5 extends ro{constructor(t=1,i=1,x=1,T={}){super(t,i,T),this.isWebGLMultipleRenderTargets=!0;const E=this.texture;this.texture=[];for(let s=0;s=0?1:-1,d=1-o*o;if(d>Number.EPSILON){const m=Math.sqrt(d),S=Math.atan2(m,o*c);f=Math.sin(f*S)/m,y=Math.sin(y*S)/m}const v=y*c;if(e=e*f+a*v,r=r*f+l*v,p=p*f+n*v,h=h*f+u*v,f===1-y){const m=1/Math.sqrt(e*e+r*r+p*p+h*h);e*=m,r*=m,p*=m,h*=m}}t[i]=e,t[i+1]=r,t[i+2]=p,t[i+3]=h}static multiplyQuaternionsFlat(t,i,x,T,E,s){const y=x[T],e=x[T+1],r=x[T+2],p=x[T+3],h=E[s],a=E[s+1],l=E[s+2],n=E[s+3];return t[i]=y*n+p*h+e*l-r*a,t[i+1]=e*n+p*a+r*h-y*l,t[i+2]=r*n+p*l+y*a-e*h,t[i+3]=p*n-y*h-e*a-r*l,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,i,x,T){return this._x=t,this._y=i,this._z=x,this._w=T,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,i=!0){const x=t._x,T=t._y,E=t._z,s=t._order,y=Math.cos,e=Math.sin,r=y(x/2),p=y(T/2),h=y(E/2),a=e(x/2),l=e(T/2),n=e(E/2);switch(s){case"XYZ":this._x=a*p*h+r*l*n,this._y=r*l*h-a*p*n,this._z=r*p*n+a*l*h,this._w=r*p*h-a*l*n;break;case"YXZ":this._x=a*p*h+r*l*n,this._y=r*l*h-a*p*n,this._z=r*p*n-a*l*h,this._w=r*p*h+a*l*n;break;case"ZXY":this._x=a*p*h-r*l*n,this._y=r*l*h+a*p*n,this._z=r*p*n+a*l*h,this._w=r*p*h-a*l*n;break;case"ZYX":this._x=a*p*h-r*l*n,this._y=r*l*h+a*p*n,this._z=r*p*n-a*l*h,this._w=r*p*h+a*l*n;break;case"YZX":this._x=a*p*h+r*l*n,this._y=r*l*h+a*p*n,this._z=r*p*n-a*l*h,this._w=r*p*h-a*l*n;break;case"XZY":this._x=a*p*h-r*l*n,this._y=r*l*h-a*p*n,this._z=r*p*n+a*l*h,this._w=r*p*h+a*l*n;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return i===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,i){const x=i/2,T=Math.sin(x);return this._x=t.x*T,this._y=t.y*T,this._z=t.z*T,this._w=Math.cos(x),this._onChangeCallback(),this}setFromRotationMatrix(t){const i=t.elements,x=i[0],T=i[4],E=i[8],s=i[1],y=i[5],e=i[9],r=i[2],p=i[6],h=i[10],a=x+y+h;if(a>0){const l=.5/Math.sqrt(a+1);this._w=.25/l,this._x=(p-e)*l,this._y=(E-r)*l,this._z=(s-T)*l}else if(x>y&&x>h){const l=2*Math.sqrt(1+x-y-h);this._w=(p-e)/l,this._x=.25*l,this._y=(T+s)/l,this._z=(E+r)/l}else if(y>h){const l=2*Math.sqrt(1+y-x-h);this._w=(E-r)/l,this._x=(T+s)/l,this._y=.25*l,this._z=(e+p)/l}else{const l=2*Math.sqrt(1+h-x-y);this._w=(s-T)/l,this._x=(E+r)/l,this._y=(e+p)/l,this._z=.25*l}return this._onChangeCallback(),this}setFromUnitVectors(t,i){let x=t.dot(i)+1;return xMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=x):(this._x=0,this._y=-t.z,this._z=t.y,this._w=x)):(this._x=t.y*i.z-t.z*i.y,this._y=t.z*i.x-t.x*i.z,this._z=t.x*i.y-t.y*i.x,this._w=x),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Zn(this.dot(t),-1,1)))}rotateTowards(t,i){const x=this.angleTo(t);if(x===0)return this;const T=Math.min(1,i/x);return this.slerp(t,T),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,i){const x=t._x,T=t._y,E=t._z,s=t._w,y=i._x,e=i._y,r=i._z,p=i._w;return this._x=x*p+s*y+T*r-E*e,this._y=T*p+s*e+E*y-x*r,this._z=E*p+s*r+x*e-T*y,this._w=s*p-x*y-T*e-E*r,this._onChangeCallback(),this}slerp(t,i){if(i===0)return this;if(i===1)return this.copy(t);const x=this._x,T=this._y,E=this._z,s=this._w;let y=s*t._w+x*t._x+T*t._y+E*t._z;if(y<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,y=-y):this.copy(t),y>=1)return this._w=s,this._x=x,this._y=T,this._z=E,this;const e=1-y*y;if(e<=Number.EPSILON){const l=1-i;return this._w=l*s+i*this._w,this._x=l*x+i*this._x,this._y=l*T+i*this._y,this._z=l*E+i*this._z,this.normalize(),this}const r=Math.sqrt(e),p=Math.atan2(r,y),h=Math.sin((1-i)*p)/r,a=Math.sin(i*p)/r;return this._w=s*h+this._w*a,this._x=x*h+this._x*a,this._y=T*h+this._y*a,this._z=E*h+this._z*a,this._onChangeCallback(),this}slerpQuaternions(t,i,x){return this.copy(t).slerp(i,x)}random(){const t=Math.random(),i=Math.sqrt(1-t),x=Math.sqrt(t),T=2*Math.PI*Math.random(),E=2*Math.PI*Math.random();return this.set(i*Math.cos(T),x*Math.sin(E),x*Math.cos(E),i*Math.sin(T))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,i=0){return this._x=t[i],this._y=t[i+1],this._z=t[i+2],this._w=t[i+3],this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._w,t}fromBufferAttribute(t,i){return this._x=t.getX(i),this._y=t.getY(i),this._z=t.getZ(i),this._w=t.getW(i),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Ct{constructor(t=0,i=0,x=0){Ct.prototype.isVector3=!0,this.x=t,this.y=i,this.z=x}set(t,i,x){return x===void 0&&(x=this.z),this.x=t,this.y=i,this.z=x,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this.z=t.z+i.z,this}addScaledVector(t,i){return this.x+=t.x*i,this.y+=t.y*i,this.z+=t.z*i,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this.z=t.z-i.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,i){return this.x=t.x*i.x,this.y=t.y*i.y,this.z=t.z*i.z,this}applyEuler(t){return this.applyQuaternion(DT.setFromEuler(t))}applyAxisAngle(t,i){return this.applyQuaternion(DT.setFromAxisAngle(t,i))}applyMatrix3(t){const i=this.x,x=this.y,T=this.z,E=t.elements;return this.x=E[0]*i+E[3]*x+E[6]*T,this.y=E[1]*i+E[4]*x+E[7]*T,this.z=E[2]*i+E[5]*x+E[8]*T,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const i=this.x,x=this.y,T=this.z,E=t.elements,s=1/(E[3]*i+E[7]*x+E[11]*T+E[15]);return this.x=(E[0]*i+E[4]*x+E[8]*T+E[12])*s,this.y=(E[1]*i+E[5]*x+E[9]*T+E[13])*s,this.z=(E[2]*i+E[6]*x+E[10]*T+E[14])*s,this}applyQuaternion(t){const i=this.x,x=this.y,T=this.z,E=t.x,s=t.y,y=t.z,e=t.w,r=2*(s*T-y*x),p=2*(y*i-E*T),h=2*(E*x-s*i);return this.x=i+e*r+s*h-y*p,this.y=x+e*p+y*r-E*h,this.z=T+e*h+E*p-s*r,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const i=this.x,x=this.y,T=this.z,E=t.elements;return this.x=E[0]*i+E[4]*x+E[8]*T,this.y=E[1]*i+E[5]*x+E[9]*T,this.z=E[2]*i+E[6]*x+E[10]*T,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this.z=Math.max(t.z,Math.min(i.z,this.z)),this}clampScalar(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this.z=Math.max(t,Math.min(i,this.z)),this}clampLength(t,i){const x=this.length();return this.divideScalar(x||1).multiplyScalar(Math.max(t,Math.min(i,x)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this.z+=(t.z-this.z)*i,this}lerpVectors(t,i,x){return this.x=t.x+(i.x-t.x)*x,this.y=t.y+(i.y-t.y)*x,this.z=t.z+(i.z-t.z)*x,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,i){const x=t.x,T=t.y,E=t.z,s=i.x,y=i.y,e=i.z;return this.x=T*e-E*y,this.y=E*s-x*e,this.z=x*y-T*s,this}projectOnVector(t){const i=t.lengthSq();if(i===0)return this.set(0,0,0);const x=t.dot(this)/i;return this.copy(t).multiplyScalar(x)}projectOnPlane(t){return P0.copy(this).projectOnVector(t),this.sub(P0)}reflect(t){return this.sub(P0.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const i=Math.sqrt(this.lengthSq()*t.lengthSq());if(i===0)return Math.PI/2;const x=this.dot(t)/i;return Math.acos(Zn(x,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const i=this.x-t.x,x=this.y-t.y,T=this.z-t.z;return i*i+x*x+T*T}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,i,x){const T=Math.sin(i)*t;return this.x=T*Math.sin(x),this.y=Math.cos(i)*t,this.z=T*Math.cos(x),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,i,x){return this.x=t*Math.sin(i),this.y=x,this.z=t*Math.cos(i),this}setFromMatrixPosition(t){const i=t.elements;return this.x=i[12],this.y=i[13],this.z=i[14],this}setFromMatrixScale(t){const i=this.setFromMatrixColumn(t,0).length(),x=this.setFromMatrixColumn(t,1).length(),T=this.setFromMatrixColumn(t,2).length();return this.x=i,this.y=x,this.z=T,this}setFromMatrixColumn(t,i){return this.fromArray(t.elements,i*4)}setFromMatrix3Column(t,i){return this.fromArray(t.elements,i*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,i=0){return this.x=t[i],this.y=t[i+1],this.z=t[i+2],this}toArray(t=[],i=0){return t[i]=this.x,t[i+1]=this.y,t[i+2]=this.z,t}fromBufferAttribute(t,i){return this.x=t.getX(i),this.y=t.getY(i),this.z=t.getZ(i),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=(Math.random()-.5)*2,i=Math.random()*Math.PI*2,x=Math.sqrt(1-t**2);return this.x=x*Math.cos(i),this.y=x*Math.sin(i),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const P0=new Ct,DT=new Is;class ys{constructor(t=new Ct(1/0,1/0,1/0),i=new Ct(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=i}set(t,i){return this.min.copy(t),this.max.copy(i),this}setFromArray(t){this.makeEmpty();for(let i=0,x=t.length;ithis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,i){return i.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,$a),$a.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let i,x;return t.normal.x>0?(i=t.normal.x*this.min.x,x=t.normal.x*this.max.x):(i=t.normal.x*this.max.x,x=t.normal.x*this.min.x),t.normal.y>0?(i+=t.normal.y*this.min.y,x+=t.normal.y*this.max.y):(i+=t.normal.y*this.max.y,x+=t.normal.y*this.min.y),t.normal.z>0?(i+=t.normal.z*this.min.z,x+=t.normal.z*this.max.z):(i+=t.normal.z*this.max.z,x+=t.normal.z*this.min.z),i<=-t.constant&&x>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(jc),ov.subVectors(this.max,jc),cf.subVectors(t.a,jc),df.subVectors(t.b,jc),pf.subVectors(t.c,jc),th.subVectors(df,cf),eh.subVectors(pf,df),_h.subVectors(cf,pf);let i=[0,-th.z,th.y,0,-eh.z,eh.y,0,-_h.z,_h.y,th.z,0,-th.x,eh.z,0,-eh.x,_h.z,0,-_h.x,-th.y,th.x,0,-eh.y,eh.x,0,-_h.y,_h.x,0];return!R0(i,cf,df,pf,ov)||(i=[1,0,0,0,1,0,0,0,1],!R0(i,cf,df,pf,ov))?!1:(lv.crossVectors(th,eh),i=[lv.x,lv.y,lv.z],R0(i,cf,df,pf,ov))}clampPoint(t,i){return i.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,$a).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize($a).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(fl[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),fl[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),fl[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),fl[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),fl[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),fl[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),fl[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),fl[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(fl),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const fl=[new Ct,new Ct,new Ct,new Ct,new Ct,new Ct,new Ct,new Ct],$a=new Ct,av=new ys,cf=new Ct,df=new Ct,pf=new Ct,th=new Ct,eh=new Ct,_h=new Ct,jc=new Ct,ov=new Ct,lv=new Ct,qh=new Ct;function R0(g,t,i,x,T){for(let E=0,s=g.length-3;E<=s;E+=3){qh.fromArray(g,E);const y=T.x*Math.abs(qh.x)+T.y*Math.abs(qh.y)+T.z*Math.abs(qh.z),e=t.dot(qh),r=i.dot(qh),p=x.dot(qh);if(Math.max(-Math.max(e,r,p),Math.min(e,r,p))>y)return!1}return!0}const tN=new ys,Kc=new Ct,b0=new Ct;class Qr{constructor(t=new Ct,i=-1){this.isSphere=!0,this.center=t,this.radius=i}set(t,i){return this.center.copy(t),this.radius=i,this}setFromPoints(t,i){const x=this.center;i!==void 0?x.copy(i):tN.setFromPoints(t).getCenter(x);let T=0;for(let E=0,s=t.length;Ethis.radius*this.radius&&(i.sub(this.center).normalize(),i.multiplyScalar(this.radius).add(this.center)),i}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Kc.subVectors(t,this.center);const i=Kc.lengthSq();if(i>this.radius*this.radius){const x=Math.sqrt(i),T=(x-this.radius)*.5;this.center.addScaledVector(Kc,T/x),this.radius+=T}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(b0.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Kc.copy(t.center).add(b0)),this.expandByPoint(Kc.copy(t.center).sub(b0))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}}const cl=new Ct,L0=new Ct,hv=new Ct,ih=new Ct,F0=new Ct,uv=new Ct,O0=new Ct;class ac{constructor(t=new Ct,i=new Ct(0,0,-1)){this.origin=t,this.direction=i}set(t,i){return this.origin.copy(t),this.direction.copy(i),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,i){return i.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,cl)),this}closestPointToPoint(t,i){i.subVectors(t,this.origin);const x=i.dot(this.direction);return x<0?i.copy(this.origin):i.copy(this.origin).addScaledVector(this.direction,x)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const i=cl.subVectors(t,this.origin).dot(this.direction);return i<0?this.origin.distanceToSquared(t):(cl.copy(this.origin).addScaledVector(this.direction,i),cl.distanceToSquared(t))}distanceSqToSegment(t,i,x,T){L0.copy(t).add(i).multiplyScalar(.5),hv.copy(i).sub(t).normalize(),ih.copy(this.origin).sub(L0);const E=t.distanceTo(i)*.5,s=-this.direction.dot(hv),y=ih.dot(this.direction),e=-ih.dot(hv),r=ih.lengthSq(),p=Math.abs(1-s*s);let h,a,l,n;if(p>0)if(h=s*e-y,a=s*y-e,n=E*p,h>=0)if(a>=-n)if(a<=n){const u=1/p;h*=u,a*=u,l=h*(h+s*a+2*y)+a*(s*h+a+2*e)+r}else a=E,h=Math.max(0,-(s*a+y)),l=-h*h+a*(a+2*e)+r;else a=-E,h=Math.max(0,-(s*a+y)),l=-h*h+a*(a+2*e)+r;else a<=-n?(h=Math.max(0,-(-s*E+y)),a=h>0?-E:Math.min(Math.max(-E,-e),E),l=-h*h+a*(a+2*e)+r):a<=n?(h=0,a=Math.min(Math.max(-E,-e),E),l=a*(a+2*e)+r):(h=Math.max(0,-(s*E+y)),a=h>0?E:Math.min(Math.max(-E,-e),E),l=-h*h+a*(a+2*e)+r);else a=s>0?-E:E,h=Math.max(0,-(s*a+y)),l=-h*h+a*(a+2*e)+r;return x&&x.copy(this.origin).addScaledVector(this.direction,h),T&&T.copy(L0).addScaledVector(hv,a),l}intersectSphere(t,i){cl.subVectors(t.center,this.origin);const x=cl.dot(this.direction),T=cl.dot(cl)-x*x,E=t.radius*t.radius;if(T>E)return null;const s=Math.sqrt(E-T),y=x-s,e=x+s;return e<0?null:y<0?this.at(e,i):this.at(y,i)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const i=t.normal.dot(this.direction);if(i===0)return t.distanceToPoint(this.origin)===0?0:null;const x=-(this.origin.dot(t.normal)+t.constant)/i;return x>=0?x:null}intersectPlane(t,i){const x=this.distanceToPlane(t);return x===null?null:this.at(x,i)}intersectsPlane(t){const i=t.distanceToPoint(this.origin);return i===0||t.normal.dot(this.direction)*i<0}intersectBox(t,i){let x,T,E,s,y,e;const r=1/this.direction.x,p=1/this.direction.y,h=1/this.direction.z,a=this.origin;return r>=0?(x=(t.min.x-a.x)*r,T=(t.max.x-a.x)*r):(x=(t.max.x-a.x)*r,T=(t.min.x-a.x)*r),p>=0?(E=(t.min.y-a.y)*p,s=(t.max.y-a.y)*p):(E=(t.max.y-a.y)*p,s=(t.min.y-a.y)*p),x>s||E>T||((E>x||isNaN(x))&&(x=E),(s=0?(y=(t.min.z-a.z)*h,e=(t.max.z-a.z)*h):(y=(t.max.z-a.z)*h,e=(t.min.z-a.z)*h),x>e||y>T)||((y>x||x!==x)&&(x=y),(e=0?x:T,i)}intersectsBox(t){return this.intersectBox(t,cl)!==null}intersectTriangle(t,i,x,T,E){F0.subVectors(i,t),uv.subVectors(x,t),O0.crossVectors(F0,uv);let s=this.direction.dot(O0),y;if(s>0){if(T)return null;y=1}else if(s<0)y=-1,s=-s;else return null;ih.subVectors(this.origin,t);const e=y*this.direction.dot(uv.crossVectors(ih,uv));if(e<0)return null;const r=y*this.direction.dot(F0.cross(ih));if(r<0||e+r>s)return null;const p=-y*ih.dot(O0);return p<0?null:this.at(p/s,E)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class di{constructor(t,i,x,T,E,s,y,e,r,p,h,a,l,n,u,f){di.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,i,x,T,E,s,y,e,r,p,h,a,l,n,u,f)}set(t,i,x,T,E,s,y,e,r,p,h,a,l,n,u,f){const o=this.elements;return o[0]=t,o[4]=i,o[8]=x,o[12]=T,o[1]=E,o[5]=s,o[9]=y,o[13]=e,o[2]=r,o[6]=p,o[10]=h,o[14]=a,o[3]=l,o[7]=n,o[11]=u,o[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new di().fromArray(this.elements)}copy(t){const i=this.elements,x=t.elements;return i[0]=x[0],i[1]=x[1],i[2]=x[2],i[3]=x[3],i[4]=x[4],i[5]=x[5],i[6]=x[6],i[7]=x[7],i[8]=x[8],i[9]=x[9],i[10]=x[10],i[11]=x[11],i[12]=x[12],i[13]=x[13],i[14]=x[14],i[15]=x[15],this}copyPosition(t){const i=this.elements,x=t.elements;return i[12]=x[12],i[13]=x[13],i[14]=x[14],this}setFromMatrix3(t){const i=t.elements;return this.set(i[0],i[3],i[6],0,i[1],i[4],i[7],0,i[2],i[5],i[8],0,0,0,0,1),this}extractBasis(t,i,x){return t.setFromMatrixColumn(this,0),i.setFromMatrixColumn(this,1),x.setFromMatrixColumn(this,2),this}makeBasis(t,i,x){return this.set(t.x,i.x,x.x,0,t.y,i.y,x.y,0,t.z,i.z,x.z,0,0,0,0,1),this}extractRotation(t){const i=this.elements,x=t.elements,T=1/vf.setFromMatrixColumn(t,0).length(),E=1/vf.setFromMatrixColumn(t,1).length(),s=1/vf.setFromMatrixColumn(t,2).length();return i[0]=x[0]*T,i[1]=x[1]*T,i[2]=x[2]*T,i[3]=0,i[4]=x[4]*E,i[5]=x[5]*E,i[6]=x[6]*E,i[7]=0,i[8]=x[8]*s,i[9]=x[9]*s,i[10]=x[10]*s,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}makeRotationFromEuler(t){const i=this.elements,x=t.x,T=t.y,E=t.z,s=Math.cos(x),y=Math.sin(x),e=Math.cos(T),r=Math.sin(T),p=Math.cos(E),h=Math.sin(E);if(t.order==="XYZ"){const a=s*p,l=s*h,n=y*p,u=y*h;i[0]=e*p,i[4]=-e*h,i[8]=r,i[1]=l+n*r,i[5]=a-u*r,i[9]=-y*e,i[2]=u-a*r,i[6]=n+l*r,i[10]=s*e}else if(t.order==="YXZ"){const a=e*p,l=e*h,n=r*p,u=r*h;i[0]=a+u*y,i[4]=n*y-l,i[8]=s*r,i[1]=s*h,i[5]=s*p,i[9]=-y,i[2]=l*y-n,i[6]=u+a*y,i[10]=s*e}else if(t.order==="ZXY"){const a=e*p,l=e*h,n=r*p,u=r*h;i[0]=a-u*y,i[4]=-s*h,i[8]=n+l*y,i[1]=l+n*y,i[5]=s*p,i[9]=u-a*y,i[2]=-s*r,i[6]=y,i[10]=s*e}else if(t.order==="ZYX"){const a=s*p,l=s*h,n=y*p,u=y*h;i[0]=e*p,i[4]=n*r-l,i[8]=a*r+u,i[1]=e*h,i[5]=u*r+a,i[9]=l*r-n,i[2]=-r,i[6]=y*e,i[10]=s*e}else if(t.order==="YZX"){const a=s*e,l=s*r,n=y*e,u=y*r;i[0]=e*p,i[4]=u-a*h,i[8]=n*h+l,i[1]=h,i[5]=s*p,i[9]=-y*p,i[2]=-r*p,i[6]=l*h+n,i[10]=a-u*h}else if(t.order==="XZY"){const a=s*e,l=s*r,n=y*e,u=y*r;i[0]=e*p,i[4]=-h,i[8]=r*p,i[1]=a*h+u,i[5]=s*p,i[9]=l*h-n,i[2]=n*h-l,i[6]=y*p,i[10]=u*h+a}return i[3]=0,i[7]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}makeRotationFromQuaternion(t){return this.compose(eN,t,iN)}lookAt(t,i,x){const T=this.elements;return ta.subVectors(t,i),ta.lengthSq()===0&&(ta.z=1),ta.normalize(),nh.crossVectors(x,ta),nh.lengthSq()===0&&(Math.abs(x.z)===1?ta.x+=1e-4:ta.z+=1e-4,ta.normalize(),nh.crossVectors(x,ta)),nh.normalize(),fv.crossVectors(ta,nh),T[0]=nh.x,T[4]=fv.x,T[8]=ta.x,T[1]=nh.y,T[5]=fv.y,T[9]=ta.y,T[2]=nh.z,T[6]=fv.z,T[10]=ta.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,i){const x=t.elements,T=i.elements,E=this.elements,s=x[0],y=x[4],e=x[8],r=x[12],p=x[1],h=x[5],a=x[9],l=x[13],n=x[2],u=x[6],f=x[10],o=x[14],c=x[3],d=x[7],v=x[11],m=x[15],S=T[0],M=T[4],w=T[8],C=T[12],A=T[1],P=T[5],b=T[9],O=T[13],I=T[2],D=T[6],B=T[10],G=T[14],z=T[3],X=T[7],j=T[11],Q=T[15];return E[0]=s*S+y*A+e*I+r*z,E[4]=s*M+y*P+e*D+r*X,E[8]=s*w+y*b+e*B+r*j,E[12]=s*C+y*O+e*G+r*Q,E[1]=p*S+h*A+a*I+l*z,E[5]=p*M+h*P+a*D+l*X,E[9]=p*w+h*b+a*B+l*j,E[13]=p*C+h*O+a*G+l*Q,E[2]=n*S+u*A+f*I+o*z,E[6]=n*M+u*P+f*D+o*X,E[10]=n*w+u*b+f*B+o*j,E[14]=n*C+u*O+f*G+o*Q,E[3]=c*S+d*A+v*I+m*z,E[7]=c*M+d*P+v*D+m*X,E[11]=c*w+d*b+v*B+m*j,E[15]=c*C+d*O+v*G+m*Q,this}multiplyScalar(t){const i=this.elements;return i[0]*=t,i[4]*=t,i[8]*=t,i[12]*=t,i[1]*=t,i[5]*=t,i[9]*=t,i[13]*=t,i[2]*=t,i[6]*=t,i[10]*=t,i[14]*=t,i[3]*=t,i[7]*=t,i[11]*=t,i[15]*=t,this}determinant(){const t=this.elements,i=t[0],x=t[4],T=t[8],E=t[12],s=t[1],y=t[5],e=t[9],r=t[13],p=t[2],h=t[6],a=t[10],l=t[14],n=t[3],u=t[7],f=t[11],o=t[15];return n*(+E*e*h-T*r*h-E*y*a+x*r*a+T*y*l-x*e*l)+u*(+i*e*l-i*r*a+E*s*a-T*s*l+T*r*p-E*e*p)+f*(+i*r*h-i*y*l-E*s*h+x*s*l+E*y*p-x*r*p)+o*(-T*y*p-i*e*h+i*y*a+T*s*h-x*s*a+x*e*p)}transpose(){const t=this.elements;let i;return i=t[1],t[1]=t[4],t[4]=i,i=t[2],t[2]=t[8],t[8]=i,i=t[6],t[6]=t[9],t[9]=i,i=t[3],t[3]=t[12],t[12]=i,i=t[7],t[7]=t[13],t[13]=i,i=t[11],t[11]=t[14],t[14]=i,this}setPosition(t,i,x){const T=this.elements;return t.isVector3?(T[12]=t.x,T[13]=t.y,T[14]=t.z):(T[12]=t,T[13]=i,T[14]=x),this}invert(){const t=this.elements,i=t[0],x=t[1],T=t[2],E=t[3],s=t[4],y=t[5],e=t[6],r=t[7],p=t[8],h=t[9],a=t[10],l=t[11],n=t[12],u=t[13],f=t[14],o=t[15],c=h*f*r-u*a*r+u*e*l-y*f*l-h*e*o+y*a*o,d=n*a*r-p*f*r-n*e*l+s*f*l+p*e*o-s*a*o,v=p*u*r-n*h*r+n*y*l-s*u*l-p*y*o+s*h*o,m=n*h*e-p*u*e-n*y*a+s*u*a+p*y*f-s*h*f,S=i*c+x*d+T*v+E*m;if(S===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const M=1/S;return t[0]=c*M,t[1]=(u*a*E-h*f*E-u*T*l+x*f*l+h*T*o-x*a*o)*M,t[2]=(y*f*E-u*e*E+u*T*r-x*f*r-y*T*o+x*e*o)*M,t[3]=(h*e*E-y*a*E-h*T*r+x*a*r+y*T*l-x*e*l)*M,t[4]=d*M,t[5]=(p*f*E-n*a*E+n*T*l-i*f*l-p*T*o+i*a*o)*M,t[6]=(n*e*E-s*f*E-n*T*r+i*f*r+s*T*o-i*e*o)*M,t[7]=(s*a*E-p*e*E+p*T*r-i*a*r-s*T*l+i*e*l)*M,t[8]=v*M,t[9]=(n*h*E-p*u*E-n*x*l+i*u*l+p*x*o-i*h*o)*M,t[10]=(s*u*E-n*y*E+n*x*r-i*u*r-s*x*o+i*y*o)*M,t[11]=(p*y*E-s*h*E-p*x*r+i*h*r+s*x*l-i*y*l)*M,t[12]=m*M,t[13]=(p*u*T-n*h*T+n*x*a-i*u*a-p*x*f+i*h*f)*M,t[14]=(n*y*T-s*u*T-n*x*e+i*u*e+s*x*f-i*y*f)*M,t[15]=(s*h*T-p*y*T+p*x*e-i*h*e-s*x*a+i*y*a)*M,this}scale(t){const i=this.elements,x=t.x,T=t.y,E=t.z;return i[0]*=x,i[4]*=T,i[8]*=E,i[1]*=x,i[5]*=T,i[9]*=E,i[2]*=x,i[6]*=T,i[10]*=E,i[3]*=x,i[7]*=T,i[11]*=E,this}getMaxScaleOnAxis(){const t=this.elements,i=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],x=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],T=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(i,x,T))}makeTranslation(t,i,x){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,i,0,0,1,x,0,0,0,1),this}makeRotationX(t){const i=Math.cos(t),x=Math.sin(t);return this.set(1,0,0,0,0,i,-x,0,0,x,i,0,0,0,0,1),this}makeRotationY(t){const i=Math.cos(t),x=Math.sin(t);return this.set(i,0,x,0,0,1,0,0,-x,0,i,0,0,0,0,1),this}makeRotationZ(t){const i=Math.cos(t),x=Math.sin(t);return this.set(i,-x,0,0,x,i,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,i){const x=Math.cos(i),T=Math.sin(i),E=1-x,s=t.x,y=t.y,e=t.z,r=E*s,p=E*y;return this.set(r*s+x,r*y-T*e,r*e+T*y,0,r*y+T*e,p*y+x,p*e-T*s,0,r*e-T*y,p*e+T*s,E*e*e+x,0,0,0,0,1),this}makeScale(t,i,x){return this.set(t,0,0,0,0,i,0,0,0,0,x,0,0,0,0,1),this}makeShear(t,i,x,T,E,s){return this.set(1,x,E,0,t,1,s,0,i,T,1,0,0,0,0,1),this}compose(t,i,x){const T=this.elements,E=i._x,s=i._y,y=i._z,e=i._w,r=E+E,p=s+s,h=y+y,a=E*r,l=E*p,n=E*h,u=s*p,f=s*h,o=y*h,c=e*r,d=e*p,v=e*h,m=x.x,S=x.y,M=x.z;return T[0]=(1-(u+o))*m,T[1]=(l+v)*m,T[2]=(n-d)*m,T[3]=0,T[4]=(l-v)*S,T[5]=(1-(a+o))*S,T[6]=(f+c)*S,T[7]=0,T[8]=(n+d)*M,T[9]=(f-c)*M,T[10]=(1-(a+u))*M,T[11]=0,T[12]=t.x,T[13]=t.y,T[14]=t.z,T[15]=1,this}decompose(t,i,x){const T=this.elements;let E=vf.set(T[0],T[1],T[2]).length();const s=vf.set(T[4],T[5],T[6]).length(),y=vf.set(T[8],T[9],T[10]).length();this.determinant()<0&&(E=-E),t.x=T[12],t.y=T[13],t.z=T[14],Qa.copy(this);const r=1/E,p=1/s,h=1/y;return Qa.elements[0]*=r,Qa.elements[1]*=r,Qa.elements[2]*=r,Qa.elements[4]*=p,Qa.elements[5]*=p,Qa.elements[6]*=p,Qa.elements[8]*=h,Qa.elements[9]*=h,Qa.elements[10]*=h,i.setFromRotationMatrix(Qa),x.x=E,x.y=s,x.z=y,this}makePerspective(t,i,x,T,E,s,y=Uo){const e=this.elements,r=2*E/(i-t),p=2*E/(x-T),h=(i+t)/(i-t),a=(x+T)/(x-T);let l,n;if(y===Uo)l=-(s+E)/(s-E),n=-2*s*E/(s-E);else if(y===Nd)l=-s/(s-E),n=-s*E/(s-E);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+y);return e[0]=r,e[4]=0,e[8]=h,e[12]=0,e[1]=0,e[5]=p,e[9]=a,e[13]=0,e[2]=0,e[6]=0,e[10]=l,e[14]=n,e[3]=0,e[7]=0,e[11]=-1,e[15]=0,this}makeOrthographic(t,i,x,T,E,s,y=Uo){const e=this.elements,r=1/(i-t),p=1/(x-T),h=1/(s-E),a=(i+t)*r,l=(x+T)*p;let n,u;if(y===Uo)n=(s+E)*h,u=-2*h;else if(y===Nd)n=E*h,u=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+y);return e[0]=2*r,e[4]=0,e[8]=0,e[12]=-a,e[1]=0,e[5]=2*p,e[9]=0,e[13]=-l,e[2]=0,e[6]=0,e[10]=u,e[14]=-n,e[3]=0,e[7]=0,e[11]=0,e[15]=1,this}equals(t){const i=this.elements,x=t.elements;for(let T=0;T<16;T++)if(i[T]!==x[T])return!1;return!0}fromArray(t,i=0){for(let x=0;x<16;x++)this.elements[x]=t[x+i];return this}toArray(t=[],i=0){const x=this.elements;return t[i]=x[0],t[i+1]=x[1],t[i+2]=x[2],t[i+3]=x[3],t[i+4]=x[4],t[i+5]=x[5],t[i+6]=x[6],t[i+7]=x[7],t[i+8]=x[8],t[i+9]=x[9],t[i+10]=x[10],t[i+11]=x[11],t[i+12]=x[12],t[i+13]=x[13],t[i+14]=x[14],t[i+15]=x[15],t}}const vf=new Ct,Qa=new di,eN=new Ct(0,0,0),iN=new Ct(1,1,1),nh=new Ct,fv=new Ct,ta=new Ct,IT=new di,NT=new Is;class to{constructor(t=0,i=0,x=0,T=to.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=x,this._order=T}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,i,x,T=this._order){return this._x=t,this._y=i,this._z=x,this._order=T,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,i=this._order,x=!0){const T=t.elements,E=T[0],s=T[4],y=T[8],e=T[1],r=T[5],p=T[9],h=T[2],a=T[6],l=T[10];switch(i){case"XYZ":this._y=Math.asin(Zn(y,-1,1)),Math.abs(y)<.9999999?(this._x=Math.atan2(-p,l),this._z=Math.atan2(-s,E)):(this._x=Math.atan2(a,r),this._z=0);break;case"YXZ":this._x=Math.asin(-Zn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(y,l),this._z=Math.atan2(e,r)):(this._y=Math.atan2(-h,E),this._z=0);break;case"ZXY":this._x=Math.asin(Zn(a,-1,1)),Math.abs(a)<.9999999?(this._y=Math.atan2(-h,l),this._z=Math.atan2(-s,r)):(this._y=0,this._z=Math.atan2(e,E));break;case"ZYX":this._y=Math.asin(-Zn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(a,l),this._z=Math.atan2(e,E)):(this._x=0,this._z=Math.atan2(-s,r));break;case"YZX":this._z=Math.asin(Zn(e,-1,1)),Math.abs(e)<.9999999?(this._x=Math.atan2(-p,r),this._y=Math.atan2(-h,E)):(this._x=0,this._y=Math.atan2(y,l));break;case"XZY":this._z=Math.asin(-Zn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(a,r),this._y=Math.atan2(y,E)):(this._x=Math.atan2(-p,l),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,x===!0&&this._onChangeCallback(),this}setFromQuaternion(t,i,x){return IT.makeRotationFromQuaternion(t),this.setFromRotationMatrix(IT,i,x)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return NT.setFromEuler(this),this.setFromQuaternion(NT,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}to.DEFAULT_ORDER="XYZ";class Mu{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let i=0;i1){for(let x=0;x0&&(T.userData=this.userData),T.layers=this.layers.mask,T.matrix=this.matrix.toArray(),T.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(T.matrixAutoUpdate=!1),this.isInstancedMesh&&(T.type="InstancedMesh",T.count=this.count,T.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(T.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(T.type="BatchedMesh",T.perObjectFrustumCulled=this.perObjectFrustumCulled,T.sortObjects=this.sortObjects,T.drawRanges=this._drawRanges,T.reservedRanges=this._reservedRanges,T.visibility=this._visibility,T.active=this._active,T.bounds=this._bounds.map(y=>({boxInitialized:y.boxInitialized,boxMin:y.box.min.toArray(),boxMax:y.box.max.toArray(),sphereInitialized:y.sphereInitialized,sphereRadius:y.sphere.radius,sphereCenter:y.sphere.center.toArray()})),T.maxGeometryCount=this._maxGeometryCount,T.maxVertexCount=this._maxVertexCount,T.maxIndexCount=this._maxIndexCount,T.geometryInitialized=this._geometryInitialized,T.geometryCount=this._geometryCount,T.matricesTexture=this._matricesTexture.toJSON(t),this.boundingSphere!==null&&(T.boundingSphere={center:T.boundingSphere.center.toArray(),radius:T.boundingSphere.radius}),this.boundingBox!==null&&(T.boundingBox={min:T.boundingBox.min.toArray(),max:T.boundingBox.max.toArray()}));function E(y,e){return y[e.uuid]===void 0&&(y[e.uuid]=e.toJSON(t)),e.uuid}if(this.isScene)this.background&&(this.background.isColor?T.background=this.background.toJSON():this.background.isTexture&&(T.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(T.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){T.geometry=E(t.geometries,this.geometry);const y=this.geometry.parameters;if(y!==void 0&&y.shapes!==void 0){const e=y.shapes;if(Array.isArray(e))for(let r=0,p=e.length;r0){T.children=[];for(let y=0;y0){T.animations=[];for(let y=0;y0&&(x.geometries=y),e.length>0&&(x.materials=e),r.length>0&&(x.textures=r),p.length>0&&(x.images=p),h.length>0&&(x.shapes=h),a.length>0&&(x.skeletons=a),l.length>0&&(x.animations=l),n.length>0&&(x.nodes=n)}return x.object=T,x;function s(y){const e=[];for(const r in y){const p=y[r];delete p.metadata,e.push(p)}return e}}clone(t){return new this.constructor().copy(this,t)}copy(t,i=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),i===!0)for(let x=0;x0?T.multiplyScalar(1/Math.sqrt(E)):T.set(0,0,0)}static getBarycoord(t,i,x,T,E){_a.subVectors(T,i),pl.subVectors(x,i),D0.subVectors(t,i);const s=_a.dot(_a),y=_a.dot(pl),e=_a.dot(D0),r=pl.dot(pl),p=pl.dot(D0),h=s*r-y*y;if(h===0)return E.set(0,0,0),null;const a=1/h,l=(r*e-y*p)*a,n=(s*p-y*e)*a;return E.set(1-l-n,n,l)}static containsPoint(t,i,x,T){return this.getBarycoord(t,i,x,T,vl)===null?!1:vl.x>=0&&vl.y>=0&&vl.x+vl.y<=1}static getInterpolation(t,i,x,T,E,s,y,e){return this.getBarycoord(t,i,x,T,vl)===null?(e.x=0,e.y=0,"z"in e&&(e.z=0),"w"in e&&(e.w=0),null):(e.setScalar(0),e.addScaledVector(E,vl.x),e.addScaledVector(s,vl.y),e.addScaledVector(y,vl.z),e)}static isFrontFacing(t,i,x,T){return _a.subVectors(x,i),pl.subVectors(t,i),_a.cross(pl).dot(T)<0}set(t,i,x){return this.a.copy(t),this.b.copy(i),this.c.copy(x),this}setFromPointsAndIndices(t,i,x,T){return this.a.copy(t[i]),this.b.copy(t[x]),this.c.copy(t[T]),this}setFromAttributeAndIndices(t,i,x,T){return this.a.fromBufferAttribute(t,i),this.b.fromBufferAttribute(t,x),this.c.fromBufferAttribute(t,T),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return _a.subVectors(this.c,this.b),pl.subVectors(this.a,this.b),_a.cross(pl).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return na.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,i){return na.getBarycoord(t,this.a,this.b,this.c,i)}getInterpolation(t,i,x,T,E){return na.getInterpolation(t,this.a,this.b,this.c,i,x,T,E)}containsPoint(t){return na.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return na.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,i){const x=this.a,T=this.b,E=this.c;let s,y;gf.subVectors(T,x),yf.subVectors(E,x),I0.subVectors(t,x);const e=gf.dot(I0),r=yf.dot(I0);if(e<=0&&r<=0)return i.copy(x);N0.subVectors(t,T);const p=gf.dot(N0),h=yf.dot(N0);if(p>=0&&h<=p)return i.copy(T);const a=e*h-p*r;if(a<=0&&e>=0&&p<=0)return s=e/(e-p),i.copy(x).addScaledVector(gf,s);B0.subVectors(t,E);const l=gf.dot(B0),n=yf.dot(B0);if(n>=0&&l<=n)return i.copy(E);const u=l*r-e*n;if(u<=0&&r>=0&&n<=0)return y=r/(r-n),i.copy(x).addScaledVector(yf,y);const f=p*n-l*h;if(f<=0&&h-p>=0&&l-n>=0)return VT.subVectors(E,T),y=(h-p)/(h-p+(l-n)),i.copy(T).addScaledVector(VT,y);const o=1/(f+u+a);return s=u*o,y=a*o,i.copy(x).addScaledVector(gf,s).addScaledVector(yf,y)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const y2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},rh={h:0,s:0,l:0},dv={h:0,s:0,l:0};function U0(g,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?g+(t-g)*6*i:i<1/2?t:i<2/3?g+(t-g)*6*(2/3-i):g}class ze{constructor(t,i,x){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,i,x)}set(t,i,x){if(i===void 0&&x===void 0){const T=t;T&&T.isColor?this.copy(T):typeof T=="number"?this.setHex(T):typeof T=="string"&&this.setStyle(T)}else this.setRGB(t,i,x);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,i=mr){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,sn.toWorkingColorSpace(this,i),this}setRGB(t,i,x,T=sn.workingColorSpace){return this.r=t,this.g=i,this.b=x,sn.toWorkingColorSpace(this,T),this}setHSL(t,i,x,T=sn.workingColorSpace){if(t=x1(t,1),i=Zn(i,0,1),x=Zn(x,0,1),i===0)this.r=this.g=this.b=x;else{const E=x<=.5?x*(1+i):x+i-x*i,s=2*x-E;this.r=U0(s,E,t+1/3),this.g=U0(s,E,t),this.b=U0(s,E,t-1/3)}return sn.toWorkingColorSpace(this,T),this}setStyle(t,i=mr){function x(E){E!==void 0&&parseFloat(E)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let T;if(T=/^(\w+)\(([^\)]*)\)/.exec(t)){let E;const s=T[1],y=T[2];switch(s){case"rgb":case"rgba":if(E=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return x(E[4]),this.setRGB(Math.min(255,parseInt(E[1],10))/255,Math.min(255,parseInt(E[2],10))/255,Math.min(255,parseInt(E[3],10))/255,i);if(E=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return x(E[4]),this.setRGB(Math.min(100,parseInt(E[1],10))/100,Math.min(100,parseInt(E[2],10))/100,Math.min(100,parseInt(E[3],10))/100,i);break;case"hsl":case"hsla":if(E=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return x(E[4]),this.setHSL(parseFloat(E[1])/360,parseFloat(E[2])/100,parseFloat(E[3])/100,i);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(T=/^\#([A-Fa-f\d]+)$/.exec(t)){const E=T[1],s=E.length;if(s===3)return this.setRGB(parseInt(E.charAt(0),16)/15,parseInt(E.charAt(1),16)/15,parseInt(E.charAt(2),16)/15,i);if(s===6)return this.setHex(parseInt(E,16),i);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,i);return this}setColorName(t,i=mr){const x=y2[t.toLowerCase()];return x!==void 0?this.setHex(x,i):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=jf(t.r),this.g=jf(t.g),this.b=jf(t.b),this}copyLinearToSRGB(t){return this.r=w0(t.r),this.g=w0(t.g),this.b=w0(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=mr){return sn.fromWorkingColorSpace(Kr.copy(this),t),Math.round(Zn(Kr.r*255,0,255))*65536+Math.round(Zn(Kr.g*255,0,255))*256+Math.round(Zn(Kr.b*255,0,255))}getHexString(t=mr){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,i=sn.workingColorSpace){sn.fromWorkingColorSpace(Kr.copy(this),i);const x=Kr.r,T=Kr.g,E=Kr.b,s=Math.max(x,T,E),y=Math.min(x,T,E);let e,r;const p=(y+s)/2;if(y===s)e=0,r=0;else{const h=s-y;switch(r=p<=.5?h/(s+y):h/(2-s-y),s){case x:e=(T-E)/h+(T0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const i in t){const x=t[i];if(x===void 0){console.warn(`THREE.Material: parameter '${i}' has value of undefined.`);continue}const T=this[i];if(T===void 0){console.warn(`THREE.Material: '${i}' is not a property of THREE.${this.type}.`);continue}T&&T.isColor?T.set(x):T&&T.isVector3&&x&&x.isVector3?T.copy(x):this[i]=x}}toJSON(t){const i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});const x={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};x.uuid=this.uuid,x.type=this.type,this.name!==""&&(x.name=this.name),this.color&&this.color.isColor&&(x.color=this.color.getHex()),this.roughness!==void 0&&(x.roughness=this.roughness),this.metalness!==void 0&&(x.metalness=this.metalness),this.sheen!==void 0&&(x.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(x.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(x.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(x.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(x.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(x.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(x.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(x.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(x.shininess=this.shininess),this.clearcoat!==void 0&&(x.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(x.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(x.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(x.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(x.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,x.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(x.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(x.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(x.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(x.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(x.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(x.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(x.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(x.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(x.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(x.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(x.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(x.lightMap=this.lightMap.toJSON(t).uuid,x.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(x.aoMap=this.aoMap.toJSON(t).uuid,x.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(x.bumpMap=this.bumpMap.toJSON(t).uuid,x.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(x.normalMap=this.normalMap.toJSON(t).uuid,x.normalMapType=this.normalMapType,x.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(x.displacementMap=this.displacementMap.toJSON(t).uuid,x.displacementScale=this.displacementScale,x.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(x.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(x.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(x.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(x.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(x.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(x.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(x.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(x.combine=this.combine)),this.envMapIntensity!==void 0&&(x.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(x.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(x.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(x.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(x.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(x.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(x.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(x.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(x.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(x.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(x.size=this.size),this.shadowSide!==null&&(x.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(x.sizeAttenuation=this.sizeAttenuation),this.blending!==Su&&(x.blending=this.blending),this.side!==Al&&(x.side=this.side),this.vertexColors===!0&&(x.vertexColors=!0),this.opacity<1&&(x.opacity=this.opacity),this.transparent===!0&&(x.transparent=!0),this.blendSrc!==Em&&(x.blendSrc=this.blendSrc),this.blendDst!==Mm&&(x.blendDst=this.blendDst),this.blendEquation!==hh&&(x.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(x.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(x.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(x.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(x.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(x.blendAlpha=this.blendAlpha),this.depthFunc!==Md&&(x.depthFunc=this.depthFunc),this.depthTest===!1&&(x.depthTest=this.depthTest),this.depthWrite===!1&&(x.depthWrite=this.depthWrite),this.colorWrite===!1&&(x.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(x.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==yx&&(x.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(x.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(x.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==fu&&(x.stencilFail=this.stencilFail),this.stencilZFail!==fu&&(x.stencilZFail=this.stencilZFail),this.stencilZPass!==fu&&(x.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(x.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(x.rotation=this.rotation),this.polygonOffset===!0&&(x.polygonOffset=!0),this.polygonOffsetFactor!==0&&(x.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(x.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(x.linewidth=this.linewidth),this.dashSize!==void 0&&(x.dashSize=this.dashSize),this.gapSize!==void 0&&(x.gapSize=this.gapSize),this.scale!==void 0&&(x.scale=this.scale),this.dithering===!0&&(x.dithering=!0),this.alphaTest>0&&(x.alphaTest=this.alphaTest),this.alphaHash===!0&&(x.alphaHash=!0),this.alphaToCoverage===!0&&(x.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(x.premultipliedAlpha=!0),this.forceSinglePass===!0&&(x.forceSinglePass=!0),this.wireframe===!0&&(x.wireframe=!0),this.wireframeLinewidth>1&&(x.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(x.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(x.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(x.flatShading=!0),this.visible===!1&&(x.visible=!1),this.toneMapped===!1&&(x.toneMapped=!1),this.fog===!1&&(x.fog=!1),Object.keys(this.userData).length>0&&(x.userData=this.userData);function T(E){const s=[];for(const y in E){const e=E[y];delete e.metadata,s.push(e)}return s}if(i){const E=T(t.textures),s=T(t.images);E.length>0&&(x.textures=E),s.length>0&&(x.images=s)}return x}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const i=t.clippingPlanes;let x=null;if(i!==null){const T=i.length;x=new Array(T);for(let E=0;E!==T;++E)x[E]=i[E].clone()}return this.clippingPlanes=x,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}}class Eh extends Wr{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ze(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=_d,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const xl=hN();function hN(){const g=new ArrayBuffer(4),t=new Float32Array(g),i=new Uint32Array(g),x=new Uint32Array(512),T=new Uint32Array(512);for(let e=0;e<256;++e){const r=e-127;r<-27?(x[e]=0,x[e|256]=32768,T[e]=24,T[e|256]=24):r<-14?(x[e]=1024>>-r-14,x[e|256]=1024>>-r-14|32768,T[e]=-r-1,T[e|256]=-r-1):r<=15?(x[e]=r+15<<10,x[e|256]=r+15<<10|32768,T[e]=13,T[e|256]=13):r<128?(x[e]=31744,x[e|256]=64512,T[e]=24,T[e|256]=24):(x[e]=31744,x[e|256]=64512,T[e]=13,T[e|256]=13)}const E=new Uint32Array(2048),s=new Uint32Array(64),y=new Uint32Array(64);for(let e=1;e<1024;++e){let r=e<<13,p=0;for(;!(r&8388608);)r<<=1,p-=8388608;r&=-8388609,p+=947912704,E[e]=r|p}for(let e=1024;e<2048;++e)E[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=1199570944,s[32]=2147483648;for(let e=33;e<63;++e)s[e]=2147483648+(e-32<<23);s[63]=3347054592;for(let e=1;e<64;++e)e!==32&&(y[e]=1024);return{floatView:t,uint32View:i,baseTable:x,shiftTable:T,mantissaTable:E,exponentTable:s,offsetTable:y}}function Ds(g){Math.abs(g)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),g=Zn(g,-65504,65504),xl.floatView[0]=g;const t=xl.uint32View[0],i=t>>23&511;return xl.baseTable[i]+((t&8388607)>>xl.shiftTable[i])}function ad(g){const t=g>>10;return xl.uint32View[0]=xl.mantissaTable[xl.offsetTable[t]+(g&1023)]+xl.exponentTable[t],xl.floatView[0]}const uN={toHalfFloat:Ds,fromHalfFloat:ad},fr=new Ct,pv=new ve;class on{constructor(t,i,x=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=i,this.count=t!==void 0?t.length/i:0,this.normalized=x,this.usage=Id,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ma,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return Eu("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,i){this.updateRanges.push({start:t,count:i})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,i,x){t*=this.itemSize,x*=i.itemSize;for(let T=0,E=this.itemSize;T0&&(t.userData=this.userData),this.parameters!==void 0){const e=this.parameters;for(const r in e)e[r]!==void 0&&(t[r]=e[r]);return t}t.data={attributes:{}};const i=this.index;i!==null&&(t.data.index={type:i.array.constructor.name,array:Array.prototype.slice.call(i.array)});const x=this.attributes;for(const e in x){const r=x[e];t.data.attributes[e]=r.toJSON(t.data)}const T={};let E=!1;for(const e in this.morphAttributes){const r=this.morphAttributes[e],p=[];for(let h=0,a=r.length;h0&&(T[e]=p,E=!0)}E&&(t.data.morphAttributes=T,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const y=this.boundingSphere;return y!==null&&(t.data.boundingSphere={center:y.center.toArray(),radius:y.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const i={};this.name=t.name;const x=t.index;x!==null&&this.setIndex(x.clone(i));const T=t.attributes;for(const r in T){const p=T[r];this.setAttribute(r,p.clone(i))}const E=t.morphAttributes;for(const r in E){const p=[],h=E[r];for(let a=0,l=h.length;a0){const T=i[x[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,s=T.length;E(t.far-t.near)**2))&&(HT.copy(E).invert(),tu.copy(t.ray).applyMatrix4(HT),!(x.boundingBox!==null&&tu.intersectsBox(x.boundingBox)===!1)&&this._computeIntersections(t,i,tu)))}_computeIntersections(t,i,x){let T;const E=this.geometry,s=this.material,y=E.index,e=E.attributes.position,r=E.attributes.uv,p=E.attributes.uv1,h=E.attributes.normal,a=E.groups,l=E.drawRange;if(y!==null)if(Array.isArray(s))for(let n=0,u=a.length;ni.far?null:{distance:r,point:Tv.clone(),object:g}}function Ev(g,t,i,x,T,E,s,y,e,r){g.getVertexPosition(y,Sf),g.getVertexPosition(e,Tf),g.getVertexPosition(r,Ef);const p=xN(g,t,i,x,Sf,Tf,Ef,Sv);if(p){T&&(gv.fromBufferAttribute(T,y),yv.fromBufferAttribute(T,e),xv.fromBufferAttribute(T,r),p.uv=na.getInterpolation(Sv,Sf,Tf,Ef,gv,yv,xv,new ve)),E&&(gv.fromBufferAttribute(E,y),yv.fromBufferAttribute(E,e),xv.fromBufferAttribute(E,r),p.uv1=na.getInterpolation(Sv,Sf,Tf,Ef,gv,yv,xv,new ve),p.uv2=p.uv1),s&&(XT.fromBufferAttribute(s,y),YT.fromBufferAttribute(s,e),kT.fromBufferAttribute(s,r),p.normal=na.getInterpolation(Sv,Sf,Tf,Ef,XT,YT,kT,new Ct),p.normal.dot(x.direction)>0&&p.normal.multiplyScalar(-1));const h={a:y,b:e,c:r,normal:new Ct,materialIndex:0};na.getNormal(Sf,Tf,Ef,h.normal),p.face=h}return p}class Nu extends Fi{constructor(t=1,i=1,x=1,T=1,E=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:i,depth:x,widthSegments:T,heightSegments:E,depthSegments:s};const y=this;T=Math.floor(T),E=Math.floor(E),s=Math.floor(s);const e=[],r=[],p=[],h=[];let a=0,l=0;n("z","y","x",-1,-1,x,i,t,s,E,0),n("z","y","x",1,-1,x,i,-t,s,E,1),n("x","z","y",1,1,t,x,i,T,s,2),n("x","z","y",1,-1,t,x,-i,T,s,3),n("x","y","z",1,-1,t,i,x,T,E,4),n("x","y","z",-1,-1,t,i,-x,T,E,5),this.setIndex(e),this.setAttribute("position",new ke(r,3)),this.setAttribute("normal",new ke(p,3)),this.setAttribute("uv",new ke(h,2));function n(u,f,o,c,d,v,m,S,M,w,C){const A=v/M,P=m/w,b=v/2,O=m/2,I=S/2,D=M+1,B=w+1;let G=0,z=0;const X=new Ct;for(let j=0;j0?1:-1,p.push(X.x,X.y,X.z),h.push(tt/M),h.push(1-j/w),G+=1}}for(let j=0;j>8&255]+jr[g>>16&255]+jr[g>>24&255]+"-"+jr[t&255]+jr[t>>8&255]+"-"+jr[t>>16&15|64]+jr[t>>24&255]+"-"+jr[i&63|128]+jr[i>>8&255]+"-"+jr[i>>16&255]+jr[i>>24&255]+jr[x&255]+jr[x>>8&255]+jr[x>>16&255]+jr[x>>24&255]).toLowerCase()}function Zn(g,t,i){return Math.max(t,Math.min(i,g))}function x1(g,t){return(g%t+t)%t}function D5(g,t,i,x,T){return x+(g-t)*(T-x)/(i-t)}function I5(g,t,i){return g!==t?(i-g)/(t-g):0}function pd(g,t,i){return(1-i)*g+i*t}function N5(g,t,i,x){return pd(g,t,1-Math.exp(-i*x))}function B5(g,t=1){return t-Math.abs(x1(g,t*2)-t)}function U5(g,t,i){return g<=t?0:g>=i?1:(g=(g-t)/(i-t),g*g*(3-2*g))}function z5(g,t,i){return g<=t?0:g>=i?1:(g=(g-t)/(i-t),g*g*g*(g*(g*6-15)+10))}function G5(g,t){return g+Math.floor(Math.random()*(t-g+1))}function V5(g,t){return g+Math.random()*(t-g)}function H5(g){return g*(.5-Math.random())}function W5(g){g!==void 0&&(bT=g);let t=bT+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function X5(g){return g*Tu}function Y5(g){return g*tc}function Sx(g){return(g&g-1)===0&&g!==0}function k5(g){return Math.pow(2,Math.ceil(Math.log(g)/Math.LN2))}function Am(g){return Math.pow(2,Math.floor(Math.log(g)/Math.LN2))}function j5(g,t,i,x,T){const E=Math.cos,s=Math.sin,y=E(i/2),e=s(i/2),r=E((t+x)/2),p=s((t+x)/2),h=E((t-x)/2),a=s((t-x)/2),l=E((x-t)/2),n=s((x-t)/2);switch(T){case"XYX":g.set(y*p,e*h,e*a,y*r);break;case"YZY":g.set(e*a,y*p,e*h,y*r);break;case"ZXZ":g.set(e*h,e*a,y*p,y*r);break;case"XZX":g.set(y*p,e*n,e*l,y*r);break;case"YXY":g.set(e*l,y*p,e*n,y*r);break;case"ZYZ":g.set(e*n,e*l,y*p,y*r);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+T)}}function ms(g,t){switch(t.constructor){case Float32Array:return g;case Uint32Array:return g/4294967295;case Uint16Array:return g/65535;case Uint8Array:return g/255;case Int32Array:return Math.max(g/2147483647,-1);case Int16Array:return Math.max(g/32767,-1);case Int8Array:return Math.max(g/127,-1);default:throw new Error("Invalid component type.")}}function Pi(g,t){switch(t.constructor){case Float32Array:return g;case Uint32Array:return Math.round(g*4294967295);case Uint16Array:return Math.round(g*65535);case Uint8Array:return Math.round(g*255);case Int32Array:return Math.round(g*2147483647);case Int16Array:return Math.round(g*32767);case Int8Array:return Math.round(g*127);default:throw new Error("Invalid component type.")}}const fm={DEG2RAD:Tu,RAD2DEG:tc,generateUUID:ra,clamp:Zn,euclideanModulo:x1,mapLinear:D5,inverseLerp:I5,lerp:pd,damp:N5,pingpong:B5,smoothstep:U5,smootherstep:z5,randInt:G5,randFloat:V5,randFloatSpread:H5,seededRandom:W5,degToRad:X5,radToDeg:Y5,isPowerOfTwo:Sx,ceilPowerOfTwo:k5,floorPowerOfTwo:Am,setQuaternionFromProperEuler:j5,normalize:Pi,denormalize:ms};class ve{constructor(t=0,i=0){ve.prototype.isVector2=!0,this.x=t,this.y=i}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,i){return this.x=t,this.y=i,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this}addScaledVector(t,i){return this.x+=t.x*i,this.y+=t.y*i,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const i=this.x,x=this.y,T=t.elements;return this.x=T[0]*i+T[3]*x+T[6],this.y=T[1]*i+T[4]*x+T[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this}clampScalar(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this}clampLength(t,i){const x=this.length();return this.divideScalar(x||1).multiplyScalar(Math.max(t,Math.min(i,x)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const i=Math.sqrt(this.lengthSq()*t.lengthSq());if(i===0)return Math.PI/2;const x=this.dot(t)/i;return Math.acos(Zn(x,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const i=this.x-t.x,x=this.y-t.y;return i*i+x*x}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this}lerpVectors(t,i,x){return this.x=t.x+(i.x-t.x)*x,this.y=t.y+(i.y-t.y)*x,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,i=0){return this.x=t[i],this.y=t[i+1],this}toArray(t=[],i=0){return t[i]=this.x,t[i+1]=this.y,t}fromBufferAttribute(t,i){return this.x=t.getX(i),this.y=t.getY(i),this}rotateAround(t,i){const x=Math.cos(i),T=Math.sin(i),E=this.x-t.x,s=this.y-t.y;return this.x=E*x-s*T+t.x,this.y=E*T+s*x+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Di{constructor(t,i,x,T,E,s,y,e,r){Di.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,i,x,T,E,s,y,e,r)}set(t,i,x,T,E,s,y,e,r){const p=this.elements;return p[0]=t,p[1]=T,p[2]=y,p[3]=i,p[4]=E,p[5]=e,p[6]=x,p[7]=s,p[8]=r,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const i=this.elements,x=t.elements;return i[0]=x[0],i[1]=x[1],i[2]=x[2],i[3]=x[3],i[4]=x[4],i[5]=x[5],i[6]=x[6],i[7]=x[7],i[8]=x[8],this}extractBasis(t,i,x){return t.setFromMatrix3Column(this,0),i.setFromMatrix3Column(this,1),x.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const i=t.elements;return this.set(i[0],i[4],i[8],i[1],i[5],i[9],i[2],i[6],i[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,i){const x=t.elements,T=i.elements,E=this.elements,s=x[0],y=x[3],e=x[6],r=x[1],p=x[4],h=x[7],a=x[2],l=x[5],n=x[8],u=T[0],f=T[3],o=T[6],c=T[1],d=T[4],v=T[7],m=T[2],S=T[5],M=T[8];return E[0]=s*u+y*c+e*m,E[3]=s*f+y*d+e*S,E[6]=s*o+y*v+e*M,E[1]=r*u+p*c+h*m,E[4]=r*f+p*d+h*S,E[7]=r*o+p*v+h*M,E[2]=a*u+l*c+n*m,E[5]=a*f+l*d+n*S,E[8]=a*o+l*v+n*M,this}multiplyScalar(t){const i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=t,i[4]*=t,i[7]*=t,i[2]*=t,i[5]*=t,i[8]*=t,this}determinant(){const t=this.elements,i=t[0],x=t[1],T=t[2],E=t[3],s=t[4],y=t[5],e=t[6],r=t[7],p=t[8];return i*s*p-i*y*r-x*E*p+x*y*e+T*E*r-T*s*e}invert(){const t=this.elements,i=t[0],x=t[1],T=t[2],E=t[3],s=t[4],y=t[5],e=t[6],r=t[7],p=t[8],h=p*s-y*r,a=y*e-p*E,l=r*E-s*e,n=i*h+x*a+T*l;if(n===0)return this.set(0,0,0,0,0,0,0,0,0);const u=1/n;return t[0]=h*u,t[1]=(T*r-p*x)*u,t[2]=(y*x-T*s)*u,t[3]=a*u,t[4]=(p*i-T*e)*u,t[5]=(T*E-y*i)*u,t[6]=l*u,t[7]=(x*e-r*i)*u,t[8]=(s*i-x*E)*u,this}transpose(){let t;const i=this.elements;return t=i[1],i[1]=i[3],i[3]=t,t=i[2],i[2]=i[6],i[6]=t,t=i[5],i[5]=i[7],i[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const i=this.elements;return t[0]=i[0],t[1]=i[3],t[2]=i[6],t[3]=i[1],t[4]=i[4],t[5]=i[7],t[6]=i[2],t[7]=i[5],t[8]=i[8],this}setUvTransform(t,i,x,T,E,s,y){const e=Math.cos(E),r=Math.sin(E);return this.set(x*e,x*r,-x*(e*s+r*y)+s+t,-T*r,T*e,-T*(-r*s+e*y)+y+i,0,0,1),this}scale(t,i){return this.premultiply(C0.makeScale(t,i)),this}rotate(t){return this.premultiply(C0.makeRotation(-t)),this}translate(t,i){return this.premultiply(C0.makeTranslation(t,i)),this}makeTranslation(t,i){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,i,0,0,1),this}makeRotation(t){const i=Math.cos(t),x=Math.sin(t);return this.set(i,-x,0,x,i,0,0,0,1),this}makeScale(t,i){return this.set(t,0,0,0,i,0,0,0,1),this}equals(t){const i=this.elements,x=t.elements;for(let T=0;T<9;T++)if(i[T]!==x[T])return!1;return!0}fromArray(t,i=0){for(let x=0;x<9;x++)this.elements[x]=t[x+i];return this}toArray(t=[],i=0){const x=this.elements;return t[i]=x[0],t[i+1]=x[1],t[i+2]=x[2],t[i+3]=x[3],t[i+4]=x[4],t[i+5]=x[5],t[i+6]=x[6],t[i+7]=x[7],t[i+8]=x[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const C0=new Di;function v2(g){for(let t=g.length-1;t>=0;--t)if(g[t]>=65535)return!0;return!1}const K5={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Vf(g,t){return new K5[g](t)}function Bd(g){return document.createElementNS("http://www.w3.org/1999/xhtml",g)}function m2(){const g=Bd("canvas");return g.style.display="block",g}const LT={};function Eu(g){g in LT||(LT[g]=!0,console.warn(g))}const FT=new Di().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),OT=new Di().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),sv={[Ho]:{transfer:Fd,primaries:Od,toReference:g=>g,fromReference:g=>g},[mr]:{transfer:mn,primaries:Od,toReference:g=>g.convertSRGBToLinear(),fromReference:g=>g.convertLinearToSRGB()},[qd]:{transfer:Fd,primaries:Dd,toReference:g=>g.applyMatrix3(OT),fromReference:g=>g.applyMatrix3(FT)},[cg]:{transfer:mn,primaries:Dd,toReference:g=>g.convertSRGBToLinear().applyMatrix3(OT),fromReference:g=>g.applyMatrix3(FT).convertLinearToSRGB()}},Z5=new Set([Ho,qd]),sn={enabled:!0,_workingColorSpace:Ho,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(g){if(!Z5.has(g))throw new Error(`Unsupported working color space, "${g}".`);this._workingColorSpace=g},convert:function(g,t,i){if(this.enabled===!1||t===i||!t||!i)return g;const x=sv[t].toReference,T=sv[i].fromReference;return T(x(g))},fromWorkingColorSpace:function(g,t){return this.convert(g,this._workingColorSpace,t)},toWorkingColorSpace:function(g,t){return this.convert(g,t,this._workingColorSpace)},getPrimaries:function(g){return sv[g].primaries},getTransfer:function(g){return g===ia?Fd:sv[g].transfer}};function Kf(g){return g<.04045?g*.0773993808:Math.pow(g*.9478672986+.0521327014,2.4)}function w0(g){return g<.0031308?g*12.92:1.055*Math.pow(g,.41666)-.055}let ff;class S1{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let i;if(t instanceof HTMLCanvasElement)i=t;else{ff===void 0&&(ff=Bd("canvas")),ff.width=t.width,ff.height=t.height;const x=ff.getContext("2d");t instanceof ImageData?x.putImageData(t,0,0):x.drawImage(t,0,0,t.width,t.height),i=ff}return i.width>2048||i.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),i.toDataURL("image/jpeg",.6)):i.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const i=Bd("canvas");i.width=t.width,i.height=t.height;const x=i.getContext("2d");x.drawImage(t,0,0,t.width,t.height);const T=x.getImageData(0,0,t.width,t.height),E=T.data;for(let s=0;s0&&(x.userData=this.userData),i||(t.textures[this.uuid]=x),x}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==hg)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Ad:t.x=t.x-Math.floor(t.x);break;case $r:t.x=t.x<0?0:1;break;case Pd:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Ad:t.y=t.y-Math.floor(t.y);break;case $r:t.y=t.y<0?0:1;break;case Pd:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Eu("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===mr?vh:g1}set encoding(t){Eu("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=t===vh?mr:ia}}zn.DEFAULT_IMAGE=null;zn.DEFAULT_MAPPING=hg;zn.DEFAULT_ANISOTROPY=1;class an{constructor(t=0,i=0,x=0,T=1){an.prototype.isVector4=!0,this.x=t,this.y=i,this.z=x,this.w=T}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,i,x,T){return this.x=t,this.y=i,this.z=x,this.w=T,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;case 3:this.w=i;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this.z=t.z+i.z,this.w=t.w+i.w,this}addScaledVector(t,i){return this.x+=t.x*i,this.y+=t.y*i,this.z+=t.z*i,this.w+=t.w*i,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this.z=t.z-i.z,this.w=t.w-i.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const i=this.x,x=this.y,T=this.z,E=this.w,s=t.elements;return this.x=s[0]*i+s[4]*x+s[8]*T+s[12]*E,this.y=s[1]*i+s[5]*x+s[9]*T+s[13]*E,this.z=s[2]*i+s[6]*x+s[10]*T+s[14]*E,this.w=s[3]*i+s[7]*x+s[11]*T+s[15]*E,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const i=Math.sqrt(1-t.w*t.w);return i<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/i,this.y=t.y/i,this.z=t.z/i),this}setAxisAngleFromRotationMatrix(t){let i,x,T,E;const e=t.elements,r=e[0],p=e[4],h=e[8],a=e[1],l=e[5],n=e[9],u=e[2],f=e[6],o=e[10];if(Math.abs(p-a)<.01&&Math.abs(h-u)<.01&&Math.abs(n-f)<.01){if(Math.abs(p+a)<.1&&Math.abs(h+u)<.1&&Math.abs(n+f)<.1&&Math.abs(r+l+o-3)<.1)return this.set(1,0,0,0),this;i=Math.PI;const d=(r+1)/2,v=(l+1)/2,m=(o+1)/2,S=(p+a)/4,M=(h+u)/4,w=(n+f)/4;return d>v&&d>m?d<.01?(x=0,T=.707106781,E=.707106781):(x=Math.sqrt(d),T=S/x,E=M/x):v>m?v<.01?(x=.707106781,T=0,E=.707106781):(T=Math.sqrt(v),x=S/T,E=w/T):m<.01?(x=.707106781,T=.707106781,E=0):(E=Math.sqrt(m),x=M/E,T=w/E),this.set(x,T,E,i),this}let c=Math.sqrt((f-n)*(f-n)+(h-u)*(h-u)+(a-p)*(a-p));return Math.abs(c)<.001&&(c=1),this.x=(f-n)/c,this.y=(h-u)/c,this.z=(a-p)/c,this.w=Math.acos((r+l+o-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this.z=Math.max(t.z,Math.min(i.z,this.z)),this.w=Math.max(t.w,Math.min(i.w,this.w)),this}clampScalar(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this.z=Math.max(t,Math.min(i,this.z)),this.w=Math.max(t,Math.min(i,this.w)),this}clampLength(t,i){const x=this.length();return this.divideScalar(x||1).multiplyScalar(Math.max(t,Math.min(i,x)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this.z+=(t.z-this.z)*i,this.w+=(t.w-this.w)*i,this}lerpVectors(t,i,x){return this.x=t.x+(i.x-t.x)*x,this.y=t.y+(i.y-t.y)*x,this.z=t.z+(i.z-t.z)*x,this.w=t.w+(i.w-t.w)*x,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,i=0){return this.x=t[i],this.y=t[i+1],this.z=t[i+2],this.w=t[i+3],this}toArray(t=[],i=0){return t[i]=this.x,t[i+1]=this.y,t[i+2]=this.z,t[i+3]=this.w,t}fromBufferAttribute(t,i){return this.x=t.getX(i),this.y=t.getY(i),this.z=t.getZ(i),this.w=t.getW(i),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class g2 extends bl{constructor(t=1,i=1,x={}){super(),this.isRenderTarget=!0,this.width=t,this.height=i,this.depth=1,this.scissor=new an(0,0,t,i),this.scissorTest=!1,this.viewport=new an(0,0,t,i);const T={width:t,height:i,depth:1};x.encoding!==void 0&&(Eu("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),x.colorSpace=x.encoding===vh?mr:ia),x=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Bn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},x),this.texture=new zn(T,x.mapping,x.wrapS,x.wrapT,x.magFilter,x.minFilter,x.format,x.type,x.anisotropy,x.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=x.generateMipmaps,this.texture.internalFormat=x.internalFormat,this.depthBuffer=x.depthBuffer,this.stencilBuffer=x.stencilBuffer,this.depthTexture=x.depthTexture,this.samples=x.samples}setSize(t,i,x=1){(this.width!==t||this.height!==i||this.depth!==x)&&(this.width=t,this.height=i,this.depth=x,this.texture.image.width=t,this.texture.image.height=i,this.texture.image.depth=x,this.dispose()),this.viewport.set(0,0,t,i),this.scissor.set(0,0,t,i)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.isRenderTargetTexture=!0;const i=Object.assign({},t.texture.image);return this.texture.source=new yu(i),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class ro extends g2{constructor(t=1,i=1,x={}){super(t,i,x),this.isWebGLRenderTarget=!0}}class dg extends zn{constructor(t=null,i=1,x=1,T=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:i,height:x,depth:T},this.magFilter=rr,this.minFilter=rr,this.wrapR=$r,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Q5 extends ro{constructor(t=1,i=1,x=1,T={}){super(t,i,T),this.isWebGLArrayRenderTarget=!0,this.depth=x,this.texture=new dg(null,t,i,x),this.texture.isRenderTargetTexture=!0}}class T1 extends zn{constructor(t=null,i=1,x=1,T=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:i,height:x,depth:T},this.magFilter=rr,this.minFilter=rr,this.wrapR=$r,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class _5 extends ro{constructor(t=1,i=1,x=1,T={}){super(t,i,T),this.isWebGL3DRenderTarget=!0,this.depth=x,this.texture=new T1(null,t,i,x),this.texture.isRenderTargetTexture=!0}}class q5 extends ro{constructor(t=1,i=1,x=1,T={}){super(t,i,T),this.isWebGLMultipleRenderTargets=!0;const E=this.texture;this.texture=[];for(let s=0;s=0?1:-1,d=1-o*o;if(d>Number.EPSILON){const m=Math.sqrt(d),S=Math.atan2(m,o*c);f=Math.sin(f*S)/m,y=Math.sin(y*S)/m}const v=y*c;if(e=e*f+a*v,r=r*f+l*v,p=p*f+n*v,h=h*f+u*v,f===1-y){const m=1/Math.sqrt(e*e+r*r+p*p+h*h);e*=m,r*=m,p*=m,h*=m}}t[i]=e,t[i+1]=r,t[i+2]=p,t[i+3]=h}static multiplyQuaternionsFlat(t,i,x,T,E,s){const y=x[T],e=x[T+1],r=x[T+2],p=x[T+3],h=E[s],a=E[s+1],l=E[s+2],n=E[s+3];return t[i]=y*n+p*h+e*l-r*a,t[i+1]=e*n+p*a+r*h-y*l,t[i+2]=r*n+p*l+y*a-e*h,t[i+3]=p*n-y*h-e*a-r*l,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,i,x,T){return this._x=t,this._y=i,this._z=x,this._w=T,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,i=!0){const x=t._x,T=t._y,E=t._z,s=t._order,y=Math.cos,e=Math.sin,r=y(x/2),p=y(T/2),h=y(E/2),a=e(x/2),l=e(T/2),n=e(E/2);switch(s){case"XYZ":this._x=a*p*h+r*l*n,this._y=r*l*h-a*p*n,this._z=r*p*n+a*l*h,this._w=r*p*h-a*l*n;break;case"YXZ":this._x=a*p*h+r*l*n,this._y=r*l*h-a*p*n,this._z=r*p*n-a*l*h,this._w=r*p*h+a*l*n;break;case"ZXY":this._x=a*p*h-r*l*n,this._y=r*l*h+a*p*n,this._z=r*p*n+a*l*h,this._w=r*p*h-a*l*n;break;case"ZYX":this._x=a*p*h-r*l*n,this._y=r*l*h+a*p*n,this._z=r*p*n-a*l*h,this._w=r*p*h+a*l*n;break;case"YZX":this._x=a*p*h+r*l*n,this._y=r*l*h+a*p*n,this._z=r*p*n-a*l*h,this._w=r*p*h-a*l*n;break;case"XZY":this._x=a*p*h-r*l*n,this._y=r*l*h-a*p*n,this._z=r*p*n+a*l*h,this._w=r*p*h+a*l*n;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return i===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,i){const x=i/2,T=Math.sin(x);return this._x=t.x*T,this._y=t.y*T,this._z=t.z*T,this._w=Math.cos(x),this._onChangeCallback(),this}setFromRotationMatrix(t){const i=t.elements,x=i[0],T=i[4],E=i[8],s=i[1],y=i[5],e=i[9],r=i[2],p=i[6],h=i[10],a=x+y+h;if(a>0){const l=.5/Math.sqrt(a+1);this._w=.25/l,this._x=(p-e)*l,this._y=(E-r)*l,this._z=(s-T)*l}else if(x>y&&x>h){const l=2*Math.sqrt(1+x-y-h);this._w=(p-e)/l,this._x=.25*l,this._y=(T+s)/l,this._z=(E+r)/l}else if(y>h){const l=2*Math.sqrt(1+y-x-h);this._w=(E-r)/l,this._x=(T+s)/l,this._y=.25*l,this._z=(e+p)/l}else{const l=2*Math.sqrt(1+h-x-y);this._w=(s-T)/l,this._x=(E+r)/l,this._y=(e+p)/l,this._z=.25*l}return this._onChangeCallback(),this}setFromUnitVectors(t,i){let x=t.dot(i)+1;return xMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=x):(this._x=0,this._y=-t.z,this._z=t.y,this._w=x)):(this._x=t.y*i.z-t.z*i.y,this._y=t.z*i.x-t.x*i.z,this._z=t.x*i.y-t.y*i.x,this._w=x),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Zn(this.dot(t),-1,1)))}rotateTowards(t,i){const x=this.angleTo(t);if(x===0)return this;const T=Math.min(1,i/x);return this.slerp(t,T),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,i){const x=t._x,T=t._y,E=t._z,s=t._w,y=i._x,e=i._y,r=i._z,p=i._w;return this._x=x*p+s*y+T*r-E*e,this._y=T*p+s*e+E*y-x*r,this._z=E*p+s*r+x*e-T*y,this._w=s*p-x*y-T*e-E*r,this._onChangeCallback(),this}slerp(t,i){if(i===0)return this;if(i===1)return this.copy(t);const x=this._x,T=this._y,E=this._z,s=this._w;let y=s*t._w+x*t._x+T*t._y+E*t._z;if(y<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,y=-y):this.copy(t),y>=1)return this._w=s,this._x=x,this._y=T,this._z=E,this;const e=1-y*y;if(e<=Number.EPSILON){const l=1-i;return this._w=l*s+i*this._w,this._x=l*x+i*this._x,this._y=l*T+i*this._y,this._z=l*E+i*this._z,this.normalize(),this}const r=Math.sqrt(e),p=Math.atan2(r,y),h=Math.sin((1-i)*p)/r,a=Math.sin(i*p)/r;return this._w=s*h+this._w*a,this._x=x*h+this._x*a,this._y=T*h+this._y*a,this._z=E*h+this._z*a,this._onChangeCallback(),this}slerpQuaternions(t,i,x){return this.copy(t).slerp(i,x)}random(){const t=Math.random(),i=Math.sqrt(1-t),x=Math.sqrt(t),T=2*Math.PI*Math.random(),E=2*Math.PI*Math.random();return this.set(i*Math.cos(T),x*Math.sin(E),x*Math.cos(E),i*Math.sin(T))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,i=0){return this._x=t[i],this._y=t[i+1],this._z=t[i+2],this._w=t[i+3],this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._w,t}fromBufferAttribute(t,i){return this._x=t.getX(i),this._y=t.getY(i),this._z=t.getZ(i),this._w=t.getW(i),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Ct{constructor(t=0,i=0,x=0){Ct.prototype.isVector3=!0,this.x=t,this.y=i,this.z=x}set(t,i,x){return x===void 0&&(x=this.z),this.x=t,this.y=i,this.z=x,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this.z=t.z+i.z,this}addScaledVector(t,i){return this.x+=t.x*i,this.y+=t.y*i,this.z+=t.z*i,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this.z=t.z-i.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,i){return this.x=t.x*i.x,this.y=t.y*i.y,this.z=t.z*i.z,this}applyEuler(t){return this.applyQuaternion(DT.setFromEuler(t))}applyAxisAngle(t,i){return this.applyQuaternion(DT.setFromAxisAngle(t,i))}applyMatrix3(t){const i=this.x,x=this.y,T=this.z,E=t.elements;return this.x=E[0]*i+E[3]*x+E[6]*T,this.y=E[1]*i+E[4]*x+E[7]*T,this.z=E[2]*i+E[5]*x+E[8]*T,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const i=this.x,x=this.y,T=this.z,E=t.elements,s=1/(E[3]*i+E[7]*x+E[11]*T+E[15]);return this.x=(E[0]*i+E[4]*x+E[8]*T+E[12])*s,this.y=(E[1]*i+E[5]*x+E[9]*T+E[13])*s,this.z=(E[2]*i+E[6]*x+E[10]*T+E[14])*s,this}applyQuaternion(t){const i=this.x,x=this.y,T=this.z,E=t.x,s=t.y,y=t.z,e=t.w,r=2*(s*T-y*x),p=2*(y*i-E*T),h=2*(E*x-s*i);return this.x=i+e*r+s*h-y*p,this.y=x+e*p+y*r-E*h,this.z=T+e*h+E*p-s*r,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const i=this.x,x=this.y,T=this.z,E=t.elements;return this.x=E[0]*i+E[4]*x+E[8]*T,this.y=E[1]*i+E[5]*x+E[9]*T,this.z=E[2]*i+E[6]*x+E[10]*T,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this.z=Math.max(t.z,Math.min(i.z,this.z)),this}clampScalar(t,i){return this.x=Math.max(t,Math.min(i,this.x)),this.y=Math.max(t,Math.min(i,this.y)),this.z=Math.max(t,Math.min(i,this.z)),this}clampLength(t,i){const x=this.length();return this.divideScalar(x||1).multiplyScalar(Math.max(t,Math.min(i,x)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this.z+=(t.z-this.z)*i,this}lerpVectors(t,i,x){return this.x=t.x+(i.x-t.x)*x,this.y=t.y+(i.y-t.y)*x,this.z=t.z+(i.z-t.z)*x,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,i){const x=t.x,T=t.y,E=t.z,s=i.x,y=i.y,e=i.z;return this.x=T*e-E*y,this.y=E*s-x*e,this.z=x*y-T*s,this}projectOnVector(t){const i=t.lengthSq();if(i===0)return this.set(0,0,0);const x=t.dot(this)/i;return this.copy(t).multiplyScalar(x)}projectOnPlane(t){return P0.copy(this).projectOnVector(t),this.sub(P0)}reflect(t){return this.sub(P0.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const i=Math.sqrt(this.lengthSq()*t.lengthSq());if(i===0)return Math.PI/2;const x=this.dot(t)/i;return Math.acos(Zn(x,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const i=this.x-t.x,x=this.y-t.y,T=this.z-t.z;return i*i+x*x+T*T}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,i,x){const T=Math.sin(i)*t;return this.x=T*Math.sin(x),this.y=Math.cos(i)*t,this.z=T*Math.cos(x),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,i,x){return this.x=t*Math.sin(i),this.y=x,this.z=t*Math.cos(i),this}setFromMatrixPosition(t){const i=t.elements;return this.x=i[12],this.y=i[13],this.z=i[14],this}setFromMatrixScale(t){const i=this.setFromMatrixColumn(t,0).length(),x=this.setFromMatrixColumn(t,1).length(),T=this.setFromMatrixColumn(t,2).length();return this.x=i,this.y=x,this.z=T,this}setFromMatrixColumn(t,i){return this.fromArray(t.elements,i*4)}setFromMatrix3Column(t,i){return this.fromArray(t.elements,i*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,i=0){return this.x=t[i],this.y=t[i+1],this.z=t[i+2],this}toArray(t=[],i=0){return t[i]=this.x,t[i+1]=this.y,t[i+2]=this.z,t}fromBufferAttribute(t,i){return this.x=t.getX(i),this.y=t.getY(i),this.z=t.getZ(i),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=(Math.random()-.5)*2,i=Math.random()*Math.PI*2,x=Math.sqrt(1-t**2);return this.x=x*Math.cos(i),this.y=x*Math.sin(i),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const P0=new Ct,DT=new Is;class ys{constructor(t=new Ct(1/0,1/0,1/0),i=new Ct(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=i}set(t,i){return this.min.copy(t),this.max.copy(i),this}setFromArray(t){this.makeEmpty();for(let i=0,x=t.length;ithis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,i){return i.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,$a),$a.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let i,x;return t.normal.x>0?(i=t.normal.x*this.min.x,x=t.normal.x*this.max.x):(i=t.normal.x*this.max.x,x=t.normal.x*this.min.x),t.normal.y>0?(i+=t.normal.y*this.min.y,x+=t.normal.y*this.max.y):(i+=t.normal.y*this.max.y,x+=t.normal.y*this.min.y),t.normal.z>0?(i+=t.normal.z*this.min.z,x+=t.normal.z*this.max.z):(i+=t.normal.z*this.max.z,x+=t.normal.z*this.min.z),i<=-t.constant&&x>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Kc),ov.subVectors(this.max,Kc),cf.subVectors(t.a,Kc),df.subVectors(t.b,Kc),pf.subVectors(t.c,Kc),th.subVectors(df,cf),eh.subVectors(pf,df),_h.subVectors(cf,pf);let i=[0,-th.z,th.y,0,-eh.z,eh.y,0,-_h.z,_h.y,th.z,0,-th.x,eh.z,0,-eh.x,_h.z,0,-_h.x,-th.y,th.x,0,-eh.y,eh.x,0,-_h.y,_h.x,0];return!R0(i,cf,df,pf,ov)||(i=[1,0,0,0,1,0,0,0,1],!R0(i,cf,df,pf,ov))?!1:(lv.crossVectors(th,eh),i=[lv.x,lv.y,lv.z],R0(i,cf,df,pf,ov))}clampPoint(t,i){return i.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,$a).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize($a).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(fl[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),fl[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),fl[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),fl[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),fl[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),fl[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),fl[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),fl[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(fl),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const fl=[new Ct,new Ct,new Ct,new Ct,new Ct,new Ct,new Ct,new Ct],$a=new Ct,av=new ys,cf=new Ct,df=new Ct,pf=new Ct,th=new Ct,eh=new Ct,_h=new Ct,Kc=new Ct,ov=new Ct,lv=new Ct,qh=new Ct;function R0(g,t,i,x,T){for(let E=0,s=g.length-3;E<=s;E+=3){qh.fromArray(g,E);const y=T.x*Math.abs(qh.x)+T.y*Math.abs(qh.y)+T.z*Math.abs(qh.z),e=t.dot(qh),r=i.dot(qh),p=x.dot(qh);if(Math.max(-Math.max(e,r,p),Math.min(e,r,p))>y)return!1}return!0}const tN=new ys,Zc=new Ct,b0=new Ct;class Qr{constructor(t=new Ct,i=-1){this.isSphere=!0,this.center=t,this.radius=i}set(t,i){return this.center.copy(t),this.radius=i,this}setFromPoints(t,i){const x=this.center;i!==void 0?x.copy(i):tN.setFromPoints(t).getCenter(x);let T=0;for(let E=0,s=t.length;Ethis.radius*this.radius&&(i.sub(this.center).normalize(),i.multiplyScalar(this.radius).add(this.center)),i}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Zc.subVectors(t,this.center);const i=Zc.lengthSq();if(i>this.radius*this.radius){const x=Math.sqrt(i),T=(x-this.radius)*.5;this.center.addScaledVector(Zc,T/x),this.radius+=T}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(b0.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Zc.copy(t.center).add(b0)),this.expandByPoint(Zc.copy(t.center).sub(b0))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}}const cl=new Ct,L0=new Ct,hv=new Ct,ih=new Ct,F0=new Ct,uv=new Ct,O0=new Ct;class oc{constructor(t=new Ct,i=new Ct(0,0,-1)){this.origin=t,this.direction=i}set(t,i){return this.origin.copy(t),this.direction.copy(i),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,i){return i.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,cl)),this}closestPointToPoint(t,i){i.subVectors(t,this.origin);const x=i.dot(this.direction);return x<0?i.copy(this.origin):i.copy(this.origin).addScaledVector(this.direction,x)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const i=cl.subVectors(t,this.origin).dot(this.direction);return i<0?this.origin.distanceToSquared(t):(cl.copy(this.origin).addScaledVector(this.direction,i),cl.distanceToSquared(t))}distanceSqToSegment(t,i,x,T){L0.copy(t).add(i).multiplyScalar(.5),hv.copy(i).sub(t).normalize(),ih.copy(this.origin).sub(L0);const E=t.distanceTo(i)*.5,s=-this.direction.dot(hv),y=ih.dot(this.direction),e=-ih.dot(hv),r=ih.lengthSq(),p=Math.abs(1-s*s);let h,a,l,n;if(p>0)if(h=s*e-y,a=s*y-e,n=E*p,h>=0)if(a>=-n)if(a<=n){const u=1/p;h*=u,a*=u,l=h*(h+s*a+2*y)+a*(s*h+a+2*e)+r}else a=E,h=Math.max(0,-(s*a+y)),l=-h*h+a*(a+2*e)+r;else a=-E,h=Math.max(0,-(s*a+y)),l=-h*h+a*(a+2*e)+r;else a<=-n?(h=Math.max(0,-(-s*E+y)),a=h>0?-E:Math.min(Math.max(-E,-e),E),l=-h*h+a*(a+2*e)+r):a<=n?(h=0,a=Math.min(Math.max(-E,-e),E),l=a*(a+2*e)+r):(h=Math.max(0,-(s*E+y)),a=h>0?E:Math.min(Math.max(-E,-e),E),l=-h*h+a*(a+2*e)+r);else a=s>0?-E:E,h=Math.max(0,-(s*a+y)),l=-h*h+a*(a+2*e)+r;return x&&x.copy(this.origin).addScaledVector(this.direction,h),T&&T.copy(L0).addScaledVector(hv,a),l}intersectSphere(t,i){cl.subVectors(t.center,this.origin);const x=cl.dot(this.direction),T=cl.dot(cl)-x*x,E=t.radius*t.radius;if(T>E)return null;const s=Math.sqrt(E-T),y=x-s,e=x+s;return e<0?null:y<0?this.at(e,i):this.at(y,i)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const i=t.normal.dot(this.direction);if(i===0)return t.distanceToPoint(this.origin)===0?0:null;const x=-(this.origin.dot(t.normal)+t.constant)/i;return x>=0?x:null}intersectPlane(t,i){const x=this.distanceToPlane(t);return x===null?null:this.at(x,i)}intersectsPlane(t){const i=t.distanceToPoint(this.origin);return i===0||t.normal.dot(this.direction)*i<0}intersectBox(t,i){let x,T,E,s,y,e;const r=1/this.direction.x,p=1/this.direction.y,h=1/this.direction.z,a=this.origin;return r>=0?(x=(t.min.x-a.x)*r,T=(t.max.x-a.x)*r):(x=(t.max.x-a.x)*r,T=(t.min.x-a.x)*r),p>=0?(E=(t.min.y-a.y)*p,s=(t.max.y-a.y)*p):(E=(t.max.y-a.y)*p,s=(t.min.y-a.y)*p),x>s||E>T||((E>x||isNaN(x))&&(x=E),(s=0?(y=(t.min.z-a.z)*h,e=(t.max.z-a.z)*h):(y=(t.max.z-a.z)*h,e=(t.min.z-a.z)*h),x>e||y>T)||((y>x||x!==x)&&(x=y),(e=0?x:T,i)}intersectsBox(t){return this.intersectBox(t,cl)!==null}intersectTriangle(t,i,x,T,E){F0.subVectors(i,t),uv.subVectors(x,t),O0.crossVectors(F0,uv);let s=this.direction.dot(O0),y;if(s>0){if(T)return null;y=1}else if(s<0)y=-1,s=-s;else return null;ih.subVectors(this.origin,t);const e=y*this.direction.dot(uv.crossVectors(ih,uv));if(e<0)return null;const r=y*this.direction.dot(F0.cross(ih));if(r<0||e+r>s)return null;const p=-y*ih.dot(O0);return p<0?null:this.at(p/s,E)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class di{constructor(t,i,x,T,E,s,y,e,r,p,h,a,l,n,u,f){di.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,i,x,T,E,s,y,e,r,p,h,a,l,n,u,f)}set(t,i,x,T,E,s,y,e,r,p,h,a,l,n,u,f){const o=this.elements;return o[0]=t,o[4]=i,o[8]=x,o[12]=T,o[1]=E,o[5]=s,o[9]=y,o[13]=e,o[2]=r,o[6]=p,o[10]=h,o[14]=a,o[3]=l,o[7]=n,o[11]=u,o[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new di().fromArray(this.elements)}copy(t){const i=this.elements,x=t.elements;return i[0]=x[0],i[1]=x[1],i[2]=x[2],i[3]=x[3],i[4]=x[4],i[5]=x[5],i[6]=x[6],i[7]=x[7],i[8]=x[8],i[9]=x[9],i[10]=x[10],i[11]=x[11],i[12]=x[12],i[13]=x[13],i[14]=x[14],i[15]=x[15],this}copyPosition(t){const i=this.elements,x=t.elements;return i[12]=x[12],i[13]=x[13],i[14]=x[14],this}setFromMatrix3(t){const i=t.elements;return this.set(i[0],i[3],i[6],0,i[1],i[4],i[7],0,i[2],i[5],i[8],0,0,0,0,1),this}extractBasis(t,i,x){return t.setFromMatrixColumn(this,0),i.setFromMatrixColumn(this,1),x.setFromMatrixColumn(this,2),this}makeBasis(t,i,x){return this.set(t.x,i.x,x.x,0,t.y,i.y,x.y,0,t.z,i.z,x.z,0,0,0,0,1),this}extractRotation(t){const i=this.elements,x=t.elements,T=1/vf.setFromMatrixColumn(t,0).length(),E=1/vf.setFromMatrixColumn(t,1).length(),s=1/vf.setFromMatrixColumn(t,2).length();return i[0]=x[0]*T,i[1]=x[1]*T,i[2]=x[2]*T,i[3]=0,i[4]=x[4]*E,i[5]=x[5]*E,i[6]=x[6]*E,i[7]=0,i[8]=x[8]*s,i[9]=x[9]*s,i[10]=x[10]*s,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}makeRotationFromEuler(t){const i=this.elements,x=t.x,T=t.y,E=t.z,s=Math.cos(x),y=Math.sin(x),e=Math.cos(T),r=Math.sin(T),p=Math.cos(E),h=Math.sin(E);if(t.order==="XYZ"){const a=s*p,l=s*h,n=y*p,u=y*h;i[0]=e*p,i[4]=-e*h,i[8]=r,i[1]=l+n*r,i[5]=a-u*r,i[9]=-y*e,i[2]=u-a*r,i[6]=n+l*r,i[10]=s*e}else if(t.order==="YXZ"){const a=e*p,l=e*h,n=r*p,u=r*h;i[0]=a+u*y,i[4]=n*y-l,i[8]=s*r,i[1]=s*h,i[5]=s*p,i[9]=-y,i[2]=l*y-n,i[6]=u+a*y,i[10]=s*e}else if(t.order==="ZXY"){const a=e*p,l=e*h,n=r*p,u=r*h;i[0]=a-u*y,i[4]=-s*h,i[8]=n+l*y,i[1]=l+n*y,i[5]=s*p,i[9]=u-a*y,i[2]=-s*r,i[6]=y,i[10]=s*e}else if(t.order==="ZYX"){const a=s*p,l=s*h,n=y*p,u=y*h;i[0]=e*p,i[4]=n*r-l,i[8]=a*r+u,i[1]=e*h,i[5]=u*r+a,i[9]=l*r-n,i[2]=-r,i[6]=y*e,i[10]=s*e}else if(t.order==="YZX"){const a=s*e,l=s*r,n=y*e,u=y*r;i[0]=e*p,i[4]=u-a*h,i[8]=n*h+l,i[1]=h,i[5]=s*p,i[9]=-y*p,i[2]=-r*p,i[6]=l*h+n,i[10]=a-u*h}else if(t.order==="XZY"){const a=s*e,l=s*r,n=y*e,u=y*r;i[0]=e*p,i[4]=-h,i[8]=r*p,i[1]=a*h+u,i[5]=s*p,i[9]=l*h-n,i[2]=n*h-l,i[6]=y*p,i[10]=u*h+a}return i[3]=0,i[7]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}makeRotationFromQuaternion(t){return this.compose(eN,t,iN)}lookAt(t,i,x){const T=this.elements;return ta.subVectors(t,i),ta.lengthSq()===0&&(ta.z=1),ta.normalize(),nh.crossVectors(x,ta),nh.lengthSq()===0&&(Math.abs(x.z)===1?ta.x+=1e-4:ta.z+=1e-4,ta.normalize(),nh.crossVectors(x,ta)),nh.normalize(),fv.crossVectors(ta,nh),T[0]=nh.x,T[4]=fv.x,T[8]=ta.x,T[1]=nh.y,T[5]=fv.y,T[9]=ta.y,T[2]=nh.z,T[6]=fv.z,T[10]=ta.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,i){const x=t.elements,T=i.elements,E=this.elements,s=x[0],y=x[4],e=x[8],r=x[12],p=x[1],h=x[5],a=x[9],l=x[13],n=x[2],u=x[6],f=x[10],o=x[14],c=x[3],d=x[7],v=x[11],m=x[15],S=T[0],M=T[4],w=T[8],C=T[12],A=T[1],P=T[5],b=T[9],O=T[13],I=T[2],D=T[6],B=T[10],G=T[14],z=T[3],X=T[7],j=T[11],Q=T[15];return E[0]=s*S+y*A+e*I+r*z,E[4]=s*M+y*P+e*D+r*X,E[8]=s*w+y*b+e*B+r*j,E[12]=s*C+y*O+e*G+r*Q,E[1]=p*S+h*A+a*I+l*z,E[5]=p*M+h*P+a*D+l*X,E[9]=p*w+h*b+a*B+l*j,E[13]=p*C+h*O+a*G+l*Q,E[2]=n*S+u*A+f*I+o*z,E[6]=n*M+u*P+f*D+o*X,E[10]=n*w+u*b+f*B+o*j,E[14]=n*C+u*O+f*G+o*Q,E[3]=c*S+d*A+v*I+m*z,E[7]=c*M+d*P+v*D+m*X,E[11]=c*w+d*b+v*B+m*j,E[15]=c*C+d*O+v*G+m*Q,this}multiplyScalar(t){const i=this.elements;return i[0]*=t,i[4]*=t,i[8]*=t,i[12]*=t,i[1]*=t,i[5]*=t,i[9]*=t,i[13]*=t,i[2]*=t,i[6]*=t,i[10]*=t,i[14]*=t,i[3]*=t,i[7]*=t,i[11]*=t,i[15]*=t,this}determinant(){const t=this.elements,i=t[0],x=t[4],T=t[8],E=t[12],s=t[1],y=t[5],e=t[9],r=t[13],p=t[2],h=t[6],a=t[10],l=t[14],n=t[3],u=t[7],f=t[11],o=t[15];return n*(+E*e*h-T*r*h-E*y*a+x*r*a+T*y*l-x*e*l)+u*(+i*e*l-i*r*a+E*s*a-T*s*l+T*r*p-E*e*p)+f*(+i*r*h-i*y*l-E*s*h+x*s*l+E*y*p-x*r*p)+o*(-T*y*p-i*e*h+i*y*a+T*s*h-x*s*a+x*e*p)}transpose(){const t=this.elements;let i;return i=t[1],t[1]=t[4],t[4]=i,i=t[2],t[2]=t[8],t[8]=i,i=t[6],t[6]=t[9],t[9]=i,i=t[3],t[3]=t[12],t[12]=i,i=t[7],t[7]=t[13],t[13]=i,i=t[11],t[11]=t[14],t[14]=i,this}setPosition(t,i,x){const T=this.elements;return t.isVector3?(T[12]=t.x,T[13]=t.y,T[14]=t.z):(T[12]=t,T[13]=i,T[14]=x),this}invert(){const t=this.elements,i=t[0],x=t[1],T=t[2],E=t[3],s=t[4],y=t[5],e=t[6],r=t[7],p=t[8],h=t[9],a=t[10],l=t[11],n=t[12],u=t[13],f=t[14],o=t[15],c=h*f*r-u*a*r+u*e*l-y*f*l-h*e*o+y*a*o,d=n*a*r-p*f*r-n*e*l+s*f*l+p*e*o-s*a*o,v=p*u*r-n*h*r+n*y*l-s*u*l-p*y*o+s*h*o,m=n*h*e-p*u*e-n*y*a+s*u*a+p*y*f-s*h*f,S=i*c+x*d+T*v+E*m;if(S===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const M=1/S;return t[0]=c*M,t[1]=(u*a*E-h*f*E-u*T*l+x*f*l+h*T*o-x*a*o)*M,t[2]=(y*f*E-u*e*E+u*T*r-x*f*r-y*T*o+x*e*o)*M,t[3]=(h*e*E-y*a*E-h*T*r+x*a*r+y*T*l-x*e*l)*M,t[4]=d*M,t[5]=(p*f*E-n*a*E+n*T*l-i*f*l-p*T*o+i*a*o)*M,t[6]=(n*e*E-s*f*E-n*T*r+i*f*r+s*T*o-i*e*o)*M,t[7]=(s*a*E-p*e*E+p*T*r-i*a*r-s*T*l+i*e*l)*M,t[8]=v*M,t[9]=(n*h*E-p*u*E-n*x*l+i*u*l+p*x*o-i*h*o)*M,t[10]=(s*u*E-n*y*E+n*x*r-i*u*r-s*x*o+i*y*o)*M,t[11]=(p*y*E-s*h*E-p*x*r+i*h*r+s*x*l-i*y*l)*M,t[12]=m*M,t[13]=(p*u*T-n*h*T+n*x*a-i*u*a-p*x*f+i*h*f)*M,t[14]=(n*y*T-s*u*T-n*x*e+i*u*e+s*x*f-i*y*f)*M,t[15]=(s*h*T-p*y*T+p*x*e-i*h*e-s*x*a+i*y*a)*M,this}scale(t){const i=this.elements,x=t.x,T=t.y,E=t.z;return i[0]*=x,i[4]*=T,i[8]*=E,i[1]*=x,i[5]*=T,i[9]*=E,i[2]*=x,i[6]*=T,i[10]*=E,i[3]*=x,i[7]*=T,i[11]*=E,this}getMaxScaleOnAxis(){const t=this.elements,i=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],x=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],T=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(i,x,T))}makeTranslation(t,i,x){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,i,0,0,1,x,0,0,0,1),this}makeRotationX(t){const i=Math.cos(t),x=Math.sin(t);return this.set(1,0,0,0,0,i,-x,0,0,x,i,0,0,0,0,1),this}makeRotationY(t){const i=Math.cos(t),x=Math.sin(t);return this.set(i,0,x,0,0,1,0,0,-x,0,i,0,0,0,0,1),this}makeRotationZ(t){const i=Math.cos(t),x=Math.sin(t);return this.set(i,-x,0,0,x,i,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,i){const x=Math.cos(i),T=Math.sin(i),E=1-x,s=t.x,y=t.y,e=t.z,r=E*s,p=E*y;return this.set(r*s+x,r*y-T*e,r*e+T*y,0,r*y+T*e,p*y+x,p*e-T*s,0,r*e-T*y,p*e+T*s,E*e*e+x,0,0,0,0,1),this}makeScale(t,i,x){return this.set(t,0,0,0,0,i,0,0,0,0,x,0,0,0,0,1),this}makeShear(t,i,x,T,E,s){return this.set(1,x,E,0,t,1,s,0,i,T,1,0,0,0,0,1),this}compose(t,i,x){const T=this.elements,E=i._x,s=i._y,y=i._z,e=i._w,r=E+E,p=s+s,h=y+y,a=E*r,l=E*p,n=E*h,u=s*p,f=s*h,o=y*h,c=e*r,d=e*p,v=e*h,m=x.x,S=x.y,M=x.z;return T[0]=(1-(u+o))*m,T[1]=(l+v)*m,T[2]=(n-d)*m,T[3]=0,T[4]=(l-v)*S,T[5]=(1-(a+o))*S,T[6]=(f+c)*S,T[7]=0,T[8]=(n+d)*M,T[9]=(f-c)*M,T[10]=(1-(a+u))*M,T[11]=0,T[12]=t.x,T[13]=t.y,T[14]=t.z,T[15]=1,this}decompose(t,i,x){const T=this.elements;let E=vf.set(T[0],T[1],T[2]).length();const s=vf.set(T[4],T[5],T[6]).length(),y=vf.set(T[8],T[9],T[10]).length();this.determinant()<0&&(E=-E),t.x=T[12],t.y=T[13],t.z=T[14],Qa.copy(this);const r=1/E,p=1/s,h=1/y;return Qa.elements[0]*=r,Qa.elements[1]*=r,Qa.elements[2]*=r,Qa.elements[4]*=p,Qa.elements[5]*=p,Qa.elements[6]*=p,Qa.elements[8]*=h,Qa.elements[9]*=h,Qa.elements[10]*=h,i.setFromRotationMatrix(Qa),x.x=E,x.y=s,x.z=y,this}makePerspective(t,i,x,T,E,s,y=Uo){const e=this.elements,r=2*E/(i-t),p=2*E/(x-T),h=(i+t)/(i-t),a=(x+T)/(x-T);let l,n;if(y===Uo)l=-(s+E)/(s-E),n=-2*s*E/(s-E);else if(y===Nd)l=-s/(s-E),n=-s*E/(s-E);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+y);return e[0]=r,e[4]=0,e[8]=h,e[12]=0,e[1]=0,e[5]=p,e[9]=a,e[13]=0,e[2]=0,e[6]=0,e[10]=l,e[14]=n,e[3]=0,e[7]=0,e[11]=-1,e[15]=0,this}makeOrthographic(t,i,x,T,E,s,y=Uo){const e=this.elements,r=1/(i-t),p=1/(x-T),h=1/(s-E),a=(i+t)*r,l=(x+T)*p;let n,u;if(y===Uo)n=(s+E)*h,u=-2*h;else if(y===Nd)n=E*h,u=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+y);return e[0]=2*r,e[4]=0,e[8]=0,e[12]=-a,e[1]=0,e[5]=2*p,e[9]=0,e[13]=-l,e[2]=0,e[6]=0,e[10]=u,e[14]=-n,e[3]=0,e[7]=0,e[11]=0,e[15]=1,this}equals(t){const i=this.elements,x=t.elements;for(let T=0;T<16;T++)if(i[T]!==x[T])return!1;return!0}fromArray(t,i=0){for(let x=0;x<16;x++)this.elements[x]=t[x+i];return this}toArray(t=[],i=0){const x=this.elements;return t[i]=x[0],t[i+1]=x[1],t[i+2]=x[2],t[i+3]=x[3],t[i+4]=x[4],t[i+5]=x[5],t[i+6]=x[6],t[i+7]=x[7],t[i+8]=x[8],t[i+9]=x[9],t[i+10]=x[10],t[i+11]=x[11],t[i+12]=x[12],t[i+13]=x[13],t[i+14]=x[14],t[i+15]=x[15],t}}const vf=new Ct,Qa=new di,eN=new Ct(0,0,0),iN=new Ct(1,1,1),nh=new Ct,fv=new Ct,ta=new Ct,IT=new di,NT=new Is;class to{constructor(t=0,i=0,x=0,T=to.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=x,this._order=T}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,i,x,T=this._order){return this._x=t,this._y=i,this._z=x,this._order=T,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,i=this._order,x=!0){const T=t.elements,E=T[0],s=T[4],y=T[8],e=T[1],r=T[5],p=T[9],h=T[2],a=T[6],l=T[10];switch(i){case"XYZ":this._y=Math.asin(Zn(y,-1,1)),Math.abs(y)<.9999999?(this._x=Math.atan2(-p,l),this._z=Math.atan2(-s,E)):(this._x=Math.atan2(a,r),this._z=0);break;case"YXZ":this._x=Math.asin(-Zn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(y,l),this._z=Math.atan2(e,r)):(this._y=Math.atan2(-h,E),this._z=0);break;case"ZXY":this._x=Math.asin(Zn(a,-1,1)),Math.abs(a)<.9999999?(this._y=Math.atan2(-h,l),this._z=Math.atan2(-s,r)):(this._y=0,this._z=Math.atan2(e,E));break;case"ZYX":this._y=Math.asin(-Zn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(a,l),this._z=Math.atan2(e,E)):(this._x=0,this._z=Math.atan2(-s,r));break;case"YZX":this._z=Math.asin(Zn(e,-1,1)),Math.abs(e)<.9999999?(this._x=Math.atan2(-p,r),this._y=Math.atan2(-h,E)):(this._x=0,this._y=Math.atan2(y,l));break;case"XZY":this._z=Math.asin(-Zn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(a,r),this._y=Math.atan2(y,E)):(this._x=Math.atan2(-p,l),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,x===!0&&this._onChangeCallback(),this}setFromQuaternion(t,i,x){return IT.makeRotationFromQuaternion(t),this.setFromRotationMatrix(IT,i,x)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return NT.setFromEuler(this),this.setFromQuaternion(NT,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}to.DEFAULT_ORDER="XYZ";class Mu{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let i=0;i1){for(let x=0;x0&&(T.userData=this.userData),T.layers=this.layers.mask,T.matrix=this.matrix.toArray(),T.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(T.matrixAutoUpdate=!1),this.isInstancedMesh&&(T.type="InstancedMesh",T.count=this.count,T.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(T.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(T.type="BatchedMesh",T.perObjectFrustumCulled=this.perObjectFrustumCulled,T.sortObjects=this.sortObjects,T.drawRanges=this._drawRanges,T.reservedRanges=this._reservedRanges,T.visibility=this._visibility,T.active=this._active,T.bounds=this._bounds.map(y=>({boxInitialized:y.boxInitialized,boxMin:y.box.min.toArray(),boxMax:y.box.max.toArray(),sphereInitialized:y.sphereInitialized,sphereRadius:y.sphere.radius,sphereCenter:y.sphere.center.toArray()})),T.maxGeometryCount=this._maxGeometryCount,T.maxVertexCount=this._maxVertexCount,T.maxIndexCount=this._maxIndexCount,T.geometryInitialized=this._geometryInitialized,T.geometryCount=this._geometryCount,T.matricesTexture=this._matricesTexture.toJSON(t),this.boundingSphere!==null&&(T.boundingSphere={center:T.boundingSphere.center.toArray(),radius:T.boundingSphere.radius}),this.boundingBox!==null&&(T.boundingBox={min:T.boundingBox.min.toArray(),max:T.boundingBox.max.toArray()}));function E(y,e){return y[e.uuid]===void 0&&(y[e.uuid]=e.toJSON(t)),e.uuid}if(this.isScene)this.background&&(this.background.isColor?T.background=this.background.toJSON():this.background.isTexture&&(T.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(T.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){T.geometry=E(t.geometries,this.geometry);const y=this.geometry.parameters;if(y!==void 0&&y.shapes!==void 0){const e=y.shapes;if(Array.isArray(e))for(let r=0,p=e.length;r0){T.children=[];for(let y=0;y0){T.animations=[];for(let y=0;y0&&(x.geometries=y),e.length>0&&(x.materials=e),r.length>0&&(x.textures=r),p.length>0&&(x.images=p),h.length>0&&(x.shapes=h),a.length>0&&(x.skeletons=a),l.length>0&&(x.animations=l),n.length>0&&(x.nodes=n)}return x.object=T,x;function s(y){const e=[];for(const r in y){const p=y[r];delete p.metadata,e.push(p)}return e}}clone(t){return new this.constructor().copy(this,t)}copy(t,i=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),i===!0)for(let x=0;x0?T.multiplyScalar(1/Math.sqrt(E)):T.set(0,0,0)}static getBarycoord(t,i,x,T,E){_a.subVectors(T,i),pl.subVectors(x,i),D0.subVectors(t,i);const s=_a.dot(_a),y=_a.dot(pl),e=_a.dot(D0),r=pl.dot(pl),p=pl.dot(D0),h=s*r-y*y;if(h===0)return E.set(0,0,0),null;const a=1/h,l=(r*e-y*p)*a,n=(s*p-y*e)*a;return E.set(1-l-n,n,l)}static containsPoint(t,i,x,T){return this.getBarycoord(t,i,x,T,vl)===null?!1:vl.x>=0&&vl.y>=0&&vl.x+vl.y<=1}static getInterpolation(t,i,x,T,E,s,y,e){return this.getBarycoord(t,i,x,T,vl)===null?(e.x=0,e.y=0,"z"in e&&(e.z=0),"w"in e&&(e.w=0),null):(e.setScalar(0),e.addScaledVector(E,vl.x),e.addScaledVector(s,vl.y),e.addScaledVector(y,vl.z),e)}static isFrontFacing(t,i,x,T){return _a.subVectors(x,i),pl.subVectors(t,i),_a.cross(pl).dot(T)<0}set(t,i,x){return this.a.copy(t),this.b.copy(i),this.c.copy(x),this}setFromPointsAndIndices(t,i,x,T){return this.a.copy(t[i]),this.b.copy(t[x]),this.c.copy(t[T]),this}setFromAttributeAndIndices(t,i,x,T){return this.a.fromBufferAttribute(t,i),this.b.fromBufferAttribute(t,x),this.c.fromBufferAttribute(t,T),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return _a.subVectors(this.c,this.b),pl.subVectors(this.a,this.b),_a.cross(pl).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return na.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,i){return na.getBarycoord(t,this.a,this.b,this.c,i)}getInterpolation(t,i,x,T,E){return na.getInterpolation(t,this.a,this.b,this.c,i,x,T,E)}containsPoint(t){return na.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return na.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,i){const x=this.a,T=this.b,E=this.c;let s,y;gf.subVectors(T,x),yf.subVectors(E,x),I0.subVectors(t,x);const e=gf.dot(I0),r=yf.dot(I0);if(e<=0&&r<=0)return i.copy(x);N0.subVectors(t,T);const p=gf.dot(N0),h=yf.dot(N0);if(p>=0&&h<=p)return i.copy(T);const a=e*h-p*r;if(a<=0&&e>=0&&p<=0)return s=e/(e-p),i.copy(x).addScaledVector(gf,s);B0.subVectors(t,E);const l=gf.dot(B0),n=yf.dot(B0);if(n>=0&&l<=n)return i.copy(E);const u=l*r-e*n;if(u<=0&&r>=0&&n<=0)return y=r/(r-n),i.copy(x).addScaledVector(yf,y);const f=p*n-l*h;if(f<=0&&h-p>=0&&l-n>=0)return VT.subVectors(E,T),y=(h-p)/(h-p+(l-n)),i.copy(T).addScaledVector(VT,y);const o=1/(f+u+a);return s=u*o,y=a*o,i.copy(x).addScaledVector(gf,s).addScaledVector(yf,y)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const y2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},rh={h:0,s:0,l:0},dv={h:0,s:0,l:0};function U0(g,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?g+(t-g)*6*i:i<1/2?t:i<2/3?g+(t-g)*6*(2/3-i):g}class ze{constructor(t,i,x){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,i,x)}set(t,i,x){if(i===void 0&&x===void 0){const T=t;T&&T.isColor?this.copy(T):typeof T=="number"?this.setHex(T):typeof T=="string"&&this.setStyle(T)}else this.setRGB(t,i,x);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,i=mr){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,sn.toWorkingColorSpace(this,i),this}setRGB(t,i,x,T=sn.workingColorSpace){return this.r=t,this.g=i,this.b=x,sn.toWorkingColorSpace(this,T),this}setHSL(t,i,x,T=sn.workingColorSpace){if(t=x1(t,1),i=Zn(i,0,1),x=Zn(x,0,1),i===0)this.r=this.g=this.b=x;else{const E=x<=.5?x*(1+i):x+i-x*i,s=2*x-E;this.r=U0(s,E,t+1/3),this.g=U0(s,E,t),this.b=U0(s,E,t-1/3)}return sn.toWorkingColorSpace(this,T),this}setStyle(t,i=mr){function x(E){E!==void 0&&parseFloat(E)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let T;if(T=/^(\w+)\(([^\)]*)\)/.exec(t)){let E;const s=T[1],y=T[2];switch(s){case"rgb":case"rgba":if(E=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return x(E[4]),this.setRGB(Math.min(255,parseInt(E[1],10))/255,Math.min(255,parseInt(E[2],10))/255,Math.min(255,parseInt(E[3],10))/255,i);if(E=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return x(E[4]),this.setRGB(Math.min(100,parseInt(E[1],10))/100,Math.min(100,parseInt(E[2],10))/100,Math.min(100,parseInt(E[3],10))/100,i);break;case"hsl":case"hsla":if(E=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(y))return x(E[4]),this.setHSL(parseFloat(E[1])/360,parseFloat(E[2])/100,parseFloat(E[3])/100,i);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(T=/^\#([A-Fa-f\d]+)$/.exec(t)){const E=T[1],s=E.length;if(s===3)return this.setRGB(parseInt(E.charAt(0),16)/15,parseInt(E.charAt(1),16)/15,parseInt(E.charAt(2),16)/15,i);if(s===6)return this.setHex(parseInt(E,16),i);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,i);return this}setColorName(t,i=mr){const x=y2[t.toLowerCase()];return x!==void 0?this.setHex(x,i):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Kf(t.r),this.g=Kf(t.g),this.b=Kf(t.b),this}copyLinearToSRGB(t){return this.r=w0(t.r),this.g=w0(t.g),this.b=w0(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=mr){return sn.fromWorkingColorSpace(Kr.copy(this),t),Math.round(Zn(Kr.r*255,0,255))*65536+Math.round(Zn(Kr.g*255,0,255))*256+Math.round(Zn(Kr.b*255,0,255))}getHexString(t=mr){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,i=sn.workingColorSpace){sn.fromWorkingColorSpace(Kr.copy(this),i);const x=Kr.r,T=Kr.g,E=Kr.b,s=Math.max(x,T,E),y=Math.min(x,T,E);let e,r;const p=(y+s)/2;if(y===s)e=0,r=0;else{const h=s-y;switch(r=p<=.5?h/(s+y):h/(2-s-y),s){case x:e=(T-E)/h+(T0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const i in t){const x=t[i];if(x===void 0){console.warn(`THREE.Material: parameter '${i}' has value of undefined.`);continue}const T=this[i];if(T===void 0){console.warn(`THREE.Material: '${i}' is not a property of THREE.${this.type}.`);continue}T&&T.isColor?T.set(x):T&&T.isVector3&&x&&x.isVector3?T.copy(x):this[i]=x}}toJSON(t){const i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});const x={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};x.uuid=this.uuid,x.type=this.type,this.name!==""&&(x.name=this.name),this.color&&this.color.isColor&&(x.color=this.color.getHex()),this.roughness!==void 0&&(x.roughness=this.roughness),this.metalness!==void 0&&(x.metalness=this.metalness),this.sheen!==void 0&&(x.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(x.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(x.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(x.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(x.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(x.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(x.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(x.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(x.shininess=this.shininess),this.clearcoat!==void 0&&(x.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(x.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(x.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(x.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(x.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,x.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(x.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(x.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(x.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(x.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(x.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(x.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(x.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(x.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(x.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(x.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(x.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(x.lightMap=this.lightMap.toJSON(t).uuid,x.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(x.aoMap=this.aoMap.toJSON(t).uuid,x.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(x.bumpMap=this.bumpMap.toJSON(t).uuid,x.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(x.normalMap=this.normalMap.toJSON(t).uuid,x.normalMapType=this.normalMapType,x.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(x.displacementMap=this.displacementMap.toJSON(t).uuid,x.displacementScale=this.displacementScale,x.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(x.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(x.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(x.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(x.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(x.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(x.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(x.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(x.combine=this.combine)),this.envMapIntensity!==void 0&&(x.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(x.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(x.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(x.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(x.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(x.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(x.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(x.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(x.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(x.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(x.size=this.size),this.shadowSide!==null&&(x.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(x.sizeAttenuation=this.sizeAttenuation),this.blending!==Su&&(x.blending=this.blending),this.side!==Al&&(x.side=this.side),this.vertexColors===!0&&(x.vertexColors=!0),this.opacity<1&&(x.opacity=this.opacity),this.transparent===!0&&(x.transparent=!0),this.blendSrc!==Em&&(x.blendSrc=this.blendSrc),this.blendDst!==Mm&&(x.blendDst=this.blendDst),this.blendEquation!==hh&&(x.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(x.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(x.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(x.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(x.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(x.blendAlpha=this.blendAlpha),this.depthFunc!==Md&&(x.depthFunc=this.depthFunc),this.depthTest===!1&&(x.depthTest=this.depthTest),this.depthWrite===!1&&(x.depthWrite=this.depthWrite),this.colorWrite===!1&&(x.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(x.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==yx&&(x.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(x.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(x.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==fu&&(x.stencilFail=this.stencilFail),this.stencilZFail!==fu&&(x.stencilZFail=this.stencilZFail),this.stencilZPass!==fu&&(x.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(x.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(x.rotation=this.rotation),this.polygonOffset===!0&&(x.polygonOffset=!0),this.polygonOffsetFactor!==0&&(x.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(x.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(x.linewidth=this.linewidth),this.dashSize!==void 0&&(x.dashSize=this.dashSize),this.gapSize!==void 0&&(x.gapSize=this.gapSize),this.scale!==void 0&&(x.scale=this.scale),this.dithering===!0&&(x.dithering=!0),this.alphaTest>0&&(x.alphaTest=this.alphaTest),this.alphaHash===!0&&(x.alphaHash=!0),this.alphaToCoverage===!0&&(x.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(x.premultipliedAlpha=!0),this.forceSinglePass===!0&&(x.forceSinglePass=!0),this.wireframe===!0&&(x.wireframe=!0),this.wireframeLinewidth>1&&(x.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(x.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(x.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(x.flatShading=!0),this.visible===!1&&(x.visible=!1),this.toneMapped===!1&&(x.toneMapped=!1),this.fog===!1&&(x.fog=!1),Object.keys(this.userData).length>0&&(x.userData=this.userData);function T(E){const s=[];for(const y in E){const e=E[y];delete e.metadata,s.push(e)}return s}if(i){const E=T(t.textures),s=T(t.images);E.length>0&&(x.textures=E),s.length>0&&(x.images=s)}return x}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const i=t.clippingPlanes;let x=null;if(i!==null){const T=i.length;x=new Array(T);for(let E=0;E!==T;++E)x[E]=i[E].clone()}return this.clippingPlanes=x,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}}class Eh extends Wr{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ze(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=_d,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const xl=hN();function hN(){const g=new ArrayBuffer(4),t=new Float32Array(g),i=new Uint32Array(g),x=new Uint32Array(512),T=new Uint32Array(512);for(let e=0;e<256;++e){const r=e-127;r<-27?(x[e]=0,x[e|256]=32768,T[e]=24,T[e|256]=24):r<-14?(x[e]=1024>>-r-14,x[e|256]=1024>>-r-14|32768,T[e]=-r-1,T[e|256]=-r-1):r<=15?(x[e]=r+15<<10,x[e|256]=r+15<<10|32768,T[e]=13,T[e|256]=13):r<128?(x[e]=31744,x[e|256]=64512,T[e]=24,T[e|256]=24):(x[e]=31744,x[e|256]=64512,T[e]=13,T[e|256]=13)}const E=new Uint32Array(2048),s=new Uint32Array(64),y=new Uint32Array(64);for(let e=1;e<1024;++e){let r=e<<13,p=0;for(;!(r&8388608);)r<<=1,p-=8388608;r&=-8388609,p+=947912704,E[e]=r|p}for(let e=1024;e<2048;++e)E[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=1199570944,s[32]=2147483648;for(let e=33;e<63;++e)s[e]=2147483648+(e-32<<23);s[63]=3347054592;for(let e=1;e<64;++e)e!==32&&(y[e]=1024);return{floatView:t,uint32View:i,baseTable:x,shiftTable:T,mantissaTable:E,exponentTable:s,offsetTable:y}}function Ds(g){Math.abs(g)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),g=Zn(g,-65504,65504),xl.floatView[0]=g;const t=xl.uint32View[0],i=t>>23&511;return xl.baseTable[i]+((t&8388607)>>xl.shiftTable[i])}function od(g){const t=g>>10;return xl.uint32View[0]=xl.mantissaTable[xl.offsetTable[t]+(g&1023)]+xl.exponentTable[t],xl.floatView[0]}const uN={toHalfFloat:Ds,fromHalfFloat:od},fr=new Ct,pv=new ve;class on{constructor(t,i,x=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=i,this.count=t!==void 0?t.length/i:0,this.normalized=x,this.usage=Id,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ma,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return Eu("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,i){this.updateRanges.push({start:t,count:i})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,i,x){t*=this.itemSize,x*=i.itemSize;for(let T=0,E=this.itemSize;T0&&(t.userData=this.userData),this.parameters!==void 0){const e=this.parameters;for(const r in e)e[r]!==void 0&&(t[r]=e[r]);return t}t.data={attributes:{}};const i=this.index;i!==null&&(t.data.index={type:i.array.constructor.name,array:Array.prototype.slice.call(i.array)});const x=this.attributes;for(const e in x){const r=x[e];t.data.attributes[e]=r.toJSON(t.data)}const T={};let E=!1;for(const e in this.morphAttributes){const r=this.morphAttributes[e],p=[];for(let h=0,a=r.length;h0&&(T[e]=p,E=!0)}E&&(t.data.morphAttributes=T,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const y=this.boundingSphere;return y!==null&&(t.data.boundingSphere={center:y.center.toArray(),radius:y.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const i={};this.name=t.name;const x=t.index;x!==null&&this.setIndex(x.clone(i));const T=t.attributes;for(const r in T){const p=T[r];this.setAttribute(r,p.clone(i))}const E=t.morphAttributes;for(const r in E){const p=[],h=E[r];for(let a=0,l=h.length;a0){const T=i[x[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,s=T.length;E(t.far-t.near)**2))&&(HT.copy(E).invert(),tu.copy(t.ray).applyMatrix4(HT),!(x.boundingBox!==null&&tu.intersectsBox(x.boundingBox)===!1)&&this._computeIntersections(t,i,tu)))}_computeIntersections(t,i,x){let T;const E=this.geometry,s=this.material,y=E.index,e=E.attributes.position,r=E.attributes.uv,p=E.attributes.uv1,h=E.attributes.normal,a=E.groups,l=E.drawRange;if(y!==null)if(Array.isArray(s))for(let n=0,u=a.length;ni.far?null:{distance:r,point:Tv.clone(),object:g}}function Ev(g,t,i,x,T,E,s,y,e,r){g.getVertexPosition(y,Sf),g.getVertexPosition(e,Tf),g.getVertexPosition(r,Ef);const p=xN(g,t,i,x,Sf,Tf,Ef,Sv);if(p){T&&(gv.fromBufferAttribute(T,y),yv.fromBufferAttribute(T,e),xv.fromBufferAttribute(T,r),p.uv=na.getInterpolation(Sv,Sf,Tf,Ef,gv,yv,xv,new ve)),E&&(gv.fromBufferAttribute(E,y),yv.fromBufferAttribute(E,e),xv.fromBufferAttribute(E,r),p.uv1=na.getInterpolation(Sv,Sf,Tf,Ef,gv,yv,xv,new ve),p.uv2=p.uv1),s&&(XT.fromBufferAttribute(s,y),YT.fromBufferAttribute(s,e),kT.fromBufferAttribute(s,r),p.normal=na.getInterpolation(Sv,Sf,Tf,Ef,XT,YT,kT,new Ct),p.normal.dot(x.direction)>0&&p.normal.multiplyScalar(-1));const h={a:y,b:e,c:r,normal:new Ct,materialIndex:0};na.getNormal(Sf,Tf,Ef,h.normal),p.face=h}return p}class Nu extends Fi{constructor(t=1,i=1,x=1,T=1,E=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:i,depth:x,widthSegments:T,heightSegments:E,depthSegments:s};const y=this;T=Math.floor(T),E=Math.floor(E),s=Math.floor(s);const e=[],r=[],p=[],h=[];let a=0,l=0;n("z","y","x",-1,-1,x,i,t,s,E,0),n("z","y","x",1,-1,x,i,-t,s,E,1),n("x","z","y",1,1,t,x,i,T,s,2),n("x","z","y",1,-1,t,x,-i,T,s,3),n("x","y","z",1,-1,t,i,x,T,E,4),n("x","y","z",-1,-1,t,i,-x,T,E,5),this.setIndex(e),this.setAttribute("position",new ke(r,3)),this.setAttribute("normal",new ke(p,3)),this.setAttribute("uv",new ke(h,2));function n(u,f,o,c,d,v,m,S,M,w,C){const A=v/M,P=m/w,b=v/2,O=m/2,I=S/2,D=M+1,B=w+1;let G=0,z=0;const X=new Ct;for(let j=0;j0?1:-1,p.push(X.x,X.y,X.z),h.push(tt/M),h.push(1-j/w),G+=1}}for(let j=0;j0&&(i.defines=this.defines),i.vertexShader=this.vertexShader,i.fragmentShader=this.fragmentShader,i.lights=this.lights,i.clipping=this.clipping;const x={};for(const T in this.extensions)this.extensions[T]===!0&&(x[T]=!0);return Object.keys(x).length>0&&(i.extensions=x),i}}class tp extends ki{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new di,this.projectionMatrix=new di,this.projectionMatrixInverse=new di,this.coordinateSystem=Uo}copy(t,i){return super.copy(t,i),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,i){super.updateWorldMatrix(t,i),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const sh=new Ct,jT=new ve,KT=new ve;class Dr extends tp{constructor(t=50,i=1,x=.1,T=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=x,this.far=T,this.focus=10,this.aspect=i,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,i){return super.copy(t,i),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const i=.5*this.getFilmHeight()/t;this.fov=qf*2*Math.atan(i),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(Tu*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return qf*2*Math.atan(Math.tan(Tu*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,i,x){sh.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(sh.x,sh.y).multiplyScalar(-t/sh.z),sh.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),x.set(sh.x,sh.y).multiplyScalar(-t/sh.z)}getViewSize(t,i){return this.getViewBounds(t,jT,KT),i.subVectors(KT,jT)}setViewOffset(t,i,x,T,E,s){this.aspect=t/i,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=i,this.view.offsetX=x,this.view.offsetY=T,this.view.width=E,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let i=t*Math.tan(Tu*.5*this.fov)/this.zoom,x=2*i,T=this.aspect*x,E=-.5*T;const s=this.view;if(this.view!==null&&this.view.enabled){const e=s.fullWidth,r=s.fullHeight;E+=s.offsetX*T/e,i-=s.offsetY*x/r,T*=s.width/e,x*=s.height/r}const y=this.filmOffset;y!==0&&(E+=t*y/this.getFilmWidth()),this.projectionMatrix.makePerspective(E,E+T,i,i-x,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const i=super.toJSON(t);return i.object.fov=this.fov,i.object.zoom=this.zoom,i.object.near=this.near,i.object.far=this.far,i.object.focus=this.focus,i.object.aspect=this.aspect,this.view!==null&&(i.object.view=Object.assign({},this.view)),i.object.filmGauge=this.filmGauge,i.object.filmOffset=this.filmOffset,i}}const Mf=-90,Cf=1;class T2 extends ki{constructor(t,i,x){super(),this.type="CubeCamera",this.renderTarget=x,this.coordinateSystem=null,this.activeMipmapLevel=0;const T=new Dr(Mf,Cf,t,i);T.layers=this.layers,this.add(T);const E=new Dr(Mf,Cf,t,i);E.layers=this.layers,this.add(E);const s=new Dr(Mf,Cf,t,i);s.layers=this.layers,this.add(s);const y=new Dr(Mf,Cf,t,i);y.layers=this.layers,this.add(y);const e=new Dr(Mf,Cf,t,i);e.layers=this.layers,this.add(e);const r=new Dr(Mf,Cf,t,i);r.layers=this.layers,this.add(r)}updateCoordinateSystem(){const t=this.coordinateSystem,i=this.children.concat(),[x,T,E,s,y,e]=i;for(const r of i)this.remove(r);if(t===Uo)x.up.set(0,1,0),x.lookAt(1,0,0),T.up.set(0,1,0),T.lookAt(-1,0,0),E.up.set(0,0,-1),E.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),y.up.set(0,1,0),y.lookAt(0,0,1),e.up.set(0,1,0),e.lookAt(0,0,-1);else if(t===Nd)x.up.set(0,-1,0),x.lookAt(-1,0,0),T.up.set(0,-1,0),T.lookAt(1,0,0),E.up.set(0,0,1),E.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),y.up.set(0,-1,0),y.lookAt(0,0,1),e.up.set(0,-1,0),e.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);for(const r of i)this.add(r),r.updateMatrixWorld()}update(t,i){this.parent===null&&this.updateMatrixWorld();const{renderTarget:x,activeMipmapLevel:T}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[E,s,y,e,r,p]=this.children,h=t.getRenderTarget(),a=t.getActiveCubeFace(),l=t.getActiveMipmapLevel(),n=t.xr.enabled;t.xr.enabled=!1;const u=x.texture.generateMipmaps;x.texture.generateMipmaps=!1,t.setRenderTarget(x,0,T),t.render(i,E),t.setRenderTarget(x,1,T),t.render(i,s),t.setRenderTarget(x,2,T),t.render(i,y),t.setRenderTarget(x,3,T),t.render(i,e),t.setRenderTarget(x,4,T),t.render(i,r),x.texture.generateMipmaps=u,t.setRenderTarget(x,5,T),t.render(i,p),t.setRenderTarget(h,a,l),t.xr.enabled=n,x.texture.needsPMREMUpdate=!0}}class ep extends zn{constructor(t,i,x,T,E,s,y,e,r,p){t=t!==void 0?t:[],i=i!==void 0?i:Pl,super(t,i,x,T,E,s,y,e,r,p),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class E2 extends ro{constructor(t=1,i={}){super(t,t,i),this.isWebGLCubeRenderTarget=!0;const x={width:t,height:t,depth:1},T=[x,x,x,x,x,x];i.encoding!==void 0&&(Eu("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===vh?mr:ia),this.texture=new ep(T,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!1,this.texture.minFilter=i.minFilter!==void 0?i.minFilter:Bn}fromEquirectangularTexture(t,i){this.texture.type=i.type,this.texture.colorSpace=i.colorSpace,this.texture.generateMipmaps=i.generateMipmaps,this.texture.minFilter=i.minFilter,this.texture.magFilter=i.magFilter;const x={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class so extends Wr{constructor(t){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=TN,this.fragmentShader=EN,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1,clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,t!==void 0&&this.setValues(t)}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=ec(t.uniforms),this.uniformsGroups=SN(t.uniformsGroups),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.fog=t.fog,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){const i=super.toJSON(t);i.glslVersion=this.glslVersion,i.uniforms={};for(const T in this.uniforms){const s=this.uniforms[T].value;s&&s.isTexture?i.uniforms[T]={type:"t",value:s.toJSON(t).uuid}:s&&s.isColor?i.uniforms[T]={type:"c",value:s.getHex()}:s&&s.isVector2?i.uniforms[T]={type:"v2",value:s.toArray()}:s&&s.isVector3?i.uniforms[T]={type:"v3",value:s.toArray()}:s&&s.isVector4?i.uniforms[T]={type:"v4",value:s.toArray()}:s&&s.isMatrix3?i.uniforms[T]={type:"m3",value:s.toArray()}:s&&s.isMatrix4?i.uniforms[T]={type:"m4",value:s.toArray()}:i.uniforms[T]={value:s}}Object.keys(this.defines).length>0&&(i.defines=this.defines),i.vertexShader=this.vertexShader,i.fragmentShader=this.fragmentShader,i.lights=this.lights,i.clipping=this.clipping;const x={};for(const T in this.extensions)this.extensions[T]===!0&&(x[T]=!0);return Object.keys(x).length>0&&(i.extensions=x),i}}class tp extends ki{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new di,this.projectionMatrix=new di,this.projectionMatrixInverse=new di,this.coordinateSystem=Uo}copy(t,i){return super.copy(t,i),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,i){super.updateWorldMatrix(t,i),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const sh=new Ct,jT=new ve,KT=new ve;class Dr extends tp{constructor(t=50,i=1,x=.1,T=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=x,this.far=T,this.focus=10,this.aspect=i,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,i){return super.copy(t,i),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const i=.5*this.getFilmHeight()/t;this.fov=tc*2*Math.atan(i),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(Tu*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return tc*2*Math.atan(Math.tan(Tu*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,i,x){sh.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(sh.x,sh.y).multiplyScalar(-t/sh.z),sh.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),x.set(sh.x,sh.y).multiplyScalar(-t/sh.z)}getViewSize(t,i){return this.getViewBounds(t,jT,KT),i.subVectors(KT,jT)}setViewOffset(t,i,x,T,E,s){this.aspect=t/i,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=i,this.view.offsetX=x,this.view.offsetY=T,this.view.width=E,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let i=t*Math.tan(Tu*.5*this.fov)/this.zoom,x=2*i,T=this.aspect*x,E=-.5*T;const s=this.view;if(this.view!==null&&this.view.enabled){const e=s.fullWidth,r=s.fullHeight;E+=s.offsetX*T/e,i-=s.offsetY*x/r,T*=s.width/e,x*=s.height/r}const y=this.filmOffset;y!==0&&(E+=t*y/this.getFilmWidth()),this.projectionMatrix.makePerspective(E,E+T,i,i-x,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const i=super.toJSON(t);return i.object.fov=this.fov,i.object.zoom=this.zoom,i.object.near=this.near,i.object.far=this.far,i.object.focus=this.focus,i.object.aspect=this.aspect,this.view!==null&&(i.object.view=Object.assign({},this.view)),i.object.filmGauge=this.filmGauge,i.object.filmOffset=this.filmOffset,i}}const Mf=-90,Cf=1;class T2 extends ki{constructor(t,i,x){super(),this.type="CubeCamera",this.renderTarget=x,this.coordinateSystem=null,this.activeMipmapLevel=0;const T=new Dr(Mf,Cf,t,i);T.layers=this.layers,this.add(T);const E=new Dr(Mf,Cf,t,i);E.layers=this.layers,this.add(E);const s=new Dr(Mf,Cf,t,i);s.layers=this.layers,this.add(s);const y=new Dr(Mf,Cf,t,i);y.layers=this.layers,this.add(y);const e=new Dr(Mf,Cf,t,i);e.layers=this.layers,this.add(e);const r=new Dr(Mf,Cf,t,i);r.layers=this.layers,this.add(r)}updateCoordinateSystem(){const t=this.coordinateSystem,i=this.children.concat(),[x,T,E,s,y,e]=i;for(const r of i)this.remove(r);if(t===Uo)x.up.set(0,1,0),x.lookAt(1,0,0),T.up.set(0,1,0),T.lookAt(-1,0,0),E.up.set(0,0,-1),E.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),y.up.set(0,1,0),y.lookAt(0,0,1),e.up.set(0,1,0),e.lookAt(0,0,-1);else if(t===Nd)x.up.set(0,-1,0),x.lookAt(-1,0,0),T.up.set(0,-1,0),T.lookAt(1,0,0),E.up.set(0,0,1),E.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),y.up.set(0,-1,0),y.lookAt(0,0,1),e.up.set(0,-1,0),e.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);for(const r of i)this.add(r),r.updateMatrixWorld()}update(t,i){this.parent===null&&this.updateMatrixWorld();const{renderTarget:x,activeMipmapLevel:T}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[E,s,y,e,r,p]=this.children,h=t.getRenderTarget(),a=t.getActiveCubeFace(),l=t.getActiveMipmapLevel(),n=t.xr.enabled;t.xr.enabled=!1;const u=x.texture.generateMipmaps;x.texture.generateMipmaps=!1,t.setRenderTarget(x,0,T),t.render(i,E),t.setRenderTarget(x,1,T),t.render(i,s),t.setRenderTarget(x,2,T),t.render(i,y),t.setRenderTarget(x,3,T),t.render(i,e),t.setRenderTarget(x,4,T),t.render(i,r),x.texture.generateMipmaps=u,t.setRenderTarget(x,5,T),t.render(i,p),t.setRenderTarget(h,a,l),t.xr.enabled=n,x.texture.needsPMREMUpdate=!0}}class ep extends zn{constructor(t,i,x,T,E,s,y,e,r,p){t=t!==void 0?t:[],i=i!==void 0?i:Pl,super(t,i,x,T,E,s,y,e,r,p),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class E2 extends ro{constructor(t=1,i={}){super(t,t,i),this.isWebGLCubeRenderTarget=!0;const x={width:t,height:t,depth:1},T=[x,x,x,x,x,x];i.encoding!==void 0&&(Eu("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===vh?mr:ia),this.texture=new ep(T,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!1,this.texture.minFilter=i.minFilter!==void 0?i.minFilter:Bn}fromEquirectangularTexture(t,i){this.texture.type=i.type,this.texture.colorSpace=i.colorSpace,this.texture.generateMipmaps=i.generateMipmaps,this.texture.minFilter=i.minFilter,this.texture.magFilter=i.magFilter;const x={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -6445,7 +6445,7 @@ ${t.stack}`):console.error(`[DEBUG] ${Tm(g)}`))},ri={enable:jI,disable:KI,isEnab gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},T=new Nu(5,5,5),E=new so({name:"CubemapFromEquirect",uniforms:tc(x.uniforms),vertexShader:x.vertexShader,fragmentShader:x.fragmentShader,side:gs,blending:wl});E.uniforms.tEquirect.value=i;const s=new dr(T,E),y=i.minFilter;return i.minFilter===Bo&&(i.minFilter=Bn),new T2(1,10,this).update(t,s),i.minFilter=y,s.geometry.dispose(),s.material.dispose(),this}clear(t,i,x,T){const E=t.getRenderTarget();for(let s=0;s<6;s++)t.setRenderTarget(this,s),t.clear(i,x,T);t.setRenderTarget(E)}}const V0=new Ct,MN=new Ct,CN=new Di;class lh{constructor(t=new Ct(1,0,0),i=0){this.isPlane=!0,this.normal=t,this.constant=i}set(t,i){return this.normal.copy(t),this.constant=i,this}setComponents(t,i,x,T){return this.normal.set(t,i,x),this.constant=T,this}setFromNormalAndCoplanarPoint(t,i){return this.normal.copy(t),this.constant=-i.dot(this.normal),this}setFromCoplanarPoints(t,i,x){const T=V0.subVectors(x,i).cross(MN.subVectors(t,i)).normalize();return this.setFromNormalAndCoplanarPoint(T,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,i){return i.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,i){const x=t.delta(V0),T=this.normal.dot(x);if(T===0)return this.distanceToPoint(t.start)===0?i.copy(t.start):null;const E=-(t.start.dot(this.normal)+this.constant)/T;return E<0||E>1?null:i.copy(t.start).addScaledVector(x,E)}intersectsLine(t){const i=this.distanceToPoint(t.start),x=this.distanceToPoint(t.end);return i<0&&x>0||x<0&&i>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,i){const x=i||CN.getNormalMatrix(t),T=this.coplanarPoint(V0).applyMatrix4(t),E=this.normal.applyMatrix3(x).normalize();return this.constant=-T.dot(E),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}const eu=new Qr,Mv=new Ct;class ip{constructor(t=new lh,i=new lh,x=new lh,T=new lh,E=new lh,s=new lh){this.planes=[t,i,x,T,E,s]}set(t,i,x,T,E,s){const y=this.planes;return y[0].copy(t),y[1].copy(i),y[2].copy(x),y[3].copy(T),y[4].copy(E),y[5].copy(s),this}copy(t){const i=this.planes;for(let x=0;x<6;x++)i[x].copy(t.planes[x]);return this}setFromProjectionMatrix(t,i=Uo){const x=this.planes,T=t.elements,E=T[0],s=T[1],y=T[2],e=T[3],r=T[4],p=T[5],h=T[6],a=T[7],l=T[8],n=T[9],u=T[10],f=T[11],o=T[12],c=T[13],d=T[14],v=T[15];if(x[0].setComponents(e-E,a-r,f-l,v-o).normalize(),x[1].setComponents(e+E,a+r,f+l,v+o).normalize(),x[2].setComponents(e+s,a+p,f+n,v+c).normalize(),x[3].setComponents(e-s,a-p,f-n,v-c).normalize(),x[4].setComponents(e-y,a-h,f-u,v-d).normalize(),i===Uo)x[5].setComponents(e+y,a+h,f+u,v+d).normalize();else if(i===Nd)x[5].setComponents(y,h,u,d).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+i);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),eu.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const i=t.geometry;i.boundingSphere===null&&i.computeBoundingSphere(),eu.copy(i.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(eu)}intersectsSprite(t){return eu.center.set(0,0,0),eu.radius=.7071067811865476,eu.applyMatrix4(t.matrixWorld),this.intersectsSphere(eu)}intersectsSphere(t){const i=this.planes,x=t.center,T=-t.radius;for(let E=0;E<6;E++)if(i[E].distanceToPoint(x)0?t.max.x:t.min.x,Mv.y=T.normal.y>0?t.max.y:t.min.y,Mv.z=T.normal.z>0?t.max.z:t.min.z,T.distanceToPoint(Mv)<0)return!1}return!0}containsPoint(t){const i=this.planes;for(let x=0;x<6;x++)if(i[x].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function M2(){let g=null,t=!1,i=null,x=null;function T(E,s){i(E,s),x=g.requestAnimationFrame(T)}return{start:function(){t!==!0&&i!==null&&(x=g.requestAnimationFrame(T),t=!0)},stop:function(){g.cancelAnimationFrame(x),t=!1},setAnimationLoop:function(E){i=E},setContext:function(E){g=E}}}function wN(g,t){const i=t.isWebGL2,x=new WeakMap;function T(r,p){const h=r.array,a=r.usage,l=h.byteLength,n=g.createBuffer();g.bindBuffer(p,n),g.bufferData(p,h,a),r.onUploadCallback();let u;if(h instanceof Float32Array)u=g.FLOAT;else if(h instanceof Uint16Array)if(r.isFloat16BufferAttribute)if(i)u=g.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else u=g.UNSIGNED_SHORT;else if(h instanceof Int16Array)u=g.SHORT;else if(h instanceof Uint32Array)u=g.UNSIGNED_INT;else if(h instanceof Int32Array)u=g.INT;else if(h instanceof Int8Array)u=g.BYTE;else if(h instanceof Uint8Array)u=g.UNSIGNED_BYTE;else if(h instanceof Uint8ClampedArray)u=g.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:n,type:u,bytesPerElement:h.BYTES_PER_ELEMENT,version:r.version,size:l}}function E(r,p,h){const a=p.array,l=p._updateRange,n=p.updateRanges;if(g.bindBuffer(h,r),l.count===-1&&n.length===0&&g.bufferSubData(h,0,a),n.length!==0){for(let u=0,f=n.length;u1?null:i.copy(t.start).addScaledVector(x,E)}intersectsLine(t){const i=this.distanceToPoint(t.start),x=this.distanceToPoint(t.end);return i<0&&x>0||x<0&&i>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,i){const x=i||CN.getNormalMatrix(t),T=this.coplanarPoint(V0).applyMatrix4(t),E=this.normal.applyMatrix3(x).normalize();return this.constant=-T.dot(E),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}const eu=new Qr,Mv=new Ct;class ip{constructor(t=new lh,i=new lh,x=new lh,T=new lh,E=new lh,s=new lh){this.planes=[t,i,x,T,E,s]}set(t,i,x,T,E,s){const y=this.planes;return y[0].copy(t),y[1].copy(i),y[2].copy(x),y[3].copy(T),y[4].copy(E),y[5].copy(s),this}copy(t){const i=this.planes;for(let x=0;x<6;x++)i[x].copy(t.planes[x]);return this}setFromProjectionMatrix(t,i=Uo){const x=this.planes,T=t.elements,E=T[0],s=T[1],y=T[2],e=T[3],r=T[4],p=T[5],h=T[6],a=T[7],l=T[8],n=T[9],u=T[10],f=T[11],o=T[12],c=T[13],d=T[14],v=T[15];if(x[0].setComponents(e-E,a-r,f-l,v-o).normalize(),x[1].setComponents(e+E,a+r,f+l,v+o).normalize(),x[2].setComponents(e+s,a+p,f+n,v+c).normalize(),x[3].setComponents(e-s,a-p,f-n,v-c).normalize(),x[4].setComponents(e-y,a-h,f-u,v-d).normalize(),i===Uo)x[5].setComponents(e+y,a+h,f+u,v+d).normalize();else if(i===Nd)x[5].setComponents(y,h,u,d).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+i);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),eu.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const i=t.geometry;i.boundingSphere===null&&i.computeBoundingSphere(),eu.copy(i.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(eu)}intersectsSprite(t){return eu.center.set(0,0,0),eu.radius=.7071067811865476,eu.applyMatrix4(t.matrixWorld),this.intersectsSphere(eu)}intersectsSphere(t){const i=this.planes,x=t.center,T=-t.radius;for(let E=0;E<6;E++)if(i[E].distanceToPoint(x)0?t.max.x:t.min.x,Mv.y=T.normal.y>0?t.max.y:t.min.y,Mv.z=T.normal.z>0?t.max.z:t.min.z,T.distanceToPoint(Mv)<0)return!1}return!0}containsPoint(t){const i=this.planes;for(let x=0;x<6;x++)if(i[x].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function M2(){let g=null,t=!1,i=null,x=null;function T(E,s){i(E,s),x=g.requestAnimationFrame(T)}return{start:function(){t!==!0&&i!==null&&(x=g.requestAnimationFrame(T),t=!0)},stop:function(){g.cancelAnimationFrame(x),t=!1},setAnimationLoop:function(E){i=E},setContext:function(E){g=E}}}function wN(g,t){const i=t.isWebGL2,x=new WeakMap;function T(r,p){const h=r.array,a=r.usage,l=h.byteLength,n=g.createBuffer();g.bindBuffer(p,n),g.bufferData(p,h,a),r.onUploadCallback();let u;if(h instanceof Float32Array)u=g.FLOAT;else if(h instanceof Uint16Array)if(r.isFloat16BufferAttribute)if(i)u=g.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else u=g.UNSIGNED_SHORT;else if(h instanceof Int16Array)u=g.SHORT;else if(h instanceof Uint32Array)u=g.UNSIGNED_INT;else if(h instanceof Int32Array)u=g.INT;else if(h instanceof Int8Array)u=g.BYTE;else if(h instanceof Uint8Array)u=g.UNSIGNED_BYTE;else if(h instanceof Uint8ClampedArray)u=g.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:n,type:u,bytesPerElement:h.BYTES_PER_ELEMENT,version:r.version,size:l}}function E(r,p,h){const a=p.array,l=p._updateRange,n=p.updateRanges;if(g.bindBuffer(h,r),l.count===-1&&n.length===0&&g.bufferSubData(h,0,a),n.length!==0){for(let u=0,f=n.length;u #include #include -}`,Li={alphahash_fragment:AN,alphahash_pars_fragment:PN,alphamap_fragment:RN,alphamap_pars_fragment:bN,alphatest_fragment:LN,alphatest_pars_fragment:FN,aomap_fragment:ON,aomap_pars_fragment:DN,batching_pars_vertex:IN,batching_vertex:NN,begin_vertex:BN,beginnormal_vertex:UN,bsdfs:zN,iridescence_fragment:GN,bumpmap_pars_fragment:VN,clipping_planes_fragment:HN,clipping_planes_pars_fragment:WN,clipping_planes_pars_vertex:XN,clipping_planes_vertex:YN,color_fragment:kN,color_pars_fragment:jN,color_pars_vertex:KN,color_vertex:ZN,common:JN,cube_uv_reflection_fragment:$N,defaultnormal_vertex:QN,displacementmap_pars_vertex:_N,displacementmap_vertex:qN,emissivemap_fragment:t9,emissivemap_pars_fragment:e9,colorspace_fragment:i9,colorspace_pars_fragment:n9,envmap_fragment:r9,envmap_common_pars_fragment:s9,envmap_pars_fragment:a9,envmap_pars_vertex:o9,envmap_physical_pars_fragment:x9,envmap_vertex:l9,fog_vertex:h9,fog_pars_vertex:u9,fog_fragment:f9,fog_pars_fragment:c9,gradientmap_pars_fragment:d9,lightmap_fragment:p9,lightmap_pars_fragment:v9,lights_lambert_fragment:m9,lights_lambert_pars_fragment:g9,lights_pars_begin:y9,lights_toon_fragment:S9,lights_toon_pars_fragment:T9,lights_phong_fragment:E9,lights_phong_pars_fragment:M9,lights_physical_fragment:C9,lights_physical_pars_fragment:w9,lights_fragment_begin:A9,lights_fragment_maps:P9,lights_fragment_end:R9,logdepthbuf_fragment:b9,logdepthbuf_pars_fragment:L9,logdepthbuf_pars_vertex:F9,logdepthbuf_vertex:O9,map_fragment:D9,map_pars_fragment:I9,map_particle_fragment:N9,map_particle_pars_fragment:B9,metalnessmap_fragment:U9,metalnessmap_pars_fragment:z9,morphcolor_vertex:G9,morphnormal_vertex:V9,morphtarget_pars_vertex:H9,morphtarget_vertex:W9,normal_fragment_begin:X9,normal_fragment_maps:Y9,normal_pars_fragment:k9,normal_pars_vertex:j9,normal_vertex:K9,normalmap_pars_fragment:Z9,clearcoat_normal_fragment_begin:J9,clearcoat_normal_fragment_maps:$9,clearcoat_pars_fragment:Q9,iridescence_pars_fragment:_9,opaque_fragment:q9,packing:tB,premultiplied_alpha_fragment:eB,project_vertex:iB,dithering_fragment:nB,dithering_pars_fragment:rB,roughnessmap_fragment:sB,roughnessmap_pars_fragment:aB,shadowmap_pars_fragment:oB,shadowmap_pars_vertex:lB,shadowmap_vertex:hB,shadowmask_pars_fragment:uB,skinbase_vertex:fB,skinning_pars_vertex:cB,skinning_vertex:dB,skinnormal_vertex:pB,specularmap_fragment:vB,specularmap_pars_fragment:mB,tonemapping_fragment:gB,tonemapping_pars_fragment:yB,transmission_fragment:xB,transmission_pars_fragment:SB,uv_pars_fragment:TB,uv_pars_vertex:EB,uv_vertex:MB,worldpos_vertex:CB,background_vert:wB,background_frag:AB,backgroundCube_vert:PB,backgroundCube_frag:RB,cube_vert:bB,cube_frag:LB,depth_vert:FB,depth_frag:OB,distanceRGBA_vert:DB,distanceRGBA_frag:IB,equirect_vert:NB,equirect_frag:BB,linedashed_vert:UB,linedashed_frag:zB,meshbasic_vert:GB,meshbasic_frag:VB,meshlambert_vert:HB,meshlambert_frag:WB,meshmatcap_vert:XB,meshmatcap_frag:YB,meshnormal_vert:kB,meshnormal_frag:jB,meshphong_vert:KB,meshphong_frag:ZB,meshphysical_vert:JB,meshphysical_frag:$B,meshtoon_vert:QB,meshtoon_frag:_B,points_vert:qB,points_frag:t8,shadow_vert:e8,shadow_frag:i8,sprite_vert:n8,sprite_frag:r8},Fe={common:{diffuse:{value:new ze(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Di},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Di}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Di}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Di}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Di},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Di},normalScale:{value:new ve(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Di},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Di}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Di}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Di}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ze(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ze(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0},uvTransform:{value:new Di}},sprite:{diffuse:{value:new ze(16777215)},opacity:{value:1},center:{value:new ve(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Di},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0}}},eo={basic:{uniforms:ps([Fe.common,Fe.specularmap,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.fog]),vertexShader:Li.meshbasic_vert,fragmentShader:Li.meshbasic_frag},lambert:{uniforms:ps([Fe.common,Fe.specularmap,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.fog,Fe.lights,{emissive:{value:new ze(0)}}]),vertexShader:Li.meshlambert_vert,fragmentShader:Li.meshlambert_frag},phong:{uniforms:ps([Fe.common,Fe.specularmap,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.fog,Fe.lights,{emissive:{value:new ze(0)},specular:{value:new ze(1118481)},shininess:{value:30}}]),vertexShader:Li.meshphong_vert,fragmentShader:Li.meshphong_frag},standard:{uniforms:ps([Fe.common,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.roughnessmap,Fe.metalnessmap,Fe.fog,Fe.lights,{emissive:{value:new ze(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Li.meshphysical_vert,fragmentShader:Li.meshphysical_frag},toon:{uniforms:ps([Fe.common,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.gradientmap,Fe.fog,Fe.lights,{emissive:{value:new ze(0)}}]),vertexShader:Li.meshtoon_vert,fragmentShader:Li.meshtoon_frag},matcap:{uniforms:ps([Fe.common,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.fog,{matcap:{value:null}}]),vertexShader:Li.meshmatcap_vert,fragmentShader:Li.meshmatcap_frag},points:{uniforms:ps([Fe.points,Fe.fog]),vertexShader:Li.points_vert,fragmentShader:Li.points_frag},dashed:{uniforms:ps([Fe.common,Fe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Li.linedashed_vert,fragmentShader:Li.linedashed_frag},depth:{uniforms:ps([Fe.common,Fe.displacementmap]),vertexShader:Li.depth_vert,fragmentShader:Li.depth_frag},normal:{uniforms:ps([Fe.common,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,{opacity:{value:1}}]),vertexShader:Li.meshnormal_vert,fragmentShader:Li.meshnormal_frag},sprite:{uniforms:ps([Fe.sprite,Fe.fog]),vertexShader:Li.sprite_vert,fragmentShader:Li.sprite_frag},background:{uniforms:{uvTransform:{value:new Di},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Li.background_vert,fragmentShader:Li.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Li.backgroundCube_vert,fragmentShader:Li.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Li.cube_vert,fragmentShader:Li.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Li.equirect_vert,fragmentShader:Li.equirect_frag},distanceRGBA:{uniforms:ps([Fe.common,Fe.displacementmap,{referencePosition:{value:new Ct},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Li.distanceRGBA_vert,fragmentShader:Li.distanceRGBA_frag},shadow:{uniforms:ps([Fe.lights,Fe.fog,{color:{value:new ze(0)},opacity:{value:1}}]),vertexShader:Li.shadow_vert,fragmentShader:Li.shadow_frag}};eo.physical={uniforms:ps([eo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Di},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Di},clearcoatNormalScale:{value:new ve(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Di},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Di},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Di},sheen:{value:0},sheenColor:{value:new ze(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Di},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Di},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Di},transmissionSamplerSize:{value:new ve},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Di},attenuationDistance:{value:0},attenuationColor:{value:new ze(0)},specularColor:{value:new ze(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Di},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Di},anisotropyVector:{value:new ve},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Di}}]),vertexShader:Li.meshphysical_vert,fragmentShader:Li.meshphysical_frag};const Cv={r:0,b:0,g:0};function s8(g,t,i,x,T,E,s){const y=new ze(0);let e=E===!0?0:1,r,p,h=null,a=0,l=null;function n(f,o){let c=!1,d=o.isScene===!0?o.background:null;d&&d.isTexture&&(d=(o.backgroundBlurriness>0?i:t).get(d)),d===null?u(y,e):d&&d.isColor&&(u(d,1),c=!0);const v=g.xr.getEnvironmentBlendMode();v==="additive"?x.buffers.color.setClear(0,0,0,1,s):v==="alpha-blend"&&x.buffers.color.setClear(0,0,0,0,s),(g.autoClear||c)&&g.clear(g.autoClearColor,g.autoClearDepth,g.autoClearStencil),d&&(d.isCubeTexture||d.mapping===sc)?(p===void 0&&(p=new dr(new Nu(1,1,1),new so({name:"BackgroundCubeMaterial",uniforms:tc(eo.backgroundCube.uniforms),vertexShader:eo.backgroundCube.vertexShader,fragmentShader:eo.backgroundCube.fragmentShader,side:gs,depthTest:!1,depthWrite:!1,fog:!1})),p.geometry.deleteAttribute("normal"),p.geometry.deleteAttribute("uv"),p.onBeforeRender=function(m,S,M){this.matrixWorld.copyPosition(M.matrixWorld)},Object.defineProperty(p.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),T.update(p)),p.material.uniforms.envMap.value=d,p.material.uniforms.flipEnvMap.value=d.isCubeTexture&&d.isRenderTargetTexture===!1?-1:1,p.material.uniforms.backgroundBlurriness.value=o.backgroundBlurriness,p.material.uniforms.backgroundIntensity.value=o.backgroundIntensity,p.material.toneMapped=sn.getTransfer(d.colorSpace)!==mn,(h!==d||a!==d.version||l!==g.toneMapping)&&(p.material.needsUpdate=!0,h=d,a=d.version,l=g.toneMapping),p.layers.enableAll(),f.unshift(p,p.geometry,p.material,0,0,null)):d&&d.isTexture&&(r===void 0&&(r=new dr(new oc(2,2),new so({name:"BackgroundMaterial",uniforms:tc(eo.background.uniforms),vertexShader:eo.background.vertexShader,fragmentShader:eo.background.fragmentShader,side:Al,depthTest:!1,depthWrite:!1,fog:!1})),r.geometry.deleteAttribute("normal"),Object.defineProperty(r.material,"map",{get:function(){return this.uniforms.t2D.value}}),T.update(r)),r.material.uniforms.t2D.value=d,r.material.uniforms.backgroundIntensity.value=o.backgroundIntensity,r.material.toneMapped=sn.getTransfer(d.colorSpace)!==mn,d.matrixAutoUpdate===!0&&d.updateMatrix(),r.material.uniforms.uvTransform.value.copy(d.matrix),(h!==d||a!==d.version||l!==g.toneMapping)&&(r.material.needsUpdate=!0,h=d,a=d.version,l=g.toneMapping),r.layers.enableAll(),f.unshift(r,r.geometry,r.material,0,0,null))}function u(f,o){f.getRGB(Cv,x2(g)),x.buffers.color.setClear(Cv.r,Cv.g,Cv.b,o,s)}return{getClearColor:function(){return y},setClearColor:function(f,o=1){y.set(f),e=o,u(y,e)},getClearAlpha:function(){return e},setClearAlpha:function(f){e=f,u(y,e)},render:n}}function a8(g,t,i,x){const T=g.getParameter(g.MAX_VERTEX_ATTRIBS),E=x.isWebGL2?null:t.get("OES_vertex_array_object"),s=x.isWebGL2||E!==null,y={},e=f(null);let r=e,p=!1;function h(I,D,B,G,z){let X=!1;if(s){const j=u(G,B,D);r!==j&&(r=j,l(r.object)),X=o(I,G,B,z),X&&c(I,G,B,z)}else{const j=D.wireframe===!0;(r.geometry!==G.id||r.program!==B.id||r.wireframe!==j)&&(r.geometry=G.id,r.program=B.id,r.wireframe=j,X=!0)}z!==null&&i.update(z,g.ELEMENT_ARRAY_BUFFER),(X||p)&&(p=!1,w(I,D,B,G),z!==null&&g.bindBuffer(g.ELEMENT_ARRAY_BUFFER,i.get(z).buffer))}function a(){return x.isWebGL2?g.createVertexArray():E.createVertexArrayOES()}function l(I){return x.isWebGL2?g.bindVertexArray(I):E.bindVertexArrayOES(I)}function n(I){return x.isWebGL2?g.deleteVertexArray(I):E.deleteVertexArrayOES(I)}function u(I,D,B){const G=B.wireframe===!0;let z=y[I.id];z===void 0&&(z={},y[I.id]=z);let X=z[D.id];X===void 0&&(X={},z[D.id]=X);let j=X[G];return j===void 0&&(j=f(a()),X[G]=j),j}function f(I){const D=[],B=[],G=[];for(let z=0;z=0){const Z=z[tt];let U=X[tt];if(U===void 0&&(tt==="instanceMatrix"&&I.instanceMatrix&&(U=I.instanceMatrix),tt==="instanceColor"&&I.instanceColor&&(U=I.instanceColor)),Z===void 0||Z.attribute!==U||U&&Z.data!==U.data)return!0;j++}return r.attributesNum!==j||r.index!==G}function c(I,D,B,G){const z={},X=D.attributes;let j=0;const Q=B.getAttributes();for(const tt in Q)if(Q[tt].location>=0){let Z=X[tt];Z===void 0&&(tt==="instanceMatrix"&&I.instanceMatrix&&(Z=I.instanceMatrix),tt==="instanceColor"&&I.instanceColor&&(Z=I.instanceColor));const U={};U.attribute=Z,Z&&Z.data&&(U.data=Z.data),z[tt]=U,j++}r.attributes=z,r.attributesNum=j,r.index=G}function d(){const I=r.newAttributes;for(let D=0,B=I.length;D=0){let Y=z[Q];if(Y===void 0&&(Q==="instanceMatrix"&&I.instanceMatrix&&(Y=I.instanceMatrix),Q==="instanceColor"&&I.instanceColor&&(Y=I.instanceColor)),Y!==void 0){const Z=Y.normalized,U=Y.itemSize,H=i.get(Y);if(H===void 0)continue;const J=H.buffer,_=H.type,q=H.bytesPerElement,at=x.isWebGL2===!0&&(_===g.INT||_===g.UNSIGNED_INT||Y.gpuType===h1);if(Y.isInterleavedBufferAttribute){const ot=Y.data,rt=ot.stride,gt=Y.offset;if(ot.isInstancedInterleavedBuffer){for(let yt=0;yt0&&g.getShaderPrecisionFormat(g.FRAGMENT_SHADER,g.HIGH_FLOAT).precision>0)return"highp";M="mediump"}return M==="mediump"&&g.getShaderPrecisionFormat(g.VERTEX_SHADER,g.MEDIUM_FLOAT).precision>0&&g.getShaderPrecisionFormat(g.FRAGMENT_SHADER,g.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s=typeof WebGL2RenderingContext<"u"&&g.constructor.name==="WebGL2RenderingContext";let y=i.precision!==void 0?i.precision:"highp";const e=E(y);e!==y&&(console.warn("THREE.WebGLRenderer:",y,"not supported, using",e,"instead."),y=e);const r=s||t.has("WEBGL_draw_buffers"),p=i.logarithmicDepthBuffer===!0,h=g.getParameter(g.MAX_TEXTURE_IMAGE_UNITS),a=g.getParameter(g.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=g.getParameter(g.MAX_TEXTURE_SIZE),n=g.getParameter(g.MAX_CUBE_MAP_TEXTURE_SIZE),u=g.getParameter(g.MAX_VERTEX_ATTRIBS),f=g.getParameter(g.MAX_VERTEX_UNIFORM_VECTORS),o=g.getParameter(g.MAX_VARYING_VECTORS),c=g.getParameter(g.MAX_FRAGMENT_UNIFORM_VECTORS),d=a>0,v=s||t.has("OES_texture_float"),m=d&&v,S=s?g.getParameter(g.MAX_SAMPLES):0;return{isWebGL2:s,drawBuffers:r,getMaxAnisotropy:T,getMaxPrecision:E,precision:y,logarithmicDepthBuffer:p,maxTextures:h,maxVertexTextures:a,maxTextureSize:l,maxCubemapSize:n,maxAttributes:u,maxVertexUniforms:f,maxVaryings:o,maxFragmentUniforms:c,vertexTextures:d,floatFragmentTextures:v,floatVertexTextures:m,maxSamples:S}}function h8(g){const t=this;let i=null,x=0,T=!1,E=!1;const s=new lh,y=new Di,e={value:null,needsUpdate:!1};this.uniform=e,this.numPlanes=0,this.numIntersection=0,this.init=function(h,a){const l=h.length!==0||a||x!==0||T;return T=a,x=h.length,l},this.beginShadows=function(){E=!0,p(null)},this.endShadows=function(){E=!1},this.setGlobalState=function(h,a){i=p(h,a,0)},this.setState=function(h,a,l){const n=h.clippingPlanes,u=h.clipIntersection,f=h.clipShadows,o=g.get(h);if(!T||n===null||n.length===0||E&&!f)E?p(null):r();else{const c=E?0:x,d=c*4;let v=o.clippingState||null;e.value=v,v=p(n,a,d,l);for(let m=0;m!==d;++m)v[m]=i[m];o.clippingState=v,this.numIntersection=u?this.numPlanes:0,this.numPlanes+=c}};function r(){e.value!==i&&(e.value=i,e.needsUpdate=x>0),t.numPlanes=x,t.numIntersection=0}function p(h,a,l,n){const u=h!==null?h.length:0;let f=null;if(u!==0){if(f=e.value,n!==!0||f===null){const o=l+u*4,c=a.matrixWorldInverse;y.getNormalMatrix(c),(f===null||f.length0){const r=new E2(e.height);return r.fromEquirectangularTexture(g,s),t.set(s,r),s.addEventListener("dispose",T),i(r.texture,s.mapping)}else return null}}return s}function T(s){const y=s.target;y.removeEventListener("dispose",T);const e=t.get(y);e!==void 0&&(t.delete(y),e.dispose())}function E(){t=new WeakMap}return{get:x,dispose:E}}class np extends tp{constructor(t=-1,i=1,x=1,T=-1,E=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=i,this.top=x,this.bottom=T,this.near=E,this.far=s,this.updateProjectionMatrix()}copy(t,i){return super.copy(t,i),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,i,x,T,E,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=i,this.view.offsetX=x,this.view.offsetY=T,this.view.width=E,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),i=(this.top-this.bottom)/(2*this.zoom),x=(this.right+this.left)/2,T=(this.top+this.bottom)/2;let E=x-t,s=x+t,y=T+i,e=T-i;if(this.view!==null&&this.view.enabled){const r=(this.right-this.left)/this.view.fullWidth/this.zoom,p=(this.top-this.bottom)/this.view.fullHeight/this.zoom;E+=r*this.view.offsetX,s=E+r*this.view.width,y-=p*this.view.offsetY,e=y-p*this.view.height}this.projectionMatrix.makeOrthographic(E,s,y,e,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const i=super.toJSON(t);return i.object.zoom=this.zoom,i.object.left=this.left,i.object.right=this.right,i.object.top=this.top,i.object.bottom=this.bottom,i.object.near=this.near,i.object.far=this.far,this.view!==null&&(i.object.view=Object.assign({},this.view)),i}}const Vf=4,ZT=[.125,.215,.35,.446,.526,.582],pu=20,H0=new np,JT=new ze;let W0=null,X0=0,Y0=0;const cu=(1+Math.sqrt(5))/2,wf=1/cu,$T=[new Ct(1,1,1),new Ct(-1,1,1),new Ct(1,1,-1),new Ct(-1,1,-1),new Ct(0,cu,wf),new Ct(0,cu,-wf),new Ct(wf,0,cu),new Ct(-wf,0,cu),new Ct(cu,wf,0),new Ct(-cu,wf,0)];class Tx{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,i=0,x=.1,T=100){W0=this._renderer.getRenderTarget(),X0=this._renderer.getActiveCubeFace(),Y0=this._renderer.getActiveMipmapLevel(),this._setSize(256);const E=this._allocateTargets();return E.depthBuffer=!0,this._sceneToCubeUV(t,x,T,E),i>0&&this._blur(E,0,0,i),this._applyPMREM(E),this._cleanup(E),E}fromEquirectangular(t,i=null){return this._fromTexture(t,i)}fromCubemap(t,i=null){return this._fromTexture(t,i)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=qT(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=_T(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t2?d:0,d,d),p.setRenderTarget(T),u&&p.render(n,y),p.render(t,y)}n.geometry.dispose(),n.material.dispose(),p.toneMapping=a,p.autoClear=h,t.background=f}_textureToCubeUV(t,i){const x=this._renderer,T=t.mapping===Pl||t.mapping===yh;T?(this._cubemapMaterial===null&&(this._cubemapMaterial=qT()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=_T());const E=T?this._cubemapMaterial:this._equirectMaterial,s=new dr(this._lodPlanes[0],E),y=E.uniforms;y.envMap.value=t;const e=this._cubeSize;wv(i,0,0,3*e,2*e),x.setRenderTarget(i),x.render(s,H0)}_applyPMREM(t){const i=this._renderer,x=i.autoClear;i.autoClear=!1;for(let T=1;Tpu&&console.warn(`sigmaRadians, ${E}, is too large and will clip, as it requested ${f} samples when the maximum is set to ${pu}`);const o=[];let c=0;for(let M=0;Md-Vf?T-d+Vf:0),S=4*(this._cubeSize-v);wv(i,m,S,3*v,2*v),e.setRenderTarget(i),e.render(h,H0)}}function f8(g){const t=[],i=[],x=[];let T=g;const E=g-Vf+1+ZT.length;for(let s=0;sg-Vf?e=ZT[s-g+Vf-1]:s===0&&(e=0),x.push(e);const r=1/(y-2),p=-r,h=1+r,a=[p,p,h,p,h,h,p,p,h,h,p,h],l=6,n=6,u=3,f=2,o=1,c=new Float32Array(u*n*l),d=new Float32Array(f*n*l),v=new Float32Array(o*n*l);for(let S=0;S2?0:-1,C=[M,w,0,M+2/3,w,0,M+2/3,w+1,0,M,w,0,M+2/3,w+1,0,M,w+1,0];c.set(C,u*n*S),d.set(a,f*n*S);const A=[S,S,S,S,S,S];v.set(A,o*n*S)}const m=new Fi;m.setAttribute("position",new on(c,u)),m.setAttribute("uv",new on(d,f)),m.setAttribute("faceIndex",new on(v,o)),t.push(m),T>Vf&&T--}return{lodPlanes:t,sizeLods:i,sigmas:x}}function QT(g,t,i){const x=new ro(g,t,i);return x.texture.mapping=sc,x.texture.name="PMREM.cubeUv",x.scissorTest=!0,x}function wv(g,t,i,x,T){g.viewport.set(t,i,x,T),g.scissor.set(t,i,x,T)}function c8(g,t,i){const x=new Float32Array(pu),T=new Ct(0,1,0);return new so({name:"SphericalGaussianBlur",defines:{n:pu,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/i,CUBEUV_MAX_MIP:`${g}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:x},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:T}},vertexShader:C1(),fragmentShader:` +}`,Li={alphahash_fragment:AN,alphahash_pars_fragment:PN,alphamap_fragment:RN,alphamap_pars_fragment:bN,alphatest_fragment:LN,alphatest_pars_fragment:FN,aomap_fragment:ON,aomap_pars_fragment:DN,batching_pars_vertex:IN,batching_vertex:NN,begin_vertex:BN,beginnormal_vertex:UN,bsdfs:zN,iridescence_fragment:GN,bumpmap_pars_fragment:VN,clipping_planes_fragment:HN,clipping_planes_pars_fragment:WN,clipping_planes_pars_vertex:XN,clipping_planes_vertex:YN,color_fragment:kN,color_pars_fragment:jN,color_pars_vertex:KN,color_vertex:ZN,common:JN,cube_uv_reflection_fragment:$N,defaultnormal_vertex:QN,displacementmap_pars_vertex:_N,displacementmap_vertex:qN,emissivemap_fragment:t9,emissivemap_pars_fragment:e9,colorspace_fragment:i9,colorspace_pars_fragment:n9,envmap_fragment:r9,envmap_common_pars_fragment:s9,envmap_pars_fragment:a9,envmap_pars_vertex:o9,envmap_physical_pars_fragment:x9,envmap_vertex:l9,fog_vertex:h9,fog_pars_vertex:u9,fog_fragment:f9,fog_pars_fragment:c9,gradientmap_pars_fragment:d9,lightmap_fragment:p9,lightmap_pars_fragment:v9,lights_lambert_fragment:m9,lights_lambert_pars_fragment:g9,lights_pars_begin:y9,lights_toon_fragment:S9,lights_toon_pars_fragment:T9,lights_phong_fragment:E9,lights_phong_pars_fragment:M9,lights_physical_fragment:C9,lights_physical_pars_fragment:w9,lights_fragment_begin:A9,lights_fragment_maps:P9,lights_fragment_end:R9,logdepthbuf_fragment:b9,logdepthbuf_pars_fragment:L9,logdepthbuf_pars_vertex:F9,logdepthbuf_vertex:O9,map_fragment:D9,map_pars_fragment:I9,map_particle_fragment:N9,map_particle_pars_fragment:B9,metalnessmap_fragment:U9,metalnessmap_pars_fragment:z9,morphcolor_vertex:G9,morphnormal_vertex:V9,morphtarget_pars_vertex:H9,morphtarget_vertex:W9,normal_fragment_begin:X9,normal_fragment_maps:Y9,normal_pars_fragment:k9,normal_pars_vertex:j9,normal_vertex:K9,normalmap_pars_fragment:Z9,clearcoat_normal_fragment_begin:J9,clearcoat_normal_fragment_maps:$9,clearcoat_pars_fragment:Q9,iridescence_pars_fragment:_9,opaque_fragment:q9,packing:tB,premultiplied_alpha_fragment:eB,project_vertex:iB,dithering_fragment:nB,dithering_pars_fragment:rB,roughnessmap_fragment:sB,roughnessmap_pars_fragment:aB,shadowmap_pars_fragment:oB,shadowmap_pars_vertex:lB,shadowmap_vertex:hB,shadowmask_pars_fragment:uB,skinbase_vertex:fB,skinning_pars_vertex:cB,skinning_vertex:dB,skinnormal_vertex:pB,specularmap_fragment:vB,specularmap_pars_fragment:mB,tonemapping_fragment:gB,tonemapping_pars_fragment:yB,transmission_fragment:xB,transmission_pars_fragment:SB,uv_pars_fragment:TB,uv_pars_vertex:EB,uv_vertex:MB,worldpos_vertex:CB,background_vert:wB,background_frag:AB,backgroundCube_vert:PB,backgroundCube_frag:RB,cube_vert:bB,cube_frag:LB,depth_vert:FB,depth_frag:OB,distanceRGBA_vert:DB,distanceRGBA_frag:IB,equirect_vert:NB,equirect_frag:BB,linedashed_vert:UB,linedashed_frag:zB,meshbasic_vert:GB,meshbasic_frag:VB,meshlambert_vert:HB,meshlambert_frag:WB,meshmatcap_vert:XB,meshmatcap_frag:YB,meshnormal_vert:kB,meshnormal_frag:jB,meshphong_vert:KB,meshphong_frag:ZB,meshphysical_vert:JB,meshphysical_frag:$B,meshtoon_vert:QB,meshtoon_frag:_B,points_vert:qB,points_frag:t8,shadow_vert:e8,shadow_frag:i8,sprite_vert:n8,sprite_frag:r8},Fe={common:{diffuse:{value:new ze(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Di},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Di}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Di}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Di}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Di},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Di},normalScale:{value:new ve(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Di},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Di}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Di}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Di}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ze(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ze(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0},uvTransform:{value:new Di}},sprite:{diffuse:{value:new ze(16777215)},opacity:{value:1},center:{value:new ve(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Di},alphaMap:{value:null},alphaMapTransform:{value:new Di},alphaTest:{value:0}}},eo={basic:{uniforms:ps([Fe.common,Fe.specularmap,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.fog]),vertexShader:Li.meshbasic_vert,fragmentShader:Li.meshbasic_frag},lambert:{uniforms:ps([Fe.common,Fe.specularmap,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.fog,Fe.lights,{emissive:{value:new ze(0)}}]),vertexShader:Li.meshlambert_vert,fragmentShader:Li.meshlambert_frag},phong:{uniforms:ps([Fe.common,Fe.specularmap,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.fog,Fe.lights,{emissive:{value:new ze(0)},specular:{value:new ze(1118481)},shininess:{value:30}}]),vertexShader:Li.meshphong_vert,fragmentShader:Li.meshphong_frag},standard:{uniforms:ps([Fe.common,Fe.envmap,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.roughnessmap,Fe.metalnessmap,Fe.fog,Fe.lights,{emissive:{value:new ze(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Li.meshphysical_vert,fragmentShader:Li.meshphysical_frag},toon:{uniforms:ps([Fe.common,Fe.aomap,Fe.lightmap,Fe.emissivemap,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.gradientmap,Fe.fog,Fe.lights,{emissive:{value:new ze(0)}}]),vertexShader:Li.meshtoon_vert,fragmentShader:Li.meshtoon_frag},matcap:{uniforms:ps([Fe.common,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,Fe.fog,{matcap:{value:null}}]),vertexShader:Li.meshmatcap_vert,fragmentShader:Li.meshmatcap_frag},points:{uniforms:ps([Fe.points,Fe.fog]),vertexShader:Li.points_vert,fragmentShader:Li.points_frag},dashed:{uniforms:ps([Fe.common,Fe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Li.linedashed_vert,fragmentShader:Li.linedashed_frag},depth:{uniforms:ps([Fe.common,Fe.displacementmap]),vertexShader:Li.depth_vert,fragmentShader:Li.depth_frag},normal:{uniforms:ps([Fe.common,Fe.bumpmap,Fe.normalmap,Fe.displacementmap,{opacity:{value:1}}]),vertexShader:Li.meshnormal_vert,fragmentShader:Li.meshnormal_frag},sprite:{uniforms:ps([Fe.sprite,Fe.fog]),vertexShader:Li.sprite_vert,fragmentShader:Li.sprite_frag},background:{uniforms:{uvTransform:{value:new Di},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Li.background_vert,fragmentShader:Li.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Li.backgroundCube_vert,fragmentShader:Li.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Li.cube_vert,fragmentShader:Li.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Li.equirect_vert,fragmentShader:Li.equirect_frag},distanceRGBA:{uniforms:ps([Fe.common,Fe.displacementmap,{referencePosition:{value:new Ct},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Li.distanceRGBA_vert,fragmentShader:Li.distanceRGBA_frag},shadow:{uniforms:ps([Fe.lights,Fe.fog,{color:{value:new ze(0)},opacity:{value:1}}]),vertexShader:Li.shadow_vert,fragmentShader:Li.shadow_frag}};eo.physical={uniforms:ps([eo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Di},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Di},clearcoatNormalScale:{value:new ve(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Di},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Di},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Di},sheen:{value:0},sheenColor:{value:new ze(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Di},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Di},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Di},transmissionSamplerSize:{value:new ve},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Di},attenuationDistance:{value:0},attenuationColor:{value:new ze(0)},specularColor:{value:new ze(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Di},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Di},anisotropyVector:{value:new ve},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Di}}]),vertexShader:Li.meshphysical_vert,fragmentShader:Li.meshphysical_frag};const Cv={r:0,b:0,g:0};function s8(g,t,i,x,T,E,s){const y=new ze(0);let e=E===!0?0:1,r,p,h=null,a=0,l=null;function n(f,o){let c=!1,d=o.isScene===!0?o.background:null;d&&d.isTexture&&(d=(o.backgroundBlurriness>0?i:t).get(d)),d===null?u(y,e):d&&d.isColor&&(u(d,1),c=!0);const v=g.xr.getEnvironmentBlendMode();v==="additive"?x.buffers.color.setClear(0,0,0,1,s):v==="alpha-blend"&&x.buffers.color.setClear(0,0,0,0,s),(g.autoClear||c)&&g.clear(g.autoClearColor,g.autoClearDepth,g.autoClearStencil),d&&(d.isCubeTexture||d.mapping===ac)?(p===void 0&&(p=new dr(new Nu(1,1,1),new so({name:"BackgroundCubeMaterial",uniforms:ec(eo.backgroundCube.uniforms),vertexShader:eo.backgroundCube.vertexShader,fragmentShader:eo.backgroundCube.fragmentShader,side:gs,depthTest:!1,depthWrite:!1,fog:!1})),p.geometry.deleteAttribute("normal"),p.geometry.deleteAttribute("uv"),p.onBeforeRender=function(m,S,M){this.matrixWorld.copyPosition(M.matrixWorld)},Object.defineProperty(p.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),T.update(p)),p.material.uniforms.envMap.value=d,p.material.uniforms.flipEnvMap.value=d.isCubeTexture&&d.isRenderTargetTexture===!1?-1:1,p.material.uniforms.backgroundBlurriness.value=o.backgroundBlurriness,p.material.uniforms.backgroundIntensity.value=o.backgroundIntensity,p.material.toneMapped=sn.getTransfer(d.colorSpace)!==mn,(h!==d||a!==d.version||l!==g.toneMapping)&&(p.material.needsUpdate=!0,h=d,a=d.version,l=g.toneMapping),p.layers.enableAll(),f.unshift(p,p.geometry,p.material,0,0,null)):d&&d.isTexture&&(r===void 0&&(r=new dr(new lc(2,2),new so({name:"BackgroundMaterial",uniforms:ec(eo.background.uniforms),vertexShader:eo.background.vertexShader,fragmentShader:eo.background.fragmentShader,side:Al,depthTest:!1,depthWrite:!1,fog:!1})),r.geometry.deleteAttribute("normal"),Object.defineProperty(r.material,"map",{get:function(){return this.uniforms.t2D.value}}),T.update(r)),r.material.uniforms.t2D.value=d,r.material.uniforms.backgroundIntensity.value=o.backgroundIntensity,r.material.toneMapped=sn.getTransfer(d.colorSpace)!==mn,d.matrixAutoUpdate===!0&&d.updateMatrix(),r.material.uniforms.uvTransform.value.copy(d.matrix),(h!==d||a!==d.version||l!==g.toneMapping)&&(r.material.needsUpdate=!0,h=d,a=d.version,l=g.toneMapping),r.layers.enableAll(),f.unshift(r,r.geometry,r.material,0,0,null))}function u(f,o){f.getRGB(Cv,x2(g)),x.buffers.color.setClear(Cv.r,Cv.g,Cv.b,o,s)}return{getClearColor:function(){return y},setClearColor:function(f,o=1){y.set(f),e=o,u(y,e)},getClearAlpha:function(){return e},setClearAlpha:function(f){e=f,u(y,e)},render:n}}function a8(g,t,i,x){const T=g.getParameter(g.MAX_VERTEX_ATTRIBS),E=x.isWebGL2?null:t.get("OES_vertex_array_object"),s=x.isWebGL2||E!==null,y={},e=f(null);let r=e,p=!1;function h(I,D,B,G,z){let X=!1;if(s){const j=u(G,B,D);r!==j&&(r=j,l(r.object)),X=o(I,G,B,z),X&&c(I,G,B,z)}else{const j=D.wireframe===!0;(r.geometry!==G.id||r.program!==B.id||r.wireframe!==j)&&(r.geometry=G.id,r.program=B.id,r.wireframe=j,X=!0)}z!==null&&i.update(z,g.ELEMENT_ARRAY_BUFFER),(X||p)&&(p=!1,w(I,D,B,G),z!==null&&g.bindBuffer(g.ELEMENT_ARRAY_BUFFER,i.get(z).buffer))}function a(){return x.isWebGL2?g.createVertexArray():E.createVertexArrayOES()}function l(I){return x.isWebGL2?g.bindVertexArray(I):E.bindVertexArrayOES(I)}function n(I){return x.isWebGL2?g.deleteVertexArray(I):E.deleteVertexArrayOES(I)}function u(I,D,B){const G=B.wireframe===!0;let z=y[I.id];z===void 0&&(z={},y[I.id]=z);let X=z[D.id];X===void 0&&(X={},z[D.id]=X);let j=X[G];return j===void 0&&(j=f(a()),X[G]=j),j}function f(I){const D=[],B=[],G=[];for(let z=0;z=0){const Z=z[tt];let U=X[tt];if(U===void 0&&(tt==="instanceMatrix"&&I.instanceMatrix&&(U=I.instanceMatrix),tt==="instanceColor"&&I.instanceColor&&(U=I.instanceColor)),Z===void 0||Z.attribute!==U||U&&Z.data!==U.data)return!0;j++}return r.attributesNum!==j||r.index!==G}function c(I,D,B,G){const z={},X=D.attributes;let j=0;const Q=B.getAttributes();for(const tt in Q)if(Q[tt].location>=0){let Z=X[tt];Z===void 0&&(tt==="instanceMatrix"&&I.instanceMatrix&&(Z=I.instanceMatrix),tt==="instanceColor"&&I.instanceColor&&(Z=I.instanceColor));const U={};U.attribute=Z,Z&&Z.data&&(U.data=Z.data),z[tt]=U,j++}r.attributes=z,r.attributesNum=j,r.index=G}function d(){const I=r.newAttributes;for(let D=0,B=I.length;D=0){let Y=z[Q];if(Y===void 0&&(Q==="instanceMatrix"&&I.instanceMatrix&&(Y=I.instanceMatrix),Q==="instanceColor"&&I.instanceColor&&(Y=I.instanceColor)),Y!==void 0){const Z=Y.normalized,U=Y.itemSize,H=i.get(Y);if(H===void 0)continue;const J=H.buffer,_=H.type,q=H.bytesPerElement,at=x.isWebGL2===!0&&(_===g.INT||_===g.UNSIGNED_INT||Y.gpuType===h1);if(Y.isInterleavedBufferAttribute){const ot=Y.data,rt=ot.stride,gt=Y.offset;if(ot.isInstancedInterleavedBuffer){for(let yt=0;yt0&&g.getShaderPrecisionFormat(g.FRAGMENT_SHADER,g.HIGH_FLOAT).precision>0)return"highp";M="mediump"}return M==="mediump"&&g.getShaderPrecisionFormat(g.VERTEX_SHADER,g.MEDIUM_FLOAT).precision>0&&g.getShaderPrecisionFormat(g.FRAGMENT_SHADER,g.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s=typeof WebGL2RenderingContext<"u"&&g.constructor.name==="WebGL2RenderingContext";let y=i.precision!==void 0?i.precision:"highp";const e=E(y);e!==y&&(console.warn("THREE.WebGLRenderer:",y,"not supported, using",e,"instead."),y=e);const r=s||t.has("WEBGL_draw_buffers"),p=i.logarithmicDepthBuffer===!0,h=g.getParameter(g.MAX_TEXTURE_IMAGE_UNITS),a=g.getParameter(g.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=g.getParameter(g.MAX_TEXTURE_SIZE),n=g.getParameter(g.MAX_CUBE_MAP_TEXTURE_SIZE),u=g.getParameter(g.MAX_VERTEX_ATTRIBS),f=g.getParameter(g.MAX_VERTEX_UNIFORM_VECTORS),o=g.getParameter(g.MAX_VARYING_VECTORS),c=g.getParameter(g.MAX_FRAGMENT_UNIFORM_VECTORS),d=a>0,v=s||t.has("OES_texture_float"),m=d&&v,S=s?g.getParameter(g.MAX_SAMPLES):0;return{isWebGL2:s,drawBuffers:r,getMaxAnisotropy:T,getMaxPrecision:E,precision:y,logarithmicDepthBuffer:p,maxTextures:h,maxVertexTextures:a,maxTextureSize:l,maxCubemapSize:n,maxAttributes:u,maxVertexUniforms:f,maxVaryings:o,maxFragmentUniforms:c,vertexTextures:d,floatFragmentTextures:v,floatVertexTextures:m,maxSamples:S}}function h8(g){const t=this;let i=null,x=0,T=!1,E=!1;const s=new lh,y=new Di,e={value:null,needsUpdate:!1};this.uniform=e,this.numPlanes=0,this.numIntersection=0,this.init=function(h,a){const l=h.length!==0||a||x!==0||T;return T=a,x=h.length,l},this.beginShadows=function(){E=!0,p(null)},this.endShadows=function(){E=!1},this.setGlobalState=function(h,a){i=p(h,a,0)},this.setState=function(h,a,l){const n=h.clippingPlanes,u=h.clipIntersection,f=h.clipShadows,o=g.get(h);if(!T||n===null||n.length===0||E&&!f)E?p(null):r();else{const c=E?0:x,d=c*4;let v=o.clippingState||null;e.value=v,v=p(n,a,d,l);for(let m=0;m!==d;++m)v[m]=i[m];o.clippingState=v,this.numIntersection=u?this.numPlanes:0,this.numPlanes+=c}};function r(){e.value!==i&&(e.value=i,e.needsUpdate=x>0),t.numPlanes=x,t.numIntersection=0}function p(h,a,l,n){const u=h!==null?h.length:0;let f=null;if(u!==0){if(f=e.value,n!==!0||f===null){const o=l+u*4,c=a.matrixWorldInverse;y.getNormalMatrix(c),(f===null||f.length0){const r=new E2(e.height);return r.fromEquirectangularTexture(g,s),t.set(s,r),s.addEventListener("dispose",T),i(r.texture,s.mapping)}else return null}}return s}function T(s){const y=s.target;y.removeEventListener("dispose",T);const e=t.get(y);e!==void 0&&(t.delete(y),e.dispose())}function E(){t=new WeakMap}return{get:x,dispose:E}}class np extends tp{constructor(t=-1,i=1,x=1,T=-1,E=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=i,this.top=x,this.bottom=T,this.near=E,this.far=s,this.updateProjectionMatrix()}copy(t,i){return super.copy(t,i),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,i,x,T,E,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=i,this.view.offsetX=x,this.view.offsetY=T,this.view.width=E,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),i=(this.top-this.bottom)/(2*this.zoom),x=(this.right+this.left)/2,T=(this.top+this.bottom)/2;let E=x-t,s=x+t,y=T+i,e=T-i;if(this.view!==null&&this.view.enabled){const r=(this.right-this.left)/this.view.fullWidth/this.zoom,p=(this.top-this.bottom)/this.view.fullHeight/this.zoom;E+=r*this.view.offsetX,s=E+r*this.view.width,y-=p*this.view.offsetY,e=y-p*this.view.height}this.projectionMatrix.makeOrthographic(E,s,y,e,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const i=super.toJSON(t);return i.object.zoom=this.zoom,i.object.left=this.left,i.object.right=this.right,i.object.top=this.top,i.object.bottom=this.bottom,i.object.near=this.near,i.object.far=this.far,this.view!==null&&(i.object.view=Object.assign({},this.view)),i}}const Hf=4,ZT=[.125,.215,.35,.446,.526,.582],pu=20,H0=new np,JT=new ze;let W0=null,X0=0,Y0=0;const cu=(1+Math.sqrt(5))/2,wf=1/cu,$T=[new Ct(1,1,1),new Ct(-1,1,1),new Ct(1,1,-1),new Ct(-1,1,-1),new Ct(0,cu,wf),new Ct(0,cu,-wf),new Ct(wf,0,cu),new Ct(-wf,0,cu),new Ct(cu,wf,0),new Ct(-cu,wf,0)];class Tx{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,i=0,x=.1,T=100){W0=this._renderer.getRenderTarget(),X0=this._renderer.getActiveCubeFace(),Y0=this._renderer.getActiveMipmapLevel(),this._setSize(256);const E=this._allocateTargets();return E.depthBuffer=!0,this._sceneToCubeUV(t,x,T,E),i>0&&this._blur(E,0,0,i),this._applyPMREM(E),this._cleanup(E),E}fromEquirectangular(t,i=null){return this._fromTexture(t,i)}fromCubemap(t,i=null){return this._fromTexture(t,i)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=qT(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=_T(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t2?d:0,d,d),p.setRenderTarget(T),u&&p.render(n,y),p.render(t,y)}n.geometry.dispose(),n.material.dispose(),p.toneMapping=a,p.autoClear=h,t.background=f}_textureToCubeUV(t,i){const x=this._renderer,T=t.mapping===Pl||t.mapping===yh;T?(this._cubemapMaterial===null&&(this._cubemapMaterial=qT()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=_T());const E=T?this._cubemapMaterial:this._equirectMaterial,s=new dr(this._lodPlanes[0],E),y=E.uniforms;y.envMap.value=t;const e=this._cubeSize;wv(i,0,0,3*e,2*e),x.setRenderTarget(i),x.render(s,H0)}_applyPMREM(t){const i=this._renderer,x=i.autoClear;i.autoClear=!1;for(let T=1;Tpu&&console.warn(`sigmaRadians, ${E}, is too large and will clip, as it requested ${f} samples when the maximum is set to ${pu}`);const o=[];let c=0;for(let M=0;Md-Hf?T-d+Hf:0),S=4*(this._cubeSize-v);wv(i,m,S,3*v,2*v),e.setRenderTarget(i),e.render(h,H0)}}function f8(g){const t=[],i=[],x=[];let T=g;const E=g-Hf+1+ZT.length;for(let s=0;sg-Hf?e=ZT[s-g+Hf-1]:s===0&&(e=0),x.push(e);const r=1/(y-2),p=-r,h=1+r,a=[p,p,h,p,h,h,p,p,h,h,p,h],l=6,n=6,u=3,f=2,o=1,c=new Float32Array(u*n*l),d=new Float32Array(f*n*l),v=new Float32Array(o*n*l);for(let S=0;S2?0:-1,C=[M,w,0,M+2/3,w,0,M+2/3,w+1,0,M,w,0,M+2/3,w+1,0,M,w+1,0];c.set(C,u*n*S),d.set(a,f*n*S);const A=[S,S,S,S,S,S];v.set(A,o*n*S)}const m=new Fi;m.setAttribute("position",new on(c,u)),m.setAttribute("uv",new on(d,f)),m.setAttribute("faceIndex",new on(v,o)),t.push(m),T>Hf&&T--}return{lodPlanes:t,sizeLods:i,sigmas:x}}function QT(g,t,i){const x=new ro(g,t,i);return x.texture.mapping=ac,x.texture.name="PMREM.cubeUv",x.scissorTest=!0,x}function wv(g,t,i,x,T){g.viewport.set(t,i,x,T),g.scissor.set(t,i,x,T)}function c8(g,t,i){const x=new Float32Array(pu),T=new Ct(0,1,0);return new so({name:"SphericalGaussianBlur",defines:{n:pu,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/i,CUBEUV_MAX_MIP:`${g}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:x},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:T}},vertexShader:C1(),fragmentShader:` precision mediump float; precision mediump int; @@ -10063,16 +10063,16 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function d8(g){let t=new WeakMap,i=null;function x(y){if(y&&y.isTexture){const e=y.mapping,r=e===Cd||e===wd,p=e===Pl||e===yh;if(r||p)if(y.isRenderTargetTexture&&y.needsPMREMUpdate===!0){y.needsPMREMUpdate=!1;let h=t.get(y);return i===null&&(i=new Tx(g)),h=r?i.fromEquirectangular(y,h):i.fromCubemap(y,h),t.set(y,h),h.texture}else{if(t.has(y))return t.get(y).texture;{const h=y.image;if(r&&h&&h.height>0||p&&h&&T(h)){i===null&&(i=new Tx(g));const a=r?i.fromEquirectangular(y):i.fromCubemap(y);return t.set(y,a),y.addEventListener("dispose",E),a.texture}else return null}}}return y}function T(y){let e=0;const r=6;for(let p=0;pt.maxTextureSize&&(A=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const P=new Float32Array(C*A*4*n),b=new dg(P,C,A,n);b.type=Ma,b.needsUpdate=!0;const O=w*4;for(let D=0;D0)return g;const T=t*i;let E=tE[T];if(E===void 0&&(E=new Float32Array(T),tE[T]=E),t!==0){x.toArray(E,0);for(let s=1,y=0;s!==t;++s)y+=i,g[s].toArray(E,y)}return E}function yr(g,t){if(g.length!==t.length)return!1;for(let i=0,x=g.length;i0||p&&h&&T(h)){i===null&&(i=new Tx(g));const a=r?i.fromEquirectangular(y):i.fromCubemap(y);return t.set(y,a),y.addEventListener("dispose",E),a.texture}else return null}}}return y}function T(y){let e=0;const r=6;for(let p=0;pt.maxTextureSize&&(A=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const P=new Float32Array(C*A*4*n),b=new dg(P,C,A,n);b.type=Ma,b.needsUpdate=!0;const O=w*4;for(let D=0;D0)return g;const T=t*i;let E=tE[T];if(E===void 0&&(E=new Float32Array(T),tE[T]=E),t!==0){x.toArray(E,0);for(let s=1,y=0;s!==t;++s)y+=i,g[s].toArray(E,y)}return E}function yr(g,t){if(g.length!==t.length)return!1;for(let i=0,x=g.length;i":" "} ${y}: ${i[s]}`)}return x.join(` `)}function v6(g){const t=sn.getPrimaries(sn.workingColorSpace),i=sn.getPrimaries(g);let x;switch(t===i?x="":t===Dd&&i===Od?x="LinearDisplayP3ToLinearSRGB":t===Od&&i===Dd&&(x="LinearSRGBToLinearDisplayP3"),g){case Ho:case qd:return[x,"LinearTransferOETF"];case mr:case cg:return[x,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",g),[x,"LinearTransferOETF"]}}function oE(g,t,i){const x=g.getShaderParameter(t,g.COMPILE_STATUS),T=g.getShaderInfoLog(t).trim();if(x&&T==="")return"";const E=/ERROR: 0:(\d+)/.exec(T);if(E){const s=parseInt(E[1]);return i.toUpperCase()+` `+T+` -`+p6(g.getShaderSource(t),s)}else return T}function m6(g,t){const i=v6(t);return`vec4 ${g}( vec4 value ) { return ${i[0]}( ${i[1]}( value ) ); }`}function g6(g,t){let i;switch(t){case Ww:i="Linear";break;case Xw:i="Reinhard";break;case Yw:i="OptimizedCineon";break;case l1:i="ACESFilmic";break;case jw:i="AgX";break;case kw:i="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),i="Linear"}return"vec3 "+g+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function y6(g){return[g.extensionDerivatives||g.envMapCubeUVHeight||g.bumpMap||g.normalMapTangentSpace||g.clearcoatNormalMap||g.flatShading||g.alphaToCoverage||g.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(g.extensionFragDepth||g.logarithmicDepthBuffer)&&g.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",g.extensionDrawBuffers&&g.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(g.extensionShaderTextureLOD||g.envMap||g.transmission)&&g.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Hf).join(` -`)}function x6(g){return[g.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",g.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Hf).join(` +`+p6(g.getShaderSource(t),s)}else return T}function m6(g,t){const i=v6(t);return`vec4 ${g}( vec4 value ) { return ${i[0]}( ${i[1]}( value ) ); }`}function g6(g,t){let i;switch(t){case Ww:i="Linear";break;case Xw:i="Reinhard";break;case Yw:i="OptimizedCineon";break;case l1:i="ACESFilmic";break;case jw:i="AgX";break;case kw:i="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),i="Linear"}return"vec3 "+g+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function y6(g){return[g.extensionDerivatives||g.envMapCubeUVHeight||g.bumpMap||g.normalMapTangentSpace||g.clearcoatNormalMap||g.flatShading||g.alphaToCoverage||g.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(g.extensionFragDepth||g.logarithmicDepthBuffer)&&g.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",g.extensionDrawBuffers&&g.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(g.extensionShaderTextureLOD||g.envMap||g.transmission)&&g.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Wf).join(` +`)}function x6(g){return[g.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",g.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Wf).join(` `)}function S6(g){const t=[];for(const i in g){const x=g[i];x!==!1&&t.push("#define "+i+" "+x)}return t.join(` -`)}function T6(g,t){const i={},x=g.getProgramParameter(t,g.ACTIVE_ATTRIBUTES);for(let T=0;T/gm;function Ex(g){return g.replace(E6,C6)}const M6=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function C6(g,t){let i=Li[t];if(i===void 0){const x=M6.get(t);if(x!==void 0)i=Li[x],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,x);else throw new Error("Can not resolve #include <"+t+">")}return Ex(i)}const w6=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function uE(g){return g.replace(w6,A6)}function A6(g,t,i,x){let T="";for(let E=parseInt(t);E/gm;function Ex(g){return g.replace(E6,C6)}const M6=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function C6(g,t){let i=Li[t];if(i===void 0){const x=M6.get(t);if(x!==void 0)i=Li[x],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,x);else throw new Error("Can not resolve #include <"+t+">")}return Ex(i)}const w6=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function uE(g){return g.replace(w6,A6)}function A6(g,t,i,x){let T="";for(let E=parseInt(t);E0&&(o+=` -`),c=[l,"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,u].filter(Hf).join(` +`),c=[l,"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,u].filter(Wf).join(` `),c.length>0&&(c+=` `)):(o=[fE(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,u,i.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",i.batching?"#define USE_BATCHING":"",i.instancing?"#define USE_INSTANCING":"",i.instancingColor?"#define USE_INSTANCING_COLOR":"",i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+p:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.displacementMap?"#define USE_DISPLACEMENTMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.mapUv?"#define MAP_UV "+i.mapUv:"",i.alphaMapUv?"#define ALPHAMAP_UV "+i.alphaMapUv:"",i.lightMapUv?"#define LIGHTMAP_UV "+i.lightMapUv:"",i.aoMapUv?"#define AOMAP_UV "+i.aoMapUv:"",i.emissiveMapUv?"#define EMISSIVEMAP_UV "+i.emissiveMapUv:"",i.bumpMapUv?"#define BUMPMAP_UV "+i.bumpMapUv:"",i.normalMapUv?"#define NORMALMAP_UV "+i.normalMapUv:"",i.displacementMapUv?"#define DISPLACEMENTMAP_UV "+i.displacementMapUv:"",i.metalnessMapUv?"#define METALNESSMAP_UV "+i.metalnessMapUv:"",i.roughnessMapUv?"#define ROUGHNESSMAP_UV "+i.roughnessMapUv:"",i.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+i.anisotropyMapUv:"",i.clearcoatMapUv?"#define CLEARCOATMAP_UV "+i.clearcoatMapUv:"",i.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+i.clearcoatNormalMapUv:"",i.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+i.clearcoatRoughnessMapUv:"",i.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+i.iridescenceMapUv:"",i.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+i.iridescenceThicknessMapUv:"",i.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+i.sheenColorMapUv:"",i.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+i.sheenRoughnessMapUv:"",i.specularMapUv?"#define SPECULARMAP_UV "+i.specularMapUv:"",i.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+i.specularColorMapUv:"",i.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+i.specularIntensityMapUv:"",i.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+i.transmissionMapUv:"",i.thicknessMapUv?"#define THICKNESSMAP_UV "+i.thicknessMapUv:"",i.vertexTangents&&i.flatShading===!1?"#define USE_TANGENT":"",i.vertexColors?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.flatShading?"#define FLAT_SHADED":"",i.skinning?"#define USE_SKINNING":"",i.morphTargets?"#define USE_MORPHTARGETS":"",i.morphNormals&&i.flatShading===!1?"#define USE_MORPHNORMALS":"",i.morphColors&&i.isWebGL2?"#define USE_MORPHCOLORS":"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+i.morphTextureStride:"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_COUNT "+i.morphTargetsCount:"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+e:"",i.sizeAttenuation?"#define USE_SIZEATTENUATION":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.useLegacyLights?"#define LEGACY_LIGHTS":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(Hf).join(` +`].filter(Wf).join(` `),c=[l,fE(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,u,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",i.map?"#define USE_MAP":"",i.matcap?"#define USE_MATCAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+r:"",i.envMap?"#define "+p:"",i.envMap?"#define "+h:"",a?"#define CUBEUV_TEXEL_WIDTH "+a.texelWidth:"",a?"#define CUBEUV_TEXEL_HEIGHT "+a.texelHeight:"",a?"#define CUBEUV_MAX_MIP "+a.maxMip+".0":"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoat?"#define USE_CLEARCOAT":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescence?"#define USE_IRIDESCENCE":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaTest?"#define USE_ALPHATEST":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.sheen?"#define USE_SHEEN":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.vertexTangents&&i.flatShading===!1?"#define USE_TANGENT":"",i.vertexColors||i.instancingColor?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+e:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.useLegacyLights?"#define LEGACY_LIGHTS":"",i.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",i.toneMapping!==zo?"#define TONE_MAPPING":"",i.toneMapping!==zo?Li.tonemapping_pars_fragment:"",i.toneMapping!==zo?g6("toneMapping",i.toneMapping):"",i.dithering?"#define DITHERING":"",i.opaque?"#define OPAQUE":"",Li.colorspace_pars_fragment,m6("linearToOutputTexel",i.outputColorSpace),i.useDepthPacking?"#define DEPTH_PACKING "+i.depthPacking:"",` -`].filter(Hf).join(` +`].filter(Wf).join(` `)),s=Ex(s),s=lE(s,i),s=hE(s,i),y=Ex(y),y=lE(y,i),y=hE(y,i),s=uE(s),y=uE(y),i.isWebGL2&&i.isRawShaderMaterial!==!0&&(d=`#version 300 es `,o=[n,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` @@ -10113,7 +10113,7 @@ Material Type: `+b.type+` Program Info Log: `+O+` `+z+` -`+X)}else O!==""?console.warn("THREE.WebGLProgram: Program Info Log:",O):(I===""||D==="")&&(G=!1);G&&(b.diagnostics={runnable:B,programLog:O,vertexShader:{log:I,prefix:o},fragmentShader:{log:D,prefix:c}})}T.deleteShader(S),T.deleteShader(M),C=new cm(T,f),A=T6(T,f)}let C;this.getUniforms=function(){return C===void 0&&w(this),C};let A;this.getAttributes=function(){return A===void 0&&w(this),A};let P=i.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return P===!1&&(P=T.getProgramParameter(f,c6)),P},this.destroy=function(){x.releaseStatesOfProgram(this),T.deleteProgram(f),this.program=void 0},this.type=i.shaderType,this.name=i.shaderName,this.id=d6++,this.cacheKey=t,this.usedTimes=1,this.program=f,this.vertexShader=S,this.fragmentShader=M,this}let D6=0;class I6{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){const i=t.vertexShader,x=t.fragmentShader,T=this._getShaderStage(i),E=this._getShaderStage(x),s=this._getShaderCacheForMaterial(t);return s.has(T)===!1&&(s.add(T),T.usedTimes++),s.has(E)===!1&&(s.add(E),E.usedTimes++),this}remove(t){const i=this.materialCache.get(t);for(const x of i)x.usedTimes--,x.usedTimes===0&&this.shaderCache.delete(x.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){const i=this.materialCache;let x=i.get(t);return x===void 0&&(x=new Set,i.set(t,x)),x}_getShaderStage(t){const i=this.shaderCache;let x=i.get(t);return x===void 0&&(x=new N6(t),i.set(t,x)),x}}class N6{constructor(t){this.id=D6++,this.code=t,this.usedTimes=0}}function B6(g,t,i,x,T,E,s){const y=new Mu,e=new I6,r=new Set,p=[],h=T.isWebGL2,a=T.logarithmicDepthBuffer,l=T.vertexTextures;let n=T.precision;const u={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function f(A){return r.add(A),A===0?"uv":`uv${A}`}function o(A,P,b,O,I){const D=O.fog,B=I.geometry,G=A.isMeshStandardMaterial?O.environment:null,z=(A.isMeshStandardMaterial?i:t).get(A.envMap||G),X=z&&z.mapping===sc?z.image.height:null,j=u[A.type];A.precision!==null&&(n=T.getMaxPrecision(A.precision),n!==A.precision&&console.warn("THREE.WebGLProgram.getParameters:",A.precision,"not supported, using",n,"instead."));const Q=B.morphAttributes.position||B.morphAttributes.normal||B.morphAttributes.color,tt=Q!==void 0?Q.length:0;let Y=0;B.morphAttributes.position!==void 0&&(Y=1),B.morphAttributes.normal!==void 0&&(Y=2),B.morphAttributes.color!==void 0&&(Y=3);let Z,U,H,J;if(j){const Ii=eo[j];Z=Ii.vertexShader,U=Ii.fragmentShader}else Z=A.vertexShader,U=A.fragmentShader,e.update(A),H=e.getVertexShaderID(A),J=e.getFragmentShaderID(A);const _=g.getRenderTarget(),q=I.isInstancedMesh===!0,at=I.isBatchedMesh===!0,ot=!!A.map,rt=!!A.matcap,gt=!!z,yt=!!A.aoMap,Et=!!A.lightMap,At=!!A.bumpMap,Pt=!!A.normalMap,Vt=!!A.displacementMap,dt=!!A.emissiveMap,ut=!!A.metalnessMap,Rt=!!A.roughnessMap,Dt=A.anisotropy>0,Ht=A.clearcoat>0,Bt=A.iridescence>0,re=A.sheen>0,le=A.transmission>0,ge=Dt&&!!A.anisotropyMap,xe=Ht&&!!A.clearcoatMap,Pe=Ht&&!!A.clearcoatNormalMap,te=Ht&&!!A.clearcoatRoughnessMap,Ge=Bt&&!!A.iridescenceMap,Oe=Bt&&!!A.iridescenceThicknessMap,Be=re&&!!A.sheenColorMap,Le=re&&!!A.sheenRoughnessMap,ne=!!A.specularMap,je=!!A.specularColorMap,si=!!A.specularIntensityMap,Mi=le&&!!A.transmissionMap,he=le&&!!A.thicknessMap,Ti=!!A.gradientMap,bt=!!A.alphaMap,Me=A.alphaTest>0,we=!!A.alphaHash,Ve=!!A.extensions;let Je=zo;A.toneMapped&&(_===null||_.isXRRenderTarget===!0)&&(Je=g.toneMapping);const Gi={isWebGL2:h,shaderID:j,shaderType:A.type,shaderName:A.name,vertexShader:Z,fragmentShader:U,defines:A.defines,customVertexShaderID:H,customFragmentShaderID:J,isRawShaderMaterial:A.isRawShaderMaterial===!0,glslVersion:A.glslVersion,precision:n,batching:at,instancing:q,instancingColor:q&&I.instanceColor!==null,supportsVertexTextures:l,outputColorSpace:_===null?g.outputColorSpace:_.isXRRenderTarget===!0?_.texture.colorSpace:Ho,alphaToCoverage:!!A.alphaToCoverage,map:ot,matcap:rt,envMap:gt,envMapMode:gt&&z.mapping,envMapCubeUVHeight:X,aoMap:yt,lightMap:Et,bumpMap:At,normalMap:Pt,displacementMap:l&&Vt,emissiveMap:dt,normalMapObjectSpace:Pt&&A.normalMapType===o2,normalMapTangentSpace:Pt&&A.normalMapType===Th,metalnessMap:ut,roughnessMap:Rt,anisotropy:Dt,anisotropyMap:ge,clearcoat:Ht,clearcoatMap:xe,clearcoatNormalMap:Pe,clearcoatRoughnessMap:te,iridescence:Bt,iridescenceMap:Ge,iridescenceThicknessMap:Oe,sheen:re,sheenColorMap:Be,sheenRoughnessMap:Le,specularMap:ne,specularColorMap:je,specularIntensityMap:si,transmission:le,transmissionMap:Mi,thicknessMap:he,gradientMap:Ti,opaque:A.transparent===!1&&A.blending===Su&&A.alphaToCoverage===!1,alphaMap:bt,alphaTest:Me,alphaHash:we,combine:A.combine,mapUv:ot&&f(A.map.channel),aoMapUv:yt&&f(A.aoMap.channel),lightMapUv:Et&&f(A.lightMap.channel),bumpMapUv:At&&f(A.bumpMap.channel),normalMapUv:Pt&&f(A.normalMap.channel),displacementMapUv:Vt&&f(A.displacementMap.channel),emissiveMapUv:dt&&f(A.emissiveMap.channel),metalnessMapUv:ut&&f(A.metalnessMap.channel),roughnessMapUv:Rt&&f(A.roughnessMap.channel),anisotropyMapUv:ge&&f(A.anisotropyMap.channel),clearcoatMapUv:xe&&f(A.clearcoatMap.channel),clearcoatNormalMapUv:Pe&&f(A.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:te&&f(A.clearcoatRoughnessMap.channel),iridescenceMapUv:Ge&&f(A.iridescenceMap.channel),iridescenceThicknessMapUv:Oe&&f(A.iridescenceThicknessMap.channel),sheenColorMapUv:Be&&f(A.sheenColorMap.channel),sheenRoughnessMapUv:Le&&f(A.sheenRoughnessMap.channel),specularMapUv:ne&&f(A.specularMap.channel),specularColorMapUv:je&&f(A.specularColorMap.channel),specularIntensityMapUv:si&&f(A.specularIntensityMap.channel),transmissionMapUv:Mi&&f(A.transmissionMap.channel),thicknessMapUv:he&&f(A.thicknessMap.channel),alphaMapUv:bt&&f(A.alphaMap.channel),vertexTangents:!!B.attributes.tangent&&(Pt||Dt),vertexColors:A.vertexColors,vertexAlphas:A.vertexColors===!0&&!!B.attributes.color&&B.attributes.color.itemSize===4,pointsUvs:I.isPoints===!0&&!!B.attributes.uv&&(ot||bt),fog:!!D,useFog:A.fog===!0,fogExp2:!!D&&D.isFogExp2,flatShading:A.flatShading===!0,sizeAttenuation:A.sizeAttenuation===!0,logarithmicDepthBuffer:a,skinning:I.isSkinnedMesh===!0,morphTargets:B.morphAttributes.position!==void 0,morphNormals:B.morphAttributes.normal!==void 0,morphColors:B.morphAttributes.color!==void 0,morphTargetsCount:tt,morphTextureStride:Y,numDirLights:P.directional.length,numPointLights:P.point.length,numSpotLights:P.spot.length,numSpotLightMaps:P.spotLightMap.length,numRectAreaLights:P.rectArea.length,numHemiLights:P.hemi.length,numDirLightShadows:P.directionalShadowMap.length,numPointLightShadows:P.pointShadowMap.length,numSpotLightShadows:P.spotShadowMap.length,numSpotLightShadowsWithMaps:P.numSpotLightShadowsWithMaps,numLightProbes:P.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:A.dithering,shadowMapEnabled:g.shadowMap.enabled&&b.length>0,shadowMapType:g.shadowMap.type,toneMapping:Je,useLegacyLights:g._useLegacyLights,decodeVideoTexture:ot&&A.map.isVideoTexture===!0&&sn.getTransfer(A.map.colorSpace)===mn,premultipliedAlpha:A.premultipliedAlpha,doubleSided:A.side===Io,flipSided:A.side===gs,useDepthPacking:A.depthPacking>=0,depthPacking:A.depthPacking||0,index0AttributeName:A.index0AttributeName,extensionDerivatives:Ve&&A.extensions.derivatives===!0,extensionFragDepth:Ve&&A.extensions.fragDepth===!0,extensionDrawBuffers:Ve&&A.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ve&&A.extensions.shaderTextureLOD===!0,extensionClipCullDistance:Ve&&A.extensions.clipCullDistance===!0&&x.has("WEBGL_clip_cull_distance"),extensionMultiDraw:Ve&&A.extensions.multiDraw===!0&&x.has("WEBGL_multi_draw"),rendererExtensionFragDepth:h||x.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||x.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||x.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:x.has("KHR_parallel_shader_compile"),customProgramCacheKey:A.customProgramCacheKey()};return Gi.vertexUv1s=r.has(1),Gi.vertexUv2s=r.has(2),Gi.vertexUv3s=r.has(3),r.clear(),Gi}function c(A){const P=[];if(A.shaderID?P.push(A.shaderID):(P.push(A.customVertexShaderID),P.push(A.customFragmentShaderID)),A.defines!==void 0)for(const b in A.defines)P.push(b),P.push(A.defines[b]);return A.isRawShaderMaterial===!1&&(d(P,A),v(P,A),P.push(g.outputColorSpace)),P.push(A.customProgramCacheKey),P.join()}function d(A,P){A.push(P.precision),A.push(P.outputColorSpace),A.push(P.envMapMode),A.push(P.envMapCubeUVHeight),A.push(P.mapUv),A.push(P.alphaMapUv),A.push(P.lightMapUv),A.push(P.aoMapUv),A.push(P.bumpMapUv),A.push(P.normalMapUv),A.push(P.displacementMapUv),A.push(P.emissiveMapUv),A.push(P.metalnessMapUv),A.push(P.roughnessMapUv),A.push(P.anisotropyMapUv),A.push(P.clearcoatMapUv),A.push(P.clearcoatNormalMapUv),A.push(P.clearcoatRoughnessMapUv),A.push(P.iridescenceMapUv),A.push(P.iridescenceThicknessMapUv),A.push(P.sheenColorMapUv),A.push(P.sheenRoughnessMapUv),A.push(P.specularMapUv),A.push(P.specularColorMapUv),A.push(P.specularIntensityMapUv),A.push(P.transmissionMapUv),A.push(P.thicknessMapUv),A.push(P.combine),A.push(P.fogExp2),A.push(P.sizeAttenuation),A.push(P.morphTargetsCount),A.push(P.morphAttributeCount),A.push(P.numDirLights),A.push(P.numPointLights),A.push(P.numSpotLights),A.push(P.numSpotLightMaps),A.push(P.numHemiLights),A.push(P.numRectAreaLights),A.push(P.numDirLightShadows),A.push(P.numPointLightShadows),A.push(P.numSpotLightShadows),A.push(P.numSpotLightShadowsWithMaps),A.push(P.numLightProbes),A.push(P.shadowMapType),A.push(P.toneMapping),A.push(P.numClippingPlanes),A.push(P.numClipIntersection),A.push(P.depthPacking)}function v(A,P){y.disableAll(),P.isWebGL2&&y.enable(0),P.supportsVertexTextures&&y.enable(1),P.instancing&&y.enable(2),P.instancingColor&&y.enable(3),P.matcap&&y.enable(4),P.envMap&&y.enable(5),P.normalMapObjectSpace&&y.enable(6),P.normalMapTangentSpace&&y.enable(7),P.clearcoat&&y.enable(8),P.iridescence&&y.enable(9),P.alphaTest&&y.enable(10),P.vertexColors&&y.enable(11),P.vertexAlphas&&y.enable(12),P.vertexUv1s&&y.enable(13),P.vertexUv2s&&y.enable(14),P.vertexUv3s&&y.enable(15),P.vertexTangents&&y.enable(16),P.anisotropy&&y.enable(17),P.alphaHash&&y.enable(18),P.batching&&y.enable(19),A.push(y.mask),y.disableAll(),P.fog&&y.enable(0),P.useFog&&y.enable(1),P.flatShading&&y.enable(2),P.logarithmicDepthBuffer&&y.enable(3),P.skinning&&y.enable(4),P.morphTargets&&y.enable(5),P.morphNormals&&y.enable(6),P.morphColors&&y.enable(7),P.premultipliedAlpha&&y.enable(8),P.shadowMapEnabled&&y.enable(9),P.useLegacyLights&&y.enable(10),P.doubleSided&&y.enable(11),P.flipSided&&y.enable(12),P.useDepthPacking&&y.enable(13),P.dithering&&y.enable(14),P.transmission&&y.enable(15),P.sheen&&y.enable(16),P.opaque&&y.enable(17),P.pointsUvs&&y.enable(18),P.decodeVideoTexture&&y.enable(19),P.alphaToCoverage&&y.enable(20),A.push(y.mask)}function m(A){const P=u[A.type];let b;if(P){const O=eo[P];b=S2.clone(O.uniforms)}else b=A.uniforms;return b}function S(A,P){let b;for(let O=0,I=p.length;O0?x.push(o):l.transparent===!0?T.push(o):i.push(o)}function e(h,a,l,n,u,f){const o=s(h,a,l,n,u,f);l.transmission>0?x.unshift(o):l.transparent===!0?T.unshift(o):i.unshift(o)}function r(h,a){i.length>1&&i.sort(h||z6),x.length>1&&x.sort(a||cE),T.length>1&&T.sort(a||cE)}function p(){for(let h=t,a=g.length;h=E.length?(s=new dE,E.push(s)):s=E[T],s}function i(){g=new WeakMap}return{get:t,dispose:i}}function V6(){const g={};return{get:function(t){if(g[t.id]!==void 0)return g[t.id];let i;switch(t.type){case"DirectionalLight":i={direction:new Ct,color:new ze};break;case"SpotLight":i={position:new Ct,direction:new Ct,color:new ze,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new Ct,color:new ze,distance:0,decay:0};break;case"HemisphereLight":i={direction:new Ct,skyColor:new ze,groundColor:new ze};break;case"RectAreaLight":i={color:new ze,position:new Ct,halfWidth:new Ct,halfHeight:new Ct};break}return g[t.id]=i,i}}}function H6(){const g={};return{get:function(t){if(g[t.id]!==void 0)return g[t.id];let i;switch(t.type){case"DirectionalLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve};break;case"SpotLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve};break;case"PointLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve,shadowCameraNear:1,shadowCameraFar:1e3};break}return g[t.id]=i,i}}}let W6=0;function X6(g,t){return(t.castShadow?2:0)-(g.castShadow?2:0)+(t.map?1:0)-(g.map?1:0)}function Y6(g,t){const i=new V6,x=H6(),T={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let p=0;p<9;p++)T.probe.push(new Ct);const E=new Ct,s=new di,y=new di;function e(p,h){let a=0,l=0,n=0;for(let b=0;b<9;b++)T.probe[b].set(0,0,0);let u=0,f=0,o=0,c=0,d=0,v=0,m=0,S=0,M=0,w=0,C=0;p.sort(X6);const A=h===!0?Math.PI:1;for(let b=0,O=p.length;b0&&(t.isWebGL2?g.has("OES_texture_float_linear")===!0?(T.rectAreaLTC1=Fe.LTC_FLOAT_1,T.rectAreaLTC2=Fe.LTC_FLOAT_2):(T.rectAreaLTC1=Fe.LTC_HALF_1,T.rectAreaLTC2=Fe.LTC_HALF_2):g.has("OES_texture_float_linear")===!0?(T.rectAreaLTC1=Fe.LTC_FLOAT_1,T.rectAreaLTC2=Fe.LTC_FLOAT_2):g.has("OES_texture_half_float_linear")===!0?(T.rectAreaLTC1=Fe.LTC_HALF_1,T.rectAreaLTC2=Fe.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),T.ambient[0]=a,T.ambient[1]=l,T.ambient[2]=n;const P=T.hash;(P.directionalLength!==u||P.pointLength!==f||P.spotLength!==o||P.rectAreaLength!==c||P.hemiLength!==d||P.numDirectionalShadows!==v||P.numPointShadows!==m||P.numSpotShadows!==S||P.numSpotMaps!==M||P.numLightProbes!==C)&&(T.directional.length=u,T.spot.length=o,T.rectArea.length=c,T.point.length=f,T.hemi.length=d,T.directionalShadow.length=v,T.directionalShadowMap.length=v,T.pointShadow.length=m,T.pointShadowMap.length=m,T.spotShadow.length=S,T.spotShadowMap.length=S,T.directionalShadowMatrix.length=v,T.pointShadowMatrix.length=m,T.spotLightMatrix.length=S+M-w,T.spotLightMap.length=M,T.numSpotLightShadowsWithMaps=w,T.numLightProbes=C,P.directionalLength=u,P.pointLength=f,P.spotLength=o,P.rectAreaLength=c,P.hemiLength=d,P.numDirectionalShadows=v,P.numPointShadows=m,P.numSpotShadows=S,P.numSpotMaps=M,P.numLightProbes=C,T.version=W6++)}function r(p,h){let a=0,l=0,n=0,u=0,f=0;const o=h.matrixWorldInverse;for(let c=0,d=p.length;c=y.length?(e=new pE(g,t),y.push(e)):e=y[s],e}function T(){i=new WeakMap}return{get:x,dispose:T}}class A1 extends Wr{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=s2,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class P1 extends Wr{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}const j6=`void main() { +`+X)}else O!==""?console.warn("THREE.WebGLProgram: Program Info Log:",O):(I===""||D==="")&&(G=!1);G&&(b.diagnostics={runnable:B,programLog:O,vertexShader:{log:I,prefix:o},fragmentShader:{log:D,prefix:c}})}T.deleteShader(S),T.deleteShader(M),C=new cm(T,f),A=T6(T,f)}let C;this.getUniforms=function(){return C===void 0&&w(this),C};let A;this.getAttributes=function(){return A===void 0&&w(this),A};let P=i.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return P===!1&&(P=T.getProgramParameter(f,c6)),P},this.destroy=function(){x.releaseStatesOfProgram(this),T.deleteProgram(f),this.program=void 0},this.type=i.shaderType,this.name=i.shaderName,this.id=d6++,this.cacheKey=t,this.usedTimes=1,this.program=f,this.vertexShader=S,this.fragmentShader=M,this}let D6=0;class I6{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){const i=t.vertexShader,x=t.fragmentShader,T=this._getShaderStage(i),E=this._getShaderStage(x),s=this._getShaderCacheForMaterial(t);return s.has(T)===!1&&(s.add(T),T.usedTimes++),s.has(E)===!1&&(s.add(E),E.usedTimes++),this}remove(t){const i=this.materialCache.get(t);for(const x of i)x.usedTimes--,x.usedTimes===0&&this.shaderCache.delete(x.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){const i=this.materialCache;let x=i.get(t);return x===void 0&&(x=new Set,i.set(t,x)),x}_getShaderStage(t){const i=this.shaderCache;let x=i.get(t);return x===void 0&&(x=new N6(t),i.set(t,x)),x}}class N6{constructor(t){this.id=D6++,this.code=t,this.usedTimes=0}}function B6(g,t,i,x,T,E,s){const y=new Mu,e=new I6,r=new Set,p=[],h=T.isWebGL2,a=T.logarithmicDepthBuffer,l=T.vertexTextures;let n=T.precision;const u={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function f(A){return r.add(A),A===0?"uv":`uv${A}`}function o(A,P,b,O,I){const D=O.fog,B=I.geometry,G=A.isMeshStandardMaterial?O.environment:null,z=(A.isMeshStandardMaterial?i:t).get(A.envMap||G),X=z&&z.mapping===ac?z.image.height:null,j=u[A.type];A.precision!==null&&(n=T.getMaxPrecision(A.precision),n!==A.precision&&console.warn("THREE.WebGLProgram.getParameters:",A.precision,"not supported, using",n,"instead."));const Q=B.morphAttributes.position||B.morphAttributes.normal||B.morphAttributes.color,tt=Q!==void 0?Q.length:0;let Y=0;B.morphAttributes.position!==void 0&&(Y=1),B.morphAttributes.normal!==void 0&&(Y=2),B.morphAttributes.color!==void 0&&(Y=3);let Z,U,H,J;if(j){const Ii=eo[j];Z=Ii.vertexShader,U=Ii.fragmentShader}else Z=A.vertexShader,U=A.fragmentShader,e.update(A),H=e.getVertexShaderID(A),J=e.getFragmentShaderID(A);const _=g.getRenderTarget(),q=I.isInstancedMesh===!0,at=I.isBatchedMesh===!0,ot=!!A.map,rt=!!A.matcap,gt=!!z,yt=!!A.aoMap,Et=!!A.lightMap,At=!!A.bumpMap,Pt=!!A.normalMap,Vt=!!A.displacementMap,dt=!!A.emissiveMap,ut=!!A.metalnessMap,Rt=!!A.roughnessMap,Dt=A.anisotropy>0,Ht=A.clearcoat>0,Bt=A.iridescence>0,re=A.sheen>0,le=A.transmission>0,ge=Dt&&!!A.anisotropyMap,xe=Ht&&!!A.clearcoatMap,Pe=Ht&&!!A.clearcoatNormalMap,te=Ht&&!!A.clearcoatRoughnessMap,Ge=Bt&&!!A.iridescenceMap,Oe=Bt&&!!A.iridescenceThicknessMap,Be=re&&!!A.sheenColorMap,Le=re&&!!A.sheenRoughnessMap,ne=!!A.specularMap,je=!!A.specularColorMap,si=!!A.specularIntensityMap,Mi=le&&!!A.transmissionMap,he=le&&!!A.thicknessMap,Ti=!!A.gradientMap,bt=!!A.alphaMap,Ce=A.alphaTest>0,we=!!A.alphaHash,Ve=!!A.extensions;let Je=zo;A.toneMapped&&(_===null||_.isXRRenderTarget===!0)&&(Je=g.toneMapping);const Gi={isWebGL2:h,shaderID:j,shaderType:A.type,shaderName:A.name,vertexShader:Z,fragmentShader:U,defines:A.defines,customVertexShaderID:H,customFragmentShaderID:J,isRawShaderMaterial:A.isRawShaderMaterial===!0,glslVersion:A.glslVersion,precision:n,batching:at,instancing:q,instancingColor:q&&I.instanceColor!==null,supportsVertexTextures:l,outputColorSpace:_===null?g.outputColorSpace:_.isXRRenderTarget===!0?_.texture.colorSpace:Ho,alphaToCoverage:!!A.alphaToCoverage,map:ot,matcap:rt,envMap:gt,envMapMode:gt&&z.mapping,envMapCubeUVHeight:X,aoMap:yt,lightMap:Et,bumpMap:At,normalMap:Pt,displacementMap:l&&Vt,emissiveMap:dt,normalMapObjectSpace:Pt&&A.normalMapType===o2,normalMapTangentSpace:Pt&&A.normalMapType===Th,metalnessMap:ut,roughnessMap:Rt,anisotropy:Dt,anisotropyMap:ge,clearcoat:Ht,clearcoatMap:xe,clearcoatNormalMap:Pe,clearcoatRoughnessMap:te,iridescence:Bt,iridescenceMap:Ge,iridescenceThicknessMap:Oe,sheen:re,sheenColorMap:Be,sheenRoughnessMap:Le,specularMap:ne,specularColorMap:je,specularIntensityMap:si,transmission:le,transmissionMap:Mi,thicknessMap:he,gradientMap:Ti,opaque:A.transparent===!1&&A.blending===Su&&A.alphaToCoverage===!1,alphaMap:bt,alphaTest:Ce,alphaHash:we,combine:A.combine,mapUv:ot&&f(A.map.channel),aoMapUv:yt&&f(A.aoMap.channel),lightMapUv:Et&&f(A.lightMap.channel),bumpMapUv:At&&f(A.bumpMap.channel),normalMapUv:Pt&&f(A.normalMap.channel),displacementMapUv:Vt&&f(A.displacementMap.channel),emissiveMapUv:dt&&f(A.emissiveMap.channel),metalnessMapUv:ut&&f(A.metalnessMap.channel),roughnessMapUv:Rt&&f(A.roughnessMap.channel),anisotropyMapUv:ge&&f(A.anisotropyMap.channel),clearcoatMapUv:xe&&f(A.clearcoatMap.channel),clearcoatNormalMapUv:Pe&&f(A.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:te&&f(A.clearcoatRoughnessMap.channel),iridescenceMapUv:Ge&&f(A.iridescenceMap.channel),iridescenceThicknessMapUv:Oe&&f(A.iridescenceThicknessMap.channel),sheenColorMapUv:Be&&f(A.sheenColorMap.channel),sheenRoughnessMapUv:Le&&f(A.sheenRoughnessMap.channel),specularMapUv:ne&&f(A.specularMap.channel),specularColorMapUv:je&&f(A.specularColorMap.channel),specularIntensityMapUv:si&&f(A.specularIntensityMap.channel),transmissionMapUv:Mi&&f(A.transmissionMap.channel),thicknessMapUv:he&&f(A.thicknessMap.channel),alphaMapUv:bt&&f(A.alphaMap.channel),vertexTangents:!!B.attributes.tangent&&(Pt||Dt),vertexColors:A.vertexColors,vertexAlphas:A.vertexColors===!0&&!!B.attributes.color&&B.attributes.color.itemSize===4,pointsUvs:I.isPoints===!0&&!!B.attributes.uv&&(ot||bt),fog:!!D,useFog:A.fog===!0,fogExp2:!!D&&D.isFogExp2,flatShading:A.flatShading===!0,sizeAttenuation:A.sizeAttenuation===!0,logarithmicDepthBuffer:a,skinning:I.isSkinnedMesh===!0,morphTargets:B.morphAttributes.position!==void 0,morphNormals:B.morphAttributes.normal!==void 0,morphColors:B.morphAttributes.color!==void 0,morphTargetsCount:tt,morphTextureStride:Y,numDirLights:P.directional.length,numPointLights:P.point.length,numSpotLights:P.spot.length,numSpotLightMaps:P.spotLightMap.length,numRectAreaLights:P.rectArea.length,numHemiLights:P.hemi.length,numDirLightShadows:P.directionalShadowMap.length,numPointLightShadows:P.pointShadowMap.length,numSpotLightShadows:P.spotShadowMap.length,numSpotLightShadowsWithMaps:P.numSpotLightShadowsWithMaps,numLightProbes:P.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:A.dithering,shadowMapEnabled:g.shadowMap.enabled&&b.length>0,shadowMapType:g.shadowMap.type,toneMapping:Je,useLegacyLights:g._useLegacyLights,decodeVideoTexture:ot&&A.map.isVideoTexture===!0&&sn.getTransfer(A.map.colorSpace)===mn,premultipliedAlpha:A.premultipliedAlpha,doubleSided:A.side===Io,flipSided:A.side===gs,useDepthPacking:A.depthPacking>=0,depthPacking:A.depthPacking||0,index0AttributeName:A.index0AttributeName,extensionDerivatives:Ve&&A.extensions.derivatives===!0,extensionFragDepth:Ve&&A.extensions.fragDepth===!0,extensionDrawBuffers:Ve&&A.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ve&&A.extensions.shaderTextureLOD===!0,extensionClipCullDistance:Ve&&A.extensions.clipCullDistance===!0&&x.has("WEBGL_clip_cull_distance"),extensionMultiDraw:Ve&&A.extensions.multiDraw===!0&&x.has("WEBGL_multi_draw"),rendererExtensionFragDepth:h||x.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||x.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||x.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:x.has("KHR_parallel_shader_compile"),customProgramCacheKey:A.customProgramCacheKey()};return Gi.vertexUv1s=r.has(1),Gi.vertexUv2s=r.has(2),Gi.vertexUv3s=r.has(3),r.clear(),Gi}function c(A){const P=[];if(A.shaderID?P.push(A.shaderID):(P.push(A.customVertexShaderID),P.push(A.customFragmentShaderID)),A.defines!==void 0)for(const b in A.defines)P.push(b),P.push(A.defines[b]);return A.isRawShaderMaterial===!1&&(d(P,A),v(P,A),P.push(g.outputColorSpace)),P.push(A.customProgramCacheKey),P.join()}function d(A,P){A.push(P.precision),A.push(P.outputColorSpace),A.push(P.envMapMode),A.push(P.envMapCubeUVHeight),A.push(P.mapUv),A.push(P.alphaMapUv),A.push(P.lightMapUv),A.push(P.aoMapUv),A.push(P.bumpMapUv),A.push(P.normalMapUv),A.push(P.displacementMapUv),A.push(P.emissiveMapUv),A.push(P.metalnessMapUv),A.push(P.roughnessMapUv),A.push(P.anisotropyMapUv),A.push(P.clearcoatMapUv),A.push(P.clearcoatNormalMapUv),A.push(P.clearcoatRoughnessMapUv),A.push(P.iridescenceMapUv),A.push(P.iridescenceThicknessMapUv),A.push(P.sheenColorMapUv),A.push(P.sheenRoughnessMapUv),A.push(P.specularMapUv),A.push(P.specularColorMapUv),A.push(P.specularIntensityMapUv),A.push(P.transmissionMapUv),A.push(P.thicknessMapUv),A.push(P.combine),A.push(P.fogExp2),A.push(P.sizeAttenuation),A.push(P.morphTargetsCount),A.push(P.morphAttributeCount),A.push(P.numDirLights),A.push(P.numPointLights),A.push(P.numSpotLights),A.push(P.numSpotLightMaps),A.push(P.numHemiLights),A.push(P.numRectAreaLights),A.push(P.numDirLightShadows),A.push(P.numPointLightShadows),A.push(P.numSpotLightShadows),A.push(P.numSpotLightShadowsWithMaps),A.push(P.numLightProbes),A.push(P.shadowMapType),A.push(P.toneMapping),A.push(P.numClippingPlanes),A.push(P.numClipIntersection),A.push(P.depthPacking)}function v(A,P){y.disableAll(),P.isWebGL2&&y.enable(0),P.supportsVertexTextures&&y.enable(1),P.instancing&&y.enable(2),P.instancingColor&&y.enable(3),P.matcap&&y.enable(4),P.envMap&&y.enable(5),P.normalMapObjectSpace&&y.enable(6),P.normalMapTangentSpace&&y.enable(7),P.clearcoat&&y.enable(8),P.iridescence&&y.enable(9),P.alphaTest&&y.enable(10),P.vertexColors&&y.enable(11),P.vertexAlphas&&y.enable(12),P.vertexUv1s&&y.enable(13),P.vertexUv2s&&y.enable(14),P.vertexUv3s&&y.enable(15),P.vertexTangents&&y.enable(16),P.anisotropy&&y.enable(17),P.alphaHash&&y.enable(18),P.batching&&y.enable(19),A.push(y.mask),y.disableAll(),P.fog&&y.enable(0),P.useFog&&y.enable(1),P.flatShading&&y.enable(2),P.logarithmicDepthBuffer&&y.enable(3),P.skinning&&y.enable(4),P.morphTargets&&y.enable(5),P.morphNormals&&y.enable(6),P.morphColors&&y.enable(7),P.premultipliedAlpha&&y.enable(8),P.shadowMapEnabled&&y.enable(9),P.useLegacyLights&&y.enable(10),P.doubleSided&&y.enable(11),P.flipSided&&y.enable(12),P.useDepthPacking&&y.enable(13),P.dithering&&y.enable(14),P.transmission&&y.enable(15),P.sheen&&y.enable(16),P.opaque&&y.enable(17),P.pointsUvs&&y.enable(18),P.decodeVideoTexture&&y.enable(19),P.alphaToCoverage&&y.enable(20),A.push(y.mask)}function m(A){const P=u[A.type];let b;if(P){const O=eo[P];b=S2.clone(O.uniforms)}else b=A.uniforms;return b}function S(A,P){let b;for(let O=0,I=p.length;O0?x.push(o):l.transparent===!0?T.push(o):i.push(o)}function e(h,a,l,n,u,f){const o=s(h,a,l,n,u,f);l.transmission>0?x.unshift(o):l.transparent===!0?T.unshift(o):i.unshift(o)}function r(h,a){i.length>1&&i.sort(h||z6),x.length>1&&x.sort(a||cE),T.length>1&&T.sort(a||cE)}function p(){for(let h=t,a=g.length;h=E.length?(s=new dE,E.push(s)):s=E[T],s}function i(){g=new WeakMap}return{get:t,dispose:i}}function V6(){const g={};return{get:function(t){if(g[t.id]!==void 0)return g[t.id];let i;switch(t.type){case"DirectionalLight":i={direction:new Ct,color:new ze};break;case"SpotLight":i={position:new Ct,direction:new Ct,color:new ze,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new Ct,color:new ze,distance:0,decay:0};break;case"HemisphereLight":i={direction:new Ct,skyColor:new ze,groundColor:new ze};break;case"RectAreaLight":i={color:new ze,position:new Ct,halfWidth:new Ct,halfHeight:new Ct};break}return g[t.id]=i,i}}}function H6(){const g={};return{get:function(t){if(g[t.id]!==void 0)return g[t.id];let i;switch(t.type){case"DirectionalLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve};break;case"SpotLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve};break;case"PointLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ve,shadowCameraNear:1,shadowCameraFar:1e3};break}return g[t.id]=i,i}}}let W6=0;function X6(g,t){return(t.castShadow?2:0)-(g.castShadow?2:0)+(t.map?1:0)-(g.map?1:0)}function Y6(g,t){const i=new V6,x=H6(),T={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let p=0;p<9;p++)T.probe.push(new Ct);const E=new Ct,s=new di,y=new di;function e(p,h){let a=0,l=0,n=0;for(let b=0;b<9;b++)T.probe[b].set(0,0,0);let u=0,f=0,o=0,c=0,d=0,v=0,m=0,S=0,M=0,w=0,C=0;p.sort(X6);const A=h===!0?Math.PI:1;for(let b=0,O=p.length;b0&&(t.isWebGL2?g.has("OES_texture_float_linear")===!0?(T.rectAreaLTC1=Fe.LTC_FLOAT_1,T.rectAreaLTC2=Fe.LTC_FLOAT_2):(T.rectAreaLTC1=Fe.LTC_HALF_1,T.rectAreaLTC2=Fe.LTC_HALF_2):g.has("OES_texture_float_linear")===!0?(T.rectAreaLTC1=Fe.LTC_FLOAT_1,T.rectAreaLTC2=Fe.LTC_FLOAT_2):g.has("OES_texture_half_float_linear")===!0?(T.rectAreaLTC1=Fe.LTC_HALF_1,T.rectAreaLTC2=Fe.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),T.ambient[0]=a,T.ambient[1]=l,T.ambient[2]=n;const P=T.hash;(P.directionalLength!==u||P.pointLength!==f||P.spotLength!==o||P.rectAreaLength!==c||P.hemiLength!==d||P.numDirectionalShadows!==v||P.numPointShadows!==m||P.numSpotShadows!==S||P.numSpotMaps!==M||P.numLightProbes!==C)&&(T.directional.length=u,T.spot.length=o,T.rectArea.length=c,T.point.length=f,T.hemi.length=d,T.directionalShadow.length=v,T.directionalShadowMap.length=v,T.pointShadow.length=m,T.pointShadowMap.length=m,T.spotShadow.length=S,T.spotShadowMap.length=S,T.directionalShadowMatrix.length=v,T.pointShadowMatrix.length=m,T.spotLightMatrix.length=S+M-w,T.spotLightMap.length=M,T.numSpotLightShadowsWithMaps=w,T.numLightProbes=C,P.directionalLength=u,P.pointLength=f,P.spotLength=o,P.rectAreaLength=c,P.hemiLength=d,P.numDirectionalShadows=v,P.numPointShadows=m,P.numSpotShadows=S,P.numSpotMaps=M,P.numLightProbes=C,T.version=W6++)}function r(p,h){let a=0,l=0,n=0,u=0,f=0;const o=h.matrixWorldInverse;for(let c=0,d=p.length;c=y.length?(e=new pE(g,t),y.push(e)):e=y[s],e}function T(){i=new WeakMap}return{get:x,dispose:T}}class A1 extends Wr{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=s2,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class P1 extends Wr{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}const j6=`void main() { gl_Position = vec4( position, 1.0 ); }`,K6=`uniform sampler2D shadow_pass; uniform vec2 resolution; @@ -10141,7 +10141,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function Z6(g,t,i){let x=new ip;const T=new ve,E=new ve,s=new an,y=new A1({depthPacking:a2}),e=new P1,r={},p=i.maxTextureSize,h={[Al]:gs,[gs]:Al,[Io]:Io},a=new so({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ve},radius:{value:4}},vertexShader:j6,fragmentShader:K6}),l=a.clone();l.defines.HORIZONTAL_PASS=1;const n=new Fi;n.setAttribute("position",new on(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const u=new dr(n,a),f=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=lg;let o=this.type;this.render=function(S,M,w){if(f.enabled===!1||f.autoUpdate===!1&&f.needsUpdate===!1||S.length===0)return;const C=g.getRenderTarget(),A=g.getActiveCubeFace(),P=g.getActiveMipmapLevel(),b=g.state;b.setBlending(wl),b.buffers.color.setClear(1,1,1,1),b.buffers.depth.setTest(!0),b.setScissorTest(!1);const O=o!==qa&&this.type===qa,I=o===qa&&this.type!==qa;for(let D=0,B=S.length;Dp||T.y>p)&&(T.x>p&&(E.x=Math.floor(p/X.x),T.x=E.x*X.x,z.mapSize.x=E.x),T.y>p&&(E.y=Math.floor(p/X.y),T.y=E.y*X.y,z.mapSize.y=E.y)),z.map===null||O===!0||I===!0){const Q=this.type!==qa?{minFilter:rr,magFilter:rr}:{};z.map!==null&&z.map.dispose(),z.map=new ro(T.x,T.y,Q),z.map.texture.name=G.name+".shadowMap",z.camera.updateProjectionMatrix()}g.setRenderTarget(z.map),g.clear();const j=z.getViewportCount();for(let Q=0;Q0||M.map&&M.alphaTest>0){const b=A.uuid,O=M.uuid;let I=r[b];I===void 0&&(I={},r[b]=I);let D=I[O];D===void 0&&(D=A.clone(),I[O]=D,M.addEventListener("dispose",m)),A=D}if(A.visible=M.visible,A.wireframe=M.wireframe,C===qa?A.side=M.shadowSide!==null?M.shadowSide:M.side:A.side=M.shadowSide!==null?M.shadowSide:h[M.side],A.alphaMap=M.alphaMap,A.alphaTest=M.alphaTest,A.map=M.map,A.clipShadows=M.clipShadows,A.clippingPlanes=M.clippingPlanes,A.clipIntersection=M.clipIntersection,A.displacementMap=M.displacementMap,A.displacementScale=M.displacementScale,A.displacementBias=M.displacementBias,A.wireframeLinewidth=M.wireframeLinewidth,A.linewidth=M.linewidth,w.isPointLight===!0&&A.isMeshDistanceMaterial===!0){const b=g.properties.get(A);b.light=w}return A}function v(S,M,w,C,A){if(S.visible===!1)return;if(S.layers.test(M.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&A===qa)&&(!S.frustumCulled||x.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(w.matrixWorldInverse,S.matrixWorld);const O=t.update(S),I=S.material;if(Array.isArray(I)){const D=O.groups;for(let B=0,G=D.length;B=1):j.indexOf("OpenGL ES")!==-1&&(X=parseFloat(/^OpenGL ES (\d)/.exec(j)[1]),z=X>=2);let Q=null,tt={};const Y=g.getParameter(g.SCISSOR_BOX),Z=g.getParameter(g.VIEWPORT),U=new an().fromArray(Y),H=new an().fromArray(Z);function J(bt,Me,we,Ve){const Je=new Uint8Array(4),Gi=g.createTexture();g.bindTexture(bt,Gi),g.texParameteri(bt,g.TEXTURE_MIN_FILTER,g.NEAREST),g.texParameteri(bt,g.TEXTURE_MAG_FILTER,g.NEAREST);for(let Ii=0;Ii"u"?!1:/OculusBrowser/g.test(navigator.userAgent),p=new WeakMap;let h;const a=new WeakMap;let l=!1;try{l=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function n(dt,ut){return l?new OffscreenCanvas(dt,ut):Bd("canvas")}function u(dt,ut,Rt,Dt){let Ht=1;if((dt.width>Dt||dt.height>Dt)&&(Ht=Dt/Math.max(dt.width,dt.height)),Ht<1||ut===!0)if(typeof HTMLImageElement<"u"&&dt instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&dt instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&dt instanceof ImageBitmap){const Bt=ut?Am:Math.floor,re=Bt(Ht*dt.width),le=Bt(Ht*dt.height);h===void 0&&(h=n(re,le));const ge=Rt?n(re,le):h;return ge.width=re,ge.height=le,ge.getContext("2d").drawImage(dt,0,0,re,le),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+dt.width+"x"+dt.height+") to ("+re+"x"+le+")."),ge}else return"data"in dt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+dt.width+"x"+dt.height+")."),dt;return dt}function f(dt){return Sx(dt.width)&&Sx(dt.height)}function o(dt){return y?!1:dt.wrapS!==$r||dt.wrapT!==$r||dt.minFilter!==rr&&dt.minFilter!==Bn}function c(dt,ut){return dt.generateMipmaps&&ut&&dt.minFilter!==rr&&dt.minFilter!==Bn}function d(dt){g.generateMipmap(dt)}function v(dt,ut,Rt,Dt,Ht=!1){if(y===!1)return ut;if(dt!==null){if(g[dt]!==void 0)return g[dt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+dt+"'")}let Bt=ut;if(ut===g.RED&&(Rt===g.FLOAT&&(Bt=g.R32F),Rt===g.HALF_FLOAT&&(Bt=g.R16F),Rt===g.UNSIGNED_BYTE&&(Bt=g.R8)),ut===g.RED_INTEGER&&(Rt===g.UNSIGNED_BYTE&&(Bt=g.R8UI),Rt===g.UNSIGNED_SHORT&&(Bt=g.R16UI),Rt===g.UNSIGNED_INT&&(Bt=g.R32UI),Rt===g.BYTE&&(Bt=g.R8I),Rt===g.SHORT&&(Bt=g.R16I),Rt===g.INT&&(Bt=g.R32I)),ut===g.RG&&(Rt===g.FLOAT&&(Bt=g.RG32F),Rt===g.HALF_FLOAT&&(Bt=g.RG16F),Rt===g.UNSIGNED_BYTE&&(Bt=g.RG8)),ut===g.RGBA){const re=Ht?Fd:sn.getTransfer(Dt);Rt===g.FLOAT&&(Bt=g.RGBA32F),Rt===g.HALF_FLOAT&&(Bt=g.RGBA16F),Rt===g.UNSIGNED_BYTE&&(Bt=re===mn?g.SRGB8_ALPHA8:g.RGBA8),Rt===g.UNSIGNED_SHORT_4_4_4_4&&(Bt=g.RGBA4),Rt===g.UNSIGNED_SHORT_5_5_5_1&&(Bt=g.RGB5_A1)}return(Bt===g.R16F||Bt===g.R32F||Bt===g.RG16F||Bt===g.RG32F||Bt===g.RGBA16F||Bt===g.RGBA32F)&&t.get("EXT_color_buffer_float"),Bt}function m(dt,ut,Rt){return c(dt,Rt)===!0||dt.isFramebufferTexture&&dt.minFilter!==rr&&dt.minFilter!==Bn?Math.log2(Math.max(ut.width,ut.height))+1:dt.mipmaps!==void 0&&dt.mipmaps.length>0?dt.mipmaps.length:dt.isCompressedTexture&&Array.isArray(dt.image)?ut.mipmaps.length:1}function S(dt){return dt===rr||dt===Cm||dt===du?g.NEAREST:g.LINEAR}function M(dt){const ut=dt.target;ut.removeEventListener("dispose",M),C(ut),ut.isVideoTexture&&p.delete(ut)}function w(dt){const ut=dt.target;ut.removeEventListener("dispose",w),P(ut)}function C(dt){const ut=x.get(dt);if(ut.__webglInit===void 0)return;const Rt=dt.source,Dt=a.get(Rt);if(Dt){const Ht=Dt[ut.__cacheKey];Ht.usedTimes--,Ht.usedTimes===0&&A(dt),Object.keys(Dt).length===0&&a.delete(Rt)}x.remove(dt)}function A(dt){const ut=x.get(dt);g.deleteTexture(ut.__webglTexture);const Rt=dt.source,Dt=a.get(Rt);delete Dt[ut.__cacheKey],s.memory.textures--}function P(dt){const ut=dt.texture,Rt=x.get(dt),Dt=x.get(ut);if(Dt.__webglTexture!==void 0&&(g.deleteTexture(Dt.__webglTexture),s.memory.textures--),dt.depthTexture&&dt.depthTexture.dispose(),dt.isWebGLCubeRenderTarget)for(let Ht=0;Ht<6;Ht++){if(Array.isArray(Rt.__webglFramebuffer[Ht]))for(let Bt=0;Bt=T.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+dt+" texture units while this GPU supports only "+T.maxTextures),b+=1,dt}function D(dt){const ut=[];return ut.push(dt.wrapS),ut.push(dt.wrapT),ut.push(dt.wrapR||0),ut.push(dt.magFilter),ut.push(dt.minFilter),ut.push(dt.anisotropy),ut.push(dt.internalFormat),ut.push(dt.format),ut.push(dt.type),ut.push(dt.generateMipmaps),ut.push(dt.premultiplyAlpha),ut.push(dt.flipY),ut.push(dt.unpackAlignment),ut.push(dt.colorSpace),ut.join()}function B(dt,ut){const Rt=x.get(dt);if(dt.isVideoTexture&&Pt(dt),dt.isRenderTargetTexture===!1&&dt.version>0&&Rt.__version!==dt.version){const Dt=dt.image;if(Dt===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Dt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{U(Rt,dt,ut);return}}i.bindTexture(g.TEXTURE_2D,Rt.__webglTexture,g.TEXTURE0+ut)}function G(dt,ut){const Rt=x.get(dt);if(dt.version>0&&Rt.__version!==dt.version){U(Rt,dt,ut);return}i.bindTexture(g.TEXTURE_2D_ARRAY,Rt.__webglTexture,g.TEXTURE0+ut)}function z(dt,ut){const Rt=x.get(dt);if(dt.version>0&&Rt.__version!==dt.version){U(Rt,dt,ut);return}i.bindTexture(g.TEXTURE_3D,Rt.__webglTexture,g.TEXTURE0+ut)}function X(dt,ut){const Rt=x.get(dt);if(dt.version>0&&Rt.__version!==dt.version){H(Rt,dt,ut);return}i.bindTexture(g.TEXTURE_CUBE_MAP,Rt.__webglTexture,g.TEXTURE0+ut)}const j={[Ad]:g.REPEAT,[$r]:g.CLAMP_TO_EDGE,[Pd]:g.MIRRORED_REPEAT},Q={[rr]:g.NEAREST,[Cm]:g.NEAREST_MIPMAP_NEAREST,[du]:g.NEAREST_MIPMAP_LINEAR,[Bn]:g.LINEAR,[dd]:g.LINEAR_MIPMAP_NEAREST,[Bo]:g.LINEAR_MIPMAP_LINEAR},tt={[l2]:g.NEVER,[p2]:g.ALWAYS,[h2]:g.LESS,[y1]:g.LEQUAL,[u2]:g.EQUAL,[d2]:g.GEQUAL,[f2]:g.GREATER,[c2]:g.NOTEQUAL};function Y(dt,ut,Rt){if(ut.type===Ma&&t.has("OES_texture_float_linear")===!1&&(ut.magFilter===Bn||ut.magFilter===dd||ut.magFilter===du||ut.magFilter===Bo||ut.minFilter===Bn||ut.minFilter===dd||ut.minFilter===du||ut.minFilter===Bo)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),Rt?(g.texParameteri(dt,g.TEXTURE_WRAP_S,j[ut.wrapS]),g.texParameteri(dt,g.TEXTURE_WRAP_T,j[ut.wrapT]),(dt===g.TEXTURE_3D||dt===g.TEXTURE_2D_ARRAY)&&g.texParameteri(dt,g.TEXTURE_WRAP_R,j[ut.wrapR]),g.texParameteri(dt,g.TEXTURE_MAG_FILTER,Q[ut.magFilter]),g.texParameteri(dt,g.TEXTURE_MIN_FILTER,Q[ut.minFilter])):(g.texParameteri(dt,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(dt,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),(dt===g.TEXTURE_3D||dt===g.TEXTURE_2D_ARRAY)&&g.texParameteri(dt,g.TEXTURE_WRAP_R,g.CLAMP_TO_EDGE),(ut.wrapS!==$r||ut.wrapT!==$r)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),g.texParameteri(dt,g.TEXTURE_MAG_FILTER,S(ut.magFilter)),g.texParameteri(dt,g.TEXTURE_MIN_FILTER,S(ut.minFilter)),ut.minFilter!==rr&&ut.minFilter!==Bn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),ut.compareFunction&&(g.texParameteri(dt,g.TEXTURE_COMPARE_MODE,g.COMPARE_REF_TO_TEXTURE),g.texParameteri(dt,g.TEXTURE_COMPARE_FUNC,tt[ut.compareFunction])),t.has("EXT_texture_filter_anisotropic")===!0){const Dt=t.get("EXT_texture_filter_anisotropic");if(ut.magFilter===rr||ut.minFilter!==du&&ut.minFilter!==Bo||ut.type===Ma&&t.has("OES_texture_float_linear")===!1||y===!1&&ut.type===_f&&t.has("OES_texture_half_float_linear")===!1)return;(ut.anisotropy>1||x.get(ut).__currentAnisotropy)&&(g.texParameterf(dt,Dt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(ut.anisotropy,T.getMaxAnisotropy())),x.get(ut).__currentAnisotropy=ut.anisotropy)}}function Z(dt,ut){let Rt=!1;dt.__webglInit===void 0&&(dt.__webglInit=!0,ut.addEventListener("dispose",M));const Dt=ut.source;let Ht=a.get(Dt);Ht===void 0&&(Ht={},a.set(Dt,Ht));const Bt=D(ut);if(Bt!==dt.__cacheKey){Ht[Bt]===void 0&&(Ht[Bt]={texture:g.createTexture(),usedTimes:0},s.memory.textures++,Rt=!0),Ht[Bt].usedTimes++;const re=Ht[dt.__cacheKey];re!==void 0&&(Ht[dt.__cacheKey].usedTimes--,re.usedTimes===0&&A(ut)),dt.__cacheKey=Bt,dt.__webglTexture=Ht[Bt].texture}return Rt}function U(dt,ut,Rt){let Dt=g.TEXTURE_2D;(ut.isDataArrayTexture||ut.isCompressedArrayTexture)&&(Dt=g.TEXTURE_2D_ARRAY),ut.isData3DTexture&&(Dt=g.TEXTURE_3D);const Ht=Z(dt,ut),Bt=ut.source;i.bindTexture(Dt,dt.__webglTexture,g.TEXTURE0+Rt);const re=x.get(Bt);if(Bt.version!==re.__version||Ht===!0){i.activeTexture(g.TEXTURE0+Rt);const le=sn.getPrimaries(sn.workingColorSpace),ge=ut.colorSpace===ia?null:sn.getPrimaries(ut.colorSpace),xe=ut.colorSpace===ia||le===ge?g.NONE:g.BROWSER_DEFAULT_WEBGL;g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,ut.flipY),g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ut.premultiplyAlpha),g.pixelStorei(g.UNPACK_ALIGNMENT,ut.unpackAlignment),g.pixelStorei(g.UNPACK_COLORSPACE_CONVERSION_WEBGL,xe);const Pe=o(ut)&&f(ut.image)===!1;let te=u(ut.image,Pe,!1,T.maxTextureSize);te=Vt(ut,te);const Ge=f(te)||y,Oe=E.convert(ut.format,ut.colorSpace);let Be=E.convert(ut.type),Le=v(ut.internalFormat,Oe,Be,ut.colorSpace,ut.isVideoTexture);Y(Dt,ut,Ge);let ne;const je=ut.mipmaps,si=y&&ut.isVideoTexture!==!0&&Le!==v1,Mi=re.__version===void 0||Ht===!0,he=Bt.dataReady,Ti=m(ut,te,Ge);if(ut.isDepthTexture)Le=g.DEPTH_COMPONENT,y?ut.type===Ma?Le=g.DEPTH_COMPONENT32F:ut.type===El?Le=g.DEPTH_COMPONENT24:ut.type===dh?Le=g.DEPTH24_STENCIL8:Le=g.DEPTH_COMPONENT16:ut.type===Ma&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),ut.format===ph&&Le===g.DEPTH_COMPONENT&&ut.type!==ug&&ut.type!==El&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),ut.type=El,Be=E.convert(ut.type)),ut.format===bu&&Le===g.DEPTH_COMPONENT&&(Le=g.DEPTH_STENCIL,ut.type!==dh&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),ut.type=dh,Be=E.convert(ut.type))),Mi&&(si?i.texStorage2D(g.TEXTURE_2D,1,Le,te.width,te.height):i.texImage2D(g.TEXTURE_2D,0,Le,te.width,te.height,0,Oe,Be,null));else if(ut.isDataTexture)if(je.length>0&&Ge){si&&Mi&&i.texStorage2D(g.TEXTURE_2D,Ti,Le,je[0].width,je[0].height);for(let bt=0,Me=je.length;bt>=1,Me>>=1}}else if(je.length>0&&Ge){si&&Mi&&i.texStorage2D(g.TEXTURE_2D,Ti,Le,je[0].width,je[0].height);for(let bt=0,Me=je.length;bt0&&he++,i.texStorage2D(g.TEXTURE_CUBE_MAP,he,ne,te[0].width,te[0].height));for(let bt=0;bt<6;bt++)if(Pe){je?Mi&&i.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+bt,0,0,0,te[bt].width,te[bt].height,Be,Le,te[bt].data):i.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+bt,0,ne,te[bt].width,te[bt].height,0,Be,Le,te[bt].data);for(let Me=0;Me>Bt),te=Math.max(1,ut.height>>Bt);Ht===g.TEXTURE_3D||Ht===g.TEXTURE_2D_ARRAY?i.texImage3D(Ht,Bt,ge,Pe,te,ut.depth,0,re,le,null):i.texImage2D(Ht,Bt,ge,Pe,te,0,re,le,null)}i.bindFramebuffer(g.FRAMEBUFFER,dt),At(ut)?e.framebufferTexture2DMultisampleEXT(g.FRAMEBUFFER,Dt,Ht,x.get(Rt).__webglTexture,0,Et(ut)):(Ht===g.TEXTURE_2D||Ht>=g.TEXTURE_CUBE_MAP_POSITIVE_X&&Ht<=g.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&g.framebufferTexture2D(g.FRAMEBUFFER,Dt,Ht,x.get(Rt).__webglTexture,Bt),i.bindFramebuffer(g.FRAMEBUFFER,null)}function _(dt,ut,Rt){if(g.bindRenderbuffer(g.RENDERBUFFER,dt),ut.depthBuffer&&!ut.stencilBuffer){let Dt=y===!0?g.DEPTH_COMPONENT24:g.DEPTH_COMPONENT16;if(Rt||At(ut)){const Ht=ut.depthTexture;Ht&&Ht.isDepthTexture&&(Ht.type===Ma?Dt=g.DEPTH_COMPONENT32F:Ht.type===El&&(Dt=g.DEPTH_COMPONENT24));const Bt=Et(ut);At(ut)?e.renderbufferStorageMultisampleEXT(g.RENDERBUFFER,Bt,Dt,ut.width,ut.height):g.renderbufferStorageMultisample(g.RENDERBUFFER,Bt,Dt,ut.width,ut.height)}else g.renderbufferStorage(g.RENDERBUFFER,Dt,ut.width,ut.height);g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_ATTACHMENT,g.RENDERBUFFER,dt)}else if(ut.depthBuffer&&ut.stencilBuffer){const Dt=Et(ut);Rt&&At(ut)===!1?g.renderbufferStorageMultisample(g.RENDERBUFFER,Dt,g.DEPTH24_STENCIL8,ut.width,ut.height):At(ut)?e.renderbufferStorageMultisampleEXT(g.RENDERBUFFER,Dt,g.DEPTH24_STENCIL8,ut.width,ut.height):g.renderbufferStorage(g.RENDERBUFFER,g.DEPTH_STENCIL,ut.width,ut.height),g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_STENCIL_ATTACHMENT,g.RENDERBUFFER,dt)}else{const Dt=ut.isWebGLMultipleRenderTargets===!0?ut.texture:[ut.texture];for(let Ht=0;Ht0){Rt.__webglFramebuffer[le]=[];for(let ge=0;ge0){Rt.__webglFramebuffer=[];for(let le=0;le0&&At(dt)===!1){const le=Bt?ut:[ut];Rt.__webglMultisampledFramebuffer=g.createFramebuffer(),Rt.__webglColorRenderbuffer=[],i.bindFramebuffer(g.FRAMEBUFFER,Rt.__webglMultisampledFramebuffer);for(let ge=0;ge0)for(let ge=0;ge0)for(let ge=0;ge0&&At(dt)===!1){const ut=dt.isWebGLMultipleRenderTargets?dt.texture:[dt.texture],Rt=dt.width,Dt=dt.height;let Ht=g.COLOR_BUFFER_BIT;const Bt=[],re=dt.stencilBuffer?g.DEPTH_STENCIL_ATTACHMENT:g.DEPTH_ATTACHMENT,le=x.get(dt),ge=dt.isWebGLMultipleRenderTargets===!0;if(ge)for(let xe=0;xe0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&ut.__useRenderToTexture!==!1}function Pt(dt){const ut=s.render.frame;p.get(dt)!==ut&&(p.set(dt,ut),dt.update())}function Vt(dt,ut){const Rt=dt.colorSpace,Dt=dt.format,Ht=dt.type;return dt.isCompressedTexture===!0||dt.isVideoTexture===!0||dt.format===wm||Rt!==Ho&&Rt!==ia&&(sn.getTransfer(Rt)===mn?y===!1?t.has("EXT_sRGB")===!0&&Dt===vs?(dt.format=wm,dt.minFilter=Bn,dt.generateMipmaps=!1):ut=S1.sRGBToLinear(ut):(Dt!==vs||Ht!==Go)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Rt)),ut}this.allocateTextureUnit=I,this.resetTextureUnits=O,this.setTexture2D=B,this.setTexture2DArray=G,this.setTexture3D=z,this.setTextureCube=X,this.rebindTextures=ot,this.setupRenderTarget=rt,this.updateRenderTargetMipmap=gt,this.updateMultisampleRenderTarget=yt,this.setupDepthRenderbuffer=at,this.setupFrameBufferTexture=J,this.useMultisampledRTT=At}function b2(g,t,i){const x=i.isWebGL2;function T(E,s=ia){let y;const e=sn.getTransfer(s);if(E===Go)return g.UNSIGNED_BYTE;if(E===u1)return g.UNSIGNED_SHORT_4_4_4_4;if(E===f1)return g.UNSIGNED_SHORT_5_5_5_1;if(E===Zw)return g.BYTE;if(E===Jw)return g.SHORT;if(E===ug)return g.UNSIGNED_SHORT;if(E===h1)return g.INT;if(E===El)return g.UNSIGNED_INT;if(E===Ma)return g.FLOAT;if(E===_f)return x?g.HALF_FLOAT:(y=t.get("OES_texture_half_float"),y!==null?y.HALF_FLOAT_OES:null);if(E===$w)return g.ALPHA;if(E===vs)return g.RGBA;if(E===Qw)return g.LUMINANCE;if(E===_w)return g.LUMINANCE_ALPHA;if(E===ph)return g.DEPTH_COMPONENT;if(E===bu)return g.DEPTH_STENCIL;if(E===wm)return y=t.get("EXT_sRGB"),y!==null?y.SRGB_ALPHA_EXT:null;if(E===qw)return g.RED;if(E===c1)return g.RED_INTEGER;if(E===t2)return g.RG;if(E===d1)return g.RG_INTEGER;if(E===p1)return g.RGBA_INTEGER;if(E===sm||E===am||E===om||E===lm)if(e===mn)if(y=t.get("WEBGL_compressed_texture_s3tc_srgb"),y!==null){if(E===sm)return y.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(E===am)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(E===om)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(E===lm)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(y=t.get("WEBGL_compressed_texture_s3tc"),y!==null){if(E===sm)return y.COMPRESSED_RGB_S3TC_DXT1_EXT;if(E===am)return y.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(E===om)return y.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(E===lm)return y.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(E===Ky||E===Zy||E===Jy||E===$y)if(y=t.get("WEBGL_compressed_texture_pvrtc"),y!==null){if(E===Ky)return y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(E===Zy)return y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(E===Jy)return y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(E===$y)return y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(E===v1)return y=t.get("WEBGL_compressed_texture_etc1"),y!==null?y.COMPRESSED_RGB_ETC1_WEBGL:null;if(E===Qy||E===_y)if(y=t.get("WEBGL_compressed_texture_etc"),y!==null){if(E===Qy)return e===mn?y.COMPRESSED_SRGB8_ETC2:y.COMPRESSED_RGB8_ETC2;if(E===_y)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:y.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(E===qy||E===tx||E===ex||E===ix||E===nx||E===rx||E===sx||E===ax||E===ox||E===lx||E===hx||E===ux||E===fx||E===cx)if(y=t.get("WEBGL_compressed_texture_astc"),y!==null){if(E===qy)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:y.COMPRESSED_RGBA_ASTC_4x4_KHR;if(E===tx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:y.COMPRESSED_RGBA_ASTC_5x4_KHR;if(E===ex)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:y.COMPRESSED_RGBA_ASTC_5x5_KHR;if(E===ix)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:y.COMPRESSED_RGBA_ASTC_6x5_KHR;if(E===nx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:y.COMPRESSED_RGBA_ASTC_6x6_KHR;if(E===rx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:y.COMPRESSED_RGBA_ASTC_8x5_KHR;if(E===sx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:y.COMPRESSED_RGBA_ASTC_8x6_KHR;if(E===ax)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:y.COMPRESSED_RGBA_ASTC_8x8_KHR;if(E===ox)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:y.COMPRESSED_RGBA_ASTC_10x5_KHR;if(E===lx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:y.COMPRESSED_RGBA_ASTC_10x6_KHR;if(E===hx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:y.COMPRESSED_RGBA_ASTC_10x8_KHR;if(E===ux)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:y.COMPRESSED_RGBA_ASTC_10x10_KHR;if(E===fx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:y.COMPRESSED_RGBA_ASTC_12x10_KHR;if(E===cx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:y.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(E===hm||E===dx||E===px)if(y=t.get("EXT_texture_compression_bptc"),y!==null){if(E===hm)return e===mn?y.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:y.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(E===dx)return y.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(E===px)return y.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(E===e2||E===vx||E===mx||E===gx)if(y=t.get("EXT_texture_compression_rgtc"),y!==null){if(E===hm)return y.COMPRESSED_RED_RGTC1_EXT;if(E===vx)return y.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(E===mx)return y.COMPRESSED_RED_GREEN_RGTC2_EXT;if(E===gx)return y.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return E===dh?x?g.UNSIGNED_INT_24_8:(y=t.get("WEBGL_depth_texture"),y!==null?y.UNSIGNED_INT_24_8_WEBGL:null):g[E]!==void 0?g[E]:null}return{convert:T}}class L2 extends Dr{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}}class Wf extends ki{constructor(){super(),this.isGroup=!0,this.type="Group"}}const Q6={type:"move"};class j0{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Wf,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Wf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ct,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ct),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Wf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ct,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ct),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const i=this._hand;if(i)for(const x of t.hand.values())this._getHandJoint(i,x)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,i,x){let T=null,E=null,s=null;const y=this._targetRay,e=this._grip,r=this._hand;if(t&&i.session.visibilityState!=="visible-blurred"){if(r&&t.hand){s=!0;for(const u of t.hand.values()){const f=i.getJointPose(u,x),o=this._getHandJoint(r,u);f!==null&&(o.matrix.fromArray(f.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,o.jointRadius=f.radius),o.visible=f!==null}const p=r.joints["index-finger-tip"],h=r.joints["thumb-tip"],a=p.position.distanceTo(h.position),l=.02,n=.005;r.inputState.pinching&&a>l+n?(r.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!r.inputState.pinching&&a<=l-n&&(r.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else e!==null&&t.gripSpace&&(E=i.getPose(t.gripSpace,x),E!==null&&(e.matrix.fromArray(E.transform.matrix),e.matrix.decompose(e.position,e.rotation,e.scale),e.matrixWorldNeedsUpdate=!0,E.linearVelocity?(e.hasLinearVelocity=!0,e.linearVelocity.copy(E.linearVelocity)):e.hasLinearVelocity=!1,E.angularVelocity?(e.hasAngularVelocity=!0,e.angularVelocity.copy(E.angularVelocity)):e.hasAngularVelocity=!1));y!==null&&(T=i.getPose(t.targetRaySpace,x),T===null&&E!==null&&(T=E),T!==null&&(y.matrix.fromArray(T.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,T.linearVelocity?(y.hasLinearVelocity=!0,y.linearVelocity.copy(T.linearVelocity)):y.hasLinearVelocity=!1,T.angularVelocity?(y.hasAngularVelocity=!0,y.angularVelocity.copy(T.angularVelocity)):y.hasAngularVelocity=!1,this.dispatchEvent(Q6)))}return y!==null&&(y.visible=T!==null),e!==null&&(e.visible=E!==null),r!==null&&(r.visible=s!==null),this}_getHandJoint(t,i){if(t.joints[i.jointName]===void 0){const x=new Wf;x.matrixAutoUpdate=!1,x.visible=!1,t.joints[i.jointName]=x,t.add(x)}return t.joints[i.jointName]}}const _6=` +}`;function Z6(g,t,i){let x=new ip;const T=new ve,E=new ve,s=new an,y=new A1({depthPacking:a2}),e=new P1,r={},p=i.maxTextureSize,h={[Al]:gs,[gs]:Al,[Io]:Io},a=new so({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ve},radius:{value:4}},vertexShader:j6,fragmentShader:K6}),l=a.clone();l.defines.HORIZONTAL_PASS=1;const n=new Fi;n.setAttribute("position",new on(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const u=new dr(n,a),f=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=lg;let o=this.type;this.render=function(S,M,w){if(f.enabled===!1||f.autoUpdate===!1&&f.needsUpdate===!1||S.length===0)return;const C=g.getRenderTarget(),A=g.getActiveCubeFace(),P=g.getActiveMipmapLevel(),b=g.state;b.setBlending(wl),b.buffers.color.setClear(1,1,1,1),b.buffers.depth.setTest(!0),b.setScissorTest(!1);const O=o!==qa&&this.type===qa,I=o===qa&&this.type!==qa;for(let D=0,B=S.length;Dp||T.y>p)&&(T.x>p&&(E.x=Math.floor(p/X.x),T.x=E.x*X.x,z.mapSize.x=E.x),T.y>p&&(E.y=Math.floor(p/X.y),T.y=E.y*X.y,z.mapSize.y=E.y)),z.map===null||O===!0||I===!0){const Q=this.type!==qa?{minFilter:rr,magFilter:rr}:{};z.map!==null&&z.map.dispose(),z.map=new ro(T.x,T.y,Q),z.map.texture.name=G.name+".shadowMap",z.camera.updateProjectionMatrix()}g.setRenderTarget(z.map),g.clear();const j=z.getViewportCount();for(let Q=0;Q0||M.map&&M.alphaTest>0){const b=A.uuid,O=M.uuid;let I=r[b];I===void 0&&(I={},r[b]=I);let D=I[O];D===void 0&&(D=A.clone(),I[O]=D,M.addEventListener("dispose",m)),A=D}if(A.visible=M.visible,A.wireframe=M.wireframe,C===qa?A.side=M.shadowSide!==null?M.shadowSide:M.side:A.side=M.shadowSide!==null?M.shadowSide:h[M.side],A.alphaMap=M.alphaMap,A.alphaTest=M.alphaTest,A.map=M.map,A.clipShadows=M.clipShadows,A.clippingPlanes=M.clippingPlanes,A.clipIntersection=M.clipIntersection,A.displacementMap=M.displacementMap,A.displacementScale=M.displacementScale,A.displacementBias=M.displacementBias,A.wireframeLinewidth=M.wireframeLinewidth,A.linewidth=M.linewidth,w.isPointLight===!0&&A.isMeshDistanceMaterial===!0){const b=g.properties.get(A);b.light=w}return A}function v(S,M,w,C,A){if(S.visible===!1)return;if(S.layers.test(M.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&A===qa)&&(!S.frustumCulled||x.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(w.matrixWorldInverse,S.matrixWorld);const O=t.update(S),I=S.material;if(Array.isArray(I)){const D=O.groups;for(let B=0,G=D.length;B=1):j.indexOf("OpenGL ES")!==-1&&(X=parseFloat(/^OpenGL ES (\d)/.exec(j)[1]),z=X>=2);let Q=null,tt={};const Y=g.getParameter(g.SCISSOR_BOX),Z=g.getParameter(g.VIEWPORT),U=new an().fromArray(Y),H=new an().fromArray(Z);function J(bt,Ce,we,Ve){const Je=new Uint8Array(4),Gi=g.createTexture();g.bindTexture(bt,Gi),g.texParameteri(bt,g.TEXTURE_MIN_FILTER,g.NEAREST),g.texParameteri(bt,g.TEXTURE_MAG_FILTER,g.NEAREST);for(let Ii=0;Ii"u"?!1:/OculusBrowser/g.test(navigator.userAgent),p=new WeakMap;let h;const a=new WeakMap;let l=!1;try{l=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function n(dt,ut){return l?new OffscreenCanvas(dt,ut):Bd("canvas")}function u(dt,ut,Rt,Dt){let Ht=1;if((dt.width>Dt||dt.height>Dt)&&(Ht=Dt/Math.max(dt.width,dt.height)),Ht<1||ut===!0)if(typeof HTMLImageElement<"u"&&dt instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&dt instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&dt instanceof ImageBitmap){const Bt=ut?Am:Math.floor,re=Bt(Ht*dt.width),le=Bt(Ht*dt.height);h===void 0&&(h=n(re,le));const ge=Rt?n(re,le):h;return ge.width=re,ge.height=le,ge.getContext("2d").drawImage(dt,0,0,re,le),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+dt.width+"x"+dt.height+") to ("+re+"x"+le+")."),ge}else return"data"in dt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+dt.width+"x"+dt.height+")."),dt;return dt}function f(dt){return Sx(dt.width)&&Sx(dt.height)}function o(dt){return y?!1:dt.wrapS!==$r||dt.wrapT!==$r||dt.minFilter!==rr&&dt.minFilter!==Bn}function c(dt,ut){return dt.generateMipmaps&&ut&&dt.minFilter!==rr&&dt.minFilter!==Bn}function d(dt){g.generateMipmap(dt)}function v(dt,ut,Rt,Dt,Ht=!1){if(y===!1)return ut;if(dt!==null){if(g[dt]!==void 0)return g[dt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+dt+"'")}let Bt=ut;if(ut===g.RED&&(Rt===g.FLOAT&&(Bt=g.R32F),Rt===g.HALF_FLOAT&&(Bt=g.R16F),Rt===g.UNSIGNED_BYTE&&(Bt=g.R8)),ut===g.RED_INTEGER&&(Rt===g.UNSIGNED_BYTE&&(Bt=g.R8UI),Rt===g.UNSIGNED_SHORT&&(Bt=g.R16UI),Rt===g.UNSIGNED_INT&&(Bt=g.R32UI),Rt===g.BYTE&&(Bt=g.R8I),Rt===g.SHORT&&(Bt=g.R16I),Rt===g.INT&&(Bt=g.R32I)),ut===g.RG&&(Rt===g.FLOAT&&(Bt=g.RG32F),Rt===g.HALF_FLOAT&&(Bt=g.RG16F),Rt===g.UNSIGNED_BYTE&&(Bt=g.RG8)),ut===g.RGBA){const re=Ht?Fd:sn.getTransfer(Dt);Rt===g.FLOAT&&(Bt=g.RGBA32F),Rt===g.HALF_FLOAT&&(Bt=g.RGBA16F),Rt===g.UNSIGNED_BYTE&&(Bt=re===mn?g.SRGB8_ALPHA8:g.RGBA8),Rt===g.UNSIGNED_SHORT_4_4_4_4&&(Bt=g.RGBA4),Rt===g.UNSIGNED_SHORT_5_5_5_1&&(Bt=g.RGB5_A1)}return(Bt===g.R16F||Bt===g.R32F||Bt===g.RG16F||Bt===g.RG32F||Bt===g.RGBA16F||Bt===g.RGBA32F)&&t.get("EXT_color_buffer_float"),Bt}function m(dt,ut,Rt){return c(dt,Rt)===!0||dt.isFramebufferTexture&&dt.minFilter!==rr&&dt.minFilter!==Bn?Math.log2(Math.max(ut.width,ut.height))+1:dt.mipmaps!==void 0&&dt.mipmaps.length>0?dt.mipmaps.length:dt.isCompressedTexture&&Array.isArray(dt.image)?ut.mipmaps.length:1}function S(dt){return dt===rr||dt===Cm||dt===du?g.NEAREST:g.LINEAR}function M(dt){const ut=dt.target;ut.removeEventListener("dispose",M),C(ut),ut.isVideoTexture&&p.delete(ut)}function w(dt){const ut=dt.target;ut.removeEventListener("dispose",w),P(ut)}function C(dt){const ut=x.get(dt);if(ut.__webglInit===void 0)return;const Rt=dt.source,Dt=a.get(Rt);if(Dt){const Ht=Dt[ut.__cacheKey];Ht.usedTimes--,Ht.usedTimes===0&&A(dt),Object.keys(Dt).length===0&&a.delete(Rt)}x.remove(dt)}function A(dt){const ut=x.get(dt);g.deleteTexture(ut.__webglTexture);const Rt=dt.source,Dt=a.get(Rt);delete Dt[ut.__cacheKey],s.memory.textures--}function P(dt){const ut=dt.texture,Rt=x.get(dt),Dt=x.get(ut);if(Dt.__webglTexture!==void 0&&(g.deleteTexture(Dt.__webglTexture),s.memory.textures--),dt.depthTexture&&dt.depthTexture.dispose(),dt.isWebGLCubeRenderTarget)for(let Ht=0;Ht<6;Ht++){if(Array.isArray(Rt.__webglFramebuffer[Ht]))for(let Bt=0;Bt=T.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+dt+" texture units while this GPU supports only "+T.maxTextures),b+=1,dt}function D(dt){const ut=[];return ut.push(dt.wrapS),ut.push(dt.wrapT),ut.push(dt.wrapR||0),ut.push(dt.magFilter),ut.push(dt.minFilter),ut.push(dt.anisotropy),ut.push(dt.internalFormat),ut.push(dt.format),ut.push(dt.type),ut.push(dt.generateMipmaps),ut.push(dt.premultiplyAlpha),ut.push(dt.flipY),ut.push(dt.unpackAlignment),ut.push(dt.colorSpace),ut.join()}function B(dt,ut){const Rt=x.get(dt);if(dt.isVideoTexture&&Pt(dt),dt.isRenderTargetTexture===!1&&dt.version>0&&Rt.__version!==dt.version){const Dt=dt.image;if(Dt===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Dt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{U(Rt,dt,ut);return}}i.bindTexture(g.TEXTURE_2D,Rt.__webglTexture,g.TEXTURE0+ut)}function G(dt,ut){const Rt=x.get(dt);if(dt.version>0&&Rt.__version!==dt.version){U(Rt,dt,ut);return}i.bindTexture(g.TEXTURE_2D_ARRAY,Rt.__webglTexture,g.TEXTURE0+ut)}function z(dt,ut){const Rt=x.get(dt);if(dt.version>0&&Rt.__version!==dt.version){U(Rt,dt,ut);return}i.bindTexture(g.TEXTURE_3D,Rt.__webglTexture,g.TEXTURE0+ut)}function X(dt,ut){const Rt=x.get(dt);if(dt.version>0&&Rt.__version!==dt.version){H(Rt,dt,ut);return}i.bindTexture(g.TEXTURE_CUBE_MAP,Rt.__webglTexture,g.TEXTURE0+ut)}const j={[Ad]:g.REPEAT,[$r]:g.CLAMP_TO_EDGE,[Pd]:g.MIRRORED_REPEAT},Q={[rr]:g.NEAREST,[Cm]:g.NEAREST_MIPMAP_NEAREST,[du]:g.NEAREST_MIPMAP_LINEAR,[Bn]:g.LINEAR,[dd]:g.LINEAR_MIPMAP_NEAREST,[Bo]:g.LINEAR_MIPMAP_LINEAR},tt={[l2]:g.NEVER,[p2]:g.ALWAYS,[h2]:g.LESS,[y1]:g.LEQUAL,[u2]:g.EQUAL,[d2]:g.GEQUAL,[f2]:g.GREATER,[c2]:g.NOTEQUAL};function Y(dt,ut,Rt){if(ut.type===Ma&&t.has("OES_texture_float_linear")===!1&&(ut.magFilter===Bn||ut.magFilter===dd||ut.magFilter===du||ut.magFilter===Bo||ut.minFilter===Bn||ut.minFilter===dd||ut.minFilter===du||ut.minFilter===Bo)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),Rt?(g.texParameteri(dt,g.TEXTURE_WRAP_S,j[ut.wrapS]),g.texParameteri(dt,g.TEXTURE_WRAP_T,j[ut.wrapT]),(dt===g.TEXTURE_3D||dt===g.TEXTURE_2D_ARRAY)&&g.texParameteri(dt,g.TEXTURE_WRAP_R,j[ut.wrapR]),g.texParameteri(dt,g.TEXTURE_MAG_FILTER,Q[ut.magFilter]),g.texParameteri(dt,g.TEXTURE_MIN_FILTER,Q[ut.minFilter])):(g.texParameteri(dt,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(dt,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),(dt===g.TEXTURE_3D||dt===g.TEXTURE_2D_ARRAY)&&g.texParameteri(dt,g.TEXTURE_WRAP_R,g.CLAMP_TO_EDGE),(ut.wrapS!==$r||ut.wrapT!==$r)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),g.texParameteri(dt,g.TEXTURE_MAG_FILTER,S(ut.magFilter)),g.texParameteri(dt,g.TEXTURE_MIN_FILTER,S(ut.minFilter)),ut.minFilter!==rr&&ut.minFilter!==Bn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),ut.compareFunction&&(g.texParameteri(dt,g.TEXTURE_COMPARE_MODE,g.COMPARE_REF_TO_TEXTURE),g.texParameteri(dt,g.TEXTURE_COMPARE_FUNC,tt[ut.compareFunction])),t.has("EXT_texture_filter_anisotropic")===!0){const Dt=t.get("EXT_texture_filter_anisotropic");if(ut.magFilter===rr||ut.minFilter!==du&&ut.minFilter!==Bo||ut.type===Ma&&t.has("OES_texture_float_linear")===!1||y===!1&&ut.type===qf&&t.has("OES_texture_half_float_linear")===!1)return;(ut.anisotropy>1||x.get(ut).__currentAnisotropy)&&(g.texParameterf(dt,Dt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(ut.anisotropy,T.getMaxAnisotropy())),x.get(ut).__currentAnisotropy=ut.anisotropy)}}function Z(dt,ut){let Rt=!1;dt.__webglInit===void 0&&(dt.__webglInit=!0,ut.addEventListener("dispose",M));const Dt=ut.source;let Ht=a.get(Dt);Ht===void 0&&(Ht={},a.set(Dt,Ht));const Bt=D(ut);if(Bt!==dt.__cacheKey){Ht[Bt]===void 0&&(Ht[Bt]={texture:g.createTexture(),usedTimes:0},s.memory.textures++,Rt=!0),Ht[Bt].usedTimes++;const re=Ht[dt.__cacheKey];re!==void 0&&(Ht[dt.__cacheKey].usedTimes--,re.usedTimes===0&&A(ut)),dt.__cacheKey=Bt,dt.__webglTexture=Ht[Bt].texture}return Rt}function U(dt,ut,Rt){let Dt=g.TEXTURE_2D;(ut.isDataArrayTexture||ut.isCompressedArrayTexture)&&(Dt=g.TEXTURE_2D_ARRAY),ut.isData3DTexture&&(Dt=g.TEXTURE_3D);const Ht=Z(dt,ut),Bt=ut.source;i.bindTexture(Dt,dt.__webglTexture,g.TEXTURE0+Rt);const re=x.get(Bt);if(Bt.version!==re.__version||Ht===!0){i.activeTexture(g.TEXTURE0+Rt);const le=sn.getPrimaries(sn.workingColorSpace),ge=ut.colorSpace===ia?null:sn.getPrimaries(ut.colorSpace),xe=ut.colorSpace===ia||le===ge?g.NONE:g.BROWSER_DEFAULT_WEBGL;g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,ut.flipY),g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ut.premultiplyAlpha),g.pixelStorei(g.UNPACK_ALIGNMENT,ut.unpackAlignment),g.pixelStorei(g.UNPACK_COLORSPACE_CONVERSION_WEBGL,xe);const Pe=o(ut)&&f(ut.image)===!1;let te=u(ut.image,Pe,!1,T.maxTextureSize);te=Vt(ut,te);const Ge=f(te)||y,Oe=E.convert(ut.format,ut.colorSpace);let Be=E.convert(ut.type),Le=v(ut.internalFormat,Oe,Be,ut.colorSpace,ut.isVideoTexture);Y(Dt,ut,Ge);let ne;const je=ut.mipmaps,si=y&&ut.isVideoTexture!==!0&&Le!==v1,Mi=re.__version===void 0||Ht===!0,he=Bt.dataReady,Ti=m(ut,te,Ge);if(ut.isDepthTexture)Le=g.DEPTH_COMPONENT,y?ut.type===Ma?Le=g.DEPTH_COMPONENT32F:ut.type===El?Le=g.DEPTH_COMPONENT24:ut.type===dh?Le=g.DEPTH24_STENCIL8:Le=g.DEPTH_COMPONENT16:ut.type===Ma&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),ut.format===ph&&Le===g.DEPTH_COMPONENT&&ut.type!==ug&&ut.type!==El&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),ut.type=El,Be=E.convert(ut.type)),ut.format===bu&&Le===g.DEPTH_COMPONENT&&(Le=g.DEPTH_STENCIL,ut.type!==dh&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),ut.type=dh,Be=E.convert(ut.type))),Mi&&(si?i.texStorage2D(g.TEXTURE_2D,1,Le,te.width,te.height):i.texImage2D(g.TEXTURE_2D,0,Le,te.width,te.height,0,Oe,Be,null));else if(ut.isDataTexture)if(je.length>0&&Ge){si&&Mi&&i.texStorage2D(g.TEXTURE_2D,Ti,Le,je[0].width,je[0].height);for(let bt=0,Ce=je.length;bt>=1,Ce>>=1}}else if(je.length>0&&Ge){si&&Mi&&i.texStorage2D(g.TEXTURE_2D,Ti,Le,je[0].width,je[0].height);for(let bt=0,Ce=je.length;bt0&&he++,i.texStorage2D(g.TEXTURE_CUBE_MAP,he,ne,te[0].width,te[0].height));for(let bt=0;bt<6;bt++)if(Pe){je?Mi&&i.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+bt,0,0,0,te[bt].width,te[bt].height,Be,Le,te[bt].data):i.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+bt,0,ne,te[bt].width,te[bt].height,0,Be,Le,te[bt].data);for(let Ce=0;Ce>Bt),te=Math.max(1,ut.height>>Bt);Ht===g.TEXTURE_3D||Ht===g.TEXTURE_2D_ARRAY?i.texImage3D(Ht,Bt,ge,Pe,te,ut.depth,0,re,le,null):i.texImage2D(Ht,Bt,ge,Pe,te,0,re,le,null)}i.bindFramebuffer(g.FRAMEBUFFER,dt),At(ut)?e.framebufferTexture2DMultisampleEXT(g.FRAMEBUFFER,Dt,Ht,x.get(Rt).__webglTexture,0,Et(ut)):(Ht===g.TEXTURE_2D||Ht>=g.TEXTURE_CUBE_MAP_POSITIVE_X&&Ht<=g.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&g.framebufferTexture2D(g.FRAMEBUFFER,Dt,Ht,x.get(Rt).__webglTexture,Bt),i.bindFramebuffer(g.FRAMEBUFFER,null)}function _(dt,ut,Rt){if(g.bindRenderbuffer(g.RENDERBUFFER,dt),ut.depthBuffer&&!ut.stencilBuffer){let Dt=y===!0?g.DEPTH_COMPONENT24:g.DEPTH_COMPONENT16;if(Rt||At(ut)){const Ht=ut.depthTexture;Ht&&Ht.isDepthTexture&&(Ht.type===Ma?Dt=g.DEPTH_COMPONENT32F:Ht.type===El&&(Dt=g.DEPTH_COMPONENT24));const Bt=Et(ut);At(ut)?e.renderbufferStorageMultisampleEXT(g.RENDERBUFFER,Bt,Dt,ut.width,ut.height):g.renderbufferStorageMultisample(g.RENDERBUFFER,Bt,Dt,ut.width,ut.height)}else g.renderbufferStorage(g.RENDERBUFFER,Dt,ut.width,ut.height);g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_ATTACHMENT,g.RENDERBUFFER,dt)}else if(ut.depthBuffer&&ut.stencilBuffer){const Dt=Et(ut);Rt&&At(ut)===!1?g.renderbufferStorageMultisample(g.RENDERBUFFER,Dt,g.DEPTH24_STENCIL8,ut.width,ut.height):At(ut)?e.renderbufferStorageMultisampleEXT(g.RENDERBUFFER,Dt,g.DEPTH24_STENCIL8,ut.width,ut.height):g.renderbufferStorage(g.RENDERBUFFER,g.DEPTH_STENCIL,ut.width,ut.height),g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_STENCIL_ATTACHMENT,g.RENDERBUFFER,dt)}else{const Dt=ut.isWebGLMultipleRenderTargets===!0?ut.texture:[ut.texture];for(let Ht=0;Ht0){Rt.__webglFramebuffer[le]=[];for(let ge=0;ge0){Rt.__webglFramebuffer=[];for(let le=0;le0&&At(dt)===!1){const le=Bt?ut:[ut];Rt.__webglMultisampledFramebuffer=g.createFramebuffer(),Rt.__webglColorRenderbuffer=[],i.bindFramebuffer(g.FRAMEBUFFER,Rt.__webglMultisampledFramebuffer);for(let ge=0;ge0)for(let ge=0;ge0)for(let ge=0;ge0&&At(dt)===!1){const ut=dt.isWebGLMultipleRenderTargets?dt.texture:[dt.texture],Rt=dt.width,Dt=dt.height;let Ht=g.COLOR_BUFFER_BIT;const Bt=[],re=dt.stencilBuffer?g.DEPTH_STENCIL_ATTACHMENT:g.DEPTH_ATTACHMENT,le=x.get(dt),ge=dt.isWebGLMultipleRenderTargets===!0;if(ge)for(let xe=0;xe0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&ut.__useRenderToTexture!==!1}function Pt(dt){const ut=s.render.frame;p.get(dt)!==ut&&(p.set(dt,ut),dt.update())}function Vt(dt,ut){const Rt=dt.colorSpace,Dt=dt.format,Ht=dt.type;return dt.isCompressedTexture===!0||dt.isVideoTexture===!0||dt.format===wm||Rt!==Ho&&Rt!==ia&&(sn.getTransfer(Rt)===mn?y===!1?t.has("EXT_sRGB")===!0&&Dt===vs?(dt.format=wm,dt.minFilter=Bn,dt.generateMipmaps=!1):ut=S1.sRGBToLinear(ut):(Dt!==vs||Ht!==Go)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Rt)),ut}this.allocateTextureUnit=I,this.resetTextureUnits=O,this.setTexture2D=B,this.setTexture2DArray=G,this.setTexture3D=z,this.setTextureCube=X,this.rebindTextures=ot,this.setupRenderTarget=rt,this.updateRenderTargetMipmap=gt,this.updateMultisampleRenderTarget=yt,this.setupDepthRenderbuffer=at,this.setupFrameBufferTexture=J,this.useMultisampledRTT=At}function b2(g,t,i){const x=i.isWebGL2;function T(E,s=ia){let y;const e=sn.getTransfer(s);if(E===Go)return g.UNSIGNED_BYTE;if(E===u1)return g.UNSIGNED_SHORT_4_4_4_4;if(E===f1)return g.UNSIGNED_SHORT_5_5_5_1;if(E===Zw)return g.BYTE;if(E===Jw)return g.SHORT;if(E===ug)return g.UNSIGNED_SHORT;if(E===h1)return g.INT;if(E===El)return g.UNSIGNED_INT;if(E===Ma)return g.FLOAT;if(E===qf)return x?g.HALF_FLOAT:(y=t.get("OES_texture_half_float"),y!==null?y.HALF_FLOAT_OES:null);if(E===$w)return g.ALPHA;if(E===vs)return g.RGBA;if(E===Qw)return g.LUMINANCE;if(E===_w)return g.LUMINANCE_ALPHA;if(E===ph)return g.DEPTH_COMPONENT;if(E===bu)return g.DEPTH_STENCIL;if(E===wm)return y=t.get("EXT_sRGB"),y!==null?y.SRGB_ALPHA_EXT:null;if(E===qw)return g.RED;if(E===c1)return g.RED_INTEGER;if(E===t2)return g.RG;if(E===d1)return g.RG_INTEGER;if(E===p1)return g.RGBA_INTEGER;if(E===sm||E===am||E===om||E===lm)if(e===mn)if(y=t.get("WEBGL_compressed_texture_s3tc_srgb"),y!==null){if(E===sm)return y.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(E===am)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(E===om)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(E===lm)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(y=t.get("WEBGL_compressed_texture_s3tc"),y!==null){if(E===sm)return y.COMPRESSED_RGB_S3TC_DXT1_EXT;if(E===am)return y.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(E===om)return y.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(E===lm)return y.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(E===Ky||E===Zy||E===Jy||E===$y)if(y=t.get("WEBGL_compressed_texture_pvrtc"),y!==null){if(E===Ky)return y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(E===Zy)return y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(E===Jy)return y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(E===$y)return y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(E===v1)return y=t.get("WEBGL_compressed_texture_etc1"),y!==null?y.COMPRESSED_RGB_ETC1_WEBGL:null;if(E===Qy||E===_y)if(y=t.get("WEBGL_compressed_texture_etc"),y!==null){if(E===Qy)return e===mn?y.COMPRESSED_SRGB8_ETC2:y.COMPRESSED_RGB8_ETC2;if(E===_y)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:y.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(E===qy||E===tx||E===ex||E===ix||E===nx||E===rx||E===sx||E===ax||E===ox||E===lx||E===hx||E===ux||E===fx||E===cx)if(y=t.get("WEBGL_compressed_texture_astc"),y!==null){if(E===qy)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:y.COMPRESSED_RGBA_ASTC_4x4_KHR;if(E===tx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:y.COMPRESSED_RGBA_ASTC_5x4_KHR;if(E===ex)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:y.COMPRESSED_RGBA_ASTC_5x5_KHR;if(E===ix)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:y.COMPRESSED_RGBA_ASTC_6x5_KHR;if(E===nx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:y.COMPRESSED_RGBA_ASTC_6x6_KHR;if(E===rx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:y.COMPRESSED_RGBA_ASTC_8x5_KHR;if(E===sx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:y.COMPRESSED_RGBA_ASTC_8x6_KHR;if(E===ax)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:y.COMPRESSED_RGBA_ASTC_8x8_KHR;if(E===ox)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:y.COMPRESSED_RGBA_ASTC_10x5_KHR;if(E===lx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:y.COMPRESSED_RGBA_ASTC_10x6_KHR;if(E===hx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:y.COMPRESSED_RGBA_ASTC_10x8_KHR;if(E===ux)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:y.COMPRESSED_RGBA_ASTC_10x10_KHR;if(E===fx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:y.COMPRESSED_RGBA_ASTC_12x10_KHR;if(E===cx)return e===mn?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:y.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(E===hm||E===dx||E===px)if(y=t.get("EXT_texture_compression_bptc"),y!==null){if(E===hm)return e===mn?y.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:y.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(E===dx)return y.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(E===px)return y.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(E===e2||E===vx||E===mx||E===gx)if(y=t.get("EXT_texture_compression_rgtc"),y!==null){if(E===hm)return y.COMPRESSED_RED_RGTC1_EXT;if(E===vx)return y.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(E===mx)return y.COMPRESSED_RED_GREEN_RGTC2_EXT;if(E===gx)return y.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return E===dh?x?g.UNSIGNED_INT_24_8:(y=t.get("WEBGL_depth_texture"),y!==null?y.UNSIGNED_INT_24_8_WEBGL:null):g[E]!==void 0?g[E]:null}return{convert:T}}class L2 extends Dr{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}}class Xf extends ki{constructor(){super(),this.isGroup=!0,this.type="Group"}}const Q6={type:"move"};class j0{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Xf,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Xf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ct,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ct),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Xf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ct,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ct),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const i=this._hand;if(i)for(const x of t.hand.values())this._getHandJoint(i,x)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,i,x){let T=null,E=null,s=null;const y=this._targetRay,e=this._grip,r=this._hand;if(t&&i.session.visibilityState!=="visible-blurred"){if(r&&t.hand){s=!0;for(const u of t.hand.values()){const f=i.getJointPose(u,x),o=this._getHandJoint(r,u);f!==null&&(o.matrix.fromArray(f.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,o.jointRadius=f.radius),o.visible=f!==null}const p=r.joints["index-finger-tip"],h=r.joints["thumb-tip"],a=p.position.distanceTo(h.position),l=.02,n=.005;r.inputState.pinching&&a>l+n?(r.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!r.inputState.pinching&&a<=l-n&&(r.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else e!==null&&t.gripSpace&&(E=i.getPose(t.gripSpace,x),E!==null&&(e.matrix.fromArray(E.transform.matrix),e.matrix.decompose(e.position,e.rotation,e.scale),e.matrixWorldNeedsUpdate=!0,E.linearVelocity?(e.hasLinearVelocity=!0,e.linearVelocity.copy(E.linearVelocity)):e.hasLinearVelocity=!1,E.angularVelocity?(e.hasAngularVelocity=!0,e.angularVelocity.copy(E.angularVelocity)):e.hasAngularVelocity=!1));y!==null&&(T=i.getPose(t.targetRaySpace,x),T===null&&E!==null&&(T=E),T!==null&&(y.matrix.fromArray(T.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,T.linearVelocity?(y.hasLinearVelocity=!0,y.linearVelocity.copy(T.linearVelocity)):y.hasLinearVelocity=!1,T.angularVelocity?(y.hasAngularVelocity=!0,y.angularVelocity.copy(T.angularVelocity)):y.hasAngularVelocity=!1,this.dispatchEvent(Q6)))}return y!==null&&(y.visible=T!==null),e!==null&&(e.visible=E!==null),r!==null&&(r.visible=s!==null),this}_getHandJoint(t,i){if(t.joints[i.jointName]===void 0){const x=new Xf;x.matrixAutoUpdate=!1,x.visible=!1,t.joints[i.jointName]=x,t.add(x)}return t.joints[i.jointName]}}const _6=` void main() { gl_Position = vec4( position, 1.0 ); @@ -10165,7 +10165,7 @@ void main() { } -}`;class tU{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,i,x){if(this.texture===null){const T=new zn,E=t.properties.get(T);E.__webglTexture=i.texture,(i.depthNear!=x.depthNear||i.depthFar!=x.depthFar)&&(this.depthNear=i.depthNear,this.depthFar=i.depthFar),this.texture=T}}render(t,i){if(this.texture!==null){if(this.mesh===null){const x=i.cameras[0].viewport,T=new so({extensions:{fragDepth:!0},vertexShader:_6,fragmentShader:q6,uniforms:{depthColor:{value:this.texture},depthWidth:{value:x.z},depthHeight:{value:x.w}}});this.mesh=new dr(new oc(20,20),T)}t.render(this.mesh,i)}}reset(){this.texture=null,this.mesh=null}}class eU extends bl{constructor(t,i){super();const x=this;let T=null,E=1,s=null,y="local-floor",e=1,r=null,p=null,h=null,a=null,l=null,n=null;const u=new tU,f=i.getContextAttributes();let o=null,c=null;const d=[],v=[],m=new ve;let S=null;const M=new Dr;M.layers.enable(1),M.viewport=new an;const w=new Dr;w.layers.enable(2),w.viewport=new an;const C=[M,w],A=new L2;A.layers.enable(1),A.layers.enable(2);let P=null,b=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Z){let U=d[Z];return U===void 0&&(U=new j0,d[Z]=U),U.getTargetRaySpace()},this.getControllerGrip=function(Z){let U=d[Z];return U===void 0&&(U=new j0,d[Z]=U),U.getGripSpace()},this.getHand=function(Z){let U=d[Z];return U===void 0&&(U=new j0,d[Z]=U),U.getHandSpace()};function O(Z){const U=v.indexOf(Z.inputSource);if(U===-1)return;const H=d[U];H!==void 0&&(H.update(Z.inputSource,Z.frame,r||s),H.dispatchEvent({type:Z.type,data:Z.inputSource}))}function I(){T.removeEventListener("select",O),T.removeEventListener("selectstart",O),T.removeEventListener("selectend",O),T.removeEventListener("squeeze",O),T.removeEventListener("squeezestart",O),T.removeEventListener("squeezeend",O),T.removeEventListener("end",I),T.removeEventListener("inputsourceschange",D);for(let Z=0;Z=0&&(v[J]=null,d[J].disconnect(H))}for(let U=0;U=v.length){v.push(H),J=q;break}else if(v[q]===null){v[q]=H,J=q;break}if(J===-1)break}const _=d[J];_&&_.connect(H)}}const B=new Ct,G=new Ct;function z(Z,U,H){B.setFromMatrixPosition(U.matrixWorld),G.setFromMatrixPosition(H.matrixWorld);const J=B.distanceTo(G),_=U.projectionMatrix.elements,q=H.projectionMatrix.elements,at=_[14]/(_[10]-1),ot=_[14]/(_[10]+1),rt=(_[9]+1)/_[5],gt=(_[9]-1)/_[5],yt=(_[8]-1)/_[0],Et=(q[8]+1)/q[0],At=at*yt,Pt=at*Et,Vt=J/(-yt+Et),dt=Vt*-yt;U.matrixWorld.decompose(Z.position,Z.quaternion,Z.scale),Z.translateX(dt),Z.translateZ(Vt),Z.matrixWorld.compose(Z.position,Z.quaternion,Z.scale),Z.matrixWorldInverse.copy(Z.matrixWorld).invert();const ut=at+Vt,Rt=ot+Vt,Dt=At-dt,Ht=Pt+(J-dt),Bt=rt*ot/Rt*ut,re=gt*ot/Rt*ut;Z.projectionMatrix.makePerspective(Dt,Ht,Bt,re,ut,Rt),Z.projectionMatrixInverse.copy(Z.projectionMatrix).invert()}function X(Z,U){U===null?Z.matrixWorld.copy(Z.matrix):Z.matrixWorld.multiplyMatrices(U.matrixWorld,Z.matrix),Z.matrixWorldInverse.copy(Z.matrixWorld).invert()}this.updateCamera=function(Z){if(T===null)return;u.texture!==null&&(Z.near=u.depthNear,Z.far=u.depthFar),A.near=w.near=M.near=Z.near,A.far=w.far=M.far=Z.far,(P!==A.near||b!==A.far)&&(T.updateRenderState({depthNear:A.near,depthFar:A.far}),P=A.near,b=A.far,M.near=P,M.far=b,w.near=P,w.far=b,M.updateProjectionMatrix(),w.updateProjectionMatrix(),Z.updateProjectionMatrix());const U=Z.parent,H=A.cameras;X(A,U);for(let J=0;J0&&(f.alphaTest.value=o.alphaTest);const c=t.get(o).envMap;if(c&&(f.envMap.value=c,f.flipEnvMap.value=c.isCubeTexture&&c.isRenderTargetTexture===!1?-1:1,f.reflectivity.value=o.reflectivity,f.ior.value=o.ior,f.refractionRatio.value=o.refractionRatio),o.lightMap){f.lightMap.value=o.lightMap;const d=g._useLegacyLights===!0?Math.PI:1;f.lightMapIntensity.value=o.lightMapIntensity*d,i(o.lightMap,f.lightMapTransform)}o.aoMap&&(f.aoMap.value=o.aoMap,f.aoMapIntensity.value=o.aoMapIntensity,i(o.aoMap,f.aoMapTransform))}function s(f,o){f.diffuse.value.copy(o.color),f.opacity.value=o.opacity,o.map&&(f.map.value=o.map,i(o.map,f.mapTransform))}function y(f,o){f.dashSize.value=o.dashSize,f.totalSize.value=o.dashSize+o.gapSize,f.scale.value=o.scale}function e(f,o,c,d){f.diffuse.value.copy(o.color),f.opacity.value=o.opacity,f.size.value=o.size*c,f.scale.value=d*.5,o.map&&(f.map.value=o.map,i(o.map,f.uvTransform)),o.alphaMap&&(f.alphaMap.value=o.alphaMap,i(o.alphaMap,f.alphaMapTransform)),o.alphaTest>0&&(f.alphaTest.value=o.alphaTest)}function r(f,o){f.diffuse.value.copy(o.color),f.opacity.value=o.opacity,f.rotation.value=o.rotation,o.map&&(f.map.value=o.map,i(o.map,f.mapTransform)),o.alphaMap&&(f.alphaMap.value=o.alphaMap,i(o.alphaMap,f.alphaMapTransform)),o.alphaTest>0&&(f.alphaTest.value=o.alphaTest)}function p(f,o){f.specular.value.copy(o.specular),f.shininess.value=Math.max(o.shininess,1e-4)}function h(f,o){o.gradientMap&&(f.gradientMap.value=o.gradientMap)}function a(f,o){f.metalness.value=o.metalness,o.metalnessMap&&(f.metalnessMap.value=o.metalnessMap,i(o.metalnessMap,f.metalnessMapTransform)),f.roughness.value=o.roughness,o.roughnessMap&&(f.roughnessMap.value=o.roughnessMap,i(o.roughnessMap,f.roughnessMapTransform)),t.get(o).envMap&&(f.envMapIntensity.value=o.envMapIntensity)}function l(f,o,c){f.ior.value=o.ior,o.sheen>0&&(f.sheenColor.value.copy(o.sheenColor).multiplyScalar(o.sheen),f.sheenRoughness.value=o.sheenRoughness,o.sheenColorMap&&(f.sheenColorMap.value=o.sheenColorMap,i(o.sheenColorMap,f.sheenColorMapTransform)),o.sheenRoughnessMap&&(f.sheenRoughnessMap.value=o.sheenRoughnessMap,i(o.sheenRoughnessMap,f.sheenRoughnessMapTransform))),o.clearcoat>0&&(f.clearcoat.value=o.clearcoat,f.clearcoatRoughness.value=o.clearcoatRoughness,o.clearcoatMap&&(f.clearcoatMap.value=o.clearcoatMap,i(o.clearcoatMap,f.clearcoatMapTransform)),o.clearcoatRoughnessMap&&(f.clearcoatRoughnessMap.value=o.clearcoatRoughnessMap,i(o.clearcoatRoughnessMap,f.clearcoatRoughnessMapTransform)),o.clearcoatNormalMap&&(f.clearcoatNormalMap.value=o.clearcoatNormalMap,i(o.clearcoatNormalMap,f.clearcoatNormalMapTransform),f.clearcoatNormalScale.value.copy(o.clearcoatNormalScale),o.side===gs&&f.clearcoatNormalScale.value.negate())),o.iridescence>0&&(f.iridescence.value=o.iridescence,f.iridescenceIOR.value=o.iridescenceIOR,f.iridescenceThicknessMinimum.value=o.iridescenceThicknessRange[0],f.iridescenceThicknessMaximum.value=o.iridescenceThicknessRange[1],o.iridescenceMap&&(f.iridescenceMap.value=o.iridescenceMap,i(o.iridescenceMap,f.iridescenceMapTransform)),o.iridescenceThicknessMap&&(f.iridescenceThicknessMap.value=o.iridescenceThicknessMap,i(o.iridescenceThicknessMap,f.iridescenceThicknessMapTransform))),o.transmission>0&&(f.transmission.value=o.transmission,f.transmissionSamplerMap.value=c.texture,f.transmissionSamplerSize.value.set(c.width,c.height),o.transmissionMap&&(f.transmissionMap.value=o.transmissionMap,i(o.transmissionMap,f.transmissionMapTransform)),f.thickness.value=o.thickness,o.thicknessMap&&(f.thicknessMap.value=o.thicknessMap,i(o.thicknessMap,f.thicknessMapTransform)),f.attenuationDistance.value=o.attenuationDistance,f.attenuationColor.value.copy(o.attenuationColor)),o.anisotropy>0&&(f.anisotropyVector.value.set(o.anisotropy*Math.cos(o.anisotropyRotation),o.anisotropy*Math.sin(o.anisotropyRotation)),o.anisotropyMap&&(f.anisotropyMap.value=o.anisotropyMap,i(o.anisotropyMap,f.anisotropyMapTransform))),f.specularIntensity.value=o.specularIntensity,f.specularColor.value.copy(o.specularColor),o.specularColorMap&&(f.specularColorMap.value=o.specularColorMap,i(o.specularColorMap,f.specularColorMapTransform)),o.specularIntensityMap&&(f.specularIntensityMap.value=o.specularIntensityMap,i(o.specularIntensityMap,f.specularIntensityMapTransform))}function n(f,o){o.matcap&&(f.matcap.value=o.matcap)}function u(f,o){const c=t.get(o).light;f.referencePosition.value.setFromMatrixPosition(c.matrixWorld),f.nearDistance.value=c.shadow.camera.near,f.farDistance.value=c.shadow.camera.far}return{refreshFogUniforms:x,refreshMaterialUniforms:T}}function nU(g,t,i,x){let T={},E={},s=[];const y=i.isWebGL2?g.getParameter(g.MAX_UNIFORM_BUFFER_BINDINGS):0;function e(c,d){const v=d.program;x.uniformBlockBinding(c,v)}function r(c,d){let v=T[c.id];v===void 0&&(n(c),v=p(c),T[c.id]=v,c.addEventListener("dispose",f));const m=d.program;x.updateUBOMapping(c,m);const S=t.render.frame;E[c.id]!==S&&(a(c),E[c.id]=S)}function p(c){const d=h();c.__bindingPointIndex=d;const v=g.createBuffer(),m=c.__size,S=c.usage;return g.bindBuffer(g.UNIFORM_BUFFER,v),g.bufferData(g.UNIFORM_BUFFER,m,S),g.bindBuffer(g.UNIFORM_BUFFER,null),g.bindBufferBase(g.UNIFORM_BUFFER,d,v),v}function h(){for(let c=0;c0&&(v+=m-S),c.__size=v,c.__cache={},this}function u(c){const d={boundary:0,storage:0};return typeof c=="number"||typeof c=="boolean"?(d.boundary=4,d.storage=4):c.isVector2?(d.boundary=8,d.storage=8):c.isVector3||c.isColor?(d.boundary=16,d.storage=12):c.isVector4?(d.boundary=16,d.storage=16):c.isMatrix3?(d.boundary=48,d.storage=48):c.isMatrix4?(d.boundary=64,d.storage=64):c.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",c),d}function f(c){const d=c.target;d.removeEventListener("dispose",f);const v=s.indexOf(d.__bindingPointIndex);s.splice(v,1),g.deleteBuffer(T[d.id]),delete T[d.id],delete E[d.id]}function o(){for(const c in T)g.deleteBuffer(T[c]);s=[],T={},E={}}return{bind:e,update:r,dispose:o}}class R1{constructor(t={}){const{canvas:i=m2(),context:x=null,depth:T=!0,stencil:E=!0,alpha:s=!1,antialias:y=!1,premultipliedAlpha:e=!0,preserveDrawingBuffer:r=!1,powerPreference:p="default",failIfMajorPerformanceCaveat:h=!1}=t;this.isWebGLRenderer=!0;let a;x!==null?a=x.getContextAttributes().alpha:a=s;const l=new Uint32Array(4),n=new Int32Array(4);let u=null,f=null;const o=[],c=[];this.domElement=i,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=mr,this._useLegacyLights=!1,this.toneMapping=zo,this.toneMappingExposure=1;const d=this;let v=!1,m=0,S=0,M=null,w=-1,C=null;const A=new an,P=new an;let b=null;const O=new ze(0);let I=0,D=i.width,B=i.height,G=1,z=null,X=null;const j=new an(0,0,D,B),Q=new an(0,0,D,B);let tt=!1;const Y=new ip;let Z=!1,U=!1,H=null;const J=new di,_=new ve,q=new Ct,at={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ot(){return M===null?G:1}let rt=x;function gt(Tt,Zt){for(let qt=0;qt{function Te(){if(ie.forEach(function(Ue){Vt.get(Ue).currentProgram.isReady()&&ie.delete(Ue)}),ie.size===0){ee(Tt);return}setTimeout(Te,10)}yt.get("KHR_parallel_shader_compile")!==null?Te():setTimeout(Te,10)})};let Ii=null;function nn(Tt){Ii&&Ii(Tt)}function Jn(){pi.stop()}function Vi(){pi.start()}const pi=new M2;pi.setAnimationLoop(nn),typeof self<"u"&&pi.setContext(self),this.setAnimationLoop=function(Tt){Ii=Tt,he.setAnimationLoop(Tt),Tt===null?pi.stop():pi.start()},he.addEventListener("sessionstart",Jn),he.addEventListener("sessionend",Vi),this.render=function(Tt,Zt){if(Zt!==void 0&&Zt.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(v===!0)return;Tt.matrixWorldAutoUpdate===!0&&Tt.updateMatrixWorld(),Zt.parent===null&&Zt.matrixWorldAutoUpdate===!0&&Zt.updateMatrixWorld(),he.enabled===!0&&he.isPresenting===!0&&(he.cameraAutoUpdate===!0&&he.updateCamera(Zt),Zt=he.getCamera()),Tt.isScene===!0&&Tt.onBeforeRender(d,Tt,Zt,M),f=xe.get(Tt,c.length),f.init(),c.push(f),J.multiplyMatrices(Zt.projectionMatrix,Zt.matrixWorldInverse),Y.setFromProjectionMatrix(J),U=this.localClippingEnabled,Z=Pe.init(this.clippingPlanes,U),u=ge.get(Tt,o.length),u.init(),o.push(u),Xi(Tt,Zt,0,d.sortObjects),u.finish(),d.sortObjects===!0&&u.sort(z,X),this.info.render.frame++,Z===!0&&Pe.beginShadows();const qt=f.state.shadowsArray;if(te.render(qt,Tt,Zt),Z===!0&&Pe.endShadows(),this.info.autoReset===!0&&this.info.reset(),(he.enabled===!1||he.isPresenting===!1||he.hasDepthSensing()===!1)&&Ge.render(u,Tt),f.setupLights(d._useLegacyLights),Zt.isArrayCamera){const ie=Zt.cameras;for(let ee=0,Te=ie.length;ee0?f=c[c.length-1]:f=null,o.pop(),o.length>0?u=o[o.length-1]:u=null};function Xi(Tt,Zt,qt,ie){if(Tt.visible===!1)return;if(Tt.layers.test(Zt.layers)){if(Tt.isGroup)qt=Tt.renderOrder;else if(Tt.isLOD)Tt.autoUpdate===!0&&Tt.update(Zt);else if(Tt.isLight)f.pushLight(Tt),Tt.castShadow&&f.pushShadow(Tt);else if(Tt.isSprite){if(!Tt.frustumCulled||Y.intersectsSprite(Tt)){ie&&q.setFromMatrixPosition(Tt.matrixWorld).applyMatrix4(J);const Ue=Bt.update(Tt),We=Tt.material;We.visible&&u.push(Tt,Ue,We,qt,q.z,null)}}else if((Tt.isMesh||Tt.isLine||Tt.isPoints)&&(!Tt.frustumCulled||Y.intersectsObject(Tt))){const Ue=Bt.update(Tt),We=Tt.material;if(ie&&(Tt.boundingSphere!==void 0?(Tt.boundingSphere===null&&Tt.computeBoundingSphere(),q.copy(Tt.boundingSphere.center)):(Ue.boundingSphere===null&&Ue.computeBoundingSphere(),q.copy(Ue.boundingSphere.center)),q.applyMatrix4(Tt.matrixWorld).applyMatrix4(J)),Array.isArray(We)){const $e=Ue.groups;for(let qe=0,ii=$e.length;qe0&&oa(ee,Te,Zt,qt),ie&&At.viewport(A.copy(ie)),ee.length>0&&Us(ee,Zt,qt),Te.length>0&&Us(Te,Zt,qt),Ue.length>0&&Us(Ue,Zt,qt),At.buffers.depth.setTest(!0),At.buffers.depth.setMask(!0),At.buffers.color.setMask(!0),At.setPolygonOffset(!1)}function oa(Tt,Zt,qt,ie){if((qt.isScene===!0?qt.overrideMaterial:null)!==null)return;const Te=Et.isWebGL2;H===null&&(H=new ro(1,1,{generateMipmaps:!0,type:yt.has("EXT_color_buffer_half_float")?_f:Go,minFilter:Bo,samples:Te?4:0})),d.getDrawingBufferSize(_),Te?H.setSize(_.x,_.y):H.setSize(Am(_.x),Am(_.y));const Ue=d.getRenderTarget();d.setRenderTarget(H),d.getClearColor(O),I=d.getClearAlpha(),I<1&&d.setClearColor(16777215,.5),d.clear();const We=d.toneMapping;d.toneMapping=zo,Us(Tt,qt,ie),dt.updateMultisampleRenderTarget(H),dt.updateRenderTargetMipmap(H);let $e=!1;for(let qe=0,ii=Zt.length;qe0),oi=!!qt.morphAttributes.position,$i=!!qt.morphAttributes.normal,un=!!qt.morphAttributes.color;let ji=zo;ie.toneMapped&&(M===null||M.isXRRenderTarget===!0)&&(ji=d.toneMapping);const yn=qt.morphAttributes.position||qt.morphAttributes.normal||qt.morphAttributes.color,ti=yn!==void 0?yn.length:0,Se=Vt.get(ie),Br=f.state.lights;if(Z===!0&&(U===!0||Tt!==C)){const En=Tt===C&&ie.id===w;Pe.setState(ie,Tt,En)}let gi=!1;ie.version===Se.__version?(Se.needsLights&&Se.lightsStateVersion!==Br.state.version||Se.outputColorSpace!==We||ee.isBatchedMesh&&Se.batching===!1||!ee.isBatchedMesh&&Se.batching===!0||ee.isInstancedMesh&&Se.instancing===!1||!ee.isInstancedMesh&&Se.instancing===!0||ee.isSkinnedMesh&&Se.skinning===!1||!ee.isSkinnedMesh&&Se.skinning===!0||ee.isInstancedMesh&&Se.instancingColor===!0&&ee.instanceColor===null||ee.isInstancedMesh&&Se.instancingColor===!1&&ee.instanceColor!==null||Se.envMap!==$e||ie.fog===!0&&Se.fog!==Te||Se.numClippingPlanes!==void 0&&(Se.numClippingPlanes!==Pe.numPlanes||Se.numIntersection!==Pe.numIntersection)||Se.vertexAlphas!==qe||Se.vertexTangents!==ii||Se.morphTargets!==oi||Se.morphNormals!==$i||Se.morphColors!==un||Se.toneMapping!==ji||Et.isWebGL2===!0&&Se.morphTargetsCount!==ti)&&(gi=!0):(gi=!0,Se.__version=ie.version);let fn=Se.currentProgram;gi===!0&&(fn=lo(ie,Zt,ee));let Ni=!1,Vn=!1,vn=!1;const Ki=fn.getUniforms(),pr=Se.uniforms;if(At.useProgram(fn.program)&&(Ni=!0,Vn=!0,vn=!0),ie.id!==w&&(w=ie.id,Vn=!0),Ni||C!==Tt){Ki.setValue(rt,"projectionMatrix",Tt.projectionMatrix),Ki.setValue(rt,"viewMatrix",Tt.matrixWorldInverse);const En=Ki.map.cameraPosition;En!==void 0&&En.setValue(rt,q.setFromMatrixPosition(Tt.matrixWorld)),Et.logarithmicDepthBuffer&&Ki.setValue(rt,"logDepthBufFC",2/(Math.log(Tt.far+1)/Math.LN2)),(ie.isMeshPhongMaterial||ie.isMeshToonMaterial||ie.isMeshLambertMaterial||ie.isMeshBasicMaterial||ie.isMeshStandardMaterial||ie.isShaderMaterial)&&Ki.setValue(rt,"isOrthographic",Tt.isOrthographicCamera===!0),C!==Tt&&(C=Tt,Vn=!0,vn=!0)}if(ee.isSkinnedMesh){Ki.setOptional(rt,ee,"bindMatrix"),Ki.setOptional(rt,ee,"bindMatrixInverse");const En=ee.skeleton;En&&(Et.floatVertexTextures?(En.boneTexture===null&&En.computeBoneTexture(),Ki.setValue(rt,"boneTexture",En.boneTexture,dt)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}ee.isBatchedMesh&&(Ki.setOptional(rt,ee,"batchingTexture"),Ki.setValue(rt,"batchingTexture",ee._matricesTexture,dt));const Gs=qt.morphAttributes;if((Gs.position!==void 0||Gs.normal!==void 0||Gs.color!==void 0&&Et.isWebGL2===!0)&&Oe.update(ee,qt,fn),(Vn||Se.receiveShadow!==ee.receiveShadow)&&(Se.receiveShadow=ee.receiveShadow,Ki.setValue(rt,"receiveShadow",ee.receiveShadow)),ie.isMeshGouraudMaterial&&ie.envMap!==null&&(pr.envMap.value=$e,pr.flipEnvMap.value=$e.isCubeTexture&&$e.isRenderTargetTexture===!1?-1:1),Vn&&(Ki.setValue(rt,"toneMappingExposure",d.toneMappingExposure),Se.needsLights&&ho(pr,vn),Te&&ie.fog===!0&&le.refreshFogUniforms(pr,Te),le.refreshMaterialUniforms(pr,ie,G,B,H),cm.upload(rt,qr(Se),pr,dt)),ie.isShaderMaterial&&ie.uniformsNeedUpdate===!0&&(cm.upload(rt,qr(Se),pr,dt),ie.uniformsNeedUpdate=!1),ie.isSpriteMaterial&&Ki.setValue(rt,"center",ee.center),Ki.setValue(rt,"modelViewMatrix",ee.modelViewMatrix),Ki.setValue(rt,"normalMatrix",ee.normalMatrix),Ki.setValue(rt,"modelMatrix",ee.matrixWorld),ie.isShaderMaterial||ie.isRawShaderMaterial){const En=ie.uniformsGroups;for(let la=0,$n=En.length;la<$n;la++)if(Et.isWebGL2){const ba=En[la];si.update(ba,fn),si.bind(ba,fn)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return fn}function ho(Tt,Zt){Tt.ambientLightColor.needsUpdate=Zt,Tt.lightProbe.needsUpdate=Zt,Tt.directionalLights.needsUpdate=Zt,Tt.directionalLightShadows.needsUpdate=Zt,Tt.pointLights.needsUpdate=Zt,Tt.pointLightShadows.needsUpdate=Zt,Tt.spotLights.needsUpdate=Zt,Tt.spotLightShadows.needsUpdate=Zt,Tt.rectAreaLights.needsUpdate=Zt,Tt.hemisphereLights.needsUpdate=Zt}function Ll(Tt){return Tt.isMeshLambertMaterial||Tt.isMeshToonMaterial||Tt.isMeshPhongMaterial||Tt.isMeshStandardMaterial||Tt.isShadowMaterial||Tt.isShaderMaterial&&Tt.lights===!0}this.getActiveCubeFace=function(){return m},this.getActiveMipmapLevel=function(){return S},this.getRenderTarget=function(){return M},this.setRenderTargetTextures=function(Tt,Zt,qt){Vt.get(Tt.texture).__webglTexture=Zt,Vt.get(Tt.depthTexture).__webglTexture=qt;const ie=Vt.get(Tt);ie.__hasExternalTextures=!0,ie.__hasExternalTextures&&(ie.__autoAllocateDepthBuffer=qt===void 0,ie.__autoAllocateDepthBuffer||yt.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ie.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(Tt,Zt){const qt=Vt.get(Tt);qt.__webglFramebuffer=Zt,qt.__useDefaultFramebuffer=Zt===void 0},this.setRenderTarget=function(Tt,Zt=0,qt=0){M=Tt,m=Zt,S=qt;let ie=!0,ee=null,Te=!1,Ue=!1;if(Tt){const $e=Vt.get(Tt);$e.__useDefaultFramebuffer!==void 0?(At.bindFramebuffer(rt.FRAMEBUFFER,null),ie=!1):$e.__webglFramebuffer===void 0?dt.setupRenderTarget(Tt):$e.__hasExternalTextures&&dt.rebindTextures(Tt,Vt.get(Tt.texture).__webglTexture,Vt.get(Tt.depthTexture).__webglTexture);const qe=Tt.texture;(qe.isData3DTexture||qe.isDataArrayTexture||qe.isCompressedArrayTexture)&&(Ue=!0);const ii=Vt.get(Tt).__webglFramebuffer;Tt.isWebGLCubeRenderTarget?(Array.isArray(ii[Zt])?ee=ii[Zt][qt]:ee=ii[Zt],Te=!0):Et.isWebGL2&&Tt.samples>0&&dt.useMultisampledRTT(Tt)===!1?ee=Vt.get(Tt).__webglMultisampledFramebuffer:Array.isArray(ii)?ee=ii[qt]:ee=ii,A.copy(Tt.viewport),P.copy(Tt.scissor),b=Tt.scissorTest}else A.copy(j).multiplyScalar(G).floor(),P.copy(Q).multiplyScalar(G).floor(),b=tt;if(At.bindFramebuffer(rt.FRAMEBUFFER,ee)&&Et.drawBuffers&&ie&&At.drawBuffers(Tt,ee),At.viewport(A),At.scissor(P),At.setScissorTest(b),Te){const $e=Vt.get(Tt.texture);rt.framebufferTexture2D(rt.FRAMEBUFFER,rt.COLOR_ATTACHMENT0,rt.TEXTURE_CUBE_MAP_POSITIVE_X+Zt,$e.__webglTexture,qt)}else if(Ue){const $e=Vt.get(Tt.texture),qe=Zt||0;rt.framebufferTextureLayer(rt.FRAMEBUFFER,rt.COLOR_ATTACHMENT0,$e.__webglTexture,qt||0,qe)}w=-1},this.readRenderTargetPixels=function(Tt,Zt,qt,ie,ee,Te,Ue){if(!(Tt&&Tt.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let We=Vt.get(Tt).__webglFramebuffer;if(Tt.isWebGLCubeRenderTarget&&Ue!==void 0&&(We=We[Ue]),We){At.bindFramebuffer(rt.FRAMEBUFFER,We);try{const $e=Tt.texture,qe=$e.format,ii=$e.type;if(qe!==vs&&ne.convert(qe)!==rt.getParameter(rt.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const oi=ii===_f&&(yt.has("EXT_color_buffer_half_float")||Et.isWebGL2&&yt.has("EXT_color_buffer_float"));if(ii!==Go&&ne.convert(ii)!==rt.getParameter(rt.IMPLEMENTATION_COLOR_READ_TYPE)&&!(ii===Ma&&(Et.isWebGL2||yt.has("OES_texture_float")||yt.has("WEBGL_color_buffer_float")))&&!oi){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Zt>=0&&Zt<=Tt.width-ie&&qt>=0&&qt<=Tt.height-ee&&rt.readPixels(Zt,qt,ie,ee,ne.convert(qe),ne.convert(ii),Te)}finally{const $e=M!==null?Vt.get(M).__webglFramebuffer:null;At.bindFramebuffer(rt.FRAMEBUFFER,$e)}}},this.copyFramebufferToTexture=function(Tt,Zt,qt=0){const ie=Math.pow(2,-qt),ee=Math.floor(Zt.image.width*ie),Te=Math.floor(Zt.image.height*ie);dt.setTexture2D(Zt,0),rt.copyTexSubImage2D(rt.TEXTURE_2D,qt,0,0,Tt.x,Tt.y,ee,Te),At.unbindTexture()},this.copyTextureToTexture=function(Tt,Zt,qt,ie=0){const ee=Zt.image.width,Te=Zt.image.height,Ue=ne.convert(qt.format),We=ne.convert(qt.type);dt.setTexture2D(qt,0),rt.pixelStorei(rt.UNPACK_FLIP_Y_WEBGL,qt.flipY),rt.pixelStorei(rt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,qt.premultiplyAlpha),rt.pixelStorei(rt.UNPACK_ALIGNMENT,qt.unpackAlignment),Zt.isDataTexture?rt.texSubImage2D(rt.TEXTURE_2D,ie,Tt.x,Tt.y,ee,Te,Ue,We,Zt.image.data):Zt.isCompressedTexture?rt.compressedTexSubImage2D(rt.TEXTURE_2D,ie,Tt.x,Tt.y,Zt.mipmaps[0].width,Zt.mipmaps[0].height,Ue,Zt.mipmaps[0].data):rt.texSubImage2D(rt.TEXTURE_2D,ie,Tt.x,Tt.y,Ue,We,Zt.image),ie===0&&qt.generateMipmaps&&rt.generateMipmap(rt.TEXTURE_2D),At.unbindTexture()},this.copyTextureToTexture3D=function(Tt,Zt,qt,ie,ee=0){if(d.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Te=Tt.max.x-Tt.min.x+1,Ue=Tt.max.y-Tt.min.y+1,We=Tt.max.z-Tt.min.z+1,$e=ne.convert(ie.format),qe=ne.convert(ie.type);let ii;if(ie.isData3DTexture)dt.setTexture3D(ie,0),ii=rt.TEXTURE_3D;else if(ie.isDataArrayTexture||ie.isCompressedArrayTexture)dt.setTexture2DArray(ie,0),ii=rt.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}rt.pixelStorei(rt.UNPACK_FLIP_Y_WEBGL,ie.flipY),rt.pixelStorei(rt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ie.premultiplyAlpha),rt.pixelStorei(rt.UNPACK_ALIGNMENT,ie.unpackAlignment);const oi=rt.getParameter(rt.UNPACK_ROW_LENGTH),$i=rt.getParameter(rt.UNPACK_IMAGE_HEIGHT),un=rt.getParameter(rt.UNPACK_SKIP_PIXELS),ji=rt.getParameter(rt.UNPACK_SKIP_ROWS),yn=rt.getParameter(rt.UNPACK_SKIP_IMAGES),ti=qt.isCompressedTexture?qt.mipmaps[ee]:qt.image;rt.pixelStorei(rt.UNPACK_ROW_LENGTH,ti.width),rt.pixelStorei(rt.UNPACK_IMAGE_HEIGHT,ti.height),rt.pixelStorei(rt.UNPACK_SKIP_PIXELS,Tt.min.x),rt.pixelStorei(rt.UNPACK_SKIP_ROWS,Tt.min.y),rt.pixelStorei(rt.UNPACK_SKIP_IMAGES,Tt.min.z),qt.isDataTexture||qt.isData3DTexture?rt.texSubImage3D(ii,ee,Zt.x,Zt.y,Zt.z,Te,Ue,We,$e,qe,ti.data):qt.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),rt.compressedTexSubImage3D(ii,ee,Zt.x,Zt.y,Zt.z,Te,Ue,We,$e,ti.data)):rt.texSubImage3D(ii,ee,Zt.x,Zt.y,Zt.z,Te,Ue,We,$e,qe,ti),rt.pixelStorei(rt.UNPACK_ROW_LENGTH,oi),rt.pixelStorei(rt.UNPACK_IMAGE_HEIGHT,$i),rt.pixelStorei(rt.UNPACK_SKIP_PIXELS,un),rt.pixelStorei(rt.UNPACK_SKIP_ROWS,ji),rt.pixelStorei(rt.UNPACK_SKIP_IMAGES,yn),ee===0&&ie.generateMipmaps&&rt.generateMipmap(ii),At.unbindTexture()},this.initTexture=function(Tt){Tt.isCubeTexture?dt.setTextureCube(Tt,0):Tt.isData3DTexture?dt.setTexture3D(Tt,0):Tt.isDataArrayTexture||Tt.isCompressedArrayTexture?dt.setTexture2DArray(Tt,0):dt.setTexture2D(Tt,0),At.unbindTexture()},this.resetState=function(){m=0,S=0,M=null,At.reset(),je.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Uo}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const i=this.getContext();i.drawingBufferColorSpace=t===cg?"display-p3":"srgb",i.unpackColorSpace=sn.workingColorSpace===qd?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===mr?vh:g1}set outputEncoding(t){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=t===vh?mr:Ho}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}}class F2 extends R1{}F2.prototype.isWebGL1Renderer=!0;class vg{constructor(t,i=25e-5){this.isFogExp2=!0,this.name="",this.color=new ze(t),this.density=i}clone(){return new vg(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class mg{constructor(t,i=1,x=1e3){this.isFog=!0,this.name="",this.color=new ze(t),this.near=i,this.far=x}clone(){return new mg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Pm extends ki{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,i){return super.copy(t,i),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const i=super.toJSON(t);return this.fog!==null&&(i.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(i.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(i.object.backgroundIntensity=this.backgroundIntensity),i}}class gg{constructor(t,i){this.isInterleavedBuffer=!0,this.array=t,this.stride=i,this.count=t!==void 0?t.length/i:0,this.usage=Id,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=ra()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return Eu("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,i){this.updateRanges.push({start:t,count:i})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,i,x){t*=this.stride,x*=i.stride;for(let T=0,E=this.stride;Tt.far||i.push({distance:e,point:$c.clone(),uv:na.getInterpolation($c,Av,_c,Pv,vE,K0,mE,new ve),face:null,object:this})}copy(t,i){return super.copy(t,i),t.center!==void 0&&this.center.copy(t.center),this.material=t.material,this}}function Rv(g,t,i,x,T,E){bf.subVectors(g,i).addScalar(.5).multiply(x),T!==void 0?(Qc.x=E*bf.x-T*bf.y,Qc.y=T*bf.x+E*bf.y):Qc.copy(bf),g.copy(t),g.x+=Qc.x,g.y+=Qc.y,g.applyMatrix4(O2)}const bv=new Ct,gE=new Ct;class I2 extends ki{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const i=t.levels;for(let x=0,T=i.length;x0){let x,T;for(x=1,T=i.length;x0){bv.setFromMatrixPosition(this.matrixWorld);const T=t.ray.origin.distanceTo(bv);this.getObjectForDistance(T).raycast(t,i)}}update(t){const i=this.levels;if(i.length>1){bv.setFromMatrixPosition(t.matrixWorld),gE.setFromMatrixPosition(this.matrixWorld);const x=bv.distanceTo(gE)/t.zoom;i[0].object.visible=!0;let T,E;for(T=1,E=i.length;T=s)i[T-1].object.visible=!1,i[T].object.visible=!0;else break}for(this._currentLevel=T-1;T=x.length&&x.push({start:-1,count:-1,z:-1});const E=x[this.index];T.push(E),this.index++,E.start=t.start,E.count=t.count,E.z=i}reset(){this.list.length=0,this.index=0}}const Ff="batchId",ah=new di,AE=new di,uU=new di,PE=new di,$0=new ip,Ov=new ys,iu=new Qr,ed=new Ct,Q0=new hU,Zr=new dr,Dv=[];function fU(g,t,i=0){const x=t.itemSize;if(g.isInterleavedBufferAttribute||g.array.constructor!==t.array.constructor){const T=g.count;for(let E=0;E65536?new Uint32Array(E):new Uint16Array(E);i.setIndex(new on(y,1))}const s=T>65536?new Uint32Array(x):new Uint16Array(x);i.setAttribute(Ff,new on(s,1)),this._geometryInitialized=!0}}_validateGeometry(t){if(t.getAttribute(Ff))throw new Error(`BatchedMesh: Geometry cannot use attribute "${Ff}"`);const i=this.geometry;if(!!t.getIndex()!=!!i.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const x in i.attributes){if(x===Ff)continue;if(!t.hasAttribute(x))throw new Error(`BatchedMesh: Added geometry missing "${x}". All geometries must have consistent attributes.`);const T=t.getAttribute(x),E=i.getAttribute(x);if(T.itemSize!==E.itemSize||T.normalized!==E.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(t){return this.customSort=t,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ys);const t=this._geometryCount,i=this.boundingBox,x=this._active;i.makeEmpty();for(let T=0;T=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const T={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let E=null;const s=this._reservedRanges,y=this._drawRanges,e=this._bounds;this._geometryCount!==0&&(E=s[s.length-1]),i===-1?T.vertexCount=t.getAttribute("position").count:T.vertexCount=i,E===null?T.vertexStart=0:T.vertexStart=E.vertexStart+E.vertexCount;const r=t.getIndex(),p=r!==null;if(p&&(x===-1?T.indexCount=r.count:T.indexCount=x,E===null?T.indexStart=0:T.indexStart=E.indexStart+E.indexCount),T.indexStart!==-1&&T.indexStart+T.indexCount>this._maxIndexCount||T.vertexStart+T.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const h=this._visibility,a=this._active,l=this._matricesTexture,n=this._matricesTexture.image.data;h.push(!0),a.push(!0);const u=this._geometryCount;this._geometryCount++,uU.toArray(n,u*16),l.needsUpdate=!0,s.push(T),y.push({start:p?T.indexStart:T.vertexStart,count:-1}),e.push({boxInitialized:!1,box:new ys,sphereInitialized:!1,sphere:new Qr});const f=this.geometry.getAttribute(Ff);for(let o=0;o=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(i);const x=this.geometry,T=x.getIndex()!==null,E=x.getIndex(),s=i.getIndex(),y=this._reservedRanges[t];if(T&&s.count>y.indexCount||i.attributes.position.count>y.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const e=y.vertexStart,r=y.vertexCount;for(const l in x.attributes){if(l===Ff)continue;const n=i.getAttribute(l),u=x.getAttribute(l);fU(n,u,e);const f=n.itemSize;for(let o=n.count,c=r;o=i.length||i[t]===!1?this:(i[t]=!1,this._visibilityChanged=!0,this)}getBoundingBoxAt(t,i){if(this._active[t]===!1)return null;const T=this._bounds[t],E=T.box,s=this.geometry;if(T.boxInitialized===!1){E.makeEmpty();const y=s.index,e=s.attributes.position,r=this._drawRanges[t];for(let p=r.start,h=r.start+r.count;p=s||x[t]===!1?this:(i.toArray(E,t*16),T.needsUpdate=!0,this)}getMatrixAt(t,i){const x=this._active,T=this._matricesTexture.image.data,E=this._geometryCount;return t>=E||x[t]===!1?null:i.fromArray(T,t*16)}setVisibleAt(t,i){const x=this._visibility,T=this._active,E=this._geometryCount;return t>=E||T[t]===!1||x[t]===i?this:(x[t]=i,this._visibilityChanged=!0,this)}getVisibleAt(t){const i=this._visibility,x=this._active,T=this._geometryCount;return t>=T||x[t]===!1?!1:i[t]}raycast(t,i){const x=this._visibility,T=this._active,E=this._drawRanges,s=this._geometryCount,y=this.matrixWorld,e=this.geometry;Zr.material=this.material,Zr.geometry.index=e.index,Zr.geometry.attributes=e.attributes,Zr.geometry.boundingBox===null&&(Zr.geometry.boundingBox=new ys),Zr.geometry.boundingSphere===null&&(Zr.geometry.boundingSphere=new Qr);for(let r=0;r({...i})),this._reservedRanges=t._reservedRanges.map(i=>({...i})),this._visibility=t._visibility.slice(),this._active=t._active.slice(),this._bounds=t._bounds.map(i=>({boxInitialized:i.boxInitialized,box:i.box.clone(),sphereInitialized:i.sphereInitialized,sphere:i.sphere.clone()})),this._maxGeometryCount=t._maxGeometryCount,this._maxVertexCount=t._maxVertexCount,this._maxIndexCount=t._maxIndexCount,this._geometryInitialized=t._geometryInitialized,this._geometryCount=t._geometryCount,this._multiDrawCounts=t._multiDrawCounts.slice(),this._multiDrawStarts=t._multiDrawStarts.slice(),this._matricesTexture=t._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(t,i,x,T,E){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const s=T.getIndex(),y=s===null?1:s.array.BYTES_PER_ELEMENT,e=this._active,r=this._visibility,p=this._multiDrawStarts,h=this._multiDrawCounts,a=this._drawRanges,l=this.perObjectFrustumCulled;l&&(PE.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse).multiply(this.matrixWorld),$0.setFromProjectionMatrix(PE,t.coordinateSystem));let n=0;if(this.sortObjects){AE.copy(this.matrixWorld).invert(),ed.setFromMatrixPosition(x.matrixWorld).applyMatrix4(AE);for(let o=0,c=r.length;oe)continue;a.applyMatrix4(this.matrixWorld);const w=t.ray.origin.distanceTo(a);wt.far||i.push({distance:w,point:h.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this})}}else{const o=Math.max(0,s.start),c=Math.min(f.count,s.start+s.count);for(let d=o,v=c-1;de)continue;a.applyMatrix4(this.matrixWorld);const S=t.ray.origin.distanceTo(a);St.far||i.push({distance:S,point:h.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const i=this.geometry.morphAttributes,x=Object.keys(i);if(x.length>0){const T=i[x[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,s=T.length;E0){const T=i[x[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,s=T.length;ET.far)return;E.push({distance:r,distanceToRay:Math.sqrt(y),point:e,index:t,face:null,object:s})}}class cU extends zn{constructor(t,i,x,T,E,s,y,e,r){super(t,i,x,T,E,s,y,e,r),this.isVideoTexture=!0,this.minFilter=s!==void 0?s:Bn,this.magFilter=E!==void 0?E:Bn,this.generateMipmaps=!1;const p=this;function h(){p.needsUpdate=!0,t.requestVideoFrameCallback(h)}"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(h)}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;"requestVideoFrameCallback"in t===!1&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class dU extends zn{constructor(t,i){super({width:t,height:i}),this.isFramebufferTexture=!0,this.magFilter=rr,this.minFilter=rr,this.generateMipmaps=!1,this.needsUpdate=!0}}class xg extends zn{constructor(t,i,x,T,E,s,y,e,r,p,h,a){super(null,s,y,e,r,p,T,E,h,a),this.isCompressedTexture=!0,this.image={width:i,height:x},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class pU extends xg{constructor(t,i,x,T,E,s){super(t,i,x,E,s),this.isCompressedArrayTexture=!0,this.image.depth=T,this.wrapR=$r}}class vU extends xg{constructor(t,i,x){super(void 0,t[0].width,t[0].height,i,x,Pl),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class mU extends zn{constructor(t,i,x,T,E,s,y,e,r){super(t,i,x,T,E,s,y,e,r),this.isCanvasTexture=!0,this.needsUpdate=!0}}class ao{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,i){const x=this.getUtoTmapping(t);return this.getPoint(x,i)}getPoints(t=5){const i=[];for(let x=0;x<=t;x++)i.push(this.getPoint(x/t));return i}getSpacedPoints(t=5){const i=[];for(let x=0;x<=t;x++)i.push(this.getPointAt(x/t));return i}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const i=[];let x,T=this.getPoint(0),E=0;i.push(0);for(let s=1;s<=t;s++)x=this.getPoint(s/t),E+=x.distanceTo(T),i.push(E),T=x;return this.cacheArcLengths=i,i}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,i){const x=this.getLengths();let T=0;const E=x.length;let s;i?s=i:s=t*x[E-1];let y=0,e=E-1,r;for(;y<=e;)if(T=Math.floor(y+(e-y)/2),r=x[T]-s,r<0)y=T+1;else if(r>0)e=T-1;else{e=T;break}if(T=e,x[T]===s)return T/(E-1);const p=x[T],a=x[T+1]-p,l=(s-p)/a;return(T+l)/(E-1)}getTangent(t,i){let T=t-1e-4,E=t+1e-4;T<0&&(T=0),E>1&&(E=1);const s=this.getPoint(T),y=this.getPoint(E),e=i||(s.isVector2?new ve:new Ct);return e.copy(y).sub(s).normalize(),e}getTangentAt(t,i){const x=this.getUtoTmapping(t);return this.getTangent(x,i)}computeFrenetFrames(t,i){const x=new Ct,T=[],E=[],s=[],y=new Ct,e=new di;for(let l=0;l<=t;l++){const n=l/t;T[l]=this.getTangentAt(n,new Ct)}E[0]=new Ct,s[0]=new Ct;let r=Number.MAX_VALUE;const p=Math.abs(T[0].x),h=Math.abs(T[0].y),a=Math.abs(T[0].z);p<=r&&(r=p,x.set(1,0,0)),h<=r&&(r=h,x.set(0,1,0)),a<=r&&x.set(0,0,1),y.crossVectors(T[0],x).normalize(),E[0].crossVectors(T[0],y),s[0].crossVectors(T[0],E[0]);for(let l=1;l<=t;l++){if(E[l]=E[l-1].clone(),s[l]=s[l-1].clone(),y.crossVectors(T[l-1],T[l]),y.length()>Number.EPSILON){y.normalize();const n=Math.acos(Zn(T[l-1].dot(T[l]),-1,1));E[l].applyMatrix4(e.makeRotationAxis(y,n))}s[l].crossVectors(T[l],E[l])}if(i===!0){let l=Math.acos(Zn(E[0].dot(E[t]),-1,1));l/=t,T[0].dot(y.crossVectors(E[0],E[t]))>0&&(l=-l);for(let n=1;n<=t;n++)E[n].applyMatrix4(e.makeRotationAxis(T[n],l*n)),s[n].crossVectors(T[n],E[n])}return{tangents:T,normals:E,binormals:s}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class Sg extends ao{constructor(t=0,i=0,x=1,T=1,E=0,s=Math.PI*2,y=!1,e=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=i,this.xRadius=x,this.yRadius=T,this.aStartAngle=E,this.aEndAngle=s,this.aClockwise=y,this.aRotation=e}getPoint(t,i){const x=i||new ve,T=Math.PI*2;let E=this.aEndAngle-this.aStartAngle;const s=Math.abs(E)T;)E-=T;E0?0:(Math.floor(Math.abs(y)/E)+1)*E:e===0&&y===E-1&&(y=E-2,e=1);let r,p;this.closed||y>0?r=T[(y-1)%E]:(Uv.subVectors(T[0],T[1]).add(T[0]),r=Uv);const h=T[y%E],a=T[(y+1)%E];if(this.closed||y+2T.length-2?T.length-1:s+1],h=T[s>T.length-3?T.length-1:s+2];return x.set(NE(y,e.x,r.x,p.x,h.x),NE(y,e.y,r.y,p.y,h.y)),x}copy(t){super.copy(t),this.points=[];for(let i=0,x=t.points.length;i=x){const s=T[E]-x,y=this.curves[E],e=y.getLength(),r=e===0?0:1-s/e;return y.getPointAt(r,i)}E++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let i=0;for(let x=0,T=this.curves.length;x1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}copy(t){super.copy(t),this.curves=[];for(let i=0,x=t.curves.length;i0){const h=r.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(r);const p=r.getPoint(1);return this.currentPoint.copy(p),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class rp extends Fi{constructor(t=[new ve(0,-.5),new ve(.5,0),new ve(0,.5)],i=12,x=0,T=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:t,segments:i,phiStart:x,phiLength:T},i=Math.floor(i),T=Zn(T,0,Math.PI*2);const E=[],s=[],y=[],e=[],r=[],p=1/i,h=new Ct,a=new ve,l=new Ct,n=new Ct,u=new Ct;let f=0,o=0;for(let c=0;c<=t.length-1;c++)switch(c){case 0:f=t[c+1].x-t[c].x,o=t[c+1].y-t[c].y,l.x=o*1,l.y=-f,l.z=o*0,u.copy(l),l.normalize(),e.push(l.x,l.y,l.z);break;case t.length-1:e.push(u.x,u.y,u.z);break;default:f=t[c+1].x-t[c].x,o=t[c+1].y-t[c].y,l.x=o*1,l.y=-f,l.z=o*0,n.copy(l),l.x+=u.x,l.y+=u.y,l.z+=u.z,l.normalize(),e.push(l.x,l.y,l.z),u.copy(n)}for(let c=0;c<=i;c++){const d=x+c*p*T,v=Math.sin(d),m=Math.cos(d);for(let S=0;S<=t.length-1;S++){h.x=t[S].x*v,h.y=t[S].y,h.z=t[S].x*m,s.push(h.x,h.y,h.z),a.x=c/i,a.y=S/(t.length-1),y.push(a.x,a.y);const M=e[3*S+0]*v,w=e[3*S+1],C=e[3*S+0]*m;r.push(M,w,C)}}for(let c=0;c0&&d(!0),i>0&&d(!1)),this.setIndex(p),this.setAttribute("position",new ke(h,3)),this.setAttribute("normal",new ke(a,3)),this.setAttribute("uv",new ke(l,2));function c(){const v=new Ct,m=new Ct;let S=0;const M=(i-t)/x;for(let w=0;w<=E;w++){const C=[],A=w/E,P=A*(i-t)+t;for(let b=0;b<=T;b++){const O=b/T,I=O*e+y,D=Math.sin(I),B=Math.cos(I);m.x=P*D,m.y=-A*x+f,m.z=P*B,h.push(m.x,m.y,m.z),v.set(D,M,B).normalize(),a.push(v.x,v.y,v.z),l.push(O,1-A),C.push(n++)}u.push(C)}for(let w=0;w.9&&M<.1&&(d<.2&&(s[c+0]+=1),v<.2&&(s[c+2]+=1),m<.2&&(s[c+4]+=1))}}function a(c){E.push(c.x,c.y,c.z)}function l(c,d){const v=c*3;d.x=t[v+0],d.y=t[v+1],d.z=t[v+2]}function n(){const c=new Ct,d=new Ct,v=new Ct,m=new Ct,S=new ve,M=new ve,w=new ve;for(let C=0,A=0;C80*i){y=r=g[0],e=p=g[1];for(let n=i;nr&&(r=h),a>p&&(p=a);l=Math.max(r-y,p-e),l=l!==0?32767/l:0}return zd(E,s,i,y,e,l,0),s}};function j2(g,t,i,x,T){let E,s;if(T===VU(g,t,i,x)>0)for(E=t;E=t;E-=x)s=BE(E,g[E],g[E+1],s);return s&&wg(s,s.next)&&(Vd(s),s=s.next),s}function Fu(g,t){if(!g)return g;t||(t=g);let i=g,x;do if(x=!1,!i.steiner&&(wg(i,i.next)||Un(i.prev,i,i.next)===0)){if(Vd(i),i=t=i.prev,i===i.next)break;x=!0}else i=i.next;while(x||i!==t);return t}function zd(g,t,i,x,T,E,s){if(!g)return;!s&&E&&IU(g,x,T,E);let y=g,e,r;for(;g.prev!==g.next;){if(e=g.prev,r=g.next,E?AU(g,x,T,E):wU(g)){t.push(e.i/i|0),t.push(g.i/i|0),t.push(r.i/i|0),Vd(g),g=r.next,y=r.next;continue}if(g=r,g===y){s?s===1?(g=PU(Fu(g),t,i),zd(g,t,i,x,T,E,2)):s===2&&RU(g,t,i,x,T,E):zd(Fu(g),t,i,x,T,E,1);break}}}function wU(g){const t=g.prev,i=g,x=g.next;if(Un(t,i,x)>=0)return!1;const T=t.x,E=i.x,s=x.x,y=t.y,e=i.y,r=x.y,p=TE?T>s?T:s:E>s?E:s,l=y>e?y>r?y:r:e>r?e:r;let n=x.next;for(;n!==t;){if(n.x>=p&&n.x<=a&&n.y>=h&&n.y<=l&&Xf(T,y,E,e,s,r,n.x,n.y)&&Un(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function AU(g,t,i,x){const T=g.prev,E=g,s=g.next;if(Un(T,E,s)>=0)return!1;const y=T.x,e=E.x,r=s.x,p=T.y,h=E.y,a=s.y,l=ye?y>r?y:r:e>r?e:r,f=p>h?p>a?p:a:h>a?h:a,o=Cx(l,n,t,i,x),c=Cx(u,f,t,i,x);let d=g.prevZ,v=g.nextZ;for(;d&&d.z>=o&&v&&v.z<=c;){if(d.x>=l&&d.x<=u&&d.y>=n&&d.y<=f&&d!==T&&d!==s&&Xf(y,p,e,h,r,a,d.x,d.y)&&Un(d.prev,d,d.next)>=0||(d=d.prevZ,v.x>=l&&v.x<=u&&v.y>=n&&v.y<=f&&v!==T&&v!==s&&Xf(y,p,e,h,r,a,v.x,v.y)&&Un(v.prev,v,v.next)>=0))return!1;v=v.nextZ}for(;d&&d.z>=o;){if(d.x>=l&&d.x<=u&&d.y>=n&&d.y<=f&&d!==T&&d!==s&&Xf(y,p,e,h,r,a,d.x,d.y)&&Un(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;v&&v.z<=c;){if(v.x>=l&&v.x<=u&&v.y>=n&&v.y<=f&&v!==T&&v!==s&&Xf(y,p,e,h,r,a,v.x,v.y)&&Un(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function PU(g,t,i){let x=g;do{const T=x.prev,E=x.next.next;!wg(T,E)&&K2(T,x,x.next,E)&&Gd(T,E)&&Gd(E,T)&&(t.push(T.i/i|0),t.push(x.i/i|0),t.push(E.i/i|0),Vd(x),Vd(x.next),x=g=E),x=x.next}while(x!==g);return Fu(x)}function RU(g,t,i,x,T,E){let s=g;do{let y=s.next.next;for(;y!==s.prev;){if(s.i!==y.i&&UU(s,y)){let e=Z2(s,y);s=Fu(s,s.next),e=Fu(e,e.next),zd(s,t,i,x,T,E,0),zd(e,t,i,x,T,E,0);return}y=y.next}s=s.next}while(s!==g)}function bU(g,t,i,x){const T=[];let E,s,y,e,r;for(E=0,s=t.length;E=i.next.y&&i.next.y!==i.y){const a=i.x+(s-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=E&&a>x&&(x=a,T=i.x=i.x&&i.x>=e&&E!==i.x&&Xf(sT.x||i.x===T.x&&DU(T,i)))&&(T=i,p=h)),i=i.next;while(i!==y);return T}function DU(g,t){return Un(g.prev,g,t.prev)<0&&Un(t.next,g,g.next)<0}function IU(g,t,i,x){let T=g;do T.z===0&&(T.z=Cx(T.x,T.y,t,i,x)),T.prevZ=T.prev,T.nextZ=T.next,T=T.next;while(T!==g);T.prevZ.nextZ=null,T.prevZ=null,NU(T)}function NU(g){let t,i,x,T,E,s,y,e,r=1;do{for(i=g,g=null,E=null,s=0;i;){for(s++,x=i,y=0,t=0;t0||e>0&&x;)y!==0&&(e===0||!x||i.z<=x.z)?(T=i,i=i.nextZ,y--):(T=x,x=x.nextZ,e--),E?E.nextZ=T:g=T,T.prevZ=E,E=T;i=x}E.nextZ=null,r*=2}while(s>1);return g}function Cx(g,t,i,x,T){return g=(g-i)*T|0,t=(t-x)*T|0,g=(g|g<<8)&16711935,g=(g|g<<4)&252645135,g=(g|g<<2)&858993459,g=(g|g<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,g|t<<1}function BU(g){let t=g,i=g;do(t.x=(g-s)*(E-y)&&(g-s)*(x-y)>=(i-s)*(t-y)&&(i-s)*(E-y)>=(T-s)*(x-y)}function UU(g,t){return g.next.i!==t.i&&g.prev.i!==t.i&&!zU(g,t)&&(Gd(g,t)&&Gd(t,g)&&GU(g,t)&&(Un(g.prev,g,t.prev)||Un(g,t.prev,t))||wg(g,t)&&Un(g.prev,g,g.next)>0&&Un(t.prev,t,t.next)>0)}function Un(g,t,i){return(t.y-g.y)*(i.x-t.x)-(t.x-g.x)*(i.y-t.y)}function wg(g,t){return g.x===t.x&&g.y===t.y}function K2(g,t,i,x){const T=Wv(Un(g,t,i)),E=Wv(Un(g,t,x)),s=Wv(Un(i,x,g)),y=Wv(Un(i,x,t));return!!(T!==E&&s!==y||T===0&&Hv(g,i,t)||E===0&&Hv(g,x,t)||s===0&&Hv(i,g,x)||y===0&&Hv(i,t,x))}function Hv(g,t,i){return t.x<=Math.max(g.x,i.x)&&t.x>=Math.min(g.x,i.x)&&t.y<=Math.max(g.y,i.y)&&t.y>=Math.min(g.y,i.y)}function Wv(g){return g>0?1:g<0?-1:0}function zU(g,t){let i=g;do{if(i.i!==g.i&&i.next.i!==g.i&&i.i!==t.i&&i.next.i!==t.i&&K2(i,i.next,g,t))return!0;i=i.next}while(i!==g);return!1}function Gd(g,t){return Un(g.prev,g,g.next)<0?Un(g,t,g.next)>=0&&Un(g,g.prev,t)>=0:Un(g,t,g.prev)<0||Un(g,g.next,t)<0}function GU(g,t){let i=g,x=!1;const T=(g.x+t.x)/2,E=(g.y+t.y)/2;do i.y>E!=i.next.y>E&&i.next.y!==i.y&&T<(i.next.x-i.x)*(E-i.y)/(i.next.y-i.y)+i.x&&(x=!x),i=i.next;while(i!==g);return x}function Z2(g,t){const i=new wx(g.i,g.x,g.y),x=new wx(t.i,t.x,t.y),T=g.next,E=t.prev;return g.next=t,t.prev=g,i.next=T,T.prev=i,x.next=i,i.prev=x,E.next=x,x.prev=E,x}function BE(g,t,i,x){const T=new wx(g,t,i);return x?(T.next=x.next,T.prev=x,x.next.prev=T,x.next=T):(T.prev=T,T.next=T),T}function Vd(g){g.next.prev=g.prev,g.prev.next=g.next,g.prevZ&&(g.prevZ.nextZ=g.nextZ),g.nextZ&&(g.nextZ.prevZ=g.prevZ)}function wx(g,t,i){this.i=g,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function VU(g,t,i,x){let T=0;for(let E=t,s=i-x;E2&&g[t-1].equals(g[0])&&g.pop()}function zE(g,t){for(let i=0;iNumber.EPSILON){const Bt=Math.sqrt(Dt),re=Math.sqrt(ut*ut+Rt*Rt),le=gt.x-dt/Bt,ge=gt.y+Vt/Bt,xe=yt.x-Rt/re,Pe=yt.y+ut/re,te=((xe-le)*Rt-(Pe-ge)*ut)/(Vt*Rt-dt*ut);Et=le+Vt*te-rt.x,At=ge+dt*te-rt.y;const Ge=Et*Et+At*At;if(Ge<=2)return new ve(Et,At);Pt=Math.sqrt(Ge/2)}else{let Bt=!1;Vt>Number.EPSILON?ut>Number.EPSILON&&(Bt=!0):Vt<-Number.EPSILON?ut<-Number.EPSILON&&(Bt=!0):Math.sign(dt)===Math.sign(Rt)&&(Bt=!0),Bt?(Et=-dt,At=Vt,Pt=Math.sqrt(Dt)):(Et=Vt,At=dt,Pt=Math.sqrt(Dt/2))}return new ve(Et/Pt,At/Pt)}const X=[];for(let rt=0,gt=I.length,yt=gt-1,Et=rt+1;rt=0;rt--){const gt=rt/f,yt=l*Math.cos(gt*Math.PI/2),Et=n*Math.sin(gt*Math.PI/2)+u;for(let At=0,Pt=I.length;At=0;){const Et=yt;let At=yt-1;At<0&&(At=rt.length-1);for(let Pt=0,Vt=p+f*2;Pt0)&&l.push(d,v,S),(o!==x-1||e0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class q2 extends Wr{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new ze(16777215),this.specular=new ze(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=_d,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class tA extends Wr{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new ze(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class eA extends Wr{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class iA extends Wr{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new ze(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=_d,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class nA extends Wr{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new ze(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class rA extends xs{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function xu(g,t,i){return!g||!i&&g.constructor===t?g:typeof t.BYTES_PER_ELEMENT=="number"?new t(g):Array.prototype.slice.call(g)}function sA(g){return ArrayBuffer.isView(g)&&!(g instanceof DataView)}function aA(g){function t(T,E){return g[T]-g[E]}const i=g.length,x=new Array(i);for(let T=0;T!==i;++T)x[T]=T;return x.sort(t),x}function Ax(g,t,i){const x=g.length,T=new g.constructor(x);for(let E=0,s=0;s!==x;++E){const y=i[E]*t;for(let e=0;e!==t;++e)T[s++]=g[y+e]}return T}function z1(g,t,i,x){let T=1,E=g[0];for(;E!==void 0&&E[x]===void 0;)E=g[T++];if(E===void 0)return;let s=E[x];if(s!==void 0)if(Array.isArray(s))do s=E[x],s!==void 0&&(t.push(E.time),i.push.apply(i,s)),E=g[T++];while(E!==void 0);else if(s.toArray!==void 0)do s=E[x],s!==void 0&&(t.push(E.time),s.toArray(i,i.length)),E=g[T++];while(E!==void 0);else do s=E[x],s!==void 0&&(t.push(E.time),i.push(s)),E=g[T++];while(E!==void 0)}function YU(g,t,i,x,T=30){const E=g.clone();E.name=t;const s=[];for(let e=0;e=x)){h.push(r.times[l]);for(let u=0;uE.tracks[e].times[0]&&(y=E.tracks[e].times[0]);for(let e=0;e=y.times[n]){const o=n*h+p,c=o+h-p;u=y.values.slice(o,c)}else{const o=y.createInterpolant(),c=p,d=h-p;o.evaluate(E),u=o.resultBuffer.slice(c,d)}e==="quaternion"&&new Is().fromArray(u).normalize().conjugate().toArray(u);const f=r.times.length;for(let o=0;o=E)){const y=i[1];t=E)break e}s=x,x=0;break i}break t}for(;x>>1;ti;)--s;if(++s,E!==0||s!==T){E>=s&&(s=Math.max(s,1),E=s-1);const y=this.getValueSize();this.times=x.slice(E,s),this.values=this.values.slice(E*y,s*y)}return this}validate(){let t=!0;const i=this.getValueSize();i-Math.floor(i)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const x=this.times,T=this.values,E=x.length;E===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let y=0;y!==E;y++){const e=x[y];if(typeof e=="number"&&isNaN(e)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,y,e),t=!1;break}if(s!==null&&s>e){console.error("THREE.KeyframeTrack: Out of order keys.",this,y,e,s),t=!1;break}s=e}if(T!==void 0&&sA(T))for(let y=0,e=T.length;y!==e;++y){const r=T[y];if(isNaN(r)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,y,r),t=!1;break}}return t}optimize(){const t=this.times.slice(),i=this.values.slice(),x=this.getValueSize(),T=this.getInterpolation()===um,E=t.length-1;let s=1;for(let y=1;y0){t[s]=t[E];for(let y=E*x,e=s*x,r=0;r!==x;++r)i[e+r]=i[y+r];++s}return s!==t.length?(this.times=t.slice(0,s),this.values=i.slice(0,s*x)):(this.times=t,this.values=i),this}clone(){const t=this.times.slice(),i=this.values.slice(),x=this.constructor,T=new x(this.name,t,i);return T.createInterpolant=this.createInterpolant,T}}oo.prototype.TimeBufferType=Float32Array;oo.prototype.ValueBufferType=Float32Array;oo.prototype.DefaultInterpolation=bd;class Bu extends oo{}Bu.prototype.ValueTypeName="bool";Bu.prototype.ValueBufferType=Array;Bu.prototype.DefaultInterpolation=Rd;Bu.prototype.InterpolantFactoryMethodLinear=void 0;Bu.prototype.InterpolantFactoryMethodSmooth=void 0;class V1 extends oo{}V1.prototype.ValueTypeName="color";class Hd extends oo{}Hd.prototype.ValueTypeName="number";class hA extends op{constructor(t,i,x,T){super(t,i,x,T)}interpolate_(t,i,x,T){const E=this.resultBuffer,s=this.sampleValues,y=this.valueSize,e=(x-i)/(T-i);let r=t*y;for(let p=r+y;r!==p;r+=4)Is.slerpFlat(E,0,s,r-y,s,r,e);return E}}class uc extends oo{InterpolantFactoryMethodLinear(t){return new hA(this.times,this.values,this.getValueSize(),t)}}uc.prototype.ValueTypeName="quaternion";uc.prototype.DefaultInterpolation=bd;uc.prototype.InterpolantFactoryMethodSmooth=void 0;class Uu extends oo{}Uu.prototype.ValueTypeName="string";Uu.prototype.ValueBufferType=Array;Uu.prototype.DefaultInterpolation=Rd;Uu.prototype.InterpolantFactoryMethodLinear=void 0;Uu.prototype.InterpolantFactoryMethodSmooth=void 0;class Wd extends oo{}Wd.prototype.ValueTypeName="vector";class Xd{constructor(t,i=-1,x,T=fg){this.name=t,this.tracks=x,this.duration=i,this.blendMode=T,this.uuid=ra(),this.duration<0&&this.resetDuration()}static parse(t){const i=[],x=t.tracks,T=1/(t.fps||1);for(let s=0,y=x.length;s!==y;++s)i.push(ZU(x[s]).scale(T));const E=new this(t.name,t.duration,i,t.blendMode);return E.uuid=t.uuid,E}static toJSON(t){const i=[],x=t.tracks,T={name:t.name,duration:t.duration,tracks:i,uuid:t.uuid,blendMode:t.blendMode};for(let E=0,s=x.length;E!==s;++E)i.push(oo.toJSON(x[E]));return T}static CreateFromMorphTargetSequence(t,i,x,T){const E=i.length,s=[];for(let y=0;y1){const h=p[1];let a=T[h];a||(T[h]=a=[]),a.push(r)}}const s=[];for(const y in T)s.push(this.CreateFromMorphTargetSequence(y,T[y],i,x));return s}static parseAnimation(t,i){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const x=function(h,a,l,n,u){if(l.length!==0){const f=[],o=[];z1(l,f,o,n),f.length!==0&&u.push(new h(a,f,o))}},T=[],E=t.name||"default",s=t.fps||30,y=t.blendMode;let e=t.length||-1;const r=t.hierarchy||[];for(let h=0;h{i&&i(E),this.manager.itemEnd(t)},0),E;if(ml[t]!==void 0){ml[t].push({onLoad:i,onProgress:x,onError:T});return}ml[t]=[],ml[t].push({onLoad:i,onProgress:x,onError:T});const s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),y=this.mimeType,e=this.responseType;fetch(s).then(r=>{if(r.status===200||r.status===0){if(r.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||r.body===void 0||r.body.getReader===void 0)return r;const p=ml[t],h=r.body.getReader(),a=r.headers.get("Content-Length")||r.headers.get("X-File-Size"),l=a?parseInt(a):0,n=l!==0;let u=0;const f=new ReadableStream({start(o){c();function c(){h.read().then(({done:d,value:v})=>{if(d)o.close();else{u+=v.byteLength;const m=new ProgressEvent("progress",{lengthComputable:n,loaded:u,total:l});for(let S=0,M=p.length;S{switch(e){case"arraybuffer":return r.arrayBuffer();case"blob":return r.blob();case"document":return r.text().then(p=>new DOMParser().parseFromString(p,y));case"json":return r.json();default:if(y===void 0)return r.text();{const h=/charset="?([^;"\s]*)"?/i.exec(y),a=h&&h[1]?h[1].toLowerCase():void 0,l=new TextDecoder(a);return r.arrayBuffer().then(n=>l.decode(n))}}}).then(r=>{Ml.add(t,r);const p=ml[t];delete ml[t];for(let h=0,a=p.length;h{const p=ml[t];if(p===void 0)throw this.manager.itemError(t),r;delete ml[t];for(let h=0,a=p.length;h{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class $U extends Bs{constructor(t){super(t)}load(t,i,x,T){const E=this,s=new Rl(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(y){try{i(E.parse(JSON.parse(y)))}catch(e){T?T(e):console.error(e),E.manager.itemError(t)}},x,T)}parse(t){const i=[];for(let x=0;x0:T.vertexColors=t.vertexColors),t.uniforms!==void 0)for(const E in t.uniforms){const s=t.uniforms[E];switch(T.uniforms[E]={},s.type){case"t":T.uniforms[E].value=x(s.value);break;case"c":T.uniforms[E].value=new ze().setHex(s.value);break;case"v2":T.uniforms[E].value=new ve().fromArray(s.value);break;case"v3":T.uniforms[E].value=new Ct().fromArray(s.value);break;case"v4":T.uniforms[E].value=new an().fromArray(s.value);break;case"m3":T.uniforms[E].value=new Di().fromArray(s.value);break;case"m4":T.uniforms[E].value=new di().fromArray(s.value);break;default:T.uniforms[E].value=s.value}}if(t.defines!==void 0&&(T.defines=t.defines),t.vertexShader!==void 0&&(T.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(T.fragmentShader=t.fragmentShader),t.glslVersion!==void 0&&(T.glslVersion=t.glslVersion),t.extensions!==void 0)for(const E in t.extensions)T.extensions[E]=t.extensions[E];if(t.lights!==void 0&&(T.lights=t.lights),t.clipping!==void 0&&(T.clipping=t.clipping),t.size!==void 0&&(T.size=t.size),t.sizeAttenuation!==void 0&&(T.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(T.map=x(t.map)),t.matcap!==void 0&&(T.matcap=x(t.matcap)),t.alphaMap!==void 0&&(T.alphaMap=x(t.alphaMap)),t.bumpMap!==void 0&&(T.bumpMap=x(t.bumpMap)),t.bumpScale!==void 0&&(T.bumpScale=t.bumpScale),t.normalMap!==void 0&&(T.normalMap=x(t.normalMap)),t.normalMapType!==void 0&&(T.normalMapType=t.normalMapType),t.normalScale!==void 0){let E=t.normalScale;Array.isArray(E)===!1&&(E=[E,E]),T.normalScale=new ve().fromArray(E)}return t.displacementMap!==void 0&&(T.displacementMap=x(t.displacementMap)),t.displacementScale!==void 0&&(T.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(T.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(T.roughnessMap=x(t.roughnessMap)),t.metalnessMap!==void 0&&(T.metalnessMap=x(t.metalnessMap)),t.emissiveMap!==void 0&&(T.emissiveMap=x(t.emissiveMap)),t.emissiveIntensity!==void 0&&(T.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(T.specularMap=x(t.specularMap)),t.specularIntensityMap!==void 0&&(T.specularIntensityMap=x(t.specularIntensityMap)),t.specularColorMap!==void 0&&(T.specularColorMap=x(t.specularColorMap)),t.envMap!==void 0&&(T.envMap=x(t.envMap)),t.envMapIntensity!==void 0&&(T.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(T.reflectivity=t.reflectivity),t.refractionRatio!==void 0&&(T.refractionRatio=t.refractionRatio),t.lightMap!==void 0&&(T.lightMap=x(t.lightMap)),t.lightMapIntensity!==void 0&&(T.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(T.aoMap=x(t.aoMap)),t.aoMapIntensity!==void 0&&(T.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(T.gradientMap=x(t.gradientMap)),t.clearcoatMap!==void 0&&(T.clearcoatMap=x(t.clearcoatMap)),t.clearcoatRoughnessMap!==void 0&&(T.clearcoatRoughnessMap=x(t.clearcoatRoughnessMap)),t.clearcoatNormalMap!==void 0&&(T.clearcoatNormalMap=x(t.clearcoatNormalMap)),t.clearcoatNormalScale!==void 0&&(T.clearcoatNormalScale=new ve().fromArray(t.clearcoatNormalScale)),t.iridescenceMap!==void 0&&(T.iridescenceMap=x(t.iridescenceMap)),t.iridescenceThicknessMap!==void 0&&(T.iridescenceThicknessMap=x(t.iridescenceThicknessMap)),t.transmissionMap!==void 0&&(T.transmissionMap=x(t.transmissionMap)),t.thicknessMap!==void 0&&(T.thicknessMap=x(t.thicknessMap)),t.anisotropyMap!==void 0&&(T.anisotropyMap=x(t.anisotropyMap)),t.sheenColorMap!==void 0&&(T.sheenColorMap=x(t.sheenColorMap)),t.sheenRoughnessMap!==void 0&&(T.sheenRoughnessMap=x(t.sheenRoughnessMap)),T}setTextures(t){return this.textures=t,this}static createMaterialFromType(t){const i={ShadowMaterial:$2,SpriteMaterial:b1,RawShaderMaterial:Q2,ShaderMaterial:so,PointsMaterial:F1,MeshPhysicalMaterial:_2,MeshStandardMaterial:yl,MeshPhongMaterial:q2,MeshToonMaterial:tA,MeshNormalMaterial:eA,MeshLambertMaterial:iA,MeshDepthMaterial:A1,MeshDistanceMaterial:P1,MeshBasicMaterial:Eh,MeshMatcapMaterial:nA,LineDashedMaterial:rA,LineBasicMaterial:xs,Material:Wr};return new i[t]}}class Px{static decodeText(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);let i="";for(let x=0,T=t.length;x0){const e=new H1(i);E=new Yd(e),E.setCrossOrigin(this.crossOrigin);for(let r=0,p=t.length;r0){T=new Yd(this.manager),T.setCrossOrigin(this.crossOrigin);for(let s=0,y=t.length;s{const f=new ys;f.min.fromArray(u.boxMin),f.max.fromArray(u.boxMax);const o=new Qr;return o.radius=u.sphereRadius,o.center.fromArray(u.sphereCenter),{boxInitialized:u.boxInitialized,box:f,sphereInitialized:u.sphereInitialized,sphere:o}}),s._maxGeometryCount=t.maxGeometryCount,s._maxVertexCount=t.maxVertexCount,s._maxIndexCount=t.maxIndexCount,s._geometryInitialized=t.geometryInitialized,s._geometryCount=t.geometryCount,s._matricesTexture=r(t.matricesTexture.uuid);break;case"LOD":s=new I2;break;case"Line":s=new xh(y(t.geometry),e(t.material));break;case"LineLoop":s=new z2(y(t.geometry),e(t.material));break;case"LineSegments":s=new Xo(y(t.geometry),e(t.material));break;case"PointCloud":case"Points":s=new G2(y(t.geometry),e(t.material));break;case"Sprite":s=new D2(e(t.material));break;case"Group":s=new Wf;break;case"Bone":s=new L1;break;default:s=new ki}if(s.uuid=t.uuid,t.name!==void 0&&(s.name=t.name),t.matrix!==void 0?(s.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=t.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(t.position!==void 0&&s.position.fromArray(t.position),t.rotation!==void 0&&s.rotation.fromArray(t.rotation),t.quaternion!==void 0&&s.quaternion.fromArray(t.quaternion),t.scale!==void 0&&s.scale.fromArray(t.scale)),t.up!==void 0&&s.up.fromArray(t.up),t.castShadow!==void 0&&(s.castShadow=t.castShadow),t.receiveShadow!==void 0&&(s.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(s.shadow.bias=t.shadow.bias),t.shadow.normalBias!==void 0&&(s.shadow.normalBias=t.shadow.normalBias),t.shadow.radius!==void 0&&(s.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(s.visible=t.visible),t.frustumCulled!==void 0&&(s.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(s.renderOrder=t.renderOrder),t.userData!==void 0&&(s.userData=t.userData),t.layers!==void 0&&(s.layers.mask=t.layers),t.children!==void 0){const a=t.children;for(let l=0;l"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,i,x,T){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const E=this,s=Ml.get(t);if(s!==void 0){if(E.manager.itemStart(t),s.then){s.then(r=>{i&&i(r),E.manager.itemEnd(t)}).catch(r=>{T&&T(r)});return}return setTimeout(function(){i&&i(s),E.manager.itemEnd(t)},0),s}const y={};y.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",y.headers=this.requestHeader;const e=fetch(t,y).then(function(r){return r.blob()}).then(function(r){return createImageBitmap(r,Object.assign(E.options,{colorSpaceConversion:"none"}))}).then(function(r){return Ml.add(t,r),i&&i(r),E.manager.itemEnd(t),r}).catch(function(r){T&&T(r),Ml.remove(t),E.manager.itemError(t),E.manager.itemEnd(t)});Ml.add(t,e),E.manager.itemStart(t)}}let Xv,X1=class{static getContext(){return Xv===void 0&&(Xv=new(window.AudioContext||window.webkitAudioContext)),Xv}static setContext(t){Xv=t}};class az extends Bs{constructor(t){super(t)}load(t,i,x,T){const E=this,s=new Rl(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(e){try{const r=e.slice(0);X1.getContext().decodeAudioData(r,function(h){i(h)}).catch(y)}catch(r){y(r)}},x,T);function y(e){T?T(e):console.error(e),E.manager.itemError(t)}}}const jE=new di,KE=new di,nu=new di;class oz{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Dr,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Dr,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){const i=this._cache;if(i.focus!==t.focus||i.fov!==t.fov||i.aspect!==t.aspect*this.aspect||i.near!==t.near||i.far!==t.far||i.zoom!==t.zoom||i.eyeSep!==this.eyeSep){i.focus=t.focus,i.fov=t.fov,i.aspect=t.aspect*this.aspect,i.near=t.near,i.far=t.far,i.zoom=t.zoom,i.eyeSep=this.eyeSep,nu.copy(t.projectionMatrix);const T=i.eyeSep/2,E=T*i.near/i.focus,s=i.near*Math.tan(Tu*i.fov*.5)/i.zoom;let y,e;KE.elements[12]=-T,jE.elements[12]=T,y=-s*i.aspect+E,e=s*i.aspect+E,nu.elements[0]=2*i.near/(e-y),nu.elements[8]=(e+y)/(e-y),this.cameraL.projectionMatrix.copy(nu),y=-s*i.aspect-E,e=s*i.aspect-E,nu.elements[0]=2*i.near/(e-y),nu.elements[8]=(e+y)/(e-y),this.cameraR.projectionMatrix.copy(nu)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(KE),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(jE)}}class Y1{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ZE(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const i=ZE();t=(i-this.oldTime)/1e3,this.oldTime=i,this.elapsedTime+=t}return t}}function ZE(){return(typeof performance>"u"?Date:performance).now()}const ru=new Ct,JE=new Is,lz=new Ct,su=new Ct;class hz extends ki{constructor(){super(),this.type="AudioListener",this.context=X1.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Y1}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);const i=this.context.listener,x=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(ru,JE,lz),su.set(0,0,-1).applyQuaternion(JE),i.positionX){const T=this.context.currentTime+this.timeDelta;i.positionX.linearRampToValueAtTime(ru.x,T),i.positionY.linearRampToValueAtTime(ru.y,T),i.positionZ.linearRampToValueAtTime(ru.z,T),i.forwardX.linearRampToValueAtTime(su.x,T),i.forwardY.linearRampToValueAtTime(su.y,T),i.forwardZ.linearRampToValueAtTime(su.z,T),i.upX.linearRampToValueAtTime(x.x,T),i.upY.linearRampToValueAtTime(x.y,T),i.upZ.linearRampToValueAtTime(x.z,T)}else i.setPosition(ru.x,ru.y,ru.z),i.setOrientation(su.x,su.y,su.z,x.x,x.y,x.z)}}let EA=class extends ki{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+t;const i=this.context.createBufferSource();return i.buffer=this.buffer,i.loop=this.loop,i.loopStart=this.loopStart,i.loopEnd=this.loopEnd,i.onended=this.onEnded.bind(this),i.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=i,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,i=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(let t=1,i=this.filters.length;t0&&this._mixBufferRegionAdditive(x,T,this._addIndex*i,1,i);for(let e=i,r=i+i;e!==r;++e)if(x[e]!==x[e+i]){y.setValue(x,T);break}}saveOriginalState(){const t=this.binding,i=this.buffer,x=this.valueSize,T=x*this._origIndex;t.getValue(i,T);for(let E=x,s=T;E!==s;++E)i[E]=i[T+E%x];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=this.valueSize*3;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,i=t+this.valueSize;for(let x=t;x=.5)for(let s=0;s!==E;++s)t[i+s]=t[x+s]}_slerp(t,i,x,T){Is.slerpFlat(t,i,t,i,t,x,T)}_slerpAdditive(t,i,x,T,E){const s=this._workIndex*E;Is.multiplyQuaternionsFlat(t,s,t,i,t,x),Is.slerpFlat(t,i,t,i,t,s,T)}_lerp(t,i,x,T,E){const s=1-T;for(let y=0;y!==E;++y){const e=i+y;t[e]=t[e]*s+t[x+y]*T}}_lerpAdditive(t,i,x,T,E){for(let s=0;s!==E;++s){const y=i+s;t[y]=t[y]+t[x+s]*T}}}const k1="\\[\\]\\.:\\/",dz=new RegExp("["+k1+"]","g"),j1="[^"+k1+"]",pz="[^"+k1.replace("\\.","")+"]",vz=/((?:WC+[\/:])*)/.source.replace("WC",j1),mz=/(WCOD+)?/.source.replace("WCOD",pz),gz=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",j1),yz=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",j1),xz=new RegExp("^"+vz+mz+gz+yz+"$"),Sz=["material","materials","bones","map"];class Tz{constructor(t,i,x){const T=x||Yi.parseTrackName(i);this._targetGroup=t,this._bindings=t.subscribe_(i,T)}getValue(t,i){this.bind();const x=this._targetGroup.nCachedObjects_,T=this._bindings[x];T!==void 0&&T.getValue(t,i)}setValue(t,i){const x=this._bindings;for(let T=this._targetGroup.nCachedObjects_,E=x.length;T!==E;++T)x[T].setValue(t,i)}bind(){const t=this._bindings;for(let i=this._targetGroup.nCachedObjects_,x=t.length;i!==x;++i)t[i].bind()}unbind(){const t=this._bindings;for(let i=this._targetGroup.nCachedObjects_,x=t.length;i!==x;++i)t[i].unbind()}}class Yi{constructor(t,i,x){this.path=i,this.parsedPath=x||Yi.parseTrackName(i),this.node=Yi.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,i,x){return t&&t.isAnimationObjectGroup?new Yi.Composite(t,i,x):new Yi(t,i,x)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(dz,"")}static parseTrackName(t){const i=xz.exec(t);if(i===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const x={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},T=x.nodeName&&x.nodeName.lastIndexOf(".");if(T!==void 0&&T!==-1){const E=x.nodeName.substring(T+1);Sz.indexOf(E)!==-1&&(x.nodeName=x.nodeName.substring(0,T),x.objectName=E)}if(x.propertyName===null||x.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return x}static findNode(t,i){if(i===void 0||i===""||i==="."||i===-1||i===t.name||i===t.uuid)return t;if(t.skeleton){const x=t.skeleton.getBoneByName(i);if(x!==void 0)return x}if(t.children){const x=function(E){for(let s=0;s=E){const h=E++,a=t[h];i[a.uuid]=p,t[p]=a,i[r]=h,t[h]=e;for(let l=0,n=T;l!==n;++l){const u=x[l],f=u[h],o=u[p];u[p]=f,u[h]=o}}}this.nCachedObjects_=E}uncache(){const t=this._objects,i=this._indicesByUUID,x=this._bindings,T=x.length;let E=this.nCachedObjects_,s=t.length;for(let y=0,e=arguments.length;y!==e;++y){const r=arguments[y],p=r.uuid,h=i[p];if(h!==void 0)if(delete i[p],h0&&(i[l.uuid]=h),t[h]=l,t.pop();for(let n=0,u=T;n!==u;++n){const f=x[n];f[h]=f[a],f.pop()}}}this.nCachedObjects_=E}subscribe_(t,i){const x=this._bindingsIndicesByPath;let T=x[t];const E=this._bindings;if(T!==void 0)return E[T];const s=this._paths,y=this._parsedPaths,e=this._objects,r=e.length,p=this.nCachedObjects_,h=new Array(r);T=E.length,x[t]=T,s.push(t),y.push(i),E.push(h);for(let a=p,l=e.length;a!==l;++a){const n=e[a];h[a]=new Yi(n,t,i)}return h}unsubscribe_(t){const i=this._bindingsIndicesByPath,x=i[t];if(x!==void 0){const T=this._paths,E=this._parsedPaths,s=this._bindings,y=s.length-1,e=s[y],r=t[y];i[r]=x,s[x]=e,s.pop(),E[x]=E[y],E.pop(),T[x]=T[y],T.pop()}}}class CA{constructor(t,i,x=null,T=i.blendMode){this._mixer=t,this._clip=i,this._localRoot=x,this.blendMode=T;const E=i.tracks,s=E.length,y=new Array(s),e={endingStart:mu,endingEnd:mu};for(let r=0;r!==s;++r){const p=E[r].createInterpolant(null);y[r]=p,p.settings=e}this._interpolantSettings=e,this._interpolants=y,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=n2,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,i){return this.loop=t,this.repetitions=i,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,i,x){if(t.fadeOut(i),this.fadeIn(i),x){const T=this._clip.duration,E=t._clip.duration,s=E/T,y=T/E;t.warp(1,s,i),this.warp(y,1,i)}return this}crossFadeTo(t,i,x){return t.crossFadeFrom(this,i,x)}stopFading(){const t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,i,x){const T=this._mixer,E=T.time,s=this.timeScale;let y=this._timeScaleInterpolant;y===null&&(y=T._lendControlInterpolant(),this._timeScaleInterpolant=y);const e=y.parameterPositions,r=y.sampleValues;return e[0]=E,e[1]=E+x,r[0]=t/s,r[1]=i/s,this}stopWarping(){const t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,i,x,T){if(!this.enabled){this._updateWeight(t);return}const E=this._startTime;if(E!==null){const e=(t-E)*x;e<0||x===0?i=0:(this._startTime=null,i=x*e)}i*=this._updateTimeScale(t);const s=this._updateTime(i),y=this._updateWeight(t);if(y>0){const e=this._interpolants,r=this._propertyBindings;switch(this.blendMode){case m1:for(let p=0,h=e.length;p!==h;++p)e[p].evaluate(s),r[p].accumulateAdditive(y);break;case fg:default:for(let p=0,h=e.length;p!==h;++p)e[p].evaluate(s),r[p].accumulate(T,y)}}}_updateWeight(t){let i=0;if(this.enabled){i=this.weight;const x=this._weightInterpolant;if(x!==null){const T=x.evaluate(t)[0];i*=T,t>x.parameterPositions[1]&&(this.stopFading(),T===0&&(this.enabled=!1))}}return this._effectiveWeight=i,i}_updateTimeScale(t){let i=0;if(!this.paused){i=this.timeScale;const x=this._timeScaleInterpolant;if(x!==null){const T=x.evaluate(t)[0];i*=T,t>x.parameterPositions[1]&&(this.stopWarping(),i===0?this.paused=!0:this.timeScale=i)}}return this._effectiveTimeScale=i,i}_updateTime(t){const i=this._clip.duration,x=this.loop;let T=this.time+t,E=this._loopCount;const s=x===r2;if(t===0)return E===-1?T:s&&(E&1)===1?i-T:T;if(x===i2){E===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(T>=i)T=i;else if(T<0)T=0;else{this.time=T;break t}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=T,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(E===-1&&(t>=0?(E=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),T>=i||T<0){const y=Math.floor(T/i);T-=i*y,E+=Math.abs(y);const e=this.repetitions-E;if(e<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,T=t>0?i:0,this.time=T,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(e===1){const r=t<0;this._setEndings(r,!r,s)}else this._setEndings(!1,!1,s);this._loopCount=E,this.time=T,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:y})}}else this.time=T;if(s&&(E&1)===1)return i-T}return T}_setEndings(t,i,x){const T=this._interpolantSettings;x?(T.endingStart=gu,T.endingEnd=gu):(t?T.endingStart=this.zeroSlopeAtStart?gu:mu:T.endingStart=Ld,i?T.endingEnd=this.zeroSlopeAtEnd?gu:mu:T.endingEnd=Ld)}_scheduleFading(t,i,x){const T=this._mixer,E=T.time;let s=this._weightInterpolant;s===null&&(s=T._lendControlInterpolant(),this._weightInterpolant=s);const y=s.parameterPositions,e=s.sampleValues;return y[0]=E,e[0]=i,y[1]=E+t,e[1]=x,this}}const Mz=new Float32Array(1);class Cz extends bl{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,i){const x=t._localRoot||this._root,T=t._clip.tracks,E=T.length,s=t._propertyBindings,y=t._interpolants,e=x.uuid,r=this._bindingsByRootAndName;let p=r[e];p===void 0&&(p={},r[e]=p);for(let h=0;h!==E;++h){const a=T[h],l=a.name;let n=p[l];if(n!==void 0)++n.referenceCount,s[h]=n;else{if(n=s[h],n!==void 0){n._cacheIndex===null&&(++n.referenceCount,this._addInactiveBinding(n,e,l));continue}const u=i&&i._propertyBindings[h].binding.parsedPath;n=new MA(Yi.create(x,l,u),a.ValueTypeName,a.getValueSize()),++n.referenceCount,this._addInactiveBinding(n,e,l),s[h]=n}y[h].resultBuffer=n.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){const x=(t._localRoot||this._root).uuid,T=t._clip.uuid,E=this._actionsByClip[T];this._bindAction(t,E&&E.knownActions[0]),this._addInactiveAction(t,T,x)}const i=t._propertyBindings;for(let x=0,T=i.length;x!==T;++x){const E=i[x];E.useCount++===0&&(this._lendBinding(E),E.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const i=t._propertyBindings;for(let x=0,T=i.length;x!==T;++x){const E=i[x];--E.useCount===0&&(E.restoreOriginalState(),this._takeBackBinding(E))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const i=t._cacheIndex;return i!==null&&i=0;--x)t[x].stop();return this}update(t){t*=this.timeScale;const i=this._actions,x=this._nActiveActions,T=this.time+=t,E=Math.sign(t),s=this._accuIndex^=1;for(let r=0;r!==x;++r)i[r]._update(T,t,E,s);const y=this._bindings,e=this._nActiveBindings;for(let r=0;r!==e;++r)y[r].apply(s);return this}setTime(t){this.time=0;for(let i=0;ithis.max.x||t.ythis.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,i){return i.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)}clampPoint(t,i){return i.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,_E).distanceTo(t)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const qE=new Ct,Yv=new Ct;class Oz{constructor(t=new Ct,i=new Ct){this.start=t,this.end=i}set(t,i){return this.start.copy(t),this.end.copy(i),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,i){return this.delta(i).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,i){qE.subVectors(t,this.start),Yv.subVectors(this.end,this.start);const x=Yv.dot(Yv);let E=Yv.dot(qE)/x;return i&&(E=Zn(E,0,1)),E}closestPointToPoint(t,i,x){const T=this.closestPointToPointParameter(t,i);return this.delta(x).multiplyScalar(T).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const tM=new Ct;class Dz extends ki{constructor(t,i){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="SpotLightHelper";const x=new Fi,T=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,y=1,e=32;s1)for(let h=0;h.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{sM.set(t.z,0,-t.x).normalize();const i=Math.acos(t.y);this.quaternion.setFromAxisAngle(sM,i)}}setLength(t,i=t*.2,x=i*.2){this.line.scale.set(1,Math.max(1e-4,t-i),1),this.line.updateMatrix(),this.cone.scale.set(x,i,x),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class jz extends Xo{constructor(t=1){const i=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],x=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],T=new Fi;T.setAttribute("position",new ke(i,3)),T.setAttribute("color",new ke(x,3));const E=new xs({vertexColors:!0,toneMapped:!1});super(T,E),this.type="AxesHelper"}setColors(t,i,x){const T=new ze,E=this.geometry.attributes.color.array;return T.set(t),T.toArray(E,0),T.toArray(E,3),T.set(i),T.toArray(E,6),T.toArray(E,9),T.set(x),T.toArray(E,12),T.toArray(E,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Kz{constructor(){this.type="ShapePath",this.color=new ze,this.subPaths=[],this.currentPath=null}moveTo(t,i){return this.currentPath=new Ud,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,i),this}lineTo(t,i){return this.currentPath.lineTo(t,i),this}quadraticCurveTo(t,i,x,T){return this.currentPath.quadraticCurveTo(t,i,x,T),this}bezierCurveTo(t,i,x,T,E,s){return this.currentPath.bezierCurveTo(t,i,x,T,E,s),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t){function i(o){const c=[];for(let d=0,v=o.length;dNumber.EPSILON){if(A<0&&(M=c[S],C=-C,w=c[m],A=-A),o.yw.y)continue;if(o.y===M.y){if(o.x===M.x)return!0}else{const P=A*(o.x-M.x)-C*(o.y-M.y);if(P===0)return!0;if(P<0)continue;v=!v}}else{if(o.y!==M.y)continue;if(w.x<=o.x&&o.x<=M.x||M.x<=o.x&&o.x<=w.x)return!0}}return v}const T=Vo.isClockWise,E=this.subPaths;if(E.length===0)return[];let s,y,e;const r=[];if(E.length===1)return y=E[0],e=new wu,e.curves=y.curves,r.push(e),r;let p=!T(E[0].getPoints());p=t?!p:p;const h=[],a=[];let l=[],n=0,u;a[n]=void 0,l[n]=[];for(let o=0,c=E.length;o1){let o=!1,c=0;for(let d=0,v=a.length;d0&&o===!1&&(l=h)}let f;for(let o=0,c=a.length;o=0&&(v[J]=null,d[J].disconnect(H))}for(let U=0;U=v.length){v.push(H),J=q;break}else if(v[q]===null){v[q]=H,J=q;break}if(J===-1)break}const _=d[J];_&&_.connect(H)}}const B=new Ct,G=new Ct;function z(Z,U,H){B.setFromMatrixPosition(U.matrixWorld),G.setFromMatrixPosition(H.matrixWorld);const J=B.distanceTo(G),_=U.projectionMatrix.elements,q=H.projectionMatrix.elements,at=_[14]/(_[10]-1),ot=_[14]/(_[10]+1),rt=(_[9]+1)/_[5],gt=(_[9]-1)/_[5],yt=(_[8]-1)/_[0],Et=(q[8]+1)/q[0],At=at*yt,Pt=at*Et,Vt=J/(-yt+Et),dt=Vt*-yt;U.matrixWorld.decompose(Z.position,Z.quaternion,Z.scale),Z.translateX(dt),Z.translateZ(Vt),Z.matrixWorld.compose(Z.position,Z.quaternion,Z.scale),Z.matrixWorldInverse.copy(Z.matrixWorld).invert();const ut=at+Vt,Rt=ot+Vt,Dt=At-dt,Ht=Pt+(J-dt),Bt=rt*ot/Rt*ut,re=gt*ot/Rt*ut;Z.projectionMatrix.makePerspective(Dt,Ht,Bt,re,ut,Rt),Z.projectionMatrixInverse.copy(Z.projectionMatrix).invert()}function X(Z,U){U===null?Z.matrixWorld.copy(Z.matrix):Z.matrixWorld.multiplyMatrices(U.matrixWorld,Z.matrix),Z.matrixWorldInverse.copy(Z.matrixWorld).invert()}this.updateCamera=function(Z){if(T===null)return;u.texture!==null&&(Z.near=u.depthNear,Z.far=u.depthFar),A.near=w.near=M.near=Z.near,A.far=w.far=M.far=Z.far,(P!==A.near||b!==A.far)&&(T.updateRenderState({depthNear:A.near,depthFar:A.far}),P=A.near,b=A.far,M.near=P,M.far=b,w.near=P,w.far=b,M.updateProjectionMatrix(),w.updateProjectionMatrix(),Z.updateProjectionMatrix());const U=Z.parent,H=A.cameras;X(A,U);for(let J=0;J0&&(f.alphaTest.value=o.alphaTest);const c=t.get(o).envMap;if(c&&(f.envMap.value=c,f.flipEnvMap.value=c.isCubeTexture&&c.isRenderTargetTexture===!1?-1:1,f.reflectivity.value=o.reflectivity,f.ior.value=o.ior,f.refractionRatio.value=o.refractionRatio),o.lightMap){f.lightMap.value=o.lightMap;const d=g._useLegacyLights===!0?Math.PI:1;f.lightMapIntensity.value=o.lightMapIntensity*d,i(o.lightMap,f.lightMapTransform)}o.aoMap&&(f.aoMap.value=o.aoMap,f.aoMapIntensity.value=o.aoMapIntensity,i(o.aoMap,f.aoMapTransform))}function s(f,o){f.diffuse.value.copy(o.color),f.opacity.value=o.opacity,o.map&&(f.map.value=o.map,i(o.map,f.mapTransform))}function y(f,o){f.dashSize.value=o.dashSize,f.totalSize.value=o.dashSize+o.gapSize,f.scale.value=o.scale}function e(f,o,c,d){f.diffuse.value.copy(o.color),f.opacity.value=o.opacity,f.size.value=o.size*c,f.scale.value=d*.5,o.map&&(f.map.value=o.map,i(o.map,f.uvTransform)),o.alphaMap&&(f.alphaMap.value=o.alphaMap,i(o.alphaMap,f.alphaMapTransform)),o.alphaTest>0&&(f.alphaTest.value=o.alphaTest)}function r(f,o){f.diffuse.value.copy(o.color),f.opacity.value=o.opacity,f.rotation.value=o.rotation,o.map&&(f.map.value=o.map,i(o.map,f.mapTransform)),o.alphaMap&&(f.alphaMap.value=o.alphaMap,i(o.alphaMap,f.alphaMapTransform)),o.alphaTest>0&&(f.alphaTest.value=o.alphaTest)}function p(f,o){f.specular.value.copy(o.specular),f.shininess.value=Math.max(o.shininess,1e-4)}function h(f,o){o.gradientMap&&(f.gradientMap.value=o.gradientMap)}function a(f,o){f.metalness.value=o.metalness,o.metalnessMap&&(f.metalnessMap.value=o.metalnessMap,i(o.metalnessMap,f.metalnessMapTransform)),f.roughness.value=o.roughness,o.roughnessMap&&(f.roughnessMap.value=o.roughnessMap,i(o.roughnessMap,f.roughnessMapTransform)),t.get(o).envMap&&(f.envMapIntensity.value=o.envMapIntensity)}function l(f,o,c){f.ior.value=o.ior,o.sheen>0&&(f.sheenColor.value.copy(o.sheenColor).multiplyScalar(o.sheen),f.sheenRoughness.value=o.sheenRoughness,o.sheenColorMap&&(f.sheenColorMap.value=o.sheenColorMap,i(o.sheenColorMap,f.sheenColorMapTransform)),o.sheenRoughnessMap&&(f.sheenRoughnessMap.value=o.sheenRoughnessMap,i(o.sheenRoughnessMap,f.sheenRoughnessMapTransform))),o.clearcoat>0&&(f.clearcoat.value=o.clearcoat,f.clearcoatRoughness.value=o.clearcoatRoughness,o.clearcoatMap&&(f.clearcoatMap.value=o.clearcoatMap,i(o.clearcoatMap,f.clearcoatMapTransform)),o.clearcoatRoughnessMap&&(f.clearcoatRoughnessMap.value=o.clearcoatRoughnessMap,i(o.clearcoatRoughnessMap,f.clearcoatRoughnessMapTransform)),o.clearcoatNormalMap&&(f.clearcoatNormalMap.value=o.clearcoatNormalMap,i(o.clearcoatNormalMap,f.clearcoatNormalMapTransform),f.clearcoatNormalScale.value.copy(o.clearcoatNormalScale),o.side===gs&&f.clearcoatNormalScale.value.negate())),o.iridescence>0&&(f.iridescence.value=o.iridescence,f.iridescenceIOR.value=o.iridescenceIOR,f.iridescenceThicknessMinimum.value=o.iridescenceThicknessRange[0],f.iridescenceThicknessMaximum.value=o.iridescenceThicknessRange[1],o.iridescenceMap&&(f.iridescenceMap.value=o.iridescenceMap,i(o.iridescenceMap,f.iridescenceMapTransform)),o.iridescenceThicknessMap&&(f.iridescenceThicknessMap.value=o.iridescenceThicknessMap,i(o.iridescenceThicknessMap,f.iridescenceThicknessMapTransform))),o.transmission>0&&(f.transmission.value=o.transmission,f.transmissionSamplerMap.value=c.texture,f.transmissionSamplerSize.value.set(c.width,c.height),o.transmissionMap&&(f.transmissionMap.value=o.transmissionMap,i(o.transmissionMap,f.transmissionMapTransform)),f.thickness.value=o.thickness,o.thicknessMap&&(f.thicknessMap.value=o.thicknessMap,i(o.thicknessMap,f.thicknessMapTransform)),f.attenuationDistance.value=o.attenuationDistance,f.attenuationColor.value.copy(o.attenuationColor)),o.anisotropy>0&&(f.anisotropyVector.value.set(o.anisotropy*Math.cos(o.anisotropyRotation),o.anisotropy*Math.sin(o.anisotropyRotation)),o.anisotropyMap&&(f.anisotropyMap.value=o.anisotropyMap,i(o.anisotropyMap,f.anisotropyMapTransform))),f.specularIntensity.value=o.specularIntensity,f.specularColor.value.copy(o.specularColor),o.specularColorMap&&(f.specularColorMap.value=o.specularColorMap,i(o.specularColorMap,f.specularColorMapTransform)),o.specularIntensityMap&&(f.specularIntensityMap.value=o.specularIntensityMap,i(o.specularIntensityMap,f.specularIntensityMapTransform))}function n(f,o){o.matcap&&(f.matcap.value=o.matcap)}function u(f,o){const c=t.get(o).light;f.referencePosition.value.setFromMatrixPosition(c.matrixWorld),f.nearDistance.value=c.shadow.camera.near,f.farDistance.value=c.shadow.camera.far}return{refreshFogUniforms:x,refreshMaterialUniforms:T}}function nU(g,t,i,x){let T={},E={},s=[];const y=i.isWebGL2?g.getParameter(g.MAX_UNIFORM_BUFFER_BINDINGS):0;function e(c,d){const v=d.program;x.uniformBlockBinding(c,v)}function r(c,d){let v=T[c.id];v===void 0&&(n(c),v=p(c),T[c.id]=v,c.addEventListener("dispose",f));const m=d.program;x.updateUBOMapping(c,m);const S=t.render.frame;E[c.id]!==S&&(a(c),E[c.id]=S)}function p(c){const d=h();c.__bindingPointIndex=d;const v=g.createBuffer(),m=c.__size,S=c.usage;return g.bindBuffer(g.UNIFORM_BUFFER,v),g.bufferData(g.UNIFORM_BUFFER,m,S),g.bindBuffer(g.UNIFORM_BUFFER,null),g.bindBufferBase(g.UNIFORM_BUFFER,d,v),v}function h(){for(let c=0;c0&&(v+=m-S),c.__size=v,c.__cache={},this}function u(c){const d={boundary:0,storage:0};return typeof c=="number"||typeof c=="boolean"?(d.boundary=4,d.storage=4):c.isVector2?(d.boundary=8,d.storage=8):c.isVector3||c.isColor?(d.boundary=16,d.storage=12):c.isVector4?(d.boundary=16,d.storage=16):c.isMatrix3?(d.boundary=48,d.storage=48):c.isMatrix4?(d.boundary=64,d.storage=64):c.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",c),d}function f(c){const d=c.target;d.removeEventListener("dispose",f);const v=s.indexOf(d.__bindingPointIndex);s.splice(v,1),g.deleteBuffer(T[d.id]),delete T[d.id],delete E[d.id]}function o(){for(const c in T)g.deleteBuffer(T[c]);s=[],T={},E={}}return{bind:e,update:r,dispose:o}}class R1{constructor(t={}){const{canvas:i=m2(),context:x=null,depth:T=!0,stencil:E=!0,alpha:s=!1,antialias:y=!1,premultipliedAlpha:e=!0,preserveDrawingBuffer:r=!1,powerPreference:p="default",failIfMajorPerformanceCaveat:h=!1}=t;this.isWebGLRenderer=!0;let a;x!==null?a=x.getContextAttributes().alpha:a=s;const l=new Uint32Array(4),n=new Int32Array(4);let u=null,f=null;const o=[],c=[];this.domElement=i,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=mr,this._useLegacyLights=!1,this.toneMapping=zo,this.toneMappingExposure=1;const d=this;let v=!1,m=0,S=0,M=null,w=-1,C=null;const A=new an,P=new an;let b=null;const O=new ze(0);let I=0,D=i.width,B=i.height,G=1,z=null,X=null;const j=new an(0,0,D,B),Q=new an(0,0,D,B);let tt=!1;const Y=new ip;let Z=!1,U=!1,H=null;const J=new di,_=new ve,q=new Ct,at={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ot(){return M===null?G:1}let rt=x;function gt(Tt,Zt){for(let qt=0;qt{function Te(){if(ie.forEach(function(Ue){Vt.get(Ue).currentProgram.isReady()&&ie.delete(Ue)}),ie.size===0){ee(Tt);return}setTimeout(Te,10)}yt.get("KHR_parallel_shader_compile")!==null?Te():setTimeout(Te,10)})};let Ii=null;function nn(Tt){Ii&&Ii(Tt)}function Jn(){pi.stop()}function Vi(){pi.start()}const pi=new M2;pi.setAnimationLoop(nn),typeof self<"u"&&pi.setContext(self),this.setAnimationLoop=function(Tt){Ii=Tt,he.setAnimationLoop(Tt),Tt===null?pi.stop():pi.start()},he.addEventListener("sessionstart",Jn),he.addEventListener("sessionend",Vi),this.render=function(Tt,Zt){if(Zt!==void 0&&Zt.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(v===!0)return;Tt.matrixWorldAutoUpdate===!0&&Tt.updateMatrixWorld(),Zt.parent===null&&Zt.matrixWorldAutoUpdate===!0&&Zt.updateMatrixWorld(),he.enabled===!0&&he.isPresenting===!0&&(he.cameraAutoUpdate===!0&&he.updateCamera(Zt),Zt=he.getCamera()),Tt.isScene===!0&&Tt.onBeforeRender(d,Tt,Zt,M),f=xe.get(Tt,c.length),f.init(),c.push(f),J.multiplyMatrices(Zt.projectionMatrix,Zt.matrixWorldInverse),Y.setFromProjectionMatrix(J),U=this.localClippingEnabled,Z=Pe.init(this.clippingPlanes,U),u=ge.get(Tt,o.length),u.init(),o.push(u),Xi(Tt,Zt,0,d.sortObjects),u.finish(),d.sortObjects===!0&&u.sort(z,X),this.info.render.frame++,Z===!0&&Pe.beginShadows();const qt=f.state.shadowsArray;if(te.render(qt,Tt,Zt),Z===!0&&Pe.endShadows(),this.info.autoReset===!0&&this.info.reset(),(he.enabled===!1||he.isPresenting===!1||he.hasDepthSensing()===!1)&&Ge.render(u,Tt),f.setupLights(d._useLegacyLights),Zt.isArrayCamera){const ie=Zt.cameras;for(let ee=0,Te=ie.length;ee0?f=c[c.length-1]:f=null,o.pop(),o.length>0?u=o[o.length-1]:u=null};function Xi(Tt,Zt,qt,ie){if(Tt.visible===!1)return;if(Tt.layers.test(Zt.layers)){if(Tt.isGroup)qt=Tt.renderOrder;else if(Tt.isLOD)Tt.autoUpdate===!0&&Tt.update(Zt);else if(Tt.isLight)f.pushLight(Tt),Tt.castShadow&&f.pushShadow(Tt);else if(Tt.isSprite){if(!Tt.frustumCulled||Y.intersectsSprite(Tt)){ie&&q.setFromMatrixPosition(Tt.matrixWorld).applyMatrix4(J);const Ue=Bt.update(Tt),We=Tt.material;We.visible&&u.push(Tt,Ue,We,qt,q.z,null)}}else if((Tt.isMesh||Tt.isLine||Tt.isPoints)&&(!Tt.frustumCulled||Y.intersectsObject(Tt))){const Ue=Bt.update(Tt),We=Tt.material;if(ie&&(Tt.boundingSphere!==void 0?(Tt.boundingSphere===null&&Tt.computeBoundingSphere(),q.copy(Tt.boundingSphere.center)):(Ue.boundingSphere===null&&Ue.computeBoundingSphere(),q.copy(Ue.boundingSphere.center)),q.applyMatrix4(Tt.matrixWorld).applyMatrix4(J)),Array.isArray(We)){const $e=Ue.groups;for(let ti=0,ni=$e.length;ti0&&oa(ee,Te,Zt,qt),ie&&At.viewport(A.copy(ie)),ee.length>0&&Us(ee,Zt,qt),Te.length>0&&Us(Te,Zt,qt),Ue.length>0&&Us(Ue,Zt,qt),At.buffers.depth.setTest(!0),At.buffers.depth.setMask(!0),At.buffers.color.setMask(!0),At.setPolygonOffset(!1)}function oa(Tt,Zt,qt,ie){if((qt.isScene===!0?qt.overrideMaterial:null)!==null)return;const Te=Et.isWebGL2;H===null&&(H=new ro(1,1,{generateMipmaps:!0,type:yt.has("EXT_color_buffer_half_float")?qf:Go,minFilter:Bo,samples:Te?4:0})),d.getDrawingBufferSize(_),Te?H.setSize(_.x,_.y):H.setSize(Am(_.x),Am(_.y));const Ue=d.getRenderTarget();d.setRenderTarget(H),d.getClearColor(O),I=d.getClearAlpha(),I<1&&d.setClearColor(16777215,.5),d.clear();const We=d.toneMapping;d.toneMapping=zo,Us(Tt,qt,ie),dt.updateMultisampleRenderTarget(H),dt.updateRenderTargetMipmap(H);let $e=!1;for(let ti=0,ni=Zt.length;ti0),oi=!!qt.morphAttributes.position,$i=!!qt.morphAttributes.normal,un=!!qt.morphAttributes.color;let ji=zo;ie.toneMapped&&(M===null||M.isXRRenderTarget===!0)&&(ji=d.toneMapping);const yn=qt.morphAttributes.position||qt.morphAttributes.normal||qt.morphAttributes.color,ei=yn!==void 0?yn.length:0,Se=Vt.get(ie),Br=f.state.lights;if(Z===!0&&(U===!0||Tt!==C)){const En=Tt===C&&ie.id===w;Pe.setState(ie,Tt,En)}let gi=!1;ie.version===Se.__version?(Se.needsLights&&Se.lightsStateVersion!==Br.state.version||Se.outputColorSpace!==We||ee.isBatchedMesh&&Se.batching===!1||!ee.isBatchedMesh&&Se.batching===!0||ee.isInstancedMesh&&Se.instancing===!1||!ee.isInstancedMesh&&Se.instancing===!0||ee.isSkinnedMesh&&Se.skinning===!1||!ee.isSkinnedMesh&&Se.skinning===!0||ee.isInstancedMesh&&Se.instancingColor===!0&&ee.instanceColor===null||ee.isInstancedMesh&&Se.instancingColor===!1&&ee.instanceColor!==null||Se.envMap!==$e||ie.fog===!0&&Se.fog!==Te||Se.numClippingPlanes!==void 0&&(Se.numClippingPlanes!==Pe.numPlanes||Se.numIntersection!==Pe.numIntersection)||Se.vertexAlphas!==ti||Se.vertexTangents!==ni||Se.morphTargets!==oi||Se.morphNormals!==$i||Se.morphColors!==un||Se.toneMapping!==ji||Et.isWebGL2===!0&&Se.morphTargetsCount!==ei)&&(gi=!0):(gi=!0,Se.__version=ie.version);let fn=Se.currentProgram;gi===!0&&(fn=lo(ie,Zt,ee));let Ni=!1,Vn=!1,vn=!1;const Ki=fn.getUniforms(),pr=Se.uniforms;if(At.useProgram(fn.program)&&(Ni=!0,Vn=!0,vn=!0),ie.id!==w&&(w=ie.id,Vn=!0),Ni||C!==Tt){Ki.setValue(rt,"projectionMatrix",Tt.projectionMatrix),Ki.setValue(rt,"viewMatrix",Tt.matrixWorldInverse);const En=Ki.map.cameraPosition;En!==void 0&&En.setValue(rt,q.setFromMatrixPosition(Tt.matrixWorld)),Et.logarithmicDepthBuffer&&Ki.setValue(rt,"logDepthBufFC",2/(Math.log(Tt.far+1)/Math.LN2)),(ie.isMeshPhongMaterial||ie.isMeshToonMaterial||ie.isMeshLambertMaterial||ie.isMeshBasicMaterial||ie.isMeshStandardMaterial||ie.isShaderMaterial)&&Ki.setValue(rt,"isOrthographic",Tt.isOrthographicCamera===!0),C!==Tt&&(C=Tt,Vn=!0,vn=!0)}if(ee.isSkinnedMesh){Ki.setOptional(rt,ee,"bindMatrix"),Ki.setOptional(rt,ee,"bindMatrixInverse");const En=ee.skeleton;En&&(Et.floatVertexTextures?(En.boneTexture===null&&En.computeBoneTexture(),Ki.setValue(rt,"boneTexture",En.boneTexture,dt)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}ee.isBatchedMesh&&(Ki.setOptional(rt,ee,"batchingTexture"),Ki.setValue(rt,"batchingTexture",ee._matricesTexture,dt));const Gs=qt.morphAttributes;if((Gs.position!==void 0||Gs.normal!==void 0||Gs.color!==void 0&&Et.isWebGL2===!0)&&Oe.update(ee,qt,fn),(Vn||Se.receiveShadow!==ee.receiveShadow)&&(Se.receiveShadow=ee.receiveShadow,Ki.setValue(rt,"receiveShadow",ee.receiveShadow)),ie.isMeshGouraudMaterial&&ie.envMap!==null&&(pr.envMap.value=$e,pr.flipEnvMap.value=$e.isCubeTexture&&$e.isRenderTargetTexture===!1?-1:1),Vn&&(Ki.setValue(rt,"toneMappingExposure",d.toneMappingExposure),Se.needsLights&&ho(pr,vn),Te&&ie.fog===!0&&le.refreshFogUniforms(pr,Te),le.refreshMaterialUniforms(pr,ie,G,B,H),cm.upload(rt,qr(Se),pr,dt)),ie.isShaderMaterial&&ie.uniformsNeedUpdate===!0&&(cm.upload(rt,qr(Se),pr,dt),ie.uniformsNeedUpdate=!1),ie.isSpriteMaterial&&Ki.setValue(rt,"center",ee.center),Ki.setValue(rt,"modelViewMatrix",ee.modelViewMatrix),Ki.setValue(rt,"normalMatrix",ee.normalMatrix),Ki.setValue(rt,"modelMatrix",ee.matrixWorld),ie.isShaderMaterial||ie.isRawShaderMaterial){const En=ie.uniformsGroups;for(let la=0,$n=En.length;la<$n;la++)if(Et.isWebGL2){const ba=En[la];si.update(ba,fn),si.bind(ba,fn)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return fn}function ho(Tt,Zt){Tt.ambientLightColor.needsUpdate=Zt,Tt.lightProbe.needsUpdate=Zt,Tt.directionalLights.needsUpdate=Zt,Tt.directionalLightShadows.needsUpdate=Zt,Tt.pointLights.needsUpdate=Zt,Tt.pointLightShadows.needsUpdate=Zt,Tt.spotLights.needsUpdate=Zt,Tt.spotLightShadows.needsUpdate=Zt,Tt.rectAreaLights.needsUpdate=Zt,Tt.hemisphereLights.needsUpdate=Zt}function Ll(Tt){return Tt.isMeshLambertMaterial||Tt.isMeshToonMaterial||Tt.isMeshPhongMaterial||Tt.isMeshStandardMaterial||Tt.isShadowMaterial||Tt.isShaderMaterial&&Tt.lights===!0}this.getActiveCubeFace=function(){return m},this.getActiveMipmapLevel=function(){return S},this.getRenderTarget=function(){return M},this.setRenderTargetTextures=function(Tt,Zt,qt){Vt.get(Tt.texture).__webglTexture=Zt,Vt.get(Tt.depthTexture).__webglTexture=qt;const ie=Vt.get(Tt);ie.__hasExternalTextures=!0,ie.__hasExternalTextures&&(ie.__autoAllocateDepthBuffer=qt===void 0,ie.__autoAllocateDepthBuffer||yt.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ie.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(Tt,Zt){const qt=Vt.get(Tt);qt.__webglFramebuffer=Zt,qt.__useDefaultFramebuffer=Zt===void 0},this.setRenderTarget=function(Tt,Zt=0,qt=0){M=Tt,m=Zt,S=qt;let ie=!0,ee=null,Te=!1,Ue=!1;if(Tt){const $e=Vt.get(Tt);$e.__useDefaultFramebuffer!==void 0?(At.bindFramebuffer(rt.FRAMEBUFFER,null),ie=!1):$e.__webglFramebuffer===void 0?dt.setupRenderTarget(Tt):$e.__hasExternalTextures&&dt.rebindTextures(Tt,Vt.get(Tt.texture).__webglTexture,Vt.get(Tt.depthTexture).__webglTexture);const ti=Tt.texture;(ti.isData3DTexture||ti.isDataArrayTexture||ti.isCompressedArrayTexture)&&(Ue=!0);const ni=Vt.get(Tt).__webglFramebuffer;Tt.isWebGLCubeRenderTarget?(Array.isArray(ni[Zt])?ee=ni[Zt][qt]:ee=ni[Zt],Te=!0):Et.isWebGL2&&Tt.samples>0&&dt.useMultisampledRTT(Tt)===!1?ee=Vt.get(Tt).__webglMultisampledFramebuffer:Array.isArray(ni)?ee=ni[qt]:ee=ni,A.copy(Tt.viewport),P.copy(Tt.scissor),b=Tt.scissorTest}else A.copy(j).multiplyScalar(G).floor(),P.copy(Q).multiplyScalar(G).floor(),b=tt;if(At.bindFramebuffer(rt.FRAMEBUFFER,ee)&&Et.drawBuffers&&ie&&At.drawBuffers(Tt,ee),At.viewport(A),At.scissor(P),At.setScissorTest(b),Te){const $e=Vt.get(Tt.texture);rt.framebufferTexture2D(rt.FRAMEBUFFER,rt.COLOR_ATTACHMENT0,rt.TEXTURE_CUBE_MAP_POSITIVE_X+Zt,$e.__webglTexture,qt)}else if(Ue){const $e=Vt.get(Tt.texture),ti=Zt||0;rt.framebufferTextureLayer(rt.FRAMEBUFFER,rt.COLOR_ATTACHMENT0,$e.__webglTexture,qt||0,ti)}w=-1},this.readRenderTargetPixels=function(Tt,Zt,qt,ie,ee,Te,Ue){if(!(Tt&&Tt.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let We=Vt.get(Tt).__webglFramebuffer;if(Tt.isWebGLCubeRenderTarget&&Ue!==void 0&&(We=We[Ue]),We){At.bindFramebuffer(rt.FRAMEBUFFER,We);try{const $e=Tt.texture,ti=$e.format,ni=$e.type;if(ti!==vs&&ne.convert(ti)!==rt.getParameter(rt.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const oi=ni===qf&&(yt.has("EXT_color_buffer_half_float")||Et.isWebGL2&&yt.has("EXT_color_buffer_float"));if(ni!==Go&&ne.convert(ni)!==rt.getParameter(rt.IMPLEMENTATION_COLOR_READ_TYPE)&&!(ni===Ma&&(Et.isWebGL2||yt.has("OES_texture_float")||yt.has("WEBGL_color_buffer_float")))&&!oi){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Zt>=0&&Zt<=Tt.width-ie&&qt>=0&&qt<=Tt.height-ee&&rt.readPixels(Zt,qt,ie,ee,ne.convert(ti),ne.convert(ni),Te)}finally{const $e=M!==null?Vt.get(M).__webglFramebuffer:null;At.bindFramebuffer(rt.FRAMEBUFFER,$e)}}},this.copyFramebufferToTexture=function(Tt,Zt,qt=0){const ie=Math.pow(2,-qt),ee=Math.floor(Zt.image.width*ie),Te=Math.floor(Zt.image.height*ie);dt.setTexture2D(Zt,0),rt.copyTexSubImage2D(rt.TEXTURE_2D,qt,0,0,Tt.x,Tt.y,ee,Te),At.unbindTexture()},this.copyTextureToTexture=function(Tt,Zt,qt,ie=0){const ee=Zt.image.width,Te=Zt.image.height,Ue=ne.convert(qt.format),We=ne.convert(qt.type);dt.setTexture2D(qt,0),rt.pixelStorei(rt.UNPACK_FLIP_Y_WEBGL,qt.flipY),rt.pixelStorei(rt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,qt.premultiplyAlpha),rt.pixelStorei(rt.UNPACK_ALIGNMENT,qt.unpackAlignment),Zt.isDataTexture?rt.texSubImage2D(rt.TEXTURE_2D,ie,Tt.x,Tt.y,ee,Te,Ue,We,Zt.image.data):Zt.isCompressedTexture?rt.compressedTexSubImage2D(rt.TEXTURE_2D,ie,Tt.x,Tt.y,Zt.mipmaps[0].width,Zt.mipmaps[0].height,Ue,Zt.mipmaps[0].data):rt.texSubImage2D(rt.TEXTURE_2D,ie,Tt.x,Tt.y,Ue,We,Zt.image),ie===0&&qt.generateMipmaps&&rt.generateMipmap(rt.TEXTURE_2D),At.unbindTexture()},this.copyTextureToTexture3D=function(Tt,Zt,qt,ie,ee=0){if(d.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Te=Tt.max.x-Tt.min.x+1,Ue=Tt.max.y-Tt.min.y+1,We=Tt.max.z-Tt.min.z+1,$e=ne.convert(ie.format),ti=ne.convert(ie.type);let ni;if(ie.isData3DTexture)dt.setTexture3D(ie,0),ni=rt.TEXTURE_3D;else if(ie.isDataArrayTexture||ie.isCompressedArrayTexture)dt.setTexture2DArray(ie,0),ni=rt.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}rt.pixelStorei(rt.UNPACK_FLIP_Y_WEBGL,ie.flipY),rt.pixelStorei(rt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ie.premultiplyAlpha),rt.pixelStorei(rt.UNPACK_ALIGNMENT,ie.unpackAlignment);const oi=rt.getParameter(rt.UNPACK_ROW_LENGTH),$i=rt.getParameter(rt.UNPACK_IMAGE_HEIGHT),un=rt.getParameter(rt.UNPACK_SKIP_PIXELS),ji=rt.getParameter(rt.UNPACK_SKIP_ROWS),yn=rt.getParameter(rt.UNPACK_SKIP_IMAGES),ei=qt.isCompressedTexture?qt.mipmaps[ee]:qt.image;rt.pixelStorei(rt.UNPACK_ROW_LENGTH,ei.width),rt.pixelStorei(rt.UNPACK_IMAGE_HEIGHT,ei.height),rt.pixelStorei(rt.UNPACK_SKIP_PIXELS,Tt.min.x),rt.pixelStorei(rt.UNPACK_SKIP_ROWS,Tt.min.y),rt.pixelStorei(rt.UNPACK_SKIP_IMAGES,Tt.min.z),qt.isDataTexture||qt.isData3DTexture?rt.texSubImage3D(ni,ee,Zt.x,Zt.y,Zt.z,Te,Ue,We,$e,ti,ei.data):qt.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),rt.compressedTexSubImage3D(ni,ee,Zt.x,Zt.y,Zt.z,Te,Ue,We,$e,ei.data)):rt.texSubImage3D(ni,ee,Zt.x,Zt.y,Zt.z,Te,Ue,We,$e,ti,ei),rt.pixelStorei(rt.UNPACK_ROW_LENGTH,oi),rt.pixelStorei(rt.UNPACK_IMAGE_HEIGHT,$i),rt.pixelStorei(rt.UNPACK_SKIP_PIXELS,un),rt.pixelStorei(rt.UNPACK_SKIP_ROWS,ji),rt.pixelStorei(rt.UNPACK_SKIP_IMAGES,yn),ee===0&&ie.generateMipmaps&&rt.generateMipmap(ni),At.unbindTexture()},this.initTexture=function(Tt){Tt.isCubeTexture?dt.setTextureCube(Tt,0):Tt.isData3DTexture?dt.setTexture3D(Tt,0):Tt.isDataArrayTexture||Tt.isCompressedArrayTexture?dt.setTexture2DArray(Tt,0):dt.setTexture2D(Tt,0),At.unbindTexture()},this.resetState=function(){m=0,S=0,M=null,At.reset(),je.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Uo}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const i=this.getContext();i.drawingBufferColorSpace=t===cg?"display-p3":"srgb",i.unpackColorSpace=sn.workingColorSpace===qd?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===mr?vh:g1}set outputEncoding(t){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=t===vh?mr:Ho}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}}class F2 extends R1{}F2.prototype.isWebGL1Renderer=!0;class vg{constructor(t,i=25e-5){this.isFogExp2=!0,this.name="",this.color=new ze(t),this.density=i}clone(){return new vg(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class mg{constructor(t,i=1,x=1e3){this.isFog=!0,this.name="",this.color=new ze(t),this.near=i,this.far=x}clone(){return new mg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Pm extends ki{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,i){return super.copy(t,i),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const i=super.toJSON(t);return this.fog!==null&&(i.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(i.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(i.object.backgroundIntensity=this.backgroundIntensity),i}}class gg{constructor(t,i){this.isInterleavedBuffer=!0,this.array=t,this.stride=i,this.count=t!==void 0?t.length/i:0,this.usage=Id,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=ra()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return Eu("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,i){this.updateRanges.push({start:t,count:i})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,i,x){t*=this.stride,x*=i.stride;for(let T=0,E=this.stride;Tt.far||i.push({distance:e,point:Qc.clone(),uv:na.getInterpolation(Qc,Av,qc,Pv,vE,K0,mE,new ve),face:null,object:this})}copy(t,i){return super.copy(t,i),t.center!==void 0&&this.center.copy(t.center),this.material=t.material,this}}function Rv(g,t,i,x,T,E){bf.subVectors(g,i).addScalar(.5).multiply(x),T!==void 0?(_c.x=E*bf.x-T*bf.y,_c.y=T*bf.x+E*bf.y):_c.copy(bf),g.copy(t),g.x+=_c.x,g.y+=_c.y,g.applyMatrix4(O2)}const bv=new Ct,gE=new Ct;class I2 extends ki{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const i=t.levels;for(let x=0,T=i.length;x0){let x,T;for(x=1,T=i.length;x0){bv.setFromMatrixPosition(this.matrixWorld);const T=t.ray.origin.distanceTo(bv);this.getObjectForDistance(T).raycast(t,i)}}update(t){const i=this.levels;if(i.length>1){bv.setFromMatrixPosition(t.matrixWorld),gE.setFromMatrixPosition(this.matrixWorld);const x=bv.distanceTo(gE)/t.zoom;i[0].object.visible=!0;let T,E;for(T=1,E=i.length;T=s)i[T-1].object.visible=!1,i[T].object.visible=!0;else break}for(this._currentLevel=T-1;T=x.length&&x.push({start:-1,count:-1,z:-1});const E=x[this.index];T.push(E),this.index++,E.start=t.start,E.count=t.count,E.z=i}reset(){this.list.length=0,this.index=0}}const Ff="batchId",ah=new di,AE=new di,uU=new di,PE=new di,$0=new ip,Ov=new ys,iu=new Qr,id=new Ct,Q0=new hU,Zr=new dr,Dv=[];function fU(g,t,i=0){const x=t.itemSize;if(g.isInterleavedBufferAttribute||g.array.constructor!==t.array.constructor){const T=g.count;for(let E=0;E65536?new Uint32Array(E):new Uint16Array(E);i.setIndex(new on(y,1))}const s=T>65536?new Uint32Array(x):new Uint16Array(x);i.setAttribute(Ff,new on(s,1)),this._geometryInitialized=!0}}_validateGeometry(t){if(t.getAttribute(Ff))throw new Error(`BatchedMesh: Geometry cannot use attribute "${Ff}"`);const i=this.geometry;if(!!t.getIndex()!=!!i.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const x in i.attributes){if(x===Ff)continue;if(!t.hasAttribute(x))throw new Error(`BatchedMesh: Added geometry missing "${x}". All geometries must have consistent attributes.`);const T=t.getAttribute(x),E=i.getAttribute(x);if(T.itemSize!==E.itemSize||T.normalized!==E.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(t){return this.customSort=t,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ys);const t=this._geometryCount,i=this.boundingBox,x=this._active;i.makeEmpty();for(let T=0;T=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const T={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let E=null;const s=this._reservedRanges,y=this._drawRanges,e=this._bounds;this._geometryCount!==0&&(E=s[s.length-1]),i===-1?T.vertexCount=t.getAttribute("position").count:T.vertexCount=i,E===null?T.vertexStart=0:T.vertexStart=E.vertexStart+E.vertexCount;const r=t.getIndex(),p=r!==null;if(p&&(x===-1?T.indexCount=r.count:T.indexCount=x,E===null?T.indexStart=0:T.indexStart=E.indexStart+E.indexCount),T.indexStart!==-1&&T.indexStart+T.indexCount>this._maxIndexCount||T.vertexStart+T.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const h=this._visibility,a=this._active,l=this._matricesTexture,n=this._matricesTexture.image.data;h.push(!0),a.push(!0);const u=this._geometryCount;this._geometryCount++,uU.toArray(n,u*16),l.needsUpdate=!0,s.push(T),y.push({start:p?T.indexStart:T.vertexStart,count:-1}),e.push({boxInitialized:!1,box:new ys,sphereInitialized:!1,sphere:new Qr});const f=this.geometry.getAttribute(Ff);for(let o=0;o=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(i);const x=this.geometry,T=x.getIndex()!==null,E=x.getIndex(),s=i.getIndex(),y=this._reservedRanges[t];if(T&&s.count>y.indexCount||i.attributes.position.count>y.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const e=y.vertexStart,r=y.vertexCount;for(const l in x.attributes){if(l===Ff)continue;const n=i.getAttribute(l),u=x.getAttribute(l);fU(n,u,e);const f=n.itemSize;for(let o=n.count,c=r;o=i.length||i[t]===!1?this:(i[t]=!1,this._visibilityChanged=!0,this)}getBoundingBoxAt(t,i){if(this._active[t]===!1)return null;const T=this._bounds[t],E=T.box,s=this.geometry;if(T.boxInitialized===!1){E.makeEmpty();const y=s.index,e=s.attributes.position,r=this._drawRanges[t];for(let p=r.start,h=r.start+r.count;p=s||x[t]===!1?this:(i.toArray(E,t*16),T.needsUpdate=!0,this)}getMatrixAt(t,i){const x=this._active,T=this._matricesTexture.image.data,E=this._geometryCount;return t>=E||x[t]===!1?null:i.fromArray(T,t*16)}setVisibleAt(t,i){const x=this._visibility,T=this._active,E=this._geometryCount;return t>=E||T[t]===!1||x[t]===i?this:(x[t]=i,this._visibilityChanged=!0,this)}getVisibleAt(t){const i=this._visibility,x=this._active,T=this._geometryCount;return t>=T||x[t]===!1?!1:i[t]}raycast(t,i){const x=this._visibility,T=this._active,E=this._drawRanges,s=this._geometryCount,y=this.matrixWorld,e=this.geometry;Zr.material=this.material,Zr.geometry.index=e.index,Zr.geometry.attributes=e.attributes,Zr.geometry.boundingBox===null&&(Zr.geometry.boundingBox=new ys),Zr.geometry.boundingSphere===null&&(Zr.geometry.boundingSphere=new Qr);for(let r=0;r({...i})),this._reservedRanges=t._reservedRanges.map(i=>({...i})),this._visibility=t._visibility.slice(),this._active=t._active.slice(),this._bounds=t._bounds.map(i=>({boxInitialized:i.boxInitialized,box:i.box.clone(),sphereInitialized:i.sphereInitialized,sphere:i.sphere.clone()})),this._maxGeometryCount=t._maxGeometryCount,this._maxVertexCount=t._maxVertexCount,this._maxIndexCount=t._maxIndexCount,this._geometryInitialized=t._geometryInitialized,this._geometryCount=t._geometryCount,this._multiDrawCounts=t._multiDrawCounts.slice(),this._multiDrawStarts=t._multiDrawStarts.slice(),this._matricesTexture=t._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(t,i,x,T,E){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const s=T.getIndex(),y=s===null?1:s.array.BYTES_PER_ELEMENT,e=this._active,r=this._visibility,p=this._multiDrawStarts,h=this._multiDrawCounts,a=this._drawRanges,l=this.perObjectFrustumCulled;l&&(PE.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse).multiply(this.matrixWorld),$0.setFromProjectionMatrix(PE,t.coordinateSystem));let n=0;if(this.sortObjects){AE.copy(this.matrixWorld).invert(),id.setFromMatrixPosition(x.matrixWorld).applyMatrix4(AE);for(let o=0,c=r.length;oe)continue;a.applyMatrix4(this.matrixWorld);const w=t.ray.origin.distanceTo(a);wt.far||i.push({distance:w,point:h.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this})}}else{const o=Math.max(0,s.start),c=Math.min(f.count,s.start+s.count);for(let d=o,v=c-1;de)continue;a.applyMatrix4(this.matrixWorld);const S=t.ray.origin.distanceTo(a);St.far||i.push({distance:S,point:h.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const i=this.geometry.morphAttributes,x=Object.keys(i);if(x.length>0){const T=i[x[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,s=T.length;E0){const T=i[x[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,s=T.length;ET.far)return;E.push({distance:r,distanceToRay:Math.sqrt(y),point:e,index:t,face:null,object:s})}}class cU extends zn{constructor(t,i,x,T,E,s,y,e,r){super(t,i,x,T,E,s,y,e,r),this.isVideoTexture=!0,this.minFilter=s!==void 0?s:Bn,this.magFilter=E!==void 0?E:Bn,this.generateMipmaps=!1;const p=this;function h(){p.needsUpdate=!0,t.requestVideoFrameCallback(h)}"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(h)}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;"requestVideoFrameCallback"in t===!1&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class dU extends zn{constructor(t,i){super({width:t,height:i}),this.isFramebufferTexture=!0,this.magFilter=rr,this.minFilter=rr,this.generateMipmaps=!1,this.needsUpdate=!0}}class xg extends zn{constructor(t,i,x,T,E,s,y,e,r,p,h,a){super(null,s,y,e,r,p,T,E,h,a),this.isCompressedTexture=!0,this.image={width:i,height:x},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class pU extends xg{constructor(t,i,x,T,E,s){super(t,i,x,E,s),this.isCompressedArrayTexture=!0,this.image.depth=T,this.wrapR=$r}}class vU extends xg{constructor(t,i,x){super(void 0,t[0].width,t[0].height,i,x,Pl),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class mU extends zn{constructor(t,i,x,T,E,s,y,e,r){super(t,i,x,T,E,s,y,e,r),this.isCanvasTexture=!0,this.needsUpdate=!0}}class ao{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,i){const x=this.getUtoTmapping(t);return this.getPoint(x,i)}getPoints(t=5){const i=[];for(let x=0;x<=t;x++)i.push(this.getPoint(x/t));return i}getSpacedPoints(t=5){const i=[];for(let x=0;x<=t;x++)i.push(this.getPointAt(x/t));return i}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const i=[];let x,T=this.getPoint(0),E=0;i.push(0);for(let s=1;s<=t;s++)x=this.getPoint(s/t),E+=x.distanceTo(T),i.push(E),T=x;return this.cacheArcLengths=i,i}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,i){const x=this.getLengths();let T=0;const E=x.length;let s;i?s=i:s=t*x[E-1];let y=0,e=E-1,r;for(;y<=e;)if(T=Math.floor(y+(e-y)/2),r=x[T]-s,r<0)y=T+1;else if(r>0)e=T-1;else{e=T;break}if(T=e,x[T]===s)return T/(E-1);const p=x[T],a=x[T+1]-p,l=(s-p)/a;return(T+l)/(E-1)}getTangent(t,i){let T=t-1e-4,E=t+1e-4;T<0&&(T=0),E>1&&(E=1);const s=this.getPoint(T),y=this.getPoint(E),e=i||(s.isVector2?new ve:new Ct);return e.copy(y).sub(s).normalize(),e}getTangentAt(t,i){const x=this.getUtoTmapping(t);return this.getTangent(x,i)}computeFrenetFrames(t,i){const x=new Ct,T=[],E=[],s=[],y=new Ct,e=new di;for(let l=0;l<=t;l++){const n=l/t;T[l]=this.getTangentAt(n,new Ct)}E[0]=new Ct,s[0]=new Ct;let r=Number.MAX_VALUE;const p=Math.abs(T[0].x),h=Math.abs(T[0].y),a=Math.abs(T[0].z);p<=r&&(r=p,x.set(1,0,0)),h<=r&&(r=h,x.set(0,1,0)),a<=r&&x.set(0,0,1),y.crossVectors(T[0],x).normalize(),E[0].crossVectors(T[0],y),s[0].crossVectors(T[0],E[0]);for(let l=1;l<=t;l++){if(E[l]=E[l-1].clone(),s[l]=s[l-1].clone(),y.crossVectors(T[l-1],T[l]),y.length()>Number.EPSILON){y.normalize();const n=Math.acos(Zn(T[l-1].dot(T[l]),-1,1));E[l].applyMatrix4(e.makeRotationAxis(y,n))}s[l].crossVectors(T[l],E[l])}if(i===!0){let l=Math.acos(Zn(E[0].dot(E[t]),-1,1));l/=t,T[0].dot(y.crossVectors(E[0],E[t]))>0&&(l=-l);for(let n=1;n<=t;n++)E[n].applyMatrix4(e.makeRotationAxis(T[n],l*n)),s[n].crossVectors(T[n],E[n])}return{tangents:T,normals:E,binormals:s}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class Sg extends ao{constructor(t=0,i=0,x=1,T=1,E=0,s=Math.PI*2,y=!1,e=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=i,this.xRadius=x,this.yRadius=T,this.aStartAngle=E,this.aEndAngle=s,this.aClockwise=y,this.aRotation=e}getPoint(t,i){const x=i||new ve,T=Math.PI*2;let E=this.aEndAngle-this.aStartAngle;const s=Math.abs(E)T;)E-=T;E0?0:(Math.floor(Math.abs(y)/E)+1)*E:e===0&&y===E-1&&(y=E-2,e=1);let r,p;this.closed||y>0?r=T[(y-1)%E]:(Uv.subVectors(T[0],T[1]).add(T[0]),r=Uv);const h=T[y%E],a=T[(y+1)%E];if(this.closed||y+2T.length-2?T.length-1:s+1],h=T[s>T.length-3?T.length-1:s+2];return x.set(NE(y,e.x,r.x,p.x,h.x),NE(y,e.y,r.y,p.y,h.y)),x}copy(t){super.copy(t),this.points=[];for(let i=0,x=t.points.length;i=x){const s=T[E]-x,y=this.curves[E],e=y.getLength(),r=e===0?0:1-s/e;return y.getPointAt(r,i)}E++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let i=0;for(let x=0,T=this.curves.length;x1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}copy(t){super.copy(t),this.curves=[];for(let i=0,x=t.curves.length;i0){const h=r.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(r);const p=r.getPoint(1);return this.currentPoint.copy(p),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class rp extends Fi{constructor(t=[new ve(0,-.5),new ve(.5,0),new ve(0,.5)],i=12,x=0,T=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:t,segments:i,phiStart:x,phiLength:T},i=Math.floor(i),T=Zn(T,0,Math.PI*2);const E=[],s=[],y=[],e=[],r=[],p=1/i,h=new Ct,a=new ve,l=new Ct,n=new Ct,u=new Ct;let f=0,o=0;for(let c=0;c<=t.length-1;c++)switch(c){case 0:f=t[c+1].x-t[c].x,o=t[c+1].y-t[c].y,l.x=o*1,l.y=-f,l.z=o*0,u.copy(l),l.normalize(),e.push(l.x,l.y,l.z);break;case t.length-1:e.push(u.x,u.y,u.z);break;default:f=t[c+1].x-t[c].x,o=t[c+1].y-t[c].y,l.x=o*1,l.y=-f,l.z=o*0,n.copy(l),l.x+=u.x,l.y+=u.y,l.z+=u.z,l.normalize(),e.push(l.x,l.y,l.z),u.copy(n)}for(let c=0;c<=i;c++){const d=x+c*p*T,v=Math.sin(d),m=Math.cos(d);for(let S=0;S<=t.length-1;S++){h.x=t[S].x*v,h.y=t[S].y,h.z=t[S].x*m,s.push(h.x,h.y,h.z),a.x=c/i,a.y=S/(t.length-1),y.push(a.x,a.y);const M=e[3*S+0]*v,w=e[3*S+1],C=e[3*S+0]*m;r.push(M,w,C)}}for(let c=0;c0&&d(!0),i>0&&d(!1)),this.setIndex(p),this.setAttribute("position",new ke(h,3)),this.setAttribute("normal",new ke(a,3)),this.setAttribute("uv",new ke(l,2));function c(){const v=new Ct,m=new Ct;let S=0;const M=(i-t)/x;for(let w=0;w<=E;w++){const C=[],A=w/E,P=A*(i-t)+t;for(let b=0;b<=T;b++){const O=b/T,I=O*e+y,D=Math.sin(I),B=Math.cos(I);m.x=P*D,m.y=-A*x+f,m.z=P*B,h.push(m.x,m.y,m.z),v.set(D,M,B).normalize(),a.push(v.x,v.y,v.z),l.push(O,1-A),C.push(n++)}u.push(C)}for(let w=0;w.9&&M<.1&&(d<.2&&(s[c+0]+=1),v<.2&&(s[c+2]+=1),m<.2&&(s[c+4]+=1))}}function a(c){E.push(c.x,c.y,c.z)}function l(c,d){const v=c*3;d.x=t[v+0],d.y=t[v+1],d.z=t[v+2]}function n(){const c=new Ct,d=new Ct,v=new Ct,m=new Ct,S=new ve,M=new ve,w=new ve;for(let C=0,A=0;C80*i){y=r=g[0],e=p=g[1];for(let n=i;nr&&(r=h),a>p&&(p=a);l=Math.max(r-y,p-e),l=l!==0?32767/l:0}return zd(E,s,i,y,e,l,0),s}};function j2(g,t,i,x,T){let E,s;if(T===VU(g,t,i,x)>0)for(E=t;E=t;E-=x)s=BE(E,g[E],g[E+1],s);return s&&wg(s,s.next)&&(Vd(s),s=s.next),s}function Fu(g,t){if(!g)return g;t||(t=g);let i=g,x;do if(x=!1,!i.steiner&&(wg(i,i.next)||Un(i.prev,i,i.next)===0)){if(Vd(i),i=t=i.prev,i===i.next)break;x=!0}else i=i.next;while(x||i!==t);return t}function zd(g,t,i,x,T,E,s){if(!g)return;!s&&E&&IU(g,x,T,E);let y=g,e,r;for(;g.prev!==g.next;){if(e=g.prev,r=g.next,E?AU(g,x,T,E):wU(g)){t.push(e.i/i|0),t.push(g.i/i|0),t.push(r.i/i|0),Vd(g),g=r.next,y=r.next;continue}if(g=r,g===y){s?s===1?(g=PU(Fu(g),t,i),zd(g,t,i,x,T,E,2)):s===2&&RU(g,t,i,x,T,E):zd(Fu(g),t,i,x,T,E,1);break}}}function wU(g){const t=g.prev,i=g,x=g.next;if(Un(t,i,x)>=0)return!1;const T=t.x,E=i.x,s=x.x,y=t.y,e=i.y,r=x.y,p=TE?T>s?T:s:E>s?E:s,l=y>e?y>r?y:r:e>r?e:r;let n=x.next;for(;n!==t;){if(n.x>=p&&n.x<=a&&n.y>=h&&n.y<=l&&Yf(T,y,E,e,s,r,n.x,n.y)&&Un(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function AU(g,t,i,x){const T=g.prev,E=g,s=g.next;if(Un(T,E,s)>=0)return!1;const y=T.x,e=E.x,r=s.x,p=T.y,h=E.y,a=s.y,l=ye?y>r?y:r:e>r?e:r,f=p>h?p>a?p:a:h>a?h:a,o=Cx(l,n,t,i,x),c=Cx(u,f,t,i,x);let d=g.prevZ,v=g.nextZ;for(;d&&d.z>=o&&v&&v.z<=c;){if(d.x>=l&&d.x<=u&&d.y>=n&&d.y<=f&&d!==T&&d!==s&&Yf(y,p,e,h,r,a,d.x,d.y)&&Un(d.prev,d,d.next)>=0||(d=d.prevZ,v.x>=l&&v.x<=u&&v.y>=n&&v.y<=f&&v!==T&&v!==s&&Yf(y,p,e,h,r,a,v.x,v.y)&&Un(v.prev,v,v.next)>=0))return!1;v=v.nextZ}for(;d&&d.z>=o;){if(d.x>=l&&d.x<=u&&d.y>=n&&d.y<=f&&d!==T&&d!==s&&Yf(y,p,e,h,r,a,d.x,d.y)&&Un(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;v&&v.z<=c;){if(v.x>=l&&v.x<=u&&v.y>=n&&v.y<=f&&v!==T&&v!==s&&Yf(y,p,e,h,r,a,v.x,v.y)&&Un(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function PU(g,t,i){let x=g;do{const T=x.prev,E=x.next.next;!wg(T,E)&&K2(T,x,x.next,E)&&Gd(T,E)&&Gd(E,T)&&(t.push(T.i/i|0),t.push(x.i/i|0),t.push(E.i/i|0),Vd(x),Vd(x.next),x=g=E),x=x.next}while(x!==g);return Fu(x)}function RU(g,t,i,x,T,E){let s=g;do{let y=s.next.next;for(;y!==s.prev;){if(s.i!==y.i&&UU(s,y)){let e=Z2(s,y);s=Fu(s,s.next),e=Fu(e,e.next),zd(s,t,i,x,T,E,0),zd(e,t,i,x,T,E,0);return}y=y.next}s=s.next}while(s!==g)}function bU(g,t,i,x){const T=[];let E,s,y,e,r;for(E=0,s=t.length;E=i.next.y&&i.next.y!==i.y){const a=i.x+(s-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=E&&a>x&&(x=a,T=i.x=i.x&&i.x>=e&&E!==i.x&&Yf(sT.x||i.x===T.x&&DU(T,i)))&&(T=i,p=h)),i=i.next;while(i!==y);return T}function DU(g,t){return Un(g.prev,g,t.prev)<0&&Un(t.next,g,g.next)<0}function IU(g,t,i,x){let T=g;do T.z===0&&(T.z=Cx(T.x,T.y,t,i,x)),T.prevZ=T.prev,T.nextZ=T.next,T=T.next;while(T!==g);T.prevZ.nextZ=null,T.prevZ=null,NU(T)}function NU(g){let t,i,x,T,E,s,y,e,r=1;do{for(i=g,g=null,E=null,s=0;i;){for(s++,x=i,y=0,t=0;t0||e>0&&x;)y!==0&&(e===0||!x||i.z<=x.z)?(T=i,i=i.nextZ,y--):(T=x,x=x.nextZ,e--),E?E.nextZ=T:g=T,T.prevZ=E,E=T;i=x}E.nextZ=null,r*=2}while(s>1);return g}function Cx(g,t,i,x,T){return g=(g-i)*T|0,t=(t-x)*T|0,g=(g|g<<8)&16711935,g=(g|g<<4)&252645135,g=(g|g<<2)&858993459,g=(g|g<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,g|t<<1}function BU(g){let t=g,i=g;do(t.x=(g-s)*(E-y)&&(g-s)*(x-y)>=(i-s)*(t-y)&&(i-s)*(E-y)>=(T-s)*(x-y)}function UU(g,t){return g.next.i!==t.i&&g.prev.i!==t.i&&!zU(g,t)&&(Gd(g,t)&&Gd(t,g)&&GU(g,t)&&(Un(g.prev,g,t.prev)||Un(g,t.prev,t))||wg(g,t)&&Un(g.prev,g,g.next)>0&&Un(t.prev,t,t.next)>0)}function Un(g,t,i){return(t.y-g.y)*(i.x-t.x)-(t.x-g.x)*(i.y-t.y)}function wg(g,t){return g.x===t.x&&g.y===t.y}function K2(g,t,i,x){const T=Wv(Un(g,t,i)),E=Wv(Un(g,t,x)),s=Wv(Un(i,x,g)),y=Wv(Un(i,x,t));return!!(T!==E&&s!==y||T===0&&Hv(g,i,t)||E===0&&Hv(g,x,t)||s===0&&Hv(i,g,x)||y===0&&Hv(i,t,x))}function Hv(g,t,i){return t.x<=Math.max(g.x,i.x)&&t.x>=Math.min(g.x,i.x)&&t.y<=Math.max(g.y,i.y)&&t.y>=Math.min(g.y,i.y)}function Wv(g){return g>0?1:g<0?-1:0}function zU(g,t){let i=g;do{if(i.i!==g.i&&i.next.i!==g.i&&i.i!==t.i&&i.next.i!==t.i&&K2(i,i.next,g,t))return!0;i=i.next}while(i!==g);return!1}function Gd(g,t){return Un(g.prev,g,g.next)<0?Un(g,t,g.next)>=0&&Un(g,g.prev,t)>=0:Un(g,t,g.prev)<0||Un(g,g.next,t)<0}function GU(g,t){let i=g,x=!1;const T=(g.x+t.x)/2,E=(g.y+t.y)/2;do i.y>E!=i.next.y>E&&i.next.y!==i.y&&T<(i.next.x-i.x)*(E-i.y)/(i.next.y-i.y)+i.x&&(x=!x),i=i.next;while(i!==g);return x}function Z2(g,t){const i=new wx(g.i,g.x,g.y),x=new wx(t.i,t.x,t.y),T=g.next,E=t.prev;return g.next=t,t.prev=g,i.next=T,T.prev=i,x.next=i,i.prev=x,E.next=x,x.prev=E,x}function BE(g,t,i,x){const T=new wx(g,t,i);return x?(T.next=x.next,T.prev=x,x.next.prev=T,x.next=T):(T.prev=T,T.next=T),T}function Vd(g){g.next.prev=g.prev,g.prev.next=g.next,g.prevZ&&(g.prevZ.nextZ=g.nextZ),g.nextZ&&(g.nextZ.prevZ=g.prevZ)}function wx(g,t,i){this.i=g,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function VU(g,t,i,x){let T=0;for(let E=t,s=i-x;E2&&g[t-1].equals(g[0])&&g.pop()}function zE(g,t){for(let i=0;iNumber.EPSILON){const Bt=Math.sqrt(Dt),re=Math.sqrt(ut*ut+Rt*Rt),le=gt.x-dt/Bt,ge=gt.y+Vt/Bt,xe=yt.x-Rt/re,Pe=yt.y+ut/re,te=((xe-le)*Rt-(Pe-ge)*ut)/(Vt*Rt-dt*ut);Et=le+Vt*te-rt.x,At=ge+dt*te-rt.y;const Ge=Et*Et+At*At;if(Ge<=2)return new ve(Et,At);Pt=Math.sqrt(Ge/2)}else{let Bt=!1;Vt>Number.EPSILON?ut>Number.EPSILON&&(Bt=!0):Vt<-Number.EPSILON?ut<-Number.EPSILON&&(Bt=!0):Math.sign(dt)===Math.sign(Rt)&&(Bt=!0),Bt?(Et=-dt,At=Vt,Pt=Math.sqrt(Dt)):(Et=Vt,At=dt,Pt=Math.sqrt(Dt/2))}return new ve(Et/Pt,At/Pt)}const X=[];for(let rt=0,gt=I.length,yt=gt-1,Et=rt+1;rt=0;rt--){const gt=rt/f,yt=l*Math.cos(gt*Math.PI/2),Et=n*Math.sin(gt*Math.PI/2)+u;for(let At=0,Pt=I.length;At=0;){const Et=yt;let At=yt-1;At<0&&(At=rt.length-1);for(let Pt=0,Vt=p+f*2;Pt0)&&l.push(d,v,S),(o!==x-1||e0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class q2 extends Wr{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new ze(16777215),this.specular=new ze(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=_d,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class tA extends Wr{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new ze(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class eA extends Wr{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class iA extends Wr{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new ze(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ze(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=_d,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class nA extends Wr{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new ze(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Th,this.normalScale=new ve(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class rA extends xs{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function xu(g,t,i){return!g||!i&&g.constructor===t?g:typeof t.BYTES_PER_ELEMENT=="number"?new t(g):Array.prototype.slice.call(g)}function sA(g){return ArrayBuffer.isView(g)&&!(g instanceof DataView)}function aA(g){function t(T,E){return g[T]-g[E]}const i=g.length,x=new Array(i);for(let T=0;T!==i;++T)x[T]=T;return x.sort(t),x}function Ax(g,t,i){const x=g.length,T=new g.constructor(x);for(let E=0,s=0;s!==x;++E){const y=i[E]*t;for(let e=0;e!==t;++e)T[s++]=g[y+e]}return T}function z1(g,t,i,x){let T=1,E=g[0];for(;E!==void 0&&E[x]===void 0;)E=g[T++];if(E===void 0)return;let s=E[x];if(s!==void 0)if(Array.isArray(s))do s=E[x],s!==void 0&&(t.push(E.time),i.push.apply(i,s)),E=g[T++];while(E!==void 0);else if(s.toArray!==void 0)do s=E[x],s!==void 0&&(t.push(E.time),s.toArray(i,i.length)),E=g[T++];while(E!==void 0);else do s=E[x],s!==void 0&&(t.push(E.time),i.push(s)),E=g[T++];while(E!==void 0)}function YU(g,t,i,x,T=30){const E=g.clone();E.name=t;const s=[];for(let e=0;e=x)){h.push(r.times[l]);for(let u=0;uE.tracks[e].times[0]&&(y=E.tracks[e].times[0]);for(let e=0;e=y.times[n]){const o=n*h+p,c=o+h-p;u=y.values.slice(o,c)}else{const o=y.createInterpolant(),c=p,d=h-p;o.evaluate(E),u=o.resultBuffer.slice(c,d)}e==="quaternion"&&new Is().fromArray(u).normalize().conjugate().toArray(u);const f=r.times.length;for(let o=0;o=E)){const y=i[1];t=E)break e}s=x,x=0;break i}break t}for(;x>>1;ti;)--s;if(++s,E!==0||s!==T){E>=s&&(s=Math.max(s,1),E=s-1);const y=this.getValueSize();this.times=x.slice(E,s),this.values=this.values.slice(E*y,s*y)}return this}validate(){let t=!0;const i=this.getValueSize();i-Math.floor(i)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const x=this.times,T=this.values,E=x.length;E===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let y=0;y!==E;y++){const e=x[y];if(typeof e=="number"&&isNaN(e)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,y,e),t=!1;break}if(s!==null&&s>e){console.error("THREE.KeyframeTrack: Out of order keys.",this,y,e,s),t=!1;break}s=e}if(T!==void 0&&sA(T))for(let y=0,e=T.length;y!==e;++y){const r=T[y];if(isNaN(r)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,y,r),t=!1;break}}return t}optimize(){const t=this.times.slice(),i=this.values.slice(),x=this.getValueSize(),T=this.getInterpolation()===um,E=t.length-1;let s=1;for(let y=1;y0){t[s]=t[E];for(let y=E*x,e=s*x,r=0;r!==x;++r)i[e+r]=i[y+r];++s}return s!==t.length?(this.times=t.slice(0,s),this.values=i.slice(0,s*x)):(this.times=t,this.values=i),this}clone(){const t=this.times.slice(),i=this.values.slice(),x=this.constructor,T=new x(this.name,t,i);return T.createInterpolant=this.createInterpolant,T}}oo.prototype.TimeBufferType=Float32Array;oo.prototype.ValueBufferType=Float32Array;oo.prototype.DefaultInterpolation=bd;class Bu extends oo{}Bu.prototype.ValueTypeName="bool";Bu.prototype.ValueBufferType=Array;Bu.prototype.DefaultInterpolation=Rd;Bu.prototype.InterpolantFactoryMethodLinear=void 0;Bu.prototype.InterpolantFactoryMethodSmooth=void 0;class V1 extends oo{}V1.prototype.ValueTypeName="color";class Hd extends oo{}Hd.prototype.ValueTypeName="number";class hA extends op{constructor(t,i,x,T){super(t,i,x,T)}interpolate_(t,i,x,T){const E=this.resultBuffer,s=this.sampleValues,y=this.valueSize,e=(x-i)/(T-i);let r=t*y;for(let p=r+y;r!==p;r+=4)Is.slerpFlat(E,0,s,r-y,s,r,e);return E}}class fc extends oo{InterpolantFactoryMethodLinear(t){return new hA(this.times,this.values,this.getValueSize(),t)}}fc.prototype.ValueTypeName="quaternion";fc.prototype.DefaultInterpolation=bd;fc.prototype.InterpolantFactoryMethodSmooth=void 0;class Uu extends oo{}Uu.prototype.ValueTypeName="string";Uu.prototype.ValueBufferType=Array;Uu.prototype.DefaultInterpolation=Rd;Uu.prototype.InterpolantFactoryMethodLinear=void 0;Uu.prototype.InterpolantFactoryMethodSmooth=void 0;class Wd extends oo{}Wd.prototype.ValueTypeName="vector";class Xd{constructor(t,i=-1,x,T=fg){this.name=t,this.tracks=x,this.duration=i,this.blendMode=T,this.uuid=ra(),this.duration<0&&this.resetDuration()}static parse(t){const i=[],x=t.tracks,T=1/(t.fps||1);for(let s=0,y=x.length;s!==y;++s)i.push(ZU(x[s]).scale(T));const E=new this(t.name,t.duration,i,t.blendMode);return E.uuid=t.uuid,E}static toJSON(t){const i=[],x=t.tracks,T={name:t.name,duration:t.duration,tracks:i,uuid:t.uuid,blendMode:t.blendMode};for(let E=0,s=x.length;E!==s;++E)i.push(oo.toJSON(x[E]));return T}static CreateFromMorphTargetSequence(t,i,x,T){const E=i.length,s=[];for(let y=0;y1){const h=p[1];let a=T[h];a||(T[h]=a=[]),a.push(r)}}const s=[];for(const y in T)s.push(this.CreateFromMorphTargetSequence(y,T[y],i,x));return s}static parseAnimation(t,i){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const x=function(h,a,l,n,u){if(l.length!==0){const f=[],o=[];z1(l,f,o,n),f.length!==0&&u.push(new h(a,f,o))}},T=[],E=t.name||"default",s=t.fps||30,y=t.blendMode;let e=t.length||-1;const r=t.hierarchy||[];for(let h=0;h{i&&i(E),this.manager.itemEnd(t)},0),E;if(ml[t]!==void 0){ml[t].push({onLoad:i,onProgress:x,onError:T});return}ml[t]=[],ml[t].push({onLoad:i,onProgress:x,onError:T});const s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),y=this.mimeType,e=this.responseType;fetch(s).then(r=>{if(r.status===200||r.status===0){if(r.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||r.body===void 0||r.body.getReader===void 0)return r;const p=ml[t],h=r.body.getReader(),a=r.headers.get("Content-Length")||r.headers.get("X-File-Size"),l=a?parseInt(a):0,n=l!==0;let u=0;const f=new ReadableStream({start(o){c();function c(){h.read().then(({done:d,value:v})=>{if(d)o.close();else{u+=v.byteLength;const m=new ProgressEvent("progress",{lengthComputable:n,loaded:u,total:l});for(let S=0,M=p.length;S{switch(e){case"arraybuffer":return r.arrayBuffer();case"blob":return r.blob();case"document":return r.text().then(p=>new DOMParser().parseFromString(p,y));case"json":return r.json();default:if(y===void 0)return r.text();{const h=/charset="?([^;"\s]*)"?/i.exec(y),a=h&&h[1]?h[1].toLowerCase():void 0,l=new TextDecoder(a);return r.arrayBuffer().then(n=>l.decode(n))}}}).then(r=>{Ml.add(t,r);const p=ml[t];delete ml[t];for(let h=0,a=p.length;h{const p=ml[t];if(p===void 0)throw this.manager.itemError(t),r;delete ml[t];for(let h=0,a=p.length;h{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class $U extends Bs{constructor(t){super(t)}load(t,i,x,T){const E=this,s=new Rl(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(y){try{i(E.parse(JSON.parse(y)))}catch(e){T?T(e):console.error(e),E.manager.itemError(t)}},x,T)}parse(t){const i=[];for(let x=0;x0:T.vertexColors=t.vertexColors),t.uniforms!==void 0)for(const E in t.uniforms){const s=t.uniforms[E];switch(T.uniforms[E]={},s.type){case"t":T.uniforms[E].value=x(s.value);break;case"c":T.uniforms[E].value=new ze().setHex(s.value);break;case"v2":T.uniforms[E].value=new ve().fromArray(s.value);break;case"v3":T.uniforms[E].value=new Ct().fromArray(s.value);break;case"v4":T.uniforms[E].value=new an().fromArray(s.value);break;case"m3":T.uniforms[E].value=new Di().fromArray(s.value);break;case"m4":T.uniforms[E].value=new di().fromArray(s.value);break;default:T.uniforms[E].value=s.value}}if(t.defines!==void 0&&(T.defines=t.defines),t.vertexShader!==void 0&&(T.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(T.fragmentShader=t.fragmentShader),t.glslVersion!==void 0&&(T.glslVersion=t.glslVersion),t.extensions!==void 0)for(const E in t.extensions)T.extensions[E]=t.extensions[E];if(t.lights!==void 0&&(T.lights=t.lights),t.clipping!==void 0&&(T.clipping=t.clipping),t.size!==void 0&&(T.size=t.size),t.sizeAttenuation!==void 0&&(T.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(T.map=x(t.map)),t.matcap!==void 0&&(T.matcap=x(t.matcap)),t.alphaMap!==void 0&&(T.alphaMap=x(t.alphaMap)),t.bumpMap!==void 0&&(T.bumpMap=x(t.bumpMap)),t.bumpScale!==void 0&&(T.bumpScale=t.bumpScale),t.normalMap!==void 0&&(T.normalMap=x(t.normalMap)),t.normalMapType!==void 0&&(T.normalMapType=t.normalMapType),t.normalScale!==void 0){let E=t.normalScale;Array.isArray(E)===!1&&(E=[E,E]),T.normalScale=new ve().fromArray(E)}return t.displacementMap!==void 0&&(T.displacementMap=x(t.displacementMap)),t.displacementScale!==void 0&&(T.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(T.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(T.roughnessMap=x(t.roughnessMap)),t.metalnessMap!==void 0&&(T.metalnessMap=x(t.metalnessMap)),t.emissiveMap!==void 0&&(T.emissiveMap=x(t.emissiveMap)),t.emissiveIntensity!==void 0&&(T.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(T.specularMap=x(t.specularMap)),t.specularIntensityMap!==void 0&&(T.specularIntensityMap=x(t.specularIntensityMap)),t.specularColorMap!==void 0&&(T.specularColorMap=x(t.specularColorMap)),t.envMap!==void 0&&(T.envMap=x(t.envMap)),t.envMapIntensity!==void 0&&(T.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(T.reflectivity=t.reflectivity),t.refractionRatio!==void 0&&(T.refractionRatio=t.refractionRatio),t.lightMap!==void 0&&(T.lightMap=x(t.lightMap)),t.lightMapIntensity!==void 0&&(T.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(T.aoMap=x(t.aoMap)),t.aoMapIntensity!==void 0&&(T.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(T.gradientMap=x(t.gradientMap)),t.clearcoatMap!==void 0&&(T.clearcoatMap=x(t.clearcoatMap)),t.clearcoatRoughnessMap!==void 0&&(T.clearcoatRoughnessMap=x(t.clearcoatRoughnessMap)),t.clearcoatNormalMap!==void 0&&(T.clearcoatNormalMap=x(t.clearcoatNormalMap)),t.clearcoatNormalScale!==void 0&&(T.clearcoatNormalScale=new ve().fromArray(t.clearcoatNormalScale)),t.iridescenceMap!==void 0&&(T.iridescenceMap=x(t.iridescenceMap)),t.iridescenceThicknessMap!==void 0&&(T.iridescenceThicknessMap=x(t.iridescenceThicknessMap)),t.transmissionMap!==void 0&&(T.transmissionMap=x(t.transmissionMap)),t.thicknessMap!==void 0&&(T.thicknessMap=x(t.thicknessMap)),t.anisotropyMap!==void 0&&(T.anisotropyMap=x(t.anisotropyMap)),t.sheenColorMap!==void 0&&(T.sheenColorMap=x(t.sheenColorMap)),t.sheenRoughnessMap!==void 0&&(T.sheenRoughnessMap=x(t.sheenRoughnessMap)),T}setTextures(t){return this.textures=t,this}static createMaterialFromType(t){const i={ShadowMaterial:$2,SpriteMaterial:b1,RawShaderMaterial:Q2,ShaderMaterial:so,PointsMaterial:F1,MeshPhysicalMaterial:_2,MeshStandardMaterial:yl,MeshPhongMaterial:q2,MeshToonMaterial:tA,MeshNormalMaterial:eA,MeshLambertMaterial:iA,MeshDepthMaterial:A1,MeshDistanceMaterial:P1,MeshBasicMaterial:Eh,MeshMatcapMaterial:nA,LineDashedMaterial:rA,LineBasicMaterial:xs,Material:Wr};return new i[t]}}class Px{static decodeText(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);let i="";for(let x=0,T=t.length;x0){const e=new H1(i);E=new Yd(e),E.setCrossOrigin(this.crossOrigin);for(let r=0,p=t.length;r0){T=new Yd(this.manager),T.setCrossOrigin(this.crossOrigin);for(let s=0,y=t.length;s{const f=new ys;f.min.fromArray(u.boxMin),f.max.fromArray(u.boxMax);const o=new Qr;return o.radius=u.sphereRadius,o.center.fromArray(u.sphereCenter),{boxInitialized:u.boxInitialized,box:f,sphereInitialized:u.sphereInitialized,sphere:o}}),s._maxGeometryCount=t.maxGeometryCount,s._maxVertexCount=t.maxVertexCount,s._maxIndexCount=t.maxIndexCount,s._geometryInitialized=t.geometryInitialized,s._geometryCount=t.geometryCount,s._matricesTexture=r(t.matricesTexture.uuid);break;case"LOD":s=new I2;break;case"Line":s=new xh(y(t.geometry),e(t.material));break;case"LineLoop":s=new z2(y(t.geometry),e(t.material));break;case"LineSegments":s=new Xo(y(t.geometry),e(t.material));break;case"PointCloud":case"Points":s=new G2(y(t.geometry),e(t.material));break;case"Sprite":s=new D2(e(t.material));break;case"Group":s=new Xf;break;case"Bone":s=new L1;break;default:s=new ki}if(s.uuid=t.uuid,t.name!==void 0&&(s.name=t.name),t.matrix!==void 0?(s.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=t.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(t.position!==void 0&&s.position.fromArray(t.position),t.rotation!==void 0&&s.rotation.fromArray(t.rotation),t.quaternion!==void 0&&s.quaternion.fromArray(t.quaternion),t.scale!==void 0&&s.scale.fromArray(t.scale)),t.up!==void 0&&s.up.fromArray(t.up),t.castShadow!==void 0&&(s.castShadow=t.castShadow),t.receiveShadow!==void 0&&(s.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(s.shadow.bias=t.shadow.bias),t.shadow.normalBias!==void 0&&(s.shadow.normalBias=t.shadow.normalBias),t.shadow.radius!==void 0&&(s.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(s.visible=t.visible),t.frustumCulled!==void 0&&(s.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(s.renderOrder=t.renderOrder),t.userData!==void 0&&(s.userData=t.userData),t.layers!==void 0&&(s.layers.mask=t.layers),t.children!==void 0){const a=t.children;for(let l=0;l"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,i,x,T){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const E=this,s=Ml.get(t);if(s!==void 0){if(E.manager.itemStart(t),s.then){s.then(r=>{i&&i(r),E.manager.itemEnd(t)}).catch(r=>{T&&T(r)});return}return setTimeout(function(){i&&i(s),E.manager.itemEnd(t)},0),s}const y={};y.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",y.headers=this.requestHeader;const e=fetch(t,y).then(function(r){return r.blob()}).then(function(r){return createImageBitmap(r,Object.assign(E.options,{colorSpaceConversion:"none"}))}).then(function(r){return Ml.add(t,r),i&&i(r),E.manager.itemEnd(t),r}).catch(function(r){T&&T(r),Ml.remove(t),E.manager.itemError(t),E.manager.itemEnd(t)});Ml.add(t,e),E.manager.itemStart(t)}}let Xv,X1=class{static getContext(){return Xv===void 0&&(Xv=new(window.AudioContext||window.webkitAudioContext)),Xv}static setContext(t){Xv=t}};class az extends Bs{constructor(t){super(t)}load(t,i,x,T){const E=this,s=new Rl(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(e){try{const r=e.slice(0);X1.getContext().decodeAudioData(r,function(h){i(h)}).catch(y)}catch(r){y(r)}},x,T);function y(e){T?T(e):console.error(e),E.manager.itemError(t)}}}const jE=new di,KE=new di,nu=new di;class oz{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Dr,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Dr,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){const i=this._cache;if(i.focus!==t.focus||i.fov!==t.fov||i.aspect!==t.aspect*this.aspect||i.near!==t.near||i.far!==t.far||i.zoom!==t.zoom||i.eyeSep!==this.eyeSep){i.focus=t.focus,i.fov=t.fov,i.aspect=t.aspect*this.aspect,i.near=t.near,i.far=t.far,i.zoom=t.zoom,i.eyeSep=this.eyeSep,nu.copy(t.projectionMatrix);const T=i.eyeSep/2,E=T*i.near/i.focus,s=i.near*Math.tan(Tu*i.fov*.5)/i.zoom;let y,e;KE.elements[12]=-T,jE.elements[12]=T,y=-s*i.aspect+E,e=s*i.aspect+E,nu.elements[0]=2*i.near/(e-y),nu.elements[8]=(e+y)/(e-y),this.cameraL.projectionMatrix.copy(nu),y=-s*i.aspect-E,e=s*i.aspect-E,nu.elements[0]=2*i.near/(e-y),nu.elements[8]=(e+y)/(e-y),this.cameraR.projectionMatrix.copy(nu)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(KE),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(jE)}}class Y1{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ZE(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const i=ZE();t=(i-this.oldTime)/1e3,this.oldTime=i,this.elapsedTime+=t}return t}}function ZE(){return(typeof performance>"u"?Date:performance).now()}const ru=new Ct,JE=new Is,lz=new Ct,su=new Ct;class hz extends ki{constructor(){super(),this.type="AudioListener",this.context=X1.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Y1}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);const i=this.context.listener,x=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(ru,JE,lz),su.set(0,0,-1).applyQuaternion(JE),i.positionX){const T=this.context.currentTime+this.timeDelta;i.positionX.linearRampToValueAtTime(ru.x,T),i.positionY.linearRampToValueAtTime(ru.y,T),i.positionZ.linearRampToValueAtTime(ru.z,T),i.forwardX.linearRampToValueAtTime(su.x,T),i.forwardY.linearRampToValueAtTime(su.y,T),i.forwardZ.linearRampToValueAtTime(su.z,T),i.upX.linearRampToValueAtTime(x.x,T),i.upY.linearRampToValueAtTime(x.y,T),i.upZ.linearRampToValueAtTime(x.z,T)}else i.setPosition(ru.x,ru.y,ru.z),i.setOrientation(su.x,su.y,su.z,x.x,x.y,x.z)}}let EA=class extends ki{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+t;const i=this.context.createBufferSource();return i.buffer=this.buffer,i.loop=this.loop,i.loopStart=this.loopStart,i.loopEnd=this.loopEnd,i.onended=this.onEnded.bind(this),i.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=i,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,i=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(let t=1,i=this.filters.length;t0&&this._mixBufferRegionAdditive(x,T,this._addIndex*i,1,i);for(let e=i,r=i+i;e!==r;++e)if(x[e]!==x[e+i]){y.setValue(x,T);break}}saveOriginalState(){const t=this.binding,i=this.buffer,x=this.valueSize,T=x*this._origIndex;t.getValue(i,T);for(let E=x,s=T;E!==s;++E)i[E]=i[T+E%x];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=this.valueSize*3;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,i=t+this.valueSize;for(let x=t;x=.5)for(let s=0;s!==E;++s)t[i+s]=t[x+s]}_slerp(t,i,x,T){Is.slerpFlat(t,i,t,i,t,x,T)}_slerpAdditive(t,i,x,T,E){const s=this._workIndex*E;Is.multiplyQuaternionsFlat(t,s,t,i,t,x),Is.slerpFlat(t,i,t,i,t,s,T)}_lerp(t,i,x,T,E){const s=1-T;for(let y=0;y!==E;++y){const e=i+y;t[e]=t[e]*s+t[x+y]*T}}_lerpAdditive(t,i,x,T,E){for(let s=0;s!==E;++s){const y=i+s;t[y]=t[y]+t[x+s]*T}}}const k1="\\[\\]\\.:\\/",dz=new RegExp("["+k1+"]","g"),j1="[^"+k1+"]",pz="[^"+k1.replace("\\.","")+"]",vz=/((?:WC+[\/:])*)/.source.replace("WC",j1),mz=/(WCOD+)?/.source.replace("WCOD",pz),gz=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",j1),yz=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",j1),xz=new RegExp("^"+vz+mz+gz+yz+"$"),Sz=["material","materials","bones","map"];class Tz{constructor(t,i,x){const T=x||Yi.parseTrackName(i);this._targetGroup=t,this._bindings=t.subscribe_(i,T)}getValue(t,i){this.bind();const x=this._targetGroup.nCachedObjects_,T=this._bindings[x];T!==void 0&&T.getValue(t,i)}setValue(t,i){const x=this._bindings;for(let T=this._targetGroup.nCachedObjects_,E=x.length;T!==E;++T)x[T].setValue(t,i)}bind(){const t=this._bindings;for(let i=this._targetGroup.nCachedObjects_,x=t.length;i!==x;++i)t[i].bind()}unbind(){const t=this._bindings;for(let i=this._targetGroup.nCachedObjects_,x=t.length;i!==x;++i)t[i].unbind()}}class Yi{constructor(t,i,x){this.path=i,this.parsedPath=x||Yi.parseTrackName(i),this.node=Yi.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,i,x){return t&&t.isAnimationObjectGroup?new Yi.Composite(t,i,x):new Yi(t,i,x)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(dz,"")}static parseTrackName(t){const i=xz.exec(t);if(i===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const x={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},T=x.nodeName&&x.nodeName.lastIndexOf(".");if(T!==void 0&&T!==-1){const E=x.nodeName.substring(T+1);Sz.indexOf(E)!==-1&&(x.nodeName=x.nodeName.substring(0,T),x.objectName=E)}if(x.propertyName===null||x.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return x}static findNode(t,i){if(i===void 0||i===""||i==="."||i===-1||i===t.name||i===t.uuid)return t;if(t.skeleton){const x=t.skeleton.getBoneByName(i);if(x!==void 0)return x}if(t.children){const x=function(E){for(let s=0;s=E){const h=E++,a=t[h];i[a.uuid]=p,t[p]=a,i[r]=h,t[h]=e;for(let l=0,n=T;l!==n;++l){const u=x[l],f=u[h],o=u[p];u[p]=f,u[h]=o}}}this.nCachedObjects_=E}uncache(){const t=this._objects,i=this._indicesByUUID,x=this._bindings,T=x.length;let E=this.nCachedObjects_,s=t.length;for(let y=0,e=arguments.length;y!==e;++y){const r=arguments[y],p=r.uuid,h=i[p];if(h!==void 0)if(delete i[p],h0&&(i[l.uuid]=h),t[h]=l,t.pop();for(let n=0,u=T;n!==u;++n){const f=x[n];f[h]=f[a],f.pop()}}}this.nCachedObjects_=E}subscribe_(t,i){const x=this._bindingsIndicesByPath;let T=x[t];const E=this._bindings;if(T!==void 0)return E[T];const s=this._paths,y=this._parsedPaths,e=this._objects,r=e.length,p=this.nCachedObjects_,h=new Array(r);T=E.length,x[t]=T,s.push(t),y.push(i),E.push(h);for(let a=p,l=e.length;a!==l;++a){const n=e[a];h[a]=new Yi(n,t,i)}return h}unsubscribe_(t){const i=this._bindingsIndicesByPath,x=i[t];if(x!==void 0){const T=this._paths,E=this._parsedPaths,s=this._bindings,y=s.length-1,e=s[y],r=t[y];i[r]=x,s[x]=e,s.pop(),E[x]=E[y],E.pop(),T[x]=T[y],T.pop()}}}class CA{constructor(t,i,x=null,T=i.blendMode){this._mixer=t,this._clip=i,this._localRoot=x,this.blendMode=T;const E=i.tracks,s=E.length,y=new Array(s),e={endingStart:mu,endingEnd:mu};for(let r=0;r!==s;++r){const p=E[r].createInterpolant(null);y[r]=p,p.settings=e}this._interpolantSettings=e,this._interpolants=y,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=n2,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,i){return this.loop=t,this.repetitions=i,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,i,x){if(t.fadeOut(i),this.fadeIn(i),x){const T=this._clip.duration,E=t._clip.duration,s=E/T,y=T/E;t.warp(1,s,i),this.warp(y,1,i)}return this}crossFadeTo(t,i,x){return t.crossFadeFrom(this,i,x)}stopFading(){const t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,i,x){const T=this._mixer,E=T.time,s=this.timeScale;let y=this._timeScaleInterpolant;y===null&&(y=T._lendControlInterpolant(),this._timeScaleInterpolant=y);const e=y.parameterPositions,r=y.sampleValues;return e[0]=E,e[1]=E+x,r[0]=t/s,r[1]=i/s,this}stopWarping(){const t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,i,x,T){if(!this.enabled){this._updateWeight(t);return}const E=this._startTime;if(E!==null){const e=(t-E)*x;e<0||x===0?i=0:(this._startTime=null,i=x*e)}i*=this._updateTimeScale(t);const s=this._updateTime(i),y=this._updateWeight(t);if(y>0){const e=this._interpolants,r=this._propertyBindings;switch(this.blendMode){case m1:for(let p=0,h=e.length;p!==h;++p)e[p].evaluate(s),r[p].accumulateAdditive(y);break;case fg:default:for(let p=0,h=e.length;p!==h;++p)e[p].evaluate(s),r[p].accumulate(T,y)}}}_updateWeight(t){let i=0;if(this.enabled){i=this.weight;const x=this._weightInterpolant;if(x!==null){const T=x.evaluate(t)[0];i*=T,t>x.parameterPositions[1]&&(this.stopFading(),T===0&&(this.enabled=!1))}}return this._effectiveWeight=i,i}_updateTimeScale(t){let i=0;if(!this.paused){i=this.timeScale;const x=this._timeScaleInterpolant;if(x!==null){const T=x.evaluate(t)[0];i*=T,t>x.parameterPositions[1]&&(this.stopWarping(),i===0?this.paused=!0:this.timeScale=i)}}return this._effectiveTimeScale=i,i}_updateTime(t){const i=this._clip.duration,x=this.loop;let T=this.time+t,E=this._loopCount;const s=x===r2;if(t===0)return E===-1?T:s&&(E&1)===1?i-T:T;if(x===i2){E===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(T>=i)T=i;else if(T<0)T=0;else{this.time=T;break t}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=T,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(E===-1&&(t>=0?(E=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),T>=i||T<0){const y=Math.floor(T/i);T-=i*y,E+=Math.abs(y);const e=this.repetitions-E;if(e<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,T=t>0?i:0,this.time=T,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(e===1){const r=t<0;this._setEndings(r,!r,s)}else this._setEndings(!1,!1,s);this._loopCount=E,this.time=T,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:y})}}else this.time=T;if(s&&(E&1)===1)return i-T}return T}_setEndings(t,i,x){const T=this._interpolantSettings;x?(T.endingStart=gu,T.endingEnd=gu):(t?T.endingStart=this.zeroSlopeAtStart?gu:mu:T.endingStart=Ld,i?T.endingEnd=this.zeroSlopeAtEnd?gu:mu:T.endingEnd=Ld)}_scheduleFading(t,i,x){const T=this._mixer,E=T.time;let s=this._weightInterpolant;s===null&&(s=T._lendControlInterpolant(),this._weightInterpolant=s);const y=s.parameterPositions,e=s.sampleValues;return y[0]=E,e[0]=i,y[1]=E+t,e[1]=x,this}}const Mz=new Float32Array(1);class Cz extends bl{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,i){const x=t._localRoot||this._root,T=t._clip.tracks,E=T.length,s=t._propertyBindings,y=t._interpolants,e=x.uuid,r=this._bindingsByRootAndName;let p=r[e];p===void 0&&(p={},r[e]=p);for(let h=0;h!==E;++h){const a=T[h],l=a.name;let n=p[l];if(n!==void 0)++n.referenceCount,s[h]=n;else{if(n=s[h],n!==void 0){n._cacheIndex===null&&(++n.referenceCount,this._addInactiveBinding(n,e,l));continue}const u=i&&i._propertyBindings[h].binding.parsedPath;n=new MA(Yi.create(x,l,u),a.ValueTypeName,a.getValueSize()),++n.referenceCount,this._addInactiveBinding(n,e,l),s[h]=n}y[h].resultBuffer=n.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){const x=(t._localRoot||this._root).uuid,T=t._clip.uuid,E=this._actionsByClip[T];this._bindAction(t,E&&E.knownActions[0]),this._addInactiveAction(t,T,x)}const i=t._propertyBindings;for(let x=0,T=i.length;x!==T;++x){const E=i[x];E.useCount++===0&&(this._lendBinding(E),E.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const i=t._propertyBindings;for(let x=0,T=i.length;x!==T;++x){const E=i[x];--E.useCount===0&&(E.restoreOriginalState(),this._takeBackBinding(E))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const i=t._cacheIndex;return i!==null&&i=0;--x)t[x].stop();return this}update(t){t*=this.timeScale;const i=this._actions,x=this._nActiveActions,T=this.time+=t,E=Math.sign(t),s=this._accuIndex^=1;for(let r=0;r!==x;++r)i[r]._update(T,t,E,s);const y=this._bindings,e=this._nActiveBindings;for(let r=0;r!==e;++r)y[r].apply(s);return this}setTime(t){this.time=0;for(let i=0;ithis.max.x||t.ythis.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,i){return i.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)}clampPoint(t,i){return i.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,_E).distanceTo(t)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const qE=new Ct,Yv=new Ct;class Oz{constructor(t=new Ct,i=new Ct){this.start=t,this.end=i}set(t,i){return this.start.copy(t),this.end.copy(i),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,i){return this.delta(i).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,i){qE.subVectors(t,this.start),Yv.subVectors(this.end,this.start);const x=Yv.dot(Yv);let E=Yv.dot(qE)/x;return i&&(E=Zn(E,0,1)),E}closestPointToPoint(t,i,x){const T=this.closestPointToPointParameter(t,i);return this.delta(x).multiplyScalar(T).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const tM=new Ct;class Dz extends ki{constructor(t,i){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="SpotLightHelper";const x=new Fi,T=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,y=1,e=32;s1)for(let h=0;h.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{sM.set(t.z,0,-t.x).normalize();const i=Math.acos(t.y);this.quaternion.setFromAxisAngle(sM,i)}}setLength(t,i=t*.2,x=i*.2){this.line.scale.set(1,Math.max(1e-4,t-i),1),this.line.updateMatrix(),this.cone.scale.set(x,i,x),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class jz extends Xo{constructor(t=1){const i=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],x=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],T=new Fi;T.setAttribute("position",new ke(i,3)),T.setAttribute("color",new ke(x,3));const E=new xs({vertexColors:!0,toneMapped:!1});super(T,E),this.type="AxesHelper"}setColors(t,i,x){const T=new ze,E=this.geometry.attributes.color.array;return T.set(t),T.toArray(E,0),T.toArray(E,3),T.set(i),T.toArray(E,6),T.toArray(E,9),T.set(x),T.toArray(E,12),T.toArray(E,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Kz{constructor(){this.type="ShapePath",this.color=new ze,this.subPaths=[],this.currentPath=null}moveTo(t,i){return this.currentPath=new Ud,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,i),this}lineTo(t,i){return this.currentPath.lineTo(t,i),this}quadraticCurveTo(t,i,x,T){return this.currentPath.quadraticCurveTo(t,i,x,T),this}bezierCurveTo(t,i,x,T,E,s){return this.currentPath.bezierCurveTo(t,i,x,T,E,s),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t){function i(o){const c=[];for(let d=0,v=o.length;dNumber.EPSILON){if(A<0&&(M=c[S],C=-C,w=c[m],A=-A),o.yw.y)continue;if(o.y===M.y){if(o.x===M.x)return!0}else{const P=A*(o.x-M.x)-C*(o.y-M.y);if(P===0)return!0;if(P<0)continue;v=!v}}else{if(o.y!==M.y)continue;if(w.x<=o.x&&o.x<=M.x||M.x<=o.x&&o.x<=w.x)return!0}}return v}const T=Vo.isClockWise,E=this.subPaths;if(E.length===0)return[];let s,y,e;const r=[];if(E.length===1)return y=E[0],e=new wu,e.curves=y.curves,r.push(e),r;let p=!T(E[0].getPoints());p=t?!p:p;const h=[],a=[];let l=[],n=0,u;a[n]=void 0,l[n]=[];for(let o=0,c=E.length;o1){let o=!1,c=0;for(let d=0,v=a.length;d0&&o===!1&&(l=h)}let f;for(let o=0,c=a.length;o{const h=typeof r=="function"?r(t):r;if(h!==t){const a=t;t=p?h:Object.assign({},t,h),i.forEach(l=>l(t,a))}},T=()=>t,E=(r,p=T,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let a=p(t);function l(){const n=p(t);if(!h(a,n)){const u=a;r(a=n,u)}}return i.add(l),()=>i.delete(l)},e={setState:x,getState:T,subscribe:(r,p,h)=>p||h?E(r,p,h):(i.add(r),()=>i.delete(r)),destroy:()=>i.clear()};return t=g(x,T,e),e}const $z=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),aM=$z?Ce.useEffect:Ce.useLayoutEffect;function Qz(g){const t=typeof g=="function"?Jz(g):g,i=(x=t.getState,T=Object.is)=>{const[,E]=Ce.useReducer(f=>f+1,0),s=t.getState(),y=Ce.useRef(s),e=Ce.useRef(x),r=Ce.useRef(T),p=Ce.useRef(!1),h=Ce.useRef();h.current===void 0&&(h.current=x(s));let a,l=!1;(y.current!==s||e.current!==x||r.current!==T||p.current)&&(a=x(s),l=!T(h.current,a)),aM(()=>{l&&(h.current=a),y.current=s,e.current=x,r.current=T,p.current=!1});const n=Ce.useRef(s);aM(()=>{const f=()=>{try{const c=t.getState(),d=e.current(c);r.current(h.current,d)||(y.current=c,h.current=d,E())}catch{p.current=!0,E()}},o=t.subscribe(f);return t.getState()!==n.current&&f(),o},[]);const u=l?a:h.current;return Ce.useDebugValue(u),u};return Object.assign(i,t),i[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const x=[i,t];return{next(){const T=x.length<=0;return{value:x.shift(),done:T}}}},i}var RA={exports:{}},oy={exports:{}},ly={};/** + */zu.ConcurrentRoot=1;zu.ContinuousEventPriority=4;zu.DefaultEventPriority=16;zu.DiscreteEventPriority=1;zu.IdleEventPriority=536870912;zu.LegacyRoot=0;PA.exports=zu;var kf=PA.exports;function Jz(g){let t;const i=new Set,x=(r,p)=>{const h=typeof r=="function"?r(t):r;if(h!==t){const a=t;t=p?h:Object.assign({},t,h),i.forEach(l=>l(t,a))}},T=()=>t,E=(r,p=T,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let a=p(t);function l(){const n=p(t);if(!h(a,n)){const u=a;r(a=n,u)}}return i.add(l),()=>i.delete(l)},e={setState:x,getState:T,subscribe:(r,p,h)=>p||h?E(r,p,h):(i.add(r),()=>i.delete(r)),destroy:()=>i.clear()};return t=g(x,T,e),e}const $z=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),aM=$z?Me.useEffect:Me.useLayoutEffect;function Qz(g){const t=typeof g=="function"?Jz(g):g,i=(x=t.getState,T=Object.is)=>{const[,E]=Me.useReducer(f=>f+1,0),s=t.getState(),y=Me.useRef(s),e=Me.useRef(x),r=Me.useRef(T),p=Me.useRef(!1),h=Me.useRef();h.current===void 0&&(h.current=x(s));let a,l=!1;(y.current!==s||e.current!==x||r.current!==T||p.current)&&(a=x(s),l=!T(h.current,a)),aM(()=>{l&&(h.current=a),y.current=s,e.current=x,r.current=T,p.current=!1});const n=Me.useRef(s);aM(()=>{const f=()=>{try{const c=t.getState(),d=e.current(c);r.current(h.current,d)||(y.current=c,h.current=d,E())}catch{p.current=!0,E()}},o=t.subscribe(f);return t.getState()!==n.current&&f(),o},[]);const u=l?a:h.current;return Me.useDebugValue(u),u};return Object.assign(i,t),i[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const x=[i,t];return{next(){const T=x.length<=0;return{value:x.shift(),done:T}}}},i}var RA={exports:{}},oy={exports:{}},ly={};/** * @license React * scheduler.production.min.js * @@ -10189,17 +10189,17 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var t7=function(t){var i={},x=Ce,T=qz(),E=Object.assign;function s(L){for(var F="https://reactjs.org/docs/error-decoder.html?invariant="+L,W=1;WXt||it[wt]!==lt[Xt]){var oe=` -`+it[wt].replace(" at new "," at ");return L.displayName&&oe.includes("")&&(oe=oe.replace("",L.displayName)),oe}while(1<=wt&&0<=Xt);break}}}finally{ii=!1,Error.prepareStackTrace=W}return(L=L?L.displayName||L.name:"")?qe(L):""}var $i=Object.prototype.hasOwnProperty,un=[],ji=-1;function yn(L){return{current:L}}function ti(L){0>ji||(L.current=un[ji],un[ji]=null,ji--)}function Se(L,F){ji++,un[ji]=L.current,L.current=F}var Br={},gi=yn(Br),fn=yn(!1),Ni=Br;function Vn(L,F){var W=L.type.contextTypes;if(!W)return Br;var $=L.stateNode;if($&&$.__reactInternalMemoizedUnmaskedChildContext===F)return $.__reactInternalMemoizedMaskedChildContext;var it={},lt;for(lt in W)it[lt]=F[lt];return $&&(L=L.stateNode,L.__reactInternalMemoizedUnmaskedChildContext=F,L.__reactInternalMemoizedMaskedChildContext=it),it}function vn(L){return L=L.childContextTypes,L!=null}function Ki(){ti(fn),ti(gi)}function pr(L,F,W){if(gi.current!==Br)throw Error(s(168));Se(gi,F),Se(fn,W)}function Gs(L,F,W){var $=L.stateNode;if(F=F.childContextTypes,typeof $.getChildContext!="function")return W;$=$.getChildContext();for(var it in $)if(!(it in F))throw Error(s(108,w(L)||"Unknown",it));return E({},W,$)}function En(L){return L=(L=L.stateNode)&&L.__reactInternalMemoizedMergedChildContext||Br,Ni=gi.current,Se(gi,L),Se(fn,fn.current),!0}function la(L,F,W){var $=L.stateNode;if(!$)throw Error(s(169));W?(L=Gs(L,F,Ni),$.__reactInternalMemoizedMergedChildContext=L,ti(fn),ti(gi),Se(gi,L)):ti(fn),Se(fn,W)}var $n=Math.clz32?Math.clz32:uo,ba=Math.log,Vs=Math.LN2;function uo(L){return L>>>=0,L===0?32:31-(ba(L)/Vs|0)|0}var La=64,fo=4194304;function yi(L){switch(L&-L){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return L&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return L&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return L}}function Fa(L,F){var W=L.pendingLanes;if(W===0)return 0;var $=0,it=L.suspendedLanes,lt=L.pingedLanes,wt=W&268435455;if(wt!==0){var Xt=wt&~it;Xt!==0?$=yi(Xt):(lt&=wt,lt!==0&&($=yi(lt)))}else wt=W&~it,wt!==0?$=yi(wt):lt!==0&&($=yi(lt));if($===0)return 0;if(F!==0&&F!==$&&!(F&it)&&(it=$&-$,lt=F&-F,it>=lt||it===16&&(lt&4194240)!==0))return F;if($&4&&($|=W&16),F=L.entangledLanes,F!==0)for(L=L.entanglements,F&=$;0W;W++)F.push(L);return F}function Ws(L,F,W){L.pendingLanes|=F,F!==536870912&&(L.suspendedLanes=0,L.pingedLanes=0),L=L.eventTimes,F=31-$n(F),L[F]=W}function Xs(L,F){var W=L.pendingLanes&~F;L.pendingLanes=F,L.suspendedLanes=0,L.pingedLanes=0,L.expiredLanes&=F,L.mutableReadLanes&=F,L.entangledLanes&=F,F=L.entanglements;var $=L.eventTimes;for(L=L.expirationTimes;0>=wt,it-=wt,Ms=1<<32-$n(F)+it|W<Ai?(kn=xi,xi=null):kn=xi.sibling;var zi=Qe($t,xi,se[Ai],Ne);if(zi===null){xi===null&&(xi=kn);break}L&&xi&&zi.alternate===null&&F($t,xi),kt=lt(zi,kt,Ai),wi===null?Ye=zi:wi.sibling=zi,wi=zi,xi=kn}if(Ai===se.length)return W($t,xi),qi&&Cs($t,Ai),Ye;if(xi===null){for(;AiAi?(kn=xi,xi=null):kn=xi.sibling;var ya=Qe($t,xi,zi.value,Ne);if(ya===null){xi===null&&(xi=kn);break}L&&xi&&ya.alternate===null&&F($t,xi),kt=lt(ya,kt,Ai),wi===null?Ye=ya:wi.sibling=ya,wi=ya,xi=kn}if(zi.done)return W($t,xi),qi&&Cs($t,Ai),Ye;if(xi===null){for(;!zi.done;Ai++,zi=se.next())zi=mi($t,zi.value,Ne),zi!==null&&(kt=lt(zi,kt,Ai),wi===null?Ye=zi:wi.sibling=zi,wi=zi);return qi&&Cs($t,Ai),Ye}for(xi=$($t,xi);!zi.done;Ai++,zi=se.next())zi=tn(xi,$t,Ai,zi.value,Ne),zi!==null&&(L&&zi.alternate!==null&&xi.delete(zi.key===null?Ai:zi.key),kt=lt(zi,kt,Ai),wi===null?Ye=zi:wi.sibling=zi,wi=zi);return L&&xi.forEach(function(of){return F($t,of)}),qi&&Cs($t,Ai),Ye}function us($t,kt,se,Ne){if(typeof se=="object"&&se!==null&&se.type===p&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case e:t:{for(var Ye=se.key,wi=kt;wi!==null;){if(wi.key===Ye){if(Ye=se.type,Ye===p){if(wi.tag===7){W($t,wi.sibling),kt=it(wi,se.props.children),kt.return=$t,$t=kt;break t}}else if(wi.elementType===Ye||typeof Ye=="object"&&Ye!==null&&Ye.$$typeof===d&&Wa(Ye)===wi.type){W($t,wi.sibling),kt=it(wi,se.props),kt.ref=Ha($t,wi,se),kt.return=$t,$t=kt;break t}W($t,wi);break}else F($t,wi);wi=wi.sibling}se.type===p?(kt=Fo(se.props.children,$t.mode,Ne,se.key),kt.return=$t,$t=kt):(Ne=sf(se.type,se.key,se.props,null,$t.mode,Ne),Ne.ref=Ha($t,kt,se),Ne.return=$t,$t=Ne)}return wt($t);case r:t:{for(wi=se.key;kt!==null;){if(kt.key===wi)if(kt.tag===4&&kt.stateNode.containerInfo===se.containerInfo&&kt.stateNode.implementation===se.implementation){W($t,kt.sibling),kt=it(kt,se.children||[]),kt.return=$t,$t=kt;break t}else{W($t,kt);break}else F($t,kt);kt=kt.sibling}kt=bs(se,$t.mode,Ne),kt.return=$t,$t=kt}return wt($t);case d:return wi=se._init,us($t,kt,wi(se._payload),Ne)}if(D(se))return Xe($t,kt,se,Ne);if(S(se))return Lr($t,kt,se,Ne);_n($t,se)}return typeof se=="string"&&se!==""||typeof se=="number"?(se=""+se,kt!==null&&kt.tag===6?(W($t,kt.sibling),kt=it(kt,se),kt.return=$t,$t=kt):(W($t,kt),kt=br(se,$t.mode,Ne),kt.return=$t,$t=kt),wt($t)):W($t,kt)}return us}var Vr=Xa(!0),bh=Xa(!1),V={},K=yn(V),et=yn(V),st=yn(V);function ht(L){if(L===V)throw Error(s(174));return L}function pt(L,F){Se(st,F),Se(et,L),Se(K,V),L=G(F),ti(K),Se(K,L)}function Mt(){ti(K),ti(et),ti(st)}function Nt(L){var F=ht(st.current),W=ht(K.current);F=z(W,L.type,F),W!==F&&(Se(et,L),Se(K,F))}function zt(L){et.current===L&&(ti(K),ti(et))}var ct=yn(0);function St(L){for(var F=L;F!==null;){if(F.tag===13){var W=F.memoizedState;if(W!==null&&(W=W.dehydrated,W===null||Ra(W)||oa(W)))return F}else if(F.tag===19&&F.memoizedProps.revealOrder!==void 0){if(F.flags&128)return F}else if(F.child!==null){F.child.return=F,F=F.child;continue}if(F===L)break;for(;F.sibling===null;){if(F.return===null||F.return===L)return null;F=F.return}F.sibling.return=F.return,F=F.sibling}return null}var vt=[];function Ft(){for(var L=0;LW?W:4,L(!0);var $=Ut.transition;Ut.transition={};try{L(!1),F()}finally{Bi=W,Ut.transition=$}}function cp(){return Ze().memoizedState}function qn(L,F,W){var $=ma(L);W={lane:$,action:W,hasEagerState:!1,eagerState:null,next:null},dp(L)?pp(F,W):(vc(L,F,W),W=Ar(),L=Ps(L,$,W),L!==null&&vp(L,F,$))}function Mr(L,F,W){var $=ma(L),it={lane:$,action:W,hasEagerState:!1,eagerState:null,next:null};if(dp(L))pp(F,it);else{vc(L,F,it);var lt=L.alternate;if(L.lanes===0&&(lt===null||lt.lanes===0)&&(lt=F.lastRenderedReducer,lt!==null))try{var wt=F.lastRenderedState,Xt=lt(wt,W);if(it.hasEagerState=!0,it.eagerState=Xt,Es(Xt,wt))return}catch{}finally{}W=Ar(),L=Ps(L,$,W),L!==null&&vp(L,F,$)}}function dp(L){var F=L.alternate;return L===It||F!==null&&F===It}function pp(L,F){ae=Qt=!0;var W=L.pending;W===null?F.next=F:(F.next=W.next,W.next=F),L.pending=F}function vc(L,F,W){Xn!==null&&L.mode&1&&!(Ci&2)?(L=F.interleaved,L===null?(W.next=W,Xr===null?Xr=[F]:Xr.push(F)):(W.next=L.next,L.next=W),F.interleaved=W):(L=F.pending,L===null?W.next=W:(W.next=L.next,L.next=W),F.pending=W)}function vp(L,F,W){if(W&4194240){var $=F.lanes;$&=L.pendingLanes,W|=$,F.lanes=W,Fl(L,W)}}var Vl={readContext:Qi,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useInsertionEffect:pe,useLayoutEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useMutableSource:pe,useSyncExternalStore:pe,useId:pe,unstable_isNewReconciler:!1},Ih={readContext:Qi,useCallback:function(L,F){return _e().memoizedState=[L,F===void 0?null:F],L},useContext:Qi,useEffect:Gl,useImperativeHandle:function(L,F,W){return W=W!=null?W.concat([L]):null,To(4194308,4,Fh.bind(null,F,L),W)},useLayoutEffect:function(L,F){return To(4194308,4,L,F)},useInsertionEffect:function(L,F){return To(4,2,L,F)},useMemo:function(L,F){var W=_e();return F=F===void 0?null:F,L=L(),W.memoizedState=[L,F],L},useReducer:function(L,F,W){var $=_e();return F=W!==void 0?W(F):F,$.memoizedState=$.baseState=F,L={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:L,lastRenderedState:F},$.queue=L,L=L.dispatch=qn.bind(null,It,L),[$.memoizedState,L]},useRef:function(L){var F=_e();return L={current:L},F.memoizedState=L},useState:xo,useDebugValue:Dh,useDeferredValue:function(L){var F=xo(L),W=F[0],$=F[1];return Gl(function(){var it=Ut.transition;Ut.transition={};try{$(L)}finally{Ut.transition=it}},[L]),W},useTransition:function(){var L=xo(!1),F=L[0];return L=Ng.bind(null,L[1]),_e().memoizedState=L,[F,L]},useMutableSource:function(){},useSyncExternalStore:function(L,F,W){var $=It,it=_e();if(qi){if(W===void 0)throw Error(s(407));W=W()}else{if(W=F(),Xn===null)throw Error(s(349));Wt&30||wn($,F,W)}it.memoizedState=W;var lt={value:W,getSnapshot:F};return it.queue=lt,Gl(Ln.bind(null,$,lt,L),[L]),$.flags|=2048,So(9,yo.bind(null,$,lt,W,F),void 0,null),W},useId:function(){var L=_e(),F=Xn.identifierPrefix;if(qi){var W=is,$=Ms;W=($&~(1<<32-$n($)-1)).toString(32)+W,F=":"+F+"R"+W,W=ue++,0")&&(oe=oe.replace("",L.displayName)),oe}while(1<=wt&&0<=Xt);break}}}finally{ni=!1,Error.prepareStackTrace=W}return(L=L?L.displayName||L.name:"")?ti(L):""}var $i=Object.prototype.hasOwnProperty,un=[],ji=-1;function yn(L){return{current:L}}function ei(L){0>ji||(L.current=un[ji],un[ji]=null,ji--)}function Se(L,F){ji++,un[ji]=L.current,L.current=F}var Br={},gi=yn(Br),fn=yn(!1),Ni=Br;function Vn(L,F){var W=L.type.contextTypes;if(!W)return Br;var $=L.stateNode;if($&&$.__reactInternalMemoizedUnmaskedChildContext===F)return $.__reactInternalMemoizedMaskedChildContext;var it={},lt;for(lt in W)it[lt]=F[lt];return $&&(L=L.stateNode,L.__reactInternalMemoizedUnmaskedChildContext=F,L.__reactInternalMemoizedMaskedChildContext=it),it}function vn(L){return L=L.childContextTypes,L!=null}function Ki(){ei(fn),ei(gi)}function pr(L,F,W){if(gi.current!==Br)throw Error(s(168));Se(gi,F),Se(fn,W)}function Gs(L,F,W){var $=L.stateNode;if(F=F.childContextTypes,typeof $.getChildContext!="function")return W;$=$.getChildContext();for(var it in $)if(!(it in F))throw Error(s(108,w(L)||"Unknown",it));return E({},W,$)}function En(L){return L=(L=L.stateNode)&&L.__reactInternalMemoizedMergedChildContext||Br,Ni=gi.current,Se(gi,L),Se(fn,fn.current),!0}function la(L,F,W){var $=L.stateNode;if(!$)throw Error(s(169));W?(L=Gs(L,F,Ni),$.__reactInternalMemoizedMergedChildContext=L,ei(fn),ei(gi),Se(gi,L)):ei(fn),Se(fn,W)}var $n=Math.clz32?Math.clz32:uo,ba=Math.log,Vs=Math.LN2;function uo(L){return L>>>=0,L===0?32:31-(ba(L)/Vs|0)|0}var La=64,fo=4194304;function yi(L){switch(L&-L){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return L&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return L&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return L}}function Fa(L,F){var W=L.pendingLanes;if(W===0)return 0;var $=0,it=L.suspendedLanes,lt=L.pingedLanes,wt=W&268435455;if(wt!==0){var Xt=wt&~it;Xt!==0?$=yi(Xt):(lt&=wt,lt!==0&&($=yi(lt)))}else wt=W&~it,wt!==0?$=yi(wt):lt!==0&&($=yi(lt));if($===0)return 0;if(F!==0&&F!==$&&!(F&it)&&(it=$&-$,lt=F&-F,it>=lt||it===16&&(lt&4194240)!==0))return F;if($&4&&($|=W&16),F=L.entangledLanes,F!==0)for(L=L.entanglements,F&=$;0W;W++)F.push(L);return F}function Ws(L,F,W){L.pendingLanes|=F,F!==536870912&&(L.suspendedLanes=0,L.pingedLanes=0),L=L.eventTimes,F=31-$n(F),L[F]=W}function Xs(L,F){var W=L.pendingLanes&~F;L.pendingLanes=F,L.suspendedLanes=0,L.pingedLanes=0,L.expiredLanes&=F,L.mutableReadLanes&=F,L.entangledLanes&=F,F=L.entanglements;var $=L.eventTimes;for(L=L.expirationTimes;0>=wt,it-=wt,Ms=1<<32-$n(F)+it|W<Ai?(kn=xi,xi=null):kn=xi.sibling;var zi=Qe($t,xi,se[Ai],Ne);if(zi===null){xi===null&&(xi=kn);break}L&&xi&&zi.alternate===null&&F($t,xi),kt=lt(zi,kt,Ai),wi===null?Ye=zi:wi.sibling=zi,wi=zi,xi=kn}if(Ai===se.length)return W($t,xi),qi&&Cs($t,Ai),Ye;if(xi===null){for(;AiAi?(kn=xi,xi=null):kn=xi.sibling;var ya=Qe($t,xi,zi.value,Ne);if(ya===null){xi===null&&(xi=kn);break}L&&xi&&ya.alternate===null&&F($t,xi),kt=lt(ya,kt,Ai),wi===null?Ye=ya:wi.sibling=ya,wi=ya,xi=kn}if(zi.done)return W($t,xi),qi&&Cs($t,Ai),Ye;if(xi===null){for(;!zi.done;Ai++,zi=se.next())zi=mi($t,zi.value,Ne),zi!==null&&(kt=lt(zi,kt,Ai),wi===null?Ye=zi:wi.sibling=zi,wi=zi);return qi&&Cs($t,Ai),Ye}for(xi=$($t,xi);!zi.done;Ai++,zi=se.next())zi=tn(xi,$t,Ai,zi.value,Ne),zi!==null&&(L&&zi.alternate!==null&&xi.delete(zi.key===null?Ai:zi.key),kt=lt(zi,kt,Ai),wi===null?Ye=zi:wi.sibling=zi,wi=zi);return L&&xi.forEach(function(of){return F($t,of)}),qi&&Cs($t,Ai),Ye}function us($t,kt,se,Ne){if(typeof se=="object"&&se!==null&&se.type===p&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case e:t:{for(var Ye=se.key,wi=kt;wi!==null;){if(wi.key===Ye){if(Ye=se.type,Ye===p){if(wi.tag===7){W($t,wi.sibling),kt=it(wi,se.props.children),kt.return=$t,$t=kt;break t}}else if(wi.elementType===Ye||typeof Ye=="object"&&Ye!==null&&Ye.$$typeof===d&&Wa(Ye)===wi.type){W($t,wi.sibling),kt=it(wi,se.props),kt.ref=Ha($t,wi,se),kt.return=$t,$t=kt;break t}W($t,wi);break}else F($t,wi);wi=wi.sibling}se.type===p?(kt=Fo(se.props.children,$t.mode,Ne,se.key),kt.return=$t,$t=kt):(Ne=sf(se.type,se.key,se.props,null,$t.mode,Ne),Ne.ref=Ha($t,kt,se),Ne.return=$t,$t=Ne)}return wt($t);case r:t:{for(wi=se.key;kt!==null;){if(kt.key===wi)if(kt.tag===4&&kt.stateNode.containerInfo===se.containerInfo&&kt.stateNode.implementation===se.implementation){W($t,kt.sibling),kt=it(kt,se.children||[]),kt.return=$t,$t=kt;break t}else{W($t,kt);break}else F($t,kt);kt=kt.sibling}kt=bs(se,$t.mode,Ne),kt.return=$t,$t=kt}return wt($t);case d:return wi=se._init,us($t,kt,wi(se._payload),Ne)}if(D(se))return Xe($t,kt,se,Ne);if(S(se))return Lr($t,kt,se,Ne);_n($t,se)}return typeof se=="string"&&se!==""||typeof se=="number"?(se=""+se,kt!==null&&kt.tag===6?(W($t,kt.sibling),kt=it(kt,se),kt.return=$t,$t=kt):(W($t,kt),kt=br(se,$t.mode,Ne),kt.return=$t,$t=kt),wt($t)):W($t,kt)}return us}var Vr=Xa(!0),bh=Xa(!1),V={},K=yn(V),et=yn(V),st=yn(V);function ht(L){if(L===V)throw Error(s(174));return L}function pt(L,F){Se(st,F),Se(et,L),Se(K,V),L=G(F),ei(K),Se(K,L)}function Mt(){ei(K),ei(et),ei(st)}function Nt(L){var F=ht(st.current),W=ht(K.current);F=z(W,L.type,F),W!==F&&(Se(et,L),Se(K,F))}function zt(L){et.current===L&&(ei(K),ei(et))}var ct=yn(0);function St(L){for(var F=L;F!==null;){if(F.tag===13){var W=F.memoizedState;if(W!==null&&(W=W.dehydrated,W===null||Ra(W)||oa(W)))return F}else if(F.tag===19&&F.memoizedProps.revealOrder!==void 0){if(F.flags&128)return F}else if(F.child!==null){F.child.return=F,F=F.child;continue}if(F===L)break;for(;F.sibling===null;){if(F.return===null||F.return===L)return null;F=F.return}F.sibling.return=F.return,F=F.sibling}return null}var vt=[];function Ft(){for(var L=0;LW?W:4,L(!0);var $=Ut.transition;Ut.transition={};try{L(!1),F()}finally{Bi=W,Ut.transition=$}}function cp(){return Ze().memoizedState}function qn(L,F,W){var $=ma(L);W={lane:$,action:W,hasEagerState:!1,eagerState:null,next:null},dp(L)?pp(F,W):(mc(L,F,W),W=Ar(),L=Ps(L,$,W),L!==null&&vp(L,F,$))}function Mr(L,F,W){var $=ma(L),it={lane:$,action:W,hasEagerState:!1,eagerState:null,next:null};if(dp(L))pp(F,it);else{mc(L,F,it);var lt=L.alternate;if(L.lanes===0&&(lt===null||lt.lanes===0)&&(lt=F.lastRenderedReducer,lt!==null))try{var wt=F.lastRenderedState,Xt=lt(wt,W);if(it.hasEagerState=!0,it.eagerState=Xt,Es(Xt,wt))return}catch{}finally{}W=Ar(),L=Ps(L,$,W),L!==null&&vp(L,F,$)}}function dp(L){var F=L.alternate;return L===It||F!==null&&F===It}function pp(L,F){ae=Qt=!0;var W=L.pending;W===null?F.next=F:(F.next=W.next,W.next=F),L.pending=F}function mc(L,F,W){Xn!==null&&L.mode&1&&!(Ci&2)?(L=F.interleaved,L===null?(W.next=W,Xr===null?Xr=[F]:Xr.push(F)):(W.next=L.next,L.next=W),F.interleaved=W):(L=F.pending,L===null?W.next=W:(W.next=L.next,L.next=W),F.pending=W)}function vp(L,F,W){if(W&4194240){var $=F.lanes;$&=L.pendingLanes,W|=$,F.lanes=W,Fl(L,W)}}var Vl={readContext:Qi,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useInsertionEffect:pe,useLayoutEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useMutableSource:pe,useSyncExternalStore:pe,useId:pe,unstable_isNewReconciler:!1},Ih={readContext:Qi,useCallback:function(L,F){return _e().memoizedState=[L,F===void 0?null:F],L},useContext:Qi,useEffect:Gl,useImperativeHandle:function(L,F,W){return W=W!=null?W.concat([L]):null,To(4194308,4,Fh.bind(null,F,L),W)},useLayoutEffect:function(L,F){return To(4194308,4,L,F)},useInsertionEffect:function(L,F){return To(4,2,L,F)},useMemo:function(L,F){var W=_e();return F=F===void 0?null:F,L=L(),W.memoizedState=[L,F],L},useReducer:function(L,F,W){var $=_e();return F=W!==void 0?W(F):F,$.memoizedState=$.baseState=F,L={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:L,lastRenderedState:F},$.queue=L,L=L.dispatch=qn.bind(null,It,L),[$.memoizedState,L]},useRef:function(L){var F=_e();return L={current:L},F.memoizedState=L},useState:xo,useDebugValue:Dh,useDeferredValue:function(L){var F=xo(L),W=F[0],$=F[1];return Gl(function(){var it=Ut.transition;Ut.transition={};try{$(L)}finally{Ut.transition=it}},[L]),W},useTransition:function(){var L=xo(!1),F=L[0];return L=Ng.bind(null,L[1]),_e().memoizedState=L,[F,L]},useMutableSource:function(){},useSyncExternalStore:function(L,F,W){var $=It,it=_e();if(qi){if(W===void 0)throw Error(s(407));W=W()}else{if(W=F(),Xn===null)throw Error(s(349));Wt&30||wn($,F,W)}it.memoizedState=W;var lt={value:W,getSnapshot:F};return it.queue=lt,Gl(Ln.bind(null,$,lt,L),[L]),$.flags|=2048,So(9,yo.bind(null,$,lt,W,F),void 0,null),W},useId:function(){var L=_e(),F=Xn.identifierPrefix;if(qi){var W=is,$=Ms;W=($&~(1<<32-$n($)-1)).toString(32)+W,F=":"+F+"R"+W,W=ue++,0Hh&&(F.flags|=128,$=!0,Cr(it,!1),F.lanes=4194304)}else{if(!$)if(L=St(lt),L!==null){if(F.flags|=128,$=!0,L=L.updateQueue,L!==null&&(F.updateQueue=L,F.flags|=4),Cr(it,!0),it.tail===null&&it.tailMode==="hidden"&&!lt.alternate&&!qi)return ni(F),null}else 2*rn()-it.renderingStartTime>Hh&&W!==1073741824&&(F.flags|=128,$=!0,Cr(it,!1),F.lanes=4194304);it.isBackwards?(lt.sibling=F.child,F.child=lt):(L=it.last,L!==null?L.sibling=lt:F.child=lt,it.last=lt)}return it.tail!==null?(F=it.tail,it.rendering=F,it.tail=F.sibling,it.renderingStartTime=rn(),F.sibling=null,L=ct.current,Se(ct,$?L&1|2:L&1),F):(ni(F),null);case 22:case 23:return Oc(),$=F.memoizedState!==null,L!==null&&L.memoizedState!==null!==$&&(F.flags|=8192),$&&F.mode&1?ls&1073741824&&(ni(F),ot&&F.subtreeFlags&6&&(F.flags|=8192)):ni(F),null;case 24:return null;case 25:return null}throw Error(s(156,F.tag))}var Ug=y.ReactCurrentOwner,ss=!1;function Fn(L,F,W,$){F.child=L===null?bh(F,null,W,$):Vr(F,L.child,W,$)}function Sp(L,F,W,$,it){W=W.render;var lt=F.ref;return Ys(F,it),$=me(L,F,W,$,lt,it),W=be(),L!==null&&!ss?(F.updateQueue=L.updateQueue,F.flags&=-2053,L.lanes&=~it,tr(L,F,it)):(qi&&W&&zl(F),F.flags|=1,Fn(L,F,$,it),F.child)}function Tp(L,F,W,$,it){if(L===null){var lt=W.type;return typeof lt=="function"&&!zc(lt)&<.defaultProps===void 0&&W.compare===null&&W.defaultProps===void 0?(F.tag=15,F.type=lt,Ep(L,F,lt,$,it)):(L=sf(W.type,null,$,F,F.mode,it),L.ref=F.ref,L.return=F,F.child=L)}if(lt=L.child,!(L.lanes&it)){var wt=lt.memoizedProps;if(W=W.compare,W=W!==null?W:xn,W(wt,$)&&L.ref===F.ref)return tr(L,F,it)}return F.flags|=1,L=Ka(lt,$),L.ref=F.ref,L.return=F,F.child=L}function Ep(L,F,W,$,it){if(L!==null&&xn(L.memoizedProps,$)&&L.ref===F.ref)if(ss=!1,(L.lanes&it)!==0)L.flags&131072&&(ss=!0);else return F.lanes=L.lanes,tr(L,F,it);return js(L,F,W,$,it)}function Mp(L,F,W){var $=F.pendingProps,it=$.children,lt=L!==null?L.memoizedState:null;if($.mode==="hidden")if(!(F.mode&1))F.memoizedState={baseLanes:0,cachePool:null},Se(jl,ls),ls|=W;else if(W&1073741824)F.memoizedState={baseLanes:0,cachePool:null},$=lt!==null?lt.baseLanes:W,Se(jl,ls),ls|=$;else return L=lt!==null?lt.baseLanes|W:W,F.lanes=F.childLanes=1073741824,F.memoizedState={baseLanes:L,cachePool:null},F.updateQueue=null,Se(jl,ls),ls|=L,null;else lt!==null?($=lt.baseLanes|W,F.memoizedState=null):$=W,Se(jl,ls),ls|=$;return Fn(L,F,it,W),F.child}function Cp(L,F){var W=F.ref;(L===null&&W!==null||L!==null&&L.ref!==W)&&(F.flags|=512,F.flags|=2097152)}function js(L,F,W,$,it){var lt=vn(W)?Ni:gi.current;return lt=Vn(F,lt),Ys(F,it),W=me(L,F,W,$,lt,it),$=be(),L!==null&&!ss?(F.updateQueue=L.updateQueue,F.flags&=-2053,L.lanes&=~it,tr(L,F,it)):(qi&&$&&zl(F),F.flags|=1,Fn(L,F,W,it),F.child)}function wp(L,F,W,$,it){if(vn(W)){var lt=!0;En(F)}else lt=!1;if(Ys(F,it),F.stateNode===null)L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),Zo(F,W,$),Ga(F,W,$,it),$=!0;else if(L===null){var wt=F.stateNode,Xt=F.memoizedProps;wt.props=Xt;var oe=wt.context,Ee=W.contextType;typeof Ee=="object"&&Ee!==null?Ee=Qi(Ee):(Ee=vn(W)?Ni:gi.current,Ee=Vn(F,Ee));var He=W.getDerivedStateFromProps,mi=typeof He=="function"||typeof wt.getSnapshotBeforeUpdate=="function";mi||typeof wt.UNSAFE_componentWillReceiveProps!="function"&&typeof wt.componentWillReceiveProps!="function"||(Xt!==$||oe!==Ee)&&Jo(F,wt,$,Ee),Sn=!1;var Qe=F.memoizedState;wt.state=Qe,Yr(F,$,wt,it),oe=F.memoizedState,Xt!==$||Qe!==oe||fn.current||Sn?(typeof He=="function"&&(ts(F,W,He,$),oe=F.memoizedState),(Xt=Sn||Ul(F,W,Xt,$,Qe,oe,Ee))?(mi||typeof wt.UNSAFE_componentWillMount!="function"&&typeof wt.componentWillMount!="function"||(typeof wt.componentWillMount=="function"&&wt.componentWillMount(),typeof wt.UNSAFE_componentWillMount=="function"&&wt.UNSAFE_componentWillMount()),typeof wt.componentDidMount=="function"&&(F.flags|=4194308)):(typeof wt.componentDidMount=="function"&&(F.flags|=4194308),F.memoizedProps=$,F.memoizedState=oe),wt.props=$,wt.state=oe,wt.context=Ee,$=Xt):(typeof wt.componentDidMount=="function"&&(F.flags|=4194308),$=!1)}else{wt=F.stateNode,Ua(L,F),Xt=F.memoizedProps,Ee=F.type===F.elementType?Xt:bn(F.type,Xt),wt.props=Ee,mi=F.pendingProps,Qe=wt.context,oe=W.contextType,typeof oe=="object"&&oe!==null?oe=Qi(oe):(oe=vn(W)?Ni:gi.current,oe=Vn(F,oe));var tn=W.getDerivedStateFromProps;(He=typeof tn=="function"||typeof wt.getSnapshotBeforeUpdate=="function")||typeof wt.UNSAFE_componentWillReceiveProps!="function"&&typeof wt.componentWillReceiveProps!="function"||(Xt!==mi||Qe!==oe)&&Jo(F,wt,$,oe),Sn=!1,Qe=F.memoizedState,wt.state=Qe,Yr(F,$,wt,it);var Xe=F.memoizedState;Xt!==mi||Qe!==Xe||fn.current||Sn?(typeof tn=="function"&&(ts(F,W,tn,$),Xe=F.memoizedState),(Ee=Sn||Ul(F,W,Ee,$,Qe,Xe,oe)||!1)?(He||typeof wt.UNSAFE_componentWillUpdate!="function"&&typeof wt.componentWillUpdate!="function"||(typeof wt.componentWillUpdate=="function"&&wt.componentWillUpdate($,Xe,oe),typeof wt.UNSAFE_componentWillUpdate=="function"&&wt.UNSAFE_componentWillUpdate($,Xe,oe)),typeof wt.componentDidUpdate=="function"&&(F.flags|=4),typeof wt.getSnapshotBeforeUpdate=="function"&&(F.flags|=1024)):(typeof wt.componentDidUpdate!="function"||Xt===L.memoizedProps&&Qe===L.memoizedState||(F.flags|=4),typeof wt.getSnapshotBeforeUpdate!="function"||Xt===L.memoizedProps&&Qe===L.memoizedState||(F.flags|=1024),F.memoizedProps=$,F.memoizedState=Xe),wt.props=$,wt.state=Xe,wt.context=oe,$=Ee):(typeof wt.componentDidUpdate!="function"||Xt===L.memoizedProps&&Qe===L.memoizedState||(F.flags|=4),typeof wt.getSnapshotBeforeUpdate!="function"||Xt===L.memoizedProps&&Qe===L.memoizedState||(F.flags|=1024),$=!1)}return gc(L,F,W,$,lt,it)}function gc(L,F,W,$,it,lt){Cp(L,F);var wt=(F.flags&128)!==0;if(!$&&!wt)return it&&la(F,W,!1),tr(L,F,lt);$=F.stateNode,Ug.current=F;var Xt=wt&&typeof W.getDerivedStateFromError!="function"?null:$.render();return F.flags|=1,L!==null&&wt?(F.child=Vr(F,L.child,null,lt),F.child=Vr(F,null,Xt,lt)):Fn(L,F,Xt,lt),F.memoizedState=$.state,it&&la(F,W,!0),F.child}function Ap(L){var F=L.stateNode;F.pendingContext?pr(L,F.pendingContext,F.pendingContext!==F.context):F.context&&pr(L,F.context,!1),pt(L,F.containerInfo)}function Pp(L,F,W,$,it){return go(),Va(it),F.flags|=256,Fn(L,F,W,$),F.child}var Xu={dehydrated:null,treeContext:null,retryLane:0};function As(L){return{baseLanes:L,cachePool:null}}function Rp(L,F,W){var $=F.pendingProps,it=ct.current,lt=!1,wt=(F.flags&128)!==0,Xt;if((Xt=wt)||(Xt=L!==null&&L.memoizedState===null?!1:(it&2)!==0),Xt?(lt=!0,F.flags&=-129):(L===null||L.memoizedState!==null)&&(it|=1),Se(ct,it&1),L===null)return dn(F),L=F.memoizedState,L!==null&&(L=L.dehydrated,L!==null)?(F.mode&1?oa(L)?F.lanes=8:F.lanes=1073741824:F.lanes=1,null):(it=$.children,L=$.fallback,lt?($=F.mode,lt=F.child,it={mode:"hidden",children:it},!($&1)&<!==null?(lt.childLanes=0,lt.pendingProps=it):lt=jh(it,$,0,null),L=Fo(L,$,W,null),lt.return=F,L.return=F,lt.sibling=L,F.child=lt,F.child.memoizedState=As(W),F.memoizedState=Xu,L):yc(F,it));if(it=L.memoizedState,it!==null){if(Xt=it.dehydrated,Xt!==null){if(wt)return F.flags&256?(F.flags&=-257,Yu(L,F,W,Error(s(422)))):F.memoizedState!==null?(F.child=L.child,F.flags|=128,null):(lt=$.fallback,it=F.mode,$=jh({mode:"visible",children:$.children},it,0,null),lt=Fo(lt,it,W,null),lt.flags|=2,$.return=F,lt.return=F,$.sibling=lt,F.child=$,F.mode&1&&Vr(F,L.child,null,W),F.child.memoizedState=As(W),F.memoizedState=Xu,lt);if(!(F.mode&1))F=Yu(L,F,W,null);else if(oa(Xt))F=Yu(L,F,W,Error(s(419)));else if($=(W&L.childLanes)!==0,ss||$){if($=Xn,$!==null){switch(W&-W){case 4:lt=2;break;case 16:lt=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:lt=32;break;case 536870912:lt=268435456;break;default:lt=0}$=lt&($.suspendedLanes|W)?0:lt,$!==0&&$!==it.retryLane&&(it.retryLane=$,Ps(L,$,-1))}ef(),F=Yu(L,F,W,Error(s(421)))}else Ra(Xt)?(F.flags|=128,F.child=L.child,F=Lo.bind(null,L),Us(Xt,F),F=null):(W=it.treeContext,gt&&(Wn=zs(Xt),Qn=F,qi=!0,ns=null,mo=!1,W!==null&&(ar[or++]=Ms,ar[or++]=is,ar[or++]=ca,Ms=W.id,is=W.overflow,ca=F)),F=yc(F,F.pendingProps.children),F.flags|=4096);return F}return lt?($=Lp(L,F,$.children,$.fallback,W),lt=F.child,it=L.child.memoizedState,lt.memoizedState=it===null?As(W):{baseLanes:it.baseLanes|W,cachePool:null},lt.childLanes=L.childLanes&~W,F.memoizedState=Xu,$):(W=bp(L,F,$.children,W),F.memoizedState=null,W)}return lt?($=Lp(L,F,$.children,$.fallback,W),lt=F.child,it=L.child.memoizedState,lt.memoizedState=it===null?As(W):{baseLanes:it.baseLanes|W,cachePool:null},lt.childLanes=L.childLanes&~W,F.memoizedState=Xu,$):(W=bp(L,F,$.children,W),F.memoizedState=null,W)}function yc(L,F){return F=jh({mode:"visible",children:F},L.mode,0,null),F.return=L,L.child=F}function bp(L,F,W,$){var it=L.child;return L=it.sibling,W=Ka(it,{mode:"visible",children:W}),!(F.mode&1)&&(W.lanes=$),W.return=F,W.sibling=null,L!==null&&($=F.deletions,$===null?(F.deletions=[L],F.flags|=16):$.push(L)),F.child=W}function Lp(L,F,W,$,it){var lt=F.mode;L=L.child;var wt=L.sibling,Xt={mode:"hidden",children:W};return!(lt&1)&&F.child!==L?(W=F.child,W.childLanes=0,W.pendingProps=Xt,F.deletions=null):(W=Ka(L,Xt),W.subtreeFlags=L.subtreeFlags&14680064),wt!==null?$=Ka(wt,$):($=Fo($,lt,it,null),$.flags|=2),$.return=F,W.return=F,W.sibling=$,F.child=W,$}function Yu(L,F,W,$){return $!==null&&Va($),Vr(F,L.child,null,W),L=yc(F,F.pendingProps.children),L.flags|=2,F.memoizedState=null,L}function Eo(L,F,W){L.lanes|=F;var $=L.alternate;$!==null&&($.lanes|=F),Ba(L.return,F,W)}function xc(L,F,W,$,it){var lt=L.memoizedState;lt===null?L.memoizedState={isBackwards:F,rendering:null,renderingStartTime:0,last:$,tail:W,tailMode:it}:(lt.isBackwards=F,lt.rendering=null,lt.renderingStartTime=0,lt.last=$,lt.tail=W,lt.tailMode=it)}function Fp(L,F,W){var $=F.pendingProps,it=$.revealOrder,lt=$.tail;if(Fn(L,F,$.children,W),$=ct.current,$&2)$=$&1|2,F.flags|=128;else{if(L!==null&&L.flags&128)t:for(L=F.child;L!==null;){if(L.tag===13)L.memoizedState!==null&&Eo(L,W,F);else if(L.tag===19)Eo(L,W,F);else if(L.child!==null){L.child.return=L,L=L.child;continue}if(L===F)break t;for(;L.sibling===null;){if(L.return===null||L.return===F)break t;L=L.return}L.sibling.return=L.return,L=L.sibling}$&=1}if(Se(ct,$),!(F.mode&1))F.memoizedState=null;else switch(it){case"forwards":for(W=F.child,it=null;W!==null;)L=W.alternate,L!==null&&St(L)===null&&(it=W),W=W.sibling;W=it,W===null?(it=F.child,F.child=null):(it=W.sibling,W.sibling=null),xc(F,!1,it,W,lt);break;case"backwards":for(W=null,it=F.child,F.child=null;it!==null;){if(L=it.alternate,L!==null&&St(L)===null){F.child=it;break}L=it.sibling,it.sibling=W,W=it,it=L}xc(F,!0,W,null,lt);break;case"together":xc(F,!1,null,null,void 0);break;default:F.memoizedState=null}return F.child}function tr(L,F,W){if(L!==null&&(F.dependencies=L.dependencies),Zl|=F.lanes,!(W&F.childLanes))return null;if(L!==null&&F.child!==L.child)throw Error(s(153));if(F.child!==null){for(L=F.child,W=Ka(L,L.pendingProps),F.child=W,W.return=F;L.sibling!==null;)L=L.sibling,W=W.sibling=Ka(L,L.pendingProps),W.return=F;W.sibling=null}return F.child}function zg(L,F,W){switch(F.tag){case 3:Ap(F),go();break;case 5:Nt(F);break;case 1:vn(F.type)&&En(F);break;case 4:pt(F,F.stateNode.containerInfo);break;case 10:Il(F,F.type._context,F.memoizedProps.value);break;case 13:var $=F.memoizedState;if($!==null)return $.dehydrated!==null?(Se(ct,ct.current&1),F.flags|=128,null):W&F.child.childLanes?Rp(L,F,W):(Se(ct,ct.current&1),L=tr(L,F,W),L!==null?L.sibling:null);Se(ct,ct.current&1);break;case 19:if($=(W&F.childLanes)!==0,L.flags&128){if($)return Fp(L,F,W);F.flags|=128}var it=F.memoizedState;if(it!==null&&(it.rendering=null,it.tail=null,it.lastEffect=null),Se(ct,ct.current),$)break;return null;case 22:case 23:return F.lanes=0,Mp(L,F,W)}return tr(L,F,W)}function Gg(L,F){switch(lr(F),F.tag){case 1:return vn(F.type)&&Ki(),L=F.flags,L&65536?(F.flags=L&-65537|128,F):null;case 3:return Mt(),ti(fn),ti(gi),Ft(),L=F.flags,L&65536&&!(L&128)?(F.flags=L&-65537|128,F):null;case 5:return zt(F),null;case 13:if(ti(ct),L=F.memoizedState,L!==null&&L.dehydrated!==null){if(F.alternate===null)throw Error(s(340));go()}return L=F.flags,L&65536?(F.flags=L&-65537|128,F):null;case 19:return ti(ct),null;case 4:return Mt(),null;case 10:return Nl(F.type._context),null;case 22:case 23:return Oc(),null;case 24:return null;default:return null}}var ku=!1,el=!1,Vg=typeof WeakSet=="function"?WeakSet:Set,De=null;function Uh(L,F){var W=L.ref;if(W!==null)if(typeof W=="function")try{W(null)}catch($){Rr(L,F,$)}else W.current=null}function Sc(L,F,W){try{W()}catch($){Rr(L,F,$)}}var Op=!1;function Tc(L,F){for(X(L.containerInfo),De=F;De!==null;)if(L=De,F=L.child,(L.subtreeFlags&1028)!==0&&F!==null)F.return=L,De=F;else for(;De!==null;){L=De;try{var W=L.alternate;if(L.flags&1024)switch(L.tag){case 0:case 11:case 15:break;case 1:if(W!==null){var $=W.memoizedProps,it=W.memoizedState,lt=L.stateNode,wt=lt.getSnapshotBeforeUpdate(L.elementType===L.type?$:bn(L.type,$),it);lt.__reactInternalSnapshotBeforeUpdate=wt}break;case 3:ot&&Me(L.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Xt){Rr(L,L.return,Xt)}if(F=L.sibling,F!==null){F.return=L.return,De=F;break}De=L.return}return W=Op,Op=!1,W}function Ks(L,F,W){var $=F.updateQueue;if($=$!==null?$.lastEffect:null,$!==null){var it=$=$.next;do{if((it.tag&L)===L){var lt=it.destroy;it.destroy=void 0,lt!==void 0&&Sc(F,W,lt)}it=it.next}while(it!==$)}}function Mo(L,F){if(F=F.updateQueue,F=F!==null?F.lastEffect:null,F!==null){var W=F=F.next;do{if((W.tag&L)===L){var $=W.create;W.destroy=$()}W=W.next}while(W!==F)}}function Ec(L){var F=L.ref;if(F!==null){var W=L.stateNode;switch(L.tag){case 5:L=B(W);break;default:L=W}typeof F=="function"?F(L):F.current=L}}function Mc(L,F,W){if(Sr&&typeof Sr.onCommitFiberUnmount=="function")try{Sr.onCommitFiberUnmount(po,F)}catch{}switch(F.tag){case 0:case 11:case 14:case 15:if(L=F.updateQueue,L!==null&&(L=L.lastEffect,L!==null)){var $=L=L.next;do{var it=$,lt=it.destroy;it=it.tag,lt!==void 0&&(it&2||it&4)&&Sc(F,W,lt),$=$.next}while($!==L)}break;case 1:if(Uh(F,W),L=F.stateNode,typeof L.componentWillUnmount=="function")try{L.props=F.memoizedProps,L.state=F.memoizedState,L.componentWillUnmount()}catch(wt){Rr(F,W,wt)}break;case 5:Uh(F,W);break;case 4:ot?wc(L,F,W):rt&&rt&&(F=F.stateNode.containerInfo,W=Ve(F),Ii(F,W))}}function Dp(L,F,W){for(var $=F;;)if(Mc(L,$,W),$.child===null||ot&&$.tag===4){if($===F)break;for(;$.sibling===null;){if($.return===null||$.return===F)return;$=$.return}$.sibling.return=$.return,$=$.sibling}else $.child.return=$,$=$.child}function va(L){var F=L.alternate;F!==null&&(L.alternate=null,va(F)),L.child=null,L.deletions=null,L.sibling=null,L.tag===5&&(F=L.stateNode,F!==null&&Pt(F)),L.stateNode=null,L.return=null,L.dependencies=null,L.memoizedProps=null,L.memoizedState=null,L.pendingProps=null,L.stateNode=null,L.updateQueue=null}function ju(L){return L.tag===5||L.tag===3||L.tag===4}function Co(L){t:for(;;){for(;L.sibling===null;){if(L.return===null||ju(L.return))return null;L=L.return}for(L.sibling.return=L.return,L=L.sibling;L.tag!==5&&L.tag!==6&&L.tag!==18;){if(L.flags&2||L.child===null||L.tag===4)continue t;L.child.return=L,L=L.child}if(!(L.flags&2))return L.stateNode}}function as(L){if(ot){t:{for(var F=L.return;F!==null;){if(ju(F))break t;F=F.return}throw Error(s(160))}var W=F;switch(W.tag){case 5:F=W.stateNode,W.flags&32&&(si(F),W.flags&=-33),W=Co(L),Ku(L,W,F);break;case 3:case 4:F=W.stateNode.containerInfo,W=Co(L),Cc(L,W,F);break;default:throw Error(s(161))}}}function Cc(L,F,W){var $=L.tag;if($===5||$===6)L=L.stateNode,F?Le(W,L,F):Pe(W,L);else if($!==4&&(L=L.child,L!==null))for(Cc(L,F,W),L=L.sibling;L!==null;)Cc(L,F,W),L=L.sibling}function Ku(L,F,W){var $=L.tag;if($===5||$===6)L=L.stateNode,F?Be(W,L,F):xe(W,L);else if($!==4&&(L=L.child,L!==null))for(Ku(L,F,W),L=L.sibling;L!==null;)Ku(L,F,W),L=L.sibling}function wc(L,F,W){for(var $=F,it=!1,lt,wt;;){if(!it){it=$.return;t:for(;;){if(it===null)throw Error(s(160));switch(lt=it.stateNode,it.tag){case 5:wt=!1;break t;case 3:lt=lt.containerInfo,wt=!0;break t;case 4:lt=lt.containerInfo,wt=!0;break t}it=it.return}it=!0}if($.tag===5||$.tag===6)Dp(L,$,W),wt?je(lt,$.stateNode):ne(lt,$.stateNode);else if($.tag===18)wt?ee(lt,$.stateNode):ie(lt,$.stateNode);else if($.tag===4){if($.child!==null){lt=$.stateNode.containerInfo,wt=!0,$.child.return=$,$=$.child;continue}}else if(Mc(L,$,W),$.child!==null){$.child.return=$,$=$.child;continue}if($===F)break;for(;$.sibling===null;){if($.return===null||$.return===F)return;$=$.return,$.tag===4&&(it=!1)}$.sibling.return=$.return,$=$.sibling}}function il(L,F){if(ot){switch(F.tag){case 0:case 11:case 14:case 15:Ks(3,F,F.return),Mo(3,F),Ks(5,F,F.return);return;case 1:return;case 5:var W=F.stateNode;if(W!=null){var $=F.memoizedProps;L=L!==null?L.memoizedProps:$;var it=F.type,lt=F.updateQueue;F.updateQueue=null,lt!==null&&Oe(W,lt,it,L,$,F)}return;case 6:if(F.stateNode===null)throw Error(s(162));W=F.memoizedProps,te(F.stateNode,L!==null?L.memoizedProps:W,W);return;case 3:gt&&L!==null&&L.memoizedState.isDehydrated&&Zt(F.stateNode.containerInfo);return;case 12:return;case 13:Zs(F);return;case 19:Zs(F);return;case 17:return}throw Error(s(163))}switch(F.tag){case 0:case 11:case 14:case 15:Ks(3,F,F.return),Mo(3,F),Ks(5,F,F.return);return;case 12:return;case 13:Zs(F);return;case 19:Zs(F);return;case 3:gt&&L!==null&&L.memoizedState.isDehydrated&&Zt(F.stateNode.containerInfo);break;case 22:case 23:return}t:if(rt){switch(F.tag){case 1:case 5:case 6:break t;case 3:case 4:F=F.stateNode,Ii(F.containerInfo,F.pendingChildren);break t}throw Error(s(163))}}function Zs(L){var F=L.updateQueue;if(F!==null){L.updateQueue=null;var W=L.stateNode;W===null&&(W=L.stateNode=new Vg),F.forEach(function($){var it=Hp.bind(null,L,$);W.has($)||(W.add($),$.then(it,it))})}}function Ip(L,F){for(De=F;De!==null;){F=De;var W=F.deletions;if(W!==null)for(var $=0;$";case Gh:return":has("+(Vh(L)||"")+")";case os:return'[role="'+L.value+'"]';case nl:return'"'+L.value+'"';case Yl:return'[data-testname="'+L.value+'"]';default:throw Error(s(365))}}function Bp(L,F){var W=[];L=[L,0];for(var $=0;$it&&(it=wt),$&=~lt}if($=it,$=rn()-$,$=(120>$?120:480>$?480:1080>$?1080:1920>$?1920:3e3>$?3e3:4320>$?4320:1960*Wg($/1960))-$,10<$){L.timeoutHandle=J(Po.bind(null,L,wr),$);break}Po(L,wr);break;case 5:Po(L,wr);break;default:throw Error(s(329))}}}return ei(L,rn()),L.callbackNode===W?Up.bind(null,L):null}function Fc(L,F){var W=Jl;return L.current.memoizedState.isDehydrated&&(ga(L,F).flags|=256),L=Pr(L,F),L!==2&&(F=wr,wr=W,F!==null&&sl(F)),L}function sl(L){wr===null?wr=L:wr.push.apply(wr,L)}function zp(L){for(var F=L;;){if(F.flags&16384){var W=F.updateQueue;if(W!==null&&(W=W.stores,W!==null))for(var $=0;$L?16:L,ja===null)var $=!1;else{if(L=ja,ja=null,Xh=0,Ci&6)throw Error(s(331));var it=Ci;for(Ci|=4,De=L.current;De!==null;){var lt=De,wt=lt.child;if(De.flags&16){var Xt=lt.deletions;if(Xt!==null){for(var oe=0;oern()-Lc?ga(L,0):bc|=W),ei(L,F)}function Vp(L,F){F===0&&(L.mode&1?(F=fo,fo<<=1,!(fo&130023424)&&(fo=4194304)):F=1);var W=Ar();L=Ql(L,F),L!==null&&(Ws(L,F,W),ei(L,W))}function Lo(L){var F=L.memoizedState,W=0;F!==null&&(W=F.retryLane),Vp(L,W)}function Hp(L,F){var W=0;switch(L.tag){case 13:var $=L.stateNode,it=L.memoizedState;it!==null&&(W=it.retryLane);break;case 19:$=L.stateNode;break;default:throw Error(s(314))}$!==null&&$.delete(F),Vp(L,W)}var Uc;Uc=function(L,F,W){if(L!==null)if(L.memoizedProps!==F.pendingProps||fn.current)ss=!0;else{if(!(L.lanes&W)&&!(F.flags&128))return ss=!1,zg(L,F,W);ss=!!(L.flags&131072)}else ss=!1,qi&&F.flags&1048576&&Rh(F,$o,F.index);switch(F.lanes=0,F.tag){case 2:var $=F.type;L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),L=F.pendingProps;var it=Vn(F,gi.current);Ys(F,W),it=me(null,F,$,L,it,W);var lt=be();return F.flags|=1,typeof it=="object"&&it!==null&&typeof it.render=="function"&&it.$$typeof===void 0?(F.tag=1,F.memoizedState=null,F.updateQueue=null,vn($)?(lt=!0,En(F)):lt=!1,F.memoizedState=it.state!==null&&it.state!==void 0?it.state:null,Hn(F),it.updater=vo,F.stateNode=it,it._reactInternals=F,Ga(F,$,L,W),F=gc(null,F,$,!0,lt,W)):(F.tag=0,qi&<&&zl(F),Fn(null,F,it,W),F=F.child),F;case 16:$=F.elementType;t:{switch(L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),L=F.pendingProps,it=$._init,$=it($._payload),F.type=$,it=F.tag=Wp($),L=bn($,L),it){case 0:F=js(null,F,$,L,W);break t;case 1:F=wp(null,F,$,L,W);break t;case 11:F=Sp(null,F,$,L,W);break t;case 14:F=Tp(null,F,$,bn($.type,L),W);break t}throw Error(s(306,$,""))}return F;case 0:return $=F.type,it=F.pendingProps,it=F.elementType===$?it:bn($,it),js(L,F,$,it,W);case 1:return $=F.type,it=F.pendingProps,it=F.elementType===$?it:bn($,it),wp(L,F,$,it,W);case 3:t:{if(Ap(F),L===null)throw Error(s(387));$=F.pendingProps,lt=F.memoizedState,it=lt.element,Ua(L,F),Yr(F,$,null,W);var wt=F.memoizedState;if($=wt.element,gt&<.isDehydrated)if(lt={element:$,isDehydrated:!1,cache:wt.cache,transitions:wt.transitions},F.updateQueue.baseState=lt,F.memoizedState=lt,F.flags&256){it=Error(s(423)),F=Pp(L,F,$,W,it);break t}else if($!==it){it=Error(s(424)),F=Pp(L,F,$,W,it);break t}else for(gt&&(Wn=qr(F.stateNode.containerInfo),Qn=F,qi=!0,ns=null,mo=!1),W=bh(F,null,$,W),F.child=W;W;)W.flags=W.flags&-3|4096,W=W.sibling;else{if(go(),$===it){F=tr(L,F,W);break t}Fn(L,F,$,W)}F=F.child}return F;case 5:return Nt(F),L===null&&dn(F),$=F.type,it=F.pendingProps,lt=L!==null?L.memoizedProps:null,wt=it.children,U($,it)?wt=null:lt!==null&&U($,lt)&&(F.flags|=32),Cp(L,F),Fn(L,F,wt,W),F.child;case 6:return L===null&&dn(F),null;case 13:return Rp(L,F,W);case 4:return pt(F,F.stateNode.containerInfo),$=F.pendingProps,L===null?F.child=Vr(F,null,$,W):Fn(L,F,$,W),F.child;case 11:return $=F.type,it=F.pendingProps,it=F.elementType===$?it:bn($,it),Sp(L,F,$,it,W);case 7:return Fn(L,F,F.pendingProps,W),F.child;case 8:return Fn(L,F,F.pendingProps.children,W),F.child;case 12:return Fn(L,F,F.pendingProps.children,W),F.child;case 10:t:{if($=F.type._context,it=F.pendingProps,lt=F.memoizedProps,wt=it.value,Il(F,$,wt),lt!==null)if(Es(lt.value,wt)){if(lt.children===it.children&&!fn.current){F=tr(L,F,W);break t}}else for(lt=F.child,lt!==null&&(lt.return=F);lt!==null;){var Xt=lt.dependencies;if(Xt!==null){wt=lt.child;for(var oe=Xt.firstContext;oe!==null;){if(oe.context===$){if(lt.tag===1){oe=Cn(-1,W&-W),oe.tag=2;var Ee=lt.updateQueue;if(Ee!==null){Ee=Ee.shared;var He=Ee.pending;He===null?oe.next=oe:(oe.next=He.next,He.next=oe),Ee.pending=oe}}lt.lanes|=W,oe=lt.alternate,oe!==null&&(oe.lanes|=W),Ba(lt.return,W,F),Xt.lanes|=W;break}oe=oe.next}}else if(lt.tag===10)wt=lt.type===F.type?null:lt.child;else if(lt.tag===18){if(wt=lt.return,wt===null)throw Error(s(341));wt.lanes|=W,Xt=wt.alternate,Xt!==null&&(Xt.lanes|=W),Ba(wt,W,F),wt=lt.sibling}else wt=lt.child;if(wt!==null)wt.return=lt;else for(wt=lt;wt!==null;){if(wt===F){wt=null;break}if(lt=wt.sibling,lt!==null){lt.return=wt.return,wt=lt;break}wt=wt.return}lt=wt}Fn(L,F,it.children,W),F=F.child}return F;case 9:return it=F.type,$=F.pendingProps.children,Ys(F,W),it=Qi(it),$=$(it),F.flags|=1,Fn(L,F,$,W),F.child;case 14:return $=F.type,it=bn($,F.pendingProps),it=bn($.type,it),Tp(L,F,$,it,W);case 15:return Ep(L,F,F.type,F.pendingProps,W);case 17:return $=F.type,it=F.pendingProps,it=F.elementType===$?it:bn($,it),L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),F.tag=1,vn($)?(L=!0,En(F)):L=!1,Ys(F,W),Zo(F,$,it),Ga(F,$,it,W),gc(null,F,$,!0,L,W);case 19:return Fp(L,F,W);case 22:return Mp(L,F,W)}throw Error(s(156,F.tag))};function rf(L,F){return Ur(L,F)}function Xg(L,F,W,$){this.tag=L,this.key=W,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=F,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=$,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rs(L,F,W,$){return new Xg(L,F,W,$)}function zc(L){return L=L.prototype,!(!L||!L.isReactComponent)}function Wp(L){if(typeof L=="function")return zc(L)?1:0;if(L!=null){if(L=L.$$typeof,L===u)return 11;if(L===c)return 14}return 2}function Ka(L,F){var W=L.alternate;return W===null?(W=Rs(L.tag,F,L.key,L.mode),W.elementType=L.elementType,W.type=L.type,W.stateNode=L.stateNode,W.alternate=L,L.alternate=W):(W.pendingProps=F,W.type=L.type,W.flags=0,W.subtreeFlags=0,W.deletions=null),W.flags=L.flags&14680064,W.childLanes=L.childLanes,W.lanes=L.lanes,W.child=L.child,W.memoizedProps=L.memoizedProps,W.memoizedState=L.memoizedState,W.updateQueue=L.updateQueue,F=L.dependencies,W.dependencies=F===null?null:{lanes:F.lanes,firstContext:F.firstContext},W.sibling=L.sibling,W.index=L.index,W.ref=L.ref,W}function sf(L,F,W,$,it,lt){var wt=2;if($=L,typeof L=="function")zc(L)&&(wt=1);else if(typeof L=="string")wt=5;else t:switch(L){case p:return Fo(W.children,it,lt,F);case h:wt=8,it|=8;break;case a:return L=Rs(12,W,F,it|2),L.elementType=a,L.lanes=lt,L;case f:return L=Rs(13,W,F,it),L.elementType=f,L.lanes=lt,L;case o:return L=Rs(19,W,F,it),L.elementType=o,L.lanes=lt,L;case v:return jh(W,it,lt,F);default:if(typeof L=="object"&&L!==null)switch(L.$$typeof){case l:wt=10;break t;case n:wt=9;break t;case u:wt=11;break t;case c:wt=14;break t;case d:wt=16,$=null;break t}throw Error(s(130,L==null?L:typeof L,""))}return F=Rs(wt,W,F,it),F.elementType=L,F.type=$,F.lanes=lt,F}function Fo(L,F,W,$){return L=Rs(7,L,$,F),L.lanes=W,L}function jh(L,F,W,$){return L=Rs(22,L,$,F),L.elementType=v,L.lanes=W,L.stateNode={},L}function br(L,F,W){return L=Rs(6,L,null,F),L.lanes=W,L}function bs(L,F,W){return F=Rs(4,L.children!==null?L.children:[],L.key,F),F.lanes=W,F.stateNode={containerInfo:L.containerInfo,pendingChildren:null,implementation:L.implementation},F}function Yg(L,F,W,$,it){this.tag=F,this.containerInfo=L,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=q,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hs(0),this.expirationTimes=Hs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hs(0),this.identifierPrefix=$,this.onRecoverableError=it,gt&&(this.mutableSourceEagerHydrationData=null)}function Xp(L,F,W,$,it,lt,wt,Xt,oe){return L=new Yg(L,F,W,Xt,oe),F===1?(F=1,lt===!0&&(F|=8)):F=0,lt=Rs(3,null,null,F),L.current=lt,lt.stateNode=L,lt.memoizedState={element:$,isDehydrated:W,cache:null,transitions:null},Hn(lt),L}function Kh(L){if(!L)return Br;L=L._reactInternals;t:{if(C(L)!==L||L.tag!==1)throw Error(s(170));var F=L;do{switch(F.tag){case 3:F=F.stateNode.context;break t;case 1:if(vn(F.type)){F=F.stateNode.__reactInternalMemoizedMergedChildContext;break t}}F=F.return}while(F!==null);throw Error(s(171))}if(L.tag===1){var W=L.type;if(vn(W))return Gs(L,W,F)}return F}function al(L){var F=L._reactInternals;if(F===void 0)throw typeof L.render=="function"?Error(s(188)):(L=Object.keys(L).join(","),Error(s(268,L)));return L=b(F),L===null?null:L.stateNode}function Gc(L,F){if(L=L.memoizedState,L!==null&&L.dehydrated!==null){var W=L.retryLane;L.retryLane=W!==0&&W=Ee&<>=mi&&it<=He&&wt<=Qe){L.splice(F,1);break}else if($!==Ee||W.width!==oe.width||Qewt){if(!(lt!==mi||W.height!==oe.height||He<$||Ee>it)){Ee>$&&(oe.width+=Ee-$,oe.x=$),Helt&&(oe.height+=mi-lt,oe.y=lt),QeW&&(W=wt)),wtHh&&(F.flags|=128,$=!0,Cr(it,!1),F.lanes=4194304)}else{if(!$)if(L=St(lt),L!==null){if(F.flags|=128,$=!0,L=L.updateQueue,L!==null&&(F.updateQueue=L,F.flags|=4),Cr(it,!0),it.tail===null&&it.tailMode==="hidden"&&!lt.alternate&&!qi)return ri(F),null}else 2*rn()-it.renderingStartTime>Hh&&W!==1073741824&&(F.flags|=128,$=!0,Cr(it,!1),F.lanes=4194304);it.isBackwards?(lt.sibling=F.child,F.child=lt):(L=it.last,L!==null?L.sibling=lt:F.child=lt,it.last=lt)}return it.tail!==null?(F=it.tail,it.rendering=F,it.tail=F.sibling,it.renderingStartTime=rn(),F.sibling=null,L=ct.current,Se(ct,$?L&1|2:L&1),F):(ri(F),null);case 22:case 23:return Dc(),$=F.memoizedState!==null,L!==null&&L.memoizedState!==null!==$&&(F.flags|=8192),$&&F.mode&1?ls&1073741824&&(ri(F),ot&&F.subtreeFlags&6&&(F.flags|=8192)):ri(F),null;case 24:return null;case 25:return null}throw Error(s(156,F.tag))}var Ug=y.ReactCurrentOwner,ss=!1;function Fn(L,F,W,$){F.child=L===null?bh(F,null,W,$):Vr(F,L.child,W,$)}function Sp(L,F,W,$,it){W=W.render;var lt=F.ref;return Ys(F,it),$=me(L,F,W,$,lt,it),W=be(),L!==null&&!ss?(F.updateQueue=L.updateQueue,F.flags&=-2053,L.lanes&=~it,tr(L,F,it)):(qi&&W&&zl(F),F.flags|=1,Fn(L,F,$,it),F.child)}function Tp(L,F,W,$,it){if(L===null){var lt=W.type;return typeof lt=="function"&&!Gc(lt)&<.defaultProps===void 0&&W.compare===null&&W.defaultProps===void 0?(F.tag=15,F.type=lt,Ep(L,F,lt,$,it)):(L=sf(W.type,null,$,F,F.mode,it),L.ref=F.ref,L.return=F,F.child=L)}if(lt=L.child,!(L.lanes&it)){var wt=lt.memoizedProps;if(W=W.compare,W=W!==null?W:xn,W(wt,$)&&L.ref===F.ref)return tr(L,F,it)}return F.flags|=1,L=Ka(lt,$),L.ref=F.ref,L.return=F,F.child=L}function Ep(L,F,W,$,it){if(L!==null&&xn(L.memoizedProps,$)&&L.ref===F.ref)if(ss=!1,(L.lanes&it)!==0)L.flags&131072&&(ss=!0);else return F.lanes=L.lanes,tr(L,F,it);return js(L,F,W,$,it)}function Mp(L,F,W){var $=F.pendingProps,it=$.children,lt=L!==null?L.memoizedState:null;if($.mode==="hidden")if(!(F.mode&1))F.memoizedState={baseLanes:0,cachePool:null},Se(jl,ls),ls|=W;else if(W&1073741824)F.memoizedState={baseLanes:0,cachePool:null},$=lt!==null?lt.baseLanes:W,Se(jl,ls),ls|=$;else return L=lt!==null?lt.baseLanes|W:W,F.lanes=F.childLanes=1073741824,F.memoizedState={baseLanes:L,cachePool:null},F.updateQueue=null,Se(jl,ls),ls|=L,null;else lt!==null?($=lt.baseLanes|W,F.memoizedState=null):$=W,Se(jl,ls),ls|=$;return Fn(L,F,it,W),F.child}function Cp(L,F){var W=F.ref;(L===null&&W!==null||L!==null&&L.ref!==W)&&(F.flags|=512,F.flags|=2097152)}function js(L,F,W,$,it){var lt=vn(W)?Ni:gi.current;return lt=Vn(F,lt),Ys(F,it),W=me(L,F,W,$,lt,it),$=be(),L!==null&&!ss?(F.updateQueue=L.updateQueue,F.flags&=-2053,L.lanes&=~it,tr(L,F,it)):(qi&&$&&zl(F),F.flags|=1,Fn(L,F,W,it),F.child)}function wp(L,F,W,$,it){if(vn(W)){var lt=!0;En(F)}else lt=!1;if(Ys(F,it),F.stateNode===null)L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),Zo(F,W,$),Ga(F,W,$,it),$=!0;else if(L===null){var wt=F.stateNode,Xt=F.memoizedProps;wt.props=Xt;var oe=wt.context,Ee=W.contextType;typeof Ee=="object"&&Ee!==null?Ee=Qi(Ee):(Ee=vn(W)?Ni:gi.current,Ee=Vn(F,Ee));var He=W.getDerivedStateFromProps,mi=typeof He=="function"||typeof wt.getSnapshotBeforeUpdate=="function";mi||typeof wt.UNSAFE_componentWillReceiveProps!="function"&&typeof wt.componentWillReceiveProps!="function"||(Xt!==$||oe!==Ee)&&Jo(F,wt,$,Ee),Sn=!1;var Qe=F.memoizedState;wt.state=Qe,Yr(F,$,wt,it),oe=F.memoizedState,Xt!==$||Qe!==oe||fn.current||Sn?(typeof He=="function"&&(ts(F,W,He,$),oe=F.memoizedState),(Xt=Sn||Ul(F,W,Xt,$,Qe,oe,Ee))?(mi||typeof wt.UNSAFE_componentWillMount!="function"&&typeof wt.componentWillMount!="function"||(typeof wt.componentWillMount=="function"&&wt.componentWillMount(),typeof wt.UNSAFE_componentWillMount=="function"&&wt.UNSAFE_componentWillMount()),typeof wt.componentDidMount=="function"&&(F.flags|=4194308)):(typeof wt.componentDidMount=="function"&&(F.flags|=4194308),F.memoizedProps=$,F.memoizedState=oe),wt.props=$,wt.state=oe,wt.context=Ee,$=Xt):(typeof wt.componentDidMount=="function"&&(F.flags|=4194308),$=!1)}else{wt=F.stateNode,Ua(L,F),Xt=F.memoizedProps,Ee=F.type===F.elementType?Xt:bn(F.type,Xt),wt.props=Ee,mi=F.pendingProps,Qe=wt.context,oe=W.contextType,typeof oe=="object"&&oe!==null?oe=Qi(oe):(oe=vn(W)?Ni:gi.current,oe=Vn(F,oe));var tn=W.getDerivedStateFromProps;(He=typeof tn=="function"||typeof wt.getSnapshotBeforeUpdate=="function")||typeof wt.UNSAFE_componentWillReceiveProps!="function"&&typeof wt.componentWillReceiveProps!="function"||(Xt!==mi||Qe!==oe)&&Jo(F,wt,$,oe),Sn=!1,Qe=F.memoizedState,wt.state=Qe,Yr(F,$,wt,it);var Xe=F.memoizedState;Xt!==mi||Qe!==Xe||fn.current||Sn?(typeof tn=="function"&&(ts(F,W,tn,$),Xe=F.memoizedState),(Ee=Sn||Ul(F,W,Ee,$,Qe,Xe,oe)||!1)?(He||typeof wt.UNSAFE_componentWillUpdate!="function"&&typeof wt.componentWillUpdate!="function"||(typeof wt.componentWillUpdate=="function"&&wt.componentWillUpdate($,Xe,oe),typeof wt.UNSAFE_componentWillUpdate=="function"&&wt.UNSAFE_componentWillUpdate($,Xe,oe)),typeof wt.componentDidUpdate=="function"&&(F.flags|=4),typeof wt.getSnapshotBeforeUpdate=="function"&&(F.flags|=1024)):(typeof wt.componentDidUpdate!="function"||Xt===L.memoizedProps&&Qe===L.memoizedState||(F.flags|=4),typeof wt.getSnapshotBeforeUpdate!="function"||Xt===L.memoizedProps&&Qe===L.memoizedState||(F.flags|=1024),F.memoizedProps=$,F.memoizedState=Xe),wt.props=$,wt.state=Xe,wt.context=oe,$=Ee):(typeof wt.componentDidUpdate!="function"||Xt===L.memoizedProps&&Qe===L.memoizedState||(F.flags|=4),typeof wt.getSnapshotBeforeUpdate!="function"||Xt===L.memoizedProps&&Qe===L.memoizedState||(F.flags|=1024),$=!1)}return yc(L,F,W,$,lt,it)}function yc(L,F,W,$,it,lt){Cp(L,F);var wt=(F.flags&128)!==0;if(!$&&!wt)return it&&la(F,W,!1),tr(L,F,lt);$=F.stateNode,Ug.current=F;var Xt=wt&&typeof W.getDerivedStateFromError!="function"?null:$.render();return F.flags|=1,L!==null&&wt?(F.child=Vr(F,L.child,null,lt),F.child=Vr(F,null,Xt,lt)):Fn(L,F,Xt,lt),F.memoizedState=$.state,it&&la(F,W,!0),F.child}function Ap(L){var F=L.stateNode;F.pendingContext?pr(L,F.pendingContext,F.pendingContext!==F.context):F.context&&pr(L,F.context,!1),pt(L,F.containerInfo)}function Pp(L,F,W,$,it){return go(),Va(it),F.flags|=256,Fn(L,F,W,$),F.child}var Xu={dehydrated:null,treeContext:null,retryLane:0};function As(L){return{baseLanes:L,cachePool:null}}function Rp(L,F,W){var $=F.pendingProps,it=ct.current,lt=!1,wt=(F.flags&128)!==0,Xt;if((Xt=wt)||(Xt=L!==null&&L.memoizedState===null?!1:(it&2)!==0),Xt?(lt=!0,F.flags&=-129):(L===null||L.memoizedState!==null)&&(it|=1),Se(ct,it&1),L===null)return dn(F),L=F.memoizedState,L!==null&&(L=L.dehydrated,L!==null)?(F.mode&1?oa(L)?F.lanes=8:F.lanes=1073741824:F.lanes=1,null):(it=$.children,L=$.fallback,lt?($=F.mode,lt=F.child,it={mode:"hidden",children:it},!($&1)&<!==null?(lt.childLanes=0,lt.pendingProps=it):lt=jh(it,$,0,null),L=Fo(L,$,W,null),lt.return=F,L.return=F,lt.sibling=L,F.child=lt,F.child.memoizedState=As(W),F.memoizedState=Xu,L):xc(F,it));if(it=L.memoizedState,it!==null){if(Xt=it.dehydrated,Xt!==null){if(wt)return F.flags&256?(F.flags&=-257,Yu(L,F,W,Error(s(422)))):F.memoizedState!==null?(F.child=L.child,F.flags|=128,null):(lt=$.fallback,it=F.mode,$=jh({mode:"visible",children:$.children},it,0,null),lt=Fo(lt,it,W,null),lt.flags|=2,$.return=F,lt.return=F,$.sibling=lt,F.child=$,F.mode&1&&Vr(F,L.child,null,W),F.child.memoizedState=As(W),F.memoizedState=Xu,lt);if(!(F.mode&1))F=Yu(L,F,W,null);else if(oa(Xt))F=Yu(L,F,W,Error(s(419)));else if($=(W&L.childLanes)!==0,ss||$){if($=Xn,$!==null){switch(W&-W){case 4:lt=2;break;case 16:lt=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:lt=32;break;case 536870912:lt=268435456;break;default:lt=0}$=lt&($.suspendedLanes|W)?0:lt,$!==0&&$!==it.retryLane&&(it.retryLane=$,Ps(L,$,-1))}ef(),F=Yu(L,F,W,Error(s(421)))}else Ra(Xt)?(F.flags|=128,F.child=L.child,F=Lo.bind(null,L),Us(Xt,F),F=null):(W=it.treeContext,gt&&(Wn=zs(Xt),Qn=F,qi=!0,ns=null,mo=!1,W!==null&&(ar[or++]=Ms,ar[or++]=is,ar[or++]=ca,Ms=W.id,is=W.overflow,ca=F)),F=xc(F,F.pendingProps.children),F.flags|=4096);return F}return lt?($=Lp(L,F,$.children,$.fallback,W),lt=F.child,it=L.child.memoizedState,lt.memoizedState=it===null?As(W):{baseLanes:it.baseLanes|W,cachePool:null},lt.childLanes=L.childLanes&~W,F.memoizedState=Xu,$):(W=bp(L,F,$.children,W),F.memoizedState=null,W)}return lt?($=Lp(L,F,$.children,$.fallback,W),lt=F.child,it=L.child.memoizedState,lt.memoizedState=it===null?As(W):{baseLanes:it.baseLanes|W,cachePool:null},lt.childLanes=L.childLanes&~W,F.memoizedState=Xu,$):(W=bp(L,F,$.children,W),F.memoizedState=null,W)}function xc(L,F){return F=jh({mode:"visible",children:F},L.mode,0,null),F.return=L,L.child=F}function bp(L,F,W,$){var it=L.child;return L=it.sibling,W=Ka(it,{mode:"visible",children:W}),!(F.mode&1)&&(W.lanes=$),W.return=F,W.sibling=null,L!==null&&($=F.deletions,$===null?(F.deletions=[L],F.flags|=16):$.push(L)),F.child=W}function Lp(L,F,W,$,it){var lt=F.mode;L=L.child;var wt=L.sibling,Xt={mode:"hidden",children:W};return!(lt&1)&&F.child!==L?(W=F.child,W.childLanes=0,W.pendingProps=Xt,F.deletions=null):(W=Ka(L,Xt),W.subtreeFlags=L.subtreeFlags&14680064),wt!==null?$=Ka(wt,$):($=Fo($,lt,it,null),$.flags|=2),$.return=F,W.return=F,W.sibling=$,F.child=W,$}function Yu(L,F,W,$){return $!==null&&Va($),Vr(F,L.child,null,W),L=xc(F,F.pendingProps.children),L.flags|=2,F.memoizedState=null,L}function Eo(L,F,W){L.lanes|=F;var $=L.alternate;$!==null&&($.lanes|=F),Ba(L.return,F,W)}function Sc(L,F,W,$,it){var lt=L.memoizedState;lt===null?L.memoizedState={isBackwards:F,rendering:null,renderingStartTime:0,last:$,tail:W,tailMode:it}:(lt.isBackwards=F,lt.rendering=null,lt.renderingStartTime=0,lt.last=$,lt.tail=W,lt.tailMode=it)}function Fp(L,F,W){var $=F.pendingProps,it=$.revealOrder,lt=$.tail;if(Fn(L,F,$.children,W),$=ct.current,$&2)$=$&1|2,F.flags|=128;else{if(L!==null&&L.flags&128)t:for(L=F.child;L!==null;){if(L.tag===13)L.memoizedState!==null&&Eo(L,W,F);else if(L.tag===19)Eo(L,W,F);else if(L.child!==null){L.child.return=L,L=L.child;continue}if(L===F)break t;for(;L.sibling===null;){if(L.return===null||L.return===F)break t;L=L.return}L.sibling.return=L.return,L=L.sibling}$&=1}if(Se(ct,$),!(F.mode&1))F.memoizedState=null;else switch(it){case"forwards":for(W=F.child,it=null;W!==null;)L=W.alternate,L!==null&&St(L)===null&&(it=W),W=W.sibling;W=it,W===null?(it=F.child,F.child=null):(it=W.sibling,W.sibling=null),Sc(F,!1,it,W,lt);break;case"backwards":for(W=null,it=F.child,F.child=null;it!==null;){if(L=it.alternate,L!==null&&St(L)===null){F.child=it;break}L=it.sibling,it.sibling=W,W=it,it=L}Sc(F,!0,W,null,lt);break;case"together":Sc(F,!1,null,null,void 0);break;default:F.memoizedState=null}return F.child}function tr(L,F,W){if(L!==null&&(F.dependencies=L.dependencies),Zl|=F.lanes,!(W&F.childLanes))return null;if(L!==null&&F.child!==L.child)throw Error(s(153));if(F.child!==null){for(L=F.child,W=Ka(L,L.pendingProps),F.child=W,W.return=F;L.sibling!==null;)L=L.sibling,W=W.sibling=Ka(L,L.pendingProps),W.return=F;W.sibling=null}return F.child}function zg(L,F,W){switch(F.tag){case 3:Ap(F),go();break;case 5:Nt(F);break;case 1:vn(F.type)&&En(F);break;case 4:pt(F,F.stateNode.containerInfo);break;case 10:Il(F,F.type._context,F.memoizedProps.value);break;case 13:var $=F.memoizedState;if($!==null)return $.dehydrated!==null?(Se(ct,ct.current&1),F.flags|=128,null):W&F.child.childLanes?Rp(L,F,W):(Se(ct,ct.current&1),L=tr(L,F,W),L!==null?L.sibling:null);Se(ct,ct.current&1);break;case 19:if($=(W&F.childLanes)!==0,L.flags&128){if($)return Fp(L,F,W);F.flags|=128}var it=F.memoizedState;if(it!==null&&(it.rendering=null,it.tail=null,it.lastEffect=null),Se(ct,ct.current),$)break;return null;case 22:case 23:return F.lanes=0,Mp(L,F,W)}return tr(L,F,W)}function Gg(L,F){switch(lr(F),F.tag){case 1:return vn(F.type)&&Ki(),L=F.flags,L&65536?(F.flags=L&-65537|128,F):null;case 3:return Mt(),ei(fn),ei(gi),Ft(),L=F.flags,L&65536&&!(L&128)?(F.flags=L&-65537|128,F):null;case 5:return zt(F),null;case 13:if(ei(ct),L=F.memoizedState,L!==null&&L.dehydrated!==null){if(F.alternate===null)throw Error(s(340));go()}return L=F.flags,L&65536?(F.flags=L&-65537|128,F):null;case 19:return ei(ct),null;case 4:return Mt(),null;case 10:return Nl(F.type._context),null;case 22:case 23:return Dc(),null;case 24:return null;default:return null}}var ku=!1,el=!1,Vg=typeof WeakSet=="function"?WeakSet:Set,De=null;function Uh(L,F){var W=L.ref;if(W!==null)if(typeof W=="function")try{W(null)}catch($){Rr(L,F,$)}else W.current=null}function Tc(L,F,W){try{W()}catch($){Rr(L,F,$)}}var Op=!1;function Ec(L,F){for(X(L.containerInfo),De=F;De!==null;)if(L=De,F=L.child,(L.subtreeFlags&1028)!==0&&F!==null)F.return=L,De=F;else for(;De!==null;){L=De;try{var W=L.alternate;if(L.flags&1024)switch(L.tag){case 0:case 11:case 15:break;case 1:if(W!==null){var $=W.memoizedProps,it=W.memoizedState,lt=L.stateNode,wt=lt.getSnapshotBeforeUpdate(L.elementType===L.type?$:bn(L.type,$),it);lt.__reactInternalSnapshotBeforeUpdate=wt}break;case 3:ot&&Ce(L.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Xt){Rr(L,L.return,Xt)}if(F=L.sibling,F!==null){F.return=L.return,De=F;break}De=L.return}return W=Op,Op=!1,W}function Ks(L,F,W){var $=F.updateQueue;if($=$!==null?$.lastEffect:null,$!==null){var it=$=$.next;do{if((it.tag&L)===L){var lt=it.destroy;it.destroy=void 0,lt!==void 0&&Tc(F,W,lt)}it=it.next}while(it!==$)}}function Mo(L,F){if(F=F.updateQueue,F=F!==null?F.lastEffect:null,F!==null){var W=F=F.next;do{if((W.tag&L)===L){var $=W.create;W.destroy=$()}W=W.next}while(W!==F)}}function Mc(L){var F=L.ref;if(F!==null){var W=L.stateNode;switch(L.tag){case 5:L=B(W);break;default:L=W}typeof F=="function"?F(L):F.current=L}}function Cc(L,F,W){if(Sr&&typeof Sr.onCommitFiberUnmount=="function")try{Sr.onCommitFiberUnmount(po,F)}catch{}switch(F.tag){case 0:case 11:case 14:case 15:if(L=F.updateQueue,L!==null&&(L=L.lastEffect,L!==null)){var $=L=L.next;do{var it=$,lt=it.destroy;it=it.tag,lt!==void 0&&(it&2||it&4)&&Tc(F,W,lt),$=$.next}while($!==L)}break;case 1:if(Uh(F,W),L=F.stateNode,typeof L.componentWillUnmount=="function")try{L.props=F.memoizedProps,L.state=F.memoizedState,L.componentWillUnmount()}catch(wt){Rr(F,W,wt)}break;case 5:Uh(F,W);break;case 4:ot?Ac(L,F,W):rt&&rt&&(F=F.stateNode.containerInfo,W=Ve(F),Ii(F,W))}}function Dp(L,F,W){for(var $=F;;)if(Cc(L,$,W),$.child===null||ot&&$.tag===4){if($===F)break;for(;$.sibling===null;){if($.return===null||$.return===F)return;$=$.return}$.sibling.return=$.return,$=$.sibling}else $.child.return=$,$=$.child}function va(L){var F=L.alternate;F!==null&&(L.alternate=null,va(F)),L.child=null,L.deletions=null,L.sibling=null,L.tag===5&&(F=L.stateNode,F!==null&&Pt(F)),L.stateNode=null,L.return=null,L.dependencies=null,L.memoizedProps=null,L.memoizedState=null,L.pendingProps=null,L.stateNode=null,L.updateQueue=null}function ju(L){return L.tag===5||L.tag===3||L.tag===4}function Co(L){t:for(;;){for(;L.sibling===null;){if(L.return===null||ju(L.return))return null;L=L.return}for(L.sibling.return=L.return,L=L.sibling;L.tag!==5&&L.tag!==6&&L.tag!==18;){if(L.flags&2||L.child===null||L.tag===4)continue t;L.child.return=L,L=L.child}if(!(L.flags&2))return L.stateNode}}function as(L){if(ot){t:{for(var F=L.return;F!==null;){if(ju(F))break t;F=F.return}throw Error(s(160))}var W=F;switch(W.tag){case 5:F=W.stateNode,W.flags&32&&(si(F),W.flags&=-33),W=Co(L),Ku(L,W,F);break;case 3:case 4:F=W.stateNode.containerInfo,W=Co(L),wc(L,W,F);break;default:throw Error(s(161))}}}function wc(L,F,W){var $=L.tag;if($===5||$===6)L=L.stateNode,F?Le(W,L,F):Pe(W,L);else if($!==4&&(L=L.child,L!==null))for(wc(L,F,W),L=L.sibling;L!==null;)wc(L,F,W),L=L.sibling}function Ku(L,F,W){var $=L.tag;if($===5||$===6)L=L.stateNode,F?Be(W,L,F):xe(W,L);else if($!==4&&(L=L.child,L!==null))for(Ku(L,F,W),L=L.sibling;L!==null;)Ku(L,F,W),L=L.sibling}function Ac(L,F,W){for(var $=F,it=!1,lt,wt;;){if(!it){it=$.return;t:for(;;){if(it===null)throw Error(s(160));switch(lt=it.stateNode,it.tag){case 5:wt=!1;break t;case 3:lt=lt.containerInfo,wt=!0;break t;case 4:lt=lt.containerInfo,wt=!0;break t}it=it.return}it=!0}if($.tag===5||$.tag===6)Dp(L,$,W),wt?je(lt,$.stateNode):ne(lt,$.stateNode);else if($.tag===18)wt?ee(lt,$.stateNode):ie(lt,$.stateNode);else if($.tag===4){if($.child!==null){lt=$.stateNode.containerInfo,wt=!0,$.child.return=$,$=$.child;continue}}else if(Cc(L,$,W),$.child!==null){$.child.return=$,$=$.child;continue}if($===F)break;for(;$.sibling===null;){if($.return===null||$.return===F)return;$=$.return,$.tag===4&&(it=!1)}$.sibling.return=$.return,$=$.sibling}}function il(L,F){if(ot){switch(F.tag){case 0:case 11:case 14:case 15:Ks(3,F,F.return),Mo(3,F),Ks(5,F,F.return);return;case 1:return;case 5:var W=F.stateNode;if(W!=null){var $=F.memoizedProps;L=L!==null?L.memoizedProps:$;var it=F.type,lt=F.updateQueue;F.updateQueue=null,lt!==null&&Oe(W,lt,it,L,$,F)}return;case 6:if(F.stateNode===null)throw Error(s(162));W=F.memoizedProps,te(F.stateNode,L!==null?L.memoizedProps:W,W);return;case 3:gt&&L!==null&&L.memoizedState.isDehydrated&&Zt(F.stateNode.containerInfo);return;case 12:return;case 13:Zs(F);return;case 19:Zs(F);return;case 17:return}throw Error(s(163))}switch(F.tag){case 0:case 11:case 14:case 15:Ks(3,F,F.return),Mo(3,F),Ks(5,F,F.return);return;case 12:return;case 13:Zs(F);return;case 19:Zs(F);return;case 3:gt&&L!==null&&L.memoizedState.isDehydrated&&Zt(F.stateNode.containerInfo);break;case 22:case 23:return}t:if(rt){switch(F.tag){case 1:case 5:case 6:break t;case 3:case 4:F=F.stateNode,Ii(F.containerInfo,F.pendingChildren);break t}throw Error(s(163))}}function Zs(L){var F=L.updateQueue;if(F!==null){L.updateQueue=null;var W=L.stateNode;W===null&&(W=L.stateNode=new Vg),F.forEach(function($){var it=Hp.bind(null,L,$);W.has($)||(W.add($),$.then(it,it))})}}function Ip(L,F){for(De=F;De!==null;){F=De;var W=F.deletions;if(W!==null)for(var $=0;$";case Gh:return":has("+(Vh(L)||"")+")";case os:return'[role="'+L.value+'"]';case nl:return'"'+L.value+'"';case Yl:return'[data-testname="'+L.value+'"]';default:throw Error(s(365))}}function Bp(L,F){var W=[];L=[L,0];for(var $=0;$it&&(it=wt),$&=~lt}if($=it,$=rn()-$,$=(120>$?120:480>$?480:1080>$?1080:1920>$?1920:3e3>$?3e3:4320>$?4320:1960*Wg($/1960))-$,10<$){L.timeoutHandle=J(Po.bind(null,L,wr),$);break}Po(L,wr);break;case 5:Po(L,wr);break;default:throw Error(s(329))}}}return ii(L,rn()),L.callbackNode===W?Up.bind(null,L):null}function Oc(L,F){var W=Jl;return L.current.memoizedState.isDehydrated&&(ga(L,F).flags|=256),L=Pr(L,F),L!==2&&(F=wr,wr=W,F!==null&&sl(F)),L}function sl(L){wr===null?wr=L:wr.push.apply(wr,L)}function zp(L){for(var F=L;;){if(F.flags&16384){var W=F.updateQueue;if(W!==null&&(W=W.stores,W!==null))for(var $=0;$L?16:L,ja===null)var $=!1;else{if(L=ja,ja=null,Xh=0,Ci&6)throw Error(s(331));var it=Ci;for(Ci|=4,De=L.current;De!==null;){var lt=De,wt=lt.child;if(De.flags&16){var Xt=lt.deletions;if(Xt!==null){for(var oe=0;oern()-Fc?ga(L,0):Lc|=W),ii(L,F)}function Vp(L,F){F===0&&(L.mode&1?(F=fo,fo<<=1,!(fo&130023424)&&(fo=4194304)):F=1);var W=Ar();L=Ql(L,F),L!==null&&(Ws(L,F,W),ii(L,W))}function Lo(L){var F=L.memoizedState,W=0;F!==null&&(W=F.retryLane),Vp(L,W)}function Hp(L,F){var W=0;switch(L.tag){case 13:var $=L.stateNode,it=L.memoizedState;it!==null&&(W=it.retryLane);break;case 19:$=L.stateNode;break;default:throw Error(s(314))}$!==null&&$.delete(F),Vp(L,W)}var zc;zc=function(L,F,W){if(L!==null)if(L.memoizedProps!==F.pendingProps||fn.current)ss=!0;else{if(!(L.lanes&W)&&!(F.flags&128))return ss=!1,zg(L,F,W);ss=!!(L.flags&131072)}else ss=!1,qi&&F.flags&1048576&&Rh(F,$o,F.index);switch(F.lanes=0,F.tag){case 2:var $=F.type;L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),L=F.pendingProps;var it=Vn(F,gi.current);Ys(F,W),it=me(null,F,$,L,it,W);var lt=be();return F.flags|=1,typeof it=="object"&&it!==null&&typeof it.render=="function"&&it.$$typeof===void 0?(F.tag=1,F.memoizedState=null,F.updateQueue=null,vn($)?(lt=!0,En(F)):lt=!1,F.memoizedState=it.state!==null&&it.state!==void 0?it.state:null,Hn(F),it.updater=vo,F.stateNode=it,it._reactInternals=F,Ga(F,$,L,W),F=yc(null,F,$,!0,lt,W)):(F.tag=0,qi&<&&zl(F),Fn(null,F,it,W),F=F.child),F;case 16:$=F.elementType;t:{switch(L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),L=F.pendingProps,it=$._init,$=it($._payload),F.type=$,it=F.tag=Wp($),L=bn($,L),it){case 0:F=js(null,F,$,L,W);break t;case 1:F=wp(null,F,$,L,W);break t;case 11:F=Sp(null,F,$,L,W);break t;case 14:F=Tp(null,F,$,bn($.type,L),W);break t}throw Error(s(306,$,""))}return F;case 0:return $=F.type,it=F.pendingProps,it=F.elementType===$?it:bn($,it),js(L,F,$,it,W);case 1:return $=F.type,it=F.pendingProps,it=F.elementType===$?it:bn($,it),wp(L,F,$,it,W);case 3:t:{if(Ap(F),L===null)throw Error(s(387));$=F.pendingProps,lt=F.memoizedState,it=lt.element,Ua(L,F),Yr(F,$,null,W);var wt=F.memoizedState;if($=wt.element,gt&<.isDehydrated)if(lt={element:$,isDehydrated:!1,cache:wt.cache,transitions:wt.transitions},F.updateQueue.baseState=lt,F.memoizedState=lt,F.flags&256){it=Error(s(423)),F=Pp(L,F,$,W,it);break t}else if($!==it){it=Error(s(424)),F=Pp(L,F,$,W,it);break t}else for(gt&&(Wn=qr(F.stateNode.containerInfo),Qn=F,qi=!0,ns=null,mo=!1),W=bh(F,null,$,W),F.child=W;W;)W.flags=W.flags&-3|4096,W=W.sibling;else{if(go(),$===it){F=tr(L,F,W);break t}Fn(L,F,$,W)}F=F.child}return F;case 5:return Nt(F),L===null&&dn(F),$=F.type,it=F.pendingProps,lt=L!==null?L.memoizedProps:null,wt=it.children,U($,it)?wt=null:lt!==null&&U($,lt)&&(F.flags|=32),Cp(L,F),Fn(L,F,wt,W),F.child;case 6:return L===null&&dn(F),null;case 13:return Rp(L,F,W);case 4:return pt(F,F.stateNode.containerInfo),$=F.pendingProps,L===null?F.child=Vr(F,null,$,W):Fn(L,F,$,W),F.child;case 11:return $=F.type,it=F.pendingProps,it=F.elementType===$?it:bn($,it),Sp(L,F,$,it,W);case 7:return Fn(L,F,F.pendingProps,W),F.child;case 8:return Fn(L,F,F.pendingProps.children,W),F.child;case 12:return Fn(L,F,F.pendingProps.children,W),F.child;case 10:t:{if($=F.type._context,it=F.pendingProps,lt=F.memoizedProps,wt=it.value,Il(F,$,wt),lt!==null)if(Es(lt.value,wt)){if(lt.children===it.children&&!fn.current){F=tr(L,F,W);break t}}else for(lt=F.child,lt!==null&&(lt.return=F);lt!==null;){var Xt=lt.dependencies;if(Xt!==null){wt=lt.child;for(var oe=Xt.firstContext;oe!==null;){if(oe.context===$){if(lt.tag===1){oe=Cn(-1,W&-W),oe.tag=2;var Ee=lt.updateQueue;if(Ee!==null){Ee=Ee.shared;var He=Ee.pending;He===null?oe.next=oe:(oe.next=He.next,He.next=oe),Ee.pending=oe}}lt.lanes|=W,oe=lt.alternate,oe!==null&&(oe.lanes|=W),Ba(lt.return,W,F),Xt.lanes|=W;break}oe=oe.next}}else if(lt.tag===10)wt=lt.type===F.type?null:lt.child;else if(lt.tag===18){if(wt=lt.return,wt===null)throw Error(s(341));wt.lanes|=W,Xt=wt.alternate,Xt!==null&&(Xt.lanes|=W),Ba(wt,W,F),wt=lt.sibling}else wt=lt.child;if(wt!==null)wt.return=lt;else for(wt=lt;wt!==null;){if(wt===F){wt=null;break}if(lt=wt.sibling,lt!==null){lt.return=wt.return,wt=lt;break}wt=wt.return}lt=wt}Fn(L,F,it.children,W),F=F.child}return F;case 9:return it=F.type,$=F.pendingProps.children,Ys(F,W),it=Qi(it),$=$(it),F.flags|=1,Fn(L,F,$,W),F.child;case 14:return $=F.type,it=bn($,F.pendingProps),it=bn($.type,it),Tp(L,F,$,it,W);case 15:return Ep(L,F,F.type,F.pendingProps,W);case 17:return $=F.type,it=F.pendingProps,it=F.elementType===$?it:bn($,it),L!==null&&(L.alternate=null,F.alternate=null,F.flags|=2),F.tag=1,vn($)?(L=!0,En(F)):L=!1,Ys(F,W),Zo(F,$,it),Ga(F,$,it,W),yc(null,F,$,!0,L,W);case 19:return Fp(L,F,W);case 22:return Mp(L,F,W)}throw Error(s(156,F.tag))};function rf(L,F){return Ur(L,F)}function Xg(L,F,W,$){this.tag=L,this.key=W,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=F,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=$,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rs(L,F,W,$){return new Xg(L,F,W,$)}function Gc(L){return L=L.prototype,!(!L||!L.isReactComponent)}function Wp(L){if(typeof L=="function")return Gc(L)?1:0;if(L!=null){if(L=L.$$typeof,L===u)return 11;if(L===c)return 14}return 2}function Ka(L,F){var W=L.alternate;return W===null?(W=Rs(L.tag,F,L.key,L.mode),W.elementType=L.elementType,W.type=L.type,W.stateNode=L.stateNode,W.alternate=L,L.alternate=W):(W.pendingProps=F,W.type=L.type,W.flags=0,W.subtreeFlags=0,W.deletions=null),W.flags=L.flags&14680064,W.childLanes=L.childLanes,W.lanes=L.lanes,W.child=L.child,W.memoizedProps=L.memoizedProps,W.memoizedState=L.memoizedState,W.updateQueue=L.updateQueue,F=L.dependencies,W.dependencies=F===null?null:{lanes:F.lanes,firstContext:F.firstContext},W.sibling=L.sibling,W.index=L.index,W.ref=L.ref,W}function sf(L,F,W,$,it,lt){var wt=2;if($=L,typeof L=="function")Gc(L)&&(wt=1);else if(typeof L=="string")wt=5;else t:switch(L){case p:return Fo(W.children,it,lt,F);case h:wt=8,it|=8;break;case a:return L=Rs(12,W,F,it|2),L.elementType=a,L.lanes=lt,L;case f:return L=Rs(13,W,F,it),L.elementType=f,L.lanes=lt,L;case o:return L=Rs(19,W,F,it),L.elementType=o,L.lanes=lt,L;case v:return jh(W,it,lt,F);default:if(typeof L=="object"&&L!==null)switch(L.$$typeof){case l:wt=10;break t;case n:wt=9;break t;case u:wt=11;break t;case c:wt=14;break t;case d:wt=16,$=null;break t}throw Error(s(130,L==null?L:typeof L,""))}return F=Rs(wt,W,F,it),F.elementType=L,F.type=$,F.lanes=lt,F}function Fo(L,F,W,$){return L=Rs(7,L,$,F),L.lanes=W,L}function jh(L,F,W,$){return L=Rs(22,L,$,F),L.elementType=v,L.lanes=W,L.stateNode={},L}function br(L,F,W){return L=Rs(6,L,null,F),L.lanes=W,L}function bs(L,F,W){return F=Rs(4,L.children!==null?L.children:[],L.key,F),F.lanes=W,F.stateNode={containerInfo:L.containerInfo,pendingChildren:null,implementation:L.implementation},F}function Yg(L,F,W,$,it){this.tag=F,this.containerInfo=L,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=q,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hs(0),this.expirationTimes=Hs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hs(0),this.identifierPrefix=$,this.onRecoverableError=it,gt&&(this.mutableSourceEagerHydrationData=null)}function Xp(L,F,W,$,it,lt,wt,Xt,oe){return L=new Yg(L,F,W,Xt,oe),F===1?(F=1,lt===!0&&(F|=8)):F=0,lt=Rs(3,null,null,F),L.current=lt,lt.stateNode=L,lt.memoizedState={element:$,isDehydrated:W,cache:null,transitions:null},Hn(lt),L}function Kh(L){if(!L)return Br;L=L._reactInternals;t:{if(C(L)!==L||L.tag!==1)throw Error(s(170));var F=L;do{switch(F.tag){case 3:F=F.stateNode.context;break t;case 1:if(vn(F.type)){F=F.stateNode.__reactInternalMemoizedMergedChildContext;break t}}F=F.return}while(F!==null);throw Error(s(171))}if(L.tag===1){var W=L.type;if(vn(W))return Gs(L,W,F)}return F}function al(L){var F=L._reactInternals;if(F===void 0)throw typeof L.render=="function"?Error(s(188)):(L=Object.keys(L).join(","),Error(s(268,L)));return L=b(F),L===null?null:L.stateNode}function Vc(L,F){if(L=L.memoizedState,L!==null&&L.dehydrated!==null){var W=L.retryLane;L.retryLane=W!==0&&W=Ee&<>=mi&&it<=He&&wt<=Qe){L.splice(F,1);break}else if($!==Ee||W.width!==oe.width||Qewt){if(!(lt!==mi||W.height!==oe.height||He<$||Ee>it)){Ee>$&&(oe.width+=Ee-$,oe.x=$),Helt&&(oe.height+=mi-lt,oe.y=lt),QeW&&(W=wt)),wt ")+` No matching component was found for: - `)+L.join(" > ")}return null},i.getPublicRootInstance=function(L){if(L=L.current,!L.child)return null;switch(L.child.tag){case 5:return B(L.child.stateNode);default:return L.child.stateNode}},i.injectIntoDevTools=function(L){if(L={bundleType:L.bundleType,version:L.version,rendererPackageName:L.rendererPackageName,rendererConfig:L.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:y.ReactCurrentDispatcher,findHostInstanceByFiber:kg,findFiberByHostInstance:L.findFiberByHostInstance||Yp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")L=!1;else{var F=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(F.isDisabled||!F.supportsFiber)L=!0;else{try{po=F.inject(L),Sr=F}catch{}L=!!F.checkDCE}}return L},i.isAlreadyRendering=function(){return!1},i.observeVisibleRects=function(L,F,W,$){if(!ut)throw Error(s(363));L=Pc(L,F);var it=ge(L,W,$).disconnect;return{disconnect:function(){it()}}},i.registerMutableSourceForHydration=function(L,F){var W=F._getVersion;W=W(F._source),L.mutableSourceEagerHydrationData==null?L.mutableSourceEagerHydrationData=[F,W]:L.mutableSourceEagerHydrationData.push(F,W)},i.runWithPriority=function(L,F){var W=Bi;try{return Bi=L,F()}finally{Bi=W}},i.shouldError=function(){return null},i.shouldSuspend=function(){return!1},i.updateContainer=function(L,F,W,$){var it=F.current,lt=Ar(),wt=ma(it);return W=Kh(W),F.context===null?F.context=W:F.pendingContext=W,F=Cn(lt,wt),F.payload={element:L},$=$===void 0?null:$,$!==null&&(F.callback=$),Tr(it,F),L=Ps(it,wt,lt),L!==null&&ha(L,it,wt),wt},i};RA.exports=t7;var e7=RA.exports;const i7=kd(e7);var bA={exports:{}},LA={};/** + `)+L.join(" > ")}return null},i.getPublicRootInstance=function(L){if(L=L.current,!L.child)return null;switch(L.child.tag){case 5:return B(L.child.stateNode);default:return L.child.stateNode}},i.injectIntoDevTools=function(L){if(L={bundleType:L.bundleType,version:L.version,rendererPackageName:L.rendererPackageName,rendererConfig:L.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:y.ReactCurrentDispatcher,findHostInstanceByFiber:kg,findFiberByHostInstance:L.findFiberByHostInstance||Yp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")L=!1;else{var F=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(F.isDisabled||!F.supportsFiber)L=!0;else{try{po=F.inject(L),Sr=F}catch{}L=!!F.checkDCE}}return L},i.isAlreadyRendering=function(){return!1},i.observeVisibleRects=function(L,F,W,$){if(!ut)throw Error(s(363));L=Rc(L,F);var it=ge(L,W,$).disconnect;return{disconnect:function(){it()}}},i.registerMutableSourceForHydration=function(L,F){var W=F._getVersion;W=W(F._source),L.mutableSourceEagerHydrationData==null?L.mutableSourceEagerHydrationData=[F,W]:L.mutableSourceEagerHydrationData.push(F,W)},i.runWithPriority=function(L,F){var W=Bi;try{return Bi=L,F()}finally{Bi=W}},i.shouldError=function(){return null},i.shouldSuspend=function(){return!1},i.updateContainer=function(L,F,W,$){var it=F.current,lt=Ar(),wt=ma(it);return W=Kh(W),F.context===null?F.context=W:F.pendingContext=W,F=Cn(lt,wt),F.payload={element:L},$=$===void 0?null:$,$!==null&&(F.callback=$),Tr(it,F),L=Ps(it,wt,lt),L!==null&&ha(L,it,wt),wt},i};RA.exports=t7;var e7=RA.exports;const i7=kd(e7);var bA={exports:{}},LA={};/** * @license React * scheduler.production.min.js * @@ -10207,11 +10207,12 @@ No matching component was found for: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(g){function t(z,X){var j=z.length;z.push(X);t:for(;0>>1,tt=z[Q];if(0>>1;QT(U,j))HT(J,U)?(z[Q]=J,z[H]=j,Q=H):(z[Q]=U,z[Z]=j,Q=Z);else if(HT(J,j))z[Q]=J,z[H]=j,Q=H;else break t}}return X}function T(z,X){var j=z.sortIndex-X.sortIndex;return j!==0?j:z.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var E=performance;g.unstable_now=function(){return E.now()}}else{var s=Date,y=s.now();g.unstable_now=function(){return s.now()-y}}var e=[],r=[],p=1,h=null,a=3,l=!1,n=!1,u=!1,f=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(z){for(var X=i(r);X!==null;){if(X.callback===null)x(r);else if(X.startTime<=z)x(r),X.sortIndex=X.expirationTime,t(e,X);else break;X=i(r)}}function v(z){if(u=!1,d(z),!n)if(i(e)!==null)n=!0,B(m);else{var X=i(r);X!==null&&G(v,X.startTime-z)}}function m(z,X){n=!1,u&&(u=!1,o(w),w=-1),l=!0;var j=a;try{for(d(X),h=i(e);h!==null&&(!(h.expirationTime>X)||z&&!P());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,a=h.priorityLevel;var tt=Q(h.expirationTime<=X);X=g.unstable_now(),typeof tt=="function"?h.callback=tt:h===i(e)&&x(e),d(X)}else x(e);h=i(e)}if(h!==null)var Y=!0;else{var Z=i(r);Z!==null&&G(v,Z.startTime-X),Y=!1}return Y}finally{h=null,a=j,l=!1}}var S=!1,M=null,w=-1,C=5,A=-1;function P(){return!(g.unstable_now()-Az||125Q?(z.sortIndex=j,t(r,z),i(e)===null&&z===i(r)&&(u?(o(w),w=-1):u=!0,G(v,j-Q))):(z.sortIndex=tt,t(e,z),n||l||(n=!0,B(m))),z},g.unstable_shouldYield=P,g.unstable_wrapCallback=function(z){var X=a;return function(){var j=a;a=X;try{return z.apply(this,arguments)}finally{a=j}}}})(LA);bA.exports=LA;var hM=bA.exports;const Z1={},n7=g=>void Object.assign(Z1,g);function r7(g,t){function i(p,{args:h=[],attach:a,...l},n){let u=`${p[0].toUpperCase()}${p.slice(1)}`,f;if(p==="primitive"){if(l.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const o=l.object;f=If(o,{type:p,root:n,attach:a,primitive:!0})}else{const o=Z1[u];if(!o)throw new Error(`R3F: ${u} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(h))throw new Error("R3F: The args prop must be an array!");f=If(new o(...h),{type:p,root:n,attach:a,memoizedProps:{args:h}})}return f.__r3f.attach===void 0&&(f instanceof Fi?f.__r3f.attach="geometry":f instanceof Wr&&(f.__r3f.attach="material")),u!=="inject"&&fy(f,l),f}function x(p,h){let a=!1;if(h){var l,n;(l=h.__r3f)!=null&&l.attach?uy(p,h,h.__r3f.attach):h.isObject3D&&p.isObject3D&&(p.add(h),a=!0),a||(n=p.__r3f)==null||n.objects.push(h),h.__r3f||If(h,{}),h.__r3f.parent=p,Lx(h),Nf(h)}}function T(p,h,a){let l=!1;if(h){var n,u;if((n=h.__r3f)!=null&&n.attach)uy(p,h,h.__r3f.attach);else if(h.isObject3D&&p.isObject3D){h.parent=p,h.dispatchEvent({type:"added"}),p.dispatchEvent({type:"childadded",child:h});const f=p.children.filter(c=>c!==h),o=f.indexOf(a);p.children=[...f.slice(0,o),h,...f.slice(o)],l=!0}l||(u=p.__r3f)==null||u.objects.push(h),h.__r3f||If(h,{}),h.__r3f.parent=p,Lx(h),Nf(h)}}function E(p,h,a=!1){p&&[...p].forEach(l=>s(h,l,a))}function s(p,h,a){if(h){var l,n,u;if(h.__r3f&&(h.__r3f.parent=null),(l=p.__r3f)!=null&&l.objects&&(p.__r3f.objects=p.__r3f.objects.filter(v=>v!==h)),(n=h.__r3f)!=null&&n.attach)pM(p,h,h.__r3f.attach);else if(h.isObject3D&&p.isObject3D){var f;p.remove(h),(f=h.__r3f)!=null&&f.root&&c7(dm(h),h)}const c=(u=h.__r3f)==null?void 0:u.primitive,d=!c&&(a===void 0?h.dispose!==null:a);if(!c){var o;E((o=h.__r3f)==null?void 0:o.objects,h,d),E(h.children,h,d)}if(delete h.__r3f,d&&h.dispose&&h.type!=="Scene"){const v=()=>{try{h.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?hM.unstable_scheduleCallback(hM.unstable_IdlePriority,v):v()}Nf(p)}}function y(p,h,a,l){var n;const u=(n=p.__r3f)==null?void 0:n.parent;if(!u)return;const f=i(h,a,p.__r3f.root);if(p.children){for(const o of p.children)o.__r3f&&x(f,o);p.children=p.children.filter(o=>!o.__r3f)}p.__r3f.objects.forEach(o=>x(f,o)),p.__r3f.objects=[],p.__r3f.autoRemovedBeforeAppend||s(u,p),f.parent&&(f.__r3f.autoRemovedBeforeAppend=!0),x(u,f),f.raycast&&f.__r3f.eventCount&&dm(f).getState().internal.interaction.push(f),[l,l.alternate].forEach(o=>{o!==null&&(o.stateNode=f,o.ref&&(typeof o.ref=="function"?o.ref(f):o.ref.current=f))})}const e=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:i7({createInstance:i,removeChild:s,appendChild:x,appendInitialChild:x,insertBefore:T,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(p,h)=>{if(!h)return;const a=p.getState().scene;a.__r3f&&(a.__r3f.root=p,x(a,h))},removeChildFromContainer:(p,h)=>{h&&s(p.getState().scene,h)},insertInContainerBefore:(p,h,a)=>{if(!h||!a)return;const l=p.getState().scene;l.__r3f&&T(l,h,a)},getRootHostContext:()=>null,getChildHostContext:p=>p,finalizeInitialChildren(p){var h;return!!((h=p?.__r3f)!=null?h:{}).handlers},prepareUpdate(p,h,a,l){var n;if(((n=p?.__r3f)!=null?n:{}).primitive&&l.object&&l.object!==p)return[!0];{const{args:f=[],children:o,...c}=l,{args:d=[],children:v,...m}=a;if(!Array.isArray(f))throw new Error("R3F: the args prop must be an array!");if(f.some((M,w)=>M!==d[w]))return[!0];const S=UA(p,c,m,!0);return S.changes.length?[!1,S]:null}},commitUpdate(p,[h,a],l,n,u,f){h?y(p,l,u,f):fy(p,a)},commitMount(p,h,a,l){var n;const u=(n=p.__r3f)!=null?n:{};p.raycast&&u.handlers&&u.eventCount&&dm(p).getState().internal.interaction.push(p)},getPublicInstance:p=>p,prepareForCommit:()=>null,preparePortalMount:p=>If(p.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(p){var h;const{attach:a,parent:l}=(h=p.__r3f)!=null?h:{};a&&l&&pM(l,p,a),p.isObject3D&&(p.visible=!1),Nf(p)},unhideInstance(p,h){var a;const{attach:l,parent:n}=(a=p.__r3f)!=null?a:{};l&&n&&uy(n,p,l),(p.isObject3D&&h.visible==null||h.visible)&&(p.visible=!0),Nf(p)},createTextInstance:e,hideTextInstance:e,unhideTextInstance:e,getCurrentEventPriority:()=>t?t():Yf.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&An.fun(performance.now)?performance.now:An.fun(Date.now)?Date.now:()=>0,scheduleTimeout:An.fun(setTimeout)?setTimeout:void 0,cancelTimeout:An.fun(clearTimeout)?clearTimeout:void 0}),applyProps:fy}}var uM,fM;const hy=g=>"colorSpace"in g||"outputColorSpace"in g,FA=()=>{var g;return(g=Z1.ColorManagement)!=null?g:null},OA=g=>g&&g.isOrthographicCamera,s7=g=>g&&g.hasOwnProperty("current"),lp=typeof window<"u"&&((uM=window.document)!=null&&uM.createElement||((fM=window.navigator)==null?void 0:fM.product)==="ReactNative")?Ce.useLayoutEffect:Ce.useEffect;function DA(g){const t=Ce.useRef(g);return lp(()=>void(t.current=g),[g]),t}function a7({set:g}){return lp(()=>(g(new Promise(()=>null)),()=>g(!1)),[g]),null}class IA extends Ce.Component{constructor(...t){super(...t),this.state={error:!1}}componentDidCatch(t){this.props.set(t)}render(){return this.state.error?null:this.props.children}}IA.getDerivedStateFromError=()=>({error:!0});const NA="__default",cM=new Map,o7=g=>g&&!!g.memoized&&!!g.changes;function BA(g){var t;const i=typeof window<"u"?(t=window.devicePixelRatio)!=null?t:2:1;return Array.isArray(g)?Math.min(Math.max(g[0],i),g[1]):g}const nd=g=>{var t;return(t=g.__r3f)==null?void 0:t.root.getState()};function dm(g){let t=g.__r3f.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}const An={obj:g=>g===Object(g)&&!An.arr(g)&&typeof g!="function",fun:g=>typeof g=="function",str:g=>typeof g=="string",num:g=>typeof g=="number",boo:g=>typeof g=="boolean",und:g=>g===void 0,arr:g=>Array.isArray(g),equ(g,t,{arrays:i="shallow",objects:x="reference",strict:T=!0}={}){if(typeof g!=typeof t||!!g!=!!t)return!1;if(An.str(g)||An.num(g))return g===t;const E=An.obj(g);if(E&&x==="reference")return g===t;const s=An.arr(g);if(s&&i==="reference")return g===t;if((s||E)&&g===t)return!0;let y;for(y in g)if(!(y in t))return!1;if(E&&i==="shallow"&&x==="shallow"){for(y in T?t:g)if(!An.equ(g[y],t[y],{strict:T,objects:"reference"}))return!1}else for(y in T?t:g)if(g[y]!==t[y])return!1;if(An.und(y)){if(s&&g.length===0&&t.length===0||E&&Object.keys(g).length===0&&Object.keys(t).length===0)return!0;if(g!==t)return!1}return!0}};function l7(g){g.dispose&&g.type!=="Scene"&&g.dispose();for(const t in g)t.dispose==null||t.dispose(),delete g[t]}function If(g,t){const i=g;return i.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...t},g}function bx(g,t){let i=g;if(t.includes("-")){const x=t.split("-"),T=x.pop();return i=x.reduce((E,s)=>E[s],g),{target:i,key:T}}else return{target:i,key:t}}const dM=/-\d+$/;function uy(g,t,i){if(An.str(i)){if(dM.test(i)){const E=i.replace(dM,""),{target:s,key:y}=bx(g,E);Array.isArray(s[y])||(s[y]=[])}const{target:x,key:T}=bx(g,i);t.__r3f.previousAttach=x[T],x[T]=t}else t.__r3f.previousAttach=i(g,t)}function pM(g,t,i){var x,T;if(An.str(i)){const{target:E,key:s}=bx(g,i),y=t.__r3f.previousAttach;y===void 0?delete E[s]:E[s]=y}else(x=t.__r3f)==null||x.previousAttach==null||x.previousAttach(g,t);(T=t.__r3f)==null||delete T.previousAttach}function UA(g,{children:t,key:i,ref:x,...T},{children:E,key:s,ref:y,...e}={},r=!1){var p;const h=(p=g?.__r3f)!=null?p:{},a=Object.entries(T),l=[];if(r){const u=Object.keys(e);for(let f=0;f{var o;if((o=g.__r3f)!=null&&o.primitive&&u==="object"||An.equ(f,e[u]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(u))return l.push([u,f,!0,[]]);let c=[];u.includes("-")&&(c=u.split("-")),l.push([u,f,!1,c]);for(const d in T){const v=T[d];d.startsWith(`${u}-`)&&l.push([d,v,!1,d.split("-")])}});const n={...T};return h.memoizedProps&&h.memoizedProps.args&&(n.args=h.memoizedProps.args),h.memoizedProps&&h.memoizedProps.attach&&(n.attach=h.memoizedProps.attach),{memoized:n,changes:l}}const h7=typeof process<"u"&&!1;function fy(g,t){var i,x,T;const E=(i=g.__r3f)!=null?i:{},s=E.root,y=(x=s==null||s.getState==null?void 0:s.getState())!=null?x:{},{memoized:e,changes:r}=o7(t)?t:UA(g,t),p=E.eventCount;g.__r3f&&(g.__r3f.memoizedProps=e);for(let a=0;ad[v],g),!(c&&c.set))){const[d,...v]=f.reverse();o=v.reverse().reduce((m,S)=>m[S],g),l=d}if(n===NA+"remove")if(o.constructor){let d=cM.get(o.constructor);d||(d=new o.constructor,cM.set(o.constructor,d)),n=d[l]}else n=0;if(u)n?E.handlers[l]=n:delete E.handlers[l],E.eventCount=Object.keys(E.handlers).length;else if(c&&c.set&&(c.copy||c instanceof Mu)){if(Array.isArray(n))c.fromArray?c.fromArray(n):c.set(...n);else if(c.copy&&n&&n.constructor&&(h7?c.constructor.name===n.constructor.name:c.constructor===n.constructor))c.copy(n);else if(n!==void 0){const d=c instanceof ze;!d&&c.setScalar?c.setScalar(n):c instanceof Mu&&n instanceof Mu?c.mask=n.mask:c.set(n),!FA()&&!y.linear&&d&&c.convertSRGBToLinear()}}else if(o[l]=n,o[l]instanceof zn&&o[l].format===vs&&o[l].type===Go){const d=o[l];hy(d)&&hy(y.gl)?d.colorSpace=y.gl.outputColorSpace:d.encoding=y.gl.outputEncoding}Nf(g)}if(E.parent&&g.raycast&&p!==E.eventCount){const a=dm(g).getState().internal,l=a.interaction.indexOf(g);l>-1&&a.interaction.splice(l,1),E.eventCount&&a.interaction.push(g)}return!(r.length===1&&r[0][0]==="onUpdate")&&r.length&&(T=g.__r3f)!=null&&T.parent&&Lx(g),g}function Nf(g){var t,i;const x=(t=g.__r3f)==null||(i=t.root)==null||i.getState==null?void 0:i.getState();x&&x.internal.frames===0&&x.invalidate()}function Lx(g){g.onUpdate==null||g.onUpdate(g)}function u7(g,t){g.manual||(OA(g)?(g.left=t.width/-2,g.right=t.width/2,g.top=t.height/2,g.bottom=t.height/-2):g.aspect=t.width/t.height,g.updateProjectionMatrix(),g.updateMatrixWorld())}function $v(g){return(g.eventObject||g.object).uuid+"/"+g.index+g.instanceId}function f7(){var g;const t=typeof self<"u"&&self||typeof window<"u"&&window;if(!t)return Yf.DefaultEventPriority;switch((g=t.event)==null?void 0:g.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Yf.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Yf.ContinuousEventPriority;default:return Yf.DefaultEventPriority}}function zA(g,t,i,x){const T=i.get(t);T&&(i.delete(t),i.size===0&&(g.delete(x),T.target.releasePointerCapture(x)))}function c7(g,t){const{internal:i}=g.getState();i.interaction=i.interaction.filter(x=>x!==t),i.initialHits=i.initialHits.filter(x=>x!==t),i.hovered.forEach((x,T)=>{(x.eventObject===t||x.object===t)&&i.hovered.delete(T)}),i.capturedMap.forEach((x,T)=>{zA(i.capturedMap,t,x,T)})}function d7(g){function t(e){const{internal:r}=g.getState(),p=e.offsetX-r.initialClick[0],h=e.offsetY-r.initialClick[1];return Math.round(Math.sqrt(p*p+h*h))}function i(e){return e.filter(r=>["Move","Over","Enter","Out","Leave"].some(p=>{var h;return(h=r.__r3f)==null?void 0:h.handlers["onPointer"+p]}))}function x(e,r){const p=g.getState(),h=new Set,a=[],l=r?r(p.internal.interaction):p.internal.interaction;for(let o=0;o{const d=nd(o.object),v=nd(c.object);return!d||!v?o.distance-c.distance:v.events.priority-d.events.priority||o.distance-c.distance}).filter(o=>{const c=$v(o);return h.has(c)?!1:(h.add(c),!0)});p.events.filter&&(u=p.events.filter(u,p));for(const o of u){let c=o.object;for(;c;){var f;(f=c.__r3f)!=null&&f.eventCount&&a.push({...o,eventObject:c}),c=c.parent}}if("pointerId"in e&&p.internal.capturedMap.has(e.pointerId))for(let o of p.internal.capturedMap.get(e.pointerId).values())h.has($v(o.intersection))||a.push(o.intersection);return a}function T(e,r,p,h){const a=g.getState();if(e.length){const l={stopped:!1};for(const n of e){const u=nd(n.object)||a,{raycaster:f,pointer:o,camera:c,internal:d}=u,v=new Ct(o.x,o.y,0).unproject(c),m=A=>{var P,b;return(P=(b=d.capturedMap.get(A))==null?void 0:b.has(n.eventObject))!=null?P:!1},S=A=>{const P={intersection:n,target:r.target};d.capturedMap.has(A)?d.capturedMap.get(A).set(n.eventObject,P):d.capturedMap.set(A,new Map([[n.eventObject,P]])),r.target.setPointerCapture(A)},M=A=>{const P=d.capturedMap.get(A);P&&zA(d.capturedMap,n.eventObject,P,A)};let w={};for(let A in r){let P=r[A];typeof P!="function"&&(w[A]=P)}let C={...n,...w,pointer:o,intersections:e,stopped:l.stopped,delta:p,unprojectedPoint:v,ray:f.ray,camera:c,stopPropagation(){const A="pointerId"in r&&d.capturedMap.get(r.pointerId);if((!A||A.has(n.eventObject))&&(C.stopped=l.stopped=!0,d.hovered.size&&Array.from(d.hovered.values()).find(P=>P.eventObject===n.eventObject))){const P=e.slice(0,e.indexOf(n));E([...P,n])}},target:{hasPointerCapture:m,setPointerCapture:S,releasePointerCapture:M},currentTarget:{hasPointerCapture:m,setPointerCapture:S,releasePointerCapture:M},nativeEvent:r};if(h(C),l.stopped===!0)break}}return e}function E(e){const{internal:r}=g.getState();for(const p of r.hovered.values())if(!e.length||!e.find(h=>h.object===p.object&&h.index===p.index&&h.instanceId===p.instanceId)){const a=p.eventObject.__r3f,l=a?.handlers;if(r.hovered.delete($v(p)),a!=null&&a.eventCount){const n={...p,intersections:e};l.onPointerOut==null||l.onPointerOut(n),l.onPointerLeave==null||l.onPointerLeave(n)}}}function s(e,r){for(let p=0;pE([]);case"onLostPointerCapture":return r=>{const{internal:p}=g.getState();"pointerId"in r&&p.capturedMap.has(r.pointerId)&&requestAnimationFrame(()=>{p.capturedMap.has(r.pointerId)&&(p.capturedMap.delete(r.pointerId),E([]))})}}return function(p){const{onPointerMissed:h,internal:a}=g.getState();a.lastEvent.current=p;const l=e==="onPointerMove",n=e==="onClick"||e==="onContextMenu"||e==="onDoubleClick",f=x(p,l?i:void 0),o=n?t(p):0;e==="onPointerDown"&&(a.initialClick=[p.offsetX,p.offsetY],a.initialHits=f.map(d=>d.eventObject)),n&&!f.length&&o<=2&&(s(p,a.interaction),h&&h(p)),l&&E(f);function c(d){const v=d.eventObject,m=v.__r3f,S=m?.handlers;if(m!=null&&m.eventCount)if(l){if(S.onPointerOver||S.onPointerEnter||S.onPointerOut||S.onPointerLeave){const M=$v(d),w=a.hovered.get(M);w?w.stopped&&d.stopPropagation():(a.hovered.set(M,d),S.onPointerOver==null||S.onPointerOver(d),S.onPointerEnter==null||S.onPointerEnter(d))}S.onPointerMove==null||S.onPointerMove(d)}else{const M=S[e];M?(!n||a.initialHits.includes(v))&&(s(p,a.interaction.filter(w=>!a.initialHits.includes(w))),M(d)):n&&a.initialHits.includes(v)&&s(p,a.interaction.filter(w=>!a.initialHits.includes(w)))}}T(f,p,o,c)}}return{handlePointer:y}}const GA=g=>!!(g!=null&&g.render),VA=Ce.createContext(null),p7=(g,t)=>{const i=Qz((y,e)=>{const r=new Ct,p=new Ct,h=new Ct;function a(o=e().camera,c=p,d=e().size){const{width:v,height:m,top:S,left:M}=d,w=v/m;c instanceof Ct?h.copy(c):h.set(...c);const C=o.getWorldPosition(r).distanceTo(h);if(OA(o))return{width:v/o.zoom,height:m/o.zoom,top:S,left:M,factor:1,distance:C,aspect:w};{const A=o.fov*Math.PI/180,P=2*Math.tan(A/2)*C,b=P*(v/m);return{width:b,height:P,top:S,left:M,factor:v/b,distance:C,aspect:w}}}let l;const n=o=>y(c=>({performance:{...c.performance,current:o}})),u=new ve;return{set:y,get:e,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(o=1)=>g(e(),o),advance:(o,c)=>t(o,c,e()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new Y1,pointer:u,mouse:u,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const o=e();l&&clearTimeout(l),o.performance.current!==o.performance.min&&n(o.performance.min),l=setTimeout(()=>n(e().performance.max),o.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:a},setEvents:o=>y(c=>({...c,events:{...c.events,...o}})),setSize:(o,c,d,v,m)=>{const S=e().camera,M={width:o,height:c,top:v||0,left:m||0,updateStyle:d};y(w=>({size:M,viewport:{...w.viewport,...a(S,p,M)}}))},setDpr:o=>y(c=>{const d=BA(o);return{viewport:{...c.viewport,dpr:d,initialDpr:c.viewport.initialDpr||d}}}),setFrameloop:(o="always")=>{const c=e().clock;c.stop(),c.elapsedTime=0,o!=="never"&&(c.start(),c.elapsedTime=0),y(()=>({frameloop:o}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:Ce.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(o,c,d)=>{const v=e().internal;return v.priority=v.priority+(c>0?1:0),v.subscribers.push({ref:o,priority:c,store:d}),v.subscribers=v.subscribers.sort((m,S)=>m.priority-S.priority),()=>{const m=e().internal;m!=null&&m.subscribers&&(m.priority=m.priority-(c>0?1:0),m.subscribers=m.subscribers.filter(S=>S.ref!==o))}}}}}),x=i.getState();let T=x.size,E=x.viewport.dpr,s=x.camera;return i.subscribe(()=>{const{camera:y,size:e,viewport:r,gl:p,set:h}=i.getState();if(e.width!==T.width||e.height!==T.height||r.dpr!==E){var a;T=e,E=r.dpr,u7(y,e),p.setPixelRatio(r.dpr);const l=(a=e.updateStyle)!=null?a:typeof HTMLCanvasElement<"u"&&p.domElement instanceof HTMLCanvasElement;p.setSize(e.width,e.height,l)}y!==s&&(s=y,h(l=>({viewport:{...l.viewport,...l.viewport.getCurrentViewport(y)}})))}),i.subscribe(y=>g(y)),i};let Qv,v7=new Set,m7=new Set,g7=new Set;function cy(g,t){if(g.size)for(const{callback:i}of g.values())i(t)}function rd(g,t){switch(g){case"before":return cy(v7,t);case"after":return cy(m7,t);case"tail":return cy(g7,t)}}let dy,py;function vy(g,t,i){let x=t.clock.getDelta();for(t.frameloop==="never"&&typeof g=="number"&&(x=g-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=g),dy=t.internal.subscribers,Qv=0;Qv0)&&!((p=E.gl.xr)!=null&&p.isPresenting)&&(x+=vy(r,E))}if(i=!1,rd("after",r),x===0)return rd("tail",r),t=!1,cancelAnimationFrame(T)}function y(r,p=1){var h;if(!r)return g.forEach(a=>y(a.store.getState(),p));(h=r.gl.xr)!=null&&h.isPresenting||!r.internal.active||r.frameloop==="never"||(p>1?r.internal.frames=Math.min(60,r.internal.frames+p):i?r.internal.frames=2:r.internal.frames=1,t||(t=!0,requestAnimationFrame(s)))}function e(r,p=!0,h,a){if(p&&rd("before",r),h)vy(r,h,a);else for(const l of g.values())vy(r,l.store.getState());p&&rd("after",r)}return{loop:s,invalidate:y,advance:e}}function x7(){const g=Ce.useContext(VA);if(!g)throw new Error("R3F: Hooks can only be used within the Canvas component!");return g}function S7(g,t=0){const i=x7(),x=i.getState().internal.subscribe,T=DA(g);return lp(()=>x(T,t,i),[t,x,i]),null}const ic=new Map,{invalidate:vM,advance:mM}=y7(ic),{reconciler:bm,applyProps:Of}=r7(ic,f7),Df={objects:"shallow",strict:!1},T7=(g,t)=>{const i=typeof g=="function"?g(t):g;return GA(i)?i:new R1({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0,...g})};function E7(g,t){const i=typeof HTMLCanvasElement<"u"&&g instanceof HTMLCanvasElement;if(t){const{width:x,height:T,top:E,left:s,updateStyle:y=i}=t;return{width:x,height:T,top:E,left:s,updateStyle:y}}else if(typeof HTMLCanvasElement<"u"&&g instanceof HTMLCanvasElement&&g.parentElement){const{width:x,height:T,top:E,left:s}=g.parentElement.getBoundingClientRect();return{width:x,height:T,top:E,left:s,updateStyle:i}}else if(typeof OffscreenCanvas<"u"&&g instanceof OffscreenCanvas)return{width:g.width,height:g.height,top:0,left:0,updateStyle:i};return{width:0,height:0,top:0,left:0}}function M7(g){const t=ic.get(g),i=t?.fiber,x=t?.store;t&&console.warn("R3F.createRoot should only be called once!");const T=typeof reportError=="function"?reportError:console.error,E=x||p7(vM,mM),s=i||bm.createContainer(E,Yf.ConcurrentRoot,null,!1,null,"",T,null);t||ic.set(g,{fiber:s,store:E});let y,e=!1,r;return{configure(p={}){let{gl:h,size:a,scene:l,events:n,onCreated:u,shadows:f=!1,linear:o=!1,flat:c=!1,legacy:d=!1,orthographic:v=!1,frameloop:m="always",dpr:S=[1,2],performance:M,raycaster:w,camera:C,onPointerMissed:A}=p,P=E.getState(),b=P.gl;P.gl||P.set({gl:b=T7(h,g)});let O=P.raycaster;O||P.set({raycaster:O=new wA});const{params:I,...D}=w||{};if(An.equ(D,O,Df)||Of(O,{...D}),An.equ(I,O.params,Df)||Of(O,{params:{...O.params,...I}}),!P.camera||P.camera===r&&!An.equ(r,C,Df)){r=C;const j=C instanceof tp,Q=j?C:v?new np(0,0,0,0,.1,1e3):new Dr(75,0,.1,1e3);j||(Q.position.z=5,C&&Of(Q,C),!P.camera&&!(C!=null&&C.rotation)&&Q.lookAt(0,0,0)),P.set({camera:Q}),O.camera=Q}if(!P.scene){let j;l instanceof Pm?j=l:(j=new Pm,l&&Of(j,l)),P.set({scene:If(j)})}if(!P.xr){var B;const j=(Y,Z)=>{const U=E.getState();U.frameloop!=="never"&&mM(Y,!0,U,Z)},Q=()=>{const Y=E.getState();Y.gl.xr.enabled=Y.gl.xr.isPresenting,Y.gl.xr.setAnimationLoop(Y.gl.xr.isPresenting?j:null),Y.gl.xr.isPresenting||vM(Y)},tt={connect(){const Y=E.getState().gl;Y.xr.addEventListener("sessionstart",Q),Y.xr.addEventListener("sessionend",Q)},disconnect(){const Y=E.getState().gl;Y.xr.removeEventListener("sessionstart",Q),Y.xr.removeEventListener("sessionend",Q)}};typeof((B=b.xr)==null?void 0:B.addEventListener)=="function"&&tt.connect(),P.set({xr:tt})}if(b.shadowMap){const j=b.shadowMap.enabled,Q=b.shadowMap.type;if(b.shadowMap.enabled=!!f,An.boo(f))b.shadowMap.type=cd;else if(An.str(f)){var G;const tt={basic:mw,percentage:lg,soft:cd,variance:qa};b.shadowMap.type=(G=tt[f])!=null?G:cd}else An.obj(f)&&Object.assign(b.shadowMap,f);(j!==b.shadowMap.enabled||Q!==b.shadowMap.type)&&(b.shadowMap.needsUpdate=!0)}const z=FA();z&&("enabled"in z?z.enabled=!d:"legacyMode"in z&&(z.legacyMode=d)),e||Of(b,{outputEncoding:o?3e3:3001,toneMapping:c?zo:l1}),P.legacy!==d&&P.set(()=>({legacy:d})),P.linear!==o&&P.set(()=>({linear:o})),P.flat!==c&&P.set(()=>({flat:c})),h&&!An.fun(h)&&!GA(h)&&!An.equ(h,b,Df)&&Of(b,h),n&&!P.events.handlers&&P.set({events:n(E)});const X=E7(g,a);return An.equ(X,P.size,Df)||P.setSize(X.width,X.height,X.updateStyle,X.top,X.left),S&&P.viewport.dpr!==BA(S)&&P.setDpr(S),P.frameloop!==m&&P.setFrameloop(m),P.onPointerMissed||P.set({onPointerMissed:A}),M&&!An.equ(M,P.performance,Df)&&P.set(j=>({performance:{...j.performance,...M}})),y=u,e=!0,this},render(p){return e||this.configure(),bm.updateContainer(Ce.createElement(C7,{store:E,children:p,onCreated:y,rootElement:g}),s,null,()=>{}),E},unmount(){HA(g)}}}function C7({store:g,children:t,onCreated:i,rootElement:x}){return lp(()=>{const T=g.getState();T.set(E=>({internal:{...E.internal,active:!0}})),i&&i(T),g.getState().events.connected||T.events.connect==null||T.events.connect(x)},[]),Ce.createElement(VA.Provider,{value:g},t)}function HA(g,t){const i=ic.get(g),x=i?.fiber;if(x){const T=i?.store.getState();T&&(T.internal.active=!1),bm.updateContainer(null,x,null,()=>{T&&setTimeout(()=>{try{var E,s,y,e;T.events.disconnect==null||T.events.disconnect(),(E=T.gl)==null||(s=E.renderLists)==null||s.dispose==null||s.dispose(),(y=T.gl)==null||y.forceContextLoss==null||y.forceContextLoss(),(e=T.gl)!=null&&e.xr&&T.xr.disconnect(),l7(T),ic.delete(g),t&&t(g)}catch{}},500)})}}bm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:Ce.version});function Lm(){return Lm=Object.assign?Object.assign.bind():function(g){for(var t=1;t=0?x=setTimeout(e,t-p):(x=null,i||(y=g.apply(E,T),E=T=null))}var r=function(){E=this,T=arguments,s=Date.now();var p=i&&!x;return x||(x=setTimeout(e,t)),p&&(y=g.apply(E,T),E=T=null),y};return r.clear=function(){x&&(clearTimeout(x),x=null)},r.flush=function(){x&&(y=g.apply(E,T),E=T=null,clearTimeout(x),x=null)},r}Fx.debounce=Fx;var w7=Fx;const gM=kd(w7);function A7(g){let{debounce:t,scroll:i,polyfill:x,offsetSize:T}=g===void 0?{debounce:0,scroll:!1,offsetSize:!1}:g;const E=x||(typeof window>"u"?class{}:window.ResizeObserver);if(!E)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,y]=Ce.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),e=Ce.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),r=t?typeof t=="number"?t:t.scroll:null,p=t?typeof t=="number"?t:t.resize:null,h=Ce.useRef(!1);Ce.useEffect(()=>(h.current=!0,()=>void(h.current=!1)));const[a,l,n]=Ce.useMemo(()=>{const c=()=>{if(!e.current.element)return;const{left:d,top:v,width:m,height:S,bottom:M,right:w,x:C,y:A}=e.current.element.getBoundingClientRect(),P={left:d,top:v,width:m,height:S,bottom:M,right:w,x:C,y:A};e.current.element instanceof HTMLElement&&T&&(P.height=e.current.element.offsetHeight,P.width=e.current.element.offsetWidth),Object.freeze(P),h.current&&!L7(e.current.lastBounds,P)&&y(e.current.lastBounds=P)};return[c,p?gM(c,p):c,r?gM(c,r):c]},[y,T,r,p]);function u(){e.current.scrollContainers&&(e.current.scrollContainers.forEach(c=>c.removeEventListener("scroll",n,!0)),e.current.scrollContainers=null),e.current.resizeObserver&&(e.current.resizeObserver.disconnect(),e.current.resizeObserver=null)}function f(){e.current.element&&(e.current.resizeObserver=new E(n),e.current.resizeObserver.observe(e.current.element),i&&e.current.scrollContainers&&e.current.scrollContainers.forEach(c=>c.addEventListener("scroll",n,{capture:!0,passive:!0})))}const o=c=>{!c||c===e.current.element||(u(),e.current.element=c,e.current.scrollContainers=WA(c),f())};return R7(n,!!i),P7(l),Ce.useEffect(()=>{u(),f()},[i,n,l]),Ce.useEffect(()=>u,[]),[o,s,a]}function P7(g){Ce.useEffect(()=>{const t=g;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[g])}function R7(g,t){Ce.useEffect(()=>{if(t){const i=g;return window.addEventListener("scroll",i,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",i,!0)}},[g,t])}function WA(g){const t=[];if(!g||g===document.body)return t;const{overflow:i,overflowX:x,overflowY:T}=window.getComputedStyle(g);return[i,x,T].some(E=>E==="auto"||E==="scroll")&&t.push(g),[...t,...WA(g.parentElement)]}const b7=["x","y","top","bottom","left","right","width","height"],L7=(g,t)=>b7.every(i=>g[i]===t[i]);var F7=Object.defineProperty,O7=Object.defineProperties,D7=Object.getOwnPropertyDescriptors,yM=Object.getOwnPropertySymbols,I7=Object.prototype.hasOwnProperty,N7=Object.prototype.propertyIsEnumerable,xM=(g,t,i)=>t in g?F7(g,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):g[t]=i,SM=(g,t)=>{for(var i in t||(t={}))I7.call(t,i)&&xM(g,i,t[i]);if(yM)for(var i of yM(t))N7.call(t,i)&&xM(g,i,t[i]);return g},B7=(g,t)=>O7(g,D7(t)),TM,EM;typeof window<"u"&&((TM=window.document)!=null&&TM.createElement||((EM=window.navigator)==null?void 0:EM.product)==="ReactNative")?Ce.useLayoutEffect:Ce.useEffect;function XA(g,t,i){if(!g)return;if(i(g)===!0)return g;let x=t?g.return:g.child;for(;x;){const T=XA(x,t,i);if(T)return T;x=t?null:x.sibling}}function YA(g){try{return Object.defineProperties(g,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return g}}const MM=console.error;console.error=function(){const g=[...arguments].join("");if(g?.startsWith("Warning:")&&g.includes("useContext")){console.error=MM;return}return MM.apply(this,arguments)};const J1=YA(Ce.createContext(null));class kA extends Ce.Component{render(){return Ce.createElement(J1.Provider,{value:this._reactInternals},this.props.children)}}function U7(){const g=Ce.useContext(J1);if(g===null)throw new Error("its-fine: useFiber must be called within a !");const t=Ce.useId();return Ce.useMemo(()=>{for(const x of[g,g?.alternate]){if(!x)continue;const T=XA(x,!1,E=>{let s=E.memoizedState;for(;s;){if(s.memoizedState===t)return!0;s=s.next}});if(T)return T}},[g,t])}function z7(){const g=U7(),[t]=Ce.useState(()=>new Map);t.clear();let i=g;for(;i;){if(i.type&&typeof i.type=="object"){const T=i.type._context===void 0&&i.type.Provider===i.type?i.type:i.type._context;T&&T!==J1&&!t.has(T)&&t.set(T,Ce.useContext(YA(T)))}i=i.return}return t}function G7(){const g=z7();return Ce.useMemo(()=>Array.from(g.keys()).reduce((t,i)=>x=>Ce.createElement(t,null,Ce.createElement(i.Provider,B7(SM({},x),{value:g.get(i)}))),t=>Ce.createElement(kA,SM({},t))),[g])}const my={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function V7(g){const{handlePointer:t}=d7(g);return{priority:1,enabled:!0,compute(i,x,T){x.pointer.set(i.offsetX/x.size.width*2-1,-(i.offsetY/x.size.height)*2+1),x.raycaster.setFromCamera(x.pointer,x.camera)},connected:void 0,handlers:Object.keys(my).reduce((i,x)=>({...i,[x]:t(x)}),{}),update:()=>{var i;const{events:x,internal:T}=g.getState();(i=T.lastEvent)!=null&&i.current&&x.handlers&&x.handlers.onPointerMove(T.lastEvent.current)},connect:i=>{var x;const{set:T,events:E}=g.getState();E.disconnect==null||E.disconnect(),T(s=>({events:{...s.events,connected:i}})),Object.entries((x=E.handlers)!=null?x:[]).forEach(([s,y])=>{const[e,r]=my[s];i.addEventListener(e,y,{passive:r})})},disconnect:()=>{const{set:i,events:x}=g.getState();if(x.connected){var T;Object.entries((T=x.handlers)!=null?T:[]).forEach(([E,s])=>{if(x&&x.connected instanceof HTMLElement){const[y]=my[E];x.connected.removeEventListener(y,s)}}),i(E=>({events:{...E.events,connected:void 0}}))}}}}const H7=Ce.forwardRef(function({children:t,fallback:i,resize:x,style:T,gl:E,events:s=V7,eventSource:y,eventPrefix:e,shadows:r,linear:p,flat:h,legacy:a,orthographic:l,frameloop:n,dpr:u,performance:f,raycaster:o,camera:c,scene:d,onPointerMissed:v,onCreated:m,...S},M){Ce.useMemo(()=>n7(Zz),[]);const w=G7(),[C,A]=A7({scroll:!0,debounce:{scroll:50,resize:0},...x}),P=Ce.useRef(null),b=Ce.useRef(null);Ce.useImperativeHandle(M,()=>P.current);const O=DA(v),[I,D]=Ce.useState(!1),[B,G]=Ce.useState(!1);if(I)throw I;if(B)throw B;const z=Ce.useRef(null);lp(()=>{const j=P.current;A.width>0&&A.height>0&&j&&(z.current||(z.current=M7(j)),z.current.configure({gl:E,events:s,shadows:r,linear:p,flat:h,legacy:a,orthographic:l,frameloop:n,dpr:u,performance:f,raycaster:o,camera:c,scene:d,size:A,onPointerMissed:(...Q)=>O.current==null?void 0:O.current(...Q),onCreated:Q=>{Q.events.connect==null||Q.events.connect(y?s7(y)?y.current:y:b.current),e&&Q.setEvents({compute:(tt,Y)=>{const Z=tt[e+"X"],U=tt[e+"Y"];Y.pointer.set(Z/Y.size.width*2-1,-(U/Y.size.height)*2+1),Y.raycaster.setFromCamera(Y.pointer,Y.camera)}}),m?.(Q)}}),z.current.render(Ce.createElement(w,null,Ce.createElement(IA,{set:G},Ce.createElement(Ce.Suspense,{fallback:Ce.createElement(a7,{set:D})},t)))))}),Ce.useEffect(()=>{const j=P.current;if(j)return()=>HA(j)},[]);const X=y?"none":"auto";return Ce.createElement("div",Lm({ref:b,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:X,...T}},S),Ce.createElement("div",{ref:C,style:{width:"100%",height:"100%"}},Ce.createElement("canvas",{ref:P,style:{display:"block"}},i)))}),W7=Ce.forwardRef(function(t,i){return Ce.createElement(kA,null,Ce.createElement(H7,Lm({},t,{ref:i})))});function io(g,t={}){let i=Ce.useCallback(T=>t.keys?QO(g,t.keys,T):g.listen(T),[t.keys,g]),x=g.get.bind(g);return Ce.useSyncExternalStore(i,x,x)}const X7=[new to(-Math.PI/2,-Math.PI/2,-Math.PI/2),new to(0,Math.PI/2,0),new to(0,-Math.PI/2,-Math.PI/2),new to(Math.PI/2,Math.PI,Math.PI),new to(0,0,-Math.PI/2),new to(Math.PI,0,0)],Y7=({diceValues:g,isRolling:t,textures:i})=>{const x=Ce.useRef([]),T=Ce.useRef([]);return Ce.useEffect(()=>{const E=new fA,s=new ze(16766720);T.current=[new yl({map:E.load(i.side1),color:s}),new yl({map:E.load(i.side2),color:s}),new yl({map:E.load(i.side3),color:s}),new yl({map:E.load(i.side4),color:s}),new yl({map:E.load(i.side5),color:s}),new yl({map:E.load(i.side6),color:s})],x.current.forEach(y=>{y&&(y.material=T.current)})},[i]),S7(()=>{x.current.forEach((E,s)=>{if(E)if(t)E.rotation.x+=.2,E.rotation.y+=.2;else{const y=X7[g[s]-1];E.rotation.x=fm.lerp(E.rotation.x,y.x,.1),E.rotation.y=fm.lerp(E.rotation.y,y.y,.1),E.rotation.z=fm.lerp(E.rotation.z,y.z,.1)}})}),Yt.jsx(Yt.Fragment,{children:g.map((E,s)=>Yt.jsxs("mesh",{ref:y=>x.current[s]=y,position:[s*2-(g.length-1),0,0],children:[Yt.jsx("boxGeometry",{args:[1,1,1]}),T.current.length===6&&T.current.map((y,e)=>Yt.jsx("meshStandardMaterial",{attach:`material-${e}`,...y},e))]},s))})},k7=({styleClass:g,textures:t,diceCount:i})=>{const x=io(Ed);Ce.useEffect(()=>{XI("Dice"),kI(t),YI({type:"ROLL_DICE",diceValues:Array(i).fill(1),isRolling:!1})},[t,i]);const T=()=>{RT(!0),setTimeout(()=>{const E=Array.from({length:i},()=>Math.floor(Math.random()*6)+1);dw(E),RT(!1);const s={diceValues:E};Si.emit("diceRollResult",s)},2e3)};return Yt.jsxs("div",{className:`flex flex-col items-center justify-center p-4 ${g}`,children:[Yt.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Dice Roller"}),Yt.jsxs(W7,{className:"w-full h-full",camera:{position:[0,0,5]},children:[Yt.jsx("ambientLight",{intensity:2.5}),Yt.jsx("pointLight",{position:[10,10,10]}),vT(x.action)&&Yt.jsx(Y7,{diceValues:x.action.diceValues,isRolling:x.action.isRolling,textures:x.textures})]}),vT(x.action)&&Yt.jsx("button",{onClick:T,className:`mt-4 p-2 border border-yellow-300 rounded text-yellow-400 hover:scale-110 ${x.action.isRolling?"opacity-50":""}`,disabled:x.action.isRolling,children:"Roll Dice"})]})},j7=({text:g,speed:t=80,onComplete:i})=>{const[x,T]=Ce.useState([]),E=Ce.useRef([]);return Ce.useEffect(()=>{let s,y=0;const e=g.split(/(<\/?span[^>]*>)/g).filter(Boolean),r=[];e.forEach((h,a)=>{if(h.startsWith("/);if(l){const n=l[1];r.push(Yt.jsx("span",{className:n},`span-${a}`))}else r.push(Yt.jsx("span",{},`span-${a}`))}else h.split("").forEach((l,n)=>{r.push(Yt.jsx("span",{children:l},`char-${a}-${n}`))})}),y=0;const p=()=>{y{window.clearTimeout(s)}},[g,t,i]),Yt.jsx("div",{children:x})},jA=Ou.memo(j7);class KA{constructor(t,i,x){this.scene=t,this.gridEngine=i,this.quadtree=x,this.cursor=this.scene.input.keyboard?.createCursorKeys(),this.initializeWASDKeys(),this.registerEventHandlers(),this.tooltip=this.scene.add.text(0,0,"Press [F]",{font:"16px Arial",backgroundColor:"#000000"}).setDepth(4).setPadding(3,2,2,3).setVisible(!1)}initializeWASDKeys(){const t=this.scene.input.keyboard;t&&(this.wasdKeys={W:t.addKey(Phaser.Input.Keyboard.KeyCodes.W),A:t.addKey(Phaser.Input.Keyboard.KeyCodes.A),S:t.addKey(Phaser.Input.Keyboard.KeyCodes.S),D:t.addKey(Phaser.Input.Keyboard.KeyCodes.D)})}handleConsume(t){const i=Tl(t);i&&i.consumable?(ri.log(`Consuming item: ${i.name}`),HI(i),PT(i.id)):ri.log(`Item ${t} is not consumable`)}handleEquip(t){const i=Tl(t);i&&(ri.log(`Equipping item: ${i.name}`),OI("weapon",i.id))}handleUnequip(t){const i=Tl(t);i&&(ri.log(`Unequipping item: ${i.name}`),DI("weapon"))}handleDiscard(t){ri.log(`Discarding item: ${t}`),PT(t)}handleView(t){const i=Tl(t);if(i&&(ri.log(`Viewing item: ${i.name} with ${i.slug}`),i.slug)){const x=`https://kbve.com/${i.slug}#${i.name.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"")}`;window.open(x,"_blank")}}registerEventHandlers(){Si.on("itemAction",this.handleItemAction.bind(this));//! Broken -Si.on("playerMove",this.handlePlayerMove.bind(this)),Si.on("playerReward",this.handlePlayerReward.bind(this)),Si.on("playerDamage",this.handlePlayerCombatDamage.bind(this))}handleItemAction(t){if(t)switch(ri.log(`Preparing Action: ${t.itemId} with ${t.action}`),t.action){case"consume":this.handleConsume(t.itemId);break;case"equip":this.handleEquip(t.itemId);break;case"unequip":this.handleUnequip(t.itemId);break;case"discard":this.handleDiscard(t.itemId);break;case"view":this.handleView(t.itemId);break;default:ri.log(`Unknown action: ${t.action}`)}}handlePlayerReward(t){ri.log("Rewarding the player"),t&&(Si.emit("notification",{title:"Success",message:t.message,notificationType:Ru.success}),FI(t.item))}handlePlayerCombatDamage(t){t&&(cw(parseInt(t.damage)),Si.emit("notification",{title:"Danger",message:`You taken ${t.damage} points of damage!`,notificationType:Ru.danger}))}handlePlayerMove(t){t&&this.gridEngine.moveTo("player",{x:t.x,y:t.y})}checkForNearbyObjects(){const i=this.gridEngine.getPosition("player"),x=i.x*48,T=i.y*48;this.quadtree.query(i).length>0?this.tooltip.setPosition(x,T-60).setVisible(!0):this.tooltip.setVisible(!1)}handleMovement(){if(!this.cursor)return;const t=this.cursor,i=this.wasdKeys;if(this.scene.input.keyboard?.addKey("F").isDown){const x=this.gridEngine.getPosition("player"),T=this.quadtree.query(x);for(const E of T)E.action()}(t.left.isDown||i.A.isDown)&&(t.up.isDown||i.W.isDown)?this.gridEngine.move("player","up-left"):(t.left.isDown||i.A.isDown)&&(t.down.isDown||i.S.isDown)?this.gridEngine.move("player","down-left"):(t.right.isDown||i.D.isDown)&&(t.up.isDown||i.W.isDown)?this.gridEngine.move("player","up-right"):(t.right.isDown||i.D.isDown)&&(t.down.isDown||i.S.isDown)?this.gridEngine.move("player","down-right"):t.left.isDown||i.A.isDown?this.gridEngine.move("player","left"):t.right.isDown||i.D.isDown?this.gridEngine.move("player","right"):t.up.isDown||i.W.isDown?this.gridEngine.move("player","up"):(t.down.isDown||i.S.isDown)&&this.gridEngine.move("player","down"),this.checkForNearbyObjects()}}class ZA extends Phaser.GameObjects.Container{constructor(t,i,x,T){const E=i.x,s=i.y-i.height+10;super(t,E,s),this.sprite=i;const y=150,e=40+T.length*20;this.background=t.add.rectangle(0,0,y,e,0,.7),this.text=t.add.text(0,-e/2+10,x,{fontSize:"12px",color:"#ffffff"}).setOrigin(.5),this.buttons=T.map((r,p)=>{const h=t.add.text(0,-e/2+30+p*20,r.label,{fontSize:"12px",color:"#00ff00"}).setOrigin(.5);return h.setInteractive({useHandCursor:!0}),h.on("pointerdown",r.callback),h}),this.add(this.background),this.add(this.text),this.buttons.forEach(r=>this.add(r)),this.scene.add.existing(this)}updatePosition(){this.setPosition(this.sprite.x-30,this.sprite.y-this.sprite.height-this.background.height/2+100)}static attachToSprite(t,i,x,T){i.setInteractive(),i.on("pointerover",E=>{const s={npcId:i.name,npcName:x,actions:T.map(e=>e.label),coords:{x:E.x,y:E.y}};if(Si.emit("npcInteraction",s),!i.getData("tooltipMenu")){const e=new ZA(t,i,x,T);i.setData("tooltipMenu",e)}const y=i.getData("tooltipMenu");y.setVisible(!0),y.updatePosition()}),i.on("pointerout",()=>{const E=i.getData("tooltipMenu");E&&E.setVisible(!1)})}static updateAllTooltipPositions(t){t.children.list.forEach(i=>{if(i instanceof Phaser.GameObjects.Sprite){const x=i.getData("tooltipMenu");x&&x.updatePosition()}})}}let FG=class extends Phaser.GameObjects.Sprite{};function K7(g,t,i,x){const y=g.add.graphics();y.fillStyle(16777215,1),y.fillRoundedRect(0,0,200,60,16),y.setDepth(99);const e=g.add.text(100,30,i,{fontFamily:"Arial",fontSize:16,color:"#000000"});e.setOrigin(.5),e.setWordWrapWidth(200-10*2),e.setDepth(100);const r=g.add.container(0,0,[y,e]);return r.setDepth(100),t.messageBubble=r,J7(t),g.time.addEvent({delay:x,callback:()=>{r.destroy(),t.messageBubble===r&&(t.messageBubble=void 0)},callbackScope:g}),r}function Z7(g,t,i){const s=g.add.graphics();s.fillStyle(16777215,1),s.fillRoundedRect(0,0,200,60,16),s.setDepth(99);const y=g.add.text(100,30,i,{fontFamily:"Arial",fontSize:16,color:"#000000"});y.setOrigin(.5),y.setWordWrapWidth(200-10*2),y.setDepth(100);const e=g.add.container(0,0,[s,y]);return e.setDepth(100),t.textBubble=e,Ox(t),e}function Ox(g){const t=g.textBubble;t&&(t.x=g.x,t.y=g.y-g.height-t.height/2)}function J7(g){const t=g.messageBubble;t&&(t.x=g.x,t.y=g.y-g.height-t.height/2)}var JA={exports:{}};(function(g,t){(function(i,x){g.exports=x()})(Ty,function(){var i=function(V,K){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(et,st){et.__proto__=st}||function(et,st){for(var ht in st)Object.prototype.hasOwnProperty.call(st,ht)&&(et[ht]=st[ht])})(V,K)},x=function(){return(x=Object.assign||function(V){for(var K,et=1,st=arguments.length;et"u"||E.Promise||(E.Promise=Promise);var r=Object.getPrototypeOf,p={}.hasOwnProperty;function h(V,K){return p.call(V,K)}function a(V,K){typeof K=="function"&&(K=K(r(V))),(typeof Reflect>"u"?s:Reflect.ownKeys)(K).forEach(function(et){n(V,et,K[et])})}var l=Object.defineProperty;function n(V,K,et,st){l(V,K,e(et&&h(et,"get")&&typeof et.get=="function"?{get:et.get,set:et.set,configurable:!0}:{value:et,configurable:!0,writable:!0},st))}function u(V){return{from:function(K){return V.prototype=Object.create(K.prototype),n(V.prototype,"constructor",V),{extend:a.bind(null,V.prototype)}}}}var f=Object.getOwnPropertyDescriptor,o=[].slice;function c(V,K,et){return o.call(V,K,et)}function d(V,K){return K(V)}function v(V){if(!V)throw new Error("Assertion Failed")}function m(V){E.setImmediate?setImmediate(V):setTimeout(V,0)}function S(V,K){if(typeof K=="string"&&h(V,K))return V[K];if(!K)return V;if(typeof K!="string"){for(var et=[],st=0,ht=K.length;st>>1,tt=z[Q];if(0>>1;QT(U,j))HT(J,U)?(z[Q]=J,z[H]=j,Q=H):(z[Q]=U,z[Z]=j,Q=Z);else if(HT(J,j))z[Q]=J,z[H]=j,Q=H;else break t}}return X}function T(z,X){var j=z.sortIndex-X.sortIndex;return j!==0?j:z.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var E=performance;g.unstable_now=function(){return E.now()}}else{var s=Date,y=s.now();g.unstable_now=function(){return s.now()-y}}var e=[],r=[],p=1,h=null,a=3,l=!1,n=!1,u=!1,f=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(z){for(var X=i(r);X!==null;){if(X.callback===null)x(r);else if(X.startTime<=z)x(r),X.sortIndex=X.expirationTime,t(e,X);else break;X=i(r)}}function v(z){if(u=!1,d(z),!n)if(i(e)!==null)n=!0,B(m);else{var X=i(r);X!==null&&G(v,X.startTime-z)}}function m(z,X){n=!1,u&&(u=!1,o(w),w=-1),l=!0;var j=a;try{for(d(X),h=i(e);h!==null&&(!(h.expirationTime>X)||z&&!P());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,a=h.priorityLevel;var tt=Q(h.expirationTime<=X);X=g.unstable_now(),typeof tt=="function"?h.callback=tt:h===i(e)&&x(e),d(X)}else x(e);h=i(e)}if(h!==null)var Y=!0;else{var Z=i(r);Z!==null&&G(v,Z.startTime-X),Y=!1}return Y}finally{h=null,a=j,l=!1}}var S=!1,M=null,w=-1,C=5,A=-1;function P(){return!(g.unstable_now()-Az||125Q?(z.sortIndex=j,t(r,z),i(e)===null&&z===i(r)&&(u?(o(w),w=-1):u=!0,G(v,j-Q))):(z.sortIndex=tt,t(e,z),n||l||(n=!0,B(m))),z},g.unstable_shouldYield=P,g.unstable_wrapCallback=function(z){var X=a;return function(){var j=a;a=X;try{return z.apply(this,arguments)}finally{a=j}}}})(LA);bA.exports=LA;var hM=bA.exports;const Z1={},n7=g=>void Object.assign(Z1,g);function r7(g,t){function i(p,{args:h=[],attach:a,...l},n){let u=`${p[0].toUpperCase()}${p.slice(1)}`,f;if(p==="primitive"){if(l.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const o=l.object;f=If(o,{type:p,root:n,attach:a,primitive:!0})}else{const o=Z1[u];if(!o)throw new Error(`R3F: ${u} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(h))throw new Error("R3F: The args prop must be an array!");f=If(new o(...h),{type:p,root:n,attach:a,memoizedProps:{args:h}})}return f.__r3f.attach===void 0&&(f instanceof Fi?f.__r3f.attach="geometry":f instanceof Wr&&(f.__r3f.attach="material")),u!=="inject"&&fy(f,l),f}function x(p,h){let a=!1;if(h){var l,n;(l=h.__r3f)!=null&&l.attach?uy(p,h,h.__r3f.attach):h.isObject3D&&p.isObject3D&&(p.add(h),a=!0),a||(n=p.__r3f)==null||n.objects.push(h),h.__r3f||If(h,{}),h.__r3f.parent=p,Lx(h),Nf(h)}}function T(p,h,a){let l=!1;if(h){var n,u;if((n=h.__r3f)!=null&&n.attach)uy(p,h,h.__r3f.attach);else if(h.isObject3D&&p.isObject3D){h.parent=p,h.dispatchEvent({type:"added"}),p.dispatchEvent({type:"childadded",child:h});const f=p.children.filter(c=>c!==h),o=f.indexOf(a);p.children=[...f.slice(0,o),h,...f.slice(o)],l=!0}l||(u=p.__r3f)==null||u.objects.push(h),h.__r3f||If(h,{}),h.__r3f.parent=p,Lx(h),Nf(h)}}function E(p,h,a=!1){p&&[...p].forEach(l=>s(h,l,a))}function s(p,h,a){if(h){var l,n,u;if(h.__r3f&&(h.__r3f.parent=null),(l=p.__r3f)!=null&&l.objects&&(p.__r3f.objects=p.__r3f.objects.filter(v=>v!==h)),(n=h.__r3f)!=null&&n.attach)pM(p,h,h.__r3f.attach);else if(h.isObject3D&&p.isObject3D){var f;p.remove(h),(f=h.__r3f)!=null&&f.root&&c7(dm(h),h)}const c=(u=h.__r3f)==null?void 0:u.primitive,d=!c&&(a===void 0?h.dispose!==null:a);if(!c){var o;E((o=h.__r3f)==null?void 0:o.objects,h,d),E(h.children,h,d)}if(delete h.__r3f,d&&h.dispose&&h.type!=="Scene"){const v=()=>{try{h.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?hM.unstable_scheduleCallback(hM.unstable_IdlePriority,v):v()}Nf(p)}}function y(p,h,a,l){var n;const u=(n=p.__r3f)==null?void 0:n.parent;if(!u)return;const f=i(h,a,p.__r3f.root);if(p.children){for(const o of p.children)o.__r3f&&x(f,o);p.children=p.children.filter(o=>!o.__r3f)}p.__r3f.objects.forEach(o=>x(f,o)),p.__r3f.objects=[],p.__r3f.autoRemovedBeforeAppend||s(u,p),f.parent&&(f.__r3f.autoRemovedBeforeAppend=!0),x(u,f),f.raycast&&f.__r3f.eventCount&&dm(f).getState().internal.interaction.push(f),[l,l.alternate].forEach(o=>{o!==null&&(o.stateNode=f,o.ref&&(typeof o.ref=="function"?o.ref(f):o.ref.current=f))})}const e=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:i7({createInstance:i,removeChild:s,appendChild:x,appendInitialChild:x,insertBefore:T,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(p,h)=>{if(!h)return;const a=p.getState().scene;a.__r3f&&(a.__r3f.root=p,x(a,h))},removeChildFromContainer:(p,h)=>{h&&s(p.getState().scene,h)},insertInContainerBefore:(p,h,a)=>{if(!h||!a)return;const l=p.getState().scene;l.__r3f&&T(l,h,a)},getRootHostContext:()=>null,getChildHostContext:p=>p,finalizeInitialChildren(p){var h;return!!((h=p?.__r3f)!=null?h:{}).handlers},prepareUpdate(p,h,a,l){var n;if(((n=p?.__r3f)!=null?n:{}).primitive&&l.object&&l.object!==p)return[!0];{const{args:f=[],children:o,...c}=l,{args:d=[],children:v,...m}=a;if(!Array.isArray(f))throw new Error("R3F: the args prop must be an array!");if(f.some((M,w)=>M!==d[w]))return[!0];const S=UA(p,c,m,!0);return S.changes.length?[!1,S]:null}},commitUpdate(p,[h,a],l,n,u,f){h?y(p,l,u,f):fy(p,a)},commitMount(p,h,a,l){var n;const u=(n=p.__r3f)!=null?n:{};p.raycast&&u.handlers&&u.eventCount&&dm(p).getState().internal.interaction.push(p)},getPublicInstance:p=>p,prepareForCommit:()=>null,preparePortalMount:p=>If(p.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(p){var h;const{attach:a,parent:l}=(h=p.__r3f)!=null?h:{};a&&l&&pM(l,p,a),p.isObject3D&&(p.visible=!1),Nf(p)},unhideInstance(p,h){var a;const{attach:l,parent:n}=(a=p.__r3f)!=null?a:{};l&&n&&uy(n,p,l),(p.isObject3D&&h.visible==null||h.visible)&&(p.visible=!0),Nf(p)},createTextInstance:e,hideTextInstance:e,unhideTextInstance:e,getCurrentEventPriority:()=>t?t():kf.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&An.fun(performance.now)?performance.now:An.fun(Date.now)?Date.now:()=>0,scheduleTimeout:An.fun(setTimeout)?setTimeout:void 0,cancelTimeout:An.fun(clearTimeout)?clearTimeout:void 0}),applyProps:fy}}var uM,fM;const hy=g=>"colorSpace"in g||"outputColorSpace"in g,FA=()=>{var g;return(g=Z1.ColorManagement)!=null?g:null},OA=g=>g&&g.isOrthographicCamera,s7=g=>g&&g.hasOwnProperty("current"),lp=typeof window<"u"&&((uM=window.document)!=null&&uM.createElement||((fM=window.navigator)==null?void 0:fM.product)==="ReactNative")?Me.useLayoutEffect:Me.useEffect;function DA(g){const t=Me.useRef(g);return lp(()=>void(t.current=g),[g]),t}function a7({set:g}){return lp(()=>(g(new Promise(()=>null)),()=>g(!1)),[g]),null}class IA extends Me.Component{constructor(...t){super(...t),this.state={error:!1}}componentDidCatch(t){this.props.set(t)}render(){return this.state.error?null:this.props.children}}IA.getDerivedStateFromError=()=>({error:!0});const NA="__default",cM=new Map,o7=g=>g&&!!g.memoized&&!!g.changes;function BA(g){var t;const i=typeof window<"u"?(t=window.devicePixelRatio)!=null?t:2:1;return Array.isArray(g)?Math.min(Math.max(g[0],i),g[1]):g}const rd=g=>{var t;return(t=g.__r3f)==null?void 0:t.root.getState()};function dm(g){let t=g.__r3f.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}const An={obj:g=>g===Object(g)&&!An.arr(g)&&typeof g!="function",fun:g=>typeof g=="function",str:g=>typeof g=="string",num:g=>typeof g=="number",boo:g=>typeof g=="boolean",und:g=>g===void 0,arr:g=>Array.isArray(g),equ(g,t,{arrays:i="shallow",objects:x="reference",strict:T=!0}={}){if(typeof g!=typeof t||!!g!=!!t)return!1;if(An.str(g)||An.num(g))return g===t;const E=An.obj(g);if(E&&x==="reference")return g===t;const s=An.arr(g);if(s&&i==="reference")return g===t;if((s||E)&&g===t)return!0;let y;for(y in g)if(!(y in t))return!1;if(E&&i==="shallow"&&x==="shallow"){for(y in T?t:g)if(!An.equ(g[y],t[y],{strict:T,objects:"reference"}))return!1}else for(y in T?t:g)if(g[y]!==t[y])return!1;if(An.und(y)){if(s&&g.length===0&&t.length===0||E&&Object.keys(g).length===0&&Object.keys(t).length===0)return!0;if(g!==t)return!1}return!0}};function l7(g){g.dispose&&g.type!=="Scene"&&g.dispose();for(const t in g)t.dispose==null||t.dispose(),delete g[t]}function If(g,t){const i=g;return i.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...t},g}function bx(g,t){let i=g;if(t.includes("-")){const x=t.split("-"),T=x.pop();return i=x.reduce((E,s)=>E[s],g),{target:i,key:T}}else return{target:i,key:t}}const dM=/-\d+$/;function uy(g,t,i){if(An.str(i)){if(dM.test(i)){const E=i.replace(dM,""),{target:s,key:y}=bx(g,E);Array.isArray(s[y])||(s[y]=[])}const{target:x,key:T}=bx(g,i);t.__r3f.previousAttach=x[T],x[T]=t}else t.__r3f.previousAttach=i(g,t)}function pM(g,t,i){var x,T;if(An.str(i)){const{target:E,key:s}=bx(g,i),y=t.__r3f.previousAttach;y===void 0?delete E[s]:E[s]=y}else(x=t.__r3f)==null||x.previousAttach==null||x.previousAttach(g,t);(T=t.__r3f)==null||delete T.previousAttach}function UA(g,{children:t,key:i,ref:x,...T},{children:E,key:s,ref:y,...e}={},r=!1){var p;const h=(p=g?.__r3f)!=null?p:{},a=Object.entries(T),l=[];if(r){const u=Object.keys(e);for(let f=0;f{var o;if((o=g.__r3f)!=null&&o.primitive&&u==="object"||An.equ(f,e[u]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(u))return l.push([u,f,!0,[]]);let c=[];u.includes("-")&&(c=u.split("-")),l.push([u,f,!1,c]);for(const d in T){const v=T[d];d.startsWith(`${u}-`)&&l.push([d,v,!1,d.split("-")])}});const n={...T};return h.memoizedProps&&h.memoizedProps.args&&(n.args=h.memoizedProps.args),h.memoizedProps&&h.memoizedProps.attach&&(n.attach=h.memoizedProps.attach),{memoized:n,changes:l}}const h7=typeof process<"u"&&!1;function fy(g,t){var i,x,T;const E=(i=g.__r3f)!=null?i:{},s=E.root,y=(x=s==null||s.getState==null?void 0:s.getState())!=null?x:{},{memoized:e,changes:r}=o7(t)?t:UA(g,t),p=E.eventCount;g.__r3f&&(g.__r3f.memoizedProps=e);for(let a=0;ad[v],g),!(c&&c.set))){const[d,...v]=f.reverse();o=v.reverse().reduce((m,S)=>m[S],g),l=d}if(n===NA+"remove")if(o.constructor){let d=cM.get(o.constructor);d||(d=new o.constructor,cM.set(o.constructor,d)),n=d[l]}else n=0;if(u)n?E.handlers[l]=n:delete E.handlers[l],E.eventCount=Object.keys(E.handlers).length;else if(c&&c.set&&(c.copy||c instanceof Mu)){if(Array.isArray(n))c.fromArray?c.fromArray(n):c.set(...n);else if(c.copy&&n&&n.constructor&&(h7?c.constructor.name===n.constructor.name:c.constructor===n.constructor))c.copy(n);else if(n!==void 0){const d=c instanceof ze;!d&&c.setScalar?c.setScalar(n):c instanceof Mu&&n instanceof Mu?c.mask=n.mask:c.set(n),!FA()&&!y.linear&&d&&c.convertSRGBToLinear()}}else if(o[l]=n,o[l]instanceof zn&&o[l].format===vs&&o[l].type===Go){const d=o[l];hy(d)&&hy(y.gl)?d.colorSpace=y.gl.outputColorSpace:d.encoding=y.gl.outputEncoding}Nf(g)}if(E.parent&&g.raycast&&p!==E.eventCount){const a=dm(g).getState().internal,l=a.interaction.indexOf(g);l>-1&&a.interaction.splice(l,1),E.eventCount&&a.interaction.push(g)}return!(r.length===1&&r[0][0]==="onUpdate")&&r.length&&(T=g.__r3f)!=null&&T.parent&&Lx(g),g}function Nf(g){var t,i;const x=(t=g.__r3f)==null||(i=t.root)==null||i.getState==null?void 0:i.getState();x&&x.internal.frames===0&&x.invalidate()}function Lx(g){g.onUpdate==null||g.onUpdate(g)}function u7(g,t){g.manual||(OA(g)?(g.left=t.width/-2,g.right=t.width/2,g.top=t.height/2,g.bottom=t.height/-2):g.aspect=t.width/t.height,g.updateProjectionMatrix(),g.updateMatrixWorld())}function $v(g){return(g.eventObject||g.object).uuid+"/"+g.index+g.instanceId}function f7(){var g;const t=typeof self<"u"&&self||typeof window<"u"&&window;if(!t)return kf.DefaultEventPriority;switch((g=t.event)==null?void 0:g.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return kf.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return kf.ContinuousEventPriority;default:return kf.DefaultEventPriority}}function zA(g,t,i,x){const T=i.get(t);T&&(i.delete(t),i.size===0&&(g.delete(x),T.target.releasePointerCapture(x)))}function c7(g,t){const{internal:i}=g.getState();i.interaction=i.interaction.filter(x=>x!==t),i.initialHits=i.initialHits.filter(x=>x!==t),i.hovered.forEach((x,T)=>{(x.eventObject===t||x.object===t)&&i.hovered.delete(T)}),i.capturedMap.forEach((x,T)=>{zA(i.capturedMap,t,x,T)})}function d7(g){function t(e){const{internal:r}=g.getState(),p=e.offsetX-r.initialClick[0],h=e.offsetY-r.initialClick[1];return Math.round(Math.sqrt(p*p+h*h))}function i(e){return e.filter(r=>["Move","Over","Enter","Out","Leave"].some(p=>{var h;return(h=r.__r3f)==null?void 0:h.handlers["onPointer"+p]}))}function x(e,r){const p=g.getState(),h=new Set,a=[],l=r?r(p.internal.interaction):p.internal.interaction;for(let o=0;o{const d=rd(o.object),v=rd(c.object);return!d||!v?o.distance-c.distance:v.events.priority-d.events.priority||o.distance-c.distance}).filter(o=>{const c=$v(o);return h.has(c)?!1:(h.add(c),!0)});p.events.filter&&(u=p.events.filter(u,p));for(const o of u){let c=o.object;for(;c;){var f;(f=c.__r3f)!=null&&f.eventCount&&a.push({...o,eventObject:c}),c=c.parent}}if("pointerId"in e&&p.internal.capturedMap.has(e.pointerId))for(let o of p.internal.capturedMap.get(e.pointerId).values())h.has($v(o.intersection))||a.push(o.intersection);return a}function T(e,r,p,h){const a=g.getState();if(e.length){const l={stopped:!1};for(const n of e){const u=rd(n.object)||a,{raycaster:f,pointer:o,camera:c,internal:d}=u,v=new Ct(o.x,o.y,0).unproject(c),m=A=>{var P,b;return(P=(b=d.capturedMap.get(A))==null?void 0:b.has(n.eventObject))!=null?P:!1},S=A=>{const P={intersection:n,target:r.target};d.capturedMap.has(A)?d.capturedMap.get(A).set(n.eventObject,P):d.capturedMap.set(A,new Map([[n.eventObject,P]])),r.target.setPointerCapture(A)},M=A=>{const P=d.capturedMap.get(A);P&&zA(d.capturedMap,n.eventObject,P,A)};let w={};for(let A in r){let P=r[A];typeof P!="function"&&(w[A]=P)}let C={...n,...w,pointer:o,intersections:e,stopped:l.stopped,delta:p,unprojectedPoint:v,ray:f.ray,camera:c,stopPropagation(){const A="pointerId"in r&&d.capturedMap.get(r.pointerId);if((!A||A.has(n.eventObject))&&(C.stopped=l.stopped=!0,d.hovered.size&&Array.from(d.hovered.values()).find(P=>P.eventObject===n.eventObject))){const P=e.slice(0,e.indexOf(n));E([...P,n])}},target:{hasPointerCapture:m,setPointerCapture:S,releasePointerCapture:M},currentTarget:{hasPointerCapture:m,setPointerCapture:S,releasePointerCapture:M},nativeEvent:r};if(h(C),l.stopped===!0)break}}return e}function E(e){const{internal:r}=g.getState();for(const p of r.hovered.values())if(!e.length||!e.find(h=>h.object===p.object&&h.index===p.index&&h.instanceId===p.instanceId)){const a=p.eventObject.__r3f,l=a?.handlers;if(r.hovered.delete($v(p)),a!=null&&a.eventCount){const n={...p,intersections:e};l.onPointerOut==null||l.onPointerOut(n),l.onPointerLeave==null||l.onPointerLeave(n)}}}function s(e,r){for(let p=0;pE([]);case"onLostPointerCapture":return r=>{const{internal:p}=g.getState();"pointerId"in r&&p.capturedMap.has(r.pointerId)&&requestAnimationFrame(()=>{p.capturedMap.has(r.pointerId)&&(p.capturedMap.delete(r.pointerId),E([]))})}}return function(p){const{onPointerMissed:h,internal:a}=g.getState();a.lastEvent.current=p;const l=e==="onPointerMove",n=e==="onClick"||e==="onContextMenu"||e==="onDoubleClick",f=x(p,l?i:void 0),o=n?t(p):0;e==="onPointerDown"&&(a.initialClick=[p.offsetX,p.offsetY],a.initialHits=f.map(d=>d.eventObject)),n&&!f.length&&o<=2&&(s(p,a.interaction),h&&h(p)),l&&E(f);function c(d){const v=d.eventObject,m=v.__r3f,S=m?.handlers;if(m!=null&&m.eventCount)if(l){if(S.onPointerOver||S.onPointerEnter||S.onPointerOut||S.onPointerLeave){const M=$v(d),w=a.hovered.get(M);w?w.stopped&&d.stopPropagation():(a.hovered.set(M,d),S.onPointerOver==null||S.onPointerOver(d),S.onPointerEnter==null||S.onPointerEnter(d))}S.onPointerMove==null||S.onPointerMove(d)}else{const M=S[e];M?(!n||a.initialHits.includes(v))&&(s(p,a.interaction.filter(w=>!a.initialHits.includes(w))),M(d)):n&&a.initialHits.includes(v)&&s(p,a.interaction.filter(w=>!a.initialHits.includes(w)))}}T(f,p,o,c)}}return{handlePointer:y}}const GA=g=>!!(g!=null&&g.render),VA=Me.createContext(null),p7=(g,t)=>{const i=Qz((y,e)=>{const r=new Ct,p=new Ct,h=new Ct;function a(o=e().camera,c=p,d=e().size){const{width:v,height:m,top:S,left:M}=d,w=v/m;c instanceof Ct?h.copy(c):h.set(...c);const C=o.getWorldPosition(r).distanceTo(h);if(OA(o))return{width:v/o.zoom,height:m/o.zoom,top:S,left:M,factor:1,distance:C,aspect:w};{const A=o.fov*Math.PI/180,P=2*Math.tan(A/2)*C,b=P*(v/m);return{width:b,height:P,top:S,left:M,factor:v/b,distance:C,aspect:w}}}let l;const n=o=>y(c=>({performance:{...c.performance,current:o}})),u=new ve;return{set:y,get:e,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(o=1)=>g(e(),o),advance:(o,c)=>t(o,c,e()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new Y1,pointer:u,mouse:u,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const o=e();l&&clearTimeout(l),o.performance.current!==o.performance.min&&n(o.performance.min),l=setTimeout(()=>n(e().performance.max),o.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:a},setEvents:o=>y(c=>({...c,events:{...c.events,...o}})),setSize:(o,c,d,v,m)=>{const S=e().camera,M={width:o,height:c,top:v||0,left:m||0,updateStyle:d};y(w=>({size:M,viewport:{...w.viewport,...a(S,p,M)}}))},setDpr:o=>y(c=>{const d=BA(o);return{viewport:{...c.viewport,dpr:d,initialDpr:c.viewport.initialDpr||d}}}),setFrameloop:(o="always")=>{const c=e().clock;c.stop(),c.elapsedTime=0,o!=="never"&&(c.start(),c.elapsedTime=0),y(()=>({frameloop:o}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:Me.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(o,c,d)=>{const v=e().internal;return v.priority=v.priority+(c>0?1:0),v.subscribers.push({ref:o,priority:c,store:d}),v.subscribers=v.subscribers.sort((m,S)=>m.priority-S.priority),()=>{const m=e().internal;m!=null&&m.subscribers&&(m.priority=m.priority-(c>0?1:0),m.subscribers=m.subscribers.filter(S=>S.ref!==o))}}}}}),x=i.getState();let T=x.size,E=x.viewport.dpr,s=x.camera;return i.subscribe(()=>{const{camera:y,size:e,viewport:r,gl:p,set:h}=i.getState();if(e.width!==T.width||e.height!==T.height||r.dpr!==E){var a;T=e,E=r.dpr,u7(y,e),p.setPixelRatio(r.dpr);const l=(a=e.updateStyle)!=null?a:typeof HTMLCanvasElement<"u"&&p.domElement instanceof HTMLCanvasElement;p.setSize(e.width,e.height,l)}y!==s&&(s=y,h(l=>({viewport:{...l.viewport,...l.viewport.getCurrentViewport(y)}})))}),i.subscribe(y=>g(y)),i};let Qv,v7=new Set,m7=new Set,g7=new Set;function cy(g,t){if(g.size)for(const{callback:i}of g.values())i(t)}function sd(g,t){switch(g){case"before":return cy(v7,t);case"after":return cy(m7,t);case"tail":return cy(g7,t)}}let dy,py;function vy(g,t,i){let x=t.clock.getDelta();for(t.frameloop==="never"&&typeof g=="number"&&(x=g-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=g),dy=t.internal.subscribers,Qv=0;Qv0)&&!((p=E.gl.xr)!=null&&p.isPresenting)&&(x+=vy(r,E))}if(i=!1,sd("after",r),x===0)return sd("tail",r),t=!1,cancelAnimationFrame(T)}function y(r,p=1){var h;if(!r)return g.forEach(a=>y(a.store.getState(),p));(h=r.gl.xr)!=null&&h.isPresenting||!r.internal.active||r.frameloop==="never"||(p>1?r.internal.frames=Math.min(60,r.internal.frames+p):i?r.internal.frames=2:r.internal.frames=1,t||(t=!0,requestAnimationFrame(s)))}function e(r,p=!0,h,a){if(p&&sd("before",r),h)vy(r,h,a);else for(const l of g.values())vy(r,l.store.getState());p&&sd("after",r)}return{loop:s,invalidate:y,advance:e}}function x7(){const g=Me.useContext(VA);if(!g)throw new Error("R3F: Hooks can only be used within the Canvas component!");return g}function S7(g,t=0){const i=x7(),x=i.getState().internal.subscribe,T=DA(g);return lp(()=>x(T,t,i),[t,x,i]),null}const nc=new Map,{invalidate:vM,advance:mM}=y7(nc),{reconciler:bm,applyProps:Of}=r7(nc,f7),Df={objects:"shallow",strict:!1},T7=(g,t)=>{const i=typeof g=="function"?g(t):g;return GA(i)?i:new R1({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0,...g})};function E7(g,t){const i=typeof HTMLCanvasElement<"u"&&g instanceof HTMLCanvasElement;if(t){const{width:x,height:T,top:E,left:s,updateStyle:y=i}=t;return{width:x,height:T,top:E,left:s,updateStyle:y}}else if(typeof HTMLCanvasElement<"u"&&g instanceof HTMLCanvasElement&&g.parentElement){const{width:x,height:T,top:E,left:s}=g.parentElement.getBoundingClientRect();return{width:x,height:T,top:E,left:s,updateStyle:i}}else if(typeof OffscreenCanvas<"u"&&g instanceof OffscreenCanvas)return{width:g.width,height:g.height,top:0,left:0,updateStyle:i};return{width:0,height:0,top:0,left:0}}function M7(g){const t=nc.get(g),i=t?.fiber,x=t?.store;t&&console.warn("R3F.createRoot should only be called once!");const T=typeof reportError=="function"?reportError:console.error,E=x||p7(vM,mM),s=i||bm.createContainer(E,kf.ConcurrentRoot,null,!1,null,"",T,null);t||nc.set(g,{fiber:s,store:E});let y,e=!1,r;return{configure(p={}){let{gl:h,size:a,scene:l,events:n,onCreated:u,shadows:f=!1,linear:o=!1,flat:c=!1,legacy:d=!1,orthographic:v=!1,frameloop:m="always",dpr:S=[1,2],performance:M,raycaster:w,camera:C,onPointerMissed:A}=p,P=E.getState(),b=P.gl;P.gl||P.set({gl:b=T7(h,g)});let O=P.raycaster;O||P.set({raycaster:O=new wA});const{params:I,...D}=w||{};if(An.equ(D,O,Df)||Of(O,{...D}),An.equ(I,O.params,Df)||Of(O,{params:{...O.params,...I}}),!P.camera||P.camera===r&&!An.equ(r,C,Df)){r=C;const j=C instanceof tp,Q=j?C:v?new np(0,0,0,0,.1,1e3):new Dr(75,0,.1,1e3);j||(Q.position.z=5,C&&Of(Q,C),!P.camera&&!(C!=null&&C.rotation)&&Q.lookAt(0,0,0)),P.set({camera:Q}),O.camera=Q}if(!P.scene){let j;l instanceof Pm?j=l:(j=new Pm,l&&Of(j,l)),P.set({scene:If(j)})}if(!P.xr){var B;const j=(Y,Z)=>{const U=E.getState();U.frameloop!=="never"&&mM(Y,!0,U,Z)},Q=()=>{const Y=E.getState();Y.gl.xr.enabled=Y.gl.xr.isPresenting,Y.gl.xr.setAnimationLoop(Y.gl.xr.isPresenting?j:null),Y.gl.xr.isPresenting||vM(Y)},tt={connect(){const Y=E.getState().gl;Y.xr.addEventListener("sessionstart",Q),Y.xr.addEventListener("sessionend",Q)},disconnect(){const Y=E.getState().gl;Y.xr.removeEventListener("sessionstart",Q),Y.xr.removeEventListener("sessionend",Q)}};typeof((B=b.xr)==null?void 0:B.addEventListener)=="function"&&tt.connect(),P.set({xr:tt})}if(b.shadowMap){const j=b.shadowMap.enabled,Q=b.shadowMap.type;if(b.shadowMap.enabled=!!f,An.boo(f))b.shadowMap.type=cd;else if(An.str(f)){var G;const tt={basic:mw,percentage:lg,soft:cd,variance:qa};b.shadowMap.type=(G=tt[f])!=null?G:cd}else An.obj(f)&&Object.assign(b.shadowMap,f);(j!==b.shadowMap.enabled||Q!==b.shadowMap.type)&&(b.shadowMap.needsUpdate=!0)}const z=FA();z&&("enabled"in z?z.enabled=!d:"legacyMode"in z&&(z.legacyMode=d)),e||Of(b,{outputEncoding:o?3e3:3001,toneMapping:c?zo:l1}),P.legacy!==d&&P.set(()=>({legacy:d})),P.linear!==o&&P.set(()=>({linear:o})),P.flat!==c&&P.set(()=>({flat:c})),h&&!An.fun(h)&&!GA(h)&&!An.equ(h,b,Df)&&Of(b,h),n&&!P.events.handlers&&P.set({events:n(E)});const X=E7(g,a);return An.equ(X,P.size,Df)||P.setSize(X.width,X.height,X.updateStyle,X.top,X.left),S&&P.viewport.dpr!==BA(S)&&P.setDpr(S),P.frameloop!==m&&P.setFrameloop(m),P.onPointerMissed||P.set({onPointerMissed:A}),M&&!An.equ(M,P.performance,Df)&&P.set(j=>({performance:{...j.performance,...M}})),y=u,e=!0,this},render(p){return e||this.configure(),bm.updateContainer(Me.createElement(C7,{store:E,children:p,onCreated:y,rootElement:g}),s,null,()=>{}),E},unmount(){HA(g)}}}function C7({store:g,children:t,onCreated:i,rootElement:x}){return lp(()=>{const T=g.getState();T.set(E=>({internal:{...E.internal,active:!0}})),i&&i(T),g.getState().events.connected||T.events.connect==null||T.events.connect(x)},[]),Me.createElement(VA.Provider,{value:g},t)}function HA(g,t){const i=nc.get(g),x=i?.fiber;if(x){const T=i?.store.getState();T&&(T.internal.active=!1),bm.updateContainer(null,x,null,()=>{T&&setTimeout(()=>{try{var E,s,y,e;T.events.disconnect==null||T.events.disconnect(),(E=T.gl)==null||(s=E.renderLists)==null||s.dispose==null||s.dispose(),(y=T.gl)==null||y.forceContextLoss==null||y.forceContextLoss(),(e=T.gl)!=null&&e.xr&&T.xr.disconnect(),l7(T),nc.delete(g),t&&t(g)}catch{}},500)})}}bm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:Me.version});function Lm(){return Lm=Object.assign?Object.assign.bind():function(g){for(var t=1;t=0?x=setTimeout(e,t-p):(x=null,i||(y=g.apply(E,T),E=T=null))}var r=function(){E=this,T=arguments,s=Date.now();var p=i&&!x;return x||(x=setTimeout(e,t)),p&&(y=g.apply(E,T),E=T=null),y};return r.clear=function(){x&&(clearTimeout(x),x=null)},r.flush=function(){x&&(y=g.apply(E,T),E=T=null,clearTimeout(x),x=null)},r}Fx.debounce=Fx;var w7=Fx;const gM=kd(w7);function A7(g){let{debounce:t,scroll:i,polyfill:x,offsetSize:T}=g===void 0?{debounce:0,scroll:!1,offsetSize:!1}:g;const E=x||(typeof window>"u"?class{}:window.ResizeObserver);if(!E)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,y]=Me.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),e=Me.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),r=t?typeof t=="number"?t:t.scroll:null,p=t?typeof t=="number"?t:t.resize:null,h=Me.useRef(!1);Me.useEffect(()=>(h.current=!0,()=>void(h.current=!1)));const[a,l,n]=Me.useMemo(()=>{const c=()=>{if(!e.current.element)return;const{left:d,top:v,width:m,height:S,bottom:M,right:w,x:C,y:A}=e.current.element.getBoundingClientRect(),P={left:d,top:v,width:m,height:S,bottom:M,right:w,x:C,y:A};e.current.element instanceof HTMLElement&&T&&(P.height=e.current.element.offsetHeight,P.width=e.current.element.offsetWidth),Object.freeze(P),h.current&&!L7(e.current.lastBounds,P)&&y(e.current.lastBounds=P)};return[c,p?gM(c,p):c,r?gM(c,r):c]},[y,T,r,p]);function u(){e.current.scrollContainers&&(e.current.scrollContainers.forEach(c=>c.removeEventListener("scroll",n,!0)),e.current.scrollContainers=null),e.current.resizeObserver&&(e.current.resizeObserver.disconnect(),e.current.resizeObserver=null)}function f(){e.current.element&&(e.current.resizeObserver=new E(n),e.current.resizeObserver.observe(e.current.element),i&&e.current.scrollContainers&&e.current.scrollContainers.forEach(c=>c.addEventListener("scroll",n,{capture:!0,passive:!0})))}const o=c=>{!c||c===e.current.element||(u(),e.current.element=c,e.current.scrollContainers=WA(c),f())};return R7(n,!!i),P7(l),Me.useEffect(()=>{u(),f()},[i,n,l]),Me.useEffect(()=>u,[]),[o,s,a]}function P7(g){Me.useEffect(()=>{const t=g;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[g])}function R7(g,t){Me.useEffect(()=>{if(t){const i=g;return window.addEventListener("scroll",i,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",i,!0)}},[g,t])}function WA(g){const t=[];if(!g||g===document.body)return t;const{overflow:i,overflowX:x,overflowY:T}=window.getComputedStyle(g);return[i,x,T].some(E=>E==="auto"||E==="scroll")&&t.push(g),[...t,...WA(g.parentElement)]}const b7=["x","y","top","bottom","left","right","width","height"],L7=(g,t)=>b7.every(i=>g[i]===t[i]);var F7=Object.defineProperty,O7=Object.defineProperties,D7=Object.getOwnPropertyDescriptors,yM=Object.getOwnPropertySymbols,I7=Object.prototype.hasOwnProperty,N7=Object.prototype.propertyIsEnumerable,xM=(g,t,i)=>t in g?F7(g,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):g[t]=i,SM=(g,t)=>{for(var i in t||(t={}))I7.call(t,i)&&xM(g,i,t[i]);if(yM)for(var i of yM(t))N7.call(t,i)&&xM(g,i,t[i]);return g},B7=(g,t)=>O7(g,D7(t)),TM,EM;typeof window<"u"&&((TM=window.document)!=null&&TM.createElement||((EM=window.navigator)==null?void 0:EM.product)==="ReactNative")?Me.useLayoutEffect:Me.useEffect;function XA(g,t,i){if(!g)return;if(i(g)===!0)return g;let x=t?g.return:g.child;for(;x;){const T=XA(x,t,i);if(T)return T;x=t?null:x.sibling}}function YA(g){try{return Object.defineProperties(g,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return g}}const MM=console.error;console.error=function(){const g=[...arguments].join("");if(g?.startsWith("Warning:")&&g.includes("useContext")){console.error=MM;return}return MM.apply(this,arguments)};const J1=YA(Me.createContext(null));class kA extends Me.Component{render(){return Me.createElement(J1.Provider,{value:this._reactInternals},this.props.children)}}function U7(){const g=Me.useContext(J1);if(g===null)throw new Error("its-fine: useFiber must be called within a !");const t=Me.useId();return Me.useMemo(()=>{for(const x of[g,g?.alternate]){if(!x)continue;const T=XA(x,!1,E=>{let s=E.memoizedState;for(;s;){if(s.memoizedState===t)return!0;s=s.next}});if(T)return T}},[g,t])}function z7(){const g=U7(),[t]=Me.useState(()=>new Map);t.clear();let i=g;for(;i;){if(i.type&&typeof i.type=="object"){const T=i.type._context===void 0&&i.type.Provider===i.type?i.type:i.type._context;T&&T!==J1&&!t.has(T)&&t.set(T,Me.useContext(YA(T)))}i=i.return}return t}function G7(){const g=z7();return Me.useMemo(()=>Array.from(g.keys()).reduce((t,i)=>x=>Me.createElement(t,null,Me.createElement(i.Provider,B7(SM({},x),{value:g.get(i)}))),t=>Me.createElement(kA,SM({},t))),[g])}const my={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function V7(g){const{handlePointer:t}=d7(g);return{priority:1,enabled:!0,compute(i,x,T){x.pointer.set(i.offsetX/x.size.width*2-1,-(i.offsetY/x.size.height)*2+1),x.raycaster.setFromCamera(x.pointer,x.camera)},connected:void 0,handlers:Object.keys(my).reduce((i,x)=>({...i,[x]:t(x)}),{}),update:()=>{var i;const{events:x,internal:T}=g.getState();(i=T.lastEvent)!=null&&i.current&&x.handlers&&x.handlers.onPointerMove(T.lastEvent.current)},connect:i=>{var x;const{set:T,events:E}=g.getState();E.disconnect==null||E.disconnect(),T(s=>({events:{...s.events,connected:i}})),Object.entries((x=E.handlers)!=null?x:[]).forEach(([s,y])=>{const[e,r]=my[s];i.addEventListener(e,y,{passive:r})})},disconnect:()=>{const{set:i,events:x}=g.getState();if(x.connected){var T;Object.entries((T=x.handlers)!=null?T:[]).forEach(([E,s])=>{if(x&&x.connected instanceof HTMLElement){const[y]=my[E];x.connected.removeEventListener(y,s)}}),i(E=>({events:{...E.events,connected:void 0}}))}}}}const H7=Me.forwardRef(function({children:t,fallback:i,resize:x,style:T,gl:E,events:s=V7,eventSource:y,eventPrefix:e,shadows:r,linear:p,flat:h,legacy:a,orthographic:l,frameloop:n,dpr:u,performance:f,raycaster:o,camera:c,scene:d,onPointerMissed:v,onCreated:m,...S},M){Me.useMemo(()=>n7(Zz),[]);const w=G7(),[C,A]=A7({scroll:!0,debounce:{scroll:50,resize:0},...x}),P=Me.useRef(null),b=Me.useRef(null);Me.useImperativeHandle(M,()=>P.current);const O=DA(v),[I,D]=Me.useState(!1),[B,G]=Me.useState(!1);if(I)throw I;if(B)throw B;const z=Me.useRef(null);lp(()=>{const j=P.current;A.width>0&&A.height>0&&j&&(z.current||(z.current=M7(j)),z.current.configure({gl:E,events:s,shadows:r,linear:p,flat:h,legacy:a,orthographic:l,frameloop:n,dpr:u,performance:f,raycaster:o,camera:c,scene:d,size:A,onPointerMissed:(...Q)=>O.current==null?void 0:O.current(...Q),onCreated:Q=>{Q.events.connect==null||Q.events.connect(y?s7(y)?y.current:y:b.current),e&&Q.setEvents({compute:(tt,Y)=>{const Z=tt[e+"X"],U=tt[e+"Y"];Y.pointer.set(Z/Y.size.width*2-1,-(U/Y.size.height)*2+1),Y.raycaster.setFromCamera(Y.pointer,Y.camera)}}),m?.(Q)}}),z.current.render(Me.createElement(w,null,Me.createElement(IA,{set:G},Me.createElement(Me.Suspense,{fallback:Me.createElement(a7,{set:D})},t)))))}),Me.useEffect(()=>{const j=P.current;if(j)return()=>HA(j)},[]);const X=y?"none":"auto";return Me.createElement("div",Lm({ref:b,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:X,...T}},S),Me.createElement("div",{ref:C,style:{width:"100%",height:"100%"}},Me.createElement("canvas",{ref:P,style:{display:"block"}},i)))}),W7=Me.forwardRef(function(t,i){return Me.createElement(kA,null,Me.createElement(H7,Lm({},t,{ref:i})))});function io(g,t={}){let i=Me.useCallback(T=>t.keys?QO(g,t.keys,T):g.listen(T),[t.keys,g]),x=g.get.bind(g);return Me.useSyncExternalStore(i,x,x)}const X7=[new to(-Math.PI/2,-Math.PI/2,-Math.PI/2),new to(0,Math.PI/2,0),new to(0,-Math.PI/2,-Math.PI/2),new to(Math.PI/2,Math.PI,Math.PI),new to(0,0,-Math.PI/2),new to(Math.PI,0,0)],Y7=({diceValues:g,isRolling:t,textures:i})=>{const x=Me.useRef([]),T=Me.useRef([]);return Me.useEffect(()=>{const E=new fA,s=new ze(16766720);T.current=[new yl({map:E.load(i.side1),color:s}),new yl({map:E.load(i.side2),color:s}),new yl({map:E.load(i.side3),color:s}),new yl({map:E.load(i.side4),color:s}),new yl({map:E.load(i.side5),color:s}),new yl({map:E.load(i.side6),color:s})],x.current.forEach(y=>{y&&(y.material=T.current)})},[i]),S7(()=>{x.current.forEach((E,s)=>{if(E)if(t)E.rotation.x+=.2,E.rotation.y+=.2;else{const y=X7[g[s]-1];E.rotation.x=fm.lerp(E.rotation.x,y.x,.1),E.rotation.y=fm.lerp(E.rotation.y,y.y,.1),E.rotation.z=fm.lerp(E.rotation.z,y.z,.1)}})}),Yt.jsx(Yt.Fragment,{children:g.map((E,s)=>Yt.jsxs("mesh",{ref:y=>x.current[s]=y,position:[s*2-(g.length-1),0,0],children:[Yt.jsx("boxGeometry",{args:[1,1,1]}),T.current.length===6&&T.current.map((y,e)=>Yt.jsx("meshStandardMaterial",{attach:`material-${e}`,...y},e))]},s))})},k7=({styleClass:g,textures:t,diceCount:i})=>{const x=io(Ed);Me.useEffect(()=>{XI("Dice"),kI(t),YI({type:"ROLL_DICE",diceValues:Array(i).fill(1),isRolling:!1})},[t,i]);const T=()=>{RT(!0),setTimeout(()=>{const E=Array.from({length:i},()=>Math.floor(Math.random()*6)+1);dw(E),RT(!1);const s={diceValues:E};Si.emit("diceRollResult",s)},2e3)};return Yt.jsxs("div",{className:`flex flex-col items-center justify-center p-4 ${g}`,children:[Yt.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Dice Roller"}),Yt.jsxs(W7,{className:"w-full h-full",camera:{position:[0,0,5]},children:[Yt.jsx("ambientLight",{intensity:2.5}),Yt.jsx("pointLight",{position:[10,10,10]}),vT(x.action)&&Yt.jsx(Y7,{diceValues:x.action.diceValues,isRolling:x.action.isRolling,textures:x.textures})]}),vT(x.action)&&Yt.jsx("button",{onClick:T,className:`mt-4 p-2 border border-yellow-300 rounded text-yellow-400 hover:scale-110 ${x.action.isRolling?"opacity-50":""}`,disabled:x.action.isRolling,children:"Roll Dice"})]})},j7=({text:g,speed:t=80,onComplete:i})=>{const[x,T]=Me.useState([]),E=Me.useRef([]);return Me.useEffect(()=>{let s,y=0;const e=g.split(/(<\/?span[^>]*>)/g).filter(Boolean),r=[];e.forEach((h,a)=>{if(h.startsWith("/);if(l){const n=l[1];r.push(Yt.jsx("span",{className:n},`span-${a}`))}else r.push(Yt.jsx("span",{},`span-${a}`))}else h.split("").forEach((l,n)=>{r.push(Yt.jsx("span",{children:l},`char-${a}-${n}`))})}),y=0;const p=()=>{y{window.clearTimeout(s)}},[g,t,i]),Yt.jsx("div",{children:x})},jA=Ou.memo(j7);class KA{constructor(t,i,x){this.scene=t,this.gridEngine=i,this.quadtree=x,this.cursor=this.scene.input.keyboard?.createCursorKeys(),this.initializeWASDKeys(),this.registerEventHandlers(),this.tooltip=this.scene.add.text(0,0,"Press [F]",{font:"16px Arial",backgroundColor:"#000000"}).setDepth(4).setPadding(3,2,2,3).setVisible(!1)}initializeWASDKeys(){const t=this.scene.input.keyboard;t&&(this.wasdKeys={W:t.addKey(Phaser.Input.Keyboard.KeyCodes.W),A:t.addKey(Phaser.Input.Keyboard.KeyCodes.A),S:t.addKey(Phaser.Input.Keyboard.KeyCodes.S),D:t.addKey(Phaser.Input.Keyboard.KeyCodes.D)})}handleConsume(t){const i=Tl(t);i&&i.consumable?(qe.log(`Consuming item: ${i.name}`),HI(i),PT(i.id)):qe.log(`Item ${t} is not consumable`)}handleEquip(t){const i=Tl(t);i&&(qe.log(`Equipping item: ${i.name}`),OI("weapon",i.id))}handleUnequip(t){const i=Tl(t);i&&(qe.log(`Unequipping item: ${i.name}`),DI("weapon"))}handleDiscard(t){qe.log(`Discarding item: ${t}`),PT(t)}handleView(t){const i=Tl(t);if(i&&(qe.log(`Viewing item: ${i.name} with ${i.slug}`),i.slug)){const x=`https://kbve.com/${i.slug}#${i.name.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"")}`;window.open(x,"_blank")}}registerEventHandlers(){Si.on("itemAction",this.handleItemAction.bind(this));//! Broken +Si.on("playerMove",this.handlePlayerMove.bind(this)),Si.on("playerReward",this.handlePlayerReward.bind(this)),Si.on("playerDamage",this.handlePlayerCombatDamage.bind(this))}handleItemAction(t){if(t)switch(qe.log(`Preparing Action: ${t.itemId} with ${t.action}`),t.action){case"consume":this.handleConsume(t.itemId);break;case"equip":this.handleEquip(t.itemId);break;case"unequip":this.handleUnequip(t.itemId);break;case"discard":this.handleDiscard(t.itemId);break;case"view":this.handleView(t.itemId);break;default:qe.log(`Unknown action: ${t.action}`)}}handlePlayerReward(t){qe.log("Rewarding the player"),t&&(Si.emit("notification",{title:"Success",message:t.message,notificationType:Ru.success}),FI(t.item))}handlePlayerCombatDamage(t){t&&(cw(parseInt(t.damage)),Si.emit("notification",{title:"Danger",message:`You taken ${t.damage} points of damage!`,notificationType:Ru.danger}))}handlePlayerMove(t){t&&this.gridEngine.moveTo("player",{x:t.x,y:t.y})}checkForNearbyObjects(){const i=this.gridEngine.getPosition("player"),x=i.x*48,T=i.y*48;this.quadtree.query(i).length>0?this.tooltip.setPosition(x,T-60).setVisible(!0):this.tooltip.setVisible(!1)}handleMovement(){if(!this.cursor)return;const t=this.cursor,i=this.wasdKeys;if(this.scene.input.keyboard?.addKey("F").isDown){const x=this.gridEngine.getPosition("player"),T=this.quadtree.query(x);for(const E of T)E.action()}(t.left.isDown||i.A.isDown)&&(t.up.isDown||i.W.isDown)?this.gridEngine.move("player","up-left"):(t.left.isDown||i.A.isDown)&&(t.down.isDown||i.S.isDown)?this.gridEngine.move("player","down-left"):(t.right.isDown||i.D.isDown)&&(t.up.isDown||i.W.isDown)?this.gridEngine.move("player","up-right"):(t.right.isDown||i.D.isDown)&&(t.down.isDown||i.S.isDown)?this.gridEngine.move("player","down-right"):t.left.isDown||i.A.isDown?this.gridEngine.move("player","left"):t.right.isDown||i.D.isDown?this.gridEngine.move("player","right"):t.up.isDown||i.W.isDown?this.gridEngine.move("player","up"):(t.down.isDown||i.S.isDown)&&this.gridEngine.move("player","down"),this.checkForNearbyObjects()}}class ZA extends Phaser.GameObjects.Container{constructor(t,i,x,T){const E=i.x,s=i.y-i.height+10;super(t,E,s),this.sprite=i;const y=150,e=40+T.length*20;this.background=t.add.rectangle(0,0,y,e,0,.7),this.text=t.add.text(0,-e/2+10,x,{fontSize:"12px",color:"#ffffff"}).setOrigin(.5),this.buttons=T.map((r,p)=>{const h=t.add.text(0,-e/2+30+p*20,r.label,{fontSize:"12px",color:"#00ff00"}).setOrigin(.5);return h.setInteractive({useHandCursor:!0}),h.on("pointerdown",r.callback),h}),this.add(this.background),this.add(this.text),this.buttons.forEach(r=>this.add(r)),this.scene.add.existing(this)}updatePosition(){this.setPosition(this.sprite.x-30,this.sprite.y-this.sprite.height-this.background.height/2+100)}static attachToSprite(t,i,x,T){i.setInteractive(),i.on("pointerover",E=>{const s={npcId:i.name,npcName:x,actions:T.map(e=>e.label),coords:{x:E.x,y:E.y}};if(Si.emit("npcInteraction",s),!i.getData("tooltipMenu")){const e=new ZA(t,i,x,T);i.setData("tooltipMenu",e)}const y=i.getData("tooltipMenu");y.setVisible(!0),y.updatePosition()}),i.on("pointerout",()=>{const E=i.getData("tooltipMenu");E&&E.setVisible(!1)})}static updateAllTooltipPositions(t){t.children.list.forEach(i=>{if(i instanceof Phaser.GameObjects.Sprite){const x=i.getData("tooltipMenu");x&&x.updatePosition()}})}}let FG=class extends Phaser.GameObjects.Sprite{};function K7(g,t,i,x){const y=g.add.graphics();y.fillStyle(16777215,1),y.fillRoundedRect(0,0,200,60,16),y.setDepth(99);const e=g.add.text(100,30,i,{fontFamily:"Arial",fontSize:16,color:"#000000"});e.setOrigin(.5),e.setWordWrapWidth(200-10*2),e.setDepth(100);const r=g.add.container(0,0,[y,e]);return r.setDepth(100),t.messageBubble=r,J7(t),g.time.addEvent({delay:x,callback:()=>{r.destroy(),t.messageBubble===r&&(t.messageBubble=void 0)},callbackScope:g}),r}function Z7(g,t,i){const s=g.add.graphics();s.fillStyle(16777215,1),s.fillRoundedRect(0,0,200,60,16),s.setDepth(99);const y=g.add.text(100,30,i,{fontFamily:"Arial",fontSize:16,color:"#000000"});y.setOrigin(.5),y.setWordWrapWidth(200-10*2),y.setDepth(100);const e=g.add.container(0,0,[s,y]);return e.setDepth(100),t.textBubble=e,Ox(t),e}function Ox(g){const t=g.textBubble;t&&(t.x=g.x,t.y=g.y-g.height-t.height/2)}function J7(g){const t=g.messageBubble;t&&(t.x=g.x,t.y=g.y-g.height-t.height/2)}var JA={exports:{}};(function(g,t){(function(i,x){g.exports=x()})(Ty,function(){var i=function(V,K){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(et,st){et.__proto__=st}||function(et,st){for(var ht in st)Object.prototype.hasOwnProperty.call(st,ht)&&(et[ht]=st[ht])})(V,K)},x=function(){return(x=Object.assign||function(V){for(var K,et=1,st=arguments.length;et"u"||E.Promise||(E.Promise=Promise);var r=Object.getPrototypeOf,p={}.hasOwnProperty;function h(V,K){return p.call(V,K)}function a(V,K){typeof K=="function"&&(K=K(r(V))),(typeof Reflect>"u"?s:Reflect.ownKeys)(K).forEach(function(et){n(V,et,K[et])})}var l=Object.defineProperty;function n(V,K,et,st){l(V,K,e(et&&h(et,"get")&&typeof et.get=="function"?{get:et.get,set:et.set,configurable:!0}:{value:et,configurable:!0,writable:!0},st))}function u(V){return{from:function(K){return V.prototype=Object.create(K.prototype),n(V.prototype,"constructor",V),{extend:a.bind(null,V.prototype)}}}}var f=Object.getOwnPropertyDescriptor,o=[].slice;function c(V,K,et){return o.call(V,K,et)}function d(V,K){return K(V)}function v(V){if(!V)throw new Error("Assertion Failed")}function m(V){E.setImmediate?setImmediate(V):setTimeout(V,0)}function S(V,K){if(typeof K=="string"&&h(V,K))return V[K];if(!K)return V;if(typeof K!="string"){for(var et=[],st=0,ht=K.length;st"u"?[]:function(){var V=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[V,r(V),V];var K=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[K,r(K),V]}(),re=Vs[0],hr=Vs[1],Vs=Vs[2],hr=hr&&hr.then,le=re&&re.constructor,ge=!!Vs,xe=function(V,K){je.push([V,K]),te&&(queueMicrotask(Gi),te=!1)},Pe=!0,te=!0,Ge=[],Oe=[],Be=gt,Le={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:rt,pgp:!1,env:{},finalize:rt},ne=Le,je=[],si=0,Mi=[];function he(V){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var K=this._PSD=ne;if(typeof V!="function"){if(V!==Ht)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Me(this,this._value))}this._state=null,this._value=null,++K.ref,function et(st,ht){try{ht(function(pt){if(st._state===null){if(pt===st)throw new TypeError("A promise cannot be resolved with itself.");var Mt=st._lib&&Ii();pt&&typeof pt.then=="function"?et(st,function(Nt,zt){pt instanceof he?pt._then(Nt,zt):pt.then(Nt,zt)}):(st._state=!0,st._value=pt,we(st)),Mt&&nn()}},Me.bind(null,st))}catch(pt){Me(st,pt)}}(this,V)}var Ti={get:function(){var V=ne,K=_r;function et(st,ht){var pt=this,Mt=!V.global&&(V!==ne||K!==_r),Nt=Mt&&!Ss(),zt=new he(function(ct,St){Ve(pt,new bt(ie(st,V,Mt,Nt),ie(ht,V,Mt,Nt),ct,St,V))});return this._consoleTask&&(zt._consoleTask=this._consoleTask),zt}return et.prototype=Ht,et},set:function(V){n(this,"then",V&&V.prototype===Ht?Ti:{get:function(){return V},set:Ti.set})}};function bt(V,K,et,st,ht){this.onFulfilled=typeof V=="function"?V:null,this.onRejected=typeof K=="function"?K:null,this.resolve=et,this.reject=st,this.psd=ht}function Me(V,K){var et,st;Oe.push(K),V._state===null&&(et=V._lib&&Ii(),K=Be(K),V._state=!1,V._value=K,st=V,Ge.some(function(ht){return ht._value===st._value})||Ge.push(st),we(V),et&&nn())}function we(V){var K=V._listeners;V._listeners=[];for(var et=0,st=K.length;et.",$e="String expected.",qe=[],ii="__dbnames",oi="readonly",$i="readwrite";function un(V,K){return V?K?function(){return V.apply(this,arguments)&&K.apply(this,arguments)}:V:K}var ji={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function yn(V){return typeof V!="string"||/\./.test(V)?function(K){return K}:function(K){return K[V]===void 0&&V in K&&delete(K=O(K))[V],K}}function ti(){throw q.Type()}function Se(V,K){try{var et=Br(V),st=Br(K);if(et!==st)return et==="Array"?1:st==="Array"?-1:et==="binary"?1:st==="binary"?-1:et==="string"?1:st==="string"?-1:et==="Date"?1:st!=="Date"?NaN:-1;switch(et){case"number":case"Date":case"string":return KQt+ae&&Kt(Qt+Ft)})})}var Jt=Ki(et)&&et.limit===1/0&&(typeof V!="function"||V===Fa)&&{index:et.index,range:et.range};return Kt(0).then(function(){if(0=Ft})).length!==0?(St.forEach(function(Kt){Wt.push(function(){var Jt=It,Qt=Kt._cfg.dbschema;Na(vt,Jt,Ut),Na(vt,Qt,Ut),It=vt._dbSchema=Qt;var ae=bn(Jt,Qt);ae.add.forEach(function(me){Oa(Ut,me[0],me[1].primKey,me[1].indexes)}),ae.change.forEach(function(me){if(me.recreate)throw new q.Upgrade("Not yet support for changing primary key");var be=Ut.objectStore(me.name);me.add.forEach(function(_e){return Mn(be,_e)}),me.change.forEach(function(_e){be.deleteIndex(_e.name),Mn(be,_e)}),me.del.forEach(function(_e){return be.deleteIndex(_e)})});var ue=Kt._cfg.contentUpgrade;if(ue&&Kt._cfg.version>Ft){Ko(vt,Ut),Lt._memoizedTables={};var Re=w(Qt);ae.del.forEach(function(me){Re[me]=Jt[me]}),Gr(vt,[vt.Transaction.prototype]),Dl(vt,[vt.Transaction.prototype],s(Re),Re),Lt.schema=Re;var pe,Ae=Q(ue);return Ae&&zs(),ae=he.follow(function(){var me;(pe=ue(Lt))&&Ae&&(me=Ss.bind(null,null),pe.then(me,me))}),pe&&typeof pe.then=="function"?he.resolve(pe):ae.then(function(){return pe})}}),Wt.push(function(Jt){var Qt,ae,ue=Kt._cfg.dbschema;Qt=ue,ae=Jt,[].slice.call(ae.db.objectStoreNames).forEach(function(Re){return Qt[Re]==null&&ae.db.deleteObjectStore(Re)}),Gr(vt,[vt.Transaction.prototype]),Dl(vt,[vt.Transaction.prototype],vt._storeNames,vt._dbSchema),Lt.schema=vt._dbSchema}),Wt.push(function(Jt){vt.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(vt.idbdb.version/10)===Kt._cfg.version?(vt.idbdb.deleteObjectStore("$meta"),delete vt._dbSchema.$meta,vt._storeNames=vt._storeNames.filter(function(Qt){return Qt!=="$meta"})):Jt.objectStore("$meta").put(Kt._cfg.version,"version"))})}),function Kt(){return Wt.length?he.resolve(Wt.shift()(Lt.idbtrans)).then(Kt):he.resolve()}().then(function(){Da(It,Ut)})):he.resolve();var vt,Ft,Lt,Ut,Wt,It}).catch(Mt)):(s(ht).forEach(function(St){Oa(et,St,ht[St].primKey,ht[St].indexes)}),Ko(V,et),void he.follow(function(){return V.on.populate.fire(pt)}).catch(Mt));var zt,ct})}function Ph(V,K){Da(V._dbSchema,K),K.db.version%10!=0||K.objectStoreNames.contains("$meta")||K.db.createObjectStore("$meta").add(Math.ceil(K.db.version/10-1),"version");var et=Ia(0,V.idbdb,K);Na(V,V._dbSchema,K);for(var st=0,ht=bn(et,V._dbSchema).change;stMath.pow(2,62)?0:It.oldVersion,vt=It<1,V.idbdb=Wt.result,pt&&Ph(V,St),xn(V,It/10,St,Lt))},Lt),Wt.onsuccess=pi(function(){St=null;var It,Kt,Jt,Qt,ae,ue=V.idbdb=Wt.result,Re=c(ue.objectStoreNames);if(0"u"?he.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(Ft){function Lt(){return indexedDB.databases().finally(Ft)}zt=setInterval(Lt,100),Lt()}).finally(function(){return clearInterval(zt)}):Promise.resolve()).then(Nt)]).then(function(){return Mt(),K.onReadyBeingFired=[],he.resolve(Xr(function(){return V.on.ready.fire(V.vip)})).then(function Ft(){if(0K.limit?Ft.length=K.limit:V.length===K.limit&&Ft.length=Kt.limit&&(!Kt.values||ue.req.values)&&mo(ue.req.query.range,Kt.query.range)}),!1,Jt,Qt];case"count":return ae=Qt.find(function(ue){return qi(ue.req.query.range,Kt.query.range)}),[ae,!!ae,Jt,Qt]}}(K,et,"query",pt),St=ct[0],vt=ct[1],Ft=ct[2],Lt=ct[3];return St&&vt?St.obsSet=pt.obsSet:(vt=st.query(pt).then(function(Ut){var Wt=Ut.result;if(St&&(St.res=Wt),Mt){for(var It=0,Kt=Wt.length;It{ri.log(`Texture ${s} loaded successfully.`),this.addNPCToScene(t,E,x,T)}),t.load.start()}else throw new Error(`Sprite with ID ${E.spriteImageId} not found`)}}catch(E){E instanceof Error?ri.error(`Failed to load NPC: ${E.message}`):ri.error("Failed to load NPC:",E)}}addNPCToScene(t,i,x,T){try{ri.log(`Adding NPC to scene: ${JSON.stringify(i)}`),ri.log(`Using sprite key: ${i.spriteKey}`);const E=t.add.sprite(0,0,i.spriteKey);E.scale=i.scale||1.5,E.name=i.id||"Error Missing Name",ri.log(`NPC Sprite created with texture key ${i.spriteKey} at position (${i.startPosition.x}, ${i.startPosition.y})`);const s={id:i.id,sprite:E,walkingAnimationMapping:i.walkingAnimationMapping,startPosition:{x:x??i.startPosition.x,y:T??i.startPosition.y},speed:i.speed};if(ri.log(`Grid engine config: ${JSON.stringify(s)}`),!t.textures.exists(i.spriteKey))throw new Error(`Texture with key ${i.spriteKey} does not exist in the scene`);t.gridEngine.addCharacter(s),ri.log(`NPC added to grid engine with ID ${i.id}`),((e,r,p)=>{const h=t.gridEngine.getPosition(e.name);ri.log(`Attaching NPC events to ${r} at position: ${JSON.stringify(h)}`),$A.attachNPCEvent(e,r,p,{coords:h})})(E,i.name,i.actions.map(e=>({label:e}))),ri.log(`NPC ${i.name} added to scene successfully`)}catch(E){E instanceof Error?ri.error(`Error adding NPC to scene from addNPCToScene: ${E.message}`):ri.error("Error adding NPC to scene:",E)}}async addDialogue(t){await this.dialogues.put(t)}async getDialogue(t){return await this.dialogues.get(t)}async getAllDialogues(){return await this.dialogues.toArray()}async getDialoguesForNPC(t){const i=await this.getNPC(t);if(!i)throw new Error(`NPC with ID ${t} not found`);return(await Promise.all((i.dialogues||[]).map(T=>this.getDialogue(T.dialogueId)))).filter(T=>T!==void 0)}async markDialogueAsRead(t,i){const x=await this.getNPC(t);if(!x)throw new Error(`NPC with ID ${t} not found`);const T=x.dialogues?.find(E=>E.dialogueId===i);T&&(T.read=!0,await this.addNPC(x))}async fetchDialogues(t){try{const x=(await gn.get(t)).data.key,T=Object.values(x).map(E=>({...E}));await this.dialogues.bulkPut(T)}catch(i){ri.error(`Failed to fetch dialogues from ${t}:`,i)}}async getPrioritizedDialoguesForNPC(t){try{const i=await this.getNPC(t);if(!i)throw new Error(`NPC with ID ${t} not found`);const T=(await Promise.all((i.dialogues||[]).map(async E=>{const s=await this.getDialogue(E.dialogueId);return s?{...s,priority:E.priority,read:E.read}:null}))).filter(E=>E!==null);return T.sort((E,s)=>E.priority-s.priority),T}catch(i){return ri.error(`Failed to get prioritized dialogues for NPC with ID ${t}:`,i),[]}}async getNPCNameById(t){return(await this.getNPC(t))?.name}async getNPCAvatarById(t){const i=await this.getNPC(t);if(i?.avatarImageId)return(await this.getAvatar(i.avatarImageId))?.avatarData}async getNPCSlugById(t){return(await this.getNPC(t))?.slug}async createNPCSession(t,i){try{const x=this.getNPCNameById(i),T=this.getNPCSlugById(i),E=this.getNPCAvatarById(i),[s,y,e]=await Promise.all([x,T,E]),r={...t.get(),[`${i}_name`]:s||"Unknown",[`${i}_slug`]:y||"Unknown",[`${i}_avatar`]:e?URL.createObjectURL(e):"Unknown"};t.set(r)}catch{const T={...t.get(),[`${i}_name`]:"Unknown",[`${i}_slug`]:"Unknown",[`${i}_avatar`]:"Unknown"};t.set(T)}}}const Kf=new Q7;class _7{constructor(){this.actionHandlers={talk:this.talkToNPC.bind(this),quest:this.questWithNPC.bind(this),trade:this.tradeWithNPC.bind(this),combat:this.startCombat.bind(this),heal:this.healNPC.bind(this),steal:this.stealFromNPC.bind(this),lore:this.loreFromNPC.bind(this)}}getActionHandler(t){return this.actionHandlers[t]}loreFromNPC(t){ri.log(`Pulling up the lore of the NPC with ID: ${t.npcId}`)}questWithNPC(t){ri.log(`Starting quest with NPC with ID: ${t.npcId}`)}healNPC(t){ri.log(`Healing NPC with ID: ${t.npcId}`)}async talkToNPC(t){try{ri.log(`Talking to NPC with ID: ${t.npcId}`);const i=await Kf.getPrioritizedDialoguesForNPC(t.npcId);if(ri.log(i),i.length>0){const x=i[0];Si.emit("npcDialogue",{npcId:t.npcId,dialogue:x},1e3)}else ri.log("No dialogues available for this NPC.")}catch(i){ri.error(`Failed to fetch dialogues for NPC with ID ${t.npcId}:`,i)}}tradeWithNPC(t){ri.log(`Trading with NPC with ID: ${t.npcId}`)}moveToNPC(t){const x=t.data?.coords||{x:10,y:15};Si.emit("playerMove",x)}stealFromNPC(t){ri.log(`Attempting to steal from NPC with ID: ${t.npcId}`);const i={npcId:t.npcId,npcName:t.npcName,data:t.data};Si.emit("playerSteal",i)}startCombat(t){ri.log(`Starting combat with NPC with ID: ${t.npcId}`)}checkFish(t){ri.log(`Checking fish for NPC with ID: ${t.npcId}`)}attachNPCEvent(t,i,x,T){t.setInteractive(),t.on("pointerover",E=>{const s={npcId:t.name||"",npcName:i,actions:x.map(y=>y.label),data:T||{},coords:{x:E.x,y:E.y}};Si.emit("npcInteraction",s)}),t.on("pointerout",()=>{}),t.on("pointerdown",E=>{const s={npcId:t.name||"",npcName:i,actions:x.map(y=>y.label),data:T||{},coords:{x:E.x,y:E.y}};ri.log(`Click Registered at X: ${s.coords.x} Y: ${s.coords.y}`),Si.emit("npcInteractionClick",s,1e3)})}}const $A=new _7;function QA(g){return+g[g.length-1]}function _A(g){return g.startsWith("monster_bird_")&&!g.startsWith("monster_bird_shadow")}function qA(g,t,i,x,T){const E=[];for(let s=0;s<10;s++){const y=g.add.sprite(0,0,"monster_bird");y.setCrop(t,i,x,T),y.scale=3,E.push(y)}return E}function tP(g){return qA(g,0,0,61,47)}function eP(g){return qA(g,22,47,16,10)}function iP(g){g.anims.create({key:"bird",frames:g.anims.generateFrameNumbers("monster_bird",{start:0,end:2}),frameRate:10,repeat:-1,yoyo:!0})}class q7 extends Qm.Scene{mainMenuButtonImage;mainMenuButtonText;constructor(){super("Preloader")}preload(){this.load.image("mainBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.image("scroll","https://kbve.com/assets/img/fishchip/scroll.webp"),this.load.audio("music","https://kbve.com/assets/img/fishchip/bg.ogg"),this.load.image("creditsBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.audio("type","https://kbve.com/assets/img/fishchip/type.mp3"),this.load.spritesheet("fishing","https://kbve.com/assets/img/fishchip/animate.png",{frameWidth:800,frameHeight:600}),this.load.image("fish","https://kbve.com/assets/img/letter_logo.png"),this.load.image("background","https://kbve.com/assets/img/fishchip/scaled_fish_menu_minigame.webp"),this.load.image("tiles","https://kbve.com/assets/img/fishchip/desert_tileset_1.png"),this.load.image("cloud-city-tiles","/assets/map/cloud_tileset.png"),this.load.tilemapTiledJSON("cloud-city-map-large","/assets/map/cloud_city_large.json"),this.load.tilemapTiledJSON("cloud-city-map","https://kbve.com/assets/img/fishchip/cloud_city.json"),this.load.spritesheet("player","https://kbve.com/assets/img/fishchip/chip_charactersheet_warmer.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("knights","/assets/entity/knights.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("jacko","/assets/entity/jacko.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("monks","/assets/entity/monks.png",{frameWidth:52,frameHeight:72}),RI()}async create(){await Kf.initializeDatabase(),this.sound.get("music")?.isPlaying||this.sound.add("music",{loop:!0,volume:.1}).play(),this.add.image(480,480,"mainBg").setScale(.1),this.mainMenuButtonImage=this.add.image(480,480,"scroll").setAlpha(.9).setScale(.7,.2).setInteractive({useHandCursor:!0}),this.mainMenuButtonText=this.add.text(480,480,"Start Game",{fontFamily:"Arial Black",fontSize:50,color:"#ffffff",stroke:"#000000",strokeThickness:6}).setOrigin(.5).setInteractive({useHandCursor:!0}),this.mainMenuButtonText.on("pointerdown",()=>{this.scene.start("SandCity")},this)}}let DG=class extends ld.GameObjects.Sprite{textBubble;tooltip};class tG extends Qm.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"SandCity"});const t={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new vu(t)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57}),Si.emit("notification",{title:"Success",message:`You arrived safely to SandCity Passport: ${o1()}`,notificationType:Ru.success})}async create(){const t=this.make.tilemap({key:"cloud-city-map"});t.addTilesetImage("Cloud City","tiles");for(let T=0;T({id:"monster_bird_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1})),...this.monsterBirdShadows.map((T,E)=>({id:"monster_bird_shadow_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(t,x),this.loadRanges(),this.playerController=new KA(this,this.gridEngine,this.quadtree),K7(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!",3e3),await Kf.loadCharacter(this,"01J2DT4G871KJ0VNSHCNC5REDM",6,6),await Kf.loadCharacter(this,"01J2HCTMQ58JBMJGW9YA3FBQCG",8,8),await Kf.loadCharacter(this,"01J2HQJBMBGEEMWDBDWATRCY3T",8,15),this.gridEngine.moveRandomly("npc",1500,3),this.gridEngine.moveRandomly("fishNpc",1500,3);for(let T=0;T<10;T++)this.gridEngine.moveRandomly("monster_bird_"+T,1e3,10);this.gridEngine.positionChangeStarted().subscribe(({charId:T,exitTile:E,enterTile:s})=>{_A(T)&&this.gridEngine.moveTo("monster_bird_shadow_"+QA(T),{x:s.x,y:s.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const t=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const i={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};Si.emit("charEvent",i)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:()=>{const i={message:"Sign does not have much to say.",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};Si.emit("charEvent",i)}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const i={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};Si.emit("charEvent",i)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const i={message:"Samson the Great was an amazing sailer, died drinking dat drank.",character_name:"Samson Statue",character_image:"/assets/npc/samson.png",background_image:"/assets/background/animetombstone.webp"};Si.emit("charEvent",i)}}];for(const i of t)this.quadtree.insert(i)}update(){this.playerController?.handleMovement()}}class NG extends ld.GameObjects.Sprite{textBubble}class eG extends Qm.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"CloudCity"});const t={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new vu(t)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57})}create(){const t=this.make.tilemap({key:"cloud-city-map-large"});t.addTilesetImage("cloud_tileset","cloud-city-tiles");for(let T=0;T({id:"monster_bird_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1})),...this.monsterBirdShadows.map((T,E)=>({id:"monster_bird_shadow_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(t,x),this.loadRanges(),this.playerController=new KA(this,this.gridEngine,this.quadtree),Z7(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!"),this.gridEngine.moveRandomly("npc",1500,3);for(let T=0;T<10;T++)this.gridEngine.moveRandomly("monster_bird_"+T,1e3,20);this.gridEngine.positionChangeStarted().subscribe(({charId:T,exitTile:E,enterTile:s})=>{_A(T)&&this.gridEngine.moveTo("monster_bird_shadow_"+QA(T),{x:s.x,y:s.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const t=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const i={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};Si.emit("charEvent",i,1e3)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:async()=>{try{const T={message:`The Database Response time: ${(await(await fetch("https://api.cryptothrone.com/api/v1/speed")).json()).message.time_ms} ms`,character_name:"Planets Be Scalin",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};Si.emit("charEvent",T,1e3)}catch(i){console.error("Error fetching data:",i);const x={message:"Sign does not have much to say. Failed to fetch response time.",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};Si.emit("charEvent",x,1e3)}}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const i={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};Si.emit("charEvent",i,1e3)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const i={message:"Samson the Great was an amazing sailer, died drinking dat drank.",character_name:"Samson Statue",character_image:"/assets/npc/samson.png",background_image:"/assets/background/animetombstone.webp"};Si.emit("charEvent",i,1e3)}}];for(const i of t)this.quadtree.insert(i)}update(){this.playerController?.handleMovement(),this.npcSprite&&this.npcSprite.textBubble&&Ox(this.npcSprite),this.fishNpcSprite&&this.fishNpcSprite.textBubble&&Ox(this.fishNpcSprite)}}const iG=mm.div` - // Your style here -`;function nG(){const g=Ce.useRef(null);return Ce.useEffect(()=>{if(g.current){const t=g.current,x={...{title:"CryptoThrone",render:{antialias:!1},scale:{mode:ld.Scale.RESIZE,min:{width:1024,height:768},max:{width:1600,height:1200},zoom:1},type:ld.AUTO,transparent:!0,width:800,height:600,physics:{default:"arcade",arcade:{gravity:{x:0,y:0},debug:!1}},plugins:{scene:[{key:"gridEngine",plugin:$O,mapping:"gridEngine"}]},scene:[q7,tG,eG],input:{mouse:{preventDefaultWheel:!1},touch:{capture:!1}}},parent:t},T=new ld.Game(x);return()=>{T.destroy(!0)}}},[]),Yt.jsx(iG,{children:Yt.jsx("div",{ref:g})})}const wM=jd({message:""}),rG=()=>{const g=io(wM);Ce.useEffect(()=>{const i=x=>{if(x){wM.set(x);const T=document.querySelector("#hs-stacked-overlays");T&&(T.classList.remove("hidden"),T.classList.add("open"))}};return Si.on("charEvent",i),()=>{Si.off("charEvent",i)}},[]);const t=()=>{const i=document.querySelector("#hs-stacked-overlays");i&&(i.classList.add("hidden"),i.classList.remove("open"))};return Yt.jsx(Yt.Fragment,{children:Yt.jsx("div",{id:"hs-stacked-overlays",className:"hs-overlay hs-overlay-backdrop-open:bg-gray-900/50 hidden size-full fixed top-0 start-0 z-[60] overflow-x-hidden overflow-y-auto pointer-events-none [--overlay-backdrop:static]","data-hs-overlay-keyboard":"false",children:Yt.jsx("div",{className:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto",children:Yt.jsxs("div",{className:"flex flex-col lg:flex-row bg-zinc-950 border border-yellow-500 shadow-sm rounded-xl pointer-events-auto bg-cover",style:{backgroundImage:`url(${g.background_image||"https://kbve.com/assets/img/curved-images/wave.jpg"})`},children:[Yt.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4",children:`${g.character_name||"NPC"}`}),Yt.jsx("img",{src:g.character_image||"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md"})]}),Yt.jsxs("div",{className:"w-full lg:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[Yt.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400",children:""}),Yt.jsxs("button",{type:"button",className:"flex justify-center items-center size-7 text-sm font-semibold rounded-full border border-transparent text-yellow-400 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:t,children:[Yt.jsx("span",{className:"sr-only",children:"Close"}),Yt.jsxs("svg",{className:"flex-shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[Yt.jsx("path",{d:"M18 6 6 18"}),Yt.jsx("path",{d:"m6 6 12 12"})]})]})]}),Yt.jsx("div",{className:"p-4 overflow-y-auto",children:Yt.jsx("p",{className:"mt-1 mb-2 text-yellow-400 bg-zinc-950/80 rounded-xl p-4",children:g.message||"No Message"})}),Yt.jsx("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:Yt.jsxs("button",{className:"relative rounded px-5 py-2.5 overflow-hidden group bg-yellow-500 relative hover:bg-gradient-to-r hover:from-yellow-500 hover:to-yellow-400 text-white hover:ring-2 hover:ring-offset-2 hover:ring-yellow-400 transition-all ease-out duration-300 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:t,children:[Yt.jsx("span",{className:"absolute right-0 w-8 h-32 -mt-12 transition-all duration-1000 transform translate-x-12 bg-white opacity-10 rotate-12 group-hover:-translate-x-40 ease"}),Yt.jsx("span",{className:"relative",children:"Okay."})]})})]})]})})})})},AM=({settingKey:g,label:t,collapseIcon:i=_I,expandIcon:x=qI})=>{const T=gl(g),E=()=>uh(g,!T);return Yt.jsxs("button",{onClick:E,className:"bg-yellow-500 text-white text-sm p-2 rounded ml-2 flex items-center w-20 h-10",children:[T?Yt.jsx(x,{className:"w-2"}):Yt.jsx(i,{className:"w-4"}),Yt.jsx("span",{className:"ml-2 text-xs",children:t})]})},sG=({stats:g})=>{const t=(i,x)=>{const T=typeof i=="string"?parseInt(i,10):i,E=typeof x=="string"?parseInt(x,10):x;return Math.min(T/E*100,100)};return Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Stats"}),Yt.jsxs("div",{className:"mb-2",children:[Yt.jsx("p",{className:"text-sm text-green-400",children:`HP: ${g.health||"0"} / ${g.maxHealth}`}),Yt.jsx("div",{className:"w-full bg-gray-300 h-4 rounded",children:Yt.jsx("div",{className:"bg-green-400 h-full rounded",style:{width:`${t(g.health,g.maxHealth)}%`}})})]}),Yt.jsxs("div",{className:"mb-2",children:[Yt.jsx("p",{className:"text-sm text-blue-400",children:`MP: ${g.mana||"0"} / ${g.maxMana}`}),Yt.jsx("div",{className:"w-full bg-gray-300 h-4 rounded",children:Yt.jsx("div",{className:"bg-blue-400 h-full rounded",style:{width:`${t(g.mana,g.maxMana)}%`}})})]}),Yt.jsxs("div",{className:"mb-2",children:[Yt.jsx("p",{className:"text-sm text-yellow-400",children:`EP: ${g.energy||"0"} / ${g.maxEnergy}`}),Yt.jsx("div",{className:"w-full bg-gray-300 h-4 rounded",children:Yt.jsx("div",{className:"bg-yellow-400 h-full rounded",style:{width:`${t(g.energy,g.maxEnergy)}%`}})})]})]})},aG=({settingKey:g,label:t})=>{const i=gl(g),x=()=>{uh(g,!i)};return Yt.jsxs("label",{className:"flex items-center cursor-pointer",children:[Yt.jsx("span",{className:"mr-2 text-sm",children:t}),Yt.jsxs("div",{className:"relative",children:[Yt.jsx("input",{type:"checkbox",className:"sr-only",checked:i,onChange:x}),Yt.jsx("div",{className:"w-10 h-4 bg-gray-400 rounded-full shadow-inner"}),Yt.jsx("div",{className:`absolute w-6 h-6 bg-white opacity-75 rounded-full shadow -left-1 -top-1 transition-transform ${i?"transform translate-x-full bg-yellow-500 !opacity-100":""}`})]})]})},oG=(g,t)=>{const i=Tl(g);return i?Yt.jsxs("div",{style:{top:t.y,left:t.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[Yt.jsx("p",{className:"text-sm font-semibold",children:i.name}),Yt.jsxs("p",{className:"text-xs",children:["Type: ",i.type]}),Yt.jsxs("p",{className:"text-xs",children:["Bonuses: ",JSON.stringify(i.bonuses)]}),Yt.jsxs("p",{className:"text-xs",children:["Durability: ",i.durability]}),Yt.jsxs("p",{className:"text-xs",children:["Weight: ",i.weight]})]}):null},lG=(g,t,i,x)=>Yt.jsx("ul",{className:"grid grid-cols-8 gap-2",children:Object.keys(g).map(T=>{const E=g[T];return hG(E,t,i,x)})}),hG=(g,t,i,x)=>{if(!g)return Yt.jsx("li",{className:"text-sm relative flex items-center justify-center border border-gray-500 bg-gray-200",style:{width:"32px",height:"32px"}},`empty-${Math.random()}`);const T=Tl(g);return T?Yt.jsxs("li",{className:"text-sm relative",onMouseEnter:E=>t(T.id,E),onMouseLeave:i,onClick:E=>x(T.id,E),children:[T.name," (",T.type,") - Bonuses: ",JSON.stringify(T.bonuses)," - Durability: ",T.durability," - Weight: ",T.weight]},T.id):null},uG=(g,t,i,x)=>Yt.jsx("ul",{className:"grid grid-cols-8 gap-1",children:g.map((T,E)=>{const s=Tl(T);return s?Yt.jsx("li",{className:"text-sm relative hover:scale-[1.3] transition ease-in-out duration-100",onMouseEnter:y=>t(s.id,y),onMouseLeave:i,onClick:y=>x(s.id,y),children:Yt.jsx("img",{src:s.img,alt:s.name,style:{width:"32px",height:"32px"},className:"inline-block border border-yellow-400/50"})},E):null})}),fG=()=>Yt.jsx("div",{className:"transition transform duration-1000 ease-in-out",children:Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Settings"}),Yt.jsx("p",{className:"text-sm",children:"Additional settings can go here."}),Yt.jsx(aG,{settingKey:"debugMode",label:"Debug Mode"})]})}),cG=()=>{const g=io(Tn);io(Sm),io(PI),io(Jr),Ce.useEffect(()=>{const r=p=>{};return Si.on("playerEvent",r),()=>{Si.off("playerEvent",r)}},[]);const t=(r,p)=>{uh("tooltipItem",{id:r,position:{x:p.clientX+10,y:p.clientY-150}})},i=()=>{uh("tooltipItem",{...gl("tooltipItem"),id:null})},x=(r,p)=>{uh("submenuItem",{id:r,position:{x:p.clientX,y:p.clientY-150}})},T=()=>{uh("submenuItem",{...gl("submenuItem"),id:null})},E=(r,p)=>{const h=Tl(r);if(h){const a={itemId:h.id,action:p};Si.emit("itemAction",a),T()}};if(!g||!g.stats)return null;const s=gl("submenuItem"),y=s.id?WI(s.id):[],e=gl("tooltipItem");return Yt.jsxs("div",{className:"fixed top-24 left-3 w-[350px] p-4 bg-zinc-800 text-yellow-400 border border-yellow-300 rounded-lg z-20 transition transform ease-in-out duration-500 opacity-50 hover:opacity-100",children:[Yt.jsxs("div",{className:"flex flex-row space-y-2 align-top",children:[Yt.jsx(AM,{settingKey:"isStatsMenuCollapsed",label:"Stats"}),Yt.jsx(AM,{settingKey:"isSettingsMenuCollapsed",label:"Settings"})]}),Yt.jsx("div",{className:`transition transform duration-1000 ease-in-out ${gl("isSettingsMenuCollapsed")?"max-h-0 overflow-hidden":"max-h-screen"}`,children:Yt.jsx(fG,{})}),Yt.jsxs("div",{className:`transition transform duration-1000 ease-in-out ${gl("isStatsMenuCollapsed")?"max-h-0 overflow-hidden":"max-h-screen"}`,children:[Yt.jsx(sG,{stats:g.stats}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"User Information"}),Yt.jsx("p",{className:"text-sm",children:g.stats.username||"Guest"})]}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"General Information"}),Yt.jsx("p",{className:"text-sm",children:""})]}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Inventory"}),uG(g.inventory.backpack,t,i,x)]}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Equipment"}),lG(g.inventory.equipment,t,i,x)]}),e.id&&oG(e.id,e.position),s.id&&Yt.jsxs("div",{style:{top:s.position.y,left:s.position.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[Yt.jsx("button",{onClick:T,className:"absolute top-1 right-1 translate-x-6 bg-yellow-400 p-1 text-white hover:text-gray-400",children:"X"}),Yt.jsx("p",{className:"text-sm strong",children:"Actions:"}),Yt.jsxs("ul",{className:"text-xs",children:[y.map(r=>Yt.jsx("li",{onClick:()=>s.id&&E(s.id,r),className:"cursor-pointer hover:bg-gray-600",children:r.charAt(0).toUpperCase()+r.slice(1)},r)),Yt.jsx("li",{onClick:T,className:"cursor-pointer hover:bg-gray-600",children:"Close"})]})]})]})]})},gy=jd(null),yy=jd(null),dG=()=>{const g=io(gy),[t,i]=Ce.useState({x:0,y:0});Ce.useEffect(()=>{const y=e=>{e&&(gy.set(e),i(x(e.coords.x,e.coords.y)))};return Si.on("npcInteractionClick",y),()=>{Si.off("npcInteractionClick",y)}},[]);const x=(y,e)=>{let n=y+250,u=e+250;return n+200>window.innerWidth-10&&(n=window.innerWidth-200-10),u+200>window.innerHeight-10&&(u=window.innerHeight-200-10),n<10&&(n=10),u<10&&(u=10),{x:n,y:u}},T=y=>{if(g){const e=$A.getActionHandler(y);e&&(e(g),E())}},E=()=>{gy.set(null)},s=()=>{if(!g)return null;const{npcName:y,actions:e,npcId:r}=g,{x:p,y:h}=t;return Yt.jsxs("div",{className:"absolute bg-zinc-900 border border-yellow-300 rounded-md p-2 z-50 transition transform ease-in-out duration-500 opacity-50 hover:opacity-100",style:{left:`${p}px`,top:`${h}px`,transform:"translate(-50%, -100%)"},children:[Yt.jsxs("div",{className:"flex justify-between items-center mb-2",children:[Yt.jsx("h3",{className:"font-bold text-sm",children:y}),Yt.jsx("button",{onClick:E,className:"text-xs font-bold m-1 text-yellow-300 hover:text-yellow-500",children:"X"})]}),e.map((a,l)=>Yt.jsx("button",{onClick:()=>T(a),className:"block w-full text-sm py-1 px-2 mb-1 bg-yellow-500 hover:bg-yellow-400 rounded capitalize",children:a},l)),Yt.jsx("button",{onClick:E,className:"block w-full text-xs py-1 px-2 mt-2 bg-red-500 hover:bg-red-600 rounded text-white",children:"Close"})]},r)};return Yt.jsx("div",{children:s()})},xy=jd(null),Sy=jd({}),pG=Ou.memo(({text:g,onComplete:t})=>Yt.jsx(jA,{text:g,onComplete:t})),vG=Ou.memo(({text:g,onComplete:t})=>Yt.jsx(jA,{text:g,onComplete:t})),mG=()=>{const g=io(xy),t=io(Sy),[i,x]=Ce.useState(!1),[T,E]=Ce.useState(!1);Ce.useEffect(()=>{const y=e=>{if(e){xy.set(e);const r=document.querySelector("#hs-stacked-overlays-dialogue");r&&(r.classList.remove("hidden"),r.classList.add("open")),e.npcId&&(Kf.createNPCSession(Sy,e.npcId),x(!1),E(!1))}};return Si.on("npcDialogue",y),()=>{Si.off("npcDialogue",y)}},[]);const s=()=>{const y=document.querySelector("#hs-stacked-overlays-dialogue");y&&(y.classList.add("hidden"),y.classList.remove("open")),xy.set(null),Sy.set({}),x(!1),E(!1)};return Yt.jsx(Yt.Fragment,{children:Yt.jsx("div",{id:"hs-stacked-overlays-dialogue",className:"hs-overlay hs-overlay-backdrop-open:bg-gray-900/50 w-full h-full fixed top-0 start-0 z-[60] overflow-x-hidden overflow-y-auto pointer-events-none [--overlay-backdrop:static]","data-hs-overlay-keyboard":"false",children:Yt.jsx("div",{className:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all w-full h-full sm:max-w-lg sm:w-full m-3 sm:mx-auto md:min-w-fit",children:Yt.jsx("div",{className:"flex flex-col lg:flex-row bg-zinc-950 border border-yellow-500 shadow-sm rounded-xl pointer-events-auto bg-cover min-w-[800px] min-h-[500px]",style:{backgroundImage:`url(${g?.dialogue.backgroundImage||"https://kbve.com/assets/img/curved-images/wave.jpg"})`},children:g?Yt.jsxs(Yt.Fragment,{children:[Yt.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center relative",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4 p-4 absolute top-2 left-2",children:g.npcId&&t[`${g.npcId}_name`]?t[`${g.npcId}_name`]:"Unknown"}),Yt.jsx("img",{src:g.npcId&&t[`${g.npcId}_avatar`]?t[`${g.npcId}_avatar`]:"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md absolute bottom-0 left-0"})]}),Yt.jsxs("div",{className:"w-full md:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[Yt.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400 text-shadow-outline-white",children:g.dialogue.title||"Dialogue"}),Yt.jsxs("button",{type:"button",className:"flex justify-center items-center size-7 text-sm font-semibold rounded-full border border-transparent text-yellow-400 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays-dialogue",onClick:s,children:[Yt.jsx("span",{className:"sr-only",children:"Close"}),Yt.jsxs("svg",{className:"flex-shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[Yt.jsx("path",{d:"M18 6 6 18"}),Yt.jsx("path",{d:"m6 6 12 12"})]})]})]}),Yt.jsx("div",{className:"p-4 overflow-y-auto",children:Yt.jsxs("div",{className:"flex flex-col",children:[Yt.jsx("div",{className:"mt-1 mb-2 text-white bg-zinc-950/40 text-shadow-outline-white rounded-xl p-4 flex w-3/4",children:Yt.jsxs("div",{className:"w-full",children:[g.dialogue.message&&!i&&Yt.jsx(pG,{text:g.dialogue.message,onComplete:()=>x(!0)}),i&&Yt.jsx("div",{children:g.dialogue.message})]})}),Yt.jsx("div",{className:"flex justify-end",children:Yt.jsxs("div",{className:"w-3/4 mt-1 mb-2 text-yellow-400 text-shadow-outline-whites bg-zinc-950/40 rounded-xl p-4 text-right",children:[g.dialogue.playerResponse&&i&&!T&&Yt.jsx(vG,{text:`${g.dialogue.playerResponse}`,onComplete:()=>E(!0)}),T&&Yt.jsx("div",{children:g.dialogue.playerResponse})]})})]})}),Yt.jsx("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:Yt.jsxs("button",{className:"relative rounded px-5 py-2.5 overflow-hidden group bg-yellow-500 relative hover:bg-gradient-to-r hover:from-yellow-500 hover:to-yellow-400 text-white hover:ring-2 hover:ring-offset-2 hover:ring-yellow-400 transition-all ease-out duration-300 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays-dialogue",onClick:s,disabled:!T,children:[Yt.jsx("span",{className:"absolute right-0 w-8 h-32 -mt-12 transition-all duration-1000 transform translate-x-12 bg-white opacity-10 rotate-12 group-hover:-translate-x-40 ease"}),Yt.jsx("span",{className:`relative ${T?"":"text-gray-500"}`,children:"Okay."})]})})]})]}):Yt.jsx("div",{className:"w-full p-4 rounded-xl flex flex-col items-center justify-center",children:Yt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4 p-4",children:"Loading..."})})})})})})},gG=()=>{const g=io(Qh);Ce.useEffect(()=>{const i=x=>{if(x){const T=Date.now()+Math.random(),E={id:T,...x};Qh.set([...Qh.get(),E]),setTimeout(()=>{Qh.set(Qh.get().filter(s=>s.id!==T))},5e3)}};return Si.on("notification",i),()=>{Si.off("notification",i)}},[]);const t=i=>{Qh.set(Qh.get().filter(x=>x.id!==i))};return Yt.jsx("div",{className:"fixed inset-x-0 bottom-0 z-50 m-4 space-y-2",children:Array.isArray(g)&&g.map(i=>Yt.jsx("div",{className:`hs-removing:translate-x-5 hs-removing:opacity-0 transition duration-300 max-w-xs border rounded-xl shadow-lg ${i.notificationType.color}`,role:"alert",children:Yt.jsxs("div",{className:"flex p-4",children:[Yt.jsx("img",{src:i.notificationType.imgUrl,alt:i.notificationType.type,className:"flex-shrink-0 size-4"}),Yt.jsxs("div",{className:"ms-2",children:[Yt.jsx("h3",{className:"text-sm font-bold",children:i.title}),Yt.jsx("p",{className:"text-sm",children:i.message})]}),Yt.jsx("div",{className:"ms-auto",children:Yt.jsxs("button",{type:"button",className:"inline-flex flex-shrink-0 justify-center items-center size-5 rounded-lg text-gray-800 opacity-50 hover:opacity-100 focus:outline-none focus:opacity-100 dark:text-white",onClick:()=>t(i.id),children:[Yt.jsx("span",{className:"sr-only",children:"Close"}),Yt.jsxs("svg",{className:"flex-shrink-0 size-4 bg-zinc-900",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[Yt.jsx("path",{d:"M18 6 6 18"}),Yt.jsx("path",{d:"m6 6 12 12"})]})]})})]})},i.id))})},yG=()=>{const g=io(yy),[t,i]=Ce.useState([]),[x,T]=Ce.useState(null);Ce.useEffect(()=>{const y=r=>{r&&yy.set(r)},e=r=>{r&&i(r.diceValues)};return Si.on("playerSteal",y),Si.on("diceRollResult",e),()=>{Si.off("playerSteal",y),Si.off("diceRollResult",e)}},[]),Ce.useEffect(()=>{t.length>0&&E(t)},[t]);const E=y=>{const e=y.reduce((a,l)=>a+l,0);if(T(e),!g)return;let r="",p="";switch(!0){case e>=24:r="01J27QABD2GPFNRVK69S51HSGB",p=`You successfully stole a ${r}!`;break;case e>=20:r="01J27QN2KZG1RDZW4CE9Q9Z3YQ",p=`You successfully stole a ${r}!`;break;case e>=18:r="01J269PK47V1DWX2S1251DEASD",p=`You successfully stole a ${r}!`;break;case e>=15:r="Blue Shark",p=`You successfully stole a ${r}!`;break;case e>=12:r="Salmon",p=`You successfully stole a ${r}!`;break;case e<=4:Si.emit("notification",{title:"Danger",message:`You crit failed to steal from ${g.npcName}!`,notificationType:Ru.danger}),Si.emit("playerDamage",{damage:"5"});break;default:Si.emit("notification",{title:"Danger",message:`You failed to steal from ${g.npcName}!`,notificationType:Ru.danger}),Si.emit("playerDamage",{damage:"1"});return}const h=bI(r);h?Si.emit("playerReward",{message:p,item:h}):console.warn("Item not found in ItemDB")},s=()=>{dw([]),i([]),T(null),yy.set(null)};return g?Yt.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 bg-zinc-800 bg-opacity-50",children:Yt.jsxs("div",{className:"bg-zinc-800 p-4 rounded-lg shadow-lg w-3/4",children:[Yt.jsx(xG,{npcName:g.npcName,roll:x}),Yt.jsx(TG,{}),Yt.jsx(EG,{handleClose:s})]})}):null},xG=({npcName:g,roll:t})=>Yt.jsxs("div",{children:[Yt.jsx("h2",{className:"text-lg text-yellow-400 font-bold mb-4",children:"Steal Attempt"}),Yt.jsxs("p",{className:"mb-4",children:["Roll the dice to steal from ",g,". You need a total of 12 or higher to succeed."]}),t!==null&&Yt.jsxs("p",{className:"mb-4",children:["Your roll: ",t]})]}),SG=()=>Yt.jsx(k7,{textures:{side1:"/assets/items/set/dice/dice1.png",side2:"/assets/items/set/dice/dice2.png",side3:"/assets/items/set/dice/dice3.png",side4:"/assets/items/set/dice/dice4.png",side5:"/assets/items/set/dice/dice5.png",side6:"/assets/items/set/dice/dice6.png"},styleClass:"h-96",diceCount:4}),TG=Ce.memo(SG),EG=({handleClose:g})=>Yt.jsx("button",{onClick:g,className:"block w-full py-2 bg-red-500 text-white rounded hover:bg-red-700 mt-2",children:"Close"}),MG=mm.div` + `+pt:""),this.inner=pt||null):typeof ht=="object"&&(this.message="".concat(ht.name," ").concat(ht.message),this.inner=ht):(this.message=tt[K]||et,this.inner=null)}return u(st).from(_),V[K]=st,V},{});q.Syntax=SyntaxError,q.Type=TypeError,q.Range=RangeError;var at=re.reduce(function(V,K){return V[K+"Error"]=q[K],V},{}),ot=hr.reduce(function(V,K){return["Syntax","Type","Range"].indexOf(K)===-1&&(V[K+"Error"]=q[K]),V},{});function rt(){}function gt(V){return V}function yt(V,K){return V==null||V===gt?K:function(et){return K(V(et))}}function Et(V,K){return function(){V.apply(this,arguments),K.apply(this,arguments)}}function At(V,K){return V===rt?K:function(){var et=V.apply(this,arguments);et!==void 0&&(arguments[0]=et);var st=this.onsuccess,ht=this.onerror;this.onsuccess=null,this.onerror=null;var pt=K.apply(this,arguments);return st&&(this.onsuccess=this.onsuccess?Et(st,this.onsuccess):st),ht&&(this.onerror=this.onerror?Et(ht,this.onerror):ht),pt!==void 0?pt:et}}function Pt(V,K){return V===rt?K:function(){V.apply(this,arguments);var et=this.onsuccess,st=this.onerror;this.onsuccess=this.onerror=null,K.apply(this,arguments),et&&(this.onsuccess=this.onsuccess?Et(et,this.onsuccess):et),st&&(this.onerror=this.onerror?Et(st,this.onerror):st)}}function Vt(V,K){return V===rt?K:function(et){var st=V.apply(this,arguments);e(et,st);var ht=this.onsuccess,pt=this.onerror;return this.onsuccess=null,this.onerror=null,et=K.apply(this,arguments),ht&&(this.onsuccess=this.onsuccess?Et(ht,this.onsuccess):ht),pt&&(this.onerror=this.onerror?Et(pt,this.onerror):pt),st===void 0?et===void 0?void 0:et:e(st,et)}}function dt(V,K){return V===rt?K:function(){return K.apply(this,arguments)!==!1&&V.apply(this,arguments)}}function ut(V,K){return V===rt?K:function(){var et=V.apply(this,arguments);if(et&&typeof et.then=="function"){for(var st=this,ht=arguments.length,pt=new Array(ht);ht--;)pt[ht]=arguments[ht];return et.then(function(){return K.apply(st,pt)})}return K.apply(this,arguments)}}ot.ModifyError=U,ot.DexieError=Y,ot.BulkError=H;var Rt=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Dt(V){Rt=V}var Ht={},Bt=100,Vs=typeof Promise>"u"?[]:function(){var V=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[V,r(V),V];var K=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[K,r(K),V]}(),re=Vs[0],hr=Vs[1],Vs=Vs[2],hr=hr&&hr.then,le=re&&re.constructor,ge=!!Vs,xe=function(V,K){je.push([V,K]),te&&(queueMicrotask(Gi),te=!1)},Pe=!0,te=!0,Ge=[],Oe=[],Be=gt,Le={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:rt,pgp:!1,env:{},finalize:rt},ne=Le,je=[],si=0,Mi=[];function he(V){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var K=this._PSD=ne;if(typeof V!="function"){if(V!==Ht)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Ce(this,this._value))}this._state=null,this._value=null,++K.ref,function et(st,ht){try{ht(function(pt){if(st._state===null){if(pt===st)throw new TypeError("A promise cannot be resolved with itself.");var Mt=st._lib&&Ii();pt&&typeof pt.then=="function"?et(st,function(Nt,zt){pt instanceof he?pt._then(Nt,zt):pt.then(Nt,zt)}):(st._state=!0,st._value=pt,we(st)),Mt&&nn()}},Ce.bind(null,st))}catch(pt){Ce(st,pt)}}(this,V)}var Ti={get:function(){var V=ne,K=_r;function et(st,ht){var pt=this,Mt=!V.global&&(V!==ne||K!==_r),Nt=Mt&&!Ss(),zt=new he(function(ct,St){Ve(pt,new bt(ie(st,V,Mt,Nt),ie(ht,V,Mt,Nt),ct,St,V))});return this._consoleTask&&(zt._consoleTask=this._consoleTask),zt}return et.prototype=Ht,et},set:function(V){n(this,"then",V&&V.prototype===Ht?Ti:{get:function(){return V},set:Ti.set})}};function bt(V,K,et,st,ht){this.onFulfilled=typeof V=="function"?V:null,this.onRejected=typeof K=="function"?K:null,this.resolve=et,this.reject=st,this.psd=ht}function Ce(V,K){var et,st;Oe.push(K),V._state===null&&(et=V._lib&&Ii(),K=Be(K),V._state=!1,V._value=K,st=V,Ge.some(function(ht){return ht._value===st._value})||Ge.push(st),we(V),et&&nn())}function we(V){var K=V._listeners;V._listeners=[];for(var et=0,st=K.length;et.",$e="String expected.",ti=[],ni="__dbnames",oi="readonly",$i="readwrite";function un(V,K){return V?K?function(){return V.apply(this,arguments)&&K.apply(this,arguments)}:V:K}var ji={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function yn(V){return typeof V!="string"||/\./.test(V)?function(K){return K}:function(K){return K[V]===void 0&&V in K&&delete(K=O(K))[V],K}}function ei(){throw q.Type()}function Se(V,K){try{var et=Br(V),st=Br(K);if(et!==st)return et==="Array"?1:st==="Array"?-1:et==="binary"?1:st==="binary"?-1:et==="string"?1:st==="string"?-1:et==="Date"?1:st!=="Date"?NaN:-1;switch(et){case"number":case"Date":case"string":return KQt+ae&&Kt(Qt+Ft)})})}var Jt=Ki(et)&&et.limit===1/0&&(typeof V!="function"||V===Fa)&&{index:et.index,range:et.range};return Kt(0).then(function(){if(0=Ft})).length!==0?(St.forEach(function(Kt){Wt.push(function(){var Jt=It,Qt=Kt._cfg.dbschema;Na(vt,Jt,Ut),Na(vt,Qt,Ut),It=vt._dbSchema=Qt;var ae=bn(Jt,Qt);ae.add.forEach(function(me){Oa(Ut,me[0],me[1].primKey,me[1].indexes)}),ae.change.forEach(function(me){if(me.recreate)throw new q.Upgrade("Not yet support for changing primary key");var be=Ut.objectStore(me.name);me.add.forEach(function(_e){return Mn(be,_e)}),me.change.forEach(function(_e){be.deleteIndex(_e.name),Mn(be,_e)}),me.del.forEach(function(_e){return be.deleteIndex(_e)})});var ue=Kt._cfg.contentUpgrade;if(ue&&Kt._cfg.version>Ft){Ko(vt,Ut),Lt._memoizedTables={};var Re=w(Qt);ae.del.forEach(function(me){Re[me]=Jt[me]}),Gr(vt,[vt.Transaction.prototype]),Dl(vt,[vt.Transaction.prototype],s(Re),Re),Lt.schema=Re;var pe,Ae=Q(ue);return Ae&&zs(),ae=he.follow(function(){var me;(pe=ue(Lt))&&Ae&&(me=Ss.bind(null,null),pe.then(me,me))}),pe&&typeof pe.then=="function"?he.resolve(pe):ae.then(function(){return pe})}}),Wt.push(function(Jt){var Qt,ae,ue=Kt._cfg.dbschema;Qt=ue,ae=Jt,[].slice.call(ae.db.objectStoreNames).forEach(function(Re){return Qt[Re]==null&&ae.db.deleteObjectStore(Re)}),Gr(vt,[vt.Transaction.prototype]),Dl(vt,[vt.Transaction.prototype],vt._storeNames,vt._dbSchema),Lt.schema=vt._dbSchema}),Wt.push(function(Jt){vt.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(vt.idbdb.version/10)===Kt._cfg.version?(vt.idbdb.deleteObjectStore("$meta"),delete vt._dbSchema.$meta,vt._storeNames=vt._storeNames.filter(function(Qt){return Qt!=="$meta"})):Jt.objectStore("$meta").put(Kt._cfg.version,"version"))})}),function Kt(){return Wt.length?he.resolve(Wt.shift()(Lt.idbtrans)).then(Kt):he.resolve()}().then(function(){Da(It,Ut)})):he.resolve();var vt,Ft,Lt,Ut,Wt,It}).catch(Mt)):(s(ht).forEach(function(St){Oa(et,St,ht[St].primKey,ht[St].indexes)}),Ko(V,et),void he.follow(function(){return V.on.populate.fire(pt)}).catch(Mt));var zt,ct})}function Ph(V,K){Da(V._dbSchema,K),K.db.version%10!=0||K.objectStoreNames.contains("$meta")||K.db.createObjectStore("$meta").add(Math.ceil(K.db.version/10-1),"version");var et=Ia(0,V.idbdb,K);Na(V,V._dbSchema,K);for(var st=0,ht=bn(et,V._dbSchema).change;stMath.pow(2,62)?0:It.oldVersion,vt=It<1,V.idbdb=Wt.result,pt&&Ph(V,St),xn(V,It/10,St,Lt))},Lt),Wt.onsuccess=pi(function(){St=null;var It,Kt,Jt,Qt,ae,ue=V.idbdb=Wt.result,Re=c(ue.objectStoreNames);if(0"u"?he.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(Ft){function Lt(){return indexedDB.databases().finally(Ft)}zt=setInterval(Lt,100),Lt()}).finally(function(){return clearInterval(zt)}):Promise.resolve()).then(Nt)]).then(function(){return Mt(),K.onReadyBeingFired=[],he.resolve(Xr(function(){return V.on.ready.fire(V.vip)})).then(function Ft(){if(0K.limit?Ft.length=K.limit:V.length===K.limit&&Ft.length=Kt.limit&&(!Kt.values||ue.req.values)&&mo(ue.req.query.range,Kt.query.range)}),!1,Jt,Qt];case"count":return ae=Qt.find(function(ue){return qi(ue.req.query.range,Kt.query.range)}),[ae,!!ae,Jt,Qt]}}(K,et,"query",pt),St=ct[0],vt=ct[1],Ft=ct[2],Lt=ct[3];return St&&vt?St.obsSet=pt.obsSet:(vt=st.query(pt).then(function(Ut){var Wt=Ut.result;if(St&&(St.res=Wt),Mt){for(var It=0,Kt=Wt.length;It{qe.log(`Texture ${s} loaded successfully.`),this.addNPCToScene(t,E,x,T)}),t.load.start()}else throw new Error(`Sprite with ID ${E.spriteImageId} not found`)}}catch(E){E instanceof Error?qe.error(`Failed to load NPC: ${E.message}`):qe.error("Failed to load NPC:",E)}}addNPCToScene(t,i,x,T){try{qe.log(`Adding NPC to scene: ${JSON.stringify(i)}`),qe.log(`Using sprite key: ${i.spriteKey}`);const E=t.add.sprite(0,0,i.spriteKey);E.scale=i.scale||1.5,E.name=i.id||"Error Missing Name",qe.log(`NPC Sprite created with texture key ${i.spriteKey} at position (${i.startPosition.x}, ${i.startPosition.y})`);const s={id:i.id,sprite:E,walkingAnimationMapping:i.walkingAnimationMapping,startPosition:{x:x??i.startPosition.x,y:T??i.startPosition.y},speed:i.speed};if(qe.log(`Grid engine config: ${JSON.stringify(s)}`),!t.textures.exists(i.spriteKey))throw new Error(`Texture with key ${i.spriteKey} does not exist in the scene`);t.gridEngine.addCharacter(s),qe.log(`NPC added to grid engine with ID ${i.id}`),((e,r,p)=>{const h=t.gridEngine.getPosition(e.name);qe.log(`Attaching NPC events to ${r} at position: ${JSON.stringify(h)}`),$A.attachNPCEvent(e,r,p,{coords:h})})(E,i.name,i.actions.map(e=>({label:e}))),qe.log(`NPC ${i.name} added to scene successfully`)}catch(E){E instanceof Error?qe.error(`Error adding NPC to scene from addNPCToScene: ${E.message}`):qe.error("Error adding NPC to scene:",E)}}async addDialogue(t){await this.dialogues.put(t)}async getDialogue(t){return await this.dialogues.get(t)}async getAllDialogues(){return await this.dialogues.toArray()}async getDialoguesForNPC(t){const i=await this.getNPC(t);if(!i)throw new Error(`NPC with ID ${t} not found`);return(await Promise.all((i.dialogues||[]).map(T=>this.getDialogue(T.dialogueId)))).filter(T=>T!==void 0)}async markDialogueAsRead(t,i){const x=await this.getNPC(t);if(!x)throw new Error(`NPC with ID ${t} not found`);const T=x.dialogues?.find(E=>E.dialogueId===i);T&&(T.read=!0,await this.addNPC(x))}async fetchDialogues(t){try{const x=(await gn.get(t)).data.key,T=Object.values(x).map(E=>({...E}));await this.dialogues.bulkPut(T)}catch(i){qe.error(`Failed to fetch dialogues from ${t}:`,i)}}async getPrioritizedDialoguesForNPC(t){try{const i=await this.getNPC(t);if(!i)throw new Error(`NPC with ID ${t} not found`);const T=(await Promise.all((i.dialogues||[]).map(async E=>{const s=await this.getDialogue(E.dialogueId);return s?{...s,priority:E.priority,read:E.read}:null}))).filter(E=>E!==null);return T.sort((E,s)=>s.priority-E.priority),T}catch(i){return qe.error(`Failed to get prioritized dialogues for NPC with ID ${t}:`,i),[]}}async getNPCNameById(t){return(await this.getNPC(t))?.name}async getNPCAvatarById(t){const i=await this.getNPC(t);if(i?.avatarImageId)return(await this.getAvatar(i.avatarImageId))?.avatarData}async getNPCSlugById(t){return(await this.getNPC(t))?.slug}async getNPCHealthById(t){try{return(await this.getNPC(t))?.stats?.health}catch(i){qe.error(`Failed to get health for NPC with ID ${t}:`,i);return}}async getNPCManaById(t){try{return(await this.getNPC(t))?.stats?.mana}catch(i){qe.error(`Failed to get mana for NPC with ID ${t}:`,i);return}}async createNPCSession(t,i){try{const x=this.getNPCNameById(i),T=this.getNPCSlugById(i),E=this.getNPCAvatarById(i),s=this.getNPCHealthById(i),y=this.getNPCManaById(i),[e,r,p,h,a]=await Promise.all([x,T,E,s,y]),l={...t.get(),[`${i}_name`]:e||"Unknown",[`${i}_slug`]:r||"Unknown",[`${i}_avatar`]:p?URL.createObjectURL(p):"Unknown",[`${i}_health`]:h||"100",[`${i}_mana`]:a||"100"};t.set(l)}catch{const T={...t.get(),[`${i}_name`]:"Unknown",[`${i}_slug`]:"Unknown",[`${i}_avatar`]:"Unknown",[`${i}_hp`]:"100",[`${i}_mana`]:"100"};t.set(T)}}}const Zf=new Q7;class _7{constructor(){this.actionHandlers={talk:this.talkToNPC.bind(this),quest:this.questWithNPC.bind(this),trade:this.tradeWithNPC.bind(this),combat:this.startCombat.bind(this),heal:this.healNPC.bind(this),steal:this.stealFromNPC.bind(this),lore:this.loreFromNPC.bind(this)}}getActionHandler(t){return this.actionHandlers[t]}loreFromNPC(t){qe.log(`Pulling up the lore of the NPC with ID: ${t.npcId}`)}questWithNPC(t){qe.log(`Starting quest with NPC with ID: ${t.npcId}`)}healNPC(t){qe.log(`Healing NPC with ID: ${t.npcId}`)}async talkToNPC(t){try{qe.log(`Talking to NPC with ID: ${t.npcId}`);const i=await Zf.getPrioritizedDialoguesForNPC(t.npcId);if(qe.log(i),i.length>0){const x=i[0];Si.emit("npcDialogue",{npcId:t.npcId,dialogue:x},1e3)}else qe.log("No dialogues available for this NPC.")}catch(i){qe.error(`Failed to fetch dialogues for NPC with ID ${t.npcId}:`,i)}}tradeWithNPC(t){qe.log(`Trading with NPC with ID: ${t.npcId}`)}moveToNPC(t){const x=t.data?.coords||{x:10,y:15};Si.emit("playerMove",x)}stealFromNPC(t){qe.log(`Attempting to steal from NPC with ID: ${t.npcId}`);const i={npcId:t.npcId,npcName:t.npcName,data:t.data};Si.emit("playerSteal",i)}startCombat(t){qe.log(`Starting combat with NPC with ID: ${t.npcId}`)}checkFish(t){qe.log(`Checking fish for NPC with ID: ${t.npcId}`)}attachNPCEvent(t,i,x,T){t.setInteractive(),t.on("pointerover",E=>{const s={npcId:t.name||"",npcName:i,actions:x.map(y=>y.label),data:T||{},coords:{x:E.x,y:E.y}};Si.emit("npcInteraction",s)}),t.on("pointerout",()=>{}),t.on("pointerdown",E=>{const s={npcId:t.name||"",npcName:i,actions:x.map(y=>y.label),data:T||{},coords:{x:E.x,y:E.y}};qe.log(`Click Registered at X: ${s.coords.x} Y: ${s.coords.y}`),Si.emit("npcInteractionClick",s,1e3)})}}const $A=new _7;function QA(g){return+g[g.length-1]}function _A(g){return g.startsWith("monster_bird_")&&!g.startsWith("monster_bird_shadow")}function qA(g,t,i,x,T){const E=[];for(let s=0;s<10;s++){const y=g.add.sprite(0,0,"monster_bird");y.setCrop(t,i,x,T),y.scale=3,E.push(y)}return E}function tP(g){return qA(g,0,0,61,47)}function eP(g){return qA(g,22,47,16,10)}function iP(g){g.anims.create({key:"bird",frames:g.anims.generateFrameNumbers("monster_bird",{start:0,end:2}),frameRate:10,repeat:-1,yoyo:!0})}class q7 extends Qm.Scene{mainMenuButtonImage;mainMenuButtonText;constructor(){super("Preloader")}preload(){this.load.image("mainBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.image("scroll","https://kbve.com/assets/img/fishchip/scroll.webp"),this.load.audio("music","https://kbve.com/assets/img/fishchip/bg.ogg"),this.load.image("creditsBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.audio("type","https://kbve.com/assets/img/fishchip/type.mp3"),this.load.spritesheet("fishing","https://kbve.com/assets/img/fishchip/animate.png",{frameWidth:800,frameHeight:600}),this.load.image("fish","https://kbve.com/assets/img/letter_logo.png"),this.load.image("background","https://kbve.com/assets/img/fishchip/scaled_fish_menu_minigame.webp"),this.load.image("tiles","https://kbve.com/assets/img/fishchip/desert_tileset_1.png"),this.load.image("cloud-city-tiles","/assets/map/cloud_tileset.png"),this.load.tilemapTiledJSON("cloud-city-map-large","/assets/map/cloud_city_large.json"),this.load.tilemapTiledJSON("cloud-city-map","https://kbve.com/assets/img/fishchip/cloud_city.json"),this.load.spritesheet("player","https://kbve.com/assets/img/fishchip/chip_charactersheet_warmer.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("knights","/assets/entity/knights.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("jacko","/assets/entity/jacko.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("monks","/assets/entity/monks.png",{frameWidth:52,frameHeight:72}),RI()}async create(){await Zf.initializeDatabase(),this.sound.get("music")?.isPlaying||this.sound.add("music",{loop:!0,volume:.1}).play(),this.add.image(480,480,"mainBg").setScale(.1),this.mainMenuButtonImage=this.add.image(480,480,"scroll").setAlpha(.9).setScale(.7,.2).setInteractive({useHandCursor:!0}),this.mainMenuButtonText=this.add.text(480,480,"Start Game",{fontFamily:"Arial Black",fontSize:50,color:"#ffffff",stroke:"#000000",strokeThickness:6}).setOrigin(.5).setInteractive({useHandCursor:!0}),this.mainMenuButtonText.on("pointerdown",()=>{this.scene.start("SandCity")},this)}}let DG=class extends Uf.GameObjects.Sprite{textBubble;tooltip};class tG extends Qm.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"SandCity"});const t={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new vu(t)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57}),Si.emit("notification",{title:"Success",message:`You arrived safely to SandCity Passport: ${o1()}`,notificationType:Ru.success})}async create(){const t=this.make.tilemap({key:"cloud-city-map"});t.addTilesetImage("Cloud City","tiles");for(let T=0;T({id:"monster_bird_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1})),...this.monsterBirdShadows.map((T,E)=>({id:"monster_bird_shadow_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(t,x),this.loadRanges(),this.playerController=new KA(this,this.gridEngine,this.quadtree),K7(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!",3e3),await Zf.loadCharacter(this,"01J2DT4G871KJ0VNSHCNC5REDM",6,6),await Zf.loadCharacter(this,"01J2HCTMQ58JBMJGW9YA3FBQCG",8,8),await Zf.loadCharacter(this,"01J2HQJBMBGEEMWDBDWATRCY3T",8,15),this.gridEngine.moveRandomly("npc",1500,3),this.gridEngine.moveRandomly("fishNpc",1500,3);for(let T=0;T<10;T++)this.gridEngine.moveRandomly("monster_bird_"+T,1e3,10);this.gridEngine.positionChangeStarted().subscribe(({charId:T,exitTile:E,enterTile:s})=>{_A(T)&&this.gridEngine.moveTo("monster_bird_shadow_"+QA(T),{x:s.x,y:s.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const t=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const i={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};Si.emit("charEvent",i)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:()=>{const i={message:"Sign does not have much to say.",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};Si.emit("charEvent",i)}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const i={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};Si.emit("charEvent",i)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const i={message:"Samson the Great was an amazing sailer, died drinking dat drank.",character_name:"Samson Statue",character_image:"/assets/npc/samson.png",background_image:"/assets/background/animetombstone.webp"};Si.emit("charEvent",i)}}];for(const i of t)this.quadtree.insert(i)}update(){this.playerController?.handleMovement()}}class NG extends Uf.GameObjects.Sprite{textBubble}class eG extends Qm.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"CloudCity"});const t={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new vu(t)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57})}create(){const t=this.make.tilemap({key:"cloud-city-map-large"});t.addTilesetImage("cloud_tileset","cloud-city-tiles");for(let T=0;T({id:"monster_bird_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1})),...this.monsterBirdShadows.map((T,E)=>({id:"monster_bird_shadow_"+E,sprite:T,startPosition:{x:7,y:7+E},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(t,x),this.loadRanges(),this.playerController=new KA(this,this.gridEngine,this.quadtree),Z7(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!"),this.gridEngine.moveRandomly("npc",1500,3);for(let T=0;T<10;T++)this.gridEngine.moveRandomly("monster_bird_"+T,1e3,20);this.gridEngine.positionChangeStarted().subscribe(({charId:T,exitTile:E,enterTile:s})=>{_A(T)&&this.gridEngine.moveTo("monster_bird_shadow_"+QA(T),{x:s.x,y:s.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const t=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const i={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};Si.emit("charEvent",i,1e3)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:async()=>{try{const T={message:`The Database Response time: ${(await(await fetch("https://api.cryptothrone.com/api/v1/speed")).json()).message.time_ms} ms`,character_name:"Planets Be Scalin",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};Si.emit("charEvent",T,1e3)}catch(i){console.error("Error fetching data:",i);const x={message:"Sign does not have much to say. Failed to fetch response time.",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};Si.emit("charEvent",x,1e3)}}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const i={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};Si.emit("charEvent",i,1e3)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const i={message:"Samson the Great was an amazing sailer, died drinking dat drank.",character_name:"Samson Statue",character_image:"/assets/npc/samson.png",background_image:"/assets/background/animetombstone.webp"};Si.emit("charEvent",i,1e3)}}];for(const i of t)this.quadtree.insert(i)}update(){this.playerController?.handleMovement(),this.npcSprite&&this.npcSprite.textBubble&&Ox(this.npcSprite),this.fishNpcSprite&&this.fishNpcSprite.textBubble&&Ox(this.fishNpcSprite)}}const iG=mm.div` + width: 100vw; + height: 100vh; +`;function nG(){const g=Me.useRef(null);return Me.useEffect(()=>{let t=null;if(g.current){const i=g.current,x={title:"CryptoThrone",render:{antialias:!1},scale:{mode:Uf.Scale.FIT,autoCenter:Uf.Scale.CENTER_BOTH,zoom:1},type:Uf.AUTO,transparent:!0,width:window.innerWidth,height:window.innerHeight,physics:{default:"arcade",arcade:{gravity:{x:0,y:0},debug:!1}},plugins:{scene:[{key:"gridEngine",plugin:$O,mapping:"gridEngine"}]},scene:[q7,tG,eG],input:{mouse:{preventDefaultWheel:!1},touch:{capture:!0}},parent:i};t=new Uf.Game(x);const T=()=>{t&&t.scale.resize(window.innerWidth,window.innerHeight)};return window.addEventListener("resize",T),()=>{window.removeEventListener("resize",T),t&&t.destroy(!0)}}},[]),Yt.jsx(iG,{children:Yt.jsx("div",{className:"w-full h-full",ref:g})})}const wM=jd({message:""}),rG=()=>{const g=io(wM);Me.useEffect(()=>{const i=x=>{if(x){wM.set(x);const T=document.querySelector("#hs-stacked-overlays");T&&(T.classList.remove("hidden"),T.classList.add("open"))}};return Si.on("charEvent",i),()=>{Si.off("charEvent",i)}},[]);const t=()=>{const i=document.querySelector("#hs-stacked-overlays");i&&(i.classList.add("hidden"),i.classList.remove("open"))};return Yt.jsx(Yt.Fragment,{children:Yt.jsx("div",{id:"hs-stacked-overlays",className:"hs-overlay hs-overlay-backdrop-open:bg-gray-900/50 hidden size-full fixed top-0 start-0 z-[60] overflow-x-hidden overflow-y-auto pointer-events-none [--overlay-backdrop:static]","data-hs-overlay-keyboard":"false",children:Yt.jsx("div",{className:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto",children:Yt.jsxs("div",{className:"flex flex-col lg:flex-row bg-zinc-950 border border-yellow-500 shadow-sm rounded-xl pointer-events-auto bg-cover",style:{backgroundImage:`url(${g.background_image||"https://kbve.com/assets/img/curved-images/wave.jpg"})`},children:[Yt.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4",children:`${g.character_name||"NPC"}`}),Yt.jsx("img",{src:g.character_image||"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md"})]}),Yt.jsxs("div",{className:"w-full lg:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[Yt.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400",children:""}),Yt.jsxs("button",{type:"button",className:"flex justify-center items-center size-7 text-sm font-semibold rounded-full border border-transparent text-yellow-400 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:t,children:[Yt.jsx("span",{className:"sr-only",children:"Close"}),Yt.jsxs("svg",{className:"flex-shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[Yt.jsx("path",{d:"M18 6 6 18"}),Yt.jsx("path",{d:"m6 6 12 12"})]})]})]}),Yt.jsx("div",{className:"p-4 overflow-y-auto",children:Yt.jsx("p",{className:"mt-1 mb-2 text-yellow-400 bg-zinc-950/80 rounded-xl p-4",children:g.message||"No Message"})}),Yt.jsx("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:Yt.jsxs("button",{className:"relative rounded px-5 py-2.5 overflow-hidden group bg-yellow-500 relative hover:bg-gradient-to-r hover:from-yellow-500 hover:to-yellow-400 text-white hover:ring-2 hover:ring-offset-2 hover:ring-yellow-400 transition-all ease-out duration-300 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:t,children:[Yt.jsx("span",{className:"absolute right-0 w-8 h-32 -mt-12 transition-all duration-1000 transform translate-x-12 bg-white opacity-10 rotate-12 group-hover:-translate-x-40 ease"}),Yt.jsx("span",{className:"relative",children:"Okay."})]})})]})]})})})})},AM=({settingKey:g,label:t,collapseIcon:i=_I,expandIcon:x=qI})=>{const T=gl(g),E=()=>uh(g,!T);return Yt.jsxs("button",{onClick:E,className:"bg-yellow-500 text-white text-sm p-2 rounded ml-2 flex items-center w-20 h-10",children:[T?Yt.jsx(x,{className:"w-2"}):Yt.jsx(i,{className:"w-4"}),Yt.jsx("span",{className:"ml-2 text-xs",children:t})]})},sG=({stats:g})=>{const t=(i,x)=>{const T=typeof i=="string"?parseInt(i,10):i,E=typeof x=="string"?parseInt(x,10):x;return Math.min(T/E*100,100)};return Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Stats"}),Yt.jsxs("div",{className:"mb-2",children:[Yt.jsx("p",{className:"text-sm text-green-400",children:`HP: ${g.health||"0"} / ${g.maxHealth}`}),Yt.jsx("div",{className:"w-full bg-gray-300 h-4 rounded",children:Yt.jsx("div",{className:"bg-green-400 h-full rounded",style:{width:`${t(g.health,g.maxHealth)}%`}})})]}),Yt.jsxs("div",{className:"mb-2",children:[Yt.jsx("p",{className:"text-sm text-blue-400",children:`MP: ${g.mana||"0"} / ${g.maxMana}`}),Yt.jsx("div",{className:"w-full bg-gray-300 h-4 rounded",children:Yt.jsx("div",{className:"bg-blue-400 h-full rounded",style:{width:`${t(g.mana,g.maxMana)}%`}})})]}),Yt.jsxs("div",{className:"mb-2",children:[Yt.jsx("p",{className:"text-sm text-yellow-400",children:`EP: ${g.energy||"0"} / ${g.maxEnergy}`}),Yt.jsx("div",{className:"w-full bg-gray-300 h-4 rounded",children:Yt.jsx("div",{className:"bg-yellow-400 h-full rounded",style:{width:`${t(g.energy,g.maxEnergy)}%`}})})]})]})},aG=({settingKey:g,label:t})=>{const i=gl(g),x=()=>{uh(g,!i)};return Yt.jsxs("label",{className:"flex items-center cursor-pointer",children:[Yt.jsx("span",{className:"mr-2 text-sm",children:t}),Yt.jsxs("div",{className:"relative",children:[Yt.jsx("input",{type:"checkbox",className:"sr-only",checked:i,onChange:x}),Yt.jsx("div",{className:"w-10 h-4 bg-gray-400 rounded-full shadow-inner"}),Yt.jsx("div",{className:`absolute w-6 h-6 bg-white opacity-75 rounded-full shadow -left-1 -top-1 transition-transform ${i?"transform translate-x-full bg-yellow-500 !opacity-100":""}`})]})]})},oG=(g,t)=>{const i=Tl(g);return i?Yt.jsxs("div",{style:{top:t.y,left:t.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[Yt.jsx("p",{className:"text-sm font-semibold",children:i.name}),Yt.jsxs("p",{className:"text-xs",children:["Type: ",i.type]}),Yt.jsxs("p",{className:"text-xs",children:["Bonuses: ",JSON.stringify(i.bonuses)]}),Yt.jsxs("p",{className:"text-xs",children:["Durability: ",i.durability]}),Yt.jsxs("p",{className:"text-xs",children:["Weight: ",i.weight]})]}):null},lG=(g,t,i,x)=>Yt.jsx("ul",{className:"grid grid-cols-8 gap-2",children:Object.keys(g).map(T=>{const E=g[T];return hG(E,t,i,x)})}),hG=(g,t,i,x)=>{if(!g)return Yt.jsx("li",{className:"text-sm relative flex items-center justify-center border border-gray-500 bg-gray-200",style:{width:"32px",height:"32px"}},`empty-${Math.random()}`);const T=Tl(g);return T?Yt.jsxs("li",{className:"text-sm relative",onMouseEnter:E=>t(T.id,E),onMouseLeave:i,onClick:E=>x(T.id,E),children:[T.name," (",T.type,") - Bonuses: ",JSON.stringify(T.bonuses)," - Durability: ",T.durability," - Weight: ",T.weight]},T.id):null},uG=(g,t,i,x)=>Yt.jsx("ul",{className:"grid grid-cols-8 gap-1",children:g.map((T,E)=>{const s=Tl(T);return s?Yt.jsx("li",{className:"text-sm relative hover:scale-[1.3] transition ease-in-out duration-100",onMouseEnter:y=>t(s.id,y),onMouseLeave:i,onClick:y=>x(s.id,y),children:Yt.jsx("img",{src:s.img,alt:s.name,style:{width:"32px",height:"32px"},className:"inline-block border border-yellow-400/50"})},E):null})}),fG=()=>Yt.jsx("div",{className:"transition transform duration-1000 ease-in-out",children:Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Settings"}),Yt.jsx("p",{className:"text-sm",children:"Additional settings can go here."}),Yt.jsx(aG,{settingKey:"debugMode",label:"Debug Mode"})]})}),cG=()=>{const g=io(Tn);io(Sm),io(PI),io(Jr),Me.useEffect(()=>{const r=p=>{};return Si.on("playerEvent",r),()=>{Si.off("playerEvent",r)}},[]);const t=(r,p)=>{uh("tooltipItem",{id:r,position:{x:p.clientX+10,y:p.clientY-150}})},i=()=>{uh("tooltipItem",{...gl("tooltipItem"),id:null})},x=(r,p)=>{uh("submenuItem",{id:r,position:{x:p.clientX,y:p.clientY-150}})},T=()=>{uh("submenuItem",{...gl("submenuItem"),id:null})},E=(r,p)=>{const h=Tl(r);if(h){const a={itemId:h.id,action:p};Si.emit("itemAction",a),T()}};if(!g||!g.stats)return null;const s=gl("submenuItem"),y=s.id?WI(s.id):[],e=gl("tooltipItem");return Yt.jsxs("div",{className:"fixed top-24 left-3 w-[350px] p-4 bg-zinc-800 text-yellow-400 border border-yellow-300 rounded-lg z-20 transition transform ease-in-out duration-500 opacity-50 hover:opacity-100",children:[Yt.jsxs("div",{className:"flex flex-row space-y-2 align-top",children:[Yt.jsx(AM,{settingKey:"isStatsMenuCollapsed",label:"Stats"}),Yt.jsx(AM,{settingKey:"isSettingsMenuCollapsed",label:"Settings"})]}),Yt.jsx("div",{className:`transition transform duration-1000 ease-in-out ${gl("isSettingsMenuCollapsed")?"max-h-0 overflow-hidden":"max-h-screen"}`,children:Yt.jsx(fG,{})}),Yt.jsxs("div",{className:`transition transform duration-1000 ease-in-out ${gl("isStatsMenuCollapsed")?"max-h-0 overflow-hidden":"max-h-screen"}`,children:[Yt.jsx(sG,{stats:g.stats}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"User Information"}),Yt.jsx("p",{className:"text-sm",children:g.stats.username||"Guest"})]}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"General Information"}),Yt.jsx("p",{className:"text-sm",children:""})]}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Inventory"}),uG(g.inventory.backpack,t,i,x)]}),Yt.jsxs("div",{className:"mb-4",children:[Yt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Equipment"}),lG(g.inventory.equipment,t,i,x)]}),e.id&&oG(e.id,e.position),s.id&&Yt.jsxs("div",{style:{top:s.position.y,left:s.position.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[Yt.jsx("button",{onClick:T,className:"absolute top-1 right-1 translate-x-6 bg-yellow-400 p-1 text-white hover:text-gray-400",children:"X"}),Yt.jsx("p",{className:"text-sm strong",children:"Actions:"}),Yt.jsxs("ul",{className:"text-xs",children:[y.map(r=>Yt.jsx("li",{onClick:()=>s.id&&E(s.id,r),className:"cursor-pointer hover:bg-gray-600",children:r.charAt(0).toUpperCase()+r.slice(1)},r)),Yt.jsx("li",{onClick:T,className:"cursor-pointer hover:bg-gray-600",children:"Close"})]})]})]})]})},gy=jd(null),yy=jd(null),dG=()=>{const g=io(gy),[t,i]=Me.useState({x:0,y:0}),x=Me.useRef(null);Me.useEffect(()=>{const e=r=>{r&&(gy.set(r),setTimeout(()=>{i(T(r.coords.x,r.coords.y))},0))};return Si.on("npcInteractionClick",e),()=>{Si.off("npcInteractionClick",e)}},[]);const T=(e,r)=>{const h=x.current;if(!h)return{x:e,y:r};const a=h.getBoundingClientRect();let l=e,n=r;return l+a.width>window.innerWidth-10&&(l=window.innerWidth-a.width-10),n+a.height>window.innerHeight-10&&(n=window.innerHeight-a.height-10),l<10&&(l=10),n<10&&(n=10),{x:l,y:n}},E=e=>{if(g){const r=$A.getActionHandler(e);r&&(r(g),s())}},s=()=>{gy.set(null)},y=()=>{if(!g)return null;const{npcName:e,actions:r,npcId:p}=g,{x:h,y:a}=t;return Yt.jsxs("div",{ref:x,className:"absolute bg-zinc-900 border border-yellow-300 rounded-md p-2 z-[100]",style:{left:`${h}px`,top:`${a}px`},children:[Yt.jsxs("div",{className:"flex justify-between items-center mb-2",children:[Yt.jsx("h3",{className:"font-bold text-sm text-white",children:e}),Yt.jsx("button",{onClick:s,className:"text-xs font-bold m-1 text-yellow-300 border rounded-full pl-1 pr-1 hover:text-yellow-500 hover:scale-110",children:"X"})]}),r.map((l,n)=>Yt.jsx("button",{onClick:()=>E(l),className:"block w-full text-sm py-1 px-2 mb-1 bg-yellow-500 hover:bg-yellow-400 rounded capitalize",children:l},n)),Yt.jsx("button",{onClick:s,className:"block w-full text-xs py-1 px-2 mt-2 bg-red-500 hover:bg-red-600 rounded text-white",children:"Close"})]},p)};return Yt.jsx("div",{children:y()})},xy=jd(null),Sy=jd({}),pG=Ou.memo(({text:g,onComplete:t})=>Yt.jsx(jA,{text:g,onComplete:t})),vG=Ou.memo(({text:g,onComplete:t})=>Yt.jsx(jA,{text:g,onComplete:t})),mG=()=>{const g=io(xy),t=io(Sy),[i,x]=Me.useState(!1),[T,E]=Me.useState(!1);Me.useEffect(()=>{const y=e=>{if(e){xy.set(e);const r=document.querySelector("#hs-stacked-overlays-dialogue");r&&(r.classList.remove("hidden"),r.classList.add("open")),e.npcId&&(Zf.createNPCSession(Sy,e.npcId),x(!1),E(!1))}};return Si.on("npcDialogue",y),()=>{Si.off("npcDialogue",y)}},[]);const s=()=>{const y=document.querySelector("#hs-stacked-overlays-dialogue");y&&(y.classList.add("hidden"),y.classList.remove("open")),xy.set(null),Sy.set({}),x(!1),E(!1)};return Yt.jsx(Yt.Fragment,{children:Yt.jsx("div",{id:"hs-stacked-overlays-dialogue",className:"hs-overlay hs-overlay-backdrop-open:bg-gray-900/50 w-full h-full fixed top-0 start-0 z-[60] overflow-x-hidden overflow-y-auto pointer-events-none [--overlay-backdrop:static]","data-hs-overlay-keyboard":"false",children:Yt.jsx("div",{className:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all w-full h-full sm:max-w-lg sm:w-full m-3 sm:mx-auto md:min-w-fit",children:Yt.jsx("div",{className:"flex flex-col lg:flex-row bg-zinc-950 border border-yellow-500 shadow-sm rounded-xl pointer-events-auto bg-cover min-w-[800px] min-h-[500px]",style:{backgroundImage:`url(${g?.dialogue.backgroundImage||"https://kbve.com/assets/img/curved-images/wave.jpg"})`},children:g?Yt.jsxs(Yt.Fragment,{children:[Yt.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center relative",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4 p-4 absolute top-2 left-2",children:g.npcId&&t[`${g.npcId}_name`]?t[`${g.npcId}_name`]:"Unknown"}),Yt.jsx("img",{src:g.npcId&&t[`${g.npcId}_avatar`]?t[`${g.npcId}_avatar`]:"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md absolute bottom-0 left-0"})]}),Yt.jsxs("div",{className:"w-full md:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[Yt.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[Yt.jsx("h3",{className:"font-bold text-yellow-400 text-shadow-outline-white",children:g.dialogue.title||"Dialogue"}),Yt.jsxs("button",{type:"button",className:"flex justify-center items-center size-7 text-sm font-semibold rounded-full border border-transparent text-yellow-400 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays-dialogue",onClick:s,children:[Yt.jsx("span",{className:"sr-only",children:"Close"}),Yt.jsxs("svg",{className:"flex-shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[Yt.jsx("path",{d:"M18 6 6 18"}),Yt.jsx("path",{d:"m6 6 12 12"})]})]})]}),Yt.jsx("div",{className:"p-4 overflow-y-auto",children:Yt.jsxs("div",{className:"flex flex-col",children:[Yt.jsx("div",{className:"mt-1 mb-2 text-white bg-zinc-950/40 text-shadow-outline-white rounded-xl p-4 flex w-3/4",children:Yt.jsxs("div",{className:"w-full",children:[g.dialogue.message&&!i&&Yt.jsx(pG,{text:g.dialogue.message,onComplete:()=>x(!0)}),i&&Yt.jsx("div",{children:g.dialogue.message})]})}),Yt.jsx("div",{className:"flex justify-end",children:Yt.jsxs("div",{className:"w-3/4 mt-1 mb-2 text-yellow-400 text-shadow-outline-whites bg-zinc-950/40 rounded-xl p-4 text-right",children:[g.dialogue.playerResponse&&i&&!T&&Yt.jsx(vG,{text:`${g.dialogue.playerResponse}`,onComplete:()=>E(!0)}),T&&Yt.jsx("div",{children:g.dialogue.playerResponse})]})})]})}),Yt.jsx("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:Yt.jsxs("button",{className:"relative rounded px-5 py-2.5 overflow-hidden group bg-yellow-500 relative hover:bg-gradient-to-r hover:from-yellow-500 hover:to-yellow-400 text-white hover:ring-2 hover:ring-offset-2 hover:ring-yellow-400 transition-all ease-out duration-300 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays-dialogue",onClick:s,disabled:!T,children:[Yt.jsx("span",{className:"absolute right-0 w-8 h-32 -mt-12 transition-all duration-1000 transform translate-x-12 bg-white opacity-10 rotate-12 group-hover:-translate-x-40 ease"}),Yt.jsx("span",{className:`relative ${T?"":"text-gray-500"}`,children:"Okay."})]})})]})]}):Yt.jsx("div",{className:"w-full p-4 rounded-xl flex flex-col items-center justify-center",children:Yt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4 p-4",children:"Loading..."})})})})})})},gG=()=>{const g=io(Qh);Me.useEffect(()=>{const i=x=>{if(x){const T=Date.now()+Math.random(),E={id:T,...x};Qh.set([...Qh.get(),E]),setTimeout(()=>{Qh.set(Qh.get().filter(s=>s.id!==T))},5e3)}};return Si.on("notification",i),()=>{Si.off("notification",i)}},[]);const t=i=>{Qh.set(Qh.get().filter(x=>x.id!==i))};return Yt.jsx("div",{className:"fixed inset-x-0 bottom-0 z-50 m-4 space-y-2",children:Array.isArray(g)&&g.map(i=>Yt.jsx("div",{className:`hs-removing:translate-x-5 hs-removing:opacity-0 transition duration-300 max-w-xs border rounded-xl shadow-lg ${i.notificationType.color}`,role:"alert",children:Yt.jsxs("div",{className:"flex p-4",children:[Yt.jsx("img",{src:i.notificationType.imgUrl,alt:i.notificationType.type,className:"flex-shrink-0 size-4"}),Yt.jsxs("div",{className:"ms-2",children:[Yt.jsx("h3",{className:"text-sm font-bold",children:i.title}),Yt.jsx("p",{className:"text-sm",children:i.message})]}),Yt.jsx("div",{className:"ms-auto",children:Yt.jsxs("button",{type:"button",className:"inline-flex flex-shrink-0 justify-center items-center size-5 rounded-lg text-gray-800 opacity-50 hover:opacity-100 focus:outline-none focus:opacity-100 dark:text-white",onClick:()=>t(i.id),children:[Yt.jsx("span",{className:"sr-only",children:"Close"}),Yt.jsxs("svg",{className:"flex-shrink-0 size-4 bg-zinc-900",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[Yt.jsx("path",{d:"M18 6 6 18"}),Yt.jsx("path",{d:"m6 6 12 12"})]})]})})]})},i.id))})},yG=()=>{const g=io(yy),[t,i]=Me.useState([]),[x,T]=Me.useState(null);Me.useEffect(()=>{const y=r=>{r&&yy.set(r)},e=r=>{r&&i(r.diceValues)};return Si.on("playerSteal",y),Si.on("diceRollResult",e),()=>{Si.off("playerSteal",y),Si.off("diceRollResult",e)}},[]),Me.useEffect(()=>{t.length>0&&E(t)},[t]);const E=y=>{const e=y.reduce((a,l)=>a+l,0);if(T(e),!g)return;let r="",p="";switch(!0){case e>=24:r="01J27QABD2GPFNRVK69S51HSGB",p=`You successfully stole a ${r}!`;break;case e>=20:r="01J27QN2KZG1RDZW4CE9Q9Z3YQ",p=`You successfully stole a ${r}!`;break;case e>=18:r="01J269PK47V1DWX2S1251DEASD",p=`You successfully stole a ${r}!`;break;case e>=15:r="Blue Shark",p=`You successfully stole a ${r}!`;break;case e>=12:r="Salmon",p=`You successfully stole a ${r}!`;break;case e<=4:Si.emit("notification",{title:"Danger",message:`You crit failed to steal from ${g.npcName}!`,notificationType:Ru.danger}),Si.emit("playerDamage",{damage:"5"});break;default:Si.emit("notification",{title:"Danger",message:`You failed to steal from ${g.npcName}!`,notificationType:Ru.danger}),Si.emit("playerDamage",{damage:"1"});return}const h=bI(r);h?Si.emit("playerReward",{message:p,item:h}):console.warn("Item not found in ItemDB")},s=()=>{dw([]),i([]),T(null),yy.set(null)};return g?Yt.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 bg-zinc-800 bg-opacity-50",children:Yt.jsxs("div",{className:"bg-zinc-800 p-4 rounded-lg shadow-lg w-3/4",children:[Yt.jsx(xG,{npcName:g.npcName,roll:x}),Yt.jsx(TG,{}),Yt.jsx(EG,{handleClose:s})]})}):null},xG=({npcName:g,roll:t})=>Yt.jsxs("div",{children:[Yt.jsx("h2",{className:"text-lg text-yellow-400 font-bold mb-4",children:"Steal Attempt"}),Yt.jsxs("p",{className:"mb-4",children:["Roll the dice to steal from ",g,". You need a total of 12 or higher to succeed."]}),t!==null&&Yt.jsxs("p",{className:"mb-4",children:["Your roll: ",t]})]}),SG=()=>Yt.jsx(k7,{textures:{side1:"/assets/items/set/dice/dice1.png",side2:"/assets/items/set/dice/dice2.png",side3:"/assets/items/set/dice/dice3.png",side4:"/assets/items/set/dice/dice4.png",side5:"/assets/items/set/dice/dice5.png",side6:"/assets/items/set/dice/dice6.png"},styleClass:"h-96",diceCount:4}),TG=Me.memo(SG),EG=({handleClose:g})=>Yt.jsx("button",{onClick:g,className:"block w-full py-2 bg-red-500 text-white rounded hover:bg-red-700 mt-2",children:"Close"}),MG=mm.div` // Your style here `;function BG(){return Yt.jsxs(MG,{children:[Yt.jsx(cG,{}),Yt.jsx("div",{className:"flex justify-center items-center h-screen",children:Yt.jsxs("div",{className:"border-4 border-yellow-500 rounded-xl",children:[Yt.jsx(mG,{}),Yt.jsx(yG,{}),Yt.jsx(nG,{}),Yt.jsx(gG,{})]})}),Yt.jsx(dG,{}),Yt.jsx(rG,{})]})}export{BG as default}; diff --git a/docs/_astro/index.C407iWx6.css b/docs/_astro/index.C407iWx6.css deleted file mode 100644 index 9cc623b..0000000 --- a/docs/_astro/index.C407iWx6.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-6{inset:1.5rem}.inset-x-0{left:0;right:0}.-bottom-20{bottom:-5rem}.-left-1{left:-.25rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-full{bottom:100%}.end-full{inset-inline-end:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.right-0{right:0}.right-1{right:.25rem}.start-0{inset-inline-start:0px}.start-1\/2{inset-inline-start:50%}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-24{top:6rem}.top-4{top:1rem}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[60\]{z-index:60}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-3{margin:.75rem}.m-4{margin:1rem}.\!mx-\[10px\]{margin-left:10px!important;margin-right:10px!important}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mt-12{margin-top:-3rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.ms-2{margin-inline-start:.5rem}.ms-5{margin-inline-start:1.25rem}.ms-auto{margin-inline-start:auto}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-video{aspect-ratio:16 / 9}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-7{width:1.75rem;height:1.75rem}.size-8{width:2rem;height:2rem}.size-full{width:100%;height:100%}.h-10{height:2.5rem}.h-12{height:3rem}.h-20{height:5rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-96{height:24rem}.h-\[32px\]{height:32px}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.max-h-0{max-height:0px}.max-h-screen{max-height:100vh}.min-h-\[500px\]{min-height:500px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[1900px\]{width:1900px}.w-\[350px\]{width:350px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-full{width:100%}.min-w-\[800px\]{min-width:800px}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-\[85rem\]{max-width:85rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-8{--tw-translate-x: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-10{--tw-translate-x: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-12{--tw-translate-x: 3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-10{--tw-translate-y: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-8{--tw-translate-y: 2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-12{--tw-rotate: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-12{--tw-rotate: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-3\.5{-moz-column-gap:.875rem;column-gap:.875rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[36px\]{border-radius:36px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.border{border-width:1px}.border-4{border-width:4px}.border-\[3px\]{border-width:3px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-current{border-color:currentColor}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity))}.border-yellow-400\/50{border-color:#facc1580}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.border-yellow-700{--tw-border-opacity: 1;border-color:rgb(161 98 7 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.bg-\[var\(--sl-color-black\)\]{background-color:var(--sl-color-black)}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-cyan-500{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity))}.bg-cyan-600{--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.bg-cyan-700{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity))}.bg-neutral-200{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.bg-orange-200{--tw-bg-opacity: 1;background-color:rgb(254 215 170 / var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity))}.bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.bg-zinc-800{--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity))}.bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.bg-zinc-950{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity))}.bg-zinc-950\/40{background-color:#09090b66}.bg-zinc-950\/80{background-color:#09090bcc}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-neutral-400{--tw-gradient-from: #a3a3a3 var(--tw-gradient-from-position);--tw-gradient-to: rgb(163 163 163 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-neutral-100{--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.to-neutral-200{--tw-gradient-to: #e5e5e5 var(--tw-gradient-to-position)}.bg-cover{background-size:cover}.bg-center{background-position:center}.stroke-yellow-700\/50{stroke:#a1620780}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-3{padding-bottom:.75rem}.pl-5{padding-left:1.25rem}.ps-5{padding-inline-start:1.25rem}.ps-px{padding-inline-start:1px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-cyan-600{--tw-text-opacity: 1;color:rgb(8 145 178 / var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity))}.\!opacity-100{opacity:1!important}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/10{--tw-shadow-color: rgb(0 0 0 / .1);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\,margin\]{transition-property:opacity,margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-\[0\.1ms\]{transition-duration:.1ms}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.text-shadow-outline-white{text-shadow:0 0 0 black,-1px -1px 0 black,1px -1px 0 black,-1px 1px 0 black,1px 1px 0 black}.\[--adaptive\:none\]{--adaptive: none}.\[--overlay-backdrop\:static\]{--overlay-backdrop: static}.\[--strategy\:static\]{--strategy: static}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-end-5:before{content:var(--tw-content);inset-inline-end:-1.25rem}.before\:-top-5:before{content:var(--tw-content);top:-1.25rem}.before\:start-0:before{content:var(--tw-content);inset-inline-start:0px}.before\:top-0:before{content:var(--tw-content);top:0}.before\:h-5:before{content:var(--tw-content);height:1.25rem}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-5:before{content:var(--tw-content);width:1.25rem}.before\:w-full:before{content:var(--tw-content);width:100%}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-0:after{content:var(--tw-content);inset:0}.after\:inset-2:after{content:var(--tw-content);inset:.5rem}.after\:inset-2\.5:after{content:var(--tw-content);inset:.625rem}.after\:transform-gpu:after{content:var(--tw-content);transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:rounded-xl:after{content:var(--tw-content);border-radius:.75rem}.after\:bg-cyan-600:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.after\:bg-gradient-to-b:after{content:var(--tw-content);background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.after\:from-neutral-100:after{content:var(--tw-content);--tw-gradient-from: #f5f5f5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 245 245 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.after\:to-neutral-50:after{content:var(--tw-content);--tw-gradient-to: #fafafa var(--tw-gradient-to-position)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:mix-blend-color:after{content:var(--tw-content);mix-blend-mode:color}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.3\]:hover{--tw-scale-x: 1.3;--tw-scale-y: 1.3;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:bg-cyan-700:hover{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.hover\:bg-yellow-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 224 71 / var(--tw-bg-opacity))}.hover\:bg-yellow-400:hover{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-r:hover{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.hover\:from-cyan-500:hover{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-yellow-500:hover{--tw-gradient-from: #eab308 var(--tw-gradient-from-position);--tw-gradient-to: rgb(234 179 8 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400:hover{--tw-gradient-to: #22d3ee var(--tw-gradient-to-position)}.hover\:to-yellow-400:hover{--tw-gradient-to: #facc15 var(--tw-gradient-to-position)}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-gray-400:hover{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\:text-yellow-500:hover{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.hover\:text-zinc-950:hover{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity))}.hover\:opacity-100:hover{opacity:1}.hover\:ring-2:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:ring-cyan-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(34 211 238 / var(--tw-ring-opacity))}.hover\:ring-yellow-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 204 21 / var(--tw-ring-opacity))}.hover\:ring-offset-2:hover{--tw-ring-offset-width: 2px}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:-translate-x-40{--tw-translate-x: -10rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-96{--tw-translate-x: -24rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.group:hover .group-hover\:bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:to-cyan-100{--tw-gradient-to: #cffafe var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.peer:checked~.peer-checked\:after\:inset-1:after{content:var(--tw-content);inset:.25rem}.peer:checked~.peer-checked\:after\:from-neutral-200:after{content:var(--tw-content);--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:after\:to-neutral-100:after{content:var(--tw-content);--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:after\:opacity-100:after{content:var(--tw-content);opacity:1}.hs-dropdown.open>.hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open .hs-dropdown-toggle .hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open>.hs-dropdown-menu>.hs-dropdown-open\:opacity-100{opacity:1}.hs-removing.hs-removing\:translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hs-removing.hs-removing\:opacity-0{opacity:0}.hs-collapse.open .hs-collapse-open\:block{display:block}.hs-collapse.open .hs-collapse-open\:hidden{display:none}.hs-collapse.open.hs-collapse-open\:block{display:block}.hs-collapse.open.hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open .hs-collapse-open\:block{display:block}.hs-collapse-toggle.open .hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open.hs-collapse-open\:block{display:block}.hs-collapse-toggle.open.hs-collapse-open\:hidden{display:none}.open.hs-overlay-open\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\:opacity-100{opacity:1}.open.hs-overlay-open\:duration-500{transition-duration:.5s}.open .hs-overlay-open\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\:opacity-100{opacity:1}.open .hs-overlay-open\:duration-500{transition-duration:.5s}.hs-overlay-backdrop.hs-overlay-backdrop-open\:bg-gray-900\/50,.hs-overlay-backdrop .hs-overlay-backdrop-open\:bg-gray-900\/50{background-color:#11182780}.selected .hs-combo-box-selected\:block,.selected.hs-combo-box-selected\:block{display:block}@media (min-width: 640px){.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:my-6{margin-top:1.5rem;margin-bottom:1.5rem}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-1\/2{width:50%}.md\:w-2\/3{width:66.666667%}.md\:w-48{width:12rem}.md\:min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.md\:flex-row{flex-direction:row}.md\:flex-nowrap{flex-wrap:nowrap}.md\:items-center{align-items:center}.md\:justify-start{justify-content:flex-start}.md\:justify-end{justify-content:flex-end}.md\:justify-between{justify-content:space-between}.md\:border{border-width:1px}.md\:border-s{border-inline-start-width:1px}.md\:border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.md\:px-3{padding-left:.75rem;padding-right:.75rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:ps-6{padding-inline-start:1.5rem}.md\:ps-7{padding-inline-start:1.75rem}.md\:shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.md\:duration-\[150ms\]{transition-duration:.15s}.md\:\[--strategy\:absolute\]{--strategy: absolute}.md\:\[--strategy\:fixed\]{--strategy: fixed}.md\:\[--trigger\:hover\]{--trigger: hover}}@media (min-width: 1024px){.lg\:w-1\/3{width:33.333333%}.lg\:w-2\/3{width:66.666667%}.lg\:w-96{width:24rem}.lg\:flex-row{flex-direction:row}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pt-16{padding-top:4rem}}@media (min-width: 1280px){.xl\:mx-auto{margin-left:auto;margin-right:auto}.xl\:px-0{padding-left:0;padding-right:0}}@media (prefers-color-scheme: dark){.dark\:border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\:bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\:bg-opacity-80{--tw-bg-opacity: .8}.dark\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\:text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\:focus\:bg-neutral-800:focus{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}}:root{--accent: 136, 58, 234;--accent-light: 224, 204, 250;--accent-dark: 49, 10, 101;--accent-gradient: linear-gradient( 45deg, rgb(var(--accent)), rgb(var(--accent-light)) 30%, white 60% )}code{font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace}.hexgrid-background{background-image:url('data:image/svg+xml,');background-repeat:repeat;background-position:0 0;animation:scrollLeft 2s linear infinite}@keyframes scrollLeft{0%{background-position:0 0}to{background-position:-100px 0}}main[data-astro-cid-j7pv25f6]{margin:auto;padding:1rem;width:800px;max-width:calc(100% - 2rem);color:#fff;font-size:20px;line-height:1.6}.astro-a[data-astro-cid-j7pv25f6]{position:absolute;top:-32px;left:50%;transform:translate(-50%);width:220px;height:auto;z-index:-1}h1[data-astro-cid-j7pv25f6]{font-size:4rem;font-weight:700;line-height:1;text-align:center;margin-bottom:1em}.text-gradient[data-astro-cid-j7pv25f6]{background-image:var(--accent-gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-size:400%;background-position:0%}.instructions[data-astro-cid-j7pv25f6]{margin-bottom:2rem;border:1px solid rgba(var(--accent-light),25%);background:linear-gradient(rgba(var(--accent-dark),66%),rgba(var(--accent-dark),33%));padding:1.5rem;border-radius:8px}.instructions[data-astro-cid-j7pv25f6] code[data-astro-cid-j7pv25f6]{font-size:.8em;font-weight:700;background:rgba(var(--accent-light),12%);color:rgb(var(--accent-light));border-radius:4px;padding:.3em .4em}.instructions[data-astro-cid-j7pv25f6] strong[data-astro-cid-j7pv25f6]{color:rgb(var(--accent-light))}.link-card-grid[data-astro-cid-j7pv25f6]{display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:2rem;padding:0} diff --git a/docs/_astro/index.s0AqZbUS.css b/docs/_astro/index.s0AqZbUS.css new file mode 100644 index 0000000..cd3d681 --- /dev/null +++ b/docs/_astro/index.s0AqZbUS.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-6{inset:1.5rem}.inset-x-0{left:0;right:0}.-bottom-20{bottom:-5rem}.-left-1{left:-.25rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-full{bottom:100%}.end-full{inset-inline-end:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.right-0{right:0}.right-1{right:.25rem}.start-0{inset-inline-start:0px}.start-1\/2{inset-inline-start:50%}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-24{top:6rem}.top-4{top:1rem}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[1000\]{z-index:1000}.z-\[100\]{z-index:100}.z-\[1\]{z-index:1}.z-\[60\]{z-index:60}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-3{margin:.75rem}.m-4{margin:1rem}.\!mx-\[10px\]{margin-left:10px!important;margin-right:10px!important}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mt-12{margin-top:-3rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.ms-2{margin-inline-start:.5rem}.ms-5{margin-inline-start:1.25rem}.ms-auto{margin-inline-start:auto}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-video{aspect-ratio:16 / 9}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-7{width:1.75rem;height:1.75rem}.size-8{width:2rem;height:2rem}.size-full{width:100%;height:100%}.h-10{height:2.5rem}.h-12{height:3rem}.h-20{height:5rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-96{height:24rem}.h-\[32px\]{height:32px}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.max-h-0{max-height:0px}.max-h-screen{max-height:100vh}.min-h-\[500px\]{min-height:500px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[1900px\]{width:1900px}.w-\[350px\]{width:350px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-full{width:100%}.min-w-\[800px\]{min-width:800px}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-\[85rem\]{max-width:85rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-8{--tw-translate-x: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-10{--tw-translate-x: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-12{--tw-translate-x: 3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-10{--tw-translate-y: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-8{--tw-translate-y: 2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-12{--tw-rotate: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-12{--tw-rotate: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-3\.5{-moz-column-gap:.875rem;column-gap:.875rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[36px\]{border-radius:36px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.border{border-width:1px}.border-4{border-width:4px}.border-\[3px\]{border-width:3px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-current{border-color:currentColor}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity))}.border-yellow-400\/50{border-color:#facc1580}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.border-yellow-700{--tw-border-opacity: 1;border-color:rgb(161 98 7 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.bg-\[var\(--sl-color-black\)\]{background-color:var(--sl-color-black)}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-cyan-500{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity))}.bg-cyan-600{--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.bg-cyan-700{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity))}.bg-neutral-200{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.bg-orange-200{--tw-bg-opacity: 1;background-color:rgb(254 215 170 / var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity))}.bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.bg-zinc-800{--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity))}.bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.bg-zinc-950{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity))}.bg-zinc-950\/40{background-color:#09090b66}.bg-zinc-950\/80{background-color:#09090bcc}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-neutral-400{--tw-gradient-from: #a3a3a3 var(--tw-gradient-from-position);--tw-gradient-to: rgb(163 163 163 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-neutral-100{--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.to-neutral-200{--tw-gradient-to: #e5e5e5 var(--tw-gradient-to-position)}.bg-cover{background-size:cover}.bg-center{background-position:center}.stroke-yellow-700\/50{stroke:#a1620780}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-3{padding-bottom:.75rem}.pl-1{padding-left:.25rem}.pl-5{padding-left:1.25rem}.pr-1{padding-right:.25rem}.ps-5{padding-inline-start:1.25rem}.ps-px{padding-inline-start:1px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-cyan-600{--tw-text-opacity: 1;color:rgb(8 145 178 / var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-neutral-700{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity))}.\!opacity-100{opacity:1!important}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/10{--tw-shadow-color: rgb(0 0 0 / .1);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-zinc-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(113 113 122 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\,margin\]{transition-property:opacity,margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-\[0\.1ms\]{transition-duration:.1ms}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.text-shadow-outline-white{text-shadow:0 0 0 black,-1px -1px 0 black,1px -1px 0 black,-1px 1px 0 black,1px 1px 0 black}.\[--adaptive\:none\]{--adaptive: none}.\[--overlay-backdrop\:static\]{--overlay-backdrop: static}.\[--strategy\:static\]{--strategy: static}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-end-5:before{content:var(--tw-content);inset-inline-end:-1.25rem}.before\:-top-5:before{content:var(--tw-content);top:-1.25rem}.before\:start-0:before{content:var(--tw-content);inset-inline-start:0px}.before\:top-0:before{content:var(--tw-content);top:0}.before\:h-5:before{content:var(--tw-content);height:1.25rem}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-5:before{content:var(--tw-content);width:1.25rem}.before\:w-full:before{content:var(--tw-content);width:100%}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-0:after{content:var(--tw-content);inset:0}.after\:inset-2:after{content:var(--tw-content);inset:.5rem}.after\:inset-2\.5:after{content:var(--tw-content);inset:.625rem}.after\:transform-gpu:after{content:var(--tw-content);transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:rounded-xl:after{content:var(--tw-content);border-radius:.75rem}.after\:bg-cyan-600:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.after\:bg-gradient-to-b:after{content:var(--tw-content);background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.after\:from-neutral-100:after{content:var(--tw-content);--tw-gradient-from: #f5f5f5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 245 245 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.after\:to-neutral-50:after{content:var(--tw-content);--tw-gradient-to: #fafafa var(--tw-gradient-to-position)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:mix-blend-color:after{content:var(--tw-content);mix-blend-mode:color}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.3\]:hover{--tw-scale-x: 1.3;--tw-scale-y: 1.3;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:bg-cyan-700:hover{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.hover\:bg-yellow-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 224 71 / var(--tw-bg-opacity))}.hover\:bg-yellow-400:hover{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-r:hover{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.hover\:from-cyan-500:hover{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-yellow-500:hover{--tw-gradient-from: #eab308 var(--tw-gradient-from-position);--tw-gradient-to: rgb(234 179 8 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400:hover{--tw-gradient-to: #22d3ee var(--tw-gradient-to-position)}.hover\:to-yellow-400:hover{--tw-gradient-to: #facc15 var(--tw-gradient-to-position)}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-gray-400:hover{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\:text-yellow-500:hover{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.hover\:text-zinc-950:hover{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity))}.hover\:opacity-100:hover{opacity:1}.hover\:ring-2:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:ring-cyan-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(34 211 238 / var(--tw-ring-opacity))}.hover\:ring-yellow-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 204 21 / var(--tw-ring-opacity))}.hover\:ring-offset-2:hover{--tw-ring-offset-width: 2px}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:ring:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.disabled\:pointer-events-none:disabled{pointer-events:none}@keyframes pulse{50%{opacity:.5}}.disabled\:animate-pulse:disabled{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:-translate-x-40{--tw-translate-x: -10rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-96{--tw-translate-x: -24rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.group:hover .group-hover\:bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:to-cyan-100{--tw-gradient-to: #cffafe var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.peer:checked~.peer-checked\:after\:inset-1:after{content:var(--tw-content);inset:.25rem}.peer:checked~.peer-checked\:after\:from-neutral-200:after{content:var(--tw-content);--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:after\:to-neutral-100:after{content:var(--tw-content);--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:after\:opacity-100:after{content:var(--tw-content);opacity:1}.hs-dropdown.open>.hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open .hs-dropdown-toggle .hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open>.hs-dropdown-menu>.hs-dropdown-open\:opacity-100{opacity:1}.hs-removing.hs-removing\:translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hs-removing.hs-removing\:opacity-0{opacity:0}.hs-collapse.open .hs-collapse-open\:block{display:block}.hs-collapse.open .hs-collapse-open\:hidden{display:none}.hs-collapse.open.hs-collapse-open\:block{display:block}.hs-collapse.open.hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open .hs-collapse-open\:block{display:block}.hs-collapse-toggle.open .hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open.hs-collapse-open\:block{display:block}.hs-collapse-toggle.open.hs-collapse-open\:hidden{display:none}.open.hs-overlay-open\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\:opacity-100{opacity:1}.open.hs-overlay-open\:duration-500{transition-duration:.5s}.open .hs-overlay-open\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\:opacity-100{opacity:1}.open .hs-overlay-open\:duration-500{transition-duration:.5s}.hs-overlay-backdrop.hs-overlay-backdrop-open\:bg-gray-900\/50,.hs-overlay-backdrop .hs-overlay-backdrop-open\:bg-gray-900\/50{background-color:#11182780}.selected .hs-combo-box-selected\:block,.selected.hs-combo-box-selected\:block{display:block}@media (min-width: 640px){.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:my-6{margin-top:1.5rem;margin-bottom:1.5rem}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-1\/2{width:50%}.md\:w-2\/3{width:66.666667%}.md\:w-48{width:12rem}.md\:min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.md\:flex-row{flex-direction:row}.md\:flex-nowrap{flex-wrap:nowrap}.md\:items-center{align-items:center}.md\:justify-start{justify-content:flex-start}.md\:justify-end{justify-content:flex-end}.md\:justify-between{justify-content:space-between}.md\:border{border-width:1px}.md\:border-s{border-inline-start-width:1px}.md\:border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.md\:px-3{padding-left:.75rem;padding-right:.75rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:ps-6{padding-inline-start:1.5rem}.md\:ps-7{padding-inline-start:1.75rem}.md\:shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.md\:duration-\[150ms\]{transition-duration:.15s}.md\:\[--strategy\:fixed\]{--strategy: fixed}.md\:\[--strategy\:sticky\]{--strategy: sticky}.md\:\[--trigger\:hover\]{--trigger: hover}}@media (min-width: 1024px){.lg\:w-1\/3{width:33.333333%}.lg\:w-2\/3{width:66.666667%}.lg\:w-96{width:24rem}.lg\:flex-row{flex-direction:row}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pt-16{padding-top:4rem}}@media (min-width: 1280px){.xl\:mx-auto{margin-left:auto;margin-right:auto}.xl\:px-0{padding-left:0;padding-right:0}}@media (min-width: 1536px){.\32xl\:text-base{font-size:1rem;line-height:1.5rem}}@media (prefers-color-scheme: dark){.dark\:border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\:bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\:bg-opacity-80{--tw-bg-opacity: .8}.dark\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\:text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:ring-zinc-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(228 228 231 / var(--tw-ring-opacity))}.dark\:hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\:focus\:bg-neutral-800:focus{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\:focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}}:root{--accent: 136, 58, 234;--accent-light: 224, 204, 250;--accent-dark: 49, 10, 101;--accent-gradient: linear-gradient( 45deg, rgb(var(--accent)), rgb(var(--accent-light)) 30%, white 60% )}code{font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace}.hexgrid-background{background-image:url('data:image/svg+xml,');background-repeat:repeat;background-position:0 0;animation:scrollLeft 2s linear infinite}@keyframes scrollLeft{0%{background-position:0 0}to{background-position:-100px 0}}main[data-astro-cid-j7pv25f6]{margin:auto;padding:1rem;width:800px;max-width:calc(100% - 2rem);color:#fff;font-size:20px;line-height:1.6}.astro-a[data-astro-cid-j7pv25f6]{position:absolute;top:-32px;left:50%;transform:translate(-50%);width:220px;height:auto;z-index:-1}h1[data-astro-cid-j7pv25f6]{font-size:4rem;font-weight:700;line-height:1;text-align:center;margin-bottom:1em}.text-gradient[data-astro-cid-j7pv25f6]{background-image:var(--accent-gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-size:400%;background-position:0%}.instructions[data-astro-cid-j7pv25f6]{margin-bottom:2rem;border:1px solid rgba(var(--accent-light),25%);background:linear-gradient(rgba(var(--accent-dark),66%),rgba(var(--accent-dark),33%));padding:1.5rem;border-radius:8px}.instructions[data-astro-cid-j7pv25f6] code[data-astro-cid-j7pv25f6]{font-size:.8em;font-weight:700;background:rgba(var(--accent-light),12%);color:rgb(var(--accent-light));border-radius:4px;padding:.3em .4em}.instructions[data-astro-cid-j7pv25f6] strong[data-astro-cid-j7pv25f6]{color:rgb(var(--accent-light))}.link-card-grid[data-astro-cid-j7pv25f6]{display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:2rem;padding:0} diff --git a/docs/assets/items/npc/avatars/chip_bard.webp b/docs/assets/items/npc/avatars/chip_bard.webp new file mode 100644 index 0000000000000000000000000000000000000000..b47056b0cc240f7ff30d394013fa39c37ada342f GIT binary patch literal 182074 zcmV)LK)JtCNk&F8#{vLXMM6+kP&il$0000K0002<0RZy>09H^qOe?|y059{wd=QN= zY}+;x?DQ^I$lZV7dwL^8^nU`hKXyNr1n3+CQLmpK0fFiV6ws*?N%_MV_ZSVnt}1WI zhO5UIi6qxnj1f_6$^VRiW9K&Kj_mF(7%6$qdj29efK?^eFB&&gb70~S2$HYGR z;@&?nr(u>a;NXX{?XJpYV9yns1HgS_57T{seM&+*Wz%b6u%U6j4cjixbt}(#`29h) zi{^eq*A_7>gD{}A(TD(%L?U3r;2sU>{QRGj&#|%{ulW z^(};qF=gIM5o!nUW_n5Oo&l6-$sA+pQ`VuDxTNec?>9g+mt<*;H*8g#K`FVlGIgpF z%V~K5G}qSatsA!+rs}KJvk5n?%$pcu7Xm)HXY6agb;LDivYJ_=x+~f*_tb{~j&a>A z$>k2l-3nC3DAYB{wU#Pz(P39&hx0S{NbTip z+~0xysMG`hTRfrHfNy%M*;Bdg=qd9RCf+bh!Rq`}f1pBMi z45Lnngh-@3Oz%8mk1Aq}42%2hkV3qUMy$>m$^mR99l>WvvXAR#;)i4ldTS zT1DjyXU4NW29y~3)Jo-=)F+dWi+oH|n`|()J~@eJ!O|*2D|G86W3g*0jY;WiJrJ_{7hD{cY6jDl~SO|;O|IE$sC~avJnZWGnsKWMMX2N zc7*S*U&M3r*4B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yrg>VQJCHBNutWoF^;=uQOz!lgj=+hiYSthR~$f v Welcome to CryptoThrone. + Welcome to CryptoThrone.

-2024 CryptoThrone.com - WebEnclave & KBVE -

\ No newline at end of file + \ No newline at end of file