react-ui-animate 5.0.0-alpha.4 → 5.0.0-alpha.7

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 Dipesh Rai
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Dipesh Rai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,206 +1,206 @@
1
- # React UI Animate
2
-
3
- [![npm version](https://badge.fury.io/js/react-ui-animate.svg)](https://badge.fury.io/js/react-ui-animate)
4
-
5
- > Create smooth animations and interactive gestures in React applications effortlessly.
6
-
7
- ### Install
8
-
9
- You can install `react-ui-animate` via `npm` or `yarn`:
10
-
11
- ```sh
12
- npm install react-ui-animate
13
- ```
14
-
15
- ```sh
16
- yarn add react-ui-animate
17
- ```
18
-
19
- ---
20
-
21
- ## Getting Started
22
-
23
- The `react-ui-animate` library provides a straightforward way to add animations and gestures to your React components. Below are some common use cases.
24
-
25
- ### 1. useValue
26
-
27
- Use `useValue` to initialize and update an animated value.
28
-
29
- ```tsx
30
- import React from 'react';
31
- import {
32
- animate,
33
- useValue,
34
- withSpring,
35
- withTiming,
36
- withSequence,
37
- } from 'react-ui-animate';
38
-
39
- export const UseValue: React.FC = () => {
40
- const [width, setWidth] = useValue(100);
41
-
42
- return (
43
- <>
44
- <button
45
- onClick={() => {
46
- setWidth(withSequence([withTiming(100), withSpring(0)]));
47
- }}
48
- >
49
- SEQUENCE (100 → 0)
50
- </button>
51
- <button
52
- onClick={() => {
53
- setWidth(withSpring(200));
54
- }}
55
- >
56
- SPRING (→ 200)
57
- </button>
58
- <button
59
- onClick={() => {
60
- setWidth(400);
61
- }}
62
- >
63
- IMMEDIATE (→ 400)
64
- </button>
65
-
66
- <animate.div
67
- style={{
68
- width,
69
- height: 100,
70
- backgroundColor: 'red',
71
- left: 0,
72
- top: 0,
73
- }}
74
- />
75
- </>
76
- );
77
- };
78
- ```
79
-
80
- ### 2. useMount
81
-
82
- Use `useMount` to animate component mount and unmount transitions.
83
-
84
- ```tsx
85
- import React from 'react';
86
- import {
87
- animate,
88
- useMount,
89
- withDecay,
90
- withSequence,
91
- withSpring,
92
- withTiming,
93
- } from 'react-ui-animate';
94
-
95
- export const UseMount: React.FC = () => {
96
- const [open, setOpen] = React.useState(true);
97
- const mounted = useMount(open, { from: 0, enter: 1, exit: 0 });
98
-
99
- return (
100
- <>
101
- {mounted(
102
- (animation, isMounted) =>
103
- isMounted && (
104
- <animate.div
105
- style={{
106
- width: 100,
107
- height: 100,
108
- backgroundColor: 'teal',
109
- opacity: animation,
110
- }}
111
- />
112
- )
113
- )}
114
-
115
- <button onClick={() => setOpen((prev) => !prev)}>ANIMATE ME</button>
116
- </>
117
- );
118
- };
119
- ```
120
-
121
- ### 3. Interpolation
122
-
123
- Interpolate values for complex mappings like color transitions or movement.
124
-
125
- ```tsx
126
- import React, { useLayoutEffect, useState } from 'react';
127
- import { animate, useValue, withSpring } from 'react-ui-animate';
128
-
129
- export const Interpolation: React.FC = () => {
130
- const [open, setOpen] = useState(false);
131
- const [x, setX] = useValue(0);
132
-
133
- useLayoutEffect(() => {
134
- setX(withSpring(open ? 500 : 0));
135
- }, [open, setX]);
136
-
137
- return (
138
- <>
139
- <animate.div
140
- style={{
141
- width: 100,
142
- height: 100,
143
- backgroundColor: x.to([0, 500], ['red', 'blue']),
144
- translateX: x,
145
- }}
146
- />
147
-
148
- <button onClick={() => setOpen((p) => !p)}>ANIMATE ME</button>
149
- </>
150
- );
151
- };
152
- ```
153
-
154
- ---
155
-
156
- ## API Overview
157
-
158
- - **`useValue(initial)`**: Initializes an animated value.
159
- - **`animate`**: JSX wrapper for animatable elements (`animate.div`, `animate.span`, etc.).
160
- - **Modifiers**: `withSpring`, `withTiming`, `withDecay`, `withSequence`, `withEase` — functions to define animation behavior.
161
- - **`useMount(state, config)`**: Manages mount/unmount transitions. `config` includes `from`, `enter`, and `exit` values.
162
-
163
- ## Gestures
164
-
165
- `react-ui-animate` also provides hooks for handling gestures:
166
-
167
- - `useDrag`
168
- - `useMouseMove`
169
- - `useScroll`
170
- - `useWheel`
171
- - `useGesture`
172
-
173
- **Example: `useDrag`**
174
-
175
- ```tsx
176
- import React from 'react';
177
- import { useValue, animate, useDrag, withSpring } from 'react-ui-animate';
178
-
179
- export const Draggable: React.FC = () => {
180
- const [translateX, setTranslateX] = useValue(0);
181
-
182
- const bind = useDrag(({ down, movementX }) => {
183
- setTranslateX(down ? movementX : withSpring(0));
184
- });
185
-
186
- return (
187
- <animate.div
188
- {...bind()}
189
- style={{
190
- width: 100,
191
- height: 100,
192
- backgroundColor: '#3399ff',
193
- translateX,
194
- }}
195
- />
196
- );
197
- };
198
- ```
199
-
200
- ## Documentation
201
-
202
- For detailed documentation and examples, visit the official [react-ui-animate documentation](https://react-ui-animate.js.org/).
203
-
204
- ## License
205
-
206
- This library is licensed under the MIT License.
1
+ # React UI Animate
2
+
3
+ [![npm version](https://badge.fury.io/js/react-ui-animate.svg)](https://badge.fury.io/js/react-ui-animate)
4
+
5
+ > Create smooth animations and interactive gestures in React applications effortlessly.
6
+
7
+ ### Install
8
+
9
+ You can install `react-ui-animate` via `npm` or `yarn`:
10
+
11
+ ```sh
12
+ npm install react-ui-animate
13
+ ```
14
+
15
+ ```sh
16
+ yarn add react-ui-animate
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Getting Started
22
+
23
+ The `react-ui-animate` library provides a straightforward way to add animations and gestures to your React components. Below are some common use cases.
24
+
25
+ ### 1. useValue
26
+
27
+ Use `useValue` to initialize and update an animated value.
28
+
29
+ ```tsx
30
+ import React from 'react';
31
+ import {
32
+ animate,
33
+ useValue,
34
+ withSpring,
35
+ withTiming,
36
+ withSequence,
37
+ } from 'react-ui-animate';
38
+
39
+ export const UseValue: React.FC = () => {
40
+ const [width, setWidth] = useValue(100);
41
+
42
+ return (
43
+ <>
44
+ <button
45
+ onClick={() => {
46
+ setWidth(withSequence([withTiming(100), withSpring(0)]));
47
+ }}
48
+ >
49
+ SEQUENCE (100 → 0)
50
+ </button>
51
+ <button
52
+ onClick={() => {
53
+ setWidth(withSpring(200));
54
+ }}
55
+ >
56
+ SPRING (→ 200)
57
+ </button>
58
+ <button
59
+ onClick={() => {
60
+ setWidth(400);
61
+ }}
62
+ >
63
+ IMMEDIATE (→ 400)
64
+ </button>
65
+
66
+ <animate.div
67
+ style={{
68
+ width,
69
+ height: 100,
70
+ backgroundColor: 'red',
71
+ left: 0,
72
+ top: 0,
73
+ }}
74
+ />
75
+ </>
76
+ );
77
+ };
78
+ ```
79
+
80
+ ### 2. useMount
81
+
82
+ Use `useMount` to animate component mount and unmount transitions.
83
+
84
+ ```tsx
85
+ import React from 'react';
86
+ import {
87
+ animate,
88
+ useMount,
89
+ withDecay,
90
+ withSequence,
91
+ withSpring,
92
+ withTiming,
93
+ } from 'react-ui-animate';
94
+
95
+ export const UseMount: React.FC = () => {
96
+ const [open, setOpen] = React.useState(true);
97
+ const mounted = useMount(open, { from: 0, enter: 1, exit: 0 });
98
+
99
+ return (
100
+ <>
101
+ {mounted(
102
+ (animation, isMounted) =>
103
+ isMounted && (
104
+ <animate.div
105
+ style={{
106
+ width: 100,
107
+ height: 100,
108
+ backgroundColor: 'teal',
109
+ opacity: animation,
110
+ }}
111
+ />
112
+ )
113
+ )}
114
+
115
+ <button onClick={() => setOpen((prev) => !prev)}>ANIMATE ME</button>
116
+ </>
117
+ );
118
+ };
119
+ ```
120
+
121
+ ### 3. Interpolation
122
+
123
+ Interpolate values for complex mappings like color transitions or movement.
124
+
125
+ ```tsx
126
+ import React, { useLayoutEffect, useState } from 'react';
127
+ import { animate, useValue, withSpring } from 'react-ui-animate';
128
+
129
+ export const Interpolation: React.FC = () => {
130
+ const [open, setOpen] = useState(false);
131
+ const [x, setX] = useValue(0);
132
+
133
+ useLayoutEffect(() => {
134
+ setX(withSpring(open ? 500 : 0));
135
+ }, [open, setX]);
136
+
137
+ return (
138
+ <>
139
+ <animate.div
140
+ style={{
141
+ width: 100,
142
+ height: 100,
143
+ backgroundColor: x.to([0, 500], ['red', 'blue']),
144
+ translateX: x,
145
+ }}
146
+ />
147
+
148
+ <button onClick={() => setOpen((p) => !p)}>ANIMATE ME</button>
149
+ </>
150
+ );
151
+ };
152
+ ```
153
+
154
+ ---
155
+
156
+ ## API Overview
157
+
158
+ - **`useValue(initial)`**: Initializes an animated value.
159
+ - **`animate`**: JSX wrapper for animatable elements (`animate.div`, `animate.span`, etc.).
160
+ - **Modifiers**: `withSpring`, `withTiming`, `withDecay`, `withSequence`, `withEase` — functions to define animation behavior.
161
+ - **`useMount(state, config)`**: Manages mount/unmount transitions. `config` includes `from`, `enter`, and `exit` values.
162
+
163
+ ## Gestures
164
+
165
+ `react-ui-animate` also provides hooks for handling gestures:
166
+
167
+ - `useDrag`
168
+ - `useMouseMove`
169
+ - `useScroll`
170
+ - `useWheel`
171
+ - `useGesture`
172
+
173
+ **Example: `useDrag`**
174
+
175
+ ```tsx
176
+ import React from 'react';
177
+ import { useValue, animate, useDrag, withSpring } from 'react-ui-animate';
178
+
179
+ export const Draggable: React.FC = () => {
180
+ const [translateX, setTranslateX] = useValue(0);
181
+
182
+ const bind = useDrag(({ down, movementX }) => {
183
+ setTranslateX(down ? movementX : withSpring(0));
184
+ });
185
+
186
+ return (
187
+ <animate.div
188
+ {...bind()}
189
+ style={{
190
+ width: 100,
191
+ height: 100,
192
+ backgroundColor: '#3399ff',
193
+ translateX,
194
+ }}
195
+ />
196
+ );
197
+ };
198
+ ```
199
+
200
+ ## Documentation
201
+
202
+ For detailed documentation and examples, visit the official [react-ui-animate documentation](https://react-ui-animate.js.org/).
203
+
204
+ ## License
205
+
206
+ This library is licensed under the MIT License.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var e=require("@raidipesh78/re-motion"),t=require("react");function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=n(t),r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};function f(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function l(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var u=function(){function t(t){this.animation=new e.MotionValue(t)}return t.prototype.set=function(t){var n,i,r,o,a,f,s=this;if(!(t instanceof e.MotionValue))if(null===(n=this.unsubscribe)||void 0===n||n.call(this),this.unsubscribe=void 0,"object"==typeof t&&null!==t){var l=t.type,u=t.to,c=t.options;if((null==c?void 0:c.onChange)&&(this.unsubscribe=this.animation.subscribe(c.onChange)),"sequence"===l){var h=(null!==(i=null==c?void 0:c.steps)&&void 0!==i?i:[]).map((function(e){return s.buildDriver(e)})),v=e.sequence(h);return(null==c?void 0:c.onComplete)&&(null===(r=v.setOnComplete)||void 0===r||r.call(v,null==c?void 0:c.onComplete)),void v.start()}if("loop"===l){var d=this.buildDriver(c.controller);v=e.loop(d,null==c?void 0:c.iterations);return(null==c?void 0:c.onComplete)&&(null===(o=v.setOnComplete)||void 0===o||o.call(v,null==c?void 0:c.onComplete)),void v.start()}null===(f=(a=this.buildDriver({type:l,to:u,options:c})).start)||void 0===f||f.call(a)}else this.animation.set(t)},t.prototype.buildDriver=function(t){var n,i,r=this.animation;switch(t.type){case"spring":return e.spring(r,t.to,t.options);case"timing":return e.timing(r,t.to,t.options);case"decay":return e.decay(r,null===(n=t.options)||void 0===n?void 0:n.velocity,t.options);case"delay":return e.delay(null===(i=t.options)||void 0===i?void 0:i.delay);case"sequence":return e.sequence(t.options.steps.map(this.buildDriver.bind(this)));default:throw new Error('Unsupported driver type "'.concat(t.type,'"'))}},Object.defineProperty(t.prototype,"value",{get:function(){return this.animation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"current",{get:function(){return this.animation.current},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){var e;null===(e=this.unsubscribe)||void 0===e||e.call(this),this.unsubscribe=void 0},t}();function c(e){var n,i,r=t.useRef(null);if(null===r.current){var o=[];if(Array.isArray(e))e.forEach((function(e,t){o.push([String(t),new u(e)])}));else if("object"==typeof e)try{for(var a=f(Object.entries(e)),l=a.next();!l.done;l=a.next()){var c=s(l.value,2),h=c[0],v=c[1];o.push([h,new u(v)])}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}else o.push(["__0",new u(e)]);r.current=o}t.useEffect((function(){return function(){r.current.forEach((function(e){return s(e,2)[1].destroy()}))}}),[]);var d=function(){var t,n,i=r.current;if(Array.isArray(e))return i.map((function(e){return s(e,2)[1].value}));if("object"==typeof e){var o={};try{for(var a=f(i),l=a.next();!l.done;l=a.next()){var u=s(l.value,2),c=u[0],h=u[1];o[c]=h.value}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o}return i[0][1].value}();return[d,function(t){var n,i,o=r.current;if(Array.isArray(e)){var a=t;Object.entries(a).forEach((function(e){var t,n=s(e,2),i=n[0],r=n[1],a=Number(i);isNaN(a)||void 0===r||null===(t=o[a])||void 0===t||t[1].set(r)}))}else if("object"==typeof e&&null!==e){a=t;var l=function(e,t){var n=o.find((function(t){return s(t,1)[0]===e}));n&&void 0!==t&&n[1].set(t)};try{for(var u=f(Object.entries(a)),c=u.next();!c.done;c=u.next()){var h=s(c.value,2);l(h[0],h[1])}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}else o[0][1].set(t)}]}var h={Timing:{BOUNCE:{duration:500,easing:e.Easing.bounce},EASE_IN:{duration:500,easing:e.Easing.in(e.Easing.ease)},EASE_OUT:{duration:500,easing:e.Easing.out(e.Easing.ease)},EASE_IN_OUT:{duration:500,easing:e.Easing.inOut(e.Easing.ease)},POWER1:{duration:500,easing:e.Easing.bezier(.17,.42,.51,.97)},POWER2:{duration:500,easing:e.Easing.bezier(.07,.11,.13,1)},POWER3:{duration:500,easing:e.Easing.bezier(.09,.7,.16,1.04)},POWER4:{duration:500,easing:e.Easing.bezier(.05,.54,0,1.03)},LINEAR:{duration:500,easing:e.Easing.linear}},Spring:{ELASTIC:{mass:1,friction:18,tension:250},EASE:{mass:1,friction:26,tension:170},STIFF:{mass:1,friction:18,tension:350},WOBBLE:{mass:1,friction:8,tension:250}}},v=function(e,t){var n,i,r;return{type:"spring",to:e,options:{stiffness:null!==(n=null==t?void 0:t.tension)&&void 0!==n?n:100,damping:null!==(i=null==t?void 0:t.friction)&&void 0!==i?i:10,mass:null!==(r=null==t?void 0:t.mass)&&void 0!==r?r:1,onStart:null==t?void 0:t.onStart,onChange:null==t?void 0:t.onChange,onComplete:null==t?void 0:t.onRest}}};var d=/[+-]?\d+(\.\d+)?|[\s]?\.\d+|#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})/gi,m=/#[a-f\d]{3,}|transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|burntsienna|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen/gi,p={transparent:"#00000000",aliceblue:"#f0f8ffff",antiquewhite:"#faebd7ff",aqua:"#00ffffff",aquamarine:"#7fffd4ff",azure:"#f0ffffff",beige:"#f5f5dcff",bisque:"#ffe4c4ff",black:"#000000ff",blanchedalmond:"#ffebcdff",blue:"#0000ffff",blueviolet:"#8a2be2ff",brown:"#a52a2aff",burlywood:"#deb887ff",burntsienna:"#ea7e5dff",cadetblue:"#5f9ea0ff",chartreuse:"#7fff00ff",chocolate:"#d2691eff",coral:"#ff7f50ff",cornflowerblue:"#6495edff",cornsilk:"#fff8dcff",crimson:"#dc143cff",cyan:"#00ffffff",darkblue:"#00008bff",darkcyan:"#008b8bff",darkgoldenrod:"#b8860bff",darkgray:"#a9a9a9ff",darkgreen:"#006400ff",darkgrey:"#a9a9a9ff",darkkhaki:"#bdb76bff",darkmagenta:"#8b008bff",darkolivegreen:"#556b2fff",darkorange:"#ff8c00ff",darkorchid:"#9932ccff",darkred:"#8b0000ff",darksalmon:"#e9967aff",darkseagreen:"#8fbc8fff",darkslateblue:"#483d8bff",darkslategray:"#2f4f4fff",darkslategrey:"#2f4f4fff",darkturquoise:"#00ced1ff",darkviolet:"#9400d3ff",deeppink:"#ff1493ff",deepskyblue:"#00bfffff",dimgray:"#696969ff",dimgrey:"#696969ff",dodgerblue:"#1e90ffff",firebrick:"#b22222ff",floralwhite:"#fffaf0ff",forestgreen:"#228b22ff",fuchsia:"#ff00ffff",gainsboro:"#dcdcdcff",ghostwhite:"#f8f8ffff",gold:"#ffd700ff",goldenrod:"#daa520ff",gray:"#808080ff",green:"#008000ff",greenyellow:"#adff2fff",grey:"#808080ff",honeydew:"#f0fff0ff",hotpink:"#ff69b4ff",indianred:"#cd5c5cff",indigo:"#4b0082ff",ivory:"#fffff0ff",khaki:"#f0e68cff",lavender:"#e6e6faff",lavenderblush:"#fff0f5ff",lawngreen:"#7cfc00ff",lemonchiffon:"#fffacdff",lightblue:"#add8e6ff",lightcoral:"#f08080ff",lightcyan:"#e0ffffff",lightgoldenrodyellow:"#fafad2ff",lightgray:"#d3d3d3ff",lightgreen:"#90ee90ff",lightgrey:"#d3d3d3ff",lightpink:"#ffb6c1ff",lightsalmon:"#ffa07aff",lightseagreen:"#20b2aaff",lightskyblue:"#87cefaff",lightslategray:"#778899ff",lightslategrey:"#778899ff",lightsteelblue:"#b0c4deff",lightyellow:"#ffffe0ff",lime:"#00ff00ff",limegreen:"#32cd32ff",linen:"#faf0e6ff",magenta:"#ff00ffff",maroon:"#800000ff",mediumaquamarine:"#66cdaaff",mediumblue:"#0000cdff",mediumorchid:"#ba55d3ff",mediumpurple:"#9370dbff",mediumseagreen:"#3cb371ff",mediumslateblue:"#7b68eeff",mediumspringgreen:"#00fa9aff",mediumturquoise:"#48d1ccff",mediumvioletred:"#c71585ff",midnightblue:"#191970ff",mintcream:"#f5fffaff",mistyrose:"#ffe4e1ff",moccasin:"#ffe4b5ff",navajowhite:"#ffdeadff",navy:"#000080ff",oldlace:"#fdf5e6ff",olive:"#808000ff",olivedrab:"#6b8e23ff",orange:"#ffa500ff",orangered:"#ff4500ff",orchid:"#da70d6ff",palegoldenrod:"#eee8aaff",palegreen:"#98fb98ff",paleturquoise:"#afeeeeff",palevioletred:"#db7093ff",papayawhip:"#ffefd5ff",peachpuff:"#ffdab9ff",peru:"#cd853fff",pink:"#ffc0cbff",plum:"#dda0ddff",powderblue:"#b0e0e6ff",purple:"#800080ff",rebeccapurple:"#663399ff",red:"#ff0000ff",rosybrown:"#bc8f8fff",royalblue:"#4169e1ff",saddlebrown:"#8b4513ff",salmon:"#fa8072ff",sandybrown:"#f4a460ff",seagreen:"#2e8b57ff",seashell:"#fff5eeff",sienna:"#a0522dff",silver:"#c0c0c0ff",skyblue:"#87ceebff",slateblue:"#6a5acdff",slategray:"#708090ff",slategrey:"#708090ff",snow:"#fffafaff",springgreen:"#00ff7fff",steelblue:"#4682b4ff",tan:"#d2b48cff",teal:"#008080ff",thistle:"#d8bfd8ff",tomato:"#ff6347ff",turquoise:"#40e0d0ff",violet:"#ee82eeff",wheat:"#f5deb3ff",white:"#ffffffff",whitesmoke:"#f5f5f5ff",yellow:"#ffff00ff",yellowgreen:"#9acd32ff"};function y(e){var t=function(e){return e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,i){return"#"+t+t+n+n+i+i}))}(e),n=function(e){return 7===e.length?e+"FF":e}(t),i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16),a:parseInt(i[4],16)/255}}function g(e){var t=e.r,n=e.g,i=e.b,r=e.a;return"#"+(256|t).toString(16).slice(1)+(256|n).toString(16).slice(1)+(256|i).toString(16).slice(1)+(255*r|256).toString(16).slice(1)}var b=function(e,t,n,i){var r=s(t,4),o=r[0],a=r[1],f=r[2],l=r[3],u=e;if(u<o){if("identity"===n)return u;"clamp"===n&&(u=o)}if(u>a){if("identity"===i)return u;"clamp"===i&&(u=a)}return f===l?f:o===a?e<=o?f:l:(o===-1/0?u=-u:a===1/0?u-=o:u=(u-o)/(a-o),f===-1/0?u=-u:l===1/0?u+=f:u=u*(l-f)+f,u)},x=function(e,t,n,i){var r=s(t,4),o=r[0],a=r[1],f=r[2],l=r[3];if(f.length===l.length)return f.map((function(t,r){return"string"==typeof t?function(e,t){var n=s(t,4),i=n[0],r=n[1],o=n[2],a=n[3],f=y(o),l=y(a);return g({r:b(e,[i,r,f.r,l.r],"clamp","clamp"),g:b(e,[i,r,f.g,l.g],"clamp","clamp"),b:b(e,[i,r,f.b,l.b],"clamp","clamp"),a:b(e,[i,r,f.a,l.a],"clamp","clamp")})}(e,[o,a,t,l[r]]):b(e,[o,a,t,l[r]],n,i)}));throw new Error("Array length doesn't match")},w=function(e){return e.replace(d,"$")},E=function(e){return e.match(d).map((function(e){return-1!==e.indexOf("#")?e:Number(e)}))},k=function(e){return e.replace(m,(function(e){if(-1!==e.indexOf("#"))return g(y(e));if(Object.prototype.hasOwnProperty.call(p,e))return p[e];throw new Error("String cannot be parsed!")}))};function M(e,t){var n=new Map;return t.forEach((function(t){var i=s(t,3),r=i[0],o=i[1],a=i[2],f=void 0!==a&&a;n.set(r,function(e,t,n,i){return void 0===i&&(i=!1),e.forEach((function(e){e.addEventListener(t,n,i)})),function(){e.forEach((function(e){e.removeEventListener(t,n,i)}))}}(e,r,o,f))})),function(e){var t,i;try{for(var r=f(n.entries()),o=r.next();!o.done;o=r.next()){var a=s(o.value,2),l=a[0],u=a[1];if(!e)return void u();-1!==e.indexOf(l)&&u()}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}}}function _(e,t,n){return Math.min(Math.max(e,t),n)}function O(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}var I=function(e,t){return{x:e,y:t}},C=function(){function e(){this.lastTimeStamp=Date.now(),this.isActive=!1,this.targetElements=[]}return e.prototype._initEvents=function(){},e.prototype._cancelEvents=function(){this._subscribe&&this._subscribe()},e.prototype.applyCallback=function(e){this.callback=e},e.prototype.applyGesture=function(e){var t=this,n=e.targetElement,i=e.targetElements,r=e.callback,o=e.config;return this.targetElement=n,this.targetElements=i.map((function(e){return e.current})),this.callback=r,this.config=o,this._initEvents(),function(){return t._subscribe&&t._subscribe()}},e._VELOCITY_LIMIT=20,e}(),S=function(e){function t(){var t=e.apply(this,l([],s(arguments),!1))||this;return t.movementStart=I(0,0),t.initialMovement=I(0,0),t.movement=I(0,0),t.previousMovement=I(0,0),t.translation=I(0,0),t.offset=I(0,0),t.velocity=I(0,0),t}return o(t,e),t.prototype._initEvents=function(){(this.targetElement||this.targetElements.length>0)&&(this._subscribe=M([window],[["mousedown",this.pointerDown.bind(this)],["mousemove",this.pointerMove.bind(this)],["mouseup",this.pointerUp.bind(this)],["touchstart",this.pointerDown.bind(this),{passive:!1}],["touchmove",this.pointerMove.bind(this),{passive:!1}],["touchend",this.pointerUp.bind(this)]]))},t.prototype._cancelEvents=function(){this._subscribe&&this._subscribe(["mousedown","mousemove","touchstart","touchmove"])},t.prototype._handleCallback=function(){var e=this;this.callback&&this.callback({args:[this.currentIndex],down:this.isActive,movementX:this.movement.x,movementY:this.movement.y,offsetX:this.translation.x,offsetY:this.translation.y,velocityX:this.velocity.x,velocityY:this.velocity.y,distanceX:Math.abs(this.movement.x),distanceY:Math.abs(this.movement.y),directionX:Math.sign(this.movement.x),directionY:Math.sign(this.movement.y),cancel:function(){e._cancelEvents()}})},t.prototype.pointerDown=function(e){var t;"touchstart"===e.type?this.movementStart={x:e.touches[0].clientX,y:e.touches[0].clientY}:this.movementStart={x:e.clientX,y:e.clientY},this.movement={x:0,y:0},this.offset={x:this.translation.x,y:this.translation.y},this.previousMovement={x:0,y:0},this.velocity={x:0,y:0};var n=this.targetElements.find((function(t){return t===e.target}));if(e.target===this.targetElement||n){this.isActive=!0,e.preventDefault(),n&&(this.currentIndex=this.targetElements.indexOf(n));var i=(null===(t=this.config)||void 0===t?void 0:t.initial)&&this.config.initial(),r=null==i?void 0:i.movementX,o=null==i?void 0:i.movementY;this.initialMovement={x:null!=r?r:0,y:null!=o?o:0},this.movement={x:this.initialMovement.x,y:this.initialMovement.y},this.previousMovement={x:this.initialMovement.x,y:this.initialMovement.y},this._handleCallback()}},t.prototype.pointerMove=function(e){if(this.isActive){e.preventDefault();var t=Date.now(),n=_(t-this.lastTimeStamp,.1,64);this.lastTimeStamp=t;var i=n/1e3;"touchmove"===e.type?this.movement={x:this.initialMovement.x+(e.touches[0].clientX-this.movementStart.x),y:this.initialMovement.y+(e.touches[0].clientY-this.movementStart.y)}:this.movement={x:this.initialMovement.x+(e.clientX-this.movementStart.x),y:this.initialMovement.y+(e.clientY-this.movementStart.y)},this.translation={x:this.offset.x+this.movement.x,y:this.offset.y+this.movement.y},this.velocity={x:_((this.movement.x-this.previousMovement.x)/i/1e3,-1*C._VELOCITY_LIMIT,C._VELOCITY_LIMIT),y:_((this.movement.y-this.previousMovement.y)/i/1e3,-1*C._VELOCITY_LIMIT,C._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()}},t.prototype.pointerUp=function(){this.isActive&&(this.isActive=!1,this._handleCallback(),this._cancelEvents(),this._initEvents())},t}(C),T=function(e){function t(){var t=e.apply(this,l([],s(arguments),!1))||this;return t.movement=I(0,0),t.previousMovement=I(0,0),t.velocity=I(0,0),t.direction=I(0,0),t}return o(t,e),t.prototype._initEvents=function(){this.targetElement?this._subscribe=M([this.targetElement],[["mousemove",this.onMouseMove.bind(this)]]):this.targetElements.length>0?this._subscribe=M(this.targetElements,[["mousemove",this.onMouseMove.bind(this)]]):this._subscribe=M([window],[["mousemove",this.onMouseMove.bind(this)]])},t.prototype._handleCallback=function(){var e;this.callback&&this.callback({args:[this.currentIndex],event:this.event,isMoving:this.isActive,target:null===(e=this.event)||void 0===e?void 0:e.target,mouseX:this.movement.x,mouseY:this.movement.y,velocityX:this.velocity.x,velocityY:this.velocity.y,directionX:this.direction.x,directionY:this.direction.y})},t.prototype.onMouseMove=function(e){var t=this,n=this.targetElements.find((function(t){return t===e.target}));n&&(this.currentIndex=this.targetElements.indexOf(n)),this.event=e;var i=Date.now(),r=Math.min(i-this.lastTimeStamp,64);this.lastTimeStamp=i;var o=r/1e3,a=e.clientX,f=e.clientY;this.movement={x:a,y:f},-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){t.isActive=!1,t.direction={x:0,y:0},t.velocity={x:0,y:0},t._handleCallback()}),250);var s=this.movement.x-this.previousMovement.x,l=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(s),y:Math.sign(l)},this.velocity={x:_(s/o/1e3,-1*C._VELOCITY_LIMIT,C._VELOCITY_LIMIT),y:_(l/o/1e3,-1*C._VELOCITY_LIMIT,C._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},t}(C),L=function(e){function t(){var t=e.apply(this,l([],s(arguments),!1))||this;return t.movement=I(0,0),t.previousMovement=I(0,0),t.direction=I(0,0),t.velocity=I(0,0),t}return o(t,e),t.prototype._initEvents=function(){this.targetElement?this._subscribe=M([this.targetElement],[["scroll",this.scrollElementListener.bind(this)]]):this._subscribe=M([window],[["scroll",this.scrollListener.bind(this)]])},t.prototype._handleCallback=function(){this.callback&&this.callback({isScrolling:this.isActive,scrollX:this.movement.x,scrollY:this.movement.y,velocityX:this.velocity.x,velocityY:this.velocity.y,directionX:this.direction.x,directionY:this.direction.y})},t.prototype.onScroll=function(e){var t=this,n=e.x,i=e.y,r=Date.now(),o=Math.min(r-this.lastTimeStamp,64);this.lastTimeStamp=r;var a=o/1e3;this.movement={x:n,y:i},-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){t.isActive=!1,t.direction={x:0,y:0},t.velocity={x:0,y:0},t._handleCallback()}),250);var f=this.movement.x-this.previousMovement.x,s=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(f),y:Math.sign(s)},this.velocity={x:_(f/a/1e3,-1*C._VELOCITY_LIMIT,C._VELOCITY_LIMIT),y:_(s/a/1e3,-1*C._VELOCITY_LIMIT,C._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},t.prototype.scrollListener=function(){var e=window.pageYOffset,t=window.pageXOffset;this.onScroll({x:t,y:e})},t.prototype.scrollElementListener=function(){var e,t,n=(null===(e=this.targetElement)||void 0===e?void 0:e.scrollLeft)||0,i=(null===(t=this.targetElement)||void 0===t?void 0:t.scrollTop)||0;this.onScroll({x:n,y:i})},t}(C),A=function(e){function t(){var t=e.apply(this,l([],s(arguments),!1))||this;return t.movement=I(0,0),t.previousMovement=I(0,0),t.direction=I(0,0),t.velocity=I(0,0),t.delta=I(0,0),t.offset=I(0,0),t.translation=I(0,0),t}return o(t,e),t.prototype._initEvents=function(){this.targetElement&&(this._subscribe=M([this.targetElement],[["wheel",this.onWheel.bind(this)]]))},t.prototype._handleCallback=function(){this.callback&&this.callback({target:this.targetElement,isWheeling:this.isActive,deltaX:this.delta.x,deltaY:this.delta.y,directionX:this.direction.x,directionY:this.direction.y,movementX:this.movement.x,movementY:this.movement.y,offsetX:this.offset.x,offsetY:this.offset.y,velocityX:this.velocity.x,velocityY:this.velocity.y})},t.prototype.onWheel=function(e){var t=this,n=e.deltaX,i=e.deltaY,r=e.deltaMode,o=Date.now(),a=Math.min(o-this.lastTimeStamp,64);this.lastTimeStamp=o;var f=a/1e3;this.isActive=!0,-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){t.isActive=!1,t.translation={x:t.offset.x,y:t.offset.y},t._handleCallback(),t.velocity={x:0,y:0},t.movement={x:0,y:0}}),200),1===r?(n*=40,i*=40):2===r&&(n*=800,i*=800),this.delta={x:n,y:i},this.movement={x:this.movement.x+n,y:this.movement.y+i},this.offset={x:this.translation.x+this.movement.x,y:this.translation.y+this.movement.y};var s=this.movement.x-this.previousMovement.x,l=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(s),y:Math.sign(l)},this.velocity={x:_(s/f/1e3,-1*C._VELOCITY_LIMIT,C._VELOCITY_LIMIT),y:_(l/f/1e3,-1*C._VELOCITY_LIMIT,C._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},t}(C),Y=function(e){var t=i.useRef(),n=i.useRef([]),r=i.useRef(new Map).current;return i.useEffect((function(){var t,n;try{for(var i=f(r.entries()),o=i.next();!o.done;o=i.next()){var a=s(o.value,2)[1],l=a.keyIndex,u=a.gesture,c=s(e[l],3)[2];u.applyCallback(c)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}),[e]),i.useEffect((function(){return e.forEach((function(e,i){var o=s(e,4),a=o[0],f=o[1],l=o[2],u=o[3];queueMicrotask((function(){return r.set(a,{keyIndex:i,gesture:f,unsubscribe:f.applyGesture({targetElement:t.current,targetElements:n.current,callback:l,config:u})})}))})),function(){var e,t;try{for(var n=f(r.entries()),i=n.next();!i.done;i=n.next()){var o=s(i.value,2)[1].unsubscribe;o&&o()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}}})),function(e){return null==e?{ref:t}:(n.current[e]=n.current[e]||i.createRef(),{ref:n.current[e]})}};Object.defineProperty(exports,"Easing",{enumerable:!0,get:function(){return e.Easing}}),Object.defineProperty(exports,"animate",{enumerable:!0,get:function(){return e.motion}}),Object.defineProperty(exports,"makeAnimated",{enumerable:!0,get:function(){return e.makeMotion}}),exports.AnimationConfig=h,exports.bin=function(e){return e?1:0},exports.clamp=_,exports.interpolateNumbers=function(e,t,n,i){var r,o,a=null==i?void 0:i.extrapolate,l=null==i?void 0:i.extrapolateLeft,u=null==i?void 0:i.extrapolateRight,c=function(e,t,n){var i=t.length,r=[];e<t[0]?r=[t[0],t[1],n[0],n[1]]:e>t[i-1]&&(r=[t[i-2],t[i-1],n[i-2],n[i-1]]);for(var o=1;o<i;++o)if(e<=t[o]){r=[t[o-1],t[o],n[o-1],n[o]];break}return r}(e,t,n),h="extend";void 0!==l?h=l:void 0!==a&&(h=a);var v,d="extend";if(void 0!==u?d=u:void 0!==a&&(d=a),n.length){if("number"==typeof n[0])return b(e,c,h,d);if(Array.isArray(n[0]))return x(e,c,h,d);var m=s(c,4),p=m[0],y=m[1],g=m[2],M=m[3],_=k(g),O=k(M),I=w(_);if(v=O,w(_).trim().replace(/\s/g,"")===w(v).trim().replace(/\s/g,"")){var C=E(_),S=E(O),T=x(e,[p,y,C,S],h,d);try{for(var L=f(T),A=L.next();!A.done;A=L.next()){var Y=A.value;I=I.replace("$",Y)}}catch(e){r={error:e}}finally{try{A&&!A.done&&(o=L.return)&&o.call(L)}finally{if(r)throw r.error}}return I}throw new Error("Output range doesn't match string format!")}throw new Error("Output range cannot be Empty")},exports.mix=function(e,t,n){return t*(1-e)+n*e},exports.move=function(e,t,n){var i=e[t],r=e.length,o=t-n;if(o>0)return l(l(l(l([],s(e.slice(0,n)),!1),[i],!1),s(e.slice(n,t)),!1),s(e.slice(t+1,r)),!1);if(o<0){var a=n+1;return l(l(l(l([],s(e.slice(0,t)),!1),s(e.slice(t+1,a)),!1),[i],!1),s(e.slice(a,r)),!1)}return e},exports.rubberClamp=function(e,t,n,i){return void 0===i&&(i=.15),0===i?_(e,t,n):e<t?-O(t-e,n-t,i)+t:e>n?+O(e-n,n-t,i)+n:e},exports.snapTo=function(e,t,n){var i=e+.2*t,r=function(e){return Math.abs(e-i)},o=n.map(r),a=Math.min.apply(Math,l([],s(o),!1));return n.reduce((function(e,t){return r(t)===a?t:e}))},exports.useAnimatedList=function(e,n,i){var r;void 0===i&&(i={});var o="object"==typeof i.from&&null!==i.from,l=o?i.from:{value:null!==(r=i.from)&&void 0!==r?r:0},c={},h={};Object.keys(l).forEach((function(e){var t,n,r=o?null===(t=i.enter)||void 0===t?void 0:t[e]:i.enter;c[e]="number"==typeof r?v(r):r||v(1);var a=o?null===(n=i.exit)||void 0===n?void 0:n[e]:i.exit;h[e]="number"==typeof a?v(a):a||v(0)}));var d=t.useRef(new Map),m=t.useRef(new Set),p=s(t.useState(0),2)[1];return t.useLayoutEffect((function(){var t,i,r=new Set(e.map(n)),o=function(e){var t=n(e);if(d.current.has(t))d.current.get(t).item=e;else{var i={};Object.entries(l).forEach((function(e){var t=s(e,2),n=t[0],r=t[1],o=new u(r);o.set(c[n]),i[n]=o})),d.current.set(t,{values:i,item:e}),p((function(e){return e+1}))}};try{for(var v=f(e),y=v.next();!y.done;y=v.next()){o(y.value)}}catch(e){t={error:e}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(t)throw t.error}}d.current.forEach((function(e,t){var n=e.values;if(!r.has(t)&&!m.current.has(t)){m.current.add(t);var i=Object.keys(n);i.forEach((function(e,r){var o=h[e];n[e].set(a(a({},o),{options:a(a({},o.options),{onComplete:function(){var a,f;r===i.length-1&&(d.current.delete(t),m.current.delete(t),p((function(e){return e+1})),null===(f=null===(a=o.options)||void 0===a?void 0:a.onComplete)||void 0===f||f.call(a),n[e].destroy())}})}))}))}}))}),[e,n,JSON.stringify(l),JSON.stringify(c),JSON.stringify(h)]),Array.from(d.current.entries()).map((function(e){var t=s(e,2),n=t[0],i=t[1],r=i.values,a=i.item;if(!o)return{key:n,item:a,animation:r.value.value};var f={};return Object.entries(r).forEach((function(e){var t=s(e,2),n=t[0],i=t[1];f[n]=i.value})),{key:n,item:a,animation:f}}))},exports.useDrag=function(e,t){var n=i.useRef(new S).current;return Y([["drag",n,e,t]])},exports.useGesture=function(e){var t=e.onDrag,n=e.onWheel,r=e.onScroll,o=e.onMouseMove,a=i.useRef(new S).current,f=i.useRef(new A).current,s=i.useRef(new L).current,l=i.useRef(new T).current;return Y([["drag",a,t],["wheel",f,n],["scroll",s,r],["move",l,o]])},exports.useMeasure=function(e,n){var i=t.useRef(null),r=t.useRef([]),o=t.useRef(e);return t.useEffect((function(){return o.current=e,function(){o.current=function(){return!1}}}),n),t.useEffect((function(){var e=i.current||document.documentElement,t=r.current,n=new ResizeObserver((function(t){var n=s(t,1)[0].target.getBoundingClientRect(),i=n.left,r=n.top,a=n.width,f=n.height,l=window.pageXOffset,u=window.pageYOffset;if(o){if(e===document.documentElement)return;o.current({left:i+l,top:r+u,width:a,height:f,vLeft:i,vTop:r})}})),a=new ResizeObserver((function(e){var t=[],n=[],i=[],r=[],a=[],f=[];e.forEach((function(e){var o=e.target.getBoundingClientRect(),s=o.left,l=o.top,u=o.width,c=o.height,h=s+window.pageXOffset,v=l+window.pageYOffset;t.push(h),n.push(v),i.push(u),r.push(c),a.push(s),f.push(l)})),o&&o.current({left:t,top:n,width:i,height:r,vLeft:a,vTop:f})}));return e&&(e===document.documentElement&&t.length>0?t.forEach((function(e){a.observe(e.current)})):n.observe(e)),function(){e&&(e===document.documentElement&&t.length>0?t.forEach((function(e){a.unobserve(e.current)})):n.unobserve(e))}}),[]),function(e){return null==e?{ref:i}:(r.current[e]=r.current[e]||t.createRef(),{ref:r.current[e]})}},exports.useMount=function(e,n){var i;void 0===n&&(n={});var r=s(t.useState(e),2),o=r[0],f=r[1],l="object"==typeof n.from&&null!==n.from,u=l?n.from:{value:null!==(i=n.from)&&void 0!==i?i:0},h={},d={};Object.keys(u).forEach((function(e){var t,i;h[e]=l?null===(t=n.enter)||void 0===t?void 0:t[e]:n.enter,null==h[e]&&(h[e]=1),d[e]=l?null===(i=n.exit)||void 0===i?void 0:i[e]:n.exit,null==d[e]&&(d[e]=0)}));var m=s(c(u),2),p=m[0],y=m[1];if(t.useLayoutEffect((function(){var t=Object.keys(u);e?(f(!0),queueMicrotask((function(){var e={};t.forEach((function(t){var n=h[t];e[t]="object"==typeof n&&"type"in n?n:v(n)})),y(e)}))):queueMicrotask((function(){var e={};t.forEach((function(n,i){var r=d[n],o="object"==typeof r&&"type"in r?r:v(r);e[n]=a(a({},o),{options:a(a({},o.options),{onComplete:function(){var e,n;i===t.length-1&&(f(!1),null===(n=null===(e=o.options)||void 0===e?void 0:e.onComplete)||void 0===n||n.call(e))}})})})),y(e)}))}),[e,JSON.stringify(h),JSON.stringify(d)]),!l){var g=p.value;return function(e){return e(g,o)}}return function(e){return e(p,o)}},exports.useMouseMove=function(e){var t=i.useRef(new T).current;return Y([["move",t,e]])},exports.useOutsideClick=function(e,n,i){var r=t.useRef();r.current||(r.current=n),t.useEffect((function(){return r.current=n,function(){r.current=function(){return!1}}}),i),t.useEffect((function(){var t=M([document],[["mousedown",function(t){var n=t.target;n&&n.isConnected&&(e.current&&!e.current.contains(n)&&r.current&&r.current(t))}]]);return function(){return t&&t()}}),[])},exports.useScroll=function(e){var t=i.useRef(new L).current;return Y([["scroll",t,e]])},exports.useValue=c,exports.useWheel=function(e){var t=i.useRef(new A).current;return Y([["wheel",t,e]])},exports.useWindowDimension=function(e,n){var i=t.useRef({width:0,height:0,innerWidth:0,innerHeight:0}),r=t.useRef(e);t.useEffect((function(){return r.current=e,function(){r.current=function(){return!1}}}),n),t.useEffect((function(){var e=new ResizeObserver((function(e){var t=s(e,1)[0].target,n=t.clientWidth,o=t.clientHeight,f=window.innerWidth,l=window.innerHeight;i.current={width:n,height:o,innerWidth:f,innerHeight:l},r&&r.current(a({},i.current))}));return e.observe(document.documentElement),function(){return e.unobserve(document.documentElement)}}),[])},exports.withDecay=function(e){return{type:"decay",options:{velocity:e.velocity,onStart:null==e?void 0:e.onStart,onChange:null==e?void 0:e.onChange,onComplete:null==e?void 0:e.onRest,clamp:null==e?void 0:e.clamp}}},exports.withDelay=function(e){return{type:"delay",options:{delay:e}}},exports.withEase=function(e,t){return v(e,a(a({},t),h.Spring.EASE))},exports.withLoop=function(e,t,n){return{type:"loop",options:{controller:e,iterations:t,onStart:null==n?void 0:n.onStart,onChange:null==n?void 0:n.onChange,onComplete:null==n?void 0:n.onRest}}},exports.withSequence=function(e,t){return{type:"sequence",options:{steps:e,onStart:null==t?void 0:t.onStart,onChange:null==t?void 0:t.onChange,onComplete:null==t?void 0:t.onRest}}},exports.withSpring=v,exports.withTiming=function(e,t){var n;return{type:"timing",to:e,options:{duration:null!==(n=null==t?void 0:t.duration)&&void 0!==n?n:300,easing:null==t?void 0:t.easing,onStart:null==t?void 0:t.onStart,onChange:null==t?void 0:t.onChange,onComplete:null==t?void 0:t.onRest}}};
1
+ var e=require("@raidipesh78/re-motion"),t=require("react");function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=n(t),r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};function f(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function l(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var u=function(){function t(t){this.animation=new e.MotionValue(t)}return t.prototype.set=function(t){var n,i,r,o,a,f,s=this;if(!(t instanceof e.MotionValue))if(null===(n=this.unsubscribe)||void 0===n||n.call(this),this.unsubscribe=void 0,"object"==typeof t&&null!==t){var l=t.type,u=t.to,c=t.options;if((null==c?void 0:c.onChange)&&(this.unsubscribe=this.animation.subscribe(c.onChange)),"sequence"===l){var h=(null!==(i=null==c?void 0:c.steps)&&void 0!==i?i:[]).map((function(e){return s.buildDriver(e)})),v=e.sequence(h);return(null==c?void 0:c.onComplete)&&(null===(r=v.setOnComplete)||void 0===r||r.call(v,null==c?void 0:c.onComplete)),void v.start()}if("loop"===l){var d=this.buildDriver(c.controller);v=e.loop(d,null==c?void 0:c.iterations);return(null==c?void 0:c.onComplete)&&(null===(o=v.setOnComplete)||void 0===o||o.call(v,null==c?void 0:c.onComplete)),void v.start()}null===(f=(a=this.buildDriver({type:l,to:u,options:c})).start)||void 0===f||f.call(a)}else this.animation.set(t)},t.prototype.buildDriver=function(t){var n,i,r=this.animation;switch(t.type){case"spring":return e.spring(r,t.to,t.options);case"timing":return e.timing(r,t.to,t.options);case"decay":return e.decay(r,null===(n=t.options)||void 0===n?void 0:n.velocity,t.options);case"delay":return e.delay(null===(i=t.options)||void 0===i?void 0:i.delay);case"sequence":return e.sequence(t.options.steps.map(this.buildDriver.bind(this)));default:throw new Error('Unsupported driver type "'.concat(t.type,'"'))}},Object.defineProperty(t.prototype,"value",{get:function(){return this.animation},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"current",{get:function(){return this.animation.current},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){var e;null===(e=this.unsubscribe)||void 0===e||e.call(this),this.unsubscribe=void 0},t}();function c(e){var n,i,r=t.useRef(null);if(null===r.current){var o=[];if(Array.isArray(e))e.forEach((function(e,t){o.push([String(t),new u(e)])}));else if("object"==typeof e)try{for(var a=f(Object.entries(e)),l=a.next();!l.done;l=a.next()){var c=s(l.value,2),h=c[0],v=c[1];o.push([h,new u(v)])}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}else o.push(["__0",new u(e)]);r.current=o}t.useEffect((function(){return function(){r.current.forEach((function(e){return s(e,2)[1].destroy()})),r.current=null}}),[]);var d=function(){var t,n,i=r.current;if(Array.isArray(e))return i.map((function(e){return s(e,2)[1].value}));if("object"==typeof e){var o={};try{for(var a=f(i),l=a.next();!l.done;l=a.next()){var u=s(l.value,2),c=u[0],h=u[1];o[c]=h.value}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o}return i[0][1].value}();return[d,function(t){var n,i,o=r.current;if(Array.isArray(e)){var a=t;Object.entries(a).forEach((function(e){var t,n=s(e,2),i=n[0],r=n[1],a=Number(i);isNaN(a)||void 0===r||null===(t=o[a])||void 0===t||t[1].set(r)}))}else if("object"==typeof e&&null!==e){a=t;var l=function(e,t){var n=o.find((function(t){return s(t,1)[0]===e}));n&&void 0!==t&&n[1].set(t)};try{for(var u=f(Object.entries(a)),c=u.next();!c.done;c=u.next()){var h=s(c.value,2);l(h[0],h[1])}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}else o[0][1].set(t)}]}var h={Timing:{BOUNCE:{duration:500,easing:e.Easing.bounce},EASE_IN:{duration:500,easing:e.Easing.in(e.Easing.ease)},EASE_OUT:{duration:500,easing:e.Easing.out(e.Easing.ease)},EASE_IN_OUT:{duration:500,easing:e.Easing.inOut(e.Easing.ease)},POWER1:{duration:500,easing:e.Easing.bezier(.17,.42,.51,.97)},POWER2:{duration:500,easing:e.Easing.bezier(.07,.11,.13,1)},POWER3:{duration:500,easing:e.Easing.bezier(.09,.7,.16,1.04)},POWER4:{duration:500,easing:e.Easing.bezier(.05,.54,0,1.03)},LINEAR:{duration:500,easing:e.Easing.linear}},Spring:{ELASTIC:{mass:1,friction:18,tension:250},EASE:{mass:1,friction:26,tension:170},STIFF:{mass:1,friction:18,tension:350},WOBBLE:{mass:1,friction:8,tension:250}}},v=function(e,t){var n,i,r;return{type:"spring",to:e,options:{stiffness:null!==(n=null==t?void 0:t.tension)&&void 0!==n?n:h.Spring.ELASTIC.tension,damping:null!==(i=null==t?void 0:t.friction)&&void 0!==i?i:h.Spring.ELASTIC.friction,mass:null!==(r=null==t?void 0:t.mass)&&void 0!==r?r:h.Spring.ELASTIC.mass,onStart:null==t?void 0:t.onStart,onChange:null==t?void 0:t.onChange,onComplete:null==t?void 0:t.onRest}}};var d=/[+-]?\d+(\.\d+)?|[\s]?\.\d+|#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})/gi,m=/#[a-f\d]{3,}|transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|burntsienna|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen/gi,p={transparent:"#00000000",aliceblue:"#f0f8ffff",antiquewhite:"#faebd7ff",aqua:"#00ffffff",aquamarine:"#7fffd4ff",azure:"#f0ffffff",beige:"#f5f5dcff",bisque:"#ffe4c4ff",black:"#000000ff",blanchedalmond:"#ffebcdff",blue:"#0000ffff",blueviolet:"#8a2be2ff",brown:"#a52a2aff",burlywood:"#deb887ff",burntsienna:"#ea7e5dff",cadetblue:"#5f9ea0ff",chartreuse:"#7fff00ff",chocolate:"#d2691eff",coral:"#ff7f50ff",cornflowerblue:"#6495edff",cornsilk:"#fff8dcff",crimson:"#dc143cff",cyan:"#00ffffff",darkblue:"#00008bff",darkcyan:"#008b8bff",darkgoldenrod:"#b8860bff",darkgray:"#a9a9a9ff",darkgreen:"#006400ff",darkgrey:"#a9a9a9ff",darkkhaki:"#bdb76bff",darkmagenta:"#8b008bff",darkolivegreen:"#556b2fff",darkorange:"#ff8c00ff",darkorchid:"#9932ccff",darkred:"#8b0000ff",darksalmon:"#e9967aff",darkseagreen:"#8fbc8fff",darkslateblue:"#483d8bff",darkslategray:"#2f4f4fff",darkslategrey:"#2f4f4fff",darkturquoise:"#00ced1ff",darkviolet:"#9400d3ff",deeppink:"#ff1493ff",deepskyblue:"#00bfffff",dimgray:"#696969ff",dimgrey:"#696969ff",dodgerblue:"#1e90ffff",firebrick:"#b22222ff",floralwhite:"#fffaf0ff",forestgreen:"#228b22ff",fuchsia:"#ff00ffff",gainsboro:"#dcdcdcff",ghostwhite:"#f8f8ffff",gold:"#ffd700ff",goldenrod:"#daa520ff",gray:"#808080ff",green:"#008000ff",greenyellow:"#adff2fff",grey:"#808080ff",honeydew:"#f0fff0ff",hotpink:"#ff69b4ff",indianred:"#cd5c5cff",indigo:"#4b0082ff",ivory:"#fffff0ff",khaki:"#f0e68cff",lavender:"#e6e6faff",lavenderblush:"#fff0f5ff",lawngreen:"#7cfc00ff",lemonchiffon:"#fffacdff",lightblue:"#add8e6ff",lightcoral:"#f08080ff",lightcyan:"#e0ffffff",lightgoldenrodyellow:"#fafad2ff",lightgray:"#d3d3d3ff",lightgreen:"#90ee90ff",lightgrey:"#d3d3d3ff",lightpink:"#ffb6c1ff",lightsalmon:"#ffa07aff",lightseagreen:"#20b2aaff",lightskyblue:"#87cefaff",lightslategray:"#778899ff",lightslategrey:"#778899ff",lightsteelblue:"#b0c4deff",lightyellow:"#ffffe0ff",lime:"#00ff00ff",limegreen:"#32cd32ff",linen:"#faf0e6ff",magenta:"#ff00ffff",maroon:"#800000ff",mediumaquamarine:"#66cdaaff",mediumblue:"#0000cdff",mediumorchid:"#ba55d3ff",mediumpurple:"#9370dbff",mediumseagreen:"#3cb371ff",mediumslateblue:"#7b68eeff",mediumspringgreen:"#00fa9aff",mediumturquoise:"#48d1ccff",mediumvioletred:"#c71585ff",midnightblue:"#191970ff",mintcream:"#f5fffaff",mistyrose:"#ffe4e1ff",moccasin:"#ffe4b5ff",navajowhite:"#ffdeadff",navy:"#000080ff",oldlace:"#fdf5e6ff",olive:"#808000ff",olivedrab:"#6b8e23ff",orange:"#ffa500ff",orangered:"#ff4500ff",orchid:"#da70d6ff",palegoldenrod:"#eee8aaff",palegreen:"#98fb98ff",paleturquoise:"#afeeeeff",palevioletred:"#db7093ff",papayawhip:"#ffefd5ff",peachpuff:"#ffdab9ff",peru:"#cd853fff",pink:"#ffc0cbff",plum:"#dda0ddff",powderblue:"#b0e0e6ff",purple:"#800080ff",rebeccapurple:"#663399ff",red:"#ff0000ff",rosybrown:"#bc8f8fff",royalblue:"#4169e1ff",saddlebrown:"#8b4513ff",salmon:"#fa8072ff",sandybrown:"#f4a460ff",seagreen:"#2e8b57ff",seashell:"#fff5eeff",sienna:"#a0522dff",silver:"#c0c0c0ff",skyblue:"#87ceebff",slateblue:"#6a5acdff",slategray:"#708090ff",slategrey:"#708090ff",snow:"#fffafaff",springgreen:"#00ff7fff",steelblue:"#4682b4ff",tan:"#d2b48cff",teal:"#008080ff",thistle:"#d8bfd8ff",tomato:"#ff6347ff",turquoise:"#40e0d0ff",violet:"#ee82eeff",wheat:"#f5deb3ff",white:"#ffffffff",whitesmoke:"#f5f5f5ff",yellow:"#ffff00ff",yellowgreen:"#9acd32ff"};function y(e){var t=function(e){return e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,i){return"#"+t+t+n+n+i+i}))}(e),n=function(e){return 7===e.length?e+"FF":e}(t),i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16),a:parseInt(i[4],16)/255}}function g(e){var t=e.r,n=e.g,i=e.b,r=e.a;return"#"+(256|t).toString(16).slice(1)+(256|n).toString(16).slice(1)+(256|i).toString(16).slice(1)+(255*r|256).toString(16).slice(1)}var b=function(e,t,n,i){var r=s(t,4),o=r[0],a=r[1],f=r[2],l=r[3],u=e;if(u<o){if("identity"===n)return u;"clamp"===n&&(u=o)}if(u>a){if("identity"===i)return u;"clamp"===i&&(u=a)}return f===l?f:o===a?e<=o?f:l:(o===-1/0?u=-u:a===1/0?u-=o:u=(u-o)/(a-o),f===-1/0?u=-u:l===1/0?u+=f:u=u*(l-f)+f,u)},x=function(e,t,n,i){var r=s(t,4),o=r[0],a=r[1],f=r[2],l=r[3];if(f.length===l.length)return f.map((function(t,r){return"string"==typeof t?function(e,t){var n=s(t,4),i=n[0],r=n[1],o=n[2],a=n[3],f=y(o),l=y(a);return g({r:b(e,[i,r,f.r,l.r],"clamp","clamp"),g:b(e,[i,r,f.g,l.g],"clamp","clamp"),b:b(e,[i,r,f.b,l.b],"clamp","clamp"),a:b(e,[i,r,f.a,l.a],"clamp","clamp")})}(e,[o,a,t,l[r]]):b(e,[o,a,t,l[r]],n,i)}));throw new Error("Array length doesn't match")},w=function(e){return e.replace(d,"$")},E=function(e){return e.match(d).map((function(e){return-1!==e.indexOf("#")?e:Number(e)}))},k=function(e){return e.replace(m,(function(e){if(-1!==e.indexOf("#"))return g(y(e));if(Object.prototype.hasOwnProperty.call(p,e))return p[e];throw new Error("String cannot be parsed!")}))};function M(e,t){var n=new Map;return t.forEach((function(t){var i=s(t,3),r=i[0],o=i[1],a=i[2],f=void 0!==a&&a;n.set(r,function(e,t,n,i){return void 0===i&&(i=!1),e.forEach((function(e){e.addEventListener(t,n,i)})),function(){e.forEach((function(e){e.removeEventListener(t,n,i)}))}}(e,r,o,f))})),function(e){var t,i;try{for(var r=f(n.entries()),o=r.next();!o.done;o=r.next()){var a=s(o.value,2),l=a[0],u=a[1];if(!e)return void u();-1!==e.indexOf(l)&&u()}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}}}function _(e,t,n){return Math.min(Math.max(e,t),n)}function O(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}var I=function(e,t){return{x:e,y:t}},S=function(){function e(){this.lastTimeStamp=Date.now(),this.isActive=!1,this.targetElements=[]}return e.prototype._initEvents=function(){},e.prototype._cancelEvents=function(){this._subscribe&&this._subscribe()},e.prototype.applyCallback=function(e){this.callback=e},e.prototype.applyGesture=function(e){var t=this,n=e.targetElement,i=e.targetElements,r=e.callback,o=e.config;return this.targetElement=n,this.targetElements=i.map((function(e){return e.current})),this.callback=r,this.config=o,this._initEvents(),function(){return t._subscribe&&t._subscribe()}},e._VELOCITY_LIMIT=20,e}(),C=function(e){function t(){var t=e.apply(this,l([],s(arguments),!1))||this;return t.movementStart=I(0,0),t.initialMovement=I(0,0),t.movement=I(0,0),t.previousMovement=I(0,0),t.translation=I(0,0),t.offset=I(0,0),t.velocity=I(0,0),t}return o(t,e),t.prototype._initEvents=function(){(this.targetElement||this.targetElements.length>0)&&(this._subscribe=M([window],[["mousedown",this.pointerDown.bind(this)],["mousemove",this.pointerMove.bind(this)],["mouseup",this.pointerUp.bind(this)],["touchstart",this.pointerDown.bind(this),{passive:!1}],["touchmove",this.pointerMove.bind(this),{passive:!1}],["touchend",this.pointerUp.bind(this)]]))},t.prototype._cancelEvents=function(){this._subscribe&&this._subscribe(["mousedown","mousemove","touchstart","touchmove"])},t.prototype._handleCallback=function(){var e=this;this.callback&&this.callback({args:[this.currentIndex],down:this.isActive,movementX:this.movement.x,movementY:this.movement.y,offsetX:this.translation.x,offsetY:this.translation.y,velocityX:this.velocity.x,velocityY:this.velocity.y,distanceX:Math.abs(this.movement.x),distanceY:Math.abs(this.movement.y),directionX:Math.sign(this.movement.x),directionY:Math.sign(this.movement.y),cancel:function(){e._cancelEvents()}})},t.prototype.pointerDown=function(e){var t;"touchstart"===e.type?this.movementStart={x:e.touches[0].clientX,y:e.touches[0].clientY}:this.movementStart={x:e.clientX,y:e.clientY},this.movement={x:0,y:0},this.offset={x:this.translation.x,y:this.translation.y},this.previousMovement={x:0,y:0},this.velocity={x:0,y:0};var n=this.targetElements.find((function(t){return t===e.target}));if(e.target===this.targetElement||n){this.isActive=!0,e.preventDefault(),n&&(this.currentIndex=this.targetElements.indexOf(n));var i=(null===(t=this.config)||void 0===t?void 0:t.initial)&&this.config.initial(),r=null==i?void 0:i.movementX,o=null==i?void 0:i.movementY;this.initialMovement={x:null!=r?r:0,y:null!=o?o:0},this.movement={x:this.initialMovement.x,y:this.initialMovement.y},this.previousMovement={x:this.initialMovement.x,y:this.initialMovement.y},this._handleCallback()}},t.prototype.pointerMove=function(e){if(this.isActive){e.preventDefault();var t=Date.now(),n=_(t-this.lastTimeStamp,.1,64);this.lastTimeStamp=t;var i=n/1e3;"touchmove"===e.type?this.movement={x:this.initialMovement.x+(e.touches[0].clientX-this.movementStart.x),y:this.initialMovement.y+(e.touches[0].clientY-this.movementStart.y)}:this.movement={x:this.initialMovement.x+(e.clientX-this.movementStart.x),y:this.initialMovement.y+(e.clientY-this.movementStart.y)},this.translation={x:this.offset.x+this.movement.x,y:this.offset.y+this.movement.y},this.velocity={x:_((this.movement.x-this.previousMovement.x)/i/1e3,-1*S._VELOCITY_LIMIT,S._VELOCITY_LIMIT),y:_((this.movement.y-this.previousMovement.y)/i/1e3,-1*S._VELOCITY_LIMIT,S._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()}},t.prototype.pointerUp=function(){this.isActive&&(this.isActive=!1,this._handleCallback(),this._cancelEvents(),this._initEvents())},t}(S),T=function(e){function t(){var t=e.apply(this,l([],s(arguments),!1))||this;return t.movement=I(0,0),t.previousMovement=I(0,0),t.velocity=I(0,0),t.direction=I(0,0),t}return o(t,e),t.prototype._initEvents=function(){this.targetElement?this._subscribe=M([this.targetElement],[["mousemove",this.onMouseMove.bind(this)]]):this.targetElements.length>0?this._subscribe=M(this.targetElements,[["mousemove",this.onMouseMove.bind(this)]]):this._subscribe=M([window],[["mousemove",this.onMouseMove.bind(this)]])},t.prototype._handleCallback=function(){var e;this.callback&&this.callback({args:[this.currentIndex],event:this.event,isMoving:this.isActive,target:null===(e=this.event)||void 0===e?void 0:e.target,mouseX:this.movement.x,mouseY:this.movement.y,velocityX:this.velocity.x,velocityY:this.velocity.y,directionX:this.direction.x,directionY:this.direction.y})},t.prototype.onMouseMove=function(e){var t=this,n=this.targetElements.find((function(t){return t===e.target}));n&&(this.currentIndex=this.targetElements.indexOf(n)),this.event=e;var i=Date.now(),r=Math.min(i-this.lastTimeStamp,64);this.lastTimeStamp=i;var o=r/1e3,a=e.clientX,f=e.clientY;this.movement={x:a,y:f},-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){t.isActive=!1,t.direction={x:0,y:0},t.velocity={x:0,y:0},t._handleCallback()}),250);var s=this.movement.x-this.previousMovement.x,l=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(s),y:Math.sign(l)},this.velocity={x:_(s/o/1e3,-1*S._VELOCITY_LIMIT,S._VELOCITY_LIMIT),y:_(l/o/1e3,-1*S._VELOCITY_LIMIT,S._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},t}(S),L=function(e){function t(){var t=e.apply(this,l([],s(arguments),!1))||this;return t.movement=I(0,0),t.previousMovement=I(0,0),t.direction=I(0,0),t.velocity=I(0,0),t}return o(t,e),t.prototype._initEvents=function(){this.targetElement?this._subscribe=M([this.targetElement],[["scroll",this.scrollElementListener.bind(this)]]):this._subscribe=M([window],[["scroll",this.scrollListener.bind(this)]])},t.prototype._handleCallback=function(){this.callback&&this.callback({isScrolling:this.isActive,scrollX:this.movement.x,scrollY:this.movement.y,velocityX:this.velocity.x,velocityY:this.velocity.y,directionX:this.direction.x,directionY:this.direction.y})},t.prototype.onScroll=function(e){var t=this,n=e.x,i=e.y,r=Date.now(),o=Math.min(r-this.lastTimeStamp,64);this.lastTimeStamp=r;var a=o/1e3;this.movement={x:n,y:i},-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){t.isActive=!1,t.direction={x:0,y:0},t.velocity={x:0,y:0},t._handleCallback()}),250);var f=this.movement.x-this.previousMovement.x,s=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(f),y:Math.sign(s)},this.velocity={x:_(f/a/1e3,-1*S._VELOCITY_LIMIT,S._VELOCITY_LIMIT),y:_(s/a/1e3,-1*S._VELOCITY_LIMIT,S._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},t.prototype.scrollListener=function(){var e=window.pageYOffset,t=window.pageXOffset;this.onScroll({x:t,y:e})},t.prototype.scrollElementListener=function(){var e,t,n=(null===(e=this.targetElement)||void 0===e?void 0:e.scrollLeft)||0,i=(null===(t=this.targetElement)||void 0===t?void 0:t.scrollTop)||0;this.onScroll({x:n,y:i})},t}(S),A=function(e){function t(){var t=e.apply(this,l([],s(arguments),!1))||this;return t.movement=I(0,0),t.previousMovement=I(0,0),t.direction=I(0,0),t.velocity=I(0,0),t.delta=I(0,0),t.offset=I(0,0),t.translation=I(0,0),t}return o(t,e),t.prototype._initEvents=function(){this.targetElement&&(this._subscribe=M([this.targetElement],[["wheel",this.onWheel.bind(this)]]))},t.prototype._handleCallback=function(){this.callback&&this.callback({target:this.targetElement,isWheeling:this.isActive,deltaX:this.delta.x,deltaY:this.delta.y,directionX:this.direction.x,directionY:this.direction.y,movementX:this.movement.x,movementY:this.movement.y,offsetX:this.offset.x,offsetY:this.offset.y,velocityX:this.velocity.x,velocityY:this.velocity.y})},t.prototype.onWheel=function(e){var t=this,n=e.deltaX,i=e.deltaY,r=e.deltaMode,o=Date.now(),a=Math.min(o-this.lastTimeStamp,64);this.lastTimeStamp=o;var f=a/1e3;this.isActive=!0,-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){t.isActive=!1,t.translation={x:t.offset.x,y:t.offset.y},t._handleCallback(),t.velocity={x:0,y:0},t.movement={x:0,y:0}}),200),1===r?(n*=40,i*=40):2===r&&(n*=800,i*=800),this.delta={x:n,y:i},this.movement={x:this.movement.x+n,y:this.movement.y+i},this.offset={x:this.translation.x+this.movement.x,y:this.translation.y+this.movement.y};var s=this.movement.x-this.previousMovement.x,l=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(s),y:Math.sign(l)},this.velocity={x:_(s/f/1e3,-1*S._VELOCITY_LIMIT,S._VELOCITY_LIMIT),y:_(l/f/1e3,-1*S._VELOCITY_LIMIT,S._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},t}(S),Y=function(e){var t=i.useRef(),n=i.useRef([]),r=i.useRef(new Map).current;return i.useEffect((function(){var t,n;try{for(var i=f(r.entries()),o=i.next();!o.done;o=i.next()){var a=s(o.value,2)[1],l=a.keyIndex,u=a.gesture,c=s(e[l],3)[2];u.applyCallback(c)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}),[e]),i.useEffect((function(){return e.forEach((function(e,i){var o=s(e,4),a=o[0],f=o[1],l=o[2],u=o[3];queueMicrotask((function(){return r.set(a,{keyIndex:i,gesture:f,unsubscribe:f.applyGesture({targetElement:t.current,targetElements:n.current,callback:l,config:u})})}))})),function(){var e,t;try{for(var n=f(r.entries()),i=n.next();!i.done;i=n.next()){var o=s(i.value,2)[1].unsubscribe;o&&o()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}}})),function(e){return null==e?{ref:t}:(n.current[e]=n.current[e]||i.createRef(),{ref:n.current[e]})}};Object.defineProperty(exports,"Easing",{enumerable:!0,get:function(){return e.Easing}}),Object.defineProperty(exports,"animate",{enumerable:!0,get:function(){return e.motion}}),Object.defineProperty(exports,"makeAnimated",{enumerable:!0,get:function(){return e.makeMotion}}),exports.AnimationConfig=h,exports.bin=function(e){return e?1:0},exports.clamp=_,exports.interpolateNumbers=function(e,t,n,i){var r,o,a=null==i?void 0:i.extrapolate,l=null==i?void 0:i.extrapolateLeft,u=null==i?void 0:i.extrapolateRight,c=function(e,t,n){var i=t.length,r=[];e<t[0]?r=[t[0],t[1],n[0],n[1]]:e>t[i-1]&&(r=[t[i-2],t[i-1],n[i-2],n[i-1]]);for(var o=1;o<i;++o)if(e<=t[o]){r=[t[o-1],t[o],n[o-1],n[o]];break}return r}(e,t,n),h="extend";void 0!==l?h=l:void 0!==a&&(h=a);var v,d="extend";if(void 0!==u?d=u:void 0!==a&&(d=a),n.length){if("number"==typeof n[0])return b(e,c,h,d);if(Array.isArray(n[0]))return x(e,c,h,d);var m=s(c,4),p=m[0],y=m[1],g=m[2],M=m[3],_=k(g),O=k(M),I=w(_);if(v=O,w(_).trim().replace(/\s/g,"")===w(v).trim().replace(/\s/g,"")){var S=E(_),C=E(O),T=x(e,[p,y,S,C],h,d);try{for(var L=f(T),A=L.next();!A.done;A=L.next()){var Y=A.value;I=I.replace("$",Y)}}catch(e){r={error:e}}finally{try{A&&!A.done&&(o=L.return)&&o.call(L)}finally{if(r)throw r.error}}return I}throw new Error("Output range doesn't match string format!")}throw new Error("Output range cannot be Empty")},exports.mix=function(e,t,n){return t*(1-e)+n*e},exports.move=function(e,t,n){var i=e[t],r=e.length,o=t-n;if(o>0)return l(l(l(l([],s(e.slice(0,n)),!1),[i],!1),s(e.slice(n,t)),!1),s(e.slice(t+1,r)),!1);if(o<0){var a=n+1;return l(l(l(l([],s(e.slice(0,t)),!1),s(e.slice(t+1,a)),!1),[i],!1),s(e.slice(a,r)),!1)}return e},exports.rubberClamp=function(e,t,n,i){return void 0===i&&(i=.15),0===i?_(e,t,n):e<t?-O(t-e,n-t,i)+t:e>n?+O(e-n,n-t,i)+n:e},exports.snapTo=function(e,t,n){var i=e+.2*t,r=function(e){return Math.abs(e-i)},o=n.map(r),a=Math.min.apply(Math,l([],s(o),!1));return n.reduce((function(e,t){return r(t)===a?t:e}))},exports.useAnimatedList=function(e,n,i){var r;void 0===i&&(i={});var o="object"==typeof i.from&&null!==i.from,l=o?i.from:{value:null!==(r=i.from)&&void 0!==r?r:0},c={},h={};Object.keys(l).forEach((function(e){var t,n,r=o?null===(t=i.enter)||void 0===t?void 0:t[e]:i.enter;c[e]="number"==typeof r?v(r):r||v(1);var a=o?null===(n=i.exit)||void 0===n?void 0:n[e]:i.exit;h[e]="number"==typeof a?v(a):a||v(0)}));var d=t.useRef(new Map),m=t.useRef(new Set),p=s(t.useState(0),2)[1];return t.useLayoutEffect((function(){var t,i,r=new Set(e.map(n)),o=function(e){var t=n(e);if(d.current.has(t))d.current.get(t).item=e;else{var i={};Object.entries(l).forEach((function(e){var t=s(e,2),n=t[0],r=t[1],o=new u(r);o.set(c[n]),i[n]=o})),d.current.set(t,{values:i,item:e}),p((function(e){return e+1}))}};try{for(var v=f(e),y=v.next();!y.done;y=v.next()){o(y.value)}}catch(e){t={error:e}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(t)throw t.error}}d.current.forEach((function(e,t){var n=e.values;if(!r.has(t)&&!m.current.has(t)){m.current.add(t);var i=Object.keys(n);i.forEach((function(e,r){var o=h[e];n[e].set(a(a({},o),{options:a(a({},o.options),{onComplete:function(){var a,f;r===i.length-1&&(d.current.delete(t),m.current.delete(t),p((function(e){return e+1})),null===(f=null===(a=o.options)||void 0===a?void 0:a.onComplete)||void 0===f||f.call(a),n[e].destroy())}})}))}))}}))}),[e,n,JSON.stringify(l),JSON.stringify(c),JSON.stringify(h)]),Array.from(d.current.entries()).map((function(e){var t=s(e,2),n=t[0],i=t[1],r=i.values,a=i.item;if(!o)return{key:n,item:a,animation:r.value.value};var f={};return Object.entries(r).forEach((function(e){var t=s(e,2),n=t[0],i=t[1];f[n]=i.value})),{key:n,item:a,animation:f}}))},exports.useDrag=function(e,t){var n=i.useRef(new C).current;return Y([["drag",n,e,t]])},exports.useGesture=function(e){var t=e.onDrag,n=e.onWheel,r=e.onScroll,o=e.onMouseMove,a=i.useRef(new C).current,f=i.useRef(new A).current,s=i.useRef(new L).current,l=i.useRef(new T).current;return Y([["drag",a,t],["wheel",f,n],["scroll",s,r],["move",l,o]])},exports.useMeasure=function(e,n){var i=t.useRef(null),r=t.useRef([]),o=t.useRef(e);return t.useEffect((function(){return o.current=e,function(){o.current=function(){return!1}}}),n),t.useEffect((function(){var e=i.current||document.documentElement,t=r.current,n=new ResizeObserver((function(t){var n=s(t,1)[0].target.getBoundingClientRect(),i=n.left,r=n.top,a=n.width,f=n.height,l=window.pageXOffset,u=window.pageYOffset;if(o){if(e===document.documentElement)return;o.current({left:i+l,top:r+u,width:a,height:f,vLeft:i,vTop:r})}})),a=new ResizeObserver((function(e){var t=[],n=[],i=[],r=[],a=[],f=[];e.forEach((function(e){var o=e.target.getBoundingClientRect(),s=o.left,l=o.top,u=o.width,c=o.height,h=s+window.pageXOffset,v=l+window.pageYOffset;t.push(h),n.push(v),i.push(u),r.push(c),a.push(s),f.push(l)})),o&&o.current({left:t,top:n,width:i,height:r,vLeft:a,vTop:f})}));return e&&(e===document.documentElement&&t.length>0?t.forEach((function(e){a.observe(e.current)})):n.observe(e)),function(){e&&(e===document.documentElement&&t.length>0?t.forEach((function(e){a.unobserve(e.current)})):n.unobserve(e))}}),[]),function(e){return null==e?{ref:i}:(r.current[e]=r.current[e]||t.createRef(),{ref:r.current[e]})}},exports.useMount=function(e,n){var i;void 0===n&&(n={});var r=s(t.useState(e),2),o=r[0],f=r[1],l="object"==typeof n.from&&null!==n.from,u=l?n.from:{value:null!==(i=n.from)&&void 0!==i?i:0},h={},d={};Object.keys(u).forEach((function(e){var t,i;h[e]=l?null===(t=n.enter)||void 0===t?void 0:t[e]:n.enter,null==h[e]&&(h[e]=1),d[e]=l?null===(i=n.exit)||void 0===i?void 0:i[e]:n.exit,null==d[e]&&(d[e]=0)}));var m=s(c(u),2),p=m[0],y=m[1];if(t.useLayoutEffect((function(){var t=Object.keys(u);e?(f(!0),queueMicrotask((function(){var e={};t.forEach((function(t){var n=h[t];e[t]="object"==typeof n&&"type"in n?n:v(n)})),y(e)}))):queueMicrotask((function(){var e={};t.forEach((function(n,i){var r=d[n],o="object"==typeof r&&"type"in r?r:v(r);e[n]=a(a({},o),{options:a(a({},o.options),{onComplete:function(){var e,n;i===t.length-1&&(f(!1),null===(n=null===(e=o.options)||void 0===e?void 0:e.onComplete)||void 0===n||n.call(e))}})})})),y(e)}))}),[e,JSON.stringify(h),JSON.stringify(d)]),!l){var g=p.value;return function(e){return e(g,o)}}return function(e){return e(p,o)}},exports.useMouseMove=function(e){var t=i.useRef(new T).current;return Y([["move",t,e]])},exports.useOutsideClick=function(e,n,i){var r=t.useRef();r.current||(r.current=n),t.useEffect((function(){return r.current=n,function(){r.current=function(){return!1}}}),i),t.useEffect((function(){var t=M([document],[["mousedown",function(t){var n=t.target;n&&n.isConnected&&(e.current&&!e.current.contains(n)&&r.current&&r.current(t))}]]);return function(){return t&&t()}}),[])},exports.useScroll=function(e){var t=i.useRef(new L).current;return Y([["scroll",t,e]])},exports.useValue=c,exports.useWheel=function(e){var t=i.useRef(new A).current;return Y([["wheel",t,e]])},exports.useWindowDimension=function(e,n){var i=t.useRef({width:0,height:0,innerWidth:0,innerHeight:0}),r=t.useRef(e);t.useEffect((function(){return r.current=e,function(){r.current=function(){return!1}}}),n),t.useEffect((function(){var e=new ResizeObserver((function(e){var t=s(e,1)[0].target,n=t.clientWidth,o=t.clientHeight,f=window.innerWidth,l=window.innerHeight;i.current={width:n,height:o,innerWidth:f,innerHeight:l},r&&r.current(a({},i.current))}));return e.observe(document.documentElement),function(){return e.unobserve(document.documentElement)}}),[])},exports.withDecay=function(e){return{type:"decay",options:{velocity:e.velocity,onStart:null==e?void 0:e.onStart,onChange:null==e?void 0:e.onChange,onComplete:null==e?void 0:e.onRest,clamp:null==e?void 0:e.clamp}}},exports.withDelay=function(e){return{type:"delay",options:{delay:e}}},exports.withEase=function(e,t){return v(e,a(a({},t),h.Spring.EASE))},exports.withLoop=function(e,t,n){return{type:"loop",options:{controller:e,iterations:t,onStart:null==n?void 0:n.onStart,onChange:null==n?void 0:n.onChange,onComplete:null==n?void 0:n.onRest}}},exports.withSequence=function(e,t){return{type:"sequence",options:{steps:e,onStart:null==t?void 0:t.onStart,onChange:null==t?void 0:t.onChange,onComplete:null==t?void 0:t.onRest}}},exports.withSpring=v,exports.withTiming=function(e,t){var n;return{type:"timing",to:e,options:{duration:null!==(n=null==t?void 0:t.duration)&&void 0!==n?n:300,easing:null==t?void 0:t.easing,onStart:null==t?void 0:t.onStart,onChange:null==t?void 0:t.onChange,onComplete:null==t?void 0:t.onRest}}};
2
2
  //# sourceMappingURL=index.js.map