@micjanic/recursive-grid 1.0.7 → 1.0.11

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(_,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):(_=typeof globalThis<"u"?globalThis:_||self,_["@micjanic/recursive-grid"]=I(_.React,_.PIXIReact,_.PIXI,_.ReactDOM))})(this,(function(_,I,V,Qr){"use strict";var xs=Object.defineProperty;var As=(_,I,V)=>I in _?xs(_,I,{enumerable:!0,configurable:!0,writable:!0,value:V}):_[I]=V;var ee=(_,I,V)=>As(_,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(_);var Ie={exports:{}},de={};/**
1
+ (function(a,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("react"),require("@pixi/react"),require("pixi.js")):typeof define=="function"&&define.amd?define(["react","@pixi/react","pixi.js"],m):(a=typeof globalThis<"u"?globalThis:a||self,a["@micjanic/recursive-grid"]=m(a.React,a.PIXIReact,a.PIXI))})(this,(function(a,m,p){"use strict";var _e=Object.defineProperty;var ve=(a,m,p)=>m in a?_e(a,m,{enumerable:!0,configurable:!0,writable:!0,value:p}):a[m]=p;var R=(a,m,p)=>ve(a,typeof m!="symbol"?m+"":m,p);var O={exports:{}},S={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var kt;function Wr(){if(kt)return de;kt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,s,i){var a=null;if(i!==void 0&&(a=""+i),s.key!==void 0&&(a=""+s.key),"key"in s){i={};for(var u in s)u!=="key"&&(i[u]=s[u])}else i=s;return s=i.ref,{$$typeof:e,type:n,key:a,ref:s!==void 0?s:null,props:i}}return de.Fragment=t,de.jsx=r,de.jsxs=r,de}var fe={};/**
9
+ */var U;function te(){if(U)return S;U=1;var c=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(i,n,f){var d=null;if(f!==void 0&&(d=""+f),n.key!==void 0&&(d=""+n.key),"key"in n){f={};for(var h in n)h!=="key"&&(f[h]=n[h])}else f=n;return n=f.ref,{$$typeof:c,type:i,key:d,ref:n!==void 0?n:null,props:f}}return S.Fragment=t,S.jsx=o,S.jsxs=o,S}var y={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,14 +14,10 @@
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 P: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 y:return(o._context.displayName||"Context")+".Consumer";case E:var x=o.render;return o=o.displayName,o||(o=x.displayName||x.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case le:return x=o.displayName||null,x!==null?x:e(o.type)||"Memo";case O:x=o._payload,o=o._init;try{return e(o(x))}catch{}}return null}function t(o){return""+o}function r(o){try{t(o);var x=!1}catch{x=!0}if(x){x=console;var T=x.error,k=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return T.call(x,"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 x=e(o);return x?"<"+x+">":"<...>"}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 x=Object.getOwnPropertyDescriptor(o,"key").get;if(x&&x.isReactWarning)return!1}return o.key!==void 0}function u(o,x){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)",x))}T.isReactWarning=!0,Object.defineProperty(o,"key",{get:T,configurable:!0})}function d(){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,x,T,k,We,Rt){var C=T.ref;return o={$$typeof:b,type:o,key:x,props:T,_owner:k},(C!==void 0?C:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:d}):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 m(o,x,T,k,We,Rt){var C=x.children;if(C!==void 0)if(k)if(xt(C)){for(k=0;k<C.length;k++)f(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 f(C);if(H.call(x,"key")){C=e(o);var ce=Object.keys(x).filter(function(Ps){return Ps!=="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:
17
+ */var X;function ne(){return X||(X=1,process.env.NODE_ENV!=="production"&&(function(){function c(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case g:return"Profiler";case N:return"StrictMode";case fe:return"Suspense";case de:return"SuspenseList";case pe:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case P:return"Portal";case I:return e.displayName||"Context";case k:return(e._context.displayName||"Context")+".Consumer";case Y:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case me:return r=e.displayName||null,r!==null?r:c(e.type)||"Memo";case M:r=e._payload,e=e._init;try{return c(e(r))}catch{}}return null}function t(e){return""+e}function o(e){try{t(e);var r=!1}catch{r=!0}if(r){r=console;var s=r.error,l=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",l),t(e)}}function i(e){if(e===j)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===M)return"<...>";try{var r=c(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function n(){var e=G.A;return e===null?null:e.getOwner()}function f(){return Error("react-stack-top-frame")}function d(e){if(Z.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function h(e,r){function s(){Q||(Q=!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)",r))}s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}function C(){var e=c(this.type);return $[e]||($[e]=!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.")),e=this.props.ref,e!==void 0?e:null}function v(e,r,s,l,D,L){var u=s.ref;return e={$$typeof:x,type:e,key:r,props:s,_owner:l},(u!==void 0?u:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:C}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:L}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function w(e,r,s,l,D,L){var u=r.children;if(u!==void 0)if(l)if(Re(u)){for(l=0;l<u.length;l++)T(u[l]);Object.freeze&&Object.freeze(u)}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 T(u);if(Z.call(r,"key")){u=c(e);var A=Object.keys(r).filter(function(Ee){return Ee!=="key"});l=0<A.length?"{key: someKey, "+A.join(": ..., ")+": ...}":"{key: someKey}",re[u+l]||(A=0<A.length?"{"+A.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
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
- 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
- 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[e,t]=_.useState(!1),[r,n]=_.useState(0),[s,i]=_.useState(0),a=Er({from:{rotate:0},to:{rotate:s*-360},config:{duration:500,easing:f=>1-Math.pow(1-f,3)}}),u=Er({opacity:e?1:0,scale:e?1:.5,config:{tension:150,friction:14}}),d=Ir(ws),l=Ir("button"),m=()=>{n(f=>f+1),i(f=>f+1)};return U.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full",children:[U.jsx(I.Application,{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:()=>t(!0),children:U.jsx(bs,{gridCols:jr,gridRows:Fr,cellWidth:Vr,cellHeight:Nr,gridDepth:Ss},r)}),e&&U.jsx(l,{style:u,className:"p-4",onClick:m,children:U.jsx(d,{width:36,height:36,className:"hover:opacity-100 opacity-25",style:{rotate:a.rotate.to(f=>`${f}deg`)}})})]})}}));
22
+ <%s key={someKey} {...props} />`,l,u,A,u),re[u+l]=!0)}if(u=null,s!==void 0&&(o(s),u=""+s),d(r)&&(o(r.key),u=""+r.key),"key"in r){s={};for(var W in r)W!=="key"&&(s[W]=r[W])}else s=r;return u&&h(s,typeof e=="function"?e.displayName||e.name||"Unknown":e),v(e,u,s,n(),D,L)}function T(e){b(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===M&&(e._payload.status==="fulfilled"?b(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function b(e){return typeof e=="object"&&e!==null&&e.$$typeof===x}var E=a,x=Symbol.for("react.transitional.element"),P=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),I=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),pe=Symbol.for("react.activity"),he=Symbol.for("react.client.reference"),G=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,Re=Array.isArray,F=console.createTask?console.createTask:function(){return null};E={react_stack_bottom_frame:function(e){return e()}};var Q,$={},K=E.react_stack_bottom_frame.bind(E,f)(),ee=F(i(f)),re={};y.Fragment=j,y.jsx=function(e,r,s){var l=1e4>G.recentlyCreatedOwnerStacks++;return w(e,r,s,!1,l?Error("react-stack-top-frame"):K,l?F(i(e)):ee)},y.jsxs=function(e,r,s){var l=1e4>G.recentlyCreatedOwnerStacks++;return w(e,r,s,!0,l?Error("react-stack-top-frame"):K,l?F(i(e)):ee)}})()),y}var J;function ae(){return J||(J=1,process.env.NODE_ENV==="production"?O.exports=te():O.exports=ne()),O.exports}var _=ae();const V=a.createContext({}),oe=({children:c})=>{const{app:t}=m.useApplication(),o=a.useMemo(()=>{if(!t||!t.renderer)return null;const i=new p.Graphics;i.setFillStyle({color:"#000000"}),i.rect(0,0,1,1),i.fill();const n=t.renderer.generateTexture(i);return i.destroy(),n},[t==null?void 0:t.renderer]);return o?_.jsx(V.Provider,{value:o,children:c}):null};class se extends p.Particle{constructor(o,i,n,f,d,h){super({texture:o,x:i,y:n,scaleX:f,scaleY:d,alpha:0});R(this,"animationProgress",0);R(this,"delayCounter",0);R(this,"randomSpeed");R(this,"randomDelayOffset");R(this,"startScaleX");R(this,"startScaleY");R(this,"targetAlpha");this.texture=o,this.x=i,this.y=n,this.scaleX=f,this.scaleY=d,this.curLevel=h,this.startScaleX=f,this.startScaleY=d,this.curLevel=h,this.randomSpeed=.04+Math.random()*.04,this.randomDelayOffset=Math.floor(Math.random()*150),this.targetAlpha=.7+Math.random()*.3}update(){if(this.delayCounter<this.curLevel*15+this.randomDelayOffset){this.delayCounter++;return}if(this.animationProgress>=this.targetAlpha-.001){this.animationProgress=this.targetAlpha,this.alpha=this.targetAlpha;return}this.animationProgress+=(this.targetAlpha-this.animationProgress)*this.randomSpeed,this.alpha=this.animationProgress}}class ie{constructor(t,o){R(this,"cells",[]);this.texture=t,this.particleContainerRefCurrent=o,this.texture=t}add(t,o,i,n,f){const d=new se(this.texture,t,o,i,n,f);this.particleContainerRefCurrent.addParticle(d),this.cells.push(d)}updateAll(){for(const t of this.cells)t.update()}}const le=({gridRows:c,gridCols:t,cellWidth:o,cellHeight:i,gridDepth:n})=>{const f=a.useContext(V),d=a.useRef(null),h=a.useRef(null);a.useEffect(()=>{d.current&&(h.current=new ie(f,d.current),C(0,0,o,i,t,c,n,d.current))},[]),m.useTick(()=>{var v;(v=h.current)==null||v.updateAll()});const C=(v,w,T,b,E,x,P,j)=>{var N;for(let g=0;g<x;g++)for(let k=0;k<E;k++){const I=v+k*T,Y=w+g*b;P<=0||Math.random()>.7&&P<n?Math.random()>.1&&((N=h.current)==null||N.add(I,Y,T-1,b-1,P)):C(I,Y,T/E,b/x,E,x,P-1)}};return _.jsx("pixiParticleContainer",{ref:d,dynamicProperties:{position:!0,vertex:!0,color:!0}})},ue=({cellWidth:c,cellHeight:t,gridRows:o,gridCols:i,gridDepth:n})=>_.jsx(oe,{children:_.jsx(le,{cellWidth:c,cellHeight:t,gridCols:i,gridRows:o,gridDepth:n})});m.extend({ParticleContainer:p.ParticleContainer,Particle:p.Particle,Texture:p.Texture,Container:p.Container,Sprite:p.Sprite,Graphics:p.Graphics});const z=2,H=2,q=300,B=300,ce=5;return()=>{const c=a.useRef(null);return a.useEffect(()=>()=>{var o;const t=(o=c.current)==null?void 0:o.app;t&&!t.destroyed&&t.destroy(!0,{children:!0,texture:!0,baseTexture:!0})},[]),_.jsx("div",{className:"flex flex-col items-center justify-center w-full h-full",children:_.jsx(m.Application,{ref:c,antialias:!1,width:q*z,height:B*H,className:"image-pixelated w-full",backgroundAlpha:0,children:_.jsx(ue,{gridCols:z,gridRows:H,cellWidth:q,cellHeight:B,gridDepth:ce})})})}}));
27
23
  //# sourceMappingURL=recursive-grid.umd.js.map