@micjanic/recursive-grid 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(y,I){typeof exports=="object"&&typeof module<"u"?module.exports=I(require("react"),require("@pixi/react"),require("pixi.js"),require("react-dom")):typeof define=="function"&&define.amd?define(["react","@pixi/react","pixi.js","react-dom"],I):(y=typeof globalThis<"u"?globalThis:y||self,y["@micjanic/recursive-grid"]=I(y.React,y.PIXIReact,y.PIXI,y.ReactDOM))})(this,(function(y,I,V,Qr){"use strict";var Ps=Object.defineProperty;var As=(y,I,V)=>I in y?Ps(y,I,{enumerable:!0,configurable:!0,writable:!0,value:V}):y[I]=V;var ee=(y,I,V)=>As(y,typeof I!="symbol"?I+"":I,V);function Yr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Tt=Yr(y);var Ie={exports:{}},de={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ct;function Br(){return Ct||(Ct=1,process.env.NODE_ENV!=="production"&&(function(){function e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===$?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case S:return"Fragment";case
|
|
17
|
+
*/var Ct;function Br(){return Ct||(Ct=1,process.env.NODE_ENV!=="production"&&(function(){function e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===$?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case S:return"Fragment";case x:return"Profiler";case g:return"StrictMode";case B:return"Suspense";case F:return"SuspenseList";case ne:return"Activity"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case v:return"Portal";case R:return o.displayName||"Context";case _:return(o._context.displayName||"Context")+".Consumer";case E:var P=o.render;return o=o.displayName,o||(o=P.displayName||P.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case le:return P=o.displayName||null,P!==null?P:e(o.type)||"Memo";case O:P=o._payload,o=o._init;try{return e(o(P))}catch{}}return null}function t(o){return""+o}function r(o){try{t(o);var P=!1}catch{P=!0}if(P){P=console;var T=P.error,k=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return T.call(P,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",k),t(o)}}function n(o){if(o===S)return"<>";if(typeof o=="object"&&o!==null&&o.$$typeof===O)return"<...>";try{var P=e(o);return P?"<"+P+">":"<...>"}catch{return"<...>"}}function s(){var o=Y.A;return o===null?null:o.getOwner()}function i(){return Error("react-stack-top-frame")}function a(o){if(H.call(o,"key")){var P=Object.getOwnPropertyDescriptor(o,"key").get;if(P&&P.isReactWarning)return!1}return o.key!==void 0}function u(o,P){function T(){$r||($r=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",P))}T.isReactWarning=!0,Object.defineProperty(o,"key",{get:T,configurable:!0})}function f(){var o=e(this.type);return Dr[o]||(Dr[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function l(o,P,T,k,We,Rt){var C=T.ref;return o={$$typeof:b,type:o,key:P,props:T,_owner:k},(C!==void 0?C:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:f}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:We}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Rt}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function p(o,P,T,k,We,Rt){var C=P.children;if(C!==void 0)if(k)if(Pt(C)){for(k=0;k<C.length;k++)h(C[k]);Object.freeze&&Object.freeze(C)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(C);if(H.call(P,"key")){C=e(o);var ce=Object.keys(P).filter(function(xs){return xs!=="key"});k=0<ce.length?"{key: someKey, "+ce.join(": ..., ")+": ...}":"{key: someKey}",Mr[C+k]||(ce=0<ce.length?"{"+ce.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,k,C,ce,C),Mr[C+k]=!0)}if(C=null,T!==void 0&&(r(T),C=""+T),a(x)&&(r(x.key),C=""+x.key),"key"in x){T={};for(var Et in x)Et!=="key"&&(T[Et]=x[Et])}else T=x;return C&&u(T,typeof o=="function"?o.displayName||o.name||"Unknown":o),l(o,C,T,s(),We,Rt)}function f(o){h(o)?o._store&&(o._store.validated=1):typeof o=="object"&&o!==null&&o.$$typeof===O&&(o._payload.status==="fulfilled"?h(o._payload.value)&&o._payload.value._store&&(o._payload.value._store.validated=1):o._store&&(o._store.validated=1))}function h(o){return typeof o=="object"&&o!==null&&o.$$typeof===b}var p=_,b=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),R=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),Y=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,xt=Array.isArray,At=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(o){return o()}};var $r,Dr={},qr=p.react_stack_bottom_frame.bind(p,i)(),Ur=At(n(i)),Mr={};fe.Fragment=S,fe.jsx=function(o,x,T){var k=1e4>Y.recentlyCreatedOwnerStacks++;return m(o,x,T,!1,k?Error("react-stack-top-frame"):qr,k?At(n(o)):Ur)},fe.jsxs=function(o,x,T){var k=1e4>Y.recentlyCreatedOwnerStacks++;return m(o,x,T,!0,k?Error("react-stack-top-frame"):qr,k?At(n(o)):Ur)}})()),fe}var It;function Hr(){return It||(It=1,process.env.NODE_ENV==="production"?Ie.exports=Wr():Ie.exports=Br()),Ie.exports}var U=Hr(),Be=me(),w=e=>he(e,Be),He=me();w.write=e=>he(e,He);var Oe=me();w.onStart=e=>he(e,Oe);var Xe=me();w.onFrame=e=>he(e,Xe);var Je=me();w.onFinish=e=>he(e,Je);var se=[];w.setTimeout=(e,t)=>{const r=w.now()+t,n=()=>{const i=se.findIndex(a=>a.cancel==n);~i&&se.splice(i,1),J-=~i?1:0},s={time:r,handler:e,cancel:n};return se.splice(Ot(r),0,s),J+=1,jt(),s};var Ot=e=>~(~se.findIndex(t=>t.time>e)||~se.length);w.cancel=e=>{Oe.delete(e),Xe.delete(e),Je.delete(e),Be.delete(e),He.delete(e)},w.sync=e=>{Ke=!0,w.batchedUpdates(e),Ke=!1},w.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...s){t=s,w.onStart(r)}return n.handler=e,n.cancel=()=>{Oe.delete(r),t=null},n};var Ze=typeof window<"u"?window.requestAnimationFrame:(()=>{});w.use=e=>Ze=e,w.now=typeof performance<"u"?()=>performance.now():Date.now,w.batchedUpdates=e=>e(),w.catch=console.error,w.frameLoop="always",w.advance=()=>{w.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Vt()};var X=-1,J=0,Ke=!1;function he(e,t){Ke?(t.delete(e),e(0)):(t.add(e),jt())}function jt(){X<0&&(X=0,w.frameLoop!=="demand"&&Ze(Ft))}function Xr(){X=-1}function Ft(){~X&&(Ze(Ft),w.batchedUpdates(Vt))}function Vt(){const e=X;X=w.now();const t=Ot(X);if(t&&(Nt(se.splice(0,t),r=>r.handler()),J-=t),!J){Xr();return}Oe.flush(),Be.flush(e?Math.min(64,X-e):16.667),Xe.flush(),He.flush(),Je.flush()}function me(){let e=new Set,t=e;return{add(r){J+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return J-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,J-=t.size,Nt(t,n=>n(r)&&e.add(n)),J+=e.size,t=e)}}}function Nt(e,t){e.forEach(r=>{try{t(r)}catch(n){w.catch(n)}})}var Jr=Object.defineProperty,Zr=(e,t)=>{for(var r in t)Jr(e,r,{get:t[r],enumerable:!0})},M={};Zr(M,{assign:()=>en,colors:()=>Z,createStringInterpolator:()=>rt,skipAnimation:()=>Dt,to:()=>$t,willAdvance:()=>nt});function et(){}var Kr=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),c={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function W(e,t){if(c.arr(e)){if(!c.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var A=(e,t)=>e.forEach(t);function G(e,t,r){if(c.arr(e)){for(let n=0;n<e.length;n++)t.call(r,e[n],`${n}`);return}for(const n in e)e.hasOwnProperty(n)&&t.call(r,e[n],n)}var N=e=>c.und(e)?[]:c.arr(e)?e:[e];function pe(e,t){if(e.size){const r=Array.from(e);e.clear(),A(r,t)}}var ge=(e,...t)=>pe(e,r=>r(...t)),tt=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),rt,$t,Z=null,Dt=!1,nt=et,en=e=>{e.to&&($t=e.to),e.now&&(w.now=e.now),e.colors!==void 0&&(Z=e.colors),e.skipAnimation!=null&&(Dt=e.skipAnimation),e.createStringInterpolator&&(rt=e.createStringInterpolator),e.requestAnimationFrame&&w.use(e.requestAnimationFrame),e.batchedUpdates&&(w.batchedUpdates=e.batchedUpdates),e.willAdvance&&(nt=e.willAdvance),e.frameLoop&&(w.frameLoop=e.frameLoop)},ve=new Set,D=[],st=[],je=0,Fe={get idle(){return!ve.size&&!D.length},start(e){je>e.priority?(ve.add(e),w.onStart(tn)):(qt(e),w(it))},advance:it,sort(e){if(je)w.onFrame(()=>Fe.sort(e));else{const t=D.indexOf(e);~t&&(D.splice(t,1),Ut(e))}},clear(){D=[],ve.clear()}};function tn(){ve.forEach(qt),ve.clear(),w(it)}function qt(e){D.includes(e)||Ut(e)}function Ut(e){D.splice(rn(D,t=>t.priority>e.priority),0,e)}function it(e){const t=st;for(let r=0;r<D.length;r++){const n=D[r];je=n.priority,n.idle||(nt(n),n.advance(e),n.idle||t.push(n))}return je=0,st=D,st.length=0,D=t,D.length>0}function rn(e,t){const r=e.findIndex(t);return r<0?e.length:r}var nn={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},z="[-+]?\\d*\\.?\\d+",Ve=z+"%";function Ne(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var sn=new RegExp("rgb"+Ne(z,z,z)),an=new RegExp("rgba"+Ne(z,z,z,z)),on=new RegExp("hsl"+Ne(z,Ve,Ve)),un=new RegExp("hsla"+Ne(z,Ve,Ve,z)),ln=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,cn=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,dn=/^#([0-9a-fA-F]{6})$/,fn=/^#([0-9a-fA-F]{8})$/;function hn(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=dn.exec(e))?parseInt(t[1]+"ff",16)>>>0:Z&&Z[e]!==void 0?Z[e]:(t=sn.exec(e))?(ie(t[1])<<24|ie(t[2])<<16|ie(t[3])<<8|255)>>>0:(t=an.exec(e))?(ie(t[1])<<24|ie(t[2])<<16|ie(t[3])<<8|Lt(t[4]))>>>0:(t=ln.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=fn.exec(e))?parseInt(t[1],16)>>>0:(t=cn.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=on.exec(e))?(Mt(zt(t[1]),$e(t[2]),$e(t[3]))|255)>>>0:(t=un.exec(e))?(Mt(zt(t[1]),$e(t[2]),$e(t[3]))|Lt(t[4]))>>>0:null}function at(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Mt(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,s=2*r-n,i=at(s,n,e+1/3),a=at(s,n,e),u=at(s,n,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(u*255)<<8}function ie(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function zt(e){return(parseFloat(e)%360+360)%360/360}function Lt(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function $e(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Gt(e){let t=hn(e);if(t===null)return e;t=t||0;const r=(t&4278190080)>>>24,n=(t&16711680)>>>16,s=(t&65280)>>>8,i=(t&255)/255;return`rgba(${r}, ${n}, ${s}, ${i})`}var ye=(e,t,r)=>{if(c.fun(e))return e;if(c.arr(e))return ye({range:e,output:t,extrapolate:r});if(c.str(e.output[0]))return rt(e);const n=e,s=n.output,i=n.range||[0,1],a=n.extrapolateLeft||n.extrapolate||"extend",u=n.extrapolateRight||n.extrapolate||"extend",d=n.easing||(l=>l);return l=>{const m=pn(l,i);return mn(l,i[m],i[m+1],s[m],s[m+1],d,a,u,n.map)}};function mn(e,t,r,n,s,i,a,u,d){let l=d?d(e):e;if(l<t){if(a==="identity")return l;a==="clamp"&&(l=t)}if(l>r){if(u==="identity")return l;u==="clamp"&&(l=r)}return n===s?n:t===r?e<=t?n:s:(t===-1/0?l=-l:r===1/0?l=l-t:l=(l-t)/(r-t),l=i(l),n===-1/0?l=-l:s===1/0?l=l+n:l=l*(s-n)+n,l)}function pn(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}var gn={linear:e=>e},_e=Symbol.for("FluidValue.get"),ae=Symbol.for("FluidValue.observers"),q=e=>!!(e&&e[_e]),j=e=>e&&e[_e]?e[_e]():e,Qt=e=>e[ae]||null;function vn(e,t){e.eventObserved?e.eventObserved(t):e(t)}function be(e,t){const r=e[ae];r&&r.forEach(n=>{vn(n,t)})}var Yt=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");yn(this,e)}},yn=(e,t)=>Wt(e,_e,t);function oe(e,t){if(e[_e]){let r=e[ae];r||Wt(e,ae,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function we(e,t){const r=e[ae];if(r&&r.has(t)){const n=r.size-1;n?r.delete(t):e[ae]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var Wt=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),De=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_n=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Bt=new RegExp(`(${De.source})(%|[a-z]+)`,"i"),bn=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,qe=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Ht=e=>{const[t,r]=wn(e);if(!t||tt())return e;const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){const s=window.getComputedStyle(document.documentElement).getPropertyValue(r);return s||e}else{if(r&&qe.test(r))return Ht(r);if(r)return r}return e},wn=e=>{const t=qe.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]},ot,Sn=(e,t,r,n,s)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${s})`,Xt=e=>{ot||(ot=Z?new RegExp(`(${Object.keys(Z).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>j(i).replace(qe,Ht).replace(_n,Gt).replace(ot,Gt)),r=t.map(i=>i.match(De).map(Number)),s=r[0].map((i,a)=>r.map(u=>{if(!(a in u))throw Error('The arity of each "output" value must be equal');return u[a]})).map(i=>ye({...e,output:i}));return i=>{var d;const a=!Bt.test(t[0])&&((d=t.find(l=>Bt.test(l)))==null?void 0:d.replace(De,""));let u=0;return t[0].replace(De,()=>`${s[u++](i)}${a||""}`).replace(bn,Sn)}},ut="react-spring: ",Jt=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${ut}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},Pn=Jt(console.warn);function xn(){Pn(`${ut}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var An=Jt(console.warn);function Rn(){An(`${ut}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Ue(e){return c.str(e)&&(e[0]=="#"||/\d/.test(e)||!tt()&&qe.test(e)||e in(Z||{}))}var lt=tt()?_.useEffect:_.useLayoutEffect,En=()=>{const e=_.useRef(!1);return lt(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Zt(){const e=_.useState()[1],t=En();return()=>{t.current&&e(Math.random())}}var Kt=e=>_.useEffect(e,Tn),Tn=[];function er(e){const t=_.useRef(void 0);return _.useEffect(()=>{t.current=e}),t.current}var Se=Symbol.for("Animated:node"),kn=e=>!!e&&e[Se]===e,Q=e=>e&&e[Se],ct=(e,t)=>Kr(e,Se,t),Me=e=>e&&e[Se]&&e[Se].getPayload(),tr=class{constructor(){ct(this,this)}getPayload(){return this.payload||[]}},ze=class zr extends tr{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,c.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new zr(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,r){return c.num(t)&&(this.lastPosition=t,r&&(t=Math.round(t/r)*r,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,c.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Le=class Lr extends ze{constructor(t){super(0),this._string=null,this._toString=ye({output:[t,t]})}static create(t){return new Lr(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(c.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=ye({output:[this.getValue(),t]})),this._value=0,super.reset()}},Ge={dependencies:null},Qe=class extends tr{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return G(this.source,(r,n)=>{kn(r)?t[n]=r.getValue(e):q(r)?t[n]=j(r):e||(t[n]=r)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&A(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return G(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ge.dependencies&&q(e)&&Ge.dependencies.add(e);const t=Me(e);t&&A(t,r=>this.add(r))}},Cn=class Gr extends Qe{constructor(t){super(t)}static create(t){return new Gr(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const r=this.getPayload();return t.length==r.length?r.map((n,s)=>n.setValue(t[s])).some(Boolean):(super.setValue(t.map(In)),!0)}};function In(e){return(Ue(e)?Le:ze).create(e)}function dt(e){const t=Q(e);return t?t.constructor:c.arr(e)?Cn:Ue(e)?Le:ze}var rr=(e,t)=>{const r=!c.fun(e)||e.prototype&&e.prototype.isReactComponent;return _.forwardRef((n,s)=>{const i=_.useRef(null),a=r&&_.useCallback(b=>{i.current=Fn(s,b)},[s]),[u,d]=jn(n,t),l=Zt(),m=()=>{const b=i.current;if(r&&!b)return;(b?t.applyAnimatedValues(b,u.getValue(!0)):!1)===!1&&l()},f=new On(m,d),h=_.useRef(void 0);lt(()=>(h.current=f,A(d,b=>oe(b,f)),()=>{h.current&&(A(h.current.deps,b=>we(b,h.current)),w.cancel(h.current.update))})),_.useEffect(m,[]),Kt(()=>()=>{const b=h.current;A(b.deps,v=>we(v,b))});const p=t.getComponentProps(u.getValue());return Tt.createElement(e,{...p,ref:a})})},On=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&w.write(this.update)}};function jn(e,t){const r=new Set;return Ge.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Qe(e),Ge.dependencies=null,[e,r]}function Fn(e,t){return e&&(c.fun(e)?e(t):e.current=t),t}var nr=Symbol.for("AnimatedComponent"),Vn=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=s=>new Qe(s),getComponentProps:n=s=>s}={})=>{const s={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},i=a=>{const u=sr(a)||"Anonymous";return c.str(a)?a=i[a]||(i[a]=rr(a,s)):a=a[nr]||(a[nr]=rr(a,s)),a.displayName=`Animated(${u})`,a};return G(e,(a,u)=>{c.arr(e)&&(u=sr(a)),i[u]=i(a)}),{animated:i}},sr=e=>c.str(e)?e:e&&c.str(e.displayName)?e.displayName:c.fun(e)&&e.name||null;function te(e,...t){return c.fun(e)?e(...t):e}var Pe=(e,t)=>e===!0||!!(t&&e&&(c.fun(e)?e(t):N(e).includes(t))),ir=(e,t)=>c.obj(e)?t&&e[t]:e,ar=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Nn=e=>e,ft=(e,t=Nn)=>{let r=$n;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const n={};for(const s of r){const i=t(e[s],s);c.und(i)||(n[s]=i)}return n},$n=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Dn={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function qn(e){const t={};let r=0;if(G(e,(n,s)=>{Dn[s]||(t[s]=n,r++)}),r)return t}function or(e){const t=qn(e);if(t){const r={to:t};return G(e,(n,s)=>s in t||(r[s]=n)),r}return{...e}}function xe(e){return e=j(e),c.arr(e)?e.map(xe):Ue(e)?M.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Un(e){for(const t in e)return!0;return!1}function ht(e){return c.fun(e)||c.arr(e)&&c.obj(e[0])}function Mn(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function zn(e,t){var r;t&&e.ref!==t&&((r=e.ref)==null||r.delete(e),t.add(e),e.ref=t)}var Ln={default:{tension:170,friction:26}},mt={...Ln.default,mass:1,damping:1,easing:gn.linear,clamp:!1},Gn=class{constructor(){this.velocity=0,Object.assign(this,mt)}};function Qn(e,t,r){r&&(r={...r},ur(r,t),t={...r,...t}),ur(e,t),Object.assign(e,t);for(const a in mt)e[a]==null&&(e[a]=mt[a]);let{frequency:n,damping:s}=e;const{mass:i}=e;return c.und(n)||(n<.01&&(n=.01),s<0&&(s=0),e.tension=Math.pow(2*Math.PI/n,2)*i,e.friction=4*Math.PI*s*i/n),e}function ur(e,t){if(!c.und(t.decay))e.duration=void 0;else{const r=!c.und(t.tension)||!c.und(t.friction);(r||!c.und(t.frequency)||!c.und(t.damping)||!c.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var lr=[],Yn=class{constructor(){this.changed=!1,this.values=lr,this.toValues=null,this.fromValues=lr,this.config=new Gn,this.immediate=!1}};function cr(e,{key:t,props:r,defaultProps:n,state:s,actions:i}){return new Promise((a,u)=>{let d,l,m=Pe(r.cancel??(n==null?void 0:n.cancel),t);if(m)p();else{c.und(r.pause)||(s.paused=Pe(r.pause,t));let b=n==null?void 0:n.pause;b!==!0&&(b=s.paused||Pe(b,t)),d=te(r.delay||0,t),b?(s.resumeQueue.add(h),i.pause()):(i.resume(),h())}function f(){s.resumeQueue.add(h),s.timeouts.delete(l),l.cancel(),d=l.time-w.now()}function h(){d>0&&!M.skipAnimation?(s.delayed=!0,l=w.setTimeout(p,d),s.pauseQueue.add(f),s.timeouts.add(l)):p()}function p(){s.delayed&&(s.delayed=!1),s.pauseQueue.delete(f),s.timeouts.delete(l),e<=(s.cancelId||0)&&(m=!0);try{i.start({...r,callId:e,cancel:m},a)}catch(b){u(b)}}})}var pt=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?ue(e.get()):t.every(r=>r.noop)?dr(e.get()):L(e.get(),t.every(r=>r.finished)),dr=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),L=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),ue=e=>({value:e,cancelled:!0,finished:!1});function fr(e,t,r,n){const{callId:s,parentId:i,onRest:a}=t,{asyncTo:u,promise:d}=r;return!i&&e===u&&!t.reset?d:r.promise=(async()=>{r.asyncId=s,r.asyncTo=e;const l=ft(t,(S,g)=>g==="onRest"?void 0:S);let m,f;const h=new Promise((S,g)=>(m=S,f=g)),p=S=>{const g=s<=(r.cancelId||0)&&ue(n)||s!==r.asyncId&&L(n,!1);if(g)throw S.result=g,f(S),S},b=(S,g)=>{const P=new hr,y=new mr;return(async()=>{if(M.skipAnimation)throw Ae(r),y.result=L(n,!1),f(y),y;p(P);const R=c.obj(S)?{...S}:{...g,to:S};R.parentId=s,G(l,(B,F)=>{c.und(R[F])&&(R[F]=B)});const E=await n.start(R);return p(P),r.paused&&await new Promise(B=>{r.resumeQueue.add(B)}),E})()};let v;if(M.skipAnimation)return Ae(r),L(n,!1);try{let S;c.arr(e)?S=(async g=>{for(const P of g)await b(P)})(e):S=Promise.resolve(e(b,n.stop.bind(n))),await Promise.all([S.then(m),h]),v=L(n.get(),!0,!1)}catch(S){if(S instanceof hr)v=S.result;else if(S instanceof mr)v=S.result;else throw S}finally{s==r.asyncId&&(r.asyncId=i,r.asyncTo=i?u:void 0,r.promise=i?d:void 0)}return c.fun(a)&&w.batchedUpdates(()=>{a(v,n,n.item)}),v})()}function Ae(e,t){pe(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var hr=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},mr=class extends Error{constructor(){super("SkipAnimationSignal")}},gt=e=>e instanceof vt,Wn=1,vt=class extends Yt{constructor(){super(...arguments),this.id=Wn++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Q(this);return e&&e.getValue()}to(...e){return M.to(this,e)}interpolate(...e){return xn(),M.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){be(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Fe.sort(this),be(this,{type:"priority",parent:this,priority:e})}},re=Symbol.for("SpringPhase"),pr=1,yt=2,_t=4,bt=e=>(e[re]&pr)>0,K=e=>(e[re]&yt)>0,Re=e=>(e[re]&_t)>0,gr=(e,t)=>t?e[re]|=yt|pr:e[re]&=~yt,vr=(e,t)=>t?e[re]|=_t:e[re]&=~_t,Bn=class extends vt{constructor(e,t){if(super(),this.animation=new Yn,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!c.und(e)||!c.und(t)){const r=c.obj(e)?{...e}:{...t,from:e};c.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(K(this)||this._state.asyncTo)||Re(this)}get goal(){return j(this.animation.to)}get velocity(){const e=Q(this);return e instanceof ze?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return bt(this)}get isAnimating(){return K(this)}get isPaused(){return Re(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const n=this.animation;let{toValues:s}=n;const{config:i}=n,a=Me(n.to);!a&&q(n.to)&&(s=N(j(n.to))),n.values.forEach((l,m)=>{if(l.done)return;const f=l.constructor==Le?1:a?a[m].lastPosition:s[m];let h=n.immediate,p=f;if(!h){if(p=l.lastPosition,i.tension<=0){l.done=!0;return}let b=l.elapsedTime+=e;const v=n.fromValues[m],S=l.v0!=null?l.v0:l.v0=c.arr(i.velocity)?i.velocity[m]:i.velocity;let g;const P=i.precision||(v==f?.005:Math.min(1,Math.abs(f-v)*.001));if(c.und(i.duration))if(i.decay){const y=i.decay===!0?.998:i.decay,R=Math.exp(-(1-y)*b);p=v+S/(1-y)*(1-R),h=Math.abs(l.lastPosition-p)<=P,g=S*R}else{g=l.lastVelocity==null?S:l.lastVelocity;const y=i.restVelocity||P/10,R=i.clamp?0:i.bounce,E=!c.und(R),B=v==f?l.v0>0:v<f;let F,le=!1;const O=1,ne=Math.ceil(e/O);for(let $=0;$<ne&&(F=Math.abs(g)>y,!(!F&&(h=Math.abs(f-p)<=P,h)));++$){E&&(le=p==f||p>f==B,le&&(g=-g*R,p=f));const Y=-i.tension*1e-6*(p-f),H=-i.friction*.001*g,xt=(Y+H)/i.mass;g=g+xt*O,p=p+g*O}}else{let y=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,l.durationProgress>0&&(l.elapsedTime=i.duration*l.durationProgress,b=l.elapsedTime+=e)),y=(i.progress||0)+b/this._memoizedDuration,y=y>1?1:y<0?0:y,l.durationProgress=y),p=v+i.easing(y)*(f-v),g=(p-l.lastPosition)/e,h=y==1}l.lastVelocity=g,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),h=!0)}a&&!a[m].done&&(h=!1),h?l.done=!0:t=!1,l.setValue(p,i.round)&&(r=!0)});const u=Q(this),d=u.getValue();if(t){const l=j(n.to);(d!==l||r)&&!i.decay?(u.setValue(l),this._onChange(l)):r&&i.decay&&this._onChange(d),this._stop()}else r&&this._onChange(d)}set(e){return w.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(K(this)){const{to:e,config:t}=this.animation;w.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let r;return c.und(e)?(r=this.queue||[],this.queue=[]):r=[c.obj(e)?e:{...t,to:e}],Promise.all(r.map(n=>this._update(n))).then(n=>pt(this,n))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Ae(this._state,e&&this._lastCallId),w.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:r,from:n}=e;r=c.obj(r)?r[t]:r,(r==null||ht(r))&&(r=void 0),n=c.obj(n)?n[t]:n,n==null&&(n=void 0);const s={to:r,from:n};return bt(this)||(e.reverse&&([r,n]=[n,r]),n=j(n),c.und(n)?Q(this)||this._set(r):this._set(n)),s}_update({...e},t){const{key:r,defaultProps:n}=this;e.default&&Object.assign(n,ft(e,(a,u)=>/^on/.test(u)?ir(a,r):a)),br(this,e,"onProps"),ke(this,"onProps",e,this);const s=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return cr(++this._lastCallId,{key:r,props:e,defaultProps:n,state:i,actions:{pause:()=>{Re(this)||(vr(this,!0),ge(i.pauseQueue),ke(this,"onPause",L(this,Ee(this,this.animation.to)),this))},resume:()=>{Re(this)&&(vr(this,!1),K(this)&&this._resume(),ge(i.resumeQueue),ke(this,"onResume",L(this,Ee(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const u=yr(e);if(u)return this._update(u,!0)}return a})}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(ue(this));const n=!c.und(e.to),s=!c.und(e.from);if(n||s)if(t.callId>this._lastToId)this._lastToId=t.callId;else return r(ue(this));const{key:i,defaultProps:a,animation:u}=this,{to:d,from:l}=u;let{to:m=d,from:f=l}=e;s&&!n&&(!t.default||c.und(m))&&(m=f),t.reverse&&([m,f]=[f,m]);const h=!W(f,l);h&&(u.from=f),f=j(f);const p=!W(m,d);p&&this._focus(m);const b=ht(t.to),{config:v}=u,{decay:S,velocity:g}=v;(n||s)&&(v.velocity=0),t.config&&!b&&Qn(v,te(t.config,i),t.config!==a.config?te(a.config,i):void 0);let P=Q(this);if(!P||c.und(m))return r(L(this,!0));const y=c.und(t.reset)?s&&!t.default:!c.und(f)&&Pe(t.reset,i),R=y?f:this.get(),E=xe(m),B=c.num(E)||c.arr(E)||Ue(E),F=!b&&(!B||Pe(a.immediate||t.immediate,i));if(p){const $=dt(m);if($!==P.constructor)if(F)P=this._set(E);else throw Error(`Cannot animate between ${P.constructor.name} and ${$.name}, as the "to" prop suggests`)}const le=P.constructor;let O=q(m),ne=!1;if(!O){const $=y||!bt(this)&&h;(p||$)&&(ne=W(xe(R),E),O=!ne),(!W(u.immediate,F)&&!F||!W(v.decay,S)||!W(v.velocity,g))&&(O=!0)}if(ne&&K(this)&&(u.changed&&!y?O=!0:O||this._stop(d)),!b&&((O||q(d))&&(u.values=P.getPayload(),u.toValues=q(m)?null:le==Le?[1]:N(E)),u.immediate!=F&&(u.immediate=F,!F&&!y&&this._set(d)),O)){const{onRest:$}=u;A(Xn,H=>br(this,t,H));const Y=L(this,Ee(this,d));ge(this._pendingCalls,Y),this._pendingCalls.add(r),u.changed&&w.batchedUpdates(()=>{var H;u.changed=!y,$==null||$(Y,this),y?te(a.onRest,Y):(H=u.onStart)==null||H.call(u,Y,this)})}y&&this._set(R),b?r(fr(t.to,t,this._state,this)):O?this._start():K(this)&&!p?this._pendingCalls.add(r):r(dr(R))}_focus(e){const t=this.animation;e!==t.to&&(Qt(this)&&this._detach(),t.to=e,Qt(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;q(t)&&(oe(t,this),gt(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;q(e)&&we(e,this)}_set(e,t=!0){const r=j(e);if(!c.und(r)){const n=Q(this);if(!n||!W(r,n.getValue())){const s=dt(r);!n||n.constructor!=s?ct(this,s.create(r)):n.setValue(r),n&&w.batchedUpdates(()=>{this._onChange(r,t)})}}return Q(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,ke(this,"onStart",L(this,Ee(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),te(this.animation.onChange,e,this)),te(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Q(this).reset(j(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),K(this)||(gr(this,!0),Re(this)||this._resume())}_resume(){M.skipAnimation?this.finish():Fe.start(this)}_stop(e,t){if(K(this)){gr(this,!1);const r=this.animation;A(r.values,s=>{s.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),be(this,{type:"idle",parent:this});const n=t?ue(this.get()):L(this.get(),Ee(this,e??r.to));ge(this._pendingCalls,n),r.changed&&(r.changed=!1,ke(this,"onRest",n,this))}}};function Ee(e,t){const r=xe(t),n=xe(e.get());return W(n,r)}function yr(e,t=e.loop,r=e.to){const n=te(t);if(n){const s=n!==!0&&or(n),i=(s||e).reverse,a=!s||s.reset;return Te({...e,loop:t,default:!1,pause:void 0,to:!i||ht(r)?r:void 0,from:a?e.from:void 0,reset:a,...s})}}function Te(e){const{to:t,from:r}=e=or(e),n=new Set;return c.obj(t)&&_r(t,n),c.obj(r)&&_r(r,n),e.keys=n.size?Array.from(n):null,e}function Hn(e){const t=Te(e);return c.und(t.default)&&(t.default=ft(t)),t}function _r(e,t){G(e,(r,n)=>r!=null&&t.add(n))}var Xn=["onStart","onRest","onChange","onPause","onResume"];function br(e,t,r){e.animation[r]=t[r]!==ar(t,r)?ir(t[r],e.key):void 0}function ke(e,t,...r){var n,s,i,a;(s=(n=e.animation)[t])==null||s.call(n,...r),(a=(i=e.defaultProps)[t])==null||a.call(i,...r)}var Jn=["onStart","onChange","onRest"],Zn=1,Kn=class{constructor(e,t){this.id=Zn++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,r)=>e[r]=t.get()),e}set(e){for(const t in e){const r=e[t];c.und(r)||this.springs[t].set(r)}}update(e){return e&&this.queue.push(Te(e)),this}start(e){let{queue:t}=this;return e?t=N(e).map(Te):this.queue=[],this._flush?this._flush(this,t):(Rr(this,t),wt(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const r=this.springs;A(N(t),n=>r[n].stop(!!e))}else Ae(this._state,this._lastAsyncId),this.each(r=>r.stop(!!e));return this}pause(e){if(c.und(e))this.start({pause:!0});else{const t=this.springs;A(N(e),r=>t[r].pause())}return this}resume(e){if(c.und(e))this.start({pause:!1});else{const t=this.springs;A(N(e),r=>t[r].resume())}return this}each(e){G(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:r}=this._events,n=this._active.size>0,s=this._changed.size>0;(n&&!this._started||s&&!this._started)&&(this._started=!0,pe(e,([u,d])=>{d.value=this.get(),u(d,this,this._item)}));const i=!n&&this._started,a=s||i&&r.size?this.get():null;s&&t.size&&pe(t,([u,d])=>{d.value=a,u(d,this,this._item)}),i&&(this._started=!1,pe(r,([u,d])=>{d.value=a,u(d,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;w.onFrame(this._onFrame)}};function wt(e,t){return Promise.all(t.map(r=>wr(e,r))).then(r=>pt(e,r))}async function wr(e,t,r){const{keys:n,to:s,from:i,loop:a,onRest:u,onResolve:d}=t,l=c.obj(t.default)&&t.default;a&&(t.loop=!1),s===!1&&(t.to=null),i===!1&&(t.from=null);const m=c.arr(s)||c.fun(s)?s:void 0;m?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):A(Jn,v=>{const S=t[v];if(c.fun(S)){const g=e._events[v];t[v]=({finished:P,cancelled:y})=>{const R=g.get(S);R?(P||(R.finished=!1),y&&(R.cancelled=!0)):g.set(S,{value:null,finished:P||!1,cancelled:y||!1})},l&&(l[v]=t[v])}});const f=e._state;t.pause===!f.paused?(f.paused=t.pause,ge(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);const h=(n||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),p=t.cancel===!0||ar(t,"cancel")===!0;(m||p&&f.asyncId)&&h.push(cr(++e._lastAsyncId,{props:t,state:f,actions:{pause:et,resume:et,start(v,S){p?(Ae(f,e._lastAsyncId),S(ue(e))):(v.onRest=u,S(fr(m,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});const b=pt(e,await Promise.all(h));if(a&&b.finished&&!(r&&b.noop)){const v=yr(t,a,s);if(v)return Rr(e,[v]),wr(e,v,!0)}return d&&w.batchedUpdates(()=>d(b,e,e.item)),b}function Sr(e,t){const r={...e.springs};return t&&A(N(t),n=>{c.und(n.keys)&&(n=Te(n)),c.obj(n.to)||(n={...n,to:void 0}),Ar(r,n,s=>xr(s))}),Pr(e,r),r}function Pr(e,t){G(t,(r,n)=>{e.springs[n]||(e.springs[n]=r,oe(r,e))})}function xr(e,t){const r=new Bn;return r.key=e,t&&oe(r,t),r}function Ar(e,t,r){t.keys&&A(t.keys,n=>{(e[n]||(e[n]=r(n)))._prepareNode(t)})}function Rr(e,t){A(t,r=>{Ar(e.springs,r,n=>xr(n,e))})}var es=Tt.createContext({pause:!1,immediate:!1}),ts=()=>{const e=[],t=function(n){Rn();const s=[];return A(e,(i,a)=>{if(c.und(n))s.push(i.start());else{const u=r(n,i,a);u&&s.push(i.start(u))}}),s};t.current=e,t.add=function(n){e.includes(n)||e.push(n)},t.delete=function(n){const s=e.indexOf(n);~s&&e.splice(s,1)},t.pause=function(){return A(e,n=>n.pause(...arguments)),this},t.resume=function(){return A(e,n=>n.resume(...arguments)),this},t.set=function(n){A(e,(s,i)=>{const a=c.fun(n)?n(i,s):n;a&&s.set(a)})},t.start=function(n){const s=[];return A(e,(i,a)=>{if(c.und(n))s.push(i.start());else{const u=this._getProps(n,i,a);u&&s.push(i.start(u))}}),s},t.stop=function(){return A(e,n=>n.stop(...arguments)),this},t.update=function(n){return A(e,(s,i)=>s.update(this._getProps(n,s,i))),this};const r=function(n,s,i){return c.fun(n)?n(i,s):n};return t._getProps=r,t};function rs(e,t,r){const n=c.fun(t)&&t;n&&!r&&(r=[]);const s=_.useMemo(()=>n||arguments.length==3?ts():void 0,[]),i=_.useRef(0),a=Zt(),u=_.useMemo(()=>({ctrls:[],queue:[],flush(g,P){const y=Sr(g,P);return i.current>0&&!u.queue.length&&!Object.keys(y).some(E=>!g.springs[E])?wt(g,P):new Promise(E=>{Pr(g,y),u.queue.push(()=>{E(wt(g,P))}),a()})}}),[]),d=_.useRef([...u.ctrls]),l=_.useRef([]),m=er(e)||0;_.useMemo(()=>{A(d.current.slice(e,m),g=>{Mn(g,s),g.stop(!0)}),d.current.length=e,f(m,e)},[e]),_.useMemo(()=>{f(0,Math.min(m,e))},r);function f(g,P){for(let y=g;y<P;y++){const R=d.current[y]||(d.current[y]=new Kn(null,u.flush)),E=n?n(y,R):t[y];E&&(l.current[y]=Hn(E))}}const h=d.current.map((g,P)=>Sr(g,l.current[P])),p=_.useContext(es),b=er(p),v=p!==b&&Un(p);lt(()=>{i.current++,u.ctrls=d.current;const{queue:g}=u;g.length&&(u.queue=[],A(g,P=>P())),A(d.current,(P,y)=>{s==null||s.add(P),v&&P.start({default:p});const R=l.current[y];R&&(zn(P,R.ref),P.ref?P.queue.push(R):P.start(R))})}),Kt(()=>()=>{A(u.ctrls,g=>g.stop(!0))});const S=h.map(g=>({...g}));return s?[S,s]:S}function Er(e,t){const r=c.fun(e),[[n],s]=rs(1,r?e:[e],r?[]:t);return r||arguments.length==2?[n,s]:n}var ns=class extends vt{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=ye(...t);const r=this._get(),n=dt(r);ct(this,n.create(r))}advance(e){const t=this._get(),r=this.get();W(t,r)||(Q(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Tr(this._active)&&St(this)}_get(){const e=c.arr(this.source)?this.source.map(j):N(j(this.source));return this.calc(...e)}_start(){this.idle&&!Tr(this._active)&&(this.idle=!1,A(Me(this),e=>{e.done=!1}),M.skipAnimation?(w.batchedUpdates(()=>this.advance()),St(this)):Fe.start(this))}_attach(){let e=1;A(N(this.source),t=>{q(t)&&oe(t,this),gt(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){A(N(this.source),e=>{q(e)&&we(e,this)}),this._active.clear(),St(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=N(this.source).reduce((t,r)=>Math.max(t,(gt(r)?r.priority:0)+1),0))}};function ss(e){return e.idle!==!1}function Tr(e){return!e.size||Array.from(e).every(ss)}function St(e){e.idle||(e.idle=!0,A(Me(e),t=>{t.done=!0}),be(e,{type:"idle",parent:e}))}M.assign({createStringInterpolator:Xt,to:(e,t)=>new ns(e,t)});var kr=/^--/;function is(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!kr.test(e)&&!(Ce.hasOwnProperty(e)&&Ce[e])?t+"px":(""+t).trim()}var Cr={};function as(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:n,style:s,children:i,scrollTop:a,scrollLeft:u,viewBox:d,...l}=t,m=Object.values(l),f=Object.keys(l).map(h=>r||e.hasAttribute(h)?h:Cr[h]||(Cr[h]=h.replace(/([A-Z])/g,p=>"-"+p.toLowerCase())));i!==void 0&&(e.textContent=i);for(const h in s)if(s.hasOwnProperty(h)){const p=is(h,s[h]);kr.test(h)?e.style.setProperty(h,p):e.style[h]=p}f.forEach((h,p)=>{e.setAttribute(h,m[p])}),n!==void 0&&(e.className=n),a!==void 0&&(e.scrollTop=a),u!==void 0&&(e.scrollLeft=u),d!==void 0&&e.setAttribute("viewBox",d)}var Ce={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},os=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),us=["Webkit","Ms","Moz","O"];Ce=Object.keys(Ce).reduce((e,t)=>(us.forEach(r=>e[os(r,t)]=e[t]),e),Ce);var ls=/^(matrix|translate|scale|rotate|skew)/,cs=/^(translate)/,ds=/^(rotate|skew)/,Pt=(e,t)=>c.num(e)&&e!==0?e+t:e,Ye=(e,t)=>c.arr(e)?e.every(r=>Ye(r,t)):c.num(e)?e===t:parseFloat(e)===t,fs=class extends Qe{constructor({x:e,y:t,z:r,...n}){const s=[],i=[];(e||t||r)&&(s.push([e||0,t||0,r||0]),i.push(a=>[`translate3d(${a.map(u=>Pt(u,"px")).join(",")})`,Ye(a,0)])),G(n,(a,u)=>{if(u==="transform")s.push([a||""]),i.push(d=>[d,d===""]);else if(ls.test(u)){if(delete n[u],c.und(a))return;const d=cs.test(u)?"px":ds.test(u)?"deg":"";s.push(N(a)),i.push(u==="rotate3d"?([l,m,f,h])=>[`rotate3d(${l},${m},${f},${Pt(h,d)})`,Ye(h,0)]:l=>[`${u}(${l.map(m=>Pt(m,d)).join(",")})`,Ye(l,u.startsWith("scale")?1:0)])}}),s.length&&(n.transform=new hs(s,i)),super(n)}},hs=class extends Yt{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return A(this.inputs,(r,n)=>{const s=j(r[0]),[i,a]=this.transforms[n](c.arr(s)?s:r.map(j));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&A(this.inputs,t=>A(t,r=>q(r)&&oe(r,this)))}observerRemoved(e){e==0&&A(this.inputs,t=>A(t,r=>q(r)&&we(r,this)))}eventObserved(e){e.type=="change"&&(this._value=null),be(this,e)}},ms=["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","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","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];M.assign({batchedUpdates:Qr.unstable_batchedUpdates,createStringInterpolator:Xt,colors:nn});var ps=Vn(ms,{applyAnimatedValues:as,createAnimatedStyle:e=>new fs(e),getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r}),Ir=ps.animated;const Or=_.createContext({}),gs=({children:e})=>{const{app:t}=I.useApplication(),r=_.useMemo(()=>{if(!t||!t.renderer)return null;const n=new V.Graphics;n.setFillStyle({color:"#1e1524"}),n.rect(0,0,1,1),n.fill();const s=t.renderer.generateTexture(n);return n.destroy(),s},[t==null?void 0:t.renderer]);return r?U.jsx(Or.Provider,{value:r,children:e}):null};class vs extends V.Particle{constructor(r,n,s,i,a,u){super({texture:r,x:n,y:s,scaleX:i,scaleY:a,alpha:0});ee(this,"animationProgress",0);ee(this,"delayCounter",0);ee(this,"randomSpeed");ee(this,"randomDelayOffset");ee(this,"startScaleX");ee(this,"startScaleY");this.texture=r,this.x=n,this.y=s,this.scaleX=i,this.scaleY=a,this.curLevel=u,this.startScaleX=i,this.startScaleY=a,this.curLevel=u,this.randomSpeed=.04+Math.random()*.04,this.randomDelayOffset=Math.floor(Math.random()*150)}update(){if(this.delayCounter<this.curLevel*15+this.randomDelayOffset){this.delayCounter++;return}const r=1;this.animationProgress+=(r-this.animationProgress)*this.randomSpeed,this.alpha=this.animationProgress}}class ys{constructor(t,r){ee(this,"cells",[]);this.texture=t,this.particleContainerRefCurrent=r,this.texture=t}add(t,r,n,s,i){const a=new vs(this.texture,t,r,n,s,i);this.particleContainerRefCurrent.addParticle(a),this.cells.push(a)}updateAll(){for(const t of this.cells)t.update()}}const _s=({gridRows:e,gridCols:t,cellWidth:r,cellHeight:n,gridDepth:s})=>{const i=_.useContext(Or),a=_.useRef(null),u=_.useRef(null);_.useEffect(()=>{a.current&&(u.current=new ys(i,a.current),d(0,0,r,n,t,e,s,a.current))},[]),I.useTick(()=>{var l;(l=u.current)==null||l.updateAll()});const d=(l,m,f,h,p,b,v,S)=>{var g;for(let P=0;P<b;P++)for(let y=0;y<p;y++){const R=l+y*f,E=m+P*h;v<=0||Math.random()>.7&&v<s?Math.random()>.1&&((g=u.current)==null||g.add(R,E,f-1,h-1,v)):d(R,E,f/p,h/b,p,b,v-1)}};return U.jsx("pixiParticleContainer",{ref:a,dynamicProperties:{position:!0,vertex:!0,color:!0}})},bs=({cellWidth:e,cellHeight:t,gridRows:r,gridCols:n,gridDepth:s})=>U.jsx(gs,{children:U.jsx(_s,{cellWidth:e,cellHeight:t,gridCols:n,gridRows:r,gridDepth:s})}),ws=e=>U.jsx("svg",{viewBox:"10 0 489.935 489.935",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:U.jsx("path",{d:`M278.235,33.267c-116.7,0-211.6,95-211.6,211.7v0.7l-41.9-63.1c-4.1-6.2-12.5-7.9-18.7-3.8c-6.2,4.1-7.9,12.5-3.8,18.7 \r
|
|
22
|
+
<%s key={someKey} {...props} />`,k,C,ce,C),Mr[C+k]=!0)}if(C=null,T!==void 0&&(r(T),C=""+T),a(P)&&(r(P.key),C=""+P.key),"key"in P){T={};for(var Et in P)Et!=="key"&&(T[Et]=P[Et])}else T=P;return C&&u(T,typeof o=="function"?o.displayName||o.name||"Unknown":o),l(o,C,T,s(),We,Rt)}function h(o){d(o)?o._store&&(o._store.validated=1):typeof o=="object"&&o!==null&&o.$$typeof===O&&(o._payload.status==="fulfilled"?d(o._payload.value)&&o._payload.value._store&&(o._payload.value._store.validated=1):o._store&&(o._store.validated=1))}function d(o){return typeof o=="object"&&o!==null&&o.$$typeof===b}var m=y,b=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),R=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),Y=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,Pt=Array.isArray,At=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(o){return o()}};var $r,Dr={},qr=m.react_stack_bottom_frame.bind(m,i)(),Ur=At(n(i)),Mr={};fe.Fragment=S,fe.jsx=function(o,P,T){var k=1e4>Y.recentlyCreatedOwnerStacks++;return p(o,P,T,!1,k?Error("react-stack-top-frame"):qr,k?At(n(o)):Ur)},fe.jsxs=function(o,P,T){var k=1e4>Y.recentlyCreatedOwnerStacks++;return p(o,P,T,!0,k?Error("react-stack-top-frame"):qr,k?At(n(o)):Ur)}})()),fe}var It;function Hr(){return It||(It=1,process.env.NODE_ENV==="production"?Ie.exports=Wr():Ie.exports=Br()),Ie.exports}var U=Hr(),Be=me(),w=e=>he(e,Be),He=me();w.write=e=>he(e,He);var Oe=me();w.onStart=e=>he(e,Oe);var Xe=me();w.onFrame=e=>he(e,Xe);var Je=me();w.onFinish=e=>he(e,Je);var se=[];w.setTimeout=(e,t)=>{const r=w.now()+t,n=()=>{const i=se.findIndex(a=>a.cancel==n);~i&&se.splice(i,1),J-=~i?1:0},s={time:r,handler:e,cancel:n};return se.splice(Ot(r),0,s),J+=1,jt(),s};var Ot=e=>~(~se.findIndex(t=>t.time>e)||~se.length);w.cancel=e=>{Oe.delete(e),Xe.delete(e),Je.delete(e),Be.delete(e),He.delete(e)},w.sync=e=>{Ke=!0,w.batchedUpdates(e),Ke=!1},w.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...s){t=s,w.onStart(r)}return n.handler=e,n.cancel=()=>{Oe.delete(r),t=null},n};var Ze=typeof window<"u"?window.requestAnimationFrame:(()=>{});w.use=e=>Ze=e,w.now=typeof performance<"u"?()=>performance.now():Date.now,w.batchedUpdates=e=>e(),w.catch=console.error,w.frameLoop="always",w.advance=()=>{w.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Vt()};var X=-1,J=0,Ke=!1;function he(e,t){Ke?(t.delete(e),e(0)):(t.add(e),jt())}function jt(){X<0&&(X=0,w.frameLoop!=="demand"&&Ze(Ft))}function Xr(){X=-1}function Ft(){~X&&(Ze(Ft),w.batchedUpdates(Vt))}function Vt(){const e=X;X=w.now();const t=Ot(X);if(t&&(Nt(se.splice(0,t),r=>r.handler()),J-=t),!J){Xr();return}Oe.flush(),Be.flush(e?Math.min(64,X-e):16.667),Xe.flush(),He.flush(),Je.flush()}function me(){let e=new Set,t=e;return{add(r){J+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return J-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,J-=t.size,Nt(t,n=>n(r)&&e.add(n)),J+=e.size,t=e)}}}function Nt(e,t){e.forEach(r=>{try{t(r)}catch(n){w.catch(n)}})}var Jr=Object.defineProperty,Zr=(e,t)=>{for(var r in t)Jr(e,r,{get:t[r],enumerable:!0})},M={};Zr(M,{assign:()=>en,colors:()=>Z,createStringInterpolator:()=>rt,skipAnimation:()=>Dt,to:()=>$t,willAdvance:()=>nt});function et(){}var Kr=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),c={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function W(e,t){if(c.arr(e)){if(!c.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var A=(e,t)=>e.forEach(t);function G(e,t,r){if(c.arr(e)){for(let n=0;n<e.length;n++)t.call(r,e[n],`${n}`);return}for(const n in e)e.hasOwnProperty(n)&&t.call(r,e[n],n)}var N=e=>c.und(e)?[]:c.arr(e)?e:[e];function pe(e,t){if(e.size){const r=Array.from(e);e.clear(),A(r,t)}}var ge=(e,...t)=>pe(e,r=>r(...t)),tt=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),rt,$t,Z=null,Dt=!1,nt=et,en=e=>{e.to&&($t=e.to),e.now&&(w.now=e.now),e.colors!==void 0&&(Z=e.colors),e.skipAnimation!=null&&(Dt=e.skipAnimation),e.createStringInterpolator&&(rt=e.createStringInterpolator),e.requestAnimationFrame&&w.use(e.requestAnimationFrame),e.batchedUpdates&&(w.batchedUpdates=e.batchedUpdates),e.willAdvance&&(nt=e.willAdvance),e.frameLoop&&(w.frameLoop=e.frameLoop)},ve=new Set,D=[],st=[],je=0,Fe={get idle(){return!ve.size&&!D.length},start(e){je>e.priority?(ve.add(e),w.onStart(tn)):(qt(e),w(it))},advance:it,sort(e){if(je)w.onFrame(()=>Fe.sort(e));else{const t=D.indexOf(e);~t&&(D.splice(t,1),Ut(e))}},clear(){D=[],ve.clear()}};function tn(){ve.forEach(qt),ve.clear(),w(it)}function qt(e){D.includes(e)||Ut(e)}function Ut(e){D.splice(rn(D,t=>t.priority>e.priority),0,e)}function it(e){const t=st;for(let r=0;r<D.length;r++){const n=D[r];je=n.priority,n.idle||(nt(n),n.advance(e),n.idle||t.push(n))}return je=0,st=D,st.length=0,D=t,D.length>0}function rn(e,t){const r=e.findIndex(t);return r<0?e.length:r}var nn={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},z="[-+]?\\d*\\.?\\d+",Ve=z+"%";function Ne(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var sn=new RegExp("rgb"+Ne(z,z,z)),an=new RegExp("rgba"+Ne(z,z,z,z)),on=new RegExp("hsl"+Ne(z,Ve,Ve)),un=new RegExp("hsla"+Ne(z,Ve,Ve,z)),ln=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,cn=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,dn=/^#([0-9a-fA-F]{6})$/,fn=/^#([0-9a-fA-F]{8})$/;function hn(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=dn.exec(e))?parseInt(t[1]+"ff",16)>>>0:Z&&Z[e]!==void 0?Z[e]:(t=sn.exec(e))?(ie(t[1])<<24|ie(t[2])<<16|ie(t[3])<<8|255)>>>0:(t=an.exec(e))?(ie(t[1])<<24|ie(t[2])<<16|ie(t[3])<<8|Lt(t[4]))>>>0:(t=ln.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=fn.exec(e))?parseInt(t[1],16)>>>0:(t=cn.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=on.exec(e))?(Mt(zt(t[1]),$e(t[2]),$e(t[3]))|255)>>>0:(t=un.exec(e))?(Mt(zt(t[1]),$e(t[2]),$e(t[3]))|Lt(t[4]))>>>0:null}function at(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Mt(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,s=2*r-n,i=at(s,n,e+1/3),a=at(s,n,e),u=at(s,n,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(u*255)<<8}function ie(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function zt(e){return(parseFloat(e)%360+360)%360/360}function Lt(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function $e(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Gt(e){let t=hn(e);if(t===null)return e;t=t||0;const r=(t&4278190080)>>>24,n=(t&16711680)>>>16,s=(t&65280)>>>8,i=(t&255)/255;return`rgba(${r}, ${n}, ${s}, ${i})`}var ye=(e,t,r)=>{if(c.fun(e))return e;if(c.arr(e))return ye({range:e,output:t,extrapolate:r});if(c.str(e.output[0]))return rt(e);const n=e,s=n.output,i=n.range||[0,1],a=n.extrapolateLeft||n.extrapolate||"extend",u=n.extrapolateRight||n.extrapolate||"extend",f=n.easing||(l=>l);return l=>{const p=pn(l,i);return mn(l,i[p],i[p+1],s[p],s[p+1],f,a,u,n.map)}};function mn(e,t,r,n,s,i,a,u,f){let l=f?f(e):e;if(l<t){if(a==="identity")return l;a==="clamp"&&(l=t)}if(l>r){if(u==="identity")return l;u==="clamp"&&(l=r)}return n===s?n:t===r?e<=t?n:s:(t===-1/0?l=-l:r===1/0?l=l-t:l=(l-t)/(r-t),l=i(l),n===-1/0?l=-l:s===1/0?l=l+n:l=l*(s-n)+n,l)}function pn(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}var gn={linear:e=>e},_e=Symbol.for("FluidValue.get"),ae=Symbol.for("FluidValue.observers"),q=e=>!!(e&&e[_e]),j=e=>e&&e[_e]?e[_e]():e,Qt=e=>e[ae]||null;function vn(e,t){e.eventObserved?e.eventObserved(t):e(t)}function be(e,t){const r=e[ae];r&&r.forEach(n=>{vn(n,t)})}var Yt=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");yn(this,e)}},yn=(e,t)=>Wt(e,_e,t);function oe(e,t){if(e[_e]){let r=e[ae];r||Wt(e,ae,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function we(e,t){const r=e[ae];if(r&&r.has(t)){const n=r.size-1;n?r.delete(t):e[ae]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var Wt=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),De=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_n=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Bt=new RegExp(`(${De.source})(%|[a-z]+)`,"i"),bn=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,qe=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Ht=e=>{const[t,r]=wn(e);if(!t||tt())return e;const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){const s=window.getComputedStyle(document.documentElement).getPropertyValue(r);return s||e}else{if(r&&qe.test(r))return Ht(r);if(r)return r}return e},wn=e=>{const t=qe.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]},ot,Sn=(e,t,r,n,s)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${s})`,Xt=e=>{ot||(ot=Z?new RegExp(`(${Object.keys(Z).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>j(i).replace(qe,Ht).replace(_n,Gt).replace(ot,Gt)),r=t.map(i=>i.match(De).map(Number)),s=r[0].map((i,a)=>r.map(u=>{if(!(a in u))throw Error('The arity of each "output" value must be equal');return u[a]})).map(i=>ye({...e,output:i}));return i=>{var f;const a=!Bt.test(t[0])&&((f=t.find(l=>Bt.test(l)))==null?void 0:f.replace(De,""));let u=0;return t[0].replace(De,()=>`${s[u++](i)}${a||""}`).replace(bn,Sn)}},ut="react-spring: ",Jt=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${ut}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},xn=Jt(console.warn);function Pn(){xn(`${ut}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var An=Jt(console.warn);function Rn(){An(`${ut}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Ue(e){return c.str(e)&&(e[0]=="#"||/\d/.test(e)||!tt()&&qe.test(e)||e in(Z||{}))}var lt=tt()?y.useEffect:y.useLayoutEffect,En=()=>{const e=y.useRef(!1);return lt(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Zt(){const e=y.useState()[1],t=En();return()=>{t.current&&e(Math.random())}}var Kt=e=>y.useEffect(e,Tn),Tn=[];function er(e){const t=y.useRef(void 0);return y.useEffect(()=>{t.current=e}),t.current}var Se=Symbol.for("Animated:node"),kn=e=>!!e&&e[Se]===e,Q=e=>e&&e[Se],ct=(e,t)=>Kr(e,Se,t),Me=e=>e&&e[Se]&&e[Se].getPayload(),tr=class{constructor(){ct(this,this)}getPayload(){return this.payload||[]}},ze=class zr extends tr{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,c.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new zr(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,r){return c.num(t)&&(this.lastPosition=t,r&&(t=Math.round(t/r)*r,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,c.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Le=class Lr extends ze{constructor(t){super(0),this._string=null,this._toString=ye({output:[t,t]})}static create(t){return new Lr(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(c.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=ye({output:[this.getValue(),t]})),this._value=0,super.reset()}},Ge={dependencies:null},Qe=class extends tr{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return G(this.source,(r,n)=>{kn(r)?t[n]=r.getValue(e):q(r)?t[n]=j(r):e||(t[n]=r)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&A(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return G(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ge.dependencies&&q(e)&&Ge.dependencies.add(e);const t=Me(e);t&&A(t,r=>this.add(r))}},Cn=class Gr extends Qe{constructor(t){super(t)}static create(t){return new Gr(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const r=this.getPayload();return t.length==r.length?r.map((n,s)=>n.setValue(t[s])).some(Boolean):(super.setValue(t.map(In)),!0)}};function In(e){return(Ue(e)?Le:ze).create(e)}function dt(e){const t=Q(e);return t?t.constructor:c.arr(e)?Cn:Ue(e)?Le:ze}var rr=(e,t)=>{const r=!c.fun(e)||e.prototype&&e.prototype.isReactComponent;return y.forwardRef((n,s)=>{const i=y.useRef(null),a=r&&y.useCallback(b=>{i.current=Fn(s,b)},[s]),[u,f]=jn(n,t),l=Zt(),p=()=>{const b=i.current;if(r&&!b)return;(b?t.applyAnimatedValues(b,u.getValue(!0)):!1)===!1&&l()},h=new On(p,f),d=y.useRef(void 0);lt(()=>(d.current=h,A(f,b=>oe(b,h)),()=>{d.current&&(A(d.current.deps,b=>we(b,d.current)),w.cancel(d.current.update))})),y.useEffect(p,[]),Kt(()=>()=>{const b=d.current;A(b.deps,v=>we(v,b))});const m=t.getComponentProps(u.getValue());return Tt.createElement(e,{...m,ref:a})})},On=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&w.write(this.update)}};function jn(e,t){const r=new Set;return Ge.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Qe(e),Ge.dependencies=null,[e,r]}function Fn(e,t){return e&&(c.fun(e)?e(t):e.current=t),t}var nr=Symbol.for("AnimatedComponent"),Vn=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=s=>new Qe(s),getComponentProps:n=s=>s}={})=>{const s={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},i=a=>{const u=sr(a)||"Anonymous";return c.str(a)?a=i[a]||(i[a]=rr(a,s)):a=a[nr]||(a[nr]=rr(a,s)),a.displayName=`Animated(${u})`,a};return G(e,(a,u)=>{c.arr(e)&&(u=sr(a)),i[u]=i(a)}),{animated:i}},sr=e=>c.str(e)?e:e&&c.str(e.displayName)?e.displayName:c.fun(e)&&e.name||null;function te(e,...t){return c.fun(e)?e(...t):e}var xe=(e,t)=>e===!0||!!(t&&e&&(c.fun(e)?e(t):N(e).includes(t))),ir=(e,t)=>c.obj(e)?t&&e[t]:e,ar=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Nn=e=>e,ft=(e,t=Nn)=>{let r=$n;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const n={};for(const s of r){const i=t(e[s],s);c.und(i)||(n[s]=i)}return n},$n=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Dn={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function qn(e){const t={};let r=0;if(G(e,(n,s)=>{Dn[s]||(t[s]=n,r++)}),r)return t}function or(e){const t=qn(e);if(t){const r={to:t};return G(e,(n,s)=>s in t||(r[s]=n)),r}return{...e}}function Pe(e){return e=j(e),c.arr(e)?e.map(Pe):Ue(e)?M.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Un(e){for(const t in e)return!0;return!1}function ht(e){return c.fun(e)||c.arr(e)&&c.obj(e[0])}function Mn(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function zn(e,t){var r;t&&e.ref!==t&&((r=e.ref)==null||r.delete(e),t.add(e),e.ref=t)}var Ln={default:{tension:170,friction:26}},mt={...Ln.default,mass:1,damping:1,easing:gn.linear,clamp:!1},Gn=class{constructor(){this.velocity=0,Object.assign(this,mt)}};function Qn(e,t,r){r&&(r={...r},ur(r,t),t={...r,...t}),ur(e,t),Object.assign(e,t);for(const a in mt)e[a]==null&&(e[a]=mt[a]);let{frequency:n,damping:s}=e;const{mass:i}=e;return c.und(n)||(n<.01&&(n=.01),s<0&&(s=0),e.tension=Math.pow(2*Math.PI/n,2)*i,e.friction=4*Math.PI*s*i/n),e}function ur(e,t){if(!c.und(t.decay))e.duration=void 0;else{const r=!c.und(t.tension)||!c.und(t.friction);(r||!c.und(t.frequency)||!c.und(t.damping)||!c.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var lr=[],Yn=class{constructor(){this.changed=!1,this.values=lr,this.toValues=null,this.fromValues=lr,this.config=new Gn,this.immediate=!1}};function cr(e,{key:t,props:r,defaultProps:n,state:s,actions:i}){return new Promise((a,u)=>{let f,l,p=xe(r.cancel??(n==null?void 0:n.cancel),t);if(p)m();else{c.und(r.pause)||(s.paused=xe(r.pause,t));let b=n==null?void 0:n.pause;b!==!0&&(b=s.paused||xe(b,t)),f=te(r.delay||0,t),b?(s.resumeQueue.add(d),i.pause()):(i.resume(),d())}function h(){s.resumeQueue.add(d),s.timeouts.delete(l),l.cancel(),f=l.time-w.now()}function d(){f>0&&!M.skipAnimation?(s.delayed=!0,l=w.setTimeout(m,f),s.pauseQueue.add(h),s.timeouts.add(l)):m()}function m(){s.delayed&&(s.delayed=!1),s.pauseQueue.delete(h),s.timeouts.delete(l),e<=(s.cancelId||0)&&(p=!0);try{i.start({...r,callId:e,cancel:p},a)}catch(b){u(b)}}})}var pt=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?ue(e.get()):t.every(r=>r.noop)?dr(e.get()):L(e.get(),t.every(r=>r.finished)),dr=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),L=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),ue=e=>({value:e,cancelled:!0,finished:!1});function fr(e,t,r,n){const{callId:s,parentId:i,onRest:a}=t,{asyncTo:u,promise:f}=r;return!i&&e===u&&!t.reset?f:r.promise=(async()=>{r.asyncId=s,r.asyncTo=e;const l=ft(t,(S,g)=>g==="onRest"?void 0:S);let p,h;const d=new Promise((S,g)=>(p=S,h=g)),m=S=>{const g=s<=(r.cancelId||0)&&ue(n)||s!==r.asyncId&&L(n,!1);if(g)throw S.result=g,h(S),S},b=(S,g)=>{const x=new hr,_=new mr;return(async()=>{if(M.skipAnimation)throw Ae(r),_.result=L(n,!1),h(_),_;m(x);const R=c.obj(S)?{...S}:{...g,to:S};R.parentId=s,G(l,(B,F)=>{c.und(R[F])&&(R[F]=B)});const E=await n.start(R);return m(x),r.paused&&await new Promise(B=>{r.resumeQueue.add(B)}),E})()};let v;if(M.skipAnimation)return Ae(r),L(n,!1);try{let S;c.arr(e)?S=(async g=>{for(const x of g)await b(x)})(e):S=Promise.resolve(e(b,n.stop.bind(n))),await Promise.all([S.then(p),d]),v=L(n.get(),!0,!1)}catch(S){if(S instanceof hr)v=S.result;else if(S instanceof mr)v=S.result;else throw S}finally{s==r.asyncId&&(r.asyncId=i,r.asyncTo=i?u:void 0,r.promise=i?f:void 0)}return c.fun(a)&&w.batchedUpdates(()=>{a(v,n,n.item)}),v})()}function Ae(e,t){pe(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var hr=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},mr=class extends Error{constructor(){super("SkipAnimationSignal")}},gt=e=>e instanceof vt,Wn=1,vt=class extends Yt{constructor(){super(...arguments),this.id=Wn++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Q(this);return e&&e.getValue()}to(...e){return M.to(this,e)}interpolate(...e){return Pn(),M.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){be(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Fe.sort(this),be(this,{type:"priority",parent:this,priority:e})}},re=Symbol.for("SpringPhase"),pr=1,yt=2,_t=4,bt=e=>(e[re]&pr)>0,K=e=>(e[re]&yt)>0,Re=e=>(e[re]&_t)>0,gr=(e,t)=>t?e[re]|=yt|pr:e[re]&=~yt,vr=(e,t)=>t?e[re]|=_t:e[re]&=~_t,Bn=class extends vt{constructor(e,t){if(super(),this.animation=new Yn,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!c.und(e)||!c.und(t)){const r=c.obj(e)?{...e}:{...t,from:e};c.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(K(this)||this._state.asyncTo)||Re(this)}get goal(){return j(this.animation.to)}get velocity(){const e=Q(this);return e instanceof ze?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return bt(this)}get isAnimating(){return K(this)}get isPaused(){return Re(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const n=this.animation;let{toValues:s}=n;const{config:i}=n,a=Me(n.to);!a&&q(n.to)&&(s=N(j(n.to))),n.values.forEach((l,p)=>{if(l.done)return;const h=l.constructor==Le?1:a?a[p].lastPosition:s[p];let d=n.immediate,m=h;if(!d){if(m=l.lastPosition,i.tension<=0){l.done=!0;return}let b=l.elapsedTime+=e;const v=n.fromValues[p],S=l.v0!=null?l.v0:l.v0=c.arr(i.velocity)?i.velocity[p]:i.velocity;let g;const x=i.precision||(v==h?.005:Math.min(1,Math.abs(h-v)*.001));if(c.und(i.duration))if(i.decay){const _=i.decay===!0?.998:i.decay,R=Math.exp(-(1-_)*b);m=v+S/(1-_)*(1-R),d=Math.abs(l.lastPosition-m)<=x,g=S*R}else{g=l.lastVelocity==null?S:l.lastVelocity;const _=i.restVelocity||x/10,R=i.clamp?0:i.bounce,E=!c.und(R),B=v==h?l.v0>0:v<h;let F,le=!1;const O=1,ne=Math.ceil(e/O);for(let $=0;$<ne&&(F=Math.abs(g)>_,!(!F&&(d=Math.abs(h-m)<=x,d)));++$){E&&(le=m==h||m>h==B,le&&(g=-g*R,m=h));const Y=-i.tension*1e-6*(m-h),H=-i.friction*.001*g,Pt=(Y+H)/i.mass;g=g+Pt*O,m=m+g*O}}else{let _=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,l.durationProgress>0&&(l.elapsedTime=i.duration*l.durationProgress,b=l.elapsedTime+=e)),_=(i.progress||0)+b/this._memoizedDuration,_=_>1?1:_<0?0:_,l.durationProgress=_),m=v+i.easing(_)*(h-v),g=(m-l.lastPosition)/e,d=_==1}l.lastVelocity=g,Number.isNaN(m)&&(console.warn("Got NaN while animating:",this),d=!0)}a&&!a[p].done&&(d=!1),d?l.done=!0:t=!1,l.setValue(m,i.round)&&(r=!0)});const u=Q(this),f=u.getValue();if(t){const l=j(n.to);(f!==l||r)&&!i.decay?(u.setValue(l),this._onChange(l)):r&&i.decay&&this._onChange(f),this._stop()}else r&&this._onChange(f)}set(e){return w.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(K(this)){const{to:e,config:t}=this.animation;w.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let r;return c.und(e)?(r=this.queue||[],this.queue=[]):r=[c.obj(e)?e:{...t,to:e}],Promise.all(r.map(n=>this._update(n))).then(n=>pt(this,n))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Ae(this._state,e&&this._lastCallId),w.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:r,from:n}=e;r=c.obj(r)?r[t]:r,(r==null||ht(r))&&(r=void 0),n=c.obj(n)?n[t]:n,n==null&&(n=void 0);const s={to:r,from:n};return bt(this)||(e.reverse&&([r,n]=[n,r]),n=j(n),c.und(n)?Q(this)||this._set(r):this._set(n)),s}_update({...e},t){const{key:r,defaultProps:n}=this;e.default&&Object.assign(n,ft(e,(a,u)=>/^on/.test(u)?ir(a,r):a)),br(this,e,"onProps"),ke(this,"onProps",e,this);const s=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return cr(++this._lastCallId,{key:r,props:e,defaultProps:n,state:i,actions:{pause:()=>{Re(this)||(vr(this,!0),ge(i.pauseQueue),ke(this,"onPause",L(this,Ee(this,this.animation.to)),this))},resume:()=>{Re(this)&&(vr(this,!1),K(this)&&this._resume(),ge(i.resumeQueue),ke(this,"onResume",L(this,Ee(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const u=yr(e);if(u)return this._update(u,!0)}return a})}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(ue(this));const n=!c.und(e.to),s=!c.und(e.from);if(n||s)if(t.callId>this._lastToId)this._lastToId=t.callId;else return r(ue(this));const{key:i,defaultProps:a,animation:u}=this,{to:f,from:l}=u;let{to:p=f,from:h=l}=e;s&&!n&&(!t.default||c.und(p))&&(p=h),t.reverse&&([p,h]=[h,p]);const d=!W(h,l);d&&(u.from=h),h=j(h);const m=!W(p,f);m&&this._focus(p);const b=ht(t.to),{config:v}=u,{decay:S,velocity:g}=v;(n||s)&&(v.velocity=0),t.config&&!b&&Qn(v,te(t.config,i),t.config!==a.config?te(a.config,i):void 0);let x=Q(this);if(!x||c.und(p))return r(L(this,!0));const _=c.und(t.reset)?s&&!t.default:!c.und(h)&&xe(t.reset,i),R=_?h:this.get(),E=Pe(p),B=c.num(E)||c.arr(E)||Ue(E),F=!b&&(!B||xe(a.immediate||t.immediate,i));if(m){const $=dt(p);if($!==x.constructor)if(F)x=this._set(E);else throw Error(`Cannot animate between ${x.constructor.name} and ${$.name}, as the "to" prop suggests`)}const le=x.constructor;let O=q(p),ne=!1;if(!O){const $=_||!bt(this)&&d;(m||$)&&(ne=W(Pe(R),E),O=!ne),(!W(u.immediate,F)&&!F||!W(v.decay,S)||!W(v.velocity,g))&&(O=!0)}if(ne&&K(this)&&(u.changed&&!_?O=!0:O||this._stop(f)),!b&&((O||q(f))&&(u.values=x.getPayload(),u.toValues=q(p)?null:le==Le?[1]:N(E)),u.immediate!=F&&(u.immediate=F,!F&&!_&&this._set(f)),O)){const{onRest:$}=u;A(Xn,H=>br(this,t,H));const Y=L(this,Ee(this,f));ge(this._pendingCalls,Y),this._pendingCalls.add(r),u.changed&&w.batchedUpdates(()=>{var H;u.changed=!_,$==null||$(Y,this),_?te(a.onRest,Y):(H=u.onStart)==null||H.call(u,Y,this)})}_&&this._set(R),b?r(fr(t.to,t,this._state,this)):O?this._start():K(this)&&!m?this._pendingCalls.add(r):r(dr(R))}_focus(e){const t=this.animation;e!==t.to&&(Qt(this)&&this._detach(),t.to=e,Qt(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;q(t)&&(oe(t,this),gt(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;q(e)&&we(e,this)}_set(e,t=!0){const r=j(e);if(!c.und(r)){const n=Q(this);if(!n||!W(r,n.getValue())){const s=dt(r);!n||n.constructor!=s?ct(this,s.create(r)):n.setValue(r),n&&w.batchedUpdates(()=>{this._onChange(r,t)})}}return Q(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,ke(this,"onStart",L(this,Ee(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),te(this.animation.onChange,e,this)),te(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Q(this).reset(j(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),K(this)||(gr(this,!0),Re(this)||this._resume())}_resume(){M.skipAnimation?this.finish():Fe.start(this)}_stop(e,t){if(K(this)){gr(this,!1);const r=this.animation;A(r.values,s=>{s.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),be(this,{type:"idle",parent:this});const n=t?ue(this.get()):L(this.get(),Ee(this,e??r.to));ge(this._pendingCalls,n),r.changed&&(r.changed=!1,ke(this,"onRest",n,this))}}};function Ee(e,t){const r=Pe(t),n=Pe(e.get());return W(n,r)}function yr(e,t=e.loop,r=e.to){const n=te(t);if(n){const s=n!==!0&&or(n),i=(s||e).reverse,a=!s||s.reset;return Te({...e,loop:t,default:!1,pause:void 0,to:!i||ht(r)?r:void 0,from:a?e.from:void 0,reset:a,...s})}}function Te(e){const{to:t,from:r}=e=or(e),n=new Set;return c.obj(t)&&_r(t,n),c.obj(r)&&_r(r,n),e.keys=n.size?Array.from(n):null,e}function Hn(e){const t=Te(e);return c.und(t.default)&&(t.default=ft(t)),t}function _r(e,t){G(e,(r,n)=>r!=null&&t.add(n))}var Xn=["onStart","onRest","onChange","onPause","onResume"];function br(e,t,r){e.animation[r]=t[r]!==ar(t,r)?ir(t[r],e.key):void 0}function ke(e,t,...r){var n,s,i,a;(s=(n=e.animation)[t])==null||s.call(n,...r),(a=(i=e.defaultProps)[t])==null||a.call(i,...r)}var Jn=["onStart","onChange","onRest"],Zn=1,Kn=class{constructor(e,t){this.id=Zn++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,r)=>e[r]=t.get()),e}set(e){for(const t in e){const r=e[t];c.und(r)||this.springs[t].set(r)}}update(e){return e&&this.queue.push(Te(e)),this}start(e){let{queue:t}=this;return e?t=N(e).map(Te):this.queue=[],this._flush?this._flush(this,t):(Rr(this,t),wt(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const r=this.springs;A(N(t),n=>r[n].stop(!!e))}else Ae(this._state,this._lastAsyncId),this.each(r=>r.stop(!!e));return this}pause(e){if(c.und(e))this.start({pause:!0});else{const t=this.springs;A(N(e),r=>t[r].pause())}return this}resume(e){if(c.und(e))this.start({pause:!1});else{const t=this.springs;A(N(e),r=>t[r].resume())}return this}each(e){G(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:r}=this._events,n=this._active.size>0,s=this._changed.size>0;(n&&!this._started||s&&!this._started)&&(this._started=!0,pe(e,([u,f])=>{f.value=this.get(),u(f,this,this._item)}));const i=!n&&this._started,a=s||i&&r.size?this.get():null;s&&t.size&&pe(t,([u,f])=>{f.value=a,u(f,this,this._item)}),i&&(this._started=!1,pe(r,([u,f])=>{f.value=a,u(f,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;w.onFrame(this._onFrame)}};function wt(e,t){return Promise.all(t.map(r=>wr(e,r))).then(r=>pt(e,r))}async function wr(e,t,r){const{keys:n,to:s,from:i,loop:a,onRest:u,onResolve:f}=t,l=c.obj(t.default)&&t.default;a&&(t.loop=!1),s===!1&&(t.to=null),i===!1&&(t.from=null);const p=c.arr(s)||c.fun(s)?s:void 0;p?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):A(Jn,v=>{const S=t[v];if(c.fun(S)){const g=e._events[v];t[v]=({finished:x,cancelled:_})=>{const R=g.get(S);R?(x||(R.finished=!1),_&&(R.cancelled=!0)):g.set(S,{value:null,finished:x||!1,cancelled:_||!1})},l&&(l[v]=t[v])}});const h=e._state;t.pause===!h.paused?(h.paused=t.pause,ge(t.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(t.pause=!0);const d=(n||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),m=t.cancel===!0||ar(t,"cancel")===!0;(p||m&&h.asyncId)&&d.push(cr(++e._lastAsyncId,{props:t,state:h,actions:{pause:et,resume:et,start(v,S){m?(Ae(h,e._lastAsyncId),S(ue(e))):(v.onRest=u,S(fr(p,v,h,e)))}}})),h.paused&&await new Promise(v=>{h.resumeQueue.add(v)});const b=pt(e,await Promise.all(d));if(a&&b.finished&&!(r&&b.noop)){const v=yr(t,a,s);if(v)return Rr(e,[v]),wr(e,v,!0)}return f&&w.batchedUpdates(()=>f(b,e,e.item)),b}function Sr(e,t){const r={...e.springs};return t&&A(N(t),n=>{c.und(n.keys)&&(n=Te(n)),c.obj(n.to)||(n={...n,to:void 0}),Ar(r,n,s=>Pr(s))}),xr(e,r),r}function xr(e,t){G(t,(r,n)=>{e.springs[n]||(e.springs[n]=r,oe(r,e))})}function Pr(e,t){const r=new Bn;return r.key=e,t&&oe(r,t),r}function Ar(e,t,r){t.keys&&A(t.keys,n=>{(e[n]||(e[n]=r(n)))._prepareNode(t)})}function Rr(e,t){A(t,r=>{Ar(e.springs,r,n=>Pr(n,e))})}var es=Tt.createContext({pause:!1,immediate:!1}),ts=()=>{const e=[],t=function(n){Rn();const s=[];return A(e,(i,a)=>{if(c.und(n))s.push(i.start());else{const u=r(n,i,a);u&&s.push(i.start(u))}}),s};t.current=e,t.add=function(n){e.includes(n)||e.push(n)},t.delete=function(n){const s=e.indexOf(n);~s&&e.splice(s,1)},t.pause=function(){return A(e,n=>n.pause(...arguments)),this},t.resume=function(){return A(e,n=>n.resume(...arguments)),this},t.set=function(n){A(e,(s,i)=>{const a=c.fun(n)?n(i,s):n;a&&s.set(a)})},t.start=function(n){const s=[];return A(e,(i,a)=>{if(c.und(n))s.push(i.start());else{const u=this._getProps(n,i,a);u&&s.push(i.start(u))}}),s},t.stop=function(){return A(e,n=>n.stop(...arguments)),this},t.update=function(n){return A(e,(s,i)=>s.update(this._getProps(n,s,i))),this};const r=function(n,s,i){return c.fun(n)?n(i,s):n};return t._getProps=r,t};function rs(e,t,r){const n=c.fun(t)&&t;n&&!r&&(r=[]);const s=y.useMemo(()=>n||arguments.length==3?ts():void 0,[]),i=y.useRef(0),a=Zt(),u=y.useMemo(()=>({ctrls:[],queue:[],flush(g,x){const _=Sr(g,x);return i.current>0&&!u.queue.length&&!Object.keys(_).some(E=>!g.springs[E])?wt(g,x):new Promise(E=>{xr(g,_),u.queue.push(()=>{E(wt(g,x))}),a()})}}),[]),f=y.useRef([...u.ctrls]),l=y.useRef([]),p=er(e)||0;y.useMemo(()=>{A(f.current.slice(e,p),g=>{Mn(g,s),g.stop(!0)}),f.current.length=e,h(p,e)},[e]),y.useMemo(()=>{h(0,Math.min(p,e))},r);function h(g,x){for(let _=g;_<x;_++){const R=f.current[_]||(f.current[_]=new Kn(null,u.flush)),E=n?n(_,R):t[_];E&&(l.current[_]=Hn(E))}}const d=f.current.map((g,x)=>Sr(g,l.current[x])),m=y.useContext(es),b=er(m),v=m!==b&&Un(m);lt(()=>{i.current++,u.ctrls=f.current;const{queue:g}=u;g.length&&(u.queue=[],A(g,x=>x())),A(f.current,(x,_)=>{s==null||s.add(x),v&&x.start({default:m});const R=l.current[_];R&&(zn(x,R.ref),x.ref?x.queue.push(R):x.start(R))})}),Kt(()=>()=>{A(u.ctrls,g=>g.stop(!0))});const S=d.map(g=>({...g}));return s?[S,s]:S}function Er(e,t){const r=c.fun(e),[[n],s]=rs(1,r?e:[e],r?[]:t);return r||arguments.length==2?[n,s]:n}var ns=class extends vt{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=ye(...t);const r=this._get(),n=dt(r);ct(this,n.create(r))}advance(e){const t=this._get(),r=this.get();W(t,r)||(Q(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Tr(this._active)&&St(this)}_get(){const e=c.arr(this.source)?this.source.map(j):N(j(this.source));return this.calc(...e)}_start(){this.idle&&!Tr(this._active)&&(this.idle=!1,A(Me(this),e=>{e.done=!1}),M.skipAnimation?(w.batchedUpdates(()=>this.advance()),St(this)):Fe.start(this))}_attach(){let e=1;A(N(this.source),t=>{q(t)&&oe(t,this),gt(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){A(N(this.source),e=>{q(e)&&we(e,this)}),this._active.clear(),St(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=N(this.source).reduce((t,r)=>Math.max(t,(gt(r)?r.priority:0)+1),0))}};function ss(e){return e.idle!==!1}function Tr(e){return!e.size||Array.from(e).every(ss)}function St(e){e.idle||(e.idle=!0,A(Me(e),t=>{t.done=!0}),be(e,{type:"idle",parent:e}))}M.assign({createStringInterpolator:Xt,to:(e,t)=>new ns(e,t)});var kr=/^--/;function is(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!kr.test(e)&&!(Ce.hasOwnProperty(e)&&Ce[e])?t+"px":(""+t).trim()}var Cr={};function as(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:n,style:s,children:i,scrollTop:a,scrollLeft:u,viewBox:f,...l}=t,p=Object.values(l),h=Object.keys(l).map(d=>r||e.hasAttribute(d)?d:Cr[d]||(Cr[d]=d.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));i!==void 0&&(e.textContent=i);for(const d in s)if(s.hasOwnProperty(d)){const m=is(d,s[d]);kr.test(d)?e.style.setProperty(d,m):e.style[d]=m}h.forEach((d,m)=>{e.setAttribute(d,p[m])}),n!==void 0&&(e.className=n),a!==void 0&&(e.scrollTop=a),u!==void 0&&(e.scrollLeft=u),f!==void 0&&e.setAttribute("viewBox",f)}var Ce={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},os=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),us=["Webkit","Ms","Moz","O"];Ce=Object.keys(Ce).reduce((e,t)=>(us.forEach(r=>e[os(r,t)]=e[t]),e),Ce);var ls=/^(matrix|translate|scale|rotate|skew)/,cs=/^(translate)/,ds=/^(rotate|skew)/,xt=(e,t)=>c.num(e)&&e!==0?e+t:e,Ye=(e,t)=>c.arr(e)?e.every(r=>Ye(r,t)):c.num(e)?e===t:parseFloat(e)===t,fs=class extends Qe{constructor({x:e,y:t,z:r,...n}){const s=[],i=[];(e||t||r)&&(s.push([e||0,t||0,r||0]),i.push(a=>[`translate3d(${a.map(u=>xt(u,"px")).join(",")})`,Ye(a,0)])),G(n,(a,u)=>{if(u==="transform")s.push([a||""]),i.push(f=>[f,f===""]);else if(ls.test(u)){if(delete n[u],c.und(a))return;const f=cs.test(u)?"px":ds.test(u)?"deg":"";s.push(N(a)),i.push(u==="rotate3d"?([l,p,h,d])=>[`rotate3d(${l},${p},${h},${xt(d,f)})`,Ye(d,0)]:l=>[`${u}(${l.map(p=>xt(p,f)).join(",")})`,Ye(l,u.startsWith("scale")?1:0)])}}),s.length&&(n.transform=new hs(s,i)),super(n)}},hs=class extends Yt{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return A(this.inputs,(r,n)=>{const s=j(r[0]),[i,a]=this.transforms[n](c.arr(s)?s:r.map(j));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&A(this.inputs,t=>A(t,r=>q(r)&&oe(r,this)))}observerRemoved(e){e==0&&A(this.inputs,t=>A(t,r=>q(r)&&we(r,this)))}eventObserved(e){e.type=="change"&&(this._value=null),be(this,e)}},ms=["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","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","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];M.assign({batchedUpdates:Qr.unstable_batchedUpdates,createStringInterpolator:Xt,colors:nn});var ps=Vn(ms,{applyAnimatedValues:as,createAnimatedStyle:e=>new fs(e),getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r}),Ir=ps.animated;const Or=y.createContext({}),gs=({children:e})=>{const{app:t}=I.useApplication(),r=y.useMemo(()=>{if(!t||!t.renderer)return null;const n=new V.Graphics;n.setFillStyle({color:"#1e1524"}),n.rect(0,0,1,1),n.fill();const s=t.renderer.generateTexture(n);return n.destroy(),s},[t==null?void 0:t.renderer]);return r?U.jsx(Or.Provider,{value:r,children:e}):null};class vs extends V.Particle{constructor(r,n,s,i,a,u){super({texture:r,x:n,y:s,scaleX:i,scaleY:a,alpha:0});ee(this,"animationProgress",0);ee(this,"delayCounter",0);ee(this,"randomSpeed");ee(this,"randomDelayOffset");ee(this,"startScaleX");ee(this,"startScaleY");this.texture=r,this.x=n,this.y=s,this.scaleX=i,this.scaleY=a,this.curLevel=u,this.startScaleX=i,this.startScaleY=a,this.curLevel=u,this.randomSpeed=.04+Math.random()*.04,this.randomDelayOffset=Math.floor(Math.random()*150)}update(){if(this.delayCounter<this.curLevel*15+this.randomDelayOffset){this.delayCounter++;return}const r=1;this.animationProgress+=(r-this.animationProgress)*this.randomSpeed,this.alpha=this.animationProgress}}class ys{constructor(t,r){ee(this,"cells",[]);this.texture=t,this.particleContainerRefCurrent=r,this.texture=t}add(t,r,n,s,i){const a=new vs(this.texture,t,r,n,s,i);this.particleContainerRefCurrent.addParticle(a),this.cells.push(a)}updateAll(){for(const t of this.cells)t.update()}}const _s=({gridRows:e,gridCols:t,cellWidth:r,cellHeight:n,gridDepth:s})=>{const i=y.useContext(Or),a=y.useRef(null),u=y.useRef(null);y.useEffect(()=>{a.current&&(u.current=new ys(i,a.current),f(0,0,r,n,t,e,s,a.current))},[]),I.useTick(()=>{var l;(l=u.current)==null||l.updateAll()});const f=(l,p,h,d,m,b,v,S)=>{var g;for(let x=0;x<b;x++)for(let _=0;_<m;_++){const R=l+_*h,E=p+x*d;v<=0||Math.random()>.7&&v<s?Math.random()>.1&&((g=u.current)==null||g.add(R,E,h-1,d-1,v)):f(R,E,h/m,d/b,m,b,v-1)}};return U.jsx("pixiParticleContainer",{ref:a,dynamicProperties:{position:!0,vertex:!0,color:!0}})},bs=({cellWidth:e,cellHeight:t,gridRows:r,gridCols:n,gridDepth:s})=>U.jsx(gs,{children:U.jsx(_s,{cellWidth:e,cellHeight:t,gridCols:n,gridRows:r,gridDepth:s})}),ws=e=>U.jsx("svg",{viewBox:"10 0 489.935 489.935",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:U.jsx("path",{d:`M278.235,33.267c-116.7,0-211.6,95-211.6,211.7v0.7l-41.9-63.1c-4.1-6.2-12.5-7.9-18.7-3.8c-6.2,4.1-7.9,12.5-3.8,18.7 \r
|
|
23
23
|
l60.8,91.5c2.2,3.3,5.7,5.4,9.6,5.9c0.6,0.1,1.1,0.1,1.7,0.1c3.3,0,6.5-1.2,9-3.5l84.5-76.1c5.5-5,6-13.5,1-19.1 \r
|
|
24
24
|
c-5-5.5-13.5-6-19.1-1l-56.1,50.7v-1c0-101.9,82.8-184.7,184.6-184.7s184.7,82.8,184.7,184.7s-82.8,184.7-184.6,184.7 \r
|
|
25
25
|
c-49.3,0-95.7-19.2-130.5-54.1c-5.3-5.3-13.8-5.3-19.1,0c-5.3,5.3-5.3,13.8,0,19.1c40,40,93.1,62,149.6,62 \r
|
|
26
|
-
c116.6,0,211.6-94.9,211.6-211.7S394.935,33.267,278.235,33.267z`})});I.extend({ParticleContainer:V.ParticleContainer,Particle:V.Particle,Texture:V.Texture,Container:V.Container,Sprite:V.Sprite,Graphics:V.Graphics});const jr=2,Fr=2,Vr=225,Nr=225,Ss=5;return()=>{const
|
|
26
|
+
c116.6,0,211.6-94.9,211.6-211.7S394.935,33.267,278.235,33.267z`})});I.extend({ParticleContainer:V.ParticleContainer,Particle:V.Particle,Texture:V.Texture,Container:V.Container,Sprite:V.Sprite,Graphics:V.Graphics});const jr=2,Fr=2,Vr=225,Nr=225,Ss=5;return()=>{const e=y.useRef(null),[t,r]=y.useState(!1),[n,s]=y.useState(0),[i,a]=y.useState(0),u=Er({from:{rotate:0},to:{rotate:i*-360},config:{duration:500,easing:d=>1-Math.pow(1-d,3)}}),f=Er({opacity:t?1:0,scale:t?1:.5,config:{tension:150,friction:14}}),l=Ir(ws),p=Ir("button"),h=()=>{s(d=>d+1),a(d=>d+1)};return y.useEffect(()=>()=>{var m;const d=(m=e.current)==null?void 0:m.app;d&&!d.destroyed&&d.destroy(!0,{children:!0,texture:!0,baseTexture:!0})},[]),U.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full",children:[U.jsx(I.Application,{ref:e,antialias:!1,width:Vr*jr,height:Nr*Fr,className:"transition-all image-pixelated md:w-full max-w-max w-72 mb-8",backgroundAlpha:0,onInit:()=>r(!0),children:U.jsx(bs,{gridCols:jr,gridRows:Fr,cellWidth:Vr,cellHeight:Nr,gridDepth:Ss},n)}),t&&U.jsx(p,{style:f,className:"p-4",onClick:h,children:U.jsx(l,{width:36,height:36,className:"hover:opacity-100 opacity-25",style:{rotate:u.rotate.to(d=>`${d}deg`)}})})]})}}));
|
|
27
27
|
//# sourceMappingURL=recursive-grid.umd.js.map
|