@remotion/promo-pages 4.0.404 → 4.0.406
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Homepage.js +1701 -474
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/Homepage.js +1701 -474
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/design.js +1561 -197
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/experts.js +61 -8
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/homepage/Pricing.js +1346 -119
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/team.js +1 -1
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/template-modal-content.js +1362 -135
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/templates.js +1348 -121
- package/dist/design.js +1561 -197
- package/dist/experts.js +61 -8
- package/dist/homepage/Pricing.js +1346 -119
- package/dist/tailwind.css +64 -0
- package/dist/team.js +1 -1
- package/dist/template-modal-content.js +1362 -135
- package/dist/templates.js +1348 -121
- package/package.json +12 -12
- package/public/img/team/team.jpeg +0 -0
package/dist/Homepage.js
CHANGED
|
@@ -108,7 +108,7 @@ import { createContext as createContext14, useEffect as useEffect5, useState as
|
|
|
108
108
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
109
109
|
import { createContext as createContext15, useMemo as useMemo13, useReducer } from "react";
|
|
110
110
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
111
|
-
import {
|
|
111
|
+
import React18, {
|
|
112
112
|
forwardRef as forwardRef4,
|
|
113
113
|
useContext as useContext25,
|
|
114
114
|
useEffect as useEffect12,
|
|
@@ -212,7 +212,7 @@ import {
|
|
|
212
212
|
useState as useState19
|
|
213
213
|
} from "react";
|
|
214
214
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
215
|
-
import {
|
|
215
|
+
import React30, {
|
|
216
216
|
forwardRef as forwardRef9,
|
|
217
217
|
useContext as useContext33,
|
|
218
218
|
useEffect as useEffect19,
|
|
@@ -343,7 +343,7 @@ function cancelRenderInternal(scope, err) {
|
|
|
343
343
|
error = Error("Rendering was cancelled");
|
|
344
344
|
}
|
|
345
345
|
if (scope) {
|
|
346
|
-
scope.remotion_cancelledError = error
|
|
346
|
+
scope.remotion_cancelledError = getErrorStackWithMessage(error);
|
|
347
347
|
}
|
|
348
348
|
throw error;
|
|
349
349
|
}
|
|
@@ -755,7 +755,7 @@ var __defProp2, __export2 = (target, all) => {
|
|
|
755
755
|
});
|
|
756
756
|
}, useIsPlayer = () => {
|
|
757
757
|
return useContext(IsPlayerContext);
|
|
758
|
-
}, VERSION = "4.0.
|
|
758
|
+
}, VERSION = "4.0.406", checkMultipleRemotionVersions = () => {
|
|
759
759
|
if (typeof globalThis === "undefined") {
|
|
760
760
|
return;
|
|
761
761
|
}
|
|
@@ -1589,6 +1589,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1589
1589
|
const { playing, imperativePlaying } = useContext6(TimelineContext);
|
|
1590
1590
|
const { setPlaying } = useContext6(SetTimelineContext);
|
|
1591
1591
|
return useMemo6(() => [playing, setPlaying, imperativePlaying], [imperativePlaying, playing, setPlaying]);
|
|
1592
|
+
}, getErrorStackWithMessage = (error) => {
|
|
1593
|
+
const stack = error.stack ?? "";
|
|
1594
|
+
return stack.startsWith("Error:") ? stack : `${error.message}
|
|
1595
|
+
${stack}`;
|
|
1592
1596
|
}, isErrorLike = (err) => {
|
|
1593
1597
|
if (err instanceof Error) {
|
|
1594
1598
|
return true;
|
|
@@ -1675,7 +1679,11 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1675
1679
|
DELAY_RENDER_CALLSTACK_TOKEN,
|
|
1676
1680
|
called
|
|
1677
1681
|
].filter(truthy).join(" ");
|
|
1678
|
-
|
|
1682
|
+
if (environment.isClientSideRendering) {
|
|
1683
|
+
scope.remotion_cancelledError = getErrorStackWithMessage(Error(message));
|
|
1684
|
+
} else {
|
|
1685
|
+
cancelRenderInternal(scope, Error(message));
|
|
1686
|
+
}
|
|
1679
1687
|
}, timeoutToUse)
|
|
1680
1688
|
};
|
|
1681
1689
|
}
|
|
@@ -3006,8 +3014,12 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3006
3014
|
ref
|
|
3007
3015
|
}) => {
|
|
3008
3016
|
let connected = null;
|
|
3017
|
+
let disposed = false;
|
|
3009
3018
|
return {
|
|
3010
3019
|
attemptToConnect: () => {
|
|
3020
|
+
if (disposed) {
|
|
3021
|
+
throw new Error("SharedElementSourceNode has been disposed");
|
|
3022
|
+
}
|
|
3011
3023
|
if (!connected && ref.current) {
|
|
3012
3024
|
const mediaElementSourceNode = audioContext.createMediaElementSource(ref.current);
|
|
3013
3025
|
connected = mediaElementSourceNode;
|
|
@@ -3018,6 +3030,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3018
3030
|
throw new Error("Audio element not connected");
|
|
3019
3031
|
}
|
|
3020
3032
|
return connected;
|
|
3033
|
+
},
|
|
3034
|
+
cleanup: () => {
|
|
3035
|
+
if (connected) {
|
|
3036
|
+
connected.disconnect();
|
|
3037
|
+
connected = null;
|
|
3038
|
+
}
|
|
3039
|
+
disposed = true;
|
|
3021
3040
|
}
|
|
3022
3041
|
};
|
|
3023
3042
|
}, warned = false, warnOnce = (logLevel) => {
|
|
@@ -3099,6 +3118,16 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3099
3118
|
};
|
|
3100
3119
|
});
|
|
3101
3120
|
}, [audioContext, numberOfAudioTags]);
|
|
3121
|
+
const effectToUse = React15.useInsertionEffect ?? React15.useLayoutEffect;
|
|
3122
|
+
effectToUse(() => {
|
|
3123
|
+
return () => {
|
|
3124
|
+
requestAnimationFrame(() => {
|
|
3125
|
+
refs.forEach(({ mediaElementSourceNode }) => {
|
|
3126
|
+
mediaElementSourceNode?.cleanup();
|
|
3127
|
+
});
|
|
3128
|
+
});
|
|
3129
|
+
};
|
|
3130
|
+
}, [refs]);
|
|
3102
3131
|
const takenAudios = useRef6(new Array(numberOfAudioTags).fill(false));
|
|
3103
3132
|
const rerenderAudios = useCallback7(() => {
|
|
3104
3133
|
refs.forEach(({ ref, id }) => {
|
|
@@ -3143,7 +3172,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3143
3172
|
mediaElementSourceNode,
|
|
3144
3173
|
premounting,
|
|
3145
3174
|
audioMounted: Boolean(ref.current),
|
|
3146
|
-
postmounting
|
|
3175
|
+
postmounting,
|
|
3176
|
+
cleanupOnMediaTagUnmount: () => {}
|
|
3147
3177
|
};
|
|
3148
3178
|
audios.current?.push(newElem);
|
|
3149
3179
|
rerenderAudios();
|
|
@@ -3268,7 +3298,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3268
3298
|
mediaElementSourceNode,
|
|
3269
3299
|
premounting,
|
|
3270
3300
|
audioMounted: Boolean(el.current),
|
|
3271
|
-
postmounting
|
|
3301
|
+
postmounting,
|
|
3302
|
+
cleanupOnMediaTagUnmount: () => {
|
|
3303
|
+
mediaElementSourceNode?.cleanup();
|
|
3304
|
+
}
|
|
3272
3305
|
};
|
|
3273
3306
|
});
|
|
3274
3307
|
const effectToUse = React15.useInsertionEffect ?? React15.useLayoutEffect;
|
|
@@ -4524,7 +4557,11 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4524
4557
|
props.muted,
|
|
4525
4558
|
props.loop
|
|
4526
4559
|
]);
|
|
4527
|
-
const {
|
|
4560
|
+
const {
|
|
4561
|
+
el: audioRef,
|
|
4562
|
+
mediaElementSourceNode,
|
|
4563
|
+
cleanupOnMediaTagUnmount
|
|
4564
|
+
} = useSharedAudio({
|
|
4528
4565
|
aud: propsToPass,
|
|
4529
4566
|
audioId: id,
|
|
4530
4567
|
premounting: Boolean(sequenceContext?.premounting),
|
|
@@ -4571,6 +4608,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4571
4608
|
volume: userPreferredVolume,
|
|
4572
4609
|
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
4573
4610
|
});
|
|
4611
|
+
const effectToUse = React18.useInsertionEffect ?? React18.useLayoutEffect;
|
|
4612
|
+
effectToUse(() => {
|
|
4613
|
+
return () => {
|
|
4614
|
+
requestAnimationFrame(() => {
|
|
4615
|
+
cleanupOnMediaTagUnmount();
|
|
4616
|
+
});
|
|
4617
|
+
};
|
|
4618
|
+
}, [cleanupOnMediaTagUnmount]);
|
|
4574
4619
|
useImperativeHandle6(ref, () => {
|
|
4575
4620
|
return audioRef.current;
|
|
4576
4621
|
}, [audioRef]);
|
|
@@ -5794,6 +5839,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5794
5839
|
ref: videoRef
|
|
5795
5840
|
});
|
|
5796
5841
|
}, [context.audioContext]);
|
|
5842
|
+
const effectToUse = React30.useInsertionEffect ?? React30.useLayoutEffect;
|
|
5843
|
+
effectToUse(() => {
|
|
5844
|
+
return () => {
|
|
5845
|
+
requestAnimationFrame(() => {
|
|
5846
|
+
sharedSource?.cleanup();
|
|
5847
|
+
});
|
|
5848
|
+
};
|
|
5849
|
+
}, [sharedSource]);
|
|
5797
5850
|
const {
|
|
5798
5851
|
volume,
|
|
5799
5852
|
muted,
|
|
@@ -7313,7 +7366,7 @@ __export(exports_esm, {
|
|
|
7313
7366
|
Lottie: () => Lottie
|
|
7314
7367
|
});
|
|
7315
7368
|
import lottie from "lottie-web";
|
|
7316
|
-
import { useEffect as
|
|
7369
|
+
import { useEffect as useEffect43, useRef as useRef43, useState as useState40 } from "react";
|
|
7317
7370
|
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
7318
7371
|
var getLottieMetadata = (animationData) => {
|
|
7319
7372
|
const width2 = animationData.w;
|
|
@@ -7378,21 +7431,21 @@ var getLottieMetadata = (animationData) => {
|
|
|
7378
7431
|
}
|
|
7379
7432
|
validatePlaybackRate2(playbackRate);
|
|
7380
7433
|
validateLoop(loop);
|
|
7381
|
-
const animationRef =
|
|
7382
|
-
const currentFrameRef =
|
|
7383
|
-
const containerRef =
|
|
7384
|
-
const onAnimationLoadedRef =
|
|
7434
|
+
const animationRef = useRef43(null);
|
|
7435
|
+
const currentFrameRef = useRef43(null);
|
|
7436
|
+
const containerRef = useRef43(null);
|
|
7437
|
+
const onAnimationLoadedRef = useRef43(onAnimationLoaded);
|
|
7385
7438
|
onAnimationLoadedRef.current = onAnimationLoaded;
|
|
7386
7439
|
const { delayRender, continueRender } = useDelayRender();
|
|
7387
|
-
const [handle] =
|
|
7388
|
-
|
|
7440
|
+
const [handle] = useState40(() => delayRender("Waiting for Lottie animation to load"));
|
|
7441
|
+
useEffect43(() => {
|
|
7389
7442
|
return () => {
|
|
7390
7443
|
continueRender(handle);
|
|
7391
7444
|
};
|
|
7392
7445
|
}, [handle, continueRender]);
|
|
7393
7446
|
const frame = useCurrentFrame();
|
|
7394
7447
|
currentFrameRef.current = frame;
|
|
7395
|
-
|
|
7448
|
+
useEffect43(() => {
|
|
7396
7449
|
if (!containerRef.current) {
|
|
7397
7450
|
return;
|
|
7398
7451
|
}
|
|
@@ -7437,17 +7490,17 @@ var getLottieMetadata = (animationData) => {
|
|
|
7437
7490
|
renderer,
|
|
7438
7491
|
continueRender
|
|
7439
7492
|
]);
|
|
7440
|
-
|
|
7493
|
+
useEffect43(() => {
|
|
7441
7494
|
if (animationRef.current && direction) {
|
|
7442
7495
|
animationRef.current.setDirection(direction === "backward" ? -1 : 1);
|
|
7443
7496
|
}
|
|
7444
7497
|
}, [direction]);
|
|
7445
|
-
|
|
7498
|
+
useEffect43(() => {
|
|
7446
7499
|
if (animationRef.current && playbackRate) {
|
|
7447
7500
|
animationRef.current.setSpeed(playbackRate);
|
|
7448
7501
|
}
|
|
7449
7502
|
}, [playbackRate]);
|
|
7450
|
-
|
|
7503
|
+
useEffect43(() => {
|
|
7451
7504
|
if (!animationRef.current) {
|
|
7452
7505
|
return;
|
|
7453
7506
|
}
|
|
@@ -14017,47 +14070,49 @@ import React42 from "react";
|
|
|
14017
14070
|
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
14018
14071
|
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
14019
14072
|
import { jsx as jsx73, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
14020
|
-
import React52 from "react";
|
|
14021
14073
|
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
14074
|
+
import React52 from "react";
|
|
14022
14075
|
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
14076
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
14077
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
14023
14078
|
import * as React342 from "react";
|
|
14024
14079
|
import * as ReactDOM4 from "react-dom";
|
|
14025
14080
|
import React92 from "react";
|
|
14026
14081
|
import * as React62 from "react";
|
|
14027
|
-
import { jsx as
|
|
14082
|
+
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
14028
14083
|
import * as React72 from "react";
|
|
14029
14084
|
import * as React8 from "react";
|
|
14030
|
-
import { Fragment as Fragment22, jsx as
|
|
14031
|
-
import { jsx as
|
|
14085
|
+
import { Fragment as Fragment22, jsx as jsx132 } from "react/jsx-runtime";
|
|
14086
|
+
import { jsx as jsx142 } from "react/jsx-runtime";
|
|
14032
14087
|
import * as React10 from "react";
|
|
14033
|
-
import { jsx as
|
|
14088
|
+
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
14034
14089
|
import * as React14 from "react";
|
|
14035
14090
|
import * as React112 from "react";
|
|
14036
14091
|
import * as ReactDOM from "react-dom";
|
|
14037
|
-
import { jsx as
|
|
14092
|
+
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
14038
14093
|
import * as React122 from "react";
|
|
14039
14094
|
import * as React13 from "react";
|
|
14040
|
-
import { jsx as
|
|
14095
|
+
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
14041
14096
|
import * as React152 from "react";
|
|
14042
14097
|
import * as React162 from "react";
|
|
14043
|
-
import { jsx as
|
|
14044
|
-
import * as
|
|
14098
|
+
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
14099
|
+
import * as React182 from "react";
|
|
14045
14100
|
import * as React172 from "react";
|
|
14046
14101
|
import * as React22 from "react";
|
|
14047
14102
|
import * as React19 from "react";
|
|
14048
14103
|
import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
|
|
14049
14104
|
import * as ReactDOM2 from "react-dom";
|
|
14050
14105
|
import * as React20 from "react";
|
|
14051
|
-
import { jsx as
|
|
14106
|
+
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
14052
14107
|
import * as React212 from "react";
|
|
14053
|
-
import { jsx as
|
|
14108
|
+
import { jsx as jsx202 } from "react/jsx-runtime";
|
|
14054
14109
|
import * as React23 from "react";
|
|
14055
14110
|
import ReactDOM3 from "react-dom";
|
|
14056
|
-
import { jsx as
|
|
14111
|
+
import { jsx as jsx213 } from "react/jsx-runtime";
|
|
14057
14112
|
import * as React24 from "react";
|
|
14058
14113
|
import * as React252 from "react";
|
|
14059
14114
|
import * as React262 from "react";
|
|
14060
|
-
import { jsx as
|
|
14115
|
+
import { jsx as jsx223 } from "react/jsx-runtime";
|
|
14061
14116
|
import * as React332 from "react";
|
|
14062
14117
|
import * as React29 from "react";
|
|
14063
14118
|
import { useState as useState112 } from "react";
|
|
@@ -14065,16 +14120,43 @@ import * as React27 from "react";
|
|
|
14065
14120
|
import * as React282 from "react";
|
|
14066
14121
|
import * as React322 from "react";
|
|
14067
14122
|
import * as React31 from "react";
|
|
14068
|
-
import * as
|
|
14069
|
-
import { Fragment as Fragment5, jsx as
|
|
14123
|
+
import * as React302 from "react";
|
|
14124
|
+
import { Fragment as Fragment5, jsx as jsx232, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
14070
14125
|
import { forwardRef as forwardRef132, createElement as createElement7 } from "react";
|
|
14071
14126
|
import { forwardRef as forwardRef122, createElement as createElement6 } from "react";
|
|
14072
14127
|
import * as React35 from "react";
|
|
14073
|
-
import { jsx as
|
|
14074
|
-
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
14075
|
-
import React362 from "react";
|
|
14076
|
-
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
14128
|
+
import { jsx as jsx242, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
14077
14129
|
import { jsx as jsx252 } from "react/jsx-runtime";
|
|
14130
|
+
import * as React48 from "react";
|
|
14131
|
+
import * as React362 from "react";
|
|
14132
|
+
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
14133
|
+
import * as React46 from "react";
|
|
14134
|
+
import React39 from "react";
|
|
14135
|
+
import * as React37 from "react";
|
|
14136
|
+
import * as React38 from "react";
|
|
14137
|
+
import { Fragment as Fragment222, jsx as jsx272 } from "react/jsx-runtime";
|
|
14138
|
+
import { jsx as jsx282 } from "react/jsx-runtime";
|
|
14139
|
+
import React210 from "react";
|
|
14140
|
+
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
14141
|
+
import * as React41 from "react";
|
|
14142
|
+
import * as React40 from "react";
|
|
14143
|
+
import * as React422 from "react";
|
|
14144
|
+
import * as ReactDOM5 from "react-dom";
|
|
14145
|
+
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
14146
|
+
import * as React43 from "react";
|
|
14147
|
+
import * as React44 from "react";
|
|
14148
|
+
import * as React2122 from "react";
|
|
14149
|
+
import * as React45 from "react";
|
|
14150
|
+
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
14151
|
+
import { jsx as jsx332 } from "react/jsx-runtime";
|
|
14152
|
+
import * as React213 from "react";
|
|
14153
|
+
import * as React47 from "react";
|
|
14154
|
+
import { jsx as jsx342 } from "react/jsx-runtime";
|
|
14155
|
+
import * as React49 from "react";
|
|
14156
|
+
import { jsx as jsx352 } from "react/jsx-runtime";
|
|
14157
|
+
import React50 from "react";
|
|
14158
|
+
import { jsx as jsx362 } from "react/jsx-runtime";
|
|
14159
|
+
import { jsx as jsx372 } from "react/jsx-runtime";
|
|
14078
14160
|
function cn(...inputs) {
|
|
14079
14161
|
return twMerge(clsx(inputs));
|
|
14080
14162
|
}
|
|
@@ -14597,20 +14679,36 @@ var Counter = ({
|
|
|
14597
14679
|
]
|
|
14598
14680
|
});
|
|
14599
14681
|
};
|
|
14682
|
+
var InlineCode = ({ children }) => {
|
|
14683
|
+
return /* @__PURE__ */ jsx83("code", {
|
|
14684
|
+
className: "font-brand text-brand",
|
|
14685
|
+
children
|
|
14686
|
+
});
|
|
14687
|
+
};
|
|
14600
14688
|
var Input = React52.forwardRef(({ className, ...props }, ref) => {
|
|
14601
|
-
return /* @__PURE__ */
|
|
14689
|
+
return /* @__PURE__ */ jsx93("input", {
|
|
14602
14690
|
ref,
|
|
14603
14691
|
className: cn("w-full bg-white dark:bg-[#121212] rounded-lg border-2 border-b-4 border-black outline-none h-14 px-3 fontbrand text-lg box-border", className),
|
|
14604
14692
|
...props
|
|
14605
14693
|
});
|
|
14606
14694
|
});
|
|
14607
14695
|
Input.displayName = "Input";
|
|
14696
|
+
var Link = ({
|
|
14697
|
+
className,
|
|
14698
|
+
...props
|
|
14699
|
+
}) => {
|
|
14700
|
+
return /* @__PURE__ */ jsx102("a", {
|
|
14701
|
+
...props,
|
|
14702
|
+
className: cn(className, "text-brand underline underline-offset-4"),
|
|
14703
|
+
children: props.children
|
|
14704
|
+
});
|
|
14705
|
+
};
|
|
14608
14706
|
var PlanePaperIcon = (props) => {
|
|
14609
|
-
return /* @__PURE__ */
|
|
14707
|
+
return /* @__PURE__ */ jsx112("svg", {
|
|
14610
14708
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14611
14709
|
...props,
|
|
14612
14710
|
viewBox: "0 0 576 512",
|
|
14613
|
-
children: /* @__PURE__ */
|
|
14711
|
+
children: /* @__PURE__ */ jsx112("path", {
|
|
14614
14712
|
fill: "currentcolor",
|
|
14615
14713
|
d: "M169.9 280L94.9 448.6 461.2 280 169.9 280zm291.3-48L94.9 63.4 169.9 232 461.2 232zM34.8 465.6L128 256 34.8 46.4C33 42.2 32 37.6 32 33 32 14.8 46.7 0 64.8 0 69.5 0 74.2 1 78.5 3L554.2 222c13.3 6.1 21.8 19.4 21.8 34s-8.5 27.9-21.8 34L78.5 509c-4.3 2-9 3-13.7 3-18.1 0-32.8-14.8-32.8-33 0-4.6 1-9.2 2.8-13.4z"
|
|
14616
14714
|
})
|
|
@@ -14637,7 +14735,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
14637
14735
|
const { scope, children, ...context } = props;
|
|
14638
14736
|
const Context = scope?.[scopeName][index] || BaseContext;
|
|
14639
14737
|
const value = React62.useMemo(() => context, Object.values(context));
|
|
14640
|
-
return /* @__PURE__ */
|
|
14738
|
+
return /* @__PURE__ */ jsx122(Context.Provider, { value, children });
|
|
14641
14739
|
}
|
|
14642
14740
|
function useContext210(consumerName, scope) {
|
|
14643
14741
|
const Context = scope?.[scopeName][index] || BaseContext;
|
|
@@ -14712,9 +14810,9 @@ var Slot = React8.forwardRef((props, forwardedRef) => {
|
|
|
14712
14810
|
return child;
|
|
14713
14811
|
}
|
|
14714
14812
|
});
|
|
14715
|
-
return /* @__PURE__ */
|
|
14813
|
+
return /* @__PURE__ */ jsx132(SlotClone, { ...slotProps, ref: forwardedRef, children: React8.isValidElement(newElement) ? React8.cloneElement(newElement, undefined, newChildren) : null });
|
|
14716
14814
|
}
|
|
14717
|
-
return /* @__PURE__ */
|
|
14815
|
+
return /* @__PURE__ */ jsx132(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
14718
14816
|
});
|
|
14719
14817
|
Slot.displayName = "Slot";
|
|
14720
14818
|
var SlotClone = React8.forwardRef((props, forwardedRef) => {
|
|
@@ -14730,7 +14828,7 @@ var SlotClone = React8.forwardRef((props, forwardedRef) => {
|
|
|
14730
14828
|
});
|
|
14731
14829
|
SlotClone.displayName = "SlotClone";
|
|
14732
14830
|
var Slottable = ({ children }) => {
|
|
14733
|
-
return /* @__PURE__ */
|
|
14831
|
+
return /* @__PURE__ */ jsx132(Fragment22, { children });
|
|
14734
14832
|
};
|
|
14735
14833
|
function isSlottable(child) {
|
|
14736
14834
|
return React8.isValidElement(child) && child.type === Slottable;
|
|
@@ -14779,7 +14877,7 @@ function createCollection(name) {
|
|
|
14779
14877
|
const { scope, children } = props;
|
|
14780
14878
|
const ref = React92.useRef(null);
|
|
14781
14879
|
const itemMap = React92.useRef(/* @__PURE__ */ new Map).current;
|
|
14782
|
-
return /* @__PURE__ */
|
|
14880
|
+
return /* @__PURE__ */ jsx142(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
14783
14881
|
};
|
|
14784
14882
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
14785
14883
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
@@ -14787,7 +14885,7 @@ function createCollection(name) {
|
|
|
14787
14885
|
const { scope, children } = props;
|
|
14788
14886
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
14789
14887
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
14790
|
-
return /* @__PURE__ */
|
|
14888
|
+
return /* @__PURE__ */ jsx142(Slot, { ref: composedRefs, children });
|
|
14791
14889
|
});
|
|
14792
14890
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
14793
14891
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
@@ -14801,7 +14899,7 @@ function createCollection(name) {
|
|
|
14801
14899
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
14802
14900
|
return () => void context.itemMap.delete(ref);
|
|
14803
14901
|
});
|
|
14804
|
-
return /* @__PURE__ */
|
|
14902
|
+
return /* @__PURE__ */ jsx142(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
14805
14903
|
});
|
|
14806
14904
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
14807
14905
|
function useCollection(scope) {
|
|
@@ -14853,7 +14951,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
14853
14951
|
if (typeof window !== "undefined") {
|
|
14854
14952
|
window[Symbol.for("radix-ui")] = true;
|
|
14855
14953
|
}
|
|
14856
|
-
return /* @__PURE__ */
|
|
14954
|
+
return /* @__PURE__ */ jsx162(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
14857
14955
|
});
|
|
14858
14956
|
Node2.displayName = `Primitive.${node}`;
|
|
14859
14957
|
return { ...primitive, [node]: Node2 };
|
|
@@ -14974,7 +15072,7 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
|
|
|
14974
15072
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
14975
15073
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
14976
15074
|
}, []);
|
|
14977
|
-
return /* @__PURE__ */
|
|
15075
|
+
return /* @__PURE__ */ jsx172(Primitive.div, {
|
|
14978
15076
|
...layerProps,
|
|
14979
15077
|
ref: composedRefs,
|
|
14980
15078
|
style: {
|
|
@@ -15001,7 +15099,7 @@ var DismissableLayerBranch = React14.forwardRef((props, forwardedRef) => {
|
|
|
15001
15099
|
};
|
|
15002
15100
|
}
|
|
15003
15101
|
}, [context.branches]);
|
|
15004
|
-
return /* @__PURE__ */
|
|
15102
|
+
return /* @__PURE__ */ jsx172(Primitive.div, { ...props, ref: composedRefs });
|
|
15005
15103
|
});
|
|
15006
15104
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
15007
15105
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
@@ -15224,7 +15322,7 @@ var FocusScope = React162.forwardRef((props, forwardedRef) => {
|
|
|
15224
15322
|
}
|
|
15225
15323
|
}
|
|
15226
15324
|
}, [loop, trapped, focusScope.paused]);
|
|
15227
|
-
return /* @__PURE__ */
|
|
15325
|
+
return /* @__PURE__ */ jsx182(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
15228
15326
|
});
|
|
15229
15327
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
15230
15328
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -15314,12 +15412,12 @@ function removeLinks(items) {
|
|
|
15314
15412
|
return items.filter((item) => item.tagName !== "A");
|
|
15315
15413
|
}
|
|
15316
15414
|
var useLayoutEffect22 = Boolean(globalThis?.document) ? React172.useLayoutEffect : () => {};
|
|
15317
|
-
var useReactId =
|
|
15415
|
+
var useReactId = React182["useId".toString()] || (() => {
|
|
15318
15416
|
return;
|
|
15319
15417
|
});
|
|
15320
15418
|
var count2 = 0;
|
|
15321
15419
|
function useId(deterministicId) {
|
|
15322
|
-
const [id, setId] =
|
|
15420
|
+
const [id, setId] = React182.useState(useReactId());
|
|
15323
15421
|
useLayoutEffect22(() => {
|
|
15324
15422
|
if (!deterministicId)
|
|
15325
15423
|
setId((reactId) => reactId ?? String(count2++));
|
|
@@ -17114,14 +17212,14 @@ var arrow3 = (options, deps) => ({
|
|
|
17114
17212
|
var NAME = "Arrow";
|
|
17115
17213
|
var Arrow = React20.forwardRef((props, forwardedRef) => {
|
|
17116
17214
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
17117
|
-
return /* @__PURE__ */
|
|
17215
|
+
return /* @__PURE__ */ jsx192(Primitive.svg, {
|
|
17118
17216
|
...arrowProps,
|
|
17119
17217
|
ref: forwardedRef,
|
|
17120
17218
|
width,
|
|
17121
17219
|
height,
|
|
17122
17220
|
viewBox: "0 0 30 10",
|
|
17123
17221
|
preserveAspectRatio: "none",
|
|
17124
|
-
children: props.asChild ? children : /* @__PURE__ */
|
|
17222
|
+
children: props.asChild ? children : /* @__PURE__ */ jsx192("polygon", { points: "0,0 30,0 15,10" })
|
|
17125
17223
|
});
|
|
17126
17224
|
});
|
|
17127
17225
|
Arrow.displayName = NAME;
|
|
@@ -17166,7 +17264,7 @@ var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
|
17166
17264
|
var Popper = (props) => {
|
|
17167
17265
|
const { __scopePopper, children } = props;
|
|
17168
17266
|
const [anchor, setAnchor] = React22.useState(null);
|
|
17169
|
-
return /* @__PURE__ */
|
|
17267
|
+
return /* @__PURE__ */ jsx202(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
17170
17268
|
};
|
|
17171
17269
|
Popper.displayName = POPPER_NAME;
|
|
17172
17270
|
var ANCHOR_NAME = "PopperAnchor";
|
|
@@ -17178,7 +17276,7 @@ var PopperAnchor = React22.forwardRef((props, forwardedRef) => {
|
|
|
17178
17276
|
React22.useEffect(() => {
|
|
17179
17277
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
17180
17278
|
});
|
|
17181
|
-
return virtualRef ? null : /* @__PURE__ */
|
|
17279
|
+
return virtualRef ? null : /* @__PURE__ */ jsx202(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
17182
17280
|
});
|
|
17183
17281
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
17184
17282
|
var CONTENT_NAME = "PopperContent";
|
|
@@ -17268,7 +17366,7 @@ var PopperContent = React22.forwardRef((props, forwardedRef) => {
|
|
|
17268
17366
|
if (content)
|
|
17269
17367
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
17270
17368
|
}, [content]);
|
|
17271
|
-
return /* @__PURE__ */
|
|
17369
|
+
return /* @__PURE__ */ jsx202("div", {
|
|
17272
17370
|
ref: refs.setFloating,
|
|
17273
17371
|
"data-radix-popper-content-wrapper": "",
|
|
17274
17372
|
style: {
|
|
@@ -17286,14 +17384,14 @@ var PopperContent = React22.forwardRef((props, forwardedRef) => {
|
|
|
17286
17384
|
}
|
|
17287
17385
|
},
|
|
17288
17386
|
dir: props.dir,
|
|
17289
|
-
children: /* @__PURE__ */
|
|
17387
|
+
children: /* @__PURE__ */ jsx202(PopperContentProvider, {
|
|
17290
17388
|
scope: __scopePopper,
|
|
17291
17389
|
placedSide,
|
|
17292
17390
|
onArrowChange: setArrow,
|
|
17293
17391
|
arrowX,
|
|
17294
17392
|
arrowY,
|
|
17295
17393
|
shouldHideArrow: cannotCenterArrow,
|
|
17296
|
-
children: /* @__PURE__ */
|
|
17394
|
+
children: /* @__PURE__ */ jsx202(Primitive.div, {
|
|
17297
17395
|
"data-side": placedSide,
|
|
17298
17396
|
"data-align": placedAlign,
|
|
17299
17397
|
...contentProps,
|
|
@@ -17318,7 +17416,7 @@ var PopperArrow = React22.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
17318
17416
|
const { __scopePopper, ...arrowProps } = props;
|
|
17319
17417
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
17320
17418
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
17321
|
-
return /* @__PURE__ */
|
|
17419
|
+
return /* @__PURE__ */ jsx202("span", {
|
|
17322
17420
|
ref: contentContext.onArrowChange,
|
|
17323
17421
|
style: {
|
|
17324
17422
|
position: "absolute",
|
|
@@ -17339,7 +17437,7 @@ var PopperArrow = React22.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
17339
17437
|
}[contentContext.placedSide],
|
|
17340
17438
|
visibility: contentContext.shouldHideArrow ? "hidden" : undefined
|
|
17341
17439
|
},
|
|
17342
|
-
children: /* @__PURE__ */
|
|
17440
|
+
children: /* @__PURE__ */ jsx202(Root2, {
|
|
17343
17441
|
...arrowProps,
|
|
17344
17442
|
ref: forwardedRef,
|
|
17345
17443
|
style: {
|
|
@@ -17398,7 +17496,7 @@ var Portal = React23.forwardRef((props, forwardedRef) => {
|
|
|
17398
17496
|
const [mounted, setMounted] = React23.useState(false);
|
|
17399
17497
|
useLayoutEffect22(() => setMounted(true), []);
|
|
17400
17498
|
const container22 = containerProp || mounted && globalThis?.document?.body;
|
|
17401
|
-
return container22 ? ReactDOM3.createPortal(/* @__PURE__ */
|
|
17499
|
+
return container22 ? ReactDOM3.createPortal(/* @__PURE__ */ jsx213(Primitive.div, { ...portalProps, ref: forwardedRef }), container22) : null;
|
|
17402
17500
|
});
|
|
17403
17501
|
Portal.displayName = PORTAL_NAME;
|
|
17404
17502
|
function useControllableState({
|
|
@@ -17450,7 +17548,7 @@ function usePrevious(value) {
|
|
|
17450
17548
|
}
|
|
17451
17549
|
var NAME2 = "VisuallyHidden";
|
|
17452
17550
|
var VisuallyHidden = React262.forwardRef((props, forwardedRef) => {
|
|
17453
|
-
return /* @__PURE__ */
|
|
17551
|
+
return /* @__PURE__ */ jsx223(Primitive.span, {
|
|
17454
17552
|
...props,
|
|
17455
17553
|
ref: forwardedRef,
|
|
17456
17554
|
style: {
|
|
@@ -17869,7 +17967,7 @@ var stylesheetSingleton = function() {
|
|
|
17869
17967
|
var styleHookSingleton = function() {
|
|
17870
17968
|
var sheet = stylesheetSingleton();
|
|
17871
17969
|
return function(styles, isDynamic) {
|
|
17872
|
-
|
|
17970
|
+
React302.useEffect(function() {
|
|
17873
17971
|
sheet.add(styles);
|
|
17874
17972
|
return function() {
|
|
17875
17973
|
sheet.remove();
|
|
@@ -18311,7 +18409,7 @@ var Select = (props) => {
|
|
|
18311
18409
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
18312
18410
|
const [nativeOptionsSet, setNativeOptionsSet] = React342.useState(/* @__PURE__ */ new Set);
|
|
18313
18411
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
18314
|
-
return /* @__PURE__ */
|
|
18412
|
+
return /* @__PURE__ */ jsx232(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
|
|
18315
18413
|
required,
|
|
18316
18414
|
scope: __scopeSelect,
|
|
18317
18415
|
trigger,
|
|
@@ -18329,7 +18427,7 @@ var Select = (props) => {
|
|
|
18329
18427
|
triggerPointerDownPosRef,
|
|
18330
18428
|
disabled,
|
|
18331
18429
|
children: [
|
|
18332
|
-
/* @__PURE__ */
|
|
18430
|
+
/* @__PURE__ */ jsx232(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx232(SelectNativeOptionsProvider, {
|
|
18333
18431
|
scope: props.__scopeSelect,
|
|
18334
18432
|
onNativeOptionAdd: React342.useCallback((option) => {
|
|
18335
18433
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
@@ -18353,7 +18451,7 @@ var Select = (props) => {
|
|
|
18353
18451
|
onChange: (event) => setValue(event.target.value),
|
|
18354
18452
|
disabled,
|
|
18355
18453
|
children: [
|
|
18356
|
-
value === undefined ? /* @__PURE__ */
|
|
18454
|
+
value === undefined ? /* @__PURE__ */ jsx232("option", { value: "" }) : null,
|
|
18357
18455
|
Array.from(nativeOptionsSet)
|
|
18358
18456
|
]
|
|
18359
18457
|
}, nativeSelectKey) : null
|
|
@@ -18383,7 +18481,7 @@ var SelectTrigger = React342.forwardRef((props, forwardedRef) => {
|
|
|
18383
18481
|
resetTypeahead();
|
|
18384
18482
|
}
|
|
18385
18483
|
};
|
|
18386
|
-
return /* @__PURE__ */
|
|
18484
|
+
return /* @__PURE__ */ jsx232(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx232(Primitive.button, {
|
|
18387
18485
|
type: "button",
|
|
18388
18486
|
role: "combobox",
|
|
18389
18487
|
"aria-controls": context.contentId,
|
|
@@ -18439,23 +18537,23 @@ var SelectValue = React342.forwardRef((props, forwardedRef) => {
|
|
|
18439
18537
|
useLayoutEffect22(() => {
|
|
18440
18538
|
onValueNodeHasChildrenChange(hasChildren);
|
|
18441
18539
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
18442
|
-
return /* @__PURE__ */
|
|
18540
|
+
return /* @__PURE__ */ jsx232(Primitive.span, {
|
|
18443
18541
|
...valueProps,
|
|
18444
18542
|
ref: composedRefs,
|
|
18445
18543
|
style: { pointerEvents: "none" },
|
|
18446
|
-
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */
|
|
18544
|
+
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ jsx232(Fragment5, { children: placeholder }) : children
|
|
18447
18545
|
});
|
|
18448
18546
|
});
|
|
18449
18547
|
SelectValue.displayName = VALUE_NAME;
|
|
18450
18548
|
var ICON_NAME = "SelectIcon";
|
|
18451
18549
|
var SelectIcon = React342.forwardRef((props, forwardedRef) => {
|
|
18452
18550
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
18453
|
-
return /* @__PURE__ */
|
|
18551
|
+
return /* @__PURE__ */ jsx232(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
18454
18552
|
});
|
|
18455
18553
|
SelectIcon.displayName = ICON_NAME;
|
|
18456
18554
|
var PORTAL_NAME2 = "SelectPortal";
|
|
18457
18555
|
var SelectPortal = (props) => {
|
|
18458
|
-
return /* @__PURE__ */
|
|
18556
|
+
return /* @__PURE__ */ jsx232(Portal, { asChild: true, ...props });
|
|
18459
18557
|
};
|
|
18460
18558
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
18461
18559
|
var CONTENT_NAME2 = "SelectContent";
|
|
@@ -18467,9 +18565,9 @@ var SelectContent = React342.forwardRef((props, forwardedRef) => {
|
|
|
18467
18565
|
}, []);
|
|
18468
18566
|
if (!context.open) {
|
|
18469
18567
|
const frag = fragment;
|
|
18470
|
-
return frag ? ReactDOM4.createPortal(/* @__PURE__ */
|
|
18568
|
+
return frag ? ReactDOM4.createPortal(/* @__PURE__ */ jsx232(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx232(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx232("div", { children: props.children }) }) }), frag) : null;
|
|
18471
18569
|
}
|
|
18472
|
-
return /* @__PURE__ */
|
|
18570
|
+
return /* @__PURE__ */ jsx232(SelectContentImpl, { ...props, ref: forwardedRef });
|
|
18473
18571
|
});
|
|
18474
18572
|
SelectContent.displayName = CONTENT_NAME2;
|
|
18475
18573
|
var CONTENT_MARGIN = 10;
|
|
@@ -18609,7 +18707,7 @@ var SelectContentImpl = React342.forwardRef((props, forwardedRef) => {
|
|
|
18609
18707
|
hideWhenDetached,
|
|
18610
18708
|
avoidCollisions
|
|
18611
18709
|
} : {};
|
|
18612
|
-
return /* @__PURE__ */
|
|
18710
|
+
return /* @__PURE__ */ jsx232(SelectContentProvider, {
|
|
18613
18711
|
scope: __scopeSelect,
|
|
18614
18712
|
content,
|
|
18615
18713
|
viewport,
|
|
@@ -18623,7 +18721,7 @@ var SelectContentImpl = React342.forwardRef((props, forwardedRef) => {
|
|
|
18623
18721
|
position,
|
|
18624
18722
|
isPositioned,
|
|
18625
18723
|
searchRef,
|
|
18626
|
-
children: /* @__PURE__ */
|
|
18724
|
+
children: /* @__PURE__ */ jsx232(Combination_default, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx232(FocusScope, {
|
|
18627
18725
|
asChild: true,
|
|
18628
18726
|
trapped: context.open,
|
|
18629
18727
|
onMountAutoFocus: (event) => {
|
|
@@ -18633,14 +18731,14 @@ var SelectContentImpl = React342.forwardRef((props, forwardedRef) => {
|
|
|
18633
18731
|
context.trigger?.focus({ preventScroll: true });
|
|
18634
18732
|
event.preventDefault();
|
|
18635
18733
|
}),
|
|
18636
|
-
children: /* @__PURE__ */
|
|
18734
|
+
children: /* @__PURE__ */ jsx232(DismissableLayer, {
|
|
18637
18735
|
asChild: true,
|
|
18638
18736
|
disableOutsidePointerEvents: true,
|
|
18639
18737
|
onEscapeKeyDown,
|
|
18640
18738
|
onPointerDownOutside,
|
|
18641
18739
|
onFocusOutside: (event) => event.preventDefault(),
|
|
18642
18740
|
onDismiss: () => context.onOpenChange(false),
|
|
18643
|
-
children: /* @__PURE__ */
|
|
18741
|
+
children: /* @__PURE__ */ jsx232(SelectPosition, {
|
|
18644
18742
|
role: "listbox",
|
|
18645
18743
|
id: context.contentId,
|
|
18646
18744
|
"data-state": context.open ? "open" : "closed",
|
|
@@ -18788,12 +18886,12 @@ var SelectItemAlignedPosition = React342.forwardRef((props, forwardedRef) => {
|
|
|
18788
18886
|
shouldRepositionRef.current = false;
|
|
18789
18887
|
}
|
|
18790
18888
|
}, [position, focusSelectedItem]);
|
|
18791
|
-
return /* @__PURE__ */
|
|
18889
|
+
return /* @__PURE__ */ jsx232(SelectViewportProvider, {
|
|
18792
18890
|
scope: __scopeSelect,
|
|
18793
18891
|
contentWrapper,
|
|
18794
18892
|
shouldExpandOnScrollRef,
|
|
18795
18893
|
onScrollButtonChange: handleScrollButtonChange,
|
|
18796
|
-
children: /* @__PURE__ */
|
|
18894
|
+
children: /* @__PURE__ */ jsx232("div", {
|
|
18797
18895
|
ref: setContentWrapper,
|
|
18798
18896
|
style: {
|
|
18799
18897
|
display: "flex",
|
|
@@ -18801,7 +18899,7 @@ var SelectItemAlignedPosition = React342.forwardRef((props, forwardedRef) => {
|
|
|
18801
18899
|
position: "fixed",
|
|
18802
18900
|
zIndex: contentZIndex
|
|
18803
18901
|
},
|
|
18804
|
-
children: /* @__PURE__ */
|
|
18902
|
+
children: /* @__PURE__ */ jsx232(Primitive.div, {
|
|
18805
18903
|
...popperProps,
|
|
18806
18904
|
ref: composedRefs,
|
|
18807
18905
|
style: {
|
|
@@ -18823,7 +18921,7 @@ var SelectPopperPosition = React342.forwardRef((props, forwardedRef) => {
|
|
|
18823
18921
|
...popperProps
|
|
18824
18922
|
} = props;
|
|
18825
18923
|
const popperScope = usePopperScope(__scopeSelect);
|
|
18826
|
-
return /* @__PURE__ */
|
|
18924
|
+
return /* @__PURE__ */ jsx232(Content, {
|
|
18827
18925
|
...popperScope,
|
|
18828
18926
|
...popperProps,
|
|
18829
18927
|
ref: forwardedRef,
|
|
@@ -18852,13 +18950,13 @@ var SelectViewport = React342.forwardRef((props, forwardedRef) => {
|
|
|
18852
18950
|
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
18853
18951
|
const prevScrollTopRef = React342.useRef(0);
|
|
18854
18952
|
return /* @__PURE__ */ jsxs42(Fragment5, { children: [
|
|
18855
|
-
/* @__PURE__ */
|
|
18953
|
+
/* @__PURE__ */ jsx232("style", {
|
|
18856
18954
|
dangerouslySetInnerHTML: {
|
|
18857
18955
|
__html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`
|
|
18858
18956
|
},
|
|
18859
18957
|
nonce
|
|
18860
18958
|
}),
|
|
18861
|
-
/* @__PURE__ */
|
|
18959
|
+
/* @__PURE__ */ jsx232(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx232(Primitive.div, {
|
|
18862
18960
|
"data-radix-select-viewport": "",
|
|
18863
18961
|
role: "presentation",
|
|
18864
18962
|
...viewportProps,
|
|
@@ -18902,14 +19000,14 @@ var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GR
|
|
|
18902
19000
|
var SelectGroup = React342.forwardRef((props, forwardedRef) => {
|
|
18903
19001
|
const { __scopeSelect, ...groupProps } = props;
|
|
18904
19002
|
const groupId = useId();
|
|
18905
|
-
return /* @__PURE__ */
|
|
19003
|
+
return /* @__PURE__ */ jsx232(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx232(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
18906
19004
|
});
|
|
18907
19005
|
SelectGroup.displayName = GROUP_NAME;
|
|
18908
19006
|
var LABEL_NAME = "SelectLabel";
|
|
18909
19007
|
var SelectLabel = React342.forwardRef((props, forwardedRef) => {
|
|
18910
19008
|
const { __scopeSelect, ...labelProps } = props;
|
|
18911
19009
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
18912
|
-
return /* @__PURE__ */
|
|
19010
|
+
return /* @__PURE__ */ jsx232(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
18913
19011
|
});
|
|
18914
19012
|
SelectLabel.displayName = LABEL_NAME;
|
|
18915
19013
|
var ITEM_NAME = "SelectItem";
|
|
@@ -18938,7 +19036,7 @@ var SelectItem = React342.forwardRef((props, forwardedRef) => {
|
|
|
18938
19036
|
if (value === "") {
|
|
18939
19037
|
throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
|
|
18940
19038
|
}
|
|
18941
|
-
return /* @__PURE__ */
|
|
19039
|
+
return /* @__PURE__ */ jsx232(SelectItemContextProvider, {
|
|
18942
19040
|
scope: __scopeSelect,
|
|
18943
19041
|
value,
|
|
18944
19042
|
disabled,
|
|
@@ -18947,12 +19045,12 @@ var SelectItem = React342.forwardRef((props, forwardedRef) => {
|
|
|
18947
19045
|
onItemTextChange: React342.useCallback((node) => {
|
|
18948
19046
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
18949
19047
|
}, []),
|
|
18950
|
-
children: /* @__PURE__ */
|
|
19048
|
+
children: /* @__PURE__ */ jsx232(Collection.ItemSlot, {
|
|
18951
19049
|
scope: __scopeSelect,
|
|
18952
19050
|
value,
|
|
18953
19051
|
disabled,
|
|
18954
19052
|
textValue,
|
|
18955
|
-
children: /* @__PURE__ */
|
|
19053
|
+
children: /* @__PURE__ */ jsx232(Primitive.div, {
|
|
18956
19054
|
role: "option",
|
|
18957
19055
|
"aria-labelledby": textId,
|
|
18958
19056
|
"data-highlighted": isFocused ? "" : undefined,
|
|
@@ -19002,14 +19100,14 @@ var SelectItemText = React342.forwardRef((props, forwardedRef) => {
|
|
|
19002
19100
|
const [itemTextNode, setItemTextNode] = React342.useState(null);
|
|
19003
19101
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
19004
19102
|
const textContent = itemTextNode?.textContent;
|
|
19005
|
-
const nativeOption = React342.useMemo(() => /* @__PURE__ */
|
|
19103
|
+
const nativeOption = React342.useMemo(() => /* @__PURE__ */ jsx232("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
19006
19104
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
19007
19105
|
useLayoutEffect22(() => {
|
|
19008
19106
|
onNativeOptionAdd(nativeOption);
|
|
19009
19107
|
return () => onNativeOptionRemove(nativeOption);
|
|
19010
19108
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
19011
19109
|
return /* @__PURE__ */ jsxs42(Fragment5, { children: [
|
|
19012
|
-
/* @__PURE__ */
|
|
19110
|
+
/* @__PURE__ */ jsx232(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
19013
19111
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM4.createPortal(itemTextProps.children, context.valueNode) : null
|
|
19014
19112
|
] });
|
|
19015
19113
|
});
|
|
@@ -19018,7 +19116,7 @@ var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
|
19018
19116
|
var SelectItemIndicator = React342.forwardRef((props, forwardedRef) => {
|
|
19019
19117
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
19020
19118
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
19021
|
-
return itemContext.isSelected ? /* @__PURE__ */
|
|
19119
|
+
return itemContext.isSelected ? /* @__PURE__ */ jsx232(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
19022
19120
|
});
|
|
19023
19121
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
19024
19122
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
@@ -19040,7 +19138,7 @@ var SelectScrollUpButton = React342.forwardRef((props, forwardedRef) => {
|
|
|
19040
19138
|
return () => viewport.removeEventListener("scroll", handleScroll22);
|
|
19041
19139
|
}
|
|
19042
19140
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
19043
|
-
return canScrollUp ? /* @__PURE__ */
|
|
19141
|
+
return canScrollUp ? /* @__PURE__ */ jsx232(SelectScrollButtonImpl, {
|
|
19044
19142
|
...props,
|
|
19045
19143
|
ref: composedRefs,
|
|
19046
19144
|
onAutoScroll: () => {
|
|
@@ -19072,7 +19170,7 @@ var SelectScrollDownButton = React342.forwardRef((props, forwardedRef) => {
|
|
|
19072
19170
|
return () => viewport.removeEventListener("scroll", handleScroll22);
|
|
19073
19171
|
}
|
|
19074
19172
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
19075
|
-
return canScrollDown ? /* @__PURE__ */
|
|
19173
|
+
return canScrollDown ? /* @__PURE__ */ jsx232(SelectScrollButtonImpl, {
|
|
19076
19174
|
...props,
|
|
19077
19175
|
ref: composedRefs,
|
|
19078
19176
|
onAutoScroll: () => {
|
|
@@ -19102,7 +19200,7 @@ var SelectScrollButtonImpl = React342.forwardRef((props, forwardedRef) => {
|
|
|
19102
19200
|
const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
|
|
19103
19201
|
activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
19104
19202
|
}, [getItems]);
|
|
19105
|
-
return /* @__PURE__ */
|
|
19203
|
+
return /* @__PURE__ */ jsx232(Primitive.div, {
|
|
19106
19204
|
"aria-hidden": true,
|
|
19107
19205
|
...scrollIndicatorProps,
|
|
19108
19206
|
ref: forwardedRef,
|
|
@@ -19126,7 +19224,7 @@ var SelectScrollButtonImpl = React342.forwardRef((props, forwardedRef) => {
|
|
|
19126
19224
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
19127
19225
|
var SelectSeparator = React342.forwardRef((props, forwardedRef) => {
|
|
19128
19226
|
const { __scopeSelect, ...separatorProps } = props;
|
|
19129
|
-
return /* @__PURE__ */
|
|
19227
|
+
return /* @__PURE__ */ jsx232(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
19130
19228
|
});
|
|
19131
19229
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
19132
19230
|
var ARROW_NAME2 = "SelectArrow";
|
|
@@ -19135,7 +19233,7 @@ var SelectArrow = React342.forwardRef((props, forwardedRef) => {
|
|
|
19135
19233
|
const popperScope = usePopperScope(__scopeSelect);
|
|
19136
19234
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
19137
19235
|
const contentContext = useSelectContentContext(ARROW_NAME2, __scopeSelect);
|
|
19138
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */
|
|
19236
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx232(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
19139
19237
|
});
|
|
19140
19238
|
SelectArrow.displayName = ARROW_NAME2;
|
|
19141
19239
|
function shouldShowPlaceholder(value) {
|
|
@@ -19157,7 +19255,7 @@ var BubbleSelect = React342.forwardRef((props, forwardedRef) => {
|
|
|
19157
19255
|
select.dispatchEvent(event);
|
|
19158
19256
|
}
|
|
19159
19257
|
}, [prevValue, value]);
|
|
19160
|
-
return /* @__PURE__ */
|
|
19258
|
+
return /* @__PURE__ */ jsx232(VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsx232("select", { ...selectProps, ref: composedRefs, defaultValue: value }) });
|
|
19161
19259
|
});
|
|
19162
19260
|
BubbleSelect.displayName = "BubbleSelect";
|
|
19163
19261
|
function useTypeaheadSearch(onSearchChange) {
|
|
@@ -19273,51 +19371,51 @@ var SelectTrigger2 = React35.forwardRef(({ className, children, ...props }, ref)
|
|
|
19273
19371
|
...props,
|
|
19274
19372
|
children: [
|
|
19275
19373
|
children,
|
|
19276
|
-
/* @__PURE__ */
|
|
19374
|
+
/* @__PURE__ */ jsx242(Icon, {
|
|
19277
19375
|
asChild: true,
|
|
19278
|
-
children: /* @__PURE__ */
|
|
19376
|
+
children: /* @__PURE__ */ jsx242(ChevronDown, {
|
|
19279
19377
|
className: "h-4 w-4 opacity-50"
|
|
19280
19378
|
})
|
|
19281
19379
|
})
|
|
19282
19380
|
]
|
|
19283
19381
|
}));
|
|
19284
19382
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
19285
|
-
var SelectScrollUpButton2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
19383
|
+
var SelectScrollUpButton2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx242(ScrollUpButton, {
|
|
19286
19384
|
ref,
|
|
19287
19385
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
19288
19386
|
...props,
|
|
19289
|
-
children: /* @__PURE__ */
|
|
19387
|
+
children: /* @__PURE__ */ jsx242(ChevronUp, {
|
|
19290
19388
|
className: "h-4 w-4"
|
|
19291
19389
|
})
|
|
19292
19390
|
}));
|
|
19293
19391
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
19294
|
-
var SelectScrollDownButton2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
19392
|
+
var SelectScrollDownButton2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx242(ScrollDownButton, {
|
|
19295
19393
|
ref,
|
|
19296
19394
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
19297
19395
|
...props,
|
|
19298
|
-
children: /* @__PURE__ */
|
|
19396
|
+
children: /* @__PURE__ */ jsx242(ChevronDown, {
|
|
19299
19397
|
className: "h-4 w-4"
|
|
19300
19398
|
})
|
|
19301
19399
|
}));
|
|
19302
19400
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
19303
|
-
var SelectContent2 = React35.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */
|
|
19401
|
+
var SelectContent2 = React35.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx242(Portal2, {
|
|
19304
19402
|
children: /* @__PURE__ */ jsxs52(Content2, {
|
|
19305
19403
|
ref,
|
|
19306
19404
|
className: cn(" border-2 border-black relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md font-brand bg-card-bg text-text shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
19307
19405
|
position,
|
|
19308
19406
|
...props,
|
|
19309
19407
|
children: [
|
|
19310
|
-
/* @__PURE__ */
|
|
19311
|
-
/* @__PURE__ */
|
|
19408
|
+
/* @__PURE__ */ jsx242(SelectScrollUpButton2, {}),
|
|
19409
|
+
/* @__PURE__ */ jsx242(Viewport, {
|
|
19312
19410
|
className: cn("p-1", position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),
|
|
19313
19411
|
children
|
|
19314
19412
|
}),
|
|
19315
|
-
/* @__PURE__ */
|
|
19413
|
+
/* @__PURE__ */ jsx242(SelectScrollDownButton2, {})
|
|
19316
19414
|
]
|
|
19317
19415
|
})
|
|
19318
19416
|
}));
|
|
19319
19417
|
SelectContent2.displayName = Content2.displayName;
|
|
19320
|
-
var SelectLabel2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
19418
|
+
var SelectLabel2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx242(Label, {
|
|
19321
19419
|
ref,
|
|
19322
19420
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
19323
19421
|
...props
|
|
@@ -19328,188 +19426,1317 @@ var SelectItem2 = React35.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
19328
19426
|
className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-slate-200 dark:focus:bg-white/10 data-disabled:pointer-events-none data-disabled:opacity-50 font-brand", className),
|
|
19329
19427
|
...props,
|
|
19330
19428
|
children: [
|
|
19331
|
-
/* @__PURE__ */
|
|
19429
|
+
/* @__PURE__ */ jsx242("span", {
|
|
19332
19430
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
19333
|
-
children: /* @__PURE__ */
|
|
19334
|
-
children: /* @__PURE__ */
|
|
19431
|
+
children: /* @__PURE__ */ jsx242(ItemIndicator, {
|
|
19432
|
+
children: /* @__PURE__ */ jsx242(Check, {
|
|
19335
19433
|
className: "h-4 w-4"
|
|
19336
19434
|
})
|
|
19337
19435
|
})
|
|
19338
19436
|
}),
|
|
19339
|
-
/* @__PURE__ */
|
|
19437
|
+
/* @__PURE__ */ jsx242(ItemText, {
|
|
19340
19438
|
children
|
|
19341
19439
|
})
|
|
19342
19440
|
]
|
|
19343
19441
|
}));
|
|
19344
19442
|
SelectItem2.displayName = Item.displayName;
|
|
19345
|
-
var SelectSeparator2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
19443
|
+
var SelectSeparator2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx242(Separator, {
|
|
19346
19444
|
ref,
|
|
19347
19445
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
19348
19446
|
...props
|
|
19349
19447
|
}));
|
|
19350
19448
|
SelectSeparator2.displayName = Separator.displayName;
|
|
19351
19449
|
var Switch = ({ active, onToggle }) => {
|
|
19352
|
-
return /* @__PURE__ */
|
|
19450
|
+
return /* @__PURE__ */ jsx252("div", {
|
|
19353
19451
|
"data-active": active,
|
|
19354
19452
|
className: "h-8 transition-all rounded-full w-14 border-2 border-b-4 bg-gray-200 p-[2px] cursor-pointer data-[active=true]:bg-brand border-black relative",
|
|
19355
19453
|
onClick: onToggle,
|
|
19356
|
-
children: /* @__PURE__ */
|
|
19454
|
+
children: /* @__PURE__ */ jsx252("div", {
|
|
19357
19455
|
"data-active": active,
|
|
19358
19456
|
className: "h-4 w-4 box-content left-[4px] top-[3px] transition-all rounded-full bg-white border-2 border-black absolute data-[active=true]:left-[calc(100%-24px)]"
|
|
19359
19457
|
})
|
|
19360
19458
|
});
|
|
19361
19459
|
};
|
|
19362
|
-
var
|
|
19363
|
-
|
|
19364
|
-
|
|
19365
|
-
|
|
19366
|
-
|
|
19367
|
-
|
|
19368
|
-
},
|
|
19369
|
-
...props
|
|
19370
|
-
});
|
|
19371
|
-
});
|
|
19372
|
-
Textarea.displayName = "Textarea";
|
|
19373
|
-
var Triangle2 = (props) => {
|
|
19374
|
-
return /* @__PURE__ */ jsx252("svg", {
|
|
19375
|
-
viewBox: "0 0 127 131",
|
|
19376
|
-
fill: "none",
|
|
19377
|
-
...props,
|
|
19378
|
-
children: /* @__PURE__ */ jsx252("path", {
|
|
19379
|
-
d: "M28.5644 0.011261C25.8196 0.159241 23.6077 0.591782 21.3786 1.43413C20.2669 1.84959 18.4446 2.75455 17.4418 3.38062C13.2472 5.993 10.0496 9.9201 8.38209 14.4903C8.04973 15.3953 7.15007 18.2809 6.5713 20.2672C2.71476 33.5453 0.525761 48.0643 0.0558711 63.4312C-0.0186237 65.8785 -0.0186237 71.7066 0.0558711 74.1141C0.371041 84.3018 1.35093 93.4992 3.12735 102.879C3.84937 106.675 5.00691 111.774 5.67736 114.091C7.04692 118.798 9.84334 122.805 13.8202 125.741C16.4848 127.711 19.5105 129.031 22.8627 129.68C24.4787 129.993 26.6104 130.135 28.1805 130.033C30.3523 129.89 34.6616 129.316 38.1628 128.695C53.9442 125.901 68.5223 120.898 81.7422 113.738C90.1143 109.202 97.2715 104.29 104.177 98.3312C111.059 92.4007 116.927 86.0206 122.09 78.8608C123.287 77.2045 123.889 76.237 124.491 75.019C126.038 71.8773 126.766 68.7527 126.76 65.2582C126.76 62.0027 126.141 59.1114 124.806 56.1518C124.164 54.7233 123.551 53.6988 122.176 51.7523C117.11 44.5868 111.489 38.3433 104.635 32.2762C94.011 22.8739 81.3927 15.1619 67.3017 9.45339C64.2474 8.21835 61.239 7.13128 57.6174 5.95315C49.9502 3.46598 40.4607 1.30891 32.4324 0.233231C31.1718 0.0624847 29.4584 -0.0342712 28.5644 0.011261Z",
|
|
19380
|
-
fill: "currentcolor"
|
|
19381
|
-
})
|
|
19382
|
-
});
|
|
19383
|
-
};
|
|
19384
|
-
|
|
19385
|
-
// src/components/homepage/FreePricing.tsx
|
|
19386
|
-
import React39, { useCallback as useCallback26, useMemo as useMemo43 } from "react";
|
|
19387
|
-
|
|
19388
|
-
// ../../node_modules/.bun/tailwind-merge@2.5.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
19389
|
-
var CLASS_PART_SEPARATOR2 = "-";
|
|
19390
|
-
var createClassGroupUtils2 = (config) => {
|
|
19391
|
-
const classMap = createClassMap2(config);
|
|
19392
|
-
const {
|
|
19393
|
-
conflictingClassGroups,
|
|
19394
|
-
conflictingClassGroupModifiers
|
|
19395
|
-
} = config;
|
|
19396
|
-
const getClassGroupId = (className) => {
|
|
19397
|
-
const classParts = className.split(CLASS_PART_SEPARATOR2);
|
|
19398
|
-
if (classParts[0] === "" && classParts.length !== 1) {
|
|
19399
|
-
classParts.shift();
|
|
19460
|
+
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
19461
|
+
function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
19462
|
+
return function handleEvent(event) {
|
|
19463
|
+
originalEventHandler?.(event);
|
|
19464
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
19465
|
+
return ourEventHandler?.(event);
|
|
19400
19466
|
}
|
|
19401
|
-
return getGroupRecursive2(classParts, classMap) || getGroupIdForArbitraryProperty2(className);
|
|
19402
19467
|
};
|
|
19403
|
-
|
|
19404
|
-
|
|
19405
|
-
|
|
19406
|
-
|
|
19468
|
+
}
|
|
19469
|
+
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
19470
|
+
let defaultContexts = [];
|
|
19471
|
+
function createContext32(rootComponentName, defaultContext) {
|
|
19472
|
+
const BaseContext = React362.createContext(defaultContext);
|
|
19473
|
+
const index2 = defaultContexts.length;
|
|
19474
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
19475
|
+
const Provider = (props) => {
|
|
19476
|
+
const { scope, children, ...context } = props;
|
|
19477
|
+
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
19478
|
+
const value = React362.useMemo(() => context, Object.values(context));
|
|
19479
|
+
return /* @__PURE__ */ jsx262(Context.Provider, { value, children });
|
|
19480
|
+
};
|
|
19481
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
19482
|
+
function useContext222(consumerName, scope) {
|
|
19483
|
+
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
19484
|
+
const context = React362.useContext(Context);
|
|
19485
|
+
if (context)
|
|
19486
|
+
return context;
|
|
19487
|
+
if (defaultContext !== undefined)
|
|
19488
|
+
return defaultContext;
|
|
19489
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
19407
19490
|
}
|
|
19408
|
-
return
|
|
19491
|
+
return [Provider, useContext222];
|
|
19492
|
+
}
|
|
19493
|
+
const createScope = () => {
|
|
19494
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
19495
|
+
return React362.createContext(defaultContext);
|
|
19496
|
+
});
|
|
19497
|
+
return function useScope(scope) {
|
|
19498
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
19499
|
+
return React362.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
19500
|
+
};
|
|
19409
19501
|
};
|
|
19410
|
-
|
|
19411
|
-
|
|
19412
|
-
|
|
19502
|
+
createScope.scopeName = scopeName;
|
|
19503
|
+
return [createContext32, composeContextScopes2(createScope, ...createContextScopeDeps)];
|
|
19504
|
+
}
|
|
19505
|
+
function composeContextScopes2(...scopes) {
|
|
19506
|
+
const baseScope = scopes[0];
|
|
19507
|
+
if (scopes.length === 1)
|
|
19508
|
+
return baseScope;
|
|
19509
|
+
const createScope = () => {
|
|
19510
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
19511
|
+
useScope: createScope2(),
|
|
19512
|
+
scopeName: createScope2.scopeName
|
|
19513
|
+
}));
|
|
19514
|
+
return function useComposedScopes(overrideScopes) {
|
|
19515
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
19516
|
+
const scopeProps = useScope(overrideScopes);
|
|
19517
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
19518
|
+
return { ...nextScopes2, ...currentScope };
|
|
19519
|
+
}, {});
|
|
19520
|
+
return React362.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
19521
|
+
};
|
|
19413
19522
|
};
|
|
19414
|
-
|
|
19415
|
-
|
|
19416
|
-
|
|
19417
|
-
|
|
19418
|
-
|
|
19419
|
-
|
|
19420
|
-
|
|
19421
|
-
|
|
19422
|
-
if (classGroupFromNextClassPart) {
|
|
19423
|
-
return classGroupFromNextClassPart;
|
|
19424
|
-
}
|
|
19425
|
-
if (classPartObject.validators.length === 0) {
|
|
19426
|
-
return;
|
|
19427
|
-
}
|
|
19428
|
-
const classRest = classParts.join(CLASS_PART_SEPARATOR2);
|
|
19429
|
-
return classPartObject.validators.find(({
|
|
19430
|
-
validator
|
|
19431
|
-
}) => validator(classRest))?.classGroupId;
|
|
19432
|
-
};
|
|
19433
|
-
var arbitraryPropertyRegex2 = /^\[(.+)\]$/;
|
|
19434
|
-
var getGroupIdForArbitraryProperty2 = (className) => {
|
|
19435
|
-
if (arbitraryPropertyRegex2.test(className)) {
|
|
19436
|
-
const arbitraryPropertyClassName = arbitraryPropertyRegex2.exec(className)[1];
|
|
19437
|
-
const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(":"));
|
|
19438
|
-
if (property) {
|
|
19439
|
-
return "arbitrary.." + property;
|
|
19440
|
-
}
|
|
19523
|
+
createScope.scopeName = baseScope.scopeName;
|
|
19524
|
+
return createScope;
|
|
19525
|
+
}
|
|
19526
|
+
function setRef2(ref, value) {
|
|
19527
|
+
if (typeof ref === "function") {
|
|
19528
|
+
return ref(value);
|
|
19529
|
+
} else if (ref !== null && ref !== undefined) {
|
|
19530
|
+
ref.current = value;
|
|
19441
19531
|
}
|
|
19442
|
-
}
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
|
|
19450
|
-
validators: []
|
|
19451
|
-
};
|
|
19452
|
-
const prefixedClassGroupEntries = getPrefixedClassGroupEntries2(Object.entries(config.classGroups), prefix);
|
|
19453
|
-
prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
|
|
19454
|
-
processClassesRecursively2(classGroup, classMap, classGroupId, theme);
|
|
19455
|
-
});
|
|
19456
|
-
return classMap;
|
|
19457
|
-
};
|
|
19458
|
-
var processClassesRecursively2 = (classGroup, classPartObject, classGroupId, theme) => {
|
|
19459
|
-
classGroup.forEach((classDefinition) => {
|
|
19460
|
-
if (typeof classDefinition === "string") {
|
|
19461
|
-
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart2(classPartObject, classDefinition);
|
|
19462
|
-
classPartObjectToEdit.classGroupId = classGroupId;
|
|
19463
|
-
return;
|
|
19464
|
-
}
|
|
19465
|
-
if (typeof classDefinition === "function") {
|
|
19466
|
-
if (isThemeGetter2(classDefinition)) {
|
|
19467
|
-
processClassesRecursively2(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
19468
|
-
return;
|
|
19532
|
+
}
|
|
19533
|
+
function composeRefs2(...refs) {
|
|
19534
|
+
return (node) => {
|
|
19535
|
+
let hasCleanup = false;
|
|
19536
|
+
const cleanups = refs.map((ref) => {
|
|
19537
|
+
const cleanup = setRef2(ref, node);
|
|
19538
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
19539
|
+
hasCleanup = true;
|
|
19469
19540
|
}
|
|
19470
|
-
|
|
19471
|
-
validator: classDefinition,
|
|
19472
|
-
classGroupId
|
|
19473
|
-
});
|
|
19474
|
-
return;
|
|
19475
|
-
}
|
|
19476
|
-
Object.entries(classDefinition).forEach(([key, classGroup2]) => {
|
|
19477
|
-
processClassesRecursively2(classGroup2, getPart2(classPartObject, key), classGroupId, theme);
|
|
19541
|
+
return cleanup;
|
|
19478
19542
|
});
|
|
19479
|
-
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19543
|
+
if (hasCleanup) {
|
|
19544
|
+
return () => {
|
|
19545
|
+
for (let i = 0;i < cleanups.length; i++) {
|
|
19546
|
+
const cleanup = cleanups[i];
|
|
19547
|
+
if (typeof cleanup == "function") {
|
|
19548
|
+
cleanup();
|
|
19549
|
+
} else {
|
|
19550
|
+
setRef2(refs[i], null);
|
|
19551
|
+
}
|
|
19552
|
+
}
|
|
19553
|
+
};
|
|
19554
|
+
}
|
|
19555
|
+
};
|
|
19556
|
+
}
|
|
19557
|
+
function useComposedRefs2(...refs) {
|
|
19558
|
+
return React37.useCallback(composeRefs2(...refs), refs);
|
|
19559
|
+
}
|
|
19560
|
+
function createSlot(ownerName) {
|
|
19561
|
+
const SlotClone2 = /* @__PURE__ */ createSlotClone(ownerName);
|
|
19562
|
+
const Slot2 = React38.forwardRef((props, forwardedRef) => {
|
|
19563
|
+
const { children, ...slotProps } = props;
|
|
19564
|
+
const childrenArray = React38.Children.toArray(children);
|
|
19565
|
+
const slottable = childrenArray.find(isSlottable2);
|
|
19566
|
+
if (slottable) {
|
|
19567
|
+
const newElement = slottable.props.children;
|
|
19568
|
+
const newChildren = childrenArray.map((child) => {
|
|
19569
|
+
if (child === slottable) {
|
|
19570
|
+
if (React38.Children.count(newElement) > 1)
|
|
19571
|
+
return React38.Children.only(null);
|
|
19572
|
+
return React38.isValidElement(newElement) ? newElement.props.children : null;
|
|
19573
|
+
} else {
|
|
19574
|
+
return child;
|
|
19575
|
+
}
|
|
19488
19576
|
});
|
|
19577
|
+
return /* @__PURE__ */ jsx272(SlotClone2, { ...slotProps, ref: forwardedRef, children: React38.isValidElement(newElement) ? React38.cloneElement(newElement, undefined, newChildren) : null });
|
|
19489
19578
|
}
|
|
19490
|
-
|
|
19579
|
+
return /* @__PURE__ */ jsx272(SlotClone2, { ...slotProps, ref: forwardedRef, children });
|
|
19491
19580
|
});
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
|
|
19495
|
-
|
|
19496
|
-
|
|
19497
|
-
|
|
19498
|
-
|
|
19499
|
-
|
|
19500
|
-
|
|
19501
|
-
if (
|
|
19502
|
-
|
|
19503
|
-
}
|
|
19504
|
-
if (typeof classDefinition === "object") {
|
|
19505
|
-
return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
|
|
19581
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
19582
|
+
return Slot2;
|
|
19583
|
+
}
|
|
19584
|
+
function createSlotClone(ownerName) {
|
|
19585
|
+
const SlotClone2 = React38.forwardRef((props, forwardedRef) => {
|
|
19586
|
+
const { children, ...slotProps } = props;
|
|
19587
|
+
if (React38.isValidElement(children)) {
|
|
19588
|
+
const childrenRef = getElementRef2(children);
|
|
19589
|
+
const props2 = mergeProps2(slotProps, children.props);
|
|
19590
|
+
if (children.type !== React38.Fragment) {
|
|
19591
|
+
props2.ref = forwardedRef ? composeRefs2(forwardedRef, childrenRef) : childrenRef;
|
|
19506
19592
|
}
|
|
19507
|
-
return
|
|
19508
|
-
}
|
|
19509
|
-
return
|
|
19593
|
+
return React38.cloneElement(children, props2);
|
|
19594
|
+
}
|
|
19595
|
+
return React38.Children.count(children) > 1 ? React38.Children.only(null) : null;
|
|
19510
19596
|
});
|
|
19511
|
-
}
|
|
19512
|
-
|
|
19597
|
+
SlotClone2.displayName = `${ownerName}.SlotClone`;
|
|
19598
|
+
return SlotClone2;
|
|
19599
|
+
}
|
|
19600
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
19601
|
+
function isSlottable2(child) {
|
|
19602
|
+
return React38.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
19603
|
+
}
|
|
19604
|
+
function mergeProps2(slotProps, childProps) {
|
|
19605
|
+
const overrideProps = { ...childProps };
|
|
19606
|
+
for (const propName in childProps) {
|
|
19607
|
+
const slotPropValue = slotProps[propName];
|
|
19608
|
+
const childPropValue = childProps[propName];
|
|
19609
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
19610
|
+
if (isHandler) {
|
|
19611
|
+
if (slotPropValue && childPropValue) {
|
|
19612
|
+
overrideProps[propName] = (...args) => {
|
|
19613
|
+
const result = childPropValue(...args);
|
|
19614
|
+
slotPropValue(...args);
|
|
19615
|
+
return result;
|
|
19616
|
+
};
|
|
19617
|
+
} else if (slotPropValue) {
|
|
19618
|
+
overrideProps[propName] = slotPropValue;
|
|
19619
|
+
}
|
|
19620
|
+
} else if (propName === "style") {
|
|
19621
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
19622
|
+
} else if (propName === "className") {
|
|
19623
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
19624
|
+
}
|
|
19625
|
+
}
|
|
19626
|
+
return { ...slotProps, ...overrideProps };
|
|
19627
|
+
}
|
|
19628
|
+
function getElementRef2(element) {
|
|
19629
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
19630
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
19631
|
+
if (mayWarn) {
|
|
19632
|
+
return element.ref;
|
|
19633
|
+
}
|
|
19634
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
19635
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
19636
|
+
if (mayWarn) {
|
|
19637
|
+
return element.props.ref;
|
|
19638
|
+
}
|
|
19639
|
+
return element.props.ref || element.ref;
|
|
19640
|
+
}
|
|
19641
|
+
function createCollection2(name) {
|
|
19642
|
+
const PROVIDER_NAME = name + "CollectionProvider";
|
|
19643
|
+
const [createCollectionContext, createCollectionScope2] = createContextScope2(PROVIDER_NAME);
|
|
19644
|
+
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
19645
|
+
const CollectionProvider = (props) => {
|
|
19646
|
+
const { scope, children } = props;
|
|
19647
|
+
const ref = React39.useRef(null);
|
|
19648
|
+
const itemMap = React39.useRef(/* @__PURE__ */ new Map).current;
|
|
19649
|
+
return /* @__PURE__ */ jsx282(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
19650
|
+
};
|
|
19651
|
+
CollectionProvider.displayName = PROVIDER_NAME;
|
|
19652
|
+
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
19653
|
+
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
19654
|
+
const CollectionSlot = React39.forwardRef((props, forwardedRef) => {
|
|
19655
|
+
const { scope, children } = props;
|
|
19656
|
+
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
19657
|
+
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
19658
|
+
return /* @__PURE__ */ jsx282(CollectionSlotImpl, { ref: composedRefs, children });
|
|
19659
|
+
});
|
|
19660
|
+
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
19661
|
+
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
19662
|
+
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
19663
|
+
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
19664
|
+
const CollectionItemSlot = React39.forwardRef((props, forwardedRef) => {
|
|
19665
|
+
const { scope, children, ...itemData } = props;
|
|
19666
|
+
const ref = React39.useRef(null);
|
|
19667
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
19668
|
+
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
19669
|
+
React39.useEffect(() => {
|
|
19670
|
+
context.itemMap.set(ref, { ref, ...itemData });
|
|
19671
|
+
return () => void context.itemMap.delete(ref);
|
|
19672
|
+
});
|
|
19673
|
+
return /* @__PURE__ */ jsx282(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
19674
|
+
});
|
|
19675
|
+
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
19676
|
+
function useCollection2(scope) {
|
|
19677
|
+
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
19678
|
+
const getItems = React39.useCallback(() => {
|
|
19679
|
+
const collectionNode = context.collectionRef.current;
|
|
19680
|
+
if (!collectionNode)
|
|
19681
|
+
return [];
|
|
19682
|
+
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
19683
|
+
const items = Array.from(context.itemMap.values());
|
|
19684
|
+
const orderedItems = items.sort((a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current));
|
|
19685
|
+
return orderedItems;
|
|
19686
|
+
}, [context.collectionRef, context.itemMap]);
|
|
19687
|
+
return getItems;
|
|
19688
|
+
}
|
|
19689
|
+
return [
|
|
19690
|
+
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
|
|
19691
|
+
useCollection2,
|
|
19692
|
+
createCollectionScope2
|
|
19693
|
+
];
|
|
19694
|
+
}
|
|
19695
|
+
var __instanciated = /* @__PURE__ */ new WeakMap;
|
|
19696
|
+
var OrderedDict = class _OrderedDict extends Map {
|
|
19697
|
+
#keys;
|
|
19698
|
+
constructor(entries) {
|
|
19699
|
+
super(entries);
|
|
19700
|
+
this.#keys = [...super.keys()];
|
|
19701
|
+
__instanciated.set(this, true);
|
|
19702
|
+
}
|
|
19703
|
+
set(key, value) {
|
|
19704
|
+
if (__instanciated.get(this)) {
|
|
19705
|
+
if (this.has(key)) {
|
|
19706
|
+
this.#keys[this.#keys.indexOf(key)] = key;
|
|
19707
|
+
} else {
|
|
19708
|
+
this.#keys.push(key);
|
|
19709
|
+
}
|
|
19710
|
+
}
|
|
19711
|
+
super.set(key, value);
|
|
19712
|
+
return this;
|
|
19713
|
+
}
|
|
19714
|
+
insert(index2, key, value) {
|
|
19715
|
+
const has = this.has(key);
|
|
19716
|
+
const length2 = this.#keys.length;
|
|
19717
|
+
const relativeIndex = toSafeInteger(index2);
|
|
19718
|
+
let actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
|
|
19719
|
+
const safeIndex = actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
|
|
19720
|
+
if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {
|
|
19721
|
+
this.set(key, value);
|
|
19722
|
+
return this;
|
|
19723
|
+
}
|
|
19724
|
+
const size4 = this.size + (has ? 0 : 1);
|
|
19725
|
+
if (relativeIndex < 0) {
|
|
19726
|
+
actualIndex++;
|
|
19727
|
+
}
|
|
19728
|
+
const keys = [...this.#keys];
|
|
19729
|
+
let nextValue;
|
|
19730
|
+
let shouldSkip = false;
|
|
19731
|
+
for (let i = actualIndex;i < size4; i++) {
|
|
19732
|
+
if (actualIndex === i) {
|
|
19733
|
+
let nextKey = keys[i];
|
|
19734
|
+
if (keys[i] === key) {
|
|
19735
|
+
nextKey = keys[i + 1];
|
|
19736
|
+
}
|
|
19737
|
+
if (has) {
|
|
19738
|
+
this.delete(key);
|
|
19739
|
+
}
|
|
19740
|
+
nextValue = this.get(nextKey);
|
|
19741
|
+
this.set(key, value);
|
|
19742
|
+
} else {
|
|
19743
|
+
if (!shouldSkip && keys[i - 1] === key) {
|
|
19744
|
+
shouldSkip = true;
|
|
19745
|
+
}
|
|
19746
|
+
const currentKey = keys[shouldSkip ? i : i - 1];
|
|
19747
|
+
const currentValue = nextValue;
|
|
19748
|
+
nextValue = this.get(currentKey);
|
|
19749
|
+
this.delete(currentKey);
|
|
19750
|
+
this.set(currentKey, currentValue);
|
|
19751
|
+
}
|
|
19752
|
+
}
|
|
19753
|
+
return this;
|
|
19754
|
+
}
|
|
19755
|
+
with(index2, key, value) {
|
|
19756
|
+
const copy = new _OrderedDict(this);
|
|
19757
|
+
copy.insert(index2, key, value);
|
|
19758
|
+
return copy;
|
|
19759
|
+
}
|
|
19760
|
+
before(key) {
|
|
19761
|
+
const index2 = this.#keys.indexOf(key) - 1;
|
|
19762
|
+
if (index2 < 0) {
|
|
19763
|
+
return;
|
|
19764
|
+
}
|
|
19765
|
+
return this.entryAt(index2);
|
|
19766
|
+
}
|
|
19767
|
+
setBefore(key, newKey, value) {
|
|
19768
|
+
const index2 = this.#keys.indexOf(key);
|
|
19769
|
+
if (index2 === -1) {
|
|
19770
|
+
return this;
|
|
19771
|
+
}
|
|
19772
|
+
return this.insert(index2, newKey, value);
|
|
19773
|
+
}
|
|
19774
|
+
after(key) {
|
|
19775
|
+
let index2 = this.#keys.indexOf(key);
|
|
19776
|
+
index2 = index2 === -1 || index2 === this.size - 1 ? -1 : index2 + 1;
|
|
19777
|
+
if (index2 === -1) {
|
|
19778
|
+
return;
|
|
19779
|
+
}
|
|
19780
|
+
return this.entryAt(index2);
|
|
19781
|
+
}
|
|
19782
|
+
setAfter(key, newKey, value) {
|
|
19783
|
+
const index2 = this.#keys.indexOf(key);
|
|
19784
|
+
if (index2 === -1) {
|
|
19785
|
+
return this;
|
|
19786
|
+
}
|
|
19787
|
+
return this.insert(index2 + 1, newKey, value);
|
|
19788
|
+
}
|
|
19789
|
+
first() {
|
|
19790
|
+
return this.entryAt(0);
|
|
19791
|
+
}
|
|
19792
|
+
last() {
|
|
19793
|
+
return this.entryAt(-1);
|
|
19794
|
+
}
|
|
19795
|
+
clear() {
|
|
19796
|
+
this.#keys = [];
|
|
19797
|
+
return super.clear();
|
|
19798
|
+
}
|
|
19799
|
+
delete(key) {
|
|
19800
|
+
const deleted = super.delete(key);
|
|
19801
|
+
if (deleted) {
|
|
19802
|
+
this.#keys.splice(this.#keys.indexOf(key), 1);
|
|
19803
|
+
}
|
|
19804
|
+
return deleted;
|
|
19805
|
+
}
|
|
19806
|
+
deleteAt(index2) {
|
|
19807
|
+
const key = this.keyAt(index2);
|
|
19808
|
+
if (key !== undefined) {
|
|
19809
|
+
return this.delete(key);
|
|
19810
|
+
}
|
|
19811
|
+
return false;
|
|
19812
|
+
}
|
|
19813
|
+
at(index2) {
|
|
19814
|
+
const key = at(this.#keys, index2);
|
|
19815
|
+
if (key !== undefined) {
|
|
19816
|
+
return this.get(key);
|
|
19817
|
+
}
|
|
19818
|
+
}
|
|
19819
|
+
entryAt(index2) {
|
|
19820
|
+
const key = at(this.#keys, index2);
|
|
19821
|
+
if (key !== undefined) {
|
|
19822
|
+
return [key, this.get(key)];
|
|
19823
|
+
}
|
|
19824
|
+
}
|
|
19825
|
+
indexOf(key) {
|
|
19826
|
+
return this.#keys.indexOf(key);
|
|
19827
|
+
}
|
|
19828
|
+
keyAt(index2) {
|
|
19829
|
+
return at(this.#keys, index2);
|
|
19830
|
+
}
|
|
19831
|
+
from(key, offset4) {
|
|
19832
|
+
const index2 = this.indexOf(key);
|
|
19833
|
+
if (index2 === -1) {
|
|
19834
|
+
return;
|
|
19835
|
+
}
|
|
19836
|
+
let dest = index2 + offset4;
|
|
19837
|
+
if (dest < 0)
|
|
19838
|
+
dest = 0;
|
|
19839
|
+
if (dest >= this.size)
|
|
19840
|
+
dest = this.size - 1;
|
|
19841
|
+
return this.at(dest);
|
|
19842
|
+
}
|
|
19843
|
+
keyFrom(key, offset4) {
|
|
19844
|
+
const index2 = this.indexOf(key);
|
|
19845
|
+
if (index2 === -1) {
|
|
19846
|
+
return;
|
|
19847
|
+
}
|
|
19848
|
+
let dest = index2 + offset4;
|
|
19849
|
+
if (dest < 0)
|
|
19850
|
+
dest = 0;
|
|
19851
|
+
if (dest >= this.size)
|
|
19852
|
+
dest = this.size - 1;
|
|
19853
|
+
return this.keyAt(dest);
|
|
19854
|
+
}
|
|
19855
|
+
find(predicate, thisArg) {
|
|
19856
|
+
let index2 = 0;
|
|
19857
|
+
for (const entry of this) {
|
|
19858
|
+
if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
|
|
19859
|
+
return entry;
|
|
19860
|
+
}
|
|
19861
|
+
index2++;
|
|
19862
|
+
}
|
|
19863
|
+
return;
|
|
19864
|
+
}
|
|
19865
|
+
findIndex(predicate, thisArg) {
|
|
19866
|
+
let index2 = 0;
|
|
19867
|
+
for (const entry of this) {
|
|
19868
|
+
if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
|
|
19869
|
+
return index2;
|
|
19870
|
+
}
|
|
19871
|
+
index2++;
|
|
19872
|
+
}
|
|
19873
|
+
return -1;
|
|
19874
|
+
}
|
|
19875
|
+
filter(predicate, thisArg) {
|
|
19876
|
+
const entries = [];
|
|
19877
|
+
let index2 = 0;
|
|
19878
|
+
for (const entry of this) {
|
|
19879
|
+
if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
|
|
19880
|
+
entries.push(entry);
|
|
19881
|
+
}
|
|
19882
|
+
index2++;
|
|
19883
|
+
}
|
|
19884
|
+
return new _OrderedDict(entries);
|
|
19885
|
+
}
|
|
19886
|
+
map(callbackfn, thisArg) {
|
|
19887
|
+
const entries = [];
|
|
19888
|
+
let index2 = 0;
|
|
19889
|
+
for (const entry of this) {
|
|
19890
|
+
entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index2, this])]);
|
|
19891
|
+
index2++;
|
|
19892
|
+
}
|
|
19893
|
+
return new _OrderedDict(entries);
|
|
19894
|
+
}
|
|
19895
|
+
reduce(...args) {
|
|
19896
|
+
const [callbackfn, initialValue] = args;
|
|
19897
|
+
let index2 = 0;
|
|
19898
|
+
let accumulator = initialValue ?? this.at(0);
|
|
19899
|
+
for (const entry of this) {
|
|
19900
|
+
if (index2 === 0 && args.length === 1) {
|
|
19901
|
+
accumulator = entry;
|
|
19902
|
+
} else {
|
|
19903
|
+
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index2, this]);
|
|
19904
|
+
}
|
|
19905
|
+
index2++;
|
|
19906
|
+
}
|
|
19907
|
+
return accumulator;
|
|
19908
|
+
}
|
|
19909
|
+
reduceRight(...args) {
|
|
19910
|
+
const [callbackfn, initialValue] = args;
|
|
19911
|
+
let accumulator = initialValue ?? this.at(-1);
|
|
19912
|
+
for (let index2 = this.size - 1;index2 >= 0; index2--) {
|
|
19913
|
+
const entry = this.at(index2);
|
|
19914
|
+
if (index2 === this.size - 1 && args.length === 1) {
|
|
19915
|
+
accumulator = entry;
|
|
19916
|
+
} else {
|
|
19917
|
+
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index2, this]);
|
|
19918
|
+
}
|
|
19919
|
+
}
|
|
19920
|
+
return accumulator;
|
|
19921
|
+
}
|
|
19922
|
+
toSorted(compareFn) {
|
|
19923
|
+
const entries = [...this.entries()].sort(compareFn);
|
|
19924
|
+
return new _OrderedDict(entries);
|
|
19925
|
+
}
|
|
19926
|
+
toReversed() {
|
|
19927
|
+
const reversed = new _OrderedDict;
|
|
19928
|
+
for (let index2 = this.size - 1;index2 >= 0; index2--) {
|
|
19929
|
+
const key = this.keyAt(index2);
|
|
19930
|
+
const element = this.get(key);
|
|
19931
|
+
reversed.set(key, element);
|
|
19932
|
+
}
|
|
19933
|
+
return reversed;
|
|
19934
|
+
}
|
|
19935
|
+
toSpliced(...args) {
|
|
19936
|
+
const entries = [...this.entries()];
|
|
19937
|
+
entries.splice(...args);
|
|
19938
|
+
return new _OrderedDict(entries);
|
|
19939
|
+
}
|
|
19940
|
+
slice(start, end) {
|
|
19941
|
+
const result = new _OrderedDict;
|
|
19942
|
+
let stop = this.size - 1;
|
|
19943
|
+
if (start === undefined) {
|
|
19944
|
+
return result;
|
|
19945
|
+
}
|
|
19946
|
+
if (start < 0) {
|
|
19947
|
+
start = start + this.size;
|
|
19948
|
+
}
|
|
19949
|
+
if (end !== undefined && end > 0) {
|
|
19950
|
+
stop = end - 1;
|
|
19951
|
+
}
|
|
19952
|
+
for (let index2 = start;index2 <= stop; index2++) {
|
|
19953
|
+
const key = this.keyAt(index2);
|
|
19954
|
+
const element = this.get(key);
|
|
19955
|
+
result.set(key, element);
|
|
19956
|
+
}
|
|
19957
|
+
return result;
|
|
19958
|
+
}
|
|
19959
|
+
every(predicate, thisArg) {
|
|
19960
|
+
let index2 = 0;
|
|
19961
|
+
for (const entry of this) {
|
|
19962
|
+
if (!Reflect.apply(predicate, thisArg, [entry, index2, this])) {
|
|
19963
|
+
return false;
|
|
19964
|
+
}
|
|
19965
|
+
index2++;
|
|
19966
|
+
}
|
|
19967
|
+
return true;
|
|
19968
|
+
}
|
|
19969
|
+
some(predicate, thisArg) {
|
|
19970
|
+
let index2 = 0;
|
|
19971
|
+
for (const entry of this) {
|
|
19972
|
+
if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
|
|
19973
|
+
return true;
|
|
19974
|
+
}
|
|
19975
|
+
index2++;
|
|
19976
|
+
}
|
|
19977
|
+
return false;
|
|
19978
|
+
}
|
|
19979
|
+
};
|
|
19980
|
+
function at(array, index2) {
|
|
19981
|
+
if ("at" in Array.prototype) {
|
|
19982
|
+
return Array.prototype.at.call(array, index2);
|
|
19983
|
+
}
|
|
19984
|
+
const actualIndex = toSafeIndex(array, index2);
|
|
19985
|
+
return actualIndex === -1 ? undefined : array[actualIndex];
|
|
19986
|
+
}
|
|
19987
|
+
function toSafeIndex(array, index2) {
|
|
19988
|
+
const length2 = array.length;
|
|
19989
|
+
const relativeIndex = toSafeInteger(index2);
|
|
19990
|
+
const actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
|
|
19991
|
+
return actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
|
|
19992
|
+
}
|
|
19993
|
+
function toSafeInteger(number) {
|
|
19994
|
+
return number !== number || number === 0 ? 0 : Math.trunc(number);
|
|
19995
|
+
}
|
|
19996
|
+
var useLayoutEffect222 = globalThis?.document ? React40.useLayoutEffect : () => {};
|
|
19997
|
+
var useReactId2 = React41[" useId ".trim().toString()] || (() => {
|
|
19998
|
+
return;
|
|
19999
|
+
});
|
|
20000
|
+
var count3 = 0;
|
|
20001
|
+
function useId2(deterministicId) {
|
|
20002
|
+
const [id, setId] = React41.useState(useReactId2());
|
|
20003
|
+
useLayoutEffect222(() => {
|
|
20004
|
+
if (!deterministicId)
|
|
20005
|
+
setId((reactId) => reactId ?? String(count3++));
|
|
20006
|
+
}, [deterministicId]);
|
|
20007
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
|
20008
|
+
}
|
|
20009
|
+
var NODES2 = [
|
|
20010
|
+
"a",
|
|
20011
|
+
"button",
|
|
20012
|
+
"div",
|
|
20013
|
+
"form",
|
|
20014
|
+
"h2",
|
|
20015
|
+
"h3",
|
|
20016
|
+
"img",
|
|
20017
|
+
"input",
|
|
20018
|
+
"label",
|
|
20019
|
+
"li",
|
|
20020
|
+
"nav",
|
|
20021
|
+
"ol",
|
|
20022
|
+
"p",
|
|
20023
|
+
"select",
|
|
20024
|
+
"span",
|
|
20025
|
+
"svg",
|
|
20026
|
+
"ul"
|
|
20027
|
+
];
|
|
20028
|
+
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
20029
|
+
const Slot2 = createSlot(`Primitive.${node}`);
|
|
20030
|
+
const Node2 = React422.forwardRef((props, forwardedRef) => {
|
|
20031
|
+
const { asChild, ...primitiveProps } = props;
|
|
20032
|
+
const Comp = asChild ? Slot2 : node;
|
|
20033
|
+
if (typeof window !== "undefined") {
|
|
20034
|
+
window[Symbol.for("radix-ui")] = true;
|
|
20035
|
+
}
|
|
20036
|
+
return /* @__PURE__ */ jsx302(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
20037
|
+
});
|
|
20038
|
+
Node2.displayName = `Primitive.${node}`;
|
|
20039
|
+
return { ...primitive, [node]: Node2 };
|
|
20040
|
+
}, {});
|
|
20041
|
+
function useCallbackRef3(callback) {
|
|
20042
|
+
const callbackRef = React43.useRef(callback);
|
|
20043
|
+
React43.useEffect(() => {
|
|
20044
|
+
callbackRef.current = callback;
|
|
20045
|
+
});
|
|
20046
|
+
return React43.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
20047
|
+
}
|
|
20048
|
+
var useInsertionEffect = React44[" useInsertionEffect ".trim().toString()] || useLayoutEffect222;
|
|
20049
|
+
function useControllableState2({
|
|
20050
|
+
prop,
|
|
20051
|
+
defaultProp,
|
|
20052
|
+
onChange = () => {},
|
|
20053
|
+
caller
|
|
20054
|
+
}) {
|
|
20055
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState2({
|
|
20056
|
+
defaultProp,
|
|
20057
|
+
onChange
|
|
20058
|
+
});
|
|
20059
|
+
const isControlled = prop !== undefined;
|
|
20060
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
20061
|
+
if (true) {
|
|
20062
|
+
const isControlledRef = React44.useRef(prop !== undefined);
|
|
20063
|
+
React44.useEffect(() => {
|
|
20064
|
+
const wasControlled = isControlledRef.current;
|
|
20065
|
+
if (wasControlled !== isControlled) {
|
|
20066
|
+
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
20067
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
20068
|
+
console.warn(`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`);
|
|
20069
|
+
}
|
|
20070
|
+
isControlledRef.current = isControlled;
|
|
20071
|
+
}, [isControlled, caller]);
|
|
20072
|
+
}
|
|
20073
|
+
const setValue = React44.useCallback((nextValue) => {
|
|
20074
|
+
if (isControlled) {
|
|
20075
|
+
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
20076
|
+
if (value2 !== prop) {
|
|
20077
|
+
onChangeRef.current?.(value2);
|
|
20078
|
+
}
|
|
20079
|
+
} else {
|
|
20080
|
+
setUncontrolledProp(nextValue);
|
|
20081
|
+
}
|
|
20082
|
+
}, [isControlled, prop, setUncontrolledProp, onChangeRef]);
|
|
20083
|
+
return [value, setValue];
|
|
20084
|
+
}
|
|
20085
|
+
function useUncontrolledState2({
|
|
20086
|
+
defaultProp,
|
|
20087
|
+
onChange
|
|
20088
|
+
}) {
|
|
20089
|
+
const [value, setValue] = React44.useState(defaultProp);
|
|
20090
|
+
const prevValueRef = React44.useRef(value);
|
|
20091
|
+
const onChangeRef = React44.useRef(onChange);
|
|
20092
|
+
useInsertionEffect(() => {
|
|
20093
|
+
onChangeRef.current = onChange;
|
|
20094
|
+
}, [onChange]);
|
|
20095
|
+
React44.useEffect(() => {
|
|
20096
|
+
if (prevValueRef.current !== value) {
|
|
20097
|
+
onChangeRef.current?.(value);
|
|
20098
|
+
prevValueRef.current = value;
|
|
20099
|
+
}
|
|
20100
|
+
}, [value, prevValueRef]);
|
|
20101
|
+
return [value, setValue, onChangeRef];
|
|
20102
|
+
}
|
|
20103
|
+
function isFunction(value) {
|
|
20104
|
+
return typeof value === "function";
|
|
20105
|
+
}
|
|
20106
|
+
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
20107
|
+
var DirectionContext2 = React45.createContext(undefined);
|
|
20108
|
+
function useDirection2(localDir) {
|
|
20109
|
+
const globalDir = React45.useContext(DirectionContext2);
|
|
20110
|
+
return localDir || globalDir || "ltr";
|
|
20111
|
+
}
|
|
20112
|
+
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
20113
|
+
var EVENT_OPTIONS2 = { bubbles: false, cancelable: true };
|
|
20114
|
+
var GROUP_NAME2 = "RovingFocusGroup";
|
|
20115
|
+
var [Collection2, useCollection2, createCollectionScope2] = createCollection2(GROUP_NAME2);
|
|
20116
|
+
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope2(GROUP_NAME2, [createCollectionScope2]);
|
|
20117
|
+
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME2);
|
|
20118
|
+
var RovingFocusGroup = React46.forwardRef((props, forwardedRef) => {
|
|
20119
|
+
return /* @__PURE__ */ jsx332(Collection2.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx332(Collection2.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx332(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
20120
|
+
});
|
|
20121
|
+
RovingFocusGroup.displayName = GROUP_NAME2;
|
|
20122
|
+
var RovingFocusGroupImpl = React46.forwardRef((props, forwardedRef) => {
|
|
20123
|
+
const {
|
|
20124
|
+
__scopeRovingFocusGroup,
|
|
20125
|
+
orientation,
|
|
20126
|
+
loop = false,
|
|
20127
|
+
dir,
|
|
20128
|
+
currentTabStopId: currentTabStopIdProp,
|
|
20129
|
+
defaultCurrentTabStopId,
|
|
20130
|
+
onCurrentTabStopIdChange,
|
|
20131
|
+
onEntryFocus,
|
|
20132
|
+
preventScrollOnEntryFocus = false,
|
|
20133
|
+
...groupProps
|
|
20134
|
+
} = props;
|
|
20135
|
+
const ref = React46.useRef(null);
|
|
20136
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
20137
|
+
const direction = useDirection2(dir);
|
|
20138
|
+
const [currentTabStopId, setCurrentTabStopId] = useControllableState2({
|
|
20139
|
+
prop: currentTabStopIdProp,
|
|
20140
|
+
defaultProp: defaultCurrentTabStopId ?? null,
|
|
20141
|
+
onChange: onCurrentTabStopIdChange,
|
|
20142
|
+
caller: GROUP_NAME2
|
|
20143
|
+
});
|
|
20144
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = React46.useState(false);
|
|
20145
|
+
const handleEntryFocus = useCallbackRef3(onEntryFocus);
|
|
20146
|
+
const getItems = useCollection2(__scopeRovingFocusGroup);
|
|
20147
|
+
const isClickFocusRef = React46.useRef(false);
|
|
20148
|
+
const [focusableItemsCount, setFocusableItemsCount] = React46.useState(0);
|
|
20149
|
+
React46.useEffect(() => {
|
|
20150
|
+
const node = ref.current;
|
|
20151
|
+
if (node) {
|
|
20152
|
+
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
20153
|
+
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
20154
|
+
}
|
|
20155
|
+
}, [handleEntryFocus]);
|
|
20156
|
+
return /* @__PURE__ */ jsx332(RovingFocusProvider, {
|
|
20157
|
+
scope: __scopeRovingFocusGroup,
|
|
20158
|
+
orientation,
|
|
20159
|
+
dir: direction,
|
|
20160
|
+
loop,
|
|
20161
|
+
currentTabStopId,
|
|
20162
|
+
onItemFocus: React46.useCallback((tabStopId) => setCurrentTabStopId(tabStopId), [setCurrentTabStopId]),
|
|
20163
|
+
onItemShiftTab: React46.useCallback(() => setIsTabbingBackOut(true), []),
|
|
20164
|
+
onFocusableItemAdd: React46.useCallback(() => setFocusableItemsCount((prevCount) => prevCount + 1), []),
|
|
20165
|
+
onFocusableItemRemove: React46.useCallback(() => setFocusableItemsCount((prevCount) => prevCount - 1), []),
|
|
20166
|
+
children: /* @__PURE__ */ jsx332(Primitive2.div, {
|
|
20167
|
+
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
20168
|
+
"data-orientation": orientation,
|
|
20169
|
+
...groupProps,
|
|
20170
|
+
ref: composedRefs,
|
|
20171
|
+
style: { outline: "none", ...props.style },
|
|
20172
|
+
onMouseDown: composeEventHandlers2(props.onMouseDown, () => {
|
|
20173
|
+
isClickFocusRef.current = true;
|
|
20174
|
+
}),
|
|
20175
|
+
onFocus: composeEventHandlers2(props.onFocus, (event) => {
|
|
20176
|
+
const isKeyboardFocus = !isClickFocusRef.current;
|
|
20177
|
+
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
20178
|
+
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS2);
|
|
20179
|
+
event.currentTarget.dispatchEvent(entryFocusEvent);
|
|
20180
|
+
if (!entryFocusEvent.defaultPrevented) {
|
|
20181
|
+
const items = getItems().filter((item) => item.focusable);
|
|
20182
|
+
const activeItem = items.find((item) => item.active);
|
|
20183
|
+
const currentItem = items.find((item) => item.id === currentTabStopId);
|
|
20184
|
+
const candidateItems = [activeItem, currentItem, ...items].filter(Boolean);
|
|
20185
|
+
const candidateNodes = candidateItems.map((item) => item.ref.current);
|
|
20186
|
+
focusFirst2(candidateNodes, preventScrollOnEntryFocus);
|
|
20187
|
+
}
|
|
20188
|
+
}
|
|
20189
|
+
isClickFocusRef.current = false;
|
|
20190
|
+
}),
|
|
20191
|
+
onBlur: composeEventHandlers2(props.onBlur, () => setIsTabbingBackOut(false))
|
|
20192
|
+
})
|
|
20193
|
+
});
|
|
20194
|
+
});
|
|
20195
|
+
var ITEM_NAME2 = "RovingFocusGroupItem";
|
|
20196
|
+
var RovingFocusGroupItem = React46.forwardRef((props, forwardedRef) => {
|
|
20197
|
+
const {
|
|
20198
|
+
__scopeRovingFocusGroup,
|
|
20199
|
+
focusable = true,
|
|
20200
|
+
active = false,
|
|
20201
|
+
tabStopId,
|
|
20202
|
+
children,
|
|
20203
|
+
...itemProps
|
|
20204
|
+
} = props;
|
|
20205
|
+
const autoId = useId2();
|
|
20206
|
+
const id = tabStopId || autoId;
|
|
20207
|
+
const context = useRovingFocusContext(ITEM_NAME2, __scopeRovingFocusGroup);
|
|
20208
|
+
const isCurrentTabStop = context.currentTabStopId === id;
|
|
20209
|
+
const getItems = useCollection2(__scopeRovingFocusGroup);
|
|
20210
|
+
const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
|
|
20211
|
+
React46.useEffect(() => {
|
|
20212
|
+
if (focusable) {
|
|
20213
|
+
onFocusableItemAdd();
|
|
20214
|
+
return () => onFocusableItemRemove();
|
|
20215
|
+
}
|
|
20216
|
+
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
20217
|
+
return /* @__PURE__ */ jsx332(Collection2.ItemSlot, {
|
|
20218
|
+
scope: __scopeRovingFocusGroup,
|
|
20219
|
+
id,
|
|
20220
|
+
focusable,
|
|
20221
|
+
active,
|
|
20222
|
+
children: /* @__PURE__ */ jsx332(Primitive2.span, {
|
|
20223
|
+
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
20224
|
+
"data-orientation": context.orientation,
|
|
20225
|
+
...itemProps,
|
|
20226
|
+
ref: forwardedRef,
|
|
20227
|
+
onMouseDown: composeEventHandlers2(props.onMouseDown, (event) => {
|
|
20228
|
+
if (!focusable)
|
|
20229
|
+
event.preventDefault();
|
|
20230
|
+
else
|
|
20231
|
+
context.onItemFocus(id);
|
|
20232
|
+
}),
|
|
20233
|
+
onFocus: composeEventHandlers2(props.onFocus, () => context.onItemFocus(id)),
|
|
20234
|
+
onKeyDown: composeEventHandlers2(props.onKeyDown, (event) => {
|
|
20235
|
+
if (event.key === "Tab" && event.shiftKey) {
|
|
20236
|
+
context.onItemShiftTab();
|
|
20237
|
+
return;
|
|
20238
|
+
}
|
|
20239
|
+
if (event.target !== event.currentTarget)
|
|
20240
|
+
return;
|
|
20241
|
+
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
20242
|
+
if (focusIntent !== undefined) {
|
|
20243
|
+
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey)
|
|
20244
|
+
return;
|
|
20245
|
+
event.preventDefault();
|
|
20246
|
+
const items = getItems().filter((item) => item.focusable);
|
|
20247
|
+
let candidateNodes = items.map((item) => item.ref.current);
|
|
20248
|
+
if (focusIntent === "last")
|
|
20249
|
+
candidateNodes.reverse();
|
|
20250
|
+
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
20251
|
+
if (focusIntent === "prev")
|
|
20252
|
+
candidateNodes.reverse();
|
|
20253
|
+
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
20254
|
+
candidateNodes = context.loop ? wrapArray2(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
20255
|
+
}
|
|
20256
|
+
setTimeout(() => focusFirst2(candidateNodes));
|
|
20257
|
+
}
|
|
20258
|
+
}),
|
|
20259
|
+
children: typeof children === "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children
|
|
20260
|
+
})
|
|
20261
|
+
});
|
|
20262
|
+
});
|
|
20263
|
+
RovingFocusGroupItem.displayName = ITEM_NAME2;
|
|
20264
|
+
var MAP_KEY_TO_FOCUS_INTENT = {
|
|
20265
|
+
ArrowLeft: "prev",
|
|
20266
|
+
ArrowUp: "prev",
|
|
20267
|
+
ArrowRight: "next",
|
|
20268
|
+
ArrowDown: "next",
|
|
20269
|
+
PageUp: "first",
|
|
20270
|
+
Home: "first",
|
|
20271
|
+
PageDown: "last",
|
|
20272
|
+
End: "last"
|
|
20273
|
+
};
|
|
20274
|
+
function getDirectionAwareKey(key, dir) {
|
|
20275
|
+
if (dir !== "rtl")
|
|
20276
|
+
return key;
|
|
20277
|
+
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
20278
|
+
}
|
|
20279
|
+
function getFocusIntent(event, orientation, dir) {
|
|
20280
|
+
const key = getDirectionAwareKey(event.key, dir);
|
|
20281
|
+
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key))
|
|
20282
|
+
return;
|
|
20283
|
+
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key))
|
|
20284
|
+
return;
|
|
20285
|
+
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
20286
|
+
}
|
|
20287
|
+
function focusFirst2(candidates, preventScroll = false) {
|
|
20288
|
+
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
20289
|
+
for (const candidate of candidates) {
|
|
20290
|
+
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT)
|
|
20291
|
+
return;
|
|
20292
|
+
candidate.focus({ preventScroll });
|
|
20293
|
+
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT)
|
|
20294
|
+
return;
|
|
20295
|
+
}
|
|
20296
|
+
}
|
|
20297
|
+
function wrapArray2(array, startIndex) {
|
|
20298
|
+
return array.map((_, index2) => array[(startIndex + index2) % array.length]);
|
|
20299
|
+
}
|
|
20300
|
+
var Root3 = RovingFocusGroup;
|
|
20301
|
+
var Item2 = RovingFocusGroupItem;
|
|
20302
|
+
function useStateMachine(initialState, machine) {
|
|
20303
|
+
return React47.useReducer((state, event) => {
|
|
20304
|
+
const nextState = machine[state][event];
|
|
20305
|
+
return nextState ?? state;
|
|
20306
|
+
}, initialState);
|
|
20307
|
+
}
|
|
20308
|
+
var Presence = (props) => {
|
|
20309
|
+
const { present, children } = props;
|
|
20310
|
+
const presence = usePresence(present);
|
|
20311
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React213.Children.only(children);
|
|
20312
|
+
const ref = useComposedRefs2(presence.ref, getElementRef3(child));
|
|
20313
|
+
const forceMount = typeof children === "function";
|
|
20314
|
+
return forceMount || presence.isPresent ? React213.cloneElement(child, { ref }) : null;
|
|
20315
|
+
};
|
|
20316
|
+
Presence.displayName = "Presence";
|
|
20317
|
+
function usePresence(present) {
|
|
20318
|
+
const [node, setNode] = React213.useState();
|
|
20319
|
+
const stylesRef = React213.useRef(null);
|
|
20320
|
+
const prevPresentRef = React213.useRef(present);
|
|
20321
|
+
const prevAnimationNameRef = React213.useRef("none");
|
|
20322
|
+
const initialState = present ? "mounted" : "unmounted";
|
|
20323
|
+
const [state, send] = useStateMachine(initialState, {
|
|
20324
|
+
mounted: {
|
|
20325
|
+
UNMOUNT: "unmounted",
|
|
20326
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
20327
|
+
},
|
|
20328
|
+
unmountSuspended: {
|
|
20329
|
+
MOUNT: "mounted",
|
|
20330
|
+
ANIMATION_END: "unmounted"
|
|
20331
|
+
},
|
|
20332
|
+
unmounted: {
|
|
20333
|
+
MOUNT: "mounted"
|
|
20334
|
+
}
|
|
20335
|
+
});
|
|
20336
|
+
React213.useEffect(() => {
|
|
20337
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
20338
|
+
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
20339
|
+
}, [state]);
|
|
20340
|
+
useLayoutEffect222(() => {
|
|
20341
|
+
const styles = stylesRef.current;
|
|
20342
|
+
const wasPresent = prevPresentRef.current;
|
|
20343
|
+
const hasPresentChanged = wasPresent !== present;
|
|
20344
|
+
if (hasPresentChanged) {
|
|
20345
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
20346
|
+
const currentAnimationName = getAnimationName(styles);
|
|
20347
|
+
if (present) {
|
|
20348
|
+
send("MOUNT");
|
|
20349
|
+
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
20350
|
+
send("UNMOUNT");
|
|
20351
|
+
} else {
|
|
20352
|
+
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
20353
|
+
if (wasPresent && isAnimating) {
|
|
20354
|
+
send("ANIMATION_OUT");
|
|
20355
|
+
} else {
|
|
20356
|
+
send("UNMOUNT");
|
|
20357
|
+
}
|
|
20358
|
+
}
|
|
20359
|
+
prevPresentRef.current = present;
|
|
20360
|
+
}
|
|
20361
|
+
}, [present, send]);
|
|
20362
|
+
useLayoutEffect222(() => {
|
|
20363
|
+
if (node) {
|
|
20364
|
+
let timeoutId;
|
|
20365
|
+
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
20366
|
+
const handleAnimationEnd = (event) => {
|
|
20367
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
20368
|
+
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
|
|
20369
|
+
if (event.target === node && isCurrentAnimation) {
|
|
20370
|
+
send("ANIMATION_END");
|
|
20371
|
+
if (!prevPresentRef.current) {
|
|
20372
|
+
const currentFillMode = node.style.animationFillMode;
|
|
20373
|
+
node.style.animationFillMode = "forwards";
|
|
20374
|
+
timeoutId = ownerWindow.setTimeout(() => {
|
|
20375
|
+
if (node.style.animationFillMode === "forwards") {
|
|
20376
|
+
node.style.animationFillMode = currentFillMode;
|
|
20377
|
+
}
|
|
20378
|
+
});
|
|
20379
|
+
}
|
|
20380
|
+
}
|
|
20381
|
+
};
|
|
20382
|
+
const handleAnimationStart = (event) => {
|
|
20383
|
+
if (event.target === node) {
|
|
20384
|
+
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
20385
|
+
}
|
|
20386
|
+
};
|
|
20387
|
+
node.addEventListener("animationstart", handleAnimationStart);
|
|
20388
|
+
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
20389
|
+
node.addEventListener("animationend", handleAnimationEnd);
|
|
20390
|
+
return () => {
|
|
20391
|
+
ownerWindow.clearTimeout(timeoutId);
|
|
20392
|
+
node.removeEventListener("animationstart", handleAnimationStart);
|
|
20393
|
+
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
20394
|
+
node.removeEventListener("animationend", handleAnimationEnd);
|
|
20395
|
+
};
|
|
20396
|
+
} else {
|
|
20397
|
+
send("ANIMATION_END");
|
|
20398
|
+
}
|
|
20399
|
+
}, [node, send]);
|
|
20400
|
+
return {
|
|
20401
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
20402
|
+
ref: React213.useCallback((node2) => {
|
|
20403
|
+
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
20404
|
+
setNode(node2);
|
|
20405
|
+
}, [])
|
|
20406
|
+
};
|
|
20407
|
+
}
|
|
20408
|
+
function getAnimationName(styles) {
|
|
20409
|
+
return styles?.animationName || "none";
|
|
20410
|
+
}
|
|
20411
|
+
function getElementRef3(element) {
|
|
20412
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
20413
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
20414
|
+
if (mayWarn) {
|
|
20415
|
+
return element.ref;
|
|
20416
|
+
}
|
|
20417
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
20418
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
20419
|
+
if (mayWarn) {
|
|
20420
|
+
return element.props.ref;
|
|
20421
|
+
}
|
|
20422
|
+
return element.props.ref || element.ref;
|
|
20423
|
+
}
|
|
20424
|
+
var TABS_NAME = "Tabs";
|
|
20425
|
+
var [createTabsContext, createTabsScope] = createContextScope2(TABS_NAME, [
|
|
20426
|
+
createRovingFocusGroupScope
|
|
20427
|
+
]);
|
|
20428
|
+
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
20429
|
+
var [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);
|
|
20430
|
+
var Tabs = React48.forwardRef((props, forwardedRef) => {
|
|
20431
|
+
const {
|
|
20432
|
+
__scopeTabs,
|
|
20433
|
+
value: valueProp,
|
|
20434
|
+
onValueChange,
|
|
20435
|
+
defaultValue,
|
|
20436
|
+
orientation = "horizontal",
|
|
20437
|
+
dir,
|
|
20438
|
+
activationMode = "automatic",
|
|
20439
|
+
...tabsProps
|
|
20440
|
+
} = props;
|
|
20441
|
+
const direction = useDirection2(dir);
|
|
20442
|
+
const [value, setValue] = useControllableState2({
|
|
20443
|
+
prop: valueProp,
|
|
20444
|
+
onChange: onValueChange,
|
|
20445
|
+
defaultProp: defaultValue ?? "",
|
|
20446
|
+
caller: TABS_NAME
|
|
20447
|
+
});
|
|
20448
|
+
return /* @__PURE__ */ jsx342(TabsProvider, {
|
|
20449
|
+
scope: __scopeTabs,
|
|
20450
|
+
baseId: useId2(),
|
|
20451
|
+
value,
|
|
20452
|
+
onValueChange: setValue,
|
|
20453
|
+
orientation,
|
|
20454
|
+
dir: direction,
|
|
20455
|
+
activationMode,
|
|
20456
|
+
children: /* @__PURE__ */ jsx342(Primitive2.div, {
|
|
20457
|
+
dir: direction,
|
|
20458
|
+
"data-orientation": orientation,
|
|
20459
|
+
...tabsProps,
|
|
20460
|
+
ref: forwardedRef
|
|
20461
|
+
})
|
|
20462
|
+
});
|
|
20463
|
+
});
|
|
20464
|
+
Tabs.displayName = TABS_NAME;
|
|
20465
|
+
var TAB_LIST_NAME = "TabsList";
|
|
20466
|
+
var TabsList = React48.forwardRef((props, forwardedRef) => {
|
|
20467
|
+
const { __scopeTabs, loop = true, ...listProps } = props;
|
|
20468
|
+
const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
|
|
20469
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
20470
|
+
return /* @__PURE__ */ jsx342(Root3, {
|
|
20471
|
+
asChild: true,
|
|
20472
|
+
...rovingFocusGroupScope,
|
|
20473
|
+
orientation: context.orientation,
|
|
20474
|
+
dir: context.dir,
|
|
20475
|
+
loop,
|
|
20476
|
+
children: /* @__PURE__ */ jsx342(Primitive2.div, {
|
|
20477
|
+
role: "tablist",
|
|
20478
|
+
"aria-orientation": context.orientation,
|
|
20479
|
+
...listProps,
|
|
20480
|
+
ref: forwardedRef
|
|
20481
|
+
})
|
|
20482
|
+
});
|
|
20483
|
+
});
|
|
20484
|
+
TabsList.displayName = TAB_LIST_NAME;
|
|
20485
|
+
var TRIGGER_NAME2 = "TabsTrigger";
|
|
20486
|
+
var TabsTrigger = React48.forwardRef((props, forwardedRef) => {
|
|
20487
|
+
const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
|
|
20488
|
+
const context = useTabsContext(TRIGGER_NAME2, __scopeTabs);
|
|
20489
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
20490
|
+
const triggerId = makeTriggerId(context.baseId, value);
|
|
20491
|
+
const contentId = makeContentId(context.baseId, value);
|
|
20492
|
+
const isSelected = value === context.value;
|
|
20493
|
+
return /* @__PURE__ */ jsx342(Item2, {
|
|
20494
|
+
asChild: true,
|
|
20495
|
+
...rovingFocusGroupScope,
|
|
20496
|
+
focusable: !disabled,
|
|
20497
|
+
active: isSelected,
|
|
20498
|
+
children: /* @__PURE__ */ jsx342(Primitive2.button, {
|
|
20499
|
+
type: "button",
|
|
20500
|
+
role: "tab",
|
|
20501
|
+
"aria-selected": isSelected,
|
|
20502
|
+
"aria-controls": contentId,
|
|
20503
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
20504
|
+
"data-disabled": disabled ? "" : undefined,
|
|
20505
|
+
disabled,
|
|
20506
|
+
id: triggerId,
|
|
20507
|
+
...triggerProps,
|
|
20508
|
+
ref: forwardedRef,
|
|
20509
|
+
onMouseDown: composeEventHandlers2(props.onMouseDown, (event) => {
|
|
20510
|
+
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
20511
|
+
context.onValueChange(value);
|
|
20512
|
+
} else {
|
|
20513
|
+
event.preventDefault();
|
|
20514
|
+
}
|
|
20515
|
+
}),
|
|
20516
|
+
onKeyDown: composeEventHandlers2(props.onKeyDown, (event) => {
|
|
20517
|
+
if ([" ", "Enter"].includes(event.key))
|
|
20518
|
+
context.onValueChange(value);
|
|
20519
|
+
}),
|
|
20520
|
+
onFocus: composeEventHandlers2(props.onFocus, () => {
|
|
20521
|
+
const isAutomaticActivation = context.activationMode !== "manual";
|
|
20522
|
+
if (!isSelected && !disabled && isAutomaticActivation) {
|
|
20523
|
+
context.onValueChange(value);
|
|
20524
|
+
}
|
|
20525
|
+
})
|
|
20526
|
+
})
|
|
20527
|
+
});
|
|
20528
|
+
});
|
|
20529
|
+
TabsTrigger.displayName = TRIGGER_NAME2;
|
|
20530
|
+
var CONTENT_NAME3 = "TabsContent";
|
|
20531
|
+
var TabsContent = React48.forwardRef((props, forwardedRef) => {
|
|
20532
|
+
const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
|
|
20533
|
+
const context = useTabsContext(CONTENT_NAME3, __scopeTabs);
|
|
20534
|
+
const triggerId = makeTriggerId(context.baseId, value);
|
|
20535
|
+
const contentId = makeContentId(context.baseId, value);
|
|
20536
|
+
const isSelected = value === context.value;
|
|
20537
|
+
const isMountAnimationPreventedRef = React48.useRef(isSelected);
|
|
20538
|
+
React48.useEffect(() => {
|
|
20539
|
+
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
20540
|
+
return () => cancelAnimationFrame(rAF);
|
|
20541
|
+
}, []);
|
|
20542
|
+
return /* @__PURE__ */ jsx342(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx342(Primitive2.div, {
|
|
20543
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
20544
|
+
"data-orientation": context.orientation,
|
|
20545
|
+
role: "tabpanel",
|
|
20546
|
+
"aria-labelledby": triggerId,
|
|
20547
|
+
hidden: !present,
|
|
20548
|
+
id: contentId,
|
|
20549
|
+
tabIndex: 0,
|
|
20550
|
+
...contentProps,
|
|
20551
|
+
ref: forwardedRef,
|
|
20552
|
+
style: {
|
|
20553
|
+
...props.style,
|
|
20554
|
+
animationDuration: isMountAnimationPreventedRef.current ? "0s" : undefined
|
|
20555
|
+
},
|
|
20556
|
+
children: present && children
|
|
20557
|
+
}) });
|
|
20558
|
+
});
|
|
20559
|
+
TabsContent.displayName = CONTENT_NAME3;
|
|
20560
|
+
function makeTriggerId(baseId, value) {
|
|
20561
|
+
return `${baseId}-trigger-${value}`;
|
|
20562
|
+
}
|
|
20563
|
+
function makeContentId(baseId, value) {
|
|
20564
|
+
return `${baseId}-content-${value}`;
|
|
20565
|
+
}
|
|
20566
|
+
var Root23 = Tabs;
|
|
20567
|
+
var List = TabsList;
|
|
20568
|
+
var Trigger2 = TabsTrigger;
|
|
20569
|
+
var Content3 = TabsContent;
|
|
20570
|
+
var Tabs2 = Root23;
|
|
20571
|
+
var TabsList2 = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx352(List, {
|
|
20572
|
+
ref,
|
|
20573
|
+
className: cn("inline-flex items-center justify-center bg-white p-1 border-2 border-black border-b-4 rounded-full", className),
|
|
20574
|
+
...props
|
|
20575
|
+
}));
|
|
20576
|
+
TabsList2.displayName = List.displayName;
|
|
20577
|
+
var TabsTrigger2 = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx352(Trigger2, {
|
|
20578
|
+
ref,
|
|
20579
|
+
className: cn("inline-flex items-center border-none font-brand bg-transparent justify-center whitespace-nowrap rounded-full px-3 py-1.5 text-sm ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-brand data-[state=active]:text-white data-[state=inactive]:hover:bg-gray-100", className),
|
|
20580
|
+
...props
|
|
20581
|
+
}));
|
|
20582
|
+
TabsTrigger2.displayName = Trigger2.displayName;
|
|
20583
|
+
var TabsContent2 = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx352(Content3, {
|
|
20584
|
+
ref,
|
|
20585
|
+
className: cn("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className),
|
|
20586
|
+
...props
|
|
20587
|
+
}));
|
|
20588
|
+
TabsContent2.displayName = Content3.displayName;
|
|
20589
|
+
var Textarea = React50.forwardRef(({ className, style, ...props }, ref) => {
|
|
20590
|
+
return /* @__PURE__ */ jsx362("textarea", {
|
|
20591
|
+
ref,
|
|
20592
|
+
className: cn("w-full bg-white dark:bg-[#121212] rounded-lg border-2 border-b-4 border-black outline-none px-3 py-3 fontbrand text-lg box-border field-sizing-content min-h-[90px]", className),
|
|
20593
|
+
style: {
|
|
20594
|
+
...style
|
|
20595
|
+
},
|
|
20596
|
+
...props
|
|
20597
|
+
});
|
|
20598
|
+
});
|
|
20599
|
+
Textarea.displayName = "Textarea";
|
|
20600
|
+
var Triangle2 = (props) => {
|
|
20601
|
+
return /* @__PURE__ */ jsx372("svg", {
|
|
20602
|
+
viewBox: "0 0 127 131",
|
|
20603
|
+
fill: "none",
|
|
20604
|
+
...props,
|
|
20605
|
+
children: /* @__PURE__ */ jsx372("path", {
|
|
20606
|
+
d: "M28.5644 0.011261C25.8196 0.159241 23.6077 0.591782 21.3786 1.43413C20.2669 1.84959 18.4446 2.75455 17.4418 3.38062C13.2472 5.993 10.0496 9.9201 8.38209 14.4903C8.04973 15.3953 7.15007 18.2809 6.5713 20.2672C2.71476 33.5453 0.525761 48.0643 0.0558711 63.4312C-0.0186237 65.8785 -0.0186237 71.7066 0.0558711 74.1141C0.371041 84.3018 1.35093 93.4992 3.12735 102.879C3.84937 106.675 5.00691 111.774 5.67736 114.091C7.04692 118.798 9.84334 122.805 13.8202 125.741C16.4848 127.711 19.5105 129.031 22.8627 129.68C24.4787 129.993 26.6104 130.135 28.1805 130.033C30.3523 129.89 34.6616 129.316 38.1628 128.695C53.9442 125.901 68.5223 120.898 81.7422 113.738C90.1143 109.202 97.2715 104.29 104.177 98.3312C111.059 92.4007 116.927 86.0206 122.09 78.8608C123.287 77.2045 123.889 76.237 124.491 75.019C126.038 71.8773 126.766 68.7527 126.76 65.2582C126.76 62.0027 126.141 59.1114 124.806 56.1518C124.164 54.7233 123.551 53.6988 122.176 51.7523C117.11 44.5868 111.489 38.3433 104.635 32.2762C94.011 22.8739 81.3927 15.1619 67.3017 9.45339C64.2474 8.21835 61.239 7.13128 57.6174 5.95315C49.9502 3.46598 40.4607 1.30891 32.4324 0.233231C31.1718 0.0624847 29.4584 -0.0342712 28.5644 0.011261Z",
|
|
20607
|
+
fill: "currentcolor"
|
|
20608
|
+
})
|
|
20609
|
+
});
|
|
20610
|
+
};
|
|
20611
|
+
|
|
20612
|
+
// src/components/homepage/FreePricing.tsx
|
|
20613
|
+
import React53, { useCallback as useCallback30, useMemo as useMemo45 } from "react";
|
|
20614
|
+
|
|
20615
|
+
// ../../node_modules/.bun/tailwind-merge@2.5.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
20616
|
+
var CLASS_PART_SEPARATOR2 = "-";
|
|
20617
|
+
var createClassGroupUtils2 = (config) => {
|
|
20618
|
+
const classMap = createClassMap2(config);
|
|
20619
|
+
const {
|
|
20620
|
+
conflictingClassGroups,
|
|
20621
|
+
conflictingClassGroupModifiers
|
|
20622
|
+
} = config;
|
|
20623
|
+
const getClassGroupId = (className) => {
|
|
20624
|
+
const classParts = className.split(CLASS_PART_SEPARATOR2);
|
|
20625
|
+
if (classParts[0] === "" && classParts.length !== 1) {
|
|
20626
|
+
classParts.shift();
|
|
20627
|
+
}
|
|
20628
|
+
return getGroupRecursive2(classParts, classMap) || getGroupIdForArbitraryProperty2(className);
|
|
20629
|
+
};
|
|
20630
|
+
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
20631
|
+
const conflicts = conflictingClassGroups[classGroupId] || [];
|
|
20632
|
+
if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
|
|
20633
|
+
return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
|
|
20634
|
+
}
|
|
20635
|
+
return conflicts;
|
|
20636
|
+
};
|
|
20637
|
+
return {
|
|
20638
|
+
getClassGroupId,
|
|
20639
|
+
getConflictingClassGroupIds
|
|
20640
|
+
};
|
|
20641
|
+
};
|
|
20642
|
+
var getGroupRecursive2 = (classParts, classPartObject) => {
|
|
20643
|
+
if (classParts.length === 0) {
|
|
20644
|
+
return classPartObject.classGroupId;
|
|
20645
|
+
}
|
|
20646
|
+
const currentClassPart = classParts[0];
|
|
20647
|
+
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
20648
|
+
const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive2(classParts.slice(1), nextClassPartObject) : undefined;
|
|
20649
|
+
if (classGroupFromNextClassPart) {
|
|
20650
|
+
return classGroupFromNextClassPart;
|
|
20651
|
+
}
|
|
20652
|
+
if (classPartObject.validators.length === 0) {
|
|
20653
|
+
return;
|
|
20654
|
+
}
|
|
20655
|
+
const classRest = classParts.join(CLASS_PART_SEPARATOR2);
|
|
20656
|
+
return classPartObject.validators.find(({
|
|
20657
|
+
validator
|
|
20658
|
+
}) => validator(classRest))?.classGroupId;
|
|
20659
|
+
};
|
|
20660
|
+
var arbitraryPropertyRegex2 = /^\[(.+)\]$/;
|
|
20661
|
+
var getGroupIdForArbitraryProperty2 = (className) => {
|
|
20662
|
+
if (arbitraryPropertyRegex2.test(className)) {
|
|
20663
|
+
const arbitraryPropertyClassName = arbitraryPropertyRegex2.exec(className)[1];
|
|
20664
|
+
const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(":"));
|
|
20665
|
+
if (property) {
|
|
20666
|
+
return "arbitrary.." + property;
|
|
20667
|
+
}
|
|
20668
|
+
}
|
|
20669
|
+
};
|
|
20670
|
+
var createClassMap2 = (config) => {
|
|
20671
|
+
const {
|
|
20672
|
+
theme,
|
|
20673
|
+
prefix
|
|
20674
|
+
} = config;
|
|
20675
|
+
const classMap = {
|
|
20676
|
+
nextPart: new Map,
|
|
20677
|
+
validators: []
|
|
20678
|
+
};
|
|
20679
|
+
const prefixedClassGroupEntries = getPrefixedClassGroupEntries2(Object.entries(config.classGroups), prefix);
|
|
20680
|
+
prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
|
|
20681
|
+
processClassesRecursively2(classGroup, classMap, classGroupId, theme);
|
|
20682
|
+
});
|
|
20683
|
+
return classMap;
|
|
20684
|
+
};
|
|
20685
|
+
var processClassesRecursively2 = (classGroup, classPartObject, classGroupId, theme) => {
|
|
20686
|
+
classGroup.forEach((classDefinition) => {
|
|
20687
|
+
if (typeof classDefinition === "string") {
|
|
20688
|
+
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart2(classPartObject, classDefinition);
|
|
20689
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
20690
|
+
return;
|
|
20691
|
+
}
|
|
20692
|
+
if (typeof classDefinition === "function") {
|
|
20693
|
+
if (isThemeGetter2(classDefinition)) {
|
|
20694
|
+
processClassesRecursively2(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
20695
|
+
return;
|
|
20696
|
+
}
|
|
20697
|
+
classPartObject.validators.push({
|
|
20698
|
+
validator: classDefinition,
|
|
20699
|
+
classGroupId
|
|
20700
|
+
});
|
|
20701
|
+
return;
|
|
20702
|
+
}
|
|
20703
|
+
Object.entries(classDefinition).forEach(([key, classGroup2]) => {
|
|
20704
|
+
processClassesRecursively2(classGroup2, getPart2(classPartObject, key), classGroupId, theme);
|
|
20705
|
+
});
|
|
20706
|
+
});
|
|
20707
|
+
};
|
|
20708
|
+
var getPart2 = (classPartObject, path) => {
|
|
20709
|
+
let currentClassPartObject = classPartObject;
|
|
20710
|
+
path.split(CLASS_PART_SEPARATOR2).forEach((pathPart) => {
|
|
20711
|
+
if (!currentClassPartObject.nextPart.has(pathPart)) {
|
|
20712
|
+
currentClassPartObject.nextPart.set(pathPart, {
|
|
20713
|
+
nextPart: new Map,
|
|
20714
|
+
validators: []
|
|
20715
|
+
});
|
|
20716
|
+
}
|
|
20717
|
+
currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
|
|
20718
|
+
});
|
|
20719
|
+
return currentClassPartObject;
|
|
20720
|
+
};
|
|
20721
|
+
var isThemeGetter2 = (func) => func.isThemeGetter;
|
|
20722
|
+
var getPrefixedClassGroupEntries2 = (classGroupEntries, prefix) => {
|
|
20723
|
+
if (!prefix) {
|
|
20724
|
+
return classGroupEntries;
|
|
20725
|
+
}
|
|
20726
|
+
return classGroupEntries.map(([classGroupId, classGroup]) => {
|
|
20727
|
+
const prefixedClassGroup = classGroup.map((classDefinition) => {
|
|
20728
|
+
if (typeof classDefinition === "string") {
|
|
20729
|
+
return prefix + classDefinition;
|
|
20730
|
+
}
|
|
20731
|
+
if (typeof classDefinition === "object") {
|
|
20732
|
+
return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
|
|
20733
|
+
}
|
|
20734
|
+
return classDefinition;
|
|
20735
|
+
});
|
|
20736
|
+
return [classGroupId, prefixedClassGroup];
|
|
20737
|
+
});
|
|
20738
|
+
};
|
|
20739
|
+
var createLruCache2 = (maxCacheSize) => {
|
|
19513
20740
|
if (maxCacheSize < 1) {
|
|
19514
20741
|
return {
|
|
19515
20742
|
get: () => {
|
|
@@ -20702,10 +21929,10 @@ function cn2(...inputs) {
|
|
|
20702
21929
|
}
|
|
20703
21930
|
|
|
20704
21931
|
// src/components/homepage/InfoTooltip.tsx
|
|
20705
|
-
import { useState as
|
|
21932
|
+
import { useState as useState38 } from "react";
|
|
20706
21933
|
import { jsx as jsx45, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
20707
21934
|
var InfoTooltip = ({ text }) => {
|
|
20708
|
-
const [isVisible, setIsVisible] =
|
|
21935
|
+
const [isVisible, setIsVisible] = useState38(false);
|
|
20709
21936
|
return /* @__PURE__ */ jsxs7("span", {
|
|
20710
21937
|
className: "relative inline-block ml-1 text-gray-600 cursor-default",
|
|
20711
21938
|
onPointerEnter: () => setIsVisible(true),
|
|
@@ -20943,9 +22170,9 @@ var icon = {
|
|
|
20943
22170
|
marginLeft: 4
|
|
20944
22171
|
};
|
|
20945
22172
|
var CompanyPricing = () => {
|
|
20946
|
-
const [devSeatCount, setDevSeatCount] =
|
|
20947
|
-
const [cloudRenders, setCloudRenders] =
|
|
20948
|
-
const formatPrice =
|
|
22173
|
+
const [devSeatCount, setDevSeatCount] = React53.useState(1);
|
|
22174
|
+
const [cloudRenders, setCloudRenders] = React53.useState(1000);
|
|
22175
|
+
const formatPrice = useCallback30((price) => {
|
|
20949
22176
|
const formatter = new Intl.NumberFormat("en-US", {
|
|
20950
22177
|
style: "currency",
|
|
20951
22178
|
currency: "USD",
|
|
@@ -20953,10 +22180,10 @@ var CompanyPricing = () => {
|
|
|
20953
22180
|
});
|
|
20954
22181
|
return formatter.format(price);
|
|
20955
22182
|
}, []);
|
|
20956
|
-
const totalPrice =
|
|
22183
|
+
const totalPrice = useMemo45(() => {
|
|
20957
22184
|
return Math.max(100, devSeatCount * SEAT_PRICE + Math.ceil(cloudRenders / 1000) * RENDER_UNIT_PRICE);
|
|
20958
22185
|
}, [cloudRenders, devSeatCount]);
|
|
20959
|
-
const totalPriceString =
|
|
22186
|
+
const totalPriceString = useMemo45(() => {
|
|
20960
22187
|
return formatPrice(totalPrice);
|
|
20961
22188
|
}, [formatPrice, totalPrice]);
|
|
20962
22189
|
return /* @__PURE__ */ jsxs9(Container, {
|
|
@@ -21177,7 +22404,7 @@ var Pricing = () => {
|
|
|
21177
22404
|
};
|
|
21178
22405
|
|
|
21179
22406
|
// src/components/homepage/BackgroundAnimation.tsx
|
|
21180
|
-
import { useEffect as
|
|
22407
|
+
import { useEffect as useEffect40 } from "react";
|
|
21181
22408
|
import { jsx as jsx49, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
21182
22409
|
"use client";
|
|
21183
22410
|
var rx = 0.2;
|
|
@@ -21203,7 +22430,7 @@ var BackgroundAnimation = () => {
|
|
|
21203
22430
|
}
|
|
21204
22431
|
}
|
|
21205
22432
|
`;
|
|
21206
|
-
|
|
22433
|
+
useEffect40(() => {
|
|
21207
22434
|
const _style = document.createElement("style");
|
|
21208
22435
|
_style.innerHTML = css;
|
|
21209
22436
|
document.head.appendChild(_style);
|
|
@@ -21623,20 +22850,20 @@ init_esm();
|
|
|
21623
22850
|
init_esm();
|
|
21624
22851
|
init_esm();
|
|
21625
22852
|
import { jsx as jsx56, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
21626
|
-
import { jsx as jsx214, jsxs as jsxs24, Fragment as
|
|
21627
|
-
import
|
|
21628
|
-
import { useContext as useContext210, useEffect as
|
|
21629
|
-
import { useContext as
|
|
22853
|
+
import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment8 } from "react/jsx-runtime";
|
|
22854
|
+
import React55 from "react";
|
|
22855
|
+
import { useContext as useContext210, useEffect as useEffect41, useState as useState39 } from "react";
|
|
22856
|
+
import { useContext as useContext42, useLayoutEffect as useLayoutEffect16 } from "react";
|
|
21630
22857
|
import { jsx as jsx311 } from "react/jsx-runtime";
|
|
21631
|
-
import { useCallback as
|
|
22858
|
+
import { useCallback as useCallback31, useRef as useRef38 } from "react";
|
|
21632
22859
|
import { useEffect as useEffect210, useState as useState210 } from "react";
|
|
21633
|
-
import { useContext as
|
|
21634
|
-
import { useEffect as
|
|
21635
|
-
import { useCallback as
|
|
21636
|
-
import { useEffect as useEffect42, useRef as
|
|
22860
|
+
import { useContext as useContext43, useEffect as useEffect52, useRef as useRef42 } from "react";
|
|
22861
|
+
import { useEffect as useEffect310 } from "react";
|
|
22862
|
+
import { useCallback as useCallback210, useContext as useContext37, useMemo as useMemo46, useRef as useRef24, useState as useState310 } from "react";
|
|
22863
|
+
import { useEffect as useEffect42, useRef as useRef39 } from "react";
|
|
21637
22864
|
import { useCallback as useCallback32, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
|
|
21638
22865
|
import {
|
|
21639
|
-
forwardRef as
|
|
22866
|
+
forwardRef as forwardRef210,
|
|
21640
22867
|
useEffect as useEffect132,
|
|
21641
22868
|
useImperativeHandle as useImperativeHandle22,
|
|
21642
22869
|
useLayoutEffect as useLayoutEffect23,
|
|
@@ -21646,7 +22873,7 @@ import {
|
|
|
21646
22873
|
} from "react";
|
|
21647
22874
|
import React102, {
|
|
21648
22875
|
Suspense as Suspense2,
|
|
21649
|
-
forwardRef as
|
|
22876
|
+
forwardRef as forwardRef31,
|
|
21650
22877
|
useCallback as useCallback112,
|
|
21651
22878
|
useContext as useContext62,
|
|
21652
22879
|
useEffect as useEffect122,
|
|
@@ -21657,8 +22884,8 @@ import React102, {
|
|
|
21657
22884
|
} from "react";
|
|
21658
22885
|
import { useCallback as useCallback82, useEffect as useEffect102, useMemo as useMemo92, useRef as useRef82, useState as useState102 } from "react";
|
|
21659
22886
|
import { jsx as jsx410 } from "react/jsx-runtime";
|
|
21660
|
-
import { useCallback as useCallback52, useMemo as
|
|
21661
|
-
import
|
|
22887
|
+
import { useCallback as useCallback52, useMemo as useMemo47, useRef as useRef52, useState as useState62 } from "react";
|
|
22888
|
+
import React310, { useCallback as useCallback42, useMemo as useMemo34, useState as useState52 } from "react";
|
|
21662
22889
|
import { jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
21663
22890
|
import { jsx as jsx64, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
21664
22891
|
import {
|
|
@@ -22477,7 +23704,7 @@ var studioStyle = {
|
|
|
22477
23704
|
};
|
|
22478
23705
|
var BufferingIndicator = ({ type }) => {
|
|
22479
23706
|
const style = type === "player" ? playerStyle : studioStyle;
|
|
22480
|
-
return /* @__PURE__ */ jsxs24(
|
|
23707
|
+
return /* @__PURE__ */ jsxs24(Fragment8, {
|
|
22481
23708
|
children: [
|
|
22482
23709
|
/* @__PURE__ */ jsx214("style", {
|
|
22483
23710
|
type: "text/css",
|
|
@@ -22654,8 +23881,8 @@ var calculateOuter = ({
|
|
|
22654
23881
|
overflow: overflowVisible ? "visible" : "hidden"
|
|
22655
23882
|
};
|
|
22656
23883
|
};
|
|
22657
|
-
var PlayerEventEmitterContext =
|
|
22658
|
-
var ThumbnailEmitterContext =
|
|
23884
|
+
var PlayerEventEmitterContext = React55.createContext(undefined);
|
|
23885
|
+
var ThumbnailEmitterContext = React55.createContext(undefined);
|
|
22659
23886
|
|
|
22660
23887
|
class PlayerEmitter {
|
|
22661
23888
|
listeners = {
|
|
@@ -22769,11 +23996,11 @@ class ThumbnailEmitter {
|
|
|
22769
23996
|
};
|
|
22770
23997
|
}
|
|
22771
23998
|
var useBufferStateEmitter = (emitter) => {
|
|
22772
|
-
const bufferManager =
|
|
23999
|
+
const bufferManager = useContext42(Internals.BufferingContextReact);
|
|
22773
24000
|
if (!bufferManager) {
|
|
22774
24001
|
throw new Error("BufferingContextReact not found");
|
|
22775
24002
|
}
|
|
22776
|
-
|
|
24003
|
+
useLayoutEffect16(() => {
|
|
22777
24004
|
const clear1 = bufferManager.listenForBuffering(() => {
|
|
22778
24005
|
bufferManager.buffering.current = true;
|
|
22779
24006
|
emitter.dispatchWaiting({});
|
|
@@ -22789,12 +24016,12 @@ var useBufferStateEmitter = (emitter) => {
|
|
|
22789
24016
|
}, [bufferManager, emitter]);
|
|
22790
24017
|
};
|
|
22791
24018
|
var PlayerEmitterProvider = ({ children, currentPlaybackRate }) => {
|
|
22792
|
-
const [emitter] =
|
|
24019
|
+
const [emitter] = useState39(() => new PlayerEmitter);
|
|
22793
24020
|
const bufferManager = useContext210(Internals.BufferingContextReact);
|
|
22794
24021
|
if (!bufferManager) {
|
|
22795
24022
|
throw new Error("BufferingContextReact not found");
|
|
22796
24023
|
}
|
|
22797
|
-
|
|
24024
|
+
useEffect41(() => {
|
|
22798
24025
|
if (currentPlaybackRate) {
|
|
22799
24026
|
emitter.dispatchRateChange(currentPlaybackRate);
|
|
22800
24027
|
}
|
|
@@ -22847,7 +24074,7 @@ var useHoverState = (ref, hideControlsWhenPointerDoesntMove) => {
|
|
|
22847
24074
|
};
|
|
22848
24075
|
var usePlayer = () => {
|
|
22849
24076
|
const [playing, setPlaying, imperativePlaying] = Internals.Timeline.usePlayingState();
|
|
22850
|
-
const [hasPlayed, setHasPlayed] =
|
|
24077
|
+
const [hasPlayed, setHasPlayed] = useState310(false);
|
|
22851
24078
|
const frame = Internals.Timeline.useTimelinePosition();
|
|
22852
24079
|
const playStart = useRef24(frame);
|
|
22853
24080
|
const setFrame = Internals.Timeline.useTimelineSetFrame();
|
|
@@ -22870,14 +24097,14 @@ var usePlayer = () => {
|
|
|
22870
24097
|
throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
|
|
22871
24098
|
}
|
|
22872
24099
|
const { buffering } = bufferingContext;
|
|
22873
|
-
const seek2 =
|
|
24100
|
+
const seek2 = useCallback210((newFrame) => {
|
|
22874
24101
|
if (video?.id) {
|
|
22875
24102
|
setTimelinePosition((c) => ({ ...c, [video.id]: newFrame }));
|
|
22876
24103
|
}
|
|
22877
24104
|
frameRef.current = newFrame;
|
|
22878
24105
|
emitter.dispatchSeek(newFrame);
|
|
22879
24106
|
}, [emitter, setTimelinePosition, video?.id]);
|
|
22880
|
-
const play =
|
|
24107
|
+
const play = useCallback210((e) => {
|
|
22881
24108
|
if (imperativePlaying.current) {
|
|
22882
24109
|
return;
|
|
22883
24110
|
}
|
|
@@ -22903,7 +24130,7 @@ var usePlayer = () => {
|
|
|
22903
24130
|
seek2,
|
|
22904
24131
|
audioAndVideoTags
|
|
22905
24132
|
]);
|
|
22906
|
-
const pause =
|
|
24133
|
+
const pause = useCallback210(() => {
|
|
22907
24134
|
if (imperativePlaying.current) {
|
|
22908
24135
|
imperativePlaying.current = false;
|
|
22909
24136
|
setPlaying(false);
|
|
@@ -22911,7 +24138,7 @@ var usePlayer = () => {
|
|
|
22911
24138
|
audioContext?.audioContext?.suspend();
|
|
22912
24139
|
}
|
|
22913
24140
|
}, [emitter, imperativePlaying, setPlaying, audioContext]);
|
|
22914
|
-
const pauseAndReturnToPlayStart =
|
|
24141
|
+
const pauseAndReturnToPlayStart = useCallback210(() => {
|
|
22915
24142
|
if (imperativePlaying.current) {
|
|
22916
24143
|
imperativePlaying.current = false;
|
|
22917
24144
|
frameRef.current = playStart.current;
|
|
@@ -22926,7 +24153,7 @@ var usePlayer = () => {
|
|
|
22926
24153
|
}
|
|
22927
24154
|
}, [config, emitter, imperativePlaying, setPlaying, setTimelinePosition]);
|
|
22928
24155
|
const videoId = video?.id;
|
|
22929
|
-
const frameBack =
|
|
24156
|
+
const frameBack = useCallback210((frames) => {
|
|
22930
24157
|
if (!videoId) {
|
|
22931
24158
|
return null;
|
|
22932
24159
|
}
|
|
@@ -22945,7 +24172,7 @@ var usePlayer = () => {
|
|
|
22945
24172
|
};
|
|
22946
24173
|
});
|
|
22947
24174
|
}, [imperativePlaying, setFrame, videoId]);
|
|
22948
|
-
const frameForward =
|
|
24175
|
+
const frameForward = useCallback210((frames) => {
|
|
22949
24176
|
if (!videoId) {
|
|
22950
24177
|
return null;
|
|
22951
24178
|
}
|
|
@@ -22964,23 +24191,23 @@ var usePlayer = () => {
|
|
|
22964
24191
|
};
|
|
22965
24192
|
});
|
|
22966
24193
|
}, [videoId, imperativePlaying, lastFrame, setFrame]);
|
|
22967
|
-
const toggle =
|
|
24194
|
+
const toggle = useCallback210((e) => {
|
|
22968
24195
|
if (imperativePlaying.current) {
|
|
22969
24196
|
pause();
|
|
22970
24197
|
} else {
|
|
22971
24198
|
play(e);
|
|
22972
24199
|
}
|
|
22973
24200
|
}, [imperativePlaying, pause, play]);
|
|
22974
|
-
const isPlaying =
|
|
24201
|
+
const isPlaying = useCallback210(() => {
|
|
22975
24202
|
return imperativePlaying.current;
|
|
22976
24203
|
}, [imperativePlaying]);
|
|
22977
|
-
const getCurrentFrame =
|
|
24204
|
+
const getCurrentFrame = useCallback210(() => {
|
|
22978
24205
|
return frameRef.current;
|
|
22979
24206
|
}, [frameRef]);
|
|
22980
|
-
const isBuffering =
|
|
24207
|
+
const isBuffering = useCallback210(() => {
|
|
22981
24208
|
return buffering.current;
|
|
22982
24209
|
}, [buffering]);
|
|
22983
|
-
const returnValue =
|
|
24210
|
+
const returnValue = useMemo46(() => {
|
|
22984
24211
|
return {
|
|
22985
24212
|
frameBack,
|
|
22986
24213
|
frameForward,
|
|
@@ -23023,7 +24250,7 @@ var useBrowserMediaSession = ({
|
|
|
23023
24250
|
playbackRate
|
|
23024
24251
|
}) => {
|
|
23025
24252
|
const { playing, pause, play, emitter, getCurrentFrame, seek: seek2 } = usePlayer();
|
|
23026
|
-
|
|
24253
|
+
useEffect310(() => {
|
|
23027
24254
|
if (!navigator.mediaSession) {
|
|
23028
24255
|
return;
|
|
23029
24256
|
}
|
|
@@ -23036,7 +24263,7 @@ var useBrowserMediaSession = ({
|
|
|
23036
24263
|
navigator.mediaSession.playbackState = "paused";
|
|
23037
24264
|
}
|
|
23038
24265
|
}, [browserMediaControlsBehavior.mode, playing]);
|
|
23039
|
-
|
|
24266
|
+
useEffect310(() => {
|
|
23040
24267
|
if (!navigator.mediaSession) {
|
|
23041
24268
|
return;
|
|
23042
24269
|
}
|
|
@@ -23066,7 +24293,7 @@ var useBrowserMediaSession = ({
|
|
|
23066
24293
|
playbackRate,
|
|
23067
24294
|
videoConfig
|
|
23068
24295
|
]);
|
|
23069
|
-
|
|
24296
|
+
useEffect310(() => {
|
|
23070
24297
|
if (!navigator.mediaSession) {
|
|
23071
24298
|
return;
|
|
23072
24299
|
}
|
|
@@ -23159,7 +24386,7 @@ var getIsBackgrounded = () => {
|
|
|
23159
24386
|
return document.visibilityState === "hidden";
|
|
23160
24387
|
};
|
|
23161
24388
|
var useIsBackgrounded = () => {
|
|
23162
|
-
const isBackgrounded =
|
|
24389
|
+
const isBackgrounded = useRef39(getIsBackgrounded());
|
|
23163
24390
|
useEffect42(() => {
|
|
23164
24391
|
const onVisibilityChange = () => {
|
|
23165
24392
|
isBackgrounded.current = getIsBackgrounded();
|
|
@@ -23186,7 +24413,7 @@ var usePlayback = ({
|
|
|
23186
24413
|
const setFrame = Internals.Timeline.useTimelineSetFrame();
|
|
23187
24414
|
const isBackgroundedRef = useIsBackgrounded();
|
|
23188
24415
|
const lastTimeUpdateEvent = useRef42(null);
|
|
23189
|
-
const context =
|
|
24416
|
+
const context = useContext43(Internals.BufferingContextReact);
|
|
23190
24417
|
if (!context) {
|
|
23191
24418
|
throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
|
|
23192
24419
|
}
|
|
@@ -23469,7 +24696,7 @@ var DefaultVolumeSlider = ({
|
|
|
23469
24696
|
...common
|
|
23470
24697
|
};
|
|
23471
24698
|
}, [isVertical]);
|
|
23472
|
-
const randomId = typeof
|
|
24699
|
+
const randomId = typeof React310.useId === "undefined" ? "volume-slider" : React310.useId();
|
|
23473
24700
|
const [randomClass] = useState52(() => `__remotion-volume-slider-${random(randomId)}`.replace(".", ""));
|
|
23474
24701
|
const onVolumeChange = useCallback42((e) => {
|
|
23475
24702
|
setVolume(parseFloat(e.target.value));
|
|
@@ -23567,7 +24794,7 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
23567
24794
|
}
|
|
23568
24795
|
setMediaMuted((mute) => !mute);
|
|
23569
24796
|
}, [isVolume0, setMediaMuted, setMediaVolume]);
|
|
23570
|
-
const parentDivStyle =
|
|
24797
|
+
const parentDivStyle = useMemo47(() => {
|
|
23571
24798
|
return {
|
|
23572
24799
|
display: "inline-flex",
|
|
23573
24800
|
background: "none",
|
|
@@ -23578,7 +24805,7 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
23578
24805
|
...displayVerticalVolumeSlider && { position: "relative" }
|
|
23579
24806
|
};
|
|
23580
24807
|
}, [displayVerticalVolumeSlider]);
|
|
23581
|
-
const volumeContainer =
|
|
24808
|
+
const volumeContainer = useMemo47(() => {
|
|
23582
24809
|
return {
|
|
23583
24810
|
display: "inline",
|
|
23584
24811
|
width: ICON_SIZE2,
|
|
@@ -23603,10 +24830,10 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
23603
24830
|
children: isMutedOrZero ? /* @__PURE__ */ jsx64(VolumeOffIcon, {}) : /* @__PURE__ */ jsx64(VolumeOnIcon, {})
|
|
23604
24831
|
});
|
|
23605
24832
|
}, [onBlur, onClick, volumeContainer]);
|
|
23606
|
-
const muteButton =
|
|
24833
|
+
const muteButton = useMemo47(() => {
|
|
23607
24834
|
return renderMuteButton ? renderMuteButton({ muted: mediaMuted, volume: mediaVolume }) : renderDefaultMuteButton({ muted: mediaMuted, volume: mediaVolume });
|
|
23608
24835
|
}, [mediaMuted, mediaVolume, renderDefaultMuteButton, renderMuteButton]);
|
|
23609
|
-
const volumeSlider =
|
|
24836
|
+
const volumeSlider = useMemo47(() => {
|
|
23610
24837
|
return (focused || hover) && !mediaMuted && !Internals.isIosSafari() ? (renderVolumeSlider ?? renderDefaultVolumeSlider)({
|
|
23611
24838
|
isVertical: displayVerticalVolumeSlider,
|
|
23612
24839
|
volume: mediaVolume,
|
|
@@ -25017,7 +26244,7 @@ var PlayerUI = ({
|
|
|
25017
26244
|
})
|
|
25018
26245
|
});
|
|
25019
26246
|
};
|
|
25020
|
-
var PlayerUI_default =
|
|
26247
|
+
var PlayerUI_default = forwardRef31(PlayerUI);
|
|
25021
26248
|
var DEFAULT_VOLUME_PERSISTANCE_KEY = "remotion.volumePreference";
|
|
25022
26249
|
var persistVolume = (volume, logLevel, volumePersistenceKey) => {
|
|
25023
26250
|
if (typeof window === "undefined") {
|
|
@@ -25502,7 +26729,7 @@ var PlayerFn = ({
|
|
|
25502
26729
|
})
|
|
25503
26730
|
});
|
|
25504
26731
|
};
|
|
25505
|
-
var forward =
|
|
26732
|
+
var forward = forwardRef210;
|
|
25506
26733
|
var Player = forward(PlayerFn);
|
|
25507
26734
|
var useThumbnail = () => {
|
|
25508
26735
|
const emitter = useContext72(ThumbnailEmitterContext);
|
|
@@ -25724,11 +26951,11 @@ var Thumbnail = forward2(ThumbnailFn);
|
|
|
25724
26951
|
|
|
25725
26952
|
// src/components/homepage/Demo/index.tsx
|
|
25726
26953
|
import {
|
|
25727
|
-
useCallback as
|
|
25728
|
-
useEffect as
|
|
25729
|
-
useMemo as
|
|
25730
|
-
useRef as
|
|
25731
|
-
useState as
|
|
26954
|
+
useCallback as useCallback46,
|
|
26955
|
+
useEffect as useEffect56,
|
|
26956
|
+
useMemo as useMemo58,
|
|
26957
|
+
useRef as useRef49,
|
|
26958
|
+
useState as useState49
|
|
25732
26959
|
} from "react";
|
|
25733
26960
|
|
|
25734
26961
|
// ../../node_modules/.bun/@babel+runtime@7.27.1/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
@@ -26477,15 +27704,15 @@ var UNDERLAY_RED = curriedTransparentize$1(0.9, RED);
|
|
|
26477
27704
|
var BLUE_TEXT = curriedDarken$1(0.3, "#42e9f5");
|
|
26478
27705
|
|
|
26479
27706
|
// src/components/homepage/layout/use-color-mode.tsx
|
|
26480
|
-
import
|
|
27707
|
+
import React56, { useContext as useContext44, useMemo as useMemo48 } from "react";
|
|
26481
27708
|
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
26482
|
-
var Context =
|
|
27709
|
+
var Context = React56.createContext(undefined);
|
|
26483
27710
|
var ColorModeProvider = ({
|
|
26484
27711
|
children,
|
|
26485
27712
|
colorMode,
|
|
26486
27713
|
setColorMode
|
|
26487
27714
|
}) => {
|
|
26488
|
-
const value =
|
|
27715
|
+
const value = useMemo48(() => {
|
|
26489
27716
|
return { colorMode, setColorMode };
|
|
26490
27717
|
}, [colorMode, setColorMode]);
|
|
26491
27718
|
return /* @__PURE__ */ jsx57(Context.Provider, {
|
|
@@ -26494,7 +27721,7 @@ var ColorModeProvider = ({
|
|
|
26494
27721
|
});
|
|
26495
27722
|
};
|
|
26496
27723
|
function useColorMode() {
|
|
26497
|
-
const context =
|
|
27724
|
+
const context = useContext44(Context);
|
|
26498
27725
|
if (context === null || context === undefined) {
|
|
26499
27726
|
throw new Error("ColorModeProvider");
|
|
26500
27727
|
}
|
|
@@ -26503,21 +27730,21 @@ function useColorMode() {
|
|
|
26503
27730
|
|
|
26504
27731
|
// src/components/homepage/Demo/Comp.tsx
|
|
26505
27732
|
init_esm();
|
|
26506
|
-
import { useCallback as
|
|
27733
|
+
import { useCallback as useCallback38, useEffect as useEffect48, useMemo as useMemo53, useState as useState45 } from "react";
|
|
26507
27734
|
|
|
26508
27735
|
// src/components/homepage/Demo/Cards.tsx
|
|
26509
27736
|
init_esm();
|
|
26510
27737
|
import {
|
|
26511
27738
|
createRef as createRef4,
|
|
26512
|
-
useCallback as
|
|
26513
|
-
useEffect as
|
|
26514
|
-
useRef as
|
|
26515
|
-
useState as
|
|
27739
|
+
useCallback as useCallback37,
|
|
27740
|
+
useEffect as useEffect47,
|
|
27741
|
+
useRef as useRef46,
|
|
27742
|
+
useState as useState43
|
|
26516
27743
|
} from "react";
|
|
26517
27744
|
|
|
26518
27745
|
// src/components/homepage/Demo/Card.tsx
|
|
26519
27746
|
init_esm();
|
|
26520
|
-
import { useCallback as
|
|
27747
|
+
import { useCallback as useCallback35, useRef as useRef40 } from "react";
|
|
26521
27748
|
|
|
26522
27749
|
// src/components/homepage/Demo/math.ts
|
|
26523
27750
|
var paddingAndMargin = 20;
|
|
@@ -26551,10 +27778,10 @@ var getIndexFromPosition = (clientX, clientY) => {
|
|
|
26551
27778
|
};
|
|
26552
27779
|
|
|
26553
27780
|
// src/components/homepage/Demo/Switcher.tsx
|
|
26554
|
-
import { useCallback as
|
|
27781
|
+
import { useCallback as useCallback33 } from "react";
|
|
26555
27782
|
import { jsx as jsx58, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
26556
27783
|
var Switcher = ({ type, theme, onTap }) => {
|
|
26557
|
-
const onPointerDown =
|
|
27784
|
+
const onPointerDown = useCallback33((e) => {
|
|
26558
27785
|
e.stopPropagation();
|
|
26559
27786
|
onTap();
|
|
26560
27787
|
}, [onTap]);
|
|
@@ -26595,7 +27822,7 @@ var Switcher = ({ type, theme, onTap }) => {
|
|
|
26595
27822
|
};
|
|
26596
27823
|
|
|
26597
27824
|
// src/components/homepage/Demo/Card.tsx
|
|
26598
|
-
import { jsx as jsx59, jsxs as jsxs16, Fragment as
|
|
27825
|
+
import { jsx as jsx59, jsxs as jsxs16, Fragment as Fragment9 } from "react/jsx-runtime";
|
|
26599
27826
|
var arePositionsEqual = (a, b) => {
|
|
26600
27827
|
return a.every((pos, i) => {
|
|
26601
27828
|
return pos.x === b[i].x && pos.y === b[i].y;
|
|
@@ -26615,9 +27842,9 @@ var Card2 = ({
|
|
|
26615
27842
|
onClickRight
|
|
26616
27843
|
}) => {
|
|
26617
27844
|
const refToUse = refsToUse[index2];
|
|
26618
|
-
const stopPrevious =
|
|
27845
|
+
const stopPrevious = useRef40([]);
|
|
26619
27846
|
let newIndices = [...indices];
|
|
26620
|
-
const applyPositions =
|
|
27847
|
+
const applyPositions = useCallback35((except) => {
|
|
26621
27848
|
let stopped = false;
|
|
26622
27849
|
stopPrevious.current.forEach((s) => {
|
|
26623
27850
|
s();
|
|
@@ -26690,7 +27917,7 @@ var Card2 = ({
|
|
|
26690
27917
|
update();
|
|
26691
27918
|
});
|
|
26692
27919
|
}, [newIndices, onUpdate, positions, refsToUse, shouldBePositions]);
|
|
26693
|
-
const onPointerDown =
|
|
27920
|
+
const onPointerDown = useCallback35((e) => {
|
|
26694
27921
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
26695
27922
|
const cardLeft = refToUse.current.offsetLeft;
|
|
26696
27923
|
const cardTop = refToUse.current.offsetTop;
|
|
@@ -26751,7 +27978,7 @@ var Card2 = ({
|
|
|
26751
27978
|
}, { once: true });
|
|
26752
27979
|
refToUse.current.addEventListener("pointermove", onMove);
|
|
26753
27980
|
}, [applyPositions, index2, positions, refToUse, shouldBePositions]);
|
|
26754
|
-
const onPointerUp =
|
|
27981
|
+
const onPointerUp = useCallback35((e) => {
|
|
26755
27982
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
26756
27983
|
}, []);
|
|
26757
27984
|
const { x, y } = getPositionForIndex(index2);
|
|
@@ -26780,7 +28007,7 @@ var Card2 = ({
|
|
|
26780
28007
|
className: "transition-opacity duration-200",
|
|
26781
28008
|
children: [
|
|
26782
28009
|
content,
|
|
26783
|
-
withSwitcher ? /* @__PURE__ */ jsxs16(
|
|
28010
|
+
withSwitcher ? /* @__PURE__ */ jsxs16(Fragment9, {
|
|
26784
28011
|
children: [
|
|
26785
28012
|
/* @__PURE__ */ jsx59(Switcher, {
|
|
26786
28013
|
onTap: onClickLeft,
|
|
@@ -26879,23 +28106,23 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
|
|
|
26879
28106
|
// src/components/homepage/Demo/EmojiCard.tsx
|
|
26880
28107
|
init_esm();
|
|
26881
28108
|
import {
|
|
26882
|
-
forwardRef as
|
|
26883
|
-
useCallback as
|
|
26884
|
-
useEffect as
|
|
28109
|
+
forwardRef as forwardRef33,
|
|
28110
|
+
useCallback as useCallback36,
|
|
28111
|
+
useEffect as useEffect46,
|
|
26885
28112
|
useImperativeHandle as useImperativeHandle14,
|
|
26886
|
-
useRef as
|
|
28113
|
+
useRef as useRef45
|
|
26887
28114
|
} from "react";
|
|
26888
28115
|
|
|
26889
28116
|
// src/components/homepage/Demo/DisplayedEmoji.tsx
|
|
26890
28117
|
init_esm();
|
|
26891
|
-
import { useEffect as
|
|
28118
|
+
import { useEffect as useEffect45, useMemo as useMemo50, useState as useState41 } from "react";
|
|
26892
28119
|
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
26893
28120
|
var DisplayedEmoji = ({ emoji }) => {
|
|
26894
|
-
const [data, setData] =
|
|
28121
|
+
const [data, setData] = useState41(null);
|
|
26895
28122
|
const { durationInFrames, fps } = useVideoConfig();
|
|
26896
|
-
const [browser, setBrowser] =
|
|
28123
|
+
const [browser, setBrowser] = useState41(typeof document !== "undefined");
|
|
26897
28124
|
const { delayRender, continueRender } = useDelayRender();
|
|
26898
|
-
const src =
|
|
28125
|
+
const src = useMemo50(() => {
|
|
26899
28126
|
if (emoji === "melting") {
|
|
26900
28127
|
return "https://fonts.gstatic.com/s/e/notoemoji/latest/1fae0/lottie.json";
|
|
26901
28128
|
}
|
|
@@ -26907,8 +28134,8 @@ var DisplayedEmoji = ({ emoji }) => {
|
|
|
26907
28134
|
}
|
|
26908
28135
|
throw new Error("Unknown emoji");
|
|
26909
28136
|
}, [emoji]);
|
|
26910
|
-
const [handle] =
|
|
26911
|
-
|
|
28137
|
+
const [handle] = useState41(() => delayRender());
|
|
28138
|
+
useEffect45(() => {
|
|
26912
28139
|
Promise.all([
|
|
26913
28140
|
fetch(src).then((res) => res.json()),
|
|
26914
28141
|
Promise.resolve().then(() => (init_esm2(), exports_esm)).then(({ Lottie: Lottie2, getLottieMetadata: getLottieMetadata2 }) => ({
|
|
@@ -26926,7 +28153,7 @@ var DisplayedEmoji = ({ emoji }) => {
|
|
|
26926
28153
|
cancelRender(err);
|
|
26927
28154
|
});
|
|
26928
28155
|
}, [handle, src, continueRender]);
|
|
26929
|
-
|
|
28156
|
+
useEffect45(() => {
|
|
26930
28157
|
if (typeof document !== "undefined") {
|
|
26931
28158
|
setBrowser(true);
|
|
26932
28159
|
}
|
|
@@ -26955,7 +28182,7 @@ var DisplayedEmoji = ({ emoji }) => {
|
|
|
26955
28182
|
};
|
|
26956
28183
|
|
|
26957
28184
|
// src/components/homepage/Demo/EmojiCard.tsx
|
|
26958
|
-
import { jsx as jsx67, jsxs as jsxs18, Fragment as
|
|
28185
|
+
import { jsx as jsx67, jsxs as jsxs18, Fragment as Fragment10 } from "react/jsx-runtime";
|
|
26959
28186
|
var applyTransforms = ({ ref1, ref2, ref3, transforms }) => {
|
|
26960
28187
|
ref1.style.transform = `translateX(${transforms[0]}%)`;
|
|
26961
28188
|
ref2.style.transform = `translateX(${transforms[1]}%)`;
|
|
@@ -26996,11 +28223,11 @@ var emojiStyle = {
|
|
|
26996
28223
|
top: "calc(50% - 50px)"
|
|
26997
28224
|
};
|
|
26998
28225
|
var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
26999
|
-
const ref1 =
|
|
27000
|
-
const ref2 =
|
|
27001
|
-
const ref3 =
|
|
27002
|
-
const transforms =
|
|
27003
|
-
const onLeft =
|
|
28226
|
+
const ref1 = useRef45(null);
|
|
28227
|
+
const ref2 = useRef45(null);
|
|
28228
|
+
const ref3 = useRef45(null);
|
|
28229
|
+
const transforms = useRef45([-100, 0, 100]);
|
|
28230
|
+
const onLeft = useCallback36(() => {
|
|
27004
28231
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
27005
28232
|
return;
|
|
27006
28233
|
}
|
|
@@ -27011,7 +28238,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
27011
28238
|
transforms: transforms.current
|
|
27012
28239
|
});
|
|
27013
28240
|
}, []);
|
|
27014
|
-
const onRight =
|
|
28241
|
+
const onRight = useCallback36(() => {
|
|
27015
28242
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
27016
28243
|
return;
|
|
27017
28244
|
}
|
|
@@ -27022,7 +28249,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
27022
28249
|
transforms: transforms.current
|
|
27023
28250
|
});
|
|
27024
28251
|
}, []);
|
|
27025
|
-
|
|
28252
|
+
useEffect46(() => {
|
|
27026
28253
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
27027
28254
|
return;
|
|
27028
28255
|
}
|
|
@@ -27039,7 +28266,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
27039
28266
|
onRight
|
|
27040
28267
|
};
|
|
27041
28268
|
}, [onLeft, onRight]);
|
|
27042
|
-
|
|
28269
|
+
useEffect46(() => {
|
|
27043
28270
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
27044
28271
|
return;
|
|
27045
28272
|
}
|
|
@@ -27083,7 +28310,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
27083
28310
|
children: /* @__PURE__ */ jsx67(DisplayedEmoji, {
|
|
27084
28311
|
emoji: emojiIndex
|
|
27085
28312
|
})
|
|
27086
|
-
}) : /* @__PURE__ */ jsxs18(
|
|
28313
|
+
}) : /* @__PURE__ */ jsxs18(Fragment10, {
|
|
27087
28314
|
children: [
|
|
27088
28315
|
/* @__PURE__ */ jsx67("div", {
|
|
27089
28316
|
ref: ref1,
|
|
@@ -27112,7 +28339,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
27112
28339
|
]
|
|
27113
28340
|
});
|
|
27114
28341
|
};
|
|
27115
|
-
var EmojiCard =
|
|
28342
|
+
var EmojiCard = forwardRef33(EmojiCardRefFn);
|
|
27116
28343
|
|
|
27117
28344
|
// src/components/homepage/Demo/Temperature.tsx
|
|
27118
28345
|
init_esm();
|
|
@@ -27336,7 +28563,7 @@ var Temperature = ({ theme, city, temperatureInCelsius }) => {
|
|
|
27336
28563
|
|
|
27337
28564
|
// src/components/homepage/Demo/TrendingRepos.tsx
|
|
27338
28565
|
init_esm();
|
|
27339
|
-
import { useMemo as
|
|
28566
|
+
import { useMemo as useMemo51 } from "react";
|
|
27340
28567
|
import { jsx as jsx75, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
27341
28568
|
var TrendingRepoItem = ({ repo, theme, number }) => {
|
|
27342
28569
|
const frame = useCurrentFrame();
|
|
@@ -27349,7 +28576,7 @@ var TrendingRepoItem = ({ repo, theme, number }) => {
|
|
|
27349
28576
|
},
|
|
27350
28577
|
delay: number * 10 + 20
|
|
27351
28578
|
});
|
|
27352
|
-
const item =
|
|
28579
|
+
const item = useMemo51(() => {
|
|
27353
28580
|
return {
|
|
27354
28581
|
lineHeight: 1.1,
|
|
27355
28582
|
fontFamily: "GTPlanar",
|
|
@@ -27452,16 +28679,16 @@ var Cards = ({
|
|
|
27452
28679
|
location,
|
|
27453
28680
|
trending
|
|
27454
28681
|
}) => {
|
|
27455
|
-
const container4 =
|
|
27456
|
-
const [refs] =
|
|
28682
|
+
const container4 = useRef46(null);
|
|
28683
|
+
const [refs] = useState43(() => {
|
|
27457
28684
|
return new Array(4).fill(true).map(() => {
|
|
27458
28685
|
return createRef4();
|
|
27459
28686
|
});
|
|
27460
28687
|
});
|
|
27461
|
-
const positions =
|
|
27462
|
-
const shouldBePositions =
|
|
28688
|
+
const positions = useRef46(getInitialPositions());
|
|
28689
|
+
const shouldBePositions = useRef46(getInitialPositions());
|
|
27463
28690
|
const { isRendering } = useRemotionEnvironment();
|
|
27464
|
-
|
|
28691
|
+
useEffect47(() => {
|
|
27465
28692
|
const { current } = container4;
|
|
27466
28693
|
if (!current) {
|
|
27467
28694
|
return;
|
|
@@ -27477,12 +28704,12 @@ var Cards = ({
|
|
|
27477
28704
|
current.removeEventListener("click", onClick);
|
|
27478
28705
|
};
|
|
27479
28706
|
}, [onToggle]);
|
|
27480
|
-
const ref =
|
|
27481
|
-
const onLeft =
|
|
28707
|
+
const ref = useRef46(null);
|
|
28708
|
+
const onLeft = useCallback37(() => {
|
|
27482
28709
|
ref.current?.onRight();
|
|
27483
28710
|
onRightPress();
|
|
27484
28711
|
}, [onRightPress]);
|
|
27485
|
-
const onRight =
|
|
28712
|
+
const onRight = useCallback37(() => {
|
|
27486
28713
|
ref.current?.onLeft();
|
|
27487
28714
|
onLeftPress();
|
|
27488
28715
|
}, [onLeftPress]);
|
|
@@ -27551,12 +28778,12 @@ var HomepageVideoComp = ({
|
|
|
27551
28778
|
onClickLeft,
|
|
27552
28779
|
onClickRight
|
|
27553
28780
|
}) => {
|
|
27554
|
-
const [rerenders, setRerenders] =
|
|
27555
|
-
const onUpdate =
|
|
28781
|
+
const [rerenders, setRerenders] = useState45(0);
|
|
28782
|
+
const onUpdate = useCallback38((newIndices) => {
|
|
27556
28783
|
setRerenders(rerenders + 1);
|
|
27557
28784
|
updateCardOrder(newIndices);
|
|
27558
28785
|
}, [rerenders, updateCardOrder]);
|
|
27559
|
-
const emoji =
|
|
28786
|
+
const emoji = useMemo53(() => {
|
|
27560
28787
|
if ((emojiIndex + 1e4 * 3) % 3 === 1) {
|
|
27561
28788
|
return "melting";
|
|
27562
28789
|
}
|
|
@@ -27565,7 +28792,7 @@ var HomepageVideoComp = ({
|
|
|
27565
28792
|
}
|
|
27566
28793
|
return "partying-face";
|
|
27567
28794
|
}, [emojiIndex]);
|
|
27568
|
-
const audioSrc =
|
|
28795
|
+
const audioSrc = useMemo53(() => {
|
|
27569
28796
|
if (emoji === "fire") {
|
|
27570
28797
|
return fireAudio;
|
|
27571
28798
|
}
|
|
@@ -27574,7 +28801,7 @@ var HomepageVideoComp = ({
|
|
|
27574
28801
|
}
|
|
27575
28802
|
return sadAudio;
|
|
27576
28803
|
}, [emoji]);
|
|
27577
|
-
|
|
28804
|
+
useEffect48(() => {
|
|
27578
28805
|
const a = prefetch(fireAudio);
|
|
27579
28806
|
const b = prefetch(partyHornAudio);
|
|
27580
28807
|
const c = prefetch(sadAudio);
|
|
@@ -27622,7 +28849,7 @@ var DemoError = () => {
|
|
|
27622
28849
|
};
|
|
27623
28850
|
|
|
27624
28851
|
// src/components/homepage/Demo/DemoRender.tsx
|
|
27625
|
-
import
|
|
28852
|
+
import React67, { useCallback as useCallback39 } from "react";
|
|
27626
28853
|
import { z } from "zod";
|
|
27627
28854
|
|
|
27628
28855
|
// src/components/homepage/Demo/DemoErrorIcon.tsx
|
|
@@ -27728,21 +28955,21 @@ var Progress = ({ progress }) => {
|
|
|
27728
28955
|
};
|
|
27729
28956
|
|
|
27730
28957
|
// src/components/homepage/Demo/Spinner.tsx
|
|
27731
|
-
import { useMemo as
|
|
27732
|
-
import { jsx as jsx87, jsxs as jsxs30, Fragment as
|
|
28958
|
+
import { useMemo as useMemo55 } from "react";
|
|
28959
|
+
import { jsx as jsx87, jsxs as jsxs30, Fragment as Fragment11 } from "react/jsx-runtime";
|
|
27733
28960
|
var viewBox2 = 100;
|
|
27734
28961
|
var lines2 = 8;
|
|
27735
28962
|
var className2 = "__remotion_spinner_line";
|
|
27736
28963
|
var remotionSpinnerAnimation = "__remotion_spinner_animation";
|
|
27737
28964
|
var translated3 = "M 44 0 L 50 0 a 6 6 0 0 1 6 6 L 56 26 a 6 6 0 0 1 -6 6 L 50 32 a 6 6 0 0 1 -6 -6 L 44 6 a 6 6 0 0 1 6 -6 Z";
|
|
27738
28965
|
var Spinner2 = ({ size: size4, duration }) => {
|
|
27739
|
-
const style2 =
|
|
28966
|
+
const style2 = useMemo55(() => {
|
|
27740
28967
|
return {
|
|
27741
28968
|
width: size4,
|
|
27742
28969
|
height: size4
|
|
27743
28970
|
};
|
|
27744
28971
|
}, [size4]);
|
|
27745
|
-
return /* @__PURE__ */ jsxs30(
|
|
28972
|
+
return /* @__PURE__ */ jsxs30(Fragment11, {
|
|
27746
28973
|
children: [
|
|
27747
28974
|
/* @__PURE__ */ jsx87("style", {
|
|
27748
28975
|
type: "text/css",
|
|
@@ -27820,10 +29047,10 @@ var style2 = {
|
|
|
27820
29047
|
justifyContent: "center"
|
|
27821
29048
|
};
|
|
27822
29049
|
var RenderButton = ({ renderData, onError }) => {
|
|
27823
|
-
const [state, setState] =
|
|
29050
|
+
const [state, setState] = React67.useState({
|
|
27824
29051
|
type: "idle"
|
|
27825
29052
|
});
|
|
27826
|
-
const triggerRender =
|
|
29053
|
+
const triggerRender = useCallback39(async () => {
|
|
27827
29054
|
if (renderData === null) {
|
|
27828
29055
|
return;
|
|
27829
29056
|
}
|
|
@@ -28000,13 +29227,13 @@ var DragAndDropNudge = () => {
|
|
|
28000
29227
|
|
|
28001
29228
|
// src/components/homepage/Demo/PlayerSeekBar.tsx
|
|
28002
29229
|
init_esm();
|
|
28003
|
-
import { useCallback as
|
|
29230
|
+
import { useCallback as useCallback41, useEffect as useEffect50, useMemo as useMemo57, useRef as useRef47, useState as useState47 } from "react";
|
|
28004
29231
|
|
|
28005
29232
|
// src/components/homepage/layout/use-el-size.ts
|
|
28006
|
-
import { useCallback as
|
|
29233
|
+
import { useCallback as useCallback40, useEffect as useEffect49, useMemo as useMemo56, useState as useState46 } from "react";
|
|
28007
29234
|
var useElementSize2 = (ref) => {
|
|
28008
|
-
const [size4, setSize] =
|
|
28009
|
-
const observer =
|
|
29235
|
+
const [size4, setSize] = useState46(null);
|
|
29236
|
+
const observer = useMemo56(() => {
|
|
28010
29237
|
if (typeof ResizeObserver === "undefined") {
|
|
28011
29238
|
return;
|
|
28012
29239
|
}
|
|
@@ -28017,7 +29244,7 @@ var useElementSize2 = (ref) => {
|
|
|
28017
29244
|
});
|
|
28018
29245
|
});
|
|
28019
29246
|
}, []);
|
|
28020
|
-
const updateSize =
|
|
29247
|
+
const updateSize = useCallback40(() => {
|
|
28021
29248
|
if (ref === null) {
|
|
28022
29249
|
return;
|
|
28023
29250
|
}
|
|
@@ -28027,7 +29254,7 @@ var useElementSize2 = (ref) => {
|
|
|
28027
29254
|
height: rect[0].height
|
|
28028
29255
|
});
|
|
28029
29256
|
}, [ref]);
|
|
28030
|
-
|
|
29257
|
+
useEffect49(() => {
|
|
28031
29258
|
updateSize();
|
|
28032
29259
|
if (!observer) {
|
|
28033
29260
|
return;
|
|
@@ -28082,8 +29309,8 @@ var findBodyInWhichDivIsLocated2 = (div) => {
|
|
|
28082
29309
|
return current;
|
|
28083
29310
|
};
|
|
28084
29311
|
var useHoverState2 = (ref, hideControlsWhenPointerDoesntMove) => {
|
|
28085
|
-
const [hovered, setHovered] =
|
|
28086
|
-
|
|
29312
|
+
const [hovered, setHovered] = useState47(false);
|
|
29313
|
+
useEffect50(() => {
|
|
28087
29314
|
const { current } = ref;
|
|
28088
29315
|
if (!current) {
|
|
28089
29316
|
return;
|
|
@@ -28129,12 +29356,12 @@ var PlayerSeekBar2 = ({
|
|
|
28129
29356
|
outFrame,
|
|
28130
29357
|
playerRef
|
|
28131
29358
|
}) => {
|
|
28132
|
-
const containerRef =
|
|
29359
|
+
const containerRef = useRef47(null);
|
|
28133
29360
|
const barHovered = useHoverState2(containerRef, false);
|
|
28134
29361
|
const size4 = useElementSize2(containerRef.current);
|
|
28135
|
-
const [playing, setPlaying] =
|
|
28136
|
-
const [frame, setFrame] =
|
|
28137
|
-
|
|
29362
|
+
const [playing, setPlaying] = useState47(false);
|
|
29363
|
+
const [frame, setFrame] = useState47(0);
|
|
29364
|
+
useEffect50(() => {
|
|
28138
29365
|
const { current } = playerRef;
|
|
28139
29366
|
if (!current) {
|
|
28140
29367
|
return;
|
|
@@ -28147,7 +29374,7 @@ var PlayerSeekBar2 = ({
|
|
|
28147
29374
|
current.removeEventListener("frameupdate", onFrameUpdate);
|
|
28148
29375
|
};
|
|
28149
29376
|
}, [playerRef]);
|
|
28150
|
-
|
|
29377
|
+
useEffect50(() => {
|
|
28151
29378
|
const { current } = playerRef;
|
|
28152
29379
|
if (!current) {
|
|
28153
29380
|
return;
|
|
@@ -28165,11 +29392,11 @@ var PlayerSeekBar2 = ({
|
|
|
28165
29392
|
current.removeEventListener("pause", onPause);
|
|
28166
29393
|
};
|
|
28167
29394
|
}, [playerRef]);
|
|
28168
|
-
const [dragging, setDragging] =
|
|
29395
|
+
const [dragging, setDragging] = useState47({
|
|
28169
29396
|
dragging: false
|
|
28170
29397
|
});
|
|
28171
29398
|
const width2 = size4?.width ?? 0;
|
|
28172
|
-
const onPointerDown =
|
|
29399
|
+
const onPointerDown = useCallback41((e) => {
|
|
28173
29400
|
if (e.button !== 0) {
|
|
28174
29401
|
return;
|
|
28175
29402
|
}
|
|
@@ -28183,7 +29410,7 @@ var PlayerSeekBar2 = ({
|
|
|
28183
29410
|
});
|
|
28184
29411
|
onSeekStart();
|
|
28185
29412
|
}, [durationInFrames, width2, playerRef, playing, onSeekStart]);
|
|
28186
|
-
const onPointerMove =
|
|
29413
|
+
const onPointerMove = useCallback41((e) => {
|
|
28187
29414
|
if (!size4) {
|
|
28188
29415
|
throw new Error("Player has no size");
|
|
28189
29416
|
}
|
|
@@ -28194,7 +29421,7 @@ var PlayerSeekBar2 = ({
|
|
|
28194
29421
|
const _frame = getFrameFromX2(e.clientX - posLeft, durationInFrames, size4.width);
|
|
28195
29422
|
playerRef.current.seekTo(_frame);
|
|
28196
29423
|
}, [dragging.dragging, durationInFrames, playerRef, size4]);
|
|
28197
|
-
const onPointerUp =
|
|
29424
|
+
const onPointerUp = useCallback41(() => {
|
|
28198
29425
|
setDragging({
|
|
28199
29426
|
dragging: false
|
|
28200
29427
|
});
|
|
@@ -28208,7 +29435,7 @@ var PlayerSeekBar2 = ({
|
|
|
28208
29435
|
}
|
|
28209
29436
|
onSeekEnd();
|
|
28210
29437
|
}, [dragging, onSeekEnd, playerRef]);
|
|
28211
|
-
|
|
29438
|
+
useEffect50(() => {
|
|
28212
29439
|
if (!dragging.dragging) {
|
|
28213
29440
|
return;
|
|
28214
29441
|
}
|
|
@@ -28220,7 +29447,7 @@ var PlayerSeekBar2 = ({
|
|
|
28220
29447
|
body.removeEventListener("pointerup", onPointerUp);
|
|
28221
29448
|
};
|
|
28222
29449
|
}, [dragging.dragging, onPointerMove, onPointerUp]);
|
|
28223
|
-
const knobStyle =
|
|
29450
|
+
const knobStyle = useMemo57(() => {
|
|
28224
29451
|
return {
|
|
28225
29452
|
height: KNOB_SIZE3,
|
|
28226
29453
|
width: KNOB_SIZE3,
|
|
@@ -28234,7 +29461,7 @@ var PlayerSeekBar2 = ({
|
|
|
28234
29461
|
transition: "opacity 0.s ease"
|
|
28235
29462
|
};
|
|
28236
29463
|
}, [barHovered, durationInFrames, frame, width2]);
|
|
28237
|
-
const fillStyle =
|
|
29464
|
+
const fillStyle = useMemo57(() => {
|
|
28238
29465
|
return {
|
|
28239
29466
|
height: BAR_HEIGHT3,
|
|
28240
29467
|
backgroundColor: "var(--ifm-font-color-base)",
|
|
@@ -28243,7 +29470,7 @@ var PlayerSeekBar2 = ({
|
|
|
28243
29470
|
borderRadius: BAR_HEIGHT3 / 2
|
|
28244
29471
|
};
|
|
28245
29472
|
}, [durationInFrames, frame, inFrame]);
|
|
28246
|
-
const active =
|
|
29473
|
+
const active = useMemo57(() => {
|
|
28247
29474
|
return {
|
|
28248
29475
|
height: BAR_HEIGHT3,
|
|
28249
29476
|
backgroundColor: "var(--ifm-font-color-base)",
|
|
@@ -28278,7 +29505,7 @@ var PlayerSeekBar2 = ({
|
|
|
28278
29505
|
};
|
|
28279
29506
|
|
|
28280
29507
|
// src/components/homepage/Demo/PlayerVolume.tsx
|
|
28281
|
-
import { useCallback as
|
|
29508
|
+
import { useCallback as useCallback43, useEffect as useEffect51, useRef as useRef48, useState as useState48 } from "react";
|
|
28282
29509
|
|
|
28283
29510
|
// src/components/homepage/Demo/icons.tsx
|
|
28284
29511
|
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
@@ -28336,10 +29563,10 @@ var IsMutedIcon = (props) => {
|
|
|
28336
29563
|
// src/components/homepage/Demo/PlayerVolume.tsx
|
|
28337
29564
|
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
28338
29565
|
var PlayerVolume = ({ playerRef }) => {
|
|
28339
|
-
const [muted, setIsMuted] =
|
|
28340
|
-
const [isHovered, setIsHovered] =
|
|
28341
|
-
const timerRef =
|
|
28342
|
-
|
|
29566
|
+
const [muted, setIsMuted] = useState48(() => playerRef.current?.isMuted() ?? true);
|
|
29567
|
+
const [isHovered, setIsHovered] = useState48(false);
|
|
29568
|
+
const timerRef = useRef48(null);
|
|
29569
|
+
useEffect51(() => {
|
|
28343
29570
|
const { current } = playerRef;
|
|
28344
29571
|
if (!current) {
|
|
28345
29572
|
return;
|
|
@@ -28352,14 +29579,14 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
28352
29579
|
current.removeEventListener("mutechange", onMutedChange);
|
|
28353
29580
|
};
|
|
28354
29581
|
}, [playerRef]);
|
|
28355
|
-
|
|
29582
|
+
useEffect51(() => {
|
|
28356
29583
|
if (isHovered) {
|
|
28357
29584
|
document.body.style.userSelect = "none";
|
|
28358
29585
|
} else {
|
|
28359
29586
|
document.body.style.userSelect = "auto";
|
|
28360
29587
|
}
|
|
28361
29588
|
}, [isHovered]);
|
|
28362
|
-
const onClick =
|
|
29589
|
+
const onClick = useCallback43(() => {
|
|
28363
29590
|
if (timerRef.current !== null) {
|
|
28364
29591
|
clearTimeout(timerRef.current);
|
|
28365
29592
|
timerRef.current = null;
|
|
@@ -28397,7 +29624,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
28397
29624
|
};
|
|
28398
29625
|
|
|
28399
29626
|
// src/components/homepage/Demo/PlayPauseButton.tsx
|
|
28400
|
-
import
|
|
29627
|
+
import React70, { useCallback as useCallback45, useEffect as useEffect53 } from "react";
|
|
28401
29628
|
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
28402
29629
|
var playerButtonStyle2 = {
|
|
28403
29630
|
appearance: "none",
|
|
@@ -28414,8 +29641,8 @@ var playerButtonStyle2 = {
|
|
|
28414
29641
|
color: PALETTE.TEXT_COLOR
|
|
28415
29642
|
};
|
|
28416
29643
|
var PlayPauseButton = ({ playerRef }) => {
|
|
28417
|
-
const [playing, setPlaying] =
|
|
28418
|
-
|
|
29644
|
+
const [playing, setPlaying] = React70.useState(true);
|
|
29645
|
+
useEffect53(() => {
|
|
28419
29646
|
const { current } = playerRef;
|
|
28420
29647
|
if (!current) {
|
|
28421
29648
|
return;
|
|
@@ -28433,7 +29660,7 @@ var PlayPauseButton = ({ playerRef }) => {
|
|
|
28433
29660
|
current.removeEventListener("pause", onPause);
|
|
28434
29661
|
};
|
|
28435
29662
|
}, [playerRef]);
|
|
28436
|
-
const onToggle =
|
|
29663
|
+
const onToggle = useCallback45(() => {
|
|
28437
29664
|
playerRef.current?.toggle();
|
|
28438
29665
|
}, [playerRef]);
|
|
28439
29666
|
const playPauseIconStyle = {
|
|
@@ -28452,7 +29679,7 @@ var PlayPauseButton = ({ playerRef }) => {
|
|
|
28452
29679
|
};
|
|
28453
29680
|
|
|
28454
29681
|
// src/components/homepage/Demo/TimeDisplay.tsx
|
|
28455
|
-
import
|
|
29682
|
+
import React71, { useEffect as useEffect55 } from "react";
|
|
28456
29683
|
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
28457
29684
|
var formatTime2 = (timeInSeconds) => {
|
|
28458
29685
|
const minutes = Math.floor(timeInSeconds / 60);
|
|
@@ -28460,8 +29687,8 @@ var formatTime2 = (timeInSeconds) => {
|
|
|
28460
29687
|
return `${String(minutes)}:${String(seconds).padStart(2, "0")}`;
|
|
28461
29688
|
};
|
|
28462
29689
|
var TimeDisplay = ({ fps, playerRef }) => {
|
|
28463
|
-
const [time, setTime] =
|
|
28464
|
-
|
|
29690
|
+
const [time, setTime] = React71.useState(0);
|
|
29691
|
+
useEffect55(() => {
|
|
28465
29692
|
const { current } = playerRef;
|
|
28466
29693
|
if (!current) {
|
|
28467
29694
|
return;
|
|
@@ -28539,7 +29766,7 @@ var PlayerControls = ({ playerRef, durationInFrames, fps, children }) => {
|
|
|
28539
29766
|
};
|
|
28540
29767
|
|
|
28541
29768
|
// src/components/homepage/Demo/ThemeNudge.tsx
|
|
28542
|
-
import
|
|
29769
|
+
import React73 from "react";
|
|
28543
29770
|
import { jsx as jsx101, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
28544
29771
|
var origWidth3 = 21;
|
|
28545
29772
|
var scale3 = 0.4;
|
|
@@ -28561,7 +29788,7 @@ var Icon6 = () => {
|
|
|
28561
29788
|
};
|
|
28562
29789
|
var ThemeNudge = () => {
|
|
28563
29790
|
const { colorMode, setColorMode } = useColorMode();
|
|
28564
|
-
const toggleTheme =
|
|
29791
|
+
const toggleTheme = React73.useCallback((e) => {
|
|
28565
29792
|
e.preventDefault();
|
|
28566
29793
|
setColorMode(colorMode === "dark" ? "light" : "dark");
|
|
28567
29794
|
}, [colorMode, setColorMode]);
|
|
@@ -28626,13 +29853,13 @@ var playerWrapper = {
|
|
|
28626
29853
|
};
|
|
28627
29854
|
var Demo = () => {
|
|
28628
29855
|
const { colorMode } = useColorMode();
|
|
28629
|
-
const [data2, setData] =
|
|
28630
|
-
const ref =
|
|
28631
|
-
const [isFullscreen, setIsFullscreen] =
|
|
28632
|
-
const [cardOrder, setCardOrder] =
|
|
28633
|
-
const [emojiIndex, setEmojiIndex] =
|
|
28634
|
-
const [error2, setError] =
|
|
28635
|
-
|
|
29856
|
+
const [data2, setData] = useState49(null);
|
|
29857
|
+
const ref = useRef49(null);
|
|
29858
|
+
const [isFullscreen, setIsFullscreen] = useState49(false);
|
|
29859
|
+
const [cardOrder, setCardOrder] = useState49([0, 1, 2, 3]);
|
|
29860
|
+
const [emojiIndex, setEmojiIndex] = useState49(0);
|
|
29861
|
+
const [error2, setError] = useState49(false);
|
|
29862
|
+
useEffect56(() => {
|
|
28636
29863
|
getDataAndProps().then((d2) => {
|
|
28637
29864
|
setData(d2);
|
|
28638
29865
|
}).catch((err) => {
|
|
@@ -28640,7 +29867,7 @@ var Demo = () => {
|
|
|
28640
29867
|
setError(true);
|
|
28641
29868
|
});
|
|
28642
29869
|
}, []);
|
|
28643
|
-
|
|
29870
|
+
useEffect56(() => {
|
|
28644
29871
|
const { current: playerRef } = ref;
|
|
28645
29872
|
if (!playerRef || !data2) {
|
|
28646
29873
|
return;
|
|
@@ -28653,10 +29880,10 @@ var Demo = () => {
|
|
|
28653
29880
|
playerRef.removeEventListener("fullscreenchange", onFullscreenChange);
|
|
28654
29881
|
};
|
|
28655
29882
|
}, [data2]);
|
|
28656
|
-
const updateCardOrder =
|
|
29883
|
+
const updateCardOrder = useCallback46((newCardOrder) => {
|
|
28657
29884
|
setCardOrder(newCardOrder);
|
|
28658
29885
|
}, []);
|
|
28659
|
-
const props =
|
|
29886
|
+
const props = useMemo58(() => {
|
|
28660
29887
|
return {
|
|
28661
29888
|
theme: colorMode,
|
|
28662
29889
|
onToggle: () => {
|
|
@@ -28675,7 +29902,7 @@ var Demo = () => {
|
|
|
28675
29902
|
emojiIndex
|
|
28676
29903
|
};
|
|
28677
29904
|
}, [cardOrder, emojiIndex, colorMode, data2, updateCardOrder]);
|
|
28678
|
-
const onError =
|
|
29905
|
+
const onError = useCallback46(() => {
|
|
28679
29906
|
setError(true);
|
|
28680
29907
|
}, []);
|
|
28681
29908
|
return /* @__PURE__ */ jsxs39("div", {
|
|
@@ -28784,16 +30011,16 @@ var ClearButton = (props) => {
|
|
|
28784
30011
|
|
|
28785
30012
|
// src/components/homepage/MuxVideo.tsx
|
|
28786
30013
|
import Hls2 from "hls.js";
|
|
28787
|
-
import { forwardRef as
|
|
30014
|
+
import { forwardRef as forwardRef36, useEffect as useEffect58, useImperativeHandle as useImperativeHandle15, useRef as useRef51 } from "react";
|
|
28788
30015
|
|
|
28789
30016
|
// src/components/homepage/VideoPlayerWithControls.tsx
|
|
28790
30017
|
import Hls from "hls.js";
|
|
28791
30018
|
import"plyr/dist/plyr.css";
|
|
28792
|
-
import { forwardRef as
|
|
30019
|
+
import { forwardRef as forwardRef35, useCallback as useCallback47, useEffect as useEffect57, useRef as useRef50, useState as useState50 } from "react";
|
|
28793
30020
|
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
28794
30021
|
var useCombinedRefs = function(...refs) {
|
|
28795
|
-
const targetRef =
|
|
28796
|
-
|
|
30022
|
+
const targetRef = useRef50(null);
|
|
30023
|
+
useEffect57(() => {
|
|
28797
30024
|
refs.forEach((ref) => {
|
|
28798
30025
|
if (!ref)
|
|
28799
30026
|
return;
|
|
@@ -28806,13 +30033,13 @@ var useCombinedRefs = function(...refs) {
|
|
|
28806
30033
|
}, [refs]);
|
|
28807
30034
|
return targetRef;
|
|
28808
30035
|
};
|
|
28809
|
-
var VideoPlayerWithControls =
|
|
28810
|
-
const videoRef =
|
|
30036
|
+
var VideoPlayerWithControls = forwardRef35(({ playbackId, poster, currentTime, onLoaded, onError, onSize, autoPlay }, ref) => {
|
|
30037
|
+
const videoRef = useRef50(null);
|
|
28811
30038
|
const metaRef = useCombinedRefs(ref, videoRef);
|
|
28812
|
-
const playerRef =
|
|
28813
|
-
const [playerInitTime] =
|
|
28814
|
-
const videoError =
|
|
28815
|
-
const onImageLoad =
|
|
30039
|
+
const playerRef = useRef50(null);
|
|
30040
|
+
const [playerInitTime] = useState50(Date.now());
|
|
30041
|
+
const videoError = useCallback47((event) => onError(event), [onError]);
|
|
30042
|
+
const onImageLoad = useCallback47((event) => {
|
|
28816
30043
|
const [w, h] = [event.target.width, event.target.height];
|
|
28817
30044
|
if (w && h) {
|
|
28818
30045
|
onSize({ width: w, height: h });
|
|
@@ -28822,12 +30049,12 @@ var VideoPlayerWithControls = forwardRef30(({ playbackId, poster, currentTime, o
|
|
|
28822
30049
|
console.error("Error getting img dimensions", event);
|
|
28823
30050
|
}
|
|
28824
30051
|
}, [onLoaded, onSize]);
|
|
28825
|
-
|
|
30052
|
+
useEffect57(() => {
|
|
28826
30053
|
const img = new Image;
|
|
28827
30054
|
img.onload = (evt) => onImageLoad(evt);
|
|
28828
30055
|
img.src = poster;
|
|
28829
30056
|
}, [onImageLoad, poster]);
|
|
28830
|
-
|
|
30057
|
+
useEffect57(() => {
|
|
28831
30058
|
const video = videoRef.current;
|
|
28832
30059
|
const src = `https://stream.mux.com/${playbackId}.m3u8`;
|
|
28833
30060
|
let hls;
|
|
@@ -28870,7 +30097,7 @@ var VideoPlayerWithControls = forwardRef30(({ playbackId, poster, currentTime, o
|
|
|
28870
30097
|
}
|
|
28871
30098
|
};
|
|
28872
30099
|
}, [playbackId, playerInitTime, videoError, videoRef]);
|
|
28873
|
-
|
|
30100
|
+
useEffect57(() => {
|
|
28874
30101
|
const video = videoRef.current;
|
|
28875
30102
|
if (currentTime && video) {
|
|
28876
30103
|
video.currentTime = currentTime;
|
|
@@ -28894,10 +30121,10 @@ var getVideoToPlayUrl = (muxId) => {
|
|
|
28894
30121
|
return `https://stream.mux.com/${muxId}.m3u8`;
|
|
28895
30122
|
};
|
|
28896
30123
|
var MuxVideoForward = ({ muxId, ...props }, ref) => {
|
|
28897
|
-
const videoRef =
|
|
30124
|
+
const videoRef = useRef51(null);
|
|
28898
30125
|
const vidUrl = getVideoToPlayUrl(muxId);
|
|
28899
30126
|
useImperativeHandle15(ref, () => videoRef.current, []);
|
|
28900
|
-
|
|
30127
|
+
useEffect58(() => {
|
|
28901
30128
|
let hls;
|
|
28902
30129
|
if (videoRef.current) {
|
|
28903
30130
|
const { current } = videoRef;
|
|
@@ -28922,7 +30149,7 @@ var MuxVideoForward = ({ muxId, ...props }, ref) => {
|
|
|
28922
30149
|
...props
|
|
28923
30150
|
});
|
|
28924
30151
|
};
|
|
28925
|
-
var MuxVideo =
|
|
30152
|
+
var MuxVideo = forwardRef36(MuxVideoForward);
|
|
28926
30153
|
|
|
28927
30154
|
// src/components/homepage/EditorStarterSection.tsx
|
|
28928
30155
|
import { jsx as jsx109, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
@@ -29010,11 +30237,11 @@ var EditorStarterSection = () => {
|
|
|
29010
30237
|
var EditorStarterSection_default = EditorStarterSection;
|
|
29011
30238
|
|
|
29012
30239
|
// src/components/homepage/EvaluateRemotion.tsx
|
|
29013
|
-
import { useEffect as
|
|
30240
|
+
import { useEffect as useEffect59, useState as useState51 } from "react";
|
|
29014
30241
|
import { jsx as jsx110, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
29015
30242
|
var EvaluateRemotionSection = () => {
|
|
29016
|
-
const [dailyAvatars, setDailyAvatars] =
|
|
29017
|
-
|
|
30243
|
+
const [dailyAvatars, setDailyAvatars] = useState51([]);
|
|
30244
|
+
useEffect59(() => {
|
|
29018
30245
|
const avatars = experts.map((expert) => expert.image);
|
|
29019
30246
|
const selectedAvatars = [];
|
|
29020
30247
|
for (let i = 0;i < 3; i++) {
|
|
@@ -29096,7 +30323,7 @@ var EvaluateRemotionSection = () => {
|
|
|
29096
30323
|
var EvaluateRemotion_default = EvaluateRemotionSection;
|
|
29097
30324
|
|
|
29098
30325
|
// src/components/homepage/IfYouKnowReact.tsx
|
|
29099
|
-
import { useEffect as
|
|
30326
|
+
import { useEffect as useEffect60, useState as useState53 } from "react";
|
|
29100
30327
|
import { jsx as jsx111, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
29101
30328
|
var isWebkit = () => {
|
|
29102
30329
|
if (typeof window === "undefined") {
|
|
@@ -29111,8 +30338,8 @@ var icon2 = {
|
|
|
29111
30338
|
marginLeft: 10
|
|
29112
30339
|
};
|
|
29113
30340
|
var IfYouKnowReact = () => {
|
|
29114
|
-
const [vid, setVid] =
|
|
29115
|
-
|
|
30341
|
+
const [vid, setVid] = useState53("/img/compose.webm");
|
|
30342
|
+
useEffect60(() => {
|
|
29116
30343
|
if (isWebkit()) {
|
|
29117
30344
|
setVid("/img/compose.mp4");
|
|
29118
30345
|
}
|
|
@@ -29171,13 +30398,13 @@ var IfYouKnowReact = () => {
|
|
|
29171
30398
|
};
|
|
29172
30399
|
|
|
29173
30400
|
// src/components/homepage/NewsletterButton.tsx
|
|
29174
|
-
import { useCallback as
|
|
30401
|
+
import { useCallback as useCallback48, useState as useState55 } from "react";
|
|
29175
30402
|
import { jsx as jsx114, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
29176
30403
|
var NewsletterButton = () => {
|
|
29177
|
-
const [email, setEmail] =
|
|
29178
|
-
const [submitting, setSubmitting] =
|
|
29179
|
-
const [subscribed, setSubscribed] =
|
|
29180
|
-
const handleSubmit =
|
|
30404
|
+
const [email, setEmail] = useState55("");
|
|
30405
|
+
const [submitting, setSubmitting] = useState55(false);
|
|
30406
|
+
const [subscribed, setSubscribed] = useState55(false);
|
|
30407
|
+
const handleSubmit = useCallback48(async (e) => {
|
|
29181
30408
|
try {
|
|
29182
30409
|
setSubmitting(true);
|
|
29183
30410
|
e.preventDefault();
|
|
@@ -29259,16 +30486,16 @@ var NewsletterButton = () => {
|
|
|
29259
30486
|
};
|
|
29260
30487
|
|
|
29261
30488
|
// src/components/homepage/ParameterizeAndEdit.tsx
|
|
29262
|
-
import { useEffect as
|
|
30489
|
+
import { useEffect as useEffect61, useRef as useRef53, useState as useState56 } from "react";
|
|
29263
30490
|
import { jsx as jsx116, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
29264
30491
|
var icon3 = {
|
|
29265
30492
|
height: 16,
|
|
29266
30493
|
marginLeft: 10
|
|
29267
30494
|
};
|
|
29268
30495
|
var ParameterizeAndEdit = () => {
|
|
29269
|
-
const ref =
|
|
29270
|
-
const [vid, setVid] =
|
|
29271
|
-
|
|
30496
|
+
const ref = useRef53(null);
|
|
30497
|
+
const [vid, setVid] = useState56("/img/editing-vp9-chrome.webm");
|
|
30498
|
+
useEffect61(() => {
|
|
29272
30499
|
if (isWebkit()) {
|
|
29273
30500
|
setVid("/img/editing-safari.mp4");
|
|
29274
30501
|
}
|
|
@@ -29382,22 +30609,22 @@ var ParameterizeAndEdit = () => {
|
|
|
29382
30609
|
};
|
|
29383
30610
|
|
|
29384
30611
|
// src/components/homepage/RealMp4Videos.tsx
|
|
29385
|
-
import { useEffect as
|
|
30612
|
+
import { useEffect as useEffect63, useRef as useRef55, useState as useState57 } from "react";
|
|
29386
30613
|
import { jsx as jsx117, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
29387
30614
|
var icon4 = {
|
|
29388
30615
|
height: 16,
|
|
29389
30616
|
marginLeft: 10
|
|
29390
30617
|
};
|
|
29391
30618
|
var RealMP4Videos = () => {
|
|
29392
|
-
const ref =
|
|
29393
|
-
const videoRef =
|
|
29394
|
-
const [vid, setVid] =
|
|
29395
|
-
|
|
30619
|
+
const ref = useRef55(null);
|
|
30620
|
+
const videoRef = useRef55(null);
|
|
30621
|
+
const [vid, setVid] = useState57("/img/render-progress.webm");
|
|
30622
|
+
useEffect63(() => {
|
|
29396
30623
|
if (isWebkit()) {
|
|
29397
30624
|
setVid("/img/render-progress.mp4");
|
|
29398
30625
|
}
|
|
29399
30626
|
}, []);
|
|
29400
|
-
|
|
30627
|
+
useEffect63(() => {
|
|
29401
30628
|
const { current } = ref;
|
|
29402
30629
|
if (!current) {
|
|
29403
30630
|
return;
|
|
@@ -29509,7 +30736,7 @@ var RealMP4Videos = () => {
|
|
|
29509
30736
|
};
|
|
29510
30737
|
|
|
29511
30738
|
// src/components/homepage/TrustedByBanner.tsx
|
|
29512
|
-
import { jsx as jsx118, jsxs as jsxs49, Fragment as
|
|
30739
|
+
import { jsx as jsx118, jsxs as jsxs49, Fragment as Fragment12 } from "react/jsx-runtime";
|
|
29513
30740
|
var TrustedByBanner = () => {
|
|
29514
30741
|
const logos = [
|
|
29515
30742
|
{
|
|
@@ -29622,7 +30849,7 @@ var TrustedByBanner = () => {
|
|
|
29622
30849
|
})
|
|
29623
30850
|
}
|
|
29624
30851
|
];
|
|
29625
|
-
return /* @__PURE__ */ jsxs49(
|
|
30852
|
+
return /* @__PURE__ */ jsxs49(Fragment12, {
|
|
29626
30853
|
children: [
|
|
29627
30854
|
/* @__PURE__ */ jsx118("h3", {
|
|
29628
30855
|
className: "text-center mt-20 mb-10",
|
|
@@ -29643,7 +30870,7 @@ var TrustedByBanner = () => {
|
|
|
29643
30870
|
var TrustedByBanner_default = TrustedByBanner;
|
|
29644
30871
|
|
|
29645
30872
|
// src/components/homepage/VideoAppsShowcase.tsx
|
|
29646
|
-
import { useEffect as
|
|
30873
|
+
import { useEffect as useEffect65, useRef as useRef56, useState as useState58 } from "react";
|
|
29647
30874
|
import { jsx as jsx119, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
29648
30875
|
var tabs = [
|
|
29649
30876
|
"Music visualization",
|
|
@@ -29696,12 +30923,12 @@ var icon5 = {
|
|
|
29696
30923
|
marginLeft: 10
|
|
29697
30924
|
};
|
|
29698
30925
|
var VideoAppsShowcase = () => {
|
|
29699
|
-
const [activeTab, setActiveTab] =
|
|
29700
|
-
const [isMuted, setIsMuted] =
|
|
29701
|
-
const [isPlaying, setIsPlaying] =
|
|
29702
|
-
const videoRef =
|
|
29703
|
-
const containerRef =
|
|
29704
|
-
|
|
30926
|
+
const [activeTab, setActiveTab] = useState58(0);
|
|
30927
|
+
const [isMuted, setIsMuted] = useState58(true);
|
|
30928
|
+
const [isPlaying, setIsPlaying] = useState58(false);
|
|
30929
|
+
const videoRef = useRef56(null);
|
|
30930
|
+
const containerRef = useRef56(null);
|
|
30931
|
+
useEffect65(() => {
|
|
29705
30932
|
const video = videoRef.current;
|
|
29706
30933
|
if (video) {
|
|
29707
30934
|
video.pause();
|
|
@@ -30104,8 +31331,8 @@ var FEATURED_TEMPLATES = [
|
|
|
30104
31331
|
description: "AI-powered code generation for Remotion",
|
|
30105
31332
|
longerDescription: 'A SaaS template for "Prompt to Motion Graphics" products. Generates Remotion code, streams it to the frontend, and compiles and previews it in the browser.',
|
|
30106
31333
|
promoBanner: {
|
|
30107
|
-
width:
|
|
30108
|
-
height:
|
|
31334
|
+
width: 1920,
|
|
31335
|
+
height: 1080,
|
|
30109
31336
|
src: "/img/prompt-to-motion-graphics.png"
|
|
30110
31337
|
},
|
|
30111
31338
|
cliId: "prompt-to-motion-graphics",
|
|
@@ -31142,7 +32369,7 @@ var ChooseTemplate = () => {
|
|
|
31142
32369
|
};
|
|
31143
32370
|
|
|
31144
32371
|
// src/components/homepage/GetStartedStrip.tsx
|
|
31145
|
-
import { useState as
|
|
32372
|
+
import { useState as useState59 } from "react";
|
|
31146
32373
|
|
|
31147
32374
|
// src/components/homepage/GitHubButton.tsx
|
|
31148
32375
|
import { jsx as jsx154, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
@@ -31177,7 +32404,7 @@ var GithubButton = () => {
|
|
|
31177
32404
|
// src/components/homepage/GetStartedStrip.tsx
|
|
31178
32405
|
import { jsx as jsx156, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
31179
32406
|
var GetStarted = () => {
|
|
31180
|
-
const [clicked, setClicked] =
|
|
32407
|
+
const [clicked, setClicked] = useState59(null);
|
|
31181
32408
|
return /* @__PURE__ */ jsxs67("div", {
|
|
31182
32409
|
className: "flex flex-col lg:flex-row items-center justify-center text-center w-full",
|
|
31183
32410
|
children: [
|