sodtrack-web-ui 0.2.0 → 0.2.2
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/index.css.map +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +42 -3355
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +46 -3354
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -33,7 +33,8 @@ __export(src_exports, {
|
|
|
33
33
|
Alert: () => Alert,
|
|
34
34
|
Button: () => Button,
|
|
35
35
|
IconButton: () => IconButton,
|
|
36
|
-
Tooltip: () => Tooltip
|
|
36
|
+
Tooltip: () => Tooltip,
|
|
37
|
+
TooltipProvider: () => TooltipProvider
|
|
37
38
|
});
|
|
38
39
|
module.exports = __toCommonJS(src_exports);
|
|
39
40
|
|
|
@@ -238,16 +239,16 @@ function createSplitModifiers(config) {
|
|
|
238
239
|
let bracketDepth = 0;
|
|
239
240
|
let modifierStart = 0;
|
|
240
241
|
let postfixModifierPosition;
|
|
241
|
-
for (let
|
|
242
|
-
let currentCharacter = className[
|
|
242
|
+
for (let index = 0; index < className.length; index++) {
|
|
243
|
+
let currentCharacter = className[index];
|
|
243
244
|
if (bracketDepth === 0) {
|
|
244
|
-
if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(
|
|
245
|
-
modifiers.push(className.slice(modifierStart,
|
|
246
|
-
modifierStart =
|
|
245
|
+
if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
|
|
246
|
+
modifiers.push(className.slice(modifierStart, index));
|
|
247
|
+
modifierStart = index + separatorLength;
|
|
247
248
|
continue;
|
|
248
249
|
}
|
|
249
250
|
if (currentCharacter === "/") {
|
|
250
|
-
postfixModifierPosition =
|
|
251
|
+
postfixModifierPosition = index;
|
|
251
252
|
continue;
|
|
252
253
|
}
|
|
253
254
|
}
|
|
@@ -355,12 +356,12 @@ function mergeClassList(classList, configUtils) {
|
|
|
355
356
|
}).reverse().map((parsed) => parsed.originalClassName).join(" ");
|
|
356
357
|
}
|
|
357
358
|
function twJoin() {
|
|
358
|
-
let
|
|
359
|
+
let index = 0;
|
|
359
360
|
let argument;
|
|
360
361
|
let resolvedValue;
|
|
361
362
|
let string = "";
|
|
362
|
-
while (
|
|
363
|
-
if (argument = arguments[
|
|
363
|
+
while (index < arguments.length) {
|
|
364
|
+
if (argument = arguments[index++]) {
|
|
364
365
|
if (resolvedValue = toValue(argument)) {
|
|
365
366
|
string && (string += " ");
|
|
366
367
|
string += resolvedValue;
|
|
@@ -2556,8 +2557,8 @@ var import_react2 = require("react");
|
|
|
2556
2557
|
|
|
2557
2558
|
// node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
2558
2559
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2559
|
-
var mergeClasses = (...classes) => classes.filter((className,
|
|
2560
|
-
return Boolean(className) && array.indexOf(className) ===
|
|
2560
|
+
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
2561
|
+
return Boolean(className) && array.indexOf(className) === index;
|
|
2561
2562
|
}).join(" ");
|
|
2562
2563
|
|
|
2563
2564
|
// node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
@@ -2580,7 +2581,7 @@ var defaultAttributes = {
|
|
|
2580
2581
|
var Icon = (0, import_react.forwardRef)(
|
|
2581
2582
|
({
|
|
2582
2583
|
color = "currentColor",
|
|
2583
|
-
size
|
|
2584
|
+
size = 24,
|
|
2584
2585
|
strokeWidth = 2,
|
|
2585
2586
|
absoluteStrokeWidth,
|
|
2586
2587
|
className = "",
|
|
@@ -2593,10 +2594,10 @@ var Icon = (0, import_react.forwardRef)(
|
|
|
2593
2594
|
{
|
|
2594
2595
|
ref,
|
|
2595
2596
|
...defaultAttributes,
|
|
2596
|
-
width:
|
|
2597
|
-
height:
|
|
2597
|
+
width: size,
|
|
2598
|
+
height: size,
|
|
2598
2599
|
stroke: color,
|
|
2599
|
-
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(
|
|
2600
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
2600
2601
|
className: mergeClasses("lucide", className),
|
|
2601
2602
|
...rest
|
|
2602
2603
|
},
|
|
@@ -2679,7 +2680,7 @@ var Button = ({
|
|
|
2679
2680
|
children,
|
|
2680
2681
|
className,
|
|
2681
2682
|
variant = "contained",
|
|
2682
|
-
size
|
|
2683
|
+
size = "medium",
|
|
2683
2684
|
startIcon,
|
|
2684
2685
|
endIcon,
|
|
2685
2686
|
loading = false,
|
|
@@ -2691,24 +2692,24 @@ var Button = ({
|
|
|
2691
2692
|
{
|
|
2692
2693
|
...props,
|
|
2693
2694
|
disabled: loading || disabled,
|
|
2694
|
-
className: cn(button({ variant, size
|
|
2695
|
+
className: cn(button({ variant, size, loading }), className)
|
|
2695
2696
|
},
|
|
2696
2697
|
loading && /* @__PURE__ */ import_react3.default.createElement(
|
|
2697
2698
|
LoaderCircleIcon,
|
|
2698
2699
|
{
|
|
2699
2700
|
className: cn("absolute animate-spin text-neutral-500"),
|
|
2700
|
-
width:
|
|
2701
|
-
height:
|
|
2701
|
+
width: size === "small" ? "16px" : "24px",
|
|
2702
|
+
height: size === "small" ? "16px" : "24px"
|
|
2702
2703
|
}
|
|
2703
2704
|
),
|
|
2704
2705
|
startIcon && import_react3.default.cloneElement(startIcon, {
|
|
2705
|
-
width:
|
|
2706
|
-
height:
|
|
2706
|
+
width: size === "small" ? "16px" : "24px",
|
|
2707
|
+
height: size === "small" ? "16px" : "24px"
|
|
2707
2708
|
}),
|
|
2708
2709
|
children,
|
|
2709
2710
|
endIcon && import_react3.default.cloneElement(endIcon, {
|
|
2710
|
-
width:
|
|
2711
|
-
height:
|
|
2711
|
+
width: size === "small" ? "16px" : "24px",
|
|
2712
|
+
height: size === "small" ? "16px" : "24px"
|
|
2712
2713
|
})
|
|
2713
2714
|
);
|
|
2714
2715
|
};
|
|
@@ -2766,17 +2767,17 @@ var Alert = ({
|
|
|
2766
2767
|
variant,
|
|
2767
2768
|
className,
|
|
2768
2769
|
description,
|
|
2769
|
-
size
|
|
2770
|
+
size = "sm",
|
|
2770
2771
|
title
|
|
2771
2772
|
}) => {
|
|
2772
2773
|
const [open, setOpen] = (0, import_react4.useState)(true);
|
|
2773
|
-
return /* @__PURE__ */ import_react4.default.createElement("div", { className: cn(alertRoot({ variant, className }), !open && "hidden") }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "flex" }, variant === "warning" && /* @__PURE__ */ import_react4.default.createElement(TriangleAlertIcon, { className: alertIcon({ variant }) }), variant === "success" && /* @__PURE__ */ import_react4.default.createElement(CircleCheckIcon, { className: alertIcon({ variant }) }), variant === "error" && /* @__PURE__ */ import_react4.default.createElement(CircleXIcon, { className: alertIcon({ variant }) }), variant === "info" && /* @__PURE__ */ import_react4.default.createElement(InfoIcon, { className: alertIcon({ variant }) }),
|
|
2774
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: cn(alertRoot({ variant, className }), !open && "hidden") }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "flex" }, variant === "warning" && /* @__PURE__ */ import_react4.default.createElement(TriangleAlertIcon, { className: alertIcon({ variant }) }), variant === "success" && /* @__PURE__ */ import_react4.default.createElement(CircleCheckIcon, { className: alertIcon({ variant }) }), variant === "error" && /* @__PURE__ */ import_react4.default.createElement(CircleXIcon, { className: alertIcon({ variant }) }), variant === "info" && /* @__PURE__ */ import_react4.default.createElement(InfoIcon, { className: alertIcon({ variant }) }), size === "sm" && /* @__PURE__ */ import_react4.default.createElement("p", { className: "leading-[130%]" }, title), size !== "sm" && /* @__PURE__ */ import_react4.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ import_react4.default.createElement("h6", { className: "font-semibold leading-[130%]" }, title), /* @__PURE__ */ import_react4.default.createElement(
|
|
2774
2775
|
"p",
|
|
2775
2776
|
{
|
|
2776
2777
|
className: cn(
|
|
2777
2778
|
"mt-1 text-sm leading-[120%] text-neutral-700",
|
|
2778
|
-
|
|
2779
|
-
|
|
2779
|
+
size === "md" && "line-clamp-1",
|
|
2780
|
+
size === "lg" && "line-clamp-2"
|
|
2780
2781
|
)
|
|
2781
2782
|
},
|
|
2782
2783
|
description
|
|
@@ -2813,13 +2814,13 @@ var iconButton = (0, import_cva3.cva)({
|
|
|
2813
2814
|
}
|
|
2814
2815
|
});
|
|
2815
2816
|
var IconButton = (0, import_react5.forwardRef)(
|
|
2816
|
-
({ children, className, variant = "contained", size
|
|
2817
|
+
({ children, className, variant = "contained", size = "medium", ...props }, ref) => {
|
|
2817
2818
|
return /* @__PURE__ */ import_react5.default.createElement(
|
|
2818
2819
|
"button",
|
|
2819
2820
|
{
|
|
2820
2821
|
ref,
|
|
2821
2822
|
...props,
|
|
2822
|
-
className: iconButton({ variant, size
|
|
2823
|
+
className: iconButton({ variant, size, className })
|
|
2823
2824
|
},
|
|
2824
2825
|
children
|
|
2825
2826
|
);
|
|
@@ -2827,3324 +2828,9 @@ var IconButton = (0, import_react5.forwardRef)(
|
|
|
2827
2828
|
);
|
|
2828
2829
|
|
|
2829
2830
|
// src/components/tooltip.tsx
|
|
2830
|
-
var
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
function _extends() {
|
|
2834
|
-
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
2835
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2836
|
-
var source = arguments[i];
|
|
2837
|
-
for (var key in source) {
|
|
2838
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2839
|
-
target[key] = source[key];
|
|
2840
|
-
}
|
|
2841
|
-
}
|
|
2842
|
-
}
|
|
2843
|
-
return target;
|
|
2844
|
-
};
|
|
2845
|
-
return _extends.apply(this, arguments);
|
|
2846
|
-
}
|
|
2847
|
-
|
|
2848
|
-
// node_modules/.pnpm/@radix-ui+react-tooltip@1.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
2849
|
-
var import_react21 = require("react");
|
|
2850
|
-
|
|
2851
|
-
// node_modules/.pnpm/@radix-ui+primitive@1.0.1/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
2852
|
-
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
2853
|
-
return function handleEvent(event) {
|
|
2854
|
-
originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
|
|
2855
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented)
|
|
2856
|
-
return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
|
|
2857
|
-
};
|
|
2858
|
-
}
|
|
2859
|
-
|
|
2860
|
-
// node_modules/.pnpm/@radix-ui+react-compose-refs@1.0.1_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
2861
|
-
var import_react6 = require("react");
|
|
2862
|
-
function $6ed0406888f73fc4$var$setRef(ref, value) {
|
|
2863
|
-
if (typeof ref === "function")
|
|
2864
|
-
ref(value);
|
|
2865
|
-
else if (ref !== null && ref !== void 0)
|
|
2866
|
-
ref.current = value;
|
|
2867
|
-
}
|
|
2868
|
-
function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {
|
|
2869
|
-
return (node) => refs.forEach(
|
|
2870
|
-
(ref) => $6ed0406888f73fc4$var$setRef(ref, node)
|
|
2871
|
-
);
|
|
2872
|
-
}
|
|
2873
|
-
function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
|
|
2874
|
-
return (0, import_react6.useCallback)($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
|
|
2875
|
-
}
|
|
2876
|
-
|
|
2877
|
-
// node_modules/.pnpm/@radix-ui+react-context@1.0.1_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
2878
|
-
var import_react7 = require("react");
|
|
2879
|
-
function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
|
|
2880
|
-
let defaultContexts = [];
|
|
2881
|
-
function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
|
|
2882
|
-
const BaseContext = /* @__PURE__ */ (0, import_react7.createContext)(defaultContext);
|
|
2883
|
-
const index2 = defaultContexts.length;
|
|
2884
|
-
defaultContexts = [
|
|
2885
|
-
...defaultContexts,
|
|
2886
|
-
defaultContext
|
|
2887
|
-
];
|
|
2888
|
-
function Provider(props) {
|
|
2889
|
-
const { scope, children, ...context } = props;
|
|
2890
|
-
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index2]) || BaseContext;
|
|
2891
|
-
const value = (0, import_react7.useMemo)(
|
|
2892
|
-
() => context,
|
|
2893
|
-
Object.values(context)
|
|
2894
|
-
);
|
|
2895
|
-
return /* @__PURE__ */ (0, import_react7.createElement)(Context.Provider, {
|
|
2896
|
-
value
|
|
2897
|
-
}, children);
|
|
2898
|
-
}
|
|
2899
|
-
function useContext(consumerName, scope) {
|
|
2900
|
-
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index2]) || BaseContext;
|
|
2901
|
-
const context = (0, import_react7.useContext)(Context);
|
|
2902
|
-
if (context)
|
|
2903
|
-
return context;
|
|
2904
|
-
if (defaultContext !== void 0)
|
|
2905
|
-
return defaultContext;
|
|
2906
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
2907
|
-
}
|
|
2908
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
2909
|
-
return [
|
|
2910
|
-
Provider,
|
|
2911
|
-
useContext
|
|
2912
|
-
];
|
|
2913
|
-
}
|
|
2914
|
-
const createScope = () => {
|
|
2915
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
2916
|
-
return /* @__PURE__ */ (0, import_react7.createContext)(defaultContext);
|
|
2917
|
-
});
|
|
2918
|
-
return function useScope(scope) {
|
|
2919
|
-
const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
|
|
2920
|
-
return (0, import_react7.useMemo)(
|
|
2921
|
-
() => ({
|
|
2922
|
-
[`__scope${scopeName}`]: {
|
|
2923
|
-
...scope,
|
|
2924
|
-
[scopeName]: contexts
|
|
2925
|
-
}
|
|
2926
|
-
}),
|
|
2927
|
-
[
|
|
2928
|
-
scope,
|
|
2929
|
-
contexts
|
|
2930
|
-
]
|
|
2931
|
-
);
|
|
2932
|
-
};
|
|
2933
|
-
};
|
|
2934
|
-
createScope.scopeName = scopeName;
|
|
2935
|
-
return [
|
|
2936
|
-
$c512c27ab02ef895$export$fd42f52fd3ae1109,
|
|
2937
|
-
$c512c27ab02ef895$var$composeContextScopes(createScope, ...createContextScopeDeps)
|
|
2938
|
-
];
|
|
2939
|
-
}
|
|
2940
|
-
function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
|
|
2941
|
-
const baseScope = scopes[0];
|
|
2942
|
-
if (scopes.length === 1)
|
|
2943
|
-
return baseScope;
|
|
2944
|
-
const createScope1 = () => {
|
|
2945
|
-
const scopeHooks = scopes.map(
|
|
2946
|
-
(createScope) => ({
|
|
2947
|
-
useScope: createScope(),
|
|
2948
|
-
scopeName: createScope.scopeName
|
|
2949
|
-
})
|
|
2950
|
-
);
|
|
2951
|
-
return function useComposedScopes(overrideScopes) {
|
|
2952
|
-
const nextScopes1 = scopeHooks.reduce((nextScopes, { useScope, scopeName }) => {
|
|
2953
|
-
const scopeProps = useScope(overrideScopes);
|
|
2954
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
2955
|
-
return {
|
|
2956
|
-
...nextScopes,
|
|
2957
|
-
...currentScope
|
|
2958
|
-
};
|
|
2959
|
-
}, {});
|
|
2960
|
-
return (0, import_react7.useMemo)(
|
|
2961
|
-
() => ({
|
|
2962
|
-
[`__scope${baseScope.scopeName}`]: nextScopes1
|
|
2963
|
-
}),
|
|
2964
|
-
[
|
|
2965
|
-
nextScopes1
|
|
2966
|
-
]
|
|
2967
|
-
);
|
|
2968
|
-
};
|
|
2969
|
-
};
|
|
2970
|
-
createScope1.scopeName = baseScope.scopeName;
|
|
2971
|
-
return createScope1;
|
|
2972
|
-
}
|
|
2973
|
-
|
|
2974
|
-
// node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.0.5_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
2975
|
-
var import_react12 = require("react");
|
|
2976
|
-
|
|
2977
|
-
// node_modules/.pnpm/@radix-ui+react-primitive@1.0.3_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
2978
|
-
var import_react9 = require("react");
|
|
2979
|
-
var import_react_dom = require("react-dom");
|
|
2980
|
-
|
|
2981
|
-
// node_modules/.pnpm/@radix-ui+react-slot@1.0.2_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
2982
|
-
var import_react8 = require("react");
|
|
2983
|
-
var $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ (0, import_react8.forwardRef)((props, forwardedRef) => {
|
|
2984
|
-
const { children, ...slotProps } = props;
|
|
2985
|
-
const childrenArray = import_react8.Children.toArray(children);
|
|
2986
|
-
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
2987
|
-
if (slottable) {
|
|
2988
|
-
const newElement = slottable.props.children;
|
|
2989
|
-
const newChildren = childrenArray.map((child) => {
|
|
2990
|
-
if (child === slottable) {
|
|
2991
|
-
if (import_react8.Children.count(newElement) > 1)
|
|
2992
|
-
return import_react8.Children.only(null);
|
|
2993
|
-
return /* @__PURE__ */ (0, import_react8.isValidElement)(newElement) ? newElement.props.children : null;
|
|
2994
|
-
} else
|
|
2995
|
-
return child;
|
|
2996
|
-
});
|
|
2997
|
-
return /* @__PURE__ */ (0, import_react8.createElement)($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
2998
|
-
ref: forwardedRef
|
|
2999
|
-
}), /* @__PURE__ */ (0, import_react8.isValidElement)(newElement) ? /* @__PURE__ */ (0, import_react8.cloneElement)(newElement, void 0, newChildren) : null);
|
|
3000
|
-
}
|
|
3001
|
-
return /* @__PURE__ */ (0, import_react8.createElement)($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
3002
|
-
ref: forwardedRef
|
|
3003
|
-
}), children);
|
|
3004
|
-
});
|
|
3005
|
-
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = "Slot";
|
|
3006
|
-
var $5e63c961fc1ce211$var$SlotClone = /* @__PURE__ */ (0, import_react8.forwardRef)((props, forwardedRef) => {
|
|
3007
|
-
const { children, ...slotProps } = props;
|
|
3008
|
-
if (/* @__PURE__ */ (0, import_react8.isValidElement)(children))
|
|
3009
|
-
return /* @__PURE__ */ (0, import_react8.cloneElement)(children, {
|
|
3010
|
-
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
|
3011
|
-
ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
|
|
3012
|
-
});
|
|
3013
|
-
return import_react8.Children.count(children) > 1 ? import_react8.Children.only(null) : null;
|
|
3014
|
-
});
|
|
3015
|
-
$5e63c961fc1ce211$var$SlotClone.displayName = "SlotClone";
|
|
3016
|
-
var $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children }) => {
|
|
3017
|
-
return /* @__PURE__ */ (0, import_react8.createElement)(import_react8.Fragment, null, children);
|
|
3018
|
-
};
|
|
3019
|
-
function $5e63c961fc1ce211$var$isSlottable(child) {
|
|
3020
|
-
return /* @__PURE__ */ (0, import_react8.isValidElement)(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
3021
|
-
}
|
|
3022
|
-
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
3023
|
-
const overrideProps = {
|
|
3024
|
-
...childProps
|
|
3025
|
-
};
|
|
3026
|
-
for (const propName in childProps) {
|
|
3027
|
-
const slotPropValue = slotProps[propName];
|
|
3028
|
-
const childPropValue = childProps[propName];
|
|
3029
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
3030
|
-
if (isHandler) {
|
|
3031
|
-
if (slotPropValue && childPropValue)
|
|
3032
|
-
overrideProps[propName] = (...args) => {
|
|
3033
|
-
childPropValue(...args);
|
|
3034
|
-
slotPropValue(...args);
|
|
3035
|
-
};
|
|
3036
|
-
else if (slotPropValue)
|
|
3037
|
-
overrideProps[propName] = slotPropValue;
|
|
3038
|
-
} else if (propName === "style")
|
|
3039
|
-
overrideProps[propName] = {
|
|
3040
|
-
...slotPropValue,
|
|
3041
|
-
...childPropValue
|
|
3042
|
-
};
|
|
3043
|
-
else if (propName === "className")
|
|
3044
|
-
overrideProps[propName] = [
|
|
3045
|
-
slotPropValue,
|
|
3046
|
-
childPropValue
|
|
3047
|
-
].filter(Boolean).join(" ");
|
|
3048
|
-
}
|
|
3049
|
-
return {
|
|
3050
|
-
...slotProps,
|
|
3051
|
-
...overrideProps
|
|
3052
|
-
};
|
|
3053
|
-
}
|
|
3054
|
-
|
|
3055
|
-
// node_modules/.pnpm/@radix-ui+react-primitive@1.0.3_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
3056
|
-
var $8927f6f2acc4f386$var$NODES = [
|
|
3057
|
-
"a",
|
|
3058
|
-
"button",
|
|
3059
|
-
"div",
|
|
3060
|
-
"form",
|
|
3061
|
-
"h2",
|
|
3062
|
-
"h3",
|
|
3063
|
-
"img",
|
|
3064
|
-
"input",
|
|
3065
|
-
"label",
|
|
3066
|
-
"li",
|
|
3067
|
-
"nav",
|
|
3068
|
-
"ol",
|
|
3069
|
-
"p",
|
|
3070
|
-
"span",
|
|
3071
|
-
"svg",
|
|
3072
|
-
"ul"
|
|
3073
|
-
];
|
|
3074
|
-
var $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node) => {
|
|
3075
|
-
const Node2 = /* @__PURE__ */ (0, import_react9.forwardRef)((props, forwardedRef) => {
|
|
3076
|
-
const { asChild, ...primitiveProps } = props;
|
|
3077
|
-
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
3078
|
-
(0, import_react9.useEffect)(() => {
|
|
3079
|
-
window[Symbol.for("radix-ui")] = true;
|
|
3080
|
-
}, []);
|
|
3081
|
-
return /* @__PURE__ */ (0, import_react9.createElement)(Comp, _extends({}, primitiveProps, {
|
|
3082
|
-
ref: forwardedRef
|
|
3083
|
-
}));
|
|
3084
|
-
});
|
|
3085
|
-
Node2.displayName = `Primitive.${node}`;
|
|
3086
|
-
return {
|
|
3087
|
-
...primitive,
|
|
3088
|
-
[node]: Node2
|
|
3089
|
-
};
|
|
3090
|
-
}, {});
|
|
3091
|
-
function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
|
|
3092
|
-
if (target)
|
|
3093
|
-
(0, import_react_dom.flushSync)(
|
|
3094
|
-
() => target.dispatchEvent(event)
|
|
3095
|
-
);
|
|
3096
|
-
}
|
|
3097
|
-
|
|
3098
|
-
// node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.0.1_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
3099
|
-
var import_react10 = require("react");
|
|
3100
|
-
function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
3101
|
-
const callbackRef = (0, import_react10.useRef)(callback);
|
|
3102
|
-
(0, import_react10.useEffect)(() => {
|
|
3103
|
-
callbackRef.current = callback;
|
|
3104
|
-
});
|
|
3105
|
-
return (0, import_react10.useMemo)(
|
|
3106
|
-
() => (...args) => {
|
|
3107
|
-
var _callbackRef$current;
|
|
3108
|
-
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
3109
|
-
},
|
|
3110
|
-
[]
|
|
3111
|
-
);
|
|
3112
|
-
}
|
|
3113
|
-
|
|
3114
|
-
// node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.0.3_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
3115
|
-
var import_react11 = require("react");
|
|
3116
|
-
function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
3117
|
-
const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
|
|
3118
|
-
(0, import_react11.useEffect)(() => {
|
|
3119
|
-
const handleKeyDown = (event) => {
|
|
3120
|
-
if (event.key === "Escape")
|
|
3121
|
-
onEscapeKeyDown(event);
|
|
3122
|
-
};
|
|
3123
|
-
ownerDocument.addEventListener("keydown", handleKeyDown);
|
|
3124
|
-
return () => ownerDocument.removeEventListener("keydown", handleKeyDown);
|
|
3125
|
-
}, [
|
|
3126
|
-
onEscapeKeyDown,
|
|
3127
|
-
ownerDocument
|
|
3128
|
-
]);
|
|
3129
|
-
}
|
|
3130
|
-
|
|
3131
|
-
// node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.0.5_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
3132
|
-
var $5cb92bef7577960e$var$CONTEXT_UPDATE = "dismissableLayer.update";
|
|
3133
|
-
var $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
3134
|
-
var $5cb92bef7577960e$var$FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
3135
|
-
var $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
3136
|
-
var $5cb92bef7577960e$var$DismissableLayerContext = /* @__PURE__ */ (0, import_react12.createContext)({
|
|
3137
|
-
layers: /* @__PURE__ */ new Set(),
|
|
3138
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
3139
|
-
branches: /* @__PURE__ */ new Set()
|
|
3140
|
-
});
|
|
3141
|
-
var $5cb92bef7577960e$export$177fb62ff3ec1f22 = /* @__PURE__ */ (0, import_react12.forwardRef)((props, forwardedRef) => {
|
|
3142
|
-
var _node$ownerDocument;
|
|
3143
|
-
const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
|
|
3144
|
-
const context = (0, import_react12.useContext)($5cb92bef7577960e$var$DismissableLayerContext);
|
|
3145
|
-
const [node1, setNode] = (0, import_react12.useState)(null);
|
|
3146
|
-
const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
|
|
3147
|
-
const [, force] = (0, import_react12.useState)({});
|
|
3148
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
|
|
3149
|
-
forwardedRef,
|
|
3150
|
-
(node) => setNode(node)
|
|
3151
|
-
);
|
|
3152
|
-
const layers = Array.from(context.layers);
|
|
3153
|
-
const [highestLayerWithOutsidePointerEventsDisabled] = [
|
|
3154
|
-
...context.layersWithOutsidePointerEventsDisabled
|
|
3155
|
-
].slice(-1);
|
|
3156
|
-
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
3157
|
-
const index2 = node1 ? layers.indexOf(node1) : -1;
|
|
3158
|
-
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
3159
|
-
const isPointerEventsEnabled = index2 >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
3160
|
-
const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event) => {
|
|
3161
|
-
const target = event.target;
|
|
3162
|
-
const isPointerDownOnBranch = [
|
|
3163
|
-
...context.branches
|
|
3164
|
-
].some(
|
|
3165
|
-
(branch) => branch.contains(target)
|
|
3166
|
-
);
|
|
3167
|
-
if (!isPointerEventsEnabled || isPointerDownOnBranch)
|
|
3168
|
-
return;
|
|
3169
|
-
onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
|
|
3170
|
-
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
3171
|
-
if (!event.defaultPrevented)
|
|
3172
|
-
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
3173
|
-
}, ownerDocument);
|
|
3174
|
-
const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event) => {
|
|
3175
|
-
const target = event.target;
|
|
3176
|
-
const isFocusInBranch = [
|
|
3177
|
-
...context.branches
|
|
3178
|
-
].some(
|
|
3179
|
-
(branch) => branch.contains(target)
|
|
3180
|
-
);
|
|
3181
|
-
if (isFocusInBranch)
|
|
3182
|
-
return;
|
|
3183
|
-
onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
|
|
3184
|
-
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
3185
|
-
if (!event.defaultPrevented)
|
|
3186
|
-
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
3187
|
-
}, ownerDocument);
|
|
3188
|
-
$addc16e1bbe58fd0$export$3a72a57244d6e765((event) => {
|
|
3189
|
-
const isHighestLayer = index2 === context.layers.size - 1;
|
|
3190
|
-
if (!isHighestLayer)
|
|
3191
|
-
return;
|
|
3192
|
-
onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
|
|
3193
|
-
if (!event.defaultPrevented && onDismiss) {
|
|
3194
|
-
event.preventDefault();
|
|
3195
|
-
onDismiss();
|
|
3196
|
-
}
|
|
3197
|
-
}, ownerDocument);
|
|
3198
|
-
(0, import_react12.useEffect)(() => {
|
|
3199
|
-
if (!node1)
|
|
3200
|
-
return;
|
|
3201
|
-
if (disableOutsidePointerEvents) {
|
|
3202
|
-
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
3203
|
-
$5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
3204
|
-
ownerDocument.body.style.pointerEvents = "none";
|
|
3205
|
-
}
|
|
3206
|
-
context.layersWithOutsidePointerEventsDisabled.add(node1);
|
|
3207
|
-
}
|
|
3208
|
-
context.layers.add(node1);
|
|
3209
|
-
$5cb92bef7577960e$var$dispatchUpdate();
|
|
3210
|
-
return () => {
|
|
3211
|
-
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1)
|
|
3212
|
-
ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
3213
|
-
};
|
|
3214
|
-
}, [
|
|
3215
|
-
node1,
|
|
3216
|
-
ownerDocument,
|
|
3217
|
-
disableOutsidePointerEvents,
|
|
3218
|
-
context
|
|
3219
|
-
]);
|
|
3220
|
-
(0, import_react12.useEffect)(() => {
|
|
3221
|
-
return () => {
|
|
3222
|
-
if (!node1)
|
|
3223
|
-
return;
|
|
3224
|
-
context.layers.delete(node1);
|
|
3225
|
-
context.layersWithOutsidePointerEventsDisabled.delete(node1);
|
|
3226
|
-
$5cb92bef7577960e$var$dispatchUpdate();
|
|
3227
|
-
};
|
|
3228
|
-
}, [
|
|
3229
|
-
node1,
|
|
3230
|
-
context
|
|
3231
|
-
]);
|
|
3232
|
-
(0, import_react12.useEffect)(() => {
|
|
3233
|
-
const handleUpdate = () => force({});
|
|
3234
|
-
document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
|
|
3235
|
-
return () => document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
|
|
3236
|
-
}, []);
|
|
3237
|
-
return /* @__PURE__ */ (0, import_react12.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
|
|
3238
|
-
ref: composedRefs,
|
|
3239
|
-
style: {
|
|
3240
|
-
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
3241
|
-
...props.style
|
|
3242
|
-
},
|
|
3243
|
-
onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
3244
|
-
onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
3245
|
-
onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
|
|
3246
|
-
}));
|
|
3247
|
-
});
|
|
3248
|
-
function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
3249
|
-
const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
|
|
3250
|
-
const isPointerInsideReactTreeRef = (0, import_react12.useRef)(false);
|
|
3251
|
-
const handleClickRef = (0, import_react12.useRef)(() => {
|
|
3252
|
-
});
|
|
3253
|
-
(0, import_react12.useEffect)(() => {
|
|
3254
|
-
const handlePointerDown = (event) => {
|
|
3255
|
-
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
3256
|
-
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
3257
|
-
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
|
|
3258
|
-
discrete: true
|
|
3259
|
-
});
|
|
3260
|
-
};
|
|
3261
|
-
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
|
3262
|
-
const eventDetail = {
|
|
3263
|
-
originalEvent: event
|
|
3264
|
-
};
|
|
3265
|
-
if (event.pointerType === "touch") {
|
|
3266
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
3267
|
-
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
3268
|
-
ownerDocument.addEventListener("click", handleClickRef.current, {
|
|
3269
|
-
once: true
|
|
3270
|
-
});
|
|
3271
|
-
} else
|
|
3272
|
-
handleAndDispatchPointerDownOutsideEvent2();
|
|
3273
|
-
} else
|
|
3274
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
3275
|
-
isPointerInsideReactTreeRef.current = false;
|
|
3276
|
-
};
|
|
3277
|
-
const timerId = window.setTimeout(() => {
|
|
3278
|
-
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
3279
|
-
}, 0);
|
|
3280
|
-
return () => {
|
|
3281
|
-
window.clearTimeout(timerId);
|
|
3282
|
-
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
3283
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
3284
|
-
};
|
|
3285
|
-
}, [
|
|
3286
|
-
ownerDocument,
|
|
3287
|
-
handlePointerDownOutside
|
|
3288
|
-
]);
|
|
3289
|
-
return {
|
|
3290
|
-
// ensures we check React component tree (not just DOM tree)
|
|
3291
|
-
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
3292
|
-
};
|
|
3293
|
-
}
|
|
3294
|
-
function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
3295
|
-
const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
|
|
3296
|
-
const isFocusInsideReactTreeRef = (0, import_react12.useRef)(false);
|
|
3297
|
-
(0, import_react12.useEffect)(() => {
|
|
3298
|
-
const handleFocus = (event) => {
|
|
3299
|
-
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
3300
|
-
const eventDetail = {
|
|
3301
|
-
originalEvent: event
|
|
3302
|
-
};
|
|
3303
|
-
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
3304
|
-
discrete: false
|
|
3305
|
-
});
|
|
3306
|
-
}
|
|
3307
|
-
};
|
|
3308
|
-
ownerDocument.addEventListener("focusin", handleFocus);
|
|
3309
|
-
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
3310
|
-
}, [
|
|
3311
|
-
ownerDocument,
|
|
3312
|
-
handleFocusOutside
|
|
3313
|
-
]);
|
|
3314
|
-
return {
|
|
3315
|
-
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
3316
|
-
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
3317
|
-
};
|
|
3318
|
-
}
|
|
3319
|
-
function $5cb92bef7577960e$var$dispatchUpdate() {
|
|
3320
|
-
const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
|
|
3321
|
-
document.dispatchEvent(event);
|
|
3322
|
-
}
|
|
3323
|
-
function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
3324
|
-
const target = detail.originalEvent.target;
|
|
3325
|
-
const event = new CustomEvent(name, {
|
|
3326
|
-
bubbles: false,
|
|
3327
|
-
cancelable: true,
|
|
3328
|
-
detail
|
|
3329
|
-
});
|
|
3330
|
-
if (handler)
|
|
3331
|
-
target.addEventListener(name, handler, {
|
|
3332
|
-
once: true
|
|
3333
|
-
});
|
|
3334
|
-
if (discrete)
|
|
3335
|
-
$8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
|
|
3336
|
-
else
|
|
3337
|
-
target.dispatchEvent(event);
|
|
3338
|
-
}
|
|
3339
|
-
|
|
3340
|
-
// node_modules/.pnpm/@radix-ui+react-id@1.0.1_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
3341
|
-
var $2AODx$react = __toESM(require("react"), 1);
|
|
3342
|
-
|
|
3343
|
-
// node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.0.1_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
3344
|
-
var import_react13 = require("react");
|
|
3345
|
-
var $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? import_react13.useLayoutEffect : () => {
|
|
3346
|
-
};
|
|
3347
|
-
|
|
3348
|
-
// node_modules/.pnpm/@radix-ui+react-id@1.0.1_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
3349
|
-
var $1746a345f3d73bb7$var$useReactId = $2AODx$react["useId".toString()] || (() => void 0);
|
|
3350
|
-
var $1746a345f3d73bb7$var$count = 0;
|
|
3351
|
-
function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
3352
|
-
const [id, setId] = $2AODx$react.useState($1746a345f3d73bb7$var$useReactId());
|
|
3353
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
3354
|
-
if (!deterministicId)
|
|
3355
|
-
setId(
|
|
3356
|
-
(reactId) => reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)
|
|
3357
|
-
);
|
|
3358
|
-
}, [
|
|
3359
|
-
deterministicId
|
|
3360
|
-
]);
|
|
3361
|
-
return deterministicId || (id ? `radix-${id}` : "");
|
|
3362
|
-
}
|
|
3363
|
-
|
|
3364
|
-
// node_modules/.pnpm/@radix-ui+react-popper@1.1.3_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
3365
|
-
var import_react17 = require("react");
|
|
3366
|
-
|
|
3367
|
-
// node_modules/.pnpm/@floating-ui+utils@0.2.2/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
3368
|
-
var sides = ["top", "right", "bottom", "left"];
|
|
3369
|
-
var min = Math.min;
|
|
3370
|
-
var max = Math.max;
|
|
3371
|
-
var round = Math.round;
|
|
3372
|
-
var floor = Math.floor;
|
|
3373
|
-
var createCoords = (v) => ({
|
|
3374
|
-
x: v,
|
|
3375
|
-
y: v
|
|
3376
|
-
});
|
|
3377
|
-
var oppositeSideMap = {
|
|
3378
|
-
left: "right",
|
|
3379
|
-
right: "left",
|
|
3380
|
-
bottom: "top",
|
|
3381
|
-
top: "bottom"
|
|
3382
|
-
};
|
|
3383
|
-
var oppositeAlignmentMap = {
|
|
3384
|
-
start: "end",
|
|
3385
|
-
end: "start"
|
|
3386
|
-
};
|
|
3387
|
-
function clamp(start, value, end) {
|
|
3388
|
-
return max(start, min(value, end));
|
|
3389
|
-
}
|
|
3390
|
-
function evaluate(value, param) {
|
|
3391
|
-
return typeof value === "function" ? value(param) : value;
|
|
3392
|
-
}
|
|
3393
|
-
function getSide(placement) {
|
|
3394
|
-
return placement.split("-")[0];
|
|
3395
|
-
}
|
|
3396
|
-
function getAlignment(placement) {
|
|
3397
|
-
return placement.split("-")[1];
|
|
3398
|
-
}
|
|
3399
|
-
function getOppositeAxis(axis) {
|
|
3400
|
-
return axis === "x" ? "y" : "x";
|
|
3401
|
-
}
|
|
3402
|
-
function getAxisLength(axis) {
|
|
3403
|
-
return axis === "y" ? "height" : "width";
|
|
3404
|
-
}
|
|
3405
|
-
function getSideAxis(placement) {
|
|
3406
|
-
return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
|
|
3407
|
-
}
|
|
3408
|
-
function getAlignmentAxis(placement) {
|
|
3409
|
-
return getOppositeAxis(getSideAxis(placement));
|
|
3410
|
-
}
|
|
3411
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
3412
|
-
if (rtl === void 0) {
|
|
3413
|
-
rtl = false;
|
|
3414
|
-
}
|
|
3415
|
-
const alignment = getAlignment(placement);
|
|
3416
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
3417
|
-
const length = getAxisLength(alignmentAxis);
|
|
3418
|
-
let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
|
|
3419
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
3420
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
3421
|
-
}
|
|
3422
|
-
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
3423
|
-
}
|
|
3424
|
-
function getExpandedPlacements(placement) {
|
|
3425
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
3426
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
3427
|
-
}
|
|
3428
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
3429
|
-
return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
|
|
3430
|
-
}
|
|
3431
|
-
function getSideList(side, isStart, rtl) {
|
|
3432
|
-
const lr = ["left", "right"];
|
|
3433
|
-
const rl = ["right", "left"];
|
|
3434
|
-
const tb = ["top", "bottom"];
|
|
3435
|
-
const bt = ["bottom", "top"];
|
|
3436
|
-
switch (side) {
|
|
3437
|
-
case "top":
|
|
3438
|
-
case "bottom":
|
|
3439
|
-
if (rtl)
|
|
3440
|
-
return isStart ? rl : lr;
|
|
3441
|
-
return isStart ? lr : rl;
|
|
3442
|
-
case "left":
|
|
3443
|
-
case "right":
|
|
3444
|
-
return isStart ? tb : bt;
|
|
3445
|
-
default:
|
|
3446
|
-
return [];
|
|
3447
|
-
}
|
|
3448
|
-
}
|
|
3449
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
3450
|
-
const alignment = getAlignment(placement);
|
|
3451
|
-
let list = getSideList(getSide(placement), direction === "start", rtl);
|
|
3452
|
-
if (alignment) {
|
|
3453
|
-
list = list.map((side) => side + "-" + alignment);
|
|
3454
|
-
if (flipAlignment) {
|
|
3455
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
3456
|
-
}
|
|
3457
|
-
}
|
|
3458
|
-
return list;
|
|
3459
|
-
}
|
|
3460
|
-
function getOppositePlacement(placement) {
|
|
3461
|
-
return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
|
|
3462
|
-
}
|
|
3463
|
-
function expandPaddingObject(padding) {
|
|
3464
|
-
return {
|
|
3465
|
-
top: 0,
|
|
3466
|
-
right: 0,
|
|
3467
|
-
bottom: 0,
|
|
3468
|
-
left: 0,
|
|
3469
|
-
...padding
|
|
3470
|
-
};
|
|
3471
|
-
}
|
|
3472
|
-
function getPaddingObject(padding) {
|
|
3473
|
-
return typeof padding !== "number" ? expandPaddingObject(padding) : {
|
|
3474
|
-
top: padding,
|
|
3475
|
-
right: padding,
|
|
3476
|
-
bottom: padding,
|
|
3477
|
-
left: padding
|
|
3478
|
-
};
|
|
3479
|
-
}
|
|
3480
|
-
function rectToClientRect(rect) {
|
|
3481
|
-
const {
|
|
3482
|
-
x,
|
|
3483
|
-
y,
|
|
3484
|
-
width,
|
|
3485
|
-
height
|
|
3486
|
-
} = rect;
|
|
3487
|
-
return {
|
|
3488
|
-
width,
|
|
3489
|
-
height,
|
|
3490
|
-
top: y,
|
|
3491
|
-
left: x,
|
|
3492
|
-
right: x + width,
|
|
3493
|
-
bottom: y + height,
|
|
3494
|
-
x,
|
|
3495
|
-
y
|
|
3496
|
-
};
|
|
3497
|
-
}
|
|
3498
|
-
|
|
3499
|
-
// node_modules/.pnpm/@floating-ui+core@1.6.2/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
3500
|
-
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
3501
|
-
let {
|
|
3502
|
-
reference,
|
|
3503
|
-
floating
|
|
3504
|
-
} = _ref;
|
|
3505
|
-
const sideAxis = getSideAxis(placement);
|
|
3506
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
3507
|
-
const alignLength = getAxisLength(alignmentAxis);
|
|
3508
|
-
const side = getSide(placement);
|
|
3509
|
-
const isVertical = sideAxis === "y";
|
|
3510
|
-
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
3511
|
-
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
3512
|
-
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
3513
|
-
let coords;
|
|
3514
|
-
switch (side) {
|
|
3515
|
-
case "top":
|
|
3516
|
-
coords = {
|
|
3517
|
-
x: commonX,
|
|
3518
|
-
y: reference.y - floating.height
|
|
3519
|
-
};
|
|
3520
|
-
break;
|
|
3521
|
-
case "bottom":
|
|
3522
|
-
coords = {
|
|
3523
|
-
x: commonX,
|
|
3524
|
-
y: reference.y + reference.height
|
|
3525
|
-
};
|
|
3526
|
-
break;
|
|
3527
|
-
case "right":
|
|
3528
|
-
coords = {
|
|
3529
|
-
x: reference.x + reference.width,
|
|
3530
|
-
y: commonY
|
|
3531
|
-
};
|
|
3532
|
-
break;
|
|
3533
|
-
case "left":
|
|
3534
|
-
coords = {
|
|
3535
|
-
x: reference.x - floating.width,
|
|
3536
|
-
y: commonY
|
|
3537
|
-
};
|
|
3538
|
-
break;
|
|
3539
|
-
default:
|
|
3540
|
-
coords = {
|
|
3541
|
-
x: reference.x,
|
|
3542
|
-
y: reference.y
|
|
3543
|
-
};
|
|
3544
|
-
}
|
|
3545
|
-
switch (getAlignment(placement)) {
|
|
3546
|
-
case "start":
|
|
3547
|
-
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
3548
|
-
break;
|
|
3549
|
-
case "end":
|
|
3550
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
3551
|
-
break;
|
|
3552
|
-
}
|
|
3553
|
-
return coords;
|
|
3554
|
-
}
|
|
3555
|
-
var computePosition = async (reference, floating, config) => {
|
|
3556
|
-
const {
|
|
3557
|
-
placement = "bottom",
|
|
3558
|
-
strategy = "absolute",
|
|
3559
|
-
middleware = [],
|
|
3560
|
-
platform: platform2
|
|
3561
|
-
} = config;
|
|
3562
|
-
const validMiddleware = middleware.filter(Boolean);
|
|
3563
|
-
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
|
|
3564
|
-
let rects = await platform2.getElementRects({
|
|
3565
|
-
reference,
|
|
3566
|
-
floating,
|
|
3567
|
-
strategy
|
|
3568
|
-
});
|
|
3569
|
-
let {
|
|
3570
|
-
x,
|
|
3571
|
-
y
|
|
3572
|
-
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
3573
|
-
let statefulPlacement = placement;
|
|
3574
|
-
let middlewareData = {};
|
|
3575
|
-
let resetCount = 0;
|
|
3576
|
-
for (let i = 0; i < validMiddleware.length; i++) {
|
|
3577
|
-
const {
|
|
3578
|
-
name,
|
|
3579
|
-
fn
|
|
3580
|
-
} = validMiddleware[i];
|
|
3581
|
-
const {
|
|
3582
|
-
x: nextX,
|
|
3583
|
-
y: nextY,
|
|
3584
|
-
data,
|
|
3585
|
-
reset
|
|
3586
|
-
} = await fn({
|
|
3587
|
-
x,
|
|
3588
|
-
y,
|
|
3589
|
-
initialPlacement: placement,
|
|
3590
|
-
placement: statefulPlacement,
|
|
3591
|
-
strategy,
|
|
3592
|
-
middlewareData,
|
|
3593
|
-
rects,
|
|
3594
|
-
platform: platform2,
|
|
3595
|
-
elements: {
|
|
3596
|
-
reference,
|
|
3597
|
-
floating
|
|
3598
|
-
}
|
|
3599
|
-
});
|
|
3600
|
-
x = nextX != null ? nextX : x;
|
|
3601
|
-
y = nextY != null ? nextY : y;
|
|
3602
|
-
middlewareData = {
|
|
3603
|
-
...middlewareData,
|
|
3604
|
-
[name]: {
|
|
3605
|
-
...middlewareData[name],
|
|
3606
|
-
...data
|
|
3607
|
-
}
|
|
3608
|
-
};
|
|
3609
|
-
if (reset && resetCount <= 50) {
|
|
3610
|
-
resetCount++;
|
|
3611
|
-
if (typeof reset === "object") {
|
|
3612
|
-
if (reset.placement) {
|
|
3613
|
-
statefulPlacement = reset.placement;
|
|
3614
|
-
}
|
|
3615
|
-
if (reset.rects) {
|
|
3616
|
-
rects = reset.rects === true ? await platform2.getElementRects({
|
|
3617
|
-
reference,
|
|
3618
|
-
floating,
|
|
3619
|
-
strategy
|
|
3620
|
-
}) : reset.rects;
|
|
3621
|
-
}
|
|
3622
|
-
({
|
|
3623
|
-
x,
|
|
3624
|
-
y
|
|
3625
|
-
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
3626
|
-
}
|
|
3627
|
-
i = -1;
|
|
3628
|
-
}
|
|
3629
|
-
}
|
|
3630
|
-
return {
|
|
3631
|
-
x,
|
|
3632
|
-
y,
|
|
3633
|
-
placement: statefulPlacement,
|
|
3634
|
-
strategy,
|
|
3635
|
-
middlewareData
|
|
3636
|
-
};
|
|
3637
|
-
};
|
|
3638
|
-
async function detectOverflow(state, options) {
|
|
3639
|
-
var _await$platform$isEle;
|
|
3640
|
-
if (options === void 0) {
|
|
3641
|
-
options = {};
|
|
3642
|
-
}
|
|
3643
|
-
const {
|
|
3644
|
-
x,
|
|
3645
|
-
y,
|
|
3646
|
-
platform: platform2,
|
|
3647
|
-
rects,
|
|
3648
|
-
elements,
|
|
3649
|
-
strategy
|
|
3650
|
-
} = state;
|
|
3651
|
-
const {
|
|
3652
|
-
boundary = "clippingAncestors",
|
|
3653
|
-
rootBoundary = "viewport",
|
|
3654
|
-
elementContext = "floating",
|
|
3655
|
-
altBoundary = false,
|
|
3656
|
-
padding = 0
|
|
3657
|
-
} = evaluate(options, state);
|
|
3658
|
-
const paddingObject = getPaddingObject(padding);
|
|
3659
|
-
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
3660
|
-
const element = elements[altBoundary ? altContext : elementContext];
|
|
3661
|
-
const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
|
|
3662
|
-
element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
|
|
3663
|
-
boundary,
|
|
3664
|
-
rootBoundary,
|
|
3665
|
-
strategy
|
|
3666
|
-
}));
|
|
3667
|
-
const rect = elementContext === "floating" ? {
|
|
3668
|
-
x,
|
|
3669
|
-
y,
|
|
3670
|
-
width: rects.floating.width,
|
|
3671
|
-
height: rects.floating.height
|
|
3672
|
-
} : rects.reference;
|
|
3673
|
-
const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
|
|
3674
|
-
const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
|
|
3675
|
-
x: 1,
|
|
3676
|
-
y: 1
|
|
3677
|
-
} : {
|
|
3678
|
-
x: 1,
|
|
3679
|
-
y: 1
|
|
3680
|
-
};
|
|
3681
|
-
const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
3682
|
-
elements,
|
|
3683
|
-
rect,
|
|
3684
|
-
offsetParent,
|
|
3685
|
-
strategy
|
|
3686
|
-
}) : rect);
|
|
3687
|
-
return {
|
|
3688
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
3689
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
3690
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
3691
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
3692
|
-
};
|
|
3693
|
-
}
|
|
3694
|
-
var arrow = (options) => ({
|
|
3695
|
-
name: "arrow",
|
|
3696
|
-
options,
|
|
3697
|
-
async fn(state) {
|
|
3698
|
-
const {
|
|
3699
|
-
x,
|
|
3700
|
-
y,
|
|
3701
|
-
placement,
|
|
3702
|
-
rects,
|
|
3703
|
-
platform: platform2,
|
|
3704
|
-
elements,
|
|
3705
|
-
middlewareData
|
|
3706
|
-
} = state;
|
|
3707
|
-
const {
|
|
3708
|
-
element,
|
|
3709
|
-
padding = 0
|
|
3710
|
-
} = evaluate(options, state) || {};
|
|
3711
|
-
if (element == null) {
|
|
3712
|
-
return {};
|
|
3713
|
-
}
|
|
3714
|
-
const paddingObject = getPaddingObject(padding);
|
|
3715
|
-
const coords = {
|
|
3716
|
-
x,
|
|
3717
|
-
y
|
|
3718
|
-
};
|
|
3719
|
-
const axis = getAlignmentAxis(placement);
|
|
3720
|
-
const length = getAxisLength(axis);
|
|
3721
|
-
const arrowDimensions = await platform2.getDimensions(element);
|
|
3722
|
-
const isYAxis = axis === "y";
|
|
3723
|
-
const minProp = isYAxis ? "top" : "left";
|
|
3724
|
-
const maxProp = isYAxis ? "bottom" : "right";
|
|
3725
|
-
const clientProp = isYAxis ? "clientHeight" : "clientWidth";
|
|
3726
|
-
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
3727
|
-
const startDiff = coords[axis] - rects.reference[axis];
|
|
3728
|
-
const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element));
|
|
3729
|
-
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
3730
|
-
if (!clientSize || !await (platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent))) {
|
|
3731
|
-
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
3732
|
-
}
|
|
3733
|
-
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
3734
|
-
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
3735
|
-
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
3736
|
-
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
3737
|
-
const min$1 = minPadding;
|
|
3738
|
-
const max2 = clientSize - arrowDimensions[length] - maxPadding;
|
|
3739
|
-
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
3740
|
-
const offset4 = clamp(min$1, center, max2);
|
|
3741
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
3742
|
-
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0;
|
|
3743
|
-
return {
|
|
3744
|
-
[axis]: coords[axis] + alignmentOffset,
|
|
3745
|
-
data: {
|
|
3746
|
-
[axis]: offset4,
|
|
3747
|
-
centerOffset: center - offset4 - alignmentOffset,
|
|
3748
|
-
...shouldAddOffset && {
|
|
3749
|
-
alignmentOffset
|
|
3750
|
-
}
|
|
3751
|
-
},
|
|
3752
|
-
reset: shouldAddOffset
|
|
3753
|
-
};
|
|
3754
|
-
}
|
|
3755
|
-
});
|
|
3756
|
-
var flip = function(options) {
|
|
3757
|
-
if (options === void 0) {
|
|
3758
|
-
options = {};
|
|
3759
|
-
}
|
|
3760
|
-
return {
|
|
3761
|
-
name: "flip",
|
|
3762
|
-
options,
|
|
3763
|
-
async fn(state) {
|
|
3764
|
-
var _middlewareData$arrow, _middlewareData$flip;
|
|
3765
|
-
const {
|
|
3766
|
-
placement,
|
|
3767
|
-
middlewareData,
|
|
3768
|
-
rects,
|
|
3769
|
-
initialPlacement,
|
|
3770
|
-
platform: platform2,
|
|
3771
|
-
elements
|
|
3772
|
-
} = state;
|
|
3773
|
-
const {
|
|
3774
|
-
mainAxis: checkMainAxis = true,
|
|
3775
|
-
crossAxis: checkCrossAxis = true,
|
|
3776
|
-
fallbackPlacements: specifiedFallbackPlacements,
|
|
3777
|
-
fallbackStrategy = "bestFit",
|
|
3778
|
-
fallbackAxisSideDirection = "none",
|
|
3779
|
-
flipAlignment = true,
|
|
3780
|
-
...detectOverflowOptions
|
|
3781
|
-
} = evaluate(options, state);
|
|
3782
|
-
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
3783
|
-
return {};
|
|
3784
|
-
}
|
|
3785
|
-
const side = getSide(placement);
|
|
3786
|
-
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
3787
|
-
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
3788
|
-
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
3789
|
-
if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== "none") {
|
|
3790
|
-
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
3791
|
-
}
|
|
3792
|
-
const placements2 = [initialPlacement, ...fallbackPlacements];
|
|
3793
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
3794
|
-
const overflows = [];
|
|
3795
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
3796
|
-
if (checkMainAxis) {
|
|
3797
|
-
overflows.push(overflow[side]);
|
|
3798
|
-
}
|
|
3799
|
-
if (checkCrossAxis) {
|
|
3800
|
-
const sides2 = getAlignmentSides(placement, rects, rtl);
|
|
3801
|
-
overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
|
|
3802
|
-
}
|
|
3803
|
-
overflowsData = [...overflowsData, {
|
|
3804
|
-
placement,
|
|
3805
|
-
overflows
|
|
3806
|
-
}];
|
|
3807
|
-
if (!overflows.every((side2) => side2 <= 0)) {
|
|
3808
|
-
var _middlewareData$flip2, _overflowsData$filter;
|
|
3809
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
3810
|
-
const nextPlacement = placements2[nextIndex];
|
|
3811
|
-
if (nextPlacement) {
|
|
3812
|
-
return {
|
|
3813
|
-
data: {
|
|
3814
|
-
index: nextIndex,
|
|
3815
|
-
overflows: overflowsData
|
|
3816
|
-
},
|
|
3817
|
-
reset: {
|
|
3818
|
-
placement: nextPlacement
|
|
3819
|
-
}
|
|
3820
|
-
};
|
|
3821
|
-
}
|
|
3822
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
3823
|
-
if (!resetPlacement) {
|
|
3824
|
-
switch (fallbackStrategy) {
|
|
3825
|
-
case "bestFit": {
|
|
3826
|
-
var _overflowsData$map$so;
|
|
3827
|
-
const placement2 = (_overflowsData$map$so = overflowsData.map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
|
|
3828
|
-
if (placement2) {
|
|
3829
|
-
resetPlacement = placement2;
|
|
3830
|
-
}
|
|
3831
|
-
break;
|
|
3832
|
-
}
|
|
3833
|
-
case "initialPlacement":
|
|
3834
|
-
resetPlacement = initialPlacement;
|
|
3835
|
-
break;
|
|
3836
|
-
}
|
|
3837
|
-
}
|
|
3838
|
-
if (placement !== resetPlacement) {
|
|
3839
|
-
return {
|
|
3840
|
-
reset: {
|
|
3841
|
-
placement: resetPlacement
|
|
3842
|
-
}
|
|
3843
|
-
};
|
|
3844
|
-
}
|
|
3845
|
-
}
|
|
3846
|
-
return {};
|
|
3847
|
-
}
|
|
3848
|
-
};
|
|
3849
|
-
};
|
|
3850
|
-
function getSideOffsets(overflow, rect) {
|
|
3851
|
-
return {
|
|
3852
|
-
top: overflow.top - rect.height,
|
|
3853
|
-
right: overflow.right - rect.width,
|
|
3854
|
-
bottom: overflow.bottom - rect.height,
|
|
3855
|
-
left: overflow.left - rect.width
|
|
3856
|
-
};
|
|
3857
|
-
}
|
|
3858
|
-
function isAnySideFullyClipped(overflow) {
|
|
3859
|
-
return sides.some((side) => overflow[side] >= 0);
|
|
3860
|
-
}
|
|
3861
|
-
var hide = function(options) {
|
|
3862
|
-
if (options === void 0) {
|
|
3863
|
-
options = {};
|
|
3864
|
-
}
|
|
3865
|
-
return {
|
|
3866
|
-
name: "hide",
|
|
3867
|
-
options,
|
|
3868
|
-
async fn(state) {
|
|
3869
|
-
const {
|
|
3870
|
-
rects
|
|
3871
|
-
} = state;
|
|
3872
|
-
const {
|
|
3873
|
-
strategy = "referenceHidden",
|
|
3874
|
-
...detectOverflowOptions
|
|
3875
|
-
} = evaluate(options, state);
|
|
3876
|
-
switch (strategy) {
|
|
3877
|
-
case "referenceHidden": {
|
|
3878
|
-
const overflow = await detectOverflow(state, {
|
|
3879
|
-
...detectOverflowOptions,
|
|
3880
|
-
elementContext: "reference"
|
|
3881
|
-
});
|
|
3882
|
-
const offsets = getSideOffsets(overflow, rects.reference);
|
|
3883
|
-
return {
|
|
3884
|
-
data: {
|
|
3885
|
-
referenceHiddenOffsets: offsets,
|
|
3886
|
-
referenceHidden: isAnySideFullyClipped(offsets)
|
|
3887
|
-
}
|
|
3888
|
-
};
|
|
3889
|
-
}
|
|
3890
|
-
case "escaped": {
|
|
3891
|
-
const overflow = await detectOverflow(state, {
|
|
3892
|
-
...detectOverflowOptions,
|
|
3893
|
-
altBoundary: true
|
|
3894
|
-
});
|
|
3895
|
-
const offsets = getSideOffsets(overflow, rects.floating);
|
|
3896
|
-
return {
|
|
3897
|
-
data: {
|
|
3898
|
-
escapedOffsets: offsets,
|
|
3899
|
-
escaped: isAnySideFullyClipped(offsets)
|
|
3900
|
-
}
|
|
3901
|
-
};
|
|
3902
|
-
}
|
|
3903
|
-
default: {
|
|
3904
|
-
return {};
|
|
3905
|
-
}
|
|
3906
|
-
}
|
|
3907
|
-
}
|
|
3908
|
-
};
|
|
3909
|
-
};
|
|
3910
|
-
async function convertValueToCoords(state, options) {
|
|
3911
|
-
const {
|
|
3912
|
-
placement,
|
|
3913
|
-
platform: platform2,
|
|
3914
|
-
elements
|
|
3915
|
-
} = state;
|
|
3916
|
-
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
3917
|
-
const side = getSide(placement);
|
|
3918
|
-
const alignment = getAlignment(placement);
|
|
3919
|
-
const isVertical = getSideAxis(placement) === "y";
|
|
3920
|
-
const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
|
|
3921
|
-
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
3922
|
-
const rawValue = evaluate(options, state);
|
|
3923
|
-
let {
|
|
3924
|
-
mainAxis,
|
|
3925
|
-
crossAxis,
|
|
3926
|
-
alignmentAxis
|
|
3927
|
-
} = typeof rawValue === "number" ? {
|
|
3928
|
-
mainAxis: rawValue,
|
|
3929
|
-
crossAxis: 0,
|
|
3930
|
-
alignmentAxis: null
|
|
3931
|
-
} : {
|
|
3932
|
-
mainAxis: 0,
|
|
3933
|
-
crossAxis: 0,
|
|
3934
|
-
alignmentAxis: null,
|
|
3935
|
-
...rawValue
|
|
3936
|
-
};
|
|
3937
|
-
if (alignment && typeof alignmentAxis === "number") {
|
|
3938
|
-
crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
3939
|
-
}
|
|
3940
|
-
return isVertical ? {
|
|
3941
|
-
x: crossAxis * crossAxisMulti,
|
|
3942
|
-
y: mainAxis * mainAxisMulti
|
|
3943
|
-
} : {
|
|
3944
|
-
x: mainAxis * mainAxisMulti,
|
|
3945
|
-
y: crossAxis * crossAxisMulti
|
|
3946
|
-
};
|
|
3947
|
-
}
|
|
3948
|
-
var offset = function(options) {
|
|
3949
|
-
if (options === void 0) {
|
|
3950
|
-
options = 0;
|
|
3951
|
-
}
|
|
3952
|
-
return {
|
|
3953
|
-
name: "offset",
|
|
3954
|
-
options,
|
|
3955
|
-
async fn(state) {
|
|
3956
|
-
var _middlewareData$offse, _middlewareData$arrow;
|
|
3957
|
-
const {
|
|
3958
|
-
x,
|
|
3959
|
-
y,
|
|
3960
|
-
placement,
|
|
3961
|
-
middlewareData
|
|
3962
|
-
} = state;
|
|
3963
|
-
const diffCoords = await convertValueToCoords(state, options);
|
|
3964
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
3965
|
-
return {};
|
|
3966
|
-
}
|
|
3967
|
-
return {
|
|
3968
|
-
x: x + diffCoords.x,
|
|
3969
|
-
y: y + diffCoords.y,
|
|
3970
|
-
data: {
|
|
3971
|
-
...diffCoords,
|
|
3972
|
-
placement
|
|
3973
|
-
}
|
|
3974
|
-
};
|
|
3975
|
-
}
|
|
3976
|
-
};
|
|
3977
|
-
};
|
|
3978
|
-
var shift = function(options) {
|
|
3979
|
-
if (options === void 0) {
|
|
3980
|
-
options = {};
|
|
3981
|
-
}
|
|
3982
|
-
return {
|
|
3983
|
-
name: "shift",
|
|
3984
|
-
options,
|
|
3985
|
-
async fn(state) {
|
|
3986
|
-
const {
|
|
3987
|
-
x,
|
|
3988
|
-
y,
|
|
3989
|
-
placement
|
|
3990
|
-
} = state;
|
|
3991
|
-
const {
|
|
3992
|
-
mainAxis: checkMainAxis = true,
|
|
3993
|
-
crossAxis: checkCrossAxis = false,
|
|
3994
|
-
limiter = {
|
|
3995
|
-
fn: (_ref) => {
|
|
3996
|
-
let {
|
|
3997
|
-
x: x2,
|
|
3998
|
-
y: y2
|
|
3999
|
-
} = _ref;
|
|
4000
|
-
return {
|
|
4001
|
-
x: x2,
|
|
4002
|
-
y: y2
|
|
4003
|
-
};
|
|
4004
|
-
}
|
|
4005
|
-
},
|
|
4006
|
-
...detectOverflowOptions
|
|
4007
|
-
} = evaluate(options, state);
|
|
4008
|
-
const coords = {
|
|
4009
|
-
x,
|
|
4010
|
-
y
|
|
4011
|
-
};
|
|
4012
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
4013
|
-
const crossAxis = getSideAxis(getSide(placement));
|
|
4014
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
4015
|
-
let mainAxisCoord = coords[mainAxis];
|
|
4016
|
-
let crossAxisCoord = coords[crossAxis];
|
|
4017
|
-
if (checkMainAxis) {
|
|
4018
|
-
const minSide = mainAxis === "y" ? "top" : "left";
|
|
4019
|
-
const maxSide = mainAxis === "y" ? "bottom" : "right";
|
|
4020
|
-
const min2 = mainAxisCoord + overflow[minSide];
|
|
4021
|
-
const max2 = mainAxisCoord - overflow[maxSide];
|
|
4022
|
-
mainAxisCoord = clamp(min2, mainAxisCoord, max2);
|
|
4023
|
-
}
|
|
4024
|
-
if (checkCrossAxis) {
|
|
4025
|
-
const minSide = crossAxis === "y" ? "top" : "left";
|
|
4026
|
-
const maxSide = crossAxis === "y" ? "bottom" : "right";
|
|
4027
|
-
const min2 = crossAxisCoord + overflow[minSide];
|
|
4028
|
-
const max2 = crossAxisCoord - overflow[maxSide];
|
|
4029
|
-
crossAxisCoord = clamp(min2, crossAxisCoord, max2);
|
|
4030
|
-
}
|
|
4031
|
-
const limitedCoords = limiter.fn({
|
|
4032
|
-
...state,
|
|
4033
|
-
[mainAxis]: mainAxisCoord,
|
|
4034
|
-
[crossAxis]: crossAxisCoord
|
|
4035
|
-
});
|
|
4036
|
-
return {
|
|
4037
|
-
...limitedCoords,
|
|
4038
|
-
data: {
|
|
4039
|
-
x: limitedCoords.x - x,
|
|
4040
|
-
y: limitedCoords.y - y
|
|
4041
|
-
}
|
|
4042
|
-
};
|
|
4043
|
-
}
|
|
4044
|
-
};
|
|
4045
|
-
};
|
|
4046
|
-
var limitShift = function(options) {
|
|
4047
|
-
if (options === void 0) {
|
|
4048
|
-
options = {};
|
|
4049
|
-
}
|
|
4050
|
-
return {
|
|
4051
|
-
options,
|
|
4052
|
-
fn(state) {
|
|
4053
|
-
const {
|
|
4054
|
-
x,
|
|
4055
|
-
y,
|
|
4056
|
-
placement,
|
|
4057
|
-
rects,
|
|
4058
|
-
middlewareData
|
|
4059
|
-
} = state;
|
|
4060
|
-
const {
|
|
4061
|
-
offset: offset4 = 0,
|
|
4062
|
-
mainAxis: checkMainAxis = true,
|
|
4063
|
-
crossAxis: checkCrossAxis = true
|
|
4064
|
-
} = evaluate(options, state);
|
|
4065
|
-
const coords = {
|
|
4066
|
-
x,
|
|
4067
|
-
y
|
|
4068
|
-
};
|
|
4069
|
-
const crossAxis = getSideAxis(placement);
|
|
4070
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
4071
|
-
let mainAxisCoord = coords[mainAxis];
|
|
4072
|
-
let crossAxisCoord = coords[crossAxis];
|
|
4073
|
-
const rawOffset = evaluate(offset4, state);
|
|
4074
|
-
const computedOffset = typeof rawOffset === "number" ? {
|
|
4075
|
-
mainAxis: rawOffset,
|
|
4076
|
-
crossAxis: 0
|
|
4077
|
-
} : {
|
|
4078
|
-
mainAxis: 0,
|
|
4079
|
-
crossAxis: 0,
|
|
4080
|
-
...rawOffset
|
|
4081
|
-
};
|
|
4082
|
-
if (checkMainAxis) {
|
|
4083
|
-
const len = mainAxis === "y" ? "height" : "width";
|
|
4084
|
-
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
|
|
4085
|
-
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
|
|
4086
|
-
if (mainAxisCoord < limitMin) {
|
|
4087
|
-
mainAxisCoord = limitMin;
|
|
4088
|
-
} else if (mainAxisCoord > limitMax) {
|
|
4089
|
-
mainAxisCoord = limitMax;
|
|
4090
|
-
}
|
|
4091
|
-
}
|
|
4092
|
-
if (checkCrossAxis) {
|
|
4093
|
-
var _middlewareData$offse, _middlewareData$offse2;
|
|
4094
|
-
const len = mainAxis === "y" ? "width" : "height";
|
|
4095
|
-
const isOriginSide = ["top", "left"].includes(getSide(placement));
|
|
4096
|
-
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
4097
|
-
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
4098
|
-
if (crossAxisCoord < limitMin) {
|
|
4099
|
-
crossAxisCoord = limitMin;
|
|
4100
|
-
} else if (crossAxisCoord > limitMax) {
|
|
4101
|
-
crossAxisCoord = limitMax;
|
|
4102
|
-
}
|
|
4103
|
-
}
|
|
4104
|
-
return {
|
|
4105
|
-
[mainAxis]: mainAxisCoord,
|
|
4106
|
-
[crossAxis]: crossAxisCoord
|
|
4107
|
-
};
|
|
4108
|
-
}
|
|
4109
|
-
};
|
|
4110
|
-
};
|
|
4111
|
-
var size = function(options) {
|
|
4112
|
-
if (options === void 0) {
|
|
4113
|
-
options = {};
|
|
4114
|
-
}
|
|
4115
|
-
return {
|
|
4116
|
-
name: "size",
|
|
4117
|
-
options,
|
|
4118
|
-
async fn(state) {
|
|
4119
|
-
const {
|
|
4120
|
-
placement,
|
|
4121
|
-
rects,
|
|
4122
|
-
platform: platform2,
|
|
4123
|
-
elements
|
|
4124
|
-
} = state;
|
|
4125
|
-
const {
|
|
4126
|
-
apply = () => {
|
|
4127
|
-
},
|
|
4128
|
-
...detectOverflowOptions
|
|
4129
|
-
} = evaluate(options, state);
|
|
4130
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
4131
|
-
const side = getSide(placement);
|
|
4132
|
-
const alignment = getAlignment(placement);
|
|
4133
|
-
const isYAxis = getSideAxis(placement) === "y";
|
|
4134
|
-
const {
|
|
4135
|
-
width,
|
|
4136
|
-
height
|
|
4137
|
-
} = rects.floating;
|
|
4138
|
-
let heightSide;
|
|
4139
|
-
let widthSide;
|
|
4140
|
-
if (side === "top" || side === "bottom") {
|
|
4141
|
-
heightSide = side;
|
|
4142
|
-
widthSide = alignment === (await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
|
|
4143
|
-
} else {
|
|
4144
|
-
widthSide = side;
|
|
4145
|
-
heightSide = alignment === "end" ? "top" : "bottom";
|
|
4146
|
-
}
|
|
4147
|
-
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
4148
|
-
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
4149
|
-
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
4150
|
-
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
4151
|
-
const noShift = !state.middlewareData.shift;
|
|
4152
|
-
let availableHeight = overflowAvailableHeight;
|
|
4153
|
-
let availableWidth = overflowAvailableWidth;
|
|
4154
|
-
if (isYAxis) {
|
|
4155
|
-
availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
|
|
4156
|
-
} else {
|
|
4157
|
-
availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
|
|
4158
|
-
}
|
|
4159
|
-
if (noShift && !alignment) {
|
|
4160
|
-
const xMin = max(overflow.left, 0);
|
|
4161
|
-
const xMax = max(overflow.right, 0);
|
|
4162
|
-
const yMin = max(overflow.top, 0);
|
|
4163
|
-
const yMax = max(overflow.bottom, 0);
|
|
4164
|
-
if (isYAxis) {
|
|
4165
|
-
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
4166
|
-
} else {
|
|
4167
|
-
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
4168
|
-
}
|
|
4169
|
-
}
|
|
4170
|
-
await apply({
|
|
4171
|
-
...state,
|
|
4172
|
-
availableWidth,
|
|
4173
|
-
availableHeight
|
|
4174
|
-
});
|
|
4175
|
-
const nextDimensions = await platform2.getDimensions(elements.floating);
|
|
4176
|
-
if (width !== nextDimensions.width || height !== nextDimensions.height) {
|
|
4177
|
-
return {
|
|
4178
|
-
reset: {
|
|
4179
|
-
rects: true
|
|
4180
|
-
}
|
|
4181
|
-
};
|
|
4182
|
-
}
|
|
4183
|
-
return {};
|
|
4184
|
-
}
|
|
4185
|
-
};
|
|
4186
|
-
};
|
|
4187
|
-
|
|
4188
|
-
// node_modules/.pnpm/@floating-ui+utils@0.2.2/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
4189
|
-
function getNodeName(node) {
|
|
4190
|
-
if (isNode(node)) {
|
|
4191
|
-
return (node.nodeName || "").toLowerCase();
|
|
4192
|
-
}
|
|
4193
|
-
return "#document";
|
|
4194
|
-
}
|
|
4195
|
-
function getWindow(node) {
|
|
4196
|
-
var _node$ownerDocument;
|
|
4197
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
4198
|
-
}
|
|
4199
|
-
function getDocumentElement(node) {
|
|
4200
|
-
var _ref;
|
|
4201
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
4202
|
-
}
|
|
4203
|
-
function isNode(value) {
|
|
4204
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
4205
|
-
}
|
|
4206
|
-
function isElement(value) {
|
|
4207
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
4208
|
-
}
|
|
4209
|
-
function isHTMLElement(value) {
|
|
4210
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
4211
|
-
}
|
|
4212
|
-
function isShadowRoot(value) {
|
|
4213
|
-
if (typeof ShadowRoot === "undefined") {
|
|
4214
|
-
return false;
|
|
4215
|
-
}
|
|
4216
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
4217
|
-
}
|
|
4218
|
-
function isOverflowElement(element) {
|
|
4219
|
-
const {
|
|
4220
|
-
overflow,
|
|
4221
|
-
overflowX,
|
|
4222
|
-
overflowY,
|
|
4223
|
-
display
|
|
4224
|
-
} = getComputedStyle2(element);
|
|
4225
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
|
|
4226
|
-
}
|
|
4227
|
-
function isTableElement(element) {
|
|
4228
|
-
return ["table", "td", "th"].includes(getNodeName(element));
|
|
4229
|
-
}
|
|
4230
|
-
function isContainingBlock(element) {
|
|
4231
|
-
const webkit = isWebKit();
|
|
4232
|
-
const css = getComputedStyle2(element);
|
|
4233
|
-
return css.transform !== "none" || css.perspective !== "none" || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || ["transform", "perspective", "filter"].some((value) => (css.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css.contain || "").includes(value));
|
|
4234
|
-
}
|
|
4235
|
-
function getContainingBlock(element) {
|
|
4236
|
-
let currentNode = getParentNode(element);
|
|
4237
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
4238
|
-
if (isContainingBlock(currentNode)) {
|
|
4239
|
-
return currentNode;
|
|
4240
|
-
}
|
|
4241
|
-
currentNode = getParentNode(currentNode);
|
|
4242
|
-
}
|
|
4243
|
-
return null;
|
|
4244
|
-
}
|
|
4245
|
-
function isWebKit() {
|
|
4246
|
-
if (typeof CSS === "undefined" || !CSS.supports)
|
|
4247
|
-
return false;
|
|
4248
|
-
return CSS.supports("-webkit-backdrop-filter", "none");
|
|
4249
|
-
}
|
|
4250
|
-
function isLastTraversableNode(node) {
|
|
4251
|
-
return ["html", "body", "#document"].includes(getNodeName(node));
|
|
4252
|
-
}
|
|
4253
|
-
function getComputedStyle2(element) {
|
|
4254
|
-
return getWindow(element).getComputedStyle(element);
|
|
4255
|
-
}
|
|
4256
|
-
function getNodeScroll(element) {
|
|
4257
|
-
if (isElement(element)) {
|
|
4258
|
-
return {
|
|
4259
|
-
scrollLeft: element.scrollLeft,
|
|
4260
|
-
scrollTop: element.scrollTop
|
|
4261
|
-
};
|
|
4262
|
-
}
|
|
4263
|
-
return {
|
|
4264
|
-
scrollLeft: element.pageXOffset,
|
|
4265
|
-
scrollTop: element.pageYOffset
|
|
4266
|
-
};
|
|
4267
|
-
}
|
|
4268
|
-
function getParentNode(node) {
|
|
4269
|
-
if (getNodeName(node) === "html") {
|
|
4270
|
-
return node;
|
|
4271
|
-
}
|
|
4272
|
-
const result = (
|
|
4273
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
4274
|
-
node.assignedSlot || // DOM Element detected.
|
|
4275
|
-
node.parentNode || // ShadowRoot detected.
|
|
4276
|
-
isShadowRoot(node) && node.host || // Fallback.
|
|
4277
|
-
getDocumentElement(node)
|
|
4278
|
-
);
|
|
4279
|
-
return isShadowRoot(result) ? result.host : result;
|
|
4280
|
-
}
|
|
4281
|
-
function getNearestOverflowAncestor(node) {
|
|
4282
|
-
const parentNode = getParentNode(node);
|
|
4283
|
-
if (isLastTraversableNode(parentNode)) {
|
|
4284
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
4285
|
-
}
|
|
4286
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
4287
|
-
return parentNode;
|
|
4288
|
-
}
|
|
4289
|
-
return getNearestOverflowAncestor(parentNode);
|
|
4290
|
-
}
|
|
4291
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
4292
|
-
var _node$ownerDocument2;
|
|
4293
|
-
if (list === void 0) {
|
|
4294
|
-
list = [];
|
|
4295
|
-
}
|
|
4296
|
-
if (traverseIframes === void 0) {
|
|
4297
|
-
traverseIframes = true;
|
|
4298
|
-
}
|
|
4299
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
4300
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
4301
|
-
const win = getWindow(scrollableAncestor);
|
|
4302
|
-
if (isBody) {
|
|
4303
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
|
|
4304
|
-
}
|
|
4305
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
4306
|
-
}
|
|
4307
|
-
|
|
4308
|
-
// node_modules/.pnpm/@floating-ui+dom@1.6.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
4309
|
-
function getCssDimensions(element) {
|
|
4310
|
-
const css = getComputedStyle2(element);
|
|
4311
|
-
let width = parseFloat(css.width) || 0;
|
|
4312
|
-
let height = parseFloat(css.height) || 0;
|
|
4313
|
-
const hasOffset = isHTMLElement(element);
|
|
4314
|
-
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
4315
|
-
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
4316
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
4317
|
-
if (shouldFallback) {
|
|
4318
|
-
width = offsetWidth;
|
|
4319
|
-
height = offsetHeight;
|
|
4320
|
-
}
|
|
4321
|
-
return {
|
|
4322
|
-
width,
|
|
4323
|
-
height,
|
|
4324
|
-
$: shouldFallback
|
|
4325
|
-
};
|
|
4326
|
-
}
|
|
4327
|
-
function unwrapElement(element) {
|
|
4328
|
-
return !isElement(element) ? element.contextElement : element;
|
|
4329
|
-
}
|
|
4330
|
-
function getScale(element) {
|
|
4331
|
-
const domElement = unwrapElement(element);
|
|
4332
|
-
if (!isHTMLElement(domElement)) {
|
|
4333
|
-
return createCoords(1);
|
|
4334
|
-
}
|
|
4335
|
-
const rect = domElement.getBoundingClientRect();
|
|
4336
|
-
const {
|
|
4337
|
-
width,
|
|
4338
|
-
height,
|
|
4339
|
-
$
|
|
4340
|
-
} = getCssDimensions(domElement);
|
|
4341
|
-
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
4342
|
-
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
4343
|
-
if (!x || !Number.isFinite(x)) {
|
|
4344
|
-
x = 1;
|
|
4345
|
-
}
|
|
4346
|
-
if (!y || !Number.isFinite(y)) {
|
|
4347
|
-
y = 1;
|
|
4348
|
-
}
|
|
4349
|
-
return {
|
|
4350
|
-
x,
|
|
4351
|
-
y
|
|
4352
|
-
};
|
|
4353
|
-
}
|
|
4354
|
-
var noOffsets = /* @__PURE__ */ createCoords(0);
|
|
4355
|
-
function getVisualOffsets(element) {
|
|
4356
|
-
const win = getWindow(element);
|
|
4357
|
-
if (!isWebKit() || !win.visualViewport) {
|
|
4358
|
-
return noOffsets;
|
|
4359
|
-
}
|
|
4360
|
-
return {
|
|
4361
|
-
x: win.visualViewport.offsetLeft,
|
|
4362
|
-
y: win.visualViewport.offsetTop
|
|
4363
|
-
};
|
|
4364
|
-
}
|
|
4365
|
-
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
4366
|
-
if (isFixed === void 0) {
|
|
4367
|
-
isFixed = false;
|
|
4368
|
-
}
|
|
4369
|
-
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
4370
|
-
return false;
|
|
4371
|
-
}
|
|
4372
|
-
return isFixed;
|
|
4373
|
-
}
|
|
4374
|
-
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
4375
|
-
if (includeScale === void 0) {
|
|
4376
|
-
includeScale = false;
|
|
4377
|
-
}
|
|
4378
|
-
if (isFixedStrategy === void 0) {
|
|
4379
|
-
isFixedStrategy = false;
|
|
4380
|
-
}
|
|
4381
|
-
const clientRect = element.getBoundingClientRect();
|
|
4382
|
-
const domElement = unwrapElement(element);
|
|
4383
|
-
let scale = createCoords(1);
|
|
4384
|
-
if (includeScale) {
|
|
4385
|
-
if (offsetParent) {
|
|
4386
|
-
if (isElement(offsetParent)) {
|
|
4387
|
-
scale = getScale(offsetParent);
|
|
4388
|
-
}
|
|
4389
|
-
} else {
|
|
4390
|
-
scale = getScale(element);
|
|
4391
|
-
}
|
|
4392
|
-
}
|
|
4393
|
-
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
4394
|
-
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
4395
|
-
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
4396
|
-
let width = clientRect.width / scale.x;
|
|
4397
|
-
let height = clientRect.height / scale.y;
|
|
4398
|
-
if (domElement) {
|
|
4399
|
-
const win = getWindow(domElement);
|
|
4400
|
-
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
4401
|
-
let currentWin = win;
|
|
4402
|
-
let currentIFrame = currentWin.frameElement;
|
|
4403
|
-
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
4404
|
-
const iframeScale = getScale(currentIFrame);
|
|
4405
|
-
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
4406
|
-
const css = getComputedStyle2(currentIFrame);
|
|
4407
|
-
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
4408
|
-
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
4409
|
-
x *= iframeScale.x;
|
|
4410
|
-
y *= iframeScale.y;
|
|
4411
|
-
width *= iframeScale.x;
|
|
4412
|
-
height *= iframeScale.y;
|
|
4413
|
-
x += left;
|
|
4414
|
-
y += top;
|
|
4415
|
-
currentWin = getWindow(currentIFrame);
|
|
4416
|
-
currentIFrame = currentWin.frameElement;
|
|
4417
|
-
}
|
|
4418
|
-
}
|
|
4419
|
-
return rectToClientRect({
|
|
4420
|
-
width,
|
|
4421
|
-
height,
|
|
4422
|
-
x,
|
|
4423
|
-
y
|
|
4424
|
-
});
|
|
4425
|
-
}
|
|
4426
|
-
var topLayerSelectors = [":popover-open", ":modal"];
|
|
4427
|
-
function isTopLayer(element) {
|
|
4428
|
-
return topLayerSelectors.some((selector) => {
|
|
4429
|
-
try {
|
|
4430
|
-
return element.matches(selector);
|
|
4431
|
-
} catch (e) {
|
|
4432
|
-
return false;
|
|
4433
|
-
}
|
|
4434
|
-
});
|
|
4435
|
-
}
|
|
4436
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
4437
|
-
let {
|
|
4438
|
-
elements,
|
|
4439
|
-
rect,
|
|
4440
|
-
offsetParent,
|
|
4441
|
-
strategy
|
|
4442
|
-
} = _ref;
|
|
4443
|
-
const isFixed = strategy === "fixed";
|
|
4444
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
4445
|
-
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
4446
|
-
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
4447
|
-
return rect;
|
|
4448
|
-
}
|
|
4449
|
-
let scroll = {
|
|
4450
|
-
scrollLeft: 0,
|
|
4451
|
-
scrollTop: 0
|
|
4452
|
-
};
|
|
4453
|
-
let scale = createCoords(1);
|
|
4454
|
-
const offsets = createCoords(0);
|
|
4455
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
4456
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
4457
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
4458
|
-
scroll = getNodeScroll(offsetParent);
|
|
4459
|
-
}
|
|
4460
|
-
if (isHTMLElement(offsetParent)) {
|
|
4461
|
-
const offsetRect = getBoundingClientRect(offsetParent);
|
|
4462
|
-
scale = getScale(offsetParent);
|
|
4463
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
4464
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
4465
|
-
}
|
|
4466
|
-
}
|
|
4467
|
-
return {
|
|
4468
|
-
width: rect.width * scale.x,
|
|
4469
|
-
height: rect.height * scale.y,
|
|
4470
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
|
|
4471
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
|
|
4472
|
-
};
|
|
4473
|
-
}
|
|
4474
|
-
function getClientRects(element) {
|
|
4475
|
-
return Array.from(element.getClientRects());
|
|
4476
|
-
}
|
|
4477
|
-
function getWindowScrollBarX(element) {
|
|
4478
|
-
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
4479
|
-
}
|
|
4480
|
-
function getDocumentRect(element) {
|
|
4481
|
-
const html = getDocumentElement(element);
|
|
4482
|
-
const scroll = getNodeScroll(element);
|
|
4483
|
-
const body = element.ownerDocument.body;
|
|
4484
|
-
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
4485
|
-
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
4486
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
4487
|
-
const y = -scroll.scrollTop;
|
|
4488
|
-
if (getComputedStyle2(body).direction === "rtl") {
|
|
4489
|
-
x += max(html.clientWidth, body.clientWidth) - width;
|
|
4490
|
-
}
|
|
4491
|
-
return {
|
|
4492
|
-
width,
|
|
4493
|
-
height,
|
|
4494
|
-
x,
|
|
4495
|
-
y
|
|
4496
|
-
};
|
|
4497
|
-
}
|
|
4498
|
-
function getViewportRect(element, strategy) {
|
|
4499
|
-
const win = getWindow(element);
|
|
4500
|
-
const html = getDocumentElement(element);
|
|
4501
|
-
const visualViewport = win.visualViewport;
|
|
4502
|
-
let width = html.clientWidth;
|
|
4503
|
-
let height = html.clientHeight;
|
|
4504
|
-
let x = 0;
|
|
4505
|
-
let y = 0;
|
|
4506
|
-
if (visualViewport) {
|
|
4507
|
-
width = visualViewport.width;
|
|
4508
|
-
height = visualViewport.height;
|
|
4509
|
-
const visualViewportBased = isWebKit();
|
|
4510
|
-
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
4511
|
-
x = visualViewport.offsetLeft;
|
|
4512
|
-
y = visualViewport.offsetTop;
|
|
4513
|
-
}
|
|
4514
|
-
}
|
|
4515
|
-
return {
|
|
4516
|
-
width,
|
|
4517
|
-
height,
|
|
4518
|
-
x,
|
|
4519
|
-
y
|
|
4520
|
-
};
|
|
4521
|
-
}
|
|
4522
|
-
function getInnerBoundingClientRect(element, strategy) {
|
|
4523
|
-
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
4524
|
-
const top = clientRect.top + element.clientTop;
|
|
4525
|
-
const left = clientRect.left + element.clientLeft;
|
|
4526
|
-
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
4527
|
-
const width = element.clientWidth * scale.x;
|
|
4528
|
-
const height = element.clientHeight * scale.y;
|
|
4529
|
-
const x = left * scale.x;
|
|
4530
|
-
const y = top * scale.y;
|
|
4531
|
-
return {
|
|
4532
|
-
width,
|
|
4533
|
-
height,
|
|
4534
|
-
x,
|
|
4535
|
-
y
|
|
4536
|
-
};
|
|
4537
|
-
}
|
|
4538
|
-
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
4539
|
-
let rect;
|
|
4540
|
-
if (clippingAncestor === "viewport") {
|
|
4541
|
-
rect = getViewportRect(element, strategy);
|
|
4542
|
-
} else if (clippingAncestor === "document") {
|
|
4543
|
-
rect = getDocumentRect(getDocumentElement(element));
|
|
4544
|
-
} else if (isElement(clippingAncestor)) {
|
|
4545
|
-
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
4546
|
-
} else {
|
|
4547
|
-
const visualOffsets = getVisualOffsets(element);
|
|
4548
|
-
rect = {
|
|
4549
|
-
...clippingAncestor,
|
|
4550
|
-
x: clippingAncestor.x - visualOffsets.x,
|
|
4551
|
-
y: clippingAncestor.y - visualOffsets.y
|
|
4552
|
-
};
|
|
4553
|
-
}
|
|
4554
|
-
return rectToClientRect(rect);
|
|
4555
|
-
}
|
|
4556
|
-
function hasFixedPositionAncestor(element, stopNode) {
|
|
4557
|
-
const parentNode = getParentNode(element);
|
|
4558
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
4559
|
-
return false;
|
|
4560
|
-
}
|
|
4561
|
-
return getComputedStyle2(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
|
|
4562
|
-
}
|
|
4563
|
-
function getClippingElementAncestors(element, cache) {
|
|
4564
|
-
const cachedResult = cache.get(element);
|
|
4565
|
-
if (cachedResult) {
|
|
4566
|
-
return cachedResult;
|
|
4567
|
-
}
|
|
4568
|
-
let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
|
|
4569
|
-
let currentContainingBlockComputedStyle = null;
|
|
4570
|
-
const elementIsFixed = getComputedStyle2(element).position === "fixed";
|
|
4571
|
-
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
4572
|
-
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
4573
|
-
const computedStyle = getComputedStyle2(currentNode);
|
|
4574
|
-
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
4575
|
-
if (!currentNodeIsContaining && computedStyle.position === "fixed") {
|
|
4576
|
-
currentContainingBlockComputedStyle = null;
|
|
4577
|
-
}
|
|
4578
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
4579
|
-
if (shouldDropCurrentNode) {
|
|
4580
|
-
result = result.filter((ancestor) => ancestor !== currentNode);
|
|
4581
|
-
} else {
|
|
4582
|
-
currentContainingBlockComputedStyle = computedStyle;
|
|
4583
|
-
}
|
|
4584
|
-
currentNode = getParentNode(currentNode);
|
|
4585
|
-
}
|
|
4586
|
-
cache.set(element, result);
|
|
4587
|
-
return result;
|
|
4588
|
-
}
|
|
4589
|
-
function getClippingRect(_ref) {
|
|
4590
|
-
let {
|
|
4591
|
-
element,
|
|
4592
|
-
boundary,
|
|
4593
|
-
rootBoundary,
|
|
4594
|
-
strategy
|
|
4595
|
-
} = _ref;
|
|
4596
|
-
const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
4597
|
-
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
4598
|
-
const firstClippingAncestor = clippingAncestors[0];
|
|
4599
|
-
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
4600
|
-
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
4601
|
-
accRect.top = max(rect.top, accRect.top);
|
|
4602
|
-
accRect.right = min(rect.right, accRect.right);
|
|
4603
|
-
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
4604
|
-
accRect.left = max(rect.left, accRect.left);
|
|
4605
|
-
return accRect;
|
|
4606
|
-
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
4607
|
-
return {
|
|
4608
|
-
width: clippingRect.right - clippingRect.left,
|
|
4609
|
-
height: clippingRect.bottom - clippingRect.top,
|
|
4610
|
-
x: clippingRect.left,
|
|
4611
|
-
y: clippingRect.top
|
|
4612
|
-
};
|
|
4613
|
-
}
|
|
4614
|
-
function getDimensions(element) {
|
|
4615
|
-
const {
|
|
4616
|
-
width,
|
|
4617
|
-
height
|
|
4618
|
-
} = getCssDimensions(element);
|
|
4619
|
-
return {
|
|
4620
|
-
width,
|
|
4621
|
-
height
|
|
4622
|
-
};
|
|
4623
|
-
}
|
|
4624
|
-
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
4625
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
4626
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
4627
|
-
const isFixed = strategy === "fixed";
|
|
4628
|
-
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
4629
|
-
let scroll = {
|
|
4630
|
-
scrollLeft: 0,
|
|
4631
|
-
scrollTop: 0
|
|
4632
|
-
};
|
|
4633
|
-
const offsets = createCoords(0);
|
|
4634
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
4635
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
4636
|
-
scroll = getNodeScroll(offsetParent);
|
|
4637
|
-
}
|
|
4638
|
-
if (isOffsetParentAnElement) {
|
|
4639
|
-
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
4640
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
4641
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
4642
|
-
} else if (documentElement) {
|
|
4643
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
4644
|
-
}
|
|
4645
|
-
}
|
|
4646
|
-
const x = rect.left + scroll.scrollLeft - offsets.x;
|
|
4647
|
-
const y = rect.top + scroll.scrollTop - offsets.y;
|
|
4648
|
-
return {
|
|
4649
|
-
x,
|
|
4650
|
-
y,
|
|
4651
|
-
width: rect.width,
|
|
4652
|
-
height: rect.height
|
|
4653
|
-
};
|
|
4654
|
-
}
|
|
4655
|
-
function isStaticPositioned(element) {
|
|
4656
|
-
return getComputedStyle2(element).position === "static";
|
|
4657
|
-
}
|
|
4658
|
-
function getTrueOffsetParent(element, polyfill) {
|
|
4659
|
-
if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
|
|
4660
|
-
return null;
|
|
4661
|
-
}
|
|
4662
|
-
if (polyfill) {
|
|
4663
|
-
return polyfill(element);
|
|
4664
|
-
}
|
|
4665
|
-
return element.offsetParent;
|
|
4666
|
-
}
|
|
4667
|
-
function getOffsetParent(element, polyfill) {
|
|
4668
|
-
const win = getWindow(element);
|
|
4669
|
-
if (isTopLayer(element)) {
|
|
4670
|
-
return win;
|
|
4671
|
-
}
|
|
4672
|
-
if (!isHTMLElement(element)) {
|
|
4673
|
-
let svgOffsetParent = getParentNode(element);
|
|
4674
|
-
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
4675
|
-
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
4676
|
-
return svgOffsetParent;
|
|
4677
|
-
}
|
|
4678
|
-
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
4679
|
-
}
|
|
4680
|
-
return win;
|
|
4681
|
-
}
|
|
4682
|
-
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
4683
|
-
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
4684
|
-
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
4685
|
-
}
|
|
4686
|
-
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
4687
|
-
return win;
|
|
4688
|
-
}
|
|
4689
|
-
return offsetParent || getContainingBlock(element) || win;
|
|
4690
|
-
}
|
|
4691
|
-
var getElementRects = async function(data) {
|
|
4692
|
-
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
4693
|
-
const getDimensionsFn = this.getDimensions;
|
|
4694
|
-
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
4695
|
-
return {
|
|
4696
|
-
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
4697
|
-
floating: {
|
|
4698
|
-
x: 0,
|
|
4699
|
-
y: 0,
|
|
4700
|
-
width: floatingDimensions.width,
|
|
4701
|
-
height: floatingDimensions.height
|
|
4702
|
-
}
|
|
4703
|
-
};
|
|
4704
|
-
};
|
|
4705
|
-
function isRTL(element) {
|
|
4706
|
-
return getComputedStyle2(element).direction === "rtl";
|
|
4707
|
-
}
|
|
4708
|
-
var platform = {
|
|
4709
|
-
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
4710
|
-
getDocumentElement,
|
|
4711
|
-
getClippingRect,
|
|
4712
|
-
getOffsetParent,
|
|
4713
|
-
getElementRects,
|
|
4714
|
-
getClientRects,
|
|
4715
|
-
getDimensions,
|
|
4716
|
-
getScale,
|
|
4717
|
-
isElement,
|
|
4718
|
-
isRTL
|
|
4719
|
-
};
|
|
4720
|
-
function observeMove(element, onMove) {
|
|
4721
|
-
let io = null;
|
|
4722
|
-
let timeoutId;
|
|
4723
|
-
const root = getDocumentElement(element);
|
|
4724
|
-
function cleanup() {
|
|
4725
|
-
var _io;
|
|
4726
|
-
clearTimeout(timeoutId);
|
|
4727
|
-
(_io = io) == null || _io.disconnect();
|
|
4728
|
-
io = null;
|
|
4729
|
-
}
|
|
4730
|
-
function refresh(skip, threshold) {
|
|
4731
|
-
if (skip === void 0) {
|
|
4732
|
-
skip = false;
|
|
4733
|
-
}
|
|
4734
|
-
if (threshold === void 0) {
|
|
4735
|
-
threshold = 1;
|
|
4736
|
-
}
|
|
4737
|
-
cleanup();
|
|
4738
|
-
const {
|
|
4739
|
-
left,
|
|
4740
|
-
top,
|
|
4741
|
-
width,
|
|
4742
|
-
height
|
|
4743
|
-
} = element.getBoundingClientRect();
|
|
4744
|
-
if (!skip) {
|
|
4745
|
-
onMove();
|
|
4746
|
-
}
|
|
4747
|
-
if (!width || !height) {
|
|
4748
|
-
return;
|
|
4749
|
-
}
|
|
4750
|
-
const insetTop = floor(top);
|
|
4751
|
-
const insetRight = floor(root.clientWidth - (left + width));
|
|
4752
|
-
const insetBottom = floor(root.clientHeight - (top + height));
|
|
4753
|
-
const insetLeft = floor(left);
|
|
4754
|
-
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
4755
|
-
const options = {
|
|
4756
|
-
rootMargin,
|
|
4757
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
4758
|
-
};
|
|
4759
|
-
let isFirstUpdate = true;
|
|
4760
|
-
function handleObserve(entries) {
|
|
4761
|
-
const ratio = entries[0].intersectionRatio;
|
|
4762
|
-
if (ratio !== threshold) {
|
|
4763
|
-
if (!isFirstUpdate) {
|
|
4764
|
-
return refresh();
|
|
4765
|
-
}
|
|
4766
|
-
if (!ratio) {
|
|
4767
|
-
timeoutId = setTimeout(() => {
|
|
4768
|
-
refresh(false, 1e-7);
|
|
4769
|
-
}, 1e3);
|
|
4770
|
-
} else {
|
|
4771
|
-
refresh(false, ratio);
|
|
4772
|
-
}
|
|
4773
|
-
}
|
|
4774
|
-
isFirstUpdate = false;
|
|
4775
|
-
}
|
|
4776
|
-
try {
|
|
4777
|
-
io = new IntersectionObserver(handleObserve, {
|
|
4778
|
-
...options,
|
|
4779
|
-
// Handle <iframe>s
|
|
4780
|
-
root: root.ownerDocument
|
|
4781
|
-
});
|
|
4782
|
-
} catch (e) {
|
|
4783
|
-
io = new IntersectionObserver(handleObserve, options);
|
|
4784
|
-
}
|
|
4785
|
-
io.observe(element);
|
|
4786
|
-
}
|
|
4787
|
-
refresh(true);
|
|
4788
|
-
return cleanup;
|
|
4789
|
-
}
|
|
4790
|
-
function autoUpdate(reference, floating, update, options) {
|
|
4791
|
-
if (options === void 0) {
|
|
4792
|
-
options = {};
|
|
4793
|
-
}
|
|
4794
|
-
const {
|
|
4795
|
-
ancestorScroll = true,
|
|
4796
|
-
ancestorResize = true,
|
|
4797
|
-
elementResize = typeof ResizeObserver === "function",
|
|
4798
|
-
layoutShift = typeof IntersectionObserver === "function",
|
|
4799
|
-
animationFrame = false
|
|
4800
|
-
} = options;
|
|
4801
|
-
const referenceEl = unwrapElement(reference);
|
|
4802
|
-
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
|
|
4803
|
-
ancestors.forEach((ancestor) => {
|
|
4804
|
-
ancestorScroll && ancestor.addEventListener("scroll", update, {
|
|
4805
|
-
passive: true
|
|
4806
|
-
});
|
|
4807
|
-
ancestorResize && ancestor.addEventListener("resize", update);
|
|
4808
|
-
});
|
|
4809
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
4810
|
-
let reobserveFrame = -1;
|
|
4811
|
-
let resizeObserver = null;
|
|
4812
|
-
if (elementResize) {
|
|
4813
|
-
resizeObserver = new ResizeObserver((_ref) => {
|
|
4814
|
-
let [firstEntry] = _ref;
|
|
4815
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
4816
|
-
resizeObserver.unobserve(floating);
|
|
4817
|
-
cancelAnimationFrame(reobserveFrame);
|
|
4818
|
-
reobserveFrame = requestAnimationFrame(() => {
|
|
4819
|
-
var _resizeObserver;
|
|
4820
|
-
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
4821
|
-
});
|
|
4822
|
-
}
|
|
4823
|
-
update();
|
|
4824
|
-
});
|
|
4825
|
-
if (referenceEl && !animationFrame) {
|
|
4826
|
-
resizeObserver.observe(referenceEl);
|
|
4827
|
-
}
|
|
4828
|
-
resizeObserver.observe(floating);
|
|
4829
|
-
}
|
|
4830
|
-
let frameId;
|
|
4831
|
-
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
4832
|
-
if (animationFrame) {
|
|
4833
|
-
frameLoop();
|
|
4834
|
-
}
|
|
4835
|
-
function frameLoop() {
|
|
4836
|
-
const nextRefRect = getBoundingClientRect(reference);
|
|
4837
|
-
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
|
4838
|
-
update();
|
|
4839
|
-
}
|
|
4840
|
-
prevRefRect = nextRefRect;
|
|
4841
|
-
frameId = requestAnimationFrame(frameLoop);
|
|
4842
|
-
}
|
|
4843
|
-
update();
|
|
4844
|
-
return () => {
|
|
4845
|
-
var _resizeObserver2;
|
|
4846
|
-
ancestors.forEach((ancestor) => {
|
|
4847
|
-
ancestorScroll && ancestor.removeEventListener("scroll", update);
|
|
4848
|
-
ancestorResize && ancestor.removeEventListener("resize", update);
|
|
4849
|
-
});
|
|
4850
|
-
cleanupIo == null || cleanupIo();
|
|
4851
|
-
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
4852
|
-
resizeObserver = null;
|
|
4853
|
-
if (animationFrame) {
|
|
4854
|
-
cancelAnimationFrame(frameId);
|
|
4855
|
-
}
|
|
4856
|
-
};
|
|
4857
|
-
}
|
|
4858
|
-
var offset2 = offset;
|
|
4859
|
-
var shift2 = shift;
|
|
4860
|
-
var flip2 = flip;
|
|
4861
|
-
var size2 = size;
|
|
4862
|
-
var hide2 = hide;
|
|
4863
|
-
var arrow2 = arrow;
|
|
4864
|
-
var limitShift2 = limitShift;
|
|
4865
|
-
var computePosition2 = (reference, floating, options) => {
|
|
4866
|
-
const cache = /* @__PURE__ */ new Map();
|
|
4867
|
-
const mergedOptions = {
|
|
4868
|
-
platform,
|
|
4869
|
-
...options
|
|
4870
|
-
};
|
|
4871
|
-
const platformWithCache = {
|
|
4872
|
-
...mergedOptions.platform,
|
|
4873
|
-
_c: cache
|
|
4874
|
-
};
|
|
4875
|
-
return computePosition(reference, floating, {
|
|
4876
|
-
...mergedOptions,
|
|
4877
|
-
platform: platformWithCache
|
|
4878
|
-
});
|
|
4879
|
-
};
|
|
4880
|
-
|
|
4881
|
-
// node_modules/.pnpm/@floating-ui+react-dom@2.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
4882
|
-
var React4 = __toESM(require("react"), 1);
|
|
4883
|
-
var import_react14 = require("react");
|
|
4884
|
-
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
4885
|
-
var index = typeof document !== "undefined" ? import_react14.useLayoutEffect : import_react14.useEffect;
|
|
4886
|
-
function deepEqual(a, b) {
|
|
4887
|
-
if (a === b) {
|
|
4888
|
-
return true;
|
|
4889
|
-
}
|
|
4890
|
-
if (typeof a !== typeof b) {
|
|
4891
|
-
return false;
|
|
4892
|
-
}
|
|
4893
|
-
if (typeof a === "function" && a.toString() === b.toString()) {
|
|
4894
|
-
return true;
|
|
4895
|
-
}
|
|
4896
|
-
let length;
|
|
4897
|
-
let i;
|
|
4898
|
-
let keys;
|
|
4899
|
-
if (a && b && typeof a === "object") {
|
|
4900
|
-
if (Array.isArray(a)) {
|
|
4901
|
-
length = a.length;
|
|
4902
|
-
if (length !== b.length)
|
|
4903
|
-
return false;
|
|
4904
|
-
for (i = length; i-- !== 0; ) {
|
|
4905
|
-
if (!deepEqual(a[i], b[i])) {
|
|
4906
|
-
return false;
|
|
4907
|
-
}
|
|
4908
|
-
}
|
|
4909
|
-
return true;
|
|
4910
|
-
}
|
|
4911
|
-
keys = Object.keys(a);
|
|
4912
|
-
length = keys.length;
|
|
4913
|
-
if (length !== Object.keys(b).length) {
|
|
4914
|
-
return false;
|
|
4915
|
-
}
|
|
4916
|
-
for (i = length; i-- !== 0; ) {
|
|
4917
|
-
if (!{}.hasOwnProperty.call(b, keys[i])) {
|
|
4918
|
-
return false;
|
|
4919
|
-
}
|
|
4920
|
-
}
|
|
4921
|
-
for (i = length; i-- !== 0; ) {
|
|
4922
|
-
const key = keys[i];
|
|
4923
|
-
if (key === "_owner" && a.$$typeof) {
|
|
4924
|
-
continue;
|
|
4925
|
-
}
|
|
4926
|
-
if (!deepEqual(a[key], b[key])) {
|
|
4927
|
-
return false;
|
|
4928
|
-
}
|
|
4929
|
-
}
|
|
4930
|
-
return true;
|
|
4931
|
-
}
|
|
4932
|
-
return a !== a && b !== b;
|
|
4933
|
-
}
|
|
4934
|
-
function getDPR(element) {
|
|
4935
|
-
if (typeof window === "undefined") {
|
|
4936
|
-
return 1;
|
|
4937
|
-
}
|
|
4938
|
-
const win = element.ownerDocument.defaultView || window;
|
|
4939
|
-
return win.devicePixelRatio || 1;
|
|
4940
|
-
}
|
|
4941
|
-
function roundByDPR(element, value) {
|
|
4942
|
-
const dpr = getDPR(element);
|
|
4943
|
-
return Math.round(value * dpr) / dpr;
|
|
4944
|
-
}
|
|
4945
|
-
function useLatestRef(value) {
|
|
4946
|
-
const ref = React4.useRef(value);
|
|
4947
|
-
index(() => {
|
|
4948
|
-
ref.current = value;
|
|
4949
|
-
});
|
|
4950
|
-
return ref;
|
|
4951
|
-
}
|
|
4952
|
-
function useFloating(options) {
|
|
4953
|
-
if (options === void 0) {
|
|
4954
|
-
options = {};
|
|
4955
|
-
}
|
|
4956
|
-
const {
|
|
4957
|
-
placement = "bottom",
|
|
4958
|
-
strategy = "absolute",
|
|
4959
|
-
middleware = [],
|
|
4960
|
-
platform: platform2,
|
|
4961
|
-
elements: {
|
|
4962
|
-
reference: externalReference,
|
|
4963
|
-
floating: externalFloating
|
|
4964
|
-
} = {},
|
|
4965
|
-
transform = true,
|
|
4966
|
-
whileElementsMounted,
|
|
4967
|
-
open
|
|
4968
|
-
} = options;
|
|
4969
|
-
const [data, setData] = React4.useState({
|
|
4970
|
-
x: 0,
|
|
4971
|
-
y: 0,
|
|
4972
|
-
strategy,
|
|
4973
|
-
placement,
|
|
4974
|
-
middlewareData: {},
|
|
4975
|
-
isPositioned: false
|
|
4976
|
-
});
|
|
4977
|
-
const [latestMiddleware, setLatestMiddleware] = React4.useState(middleware);
|
|
4978
|
-
if (!deepEqual(latestMiddleware, middleware)) {
|
|
4979
|
-
setLatestMiddleware(middleware);
|
|
4980
|
-
}
|
|
4981
|
-
const [_reference, _setReference] = React4.useState(null);
|
|
4982
|
-
const [_floating, _setFloating] = React4.useState(null);
|
|
4983
|
-
const setReference = React4.useCallback((node) => {
|
|
4984
|
-
if (node !== referenceRef.current) {
|
|
4985
|
-
referenceRef.current = node;
|
|
4986
|
-
_setReference(node);
|
|
4987
|
-
}
|
|
4988
|
-
}, []);
|
|
4989
|
-
const setFloating = React4.useCallback((node) => {
|
|
4990
|
-
if (node !== floatingRef.current) {
|
|
4991
|
-
floatingRef.current = node;
|
|
4992
|
-
_setFloating(node);
|
|
4993
|
-
}
|
|
4994
|
-
}, []);
|
|
4995
|
-
const referenceEl = externalReference || _reference;
|
|
4996
|
-
const floatingEl = externalFloating || _floating;
|
|
4997
|
-
const referenceRef = React4.useRef(null);
|
|
4998
|
-
const floatingRef = React4.useRef(null);
|
|
4999
|
-
const dataRef = React4.useRef(data);
|
|
5000
|
-
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
5001
|
-
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
5002
|
-
const platformRef = useLatestRef(platform2);
|
|
5003
|
-
const update = React4.useCallback(() => {
|
|
5004
|
-
if (!referenceRef.current || !floatingRef.current) {
|
|
5005
|
-
return;
|
|
5006
|
-
}
|
|
5007
|
-
const config = {
|
|
5008
|
-
placement,
|
|
5009
|
-
strategy,
|
|
5010
|
-
middleware: latestMiddleware
|
|
5011
|
-
};
|
|
5012
|
-
if (platformRef.current) {
|
|
5013
|
-
config.platform = platformRef.current;
|
|
5014
|
-
}
|
|
5015
|
-
computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
|
|
5016
|
-
const fullData = {
|
|
5017
|
-
...data2,
|
|
5018
|
-
isPositioned: true
|
|
5019
|
-
};
|
|
5020
|
-
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
|
|
5021
|
-
dataRef.current = fullData;
|
|
5022
|
-
ReactDOM.flushSync(() => {
|
|
5023
|
-
setData(fullData);
|
|
5024
|
-
});
|
|
5025
|
-
}
|
|
5026
|
-
});
|
|
5027
|
-
}, [latestMiddleware, placement, strategy, platformRef]);
|
|
5028
|
-
index(() => {
|
|
5029
|
-
if (open === false && dataRef.current.isPositioned) {
|
|
5030
|
-
dataRef.current.isPositioned = false;
|
|
5031
|
-
setData((data2) => ({
|
|
5032
|
-
...data2,
|
|
5033
|
-
isPositioned: false
|
|
5034
|
-
}));
|
|
5035
|
-
}
|
|
5036
|
-
}, [open]);
|
|
5037
|
-
const isMountedRef = React4.useRef(false);
|
|
5038
|
-
index(() => {
|
|
5039
|
-
isMountedRef.current = true;
|
|
5040
|
-
return () => {
|
|
5041
|
-
isMountedRef.current = false;
|
|
5042
|
-
};
|
|
5043
|
-
}, []);
|
|
5044
|
-
index(() => {
|
|
5045
|
-
if (referenceEl)
|
|
5046
|
-
referenceRef.current = referenceEl;
|
|
5047
|
-
if (floatingEl)
|
|
5048
|
-
floatingRef.current = floatingEl;
|
|
5049
|
-
if (referenceEl && floatingEl) {
|
|
5050
|
-
if (whileElementsMountedRef.current) {
|
|
5051
|
-
return whileElementsMountedRef.current(referenceEl, floatingEl, update);
|
|
5052
|
-
}
|
|
5053
|
-
update();
|
|
5054
|
-
}
|
|
5055
|
-
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
5056
|
-
const refs = React4.useMemo(() => ({
|
|
5057
|
-
reference: referenceRef,
|
|
5058
|
-
floating: floatingRef,
|
|
5059
|
-
setReference,
|
|
5060
|
-
setFloating
|
|
5061
|
-
}), [setReference, setFloating]);
|
|
5062
|
-
const elements = React4.useMemo(() => ({
|
|
5063
|
-
reference: referenceEl,
|
|
5064
|
-
floating: floatingEl
|
|
5065
|
-
}), [referenceEl, floatingEl]);
|
|
5066
|
-
const floatingStyles = React4.useMemo(() => {
|
|
5067
|
-
const initialStyles = {
|
|
5068
|
-
position: strategy,
|
|
5069
|
-
left: 0,
|
|
5070
|
-
top: 0
|
|
5071
|
-
};
|
|
5072
|
-
if (!elements.floating) {
|
|
5073
|
-
return initialStyles;
|
|
5074
|
-
}
|
|
5075
|
-
const x = roundByDPR(elements.floating, data.x);
|
|
5076
|
-
const y = roundByDPR(elements.floating, data.y);
|
|
5077
|
-
if (transform) {
|
|
5078
|
-
return {
|
|
5079
|
-
...initialStyles,
|
|
5080
|
-
transform: "translate(" + x + "px, " + y + "px)",
|
|
5081
|
-
...getDPR(elements.floating) >= 1.5 && {
|
|
5082
|
-
willChange: "transform"
|
|
5083
|
-
}
|
|
5084
|
-
};
|
|
5085
|
-
}
|
|
5086
|
-
return {
|
|
5087
|
-
position: strategy,
|
|
5088
|
-
left: x,
|
|
5089
|
-
top: y
|
|
5090
|
-
};
|
|
5091
|
-
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
5092
|
-
return React4.useMemo(() => ({
|
|
5093
|
-
...data,
|
|
5094
|
-
update,
|
|
5095
|
-
refs,
|
|
5096
|
-
elements,
|
|
5097
|
-
floatingStyles
|
|
5098
|
-
}), [data, update, refs, elements, floatingStyles]);
|
|
5099
|
-
}
|
|
5100
|
-
var arrow$1 = (options) => {
|
|
5101
|
-
function isRef(value) {
|
|
5102
|
-
return {}.hasOwnProperty.call(value, "current");
|
|
5103
|
-
}
|
|
5104
|
-
return {
|
|
5105
|
-
name: "arrow",
|
|
5106
|
-
options,
|
|
5107
|
-
fn(state) {
|
|
5108
|
-
const {
|
|
5109
|
-
element,
|
|
5110
|
-
padding
|
|
5111
|
-
} = typeof options === "function" ? options(state) : options;
|
|
5112
|
-
if (element && isRef(element)) {
|
|
5113
|
-
if (element.current != null) {
|
|
5114
|
-
return arrow2({
|
|
5115
|
-
element: element.current,
|
|
5116
|
-
padding
|
|
5117
|
-
}).fn(state);
|
|
5118
|
-
}
|
|
5119
|
-
return {};
|
|
5120
|
-
}
|
|
5121
|
-
if (element) {
|
|
5122
|
-
return arrow2({
|
|
5123
|
-
element,
|
|
5124
|
-
padding
|
|
5125
|
-
}).fn(state);
|
|
5126
|
-
}
|
|
5127
|
-
return {};
|
|
5128
|
-
}
|
|
5129
|
-
};
|
|
5130
|
-
};
|
|
5131
|
-
var offset3 = (options, deps) => ({
|
|
5132
|
-
...offset2(options),
|
|
5133
|
-
options: [options, deps]
|
|
5134
|
-
});
|
|
5135
|
-
var shift3 = (options, deps) => ({
|
|
5136
|
-
...shift2(options),
|
|
5137
|
-
options: [options, deps]
|
|
5138
|
-
});
|
|
5139
|
-
var limitShift3 = (options, deps) => ({
|
|
5140
|
-
...limitShift2(options),
|
|
5141
|
-
options: [options, deps]
|
|
5142
|
-
});
|
|
5143
|
-
var flip3 = (options, deps) => ({
|
|
5144
|
-
...flip2(options),
|
|
5145
|
-
options: [options, deps]
|
|
5146
|
-
});
|
|
5147
|
-
var size3 = (options, deps) => ({
|
|
5148
|
-
...size2(options),
|
|
5149
|
-
options: [options, deps]
|
|
5150
|
-
});
|
|
5151
|
-
var hide3 = (options, deps) => ({
|
|
5152
|
-
...hide2(options),
|
|
5153
|
-
options: [options, deps]
|
|
5154
|
-
});
|
|
5155
|
-
var arrow3 = (options, deps) => ({
|
|
5156
|
-
...arrow$1(options),
|
|
5157
|
-
options: [options, deps]
|
|
5158
|
-
});
|
|
5159
|
-
|
|
5160
|
-
// node_modules/.pnpm/@radix-ui+react-arrow@1.0.3_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-arrow/dist/index.mjs
|
|
5161
|
-
var import_react15 = require("react");
|
|
5162
|
-
var $7e8f5cd07187803e$export$21b07c8f274aebd5 = /* @__PURE__ */ (0, import_react15.forwardRef)((props, forwardedRef) => {
|
|
5163
|
-
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
5164
|
-
return /* @__PURE__ */ (0, import_react15.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.svg, _extends({}, arrowProps, {
|
|
5165
|
-
ref: forwardedRef,
|
|
5166
|
-
width,
|
|
5167
|
-
height,
|
|
5168
|
-
viewBox: "0 0 30 10",
|
|
5169
|
-
preserveAspectRatio: "none"
|
|
5170
|
-
}), props.asChild ? children : /* @__PURE__ */ (0, import_react15.createElement)("polygon", {
|
|
5171
|
-
points: "0,0 30,0 15,10"
|
|
5172
|
-
}));
|
|
5173
|
-
});
|
|
5174
|
-
var $7e8f5cd07187803e$export$be92b6f5f03c0fe9 = $7e8f5cd07187803e$export$21b07c8f274aebd5;
|
|
5175
|
-
|
|
5176
|
-
// node_modules/.pnpm/@radix-ui+react-use-size@1.0.1_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
5177
|
-
var import_react16 = require("react");
|
|
5178
|
-
function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
|
|
5179
|
-
const [size4, setSize] = (0, import_react16.useState)(void 0);
|
|
5180
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
5181
|
-
if (element) {
|
|
5182
|
-
setSize({
|
|
5183
|
-
width: element.offsetWidth,
|
|
5184
|
-
height: element.offsetHeight
|
|
5185
|
-
});
|
|
5186
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
5187
|
-
if (!Array.isArray(entries))
|
|
5188
|
-
return;
|
|
5189
|
-
if (!entries.length)
|
|
5190
|
-
return;
|
|
5191
|
-
const entry = entries[0];
|
|
5192
|
-
let width;
|
|
5193
|
-
let height;
|
|
5194
|
-
if ("borderBoxSize" in entry) {
|
|
5195
|
-
const borderSizeEntry = entry["borderBoxSize"];
|
|
5196
|
-
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
5197
|
-
width = borderSize["inlineSize"];
|
|
5198
|
-
height = borderSize["blockSize"];
|
|
5199
|
-
} else {
|
|
5200
|
-
width = element.offsetWidth;
|
|
5201
|
-
height = element.offsetHeight;
|
|
5202
|
-
}
|
|
5203
|
-
setSize({
|
|
5204
|
-
width,
|
|
5205
|
-
height
|
|
5206
|
-
});
|
|
5207
|
-
});
|
|
5208
|
-
resizeObserver.observe(element, {
|
|
5209
|
-
box: "border-box"
|
|
5210
|
-
});
|
|
5211
|
-
return () => resizeObserver.unobserve(element);
|
|
5212
|
-
} else
|
|
5213
|
-
setSize(void 0);
|
|
5214
|
-
}, [
|
|
5215
|
-
element
|
|
5216
|
-
]);
|
|
5217
|
-
return size4;
|
|
5218
|
-
}
|
|
5219
|
-
|
|
5220
|
-
// node_modules/.pnpm/@radix-ui+react-popper@1.1.3_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
5221
|
-
var $cf1ac5d9fe0e8206$var$POPPER_NAME = "Popper";
|
|
5222
|
-
var [$cf1ac5d9fe0e8206$var$createPopperContext, $cf1ac5d9fe0e8206$export$722aac194ae923] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($cf1ac5d9fe0e8206$var$POPPER_NAME);
|
|
5223
|
-
var [$cf1ac5d9fe0e8206$var$PopperProvider, $cf1ac5d9fe0e8206$var$usePopperContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$POPPER_NAME);
|
|
5224
|
-
var $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9 = (props) => {
|
|
5225
|
-
const { __scopePopper, children } = props;
|
|
5226
|
-
const [anchor, setAnchor] = (0, import_react17.useState)(null);
|
|
5227
|
-
return /* @__PURE__ */ (0, import_react17.createElement)($cf1ac5d9fe0e8206$var$PopperProvider, {
|
|
5228
|
-
scope: __scopePopper,
|
|
5229
|
-
anchor,
|
|
5230
|
-
onAnchorChange: setAnchor
|
|
5231
|
-
}, children);
|
|
5232
|
-
};
|
|
5233
|
-
var $cf1ac5d9fe0e8206$var$ANCHOR_NAME = "PopperAnchor";
|
|
5234
|
-
var $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d = /* @__PURE__ */ (0, import_react17.forwardRef)((props, forwardedRef) => {
|
|
5235
|
-
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
5236
|
-
const context = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$ANCHOR_NAME, __scopePopper);
|
|
5237
|
-
const ref = (0, import_react17.useRef)(null);
|
|
5238
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
5239
|
-
(0, import_react17.useEffect)(() => {
|
|
5240
|
-
context.onAnchorChange((virtualRef === null || virtualRef === void 0 ? void 0 : virtualRef.current) || ref.current);
|
|
5241
|
-
});
|
|
5242
|
-
return virtualRef ? null : /* @__PURE__ */ (0, import_react17.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, anchorProps, {
|
|
5243
|
-
ref: composedRefs
|
|
5244
|
-
}));
|
|
5245
|
-
});
|
|
5246
|
-
var $cf1ac5d9fe0e8206$var$CONTENT_NAME = "PopperContent";
|
|
5247
|
-
var [$cf1ac5d9fe0e8206$var$PopperContentProvider, $cf1ac5d9fe0e8206$var$useContentContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME);
|
|
5248
|
-
var $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /* @__PURE__ */ (0, import_react17.forwardRef)((props, forwardedRef) => {
|
|
5249
|
-
var _arrowSize$width, _arrowSize$height, _middlewareData$arrow, _middlewareData$arrow2, _middlewareData$arrow3, _middlewareData$trans, _middlewareData$trans2, _middlewareData$hide;
|
|
5250
|
-
const { __scopePopper, side = "bottom", sideOffset = 0, align = "center", alignOffset = 0, arrowPadding = 0, avoidCollisions = true, collisionBoundary = [], collisionPadding: collisionPaddingProp = 0, sticky = "partial", hideWhenDetached = false, updatePositionStrategy = "optimized", onPlaced, ...contentProps } = props;
|
|
5251
|
-
const context = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME, __scopePopper);
|
|
5252
|
-
const [content, setContent] = (0, import_react17.useState)(null);
|
|
5253
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
|
|
5254
|
-
forwardedRef,
|
|
5255
|
-
(node) => setContent(node)
|
|
5256
|
-
);
|
|
5257
|
-
const [arrow4, setArrow] = (0, import_react17.useState)(null);
|
|
5258
|
-
const arrowSize = $db6c3485150b8e66$export$1ab7ae714698c4b8(arrow4);
|
|
5259
|
-
const arrowWidth = (_arrowSize$width = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.width) !== null && _arrowSize$width !== void 0 ? _arrowSize$width : 0;
|
|
5260
|
-
const arrowHeight = (_arrowSize$height = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.height) !== null && _arrowSize$height !== void 0 ? _arrowSize$height : 0;
|
|
5261
|
-
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
|
5262
|
-
const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : {
|
|
5263
|
-
top: 0,
|
|
5264
|
-
right: 0,
|
|
5265
|
-
bottom: 0,
|
|
5266
|
-
left: 0,
|
|
5267
|
-
...collisionPaddingProp
|
|
5268
|
-
};
|
|
5269
|
-
const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [
|
|
5270
|
-
collisionBoundary
|
|
5271
|
-
];
|
|
5272
|
-
const hasExplicitBoundaries = boundary.length > 0;
|
|
5273
|
-
const detectOverflowOptions = {
|
|
5274
|
-
padding: collisionPadding,
|
|
5275
|
-
boundary: boundary.filter($cf1ac5d9fe0e8206$var$isNotNull),
|
|
5276
|
-
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
5277
|
-
altBoundary: hasExplicitBoundaries
|
|
5278
|
-
};
|
|
5279
|
-
const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({
|
|
5280
|
-
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
5281
|
-
strategy: "fixed",
|
|
5282
|
-
placement: desiredPlacement,
|
|
5283
|
-
whileElementsMounted: (...args) => {
|
|
5284
|
-
const cleanup = autoUpdate(...args, {
|
|
5285
|
-
animationFrame: updatePositionStrategy === "always"
|
|
5286
|
-
});
|
|
5287
|
-
return cleanup;
|
|
5288
|
-
},
|
|
5289
|
-
elements: {
|
|
5290
|
-
reference: context.anchor
|
|
5291
|
-
},
|
|
5292
|
-
middleware: [
|
|
5293
|
-
offset3({
|
|
5294
|
-
mainAxis: sideOffset + arrowHeight,
|
|
5295
|
-
alignmentAxis: alignOffset
|
|
5296
|
-
}),
|
|
5297
|
-
avoidCollisions && shift3({
|
|
5298
|
-
mainAxis: true,
|
|
5299
|
-
crossAxis: false,
|
|
5300
|
-
limiter: sticky === "partial" ? limitShift3() : void 0,
|
|
5301
|
-
...detectOverflowOptions
|
|
5302
|
-
}),
|
|
5303
|
-
avoidCollisions && flip3({
|
|
5304
|
-
...detectOverflowOptions
|
|
5305
|
-
}),
|
|
5306
|
-
size3({
|
|
5307
|
-
...detectOverflowOptions,
|
|
5308
|
-
apply: ({ elements, rects, availableWidth, availableHeight }) => {
|
|
5309
|
-
const { width: anchorWidth, height: anchorHeight } = rects.reference;
|
|
5310
|
-
const contentStyle = elements.floating.style;
|
|
5311
|
-
contentStyle.setProperty("--radix-popper-available-width", `${availableWidth}px`);
|
|
5312
|
-
contentStyle.setProperty("--radix-popper-available-height", `${availableHeight}px`);
|
|
5313
|
-
contentStyle.setProperty("--radix-popper-anchor-width", `${anchorWidth}px`);
|
|
5314
|
-
contentStyle.setProperty("--radix-popper-anchor-height", `${anchorHeight}px`);
|
|
5315
|
-
}
|
|
5316
|
-
}),
|
|
5317
|
-
arrow4 && arrow3({
|
|
5318
|
-
element: arrow4,
|
|
5319
|
-
padding: arrowPadding
|
|
5320
|
-
}),
|
|
5321
|
-
$cf1ac5d9fe0e8206$var$transformOrigin({
|
|
5322
|
-
arrowWidth,
|
|
5323
|
-
arrowHeight
|
|
5324
|
-
}),
|
|
5325
|
-
hideWhenDetached && hide3({
|
|
5326
|
-
strategy: "referenceHidden",
|
|
5327
|
-
...detectOverflowOptions
|
|
5328
|
-
})
|
|
5329
|
-
]
|
|
5330
|
-
});
|
|
5331
|
-
const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement);
|
|
5332
|
-
const handlePlaced = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPlaced);
|
|
5333
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
5334
|
-
if (isPositioned)
|
|
5335
|
-
handlePlaced === null || handlePlaced === void 0 || handlePlaced();
|
|
5336
|
-
}, [
|
|
5337
|
-
isPositioned,
|
|
5338
|
-
handlePlaced
|
|
5339
|
-
]);
|
|
5340
|
-
const arrowX = (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x;
|
|
5341
|
-
const arrowY = (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y;
|
|
5342
|
-
const cannotCenterArrow = ((_middlewareData$arrow3 = middlewareData.arrow) === null || _middlewareData$arrow3 === void 0 ? void 0 : _middlewareData$arrow3.centerOffset) !== 0;
|
|
5343
|
-
const [contentZIndex, setContentZIndex] = (0, import_react17.useState)();
|
|
5344
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
5345
|
-
if (content)
|
|
5346
|
-
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
5347
|
-
}, [
|
|
5348
|
-
content
|
|
5349
|
-
]);
|
|
5350
|
-
return /* @__PURE__ */ (0, import_react17.createElement)("div", {
|
|
5351
|
-
ref: refs.setFloating,
|
|
5352
|
-
"data-radix-popper-content-wrapper": "",
|
|
5353
|
-
style: {
|
|
5354
|
-
...floatingStyles,
|
|
5355
|
-
transform: isPositioned ? floatingStyles.transform : "translate(0, -200%)",
|
|
5356
|
-
// keep off the page when measuring
|
|
5357
|
-
minWidth: "max-content",
|
|
5358
|
-
zIndex: contentZIndex,
|
|
5359
|
-
["--radix-popper-transform-origin"]: [
|
|
5360
|
-
(_middlewareData$trans = middlewareData.transformOrigin) === null || _middlewareData$trans === void 0 ? void 0 : _middlewareData$trans.x,
|
|
5361
|
-
(_middlewareData$trans2 = middlewareData.transformOrigin) === null || _middlewareData$trans2 === void 0 ? void 0 : _middlewareData$trans2.y
|
|
5362
|
-
].join(" ")
|
|
5363
|
-
},
|
|
5364
|
-
dir: props.dir
|
|
5365
|
-
}, /* @__PURE__ */ (0, import_react17.createElement)($cf1ac5d9fe0e8206$var$PopperContentProvider, {
|
|
5366
|
-
scope: __scopePopper,
|
|
5367
|
-
placedSide,
|
|
5368
|
-
onArrowChange: setArrow,
|
|
5369
|
-
arrowX,
|
|
5370
|
-
arrowY,
|
|
5371
|
-
shouldHideArrow: cannotCenterArrow
|
|
5372
|
-
}, /* @__PURE__ */ (0, import_react17.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
5373
|
-
"data-side": placedSide,
|
|
5374
|
-
"data-align": placedAlign
|
|
5375
|
-
}, contentProps, {
|
|
5376
|
-
ref: composedRefs,
|
|
5377
|
-
style: {
|
|
5378
|
-
...contentProps.style,
|
|
5379
|
-
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
5380
|
-
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
5381
|
-
animation: !isPositioned ? "none" : void 0,
|
|
5382
|
-
// hide the content if using the hide middleware and should be hidden
|
|
5383
|
-
opacity: (_middlewareData$hide = middlewareData.hide) !== null && _middlewareData$hide !== void 0 && _middlewareData$hide.referenceHidden ? 0 : void 0
|
|
5384
|
-
}
|
|
5385
|
-
}))));
|
|
5386
|
-
});
|
|
5387
|
-
var $cf1ac5d9fe0e8206$var$ARROW_NAME = "PopperArrow";
|
|
5388
|
-
var $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE = {
|
|
5389
|
-
top: "bottom",
|
|
5390
|
-
right: "left",
|
|
5391
|
-
bottom: "top",
|
|
5392
|
-
left: "right"
|
|
5393
|
-
};
|
|
5394
|
-
var $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0 = /* @__PURE__ */ (0, import_react17.forwardRef)(function $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd02(props, forwardedRef) {
|
|
5395
|
-
const { __scopePopper, ...arrowProps } = props;
|
|
5396
|
-
const contentContext = $cf1ac5d9fe0e8206$var$useContentContext($cf1ac5d9fe0e8206$var$ARROW_NAME, __scopePopper);
|
|
5397
|
-
const baseSide = $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE[contentContext.placedSide];
|
|
5398
|
-
return (
|
|
5399
|
-
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
5400
|
-
// doesn't report size as we'd expect on SVG elements.
|
|
5401
|
-
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
5402
|
-
/* @__PURE__ */ (0, import_react17.createElement)("span", {
|
|
5403
|
-
ref: contentContext.onArrowChange,
|
|
5404
|
-
style: {
|
|
5405
|
-
position: "absolute",
|
|
5406
|
-
left: contentContext.arrowX,
|
|
5407
|
-
top: contentContext.arrowY,
|
|
5408
|
-
[baseSide]: 0,
|
|
5409
|
-
transformOrigin: {
|
|
5410
|
-
top: "",
|
|
5411
|
-
right: "0 0",
|
|
5412
|
-
bottom: "center 0",
|
|
5413
|
-
left: "100% 0"
|
|
5414
|
-
}[contentContext.placedSide],
|
|
5415
|
-
transform: {
|
|
5416
|
-
top: "translateY(100%)",
|
|
5417
|
-
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
5418
|
-
bottom: `rotate(180deg)`,
|
|
5419
|
-
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
5420
|
-
}[contentContext.placedSide],
|
|
5421
|
-
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
5422
|
-
}
|
|
5423
|
-
}, /* @__PURE__ */ (0, import_react17.createElement)($7e8f5cd07187803e$export$be92b6f5f03c0fe9, _extends({}, arrowProps, {
|
|
5424
|
-
ref: forwardedRef,
|
|
5425
|
-
style: {
|
|
5426
|
-
...arrowProps.style,
|
|
5427
|
-
// ensures the element can be measured correctly (mostly for if SVG)
|
|
5428
|
-
display: "block"
|
|
5429
|
-
}
|
|
5430
|
-
})))
|
|
5431
|
-
);
|
|
5432
|
-
});
|
|
5433
|
-
function $cf1ac5d9fe0e8206$var$isNotNull(value) {
|
|
5434
|
-
return value !== null;
|
|
5435
|
-
}
|
|
5436
|
-
var $cf1ac5d9fe0e8206$var$transformOrigin = (options) => ({
|
|
5437
|
-
name: "transformOrigin",
|
|
5438
|
-
options,
|
|
5439
|
-
fn(data) {
|
|
5440
|
-
var _middlewareData$arrow4, _middlewareData$arrow5, _middlewareData$arrow6, _middlewareData$arrow7, _middlewareData$arrow8;
|
|
5441
|
-
const { placement, rects, middlewareData } = data;
|
|
5442
|
-
const cannotCenterArrow = ((_middlewareData$arrow4 = middlewareData.arrow) === null || _middlewareData$arrow4 === void 0 ? void 0 : _middlewareData$arrow4.centerOffset) !== 0;
|
|
5443
|
-
const isArrowHidden = cannotCenterArrow;
|
|
5444
|
-
const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
|
|
5445
|
-
const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
|
|
5446
|
-
const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement);
|
|
5447
|
-
const noArrowAlign = {
|
|
5448
|
-
start: "0%",
|
|
5449
|
-
center: "50%",
|
|
5450
|
-
end: "100%"
|
|
5451
|
-
}[placedAlign];
|
|
5452
|
-
const arrowXCenter = ((_middlewareData$arrow5 = (_middlewareData$arrow6 = middlewareData.arrow) === null || _middlewareData$arrow6 === void 0 ? void 0 : _middlewareData$arrow6.x) !== null && _middlewareData$arrow5 !== void 0 ? _middlewareData$arrow5 : 0) + arrowWidth / 2;
|
|
5453
|
-
const arrowYCenter = ((_middlewareData$arrow7 = (_middlewareData$arrow8 = middlewareData.arrow) === null || _middlewareData$arrow8 === void 0 ? void 0 : _middlewareData$arrow8.y) !== null && _middlewareData$arrow7 !== void 0 ? _middlewareData$arrow7 : 0) + arrowHeight / 2;
|
|
5454
|
-
let x = "";
|
|
5455
|
-
let y = "";
|
|
5456
|
-
if (placedSide === "bottom") {
|
|
5457
|
-
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
5458
|
-
y = `${-arrowHeight}px`;
|
|
5459
|
-
} else if (placedSide === "top") {
|
|
5460
|
-
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
5461
|
-
y = `${rects.floating.height + arrowHeight}px`;
|
|
5462
|
-
} else if (placedSide === "right") {
|
|
5463
|
-
x = `${-arrowHeight}px`;
|
|
5464
|
-
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
5465
|
-
} else if (placedSide === "left") {
|
|
5466
|
-
x = `${rects.floating.width + arrowHeight}px`;
|
|
5467
|
-
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
5468
|
-
}
|
|
5469
|
-
return {
|
|
5470
|
-
data: {
|
|
5471
|
-
x,
|
|
5472
|
-
y
|
|
5473
|
-
}
|
|
5474
|
-
};
|
|
5475
|
-
}
|
|
5476
|
-
});
|
|
5477
|
-
function $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement) {
|
|
5478
|
-
const [side, align = "center"] = placement.split("-");
|
|
5479
|
-
return [
|
|
5480
|
-
side,
|
|
5481
|
-
align
|
|
5482
|
-
];
|
|
5483
|
-
}
|
|
5484
|
-
var $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9 = $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9;
|
|
5485
|
-
var $cf1ac5d9fe0e8206$export$b688253958b8dfe7 = $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d;
|
|
5486
|
-
var $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2 = $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc;
|
|
5487
|
-
var $cf1ac5d9fe0e8206$export$21b07c8f274aebd5 = $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0;
|
|
5488
|
-
|
|
5489
|
-
// node_modules/.pnpm/@radix-ui+react-presence@1.0.1_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
5490
|
-
var import_react18 = require("react");
|
|
5491
|
-
var import_react_dom3 = require("react-dom");
|
|
5492
|
-
function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {
|
|
5493
|
-
return (0, import_react18.useReducer)((state, event) => {
|
|
5494
|
-
const nextState = machine[state][event];
|
|
5495
|
-
return nextState !== null && nextState !== void 0 ? nextState : state;
|
|
5496
|
-
}, initialState);
|
|
5497
|
-
}
|
|
5498
|
-
var $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props) => {
|
|
5499
|
-
const { present, children } = props;
|
|
5500
|
-
const presence = $921a889cee6df7e8$var$usePresence(present);
|
|
5501
|
-
const child = typeof children === "function" ? children({
|
|
5502
|
-
present: presence.isPresent
|
|
5503
|
-
}) : import_react18.Children.only(children);
|
|
5504
|
-
const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref);
|
|
5505
|
-
const forceMount = typeof children === "function";
|
|
5506
|
-
return forceMount || presence.isPresent ? /* @__PURE__ */ (0, import_react18.cloneElement)(child, {
|
|
5507
|
-
ref
|
|
5508
|
-
}) : null;
|
|
5509
|
-
};
|
|
5510
|
-
$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = "Presence";
|
|
5511
|
-
function $921a889cee6df7e8$var$usePresence(present) {
|
|
5512
|
-
const [node1, setNode] = (0, import_react18.useState)();
|
|
5513
|
-
const stylesRef = (0, import_react18.useRef)({});
|
|
5514
|
-
const prevPresentRef = (0, import_react18.useRef)(present);
|
|
5515
|
-
const prevAnimationNameRef = (0, import_react18.useRef)("none");
|
|
5516
|
-
const initialState = present ? "mounted" : "unmounted";
|
|
5517
|
-
const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState, {
|
|
5518
|
-
mounted: {
|
|
5519
|
-
UNMOUNT: "unmounted",
|
|
5520
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
5521
|
-
},
|
|
5522
|
-
unmountSuspended: {
|
|
5523
|
-
MOUNT: "mounted",
|
|
5524
|
-
ANIMATION_END: "unmounted"
|
|
5525
|
-
},
|
|
5526
|
-
unmounted: {
|
|
5527
|
-
MOUNT: "mounted"
|
|
5528
|
-
}
|
|
5529
|
-
});
|
|
5530
|
-
(0, import_react18.useEffect)(() => {
|
|
5531
|
-
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
5532
|
-
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
5533
|
-
}, [
|
|
5534
|
-
state
|
|
5535
|
-
]);
|
|
5536
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
5537
|
-
const styles = stylesRef.current;
|
|
5538
|
-
const wasPresent = prevPresentRef.current;
|
|
5539
|
-
const hasPresentChanged = wasPresent !== present;
|
|
5540
|
-
if (hasPresentChanged) {
|
|
5541
|
-
const prevAnimationName = prevAnimationNameRef.current;
|
|
5542
|
-
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);
|
|
5543
|
-
if (present)
|
|
5544
|
-
send("MOUNT");
|
|
5545
|
-
else if (currentAnimationName === "none" || (styles === null || styles === void 0 ? void 0 : styles.display) === "none")
|
|
5546
|
-
send("UNMOUNT");
|
|
5547
|
-
else {
|
|
5548
|
-
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
5549
|
-
if (wasPresent && isAnimating)
|
|
5550
|
-
send("ANIMATION_OUT");
|
|
5551
|
-
else
|
|
5552
|
-
send("UNMOUNT");
|
|
5553
|
-
}
|
|
5554
|
-
prevPresentRef.current = present;
|
|
5555
|
-
}
|
|
5556
|
-
}, [
|
|
5557
|
-
present,
|
|
5558
|
-
send
|
|
5559
|
-
]);
|
|
5560
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
5561
|
-
if (node1) {
|
|
5562
|
-
const handleAnimationEnd = (event) => {
|
|
5563
|
-
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
5564
|
-
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
5565
|
-
if (event.target === node1 && isCurrentAnimation)
|
|
5566
|
-
(0, import_react_dom3.flushSync)(
|
|
5567
|
-
() => send("ANIMATION_END")
|
|
5568
|
-
);
|
|
5569
|
-
};
|
|
5570
|
-
const handleAnimationStart = (event) => {
|
|
5571
|
-
if (event.target === node1)
|
|
5572
|
-
prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
5573
|
-
};
|
|
5574
|
-
node1.addEventListener("animationstart", handleAnimationStart);
|
|
5575
|
-
node1.addEventListener("animationcancel", handleAnimationEnd);
|
|
5576
|
-
node1.addEventListener("animationend", handleAnimationEnd);
|
|
5577
|
-
return () => {
|
|
5578
|
-
node1.removeEventListener("animationstart", handleAnimationStart);
|
|
5579
|
-
node1.removeEventListener("animationcancel", handleAnimationEnd);
|
|
5580
|
-
node1.removeEventListener("animationend", handleAnimationEnd);
|
|
5581
|
-
};
|
|
5582
|
-
} else
|
|
5583
|
-
send("ANIMATION_END");
|
|
5584
|
-
}, [
|
|
5585
|
-
node1,
|
|
5586
|
-
send
|
|
5587
|
-
]);
|
|
5588
|
-
return {
|
|
5589
|
-
isPresent: [
|
|
5590
|
-
"mounted",
|
|
5591
|
-
"unmountSuspended"
|
|
5592
|
-
].includes(state),
|
|
5593
|
-
ref: (0, import_react18.useCallback)((node) => {
|
|
5594
|
-
if (node)
|
|
5595
|
-
stylesRef.current = getComputedStyle(node);
|
|
5596
|
-
setNode(node);
|
|
5597
|
-
}, [])
|
|
5598
|
-
};
|
|
5599
|
-
}
|
|
5600
|
-
function $921a889cee6df7e8$var$getAnimationName(styles) {
|
|
5601
|
-
return (styles === null || styles === void 0 ? void 0 : styles.animationName) || "none";
|
|
5602
|
-
}
|
|
5603
|
-
|
|
5604
|
-
// node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.0.1_@types+react@18.3.3_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
5605
|
-
var import_react19 = require("react");
|
|
5606
|
-
function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop, defaultProp, onChange = () => {
|
|
5607
|
-
} }) {
|
|
5608
|
-
const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({
|
|
5609
|
-
defaultProp,
|
|
5610
|
-
onChange
|
|
5611
|
-
});
|
|
5612
|
-
const isControlled = prop !== void 0;
|
|
5613
|
-
const value1 = isControlled ? prop : uncontrolledProp;
|
|
5614
|
-
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
5615
|
-
const setValue = (0, import_react19.useCallback)((nextValue) => {
|
|
5616
|
-
if (isControlled) {
|
|
5617
|
-
const setter = nextValue;
|
|
5618
|
-
const value = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
5619
|
-
if (value !== prop)
|
|
5620
|
-
handleChange(value);
|
|
5621
|
-
} else
|
|
5622
|
-
setUncontrolledProp(nextValue);
|
|
5623
|
-
}, [
|
|
5624
|
-
isControlled,
|
|
5625
|
-
prop,
|
|
5626
|
-
setUncontrolledProp,
|
|
5627
|
-
handleChange
|
|
5628
|
-
]);
|
|
5629
|
-
return [
|
|
5630
|
-
value1,
|
|
5631
|
-
setValue
|
|
5632
|
-
];
|
|
5633
|
-
}
|
|
5634
|
-
function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp, onChange }) {
|
|
5635
|
-
const uncontrolledState = (0, import_react19.useState)(defaultProp);
|
|
5636
|
-
const [value] = uncontrolledState;
|
|
5637
|
-
const prevValueRef = (0, import_react19.useRef)(value);
|
|
5638
|
-
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
5639
|
-
(0, import_react19.useEffect)(() => {
|
|
5640
|
-
if (prevValueRef.current !== value) {
|
|
5641
|
-
handleChange(value);
|
|
5642
|
-
prevValueRef.current = value;
|
|
5643
|
-
}
|
|
5644
|
-
}, [
|
|
5645
|
-
value,
|
|
5646
|
-
prevValueRef,
|
|
5647
|
-
handleChange
|
|
5648
|
-
]);
|
|
5649
|
-
return uncontrolledState;
|
|
5650
|
-
}
|
|
5651
|
-
|
|
5652
|
-
// node_modules/.pnpm/@radix-ui+react-visually-hidden@1.0.3_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
5653
|
-
var import_react20 = require("react");
|
|
5654
|
-
var $ea1ef594cf570d83$export$439d29a4e110a164 = /* @__PURE__ */ (0, import_react20.forwardRef)((props, forwardedRef) => {
|
|
5655
|
-
return /* @__PURE__ */ (0, import_react20.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, props, {
|
|
5656
|
-
ref: forwardedRef,
|
|
5657
|
-
style: {
|
|
5658
|
-
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
5659
|
-
position: "absolute",
|
|
5660
|
-
border: 0,
|
|
5661
|
-
width: 1,
|
|
5662
|
-
height: 1,
|
|
5663
|
-
padding: 0,
|
|
5664
|
-
margin: -1,
|
|
5665
|
-
overflow: "hidden",
|
|
5666
|
-
clip: "rect(0, 0, 0, 0)",
|
|
5667
|
-
whiteSpace: "nowrap",
|
|
5668
|
-
wordWrap: "normal",
|
|
5669
|
-
...props.style
|
|
5670
|
-
}
|
|
5671
|
-
}));
|
|
5672
|
-
});
|
|
5673
|
-
var $ea1ef594cf570d83$export$be92b6f5f03c0fe9 = $ea1ef594cf570d83$export$439d29a4e110a164;
|
|
5674
|
-
|
|
5675
|
-
// node_modules/.pnpm/@radix-ui+react-tooltip@1.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
5676
|
-
var [$a093c7e1ec25a057$var$createTooltipContext, $a093c7e1ec25a057$export$1c540a2224f0d865] = $c512c27ab02ef895$export$50c7b4e9d9f19c1("Tooltip", [
|
|
5677
|
-
$cf1ac5d9fe0e8206$export$722aac194ae923
|
|
5678
|
-
]);
|
|
5679
|
-
var $a093c7e1ec25a057$var$usePopperScope = $cf1ac5d9fe0e8206$export$722aac194ae923();
|
|
5680
|
-
var $a093c7e1ec25a057$var$PROVIDER_NAME = "TooltipProvider";
|
|
5681
|
-
var $a093c7e1ec25a057$var$TOOLTIP_OPEN = "tooltip.open";
|
|
5682
|
-
var [$a093c7e1ec25a057$var$TooltipProviderContextProvider, $a093c7e1ec25a057$var$useTooltipProviderContext] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PROVIDER_NAME);
|
|
5683
|
-
var $a093c7e1ec25a057$var$TOOLTIP_NAME = "Tooltip";
|
|
5684
|
-
var [$a093c7e1ec25a057$var$TooltipContextProvider, $a093c7e1ec25a057$var$useTooltipContext] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME);
|
|
5685
|
-
var $a093c7e1ec25a057$export$28c660c63b792dea = (props) => {
|
|
5686
|
-
const { __scopeTooltip, children, open: openProp, defaultOpen = false, onOpenChange, disableHoverableContent: disableHoverableContentProp, delayDuration: delayDurationProp } = props;
|
|
5687
|
-
const providerContext = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TOOLTIP_NAME, props.__scopeTooltip);
|
|
5688
|
-
const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);
|
|
5689
|
-
const [trigger, setTrigger] = (0, import_react21.useState)(null);
|
|
5690
|
-
const contentId = $1746a345f3d73bb7$export$f680877a34711e37();
|
|
5691
|
-
const openTimerRef = (0, import_react21.useRef)(0);
|
|
5692
|
-
const disableHoverableContent = disableHoverableContentProp !== null && disableHoverableContentProp !== void 0 ? disableHoverableContentProp : providerContext.disableHoverableContent;
|
|
5693
|
-
const delayDuration = delayDurationProp !== null && delayDurationProp !== void 0 ? delayDurationProp : providerContext.delayDuration;
|
|
5694
|
-
const wasOpenDelayedRef = (0, import_react21.useRef)(false);
|
|
5695
|
-
const [open1 = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
5696
|
-
prop: openProp,
|
|
5697
|
-
defaultProp: defaultOpen,
|
|
5698
|
-
onChange: (open) => {
|
|
5699
|
-
if (open) {
|
|
5700
|
-
providerContext.onOpen();
|
|
5701
|
-
document.dispatchEvent(new CustomEvent($a093c7e1ec25a057$var$TOOLTIP_OPEN));
|
|
5702
|
-
} else
|
|
5703
|
-
providerContext.onClose();
|
|
5704
|
-
onOpenChange === null || onOpenChange === void 0 || onOpenChange(open);
|
|
5705
|
-
}
|
|
5706
|
-
});
|
|
5707
|
-
const stateAttribute = (0, import_react21.useMemo)(() => {
|
|
5708
|
-
return open1 ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed";
|
|
5709
|
-
}, [
|
|
5710
|
-
open1
|
|
5711
|
-
]);
|
|
5712
|
-
const handleOpen = (0, import_react21.useCallback)(() => {
|
|
5713
|
-
window.clearTimeout(openTimerRef.current);
|
|
5714
|
-
wasOpenDelayedRef.current = false;
|
|
5715
|
-
setOpen(true);
|
|
5716
|
-
}, [
|
|
5717
|
-
setOpen
|
|
5718
|
-
]);
|
|
5719
|
-
const handleClose = (0, import_react21.useCallback)(() => {
|
|
5720
|
-
window.clearTimeout(openTimerRef.current);
|
|
5721
|
-
setOpen(false);
|
|
5722
|
-
}, [
|
|
5723
|
-
setOpen
|
|
5724
|
-
]);
|
|
5725
|
-
const handleDelayedOpen = (0, import_react21.useCallback)(() => {
|
|
5726
|
-
window.clearTimeout(openTimerRef.current);
|
|
5727
|
-
openTimerRef.current = window.setTimeout(() => {
|
|
5728
|
-
wasOpenDelayedRef.current = true;
|
|
5729
|
-
setOpen(true);
|
|
5730
|
-
}, delayDuration);
|
|
5731
|
-
}, [
|
|
5732
|
-
delayDuration,
|
|
5733
|
-
setOpen
|
|
5734
|
-
]);
|
|
5735
|
-
(0, import_react21.useEffect)(() => {
|
|
5736
|
-
return () => window.clearTimeout(openTimerRef.current);
|
|
5737
|
-
}, []);
|
|
5738
|
-
return /* @__PURE__ */ (0, import_react21.createElement)($cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9, popperScope, /* @__PURE__ */ (0, import_react21.createElement)($a093c7e1ec25a057$var$TooltipContextProvider, {
|
|
5739
|
-
scope: __scopeTooltip,
|
|
5740
|
-
contentId,
|
|
5741
|
-
open: open1,
|
|
5742
|
-
stateAttribute,
|
|
5743
|
-
trigger,
|
|
5744
|
-
onTriggerChange: setTrigger,
|
|
5745
|
-
onTriggerEnter: (0, import_react21.useCallback)(() => {
|
|
5746
|
-
if (providerContext.isOpenDelayed)
|
|
5747
|
-
handleDelayedOpen();
|
|
5748
|
-
else
|
|
5749
|
-
handleOpen();
|
|
5750
|
-
}, [
|
|
5751
|
-
providerContext.isOpenDelayed,
|
|
5752
|
-
handleDelayedOpen,
|
|
5753
|
-
handleOpen
|
|
5754
|
-
]),
|
|
5755
|
-
onTriggerLeave: (0, import_react21.useCallback)(() => {
|
|
5756
|
-
if (disableHoverableContent)
|
|
5757
|
-
handleClose();
|
|
5758
|
-
else
|
|
5759
|
-
window.clearTimeout(openTimerRef.current);
|
|
5760
|
-
}, [
|
|
5761
|
-
handleClose,
|
|
5762
|
-
disableHoverableContent
|
|
5763
|
-
]),
|
|
5764
|
-
onOpen: handleOpen,
|
|
5765
|
-
onClose: handleClose,
|
|
5766
|
-
disableHoverableContent
|
|
5767
|
-
}, children));
|
|
5768
|
-
};
|
|
5769
|
-
var $a093c7e1ec25a057$var$TRIGGER_NAME = "TooltipTrigger";
|
|
5770
|
-
var $a093c7e1ec25a057$export$8c610744efcf8a1d = /* @__PURE__ */ (0, import_react21.forwardRef)((props, forwardedRef) => {
|
|
5771
|
-
const { __scopeTooltip, ...triggerProps } = props;
|
|
5772
|
-
const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$TRIGGER_NAME, __scopeTooltip);
|
|
5773
|
-
const providerContext = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TRIGGER_NAME, __scopeTooltip);
|
|
5774
|
-
const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);
|
|
5775
|
-
const ref = (0, import_react21.useRef)(null);
|
|
5776
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref, context.onTriggerChange);
|
|
5777
|
-
const isPointerDownRef = (0, import_react21.useRef)(false);
|
|
5778
|
-
const hasPointerMoveOpenedRef = (0, import_react21.useRef)(false);
|
|
5779
|
-
const handlePointerUp = (0, import_react21.useCallback)(
|
|
5780
|
-
() => isPointerDownRef.current = false,
|
|
5781
|
-
[]
|
|
5782
|
-
);
|
|
5783
|
-
(0, import_react21.useEffect)(() => {
|
|
5784
|
-
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
5785
|
-
}, [
|
|
5786
|
-
handlePointerUp
|
|
5787
|
-
]);
|
|
5788
|
-
return /* @__PURE__ */ (0, import_react21.createElement)($cf1ac5d9fe0e8206$export$b688253958b8dfe7, _extends({
|
|
5789
|
-
asChild: true
|
|
5790
|
-
}, popperScope), /* @__PURE__ */ (0, import_react21.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
5791
|
-
// We purposefully avoid adding `type=button` here because tooltip triggers are also
|
|
5792
|
-
// commonly anchors and the anchor `type` attribute signifies MIME type.
|
|
5793
|
-
"aria-describedby": context.open ? context.contentId : void 0,
|
|
5794
|
-
"data-state": context.stateAttribute
|
|
5795
|
-
}, triggerProps, {
|
|
5796
|
-
ref: composedRefs,
|
|
5797
|
-
onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerMove, (event) => {
|
|
5798
|
-
if (event.pointerType === "touch")
|
|
5799
|
-
return;
|
|
5800
|
-
if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {
|
|
5801
|
-
context.onTriggerEnter();
|
|
5802
|
-
hasPointerMoveOpenedRef.current = true;
|
|
5803
|
-
}
|
|
5804
|
-
}),
|
|
5805
|
-
onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerLeave, () => {
|
|
5806
|
-
context.onTriggerLeave();
|
|
5807
|
-
hasPointerMoveOpenedRef.current = false;
|
|
5808
|
-
}),
|
|
5809
|
-
onPointerDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDown, () => {
|
|
5810
|
-
isPointerDownRef.current = true;
|
|
5811
|
-
document.addEventListener("pointerup", handlePointerUp, {
|
|
5812
|
-
once: true
|
|
5813
|
-
});
|
|
5814
|
-
}),
|
|
5815
|
-
onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocus, () => {
|
|
5816
|
-
if (!isPointerDownRef.current)
|
|
5817
|
-
context.onOpen();
|
|
5818
|
-
}),
|
|
5819
|
-
onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlur, context.onClose),
|
|
5820
|
-
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, context.onClose)
|
|
5821
|
-
})));
|
|
5822
|
-
});
|
|
5823
|
-
var $a093c7e1ec25a057$var$PORTAL_NAME = "TooltipPortal";
|
|
5824
|
-
var [$a093c7e1ec25a057$var$PortalProvider, $a093c7e1ec25a057$var$usePortalContext] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PORTAL_NAME, {
|
|
5825
|
-
forceMount: void 0
|
|
5826
|
-
});
|
|
5827
|
-
var $a093c7e1ec25a057$var$CONTENT_NAME = "TooltipContent";
|
|
5828
|
-
var $a093c7e1ec25a057$export$e9003e2be37ec060 = /* @__PURE__ */ (0, import_react21.forwardRef)((props, forwardedRef) => {
|
|
5829
|
-
const portalContext = $a093c7e1ec25a057$var$usePortalContext($a093c7e1ec25a057$var$CONTENT_NAME, props.__scopeTooltip);
|
|
5830
|
-
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
|
|
5831
|
-
const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME, props.__scopeTooltip);
|
|
5832
|
-
return /* @__PURE__ */ (0, import_react21.createElement)($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
5833
|
-
present: forceMount || context.open
|
|
5834
|
-
}, context.disableHoverableContent ? /* @__PURE__ */ (0, import_react21.createElement)($a093c7e1ec25a057$var$TooltipContentImpl, _extends({
|
|
5835
|
-
side
|
|
5836
|
-
}, contentProps, {
|
|
5837
|
-
ref: forwardedRef
|
|
5838
|
-
})) : /* @__PURE__ */ (0, import_react21.createElement)($a093c7e1ec25a057$var$TooltipContentHoverable, _extends({
|
|
5839
|
-
side
|
|
5840
|
-
}, contentProps, {
|
|
5841
|
-
ref: forwardedRef
|
|
5842
|
-
})));
|
|
5843
|
-
});
|
|
5844
|
-
var $a093c7e1ec25a057$var$TooltipContentHoverable = /* @__PURE__ */ (0, import_react21.forwardRef)((props, forwardedRef) => {
|
|
5845
|
-
const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME, props.__scopeTooltip);
|
|
5846
|
-
const providerContext = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$CONTENT_NAME, props.__scopeTooltip);
|
|
5847
|
-
const ref = (0, import_react21.useRef)(null);
|
|
5848
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
5849
|
-
const [pointerGraceArea, setPointerGraceArea] = (0, import_react21.useState)(null);
|
|
5850
|
-
const { trigger, onClose } = context;
|
|
5851
|
-
const content = ref.current;
|
|
5852
|
-
const { onPointerInTransitChange } = providerContext;
|
|
5853
|
-
const handleRemoveGraceArea = (0, import_react21.useCallback)(() => {
|
|
5854
|
-
setPointerGraceArea(null);
|
|
5855
|
-
onPointerInTransitChange(false);
|
|
5856
|
-
}, [
|
|
5857
|
-
onPointerInTransitChange
|
|
5858
|
-
]);
|
|
5859
|
-
const handleCreateGraceArea = (0, import_react21.useCallback)((event, hoverTarget) => {
|
|
5860
|
-
const currentTarget = event.currentTarget;
|
|
5861
|
-
const exitPoint = {
|
|
5862
|
-
x: event.clientX,
|
|
5863
|
-
y: event.clientY
|
|
5864
|
-
};
|
|
5865
|
-
const exitSide = $a093c7e1ec25a057$var$getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());
|
|
5866
|
-
const paddedExitPoints = $a093c7e1ec25a057$var$getPaddedExitPoints(exitPoint, exitSide);
|
|
5867
|
-
const hoverTargetPoints = $a093c7e1ec25a057$var$getPointsFromRect(hoverTarget.getBoundingClientRect());
|
|
5868
|
-
const graceArea = $a093c7e1ec25a057$var$getHull([
|
|
5869
|
-
...paddedExitPoints,
|
|
5870
|
-
...hoverTargetPoints
|
|
5871
|
-
]);
|
|
5872
|
-
setPointerGraceArea(graceArea);
|
|
5873
|
-
onPointerInTransitChange(true);
|
|
5874
|
-
}, [
|
|
5875
|
-
onPointerInTransitChange
|
|
5876
|
-
]);
|
|
5877
|
-
(0, import_react21.useEffect)(() => {
|
|
5878
|
-
return () => handleRemoveGraceArea();
|
|
5879
|
-
}, [
|
|
5880
|
-
handleRemoveGraceArea
|
|
5881
|
-
]);
|
|
5882
|
-
(0, import_react21.useEffect)(() => {
|
|
5883
|
-
if (trigger && content) {
|
|
5884
|
-
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);
|
|
5885
|
-
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
|
|
5886
|
-
trigger.addEventListener("pointerleave", handleTriggerLeave);
|
|
5887
|
-
content.addEventListener("pointerleave", handleContentLeave);
|
|
5888
|
-
return () => {
|
|
5889
|
-
trigger.removeEventListener("pointerleave", handleTriggerLeave);
|
|
5890
|
-
content.removeEventListener("pointerleave", handleContentLeave);
|
|
5891
|
-
};
|
|
5892
|
-
}
|
|
5893
|
-
}, [
|
|
5894
|
-
trigger,
|
|
5895
|
-
content,
|
|
5896
|
-
handleCreateGraceArea,
|
|
5897
|
-
handleRemoveGraceArea
|
|
5898
|
-
]);
|
|
5899
|
-
(0, import_react21.useEffect)(() => {
|
|
5900
|
-
if (pointerGraceArea) {
|
|
5901
|
-
const handleTrackPointerGrace = (event) => {
|
|
5902
|
-
const target = event.target;
|
|
5903
|
-
const pointerPosition = {
|
|
5904
|
-
x: event.clientX,
|
|
5905
|
-
y: event.clientY
|
|
5906
|
-
};
|
|
5907
|
-
const hasEnteredTarget = (trigger === null || trigger === void 0 ? void 0 : trigger.contains(target)) || (content === null || content === void 0 ? void 0 : content.contains(target));
|
|
5908
|
-
const isPointerOutsideGraceArea = !$a093c7e1ec25a057$var$isPointInPolygon(pointerPosition, pointerGraceArea);
|
|
5909
|
-
if (hasEnteredTarget)
|
|
5910
|
-
handleRemoveGraceArea();
|
|
5911
|
-
else if (isPointerOutsideGraceArea) {
|
|
5912
|
-
handleRemoveGraceArea();
|
|
5913
|
-
onClose();
|
|
5914
|
-
}
|
|
5915
|
-
};
|
|
5916
|
-
document.addEventListener("pointermove", handleTrackPointerGrace);
|
|
5917
|
-
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
5918
|
-
}
|
|
5919
|
-
}, [
|
|
5920
|
-
trigger,
|
|
5921
|
-
content,
|
|
5922
|
-
pointerGraceArea,
|
|
5923
|
-
onClose,
|
|
5924
|
-
handleRemoveGraceArea
|
|
5925
|
-
]);
|
|
5926
|
-
return /* @__PURE__ */ (0, import_react21.createElement)($a093c7e1ec25a057$var$TooltipContentImpl, _extends({}, props, {
|
|
5927
|
-
ref: composedRefs
|
|
5928
|
-
}));
|
|
5929
|
-
});
|
|
5930
|
-
var [$a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider, $a093c7e1ec25a057$var$useVisuallyHiddenContentContext] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME, {
|
|
5931
|
-
isInside: false
|
|
5932
|
-
});
|
|
5933
|
-
var $a093c7e1ec25a057$var$TooltipContentImpl = /* @__PURE__ */ (0, import_react21.forwardRef)((props, forwardedRef) => {
|
|
5934
|
-
const { __scopeTooltip, children, "aria-label": ariaLabel, onEscapeKeyDown, onPointerDownOutside, ...contentProps } = props;
|
|
5935
|
-
const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME, __scopeTooltip);
|
|
5936
|
-
const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);
|
|
5937
|
-
const { onClose } = context;
|
|
5938
|
-
(0, import_react21.useEffect)(() => {
|
|
5939
|
-
document.addEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN, onClose);
|
|
5940
|
-
return () => document.removeEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN, onClose);
|
|
5941
|
-
}, [
|
|
5942
|
-
onClose
|
|
5943
|
-
]);
|
|
5944
|
-
(0, import_react21.useEffect)(() => {
|
|
5945
|
-
if (context.trigger) {
|
|
5946
|
-
const handleScroll = (event) => {
|
|
5947
|
-
const target = event.target;
|
|
5948
|
-
if (target !== null && target !== void 0 && target.contains(context.trigger))
|
|
5949
|
-
onClose();
|
|
5950
|
-
};
|
|
5951
|
-
window.addEventListener("scroll", handleScroll, {
|
|
5952
|
-
capture: true
|
|
5953
|
-
});
|
|
5954
|
-
return () => window.removeEventListener("scroll", handleScroll, {
|
|
5955
|
-
capture: true
|
|
5956
|
-
});
|
|
5957
|
-
}
|
|
5958
|
-
}, [
|
|
5959
|
-
context.trigger,
|
|
5960
|
-
onClose
|
|
5961
|
-
]);
|
|
5962
|
-
return /* @__PURE__ */ (0, import_react21.createElement)($5cb92bef7577960e$export$177fb62ff3ec1f22, {
|
|
5963
|
-
asChild: true,
|
|
5964
|
-
disableOutsidePointerEvents: false,
|
|
5965
|
-
onEscapeKeyDown,
|
|
5966
|
-
onPointerDownOutside,
|
|
5967
|
-
onFocusOutside: (event) => event.preventDefault(),
|
|
5968
|
-
onDismiss: onClose
|
|
5969
|
-
}, /* @__PURE__ */ (0, import_react21.createElement)($cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2, _extends({
|
|
5970
|
-
"data-state": context.stateAttribute
|
|
5971
|
-
}, popperScope, contentProps, {
|
|
5972
|
-
ref: forwardedRef,
|
|
5973
|
-
style: {
|
|
5974
|
-
...contentProps.style,
|
|
5975
|
-
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
5976
|
-
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
5977
|
-
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
5978
|
-
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
5979
|
-
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
5980
|
-
}
|
|
5981
|
-
}), /* @__PURE__ */ (0, import_react21.createElement)($5e63c961fc1ce211$export$d9f1ccf0bdb05d45, null, children), /* @__PURE__ */ (0, import_react21.createElement)($a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider, {
|
|
5982
|
-
scope: __scopeTooltip,
|
|
5983
|
-
isInside: true
|
|
5984
|
-
}, /* @__PURE__ */ (0, import_react21.createElement)($ea1ef594cf570d83$export$be92b6f5f03c0fe9, {
|
|
5985
|
-
id: context.contentId,
|
|
5986
|
-
role: "tooltip"
|
|
5987
|
-
}, ariaLabel || children))));
|
|
5988
|
-
});
|
|
5989
|
-
var $a093c7e1ec25a057$var$ARROW_NAME = "TooltipArrow";
|
|
5990
|
-
var $a093c7e1ec25a057$export$c27ee0ad710f7559 = /* @__PURE__ */ (0, import_react21.forwardRef)((props, forwardedRef) => {
|
|
5991
|
-
const { __scopeTooltip, ...arrowProps } = props;
|
|
5992
|
-
const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);
|
|
5993
|
-
const visuallyHiddenContentContext = $a093c7e1ec25a057$var$useVisuallyHiddenContentContext($a093c7e1ec25a057$var$ARROW_NAME, __scopeTooltip);
|
|
5994
|
-
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ (0, import_react21.createElement)($cf1ac5d9fe0e8206$export$21b07c8f274aebd5, _extends({}, popperScope, arrowProps, {
|
|
5995
|
-
ref: forwardedRef
|
|
5996
|
-
}));
|
|
5997
|
-
});
|
|
5998
|
-
function $a093c7e1ec25a057$var$getExitSideFromRect(point, rect) {
|
|
5999
|
-
const top = Math.abs(rect.top - point.y);
|
|
6000
|
-
const bottom = Math.abs(rect.bottom - point.y);
|
|
6001
|
-
const right = Math.abs(rect.right - point.x);
|
|
6002
|
-
const left = Math.abs(rect.left - point.x);
|
|
6003
|
-
switch (Math.min(top, bottom, right, left)) {
|
|
6004
|
-
case left:
|
|
6005
|
-
return "left";
|
|
6006
|
-
case right:
|
|
6007
|
-
return "right";
|
|
6008
|
-
case top:
|
|
6009
|
-
return "top";
|
|
6010
|
-
case bottom:
|
|
6011
|
-
return "bottom";
|
|
6012
|
-
default:
|
|
6013
|
-
throw new Error("unreachable");
|
|
6014
|
-
}
|
|
6015
|
-
}
|
|
6016
|
-
function $a093c7e1ec25a057$var$getPaddedExitPoints(exitPoint, exitSide, padding = 5) {
|
|
6017
|
-
const paddedExitPoints = [];
|
|
6018
|
-
switch (exitSide) {
|
|
6019
|
-
case "top":
|
|
6020
|
-
paddedExitPoints.push({
|
|
6021
|
-
x: exitPoint.x - padding,
|
|
6022
|
-
y: exitPoint.y + padding
|
|
6023
|
-
}, {
|
|
6024
|
-
x: exitPoint.x + padding,
|
|
6025
|
-
y: exitPoint.y + padding
|
|
6026
|
-
});
|
|
6027
|
-
break;
|
|
6028
|
-
case "bottom":
|
|
6029
|
-
paddedExitPoints.push({
|
|
6030
|
-
x: exitPoint.x - padding,
|
|
6031
|
-
y: exitPoint.y - padding
|
|
6032
|
-
}, {
|
|
6033
|
-
x: exitPoint.x + padding,
|
|
6034
|
-
y: exitPoint.y - padding
|
|
6035
|
-
});
|
|
6036
|
-
break;
|
|
6037
|
-
case "left":
|
|
6038
|
-
paddedExitPoints.push({
|
|
6039
|
-
x: exitPoint.x + padding,
|
|
6040
|
-
y: exitPoint.y - padding
|
|
6041
|
-
}, {
|
|
6042
|
-
x: exitPoint.x + padding,
|
|
6043
|
-
y: exitPoint.y + padding
|
|
6044
|
-
});
|
|
6045
|
-
break;
|
|
6046
|
-
case "right":
|
|
6047
|
-
paddedExitPoints.push({
|
|
6048
|
-
x: exitPoint.x - padding,
|
|
6049
|
-
y: exitPoint.y - padding
|
|
6050
|
-
}, {
|
|
6051
|
-
x: exitPoint.x - padding,
|
|
6052
|
-
y: exitPoint.y + padding
|
|
6053
|
-
});
|
|
6054
|
-
break;
|
|
6055
|
-
}
|
|
6056
|
-
return paddedExitPoints;
|
|
6057
|
-
}
|
|
6058
|
-
function $a093c7e1ec25a057$var$getPointsFromRect(rect) {
|
|
6059
|
-
const { top, right, bottom, left } = rect;
|
|
6060
|
-
return [
|
|
6061
|
-
{
|
|
6062
|
-
x: left,
|
|
6063
|
-
y: top
|
|
6064
|
-
},
|
|
6065
|
-
{
|
|
6066
|
-
x: right,
|
|
6067
|
-
y: top
|
|
6068
|
-
},
|
|
6069
|
-
{
|
|
6070
|
-
x: right,
|
|
6071
|
-
y: bottom
|
|
6072
|
-
},
|
|
6073
|
-
{
|
|
6074
|
-
x: left,
|
|
6075
|
-
y: bottom
|
|
6076
|
-
}
|
|
6077
|
-
];
|
|
6078
|
-
}
|
|
6079
|
-
function $a093c7e1ec25a057$var$isPointInPolygon(point, polygon) {
|
|
6080
|
-
const { x, y } = point;
|
|
6081
|
-
let inside = false;
|
|
6082
|
-
for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
|
|
6083
|
-
const xi = polygon[i].x;
|
|
6084
|
-
const yi = polygon[i].y;
|
|
6085
|
-
const xj = polygon[j].x;
|
|
6086
|
-
const yj = polygon[j].y;
|
|
6087
|
-
const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
|
|
6088
|
-
if (intersect)
|
|
6089
|
-
inside = !inside;
|
|
6090
|
-
}
|
|
6091
|
-
return inside;
|
|
6092
|
-
}
|
|
6093
|
-
function $a093c7e1ec25a057$var$getHull(points) {
|
|
6094
|
-
const newPoints = points.slice();
|
|
6095
|
-
newPoints.sort((a, b) => {
|
|
6096
|
-
if (a.x < b.x)
|
|
6097
|
-
return -1;
|
|
6098
|
-
else if (a.x > b.x)
|
|
6099
|
-
return 1;
|
|
6100
|
-
else if (a.y < b.y)
|
|
6101
|
-
return -1;
|
|
6102
|
-
else if (a.y > b.y)
|
|
6103
|
-
return 1;
|
|
6104
|
-
else
|
|
6105
|
-
return 0;
|
|
6106
|
-
});
|
|
6107
|
-
return $a093c7e1ec25a057$var$getHullPresorted(newPoints);
|
|
6108
|
-
}
|
|
6109
|
-
function $a093c7e1ec25a057$var$getHullPresorted(points) {
|
|
6110
|
-
if (points.length <= 1)
|
|
6111
|
-
return points.slice();
|
|
6112
|
-
const upperHull = [];
|
|
6113
|
-
for (let i = 0; i < points.length; i++) {
|
|
6114
|
-
const p = points[i];
|
|
6115
|
-
while (upperHull.length >= 2) {
|
|
6116
|
-
const q = upperHull[upperHull.length - 1];
|
|
6117
|
-
const r2 = upperHull[upperHull.length - 2];
|
|
6118
|
-
if ((q.x - r2.x) * (p.y - r2.y) >= (q.y - r2.y) * (p.x - r2.x))
|
|
6119
|
-
upperHull.pop();
|
|
6120
|
-
else
|
|
6121
|
-
break;
|
|
6122
|
-
}
|
|
6123
|
-
upperHull.push(p);
|
|
6124
|
-
}
|
|
6125
|
-
upperHull.pop();
|
|
6126
|
-
const lowerHull = [];
|
|
6127
|
-
for (let i1 = points.length - 1; i1 >= 0; i1--) {
|
|
6128
|
-
const p = points[i1];
|
|
6129
|
-
while (lowerHull.length >= 2) {
|
|
6130
|
-
const q = lowerHull[lowerHull.length - 1];
|
|
6131
|
-
const r2 = lowerHull[lowerHull.length - 2];
|
|
6132
|
-
if ((q.x - r2.x) * (p.y - r2.y) >= (q.y - r2.y) * (p.x - r2.x))
|
|
6133
|
-
lowerHull.pop();
|
|
6134
|
-
else
|
|
6135
|
-
break;
|
|
6136
|
-
}
|
|
6137
|
-
lowerHull.push(p);
|
|
6138
|
-
}
|
|
6139
|
-
lowerHull.pop();
|
|
6140
|
-
if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y)
|
|
6141
|
-
return upperHull;
|
|
6142
|
-
else
|
|
6143
|
-
return upperHull.concat(lowerHull);
|
|
6144
|
-
}
|
|
6145
|
-
var $a093c7e1ec25a057$export$be92b6f5f03c0fe9 = $a093c7e1ec25a057$export$28c660c63b792dea;
|
|
6146
|
-
|
|
6147
|
-
// src/components/tooltip.tsx
|
|
2831
|
+
var import_react6 = __toESM(require("react"));
|
|
2832
|
+
var import_react_tooltip = require("@radix-ui/react-tooltip");
|
|
2833
|
+
var TooltipProvider = import_react_tooltip.TooltipProvider;
|
|
6148
2834
|
var Tooltip = ({
|
|
6149
2835
|
children,
|
|
6150
2836
|
content,
|
|
@@ -6152,16 +2838,16 @@ var Tooltip = ({
|
|
|
6152
2838
|
defaultOpen,
|
|
6153
2839
|
onOpenChange,
|
|
6154
2840
|
className,
|
|
6155
|
-
size
|
|
2841
|
+
size = "medium",
|
|
6156
2842
|
...props
|
|
6157
2843
|
}) => {
|
|
6158
|
-
return /* @__PURE__ */
|
|
6159
|
-
|
|
2844
|
+
return /* @__PURE__ */ import_react6.default.createElement(import_react_tooltip.Root, { open, defaultOpen, onOpenChange }, /* @__PURE__ */ import_react6.default.createElement(import_react_tooltip.TooltipTrigger, { asChild: true }, children), /* @__PURE__ */ import_react6.default.createElement(
|
|
2845
|
+
import_react_tooltip.TooltipContent,
|
|
6160
2846
|
{
|
|
6161
2847
|
className: cn(
|
|
6162
2848
|
"max-w-[20.5rem] rounded bg-neutral-900 text-sm leading-[120%] text-neutral-50",
|
|
6163
|
-
|
|
6164
|
-
|
|
2849
|
+
size === "small" && "p-2",
|
|
2850
|
+
size === "medium" && "p-4",
|
|
6165
2851
|
className
|
|
6166
2852
|
),
|
|
6167
2853
|
side: "bottom",
|
|
@@ -6169,7 +2855,7 @@ var Tooltip = ({
|
|
|
6169
2855
|
...props
|
|
6170
2856
|
},
|
|
6171
2857
|
content,
|
|
6172
|
-
/* @__PURE__ */
|
|
2858
|
+
/* @__PURE__ */ import_react6.default.createElement(import_react_tooltip.TooltipArrow, { width: 16, height: 8, className: "fill-neutral-900" })
|
|
6173
2859
|
));
|
|
6174
2860
|
};
|
|
6175
2861
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -6177,7 +2863,8 @@ var Tooltip = ({
|
|
|
6177
2863
|
Alert,
|
|
6178
2864
|
Button,
|
|
6179
2865
|
IconButton,
|
|
6180
|
-
Tooltip
|
|
2866
|
+
Tooltip,
|
|
2867
|
+
TooltipProvider
|
|
6181
2868
|
});
|
|
6182
2869
|
/*! Bundled license information:
|
|
6183
2870
|
|