unframer 2.25.5 → 2.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/babel-jsx.d.ts +15 -0
  2. package/dist/babel-jsx.d.ts.map +1 -0
  3. package/dist/babel-jsx.js +223 -0
  4. package/dist/babel-jsx.js.map +1 -0
  5. package/dist/babel-plugin-imports.d.ts +0 -6
  6. package/dist/babel-plugin-imports.d.ts.map +1 -1
  7. package/dist/babel-plugin-imports.js +2 -135
  8. package/dist/babel-plugin-imports.js.map +1 -1
  9. package/dist/cli.d.ts +1 -0
  10. package/dist/cli.d.ts.map +1 -1
  11. package/dist/cli.js +31 -6
  12. package/dist/cli.js.map +1 -1
  13. package/dist/css.js +13 -13
  14. package/dist/esbuild.d.ts.map +1 -1
  15. package/dist/esbuild.js +5 -5
  16. package/dist/esbuild.js.map +1 -1
  17. package/dist/example-code.test.js +39 -39
  18. package/dist/example-code.test.js.map +1 -1
  19. package/dist/exporter.d.ts.map +1 -1
  20. package/dist/exporter.js +137 -87
  21. package/dist/exporter.js.map +1 -1
  22. package/dist/flat-cache-interceptor.d.ts +27 -0
  23. package/dist/flat-cache-interceptor.d.ts.map +1 -0
  24. package/dist/flat-cache-interceptor.js +99 -0
  25. package/dist/flat-cache-interceptor.js.map +1 -0
  26. package/dist/framer.d.ts.map +1 -1
  27. package/dist/framer.js +837 -684
  28. package/dist/framer.js.map +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/react.d.ts.map +1 -1
  32. package/dist/react.js +15 -3
  33. package/dist/react.js.map +1 -1
  34. package/dist/sentry.d.ts.map +1 -1
  35. package/dist/sentry.js +1 -16
  36. package/dist/sentry.js.map +1 -1
  37. package/dist/undici-dispatcher.d.ts +2 -0
  38. package/dist/undici-dispatcher.d.ts.map +1 -0
  39. package/dist/undici-dispatcher.js +13 -0
  40. package/dist/undici-dispatcher.js.map +1 -0
  41. package/dist/utils.d.ts +3 -3
  42. package/dist/utils.d.ts.map +1 -1
  43. package/dist/utils.js +4 -10
  44. package/dist/utils.js.map +1 -1
  45. package/dist/utils.test.d.ts +2 -0
  46. package/dist/utils.test.d.ts.map +1 -0
  47. package/dist/utils.test.js +143 -0
  48. package/dist/utils.test.js.map +1 -0
  49. package/dist/version.d.ts +1 -1
  50. package/dist/version.js +1 -1
  51. package/esm/babel-jsx.d.ts +15 -0
  52. package/esm/babel-jsx.d.ts.map +1 -0
  53. package/esm/babel-jsx.js +219 -0
  54. package/esm/babel-jsx.js.map +1 -0
  55. package/esm/babel-plugin-imports.d.ts +0 -6
  56. package/esm/babel-plugin-imports.d.ts.map +1 -1
  57. package/esm/babel-plugin-imports.js +2 -134
  58. package/esm/babel-plugin-imports.js.map +1 -1
  59. package/esm/cli.d.ts +1 -0
  60. package/esm/cli.d.ts.map +1 -1
  61. package/esm/cli.js +31 -6
  62. package/esm/cli.js.map +1 -1
  63. package/esm/css.js +13 -13
  64. package/esm/esbuild.d.ts.map +1 -1
  65. package/esm/esbuild.js +4 -4
  66. package/esm/esbuild.js.map +1 -1
  67. package/esm/example-code.test.js +40 -40
  68. package/esm/example-code.test.js.map +1 -1
  69. package/esm/exporter.d.ts.map +1 -1
  70. package/esm/exporter.js +100 -50
  71. package/esm/exporter.js.map +1 -1
  72. package/esm/flat-cache-interceptor.d.ts +27 -0
  73. package/esm/flat-cache-interceptor.d.ts.map +1 -0
  74. package/esm/flat-cache-interceptor.js +95 -0
  75. package/esm/flat-cache-interceptor.js.map +1 -0
  76. package/esm/framer.d.ts.map +1 -1
  77. package/esm/framer.js +813 -672
  78. package/esm/framer.js.map +1 -1
  79. package/esm/index.d.ts +1 -1
  80. package/esm/index.d.ts.map +1 -1
  81. package/esm/react.d.ts.map +1 -1
  82. package/esm/react.js +15 -3
  83. package/esm/react.js.map +1 -1
  84. package/esm/sentry.d.ts.map +1 -1
  85. package/esm/sentry.js +1 -16
  86. package/esm/sentry.js.map +1 -1
  87. package/esm/undici-dispatcher.d.ts +2 -0
  88. package/esm/undici-dispatcher.d.ts.map +1 -0
  89. package/esm/undici-dispatcher.js +10 -0
  90. package/esm/undici-dispatcher.js.map +1 -0
  91. package/esm/utils.d.ts +3 -3
  92. package/esm/utils.d.ts.map +1 -1
  93. package/esm/utils.js +3 -9
  94. package/esm/utils.js.map +1 -1
  95. package/esm/utils.test.d.ts +2 -0
  96. package/esm/utils.test.d.ts.map +1 -0
  97. package/esm/utils.test.js +141 -0
  98. package/esm/utils.test.js.map +1 -0
  99. package/esm/version.d.ts +1 -1
  100. package/esm/version.js +1 -1
  101. package/package.json +8 -10
  102. package/src/babel-jsx.ts +277 -0
  103. package/src/babel-plugin-imports.ts +6 -169
  104. package/src/cli.ts +45 -6
  105. package/src/css.ts +13 -13
  106. package/src/esbuild.ts +5 -4
  107. package/src/example-code.test.ts +40 -41
  108. package/src/exporter.ts +124 -54
  109. package/src/flat-cache-interceptor.ts +114 -0
  110. package/src/framer.js +902 -739
  111. package/src/index.ts +1 -1
  112. package/src/react.tsx +15 -1
  113. package/src/sentry.ts +1 -20
  114. package/src/undici-dispatcher.ts +13 -0
  115. package/src/utils.test.ts +148 -0
  116. package/src/utils.ts +4 -17
  117. package/src/version.ts +1 -1
package/esm/framer.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { __commonJS, __decorateElement, __decoratorMetadata, __decoratorStart, __export, __privateAdd, __privateGet, __privateMethod, __privateSet, __publicField, __runInitializers, __toESM, } from './framer-chunks/chunk-A2PMVMFI.js';
2
- // /:https://app.framerstatic.com/chunk-IGW3TQSG.mjs
2
+ // /:https://app.framerstatic.com/chunk-A6RUM2JZ.mjs
3
3
  import { createContext, } from 'react';
4
4
  import { useEffect, useLayoutEffect, } from 'react';
5
5
  import { useCallback, useContext, useId, } from 'react';
@@ -51,251 +51,6 @@ var LayoutGroupContext = createContext({});
51
51
  var isBrowser = typeof window !== 'undefined';
52
52
  var useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;
53
53
  var PresenceContext = /* @__PURE__ */ createContext(null);
54
- var MotionConfigContext = createContext({
55
- transformPagePoint: (p) => p,
56
- isStatic: false,
57
- reducedMotion: 'never',
58
- });
59
- function usePresence(subscribe = true) {
60
- const context = useContext(PresenceContext);
61
- if (context === null)
62
- return [true, null,];
63
- const { isPresent: isPresent2, onExitComplete, register, } = context;
64
- const id4 = useId();
65
- useEffect(() => {
66
- if (subscribe) {
67
- return register(id4);
68
- }
69
- }, [subscribe,]);
70
- const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id4), [id4, onExitComplete, subscribe,]);
71
- return !isPresent2 && onExitComplete ? [false, safeToRemove,] : [true,];
72
- }
73
- function useIsPresent() {
74
- return isPresent(useContext(PresenceContext));
75
- }
76
- function isPresent(context) {
77
- return context === null ? true : context.isPresent;
78
- }
79
- function useConstant(init) {
80
- const ref = useRef3(null);
81
- if (ref.current === null) {
82
- ref.current = init();
83
- }
84
- return ref.current;
85
- }
86
- var PopChildMeasure = class extends React2.Component {
87
- getSnapshotBeforeUpdate(prevProps) {
88
- const element = this.props.childRef.current;
89
- if (element && prevProps.isPresent && !this.props.isPresent) {
90
- const parent = element.offsetParent;
91
- const parentWidth = parent instanceof HTMLElement ? parent.offsetWidth || 0 : 0;
92
- const size = this.props.sizeRef.current;
93
- size.height = element.offsetHeight || 0;
94
- size.width = element.offsetWidth || 0;
95
- size.top = element.offsetTop;
96
- size.left = element.offsetLeft;
97
- size.right = parentWidth - size.width - size.left;
98
- }
99
- return null;
100
- }
101
- /**
102
- * Required with getSnapshotBeforeUpdate to stop React complaining.
103
- */
104
- componentDidUpdate() { }
105
- render() {
106
- return this.props.children;
107
- }
108
- };
109
- function PopChild({ children, isPresent: isPresent2, anchorX, }) {
110
- const id4 = useId();
111
- const ref = useRef3(null);
112
- const size = useRef3({
113
- width: 0,
114
- height: 0,
115
- top: 0,
116
- left: 0,
117
- right: 0,
118
- });
119
- const { nonce, } = useContext(MotionConfigContext);
120
- useInsertionEffect(() => {
121
- const { width, height, top, left, right, } = size.current;
122
- if (isPresent2 || !ref.current || !width || !height)
123
- return;
124
- const x = anchorX === 'left' ? `left: ${left}` : `right: ${right}`;
125
- ref.current.dataset.motionPopId = id4;
126
- const style2 = document.createElement('style');
127
- if (nonce)
128
- style2.nonce = nonce;
129
- document.head.appendChild(style2);
130
- if (style2.sheet) {
131
- style2.sheet.insertRule(`
132
- [data-motion-pop-id="${id4}"] {
133
- position: absolute !important;
134
- width: ${width}px !important;
135
- height: ${height}px !important;
136
- ${x}px !important;
137
- top: ${top}px !important;
138
- }
139
- `);
140
- }
141
- return () => {
142
- if (document.head.contains(style2)) {
143
- document.head.removeChild(style2);
144
- }
145
- };
146
- }, [isPresent2,]);
147
- return jsx3(PopChildMeasure, {
148
- isPresent: isPresent2,
149
- childRef: ref,
150
- sizeRef: size,
151
- children: React2.cloneElement(children, {
152
- ref,
153
- }),
154
- });
155
- }
156
- var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, }) => {
157
- const presenceChildren = useConstant(newChildrenMap);
158
- const id4 = useId();
159
- let isReusedContext = true;
160
- let context = useMemo2(() => {
161
- isReusedContext = false;
162
- return {
163
- id: id4,
164
- initial,
165
- isPresent: isPresent2,
166
- custom,
167
- onExitComplete: (childId) => {
168
- presenceChildren.set(childId, true);
169
- for (const isComplete of presenceChildren.values()) {
170
- if (!isComplete)
171
- return;
172
- }
173
- onExitComplete && onExitComplete();
174
- },
175
- register: (childId) => {
176
- presenceChildren.set(childId, false);
177
- return () => presenceChildren.delete(childId);
178
- },
179
- };
180
- }, [isPresent2, presenceChildren, onExitComplete,]);
181
- if (presenceAffectsLayout && isReusedContext) {
182
- context = {
183
- ...context,
184
- };
185
- }
186
- useMemo2(() => {
187
- presenceChildren.forEach((_, key7) => presenceChildren.set(key7, false));
188
- }, [isPresent2,]);
189
- React2.useEffect(() => {
190
- !isPresent2 && !presenceChildren.size && onExitComplete && onExitComplete();
191
- }, [isPresent2,]);
192
- if (mode === 'popLayout') {
193
- children = jsx3(PopChild, {
194
- isPresent: isPresent2,
195
- anchorX,
196
- children,
197
- });
198
- }
199
- return jsx3(PresenceContext.Provider, {
200
- value: context,
201
- children,
202
- });
203
- };
204
- function newChildrenMap() {
205
- return /* @__PURE__ */ new Map();
206
- }
207
- var getChildKey = (child) => child.key || '';
208
- function onlyElements(children) {
209
- const filtered = [];
210
- Children.forEach(children, (child) => {
211
- if (isValidElement(child))
212
- filtered.push(child);
213
- });
214
- return filtered;
215
- }
216
- var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = 'sync', propagate = false, anchorX = 'left', }) => {
217
- const [isParentPresent, safeToRemove,] = usePresence(propagate);
218
- const presentChildren = useMemo2(() => onlyElements(children), [children,]);
219
- const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);
220
- const isInitialRender = useRef3(true);
221
- const pendingPresentChildren = useRef3(presentChildren);
222
- const exitComplete = useConstant(() => /* @__PURE__ */ new Map());
223
- const [diffedChildren, setDiffedChildren,] = useState(presentChildren);
224
- const [renderedChildren, setRenderedChildren,] = useState(presentChildren);
225
- useIsomorphicLayoutEffect(() => {
226
- isInitialRender.current = false;
227
- pendingPresentChildren.current = presentChildren;
228
- for (let i = 0; i < renderedChildren.length; i++) {
229
- const key7 = getChildKey(renderedChildren[i]);
230
- if (!presentKeys.includes(key7)) {
231
- if (exitComplete.get(key7) !== true) {
232
- exitComplete.set(key7, false);
233
- }
234
- }
235
- else {
236
- exitComplete.delete(key7);
237
- }
238
- }
239
- }, [renderedChildren, presentKeys.length, presentKeys.join('-'),]);
240
- const exitingChildren = [];
241
- if (presentChildren !== diffedChildren) {
242
- let nextChildren = [...presentChildren,];
243
- for (let i = 0; i < renderedChildren.length; i++) {
244
- const child = renderedChildren[i];
245
- const key7 = getChildKey(child);
246
- if (!presentKeys.includes(key7)) {
247
- nextChildren.splice(i, 0, child);
248
- exitingChildren.push(child);
249
- }
250
- }
251
- if (mode === 'wait' && exitingChildren.length) {
252
- nextChildren = exitingChildren;
253
- }
254
- setRenderedChildren(onlyElements(nextChildren));
255
- setDiffedChildren(presentChildren);
256
- return null;
257
- }
258
- if (false) {
259
- console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
260
- }
261
- const { forceRender, } = useContext(LayoutGroupContext);
262
- return jsx3(Fragment, {
263
- children: renderedChildren.map((child) => {
264
- const key7 = getChildKey(child);
265
- const isPresent2 = propagate && !isParentPresent ? false : presentChildren === renderedChildren || presentKeys.includes(key7);
266
- const onExit = () => {
267
- if (exitComplete.has(key7)) {
268
- exitComplete.set(key7, true);
269
- }
270
- else {
271
- return;
272
- }
273
- let isEveryExitComplete = true;
274
- exitComplete.forEach((isExitComplete) => {
275
- if (!isExitComplete)
276
- isEveryExitComplete = false;
277
- });
278
- if (isEveryExitComplete) {
279
- forceRender == null ? void 0 : forceRender();
280
- setRenderedChildren(pendingPresentChildren.current);
281
- propagate && (safeToRemove == null ? void 0 : safeToRemove());
282
- onExitComplete && onExitComplete();
283
- }
284
- };
285
- return jsx3(PresenceChild, {
286
- isPresent: isPresent2,
287
- initial: !isInitialRender.current || initial ? void 0 : false,
288
- custom,
289
- presenceAffectsLayout,
290
- mode,
291
- onExitComplete: isPresent2 ? void 0 : onExit,
292
- anchorX,
293
- children: child,
294
- }, key7);
295
- }),
296
- });
297
- };
298
- var DeprecatedLayoutGroupContext = createContext(null);
299
54
  function addUniqueItem(arr, item) {
300
55
  if (arr.indexOf(item) === -1)
301
56
  arr.push(item);
@@ -337,6 +92,9 @@ if (false) {
337
92
  }
338
93
  var MotionGlobalConfig = {};
339
94
  var isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v);
95
+ function isObject(value) {
96
+ return typeof value === 'object' && value !== null;
97
+ }
340
98
  var isZeroValueString = (v) => /^0[^.\s]+$/u.test(v);
341
99
  // @__NO_SIDE_EFFECTS__
342
100
  function memo(callback) {
@@ -1524,13 +1282,11 @@ var JSAnimation = class extends WithPromise {
1524
1282
  this.currentTime = 0;
1525
1283
  this.holdTime = null;
1526
1284
  this.playbackSpeed = 1;
1527
- this.stop = (sync2 = true) => {
1285
+ this.stop = () => {
1528
1286
  var _a, _b;
1529
- if (sync2) {
1530
- const { motionValue: motionValue2, } = this.options;
1531
- if (motionValue2 && motionValue2.updatedAt !== time.now()) {
1532
- this.tick(time.now());
1533
- }
1287
+ const { motionValue: motionValue2, } = this.options;
1288
+ if (motionValue2 && motionValue2.updatedAt !== time.now()) {
1289
+ this.tick(time.now());
1534
1290
  }
1535
1291
  this.isStopped = true;
1536
1292
  if (this.state === 'idle')
@@ -2322,14 +2078,17 @@ var NativeAnimationExtended = class extends NativeAnimation {
2322
2078
  sampleAnimation.stop();
2323
2079
  }
2324
2080
  };
2325
- var acceleratedValues = /* @__PURE__ */ new Set(['opacity', 'clipPath', 'filter', 'transform', // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
2326
- // or until we implement support for linear() easing.
2081
+ function isHTMLElement(element) {
2082
+ return isObject(element) && 'offsetHeight' in element;
2083
+ }
2084
+ var acceleratedValues = /* @__PURE__ */ new Set(['opacity', 'clipPath', 'filter', 'transform', // TODO: Could be re-enabled now we have support for linear() easing
2327
2085
  // "background-color"
2328
2086
  ]);
2329
2087
  var supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Element.prototype, 'animate'));
2330
2088
  function supportsBrowserAnimation(options) {
2089
+ var _a;
2331
2090
  const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type, } = options;
2332
- if (!motionValue2 || !motionValue2.owner || !(motionValue2.owner.current instanceof HTMLElement)) {
2091
+ if (!isHTMLElement((_a = motionValue2 == null ? void 0 : motionValue2.owner) == null ? void 0 : _a.current)) {
2333
2092
  return false;
2334
2093
  }
2335
2094
  const { onUpdate, transformTemplate: transformTemplate2, } = motionValue2.owner.getProps();
@@ -2950,6 +2709,119 @@ function resolveElements(elementOrSelector, scope, selectorCache) {
2950
2709
  }
2951
2710
  return Array.from(elementOrSelector);
2952
2711
  }
2712
+ var getValueAsType = (value, type) => {
2713
+ return type && typeof value === 'number' ? type.transform(value) : value;
2714
+ };
2715
+ function camelToDash(str) {
2716
+ return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);
2717
+ }
2718
+ function createSelectorEffect(subjectEffect) {
2719
+ return (subject, values) => {
2720
+ const elements = resolveElements(subject);
2721
+ const subscriptions = [];
2722
+ for (const element of elements) {
2723
+ const remove2 = subjectEffect(element, values);
2724
+ subscriptions.push(remove2);
2725
+ }
2726
+ return () => {
2727
+ for (const remove2 of subscriptions)
2728
+ remove2();
2729
+ };
2730
+ };
2731
+ }
2732
+ var MotionValueState = class {
2733
+ constructor() {
2734
+ this.latest = {};
2735
+ this.values = /* @__PURE__ */ new Map();
2736
+ }
2737
+ set(name, value, render, computed, useDefaultValueType = true) {
2738
+ const existingValue = this.values.get(name);
2739
+ if (existingValue) {
2740
+ existingValue.onRemove();
2741
+ }
2742
+ const onChange = () => {
2743
+ const v = value.get();
2744
+ if (useDefaultValueType) {
2745
+ this.latest[name] = getValueAsType(v, numberValueTypes[name]);
2746
+ }
2747
+ else {
2748
+ this.latest[name] = v;
2749
+ }
2750
+ render && frame.render(render);
2751
+ };
2752
+ onChange();
2753
+ const cancelOnChange = value.on('change', onChange);
2754
+ computed && value.addDependent(computed);
2755
+ const remove2 = () => {
2756
+ cancelOnChange();
2757
+ render && cancelFrame(render);
2758
+ this.values.delete(name);
2759
+ computed && value.removeDependent(computed);
2760
+ };
2761
+ this.values.set(name, {
2762
+ value,
2763
+ onRemove: remove2,
2764
+ });
2765
+ return remove2;
2766
+ }
2767
+ get(name) {
2768
+ var _a;
2769
+ return (_a = this.values.get(name)) == null ? void 0 : _a.value;
2770
+ }
2771
+ destroy() {
2772
+ for (const value of this.values.values()) {
2773
+ value.onRemove();
2774
+ }
2775
+ }
2776
+ };
2777
+ function createEffect(addValue) {
2778
+ const stateCache = /* @__PURE__ */ new WeakMap();
2779
+ const subscriptions = [];
2780
+ return (subject, values) => {
2781
+ const state = stateCache.get(subject) ?? new MotionValueState();
2782
+ stateCache.set(subject, state);
2783
+ for (const key7 in values) {
2784
+ const value = values[key7];
2785
+ const remove2 = addValue(subject, state, key7, value);
2786
+ subscriptions.push(remove2);
2787
+ }
2788
+ return () => {
2789
+ for (const cancel of subscriptions)
2790
+ cancel();
2791
+ };
2792
+ };
2793
+ }
2794
+ function canSetAsProperty(element, name) {
2795
+ if (!(name in element))
2796
+ return false;
2797
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) ||
2798
+ Object.getOwnPropertyDescriptor(element, name);
2799
+ return descriptor && typeof descriptor.set === 'function';
2800
+ }
2801
+ var addAttrValue = (element, state, key7, value) => {
2802
+ const isProp = canSetAsProperty(element, key7);
2803
+ const name = isProp ? key7 : key7.startsWith('data') || key7.startsWith('aria') ? camelToDash(key7) : key7;
2804
+ const render = isProp
2805
+ ? () => {
2806
+ element[name] = state.latest[key7];
2807
+ }
2808
+ : () => {
2809
+ const v = state.latest[key7];
2810
+ if (v === null || v === void 0) {
2811
+ element.removeAttribute(name);
2812
+ }
2813
+ else {
2814
+ element.setAttribute(name, String(v));
2815
+ }
2816
+ };
2817
+ return state.set(key7, value, render);
2818
+ };
2819
+ var attrEffect = /* @__PURE__ */ createSelectorEffect(/* @__PURE__ */ createEffect(addAttrValue));
2820
+ var propEffect = /* @__PURE__ */ createEffect((subject, state, key7, value) => {
2821
+ return state.set(key7, value, () => {
2822
+ subject[key7] = state.latest[key7];
2823
+ }, void 0, false);
2824
+ });
2953
2825
  var MAX_VELOCITY_DELTA = 30;
2954
2826
  var isFloat = (value) => {
2955
2827
  return !isNaN(parseFloat(value));
@@ -3240,48 +3112,6 @@ var MotionValue = class {
3240
3112
  function motionValue(init, options) {
3241
3113
  return new MotionValue(init, options);
3242
3114
  }
3243
- var getValueAsType = (value, type) => {
3244
- return type && typeof value === 'number' ? type.transform(value) : value;
3245
- };
3246
- var MotionValueState = class {
3247
- constructor() {
3248
- this.latest = {};
3249
- this.values = /* @__PURE__ */ new Map();
3250
- }
3251
- set(name, value, render, computed) {
3252
- const existingValue = this.values.get(name);
3253
- if (existingValue) {
3254
- existingValue.onRemove();
3255
- }
3256
- const onChange = () => {
3257
- this.latest[name] = getValueAsType(value.get(), numberValueTypes[name]);
3258
- render && frame.render(render);
3259
- };
3260
- onChange();
3261
- const cancelOnChange = value.on('change', onChange);
3262
- computed && value.addDependent(computed);
3263
- const remove2 = () => {
3264
- cancelOnChange();
3265
- render && cancelFrame(render);
3266
- this.values.delete(name);
3267
- computed && value.removeDependent(computed);
3268
- };
3269
- this.values.set(name, {
3270
- value,
3271
- onRemove: remove2,
3272
- });
3273
- return remove2;
3274
- }
3275
- get(name) {
3276
- var _a;
3277
- return (_a = this.values.get(name)) == null ? void 0 : _a.value;
3278
- }
3279
- destroy() {
3280
- for (const value of this.values.values()) {
3281
- value.onRemove();
3282
- }
3283
- }
3284
- };
3285
3115
  var translateAlias = {
3286
3116
  x: 'translateX',
3287
3117
  y: 'translateY',
@@ -3312,36 +3142,32 @@ function buildTransform(state) {
3312
3142
  }
3313
3143
  return transformIsDefault ? 'none' : transform2.trim();
3314
3144
  }
3315
- var stateMap = /* @__PURE__ */ new WeakMap();
3316
- function styleEffect(subject, values) {
3317
- const elements = resolveElements(subject);
3318
- const subscriptions = [];
3319
- for (let i = 0; i < elements.length; i++) {
3320
- const element = elements[i];
3321
- const state = stateMap.get(element) ?? new MotionValueState();
3322
- stateMap.set(element, state);
3323
- for (const key7 in values) {
3324
- const value = values[key7];
3325
- const remove2 = addValue(element, state, key7, value);
3326
- subscriptions.push(remove2);
3327
- }
3328
- }
3329
- return () => {
3330
- for (const cancel of subscriptions)
3331
- cancel();
3332
- };
3333
- }
3334
- function addValue(element, state, key7, value) {
3145
+ var originProps = /* @__PURE__ */ new Set(['originX', 'originY', 'originZ',]);
3146
+ var addStyleValue = (element, state, key7, value) => {
3335
3147
  let render = void 0;
3336
3148
  let computed = void 0;
3337
3149
  if (transformProps.has(key7)) {
3338
3150
  if (!state.get('transform')) {
3151
+ if (!isHTMLElement(element) && !state.get('transformBox')) {
3152
+ addStyleValue(element, state, 'transformBox', new MotionValue('fill-box'));
3153
+ }
3339
3154
  state.set('transform', new MotionValue('none'), () => {
3340
3155
  element.style.transform = buildTransform(state);
3341
3156
  });
3342
3157
  }
3343
3158
  computed = state.get('transform');
3344
3159
  }
3160
+ else if (originProps.has(key7)) {
3161
+ if (!state.get('transformOrigin')) {
3162
+ state.set('transformOrigin', new MotionValue(''), () => {
3163
+ const originX = state.latest.originX ?? '50%';
3164
+ const originY = state.latest.originY ?? '50%';
3165
+ const originZ = state.latest.originZ ?? 0;
3166
+ element.style.transformOrigin = `${originX} ${originY} ${originZ}`;
3167
+ });
3168
+ }
3169
+ computed = state.get('transformOrigin');
3170
+ }
3345
3171
  else if (isCSSVar(key7)) {
3346
3172
  render = () => {
3347
3173
  element.style.setProperty(key7, state.latest[key7]);
@@ -3353,6 +3179,37 @@ function addValue(element, state, key7, value) {
3353
3179
  };
3354
3180
  }
3355
3181
  return state.set(key7, value, render, computed);
3182
+ };
3183
+ var styleEffect = /* @__PURE__ */ createSelectorEffect(/* @__PURE__ */ createEffect(addStyleValue));
3184
+ var toPx = px.transform;
3185
+ function addSVGPathValue(element, state, key7, value) {
3186
+ frame.render(() => element.setAttribute('pathLength', '1'));
3187
+ if (key7 === 'pathOffset') {
3188
+ return state.set(key7, value, () => element.setAttribute('stroke-dashoffset', toPx(-state.latest[key7])));
3189
+ }
3190
+ else {
3191
+ if (!state.get('stroke-dasharray')) {
3192
+ state.set('stroke-dasharray', new MotionValue('1 1'), () => {
3193
+ const { pathLength = 1, pathSpacing, } = state.latest;
3194
+ element.setAttribute('stroke-dasharray', `${toPx(pathLength)} ${toPx(pathSpacing ?? 1 - Number(pathLength))}`);
3195
+ });
3196
+ }
3197
+ return state.set(key7, value, void 0, state.get('stroke-dasharray'));
3198
+ }
3199
+ }
3200
+ var addSVGValue = (element, state, key7, value) => {
3201
+ if (key7.startsWith('path')) {
3202
+ return addSVGPathValue(element, state, key7, value);
3203
+ }
3204
+ else if (key7.startsWith('attr')) {
3205
+ return addAttrValue(element, state, convertAttrKey(key7), value);
3206
+ }
3207
+ const handler = key7 in element.style ? addStyleValue : addAttrValue;
3208
+ return handler(element, state, key7, value);
3209
+ };
3210
+ var svgEffect = /* @__PURE__ */ createSelectorEffect(/* @__PURE__ */ createEffect(addSVGValue));
3211
+ function convertAttrKey(key7) {
3212
+ return key7.replace(/^attr([A-Z])/, (_, firstChar) => firstChar.toLowerCase());
3356
3213
  }
3357
3214
  var { schedule: microtask, cancel: cancelMicrotask, } = /* @__PURE__ */ createRenderBatcher(queueMicrotask, false);
3358
3215
  var isDragging = {
@@ -3515,7 +3372,7 @@ function press(targetOrSelector, onPressStart, options = {}) {
3515
3372
  targets.forEach((target) => {
3516
3373
  const pointerDownTarget = options.useGlobalTarget ? window : target;
3517
3374
  pointerDownTarget.addEventListener('pointerdown', startPress, eventOptions);
3518
- if (target instanceof HTMLElement) {
3375
+ if (isHTMLElement(target)) {
3519
3376
  target.addEventListener('focus', (event) => enableKeyboardPress(event, eventOptions));
3520
3377
  if (!isElementKeyboardAccessible(target) && !target.hasAttribute('tabindex')) {
3521
3378
  target.tabIndex = 0;
@@ -3650,6 +3507,12 @@ function recordStats() {
3650
3507
  frame.postRender(record, true);
3651
3508
  return reportStats;
3652
3509
  }
3510
+ function isSVGElement(element) {
3511
+ return isObject(element) && 'ownerSVGElement' in element;
3512
+ }
3513
+ function isSVGSVGElement(element) {
3514
+ return isSVGElement(element) && element.tagName === 'svg';
3515
+ }
3653
3516
  function transform(...args) {
3654
3517
  const useImmediate = !Array.isArray(args[0]);
3655
3518
  const argOffset = useImmediate ? 0 : -1;
@@ -3682,6 +3545,56 @@ function mapValue(inputValue, inputRange, outputRange, options) {
3682
3545
  const map2 = transform(inputRange, outputRange, options);
3683
3546
  return transformValue(() => map2(inputValue.get()));
3684
3547
  }
3548
+ var isMotionValue = (value) => Boolean(value && value.getVelocity);
3549
+ function springValue(source, options) {
3550
+ const initialValue = isMotionValue(source) ? source.get() : source;
3551
+ const value = motionValue(initialValue);
3552
+ attachSpring(value, source, options);
3553
+ return value;
3554
+ }
3555
+ function attachSpring(value, source, options) {
3556
+ const initialValue = value.get();
3557
+ let activeAnimation = null;
3558
+ let latestValue = initialValue;
3559
+ let latestSetter;
3560
+ const unit = typeof initialValue === 'string' ? initialValue.replace(/[\d.-]/g, '') : void 0;
3561
+ const stopAnimation2 = () => {
3562
+ if (activeAnimation) {
3563
+ activeAnimation.stop();
3564
+ activeAnimation = null;
3565
+ }
3566
+ };
3567
+ const startAnimation2 = () => {
3568
+ stopAnimation2();
3569
+ activeAnimation = new JSAnimation({
3570
+ keyframes: [asNumber(value.get()), asNumber(latestValue),],
3571
+ velocity: value.getVelocity(),
3572
+ type: 'spring',
3573
+ restDelta: 1e-3,
3574
+ restSpeed: 0.01,
3575
+ ...options,
3576
+ onUpdate: latestSetter,
3577
+ });
3578
+ };
3579
+ value.attach((v, set) => {
3580
+ latestValue = v;
3581
+ latestSetter = (latest) => set(parseValue(latest, unit));
3582
+ frame.postRender(startAnimation2);
3583
+ return value.get();
3584
+ }, stopAnimation2);
3585
+ let unsubscribe = void 0;
3586
+ if (isMotionValue(source)) {
3587
+ unsubscribe = source.on('change', (v) => value.set(parseValue(v, unit)));
3588
+ value.on('destroy', unsubscribe);
3589
+ }
3590
+ return unsubscribe;
3591
+ }
3592
+ function parseValue(v, unit) {
3593
+ return unit ? v + unit : v;
3594
+ }
3595
+ function asNumber(v) {
3596
+ return typeof v === 'number' ? v : parseFloat(v);
3597
+ }
3685
3598
  var valueTypes = [...dimensionValueTypes, color, complex,];
3686
3599
  var findValueType = (v) => valueTypes.find(testValueType(v));
3687
3600
  function chooseLayerType(valueName) {
@@ -3962,6 +3875,251 @@ var cancelSync = stepsOrder.reduce((acc, key7) => {
3962
3875
  acc[key7] = (process2) => cancelFrame(process2);
3963
3876
  return acc;
3964
3877
  }, {});
3878
+ var MotionConfigContext = createContext({
3879
+ transformPagePoint: (p) => p,
3880
+ isStatic: false,
3881
+ reducedMotion: 'never',
3882
+ });
3883
+ function usePresence(subscribe = true) {
3884
+ const context = useContext(PresenceContext);
3885
+ if (context === null)
3886
+ return [true, null,];
3887
+ const { isPresent: isPresent2, onExitComplete, register, } = context;
3888
+ const id4 = useId();
3889
+ useEffect(() => {
3890
+ if (subscribe) {
3891
+ return register(id4);
3892
+ }
3893
+ }, [subscribe,]);
3894
+ const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id4), [id4, onExitComplete, subscribe,]);
3895
+ return !isPresent2 && onExitComplete ? [false, safeToRemove,] : [true,];
3896
+ }
3897
+ function useIsPresent() {
3898
+ return isPresent(useContext(PresenceContext));
3899
+ }
3900
+ function isPresent(context) {
3901
+ return context === null ? true : context.isPresent;
3902
+ }
3903
+ function useConstant(init) {
3904
+ const ref = useRef3(null);
3905
+ if (ref.current === null) {
3906
+ ref.current = init();
3907
+ }
3908
+ return ref.current;
3909
+ }
3910
+ var PopChildMeasure = class extends React2.Component {
3911
+ getSnapshotBeforeUpdate(prevProps) {
3912
+ const element = this.props.childRef.current;
3913
+ if (element && prevProps.isPresent && !this.props.isPresent) {
3914
+ const parent = element.offsetParent;
3915
+ const parentWidth = isHTMLElement(parent) ? parent.offsetWidth || 0 : 0;
3916
+ const size = this.props.sizeRef.current;
3917
+ size.height = element.offsetHeight || 0;
3918
+ size.width = element.offsetWidth || 0;
3919
+ size.top = element.offsetTop;
3920
+ size.left = element.offsetLeft;
3921
+ size.right = parentWidth - size.width - size.left;
3922
+ }
3923
+ return null;
3924
+ }
3925
+ /**
3926
+ * Required with getSnapshotBeforeUpdate to stop React complaining.
3927
+ */
3928
+ componentDidUpdate() { }
3929
+ render() {
3930
+ return this.props.children;
3931
+ }
3932
+ };
3933
+ function PopChild({ children, isPresent: isPresent2, anchorX, }) {
3934
+ const id4 = useId();
3935
+ const ref = useRef3(null);
3936
+ const size = useRef3({
3937
+ width: 0,
3938
+ height: 0,
3939
+ top: 0,
3940
+ left: 0,
3941
+ right: 0,
3942
+ });
3943
+ const { nonce, } = useContext(MotionConfigContext);
3944
+ useInsertionEffect(() => {
3945
+ const { width, height, top, left, right, } = size.current;
3946
+ if (isPresent2 || !ref.current || !width || !height)
3947
+ return;
3948
+ const x = anchorX === 'left' ? `left: ${left}` : `right: ${right}`;
3949
+ ref.current.dataset.motionPopId = id4;
3950
+ const style2 = document.createElement('style');
3951
+ if (nonce)
3952
+ style2.nonce = nonce;
3953
+ document.head.appendChild(style2);
3954
+ if (style2.sheet) {
3955
+ style2.sheet.insertRule(`
3956
+ [data-motion-pop-id="${id4}"] {
3957
+ position: absolute !important;
3958
+ width: ${width}px !important;
3959
+ height: ${height}px !important;
3960
+ ${x}px !important;
3961
+ top: ${top}px !important;
3962
+ }
3963
+ `);
3964
+ }
3965
+ return () => {
3966
+ if (document.head.contains(style2)) {
3967
+ document.head.removeChild(style2);
3968
+ }
3969
+ };
3970
+ }, [isPresent2,]);
3971
+ return jsx3(PopChildMeasure, {
3972
+ isPresent: isPresent2,
3973
+ childRef: ref,
3974
+ sizeRef: size,
3975
+ children: React2.cloneElement(children, {
3976
+ ref,
3977
+ }),
3978
+ });
3979
+ }
3980
+ var PresenceChild = ({ children, initial, isPresent: isPresent2, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, }) => {
3981
+ const presenceChildren = useConstant(newChildrenMap);
3982
+ const id4 = useId();
3983
+ let isReusedContext = true;
3984
+ let context = useMemo2(() => {
3985
+ isReusedContext = false;
3986
+ return {
3987
+ id: id4,
3988
+ initial,
3989
+ isPresent: isPresent2,
3990
+ custom,
3991
+ onExitComplete: (childId) => {
3992
+ presenceChildren.set(childId, true);
3993
+ for (const isComplete of presenceChildren.values()) {
3994
+ if (!isComplete)
3995
+ return;
3996
+ }
3997
+ onExitComplete && onExitComplete();
3998
+ },
3999
+ register: (childId) => {
4000
+ presenceChildren.set(childId, false);
4001
+ return () => presenceChildren.delete(childId);
4002
+ },
4003
+ };
4004
+ }, [isPresent2, presenceChildren, onExitComplete,]);
4005
+ if (presenceAffectsLayout && isReusedContext) {
4006
+ context = {
4007
+ ...context,
4008
+ };
4009
+ }
4010
+ useMemo2(() => {
4011
+ presenceChildren.forEach((_, key7) => presenceChildren.set(key7, false));
4012
+ }, [isPresent2,]);
4013
+ React2.useEffect(() => {
4014
+ !isPresent2 && !presenceChildren.size && onExitComplete && onExitComplete();
4015
+ }, [isPresent2,]);
4016
+ if (mode === 'popLayout') {
4017
+ children = jsx3(PopChild, {
4018
+ isPresent: isPresent2,
4019
+ anchorX,
4020
+ children,
4021
+ });
4022
+ }
4023
+ return jsx3(PresenceContext.Provider, {
4024
+ value: context,
4025
+ children,
4026
+ });
4027
+ };
4028
+ function newChildrenMap() {
4029
+ return /* @__PURE__ */ new Map();
4030
+ }
4031
+ var getChildKey = (child) => child.key || '';
4032
+ function onlyElements(children) {
4033
+ const filtered = [];
4034
+ Children.forEach(children, (child) => {
4035
+ if (isValidElement(child))
4036
+ filtered.push(child);
4037
+ });
4038
+ return filtered;
4039
+ }
4040
+ var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = 'sync', propagate = false, anchorX = 'left', }) => {
4041
+ const [isParentPresent, safeToRemove,] = usePresence(propagate);
4042
+ const presentChildren = useMemo2(() => onlyElements(children), [children,]);
4043
+ const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);
4044
+ const isInitialRender = useRef3(true);
4045
+ const pendingPresentChildren = useRef3(presentChildren);
4046
+ const exitComplete = useConstant(() => /* @__PURE__ */ new Map());
4047
+ const [diffedChildren, setDiffedChildren,] = useState(presentChildren);
4048
+ const [renderedChildren, setRenderedChildren,] = useState(presentChildren);
4049
+ useIsomorphicLayoutEffect(() => {
4050
+ isInitialRender.current = false;
4051
+ pendingPresentChildren.current = presentChildren;
4052
+ for (let i = 0; i < renderedChildren.length; i++) {
4053
+ const key7 = getChildKey(renderedChildren[i]);
4054
+ if (!presentKeys.includes(key7)) {
4055
+ if (exitComplete.get(key7) !== true) {
4056
+ exitComplete.set(key7, false);
4057
+ }
4058
+ }
4059
+ else {
4060
+ exitComplete.delete(key7);
4061
+ }
4062
+ }
4063
+ }, [renderedChildren, presentKeys.length, presentKeys.join('-'),]);
4064
+ const exitingChildren = [];
4065
+ if (presentChildren !== diffedChildren) {
4066
+ let nextChildren = [...presentChildren,];
4067
+ for (let i = 0; i < renderedChildren.length; i++) {
4068
+ const child = renderedChildren[i];
4069
+ const key7 = getChildKey(child);
4070
+ if (!presentKeys.includes(key7)) {
4071
+ nextChildren.splice(i, 0, child);
4072
+ exitingChildren.push(child);
4073
+ }
4074
+ }
4075
+ if (mode === 'wait' && exitingChildren.length) {
4076
+ nextChildren = exitingChildren;
4077
+ }
4078
+ setRenderedChildren(onlyElements(nextChildren));
4079
+ setDiffedChildren(presentChildren);
4080
+ return null;
4081
+ }
4082
+ if (false) {
4083
+ console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
4084
+ }
4085
+ const { forceRender, } = useContext(LayoutGroupContext);
4086
+ return jsx3(Fragment, {
4087
+ children: renderedChildren.map((child) => {
4088
+ const key7 = getChildKey(child);
4089
+ const isPresent2 = propagate && !isParentPresent ? false : presentChildren === renderedChildren || presentKeys.includes(key7);
4090
+ const onExit = () => {
4091
+ if (exitComplete.has(key7)) {
4092
+ exitComplete.set(key7, true);
4093
+ }
4094
+ else {
4095
+ return;
4096
+ }
4097
+ let isEveryExitComplete = true;
4098
+ exitComplete.forEach((isExitComplete) => {
4099
+ if (!isExitComplete)
4100
+ isEveryExitComplete = false;
4101
+ });
4102
+ if (isEveryExitComplete) {
4103
+ forceRender == null ? void 0 : forceRender();
4104
+ setRenderedChildren(pendingPresentChildren.current);
4105
+ propagate && (safeToRemove == null ? void 0 : safeToRemove());
4106
+ onExitComplete && onExitComplete();
4107
+ }
4108
+ };
4109
+ return jsx3(PresenceChild, {
4110
+ isPresent: isPresent2,
4111
+ initial: !isInitialRender.current || initial ? void 0 : false,
4112
+ custom,
4113
+ presenceAffectsLayout,
4114
+ mode,
4115
+ onExitComplete: isPresent2 ? void 0 : onExit,
4116
+ anchorX,
4117
+ children: child,
4118
+ }, key7);
4119
+ }),
4120
+ });
4121
+ };
4122
+ var DeprecatedLayoutGroupContext = createContext(null);
3965
4123
  function useIsMounted() {
3966
4124
  const isMounted = useRef3(false);
3967
4125
  useIsomorphicLayoutEffect(() => {
@@ -4158,9 +4316,9 @@ function MotionConfig({ children, isValidProp, ...config }) {
4158
4316
  });
4159
4317
  }
4160
4318
  var MotionContext = /* @__PURE__ */ createContext({});
4161
- var camelToDash = (str) => str.replace(/([a-z])([A-Z])/gu, '$1-$2').toLowerCase();
4319
+ var camelToDash2 = (str) => str.replace(/([a-z])([A-Z])/gu, '$1-$2').toLowerCase();
4162
4320
  var optimizedAppearDataId = 'framerAppearId';
4163
- var optimizedAppearDataAttribute = 'data-' + camelToDash(optimizedAppearDataId);
4321
+ var optimizedAppearDataAttribute = 'data-' + camelToDash2(optimizedAppearDataId);
4164
4322
  var SwitchLayoutGroupContext = createContext({});
4165
4323
  function isAnimationControls(v) {
4166
4324
  return v !== null && typeof v === 'object' && typeof v.start === 'function';
@@ -4384,7 +4542,6 @@ function addScaleCorrector(correctors) {
4384
4542
  }
4385
4543
  }
4386
4544
  }
4387
- var isMotionValue = (value) => Boolean(value && value.getVelocity);
4388
4545
  var translateAlias2 = {
4389
4546
  x: 'translateX',
4390
4547
  y: 'translateY',
@@ -4618,59 +4775,6 @@ function useHTMLProps(props, visualState) {
4618
4775
  htmlProps.style = style2;
4619
4776
  return htmlProps;
4620
4777
  }
4621
- var lowercaseSVGElements = [
4622
- 'animate',
4623
- 'circle',
4624
- 'defs',
4625
- 'desc',
4626
- 'ellipse',
4627
- 'g',
4628
- 'image',
4629
- 'line',
4630
- 'filter',
4631
- 'marker',
4632
- 'mask',
4633
- 'metadata',
4634
- 'path',
4635
- 'pattern',
4636
- 'polygon',
4637
- 'polyline',
4638
- 'rect',
4639
- 'stop',
4640
- 'switch',
4641
- 'symbol',
4642
- 'svg',
4643
- 'text',
4644
- 'tspan',
4645
- 'use',
4646
- 'view',
4647
- ];
4648
- function isSVGComponent(Component33) {
4649
- if (
4650
- /**
4651
- * If it's not a string, it's a custom React component. Currently we only support
4652
- * HTML custom React components.
4653
- */
4654
- typeof Component33 !== 'string' ||
4655
- /**
4656
- * If it contains a dash, the element is a custom HTML webcomponent.
4657
- */
4658
- Component33.includes('-')) {
4659
- return false;
4660
- }
4661
- else if (
4662
- /**
4663
- * If it's in our list of lowercase SVG tags, it's an SVG component
4664
- */
4665
- lowercaseSVGElements.indexOf(Component33) > -1 ||
4666
- /**
4667
- * If it contains a capital letter, it's an SVG component
4668
- */
4669
- /[A-Z]/u.test(Component33)) {
4670
- return true;
4671
- }
4672
- return false;
4673
- }
4674
4778
  var dashKeys = {
4675
4779
  offset: 'stroke-dashoffset',
4676
4780
  array: 'stroke-dasharray',
@@ -4748,6 +4852,59 @@ function useSVGProps(props, visualState, _isStatic, Component33) {
4748
4852
  }
4749
4853
  return visualProps;
4750
4854
  }
4855
+ var lowercaseSVGElements = [
4856
+ 'animate',
4857
+ 'circle',
4858
+ 'defs',
4859
+ 'desc',
4860
+ 'ellipse',
4861
+ 'g',
4862
+ 'image',
4863
+ 'line',
4864
+ 'filter',
4865
+ 'marker',
4866
+ 'mask',
4867
+ 'metadata',
4868
+ 'path',
4869
+ 'pattern',
4870
+ 'polygon',
4871
+ 'polyline',
4872
+ 'rect',
4873
+ 'stop',
4874
+ 'switch',
4875
+ 'symbol',
4876
+ 'svg',
4877
+ 'text',
4878
+ 'tspan',
4879
+ 'use',
4880
+ 'view',
4881
+ ];
4882
+ function isSVGComponent(Component33) {
4883
+ if (
4884
+ /**
4885
+ * If it's not a string, it's a custom React component. Currently we only support
4886
+ * HTML custom React components.
4887
+ */
4888
+ typeof Component33 !== 'string' ||
4889
+ /**
4890
+ * If it contains a dash, the element is a custom HTML webcomponent.
4891
+ */
4892
+ Component33.includes('-')) {
4893
+ return false;
4894
+ }
4895
+ else if (
4896
+ /**
4897
+ * If it's in our list of lowercase SVG tags, it's an SVG component
4898
+ */
4899
+ lowercaseSVGElements.indexOf(Component33) > -1 ||
4900
+ /**
4901
+ * If it contains a capital letter, it's an SVG component
4902
+ */
4903
+ /[A-Z]/u.test(Component33)) {
4904
+ return true;
4905
+ }
4906
+ return false;
4907
+ }
4751
4908
  function createUseRender(forwardMotionProps = false) {
4752
4909
  const useRender = (Component33, props, ref, { latestValues, }, isStatic) => {
4753
4910
  const useVisualProps = isSVGComponent(Component33) ? useSVGProps : useHTMLProps;
@@ -6911,12 +7068,9 @@ function animateSingleValue(value, keyframes2, options) {
6911
7068
  motionValue$1.start(animateMotionValue('', motionValue$1, keyframes2, options));
6912
7069
  return motionValue$1.animation;
6913
7070
  }
6914
- function isSVGElement(element) {
6915
- return element instanceof SVGElement && element.tagName !== 'svg';
6916
- }
6917
7071
  var borders = ['TopLeft', 'TopRight', 'BottomLeft', 'BottomRight',];
6918
7072
  var numBorders = borders.length;
6919
- var asNumber = (value) => typeof value === 'string' ? parseFloat(value) : value;
7073
+ var asNumber2 = (value) => typeof value === 'string' ? parseFloat(value) : value;
6920
7074
  var isPx = (value) => typeof value === 'number' || px.test(value);
6921
7075
  function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOnlyMember) {
6922
7076
  if (shouldCrossfadeOpacity) {
@@ -6936,7 +7090,7 @@ function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOn
6936
7090
  leadRadius || (leadRadius = 0);
6937
7091
  const canMix = followRadius === 0 || leadRadius === 0 || isPx(followRadius) === isPx(leadRadius);
6938
7092
  if (canMix) {
6939
- target[borderLabel] = Math.max(mixNumber(asNumber(followRadius), asNumber(leadRadius), progress2), 0);
7093
+ target[borderLabel] = Math.max(mixNumber(asNumber2(followRadius), asNumber2(leadRadius), progress2), 0);
6940
7094
  if (percent.test(leadRadius) || percent.test(followRadius)) {
6941
7095
  target[borderLabel] += '%';
6942
7096
  }
@@ -7277,7 +7431,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
7277
7431
  mount(instance) {
7278
7432
  if (this.instance)
7279
7433
  return;
7280
- this.isSVG = isSVGElement(instance);
7434
+ this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance);
7281
7435
  this.instance = instance;
7282
7436
  const { layoutId, layout: layout2, visualElement, } = this.options;
7283
7437
  if (visualElement && !visualElement.current) {
@@ -7321,7 +7475,6 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
7321
7475
  this.resumingFrom = this.resumeFrom;
7322
7476
  this.resumingFrom.resumingFrom = void 0;
7323
7477
  }
7324
- this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
7325
7478
  const animationOptions = {
7326
7479
  ...getValueTransition(layoutTransition, 'layout'),
7327
7480
  onPlay: onLayoutAnimationStart,
@@ -7332,6 +7485,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
7332
7485
  animationOptions.type = false;
7333
7486
  }
7334
7487
  this.startAnimation(animationOptions);
7488
+ this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
7335
7489
  }
7336
7490
  else {
7337
7491
  if (!hasLayoutChanged) {
@@ -7857,8 +8011,8 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
7857
8011
  startAnimation(options) {
7858
8012
  var _a, _b, _c;
7859
8013
  this.notifyListeners('animationStart');
7860
- (_a = this.currentAnimation) == null ? void 0 : _a.stop(false);
7861
- (_c = (_b = this.resumingFrom) == null ? void 0 : _b.currentAnimation) == null ? void 0 : _c.stop(false);
8014
+ (_a = this.currentAnimation) == null ? void 0 : _a.stop();
8015
+ (_c = (_b = this.resumingFrom) == null ? void 0 : _b.currentAnimation) == null ? void 0 : _c.stop();
7862
8016
  if (this.pendingAnimation) {
7863
8017
  cancelFrame(this.pendingAnimation);
7864
8018
  this.pendingAnimation = void 0;
@@ -7902,7 +8056,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
7902
8056
  finishAnimation() {
7903
8057
  if (this.currentAnimation) {
7904
8058
  this.mixTargetDelta && this.mixTargetDelta(animationTarget);
7905
- this.currentAnimation.stop(false);
8059
+ this.currentAnimation.stop();
7906
8060
  }
7907
8061
  this.completeAnimation();
7908
8062
  }
@@ -8092,7 +8246,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
8092
8246
  resetTree() {
8093
8247
  this.root.nodes.forEach((node) => {
8094
8248
  var _a;
8095
- return (_a = node.currentAnimation) == null ? void 0 : _a.stop(false);
8249
+ return (_a = node.currentAnimation) == null ? void 0 : _a.stop();
8096
8250
  });
8097
8251
  this.root.nodes.forEach(clearMeasurements);
8098
8252
  this.root.sharedNodes.clear();
@@ -8590,7 +8744,7 @@ var camelCaseAttributes = /* @__PURE__ */ new Set([
8590
8744
  function renderSVG(element, renderState, _styleProp, projection) {
8591
8745
  renderHTML(element, renderState, void 0, projection);
8592
8746
  for (const key7 in renderState.attrs) {
8593
- element.setAttribute(!camelCaseAttributes.has(key7) ? camelToDash(key7) : key7, renderState.attrs[key7]);
8747
+ element.setAttribute(!camelCaseAttributes.has(key7) ? camelToDash2(key7) : key7, renderState.attrs[key7]);
8594
8748
  }
8595
8749
  }
8596
8750
  var SVGVisualElement = class extends DOMVisualElement {
@@ -8608,7 +8762,7 @@ var SVGVisualElement = class extends DOMVisualElement {
8608
8762
  const defaultType = getDefaultValueType(key7);
8609
8763
  return defaultType ? defaultType.default || 0 : 0;
8610
8764
  }
8611
- key7 = !camelCaseAttributes.has(key7) ? camelToDash(key7) : key7;
8765
+ key7 = !camelCaseAttributes.has(key7) ? camelToDash2(key7) : key7;
8612
8766
  return instance.getAttribute(key7);
8613
8767
  }
8614
8768
  scrapeMotionValuesFromProps(props, prevProps, visualElement) {
@@ -8667,7 +8821,7 @@ function getElementSize(target, borderBoxSize) {
8667
8821
  height: blockSize,
8668
8822
  };
8669
8823
  }
8670
- else if (target instanceof SVGElement && 'getBBox' in target) {
8824
+ else if (isSVGElement(target) && 'getBBox' in target) {
8671
8825
  return target.getBBox();
8672
8826
  }
8673
8827
  else {
@@ -8803,7 +8957,7 @@ function calcInset(element, container) {
8803
8957
  };
8804
8958
  let current2 = element;
8805
8959
  while (current2 && current2 !== container) {
8806
- if (current2 instanceof HTMLElement) {
8960
+ if (isHTMLElement(current2)) {
8807
8961
  inset2.x += current2.offsetLeft;
8808
8962
  inset2.y += current2.offsetTop;
8809
8963
  current2 = current2.offsetParent;
@@ -8961,8 +9115,8 @@ function measure(container, target = container, info) {
8961
9115
  }
8962
9116
  function createOnScrollHandler(element, onScroll, info, options = {}) {
8963
9117
  return {
8964
- measure: () => measure(element, options.target, info),
8965
- update: (time2) => {
9118
+ measure: (time2) => {
9119
+ measure(element, options.target, info);
8966
9120
  updateScrollInfo(element, info, time2);
8967
9121
  if (options.offset || options.target) {
8968
9122
  resolveOffsets(element, info, options);
@@ -8988,23 +9142,17 @@ function scrollInfo(onScroll, { container = document.scrollingElement, ...option
8988
9142
  containerHandlers.add(containerHandler);
8989
9143
  if (!scrollListeners.has(container)) {
8990
9144
  const measureAll = () => {
8991
- for (const handler of containerHandlers)
8992
- handler.measure();
8993
- };
8994
- const updateAll = () => {
8995
9145
  for (const handler of containerHandlers) {
8996
- handler.update(frameData.timestamp);
9146
+ handler.measure(frameData.timestamp);
8997
9147
  }
9148
+ frame.preUpdate(notifyAll2);
8998
9149
  };
8999
9150
  const notifyAll2 = () => {
9000
- for (const handler of containerHandlers)
9151
+ for (const handler of containerHandlers) {
9001
9152
  handler.notify();
9153
+ }
9002
9154
  };
9003
- const listener2 = () => {
9004
- frame.read(measureAll);
9005
- frame.read(updateAll);
9006
- frame.preUpdate(notifyAll2);
9007
- };
9155
+ const listener2 = () => frame.read(measureAll);
9008
9156
  scrollListeners.set(container, listener2);
9009
9157
  const target = getEventTarget(container);
9010
9158
  window.addEventListener('resize', listener2, {
@@ -9190,74 +9338,6 @@ function useMotionTemplate(fragments, ...values) {
9190
9338
  }
9191
9339
  return useCombineMotionValues(values.filter(isMotionValue), buildValue);
9192
9340
  }
9193
- function useSpring(source, config = {}) {
9194
- const { isStatic, } = useContext(MotionConfigContext);
9195
- const activeSpringAnimation = useRef3(null);
9196
- const initialValue = useConstant(() => isMotionValue(source) ? source.get() : source);
9197
- const unit = useConstant(() => typeof initialValue === 'string' ? initialValue.replace(/[\d.-]/g, '') : void 0);
9198
- const value = useMotionValue(initialValue);
9199
- const latestValue = useRef3(initialValue);
9200
- const latestSetter = useRef3(noop);
9201
- const startAnimation2 = () => {
9202
- stopAnimation2();
9203
- activeSpringAnimation.current = new JSAnimation({
9204
- keyframes: [asNumber2(value.get()), asNumber2(latestValue.current),],
9205
- velocity: value.getVelocity(),
9206
- type: 'spring',
9207
- restDelta: 1e-3,
9208
- restSpeed: 0.01,
9209
- ...config,
9210
- onUpdate: latestSetter.current,
9211
- });
9212
- };
9213
- const stopAnimation2 = () => {
9214
- if (activeSpringAnimation.current) {
9215
- activeSpringAnimation.current.stop();
9216
- }
9217
- };
9218
- useInsertionEffect(() => {
9219
- return value.attach((v, set) => {
9220
- if (isStatic)
9221
- return set(v);
9222
- latestValue.current = v;
9223
- latestSetter.current = (latest) => set(parseValue(latest, unit));
9224
- frame.postRender(startAnimation2);
9225
- return value.get();
9226
- }, stopAnimation2);
9227
- }, [JSON.stringify(config),]);
9228
- useIsomorphicLayoutEffect(() => {
9229
- if (isMotionValue(source)) {
9230
- return source.on('change', (v) => value.set(parseValue(v, unit)));
9231
- }
9232
- }, [value, unit,]);
9233
- return value;
9234
- }
9235
- function parseValue(v, unit) {
9236
- return unit ? v + unit : v;
9237
- }
9238
- function asNumber2(v) {
9239
- return typeof v === 'number' ? v : parseFloat(v);
9240
- }
9241
- function useAnimationFrame(callback) {
9242
- const initialTimestamp = useRef3(0);
9243
- const { isStatic, } = useContext(MotionConfigContext);
9244
- useEffect(() => {
9245
- if (isStatic)
9246
- return;
9247
- const provideTimeSinceStart = ({ timestamp, delta, }) => {
9248
- if (!initialTimestamp.current)
9249
- initialTimestamp.current = timestamp;
9250
- callback(timestamp - initialTimestamp.current, delta);
9251
- };
9252
- frame.update(provideTimeSinceStart, true);
9253
- return () => cancelFrame(provideTimeSinceStart);
9254
- }, [callback,]);
9255
- }
9256
- function useTime() {
9257
- const time2 = useMotionValue(0);
9258
- useAnimationFrame((t) => time2.set(t));
9259
- return time2;
9260
- }
9261
9341
  function useComputed(compute) {
9262
9342
  collectMotionValues.current = [];
9263
9343
  compute();
@@ -9285,6 +9365,38 @@ function useListTransform(values, transformer) {
9285
9365
  return transformer(latest);
9286
9366
  });
9287
9367
  }
9368
+ function useSpring(source, options = {}) {
9369
+ const { isStatic, } = useContext(MotionConfigContext);
9370
+ const getFromSource = () => isMotionValue(source) ? source.get() : source;
9371
+ if (isStatic) {
9372
+ return useTransform(getFromSource);
9373
+ }
9374
+ const value = useMotionValue(getFromSource());
9375
+ useInsertionEffect(() => {
9376
+ return attachSpring(value, source, options);
9377
+ }, [value, JSON.stringify(options),]);
9378
+ return value;
9379
+ }
9380
+ function useAnimationFrame(callback) {
9381
+ const initialTimestamp = useRef3(0);
9382
+ const { isStatic, } = useContext(MotionConfigContext);
9383
+ useEffect(() => {
9384
+ if (isStatic)
9385
+ return;
9386
+ const provideTimeSinceStart = ({ timestamp, delta, }) => {
9387
+ if (!initialTimestamp.current)
9388
+ initialTimestamp.current = timestamp;
9389
+ callback(timestamp - initialTimestamp.current, delta);
9390
+ };
9391
+ frame.update(provideTimeSinceStart, true);
9392
+ return () => cancelFrame(provideTimeSinceStart);
9393
+ }, [callback,]);
9394
+ }
9395
+ function useTime() {
9396
+ const time2 = useMotionValue(0);
9397
+ useAnimationFrame((t) => time2.set(t));
9398
+ return time2;
9399
+ }
9288
9400
  function useVelocity(value) {
9289
9401
  const velocity = useMotionValue(value.getVelocity());
9290
9402
  const updateVelocity = () => {
@@ -9686,7 +9798,7 @@ function createDOMVisualElement(element) {
9686
9798
  latestValues: {},
9687
9799
  },
9688
9800
  };
9689
- const node = isSVGElement(element) ? new SVGVisualElement(options) : new HTMLVisualElement(options);
9801
+ const node = isSVGElement(element) && !isSVGSVGElement(element) ? new SVGVisualElement(options) : new HTMLVisualElement(options);
9690
9802
  node.mount(element);
9691
9803
  visualElementStore.set(element, node);
9692
9804
  }
@@ -10390,7 +10502,7 @@ function stagger(duration = 0.1, { startDelay = 0, from = 0, ease: ease2, } = {}
10390
10502
  return startDelay + delay2;
10391
10503
  };
10392
10504
  }
10393
- // /:https://app.framerstatic.com/framer.7ISJZ3TZ.mjs
10505
+ // /:https://app.framerstatic.com/framer.C2MZBAEL.mjs
10394
10506
  import { lazy as ReactLazy, } from 'react';
10395
10507
  import React4 from 'react';
10396
10508
  import { startTransition as startTransition2, } from 'react';
@@ -10398,6 +10510,7 @@ import { Suspense as Suspense2, } from 'react';
10398
10510
  import { memo as memo2, } from 'react';
10399
10511
  import ReactDOM from 'react-dom';
10400
10512
  import { createRef, } from 'react';
10513
+ import { useTransition, } from 'react';
10401
10514
  import { cloneElement as cloneElement32, } from 'react';
10402
10515
  var __unframerNavigator2 = typeof window !== 'undefined' ? navigator : void 0;
10403
10516
  var require_hsluv = __commonJS({
@@ -11595,10 +11708,10 @@ function useCurrentRouteId() {
11595
11708
  }
11596
11709
  function useOnRouteChange(cb) {
11597
11710
  const currentRoute = useCurrentRoute();
11598
- const [lastRoute, setLastRoute,] = React4.useState(currentRoute);
11599
- if (isEqual(lastRoute, currentRoute) || !currentRoute)
11711
+ const lastRoute = React4.useRef(currentRoute);
11712
+ if (isEqual(lastRoute.current, currentRoute) || !currentRoute)
11600
11713
  return;
11601
- setLastRoute(currentRoute);
11714
+ lastRoute.current = currentRoute;
11602
11715
  cb(currentRoute);
11603
11716
  }
11604
11717
  function useRoute(routeId) {
@@ -11671,7 +11784,7 @@ function isNumber2(value) {
11671
11784
  function isArray(value) {
11672
11785
  return Array.isArray(value);
11673
11786
  }
11674
- function isObject(value) {
11787
+ function isObject2(value) {
11675
11788
  return value !== null && typeof value === 'object' && !isArray(value);
11676
11789
  }
11677
11790
  function isUndefined(value) {
@@ -11687,7 +11800,7 @@ function isValidDate(value) {
11687
11800
  return value instanceof Date && !Number.isNaN(value.getTime());
11688
11801
  }
11689
11802
  function isGenerator2(value) {
11690
- return isObject(value) && isFunction(value.return);
11803
+ return isObject2(value) && isFunction(value.return);
11691
11804
  }
11692
11805
  var noop2 = () => { };
11693
11806
  var isWindow = typeof window !== 'undefined';
@@ -11793,7 +11906,9 @@ function interactionResponse(options) {
11793
11906
  setTimeout(resolve, 100);
11794
11907
  frame.read(() => {
11795
11908
  void schedulerYield(options).then(resolve);
11796
- });
11909
+ }, false,
11910
+ // In some cases, interactionResponse might be called in a rAF. This means, we should right away call `schedulerYield`, as the next paint follows immediately.
11911
+ true);
11797
11912
  });
11798
11913
  }
11799
11914
  function schedulerYield(options) {
@@ -12698,7 +12813,7 @@ async function pushRouteState(routeId, route, { currentRoutePath, currentPathVar
12698
12813
  }
12699
12814
  function isHistoryState(data2) {
12700
12815
  const routeIdKey = 'routeId';
12701
- return isObject(data2) && isString(data2[routeIdKey]);
12816
+ return isObject2(data2) && isString(data2[routeIdKey]);
12702
12817
  }
12703
12818
  function replaceHistoryState(data2, url, ignoreReplaceStateWrapper = false) {
12704
12819
  performance.mark('framer-history-replace');
@@ -12778,7 +12893,7 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId) {
12778
12893
  if (((_a = window.navigation) == null ? void 0 : _a.transition) &&
12779
12894
  ((_c = (_b = window.navigation) == null ? void 0 : _b.transition) == null ? void 0 : _c.navigationType) !== 'traverse')
12780
12895
  return;
12781
- if (!isObject(state))
12896
+ if (!isObject2(state))
12782
12897
  return;
12783
12898
  const { routeId, hash: hash2, pathVariables, localeId, } = state;
12784
12899
  if (!isString(routeId))
@@ -12789,7 +12904,7 @@ function usePopStateHandler(currentRouteId, setCurrentRouteId) {
12789
12904
  const stopMonitoringINPRelatedInputs = monitorINPRelatedInputs();
12790
12905
  void nextRender.promise.finally(stopMonitoringINPRelatedInputs);
12791
12906
  const changeRoute = () => {
12792
- setCurrentRouteId(routeId, isString(localeId) ? localeId : void 0, isString(hash2) ? hash2 : void 0, isObject(pathVariables) ? pathVariables : void 0, true, nextRender, false);
12907
+ setCurrentRouteId(routeId, isString(localeId) ? localeId : void 0, isString(hash2) ? hash2 : void 0, isObject2(pathVariables) ? pathVariables : void 0, true, nextRender, false);
12793
12908
  };
12794
12909
  const viewTransition = await startViewTransition2(currentRouteId.current, routeId, changeRoute);
12795
12910
  const navigationTransition = (_d = window.navigation) == null ? void 0 : _d.transition;
@@ -12836,7 +12951,7 @@ function getHashForRoute(hash2, route, hashVariables) {
12836
12951
  if (!resolvedHash)
12837
12952
  return void 0;
12838
12953
  const variables = Object.assign({}, route == null ? void 0 : route.elements, hashVariables);
12839
- return resolvedHash.replace(pathVariablesRegExp, (m2, p1) => String(variables[p1] ?? m2));
12954
+ return resolvedHash.replace(pathVariablesRegExp, (m2, p1) => variables[p1] ?? m2);
12840
12955
  }
12841
12956
  function getPathForRoute(route, { currentRoutePath, currentPathVariables, hash: hash2, pathVariables, hashVariables, relative: relative2 = true, preserveQueryParams, onlyHash = false, siteCanonicalURL, }) {
12842
12957
  const resolvedHash = getHashForRoute(hash2, route, hashVariables);
@@ -14234,7 +14349,7 @@ var Interpolation = {
14234
14349
  var NumberInterpolation = {
14235
14350
  interpolate(from, to) {
14236
14351
  [from, to,] = Interpolation.handleUndefined(from, to);
14237
- const a1 = +from;
14352
+ const a1 = from;
14238
14353
  const b1 = to - a1;
14239
14354
  return (progress2) => {
14240
14355
  const value = a1 + b1 * progress2;
@@ -14910,7 +15025,7 @@ function rgbToHsv(r, g, b) {
14910
15025
  const max = Math.max(r, g, b);
14911
15026
  const min = Math.min(r, g, b);
14912
15027
  const d = max - min;
14913
- let h;
15028
+ let h = 0;
14914
15029
  const s = max === 0 ? 0 : d / max;
14915
15030
  const v = max;
14916
15031
  if (max === min) {
@@ -15473,7 +15588,7 @@ var Color = /* @__PURE__ */ (() => {
15473
15588
  return false;
15474
15589
  };
15475
15590
  Color2.isColorObject = (color2) => {
15476
- return isObject(color2) && typeof color2.r === 'number' && typeof color2.g === 'number' && typeof color2.b === 'number' &&
15591
+ return isObject2(color2) && typeof color2.r === 'number' && typeof color2.g === 'number' && typeof color2.b === 'number' &&
15477
15592
  typeof color2.h === 'number' && typeof color2.s === 'number' && typeof color2.l === 'number' && typeof color2.a === 'number' &&
15478
15593
  typeof color2.roundA === 'number' && typeof color2.format === 'string';
15479
15594
  };
@@ -19967,7 +20082,7 @@ function injectComponentCSSRules() {
19967
20082
  }
19968
20083
  }
19969
20084
  function isReactComponent(component) {
19970
- return isObject(component) || isFunction(component);
20085
+ return isObject2(component) || isFunction(component);
19971
20086
  }
19972
20087
  var optionalKey = 'optional';
19973
20088
  function controlIsOptional(control) {
@@ -19998,14 +20113,14 @@ function getControlDefaultValue(control) {
19998
20113
  case 'number':
19999
20114
  return isNumber2(control.defaultValue) ? control.defaultValue : void 0;
20000
20115
  case 'transition':
20001
- return isObject(control.defaultValue) ? control.defaultValue : void 0;
20116
+ return isObject2(control.defaultValue) ? control.defaultValue : void 0;
20002
20117
  case 'border':
20003
- return isObject(control.defaultValue) ? control.defaultValue : void 0;
20118
+ return isObject2(control.defaultValue) ? control.defaultValue : void 0;
20004
20119
  case 'font':
20005
- return isObject(control.defaultValue) ? control.defaultValue : void 0;
20120
+ return isObject2(control.defaultValue) ? control.defaultValue : void 0;
20006
20121
  case 'object': {
20007
- const value = isObject(control.defaultValue) ? control.defaultValue : {};
20008
- if (isObject(control.controls)) {
20122
+ const value = isObject2(control.defaultValue) ? control.defaultValue : {};
20123
+ if (isObject2(control.controls)) {
20009
20124
  applyControlDefaultsToDefaultProps(value, control.controls);
20010
20125
  }
20011
20126
  return value;
@@ -20054,7 +20169,7 @@ function applyControlDefaultsToDefaultProps(defaultProps, controls) {
20054
20169
  }
20055
20170
  }
20056
20171
  function getDefaultProps(component) {
20057
- if (isObject(component.defaultProps)) {
20172
+ if (isObject2(component.defaultProps)) {
20058
20173
  return component.defaultProps;
20059
20174
  }
20060
20175
  const defaultProps = {};
@@ -22356,7 +22471,7 @@ function unwrapInlinedDisplayContents(element) {
22356
22471
  function useMeasureLayout(props, ref, getChildren = () => [], options = {}) {
22357
22472
  const { id: id3, visible, _needsMeasure, } = props;
22358
22473
  const { skipHook = false, } = options;
22359
- const inCodeComponent = Boolean(useContext(ComponentContainerContext));
22474
+ const inCodeComponent = useContext(ComponentContainerContext);
22360
22475
  const onCanvas = RenderTarget.current() === RenderTarget.canvas;
22361
22476
  useIsomorphicLayoutEffect2(() => {
22362
22477
  if (!onCanvas || inCodeComponent || skipHook) {
@@ -22656,7 +22771,7 @@ var LinearGradient = {
22656
22771
  * @param value -
22657
22772
  */
22658
22773
  isLinearGradient: (value) => {
22659
- return isObject(value) && linearGradientKeys.every((key7) => key7 in value) &&
22774
+ return isObject2(value) && linearGradientKeys.every((key7) => key7 in value) &&
22660
22775
  (isSimpleGradient(value) || isMultiStopGradient(value));
22661
22776
  },
22662
22777
  /** @internal */
@@ -22678,7 +22793,7 @@ var RadialGradient = {
22678
22793
  * @public
22679
22794
  */
22680
22795
  isRadialGradient: (value) => {
22681
- return isObject(value) && radialGradientKeys.every((key7) => key7 in value) &&
22796
+ return isObject2(value) && radialGradientKeys.every((key7) => key7 in value) &&
22682
22797
  (isSimpleGradient(value) || isMultiStopGradient(value));
22683
22798
  },
22684
22799
  /** @internal */
@@ -22907,7 +23022,7 @@ function useStyleAndRect(props) {
22907
23022
  React4.useInsertionEffect(() => {
22908
23023
  injectComponentCSSRules();
22909
23024
  }, []);
22910
- const inCodeComponent = Boolean(useContext(ComponentContainerContext));
23025
+ const inCodeComponent = useContext(ComponentContainerContext);
22911
23026
  const { style: style2, _initialStyle, __fromCanvasComponent, size, } = props;
22912
23027
  const unwrappedProps = unwrapFrameProps(props);
22913
23028
  const constraintsRect = useConstraints(unwrappedProps);
@@ -23071,7 +23186,7 @@ var VisibleFrame = /* @__PURE__ */ forwardRef(function VisibleFrame2(props, forw
23071
23186
  }
23072
23187
  useMeasureLayout(props, ref);
23073
23188
  const backgroundImage = backgroundImageFromProps(props);
23074
- const inCodeComponent = Boolean(useContext(ComponentContainerContext));
23189
+ const inCodeComponent = useContext(ComponentContainerContext);
23075
23190
  const parentSize = resolveParentSize(propsWithOverrides, unwrappedProps, rect, inCodeComponent);
23076
23191
  const wrappedContent = useProvideParentSize(
23077
23192
  /* @__PURE__ */ jsxs(Fragment, {
@@ -23267,7 +23382,7 @@ var SharedLayoutRoot = class extends Component2 {
23267
23382
  var _a;
23268
23383
  if (!this.scheduledPromotion || !this.lead || !this.follow)
23269
23384
  return null;
23270
- const needsReset = !!((_a = this.lead) == null ? void 0 : _a.layoutMaybeMutated) && !this.shouldAnimate;
23385
+ const needsReset = ((_a = this.lead) == null ? void 0 : _a.layoutMaybeMutated) && !this.shouldAnimate;
23271
23386
  this.lead.projectionNodes.forEach((projectionNode) => {
23272
23387
  var _a2;
23273
23388
  projectionNode == null ? void 0 : projectionNode.promote({
@@ -23342,7 +23457,7 @@ function setRef(ref, value) {
23342
23457
  }
23343
23458
  }
23344
23459
  function isMutableRef(ref) {
23345
- return isObject(ref) && 'current' in ref;
23460
+ return isObject2(ref) && 'current' in ref;
23346
23461
  }
23347
23462
  function refHasValue(ref) {
23348
23463
  return isMutableRef(ref) && ref.current !== null;
@@ -23463,6 +23578,21 @@ var SharedIntersectionObserver = class {
23463
23578
  }
23464
23579
  };
23465
23580
  var SharedIntersectionObserverContext = /* @__PURE__ */ createContext(/* @__PURE__ */ new Map());
23581
+ function observeElement(observers2, key7, element, root, callback, rootMargin, threshold) {
23582
+ let observer2 = observers2.get(key7);
23583
+ if (!observer2 || observer2.root !== (root == null ? void 0 : root.current)) {
23584
+ observer2 = new SharedIntersectionObserver({
23585
+ root: root == null ? void 0 : root.current,
23586
+ rootMargin,
23587
+ threshold,
23588
+ });
23589
+ observers2.set(key7, observer2);
23590
+ }
23591
+ observer2.observeElementWithCallback(element, callback);
23592
+ return () => {
23593
+ observer2.unobserve(element);
23594
+ };
23595
+ }
23466
23596
  function _useSharedIntersectionObserver(ref, callback, options) {
23467
23597
  const key7 = useConstant2(() => `${options.rootMargin}`);
23468
23598
  const observers2 = useContext(SharedIntersectionObserverContext);
@@ -23472,19 +23602,7 @@ function _useSharedIntersectionObserver(ref, callback, options) {
23472
23602
  return;
23473
23603
  if (element === null)
23474
23604
  return;
23475
- let observer2 = observers2.get(key7);
23476
- if (!observer2 || observer2.root !== (root == null ? void 0 : root.current)) {
23477
- observer2 = new SharedIntersectionObserver({
23478
- root: root == null ? void 0 : root.current,
23479
- rootMargin,
23480
- threshold,
23481
- });
23482
- observers2.set(key7, observer2);
23483
- }
23484
- observer2.observeElementWithCallback(element, callback);
23485
- return () => {
23486
- observer2 == null ? void 0 : observer2.unobserve(element);
23487
- };
23605
+ return observeElement(observers2, key7, element, root, callback, rootMargin, threshold);
23488
23606
  }, [enabled, callback, root, rootMargin, threshold,]);
23489
23607
  }
23490
23608
  var useSharedIntersectionObserver = typeof IntersectionObserver === 'undefined' ? noop2 : _useSharedIntersectionObserver;
@@ -23559,7 +23677,7 @@ var LayoutTree = class extends Component2 {
23559
23677
  this.isExiting = isExiting;
23560
23678
  if (isLead === void 0)
23561
23679
  return true;
23562
- const hasBecomeLead = !this.props.isLead && !!isLead;
23680
+ const hasBecomeLead = !this.props.isLead && isLead;
23563
23681
  const hasExitBeenCancelled = this.props.isExiting && !isExiting;
23564
23682
  const shouldPromote = hasBecomeLead || hasExitBeenCancelled;
23565
23683
  const shouldDemote = !!this.props.isLead && !isLead;
@@ -24943,7 +25061,7 @@ function containerContent(item) {
24943
25061
  const position = (_a = item == null ? void 0 : item.transition) == null ? void 0 : _a.position;
24944
25062
  const shouldStretchWidth = !position || position.left !== void 0 && position.right !== void 0;
24945
25063
  const shouldStretchHeight = !position || position.top !== void 0 && position.bottom !== void 0;
24946
- const canStretchStyle = 'style' in child.props ? isObject(child.props.style) : true;
25064
+ const canStretchStyle = 'style' in child.props ? isObject2(child.props.style) : true;
24947
25065
  if (shouldStretchWidth) {
24948
25066
  const canStretchWidth = 'width' in child.props;
24949
25067
  if (canStretchWidth)
@@ -26106,7 +26224,7 @@ function hasRadius(props) {
26106
26224
  }
26107
26225
  function getRadiusValue(value) {
26108
26226
  let num = Number(value);
26109
- if (typeof value === 'string' && Number.isNaN(Number(num))) {
26227
+ if (typeof value === 'string' && Number.isNaN(num)) {
26110
26228
  return value;
26111
26229
  }
26112
26230
  else if (isAnimatable2(value)) {
@@ -27225,7 +27343,7 @@ function makePaddingString({ top, left, bottom, right, }) {
27225
27343
  var Stack = /* @__PURE__ */ (() => {
27226
27344
  const StackInner = React4.forwardRef(function StackInner2(stackProps, forwardedRef) {
27227
27345
  const { as = 'div', direction = 'vertical', distribution = 'start', alignment = 'center', gap = 10, wrap: wrap2 = false, useFlexboxGap: externalUseFlexboxGap = true, children, style: styleProp, className: className2, willChangeTransform, __fromCodeComponentNode, parentSize, __contentWrapperStyle, ...containerProps } = stackProps;
27228
- const useFlexboxGap = Boolean(externalUseFlexboxGap || wrap2);
27346
+ const useFlexboxGap = externalUseFlexboxGap || wrap2;
27229
27347
  const stackRef = React4.useRef(null);
27230
27348
  const flexDirection = toFlexDirection(direction);
27231
27349
  const isReverse = isReverseDirection(flexDirection);
@@ -27635,7 +27753,7 @@ var Page = /* @__PURE__ */ React4.forwardRef(function Page2(props, forwardedRef)
27635
27753
  }
27636
27754
  const updateOnResize = React4.useCallback(() => {
27637
27755
  if (!hasFixedSize)
27638
- setForceUpdateCount((v) => v + 1);
27756
+ startTransition2(() => setForceUpdateCount((v) => v + 1));
27639
27757
  }, [hasFixedSize,]);
27640
27758
  React4.useEffect(() => {
27641
27759
  if (RenderTarget.current() !== RenderTarget.preview)
@@ -28839,7 +28957,7 @@ var useUpdateChildSize = ({ dragDirection, children, fromCanvasComponent, }) =>
28839
28957
  : updatedSize;
28840
28958
  return React4.cloneElement(child, update);
28841
28959
  });
28842
- }, [dragDirection, children,]);
28960
+ }, [dragDirection, children, fromCanvasComponent,]);
28843
28961
  };
28844
28962
  var numberFromOptionalMotionValue = (value) => {
28845
28963
  return typeof value === 'number' ? value : value.get();
@@ -29120,7 +29238,6 @@ var EmulatedScroll = /* @__PURE__ */ React4.forwardRef(function EmulatedScroll2(
29120
29238
  preserve3d: containerProps.preserve3d,
29121
29239
  children: [
29122
29240
  /* @__PURE__ */ jsx3(EmptyState, {
29123
- children,
29124
29241
  size: {
29125
29242
  width: isFiniteNumber(containerProps.width) ? containerProps.width : '100%',
29126
29243
  height: isFiniteNumber(containerProps.height) ? containerProps.height : '100%',
@@ -29128,6 +29245,7 @@ var EmulatedScroll = /* @__PURE__ */ React4.forwardRef(function EmulatedScroll2(
29128
29245
  insideUserCodeComponent: !containerProps.__fromCodeComponentNode,
29129
29246
  title: 'Scroll',
29130
29247
  description: 'Click and drag the connector to any frame on the canvas \u2192',
29248
+ children,
29131
29249
  }),
29132
29250
  useUpdateChildSize({
29133
29251
  dragDirection: direction,
@@ -30259,8 +30377,8 @@ var AnimationCollector = class {
30259
30377
  const initial = props.__framer__presenceInitial ?? props.initial;
30260
30378
  const animate3 = props.__framer__presenceAnimate ?? props.animate;
30261
30379
  const config = {
30262
- initial: isObject(initial) ? initial : void 0,
30263
- animate: isObject(animate3) ? animate3 : void 0,
30380
+ initial: isObject2(initial) ? initial : void 0,
30381
+ animate: isObject2(animate3) ? animate3 : void 0,
30264
30382
  transformTemplate: isString(transformTemplate2) ? transformTemplate2 : void 0,
30265
30383
  };
30266
30384
  for (const variantId of variants)
@@ -30420,6 +30538,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
30420
30538
  const values = useConstant2(makeFXValues);
30421
30539
  const mirrorStateRef = useRef3(false);
30422
30540
  const delay2 = useDelay();
30541
+ const animationPromiseRef = useRef3(null);
30423
30542
  const animateValues = useCallback(async () => {
30424
30543
  if (!loop)
30425
30544
  return;
@@ -30428,10 +30547,10 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
30428
30547
  const to = mirror ? defaultFXValues : loop;
30429
30548
  const from = mirror ? loop : defaultFXValues;
30430
30549
  mirrorStateRef.current = !mirrorStateRef.current;
30431
- return Promise.all(effectValuesKeys.map((key7) => {
30550
+ animationPromiseRef.current = Promise.all(effectValuesKeys.map((key7) => {
30432
30551
  if (shouldReduceMotion && key7 !== 'opacity')
30433
30552
  return;
30434
- values[key7].set(from[key7] ?? defaultFXValues[key7]);
30553
+ values[key7].jump(from[key7] ?? defaultFXValues[key7]);
30435
30554
  return new Promise((resolve) => {
30436
30555
  const opts = {
30437
30556
  ...transition,
@@ -30443,6 +30562,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
30443
30562
  }
30444
30563
  });
30445
30564
  }));
30565
+ return animationPromiseRef.current;
30446
30566
  }, [loop, loopRepeatType, loopTransition, shouldReduceMotion,]);
30447
30567
  const [isRunning, setIsRunning,] = useState(false);
30448
30568
  const shouldRunRef = useRef3(false);
@@ -30451,7 +30571,7 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
30451
30571
  return;
30452
30572
  await animateValues();
30453
30573
  await delay2(loopRepeatDelay ?? 0);
30454
- await animateLoop();
30574
+ void animateLoop();
30455
30575
  }, [animateValues, delay2, loopEffectEnabled, loopRepeatDelay,]);
30456
30576
  const start2 = useCallback(() => {
30457
30577
  if (shouldRunRef.current)
@@ -30503,15 +30623,26 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
30503
30623
  }, [start2, stop, loopPauseOffscreen, hasLoop,]);
30504
30624
  useEffect(() => {
30505
30625
  return () => stop();
30506
- }, []);
30626
+ }, [stop,]);
30627
+ const isIntersectingRef = useRef3(false);
30628
+ const stopAfterAnimationEnds = useCallback(async () => {
30629
+ if (!animationPromiseRef.current)
30630
+ return;
30631
+ await animationPromiseRef.current;
30632
+ if (isIntersectingRef.current)
30633
+ return;
30634
+ stop();
30635
+ }, [stop,]);
30507
30636
  const startAndStopBasedOnIntersection = useCallback((entry) => {
30508
30637
  if (entry.isIntersecting) {
30638
+ isIntersectingRef.current = true;
30509
30639
  start2();
30510
30640
  }
30511
30641
  else {
30512
- stop();
30642
+ isIntersectingRef.current = false;
30643
+ void stopAfterAnimationEnds();
30513
30644
  }
30514
- }, [start2, stop,]);
30645
+ }, [start2, stopAfterAnimationEnds,]);
30515
30646
  useSharedIntersectionObserver(ref, startAndStopBasedOnIntersection, {
30516
30647
  enabled: hasLoop && loopPauseOffscreen,
30517
30648
  });
@@ -30573,7 +30704,7 @@ function useParallax(options, ref, visibilityStyle) {
30573
30704
  };
30574
30705
  }
30575
30706
  function getTransition(value) {
30576
- if (isString(value) || !isObject(value))
30707
+ if (isString(value) || !isObject2(value))
30577
30708
  return void 0;
30578
30709
  return value == null ? void 0 : value.transition;
30579
30710
  }
@@ -30585,7 +30716,7 @@ function runEffectAnimation(target, effect, shouldReduceMotion, ref, appearId, i
30585
30716
  return resolve();
30586
30717
  const motionValue2 = effect.values[key7];
30587
30718
  motionValue2.stop();
30588
- let value = !isObject(target) ? defaultFXValues[key7] : (target == null ? void 0 : target[key7]) ?? defaultFXValues[key7];
30719
+ let value = !isObject2(target) ? defaultFXValues[key7] : (target == null ? void 0 : target[key7]) ?? defaultFXValues[key7];
30589
30720
  if (isMotionValue(value))
30590
30721
  value = value.get();
30591
30722
  if (!isNumber2(value))
@@ -30628,14 +30759,14 @@ function usePresenceAnimation({ initial: motionInitial, animate: motionAnimate,
30628
30759
  });
30629
30760
  const effect = useConstant2(() => {
30630
30761
  const base = initial ?? style2;
30631
- if (!isObject(base)) {
30762
+ if (!isObject2(base)) {
30632
30763
  return {
30633
30764
  values: makeFXValues(),
30634
30765
  };
30635
30766
  }
30636
30767
  const defaults = {};
30637
30768
  for (const key7 in base) {
30638
- const value = isObject(base) ? base[key7] : void 0;
30769
+ const value = isObject2(base) ? base[key7] : void 0;
30639
30770
  if (!isNumber2(value))
30640
30771
  continue;
30641
30772
  defaults[key7] = value;
@@ -31181,10 +31312,10 @@ var add2 = (values) => values.reduce((sum, value) => sum += value, 0);
31181
31312
  var multiply = (values) => values.reduce((sum, value) => sum = sum * value, 1);
31182
31313
  var reactRefObjectKey = 'current';
31183
31314
  function isReactRefObject(value) {
31184
- return isObject(value) && reactRefObjectKey in value;
31315
+ return isObject2(value) && reactRefObjectKey in value;
31185
31316
  }
31186
31317
  function addMotionValueStyle(style2, values) {
31187
- if (!style2 || !isObject(style2))
31318
+ if (!style2 || !isObject2(style2))
31188
31319
  return values;
31189
31320
  for (const key7 in style2) {
31190
31321
  const value = style2[key7];
@@ -31372,7 +31503,7 @@ var SynchronousSuspenseErrorBoundary = class extends Component2 {
31372
31503
  if (!isSuspense426Error(error))
31373
31504
  return;
31374
31505
  const componentStack = errorInfo == null ? void 0 : errorInfo.componentStack;
31375
- console.error('Caught an error in SynchronousSuspenseErrorBoundary:\n\n', error, '\n\nComponent stack:\n', componentStack, '\n\nThis error indicates a state update wasn\u2019t wrapped with startTransition. Some of the UI might flash as a result. If you are the author of this website, check recently added custom code, and if the issue persists, report it to the Framer team via https://www.framer.community/.');
31506
+ console.error('Caught an error in SynchronousSuspenseErrorBoundary:\n\n', error, '\n\nComponent stack:\n', componentStack, '\n\nThis error indicates a state update wasn\u2019t wrapped with startTransition. Some of the UI might flash as a result. If you are the author of this website, check recently added custom code, and if the issue persists, report it to the Framer team via https://www.framer.com/contact/.');
31376
31507
  const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : void 0;
31377
31508
  sendTrackingEvent('published_site_load_recoverable_error', {
31378
31509
  message: String(error),
@@ -31446,7 +31577,7 @@ function logError(...args) {
31446
31577
  function shouldEnableCodeBoundaries() {
31447
31578
  return RenderTarget.current() !== RenderTarget.canvas;
31448
31579
  }
31449
- function CodeComponentBoundary({ errorMessage, fallback, children, }) {
31580
+ function CodeComponentBoundary({ getErrorMessage, fallback, children, }) {
31450
31581
  if (!shouldEnableCodeBoundaries()) {
31451
31582
  return children;
31452
31583
  }
@@ -31454,7 +31585,7 @@ function CodeComponentBoundary({ errorMessage, fallback, children, }) {
31454
31585
  fallback,
31455
31586
  children: /* @__PURE__ */ jsx3(ClientSideErrorBoundary, {
31456
31587
  fallback,
31457
- errorMessage,
31588
+ getErrorMessage,
31458
31589
  children,
31459
31590
  }),
31460
31591
  });
@@ -31472,7 +31603,7 @@ var ClientSideErrorBoundary = class extends Component2 {
31472
31603
  };
31473
31604
  }
31474
31605
  componentDidCatch(error, errorInfo) {
31475
- logError(this.props.errorMessage, errorInfo == null ? void 0 : errorInfo.componentStack);
31606
+ logError(this.props.getErrorMessage(), errorInfo == null ? void 0 : errorInfo.componentStack);
31476
31607
  collectErrorToAnalytics(error, errorInfo);
31477
31608
  }
31478
31609
  render() {
@@ -31608,7 +31739,7 @@ function useMaybeWrapComponentWithCodeBoundary(children, scopeId, nodeId, isAuth
31608
31739
  const shouldWrapWithBoundary = shouldWrapComponentWithBoundary(scopeId, nearestExternalComponent == null ? void 0 : nearestExternalComponent.scopeId, nearestExternalComponent == null ? void 0 : nearestExternalComponent.level, isAuthoredByUser ?? false, isModuleExternal ?? false, inComponentSlot ?? false);
31609
31740
  if (shouldWrapWithBoundary) {
31610
31741
  children = /* @__PURE__ */ jsx3(CodeComponentBoundary, {
31611
- errorMessage: getErrorMessageForComponent(scopeId, nodeId),
31742
+ getErrorMessage: getErrorMessageForComponent.bind(null, scopeId, nodeId),
31612
31743
  fallback: null,
31613
31744
  children,
31614
31745
  });
@@ -32441,7 +32572,7 @@ function useDynamicMotionOrigin(initialPlacement, alignment) {
32441
32572
  function childrenWithOrigin(child, { x, y, }) {
32442
32573
  if (!child || !isReactChild(child) || !isReactElement(child))
32443
32574
  return null;
32444
- if (!isObject(child.props.style) && !isUndefined(child.props.style))
32575
+ if (!isObject2(child.props.style) && !isUndefined(child.props.style))
32445
32576
  return null;
32446
32577
  const style2 = {
32447
32578
  ...child.props.style,
@@ -32590,6 +32721,14 @@ function Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef,
32590
32721
  ],
32591
32722
  }), getPortalContainer(portalSelector, inComponent));
32592
32723
  }
32724
+ var Instance = /* @__PURE__ */ React4.forwardRef(function Instance2({ Component: Component17, ...props }, ref) {
32725
+ return Component17
32726
+ ? /* @__PURE__ */ jsx3(Component17, {
32727
+ ...props,
32728
+ ref,
32729
+ })
32730
+ : null;
32731
+ });
32593
32732
  var GracefullyDegradingErrorBoundary = class extends Component2 {
32594
32733
  constructor() {
32595
32734
  super(...arguments);
@@ -32598,7 +32737,7 @@ var GracefullyDegradingErrorBoundary = class extends Component2 {
32598
32737
  });
32599
32738
  __publicField(this, 'message', 'Made UI non-interactive due to an error');
32600
32739
  __publicField(this, 'messageFatal', 'Fatal error');
32601
- __publicField(this, 'messageReport', 'If you are the author of this website, please report this issue to the Framer team via https://www.framer.community/');
32740
+ __publicField(this, 'messageReport', 'If you are the author of this website, please report this issue to the Framer team via https://www.framer.com/contact/');
32602
32741
  }
32603
32742
  static getDerivedStateFromError(error) {
32604
32743
  return {
@@ -32614,7 +32753,7 @@ var GracefullyDegradingErrorBoundary = class extends Component2 {
32614
32753
 
32615
32754
  `, error);
32616
32755
  const sampleRate = Math.random();
32617
- if (sampleRate > 0.25)
32756
+ if (sampleRate > 0.5)
32618
32757
  return;
32619
32758
  const stack = error instanceof Error && typeof error.stack === 'string' ? error.stack : null;
32620
32759
  sendTrackingEvent('published_site_load_error', {
@@ -33949,7 +34088,7 @@ async function submitForm(action, data2, projectHash) {
33949
34088
  }
33950
34089
  }
33951
34090
  function responseHasError(response) {
33952
- return typeof response === 'object' && response !== null && 'error' in response && isObject(response.error) &&
34091
+ return typeof response === 'object' && response !== null && 'error' in response && isObject2(response.error) &&
33953
34092
  'message' in response.error && typeof response.error.message === 'string';
33954
34093
  }
33955
34094
  function isSamePage(a, b) {
@@ -34137,7 +34276,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
34137
34276
  if (isString(localeOrLocaleId)) {
34138
34277
  localeId = localeOrLocaleId;
34139
34278
  }
34140
- else if (isObject(localeOrLocaleId)) {
34279
+ else if (isObject2(localeOrLocaleId)) {
34141
34280
  localeId = localeOrLocaleId.id;
34142
34281
  }
34143
34282
  const defaultLocale = locales.find(({ id: id3, }) => id3 === defaultLocaleId);
@@ -34161,7 +34300,6 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
34161
34300
  });
34162
34301
  if (!localeResult)
34163
34302
  return;
34164
- const currentPathVariables2 = currentPathVariablesRef.current;
34165
34303
  const currentStatePaginationInfo = isHistoryState(window.history.state) ? window.history.state.paginationInfo : void 0;
34166
34304
  const currentPath = localeResult.path;
34167
34305
  currentPathVariablesRef.current = localeResult.pathVariables;
@@ -34171,7 +34309,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
34171
34309
  return;
34172
34310
  return pushHistoryState({
34173
34311
  routeId: currentRouteId2,
34174
- pathVariables: currentPathVariables2,
34312
+ pathVariables: localeResult.pathVariables,
34175
34313
  localeId: nextLocale.id,
34176
34314
  paginationInfo: currentStatePaginationInfo,
34177
34315
  }, currentPath, ignorePushStateWrapper);
@@ -34851,14 +34989,13 @@ _subscribers2 = /* @__PURE__ */ new WeakMap();
34851
34989
  _results = /* @__PURE__ */ new WeakMap();
34852
34990
  _SSRResults = /* @__PURE__ */ new WeakMap();
34853
34991
  _onlyPrefetched = /* @__PURE__ */ new WeakMap();
34854
- function useFetchRequests(requests, disabled) {
34992
+ function useFetchRequestsForChildren(requests, disabled, children) {
34855
34993
  const fetchClient = React2.useContext(FetchClientContext);
34856
34994
  if (!fetchClient) {
34857
34995
  throw new Error('useFetchRequest must be used within a FetchClientProvider');
34858
34996
  }
34859
34997
  const isRestoringCache = React2.useContext(IsRestoringCacheContext);
34860
34998
  const [observer2,] = React2.useState(() => new RequestsObserver(fetchClient, requests));
34861
- const [result, setResult,] = React2.useState(() => observer2.getServerResults());
34862
34999
  React2.useLayoutEffect(() => {
34863
35000
  if (disabled)
34864
35001
  return;
@@ -34867,19 +35004,16 @@ function useFetchRequests(requests, disabled) {
34867
35004
  });
34868
35005
  }, [requests, observer2, disabled,]);
34869
35006
  React2.useEffect(() => {
35007
+ return () => observer2.unmount();
35008
+ }, [observer2,]);
35009
+ const subscribe = React2.useCallback((onChange) => {
34870
35010
  if (isRestoringCache || disabled)
34871
- return;
34872
- const unsubscribe = observer2.subscribe(() => {
34873
- React2.startTransition(() => {
34874
- setResult(observer2.getResults());
34875
- });
34876
- });
34877
- return () => {
34878
- unsubscribe();
34879
- observer2.unmount();
34880
- };
34881
- }, [observer2, disabled, isRestoringCache,]);
34882
- return result;
35011
+ return noop4;
35012
+ return observer2.subscribe(onChange);
35013
+ }, [disabled, observer2, isRestoringCache,]);
35014
+ const synchronousData = React2.useSyncExternalStore(subscribe, observer2.getResults, observer2.getServerResults);
35015
+ const deferredData = React2.useDeferredValue(synchronousData);
35016
+ return useMemoOne(() => children(deferredData.data, deferredData.status), [deferredData, children,]);
34883
35017
  }
34884
35018
  function usePrefetch() {
34885
35019
  const fetchClient = React2.useContext(FetchClientContext);
@@ -35019,8 +35153,7 @@ var ResolveLinks = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ forwar
35019
35153
  }));
35020
35154
  var Fetcher = /* @__PURE__ */ React2.forwardRef(function Fetcher2({ requests, disabled, children, ...rest }, ref) {
35021
35155
  const cloneWithPropsAndRef = useCloneChildrenWithPropsAndRef(ref);
35022
- const { data: data2, status, } = useFetchRequests(requests, disabled);
35023
- const childrenWithValues = children(data2, status);
35156
+ const childrenWithValues = useFetchRequestsForChildren(requests, disabled, children);
35024
35157
  return cloneWithPropsAndRef(childrenWithValues, rest);
35025
35158
  });
35026
35159
  var callEach = (...fns) => fns.forEach((fn) => fn && fn());
@@ -35052,19 +35185,19 @@ function isAnyCollection(value) {
35052
35185
  return isAnyLegacyCollection(value) || isAnyDatabaseCollection(value);
35053
35186
  }
35054
35187
  function isLegacyCollection(value) {
35055
- return isArray(value) && value.every(isObject);
35188
+ return isArray(value) && value.every(isObject2);
35056
35189
  }
35057
35190
  function isLegacyLocalizedCollection(value) {
35058
- return isObject(value) && isFunction(value.read) && isFunction(value.preload);
35191
+ return isObject2(value) && isFunction(value.read) && isFunction(value.preload);
35059
35192
  }
35060
35193
  function isAnyLegacyCollection(value) {
35061
35194
  return isLegacyCollection(value) || isLegacyLocalizedCollection(value);
35062
35195
  }
35063
35196
  function isDatabaseCollection(value) {
35064
- return isObject(value) && isObject(value.schema);
35197
+ return isObject2(value) && isObject2(value.schema);
35065
35198
  }
35066
35199
  function isLocalizedDatabaseCollection(value) {
35067
- return isObject(value) && isObject(value.collectionByLocaleId);
35200
+ return isObject2(value) && isObject2(value.collectionByLocaleId);
35068
35201
  }
35069
35202
  function isAnyDatabaseCollection(value) {
35070
35203
  return isDatabaseCollection(value) || isLocalizedDatabaseCollection(value);
@@ -35944,7 +36077,7 @@ function Hash(value) {
35944
36077
  return value;
35945
36078
  }
35946
36079
  function isHashable(value) {
35947
- return isObject(value) && isFunction(value.getHash);
36080
+ return isObject2(value) && isFunction(value.getHash);
35948
36081
  }
35949
36082
  function calculateHash(name, ...values) {
35950
36083
  const hashes = values.map((value) => {
@@ -39455,7 +39588,7 @@ function getCollectionId(collection) {
39455
39588
  return id3;
39456
39589
  }
39457
39590
  function replaceCollection(_, value) {
39458
- if (isObject(value) && value.type === 'Collection' && isAnyCollection(value.data)) {
39591
+ if (isObject2(value) && value.type === 'Collection' && isAnyCollection(value.data)) {
39459
39592
  return getCollectionId(value.data);
39460
39593
  }
39461
39594
  return value;
@@ -39693,7 +39826,7 @@ function useDataRecord(collection, variables) {
39693
39826
  const pageRecord = collection.find((record2) => {
39694
39827
  return Object.entries(variables).every(([key7, value,]) => {
39695
39828
  const recordValue = record2[key7];
39696
- if (value === void 0 || recordValue === void 0 || isObject(value) || isObject(recordValue)) {
39829
+ if (value === void 0 || recordValue === void 0 || isObject2(value) || isObject2(recordValue)) {
39697
39830
  return false;
39698
39831
  }
39699
39832
  return String(value) === String(recordValue);
@@ -39738,7 +39871,7 @@ function useSiteRefs() {
39738
39871
  }, [path,]);
39739
39872
  }
39740
39873
  function isFramerGamepadKeydownData(value) {
39741
- return isObject(value) && value.mapping !== void 0;
39874
+ return isObject2(value) && value.mapping !== void 0;
39742
39875
  }
39743
39876
  function gamepadInputsHaveChanged(previous, current2) {
39744
39877
  if (previous.length !== current2.length)
@@ -39995,14 +40128,9 @@ function useOnAppear(callback) {
39995
40128
  default: callback,
39996
40129
  });
39997
40130
  }
39998
- async function setOverflow(blockDocumentScrolling, show, yieldBefore = true) {
40131
+ function setOverflow(blockDocumentScrolling, show) {
39999
40132
  if (blockDocumentScrolling === false)
40000
40133
  return;
40001
- if (yieldBefore) {
40002
- await yieldToMain({
40003
- continueAfter: 'paint',
40004
- });
40005
- }
40006
40134
  frame.render(() => {
40007
40135
  const htmlStyle = document.documentElement.style;
40008
40136
  if (show) {
@@ -40015,18 +40143,27 @@ async function setOverflow(blockDocumentScrolling, show, yieldBefore = true) {
40015
40143
  }
40016
40144
  function useOverlayState({ blockDocumentScrolling = true, } = {}) {
40017
40145
  const [showOverlay, setShowOverlay,] = React4.useState(false);
40018
- const callback = React4.useCallback((show) => {
40019
- setShowOverlay(show);
40020
- void setOverflow(blockDocumentScrolling, show);
40146
+ const callback = React4.useCallback(async (show) => {
40147
+ await yieldToMain({
40148
+ priority: 'user-blocking',
40149
+ continueAfter: 'paint',
40150
+ });
40151
+ startTransition2(() => setShowOverlay(show));
40152
+ setOverflow(blockDocumentScrolling, show);
40021
40153
  }, [blockDocumentScrolling,]);
40022
40154
  React4.useEffect(() => () => {
40023
- void setOverflow(blockDocumentScrolling, false, false);
40155
+ void yieldToMain({
40156
+ priority: 'user-blocking',
40157
+ continueAfter: 'paint',
40158
+ }).then(() => {
40159
+ setOverflow(blockDocumentScrolling, false);
40160
+ });
40024
40161
  }, [blockDocumentScrolling,]);
40025
40162
  return [showOverlay, callback,];
40026
40163
  }
40027
40164
  var key4 = 'page';
40028
40165
  function isRoute(route) {
40029
- return isObject(route) && key4 in route && route.page !== void 0;
40166
+ return isObject2(route) && key4 in route && route.page !== void 0;
40030
40167
  }
40031
40168
  async function componentForRoute(route) {
40032
40169
  if (!isRoute(route))
@@ -40044,7 +40181,7 @@ async function componentForRoute(route) {
40044
40181
  }
40045
40182
  var preloadKey2 = 'preload';
40046
40183
  function withPreload(component) {
40047
- return !!component && isObject(component) && preloadKey2 in component;
40184
+ return !!component && isObject2(component) && preloadKey2 in component;
40048
40185
  }
40049
40186
  function usePrototypeNavigate({ preload, } = {}) {
40050
40187
  const navigation = useNavigation();
@@ -40162,7 +40299,7 @@ function getWhereExpressionFromPathVariables(pathVariables, collection) {
40162
40299
  const entries = Object.entries(pathVariables ?? {}).filter(([, value,]) => {
40163
40300
  if (isUndefined(value))
40164
40301
  return false;
40165
- if (isObject(value))
40302
+ if (isObject2(value))
40166
40303
  return false;
40167
40304
  return true;
40168
40305
  });
@@ -40198,65 +40335,45 @@ function getWhereExpressionFromPathVariables(pathVariables, collection) {
40198
40335
  }));
40199
40336
  }
40200
40337
  function useLoadMorePagination(totalSize, pageSize, hash2, paginateWithSuspendedLoadingState = false) {
40338
+ var _a, _b, _c, _d;
40339
+ const [isPending, startLoadingTransition,] = useTransition();
40201
40340
  const totalPages = Math.ceil(totalSize / pageSize);
40202
- const [paginationInfo, setPaginationInfo,] = useState(() => {
40203
- var _a, _b, _c, _d;
40204
- const currentPage = ((_d = (_c = (_b = (_a = globalThis == null ? void 0 : globalThis.history) == null ? void 0 : _a.state) == null
40205
- ? void 0
40206
- : _b.paginationInfo) == null
40207
- ? void 0
40208
- : _c[hash2]) == null
40209
- ? void 0
40210
- : _d.currentPage) ?? 1;
40341
+ const [currentPage, setCurrentPage,] = useState(((_d = (_c = (_b = (_a = globalThis == null ? void 0 : globalThis.history) == null ? void 0 : _a.state) == null
40342
+ ? void 0
40343
+ : _b.paginationInfo) == null
40344
+ ? void 0
40345
+ : _c[hash2]) == null
40346
+ ? void 0
40347
+ : _d.currentPage) ?? 1);
40348
+ const paginationInfo = useMemo2(() => {
40211
40349
  return {
40212
40350
  currentPage,
40213
40351
  totalPages,
40214
- isLoading: false,
40352
+ isLoading: isPending,
40215
40353
  };
40216
- });
40217
- useEffect(() => {
40218
- startTransition2(() => {
40219
- setPaginationInfo((current2) => {
40220
- if (current2.totalPages === totalPages)
40221
- return current2;
40222
- return {
40223
- ...current2,
40224
- totalPages,
40225
- };
40226
- });
40227
- });
40228
- }, [totalPages,]);
40354
+ }, [currentPage, totalPages, isPending,]);
40229
40355
  useEffect(() => {
40230
40356
  pushLoadMoreHistory(hash2, paginationInfo);
40231
40357
  }, [hash2, paginationInfo,]);
40232
40358
  const onCanvas = useIsOnFramerCanvas();
40233
- const loadMore = useCallback(() => {
40359
+ const loadMore = useCallback(async () => {
40234
40360
  if (onCanvas)
40235
40361
  return;
40236
- if (paginationInfo.currentPage >= paginationInfo.totalPages)
40362
+ if (currentPage >= totalPages)
40237
40363
  return;
40238
- if (!paginateWithSuspendedLoadingState) {
40239
- startTransition2(() => {
40240
- setPaginationInfo((info) => ({
40241
- ...info,
40242
- currentPage: Math.min(info.currentPage + 1, info.totalPages),
40243
- isLoading: false,
40244
- }));
40245
- });
40246
- return;
40247
- }
40248
- setPaginationInfo((info) => ({
40249
- ...info,
40250
- isLoading: true,
40251
- }));
40252
- requestAnimationFrame(() => {
40253
- setPaginationInfo((info) => ({
40254
- ...info,
40255
- currentPage: Math.min(info.currentPage + 1, info.totalPages),
40256
- isLoading: false,
40257
- }));
40364
+ await yieldToMain({
40365
+ priority: 'user-blocking',
40366
+ continueAfter: 'paint',
40258
40367
  });
40259
- }, [onCanvas, paginationInfo.currentPage, paginationInfo.totalPages, paginateWithSuspendedLoadingState,]);
40368
+ const renderNextPage = (startTransition14) => {
40369
+ startTransition14(() => {
40370
+ setCurrentPage((_currentPage) => Math.min(_currentPage + 1, totalPages));
40371
+ });
40372
+ };
40373
+ if (!paginateWithSuspendedLoadingState)
40374
+ return renderNextPage(startTransition2);
40375
+ return renderNextPage(startLoadingTransition);
40376
+ }, [currentPage, totalPages, paginateWithSuspendedLoadingState,]);
40260
40377
  return {
40261
40378
  paginationInfo,
40262
40379
  loadMore,
@@ -40375,15 +40492,16 @@ function useRunCallbackIfPageIsVisible() {
40375
40492
  }, [clean,]);
40376
40493
  }
40377
40494
  function useRunCallbackIfElementIsInView() {
40378
- const observerRef = useRef3(null);
40495
+ const observerRefCleanup = useRef3();
40379
40496
  const isInViewRef = useRef3(false);
40380
40497
  const callbackRef = useRef3();
40498
+ const observers2 = useContext(SharedIntersectionObserverContext);
40381
40499
  useEffect(() => {
40382
40500
  return () => {
40383
40501
  var _a;
40384
- (_a = observerRef.current) == null ? void 0 : _a.disconnect();
40502
+ (_a = observerRefCleanup.current) == null ? void 0 : _a.call(observerRefCleanup);
40385
40503
  callbackRef.current = void 0;
40386
- observerRef.current = null;
40504
+ observerRefCleanup.current = void 0;
40387
40505
  };
40388
40506
  }, []);
40389
40507
  return useCallback((callback, ref) => {
@@ -40392,23 +40510,24 @@ function useRunCallbackIfElementIsInView() {
40392
40510
  return;
40393
40511
  }
40394
40512
  callbackRef.current = callback;
40395
- if (observerRef.current)
40513
+ if (observerRefCleanup.current)
40396
40514
  return;
40397
- const observer2 = new IntersectionObserver((entries) => {
40398
- var _a;
40399
- let isIntersecting = false;
40400
- for (let i = 0; i < entries.length; ++i) {
40401
- const entry = entries[i];
40402
- isIntersecting = entry.isIntersecting;
40403
- }
40404
- isInViewRef.current = isIntersecting;
40405
- if (!isIntersecting)
40515
+ let queuedMicrotask = false;
40516
+ const observerCallback = (entry) => {
40517
+ isInViewRef.current = entry.isIntersecting;
40518
+ if (queuedMicrotask)
40406
40519
  return;
40407
- (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef);
40408
- });
40409
- observerRef.current = observer2;
40410
- observer2.observe(ref.current);
40411
- }, []);
40520
+ queuedMicrotask = true;
40521
+ queueMicrotask(() => {
40522
+ var _a;
40523
+ if (!isInViewRef.current)
40524
+ return;
40525
+ queuedMicrotask = false;
40526
+ (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef);
40527
+ });
40528
+ };
40529
+ observerRefCleanup.current = observeElement(observers2, 'undefined', ref.current, null, observerCallback);
40530
+ }, [observers2,]);
40412
40531
  }
40413
40532
  function useUpdateIfVisible(ref) {
40414
40533
  const runUpdateIfPageIsVisible = useRunCallbackIfPageIsVisible();
@@ -40426,20 +40545,27 @@ var globalWaitingForClickPromise;
40426
40545
  var globalWaitingForClickResolve;
40427
40546
  async function getPromiseWithFallback() {
40428
40547
  return new Promise((resolve) => {
40429
- const resolveFn = () => {
40548
+ let resolveFn = resolve;
40549
+ setTimeout(() => {
40550
+ if (!resolveFn)
40551
+ return;
40552
+ performance.mark('wait-for-click-fallback');
40553
+ resolveFn();
40554
+ }, 150);
40555
+ globalWaitingForClickResolve = () => {
40430
40556
  resolve();
40431
- clearTimeout(timeout);
40557
+ resolveFn = void 0;
40432
40558
  };
40433
- const timeout = setTimeout(resolveFn, 150);
40434
- globalWaitingForClickResolve = resolveFn;
40435
40559
  });
40436
40560
  }
40437
40561
  function globalWaitForClickListener(event) {
40438
40562
  if (event.button === 0) {
40563
+ performance.mark('pointerdown-listener');
40439
40564
  globalWaitingForClickPromise = getPromiseWithFallback();
40440
40565
  }
40441
40566
  }
40442
40567
  function globalClickReceivedListener() {
40568
+ performance.mark('click-received-listener');
40443
40569
  globalWaitingForClickPromise = void 0;
40444
40570
  globalWaitingForClickResolve == null ? void 0 : globalWaitingForClickResolve();
40445
40571
  globalWaitingForClickResolve = void 0;
@@ -40495,13 +40621,17 @@ function useVariantState({ variant, defaultVariant: externalDefaultVariant, tran
40495
40621
  internalState.current.gestureVariant = nextGesture;
40496
40622
  const yieldOnTap = yieldOnTapFeatureOn && internalState.current.isPressedHasUpdated;
40497
40623
  if (yieldOnTap && globalWaitingForClickPromise) {
40624
+ performance.mark('wait-for-tap-start');
40498
40625
  await globalWaitingForClickPromise;
40626
+ performance.measure('wait-for-tap', 'wait-for-tap-start');
40499
40627
  }
40500
40628
  if (yieldOnTap) {
40629
+ performance.mark('yield-on-tap-start');
40501
40630
  await yieldToMain({
40502
40631
  priority: 'user-blocking',
40503
40632
  continueAfter: 'paint',
40504
40633
  });
40634
+ performance.measure('yield-on-tap', 'yield-on-tap-start');
40505
40635
  }
40506
40636
  const { isHovered: isHovered2, isPressed: isPressed2, isHoveredHasUpdated, isPressedHasUpdated, } = internalState.current;
40507
40637
  if (isHovered2 || isHoveredHasUpdated || isPressed2 || isPressedHasUpdated) {
@@ -40626,7 +40756,7 @@ function withCodeBoundaryForOverrides(Component17, { scopeId, nodeId, override,
40626
40756
  if (shouldWrapWithBoundary) {
40627
40757
  if (appliedOverride.status === 'success') {
40628
40758
  return /* @__PURE__ */ jsx3(CodeComponentBoundary, {
40629
- errorMessage: getErrorMessageForOverride(scopeId, nodeId),
40759
+ getErrorMessage: getErrorMessageForOverride.bind(null, scopeId, nodeId),
40630
40760
  fallback: /* @__PURE__ */ jsx3(Component17, {
40631
40761
  ...props,
40632
40762
  ref,
@@ -40853,7 +40983,7 @@ var withVariantAppearEffect = (Component17) => React4.forwardRef((props, forward
40853
40983
  });
40854
40984
  });
40855
40985
  }, [animateOnce, threshold, targets, props.variant, scrollDirection, exitTarget,]);
40856
- useScrollDirectionChange(scrollDirection, setVariant, {
40986
+ useScrollDirectionChange(scrollDirection, (variant) => React4.startTransition(() => setVariant(variant)), {
40857
40987
  enabled: variantAppearEffectEnabled,
40858
40988
  repeat: !animateOnce,
40859
40989
  });
@@ -40862,7 +40992,7 @@ var withVariantAppearEffect = (Component17) => React4.forwardRef((props, forward
40862
40992
  return;
40863
40993
  const useObscuredVariant = !options.targets && !options.scrollDirection;
40864
40994
  const target = useObscuredVariant ? options.obscuredVariantId : void 0;
40865
- React4.startTransition(() => setVariant(target));
40995
+ startTransition2(() => setVariant(target));
40866
40996
  });
40867
40997
  if (!('variantAppearEffectEnabled' in options) || variantAppearEffectEnabled === true) {
40868
40998
  return /* @__PURE__ */ jsx3(Component17, {
@@ -42698,10 +42828,10 @@ function loadVariationAxes(source) {
42698
42828
  }
42699
42829
  }
42700
42830
  function isValidVariationAxesData(data2) {
42701
- return isObject(data2) && Object.values(data2).every(isValidVariationAxes);
42831
+ return isObject2(data2) && Object.values(data2).every(isValidVariationAxes);
42702
42832
  }
42703
42833
  function isVariationAxis2(data2) {
42704
- return isObject(data2) && isString(data2.tag);
42834
+ return isObject2(data2) && isString(data2.tag);
42705
42835
  }
42706
42836
  function isValidVariationAxes(data2) {
42707
42837
  return Array.isArray(data2) && data2.every(isVariationAxis2);
@@ -42710,10 +42840,13 @@ var FontStore = class {
42710
42840
  constructor() {
42711
42841
  __publicField(this, 'enabled', false);
42712
42842
  __publicField(this, 'bySelector', /* @__PURE__ */ new Map());
42843
+ __publicField(this, 'loadedSelectors', /* @__PURE__ */ new Set());
42713
42844
  __publicField(this, 'getGoogleFontsListPromise');
42714
42845
  __publicField(this, 'getFontshareFontsListPromise');
42715
42846
  __publicField(this, 'getBuiltInFontsListPromise');
42716
- __publicField(this, 'loadedSelectors', /* @__PURE__ */ new Set());
42847
+ __publicField(this, 'customFontsImportPromise', new Promise((resolve) => {
42848
+ this.resolveCustomFontsImportPromise = resolve;
42849
+ }));
42717
42850
  __publicField(this, 'local');
42718
42851
  __publicField(this, 'google');
42719
42852
  __publicField(this, 'fontshare');
@@ -42790,9 +42923,13 @@ var FontStore = class {
42790
42923
  this.bySelector.delete(key7);
42791
42924
  }
42792
42925
  });
42793
- for (const font of this.custom.importFonts(assets)) {
42926
+ const importedFonts = this.custom.importFonts(assets);
42927
+ for (const font of importedFonts) {
42794
42928
  this.addFont(font);
42795
42929
  }
42930
+ if (importedFonts.length > 0) {
42931
+ this.resolveCustomFontsImportPromise();
42932
+ }
42796
42933
  }
42797
42934
  getFontFamily(info) {
42798
42935
  const fontFamily = this[info.source].getFontFamilyByName(info.name);
@@ -42948,6 +43085,12 @@ var FontStore = class {
42948
43085
  warnOnce2('Failed to load built-in fonts:', error);
42949
43086
  }));
42950
43087
  }
43088
+ const shouldImportCustomFonts = selectors.some((selector) => selector.startsWith(customFontSelectorPrefix));
43089
+ if (shouldImportCustomFonts) {
43090
+ importPromises.push(this.customFontsImportPromise.catch((error) => {
43091
+ warnOnce2('Failed to load custom fonts:', error);
43092
+ }));
43093
+ }
42951
43094
  if (importPromises.length > 0) {
42952
43095
  await Promise.all(importPromises);
42953
43096
  }
@@ -43222,10 +43365,9 @@ var PlainTextInput = /* @__PURE__ */ forwardRef(function FormPlainTextInput(prop
43222
43365
  className: cx(textInputWrapperClassName, inputWrapperClassName, className2),
43223
43366
  ...rest,
43224
43367
  children: type === 'textarea'
43225
- ? /* @__PURE__ */ createElement(motion.textarea, {
43368
+ ? /* @__PURE__ */ jsx3(motion.textarea, {
43226
43369
  ...dataProps,
43227
43370
  ...eventHandlers,
43228
- key: defaultValue,
43229
43371
  required,
43230
43372
  autoFocus,
43231
43373
  name: inputName,
@@ -43233,11 +43375,10 @@ var PlainTextInput = /* @__PURE__ */ forwardRef(function FormPlainTextInput(prop
43233
43375
  className: inputClassName,
43234
43376
  defaultValue,
43235
43377
  maxLength,
43236
- })
43237
- : /* @__PURE__ */ createElement(motion.input, {
43378
+ }, defaultValue)
43379
+ : /* @__PURE__ */ jsx3(motion.input, {
43238
43380
  ...dataProps,
43239
43381
  ...eventHandlers,
43240
- key: defaultValue,
43241
43382
  type,
43242
43383
  required,
43243
43384
  autoFocus,
@@ -43249,7 +43390,7 @@ var PlainTextInput = /* @__PURE__ */ forwardRef(function FormPlainTextInput(prop
43249
43390
  max,
43250
43391
  step: step2,
43251
43392
  maxLength,
43252
- }),
43393
+ }, defaultValue),
43253
43394
  });
43254
43395
  });
43255
43396
  var iconSize2 = 16;
@@ -44499,7 +44640,7 @@ function extractTextFromReactNode(node) {
44499
44640
  var RichText2 = /* @__PURE__ */ forwardRef(function RichText3({ children, html, htmlFromDesign, ...props }, ref) {
44500
44641
  const content = html || children || htmlFromDesign;
44501
44642
  if (isString(content)) {
44502
- if (!props.stylesPresetsClassName && isObject(props.stylesPresetsClassNames)) {
44643
+ if (!props.stylesPresetsClassName && isObject2(props.stylesPresetsClassNames)) {
44503
44644
  props.stylesPresetsClassName = Object.values(props.stylesPresetsClassNames).join(' ');
44504
44645
  }
44505
44646
  const contentProp = {
@@ -46537,7 +46678,7 @@ var VectorGroup = /* @__PURE__ */ (() => {
46537
46678
  })();
46538
46679
  var key6 = 'calculatedPaths';
46539
46680
  function withShape(target) {
46540
- if (!isObject(target))
46681
+ if (!isObject2(target))
46541
46682
  return false;
46542
46683
  return key6 in target;
46543
46684
  }
@@ -46775,7 +46916,7 @@ function inspect(item, max, l) {
46775
46916
  if (item === void 0) {
46776
46917
  return 'undefined';
46777
46918
  }
46778
- if (isObject(item) && isFunction(item.toInspect)) {
46919
+ if (isObject2(item) && isFunction(item.toInspect)) {
46779
46920
  return item.toInspect();
46780
46921
  }
46781
46922
  if (isString(item)) {
@@ -46788,7 +46929,7 @@ function inspect(item, max, l) {
46788
46929
  let code = item.toString().slice('function '.length).replace(/\n/gu, '').replace(/\s+/gu, ' ');
46789
46930
  const limit = 50;
46790
46931
  if (code.length > limit && l > 0) {
46791
- code = `${code.slice(0, +limit + 1 || void 0).trim()}\u2026 }`;
46932
+ code = `${code.slice(0, limit + 1).trim()}\u2026 }`;
46792
46933
  }
46793
46934
  return `<Function ${code}>`;
46794
46935
  }
@@ -46798,7 +46939,7 @@ function inspect(item, max, l) {
46798
46939
  }
46799
46940
  return `[${item.map((i) => inspect(i, max, (l || 0) + 1)).join(', ')}]`;
46800
46941
  }
46801
- if (isObject(item)) {
46942
+ if (isObject2(item)) {
46802
46943
  let objectInfo;
46803
46944
  const objectType = inspectObjectType(item);
46804
46945
  if (/HTML\w+?Element/u.test(objectType)) {
@@ -46877,8 +47018,8 @@ var package_default = {
46877
47018
  '@types/react': '^18.2.67',
46878
47019
  '@types/react-dom': '^18.2.22',
46879
47020
  '@types/yargs': '^17.0.33',
46880
- '@typescript-eslint/eslint-plugin': '^8.29.1',
46881
- '@typescript-eslint/parser': '^8.29.1',
47021
+ '@typescript-eslint/eslint-plugin': '^8.32.1',
47022
+ '@typescript-eslint/parser': '^8.32.1',
46882
47023
  chalk: '^4.1.2',
46883
47024
  eslint: '^8.57.1',
46884
47025
  'eslint-plugin-framer-studio': 'workspace:*',
@@ -46894,7 +47035,7 @@ var package_default = {
46894
47035
  yargs: '^17.7.2',
46895
47036
  },
46896
47037
  peerDependencies: {
46897
- 'framer-motion': '12.11.4',
47038
+ 'framer-motion': '12.14.0',
46898
47039
  react: '^18.2.0',
46899
47040
  'react-dom': '^18.2.0',
46900
47041
  },
@@ -46912,7 +47053,7 @@ MotionValue.prototype.addChild = function ({ transformer = (v) => v, }) {
46912
47053
  if (false) {
46913
47054
  MainLoop2.start();
46914
47055
  }
46915
- export { _injectRuntime, acceleratedValues2 as acceleratedValues, activeAnimations, addActionControls, addFonts, addPointerEvent, addPointerInfo, addPropertyControls, addScaleCorrector, addUniqueItem, alpha, analyseComplexValue, AnchorLinkTarget, Animatable, animate2 as animate, animateMini, AnimatePresence, AnimateSharedLayout, animateValue, animateView, animateVisualElement, animationControls, animationMapKey, animations, annotateTypeOnStringify, anticipate, AnyInterpolation, applyPxDefaults, AsyncMotionValueAnimation, AutomaticLayoutIds, BackgroundImage, backgroundImageFromProps, backIn, backInOut, backOut, BezierAnimator, BoxShadow, buildTransform2 as buildTransform, calcGeneratorDuration, calcLength, calculateRect, callEach, cancelFrame, cancelMicrotask, cancelSync, ChildrenCanSuspend, circIn, circInOut, circOut, clamp, clampRGB, collectMotionValues, collectVisualStyleFromProps, Color, color, ColorFormat, ColorMixModelType, combinedCSSRulesForPreview, complex, ComponentContainerContext, ComponentPresetsConsumer, ComponentPresetsProvider, ComponentViewportProvider, ConstraintMask, constraintsEnabled, ConstraintValues, Container, ControlType, ConvertColor, convertOffsetToTimes, convertPropsToDeviceOptions, createBox, createData, createFramerPageLink, createGeneratorEasing, createRenderBatcher, createRendererMotionComponent, createScopedAnimate, cssBackgroundSize, cubicBezier, cubicBezierAsString, CustomCursorHost, CustomProperties, cx, CycleVariantState, Data, DataContext, DataObserver, DataObserverContext, debounce, defaultDeviceProps, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, degreesToRadians, delay, DeprecatedComponentContainer, DeprecatedFrameWithEvents, DeprecatedLayoutGroupContext, DeprecatedLayoutGroupContext as LayoutGroupContext, Device, DeviceCodeComponent, devicePresets, DimensionType, dimensionValueTypes, disableInstantTransitions, dispatchKeyDownEvent, distance, distance2D, DOM, domAnimation, DOMKeyframesResolver, domMax, domMin, DragControls, Draggable, easeIn, easeInOut, easeOut, easingDefinitionToFunction, EmptyState, environment, ErrorPlaceholder, executeInRenderEnvironment, Fetcher, fillOffset, fillWildcards, filterProps, findDimensionValueType, findValueType, finiteNumber, FlatTree, Floating, flushKeyframeResolvers, FontSourceNames, fontStore, forceLayerBackingWithCSSProperties, FormBooleanInput, FormContainer, FormPlainTextInput2 as FormPlainTextInput, FormSelect, fraction, Frame, frame, frameData, frameFromElement, frameFromElements, FramerAnimation, framerAppearAnimationScriptKey, framerAppearEffects, framerAppearIdKey, framerAppearTransformTemplateToken, framerCSSMarker, FramerEvent, FramerEventListener, FramerEventSession, frameSteps, FrameWithMotion, GamepadContext, GeneratedComponentContext, generateLinearEasing, getAnimatableNone2 as getAnimatableNone, getAnimationMap, getComponentSize, getComputedStyle2 as getComputedStyle, getDefaultValueType, getDevicePreset, getEasingForSegment, getFonts, getFontsFromComponentPreset, getFontsFromSharedStyle, getLoadingLazyAtYPosition, getMeasurableCodeComponentChildren, getMixer, getPropertyControls, getValueAsType, getValueTransition, getVariableValue, getWhereExpressionFromPathVariables, GracefullyDegradingErrorBoundary, gradientForShape, GroupAnimation, GroupAnimationWithThen, hasWarned, hex, hover, hsla, hslaToRgba, Image2 as Image, imagePatternPropsForFill, imageUrlForAsset, inertia, inferInitialRouteFromPath, injectComponentCSSRules, installFlexboxGapWorkaroundIfNeeded, InternalID, interpolate, invariant, inView, invisibleValues, isAnimatable2 as isAnimatable, isBezierDefinition, isBrowser, isCSSVariableName, isCSSVariableToken, isDesignDefinition, isDragActive, isDragging, isEasingArray, isEqual, isFiniteNumber, isFractionDimension, isFramerGamepadKeydownData, isFramerPageLink, isGapEnabled, isGenerator, isMotionComponent, isMotionValue2 as isMotionValue, isNodeOrChild, isNumericalString, isOfAnnotatedType, isOverride, isPrimaryPointer, isReactDefinition, isRelativeNumber, isShallowEqualArray, isStaticRenderer, isStraightCurve, isValidMotionProp, isWaapiSupportedEasing, isZeroValueString, JSAnimation, KeyframeResolver, keyframes, Layer, LayoutGroup, LayoutIdContext, lazy, LazyMotion, LazyValue, LibraryFeaturesProvider, Line, LinearGradient, Link, loadFont, loadJSON, localPackageFallbackIdentifier, localShadowFrame, m, MainLoop, makePaddingString, makeUseVisualState, mapEasingToNativeEasing, mapValue, markHydrationStart, maxGeneratorDuration, memo, memoize2 as memoize, microtask, millisecondsToSeconds, mirrorEasing, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixVisibility, modulate, motion, MotionConfig, MotionConfigContext, MotionContext, MotionGlobalConfig, MotionSetup, MotionValue, motionValue, moveItem, namespace_exports as Reorder, NativeAnimation, NativeAnimationExtended, NativeAnimationWrapper, NavigateTo, NavigationCallbackProvider, NavigationConsumer, NavigationTransitionType, NavigationWrapper as Navigation, nestedLinksCollector, noop, NotFoundError, number, numberValueTypes, ObservableObject, observeTimeline, optimizeAppear, optimizeAppearTransformTemplate, optimizedAppearDataAttribute, paddingFromProps, Page3 as Page, PageEffectsProvider, PageRoot, ParentSizeState, parseCSSVariable, parseFramerPageLink, parseValueFromTransform, patchRoutesForABTesting, pathDefaults, PathSegment, PathVariablesContext, percent, pipe, Point, Polygon, positionalKeys, preloadImage, PresenceContext, press, print, progress, progressPercentage, PropertyOverrides2 as PropertyOverrides, PropertyStore, propsForLink, pushLoadMoreHistory, px, QueryCache, QueryEngine, RadialGradient, readTransformValue, recordStats, Rect, removeHiddenBreakpointLayers, removeHiddenBreakpointLayersV2, removeItem, RenderTarget, resolveElements, resolveLink, ResolveLinks, resolveMotionValue, resolvePageScope, reverseEasing, rgba, rgbUnit, RichText2 as RichText, roundedNumber, roundedNumberString, roundWithOffset, safeCSSValue, scale, Scroll, scroll, scrollInfo, secondsToMilliseconds, setDragLock, setGlobalRenderEnvironment, setStyle, Shadow, sharedSVGManager, shouldOpenLinkInNewTab, Size, SmartComponentScopedContainer, spring, SpringAnimator, SSRVariants, Stack, stagger, startAnimation, startOptimizedAppearAnimation, startWaapiAnimation, statsBuffer, steps, styleEffect, StyleSheetContext, SubscriptionManager, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, SVG, SwitchLayoutGroupContext, sync, systemFontFamilyName, testValueType, Text2 as Text, throttle, time, toFlexDirection, toJustifyOrAlignment, toSVGPath, transform, transformPropOrder, transformProps, transformString2 as transformString, transformTemplate, transformValue, transformValueTypes, turnOffReactEventHandling, unwrapMotionComponent, useActiveTargetCallback, useActiveVariantCallback, useAddVariantProps, useAnimate, useAnimatedState, useAnimatedState as useDeprecatedAnimatedState, useAnimateMini, useAnimation, useAnimationControls, useAnimationFrame, useBreakpointVariants, useComponentViewport, useConstant2 as useConstant, useCurrentPathVariables, useCurrentRoute, useCurrentRouteId, useCustomCursors, useCycle, useDataRecord, useDomEvent, useDragControls, useDynamicRefs, useElementScroll, useForceUpdate, useGamepad, useHotkey, useHydratedBreakpointVariants, useInitialRouteComponent, useInstantLayoutTransition, useInstantTransition, useInvertedScale, useInvertedScale as useDeprecatedInvertedScale, useInView, useIsInCurrentNavigationTarget, useIsomorphicLayoutEffect, useIsOnFramerCanvas, useIsPresent, useIsStaticRenderer, useLoadMorePaginatedQuery, useLoadMorePagination, useLocale, useLocaleCode, useLocaleInfo, useLocalesForCurrentRoute, useLocalizationInfo, useMeasureLayout, useMotionTemplate, useMotionValue, useMotionValueEvent, useNavigate, useNavigation, useObserveData, useOnAppear, useOnCurrentTargetChange, useOnVariantChange, useOverlayState, usePageEffects, usePrefetch, usePreloadQuery, usePresence, usePresenceData, usePrototypeNavigate, useProvidedWindow, useQueryData, useReducedMotion, useReducedMotionConfig, useRenderEnvironment, useResetProjection, useRoute, useRouteAnchor, useRouteElementId, useRouteHandler, useRouter, useScroll, useSiteRefs, useSpring, useSVGTemplate, useTime, useTransform, useUnmountEffect, useVariantState, useVelocity, useViewportScroll, useWillChange, ValueInterpolation, valueToDimensionType, VariantSelector, Vector, VectorGroup, velocityPerSecond, version, vh, ViewTransitionBuilder, VisualElement, visualElementStore, vw, warning, warnOnce, WillChangeMotionValue, WindowContext, withCodeBoundaryForOverrides, withCSS, withFX, withGeneratedLayoutId, withInfiniteScroll, withMappedReactProps, withMeasuredSize, WithNavigator, withOpacity, withOptimizedAppearEffect, WithOverride, withParallaxTransform, withPath, withPerformanceMarks, withShape, withStyleAppearEffect, withV1StrokeFX, withVariantAppearEffect, withVariantFX, wrap, yieldToMain, };
47056
+ export { _injectRuntime, acceleratedValues2 as acceleratedValues, activeAnimations, addActionControls, addAttrValue, addFonts, addPointerEvent, addPointerInfo, addPropertyControls, addScaleCorrector, addStyleValue, addUniqueItem, alpha, analyseComplexValue, AnchorLinkTarget, Animatable, animate2 as animate, animateMini, AnimatePresence, AnimateSharedLayout, animateValue, animateView, animateVisualElement, animationControls, animationMapKey, animations, annotateTypeOnStringify, anticipate, AnyInterpolation, applyPxDefaults, AsyncMotionValueAnimation, attachSpring, attrEffect, AutomaticLayoutIds, BackgroundImage, backgroundImageFromProps, backIn, backInOut, backOut, BezierAnimator, BoxShadow, buildTransform2 as buildTransform, calcGeneratorDuration, calcLength, calculateRect, callEach, cancelFrame, cancelMicrotask, cancelSync, ChildrenCanSuspend, circIn, circInOut, circOut, clamp, clampRGB, collectMotionValues, collectVisualStyleFromProps, Color, color, ColorFormat, ColorMixModelType, combinedCSSRulesForPreview, complex, ComponentContainerContext, ComponentPresetsConsumer, ComponentPresetsProvider, ComponentViewportProvider, ConstraintMask, constraintsEnabled, ConstraintValues, Container, ControlType, ConvertColor, convertOffsetToTimes, convertPropsToDeviceOptions, createBox, createData, createFramerPageLink, createGeneratorEasing, createRenderBatcher, createRendererMotionComponent, createScopedAnimate, cssBackgroundSize, cubicBezier, cubicBezierAsString, CustomCursorHost, CustomProperties, cx, CycleVariantState, Data, DataContext, DataObserver, DataObserverContext, debounce, defaultDeviceProps, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, degreesToRadians, delay, DeprecatedComponentContainer, DeprecatedFrameWithEvents, DeprecatedLayoutGroupContext, DeprecatedLayoutGroupContext as LayoutGroupContext, Device, DeviceCodeComponent, devicePresets, DimensionType, dimensionValueTypes, disableInstantTransitions, dispatchKeyDownEvent, distance, distance2D, DOM, domAnimation, DOMKeyframesResolver, domMax, domMin, DragControls, Draggable, easeIn, easeInOut, easeOut, easingDefinitionToFunction, EmptyState, environment, ErrorPlaceholder, executeInRenderEnvironment, Fetcher, fillOffset, fillWildcards, filterProps, findDimensionValueType, findValueType, finiteNumber, FlatTree, Floating, flushKeyframeResolvers, FontSourceNames, fontStore, forceLayerBackingWithCSSProperties, FormBooleanInput, FormContainer, FormPlainTextInput2 as FormPlainTextInput, FormSelect, fraction, Frame, frame, frameData, frameFromElement, frameFromElements, FramerAnimation, framerAppearAnimationScriptKey, framerAppearEffects, framerAppearIdKey, framerAppearTransformTemplateToken, framerCSSMarker, FramerEvent, FramerEventListener, FramerEventSession, frameSteps, FrameWithMotion, GamepadContext, GeneratedComponentContext, generateLinearEasing, getAnimatableNone2 as getAnimatableNone, getAnimationMap, getComponentSize, getComputedStyle2 as getComputedStyle, getDefaultValueType, getDevicePreset, getEasingForSegment, getFonts, getFontsFromComponentPreset, getFontsFromSharedStyle, getLoadingLazyAtYPosition, getMeasurableCodeComponentChildren, getMixer, getPropertyControls, getValueAsType, getValueTransition, getVariableValue, getWhereExpressionFromPathVariables, GracefullyDegradingErrorBoundary, gradientForShape, GroupAnimation, GroupAnimationWithThen, hasWarned, hex, hover, hsla, hslaToRgba, Image2 as Image, imagePatternPropsForFill, imageUrlForAsset, inertia, inferInitialRouteFromPath, injectComponentCSSRules, installFlexboxGapWorkaroundIfNeeded, Instance, InternalID, interpolate, invariant, inView, invisibleValues, isAnimatable2 as isAnimatable, isBezierDefinition, isBrowser, isCSSVariableName, isCSSVariableToken, isDesignDefinition, isDragActive, isDragging, isEasingArray, isEqual, isFiniteNumber, isFractionDimension, isFramerGamepadKeydownData, isFramerPageLink, isGapEnabled, isGenerator, isHTMLElement, isMotionComponent, isMotionValue2 as isMotionValue, isNodeOrChild, isNumericalString, isObject, isOfAnnotatedType, isOverride, isPrimaryPointer, isReactDefinition, isRelativeNumber, isShallowEqualArray, isStaticRenderer, isStraightCurve, isSVGElement, isSVGSVGElement, isValidMotionProp, isWaapiSupportedEasing, isZeroValueString, JSAnimation, KeyframeResolver, keyframes, Layer, LayoutGroup, LayoutIdContext, lazy, LazyMotion, LazyValue, LibraryFeaturesProvider, Line, LinearGradient, Link, loadFont, loadJSON, localPackageFallbackIdentifier, localShadowFrame, m, MainLoop, makePaddingString, makeUseVisualState, mapEasingToNativeEasing, mapValue, markHydrationStart, maxGeneratorDuration, memo, memoize2 as memoize, microtask, millisecondsToSeconds, mirrorEasing, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixVisibility, modulate, motion, MotionConfig, MotionConfigContext, MotionContext, MotionGlobalConfig, MotionSetup, MotionValue, motionValue, moveItem, namespace_exports as Reorder, NativeAnimation, NativeAnimationExtended, NativeAnimationWrapper, NavigateTo, NavigationCallbackProvider, NavigationConsumer, NavigationTransitionType, NavigationWrapper as Navigation, nestedLinksCollector, noop, NotFoundError, number, numberValueTypes, ObservableObject, observeTimeline, optimizeAppear, optimizeAppearTransformTemplate, optimizedAppearDataAttribute, paddingFromProps, Page3 as Page, PageEffectsProvider, PageRoot, ParentSizeState, parseCSSVariable, parseFramerPageLink, parseValueFromTransform, patchRoutesForABTesting, pathDefaults, PathSegment, PathVariablesContext, percent, pipe, Point, Polygon, positionalKeys, preloadImage, PresenceContext, press, print, progress, progressPercentage, propEffect, PropertyOverrides2 as PropertyOverrides, PropertyStore, propsForLink, pushLoadMoreHistory, px, QueryCache, QueryEngine, RadialGradient, readTransformValue, recordStats, Rect, removeHiddenBreakpointLayers, removeHiddenBreakpointLayersV2, removeItem, RenderTarget, resolveElements, resolveLink, ResolveLinks, resolveMotionValue, resolvePageScope, reverseEasing, rgba, rgbUnit, RichText2 as RichText, roundedNumber, roundedNumberString, roundWithOffset, safeCSSValue, scale, Scroll, scroll, scrollInfo, secondsToMilliseconds, setDragLock, setGlobalRenderEnvironment, setStyle, Shadow, sharedSVGManager, shouldOpenLinkInNewTab, Size, SmartComponentScopedContainer, spring, SpringAnimator, springValue, SSRVariants, Stack, stagger, startAnimation, startOptimizedAppearAnimation, startWaapiAnimation, statsBuffer, steps, styleEffect, StyleSheetContext, SubscriptionManager, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, SVG, svgEffect, SwitchLayoutGroupContext, sync, systemFontFamilyName, testValueType, Text2 as Text, throttle, time, toFlexDirection, toJustifyOrAlignment, toSVGPath, transform, transformPropOrder, transformProps, transformString2 as transformString, transformTemplate, transformValue, transformValueTypes, turnOffReactEventHandling, unwrapMotionComponent, useActiveTargetCallback, useActiveVariantCallback, useAddVariantProps, useAnimate, useAnimatedState, useAnimatedState as useDeprecatedAnimatedState, useAnimateMini, useAnimation, useAnimationControls, useAnimationFrame, useBreakpointVariants, useComponentViewport, useConstant2 as useConstant, useCurrentPathVariables, useCurrentRoute, useCurrentRouteId, useCustomCursors, useCycle, useDataRecord, useDomEvent, useDragControls, useDynamicRefs, useElementScroll, useForceUpdate, useGamepad, useHotkey, useHydratedBreakpointVariants, useInitialRouteComponent, useInstantLayoutTransition, useInstantTransition, useInvertedScale, useInvertedScale as useDeprecatedInvertedScale, useInView, useIsInCurrentNavigationTarget, useIsomorphicLayoutEffect, useIsOnFramerCanvas, useIsPresent, useIsStaticRenderer, useLoadMorePaginatedQuery, useLoadMorePagination, useLocale, useLocaleCode, useLocaleInfo, useLocalesForCurrentRoute, useLocalizationInfo, useMeasureLayout, useMotionTemplate, useMotionValue, useMotionValueEvent, useNavigate, useNavigation, useObserveData, useOnAppear, useOnCurrentTargetChange, useOnVariantChange, useOverlayState, usePageEffects, usePrefetch, usePreloadQuery, usePresence, usePresenceData, usePrototypeNavigate, useProvidedWindow, useQueryData, useReducedMotion, useReducedMotionConfig, useRenderEnvironment, useResetProjection, useRoute, useRouteAnchor, useRouteElementId, useRouteHandler, useRouter, useScroll, useSiteRefs, useSpring, useSVGTemplate, useTime, useTransform, useUnmountEffect, useVariantState, useVelocity, useViewportScroll, useWillChange, ValueInterpolation, valueToDimensionType, VariantSelector, Vector, VectorGroup, velocityPerSecond, version, vh, ViewTransitionBuilder, VisualElement, visualElementStore, vw, warning, warnOnce, WillChangeMotionValue, WindowContext, withCodeBoundaryForOverrides, withCSS, withFX, withGeneratedLayoutId, withInfiniteScroll, withMappedReactProps, withMeasuredSize, WithNavigator, withOpacity, withOptimizedAppearEffect, WithOverride, withParallaxTransform, withPath, withPerformanceMarks, withShape, withStyleAppearEffect, withV1StrokeFX, withVariantAppearEffect, withVariantFX, wrap, yieldToMain, };
46916
47057
  //! Credit to Astro | MIT License
46917
47058
  /**
46918
47059
  * @license Emotion v11.0.0