ymy-components 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -0
- package/dist/index.d.ts +2 -0
- package/dist/src/index.d.ts +27 -0
- package/dist/ymy-components.cjs.js +30 -0
- package/dist/ymy-components.css +1 -0
- package/dist/ymy-components.es.js +2898 -0
- package/package.json +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
+
|
|
10
|
+
## Expanding the ESLint configuration
|
|
11
|
+
|
|
12
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
export default tseslint.config({
|
|
16
|
+
extends: [
|
|
17
|
+
// Remove ...tseslint.configs.recommended and replace with this
|
|
18
|
+
...tseslint.configs.recommendedTypeChecked,
|
|
19
|
+
// Alternatively, use this for stricter rules
|
|
20
|
+
...tseslint.configs.strictTypeChecked,
|
|
21
|
+
// Optionally, add this for stylistic rules
|
|
22
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
23
|
+
],
|
|
24
|
+
languageOptions: {
|
|
25
|
+
// other options...
|
|
26
|
+
parserOptions: {
|
|
27
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
28
|
+
tsconfigRootDir: import.meta.dirname,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
})
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
// eslint.config.js
|
|
38
|
+
import reactX from 'eslint-plugin-react-x'
|
|
39
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
40
|
+
|
|
41
|
+
export default tseslint.config({
|
|
42
|
+
plugins: {
|
|
43
|
+
// Add the react-x and react-dom plugins
|
|
44
|
+
'react-x': reactX,
|
|
45
|
+
'react-dom': reactDom,
|
|
46
|
+
},
|
|
47
|
+
rules: {
|
|
48
|
+
// other rules...
|
|
49
|
+
// Enable its recommended typescript rules
|
|
50
|
+
...reactX.configs['recommended-typescript'].rules,
|
|
51
|
+
...reactDom.configs.recommended.rules,
|
|
52
|
+
},
|
|
53
|
+
})
|
|
54
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface AnimatedTextProps {
|
|
4
|
+
animate: boolean;
|
|
5
|
+
content: {
|
|
6
|
+
english: string;
|
|
7
|
+
traditional: string;
|
|
8
|
+
simplified: string;
|
|
9
|
+
};
|
|
10
|
+
textStyles?: React.CSSProperties;
|
|
11
|
+
htmlElement?: keyof JSX.IntrinsicElements;
|
|
12
|
+
fadeIn?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export declare const AnimatedText: React.FC<AnimatedTextProps>;
|
|
16
|
+
|
|
17
|
+
export interface BannerButtonProps {
|
|
18
|
+
IconComponent: React.ComponentType<any>;
|
|
19
|
+
buttonText: {
|
|
20
|
+
english: string;
|
|
21
|
+
traditional: string;
|
|
22
|
+
simplified: string;
|
|
23
|
+
};
|
|
24
|
+
buttonType?: 'primary' | 'secondary';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare const BannerButton: React.FC<BannerButtonProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),Gn=require("react-dom");function Hn(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 kt=Hn(C);var Qe={exports:{}},we={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var pr;function Jn(){if(pr)return we;pr=1;var e=C,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(l,d,u){var m,p={},v=null,g=null;u!==void 0&&(v=""+u),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(g=d.ref);for(m in d)n.call(d,m)&&!a.hasOwnProperty(m)&&(p[m]=d[m]);if(l&&l.defaultProps)for(m in d=l.defaultProps,d)p[m]===void 0&&(p[m]=d[m]);return{$$typeof:t,type:l,key:v,ref:g,props:p,_owner:s.current}}return we.Fragment=r,we.jsx=o,we.jsxs=o,we}var Re={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var vr;function Kn(){return vr||(vr=1,process.env.NODE_ENV!=="production"&&function(){var e=C,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),_=Symbol.iterator,R="@@iterator";function P(i){if(i===null||typeof i!="object")return null;var c=_&&i[_]||i[R];return typeof c=="function"?c:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(i){{for(var c=arguments.length,h=new Array(c>1?c-1:0),w=1;w<c;w++)h[w-1]=arguments[w];S("error",i,h)}}function S(i,c,h){{var w=y.ReactDebugCurrentFrame,O=w.getStackAddendum();O!==""&&(c+="%s",h=h.concat([O]));var I=h.map(function(T){return String(T)});I.unshift("Warning: "+c),Function.prototype.apply.call(console[i],console,I)}}var k=!1,V=!1,Z=!1,N=!1,fe=!1,D;D=Symbol.for("react.module.reference");function oe(i){return!!(typeof i=="string"||typeof i=="function"||i===n||i===a||fe||i===s||i===u||i===m||N||i===g||k||V||Z||typeof i=="object"&&i!==null&&(i.$$typeof===v||i.$$typeof===p||i.$$typeof===o||i.$$typeof===l||i.$$typeof===d||i.$$typeof===D||i.getModuleId!==void 0))}function L(i,c,h){var w=i.displayName;if(w)return w;var O=c.displayName||c.name||"";return O!==""?h+"("+O+")":h}function ee(i){return i.displayName||"Context"}function $(i){if(i==null)return null;if(typeof i.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case s:return"StrictMode";case u:return"Suspense";case m:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case l:var c=i;return ee(c)+".Consumer";case o:var h=i;return ee(h._context)+".Provider";case d:return L(i,i.render,"ForwardRef");case p:var w=i.displayName||null;return w!==null?w:$(i.type)||"Memo";case v:{var O=i,I=O._payload,T=O._init;try{return $(T(I))}catch{return null}}}return null}var te=Object.assign,be=0,Yt,Qt,Gt,Ht,Jt,Kt,Xt;function Zt(){}Zt.__reactDisabledLog=!0;function wn(){{if(be===0){Yt=console.log,Qt=console.info,Gt=console.warn,Ht=console.error,Jt=console.group,Kt=console.groupCollapsed,Xt=console.groupEnd;var i={configurable:!0,enumerable:!0,value:Zt,writable:!0};Object.defineProperties(console,{info:i,log:i,warn:i,error:i,group:i,groupCollapsed:i,groupEnd:i})}be++}}function Rn(){{if(be--,be===0){var i={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},i,{value:Yt}),info:te({},i,{value:Qt}),warn:te({},i,{value:Gt}),error:te({},i,{value:Ht}),group:te({},i,{value:Jt}),groupCollapsed:te({},i,{value:Kt}),groupEnd:te({},i,{value:Xt})})}be<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var lt=y.ReactCurrentDispatcher,ct;function ze(i,c,h){{if(ct===void 0)try{throw Error()}catch(O){var w=O.stack.trim().match(/\n( *(at )?)/);ct=w&&w[1]||""}return`
|
|
18
|
+
`+ct+i}}var ft=!1,We;{var Sn=typeof WeakMap=="function"?WeakMap:Map;We=new Sn}function er(i,c){if(!i||ft)return"";{var h=We.get(i);if(h!==void 0)return h}var w;ft=!0;var O=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var I;I=lt.current,lt.current=null,wn();try{if(c){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(q){w=q}Reflect.construct(i,[],T)}else{try{T.call()}catch(q){w=q}i.call(T.prototype)}}else{try{throw Error()}catch(q){w=q}i()}}catch(q){if(q&&w&&typeof q.stack=="string"){for(var x=q.stack.split(`
|
|
19
|
+
`),U=w.stack.split(`
|
|
20
|
+
`),j=x.length-1,F=U.length-1;j>=1&&F>=0&&x[j]!==U[F];)F--;for(;j>=1&&F>=0;j--,F--)if(x[j]!==U[F]){if(j!==1||F!==1)do if(j--,F--,F<0||x[j]!==U[F]){var W=`
|
|
21
|
+
`+x[j].replace(" at new "," at ");return i.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",i.displayName)),typeof i=="function"&&We.set(i,W),W}while(j>=1&&F>=0);break}}}finally{ft=!1,lt.current=I,Rn(),Error.prepareStackTrace=O}var he=i?i.displayName||i.name:"",ue=he?ze(he):"";return typeof i=="function"&&We.set(i,ue),ue}function En(i,c,h){return er(i,!1)}function Pn(i){var c=i.prototype;return!!(c&&c.isReactComponent)}function Be(i,c,h){if(i==null)return"";if(typeof i=="function")return er(i,Pn(i));if(typeof i=="string")return ze(i);switch(i){case u:return ze("Suspense");case m:return ze("SuspenseList")}if(typeof i=="object")switch(i.$$typeof){case d:return En(i.render);case p:return Be(i.type,c,h);case v:{var w=i,O=w._payload,I=w._init;try{return Be(I(O),c,h)}catch{}}}return""}var _e=Object.prototype.hasOwnProperty,tr={},rr=y.ReactDebugCurrentFrame;function Ye(i){if(i){var c=i._owner,h=Be(i.type,i._source,c?c.type:null);rr.setExtraStackFrame(h)}else rr.setExtraStackFrame(null)}function xn(i,c,h,w,O){{var I=Function.call.bind(_e);for(var T in i)if(I(i,T)){var x=void 0;try{if(typeof i[T]!="function"){var U=Error((w||"React class")+": "+h+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw U.name="Invariant Violation",U}x=i[T](c,T,w,h,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(j){x=j}x&&!(x instanceof Error)&&(Ye(O),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",w||"React class",h,T,typeof x),Ye(null)),x instanceof Error&&!(x.message in tr)&&(tr[x.message]=!0,Ye(O),b("Failed %s type: %s",h,x.message),Ye(null))}}}var An=Array.isArray;function dt(i){return An(i)}function Tn(i){{var c=typeof Symbol=="function"&&Symbol.toStringTag,h=c&&i[Symbol.toStringTag]||i.constructor.name||"Object";return h}}function Cn(i){try{return nr(i),!1}catch{return!0}}function nr(i){return""+i}function ir(i){if(Cn(i))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Tn(i)),nr(i)}var sr=y.ReactCurrentOwner,On={key:!0,ref:!0,__self:!0,__source:!0},ar,or;function kn(i){if(_e.call(i,"ref")){var c=Object.getOwnPropertyDescriptor(i,"ref").get;if(c&&c.isReactWarning)return!1}return i.ref!==void 0}function In(i){if(_e.call(i,"key")){var c=Object.getOwnPropertyDescriptor(i,"key").get;if(c&&c.isReactWarning)return!1}return i.key!==void 0}function jn(i,c){typeof i.ref=="string"&&sr.current}function Fn(i,c){{var h=function(){ar||(ar=!0,b("%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://reactjs.org/link/special-props)",c))};h.isReactWarning=!0,Object.defineProperty(i,"key",{get:h,configurable:!0})}}function Vn(i,c){{var h=function(){or||(or=!0,b("%s: `ref` 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://reactjs.org/link/special-props)",c))};h.isReactWarning=!0,Object.defineProperty(i,"ref",{get:h,configurable:!0})}}var Dn=function(i,c,h,w,O,I,T){var x={$$typeof:t,type:i,key:c,ref:h,props:T,_owner:I};return x._store={},Object.defineProperty(x._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(x,"_self",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.defineProperty(x,"_source",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.freeze&&(Object.freeze(x.props),Object.freeze(x)),x};function $n(i,c,h,w,O){{var I,T={},x=null,U=null;h!==void 0&&(ir(h),x=""+h),In(c)&&(ir(c.key),x=""+c.key),kn(c)&&(U=c.ref,jn(c,O));for(I in c)_e.call(c,I)&&!On.hasOwnProperty(I)&&(T[I]=c[I]);if(i&&i.defaultProps){var j=i.defaultProps;for(I in j)T[I]===void 0&&(T[I]=j[I])}if(x||U){var F=typeof i=="function"?i.displayName||i.name||"Unknown":i;x&&Fn(T,F),U&&Vn(T,F)}return Dn(i,x,U,O,w,sr.current,T)}}var ht=y.ReactCurrentOwner,ur=y.ReactDebugCurrentFrame;function de(i){if(i){var c=i._owner,h=Be(i.type,i._source,c?c.type:null);ur.setExtraStackFrame(h)}else ur.setExtraStackFrame(null)}var mt;mt=!1;function pt(i){return typeof i=="object"&&i!==null&&i.$$typeof===t}function lr(){{if(ht.current){var i=$(ht.current.type);if(i)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+i+"`."}return""}}function Un(i){return""}var cr={};function Nn(i){{var c=lr();if(!c){var h=typeof i=="string"?i:i.displayName||i.name;h&&(c=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+h+">.")}return c}}function fr(i,c){{if(!i._store||i._store.validated||i.key!=null)return;i._store.validated=!0;var h=Nn(c);if(cr[h])return;cr[h]=!0;var w="";i&&i._owner&&i._owner!==ht.current&&(w=" It was passed a child from "+$(i._owner.type)+"."),de(i),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',h,w),de(null)}}function dr(i,c){{if(typeof i!="object")return;if(dt(i))for(var h=0;h<i.length;h++){var w=i[h];pt(w)&&fr(w,c)}else if(pt(i))i._store&&(i._store.validated=!0);else if(i){var O=P(i);if(typeof O=="function"&&O!==i.entries)for(var I=O.call(i),T;!(T=I.next()).done;)pt(T.value)&&fr(T.value,c)}}}function qn(i){{var c=i.type;if(c==null||typeof c=="string")return;var h;if(typeof c=="function")h=c.propTypes;else if(typeof c=="object"&&(c.$$typeof===d||c.$$typeof===p))h=c.propTypes;else return;if(h){var w=$(c);xn(h,i.props,"prop",w,i)}else if(c.PropTypes!==void 0&&!mt){mt=!0;var O=$(c);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",O||"Unknown")}typeof c.getDefaultProps=="function"&&!c.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Mn(i){{for(var c=Object.keys(i.props),h=0;h<c.length;h++){var w=c[h];if(w!=="children"&&w!=="key"){de(i),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",w),de(null);break}}i.ref!==null&&(de(i),b("Invalid attribute `ref` supplied to `React.Fragment`."),de(null))}}var hr={};function mr(i,c,h,w,O,I){{var T=oe(i);if(!T){var x="";(i===void 0||typeof i=="object"&&i!==null&&Object.keys(i).length===0)&&(x+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=Un();U?x+=U:x+=lr();var j;i===null?j="null":dt(i)?j="array":i!==void 0&&i.$$typeof===t?(j="<"+($(i.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):j=typeof i,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",j,x)}var F=$n(i,c,h,O,I);if(F==null)return F;if(T){var W=c.children;if(W!==void 0)if(w)if(dt(W)){for(var he=0;he<W.length;he++)dr(W[he],i);Object.freeze&&Object.freeze(W)}else b("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 dr(W,i)}if(_e.call(c,"key")){var ue=$(i),q=Object.keys(c).filter(function(Qn){return Qn!=="key"}),vt=q.length>0?"{key: someKey, "+q.join(": ..., ")+": ...}":"{key: someKey}";if(!hr[ue+vt]){var Yn=q.length>0?"{"+q.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
+
let props = %s;
|
|
27
|
+
<%s {...props} />
|
|
28
|
+
React keys must be passed directly to JSX without using spread:
|
|
29
|
+
let props = %s;
|
|
30
|
+
<%s key={someKey} {...props} />`,vt,ue,Yn,ue),hr[ue+vt]=!0}}return i===n?Mn(F):qn(F),F}}function Ln(i,c,h){return mr(i,c,h,!0)}function zn(i,c,h){return mr(i,c,h,!1)}var Wn=zn,Bn=Ln;Re.Fragment=n,Re.jsx=Wn,Re.jsxs=Bn}()),Re}var gr;function Xn(){return gr||(gr=1,process.env.NODE_ENV==="production"?Qe.exports=Jn():Qe.exports=Kn()),Qe.exports}var K=Xn(),It=Me(),E=e=>qe(e,It),jt=Me();E.write=e=>qe(e,jt);var tt=Me();E.onStart=e=>qe(e,tt);var Ft=Me();E.onFrame=e=>qe(e,Ft);var Vt=Me();E.onFinish=e=>qe(e,Vt);var pe=[];E.setTimeout=(e,t)=>{const r=E.now()+t,n=()=>{const a=pe.findIndex(o=>o.cancel==n);~a&&pe.splice(a,1),se-=~a?1:0},s={time:r,handler:e,cancel:n};return pe.splice(Nr(r),0,s),se+=1,qr(),s};var Nr=e=>~(~pe.findIndex(t=>t.time>e)||~pe.length);E.cancel=e=>{tt.delete(e),Ft.delete(e),Vt.delete(e),It.delete(e),jt.delete(e)};E.sync=e=>{St=!0,E.batchedUpdates(e),St=!1};E.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...s){t=s,E.onStart(r)}return n.handler=e,n.cancel=()=>{tt.delete(r),t=null},n};var Dt=typeof window<"u"?window.requestAnimationFrame:()=>{};E.use=e=>Dt=e;E.now=typeof performance<"u"?()=>performance.now():Date.now;E.batchedUpdates=e=>e();E.catch=console.error;E.frameLoop="always";E.advance=()=>{E.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Lr()};var ie=-1,se=0,St=!1;function qe(e,t){St?(t.delete(e),e(0)):(t.add(e),qr())}function qr(){ie<0&&(ie=0,E.frameLoop!=="demand"&&Dt(Mr))}function Zn(){ie=-1}function Mr(){~ie&&(Dt(Mr),E.batchedUpdates(Lr))}function Lr(){const e=ie;ie=E.now();const t=Nr(ie);if(t&&(zr(pe.splice(0,t),r=>r.handler()),se-=t),!se){Zn();return}tt.flush(),It.flush(e?Math.min(64,ie-e):16.667),Ft.flush(),jt.flush(),Vt.flush()}function Me(){let e=new Set,t=e;return{add(r){se+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return se-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,se-=t.size,zr(t,n=>n(r)&&e.add(n)),se+=e.size,t=e)}}}function zr(e,t){e.forEach(r=>{try{t(r)}catch(n){E.catch(n)}})}var ei=Object.defineProperty,ti=(e,t)=>{for(var r in t)ei(e,r,{get:t[r],enumerable:!0})},H={};ti(H,{assign:()=>ni,colors:()=>ae,createStringInterpolator:()=>Ut,skipAnimation:()=>Br,to:()=>Wr,willAdvance:()=>Nt});function Et(){}var ri=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),f={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 re(e,t){if(f.arr(e)){if(!f.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 X(e,t,r){if(f.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 z=e=>f.und(e)?[]:f.arr(e)?e:[e];function Ae(e,t){if(e.size){const r=Array.from(e);e.clear(),A(r,t)}}var xe=(e,...t)=>Ae(e,r=>r(...t)),$t=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Ut,Wr,ae=null,Br=!1,Nt=Et,ni=e=>{e.to&&(Wr=e.to),e.now&&(E.now=e.now),e.colors!==void 0&&(ae=e.colors),e.skipAnimation!=null&&(Br=e.skipAnimation),e.createStringInterpolator&&(Ut=e.createStringInterpolator),e.requestAnimationFrame&&E.use(e.requestAnimationFrame),e.batchedUpdates&&(E.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Nt=e.willAdvance),e.frameLoop&&(E.frameLoop=e.frameLoop)},Te=new Set,Y=[],gt=[],Ke=0,rt={get idle(){return!Te.size&&!Y.length},start(e){Ke>e.priority?(Te.add(e),E.onStart(ii)):(Yr(e),E(Pt))},advance:Pt,sort(e){if(Ke)E.onFrame(()=>rt.sort(e));else{const t=Y.indexOf(e);~t&&(Y.splice(t,1),Qr(e))}},clear(){Y=[],Te.clear()}};function ii(){Te.forEach(Yr),Te.clear(),E(Pt)}function Yr(e){Y.includes(e)||Qr(e)}function Qr(e){Y.splice(si(Y,t=>t.priority>e.priority),0,e)}function Pt(e){const t=gt;for(let r=0;r<Y.length;r++){const n=Y[r];Ke=n.priority,n.idle||(Nt(n),n.advance(e),n.idle||t.push(n))}return Ke=0,gt=Y,gt.length=0,Y=t,Y.length>0}function si(e,t){const r=e.findIndex(t);return r<0?e.length:r}var ai={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},G="[-+]?\\d*\\.?\\d+",Xe=G+"%";function nt(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var oi=new RegExp("rgb"+nt(G,G,G)),ui=new RegExp("rgba"+nt(G,G,G,G)),li=new RegExp("hsl"+nt(G,Xe,Xe)),ci=new RegExp("hsla"+nt(G,Xe,Xe,G)),fi=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,di=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hi=/^#([0-9a-fA-F]{6})$/,mi=/^#([0-9a-fA-F]{8})$/;function pi(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=hi.exec(e))?parseInt(t[1]+"ff",16)>>>0:ae&&ae[e]!==void 0?ae[e]:(t=oi.exec(e))?(me(t[1])<<24|me(t[2])<<16|me(t[3])<<8|255)>>>0:(t=ui.exec(e))?(me(t[1])<<24|me(t[2])<<16|me(t[3])<<8|_r(t[4]))>>>0:(t=fi.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=mi.exec(e))?parseInt(t[1],16)>>>0:(t=di.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=li.exec(e))?(yr(br(t[1]),Ge(t[2]),Ge(t[3]))|255)>>>0:(t=ci.exec(e))?(yr(br(t[1]),Ge(t[2]),Ge(t[3]))|_r(t[4]))>>>0:null}function yt(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 yr(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,s=2*r-n,a=yt(s,n,e+1/3),o=yt(s,n,e),l=yt(s,n,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(l*255)<<8}function me(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function br(e){return(parseFloat(e)%360+360)%360/360}function _r(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Ge(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function wr(e){let t=pi(e);if(t===null)return e;t=t||0;const r=(t&4278190080)>>>24,n=(t&16711680)>>>16,s=(t&65280)>>>8,a=(t&255)/255;return`rgba(${r}, ${n}, ${s}, ${a})`}var ke=(e,t,r)=>{if(f.fun(e))return e;if(f.arr(e))return ke({range:e,output:t,extrapolate:r});if(f.str(e.output[0]))return Ut(e);const n=e,s=n.output,a=n.range||[0,1],o=n.extrapolateLeft||n.extrapolate||"extend",l=n.extrapolateRight||n.extrapolate||"extend",d=n.easing||(u=>u);return u=>{const m=gi(u,a);return vi(u,a[m],a[m+1],s[m],s[m+1],d,o,l,n.map)}};function vi(e,t,r,n,s,a,o,l,d){let u=d?d(e):e;if(u<t){if(o==="identity")return u;o==="clamp"&&(u=t)}if(u>r){if(l==="identity")return u;l==="clamp"&&(u=r)}return n===s?n:t===r?e<=t?n:s:(t===-1/0?u=-u:r===1/0?u=u-t:u=(u-t)/(r-t),u=a(u),n===-1/0?u=-u:s===1/0?u=u+n:u=u*(s-n)+n,u)}function gi(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}var yi={linear:e=>e},Ie=Symbol.for("FluidValue.get"),ge=Symbol.for("FluidValue.observers"),B=e=>!!(e&&e[Ie]),M=e=>e&&e[Ie]?e[Ie]():e,Rr=e=>e[ge]||null;function bi(e,t){e.eventObserved?e.eventObserved(t):e(t)}function je(e,t){const r=e[ge];r&&r.forEach(n=>{bi(n,t)})}var Gr=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");_i(this,e)}},_i=(e,t)=>Hr(e,Ie,t);function ye(e,t){if(e[Ie]){let r=e[ge];r||Hr(e,ge,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function Fe(e,t){const r=e[ge];if(r&&r.has(t)){const n=r.size-1;n?r.delete(t):e[ge]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var Hr=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),He=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,wi=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Sr=new RegExp(`(${He.source})(%|[a-z]+)`,"i"),Ri=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,it=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Jr=e=>{const[t,r]=Si(e);if(!t||$t())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&&it.test(r))return Jr(r);if(r)return r}return e},Si=e=>{const t=it.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]},bt,Ei=(e,t,r,n,s)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${s})`,Kr=e=>{bt||(bt=ae?new RegExp(`(${Object.keys(ae).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>M(a).replace(it,Jr).replace(wi,wr).replace(bt,wr)),r=t.map(a=>a.match(He).map(Number)),s=r[0].map((a,o)=>r.map(l=>{if(!(o in l))throw Error('The arity of each "output" value must be equal');return l[o]})).map(a=>ke({...e,output:a}));return a=>{var d;const o=!Sr.test(t[0])&&((d=t.find(u=>Sr.test(u)))==null?void 0:d.replace(He,""));let l=0;return t[0].replace(He,()=>`${s[l++](a)}${o||""}`).replace(Ri,Ei)}},qt="react-spring: ",Xr=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${qt}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},Pi=Xr(console.warn);function xi(){Pi(`${qt}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Ai=Xr(console.warn);function Ti(){Ai(`${qt}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 st(e){return f.str(e)&&(e[0]=="#"||/\d/.test(e)||!$t()&&it.test(e)||e in(ae||{}))}var Mt=$t()?C.useEffect:C.useLayoutEffect,Ci=()=>{const e=C.useRef(!1);return Mt(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Zr(){const e=C.useState()[1],t=Ci();return()=>{t.current&&e(Math.random())}}function Oi(e,t){const[r]=C.useState(()=>({inputs:t,result:e()})),n=C.useRef(),s=n.current;let a=s;return a?t&&a.inputs&&ki(t,a.inputs)||(a={inputs:t,result:e()}):a=r,C.useEffect(()=>{n.current=a,s==r&&(r.inputs=r.result=void 0)},[a]),a.result}function ki(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var en=e=>C.useEffect(e,Ii),Ii=[];function Er(e){const t=C.useRef();return C.useEffect(()=>{t.current=e}),t.current}var Ve=Symbol.for("Animated:node"),ji=e=>!!e&&e[Ve]===e,J=e=>e&&e[Ve],Lt=(e,t)=>ri(e,Ve,t),at=e=>e&&e[Ve]&&e[Ve].getPayload(),tn=class{constructor(){Lt(this,this)}getPayload(){return this.payload||[]}},Le=class extends tn{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,f.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Le(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return f.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,f.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},De=class extends Le{constructor(e){super(0),this._string=null,this._toString=ke({output:[e,e]})}static create(e){return new De(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(f.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=ke({output:[this.getValue(),e]})),this._value=0,super.reset()}},Ze={dependencies:null},ot=class extends tn{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return X(this.source,(r,n)=>{ji(r)?t[n]=r.getValue(e):B(r)?t[n]=M(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 X(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ze.dependencies&&B(e)&&Ze.dependencies.add(e);const t=at(e);t&&A(t,r=>this.add(r))}},rn=class extends ot{constructor(e){super(e)}static create(e){return new rn(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((r,n)=>r.setValue(e[n])).some(Boolean):(super.setValue(e.map(Fi)),!0)}};function Fi(e){return(st(e)?De:Le).create(e)}function xt(e){const t=J(e);return t?t.constructor:f.arr(e)?rn:st(e)?De:Le}var Pr=(e,t)=>{const r=!f.fun(e)||e.prototype&&e.prototype.isReactComponent;return C.forwardRef((n,s)=>{const a=C.useRef(null),o=r&&C.useCallback(_=>{a.current=$i(s,_)},[s]),[l,d]=Di(n,t),u=Zr(),m=()=>{const _=a.current;if(r&&!_)return;(_?t.applyAnimatedValues(_,l.getValue(!0)):!1)===!1&&u()},p=new Vi(m,d),v=C.useRef();Mt(()=>(v.current=p,A(d,_=>ye(_,p)),()=>{v.current&&(A(v.current.deps,_=>Fe(_,v.current)),E.cancel(v.current.update))})),C.useEffect(m,[]),en(()=>()=>{const _=v.current;A(_.deps,R=>Fe(R,_))});const g=t.getComponentProps(l.getValue());return kt.createElement(e,{...g,ref:o})})},Vi=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&E.write(this.update)}};function Di(e,t){const r=new Set;return Ze.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new ot(e),Ze.dependencies=null,[e,r]}function $i(e,t){return e&&(f.fun(e)?e(t):e.current=t),t}var xr=Symbol.for("AnimatedComponent"),Ui=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=s=>new ot(s),getComponentProps:n=s=>s}={})=>{const s={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},a=o=>{const l=Ar(o)||"Anonymous";return f.str(o)?o=a[o]||(a[o]=Pr(o,s)):o=o[xr]||(o[xr]=Pr(o,s)),o.displayName=`Animated(${l})`,o};return X(e,(o,l)=>{f.arr(e)&&(l=Ar(o)),a[l]=a(o)}),{animated:a}},Ar=e=>f.str(e)?e:e&&f.str(e.displayName)?e.displayName:f.fun(e)&&e.name||null;function le(e,...t){return f.fun(e)?e(...t):e}var Ce=(e,t)=>e===!0||!!(t&&e&&(f.fun(e)?e(t):z(e).includes(t))),nn=(e,t)=>f.obj(e)?t&&e[t]:e,sn=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Ni=e=>e,zt=(e,t=Ni)=>{let r=qi;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const n={};for(const s of r){const a=t(e[s],s);f.und(a)||(n[s]=a)}return n},qi=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Mi={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 Li(e){const t={};let r=0;if(X(e,(n,s)=>{Mi[s]||(t[s]=n,r++)}),r)return t}function an(e){const t=Li(e);if(t){const r={to:t};return X(e,(n,s)=>s in t||(r[s]=n)),r}return{...e}}function $e(e){return e=M(e),f.arr(e)?e.map($e):st(e)?H.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function zi(e){for(const t in e)return!0;return!1}function At(e){return f.fun(e)||f.arr(e)&&f.obj(e[0])}function Wi(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function Bi(e,t){var r;t&&e.ref!==t&&((r=e.ref)==null||r.delete(e),t.add(e),e.ref=t)}var Yi={default:{tension:170,friction:26}},Tt={...Yi.default,mass:1,damping:1,easing:yi.linear,clamp:!1},Qi=class{constructor(){this.velocity=0,Object.assign(this,Tt)}};function Gi(e,t,r){r&&(r={...r},Tr(r,t),t={...r,...t}),Tr(e,t),Object.assign(e,t);for(const o in Tt)e[o]==null&&(e[o]=Tt[o]);let{frequency:n,damping:s}=e;const{mass:a}=e;return f.und(n)||(n<.01&&(n=.01),s<0&&(s=0),e.tension=Math.pow(2*Math.PI/n,2)*a,e.friction=4*Math.PI*s*a/n),e}function Tr(e,t){if(!f.und(t.decay))e.duration=void 0;else{const r=!f.und(t.tension)||!f.und(t.friction);(r||!f.und(t.frequency)||!f.und(t.damping)||!f.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var Cr=[],Hi=class{constructor(){this.changed=!1,this.values=Cr,this.toValues=null,this.fromValues=Cr,this.config=new Qi,this.immediate=!1}};function on(e,{key:t,props:r,defaultProps:n,state:s,actions:a}){return new Promise((o,l)=>{let d,u,m=Ce(r.cancel??(n==null?void 0:n.cancel),t);if(m)g();else{f.und(r.pause)||(s.paused=Ce(r.pause,t));let _=n==null?void 0:n.pause;_!==!0&&(_=s.paused||Ce(_,t)),d=le(r.delay||0,t),_?(s.resumeQueue.add(v),a.pause()):(a.resume(),v())}function p(){s.resumeQueue.add(v),s.timeouts.delete(u),u.cancel(),d=u.time-E.now()}function v(){d>0&&!H.skipAnimation?(s.delayed=!0,u=E.setTimeout(g,d),s.pauseQueue.add(p),s.timeouts.add(u)):g()}function g(){s.delayed&&(s.delayed=!1),s.pauseQueue.delete(p),s.timeouts.delete(u),e<=(s.cancelId||0)&&(m=!0);try{a.start({...r,callId:e,cancel:m},o)}catch(_){l(_)}}})}var Wt=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?ve(e.get()):t.every(r=>r.noop)?un(e.get()):Q(e.get(),t.every(r=>r.finished)),un=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Q=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),ve=e=>({value:e,cancelled:!0,finished:!1});function ln(e,t,r,n){const{callId:s,parentId:a,onRest:o}=t,{asyncTo:l,promise:d}=r;return!a&&e===l&&!t.reset?d:r.promise=(async()=>{r.asyncId=s,r.asyncTo=e;const u=zt(t,(P,y)=>y==="onRest"?void 0:P);let m,p;const v=new Promise((P,y)=>(m=P,p=y)),g=P=>{const y=s<=(r.cancelId||0)&&ve(n)||s!==r.asyncId&&Q(n,!1);if(y)throw P.result=y,p(P),P},_=(P,y)=>{const b=new Or,S=new kr;return(async()=>{if(H.skipAnimation)throw Ue(r),S.result=Q(n,!1),p(S),S;g(b);const k=f.obj(P)?{...P}:{...y,to:P};k.parentId=s,X(u,(Z,N)=>{f.und(k[N])&&(k[N]=Z)});const V=await n.start(k);return g(b),r.paused&&await new Promise(Z=>{r.resumeQueue.add(Z)}),V})()};let R;if(H.skipAnimation)return Ue(r),Q(n,!1);try{let P;f.arr(e)?P=(async y=>{for(const b of y)await _(b)})(e):P=Promise.resolve(e(_,n.stop.bind(n))),await Promise.all([P.then(m),v]),R=Q(n.get(),!0,!1)}catch(P){if(P instanceof Or)R=P.result;else if(P instanceof kr)R=P.result;else throw P}finally{s==r.asyncId&&(r.asyncId=a,r.asyncTo=a?l:void 0,r.promise=a?d:void 0)}return f.fun(o)&&E.batchedUpdates(()=>{o(R,n,n.item)}),R})()}function Ue(e,t){Ae(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Or=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.")}},kr=class extends Error{constructor(){super("SkipAnimationSignal")}},Ct=e=>e instanceof Bt,Ji=1,Bt=class extends Gr{constructor(){super(...arguments),this.id=Ji++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=J(this);return e&&e.getValue()}to(...e){return H.to(this,e)}interpolate(...e){return xi(),H.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){je(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||rt.sort(this),je(this,{type:"priority",parent:this,priority:e})}},ce=Symbol.for("SpringPhase"),cn=1,fn=2,dn=4,_t=e=>(e[ce]&cn)>0,ne=e=>(e[ce]&fn)>0,Se=e=>(e[ce]&dn)>0,Ir=(e,t)=>t?e[ce]|=fn|cn:e[ce]&=-3,jr=(e,t)=>t?e[ce]|=dn:e[ce]&=-5,Ki=class extends Bt{constructor(e,t){if(super(),this.animation=new Hi,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,!f.und(e)||!f.und(t)){const r=f.obj(e)?{...e}:{...t,from:e};f.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(ne(this)||this._state.asyncTo)||Se(this)}get goal(){return M(this.animation.to)}get velocity(){const e=J(this);return e instanceof Le?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return _t(this)}get isAnimating(){return ne(this)}get isPaused(){return Se(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const n=this.animation;let{toValues:s}=n;const{config:a}=n,o=at(n.to);!o&&B(n.to)&&(s=z(M(n.to))),n.values.forEach((u,m)=>{if(u.done)return;const p=u.constructor==De?1:o?o[m].lastPosition:s[m];let v=n.immediate,g=p;if(!v){if(g=u.lastPosition,a.tension<=0){u.done=!0;return}let _=u.elapsedTime+=e;const R=n.fromValues[m],P=u.v0!=null?u.v0:u.v0=f.arr(a.velocity)?a.velocity[m]:a.velocity;let y;const b=a.precision||(R==p?.005:Math.min(1,Math.abs(p-R)*.001));if(f.und(a.duration))if(a.decay){const S=a.decay===!0?.998:a.decay,k=Math.exp(-(1-S)*_);g=R+P/(1-S)*(1-k),v=Math.abs(u.lastPosition-g)<=b,y=P*k}else{y=u.lastVelocity==null?P:u.lastVelocity;const S=a.restVelocity||b/10,k=a.clamp?0:a.bounce,V=!f.und(k),Z=R==p?u.v0>0:R<p;let N,fe=!1;const D=1,oe=Math.ceil(e/D);for(let L=0;L<oe&&(N=Math.abs(y)>S,!(!N&&(v=Math.abs(p-g)<=b,v)));++L){V&&(fe=g==p||g>p==Z,fe&&(y=-y*k,g=p));const ee=-a.tension*1e-6*(g-p),$=-a.friction*.001*y,te=(ee+$)/a.mass;y=y+te*D,g=g+y*D}}else{let S=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,u.durationProgress>0&&(u.elapsedTime=a.duration*u.durationProgress,_=u.elapsedTime+=e)),S=(a.progress||0)+_/this._memoizedDuration,S=S>1?1:S<0?0:S,u.durationProgress=S),g=R+a.easing(S)*(p-R),y=(g-u.lastPosition)/e,v=S==1}u.lastVelocity=y,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),v=!0)}o&&!o[m].done&&(v=!1),v?u.done=!0:t=!1,u.setValue(g,a.round)&&(r=!0)});const l=J(this),d=l.getValue();if(t){const u=M(n.to);(d!==u||r)&&!a.decay?(l.setValue(u),this._onChange(u)):r&&a.decay&&this._onChange(d),this._stop()}else r&&this._onChange(d)}set(e){return E.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ne(this)){const{to:e,config:t}=this.animation;E.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 f.und(e)?(r=this.queue||[],this.queue=[]):r=[f.obj(e)?e:{...t,to:e}],Promise.all(r.map(n=>this._update(n))).then(n=>Wt(this,n))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Ue(this._state,e&&this._lastCallId),E.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=f.obj(r)?r[t]:r,(r==null||At(r))&&(r=void 0),n=f.obj(n)?n[t]:n,n==null&&(n=void 0);const s={to:r,from:n};return _t(this)||(e.reverse&&([r,n]=[n,r]),n=M(n),f.und(n)?J(this)||this._set(r):this._set(n)),s}_update({...e},t){const{key:r,defaultProps:n}=this;e.default&&Object.assign(n,zt(e,(o,l)=>/^on/.test(l)?nn(o,r):o)),Vr(this,e,"onProps"),Pe(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 a=this._state;return on(++this._lastCallId,{key:r,props:e,defaultProps:n,state:a,actions:{pause:()=>{Se(this)||(jr(this,!0),xe(a.pauseQueue),Pe(this,"onPause",Q(this,Ee(this,this.animation.to)),this))},resume:()=>{Se(this)&&(jr(this,!1),ne(this)&&this._resume(),xe(a.resumeQueue),Pe(this,"onResume",Q(this,Ee(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const l=hn(e);if(l)return this._update(l,!0)}return o})}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(ve(this));const n=!f.und(e.to),s=!f.und(e.from);if(n||s)if(t.callId>this._lastToId)this._lastToId=t.callId;else return r(ve(this));const{key:a,defaultProps:o,animation:l}=this,{to:d,from:u}=l;let{to:m=d,from:p=u}=e;s&&!n&&(!t.default||f.und(m))&&(m=p),t.reverse&&([m,p]=[p,m]);const v=!re(p,u);v&&(l.from=p),p=M(p);const g=!re(m,d);g&&this._focus(m);const _=At(t.to),{config:R}=l,{decay:P,velocity:y}=R;(n||s)&&(R.velocity=0),t.config&&!_&&Gi(R,le(t.config,a),t.config!==o.config?le(o.config,a):void 0);let b=J(this);if(!b||f.und(m))return r(Q(this,!0));const S=f.und(t.reset)?s&&!t.default:!f.und(p)&&Ce(t.reset,a),k=S?p:this.get(),V=$e(m),Z=f.num(V)||f.arr(V)||st(V),N=!_&&(!Z||Ce(o.immediate||t.immediate,a));if(g){const L=xt(m);if(L!==b.constructor)if(N)b=this._set(V);else throw Error(`Cannot animate between ${b.constructor.name} and ${L.name}, as the "to" prop suggests`)}const fe=b.constructor;let D=B(m),oe=!1;if(!D){const L=S||!_t(this)&&v;(g||L)&&(oe=re($e(k),V),D=!oe),(!re(l.immediate,N)&&!N||!re(R.decay,P)||!re(R.velocity,y))&&(D=!0)}if(oe&&ne(this)&&(l.changed&&!S?D=!0:D||this._stop(d)),!_&&((D||B(d))&&(l.values=b.getPayload(),l.toValues=B(m)?null:fe==De?[1]:z(V)),l.immediate!=N&&(l.immediate=N,!N&&!S&&this._set(d)),D)){const{onRest:L}=l;A(Zi,$=>Vr(this,t,$));const ee=Q(this,Ee(this,d));xe(this._pendingCalls,ee),this._pendingCalls.add(r),l.changed&&E.batchedUpdates(()=>{var $;l.changed=!S,L==null||L(ee,this),S?le(o.onRest,ee):($=l.onStart)==null||$.call(l,ee,this)})}S&&this._set(k),_?r(ln(t.to,t,this._state,this)):D?this._start():ne(this)&&!g?this._pendingCalls.add(r):r(un(k))}_focus(e){const t=this.animation;e!==t.to&&(Rr(this)&&this._detach(),t.to=e,Rr(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;B(t)&&(ye(t,this),Ct(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;B(e)&&Fe(e,this)}_set(e,t=!0){const r=M(e);if(!f.und(r)){const n=J(this);if(!n||!re(r,n.getValue())){const s=xt(r);!n||n.constructor!=s?Lt(this,s.create(r)):n.setValue(r),n&&E.batchedUpdates(()=>{this._onChange(r,t)})}}return J(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Pe(this,"onStart",Q(this,Ee(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),le(this.animation.onChange,e,this)),le(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;J(this).reset(M(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ne(this)||(Ir(this,!0),Se(this)||this._resume())}_resume(){H.skipAnimation?this.finish():rt.start(this)}_stop(e,t){if(ne(this)){Ir(this,!1);const r=this.animation;A(r.values,s=>{s.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),je(this,{type:"idle",parent:this});const n=t?ve(this.get()):Q(this.get(),Ee(this,e??r.to));xe(this._pendingCalls,n),r.changed&&(r.changed=!1,Pe(this,"onRest",n,this))}}};function Ee(e,t){const r=$e(t),n=$e(e.get());return re(n,r)}function hn(e,t=e.loop,r=e.to){const n=le(t);if(n){const s=n!==!0&&an(n),a=(s||e).reverse,o=!s||s.reset;return Ne({...e,loop:t,default:!1,pause:void 0,to:!a||At(r)?r:void 0,from:o?e.from:void 0,reset:o,...s})}}function Ne(e){const{to:t,from:r}=e=an(e),n=new Set;return f.obj(t)&&Fr(t,n),f.obj(r)&&Fr(r,n),e.keys=n.size?Array.from(n):null,e}function Xi(e){const t=Ne(e);return f.und(t.default)&&(t.default=zt(t)),t}function Fr(e,t){X(e,(r,n)=>r!=null&&t.add(n))}var Zi=["onStart","onRest","onChange","onPause","onResume"];function Vr(e,t,r){e.animation[r]=t[r]!==sn(t,r)?nn(t[r],e.key):void 0}function Pe(e,t,...r){var n,s,a,o;(s=(n=e.animation)[t])==null||s.call(n,...r),(o=(a=e.defaultProps)[t])==null||o.call(a,...r)}var es=["onStart","onChange","onRest"],ts=1,rs=class{constructor(e,t){this.id=ts++,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];f.und(r)||this.springs[t].set(r)}}update(e){return e&&this.queue.push(Ne(e)),this}start(e){let{queue:t}=this;return e?t=z(e).map(Ne):this.queue=[],this._flush?this._flush(this,t):(yn(this,t),Ot(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const r=this.springs;A(z(t),n=>r[n].stop(!!e))}else Ue(this._state,this._lastAsyncId),this.each(r=>r.stop(!!e));return this}pause(e){if(f.und(e))this.start({pause:!0});else{const t=this.springs;A(z(e),r=>t[r].pause())}return this}resume(e){if(f.und(e))this.start({pause:!1});else{const t=this.springs;A(z(e),r=>t[r].resume())}return this}each(e){X(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,Ae(e,([l,d])=>{d.value=this.get(),l(d,this,this._item)}));const a=!n&&this._started,o=s||a&&r.size?this.get():null;s&&t.size&&Ae(t,([l,d])=>{d.value=o,l(d,this,this._item)}),a&&(this._started=!1,Ae(r,([l,d])=>{d.value=o,l(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;E.onFrame(this._onFrame)}};function Ot(e,t){return Promise.all(t.map(r=>mn(e,r))).then(r=>Wt(e,r))}async function mn(e,t,r){const{keys:n,to:s,from:a,loop:o,onRest:l,onResolve:d}=t,u=f.obj(t.default)&&t.default;o&&(t.loop=!1),s===!1&&(t.to=null),a===!1&&(t.from=null);const m=f.arr(s)||f.fun(s)?s:void 0;m?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):A(es,R=>{const P=t[R];if(f.fun(P)){const y=e._events[R];t[R]=({finished:b,cancelled:S})=>{const k=y.get(P);k?(b||(k.finished=!1),S&&(k.cancelled=!0)):y.set(P,{value:null,finished:b||!1,cancelled:S||!1})},u&&(u[R]=t[R])}});const p=e._state;t.pause===!p.paused?(p.paused=t.pause,xe(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);const v=(n||Object.keys(e.springs)).map(R=>e.springs[R].start(t)),g=t.cancel===!0||sn(t,"cancel")===!0;(m||g&&p.asyncId)&&v.push(on(++e._lastAsyncId,{props:t,state:p,actions:{pause:Et,resume:Et,start(R,P){g?(Ue(p,e._lastAsyncId),P(ve(e))):(R.onRest=l,P(ln(m,R,p,e)))}}})),p.paused&&await new Promise(R=>{p.resumeQueue.add(R)});const _=Wt(e,await Promise.all(v));if(o&&_.finished&&!(r&&_.noop)){const R=hn(t,o,s);if(R)return yn(e,[R]),mn(e,R,!0)}return d&&E.batchedUpdates(()=>d(_,e,e.item)),_}function Dr(e,t){const r={...e.springs};return t&&A(z(t),n=>{f.und(n.keys)&&(n=Ne(n)),f.obj(n.to)||(n={...n,to:void 0}),gn(r,n,s=>vn(s))}),pn(e,r),r}function pn(e,t){X(t,(r,n)=>{e.springs[n]||(e.springs[n]=r,ye(r,e))})}function vn(e,t){const r=new Ki;return r.key=e,t&&ye(r,t),r}function gn(e,t,r){t.keys&&A(t.keys,n=>{(e[n]||(e[n]=r(n)))._prepareNode(t)})}function yn(e,t){A(t,r=>{gn(e.springs,r,n=>vn(n,e))})}var ut=({children:e,...t})=>{const r=C.useContext(et),n=t.pause||!!r.pause,s=t.immediate||!!r.immediate;t=Oi(()=>({pause:n,immediate:s}),[n,s]);const{Provider:a}=et;return kt.createElement(a,{value:t},e)},et=ns(ut,{});ut.Provider=et.Provider;ut.Consumer=et.Consumer;function ns(e,t){return Object.assign(e,kt.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var is=()=>{const e=[],t=function(n){Ti();const s=[];return A(e,(a,o)=>{if(f.und(n))s.push(a.start());else{const l=r(n,a,o);l&&s.push(a.start(l))}}),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,a)=>{const o=f.fun(n)?n(a,s):n;o&&s.set(o)})},t.start=function(n){const s=[];return A(e,(a,o)=>{if(f.und(n))s.push(a.start());else{const l=this._getProps(n,a,o);l&&s.push(a.start(l))}}),s},t.stop=function(){return A(e,n=>n.stop(...arguments)),this},t.update=function(n){return A(e,(s,a)=>s.update(this._getProps(n,s,a))),this};const r=function(n,s,a){return f.fun(n)?n(a,s):n};return t._getProps=r,t};function ss(e,t,r){const n=f.fun(t)&&t;n&&!r&&(r=[]);const s=C.useMemo(()=>n||arguments.length==3?is():void 0,[]),a=C.useRef(0),o=Zr(),l=C.useMemo(()=>({ctrls:[],queue:[],flush(y,b){const S=Dr(y,b);return a.current>0&&!l.queue.length&&!Object.keys(S).some(V=>!y.springs[V])?Ot(y,b):new Promise(V=>{pn(y,S),l.queue.push(()=>{V(Ot(y,b))}),o()})}}),[]),d=C.useRef([...l.ctrls]),u=[],m=Er(e)||0;C.useMemo(()=>{A(d.current.slice(e,m),y=>{Wi(y,s),y.stop(!0)}),d.current.length=e,p(m,e)},[e]),C.useMemo(()=>{p(0,Math.min(m,e))},r);function p(y,b){for(let S=y;S<b;S++){const k=d.current[S]||(d.current[S]=new rs(null,l.flush)),V=n?n(S,k):t[S];V&&(u[S]=Xi(V))}}const v=d.current.map((y,b)=>Dr(y,u[b])),g=C.useContext(ut),_=Er(g),R=g!==_&&zi(g);Mt(()=>{a.current++,l.ctrls=d.current;const{queue:y}=l;y.length&&(l.queue=[],A(y,b=>b())),A(d.current,(b,S)=>{s==null||s.add(b),R&&b.start({default:g});const k=u[S];k&&(Bi(b,k.ref),b.ref?b.queue.push(k):b.start(k))})}),en(()=>()=>{A(l.ctrls,y=>y.stop(!0))});const P=v.map(y=>({...y}));return s?[P,s]:P}function as(e,t){const r=f.fun(e),[[n],s]=ss(1,r?e:[e],r?[]:t);return r||arguments.length==2?[n,s]:n}var os=class extends Bt{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=ke(...t);const r=this._get(),n=xt(r);Lt(this,n.create(r))}advance(e){const t=this._get(),r=this.get();re(t,r)||(J(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&$r(this._active)&&wt(this)}_get(){const e=f.arr(this.source)?this.source.map(M):z(M(this.source));return this.calc(...e)}_start(){this.idle&&!$r(this._active)&&(this.idle=!1,A(at(this),e=>{e.done=!1}),H.skipAnimation?(E.batchedUpdates(()=>this.advance()),wt(this)):rt.start(this))}_attach(){let e=1;A(z(this.source),t=>{B(t)&&ye(t,this),Ct(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){A(z(this.source),e=>{B(e)&&Fe(e,this)}),this._active.clear(),wt(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=z(this.source).reduce((t,r)=>Math.max(t,(Ct(r)?r.priority:0)+1),0))}};function us(e){return e.idle!==!1}function $r(e){return!e.size||Array.from(e).every(us)}function wt(e){e.idle||(e.idle=!0,A(at(e),t=>{t.done=!0}),je(e,{type:"idle",parent:e}))}H.assign({createStringInterpolator:Kr,to:(e,t)=>new os(e,t)});var bn=/^--/;function ls(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!bn.test(e)&&!(Oe.hasOwnProperty(e)&&Oe[e])?t+"px":(""+t).trim()}var Ur={};function cs(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:a,scrollTop:o,scrollLeft:l,viewBox:d,...u}=t,m=Object.values(u),p=Object.keys(u).map(v=>r||e.hasAttribute(v)?v:Ur[v]||(Ur[v]=v.replace(/([A-Z])/g,g=>"-"+g.toLowerCase())));a!==void 0&&(e.textContent=a);for(const v in s)if(s.hasOwnProperty(v)){const g=ls(v,s[v]);bn.test(v)?e.style.setProperty(v,g):e.style[v]=g}p.forEach((v,g)=>{e.setAttribute(v,m[g])}),n!==void 0&&(e.className=n),o!==void 0&&(e.scrollTop=o),l!==void 0&&(e.scrollLeft=l),d!==void 0&&e.setAttribute("viewBox",d)}var Oe={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},fs=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),ds=["Webkit","Ms","Moz","O"];Oe=Object.keys(Oe).reduce((e,t)=>(ds.forEach(r=>e[fs(r,t)]=e[t]),e),Oe);var hs=/^(matrix|translate|scale|rotate|skew)/,ms=/^(translate)/,ps=/^(rotate|skew)/,Rt=(e,t)=>f.num(e)&&e!==0?e+t:e,Je=(e,t)=>f.arr(e)?e.every(r=>Je(r,t)):f.num(e)?e===t:parseFloat(e)===t,vs=class extends ot{constructor({x:e,y:t,z:r,...n}){const s=[],a=[];(e||t||r)&&(s.push([e||0,t||0,r||0]),a.push(o=>[`translate3d(${o.map(l=>Rt(l,"px")).join(",")})`,Je(o,0)])),X(n,(o,l)=>{if(l==="transform")s.push([o||""]),a.push(d=>[d,d===""]);else if(hs.test(l)){if(delete n[l],f.und(o))return;const d=ms.test(l)?"px":ps.test(l)?"deg":"";s.push(z(o)),a.push(l==="rotate3d"?([u,m,p,v])=>[`rotate3d(${u},${m},${p},${Rt(v,d)})`,Je(v,0)]:u=>[`${l}(${u.map(m=>Rt(m,d)).join(",")})`,Je(u,l.startsWith("scale")?1:0)])}}),s.length&&(n.transform=new gs(s,a)),super(n)}},gs=class extends Gr{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=M(r[0]),[a,o]=this.transforms[n](f.arr(s)?s:r.map(M));e+=" "+a,t=t&&o}),t?"none":e}observerAdded(e){e==1&&A(this.inputs,t=>A(t,r=>B(r)&&ye(r,this)))}observerRemoved(e){e==0&&A(this.inputs,t=>A(t,r=>B(r)&&Fe(r,this)))}eventObserved(e){e.type=="change"&&(this._value=null),je(this,e)}},ys=["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"];H.assign({batchedUpdates:Gn.unstable_batchedUpdates,createStringInterpolator:Kr,colors:ai});var bs=Ui(ys,{applyAnimatedValues:cs,createAnimatedStyle:e=>new vs(e),getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r}),_s=bs.animated;function _n(e){const t=e.htmlElement??"div",[r,n]=C.useState(!1),s=C.useRef(null),a=C.useRef(null),[o,l]=C.useState(null),[d,u]=as(()=>({from:{opacity:0,transform:"scale(0)"},to:{opacity:1,transform:"scale(1)"}})),m=(g,_)=>Math.floor(Math.random()*(_-g+1))+g;C.useEffect(()=>{if(s.current&&a.current){const g=s.current.getBoundingClientRect(),_=a.current.getBoundingClientRect(),R=Math.max(g.height,_.height);l(R)}},[]),C.useEffect(()=>{if(!e.animate)return;const g=setTimeout(()=>{u({opacity:0,transform:"translateY(15px)",config:{duration:200},onRest:()=>{n(_=>!_),u({opacity:1,transform:"translateY(0px)",config:{duration:200}})}})},m(3500,15e3));return()=>clearTimeout(g)},[r,e.animate,u]);const p=e.animate&&r?e.content.simplified:e.content.english,v={...e.textStyles,minHeight:o!==null?`${o}px`:void 0,display:"inline-block",alignContent:"center"};return K.jsxs(K.Fragment,{children:[K.jsx("div",{ref:s,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap",font:"inherit"},children:e.content.english}),K.jsx("div",{ref:a,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap",font:"inherit"},children:e.content.simplified}),K.jsx(_s.div,{style:d,children:K.jsx(t,{style:v,children:p})})]})}const ws=({IconComponent:e,buttonText:t,buttonType:r="primary"})=>{const n=r==="primary"?"primary":"secondary";return K.jsx("div",{className:"banner-button-container",children:K.jsxs("button",{className:`banner-button ${n}`,children:[e&&K.jsx(e,{className:"icon-component"}),K.jsx(_n,{textStyles:{minWidth:"3rem"},content:t,animate:!0})]})})};exports.AnimatedText=_n;exports.BannerButton=ws;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.banner-button-container{display:inline-block;position:relative;overflow:hidden;border-radius:2.5rem;background:#489fb5;box-shadow:0 4px 4px #00000040}.banner-button-container:active{animation:pressDown .2s}.banner-button-container .banner-button{display:flex;align-items:center;position:relative;z-index:10;padding:.5rem 1rem;border:none;outline:none;transition:background-color}.banner-button-container .banner-button.primary{background-color:#489fb5;color:#fff}.banner-button-container .banner-button.secondary{background-color:#ffb652;color:#000}.banner-button-container .icon-component{margin-right:1.25rem}@media (min-width: 640px){.banner-button-container .icon-component{margin-right:.25rem}}.banner-button-container .animated-text{min-width:3rem}@keyframes pressDown{0%{transform:scale(1)}50%{transform:scale(.95)}to{transform:scale(1)}}
|