@functionalui/functionalui 0.2.1 → 0.2.4

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.
Files changed (240) hide show
  1. package/dist/Avatar-BK9MFMsZ.cjs +1 -0
  2. package/dist/Avatar-CQA0mEVW.js +118 -0
  3. package/dist/Button-CpTXDsI7.js +215 -0
  4. package/dist/Button-rg5gSHcQ.cjs +1 -0
  5. package/dist/Checkbox-BHpT6PHl.cjs +1 -0
  6. package/dist/Checkbox-C29jP71p.js +96 -0
  7. package/dist/GlobalEventContext-D9ug9s1O.cjs +1 -0
  8. package/dist/GlobalEventContext-DUmT3Vay.js +49 -0
  9. package/dist/GlobalEventPortal-BIdCGd-m.cjs +1 -0
  10. package/dist/GlobalEventPortal-GjfUDr2B.js +17 -0
  11. package/dist/LabelText-BUslE9cx.cjs +1 -0
  12. package/dist/LabelText-D7QIWtWj.js +35 -0
  13. package/dist/Modal-BRIYhcOg.cjs +3 -0
  14. package/dist/Modal-DXLyt-j4.js +1290 -0
  15. package/dist/SpringEnterOffsetBy-BVN6rm57.cjs +1 -0
  16. package/dist/SpringEnterOffsetBy-DMSIQgV3.js +56 -0
  17. package/dist/TableHeader-BAdYoCbb.cjs +1 -0
  18. package/dist/TableHeader-Da0XxILB.js +103 -0
  19. package/dist/TableRow-BlJSvake.js +90 -0
  20. package/dist/TableRow-Bq58CTbU.cjs +1 -0
  21. package/dist/TagColor-BYKxfOU6.js +957 -0
  22. package/dist/TagColor-QGINp77p.cjs +1 -0
  23. package/dist/UIcon-B5rpDmHC.cjs +1 -0
  24. package/dist/UIcon-BHzbeYWw.js +245 -0
  25. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  26. package/dist/_commonjsHelpers-DwGv2jUC.cjs +1 -0
  27. package/dist/admonition/index.cjs +1 -0
  28. package/dist/admonition/index.d.ts +27 -0
  29. package/dist/admonition/index.mjs +88 -0
  30. package/dist/avatar/index.cjs +1 -0
  31. package/dist/avatar/index.d.ts +115 -0
  32. package/dist/avatar/index.mjs +4 -0
  33. package/dist/avatar-group/index.cjs +1 -0
  34. package/dist/avatar-group/index.d.ts +120 -0
  35. package/dist/avatar-group/index.mjs +52 -0
  36. package/dist/button/index.cjs +1 -0
  37. package/dist/button/index.d.ts +249 -0
  38. package/dist/button/index.mjs +4 -0
  39. package/dist/checkbox/index.cjs +1 -0
  40. package/dist/checkbox/index.d.ts +32 -0
  41. package/dist/checkbox/index.mjs +4 -0
  42. package/dist/checkboxes/index.cjs +1 -0
  43. package/dist/checkboxes/index.d.ts +38 -0
  44. package/dist/checkboxes/index.mjs +80 -0
  45. package/dist/chip/index.cjs +1 -0
  46. package/dist/chip/index.d.ts +159 -0
  47. package/dist/chip/index.mjs +132 -0
  48. package/dist/classes-CBD1K4L1.js +779 -0
  49. package/dist/classes-CVxy1f4M.js +137 -0
  50. package/dist/classes-CtwIjJdw.cjs +1 -0
  51. package/dist/classes-HsjFV5aN.cjs +1 -0
  52. package/dist/color-picker/index.cjs +1 -0
  53. package/dist/color-picker/index.d.ts +14 -0
  54. package/dist/color-picker/index.mjs +234 -0
  55. package/dist/component-B1mkowwk.cjs +1 -0
  56. package/dist/component-B6F6g6i4.cjs +1 -0
  57. package/dist/component-BbvCmqLI.cjs +1 -0
  58. package/dist/component-Bh3EPTN0.cjs +1 -0
  59. package/dist/component-BvHdlcdE.js +9 -0
  60. package/dist/component-C1Gs4nVu.js +55 -0
  61. package/dist/component-CBIQe7z5.js +29 -0
  62. package/dist/component-CW2JPBAq.js +59 -0
  63. package/dist/component-D-EEi7NI.cjs +1 -0
  64. package/dist/component-D0wwK4KY.js +9 -0
  65. package/dist/component-D5nxKQnT.js +55 -0
  66. package/dist/component-D92LT0Mq.cjs +1 -0
  67. package/dist/component-DCHO9d6d.js +55 -0
  68. package/dist/component-DRXQXr2G.js +36 -0
  69. package/dist/component-D_igOAz3.cjs +1 -0
  70. package/dist/component-DdQu0mLI.js +31 -0
  71. package/dist/component-FS_2VwVz.cjs +1 -0
  72. package/dist/component-JigdcRMd.cjs +1 -0
  73. package/dist/container/index.cjs +1 -0
  74. package/dist/container/index.d.ts +238 -0
  75. package/dist/container/index.mjs +4 -0
  76. package/dist/contexts/notifications/index.cjs +1 -0
  77. package/dist/contexts/notifications/index.d.ts +2 -0
  78. package/dist/contexts/notifications/index.mjs +6 -0
  79. package/dist/contexts/ui/index.cjs +1 -0
  80. package/dist/contexts/ui/index.d.ts +2 -0
  81. package/dist/contexts/ui/index.mjs +35 -0
  82. package/dist/createTextElement-Cgrvdwvh.js +32 -0
  83. package/dist/createTextElement-DITFvK9p.cjs +1 -0
  84. package/dist/css/index.cjs +1 -0
  85. package/dist/css/index.css +1 -0
  86. package/dist/css/index.d.ts +1 -0
  87. package/dist/css/index.mjs +1 -0
  88. package/dist/div-measure/index.cjs +1 -0
  89. package/dist/div-measure/index.d.ts +13 -0
  90. package/dist/div-measure/index.mjs +26 -0
  91. package/dist/feather-sprite.svg +1 -0
  92. package/dist/gallery-modal/index.cjs +1 -0
  93. package/dist/gallery-modal/index.d.ts +11 -0
  94. package/dist/gallery-modal/index.mjs +464 -0
  95. package/dist/generics-9F1CmKPb.cjs +1 -0
  96. package/dist/generics-BrMr2-Gs.js +5 -0
  97. package/dist/generics-C-WSPclF.js +19 -0
  98. package/dist/generics-D33J7ILI.js +5 -0
  99. package/dist/generics-DE1oV0MV.cjs +1 -0
  100. package/dist/generics-nyvJhwQE.cjs +1 -0
  101. package/dist/global-event-portal/index.cjs +1 -0
  102. package/dist/global-event-portal/index.d.ts +8 -0
  103. package/dist/global-event-portal/index.mjs +4 -0
  104. package/dist/icons/index.cjs +1 -0
  105. package/dist/icons/index.d.ts +457 -0
  106. package/dist/icons/index.mjs +5 -0
  107. package/dist/icons-B8R1UT86.js +147 -0
  108. package/dist/icons-DSpaHhtT.cjs +1 -0
  109. package/dist/input-image/index.cjs +1 -0
  110. package/dist/input-image/index.d.ts +18 -0
  111. package/dist/input-image/index.mjs +106 -0
  112. package/dist/input-text/index.cjs +1 -0
  113. package/dist/input-text/index.d.ts +199 -0
  114. package/dist/input-text/index.mjs +246 -0
  115. package/dist/inset-group/index.cjs +1 -0
  116. package/dist/inset-group/index.d.ts +33 -0
  117. package/dist/inset-group/index.mjs +105 -0
  118. package/dist/label-text/index.cjs +1 -0
  119. package/dist/label-text/index.d.ts +11 -0
  120. package/dist/label-text/index.mjs +4 -0
  121. package/dist/layout/index.cjs +1 -0
  122. package/dist/layout/index.d.ts +163 -0
  123. package/dist/layout/index.mjs +4 -0
  124. package/dist/loading-spinner/index.cjs +1 -0
  125. package/dist/loading-spinner/index.d.ts +33 -0
  126. package/dist/loading-spinner/index.mjs +101 -0
  127. package/dist/modal/index.cjs +1 -0
  128. package/dist/modal/index.d.ts +105 -0
  129. package/dist/modal/index.mjs +4 -0
  130. package/dist/notification-system/index.cjs +1 -0
  131. package/dist/notification-system/index.d.ts +5 -0
  132. package/dist/notification-system/index.mjs +158 -0
  133. package/dist/portals/index.cjs +1 -0
  134. package/dist/portals/index.d.ts +10 -0
  135. package/dist/portals/index.mjs +4 -0
  136. package/dist/radio/index.cjs +1 -0
  137. package/dist/radio/index.d.ts +36 -0
  138. package/dist/radio/index.mjs +121 -0
  139. package/dist/react-spring_web.modern-DgQDaJ06.js +2304 -0
  140. package/dist/react-spring_web.modern-W3Nkoq_6.cjs +1 -0
  141. package/dist/select-spring/index.cjs +1 -0
  142. package/dist/select-spring/index.d.ts +70 -0
  143. package/dist/select-spring/index.mjs +471 -0
  144. package/dist/spring-enter/index.cjs +1 -0
  145. package/dist/spring-enter/index.d.ts +16 -0
  146. package/dist/spring-enter/index.mjs +45 -0
  147. package/dist/spring-enter-offset-by/index.cjs +1 -0
  148. package/dist/spring-enter-offset-by/index.d.ts +17 -0
  149. package/dist/spring-enter-offset-by/index.mjs +5 -0
  150. package/dist/spring-menu-transition/index.cjs +1 -0
  151. package/dist/spring-menu-transition/index.d.ts +15 -0
  152. package/dist/spring-menu-transition/index.mjs +43 -0
  153. package/dist/spring-open-close-height/index.cjs +1 -0
  154. package/dist/spring-open-close-height/index.d.ts +9 -0
  155. package/dist/spring-open-close-height/index.mjs +19 -0
  156. package/dist/styled/button/index.cjs +1 -0
  157. package/dist/styled/button/index.d.ts +2 -0
  158. package/dist/styled/button/index.mjs +4 -0
  159. package/dist/styled/inputs/text/index.cjs +1 -0
  160. package/dist/styled/inputs/text/index.d.ts +2 -0
  161. package/dist/styled/inputs/text/index.mjs +4 -0
  162. package/dist/styled/inputs/text-area/index.cjs +1 -0
  163. package/dist/styled/inputs/text-area/index.d.ts +2 -0
  164. package/dist/styled/inputs/text-area/index.mjs +4 -0
  165. package/dist/styled/li/index.cjs +1 -0
  166. package/dist/styled/li/index.d.ts +2 -0
  167. package/dist/styled/li/index.mjs +4 -0
  168. package/dist/styled/ul/index.cjs +1 -0
  169. package/dist/styled/ul/index.d.ts +2 -0
  170. package/dist/styled/ul/index.mjs +4 -0
  171. package/dist/table-grid/index.cjs +1 -0
  172. package/dist/table-grid/index.d.ts +70 -0
  173. package/dist/table-grid/index.mjs +49 -0
  174. package/dist/table-header/index.cjs +1 -0
  175. package/dist/table-header/index.d.ts +53 -0
  176. package/dist/table-header/index.mjs +4 -0
  177. package/dist/table-row/index.cjs +1 -0
  178. package/dist/table-row/index.d.ts +54 -0
  179. package/dist/table-row/index.mjs +4 -0
  180. package/dist/tabs/index.cjs +1 -0
  181. package/dist/tabs/index.d.ts +21 -0
  182. package/dist/tabs/index.mjs +134 -0
  183. package/dist/tag-color/index.cjs +1 -0
  184. package/dist/tag-color/index.d.ts +104 -0
  185. package/dist/tag-color/index.mjs +4 -0
  186. package/dist/text-area/index.cjs +1 -0
  187. package/dist/text-area/index.d.ts +212 -0
  188. package/dist/text-area/index.mjs +160 -0
  189. package/dist/texts/header/index.cjs +1 -0
  190. package/dist/texts/header/index.d.ts +2 -0
  191. package/dist/texts/header/index.mjs +28 -0
  192. package/dist/texts/p/index.cjs +1 -0
  193. package/dist/texts/p/index.d.ts +2 -0
  194. package/dist/texts/p/index.mjs +4 -0
  195. package/dist/texts/span/index.cjs +1 -0
  196. package/dist/texts/span/index.d.ts +2 -0
  197. package/dist/texts/span/index.mjs +4 -0
  198. package/dist/toggle-switch/index.cjs +1 -0
  199. package/dist/toggle-switch/index.d.ts +35 -0
  200. package/dist/toggle-switch/index.mjs +100 -0
  201. package/dist/types-34thzuQ5.js +134 -0
  202. package/dist/types-B3Ew5Ber.cjs +1 -0
  203. package/dist/types-B6XaG3V2.js +65 -0
  204. package/dist/types-BL1gBa8J.cjs +1 -0
  205. package/dist/types-BNUi2DUD.js +234 -0
  206. package/dist/types-BWsKfOhf.js +76 -0
  207. package/dist/types-BXyuQRbv.js +52 -0
  208. package/dist/types-BciByhvn.cjs +1 -0
  209. package/dist/types-BhBb436R.cjs +1 -0
  210. package/dist/types-Bh_j-nXM.js +168 -0
  211. package/dist/types-BnEsY_pc.cjs +1 -0
  212. package/dist/types-BuixDDod.js +12 -0
  213. package/dist/types-BzOxElrp.cjs +1 -0
  214. package/dist/types-CQP0_A_u.cjs +1 -0
  215. package/dist/types-Cev70RJC.cjs +1 -0
  216. package/dist/types-Cj8dOa0j.cjs +1 -0
  217. package/dist/types-CyVpnRmY.cjs +1 -0
  218. package/dist/types-DDcRx4Wz.cjs +1 -0
  219. package/dist/types-DNLw5jE2.js +151 -0
  220. package/dist/types-DZ_qlO_d.cjs +1 -0
  221. package/dist/types-DamZRbFt.js +4 -0
  222. package/dist/types-DevrYOgX.cjs +1 -0
  223. package/dist/types-DgSz2H9f.js +14 -0
  224. package/dist/types-DmnAtXuW.js +17 -0
  225. package/dist/types-Dyu7oUOO.js +4 -0
  226. package/dist/types-OOX58qQg.js +17 -0
  227. package/dist/types.cjs +1 -0
  228. package/dist/types.d.ts +2062 -0
  229. package/dist/types.mjs +177 -0
  230. package/dist/useClickOutsideDOM-CBmttEFU.js +16 -0
  231. package/dist/useClickOutsideDOM-Dd6ewH8B.cjs +1 -0
  232. package/dist/useCombinedRef-COuiqHjO.js +14 -0
  233. package/dist/useCombinedRef-DZxHQ7PL.cjs +1 -0
  234. package/dist/values-B5r2bYNJ.js +75 -0
  235. package/dist/values-C40_Fyfk.cjs +1 -0
  236. package/dist/values-CSE3dLnv.js +200 -0
  237. package/dist/values-D-Y_dNaF.cjs +1 -0
  238. package/dist/web-B_p0FWHf.js +132 -0
  239. package/dist/web-yC_cLoAC.cjs +1 -0
  240. package/package.json +2 -4
@@ -0,0 +1,2304 @@
1
+ import * as _e from "react";
2
+ import { useEffect as Qe, useLayoutEffect as Nn, useState as zn, useRef as H, forwardRef as Dn, useCallback as Qn, useMemo as ve, useContext as Yt } from "react";
3
+ import { unstable_batchedUpdates as Mn } from "react-dom";
4
+ var yt = Ee(), S = (e) => Ce(e, yt), _t = Ee();
5
+ S.write = (e) => Ce(e, _t);
6
+ var Me = Ee();
7
+ S.onStart = (e) => Ce(e, Me);
8
+ var bt = Ee();
9
+ S.onFrame = (e) => Ce(e, bt);
10
+ var wt = Ee();
11
+ S.onFinish = (e) => Ce(e, wt);
12
+ var ce = [];
13
+ S.setTimeout = (e, t) => {
14
+ const n = S.now() + t, i = () => {
15
+ const r = ce.findIndex((a) => a.cancel == i);
16
+ ~r && ce.splice(r, 1), ne -= ~r ? 1 : 0;
17
+ }, s = { time: n, handler: e, cancel: i };
18
+ return ce.splice(en(n), 0, s), ne += 1, tn(), s;
19
+ };
20
+ var en = (e) => ~(~ce.findIndex((t) => t.time > e) || ~ce.length);
21
+ S.cancel = (e) => {
22
+ Me.delete(e), bt.delete(e), wt.delete(e), yt.delete(e), _t.delete(e);
23
+ };
24
+ S.sync = (e) => {
25
+ rt = !0, S.batchedUpdates(e), rt = !1;
26
+ };
27
+ S.throttle = (e) => {
28
+ let t;
29
+ function n() {
30
+ try {
31
+ e(...t);
32
+ } finally {
33
+ t = null;
34
+ }
35
+ }
36
+ function i(...s) {
37
+ t = s, S.onStart(n);
38
+ }
39
+ return i.handler = e, i.cancel = () => {
40
+ Me.delete(n), t = null;
41
+ }, i;
42
+ };
43
+ var St = typeof window < "u" ? window.requestAnimationFrame : (
44
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
45
+ (() => {
46
+ })
47
+ );
48
+ S.use = (e) => St = e;
49
+ S.now = typeof performance < "u" ? () => performance.now() : Date.now;
50
+ S.batchedUpdates = (e) => e();
51
+ S.catch = console.error;
52
+ S.frameLoop = "always";
53
+ S.advance = () => {
54
+ S.frameLoop !== "demand" ? console.warn(
55
+ "Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"
56
+ ) : sn();
57
+ };
58
+ var te = -1, ne = 0, rt = !1;
59
+ function Ce(e, t) {
60
+ rt ? (t.delete(e), e(0)) : (t.add(e), tn());
61
+ }
62
+ function tn() {
63
+ te < 0 && (te = 0, S.frameLoop !== "demand" && St(nn));
64
+ }
65
+ function Ln() {
66
+ te = -1;
67
+ }
68
+ function nn() {
69
+ ~te && (St(nn), S.batchedUpdates(sn));
70
+ }
71
+ function sn() {
72
+ const e = te;
73
+ te = S.now();
74
+ const t = en(te);
75
+ if (t && (rn(ce.splice(0, t), (n) => n.handler()), ne -= t), !ne) {
76
+ Ln();
77
+ return;
78
+ }
79
+ Me.flush(), yt.flush(e ? Math.min(64, te - e) : 16.667), bt.flush(), _t.flush(), wt.flush();
80
+ }
81
+ function Ee() {
82
+ let e = /* @__PURE__ */ new Set(), t = e;
83
+ return {
84
+ add(n) {
85
+ ne += t == e && !e.has(n) ? 1 : 0, e.add(n);
86
+ },
87
+ delete(n) {
88
+ return ne -= t == e && e.has(n) ? 1 : 0, e.delete(n);
89
+ },
90
+ flush(n) {
91
+ t.size && (e = /* @__PURE__ */ new Set(), ne -= t.size, rn(t, (i) => i(n) && e.add(i)), ne += e.size, t = e);
92
+ }
93
+ };
94
+ }
95
+ function rn(e, t) {
96
+ e.forEach((n) => {
97
+ try {
98
+ t(n);
99
+ } catch (i) {
100
+ S.catch(i);
101
+ }
102
+ });
103
+ }
104
+ var Bn = Object.defineProperty, Gn = (e, t) => {
105
+ for (var n in t)
106
+ Bn(e, n, { get: t[n], enumerable: !0 });
107
+ }, M = {};
108
+ Gn(M, {
109
+ assign: () => Wn,
110
+ colors: () => ie,
111
+ createStringInterpolator: () => At,
112
+ skipAnimation: () => on,
113
+ to: () => an,
114
+ willAdvance: () => Pt
115
+ });
116
+ function at() {
117
+ }
118
+ var Hn = (e, t, n) => Object.defineProperty(e, t, { value: n, writable: !0, configurable: !0 }), o = {
119
+ arr: Array.isArray,
120
+ obj: (e) => !!e && e.constructor.name === "Object",
121
+ fun: (e) => typeof e == "function",
122
+ str: (e) => typeof e == "string",
123
+ num: (e) => typeof e == "number",
124
+ und: (e) => e === void 0
125
+ };
126
+ function X(e, t) {
127
+ if (o.arr(e)) {
128
+ if (!o.arr(t) || e.length !== t.length) return !1;
129
+ for (let n = 0; n < e.length; n++)
130
+ if (e[n] !== t[n]) return !1;
131
+ return !0;
132
+ }
133
+ return e === t;
134
+ }
135
+ var _ = (e, t) => e.forEach(t);
136
+ function W(e, t, n) {
137
+ if (o.arr(e)) {
138
+ for (let i = 0; i < e.length; i++)
139
+ t.call(n, e[i], `${i}`);
140
+ return;
141
+ }
142
+ for (const i in e)
143
+ e.hasOwnProperty(i) && t.call(n, e[i], i);
144
+ }
145
+ var C = (e) => o.und(e) ? [] : o.arr(e) ? e : [e];
146
+ function be(e, t) {
147
+ if (e.size) {
148
+ const n = Array.from(e);
149
+ e.clear(), _(n, t);
150
+ }
151
+ }
152
+ var ye = (e, ...t) => be(e, (n) => n(...t)), xt = () => typeof window > "u" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent), At, an, ie = null, on = !1, Pt = at, Wn = (e) => {
153
+ e.to && (an = e.to), e.now && (S.now = e.now), e.colors !== void 0 && (ie = e.colors), e.skipAnimation != null && (on = e.skipAnimation), e.createStringInterpolator && (At = e.createStringInterpolator), e.requestAnimationFrame && S.use(e.requestAnimationFrame), e.batchedUpdates && (S.batchedUpdates = e.batchedUpdates), e.willAdvance && (Pt = e.willAdvance), e.frameLoop && (S.frameLoop = e.frameLoop);
154
+ }, we = /* @__PURE__ */ new Set(), N = [], Ye = [], je = 0, Le = {
155
+ get idle() {
156
+ return !we.size && !N.length;
157
+ },
158
+ /** Advance the given animation on every frame until idle. */
159
+ start(e) {
160
+ je > e.priority ? (we.add(e), S.onStart(Kn)) : (un(e), S(ot));
161
+ },
162
+ /** Advance all animations by the given time. */
163
+ advance: ot,
164
+ /** Call this when an animation's priority changes. */
165
+ sort(e) {
166
+ if (je)
167
+ S.onFrame(() => Le.sort(e));
168
+ else {
169
+ const t = N.indexOf(e);
170
+ ~t && (N.splice(t, 1), cn(e));
171
+ }
172
+ },
173
+ /**
174
+ * Clear all animations. For testing purposes.
175
+ *
176
+ * ☠️ Never call this from within the frameloop.
177
+ */
178
+ clear() {
179
+ N = [], we.clear();
180
+ }
181
+ };
182
+ function Kn() {
183
+ we.forEach(un), we.clear(), S(ot);
184
+ }
185
+ function un(e) {
186
+ N.includes(e) || cn(e);
187
+ }
188
+ function cn(e) {
189
+ N.splice(
190
+ Zn(N, (t) => t.priority > e.priority),
191
+ 0,
192
+ e
193
+ );
194
+ }
195
+ function ot(e) {
196
+ const t = Ye;
197
+ for (let n = 0; n < N.length; n++) {
198
+ const i = N[n];
199
+ je = i.priority, i.idle || (Pt(i), i.advance(e), i.idle || t.push(i));
200
+ }
201
+ return je = 0, Ye = N, Ye.length = 0, N = t, N.length > 0;
202
+ }
203
+ function Zn(e, t) {
204
+ const n = e.findIndex(t);
205
+ return n < 0 ? e.length : n;
206
+ }
207
+ var Jn = {
208
+ transparent: 0,
209
+ aliceblue: 4042850303,
210
+ antiquewhite: 4209760255,
211
+ aqua: 16777215,
212
+ aquamarine: 2147472639,
213
+ azure: 4043309055,
214
+ beige: 4126530815,
215
+ bisque: 4293182719,
216
+ black: 255,
217
+ blanchedalmond: 4293643775,
218
+ blue: 65535,
219
+ blueviolet: 2318131967,
220
+ brown: 2771004159,
221
+ burlywood: 3736635391,
222
+ burntsienna: 3934150143,
223
+ cadetblue: 1604231423,
224
+ chartreuse: 2147418367,
225
+ chocolate: 3530104575,
226
+ coral: 4286533887,
227
+ cornflowerblue: 1687547391,
228
+ cornsilk: 4294499583,
229
+ crimson: 3692313855,
230
+ cyan: 16777215,
231
+ darkblue: 35839,
232
+ darkcyan: 9145343,
233
+ darkgoldenrod: 3095792639,
234
+ darkgray: 2846468607,
235
+ darkgreen: 6553855,
236
+ darkgrey: 2846468607,
237
+ darkkhaki: 3182914559,
238
+ darkmagenta: 2332068863,
239
+ darkolivegreen: 1433087999,
240
+ darkorange: 4287365375,
241
+ darkorchid: 2570243327,
242
+ darkred: 2332033279,
243
+ darksalmon: 3918953215,
244
+ darkseagreen: 2411499519,
245
+ darkslateblue: 1211993087,
246
+ darkslategray: 793726975,
247
+ darkslategrey: 793726975,
248
+ darkturquoise: 13554175,
249
+ darkviolet: 2483082239,
250
+ deeppink: 4279538687,
251
+ deepskyblue: 12582911,
252
+ dimgray: 1768516095,
253
+ dimgrey: 1768516095,
254
+ dodgerblue: 512819199,
255
+ firebrick: 2988581631,
256
+ floralwhite: 4294635775,
257
+ forestgreen: 579543807,
258
+ fuchsia: 4278255615,
259
+ gainsboro: 3705462015,
260
+ ghostwhite: 4177068031,
261
+ gold: 4292280575,
262
+ goldenrod: 3668254975,
263
+ gray: 2155905279,
264
+ green: 8388863,
265
+ greenyellow: 2919182335,
266
+ grey: 2155905279,
267
+ honeydew: 4043305215,
268
+ hotpink: 4285117695,
269
+ indianred: 3445382399,
270
+ indigo: 1258324735,
271
+ ivory: 4294963455,
272
+ khaki: 4041641215,
273
+ lavender: 3873897215,
274
+ lavenderblush: 4293981695,
275
+ lawngreen: 2096890111,
276
+ lemonchiffon: 4294626815,
277
+ lightblue: 2916673279,
278
+ lightcoral: 4034953471,
279
+ lightcyan: 3774873599,
280
+ lightgoldenrodyellow: 4210742015,
281
+ lightgray: 3553874943,
282
+ lightgreen: 2431553791,
283
+ lightgrey: 3553874943,
284
+ lightpink: 4290167295,
285
+ lightsalmon: 4288707327,
286
+ lightseagreen: 548580095,
287
+ lightskyblue: 2278488831,
288
+ lightslategray: 2005441023,
289
+ lightslategrey: 2005441023,
290
+ lightsteelblue: 2965692159,
291
+ lightyellow: 4294959359,
292
+ lime: 16711935,
293
+ limegreen: 852308735,
294
+ linen: 4210091775,
295
+ magenta: 4278255615,
296
+ maroon: 2147483903,
297
+ mediumaquamarine: 1724754687,
298
+ mediumblue: 52735,
299
+ mediumorchid: 3126187007,
300
+ mediumpurple: 2473647103,
301
+ mediumseagreen: 1018393087,
302
+ mediumslateblue: 2070474495,
303
+ mediumspringgreen: 16423679,
304
+ mediumturquoise: 1221709055,
305
+ mediumvioletred: 3340076543,
306
+ midnightblue: 421097727,
307
+ mintcream: 4127193855,
308
+ mistyrose: 4293190143,
309
+ moccasin: 4293178879,
310
+ navajowhite: 4292783615,
311
+ navy: 33023,
312
+ oldlace: 4260751103,
313
+ olive: 2155872511,
314
+ olivedrab: 1804477439,
315
+ orange: 4289003775,
316
+ orangered: 4282712319,
317
+ orchid: 3664828159,
318
+ palegoldenrod: 4008225535,
319
+ palegreen: 2566625535,
320
+ paleturquoise: 2951671551,
321
+ palevioletred: 3681588223,
322
+ papayawhip: 4293907967,
323
+ peachpuff: 4292524543,
324
+ peru: 3448061951,
325
+ pink: 4290825215,
326
+ plum: 3718307327,
327
+ powderblue: 2967529215,
328
+ purple: 2147516671,
329
+ rebeccapurple: 1714657791,
330
+ red: 4278190335,
331
+ rosybrown: 3163525119,
332
+ royalblue: 1097458175,
333
+ saddlebrown: 2336560127,
334
+ salmon: 4202722047,
335
+ sandybrown: 4104413439,
336
+ seagreen: 780883967,
337
+ seashell: 4294307583,
338
+ sienna: 2689740287,
339
+ silver: 3233857791,
340
+ skyblue: 2278484991,
341
+ slateblue: 1784335871,
342
+ slategray: 1887473919,
343
+ slategrey: 1887473919,
344
+ snow: 4294638335,
345
+ springgreen: 16744447,
346
+ steelblue: 1182971135,
347
+ tan: 3535047935,
348
+ teal: 8421631,
349
+ thistle: 3636451583,
350
+ tomato: 4284696575,
351
+ turquoise: 1088475391,
352
+ violet: 4001558271,
353
+ wheat: 4125012991,
354
+ white: 4294967295,
355
+ whitesmoke: 4126537215,
356
+ yellow: 4294902015,
357
+ yellowgreen: 2597139199
358
+ }, Q = "[-+]?\\d*\\.?\\d+", Ne = Q + "%";
359
+ function Be(...e) {
360
+ return "\\(\\s*(" + e.join(")\\s*,\\s*(") + ")\\s*\\)";
361
+ }
362
+ var Xn = new RegExp("rgb" + Be(Q, Q, Q)), Yn = new RegExp("rgba" + Be(Q, Q, Q, Q)), ei = new RegExp("hsl" + Be(Q, Ne, Ne)), ti = new RegExp(
363
+ "hsla" + Be(Q, Ne, Ne, Q)
364
+ ), ni = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, ii = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, si = /^#([0-9a-fA-F]{6})$/, ri = /^#([0-9a-fA-F]{8})$/;
365
+ function ai(e) {
366
+ let t;
367
+ return typeof e == "number" ? e >>> 0 === e && e >= 0 && e <= 4294967295 ? e : null : (t = si.exec(e)) ? parseInt(t[1] + "ff", 16) >>> 0 : ie && ie[e] !== void 0 ? ie[e] : (t = Xn.exec(e)) ? (ue(t[1]) << 24 | // r
368
+ ue(t[2]) << 16 | // g
369
+ ue(t[3]) << 8 | // b
370
+ 255) >>> // a
371
+ 0 : (t = Yn.exec(e)) ? (ue(t[1]) << 24 | // r
372
+ ue(t[2]) << 16 | // g
373
+ ue(t[3]) << 8 | // b
374
+ qt(t[4])) >>> // a
375
+ 0 : (t = ni.exec(e)) ? parseInt(
376
+ t[1] + t[1] + // r
377
+ t[2] + t[2] + // g
378
+ t[3] + t[3] + // b
379
+ "ff",
380
+ // a
381
+ 16
382
+ ) >>> 0 : (t = ri.exec(e)) ? parseInt(t[1], 16) >>> 0 : (t = ii.exec(e)) ? parseInt(
383
+ t[1] + t[1] + // r
384
+ t[2] + t[2] + // g
385
+ t[3] + t[3] + // b
386
+ t[4] + t[4],
387
+ // a
388
+ 16
389
+ ) >>> 0 : (t = ei.exec(e)) ? (Ot(
390
+ Ut(t[1]),
391
+ // h
392
+ Ue(t[2]),
393
+ // s
394
+ Ue(t[3])
395
+ // l
396
+ ) | 255) >>> // a
397
+ 0 : (t = ti.exec(e)) ? (Ot(
398
+ Ut(t[1]),
399
+ // h
400
+ Ue(t[2]),
401
+ // s
402
+ Ue(t[3])
403
+ // l
404
+ ) | qt(t[4])) >>> // a
405
+ 0 : null;
406
+ }
407
+ function et(e, t, n) {
408
+ return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
409
+ }
410
+ function Ot(e, t, n) {
411
+ const i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i, r = et(s, i, e + 1 / 3), a = et(s, i, e), u = et(s, i, e - 1 / 3);
412
+ return Math.round(r * 255) << 24 | Math.round(a * 255) << 16 | Math.round(u * 255) << 8;
413
+ }
414
+ function ue(e) {
415
+ const t = parseInt(e, 10);
416
+ return t < 0 ? 0 : t > 255 ? 255 : t;
417
+ }
418
+ function Ut(e) {
419
+ return (parseFloat(e) % 360 + 360) % 360 / 360;
420
+ }
421
+ function qt(e) {
422
+ const t = parseFloat(e);
423
+ return t < 0 ? 0 : t > 1 ? 255 : Math.round(t * 255);
424
+ }
425
+ function Ue(e) {
426
+ const t = parseFloat(e);
427
+ return t < 0 ? 0 : t > 100 ? 1 : t / 100;
428
+ }
429
+ function $t(e) {
430
+ let t = ai(e);
431
+ if (t === null) return e;
432
+ t = t || 0;
433
+ const n = (t & 4278190080) >>> 24, i = (t & 16711680) >>> 16, s = (t & 65280) >>> 8, r = (t & 255) / 255;
434
+ return `rgba(${n}, ${i}, ${s}, ${r})`;
435
+ }
436
+ var Ae = (e, t, n) => {
437
+ if (o.fun(e))
438
+ return e;
439
+ if (o.arr(e))
440
+ return Ae({
441
+ range: e,
442
+ output: t,
443
+ extrapolate: n
444
+ });
445
+ if (o.str(e.output[0]))
446
+ return At(e);
447
+ const i = e, s = i.output, r = i.range || [0, 1], a = i.extrapolateLeft || i.extrapolate || "extend", u = i.extrapolateRight || i.extrapolate || "extend", l = i.easing || ((c) => c);
448
+ return (c) => {
449
+ const p = ui(c, r);
450
+ return oi(
451
+ c,
452
+ r[p],
453
+ r[p + 1],
454
+ s[p],
455
+ s[p + 1],
456
+ l,
457
+ a,
458
+ u,
459
+ i.map
460
+ );
461
+ };
462
+ };
463
+ function oi(e, t, n, i, s, r, a, u, l) {
464
+ let c = l ? l(e) : e;
465
+ if (c < t) {
466
+ if (a === "identity") return c;
467
+ a === "clamp" && (c = t);
468
+ }
469
+ if (c > n) {
470
+ if (u === "identity") return c;
471
+ u === "clamp" && (c = n);
472
+ }
473
+ return i === s ? i : t === n ? e <= t ? i : s : (t === -1 / 0 ? c = -c : n === 1 / 0 ? c = c - t : c = (c - t) / (n - t), c = r(c), i === -1 / 0 ? c = -c : s === 1 / 0 ? c = c + i : c = c * (s - i) + i, c);
474
+ }
475
+ function ui(e, t) {
476
+ for (var n = 1; n < t.length - 1 && !(t[n] >= e); ++n)
477
+ ;
478
+ return n - 1;
479
+ }
480
+ var ci = {
481
+ linear: (e) => e
482
+ }, Pe = Symbol.for("FluidValue.get"), de = Symbol.for("FluidValue.observers"), j = (e) => !!(e && e[Pe]), E = (e) => e && e[Pe] ? e[Pe]() : e, jt = (e) => e[de] || null;
483
+ function li(e, t) {
484
+ e.eventObserved ? e.eventObserved(t) : e(t);
485
+ }
486
+ function ke(e, t) {
487
+ const n = e[de];
488
+ n && n.forEach((i) => {
489
+ li(i, t);
490
+ });
491
+ }
492
+ var ln = class {
493
+ constructor(e) {
494
+ if (!e && !(e = this.get))
495
+ throw Error("Unknown getter");
496
+ di(this, e);
497
+ }
498
+ }, di = (e, t) => dn(e, Pe, t);
499
+ function fe(e, t) {
500
+ if (e[Pe]) {
501
+ let n = e[de];
502
+ n || dn(e, de, n = /* @__PURE__ */ new Set()), n.has(t) || (n.add(t), e.observerAdded && e.observerAdded(n.size, t));
503
+ }
504
+ return t;
505
+ }
506
+ function Re(e, t) {
507
+ const n = e[de];
508
+ if (n && n.has(t)) {
509
+ const i = n.size - 1;
510
+ i ? n.delete(t) : e[de] = null, e.observerRemoved && e.observerRemoved(i, t);
511
+ }
512
+ }
513
+ var dn = (e, t, n) => Object.defineProperty(e, t, {
514
+ value: n,
515
+ writable: !0,
516
+ configurable: !0
517
+ }), qe = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, fi = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi, Nt = new RegExp(`(${qe.source})(%|[a-z]+)`, "i"), hi = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, Ge = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/, fn = (e) => {
518
+ const [t, n] = mi(e);
519
+ if (!t || xt())
520
+ return e;
521
+ const i = window.getComputedStyle(document.documentElement).getPropertyValue(t);
522
+ if (i)
523
+ return i.trim();
524
+ if (n && n.startsWith("--")) {
525
+ const s = window.getComputedStyle(document.documentElement).getPropertyValue(n);
526
+ return s || e;
527
+ } else {
528
+ if (n && Ge.test(n))
529
+ return fn(n);
530
+ if (n)
531
+ return n;
532
+ }
533
+ return e;
534
+ }, mi = (e) => {
535
+ const t = Ge.exec(e);
536
+ if (!t) return [,];
537
+ const [, n, i] = t;
538
+ return [n, i];
539
+ }, tt, pi = (e, t, n, i, s) => `rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(i)}, ${s})`, hn = (e) => {
540
+ tt || (tt = ie ? (
541
+ // match color names, ignore partial matches
542
+ new RegExp(`(${Object.keys(ie).join("|")})(?!\\w)`, "g")
543
+ ) : (
544
+ // never match
545
+ /^\b$/
546
+ ));
547
+ const t = e.output.map((r) => E(r).replace(Ge, fn).replace(fi, $t).replace(tt, $t)), n = t.map((r) => r.match(qe).map(Number)), s = n[0].map(
548
+ (r, a) => n.map((u) => {
549
+ if (!(a in u))
550
+ throw Error('The arity of each "output" value must be equal');
551
+ return u[a];
552
+ })
553
+ ).map(
554
+ (r) => Ae({ ...e, output: r })
555
+ );
556
+ return (r) => {
557
+ var l;
558
+ const a = !Nt.test(t[0]) && ((l = t.find((c) => Nt.test(c))) == null ? void 0 : l.replace(qe, ""));
559
+ let u = 0;
560
+ return t[0].replace(
561
+ qe,
562
+ () => `${s[u++](r)}${a || ""}`
563
+ ).replace(hi, pi);
564
+ };
565
+ }, kt = "react-spring: ", mn = (e) => {
566
+ const t = e;
567
+ let n = !1;
568
+ if (typeof t != "function")
569
+ throw new TypeError(`${kt}once requires a function parameter`);
570
+ return (...i) => {
571
+ n || (t(...i), n = !0);
572
+ };
573
+ }, gi = mn(console.warn);
574
+ function vi() {
575
+ gi(
576
+ `${kt}The "interpolate" function is deprecated in v9 (use "to" instead)`
577
+ );
578
+ }
579
+ var yi = mn(console.warn);
580
+ function _i() {
581
+ yi(
582
+ `${kt}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`
583
+ );
584
+ }
585
+ function He(e) {
586
+ return o.str(e) && (e[0] == "#" || /\d/.test(e) || // Do not identify a CSS variable as an AnimatedString if its SSR
587
+ !xt() && Ge.test(e) || e in (ie || {}));
588
+ }
589
+ var ae = xt() ? Qe : Nn, bi = () => {
590
+ const e = H(!1);
591
+ return ae(() => (e.current = !0, () => {
592
+ e.current = !1;
593
+ }), []), e;
594
+ };
595
+ function Rt() {
596
+ const e = zn()[1], t = bi();
597
+ return () => {
598
+ t.current && e(Math.random());
599
+ };
600
+ }
601
+ var It = (e) => Qe(e, wi), wi = [];
602
+ function ut(e) {
603
+ const t = H(void 0);
604
+ return Qe(() => {
605
+ t.current = e;
606
+ }), t.current;
607
+ }
608
+ var Ie = Symbol.for("Animated:node"), Si = (e) => !!e && e[Ie] === e, G = (e) => e && e[Ie], Ft = (e, t) => Hn(e, Ie, t), We = (e) => e && e[Ie] && e[Ie].getPayload(), pn = class {
609
+ constructor() {
610
+ Ft(this, this);
611
+ }
612
+ /** Get every `AnimatedValue` used by this node. */
613
+ getPayload() {
614
+ return this.payload || [];
615
+ }
616
+ }, Ke = class gn extends pn {
617
+ constructor(t) {
618
+ super(), this._value = t, this.done = !0, this.durationProgress = 0, o.num(this._value) && (this.lastPosition = this._value);
619
+ }
620
+ /** @internal */
621
+ static create(t) {
622
+ return new gn(t);
623
+ }
624
+ getPayload() {
625
+ return [this];
626
+ }
627
+ getValue() {
628
+ return this._value;
629
+ }
630
+ setValue(t, n) {
631
+ return o.num(t) && (this.lastPosition = t, n && (t = Math.round(t / n) * n, this.done && (this.lastPosition = t))), this._value === t ? !1 : (this._value = t, !0);
632
+ }
633
+ reset() {
634
+ const { done: t } = this;
635
+ this.done = !1, o.num(this._value) && (this.elapsedTime = 0, this.durationProgress = 0, this.lastPosition = this._value, t && (this.lastVelocity = null), this.v0 = null);
636
+ }
637
+ }, ze = class vn extends Ke {
638
+ constructor(t) {
639
+ super(0), this._string = null, this._toString = Ae({
640
+ output: [t, t]
641
+ });
642
+ }
643
+ /** @internal */
644
+ static create(t) {
645
+ return new vn(t);
646
+ }
647
+ getValue() {
648
+ const t = this._string;
649
+ return t ?? (this._string = this._toString(this._value));
650
+ }
651
+ setValue(t) {
652
+ if (o.str(t)) {
653
+ if (t == this._string)
654
+ return !1;
655
+ this._string = t, this._value = 1;
656
+ } else if (super.setValue(t))
657
+ this._string = null;
658
+ else
659
+ return !1;
660
+ return !0;
661
+ }
662
+ reset(t) {
663
+ t && (this._toString = Ae({
664
+ output: [this.getValue(), t]
665
+ })), this._value = 0, super.reset();
666
+ }
667
+ }, De = { dependencies: null }, Ze = class extends pn {
668
+ constructor(e) {
669
+ super(), this.source = e, this.setValue(e);
670
+ }
671
+ getValue(e) {
672
+ const t = {};
673
+ return W(this.source, (n, i) => {
674
+ Si(n) ? t[i] = n.getValue(e) : j(n) ? t[i] = E(n) : e || (t[i] = n);
675
+ }), t;
676
+ }
677
+ /** Replace the raw object data */
678
+ setValue(e) {
679
+ this.source = e, this.payload = this._makePayload(e);
680
+ }
681
+ reset() {
682
+ this.payload && _(this.payload, (e) => e.reset());
683
+ }
684
+ /** Create a payload set. */
685
+ _makePayload(e) {
686
+ if (e) {
687
+ const t = /* @__PURE__ */ new Set();
688
+ return W(e, this._addToPayload, t), Array.from(t);
689
+ }
690
+ }
691
+ /** Add to a payload set. */
692
+ _addToPayload(e) {
693
+ De.dependencies && j(e) && De.dependencies.add(e);
694
+ const t = We(e);
695
+ t && _(t, (n) => this.add(n));
696
+ }
697
+ }, xi = class yn extends Ze {
698
+ constructor(t) {
699
+ super(t);
700
+ }
701
+ /** @internal */
702
+ static create(t) {
703
+ return new yn(t);
704
+ }
705
+ getValue() {
706
+ return this.source.map((t) => t.getValue());
707
+ }
708
+ setValue(t) {
709
+ const n = this.getPayload();
710
+ return t.length == n.length ? n.map((i, s) => i.setValue(t[s])).some(Boolean) : (super.setValue(t.map(Ai)), !0);
711
+ }
712
+ };
713
+ function Ai(e) {
714
+ return (He(e) ? ze : Ke).create(e);
715
+ }
716
+ function ct(e) {
717
+ const t = G(e);
718
+ return t ? t.constructor : o.arr(e) ? xi : He(e) ? ze : Ke;
719
+ }
720
+ var zt = (e, t) => {
721
+ const n = (
722
+ // Function components must use "forwardRef" to avoid being
723
+ // re-rendered on every animation frame.
724
+ !o.fun(e) || e.prototype && e.prototype.isReactComponent
725
+ );
726
+ return Dn((i, s) => {
727
+ const r = H(null), a = n && // eslint-disable-next-line react-hooks/rules-of-hooks
728
+ Qn(
729
+ (f) => {
730
+ r.current = Ri(s, f);
731
+ },
732
+ [s]
733
+ ), [u, l] = ki(i, t), c = Rt(), p = () => {
734
+ const f = r.current;
735
+ if (n && !f)
736
+ return;
737
+ (f ? t.applyAnimatedValues(f, u.getValue(!0)) : !1) === !1 && c();
738
+ }, h = new Pi(p, l), d = H(void 0);
739
+ ae(() => (d.current = h, _(l, (f) => fe(f, h)), () => {
740
+ d.current && (_(
741
+ d.current.deps,
742
+ (f) => Re(f, d.current)
743
+ ), S.cancel(d.current.update));
744
+ })), Qe(p, []), It(() => () => {
745
+ const f = d.current;
746
+ _(f.deps, (v) => Re(v, f));
747
+ });
748
+ const g = t.getComponentProps(u.getValue());
749
+ return /* @__PURE__ */ _e.createElement(e, { ...g, ref: a });
750
+ });
751
+ }, Pi = class {
752
+ constructor(e, t) {
753
+ this.update = e, this.deps = t;
754
+ }
755
+ eventObserved(e) {
756
+ e.type == "change" && S.write(this.update);
757
+ }
758
+ };
759
+ function ki(e, t) {
760
+ const n = /* @__PURE__ */ new Set();
761
+ return De.dependencies = n, e.style && (e = {
762
+ ...e,
763
+ style: t.createAnimatedStyle(e.style)
764
+ }), e = new Ze(e), De.dependencies = null, [e, n];
765
+ }
766
+ function Ri(e, t) {
767
+ return e && (o.fun(e) ? e(t) : e.current = t), t;
768
+ }
769
+ var Dt = Symbol.for("AnimatedComponent"), Ii = (e, {
770
+ applyAnimatedValues: t = () => !1,
771
+ createAnimatedStyle: n = (s) => new Ze(s),
772
+ getComponentProps: i = (s) => s
773
+ } = {}) => {
774
+ const s = {
775
+ applyAnimatedValues: t,
776
+ createAnimatedStyle: n,
777
+ getComponentProps: i
778
+ }, r = (a) => {
779
+ const u = Qt(a) || "Anonymous";
780
+ return o.str(a) ? a = r[a] || (r[a] = zt(a, s)) : a = a[Dt] || (a[Dt] = zt(a, s)), a.displayName = `Animated(${u})`, a;
781
+ };
782
+ return W(e, (a, u) => {
783
+ o.arr(e) && (u = Qt(a)), r[u] = r(a);
784
+ }), {
785
+ animated: r
786
+ };
787
+ }, Qt = (e) => o.str(e) ? e : e && o.str(e.displayName) ? e.displayName : o.fun(e) && e.name || null;
788
+ function O(e, ...t) {
789
+ return o.fun(e) ? e(...t) : e;
790
+ }
791
+ var Se = (e, t) => e === !0 || !!(t && e && (o.fun(e) ? e(t) : C(e).includes(t))), _n = (e, t) => o.obj(e) ? t && e[t] : e, bn = (e, t) => e.default === !0 ? e[t] : e.default ? e.default[t] : void 0, Fi = (e) => e, Je = (e, t = Fi) => {
792
+ let n = Ti;
793
+ e.default && e.default !== !0 && (e = e.default, n = Object.keys(e));
794
+ const i = {};
795
+ for (const s of n) {
796
+ const r = t(e[s], s);
797
+ o.und(r) || (i[s] = r);
798
+ }
799
+ return i;
800
+ }, Ti = [
801
+ "config",
802
+ "onProps",
803
+ "onStart",
804
+ "onChange",
805
+ "onPause",
806
+ "onResume",
807
+ "onRest"
808
+ ], Vi = {
809
+ config: 1,
810
+ from: 1,
811
+ to: 1,
812
+ ref: 1,
813
+ loop: 1,
814
+ reset: 1,
815
+ pause: 1,
816
+ cancel: 1,
817
+ reverse: 1,
818
+ immediate: 1,
819
+ default: 1,
820
+ delay: 1,
821
+ onProps: 1,
822
+ onStart: 1,
823
+ onChange: 1,
824
+ onPause: 1,
825
+ onResume: 1,
826
+ onRest: 1,
827
+ onResolve: 1,
828
+ // Transition props
829
+ items: 1,
830
+ trail: 1,
831
+ sort: 1,
832
+ expires: 1,
833
+ initial: 1,
834
+ enter: 1,
835
+ update: 1,
836
+ leave: 1,
837
+ children: 1,
838
+ onDestroyed: 1,
839
+ // Internal props
840
+ keys: 1,
841
+ callId: 1,
842
+ parentId: 1
843
+ };
844
+ function Ci(e) {
845
+ const t = {};
846
+ let n = 0;
847
+ if (W(e, (i, s) => {
848
+ Vi[s] || (t[s] = i, n++);
849
+ }), n)
850
+ return t;
851
+ }
852
+ function Tt(e) {
853
+ const t = Ci(e);
854
+ if (t) {
855
+ const n = { to: t };
856
+ return W(e, (i, s) => s in t || (n[s] = i)), n;
857
+ }
858
+ return { ...e };
859
+ }
860
+ function Fe(e) {
861
+ return e = E(e), o.arr(e) ? e.map(Fe) : He(e) ? M.createStringInterpolator({
862
+ range: [0, 1],
863
+ output: [e, e]
864
+ })(1) : e;
865
+ }
866
+ function wn(e) {
867
+ for (const t in e) return !0;
868
+ return !1;
869
+ }
870
+ function lt(e) {
871
+ return o.fun(e) || o.arr(e) && o.obj(e[0]);
872
+ }
873
+ function dt(e, t) {
874
+ var n;
875
+ (n = e.ref) == null || n.delete(e), t == null || t.delete(e);
876
+ }
877
+ function Sn(e, t) {
878
+ var n;
879
+ t && e.ref !== t && ((n = e.ref) == null || n.delete(e), t.add(e), e.ref = t);
880
+ }
881
+ var Ei = {
882
+ default: { tension: 170, friction: 26 },
883
+ stiff: { tension: 210, friction: 20 }
884
+ }, ft = {
885
+ ...Ei.default,
886
+ mass: 1,
887
+ damping: 1,
888
+ easing: ci.linear,
889
+ clamp: !1
890
+ }, Oi = class {
891
+ constructor() {
892
+ this.velocity = 0, Object.assign(this, ft);
893
+ }
894
+ };
895
+ function Ui(e, t, n) {
896
+ n && (n = { ...n }, Mt(n, t), t = { ...n, ...t }), Mt(e, t), Object.assign(e, t);
897
+ for (const a in ft)
898
+ e[a] == null && (e[a] = ft[a]);
899
+ let { frequency: i, damping: s } = e;
900
+ const { mass: r } = e;
901
+ return o.und(i) || (i < 0.01 && (i = 0.01), s < 0 && (s = 0), e.tension = Math.pow(2 * Math.PI / i, 2) * r, e.friction = 4 * Math.PI * s * r / i), e;
902
+ }
903
+ function Mt(e, t) {
904
+ if (!o.und(t.decay))
905
+ e.duration = void 0;
906
+ else {
907
+ const n = !o.und(t.tension) || !o.und(t.friction);
908
+ (n || !o.und(t.frequency) || !o.und(t.damping) || !o.und(t.mass)) && (e.duration = void 0, e.decay = void 0), n && (e.frequency = void 0);
909
+ }
910
+ }
911
+ var Lt = [], qi = class {
912
+ constructor() {
913
+ this.changed = !1, this.values = Lt, this.toValues = null, this.fromValues = Lt, this.config = new Oi(), this.immediate = !1;
914
+ }
915
+ };
916
+ function xn(e, { key: t, props: n, defaultProps: i, state: s, actions: r }) {
917
+ return new Promise((a, u) => {
918
+ let l, c, p = Se(n.cancel ?? (i == null ? void 0 : i.cancel), t);
919
+ if (p)
920
+ g();
921
+ else {
922
+ o.und(n.pause) || (s.paused = Se(n.pause, t));
923
+ let f = i == null ? void 0 : i.pause;
924
+ f !== !0 && (f = s.paused || Se(f, t)), l = O(n.delay || 0, t), f ? (s.resumeQueue.add(d), r.pause()) : (r.resume(), d());
925
+ }
926
+ function h() {
927
+ s.resumeQueue.add(d), s.timeouts.delete(c), c.cancel(), l = c.time - S.now();
928
+ }
929
+ function d() {
930
+ l > 0 && !M.skipAnimation ? (s.delayed = !0, c = S.setTimeout(g, l), s.pauseQueue.add(h), s.timeouts.add(c)) : g();
931
+ }
932
+ function g() {
933
+ s.delayed && (s.delayed = !1), s.pauseQueue.delete(h), s.timeouts.delete(c), e <= (s.cancelId || 0) && (p = !0);
934
+ try {
935
+ r.start({ ...n, callId: e, cancel: p }, a);
936
+ } catch (f) {
937
+ u(f);
938
+ }
939
+ }
940
+ });
941
+ }
942
+ var Vt = (e, t) => t.length == 1 ? t[0] : t.some((n) => n.cancelled) ? le(e.get()) : t.every((n) => n.noop) ? An(e.get()) : D(
943
+ e.get(),
944
+ t.every((n) => n.finished)
945
+ ), An = (e) => ({
946
+ value: e,
947
+ noop: !0,
948
+ finished: !0,
949
+ cancelled: !1
950
+ }), D = (e, t, n = !1) => ({
951
+ value: e,
952
+ finished: t,
953
+ cancelled: n
954
+ }), le = (e) => ({
955
+ value: e,
956
+ cancelled: !0,
957
+ finished: !1
958
+ });
959
+ function Pn(e, t, n, i) {
960
+ const { callId: s, parentId: r, onRest: a } = t, { asyncTo: u, promise: l } = n;
961
+ return !r && e === u && !t.reset ? l : n.promise = (async () => {
962
+ n.asyncId = s, n.asyncTo = e;
963
+ const c = Je(
964
+ t,
965
+ (b, m) => (
966
+ // The `onRest` prop is only called when the `runAsync` promise is resolved.
967
+ m === "onRest" ? void 0 : b
968
+ )
969
+ );
970
+ let p, h;
971
+ const d = new Promise(
972
+ (b, m) => (p = b, h = m)
973
+ ), g = (b) => {
974
+ const m = (
975
+ // The `cancel` prop or `stop` method was used.
976
+ s <= (n.cancelId || 0) && le(i) || // The async `to` prop was replaced.
977
+ s !== n.asyncId && D(i, !1)
978
+ );
979
+ if (m)
980
+ throw b.result = m, h(b), b;
981
+ }, f = (b, m) => {
982
+ const x = new Bt(), y = new Gt();
983
+ return (async () => {
984
+ if (M.skipAnimation)
985
+ throw Te(n), y.result = D(i, !1), h(y), y;
986
+ g(x);
987
+ const P = o.obj(b) ? { ...b } : { ...m, to: b };
988
+ P.parentId = s, W(c, (L, R) => {
989
+ o.und(P[R]) && (P[R] = L);
990
+ });
991
+ const k = await i.start(P);
992
+ return g(x), n.paused && await new Promise((L) => {
993
+ n.resumeQueue.add(L);
994
+ }), k;
995
+ })();
996
+ };
997
+ let v;
998
+ if (M.skipAnimation)
999
+ return Te(n), D(i, !1);
1000
+ try {
1001
+ let b;
1002
+ o.arr(e) ? b = (async (m) => {
1003
+ for (const x of m)
1004
+ await f(x);
1005
+ })(e) : b = Promise.resolve(e(f, i.stop.bind(i))), await Promise.all([b.then(p), d]), v = D(i.get(), !0, !1);
1006
+ } catch (b) {
1007
+ if (b instanceof Bt)
1008
+ v = b.result;
1009
+ else if (b instanceof Gt)
1010
+ v = b.result;
1011
+ else
1012
+ throw b;
1013
+ } finally {
1014
+ s == n.asyncId && (n.asyncId = r, n.asyncTo = r ? u : void 0, n.promise = r ? l : void 0);
1015
+ }
1016
+ return o.fun(a) && S.batchedUpdates(() => {
1017
+ a(v, i, i.item);
1018
+ }), v;
1019
+ })();
1020
+ }
1021
+ function Te(e, t) {
1022
+ be(e.timeouts, (n) => n.cancel()), e.pauseQueue.clear(), e.resumeQueue.clear(), e.asyncId = e.asyncTo = e.promise = void 0, t && (e.cancelId = t);
1023
+ }
1024
+ var Bt = class extends Error {
1025
+ constructor() {
1026
+ super(
1027
+ "An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."
1028
+ );
1029
+ }
1030
+ }, Gt = class extends Error {
1031
+ constructor() {
1032
+ super("SkipAnimationSignal");
1033
+ }
1034
+ }, ht = (e) => e instanceof Ct, $i = 1, Ct = class extends ln {
1035
+ constructor() {
1036
+ super(...arguments), this.id = $i++, this._priority = 0;
1037
+ }
1038
+ get priority() {
1039
+ return this._priority;
1040
+ }
1041
+ set priority(e) {
1042
+ this._priority != e && (this._priority = e, this._onPriorityChange(e));
1043
+ }
1044
+ /** Get the current value */
1045
+ get() {
1046
+ const e = G(this);
1047
+ return e && e.getValue();
1048
+ }
1049
+ /** Create a spring that maps our value to another value */
1050
+ to(...e) {
1051
+ return M.to(this, e);
1052
+ }
1053
+ /** @deprecated Use the `to` method instead. */
1054
+ interpolate(...e) {
1055
+ return vi(), M.to(this, e);
1056
+ }
1057
+ toJSON() {
1058
+ return this.get();
1059
+ }
1060
+ observerAdded(e) {
1061
+ e == 1 && this._attach();
1062
+ }
1063
+ observerRemoved(e) {
1064
+ e == 0 && this._detach();
1065
+ }
1066
+ /** Called when the first child is added. */
1067
+ _attach() {
1068
+ }
1069
+ /** Called when the last child is removed. */
1070
+ _detach() {
1071
+ }
1072
+ /** Tell our children about our new value */
1073
+ _onChange(e, t = !1) {
1074
+ ke(this, {
1075
+ type: "change",
1076
+ parent: this,
1077
+ value: e,
1078
+ idle: t
1079
+ });
1080
+ }
1081
+ /** Tell our children about our new priority */
1082
+ _onPriorityChange(e) {
1083
+ this.idle || Le.sort(this), ke(this, {
1084
+ type: "priority",
1085
+ parent: this,
1086
+ priority: e
1087
+ });
1088
+ }
1089
+ }, oe = Symbol.for("SpringPhase"), kn = 1, mt = 2, pt = 4, nt = (e) => (e[oe] & kn) > 0, ee = (e) => (e[oe] & mt) > 0, me = (e) => (e[oe] & pt) > 0, Ht = (e, t) => t ? e[oe] |= mt | kn : e[oe] &= ~mt, Wt = (e, t) => t ? e[oe] |= pt : e[oe] &= ~pt, ji = class extends Ct {
1090
+ constructor(e, t) {
1091
+ if (super(), this.animation = new qi(), this.defaultProps = {}, this._state = {
1092
+ paused: !1,
1093
+ delayed: !1,
1094
+ pauseQueue: /* @__PURE__ */ new Set(),
1095
+ resumeQueue: /* @__PURE__ */ new Set(),
1096
+ timeouts: /* @__PURE__ */ new Set()
1097
+ }, this._pendingCalls = /* @__PURE__ */ new Set(), this._lastCallId = 0, this._lastToId = 0, this._memoizedDuration = 0, !o.und(e) || !o.und(t)) {
1098
+ const n = o.obj(e) ? { ...e } : { ...t, from: e };
1099
+ o.und(n.default) && (n.default = !0), this.start(n);
1100
+ }
1101
+ }
1102
+ /** Equals true when not advancing on each frame. */
1103
+ get idle() {
1104
+ return !(ee(this) || this._state.asyncTo) || me(this);
1105
+ }
1106
+ get goal() {
1107
+ return E(this.animation.to);
1108
+ }
1109
+ get velocity() {
1110
+ const e = G(this);
1111
+ return e instanceof Ke ? e.lastVelocity || 0 : e.getPayload().map((t) => t.lastVelocity || 0);
1112
+ }
1113
+ /**
1114
+ * When true, this value has been animated at least once.
1115
+ */
1116
+ get hasAnimated() {
1117
+ return nt(this);
1118
+ }
1119
+ /**
1120
+ * When true, this value has an unfinished animation,
1121
+ * which is either active or paused.
1122
+ */
1123
+ get isAnimating() {
1124
+ return ee(this);
1125
+ }
1126
+ /**
1127
+ * When true, all current and future animations are paused.
1128
+ */
1129
+ get isPaused() {
1130
+ return me(this);
1131
+ }
1132
+ /**
1133
+ *
1134
+ *
1135
+ */
1136
+ get isDelayed() {
1137
+ return this._state.delayed;
1138
+ }
1139
+ /** Advance the current animation by a number of milliseconds */
1140
+ advance(e) {
1141
+ let t = !0, n = !1;
1142
+ const i = this.animation;
1143
+ let { toValues: s } = i;
1144
+ const { config: r } = i, a = We(i.to);
1145
+ !a && j(i.to) && (s = C(E(i.to))), i.values.forEach((c, p) => {
1146
+ if (c.done) return;
1147
+ const h = (
1148
+ // Animated strings always go from 0 to 1.
1149
+ c.constructor == ze ? 1 : a ? a[p].lastPosition : s[p]
1150
+ );
1151
+ let d = i.immediate, g = h;
1152
+ if (!d) {
1153
+ if (g = c.lastPosition, r.tension <= 0) {
1154
+ c.done = !0;
1155
+ return;
1156
+ }
1157
+ let f = c.elapsedTime += e;
1158
+ const v = i.fromValues[p], b = c.v0 != null ? c.v0 : c.v0 = o.arr(r.velocity) ? r.velocity[p] : r.velocity;
1159
+ let m;
1160
+ const x = r.precision || (v == h ? 5e-3 : Math.min(1, Math.abs(h - v) * 1e-3));
1161
+ if (o.und(r.duration))
1162
+ if (r.decay) {
1163
+ const y = r.decay === !0 ? 0.998 : r.decay, P = Math.exp(-(1 - y) * f);
1164
+ g = v + b / (1 - y) * (1 - P), d = Math.abs(c.lastPosition - g) <= x, m = b * P;
1165
+ } else {
1166
+ m = c.lastVelocity == null ? b : c.lastVelocity;
1167
+ const y = r.restVelocity || x / 10, P = r.clamp ? 0 : r.bounce, k = !o.und(P), L = v == h ? c.v0 > 0 : v < h;
1168
+ let R, B = !1;
1169
+ const I = 1, $ = Math.ceil(e / I);
1170
+ for (let U = 0; U < $ && (R = Math.abs(m) > y, !(!R && (d = Math.abs(h - g) <= x, d))); ++U) {
1171
+ k && (B = g == h || g > h == L, B && (m = -m * P, g = h));
1172
+ const K = -r.tension * 1e-6 * (g - h), Z = -r.friction * 1e-3 * m, w = (K + Z) / r.mass;
1173
+ m = m + w * I, g = g + m * I;
1174
+ }
1175
+ }
1176
+ else {
1177
+ let y = 1;
1178
+ r.duration > 0 && (this._memoizedDuration !== r.duration && (this._memoizedDuration = r.duration, c.durationProgress > 0 && (c.elapsedTime = r.duration * c.durationProgress, f = c.elapsedTime += e)), y = (r.progress || 0) + f / this._memoizedDuration, y = y > 1 ? 1 : y < 0 ? 0 : y, c.durationProgress = y), g = v + r.easing(y) * (h - v), m = (g - c.lastPosition) / e, d = y == 1;
1179
+ }
1180
+ c.lastVelocity = m, Number.isNaN(g) && (console.warn("Got NaN while animating:", this), d = !0);
1181
+ }
1182
+ a && !a[p].done && (d = !1), d ? c.done = !0 : t = !1, c.setValue(g, r.round) && (n = !0);
1183
+ });
1184
+ const u = G(this), l = u.getValue();
1185
+ if (t) {
1186
+ const c = E(i.to);
1187
+ (l !== c || n) && !r.decay ? (u.setValue(c), this._onChange(c)) : n && r.decay && this._onChange(l), this._stop();
1188
+ } else n && this._onChange(l);
1189
+ }
1190
+ /** Set the current value, while stopping the current animation */
1191
+ set(e) {
1192
+ return S.batchedUpdates(() => {
1193
+ this._stop(), this._focus(e), this._set(e);
1194
+ }), this;
1195
+ }
1196
+ /**
1197
+ * Freeze the active animation in time, as well as any updates merged
1198
+ * before `resume` is called.
1199
+ */
1200
+ pause() {
1201
+ this._update({ pause: !0 });
1202
+ }
1203
+ /** Resume the animation if paused. */
1204
+ resume() {
1205
+ this._update({ pause: !1 });
1206
+ }
1207
+ /** Skip to the end of the current animation. */
1208
+ finish() {
1209
+ if (ee(this)) {
1210
+ const { to: e, config: t } = this.animation;
1211
+ S.batchedUpdates(() => {
1212
+ this._onStart(), t.decay || this._set(e, !1), this._stop();
1213
+ });
1214
+ }
1215
+ return this;
1216
+ }
1217
+ /** Push props into the pending queue. */
1218
+ update(e) {
1219
+ return (this.queue || (this.queue = [])).push(e), this;
1220
+ }
1221
+ start(e, t) {
1222
+ let n;
1223
+ return o.und(e) ? (n = this.queue || [], this.queue = []) : n = [o.obj(e) ? e : { ...t, to: e }], Promise.all(
1224
+ n.map((i) => this._update(i))
1225
+ ).then((i) => Vt(this, i));
1226
+ }
1227
+ /**
1228
+ * Stop the current animation, and cancel any delayed updates.
1229
+ *
1230
+ * Pass `true` to call `onRest` with `cancelled: true`.
1231
+ */
1232
+ stop(e) {
1233
+ const { to: t } = this.animation;
1234
+ return this._focus(this.get()), Te(this._state, e && this._lastCallId), S.batchedUpdates(() => this._stop(t, e)), this;
1235
+ }
1236
+ /** Restart the animation. */
1237
+ reset() {
1238
+ this._update({ reset: !0 });
1239
+ }
1240
+ /** @internal */
1241
+ eventObserved(e) {
1242
+ e.type == "change" ? this._start() : e.type == "priority" && (this.priority = e.priority + 1);
1243
+ }
1244
+ /**
1245
+ * Parse the `to` and `from` range from the given `props` object.
1246
+ *
1247
+ * This also ensures the initial value is available to animated components
1248
+ * during the render phase.
1249
+ */
1250
+ _prepareNode(e) {
1251
+ const t = this.key || "";
1252
+ let { to: n, from: i } = e;
1253
+ n = o.obj(n) ? n[t] : n, (n == null || lt(n)) && (n = void 0), i = o.obj(i) ? i[t] : i, i == null && (i = void 0);
1254
+ const s = { to: n, from: i };
1255
+ return nt(this) || (e.reverse && ([n, i] = [i, n]), i = E(i), o.und(i) ? G(this) || this._set(n) : this._set(i)), s;
1256
+ }
1257
+ /** Every update is processed by this method before merging. */
1258
+ _update({ ...e }, t) {
1259
+ const { key: n, defaultProps: i } = this;
1260
+ e.default && Object.assign(
1261
+ i,
1262
+ Je(
1263
+ e,
1264
+ (a, u) => /^on/.test(u) ? _n(a, n) : a
1265
+ )
1266
+ ), Zt(this, e, "onProps"), ge(this, "onProps", e, this);
1267
+ const s = this._prepareNode(e);
1268
+ if (Object.isFrozen(this))
1269
+ throw Error(
1270
+ "Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?"
1271
+ );
1272
+ const r = this._state;
1273
+ return xn(++this._lastCallId, {
1274
+ key: n,
1275
+ props: e,
1276
+ defaultProps: i,
1277
+ state: r,
1278
+ actions: {
1279
+ pause: () => {
1280
+ me(this) || (Wt(this, !0), ye(r.pauseQueue), ge(
1281
+ this,
1282
+ "onPause",
1283
+ D(this, pe(this, this.animation.to)),
1284
+ this
1285
+ ));
1286
+ },
1287
+ resume: () => {
1288
+ me(this) && (Wt(this, !1), ee(this) && this._resume(), ye(r.resumeQueue), ge(
1289
+ this,
1290
+ "onResume",
1291
+ D(this, pe(this, this.animation.to)),
1292
+ this
1293
+ ));
1294
+ },
1295
+ start: this._merge.bind(this, s)
1296
+ }
1297
+ }).then((a) => {
1298
+ if (e.loop && a.finished && !(t && a.noop)) {
1299
+ const u = Rn(e);
1300
+ if (u)
1301
+ return this._update(u, !0);
1302
+ }
1303
+ return a;
1304
+ });
1305
+ }
1306
+ /** Merge props into the current animation */
1307
+ _merge(e, t, n) {
1308
+ if (t.cancel)
1309
+ return this.stop(!0), n(le(this));
1310
+ const i = !o.und(e.to), s = !o.und(e.from);
1311
+ if (i || s)
1312
+ if (t.callId > this._lastToId)
1313
+ this._lastToId = t.callId;
1314
+ else
1315
+ return n(le(this));
1316
+ const { key: r, defaultProps: a, animation: u } = this, { to: l, from: c } = u;
1317
+ let { to: p = l, from: h = c } = e;
1318
+ s && !i && (!t.default || o.und(p)) && (p = h), t.reverse && ([p, h] = [h, p]);
1319
+ const d = !X(h, c);
1320
+ d && (u.from = h), h = E(h);
1321
+ const g = !X(p, l);
1322
+ g && this._focus(p);
1323
+ const f = lt(t.to), { config: v } = u, { decay: b, velocity: m } = v;
1324
+ (i || s) && (v.velocity = 0), t.config && !f && Ui(
1325
+ v,
1326
+ O(t.config, r),
1327
+ // Avoid calling the same "config" prop twice.
1328
+ t.config !== a.config ? O(a.config, r) : void 0
1329
+ );
1330
+ let x = G(this);
1331
+ if (!x || o.und(p))
1332
+ return n(D(this, !0));
1333
+ const y = (
1334
+ // When `reset` is undefined, the `from` prop implies `reset: true`,
1335
+ // except for declarative updates. When `reset` is defined, there
1336
+ // must exist a value to animate from.
1337
+ o.und(t.reset) ? s && !t.default : !o.und(h) && Se(t.reset, r)
1338
+ ), P = y ? h : this.get(), k = Fe(p), L = o.num(k) || o.arr(k) || He(k), R = !f && (!L || Se(a.immediate || t.immediate, r));
1339
+ if (g) {
1340
+ const U = ct(p);
1341
+ if (U !== x.constructor)
1342
+ if (R)
1343
+ x = this._set(k);
1344
+ else
1345
+ throw Error(
1346
+ `Cannot animate between ${x.constructor.name} and ${U.name}, as the "to" prop suggests`
1347
+ );
1348
+ }
1349
+ const B = x.constructor;
1350
+ let I = j(p), $ = !1;
1351
+ if (!I) {
1352
+ const U = y || !nt(this) && d;
1353
+ (g || U) && ($ = X(Fe(P), k), I = !$), (!X(u.immediate, R) && !R || !X(v.decay, b) || !X(v.velocity, m)) && (I = !0);
1354
+ }
1355
+ if ($ && ee(this) && (u.changed && !y ? I = !0 : I || this._stop(l)), !f && ((I || j(l)) && (u.values = x.getPayload(), u.toValues = j(p) ? null : B == ze ? [1] : C(k)), u.immediate != R && (u.immediate = R, !R && !y && this._set(l)), I)) {
1356
+ const { onRest: U } = u;
1357
+ _(zi, (Z) => Zt(this, t, Z));
1358
+ const K = D(this, pe(this, l));
1359
+ ye(this._pendingCalls, K), this._pendingCalls.add(n), u.changed && S.batchedUpdates(() => {
1360
+ var Z;
1361
+ u.changed = !y, U == null || U(K, this), y ? O(a.onRest, K) : (Z = u.onStart) == null || Z.call(u, K, this);
1362
+ });
1363
+ }
1364
+ y && this._set(P), f ? n(Pn(t.to, t, this._state, this)) : I ? this._start() : ee(this) && !g ? this._pendingCalls.add(n) : n(An(P));
1365
+ }
1366
+ /** Update the `animation.to` value, which might be a `FluidValue` */
1367
+ _focus(e) {
1368
+ const t = this.animation;
1369
+ e !== t.to && (jt(this) && this._detach(), t.to = e, jt(this) && this._attach());
1370
+ }
1371
+ _attach() {
1372
+ let e = 0;
1373
+ const { to: t } = this.animation;
1374
+ j(t) && (fe(t, this), ht(t) && (e = t.priority + 1)), this.priority = e;
1375
+ }
1376
+ _detach() {
1377
+ const { to: e } = this.animation;
1378
+ j(e) && Re(e, this);
1379
+ }
1380
+ /**
1381
+ * Update the current value from outside the frameloop,
1382
+ * and return the `Animated` node.
1383
+ */
1384
+ _set(e, t = !0) {
1385
+ const n = E(e);
1386
+ if (!o.und(n)) {
1387
+ const i = G(this);
1388
+ if (!i || !X(n, i.getValue())) {
1389
+ const s = ct(n);
1390
+ !i || i.constructor != s ? Ft(this, s.create(n)) : i.setValue(n), i && S.batchedUpdates(() => {
1391
+ this._onChange(n, t);
1392
+ });
1393
+ }
1394
+ }
1395
+ return G(this);
1396
+ }
1397
+ _onStart() {
1398
+ const e = this.animation;
1399
+ e.changed || (e.changed = !0, ge(
1400
+ this,
1401
+ "onStart",
1402
+ D(this, pe(this, e.to)),
1403
+ this
1404
+ ));
1405
+ }
1406
+ _onChange(e, t) {
1407
+ t || (this._onStart(), O(this.animation.onChange, e, this)), O(this.defaultProps.onChange, e, this), super._onChange(e, t);
1408
+ }
1409
+ // This method resets the animation state (even if already animating) to
1410
+ // ensure the latest from/to range is used, and it also ensures this spring
1411
+ // is added to the frameloop.
1412
+ _start() {
1413
+ const e = this.animation;
1414
+ G(this).reset(E(e.to)), e.immediate || (e.fromValues = e.values.map((t) => t.lastPosition)), ee(this) || (Ht(this, !0), me(this) || this._resume());
1415
+ }
1416
+ _resume() {
1417
+ M.skipAnimation ? this.finish() : Le.start(this);
1418
+ }
1419
+ /**
1420
+ * Exit the frameloop and notify `onRest` listeners.
1421
+ *
1422
+ * Always wrap `_stop` calls with `batchedUpdates`.
1423
+ */
1424
+ _stop(e, t) {
1425
+ if (ee(this)) {
1426
+ Ht(this, !1);
1427
+ const n = this.animation;
1428
+ _(n.values, (s) => {
1429
+ s.done = !0;
1430
+ }), n.toValues && (n.onChange = n.onPause = n.onResume = void 0), ke(this, {
1431
+ type: "idle",
1432
+ parent: this
1433
+ });
1434
+ const i = t ? le(this.get()) : D(this.get(), pe(this, e ?? n.to));
1435
+ ye(this._pendingCalls, i), n.changed && (n.changed = !1, ge(this, "onRest", i, this));
1436
+ }
1437
+ }
1438
+ };
1439
+ function pe(e, t) {
1440
+ const n = Fe(t), i = Fe(e.get());
1441
+ return X(i, n);
1442
+ }
1443
+ function Rn(e, t = e.loop, n = e.to) {
1444
+ const i = O(t);
1445
+ if (i) {
1446
+ const s = i !== !0 && Tt(i), r = (s || e).reverse, a = !s || s.reset;
1447
+ return Ve({
1448
+ ...e,
1449
+ loop: t,
1450
+ // Avoid updating default props when looping.
1451
+ default: !1,
1452
+ // Never loop the `pause` prop.
1453
+ pause: void 0,
1454
+ // For the "reverse" prop to loop as expected, the "to" prop
1455
+ // must be undefined. The "reverse" prop is ignored when the
1456
+ // "to" prop is an array or function.
1457
+ to: !r || lt(n) ? n : void 0,
1458
+ // Ignore the "from" prop except on reset.
1459
+ from: a ? e.from : void 0,
1460
+ reset: a,
1461
+ // The "loop" prop can return a "useSpring" props object to
1462
+ // override any of the original props.
1463
+ ...s
1464
+ });
1465
+ }
1466
+ }
1467
+ function Ve(e) {
1468
+ const { to: t, from: n } = e = Tt(e), i = /* @__PURE__ */ new Set();
1469
+ return o.obj(t) && Kt(t, i), o.obj(n) && Kt(n, i), e.keys = i.size ? Array.from(i) : null, e;
1470
+ }
1471
+ function Ni(e) {
1472
+ const t = Ve(e);
1473
+ return o.und(t.default) && (t.default = Je(t)), t;
1474
+ }
1475
+ function Kt(e, t) {
1476
+ W(e, (n, i) => n != null && t.add(i));
1477
+ }
1478
+ var zi = [
1479
+ "onStart",
1480
+ "onRest",
1481
+ "onChange",
1482
+ "onPause",
1483
+ "onResume"
1484
+ ];
1485
+ function Zt(e, t, n) {
1486
+ e.animation[n] = t[n] !== bn(t, n) ? _n(t[n], e.key) : void 0;
1487
+ }
1488
+ function ge(e, t, ...n) {
1489
+ var i, s, r, a;
1490
+ (s = (i = e.animation)[t]) == null || s.call(i, ...n), (a = (r = e.defaultProps)[t]) == null || a.call(r, ...n);
1491
+ }
1492
+ var Di = ["onStart", "onChange", "onRest"], Qi = 1, In = class {
1493
+ constructor(e, t) {
1494
+ this.id = Qi++, this.springs = {}, this.queue = [], this._lastAsyncId = 0, this._active = /* @__PURE__ */ new Set(), this._changed = /* @__PURE__ */ new Set(), this._started = !1, this._state = {
1495
+ paused: !1,
1496
+ pauseQueue: /* @__PURE__ */ new Set(),
1497
+ resumeQueue: /* @__PURE__ */ new Set(),
1498
+ timeouts: /* @__PURE__ */ new Set()
1499
+ }, this._events = {
1500
+ onStart: /* @__PURE__ */ new Map(),
1501
+ onChange: /* @__PURE__ */ new Map(),
1502
+ onRest: /* @__PURE__ */ new Map()
1503
+ }, this._onFrame = this._onFrame.bind(this), t && (this._flush = t), e && this.start({ default: !0, ...e });
1504
+ }
1505
+ /**
1506
+ * Equals `true` when no spring values are in the frameloop, and
1507
+ * no async animation is currently active.
1508
+ */
1509
+ get idle() {
1510
+ return !this._state.asyncTo && Object.values(this.springs).every((e) => e.idle && !e.isDelayed && !e.isPaused);
1511
+ }
1512
+ get item() {
1513
+ return this._item;
1514
+ }
1515
+ set item(e) {
1516
+ this._item = e;
1517
+ }
1518
+ /** Get the current values of our springs */
1519
+ get() {
1520
+ const e = {};
1521
+ return this.each((t, n) => e[n] = t.get()), e;
1522
+ }
1523
+ /** Set the current values without animating. */
1524
+ set(e) {
1525
+ for (const t in e) {
1526
+ const n = e[t];
1527
+ o.und(n) || this.springs[t].set(n);
1528
+ }
1529
+ }
1530
+ /** Push an update onto the queue of each value. */
1531
+ update(e) {
1532
+ return e && this.queue.push(Ve(e)), this;
1533
+ }
1534
+ /**
1535
+ * Start the queued animations for every spring, and resolve the returned
1536
+ * promise once all queued animations have finished or been cancelled.
1537
+ *
1538
+ * When you pass a queue (instead of nothing), that queue is used instead of
1539
+ * the queued animations added with the `update` method, which are left alone.
1540
+ */
1541
+ start(e) {
1542
+ let { queue: t } = this;
1543
+ return e ? t = C(e).map(Ve) : this.queue = [], this._flush ? this._flush(this, t) : (En(this, t), gt(this, t));
1544
+ }
1545
+ /** @internal */
1546
+ stop(e, t) {
1547
+ if (e !== !!e && (t = e), t) {
1548
+ const n = this.springs;
1549
+ _(C(t), (i) => n[i].stop(!!e));
1550
+ } else
1551
+ Te(this._state, this._lastAsyncId), this.each((n) => n.stop(!!e));
1552
+ return this;
1553
+ }
1554
+ /** Freeze the active animation in time */
1555
+ pause(e) {
1556
+ if (o.und(e))
1557
+ this.start({ pause: !0 });
1558
+ else {
1559
+ const t = this.springs;
1560
+ _(C(e), (n) => t[n].pause());
1561
+ }
1562
+ return this;
1563
+ }
1564
+ /** Resume the animation if paused. */
1565
+ resume(e) {
1566
+ if (o.und(e))
1567
+ this.start({ pause: !1 });
1568
+ else {
1569
+ const t = this.springs;
1570
+ _(C(e), (n) => t[n].resume());
1571
+ }
1572
+ return this;
1573
+ }
1574
+ /** Call a function once per spring value */
1575
+ each(e) {
1576
+ W(this.springs, e);
1577
+ }
1578
+ /** @internal Called at the end of every animation frame */
1579
+ _onFrame() {
1580
+ const { onStart: e, onChange: t, onRest: n } = this._events, i = this._active.size > 0, s = this._changed.size > 0;
1581
+ (i && !this._started || s && !this._started) && (this._started = !0, be(e, ([u, l]) => {
1582
+ l.value = this.get(), u(l, this, this._item);
1583
+ }));
1584
+ const r = !i && this._started, a = s || r && n.size ? this.get() : null;
1585
+ s && t.size && be(t, ([u, l]) => {
1586
+ l.value = a, u(l, this, this._item);
1587
+ }), r && (this._started = !1, be(n, ([u, l]) => {
1588
+ l.value = a, u(l, this, this._item);
1589
+ }));
1590
+ }
1591
+ /** @internal */
1592
+ eventObserved(e) {
1593
+ if (e.type == "change")
1594
+ this._changed.add(e.parent), e.idle || this._active.add(e.parent);
1595
+ else if (e.type == "idle")
1596
+ this._active.delete(e.parent);
1597
+ else return;
1598
+ S.onFrame(this._onFrame);
1599
+ }
1600
+ };
1601
+ function gt(e, t) {
1602
+ return Promise.all(t.map((n) => Fn(e, n))).then(
1603
+ (n) => Vt(e, n)
1604
+ );
1605
+ }
1606
+ async function Fn(e, t, n) {
1607
+ const { keys: i, to: s, from: r, loop: a, onRest: u, onResolve: l } = t, c = o.obj(t.default) && t.default;
1608
+ a && (t.loop = !1), s === !1 && (t.to = null), r === !1 && (t.from = null);
1609
+ const p = o.arr(s) || o.fun(s) ? s : void 0;
1610
+ p ? (t.to = void 0, t.onRest = void 0, c && (c.onRest = void 0)) : _(Di, (v) => {
1611
+ const b = t[v];
1612
+ if (o.fun(b)) {
1613
+ const m = e._events[v];
1614
+ t[v] = ({ finished: x, cancelled: y }) => {
1615
+ const P = m.get(b);
1616
+ P ? (x || (P.finished = !1), y && (P.cancelled = !0)) : m.set(b, {
1617
+ value: null,
1618
+ finished: x || !1,
1619
+ cancelled: y || !1
1620
+ });
1621
+ }, c && (c[v] = t[v]);
1622
+ }
1623
+ });
1624
+ const h = e._state;
1625
+ t.pause === !h.paused ? (h.paused = t.pause, ye(t.pause ? h.pauseQueue : h.resumeQueue)) : h.paused && (t.pause = !0);
1626
+ const d = (i || Object.keys(e.springs)).map(
1627
+ (v) => e.springs[v].start(t)
1628
+ ), g = t.cancel === !0 || bn(t, "cancel") === !0;
1629
+ (p || g && h.asyncId) && d.push(
1630
+ xn(++e._lastAsyncId, {
1631
+ props: t,
1632
+ state: h,
1633
+ actions: {
1634
+ pause: at,
1635
+ resume: at,
1636
+ start(v, b) {
1637
+ g ? (Te(h, e._lastAsyncId), b(le(e))) : (v.onRest = u, b(
1638
+ Pn(
1639
+ p,
1640
+ v,
1641
+ h,
1642
+ e
1643
+ )
1644
+ ));
1645
+ }
1646
+ }
1647
+ })
1648
+ ), h.paused && await new Promise((v) => {
1649
+ h.resumeQueue.add(v);
1650
+ });
1651
+ const f = Vt(e, await Promise.all(d));
1652
+ if (a && f.finished && !(n && f.noop)) {
1653
+ const v = Rn(t, a, s);
1654
+ if (v)
1655
+ return En(e, [v]), Fn(e, v, !0);
1656
+ }
1657
+ return l && S.batchedUpdates(() => l(f, e, e.item)), f;
1658
+ }
1659
+ function vt(e, t) {
1660
+ const n = { ...e.springs };
1661
+ return t && _(C(t), (i) => {
1662
+ o.und(i.keys) && (i = Ve(i)), o.obj(i.to) || (i = { ...i, to: void 0 }), Cn(n, i, (s) => Vn(s));
1663
+ }), Tn(e, n), n;
1664
+ }
1665
+ function Tn(e, t) {
1666
+ W(t, (n, i) => {
1667
+ e.springs[i] || (e.springs[i] = n, fe(n, e));
1668
+ });
1669
+ }
1670
+ function Vn(e, t) {
1671
+ const n = new ji();
1672
+ return n.key = e, t && fe(n, t), n;
1673
+ }
1674
+ function Cn(e, t, n) {
1675
+ t.keys && _(t.keys, (i) => {
1676
+ (e[i] || (e[i] = n(i)))._prepareNode(t);
1677
+ });
1678
+ }
1679
+ function En(e, t) {
1680
+ _(t, (n) => {
1681
+ Cn(e.springs, n, (i) => Vn(i, e));
1682
+ });
1683
+ }
1684
+ var On = _e.createContext({
1685
+ pause: !1,
1686
+ immediate: !1
1687
+ }), Un = () => {
1688
+ const e = [], t = function(i) {
1689
+ _i();
1690
+ const s = [];
1691
+ return _(e, (r, a) => {
1692
+ if (o.und(i))
1693
+ s.push(r.start());
1694
+ else {
1695
+ const u = n(i, r, a);
1696
+ u && s.push(r.start(u));
1697
+ }
1698
+ }), s;
1699
+ };
1700
+ t.current = e, t.add = function(i) {
1701
+ e.includes(i) || e.push(i);
1702
+ }, t.delete = function(i) {
1703
+ const s = e.indexOf(i);
1704
+ ~s && e.splice(s, 1);
1705
+ }, t.pause = function() {
1706
+ return _(e, (i) => i.pause(...arguments)), this;
1707
+ }, t.resume = function() {
1708
+ return _(e, (i) => i.resume(...arguments)), this;
1709
+ }, t.set = function(i) {
1710
+ _(e, (s, r) => {
1711
+ const a = o.fun(i) ? i(r, s) : i;
1712
+ a && s.set(a);
1713
+ });
1714
+ }, t.start = function(i) {
1715
+ const s = [];
1716
+ return _(e, (r, a) => {
1717
+ if (o.und(i))
1718
+ s.push(r.start());
1719
+ else {
1720
+ const u = this._getProps(i, r, a);
1721
+ u && s.push(r.start(u));
1722
+ }
1723
+ }), s;
1724
+ }, t.stop = function() {
1725
+ return _(e, (i) => i.stop(...arguments)), this;
1726
+ }, t.update = function(i) {
1727
+ return _(e, (s, r) => s.update(this._getProps(i, s, r))), this;
1728
+ };
1729
+ const n = function(i, s, r) {
1730
+ return o.fun(i) ? i(r, s) : i;
1731
+ };
1732
+ return t._getProps = n, t;
1733
+ };
1734
+ function Mi(e, t, n) {
1735
+ const i = o.fun(t) && t;
1736
+ i && !n && (n = []);
1737
+ const s = ve(
1738
+ () => i || arguments.length == 3 ? Un() : void 0,
1739
+ []
1740
+ ), r = H(0), a = Rt(), u = ve(
1741
+ () => ({
1742
+ ctrls: [],
1743
+ queue: [],
1744
+ flush(m, x) {
1745
+ const y = vt(m, x);
1746
+ return r.current > 0 && !u.queue.length && !Object.keys(y).some((k) => !m.springs[k]) ? gt(m, x) : new Promise((k) => {
1747
+ Tn(m, y), u.queue.push(() => {
1748
+ k(gt(m, x));
1749
+ }), a();
1750
+ });
1751
+ }
1752
+ }),
1753
+ []
1754
+ ), l = H([...u.ctrls]), c = H([]), p = ut(e) || 0;
1755
+ ve(() => {
1756
+ _(l.current.slice(e, p), (m) => {
1757
+ dt(m, s), m.stop(!0);
1758
+ }), l.current.length = e, h(p, e);
1759
+ }, [e]), ve(() => {
1760
+ h(0, Math.min(p, e));
1761
+ }, n);
1762
+ function h(m, x) {
1763
+ for (let y = m; y < x; y++) {
1764
+ const P = l.current[y] || (l.current[y] = new In(null, u.flush)), k = i ? i(y, P) : t[y];
1765
+ k && (c.current[y] = Ni(k));
1766
+ }
1767
+ }
1768
+ const d = l.current.map(
1769
+ (m, x) => vt(m, c.current[x])
1770
+ ), g = Yt(On), f = ut(g), v = g !== f && wn(g);
1771
+ ae(() => {
1772
+ r.current++, u.ctrls = l.current;
1773
+ const { queue: m } = u;
1774
+ m.length && (u.queue = [], _(m, (x) => x())), _(l.current, (x, y) => {
1775
+ s == null || s.add(x), v && x.start({ default: g });
1776
+ const P = c.current[y];
1777
+ P && (Sn(x, P.ref), x.ref ? x.queue.push(P) : x.start(P));
1778
+ });
1779
+ }), It(() => () => {
1780
+ _(u.ctrls, (m) => m.stop(!0));
1781
+ });
1782
+ const b = d.map((m) => ({ ...m }));
1783
+ return s ? [b, s] : b;
1784
+ }
1785
+ function os(e, t) {
1786
+ const n = o.fun(e), [[i], s] = Mi(
1787
+ 1,
1788
+ n ? e : [e],
1789
+ n ? [] : t
1790
+ );
1791
+ return n || arguments.length == 2 ? [i, s] : i;
1792
+ }
1793
+ function us(e, t, n) {
1794
+ const i = o.fun(t) && t, {
1795
+ reset: s,
1796
+ sort: r,
1797
+ trail: a = 0,
1798
+ expires: u = !0,
1799
+ exitBeforeEnter: l = !1,
1800
+ onDestroyed: c,
1801
+ ref: p,
1802
+ config: h
1803
+ } = i ? i() : t, d = ve(
1804
+ () => i || arguments.length == 3 ? Un() : void 0,
1805
+ []
1806
+ ), g = C(e), f = [], v = H(null), b = s ? null : v.current;
1807
+ ae(() => {
1808
+ v.current = f;
1809
+ }), It(() => (_(f, (w) => {
1810
+ d == null || d.add(w.ctrl), w.ctrl.ref = d;
1811
+ }), () => {
1812
+ _(v.current, (w) => {
1813
+ w.expired && clearTimeout(w.expirationId), dt(w.ctrl, d), w.ctrl.stop(!0);
1814
+ });
1815
+ }));
1816
+ const m = Bi(g, i ? i() : t, b), x = s && v.current || [];
1817
+ ae(
1818
+ () => _(x, ({ ctrl: w, item: A, key: T }) => {
1819
+ dt(w, d), O(c, A, T);
1820
+ })
1821
+ );
1822
+ const y = [];
1823
+ if (b && _(b, (w, A) => {
1824
+ w.expired ? (clearTimeout(w.expirationId), x.push(w)) : (A = y[A] = m.indexOf(w.key), ~A && (f[A] = w));
1825
+ }), _(g, (w, A) => {
1826
+ f[A] || (f[A] = {
1827
+ key: m[A],
1828
+ item: w,
1829
+ phase: "mount",
1830
+ ctrl: new In()
1831
+ }, f[A].ctrl.item = w);
1832
+ }), y.length) {
1833
+ let w = -1;
1834
+ const { leave: A } = i ? i() : t;
1835
+ _(y, (T, V) => {
1836
+ const F = b[V];
1837
+ ~T ? (w = f.indexOf(F), f[w] = { ...F, item: g[T] }) : A && f.splice(++w, 0, F);
1838
+ });
1839
+ }
1840
+ o.fun(r) && f.sort((w, A) => r(w.item, A.item));
1841
+ let P = -a;
1842
+ const k = Rt(), L = Je(t), R = /* @__PURE__ */ new Map(), B = H(/* @__PURE__ */ new Map()), I = H(!1);
1843
+ _(f, (w, A) => {
1844
+ const T = w.key, V = w.phase, F = i ? i() : t;
1845
+ let q, J;
1846
+ const $n = O(F.delay || 0, T);
1847
+ if (V == "mount")
1848
+ q = F.enter, J = "enter";
1849
+ else {
1850
+ const z = m.indexOf(T) < 0;
1851
+ if (V != "leave")
1852
+ if (z)
1853
+ q = F.leave, J = "leave";
1854
+ else if (q = F.update)
1855
+ J = "update";
1856
+ else return;
1857
+ else if (!z)
1858
+ q = F.enter, J = "enter";
1859
+ else return;
1860
+ }
1861
+ if (q = O(q, w.item, A), q = o.obj(q) ? Tt(q) : { to: q }, !q.config) {
1862
+ const z = h || L.config;
1863
+ q.config = O(z, w.item, A, J);
1864
+ }
1865
+ P += a;
1866
+ const se = {
1867
+ ...L,
1868
+ // we need to add our props.delay value you here.
1869
+ delay: $n + P,
1870
+ ref: p,
1871
+ immediate: F.immediate,
1872
+ // This prevents implied resets.
1873
+ reset: !1,
1874
+ // Merge any phase-specific props.
1875
+ ...q
1876
+ };
1877
+ if (J == "enter" && o.und(se.from)) {
1878
+ const z = i ? i() : t, he = o.und(z.initial) || b ? z.from : z.initial;
1879
+ se.from = O(he, w.item, A);
1880
+ }
1881
+ const { onResolve: jn } = se;
1882
+ se.onResolve = (z) => {
1883
+ O(jn, z);
1884
+ const he = v.current, Y = he.find((Oe) => Oe.key === T);
1885
+ if (Y && !(z.cancelled && Y.phase != "update") && Y.ctrl.idle) {
1886
+ const Oe = he.every((re) => re.ctrl.idle);
1887
+ if (Y.phase == "leave") {
1888
+ const re = O(u, Y.item);
1889
+ if (re !== !1) {
1890
+ const Xe = re === !0 ? 0 : re;
1891
+ if (Y.expired = !0, !Oe && Xe > 0) {
1892
+ Xe <= 2147483647 && (Y.expirationId = setTimeout(k, Xe));
1893
+ return;
1894
+ }
1895
+ }
1896
+ }
1897
+ Oe && he.some((re) => re.expired) && (B.current.delete(Y), l && (I.current = !0), k());
1898
+ }
1899
+ };
1900
+ const Et = vt(w.ctrl, se);
1901
+ J === "leave" && l ? B.current.set(w, { phase: J, springs: Et, payload: se }) : R.set(w, { phase: J, springs: Et, payload: se });
1902
+ });
1903
+ const $ = Yt(On), U = ut($), K = $ !== U && wn($);
1904
+ ae(() => {
1905
+ K && _(f, (w) => {
1906
+ w.ctrl.start({ default: $ });
1907
+ });
1908
+ }, [$]), _(R, (w, A) => {
1909
+ if (B.current.size) {
1910
+ const T = f.findIndex((V) => V.key === A.key);
1911
+ f.splice(T, 1);
1912
+ }
1913
+ }), ae(
1914
+ () => {
1915
+ _(
1916
+ B.current.size ? B.current : R,
1917
+ ({ phase: w, payload: A }, T) => {
1918
+ const { ctrl: V } = T;
1919
+ T.phase = w, d == null || d.add(V), K && w == "enter" && V.start({ default: $ }), A && (Sn(V, A.ref), (V.ref || d) && !I.current ? V.update(A) : (V.start(A), I.current && (I.current = !1)));
1920
+ }
1921
+ );
1922
+ },
1923
+ s ? void 0 : n
1924
+ );
1925
+ const Z = (w) => /* @__PURE__ */ _e.createElement(_e.Fragment, null, f.map((A, T) => {
1926
+ const { springs: V } = R.get(A) || A.ctrl, F = w({ ...V }, A.item, A, T);
1927
+ return F && F.type ? /* @__PURE__ */ _e.createElement(
1928
+ F.type,
1929
+ {
1930
+ ...F.props,
1931
+ key: o.str(A.key) || o.num(A.key) ? A.key : A.ctrl.id,
1932
+ ref: F.ref
1933
+ }
1934
+ ) : F;
1935
+ }));
1936
+ return d ? [Z, d] : Z;
1937
+ }
1938
+ var Li = 1;
1939
+ function Bi(e, { key: t, keys: n = t }, i) {
1940
+ if (n === null) {
1941
+ const s = /* @__PURE__ */ new Set();
1942
+ return e.map((r) => {
1943
+ const a = i && i.find(
1944
+ (u) => u.item === r && u.phase !== "leave" && !s.has(u)
1945
+ );
1946
+ return a ? (s.add(a), a.key) : Li++;
1947
+ });
1948
+ }
1949
+ return o.und(n) ? e : o.fun(n) ? e.map(n) : C(n);
1950
+ }
1951
+ var Gi = class extends Ct {
1952
+ constructor(e, t) {
1953
+ super(), this.source = e, this.idle = !0, this._active = /* @__PURE__ */ new Set(), this.calc = Ae(...t);
1954
+ const n = this._get(), i = ct(n);
1955
+ Ft(this, i.create(n));
1956
+ }
1957
+ advance(e) {
1958
+ const t = this._get(), n = this.get();
1959
+ X(t, n) || (G(this).setValue(t), this._onChange(t, this.idle)), !this.idle && Jt(this._active) && it(this);
1960
+ }
1961
+ _get() {
1962
+ const e = o.arr(this.source) ? this.source.map(E) : C(E(this.source));
1963
+ return this.calc(...e);
1964
+ }
1965
+ _start() {
1966
+ this.idle && !Jt(this._active) && (this.idle = !1, _(We(this), (e) => {
1967
+ e.done = !1;
1968
+ }), M.skipAnimation ? (S.batchedUpdates(() => this.advance()), it(this)) : Le.start(this));
1969
+ }
1970
+ // Observe our sources only when we're observed.
1971
+ _attach() {
1972
+ let e = 1;
1973
+ _(C(this.source), (t) => {
1974
+ j(t) && fe(t, this), ht(t) && (t.idle || this._active.add(t), e = Math.max(e, t.priority + 1));
1975
+ }), this.priority = e, this._start();
1976
+ }
1977
+ // Stop observing our sources once we have no observers.
1978
+ _detach() {
1979
+ _(C(this.source), (e) => {
1980
+ j(e) && Re(e, this);
1981
+ }), this._active.clear(), it(this);
1982
+ }
1983
+ /** @internal */
1984
+ eventObserved(e) {
1985
+ 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 = C(this.source).reduce(
1986
+ (t, n) => Math.max(t, (ht(n) ? n.priority : 0) + 1),
1987
+ 0
1988
+ ));
1989
+ }
1990
+ };
1991
+ function Hi(e) {
1992
+ return e.idle !== !1;
1993
+ }
1994
+ function Jt(e) {
1995
+ return !e.size || Array.from(e).every(Hi);
1996
+ }
1997
+ function it(e) {
1998
+ e.idle || (e.idle = !0, _(We(e), (t) => {
1999
+ t.done = !0;
2000
+ }), ke(e, {
2001
+ type: "idle",
2002
+ parent: e
2003
+ }));
2004
+ }
2005
+ M.assign({
2006
+ createStringInterpolator: hn,
2007
+ to: (e, t) => new Gi(e, t)
2008
+ });
2009
+ var qn = /^--/;
2010
+ function Wi(e, t) {
2011
+ return t == null || typeof t == "boolean" || t === "" ? "" : typeof t == "number" && t !== 0 && !qn.test(e) && !(xe.hasOwnProperty(e) && xe[e]) ? t + "px" : ("" + t).trim();
2012
+ }
2013
+ var Xt = {};
2014
+ function Ki(e, t) {
2015
+ if (!e.nodeType || !e.setAttribute)
2016
+ return !1;
2017
+ const n = e.nodeName === "filter" || e.parentNode && e.parentNode.nodeName === "filter", {
2018
+ className: i,
2019
+ style: s,
2020
+ children: r,
2021
+ scrollTop: a,
2022
+ scrollLeft: u,
2023
+ viewBox: l,
2024
+ ...c
2025
+ } = t, p = Object.values(c), h = Object.keys(c).map(
2026
+ (d) => n || e.hasAttribute(d) ? d : Xt[d] || (Xt[d] = d.replace(
2027
+ /([A-Z])/g,
2028
+ // Attributes are written in dash case
2029
+ (g) => "-" + g.toLowerCase()
2030
+ ))
2031
+ );
2032
+ r !== void 0 && (e.textContent = r);
2033
+ for (const d in s)
2034
+ if (s.hasOwnProperty(d)) {
2035
+ const g = Wi(d, s[d]);
2036
+ qn.test(d) ? e.style.setProperty(d, g) : e.style[d] = g;
2037
+ }
2038
+ h.forEach((d, g) => {
2039
+ e.setAttribute(d, p[g]);
2040
+ }), i !== void 0 && (e.className = i), a !== void 0 && (e.scrollTop = a), u !== void 0 && (e.scrollLeft = u), l !== void 0 && e.setAttribute("viewBox", l);
2041
+ }
2042
+ var xe = {
2043
+ animationIterationCount: !0,
2044
+ borderImageOutset: !0,
2045
+ borderImageSlice: !0,
2046
+ borderImageWidth: !0,
2047
+ boxFlex: !0,
2048
+ boxFlexGroup: !0,
2049
+ boxOrdinalGroup: !0,
2050
+ columnCount: !0,
2051
+ columns: !0,
2052
+ flex: !0,
2053
+ flexGrow: !0,
2054
+ flexPositive: !0,
2055
+ flexShrink: !0,
2056
+ flexNegative: !0,
2057
+ flexOrder: !0,
2058
+ gridRow: !0,
2059
+ gridRowEnd: !0,
2060
+ gridRowSpan: !0,
2061
+ gridRowStart: !0,
2062
+ gridColumn: !0,
2063
+ gridColumnEnd: !0,
2064
+ gridColumnSpan: !0,
2065
+ gridColumnStart: !0,
2066
+ fontWeight: !0,
2067
+ lineClamp: !0,
2068
+ lineHeight: !0,
2069
+ opacity: !0,
2070
+ order: !0,
2071
+ orphans: !0,
2072
+ tabSize: !0,
2073
+ widows: !0,
2074
+ zIndex: !0,
2075
+ zoom: !0,
2076
+ // SVG-related properties
2077
+ fillOpacity: !0,
2078
+ floodOpacity: !0,
2079
+ stopOpacity: !0,
2080
+ strokeDasharray: !0,
2081
+ strokeDashoffset: !0,
2082
+ strokeMiterlimit: !0,
2083
+ strokeOpacity: !0,
2084
+ strokeWidth: !0
2085
+ }, Zi = (e, t) => e + t.charAt(0).toUpperCase() + t.substring(1), Ji = ["Webkit", "Ms", "Moz", "O"];
2086
+ xe = Object.keys(xe).reduce((e, t) => (Ji.forEach((n) => e[Zi(n, t)] = e[t]), e), xe);
2087
+ var Xi = /^(matrix|translate|scale|rotate|skew)/, Yi = /^(translate)/, es = /^(rotate|skew)/, st = (e, t) => o.num(e) && e !== 0 ? e + t : e, $e = (e, t) => o.arr(e) ? e.every((n) => $e(n, t)) : o.num(e) ? e === t : parseFloat(e) === t, ts = class extends Ze {
2088
+ constructor({ x: e, y: t, z: n, ...i }) {
2089
+ const s = [], r = [];
2090
+ (e || t || n) && (s.push([e || 0, t || 0, n || 0]), r.push((a) => [
2091
+ `translate3d(${a.map((u) => st(u, "px")).join(",")})`,
2092
+ // prettier-ignore
2093
+ $e(a, 0)
2094
+ ])), W(i, (a, u) => {
2095
+ if (u === "transform")
2096
+ s.push([a || ""]), r.push((l) => [l, l === ""]);
2097
+ else if (Xi.test(u)) {
2098
+ if (delete i[u], o.und(a)) return;
2099
+ const l = Yi.test(u) ? "px" : es.test(u) ? "deg" : "";
2100
+ s.push(C(a)), r.push(
2101
+ u === "rotate3d" ? ([c, p, h, d]) => [
2102
+ `rotate3d(${c},${p},${h},${st(d, l)})`,
2103
+ $e(d, 0)
2104
+ ] : (c) => [
2105
+ `${u}(${c.map((p) => st(p, l)).join(",")})`,
2106
+ $e(c, u.startsWith("scale") ? 1 : 0)
2107
+ ]
2108
+ );
2109
+ }
2110
+ }), s.length && (i.transform = new ns(s, r)), super(i);
2111
+ }
2112
+ }, ns = class extends ln {
2113
+ constructor(e, t) {
2114
+ super(), this.inputs = e, this.transforms = t, this._value = null;
2115
+ }
2116
+ get() {
2117
+ return this._value || (this._value = this._get());
2118
+ }
2119
+ _get() {
2120
+ let e = "", t = !0;
2121
+ return _(this.inputs, (n, i) => {
2122
+ const s = E(n[0]), [r, a] = this.transforms[i](
2123
+ o.arr(s) ? s : n.map(E)
2124
+ );
2125
+ e += " " + r, t = t && a;
2126
+ }), t ? "none" : e;
2127
+ }
2128
+ // Start observing our inputs once we have an observer.
2129
+ observerAdded(e) {
2130
+ e == 1 && _(
2131
+ this.inputs,
2132
+ (t) => _(
2133
+ t,
2134
+ (n) => j(n) && fe(n, this)
2135
+ )
2136
+ );
2137
+ }
2138
+ // Stop observing our inputs once we have no observers.
2139
+ observerRemoved(e) {
2140
+ e == 0 && _(
2141
+ this.inputs,
2142
+ (t) => _(
2143
+ t,
2144
+ (n) => j(n) && Re(n, this)
2145
+ )
2146
+ );
2147
+ }
2148
+ eventObserved(e) {
2149
+ e.type == "change" && (this._value = null), ke(this, e);
2150
+ }
2151
+ }, is = [
2152
+ "a",
2153
+ "abbr",
2154
+ "address",
2155
+ "area",
2156
+ "article",
2157
+ "aside",
2158
+ "audio",
2159
+ "b",
2160
+ "base",
2161
+ "bdi",
2162
+ "bdo",
2163
+ "big",
2164
+ "blockquote",
2165
+ "body",
2166
+ "br",
2167
+ "button",
2168
+ "canvas",
2169
+ "caption",
2170
+ "cite",
2171
+ "code",
2172
+ "col",
2173
+ "colgroup",
2174
+ "data",
2175
+ "datalist",
2176
+ "dd",
2177
+ "del",
2178
+ "details",
2179
+ "dfn",
2180
+ "dialog",
2181
+ "div",
2182
+ "dl",
2183
+ "dt",
2184
+ "em",
2185
+ "embed",
2186
+ "fieldset",
2187
+ "figcaption",
2188
+ "figure",
2189
+ "footer",
2190
+ "form",
2191
+ "h1",
2192
+ "h2",
2193
+ "h3",
2194
+ "h4",
2195
+ "h5",
2196
+ "h6",
2197
+ "head",
2198
+ "header",
2199
+ "hgroup",
2200
+ "hr",
2201
+ "html",
2202
+ "i",
2203
+ "iframe",
2204
+ "img",
2205
+ "input",
2206
+ "ins",
2207
+ "kbd",
2208
+ "keygen",
2209
+ "label",
2210
+ "legend",
2211
+ "li",
2212
+ "link",
2213
+ "main",
2214
+ "map",
2215
+ "mark",
2216
+ "menu",
2217
+ "menuitem",
2218
+ "meta",
2219
+ "meter",
2220
+ "nav",
2221
+ "noscript",
2222
+ "object",
2223
+ "ol",
2224
+ "optgroup",
2225
+ "option",
2226
+ "output",
2227
+ "p",
2228
+ "param",
2229
+ "picture",
2230
+ "pre",
2231
+ "progress",
2232
+ "q",
2233
+ "rp",
2234
+ "rt",
2235
+ "ruby",
2236
+ "s",
2237
+ "samp",
2238
+ "script",
2239
+ "section",
2240
+ "select",
2241
+ "small",
2242
+ "source",
2243
+ "span",
2244
+ "strong",
2245
+ "style",
2246
+ "sub",
2247
+ "summary",
2248
+ "sup",
2249
+ "table",
2250
+ "tbody",
2251
+ "td",
2252
+ "textarea",
2253
+ "tfoot",
2254
+ "th",
2255
+ "thead",
2256
+ "time",
2257
+ "title",
2258
+ "tr",
2259
+ "track",
2260
+ "u",
2261
+ "ul",
2262
+ "var",
2263
+ "video",
2264
+ "wbr",
2265
+ // SVG
2266
+ "circle",
2267
+ "clipPath",
2268
+ "defs",
2269
+ "ellipse",
2270
+ "foreignObject",
2271
+ "g",
2272
+ "image",
2273
+ "line",
2274
+ "linearGradient",
2275
+ "mask",
2276
+ "path",
2277
+ "pattern",
2278
+ "polygon",
2279
+ "polyline",
2280
+ "radialGradient",
2281
+ "rect",
2282
+ "stop",
2283
+ "svg",
2284
+ "text",
2285
+ "tspan"
2286
+ ];
2287
+ M.assign({
2288
+ batchedUpdates: Mn,
2289
+ createStringInterpolator: hn,
2290
+ colors: Jn
2291
+ });
2292
+ var ss = Ii(is, {
2293
+ applyAnimatedValues: Ki,
2294
+ createAnimatedStyle: (e) => new ts(e),
2295
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2296
+ getComponentProps: ({ scrollTop: e, scrollLeft: t, ...n }) => n
2297
+ }), cs = ss.animated;
2298
+ export {
2299
+ cs as a,
2300
+ Mi as b,
2301
+ Ei as c,
2302
+ us as d,
2303
+ os as u
2304
+ };