@sanity/ui 3.0.15-canary.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- var theme = require("@sanity/ui/theme"), jsxRuntime = require("react/jsx-runtime"), react = require("react"), styledComponents = require("styled-components"), ReactIs = require("react-is"), icons = require("@sanity/icons"), reactDom$1 = require("@floating-ui/react-dom"), framerMotion = require("framer-motion"), resizeObserver = require("@juggle/resize-observer"), reactDom = require("react-dom"), useEffectEvent = require("use-effect-event");
2
+ var theme = require("@sanity/ui/theme"), jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), react = require("react"), styledComponents = require("styled-components"), ReactIs = require("react-is"), icons = require("@sanity/icons"), reactDom$1 = require("@floating-ui/react-dom"), framerMotion = require("framer-motion"), resizeObserver = require("@juggle/resize-observer"), reactDom = require("react-dom"), useEffectEvent = require("use-effect-event");
3
3
  function _interopDefaultCompat(e) {
4
4
  return e && typeof e == "object" && "default" in e ? e : { default: e };
5
5
  }
@@ -207,15 +207,42 @@ function createGlobalScopedContext(key2, defaultValue) {
207
207
  }
208
208
  const ThemeContext = createGlobalScopedContext("@sanity/ui/context/theme", null);
209
209
  function ThemeProvider(props) {
210
- const parentTheme = react.useContext(ThemeContext), {
210
+ const $ = reactCompilerRuntime.c(15), parentTheme = react.useContext(ThemeContext), {
211
211
  children
212
- } = props, scheme = props.scheme ?? (parentTheme?.scheme || "light"), rootTheme = props.theme ?? (parentTheme?.theme || null), tone = props.tone ?? (parentTheme?.tone || "default"), themeContext = react.useMemo(() => rootTheme ? {
213
- version: 0,
214
- theme: rootTheme,
215
- scheme,
216
- tone
217
- } : null, [rootTheme, scheme, tone]), theme$1 = react.useMemo(() => rootTheme ? theme.getScopedTheme(rootTheme, scheme, tone) : null, [scheme, rootTheme, tone]);
218
- return theme$1 ? /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: themeContext, children: /* @__PURE__ */ jsxRuntime.jsx(styledComponents.ThemeProvider, { theme: theme$1, children }) }) : /* @__PURE__ */ jsxRuntime.jsx("pre", { children: 'ThemeProvider: no "theme" property provided' });
212
+ } = props, scheme = props.scheme ?? (parentTheme?.scheme || "light"), rootTheme = props.theme ?? (parentTheme?.theme || null), tone = props.tone ?? (parentTheme?.tone || "default");
213
+ let t0;
214
+ bb0: {
215
+ if (!rootTheme) {
216
+ t0 = null;
217
+ break bb0;
218
+ }
219
+ let t12;
220
+ $[0] !== rootTheme || $[1] !== scheme || $[2] !== tone ? (t12 = {
221
+ version: 0,
222
+ theme: rootTheme,
223
+ scheme,
224
+ tone
225
+ }, $[0] = rootTheme, $[1] = scheme, $[2] = tone, $[3] = t12) : t12 = $[3], t0 = t12;
226
+ }
227
+ const themeContext = t0;
228
+ let t1;
229
+ bb1: {
230
+ if (!rootTheme) {
231
+ t1 = null;
232
+ break bb1;
233
+ }
234
+ let t22;
235
+ $[4] !== rootTheme || $[5] !== scheme || $[6] !== tone ? (t22 = theme.getScopedTheme(rootTheme, scheme, tone), $[4] = rootTheme, $[5] = scheme, $[6] = tone, $[7] = t22) : t22 = $[7], t1 = t22;
236
+ }
237
+ const theme$1 = t1;
238
+ if (!theme$1) {
239
+ let t22;
240
+ return $[8] === Symbol.for("react.memo_cache_sentinel") ? (t22 = /* @__PURE__ */ jsxRuntime.jsx("pre", { children: 'ThemeProvider: no "theme" property provided' }), $[8] = t22) : t22 = $[8], t22;
241
+ }
242
+ let t2;
243
+ $[9] !== children || $[10] !== theme$1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(styledComponents.ThemeProvider, { theme: theme$1, children }), $[9] = children, $[10] = theme$1, $[11] = t2) : t2 = $[11];
244
+ let t3;
245
+ return $[12] !== t2 || $[13] !== themeContext ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: themeContext, children: t2 }), $[12] = t2, $[13] = themeContext, $[14] = t3) : t3 = $[14], t3;
219
246
  }
220
247
  ThemeProvider.displayName = "ThemeProvider";
221
248
  function useRootTheme() {
@@ -225,19 +252,22 @@ function useRootTheme() {
225
252
  return value;
226
253
  }
227
254
  function ThemeColorProvider(props) {
228
- const {
255
+ const $ = reactCompilerRuntime.c(5), {
229
256
  children,
230
257
  scheme,
231
258
  tone
232
- } = props, root = useRootTheme();
233
- return /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { scheme: scheme || root.scheme, theme: root.theme, tone, children });
259
+ } = props, root = useRootTheme(), t0 = scheme || root.scheme;
260
+ let t1;
261
+ return $[0] !== children || $[1] !== root.theme || $[2] !== t0 || $[3] !== tone ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { scheme: t0, theme: root.theme, tone, children }), $[0] = children, $[1] = root.theme, $[2] = t0, $[3] = tone, $[4] = t1) : t1 = $[4], t1;
234
262
  }
235
263
  ThemeColorProvider.displayName = "ThemeColorProvider";
236
264
  function useTheme() {
237
265
  return styledComponents.useTheme();
238
266
  }
239
267
  function useTheme_v2() {
240
- return theme.getTheme_v2(styledComponents.useTheme());
268
+ const $ = reactCompilerRuntime.c(2), t0 = styledComponents.useTheme();
269
+ let t1;
270
+ return $[0] !== t0 ? (t1 = theme.getTheme_v2(t0), $[0] = t0, $[1] = t1) : t1 = $[1], t1;
241
271
  }
242
272
  function responsiveBorderStyle() {
243
273
  return [border, borderTop, borderRight, borderBottom, borderLeft];
@@ -952,18 +982,33 @@ const StyledLabel = /* @__PURE__ */ styledComponents.styled.div.withConfig({
952
982
  displayName: "StyledLabel",
953
983
  componentId: "sc-1luap7z-0"
954
984
  })(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), Label = react.forwardRef(function(props, ref) {
955
- const {
985
+ const $ = reactCompilerRuntime.c(26);
986
+ let accent, align, childrenProp, restProps, t0, t1, textOverflow, weight;
987
+ $[0] !== props ? ({
956
988
  accent,
957
989
  align,
958
990
  children: childrenProp,
959
- muted = !1,
960
- size: size2 = 2,
991
+ muted: t0,
992
+ size: t1,
961
993
  textOverflow,
962
994
  weight,
963
995
  ...restProps
964
- } = props;
996
+ } = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = childrenProp, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = textOverflow, $[8] = weight) : (accent = $[1], align = $[2], childrenProp = $[3], restProps = $[4], t0 = $[5], t1 = $[6], textOverflow = $[7], weight = $[8]);
997
+ const muted = t0 === void 0 ? !1 : t0, size2 = t1 === void 0 ? 2 : t1;
965
998
  let children = childrenProp;
966
- return textOverflow === "ellipsis" ? children = /* @__PURE__ */ jsxRuntime.jsx(SpanWithTextOverflow, { children }) : children = /* @__PURE__ */ jsxRuntime.jsx("span", { children }), /* @__PURE__ */ jsxRuntime.jsx(StyledLabel, { "data-ui": "Label", ...restProps, $accent: accent, $align: _getArrayProp(align), $muted: muted, $size: _getArrayProp(size2), $weight: weight, ref, children });
999
+ if (textOverflow === "ellipsis") {
1000
+ let t22;
1001
+ $[9] !== children ? (t22 = /* @__PURE__ */ jsxRuntime.jsx(SpanWithTextOverflow, { children }), $[9] = children, $[10] = t22) : t22 = $[10], children = t22;
1002
+ } else {
1003
+ let t22;
1004
+ $[11] !== children ? (t22 = /* @__PURE__ */ jsxRuntime.jsx("span", { children }), $[11] = children, $[12] = t22) : t22 = $[12], children = t22;
1005
+ }
1006
+ let t2;
1007
+ $[13] !== align ? (t2 = _getArrayProp(align), $[13] = align, $[14] = t2) : t2 = $[14];
1008
+ let t3;
1009
+ $[15] !== size2 ? (t3 = _getArrayProp(size2), $[15] = size2, $[16] = t3) : t3 = $[16];
1010
+ let t4;
1011
+ return $[17] !== accent || $[18] !== children || $[19] !== muted || $[20] !== ref || $[21] !== restProps || $[22] !== t2 || $[23] !== t3 || $[24] !== weight ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(StyledLabel, { "data-ui": "Label", ...restProps, $accent: accent, $align: t2, $muted: muted, $size: t3, $weight: weight, ref, children }), $[17] = accent, $[18] = children, $[19] = muted, $[20] = ref, $[21] = restProps, $[22] = t2, $[23] = t3, $[24] = weight, $[25] = t4) : t4 = $[25], t4;
967
1012
  });
968
1013
  Label.displayName = "ForwardRef(Label)";
969
1014
  const avatarStyle = {
@@ -1133,44 +1178,62 @@ const StyledAvatar = /* @__PURE__ */ styledComponents.styled.div.withConfig({
1133
1178
  displayName: "AvatarImage",
1134
1179
  componentId: "sc-1rj7kl0-6"
1135
1180
  })(avatarStyle.image), Avatar = react.forwardRef(function(props, ref) {
1136
- const {
1181
+ const $ = reactCompilerRuntime.c(46);
1182
+ let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, restProps, src, t0, t1, t2, title;
1183
+ $[0] !== props ? ({
1137
1184
  __unstable_hideInnerStroke,
1138
1185
  as: asProp,
1139
- color = "gray",
1186
+ color: t0,
1140
1187
  src,
1141
1188
  title,
1142
1189
  initials,
1143
1190
  onImageLoadError,
1144
1191
  arrowPosition: arrowPositionProp,
1145
1192
  animateArrowFrom,
1146
- status = "online",
1147
- size: sizeProp = 1,
1193
+ status: t1,
1194
+ size: t2,
1148
1195
  ...restProps
1149
- } = props, {
1196
+ } = props, $[0] = props, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = asProp, $[5] = initials, $[6] = onImageLoadError, $[7] = restProps, $[8] = src, $[9] = t0, $[10] = t1, $[11] = t2, $[12] = title) : (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], asProp = $[4], initials = $[5], onImageLoadError = $[6], restProps = $[7], src = $[8], t0 = $[9], t1 = $[10], t2 = $[11], title = $[12]);
1197
+ const color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, {
1150
1198
  avatar
1151
1199
  } = useTheme_v2(), as = ReactIs__default.default.isValidElementType(asProp) ? asProp : "div", size2 = _getArrayProp(sizeProp), _sizeRem = (avatar.sizes[size2[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = react.useId(), [arrowPosition, setArrowPosition] = react.useState(animateArrowFrom || arrowPositionProp || "inside"), [imageFailed, setImageFailed] = react.useState(!1), imageId = `avatar-image-${elementId}`;
1152
- react.useEffect(() => {
1153
- if (arrowPosition === arrowPositionProp) return;
1200
+ let t3, t4;
1201
+ $[13] !== arrowPosition || $[14] !== arrowPositionProp ? (t3 = () => {
1202
+ if (arrowPosition === arrowPositionProp)
1203
+ return;
1154
1204
  const raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
1155
1205
  return () => cancelAnimationFrame(raf);
1156
- }, [arrowPosition, arrowPositionProp]), react.useEffect(() => {
1206
+ }, t4 = [arrowPosition, arrowPositionProp], $[13] = arrowPosition, $[14] = arrowPositionProp, $[15] = t3, $[16] = t4) : (t3 = $[15], t4 = $[16]), react.useEffect(t3, t4);
1207
+ let t5, t6;
1208
+ $[17] !== src ? (t5 = () => {
1157
1209
  src && setImageFailed(!1);
1158
- }, [src]);
1159
- const handleImageError = react.useCallback(() => {
1210
+ }, t6 = [src], $[17] = src, $[18] = t5, $[19] = t6) : (t5 = $[18], t6 = $[19]), react.useEffect(t5, t6);
1211
+ let t7;
1212
+ $[20] !== onImageLoadError ? (t7 = () => {
1160
1213
  setImageFailed(!0), onImageLoadError && onImageLoadError(new Error("Avatar: the image failed to load"));
1161
- }, [onImageLoadError]);
1162
- return /* @__PURE__ */ jsxRuntime.jsxs(StyledAvatar, { as, "data-as": typeof as == "string" ? as : void 0, "data-ui": "Avatar", ...restProps, $color: color, $size: size2, "aria-label": title, "data-arrow-position": arrowPosition, "data-status": status, ref, title, children: [
1163
- /* @__PURE__ */ jsxRuntime.jsx(Arrow$1, { children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }),
1164
- !imageFailed && src && /* @__PURE__ */ jsxRuntime.jsxs(AvatarImage, { viewBox: `0 0 ${_sizeRem} ${_sizeRem}`, fill: "none", children: [
1165
- /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("pattern", { id: imageId, patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ jsxRuntime.jsx("image", { href: src, width: "1", height: "1", onError: handleImageError }) }) }),
1166
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: _radius, cy: _radius, r: _radius, fill: `url(#${imageId})` }),
1167
- !__unstable_hideInnerStroke && /* @__PURE__ */ jsxRuntime.jsx(BgStroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" }),
1168
- /* @__PURE__ */ jsxRuntime.jsx(Stroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" })
1169
- ] }),
1170
- (imageFailed || !src) && initials && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(Initials, { children: /* @__PURE__ */ jsxRuntime.jsx(InitialsLabel, { forwardedAs: "span", size: size2.map((s) => s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0), weight: "medium", children: initials }) }) })
1171
- ] });
1214
+ }, $[20] = onImageLoadError, $[21] = t7) : t7 = $[21];
1215
+ const handleImageError = t7, T0 = StyledAvatar, t8 = typeof as == "string" ? as : void 0, t9 = "Avatar";
1216
+ let t10;
1217
+ $[22] !== color ? (t10 = /* @__PURE__ */ jsxRuntime.jsx(Arrow$1, { children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }), $[22] = color, $[23] = t10) : t10 = $[23];
1218
+ let t11;
1219
+ $[24] !== __unstable_hideInnerStroke || $[25] !== _radius || $[26] !== _sizeRem || $[27] !== handleImageError || $[28] !== imageFailed || $[29] !== imageId || $[30] !== src ? (t11 = !imageFailed && src && /* @__PURE__ */ jsxRuntime.jsxs(AvatarImage, { viewBox: `0 0 ${_sizeRem} ${_sizeRem}`, fill: "none", children: [
1220
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("pattern", { id: imageId, patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ jsxRuntime.jsx("image", { href: src, width: "1", height: "1", onError: handleImageError }) }) }),
1221
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: _radius, cy: _radius, r: _radius, fill: `url(#${imageId})` }),
1222
+ !__unstable_hideInnerStroke && /* @__PURE__ */ jsxRuntime.jsx(BgStroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" }),
1223
+ /* @__PURE__ */ jsxRuntime.jsx(Stroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" })
1224
+ ] }), $[24] = __unstable_hideInnerStroke, $[25] = _radius, $[26] = _sizeRem, $[27] = handleImageError, $[28] = imageFailed, $[29] = imageId, $[30] = src, $[31] = t11) : t11 = $[31];
1225
+ const t12 = (imageFailed || !src) && initials && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(Initials, { children: /* @__PURE__ */ jsxRuntime.jsx(InitialsLabel, { forwardedAs: "span", size: size2.map(_temp$a), weight: "medium", children: initials }) }) });
1226
+ let t13;
1227
+ return $[32] !== T0 || $[33] !== arrowPosition || $[34] !== as || $[35] !== color || $[36] !== ref || $[37] !== restProps || $[38] !== size2 || $[39] !== status || $[40] !== t10 || $[41] !== t11 || $[42] !== t12 || $[43] !== t8 || $[44] !== title ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs(T0, { as, "data-as": t8, "data-ui": t9, ...restProps, $color: color, $size: size2, "aria-label": title, "data-arrow-position": arrowPosition, "data-status": status, ref, title, children: [
1228
+ t10,
1229
+ t11,
1230
+ t12
1231
+ ] }), $[32] = T0, $[33] = arrowPosition, $[34] = as, $[35] = color, $[36] = ref, $[37] = restProps, $[38] = size2, $[39] = status, $[40] = t10, $[41] = t11, $[42] = t12, $[43] = t8, $[44] = title, $[45] = t13) : t13 = $[45], t13;
1172
1232
  });
1173
1233
  Avatar.displayName = "ForwardRef(Avatar)";
1234
+ function _temp$a(s) {
1235
+ return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
1236
+ }
1174
1237
  function _responsiveAvatarCounterSizeStyle(props) {
1175
1238
  const {
1176
1239
  avatar,
@@ -1211,13 +1274,25 @@ const StyledAvatarCounter = /* @__PURE__ */ styledComponents.styled.div.withConf
1211
1274
  displayName: "StyledAvatarCounter",
1212
1275
  componentId: "sc-1ydx86y-0"
1213
1276
  })(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle), AvatarCounter = react.forwardRef(function(props, ref) {
1214
- const {
1277
+ const $ = reactCompilerRuntime.c(20), {
1215
1278
  count,
1216
- size: sizeProp = 1
1217
- } = props, size2 = _getArrayProp(sizeProp);
1218
- return /* @__PURE__ */ jsxRuntime.jsx(StyledAvatarCounter, { $size: size2, "data-ui": "AvatarCounter", ref, children: /* @__PURE__ */ jsxRuntime.jsx(Label, { as: "span", size: size2.map((s) => s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0), weight: "medium", children: count }) });
1279
+ size: t0
1280
+ } = props, sizeProp = t0 === void 0 ? 1 : t0;
1281
+ let T0, T1, t1, t2, t3, t4, t5;
1282
+ if ($[0] !== ref || $[1] !== sizeProp) {
1283
+ const size2 = _getArrayProp(sizeProp);
1284
+ T1 = StyledAvatarCounter, t3 = size2, t4 = "AvatarCounter", t5 = ref, T0 = Label, t1 = "span", t2 = size2.map(_temp$9), $[0] = ref, $[1] = sizeProp, $[2] = T0, $[3] = T1, $[4] = t1, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5;
1285
+ } else
1286
+ T0 = $[2], T1 = $[3], t1 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8];
1287
+ let t6;
1288
+ $[9] !== T0 || $[10] !== count || $[11] !== t1 || $[12] !== t2 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(T0, { as: t1, size: t2, weight: "medium", children: count }), $[9] = T0, $[10] = count, $[11] = t1, $[12] = t2, $[13] = t6) : t6 = $[13];
1289
+ let t7;
1290
+ return $[14] !== T1 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(T1, { $size: t3, "data-ui": t4, ref: t5, children: t6 }), $[14] = T1, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = t7) : t7 = $[19], t7;
1219
1291
  });
1220
1292
  AvatarCounter.displayName = "ForwardRef(AvatarCounter)";
1293
+ function _temp$9(s) {
1294
+ return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
1295
+ }
1221
1296
  const BASE_STYLES = styledComponents.css`
1222
1297
  white-space: nowrap;
1223
1298
 
@@ -1250,34 +1325,51 @@ const StyledAvatarStack = /* @__PURE__ */ styledComponents.styled.div.withConfig
1250
1325
  displayName: "StyledAvatarStack",
1251
1326
  componentId: "sc-cysmbb-0"
1252
1327
  })(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = react.forwardRef(function(props, ref) {
1253
- const {
1328
+ const $ = reactCompilerRuntime.c(38);
1329
+ let childrenProp, restProps, t0, t1;
1330
+ $[0] !== props ? ({
1254
1331
  children: childrenProp,
1255
- maxLength: maxLengthProp = 4,
1256
- size: sizeProp = 1,
1332
+ maxLength: t0,
1333
+ size: t1,
1257
1334
  ...restProps
1258
- } = props, children = react.Children.toArray(childrenProp).filter(react.isValidElement), maxLength = Math.max(maxLengthProp, 0), size2 = _getArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
1259
- return /* @__PURE__ */ jsxRuntime.jsxs(StyledAvatarStack, { "data-ui": "AvatarStack", ...restProps, ref, $size: size2, children: [
1260
- len === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: len, size: size2 }) }),
1261
- len !== 0 && extraCount > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: extraCount, size: size2 }) }),
1262
- visibleChildren.map((child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: react.cloneElement(child, {
1335
+ } = props, $[0] = props, $[1] = childrenProp, $[2] = restProps, $[3] = t0, $[4] = t1) : (childrenProp = $[1], restProps = $[2], t0 = $[3], t1 = $[4]);
1336
+ const maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1;
1337
+ let T0, t2, t3, t4, t5, t6, t7, t8;
1338
+ if ($[5] !== childrenProp || $[6] !== maxLengthProp || $[7] !== ref || $[8] !== restProps || $[9] !== sizeProp) {
1339
+ const children = react.Children.toArray(childrenProp).filter(react.isValidElement), maxLength = Math.max(maxLengthProp, 0);
1340
+ let t92;
1341
+ $[18] !== sizeProp ? (t92 = _getArrayProp(sizeProp), $[18] = sizeProp, $[19] = t92) : t92 = $[19];
1342
+ const size2 = t92, len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
1343
+ T0 = StyledAvatarStack, t2 = "AvatarStack", t3 = restProps, t4 = ref, t5 = size2, $[20] !== len || $[21] !== size2 ? (t6 = len === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: len, size: size2 }) }), $[20] = len, $[21] = size2, $[22] = t6) : t6 = $[22], $[23] !== extraCount || $[24] !== len || $[25] !== size2 ? (t7 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: extraCount, size: size2 }) }), $[23] = extraCount, $[24] = len, $[25] = size2, $[26] = t7) : t7 = $[26];
1344
+ let t10;
1345
+ $[27] !== size2 ? (t10 = (child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: react.cloneElement(child, {
1263
1346
  size: size2
1264
- }) }, String(childIndex)))
1265
- ] });
1347
+ }) }, String(childIndex)), $[27] = size2, $[28] = t10) : t10 = $[28], t8 = visibleChildren.map(t10), $[5] = childrenProp, $[6] = maxLengthProp, $[7] = ref, $[8] = restProps, $[9] = sizeProp, $[10] = T0, $[11] = t2, $[12] = t3, $[13] = t4, $[14] = t5, $[15] = t6, $[16] = t7, $[17] = t8;
1348
+ } else
1349
+ T0 = $[10], t2 = $[11], t3 = $[12], t4 = $[13], t5 = $[14], t6 = $[15], t7 = $[16], t8 = $[17];
1350
+ let t9;
1351
+ return $[29] !== T0 || $[30] !== t2 || $[31] !== t3 || $[32] !== t4 || $[33] !== t5 || $[34] !== t6 || $[35] !== t7 || $[36] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsxs(T0, { "data-ui": t2, ...t3, ref: t4, $size: t5, children: [
1352
+ t6,
1353
+ t7,
1354
+ t8
1355
+ ] }), $[29] = T0, $[30] = t2, $[31] = t3, $[32] = t4, $[33] = t5, $[34] = t6, $[35] = t7, $[36] = t8, $[37] = t9) : t9 = $[37], t9;
1266
1356
  });
1267
1357
  AvatarStack.displayName = "ForwardRef(AvatarStack)";
1268
1358
  const StyledBox = /* @__PURE__ */ styledComponents.styled.div.withConfig({
1269
1359
  displayName: "StyledBox",
1270
1360
  componentId: "sc-1hhky9f-0"
1271
1361
  })(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = react.forwardRef(function(props, ref) {
1272
- const {
1273
- as: asProp = "div",
1362
+ const $ = reactCompilerRuntime.c(109);
1363
+ let column, columnEnd, columnStart, flex, height, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, overflow, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, restProps, row, rowEnd, rowStart, sizing, t0, t1, t2, t3;
1364
+ $[0] !== props ? ({
1365
+ as: t0,
1274
1366
  column,
1275
1367
  columnStart,
1276
1368
  columnEnd,
1277
- display = "block",
1369
+ display: t1,
1278
1370
  flex,
1279
1371
  height,
1280
- margin = 0,
1372
+ margin: t2,
1281
1373
  marginX,
1282
1374
  marginY,
1283
1375
  marginTop,
@@ -1285,7 +1377,7 @@ const StyledBox = /* @__PURE__ */ styledComponents.styled.div.withConfig({
1285
1377
  marginBottom,
1286
1378
  marginLeft,
1287
1379
  overflow,
1288
- padding = 0,
1380
+ padding: t3,
1289
1381
  paddingX,
1290
1382
  paddingY,
1291
1383
  paddingTop,
@@ -1297,8 +1389,60 @@ const StyledBox = /* @__PURE__ */ styledComponents.styled.div.withConfig({
1297
1389
  rowEnd,
1298
1390
  sizing,
1299
1391
  ...restProps
1300
- } = props;
1301
- return /* @__PURE__ */ jsxRuntime.jsx(StyledBox, { "data-as": typeof asProp == "string" ? asProp : void 0, "data-ui": "Box", ...restProps, $column: _getArrayProp(column), $columnStart: _getArrayProp(columnStart), $columnEnd: _getArrayProp(columnEnd), $display: _getArrayProp(display), $flex: _getArrayProp(flex), $height: _getArrayProp(height), $margin: _getArrayProp(margin), $marginX: _getArrayProp(marginX), $marginY: _getArrayProp(marginY), $marginTop: _getArrayProp(marginTop), $marginRight: _getArrayProp(marginRight), $marginBottom: _getArrayProp(marginBottom), $marginLeft: _getArrayProp(marginLeft), $overflow: _getArrayProp(overflow), $padding: _getArrayProp(padding), $paddingX: _getArrayProp(paddingX), $paddingY: _getArrayProp(paddingY), $paddingTop: _getArrayProp(paddingTop), $paddingRight: _getArrayProp(paddingRight), $paddingBottom: _getArrayProp(paddingBottom), $paddingLeft: _getArrayProp(paddingLeft), $row: _getArrayProp(row), $rowStart: _getArrayProp(rowStart), $rowEnd: _getArrayProp(rowEnd), $sizing: _getArrayProp(sizing), as: asProp, ref, children: props.children });
1392
+ } = props, $[0] = props, $[1] = column, $[2] = columnEnd, $[3] = columnStart, $[4] = flex, $[5] = height, $[6] = marginBottom, $[7] = marginLeft, $[8] = marginRight, $[9] = marginTop, $[10] = marginX, $[11] = marginY, $[12] = overflow, $[13] = paddingBottom, $[14] = paddingLeft, $[15] = paddingRight, $[16] = paddingTop, $[17] = paddingX, $[18] = paddingY, $[19] = restProps, $[20] = row, $[21] = rowEnd, $[22] = rowStart, $[23] = sizing, $[24] = t0, $[25] = t1, $[26] = t2, $[27] = t3) : (column = $[1], columnEnd = $[2], columnStart = $[3], flex = $[4], height = $[5], marginBottom = $[6], marginLeft = $[7], marginRight = $[8], marginTop = $[9], marginX = $[10], marginY = $[11], overflow = $[12], paddingBottom = $[13], paddingLeft = $[14], paddingRight = $[15], paddingTop = $[16], paddingX = $[17], paddingY = $[18], restProps = $[19], row = $[20], rowEnd = $[21], rowStart = $[22], sizing = $[23], t0 = $[24], t1 = $[25], t2 = $[26], t3 = $[27]);
1393
+ const asProp = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 0 : t3, t4 = typeof asProp == "string" ? asProp : void 0;
1394
+ let t5;
1395
+ $[28] !== column ? (t5 = _getArrayProp(column), $[28] = column, $[29] = t5) : t5 = $[29];
1396
+ let t6;
1397
+ $[30] !== columnStart ? (t6 = _getArrayProp(columnStart), $[30] = columnStart, $[31] = t6) : t6 = $[31];
1398
+ let t7;
1399
+ $[32] !== columnEnd ? (t7 = _getArrayProp(columnEnd), $[32] = columnEnd, $[33] = t7) : t7 = $[33];
1400
+ let t8;
1401
+ $[34] !== display ? (t8 = _getArrayProp(display), $[34] = display, $[35] = t8) : t8 = $[35];
1402
+ let t9;
1403
+ $[36] !== flex ? (t9 = _getArrayProp(flex), $[36] = flex, $[37] = t9) : t9 = $[37];
1404
+ let t10;
1405
+ $[38] !== height ? (t10 = _getArrayProp(height), $[38] = height, $[39] = t10) : t10 = $[39];
1406
+ let t11;
1407
+ $[40] !== margin ? (t11 = _getArrayProp(margin), $[40] = margin, $[41] = t11) : t11 = $[41];
1408
+ let t12;
1409
+ $[42] !== marginX ? (t12 = _getArrayProp(marginX), $[42] = marginX, $[43] = t12) : t12 = $[43];
1410
+ let t13;
1411
+ $[44] !== marginY ? (t13 = _getArrayProp(marginY), $[44] = marginY, $[45] = t13) : t13 = $[45];
1412
+ let t14;
1413
+ $[46] !== marginTop ? (t14 = _getArrayProp(marginTop), $[46] = marginTop, $[47] = t14) : t14 = $[47];
1414
+ let t15;
1415
+ $[48] !== marginRight ? (t15 = _getArrayProp(marginRight), $[48] = marginRight, $[49] = t15) : t15 = $[49];
1416
+ let t16;
1417
+ $[50] !== marginBottom ? (t16 = _getArrayProp(marginBottom), $[50] = marginBottom, $[51] = t16) : t16 = $[51];
1418
+ let t17;
1419
+ $[52] !== marginLeft ? (t17 = _getArrayProp(marginLeft), $[52] = marginLeft, $[53] = t17) : t17 = $[53];
1420
+ let t18;
1421
+ $[54] !== overflow ? (t18 = _getArrayProp(overflow), $[54] = overflow, $[55] = t18) : t18 = $[55];
1422
+ let t19;
1423
+ $[56] !== padding ? (t19 = _getArrayProp(padding), $[56] = padding, $[57] = t19) : t19 = $[57];
1424
+ let t20;
1425
+ $[58] !== paddingX ? (t20 = _getArrayProp(paddingX), $[58] = paddingX, $[59] = t20) : t20 = $[59];
1426
+ let t21;
1427
+ $[60] !== paddingY ? (t21 = _getArrayProp(paddingY), $[60] = paddingY, $[61] = t21) : t21 = $[61];
1428
+ let t22;
1429
+ $[62] !== paddingTop ? (t22 = _getArrayProp(paddingTop), $[62] = paddingTop, $[63] = t22) : t22 = $[63];
1430
+ let t23;
1431
+ $[64] !== paddingRight ? (t23 = _getArrayProp(paddingRight), $[64] = paddingRight, $[65] = t23) : t23 = $[65];
1432
+ let t24;
1433
+ $[66] !== paddingBottom ? (t24 = _getArrayProp(paddingBottom), $[66] = paddingBottom, $[67] = t24) : t24 = $[67];
1434
+ let t25;
1435
+ $[68] !== paddingLeft ? (t25 = _getArrayProp(paddingLeft), $[68] = paddingLeft, $[69] = t25) : t25 = $[69];
1436
+ let t26;
1437
+ $[70] !== row ? (t26 = _getArrayProp(row), $[70] = row, $[71] = t26) : t26 = $[71];
1438
+ let t27;
1439
+ $[72] !== rowStart ? (t27 = _getArrayProp(rowStart), $[72] = rowStart, $[73] = t27) : t27 = $[73];
1440
+ let t28;
1441
+ $[74] !== rowEnd ? (t28 = _getArrayProp(rowEnd), $[74] = rowEnd, $[75] = t28) : t28 = $[75];
1442
+ let t29;
1443
+ $[76] !== sizing ? (t29 = _getArrayProp(sizing), $[76] = sizing, $[77] = t29) : t29 = $[77];
1444
+ let t30;
1445
+ return $[78] !== asProp || $[79] !== props.children || $[80] !== ref || $[81] !== restProps || $[82] !== t10 || $[83] !== t11 || $[84] !== t12 || $[85] !== t13 || $[86] !== t14 || $[87] !== t15 || $[88] !== t16 || $[89] !== t17 || $[90] !== t18 || $[91] !== t19 || $[92] !== t20 || $[93] !== t21 || $[94] !== t22 || $[95] !== t23 || $[96] !== t24 || $[97] !== t25 || $[98] !== t26 || $[99] !== t27 || $[100] !== t28 || $[101] !== t29 || $[102] !== t4 || $[103] !== t5 || $[104] !== t6 || $[105] !== t7 || $[106] !== t8 || $[107] !== t9 ? (t30 = /* @__PURE__ */ jsxRuntime.jsx(StyledBox, { "data-as": t4, "data-ui": "Box", ...restProps, $column: t5, $columnStart: t6, $columnEnd: t7, $display: t8, $flex: t9, $height: t10, $margin: t11, $marginX: t12, $marginY: t13, $marginTop: t14, $marginRight: t15, $marginBottom: t16, $marginLeft: t17, $overflow: t18, $padding: t19, $paddingX: t20, $paddingY: t21, $paddingTop: t22, $paddingRight: t23, $paddingBottom: t24, $paddingLeft: t25, $row: t26, $rowStart: t27, $rowEnd: t28, $sizing: t29, as: asProp, ref, children: props.children }), $[78] = asProp, $[79] = props.children, $[80] = ref, $[81] = restProps, $[82] = t10, $[83] = t11, $[84] = t12, $[85] = t13, $[86] = t14, $[87] = t15, $[88] = t16, $[89] = t17, $[90] = t18, $[91] = t19, $[92] = t20, $[93] = t21, $[94] = t22, $[95] = t23, $[96] = t24, $[97] = t25, $[98] = t26, $[99] = t27, $[100] = t28, $[101] = t29, $[102] = t4, $[103] = t5, $[104] = t6, $[105] = t7, $[106] = t8, $[107] = t9, $[108] = t30) : t30 = $[108], t30;
1302
1446
  });
1303
1447
  Box.displayName = "ForwardRef(Box)";
1304
1448
  function textBaseStyle(props) {
@@ -1373,18 +1517,32 @@ const StyledText = /* @__PURE__ */ styledComponents.styled.div.withConfig({
1373
1517
  displayName: "StyledText",
1374
1518
  componentId: "sc-11ov82j-0"
1375
1519
  })(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle), Text = react.forwardRef(function(props, ref) {
1376
- const {
1377
- accent = !1,
1520
+ const $ = reactCompilerRuntime.c(26);
1521
+ let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
1522
+ $[0] !== props ? ({
1523
+ accent: t0,
1378
1524
  align,
1379
1525
  children: childrenProp,
1380
- muted = !1,
1381
- size: size2 = 2,
1526
+ muted: t1,
1527
+ size: t2,
1382
1528
  textOverflow,
1383
1529
  weight,
1384
1530
  ...restProps
1385
- } = props;
1531
+ } = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = textOverflow, $[8] = weight) : (align = $[1], childrenProp = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], textOverflow = $[7], weight = $[8]);
1532
+ const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
1386
1533
  let children = childrenProp;
1387
- return textOverflow === "ellipsis" && (children = /* @__PURE__ */ jsxRuntime.jsx(SpanWithTextOverflow, { children })), /* @__PURE__ */ jsxRuntime.jsx(StyledText, { "data-ui": "Text", ...restProps, $accent: accent, $align: _getArrayProp(align), $muted: muted, ref, $size: _getArrayProp(size2), $weight: weight, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children }) });
1534
+ if (textOverflow === "ellipsis") {
1535
+ let t32;
1536
+ $[9] !== children ? (t32 = /* @__PURE__ */ jsxRuntime.jsx(SpanWithTextOverflow, { children }), $[9] = children, $[10] = t32) : t32 = $[10], children = t32;
1537
+ }
1538
+ let t3;
1539
+ $[11] !== align ? (t3 = _getArrayProp(align), $[11] = align, $[12] = t3) : t3 = $[12];
1540
+ let t4;
1541
+ $[13] !== size2 ? (t4 = _getArrayProp(size2), $[13] = size2, $[14] = t4) : t4 = $[14];
1542
+ let t5;
1543
+ $[15] !== children ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { children }), $[15] = children, $[16] = t5) : t5 = $[16];
1544
+ let t6;
1545
+ return $[17] !== accent || $[18] !== muted || $[19] !== ref || $[20] !== restProps || $[21] !== t3 || $[22] !== t4 || $[23] !== t5 || $[24] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(StyledText, { "data-ui": "Text", ...restProps, $accent: accent, $align: t3, $muted: muted, ref, $size: t4, $weight: weight, children: t5 }), $[17] = accent, $[18] = muted, $[19] = ref, $[20] = restProps, $[21] = t3, $[22] = t4, $[23] = t5, $[24] = weight, $[25] = t6) : t6 = $[25], t6;
1388
1546
  });
1389
1547
  Text.displayName = "ForwardRef(Text)";
1390
1548
  function badgeStyle(props) {
@@ -1406,33 +1564,60 @@ const StyledBadge = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
1406
1564
  displayName: "StyledBadge",
1407
1565
  componentId: "sc-5u140l-0"
1408
1566
  })(responsiveRadiusStyle, badgeStyle), Badge = react.forwardRef(function(props, ref) {
1409
- const {
1410
- children,
1411
- fontSize: fontSize2 = 1,
1412
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1413
- mode: _deprecated_mode,
1414
- padding = 1,
1415
- radius = "full",
1416
- tone = "default",
1417
- ...restProps
1418
- } = props;
1419
- return /* @__PURE__ */ jsxRuntime.jsx(StyledBadge, { "data-ui": "Badge", ...restProps, $tone: tone, $radius: _getArrayProp(radius), padding: _getArrayProp(padding), ref, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children }) });
1567
+ const $ = reactCompilerRuntime.c(21);
1568
+ let children, restProps, t0, t1, t2, t3;
1569
+ if ($[0] !== props) {
1570
+ const {
1571
+ children: t42,
1572
+ fontSize: t52,
1573
+ mode: _deprecated_mode,
1574
+ padding: t62,
1575
+ radius: t72,
1576
+ tone: t8,
1577
+ ...t9
1578
+ } = props;
1579
+ children = t42, t0 = t52, t1 = t62, t2 = t72, t3 = t8, restProps = t9, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2, $[6] = t3;
1580
+ } else
1581
+ children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5], t3 = $[6];
1582
+ const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? "full" : t2, tone = t3 === void 0 ? "default" : t3;
1583
+ let t4;
1584
+ $[7] !== radius ? (t4 = _getArrayProp(radius), $[7] = radius, $[8] = t4) : t4 = $[8];
1585
+ let t5;
1586
+ $[9] !== padding ? (t5 = _getArrayProp(padding), $[9] = padding, $[10] = t5) : t5 = $[10];
1587
+ let t6;
1588
+ $[11] !== children || $[12] !== fontSize2 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children }), $[11] = children, $[12] = fontSize2, $[13] = t6) : t6 = $[13];
1589
+ let t7;
1590
+ return $[14] !== ref || $[15] !== restProps || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 || $[19] !== tone ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(StyledBadge, { "data-ui": "Badge", ...restProps, $tone: tone, $radius: t4, padding: t5, ref, children: t6 }), $[14] = ref, $[15] = restProps, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = tone, $[20] = t7) : t7 = $[20], t7;
1420
1591
  });
1421
1592
  Badge.displayName = "ForwardRef(Badge)";
1422
1593
  const StyledFlex = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
1423
1594
  displayName: "StyledFlex",
1424
1595
  componentId: "sc-oxesg3-0"
1425
1596
  })(flexItemStyle, responsiveFlexStyle), Flex = react.forwardRef(function(props, ref) {
1426
- const {
1597
+ const $ = reactCompilerRuntime.c(27);
1598
+ let align, as, gap, justify, restProps, t0, wrap;
1599
+ $[0] !== props ? ({
1427
1600
  align,
1428
1601
  as,
1429
- direction = "row",
1602
+ direction: t0,
1430
1603
  gap,
1431
1604
  justify,
1432
1605
  wrap,
1433
1606
  ...restProps
1434
- } = props;
1435
- return /* @__PURE__ */ jsxRuntime.jsx(StyledFlex, { "data-ui": "Flex", ...restProps, $align: _getArrayProp(align), $direction: _getArrayProp(direction), $gap: _getArrayProp(gap), $justify: _getArrayProp(justify), $wrap: _getArrayProp(wrap), forwardedAs: as, ref });
1607
+ } = props, $[0] = props, $[1] = align, $[2] = as, $[3] = gap, $[4] = justify, $[5] = restProps, $[6] = t0, $[7] = wrap) : (align = $[1], as = $[2], gap = $[3], justify = $[4], restProps = $[5], t0 = $[6], wrap = $[7]);
1608
+ const direction = t0 === void 0 ? "row" : t0;
1609
+ let t1;
1610
+ $[8] !== align ? (t1 = _getArrayProp(align), $[8] = align, $[9] = t1) : t1 = $[9];
1611
+ let t2;
1612
+ $[10] !== direction ? (t2 = _getArrayProp(direction), $[10] = direction, $[11] = t2) : t2 = $[11];
1613
+ let t3;
1614
+ $[12] !== gap ? (t3 = _getArrayProp(gap), $[12] = gap, $[13] = t3) : t3 = $[13];
1615
+ let t4;
1616
+ $[14] !== justify ? (t4 = _getArrayProp(justify), $[14] = justify, $[15] = t4) : t4 = $[15];
1617
+ let t5;
1618
+ $[16] !== wrap ? (t5 = _getArrayProp(wrap), $[16] = wrap, $[17] = t5) : t5 = $[17];
1619
+ let t6;
1620
+ return $[18] !== as || $[19] !== ref || $[20] !== restProps || $[21] !== t1 || $[22] !== t2 || $[23] !== t3 || $[24] !== t4 || $[25] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(StyledFlex, { "data-ui": "Flex", ...restProps, $align: t1, $direction: t2, $gap: t3, $justify: t4, $wrap: t5, forwardedAs: as, ref }), $[18] = as, $[19] = ref, $[20] = restProps, $[21] = t1, $[22] = t2, $[23] = t3, $[24] = t4, $[25] = t5, $[26] = t6) : t6 = $[26], t6;
1436
1621
  });
1437
1622
  Flex.displayName = "ForwardRef(Flex)";
1438
1623
  const rotate = styledComponents.keyframes`
@@ -1447,7 +1632,11 @@ const rotate = styledComponents.keyframes`
1447
1632
  displayName: "StyledSpinner",
1448
1633
  componentId: "sc-124hnd0-0"
1449
1634
  })`& > span > svg{animation:${rotate} 500ms linear infinite;}`, Spinner = react.forwardRef(function(props, ref) {
1450
- return /* @__PURE__ */ jsxRuntime.jsx(StyledSpinner, { "data-ui": "Spinner", ...props, ref, children: /* @__PURE__ */ jsxRuntime.jsx(icons.SpinnerIcon, {}) });
1635
+ const $ = reactCompilerRuntime.c(4);
1636
+ let t0;
1637
+ $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsxRuntime.jsx(icons.SpinnerIcon, {}), $[0] = t0) : t0 = $[0];
1638
+ let t1;
1639
+ return $[1] !== props || $[2] !== ref ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSpinner, { "data-ui": "Spinner", ...props, ref, children: t0 }), $[1] = props, $[2] = ref, $[3] = t1) : t1 = $[3], t1;
1451
1640
  });
1452
1641
  Spinner.displayName = "ForwardRef(Spinner)";
1453
1642
  function _cardColorStyle(base, color, checkered = !1) {
@@ -1625,37 +1814,71 @@ const StyledButton = /* @__PURE__ */ styledComponents.styled.button.withConfig({
1625
1814
  displayName: "LoadingBox",
1626
1815
  componentId: "sc-aaekt4-1"
1627
1816
  })`position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background-color:var(--card-bg-color);border-radius:inherit;z-index:1;box-shadow:inherit;`, Button = react.forwardRef(function(props, ref) {
1628
- const {
1817
+ const $ = reactCompilerRuntime.c(86);
1818
+ let IconComponent, IconRightComponent, children, disabled, loading, paddingBottomProp, paddingLeftProp, paddingRightProp, paddingTopProp, paddingXProp, paddingYProp, restProps, selected, t0, t1, t2, t3, t4, t5, t6, t7, t8, text, textAlign, textWeight, width;
1819
+ $[0] !== props ? ({
1629
1820
  children,
1630
1821
  disabled,
1631
- fontSize: fontSize2 = 1,
1822
+ fontSize: t0,
1632
1823
  icon: IconComponent,
1633
1824
  iconRight: IconRightComponent,
1634
- justify: justifyProp = "center",
1825
+ justify: t1,
1635
1826
  loading,
1636
- mode = "default",
1637
- padding: paddingProp = 3,
1827
+ mode: t2,
1828
+ padding: t3,
1638
1829
  paddingX: paddingXProp,
1639
1830
  paddingY: paddingYProp,
1640
1831
  paddingTop: paddingTopProp,
1641
1832
  paddingBottom: paddingBottomProp,
1642
1833
  paddingLeft: paddingLeftProp,
1643
1834
  paddingRight: paddingRightProp,
1644
- radius: radiusProp = 2,
1835
+ radius: t4,
1645
1836
  selected,
1646
- space: spaceProp = 3,
1837
+ space: t5,
1647
1838
  text,
1648
1839
  textAlign,
1649
1840
  textWeight,
1650
- tone = "default",
1651
- type = "button",
1652
- muted = !1,
1841
+ tone: t6,
1842
+ type: t7,
1843
+ muted: t8,
1653
1844
  width,
1654
1845
  ...restProps
1655
- } = props, {
1846
+ } = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = loading, $[6] = paddingBottomProp, $[7] = paddingLeftProp, $[8] = paddingRightProp, $[9] = paddingTopProp, $[10] = paddingXProp, $[11] = paddingYProp, $[12] = restProps, $[13] = selected, $[14] = t0, $[15] = t1, $[16] = t2, $[17] = t3, $[18] = t4, $[19] = t5, $[20] = t6, $[21] = t7, $[22] = t8, $[23] = text, $[24] = textAlign, $[25] = textWeight, $[26] = width) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], loading = $[5], paddingBottomProp = $[6], paddingLeftProp = $[7], paddingRightProp = $[8], paddingTopProp = $[9], paddingXProp = $[10], paddingYProp = $[11], restProps = $[12], selected = $[13], t0 = $[14], t1 = $[15], t2 = $[16], t3 = $[17], t4 = $[18], t5 = $[19], t6 = $[20], t7 = $[21], t8 = $[22], text = $[23], textAlign = $[24], textWeight = $[25], width = $[26]);
1847
+ const fontSize2 = t0 === void 0 ? 1 : t0, justifyProp = t1 === void 0 ? "center" : t1, mode = t2 === void 0 ? "default" : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, spaceProp = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, type = t7 === void 0 ? "button" : t7, muted = t8 === void 0 ? !1 : t8, {
1656
1848
  button
1657
- } = useTheme_v2(), justify = _getArrayProp(justifyProp), padding = _getArrayProp(paddingProp), paddingX = _getArrayProp(paddingXProp), paddingY = _getArrayProp(paddingYProp), paddingTop = _getArrayProp(paddingTopProp), paddingBottom = _getArrayProp(paddingBottomProp), paddingLeft = _getArrayProp(paddingLeftProp), paddingRight = _getArrayProp(paddingRightProp), radius = _getArrayProp(radiusProp), space = _getArrayProp(spaceProp), boxProps = react.useMemo(() => ({
1658
- // flex: 1,
1849
+ } = useTheme_v2();
1850
+ let t9;
1851
+ $[27] !== justifyProp ? (t9 = _getArrayProp(justifyProp), $[27] = justifyProp, $[28] = t9) : t9 = $[28];
1852
+ const justify = t9;
1853
+ let t10;
1854
+ $[29] !== paddingProp ? (t10 = _getArrayProp(paddingProp), $[29] = paddingProp, $[30] = t10) : t10 = $[30];
1855
+ const padding = t10;
1856
+ let t11;
1857
+ $[31] !== paddingXProp ? (t11 = _getArrayProp(paddingXProp), $[31] = paddingXProp, $[32] = t11) : t11 = $[32];
1858
+ const paddingX = t11;
1859
+ let t12;
1860
+ $[33] !== paddingYProp ? (t12 = _getArrayProp(paddingYProp), $[33] = paddingYProp, $[34] = t12) : t12 = $[34];
1861
+ const paddingY = t12;
1862
+ let t13;
1863
+ $[35] !== paddingTopProp ? (t13 = _getArrayProp(paddingTopProp), $[35] = paddingTopProp, $[36] = t13) : t13 = $[36];
1864
+ const paddingTop = t13;
1865
+ let t14;
1866
+ $[37] !== paddingBottomProp ? (t14 = _getArrayProp(paddingBottomProp), $[37] = paddingBottomProp, $[38] = t14) : t14 = $[38];
1867
+ const paddingBottom = t14;
1868
+ let t15;
1869
+ $[39] !== paddingLeftProp ? (t15 = _getArrayProp(paddingLeftProp), $[39] = paddingLeftProp, $[40] = t15) : t15 = $[40];
1870
+ const paddingLeft = t15;
1871
+ let t16;
1872
+ $[41] !== paddingRightProp ? (t16 = _getArrayProp(paddingRightProp), $[41] = paddingRightProp, $[42] = t16) : t16 = $[42];
1873
+ const paddingRight = t16;
1874
+ let t17;
1875
+ $[43] !== radiusProp ? (t17 = _getArrayProp(radiusProp), $[43] = radiusProp, $[44] = t17) : t17 = $[44];
1876
+ const radius = t17;
1877
+ let t18;
1878
+ $[45] !== spaceProp ? (t18 = _getArrayProp(spaceProp), $[45] = spaceProp, $[46] = t18) : t18 = $[46];
1879
+ const space = t18;
1880
+ let t19;
1881
+ $[47] !== padding || $[48] !== paddingBottom || $[49] !== paddingLeft || $[50] !== paddingRight || $[51] !== paddingTop || $[52] !== paddingX || $[53] !== paddingY ? (t19 = {
1659
1882
  padding,
1660
1883
  paddingX,
1661
1884
  paddingY,
@@ -1663,22 +1886,30 @@ const StyledButton = /* @__PURE__ */ styledComponents.styled.button.withConfig({
1663
1886
  paddingBottom,
1664
1887
  paddingLeft,
1665
1888
  paddingRight
1666
- }), [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight]);
1667
- return /* @__PURE__ */ jsxRuntime.jsxs(StyledButton, { "data-ui": "Button", ...restProps, $mode: mode, $radius: radius, $tone: tone, "data-disabled": !!(loading || disabled), "data-selected": selected ? "" : void 0, disabled: !!(loading || disabled), ref, type, $width: width, children: [
1668
- !!loading && /* @__PURE__ */ jsxRuntime.jsx(LoadingBox, { children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) }),
1669
- (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...boxProps, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", justify, gap: space, children: [
1670
- IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
1671
- react.isValidElement(IconComponent) && IconComponent,
1672
- ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
1673
- ] }),
1674
- text && /* @__PURE__ */ jsxRuntime.jsx(Box, { children: /* @__PURE__ */ jsxRuntime.jsx(Text, { muted, align: textAlign, size: fontSize2, textOverflow: "ellipsis", weight: textWeight ?? button.textWeight, children: text }) }),
1675
- IconRightComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
1676
- react.isValidElement(IconRightComponent) && IconRightComponent,
1677
- ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
1678
- ] })
1679
- ] }) }),
1680
- children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...boxProps, children })
1681
- ] });
1889
+ }, $[47] = padding, $[48] = paddingBottom, $[49] = paddingLeft, $[50] = paddingRight, $[51] = paddingTop, $[52] = paddingX, $[53] = paddingY, $[54] = t19) : t19 = $[54];
1890
+ const boxProps = t19, t20 = !!(loading || disabled), t21 = selected ? "" : void 0, t22 = !!(loading || disabled);
1891
+ let t23;
1892
+ $[55] !== loading ? (t23 = !!loading && /* @__PURE__ */ jsxRuntime.jsx(LoadingBox, { children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) }), $[55] = loading, $[56] = t23) : t23 = $[56];
1893
+ let t24;
1894
+ $[57] !== IconComponent || $[58] !== IconRightComponent || $[59] !== boxProps || $[60] !== button || $[61] !== fontSize2 || $[62] !== justify || $[63] !== muted || $[64] !== space || $[65] !== text || $[66] !== textAlign || $[67] !== textWeight ? (t24 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...boxProps, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", justify, gap: space, children: [
1895
+ IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
1896
+ react.isValidElement(IconComponent) && IconComponent,
1897
+ ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
1898
+ ] }),
1899
+ text && /* @__PURE__ */ jsxRuntime.jsx(Box, { children: /* @__PURE__ */ jsxRuntime.jsx(Text, { muted, align: textAlign, size: fontSize2, textOverflow: "ellipsis", weight: textWeight ?? button.textWeight, children: text }) }),
1900
+ IconRightComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
1901
+ react.isValidElement(IconRightComponent) && IconRightComponent,
1902
+ ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
1903
+ ] })
1904
+ ] }) }), $[57] = IconComponent, $[58] = IconRightComponent, $[59] = boxProps, $[60] = button, $[61] = fontSize2, $[62] = justify, $[63] = muted, $[64] = space, $[65] = text, $[66] = textAlign, $[67] = textWeight, $[68] = t24) : t24 = $[68];
1905
+ let t25;
1906
+ $[69] !== boxProps || $[70] !== children ? (t25 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...boxProps, children }), $[69] = boxProps, $[70] = children, $[71] = t25) : t25 = $[71];
1907
+ let t26;
1908
+ return $[72] !== mode || $[73] !== radius || $[74] !== ref || $[75] !== restProps || $[76] !== t20 || $[77] !== t21 || $[78] !== t22 || $[79] !== t23 || $[80] !== t24 || $[81] !== t25 || $[82] !== tone || $[83] !== type || $[84] !== width ? (t26 = /* @__PURE__ */ jsxRuntime.jsxs(StyledButton, { "data-ui": "Button", ...restProps, $mode: mode, $radius: radius, $tone: tone, "data-disabled": t20, "data-selected": t21, disabled: t22, ref, type, $width: width, children: [
1909
+ t23,
1910
+ t24,
1911
+ t25
1912
+ ] }), $[72] = mode, $[73] = radius, $[74] = ref, $[75] = restProps, $[76] = t20, $[77] = t21, $[78] = t22, $[79] = t23, $[80] = t24, $[81] = t25, $[82] = tone, $[83] = type, $[84] = width, $[85] = t26) : t26 = $[85], t26;
1682
1913
  });
1683
1914
  Button.displayName = "ForwardRef(Button)";
1684
1915
  function cardStyle(props) {
@@ -1833,9 +2064,11 @@ const StyledCard = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
1833
2064
  displayName: "StyledCard",
1834
2065
  componentId: "sc-osnro2-0"
1835
2066
  })(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = react.forwardRef(function(props, ref) {
1836
- const {
1837
- __unstable_checkered: checkered = !1,
1838
- __unstable_focusRing: focusRing = !1,
2067
+ const $ = reactCompilerRuntime.c(56);
2068
+ let asProp, border2, borderBottom2, borderLeft2, borderRight2, borderTop2, muted, pressed, restProps, scheme, selected, shadow, t0, t1, t2, t3;
2069
+ $[0] !== props ? ({
2070
+ __unstable_checkered: t0,
2071
+ __unstable_focusRing: t1,
1839
2072
  as: asProp,
1840
2073
  border: border2,
1841
2074
  borderTop: borderTop2,
@@ -1844,18 +2077,39 @@ const StyledCard = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
1844
2077
  borderLeft: borderLeft2,
1845
2078
  muted,
1846
2079
  pressed,
1847
- radius = 0,
2080
+ radius: t2,
1848
2081
  scheme,
1849
2082
  selected,
1850
2083
  shadow,
1851
- tone: toneProp = "default",
2084
+ tone: t3,
1852
2085
  ...restProps
1853
- } = props, as = ReactIs.isValidElementType(asProp) ? asProp : "div", rootTheme = useRootTheme(), tone = toneProp === "inherit" ? rootTheme.tone : toneProp;
1854
- return /* @__PURE__ */ jsxRuntime.jsx(ThemeColorProvider, { scheme, tone, children: /* @__PURE__ */ jsxRuntime.jsx(StyledCard, { "data-as": typeof as == "string" ? as : void 0, "data-scheme": rootTheme.scheme, "data-ui": "Card", "data-tone": tone, ...restProps, $border: _getArrayProp(border2), $borderTop: _getArrayProp(borderTop2), $borderRight: _getArrayProp(borderRight2), $borderBottom: _getArrayProp(borderBottom2), $borderLeft: _getArrayProp(borderLeft2), $checkered: checkered, $focusRing: focusRing, $muted: muted, $radius: _getArrayProp(radius), $shadow: _getArrayProp(shadow), $tone: tone, "data-checkered": checkered ? "" : void 0, "data-pressed": pressed ? "" : void 0, "data-selected": selected ? "" : void 0, forwardedAs: as, ref, selected }) });
2086
+ } = props, $[0] = props, $[1] = asProp, $[2] = border2, $[3] = borderBottom2, $[4] = borderLeft2, $[5] = borderRight2, $[6] = borderTop2, $[7] = muted, $[8] = pressed, $[9] = restProps, $[10] = scheme, $[11] = selected, $[12] = shadow, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3) : (asProp = $[1], border2 = $[2], borderBottom2 = $[3], borderLeft2 = $[4], borderRight2 = $[5], borderTop2 = $[6], muted = $[7], pressed = $[8], restProps = $[9], scheme = $[10], selected = $[11], shadow = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16]);
2087
+ const checkered = t0 === void 0 ? !1 : t0, focusRing = t1 === void 0 ? !1 : t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? "default" : t3, as = ReactIs.isValidElementType(asProp) ? asProp : "div", rootTheme = useRootTheme(), tone = toneProp === "inherit" ? rootTheme.tone : toneProp, t4 = typeof as == "string" ? as : void 0, t5 = rootTheme.scheme;
2088
+ let t6;
2089
+ $[17] !== border2 ? (t6 = _getArrayProp(border2), $[17] = border2, $[18] = t6) : t6 = $[18];
2090
+ let t7;
2091
+ $[19] !== borderTop2 ? (t7 = _getArrayProp(borderTop2), $[19] = borderTop2, $[20] = t7) : t7 = $[20];
2092
+ let t8;
2093
+ $[21] !== borderRight2 ? (t8 = _getArrayProp(borderRight2), $[21] = borderRight2, $[22] = t8) : t8 = $[22];
2094
+ let t9;
2095
+ $[23] !== borderBottom2 ? (t9 = _getArrayProp(borderBottom2), $[23] = borderBottom2, $[24] = t9) : t9 = $[24];
2096
+ let t10;
2097
+ $[25] !== borderLeft2 ? (t10 = _getArrayProp(borderLeft2), $[25] = borderLeft2, $[26] = t10) : t10 = $[26];
2098
+ let t11;
2099
+ $[27] !== radius ? (t11 = _getArrayProp(radius), $[27] = radius, $[28] = t11) : t11 = $[28];
2100
+ let t12;
2101
+ $[29] !== shadow ? (t12 = _getArrayProp(shadow), $[29] = shadow, $[30] = t12) : t12 = $[30];
2102
+ const t13 = checkered ? "" : void 0, t14 = pressed ? "" : void 0, t15 = selected ? "" : void 0;
2103
+ let t16;
2104
+ $[31] !== as || $[32] !== checkered || $[33] !== focusRing || $[34] !== muted || $[35] !== ref || $[36] !== restProps || $[37] !== rootTheme.scheme || $[38] !== selected || $[39] !== t10 || $[40] !== t11 || $[41] !== t12 || $[42] !== t13 || $[43] !== t14 || $[44] !== t15 || $[45] !== t4 || $[46] !== t6 || $[47] !== t7 || $[48] !== t8 || $[49] !== t9 || $[50] !== tone ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(StyledCard, { "data-as": t4, "data-scheme": t5, "data-ui": "Card", "data-tone": tone, ...restProps, $border: t6, $borderTop: t7, $borderRight: t8, $borderBottom: t9, $borderLeft: t10, $checkered: checkered, $focusRing: focusRing, $muted: muted, $radius: t11, $shadow: t12, $tone: tone, "data-checkered": t13, "data-pressed": t14, "data-selected": t15, forwardedAs: as, ref, selected }), $[31] = as, $[32] = checkered, $[33] = focusRing, $[34] = muted, $[35] = ref, $[36] = restProps, $[37] = rootTheme.scheme, $[38] = selected, $[39] = t10, $[40] = t11, $[41] = t12, $[42] = t13, $[43] = t14, $[44] = t15, $[45] = t4, $[46] = t6, $[47] = t7, $[48] = t8, $[49] = t9, $[50] = tone, $[51] = t16) : t16 = $[51];
2105
+ let t17;
2106
+ return $[52] !== scheme || $[53] !== t16 || $[54] !== tone ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(ThemeColorProvider, { scheme, tone, children: t16 }), $[52] = scheme, $[53] = t16, $[54] = tone, $[55] = t17) : t17 = $[55], t17;
1855
2107
  });
1856
2108
  Card.displayName = "ForwardRef(Card)";
1857
- function useClickOutsideEvent(listener, elementsArg = () => EMPTY_ARRAY, boundaryElement) {
1858
- const onEvent = useEffectEvent.useEffectEvent((evt) => {
2109
+ function useClickOutsideEvent(listener, t0, boundaryElement) {
2110
+ const $ = reactCompilerRuntime.c(9), elementsArg = t0 === void 0 ? _temp$8 : t0;
2111
+ let t1;
2112
+ $[0] !== boundaryElement || $[1] !== elementsArg || $[2] !== listener ? (t1 = (evt) => {
1859
2113
  if (!listener)
1860
2114
  return;
1861
2115
  const target = evt.target;
@@ -1869,19 +2123,29 @@ function useClickOutsideEvent(listener, elementsArg = () => EMPTY_ARRAY, boundar
1869
2123
  if (el && (target === el || el.contains(target)))
1870
2124
  return;
1871
2125
  listener(evt);
1872
- }), hasListener = !!listener;
1873
- react.useEffect(() => {
1874
- if (!hasListener) return;
1875
- const handleEvent = (evt) => onEvent(evt);
2126
+ }, $[0] = boundaryElement, $[1] = elementsArg, $[2] = listener, $[3] = t1) : t1 = $[3];
2127
+ const onEvent = useEffectEvent.useEffectEvent(t1), hasListener = !!listener;
2128
+ let t2;
2129
+ $[4] !== hasListener || $[5] !== onEvent ? (t2 = () => {
2130
+ if (!hasListener)
2131
+ return;
2132
+ const handleEvent = (evt_0) => onEvent(evt_0);
1876
2133
  return document.addEventListener("mousedown", handleEvent), () => {
1877
2134
  document.removeEventListener("mousedown", handleEvent);
1878
2135
  };
1879
- }, [hasListener]), react.useDebugValue(listener ? "MouseDown On" : "MouseDown Off");
2136
+ }, $[4] = hasListener, $[5] = onEvent, $[6] = t2) : t2 = $[6];
2137
+ let t3;
2138
+ $[7] !== hasListener ? (t3 = [hasListener], $[7] = hasListener, $[8] = t3) : t3 = $[8], react.useEffect(t2, t3), react.useDebugValue(listener ? "MouseDown On" : "MouseDown Off");
2139
+ }
2140
+ function _temp$8() {
2141
+ return EMPTY_ARRAY;
1880
2142
  }
1881
2143
  function useCustomValidity(ref, customValidity) {
1882
- react.useEffect(() => {
2144
+ const $ = reactCompilerRuntime.c(4);
2145
+ let t0, t1;
2146
+ $[0] !== customValidity || $[1] !== ref ? (t0 = () => {
1883
2147
  ref.current?.setCustomValidity(customValidity || "");
1884
- }, [customValidity, ref]);
2148
+ }, t1 = [customValidity, ref], $[0] = customValidity, $[1] = ref, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), react.useEffect(t0, t1);
1885
2149
  }
1886
2150
  const _ResizeObserver = typeof document < "u" && typeof window < "u" && window.ResizeObserver ? window.ResizeObserver : resizeObserver.ResizeObserver, _elementSizeObserver = _createElementSizeObserver();
1887
2151
  function _createElementRectValueListener() {
@@ -1923,24 +2187,36 @@ function _createElementSizeObserver() {
1923
2187
  };
1924
2188
  }
1925
2189
  function useElementSize(element) {
1926
- const [size2, setSize] = react.useState(null);
1927
- return react.useEffect(() => {
2190
+ const $ = reactCompilerRuntime.c(3), [size2, setSize] = react.useState(null);
2191
+ let t0, t1;
2192
+ return $[0] !== element ? (t0 = () => {
1928
2193
  if (element)
1929
2194
  return _elementSizeObserver.subscribe(element, setSize);
1930
- }, [element]), size2;
1931
- }
1932
- function useGlobalKeyDown(onKeyDown) {
1933
- const handleKeyDown = useEffectEvent.useEffectEvent((event) => onKeyDown(event));
1934
- react.useEffect(() => {
1935
- const handler = (event) => handleKeyDown(event);
1936
- return window.addEventListener("keydown", handler), () => window.removeEventListener("keydown", handler);
1937
- }, []);
2195
+ }, t1 = [element], $[0] = element, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), react.useEffect(t0, t1), size2;
2196
+ }
2197
+ function useGlobalKeyDown(onKeyDown, options) {
2198
+ const $ = reactCompilerRuntime.c(7);
2199
+ let t0;
2200
+ $[0] !== onKeyDown ? (t0 = (event) => onKeyDown(event), $[0] = onKeyDown, $[1] = t0) : t0 = $[1];
2201
+ const handleKeyDown = useEffectEvent.useEffectEvent(t0);
2202
+ let t1;
2203
+ $[2] !== handleKeyDown || $[3] !== options ? (t1 = () => {
2204
+ const handler = (event_0) => handleKeyDown(event_0);
2205
+ return window.addEventListener("keydown", handler, options), () => window.removeEventListener("keydown", handler, options);
2206
+ }, $[2] = handleKeyDown, $[3] = options, $[4] = t1) : t1 = $[4];
2207
+ let t2;
2208
+ $[5] !== options ? (t2 = [options], $[5] = options, $[6] = t2) : t2 = $[6], react.useEffect(t1, t2);
1938
2209
  }
1939
2210
  function useMatchMedia(mediaQueryString, getServerSnapshot2) {
1940
- return react.useDebugValue(mediaQueryString), react.useSyncExternalStore(react.useCallback((onStoreChange) => {
2211
+ const $ = reactCompilerRuntime.c(4);
2212
+ react.useDebugValue(mediaQueryString);
2213
+ let t0;
2214
+ $[0] !== mediaQueryString ? (t0 = (onStoreChange) => {
1941
2215
  const media = window.matchMedia(mediaQueryString);
1942
2216
  return media.addEventListener("change", onStoreChange), () => media.removeEventListener("change", onStoreChange);
1943
- }, [mediaQueryString]), () => window.matchMedia(mediaQueryString).matches, getServerSnapshot2);
2217
+ }, $[0] = mediaQueryString, $[1] = t0) : t0 = $[1];
2218
+ let t1;
2219
+ return $[2] !== mediaQueryString ? (t1 = () => window.matchMedia(mediaQueryString).matches, $[2] = mediaQueryString, $[3] = t1) : t1 = $[3], react.useSyncExternalStore(t0, t1, getServerSnapshot2);
1944
2220
  }
1945
2221
  function _getMediaQuery(media, index) {
1946
2222
  return index === 0 ? `screen and (max-width: ${media[index] - 1}px)` : index === media.length ? `screen and (min-width: ${media[index - 1]}px)` : `screen and (min-width: ${media[index - 1]}px) and (max-width: ${media[index] - 1}px)`;
@@ -1991,16 +2267,25 @@ function getServerSnapshot() {
1991
2267
  return 0;
1992
2268
  }
1993
2269
  function useMediaIndex() {
1994
- const {
2270
+ const $ = reactCompilerRuntime.c(2), {
1995
2271
  media
1996
- } = useTheme_v2(), store = react.useMemo(() => _createMediaStore(media), [media]);
2272
+ } = useTheme_v2();
2273
+ let t0;
2274
+ $[0] !== media ? (t0 = _createMediaStore(media), $[0] = media, $[1] = t0) : t0 = $[1];
2275
+ const store = t0;
1997
2276
  return react.useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot);
1998
2277
  }
1999
- function usePrefersDark(getServerSnapshot2 = () => !1) {
2000
- return useMatchMedia("(prefers-color-scheme: dark)", getServerSnapshot2);
2278
+ function usePrefersDark(t0) {
2279
+ return useMatchMedia("(prefers-color-scheme: dark)", t0 === void 0 ? _temp$7 : t0);
2280
+ }
2281
+ function _temp$7() {
2282
+ return !1;
2283
+ }
2284
+ function usePrefersReducedMotion(t0) {
2285
+ return useMatchMedia("(prefers-reduced-motion: reduce)", t0 === void 0 ? _temp$6 : t0);
2001
2286
  }
2002
- function usePrefersReducedMotion(getServerSnapshot2 = () => !1) {
2003
- return useMatchMedia("(prefers-reduced-motion: reduce)", getServerSnapshot2);
2287
+ function _temp$6() {
2288
+ return !1;
2004
2289
  }
2005
2290
  function checkboxBaseStyles() {
2006
2291
  return styledComponents.css`
@@ -2147,7 +2432,9 @@ const StyledCheckbox = /* @__PURE__ */ styledComponents.styled.div.withConfig({
2147
2432
  displayName: "Input",
2148
2433
  componentId: "sc-1l5mt2l-1"
2149
2434
  })(inputElementStyles), Checkbox = react.forwardRef(function(props, forwardedRef) {
2150
- const {
2435
+ const $ = reactCompilerRuntime.c(25);
2436
+ let checked, className, customValidity, disabled, indeterminate, readOnly, restProps, style;
2437
+ $[0] !== props ? ({
2151
2438
  checked,
2152
2439
  className,
2153
2440
  disabled,
@@ -2156,16 +2443,27 @@ const StyledCheckbox = /* @__PURE__ */ styledComponents.styled.div.withConfig({
2156
2443
  readOnly,
2157
2444
  style,
2158
2445
  ...restProps
2159
- } = props, ref = react.useRef(null);
2160
- return react.useImperativeHandle(forwardedRef, () => ref.current), react.useEffect(() => {
2446
+ } = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = customValidity, $[4] = disabled, $[5] = indeterminate, $[6] = readOnly, $[7] = restProps, $[8] = style) : (checked = $[1], className = $[2], customValidity = $[3], disabled = $[4], indeterminate = $[5], readOnly = $[6], restProps = $[7], style = $[8]);
2447
+ const ref = react.useRef(null);
2448
+ let t0;
2449
+ $[9] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[9] = t0) : t0 = $[9], react.useImperativeHandle(forwardedRef, t0);
2450
+ let t1, t2;
2451
+ $[10] !== indeterminate ? (t1 = () => {
2161
2452
  ref.current && (ref.current.indeterminate = indeterminate || !1);
2162
- }, [indeterminate]), useCustomValidity(ref, customValidity), /* @__PURE__ */ jsxRuntime.jsxs(StyledCheckbox, { className, "data-ui": "Checkbox", style, children: [
2163
- /* @__PURE__ */ jsxRuntime.jsx(Input$5, { "data-read-only": !disabled && readOnly ? "" : void 0, "data-error": customValidity ? "" : void 0, ...restProps, checked, disabled: disabled || readOnly, type: "checkbox", readOnly, ref }),
2164
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2165
- /* @__PURE__ */ jsxRuntime.jsx(icons.CheckmarkIcon, {}),
2166
- /* @__PURE__ */ jsxRuntime.jsx(icons.RemoveIcon, {})
2167
- ] })
2168
- ] });
2453
+ }, t2 = [indeterminate], $[10] = indeterminate, $[11] = t1, $[12] = t2) : (t1 = $[11], t2 = $[12]), react.useEffect(t1, t2), useCustomValidity(ref, customValidity);
2454
+ const t3 = !disabled && readOnly ? "" : void 0, t4 = customValidity ? "" : void 0, t5 = disabled || readOnly;
2455
+ let t6;
2456
+ $[13] !== checked || $[14] !== readOnly || $[15] !== restProps || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Input$5, { "data-read-only": t3, "data-error": t4, ...restProps, checked, disabled: t5, type: "checkbox", readOnly, ref }), $[13] = checked, $[14] = readOnly, $[15] = restProps, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6) : t6 = $[19];
2457
+ let t7;
2458
+ $[20] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2459
+ /* @__PURE__ */ jsxRuntime.jsx(icons.CheckmarkIcon, {}),
2460
+ /* @__PURE__ */ jsxRuntime.jsx(icons.RemoveIcon, {})
2461
+ ] }), $[20] = t7) : t7 = $[20];
2462
+ let t8;
2463
+ return $[21] !== className || $[22] !== style || $[23] !== t6 ? (t8 = /* @__PURE__ */ jsxRuntime.jsxs(StyledCheckbox, { className, "data-ui": "Checkbox", style, children: [
2464
+ t6,
2465
+ t7
2466
+ ] }), $[21] = className, $[22] = style, $[23] = t6, $[24] = t8) : t8 = $[24], t8;
2169
2467
  });
2170
2468
  Checkbox.displayName = "ForwardRef(Checkbox)";
2171
2469
  function codeSyntaxHighlightingStyle({
@@ -2322,14 +2620,26 @@ const LazyRefractor = react.lazy(() => Promise.resolve().then(function() {
2322
2620
  displayName: "StyledCode",
2323
2621
  componentId: "sc-4dymyn-0"
2324
2622
  })(codeBaseStyle, responsiveCodeFontStyle), Code = react.forwardRef(function(props, ref) {
2325
- const {
2623
+ const $ = reactCompilerRuntime.c(22);
2624
+ let children, language, restProps, t0, weight;
2625
+ $[0] !== props ? ({
2326
2626
  children,
2327
2627
  language,
2328
- size: size2 = 2,
2628
+ size: t0,
2329
2629
  weight,
2330
2630
  ...restProps
2331
- } = props;
2332
- return /* @__PURE__ */ jsxRuntime.jsx(StyledCode, { "data-ui": "Code", ...restProps, $size: _getArrayProp(size2), $weight: weight, ref, children: /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx("code", { children }), children: /* @__PURE__ */ jsxRuntime.jsx(LazyRefractor, { language, value: children }) }) });
2631
+ } = props, $[0] = props, $[1] = children, $[2] = language, $[3] = restProps, $[4] = t0, $[5] = weight) : (children = $[1], language = $[2], restProps = $[3], t0 = $[4], weight = $[5]);
2632
+ const size2 = t0 === void 0 ? 2 : t0;
2633
+ let t1;
2634
+ $[6] !== size2 ? (t1 = _getArrayProp(size2), $[6] = size2, $[7] = t1) : t1 = $[7];
2635
+ let t2;
2636
+ $[8] !== children ? (t2 = /* @__PURE__ */ jsxRuntime.jsx("code", { children }), $[8] = children, $[9] = t2) : t2 = $[9];
2637
+ let t3;
2638
+ $[10] !== children || $[11] !== language ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(LazyRefractor, { language, value: children }), $[10] = children, $[11] = language, $[12] = t3) : t3 = $[12];
2639
+ let t4;
2640
+ $[13] !== t2 || $[14] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: t2, children: t3 }), $[13] = t2, $[14] = t3, $[15] = t4) : t4 = $[15];
2641
+ let t5;
2642
+ return $[16] !== ref || $[17] !== restProps || $[18] !== t1 || $[19] !== t4 || $[20] !== weight ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(StyledCode, { "data-ui": "Code", ...restProps, $size: t1, $weight: weight, ref, children: t4 }), $[16] = ref, $[17] = restProps, $[18] = t1, $[19] = t4, $[20] = weight, $[21] = t5) : t5 = $[21], t5;
2333
2643
  });
2334
2644
  Code.displayName = "ForwardRef(Code)";
2335
2645
  const BASE_STYLE$1 = {
@@ -2352,19 +2662,27 @@ const StyledContainer = /* @__PURE__ */ styledComponents.styled(Box).withConfig(
2352
2662
  displayName: "StyledContainer",
2353
2663
  componentId: "sc-wyroop-0"
2354
2664
  })(containerBaseStyle, responsiveContainerWidthStyle), Container = react.forwardRef(function(props, ref) {
2355
- const {
2665
+ const $ = reactCompilerRuntime.c(11);
2666
+ let as, restProps, t0;
2667
+ $[0] !== props ? ({
2356
2668
  as,
2357
- width = 2,
2669
+ width: t0,
2358
2670
  ...restProps
2359
- } = props;
2360
- return /* @__PURE__ */ jsxRuntime.jsx(StyledContainer, { "data-ui": "Container", ...restProps, $width: _getArrayProp(width), forwardedAs: as, ref });
2671
+ } = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = t0) : (as = $[1], restProps = $[2], t0 = $[3]);
2672
+ const width = t0 === void 0 ? 2 : t0;
2673
+ let t1;
2674
+ $[4] !== width ? (t1 = _getArrayProp(width), $[4] = width, $[5] = t1) : t1 = $[5];
2675
+ let t2;
2676
+ return $[6] !== as || $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(StyledContainer, { "data-ui": "Container", ...restProps, $width: t1, forwardedAs: as, ref }), $[6] = as, $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
2361
2677
  });
2362
2678
  Container.displayName = "ForwardRef(Container)";
2363
2679
  const StyledGrid = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
2364
2680
  displayName: "StyledGrid",
2365
2681
  componentId: "sc-v8t8oz-0"
2366
2682
  })(responsiveGridStyle), Grid = react.forwardRef(function(props, ref) {
2367
- const {
2683
+ const $ = reactCompilerRuntime.c(42);
2684
+ let as, autoCols, autoFlow, autoRows, children, columns, gap, gapX, gapY, restProps, rows;
2685
+ $[0] !== props ? ({
2368
2686
  as,
2369
2687
  autoRows,
2370
2688
  autoCols,
@@ -2376,8 +2694,26 @@ const StyledGrid = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
2376
2694
  rows,
2377
2695
  children,
2378
2696
  ...restProps
2379
- } = props;
2380
- return /* @__PURE__ */ jsxRuntime.jsx(StyledGrid, { "data-as": typeof as == "string" ? as : void 0, "data-ui": "Grid", ...restProps, $autoRows: _getArrayProp(autoRows), $autoCols: _getArrayProp(autoCols), $autoFlow: _getArrayProp(autoFlow), $columns: _getArrayProp(columns), $gap: _getArrayProp(gap), $gapX: _getArrayProp(gapX), $gapY: _getArrayProp(gapY), $rows: _getArrayProp(rows), forwardedAs: as, ref, children });
2697
+ } = props, $[0] = props, $[1] = as, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = children, $[6] = columns, $[7] = gap, $[8] = gapX, $[9] = gapY, $[10] = restProps, $[11] = rows) : (as = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], children = $[5], columns = $[6], gap = $[7], gapX = $[8], gapY = $[9], restProps = $[10], rows = $[11]);
2698
+ const t0 = typeof as == "string" ? as : void 0;
2699
+ let t1;
2700
+ $[12] !== autoRows ? (t1 = _getArrayProp(autoRows), $[12] = autoRows, $[13] = t1) : t1 = $[13];
2701
+ let t2;
2702
+ $[14] !== autoCols ? (t2 = _getArrayProp(autoCols), $[14] = autoCols, $[15] = t2) : t2 = $[15];
2703
+ let t3;
2704
+ $[16] !== autoFlow ? (t3 = _getArrayProp(autoFlow), $[16] = autoFlow, $[17] = t3) : t3 = $[17];
2705
+ let t4;
2706
+ $[18] !== columns ? (t4 = _getArrayProp(columns), $[18] = columns, $[19] = t4) : t4 = $[19];
2707
+ let t5;
2708
+ $[20] !== gap ? (t5 = _getArrayProp(gap), $[20] = gap, $[21] = t5) : t5 = $[21];
2709
+ let t6;
2710
+ $[22] !== gapX ? (t6 = _getArrayProp(gapX), $[22] = gapX, $[23] = t6) : t6 = $[23];
2711
+ let t7;
2712
+ $[24] !== gapY ? (t7 = _getArrayProp(gapY), $[24] = gapY, $[25] = t7) : t7 = $[25];
2713
+ let t8;
2714
+ $[26] !== rows ? (t8 = _getArrayProp(rows), $[26] = rows, $[27] = t8) : t8 = $[27];
2715
+ let t9;
2716
+ return $[28] !== as || $[29] !== children || $[30] !== ref || $[31] !== restProps || $[32] !== t0 || $[33] !== t1 || $[34] !== t2 || $[35] !== t3 || $[36] !== t4 || $[37] !== t5 || $[38] !== t6 || $[39] !== t7 || $[40] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(StyledGrid, { "data-as": t0, "data-ui": "Grid", ...restProps, $autoRows: t1, $autoCols: t2, $autoFlow: t3, $columns: t4, $gap: t5, $gapX: t6, $gapY: t7, $rows: t8, forwardedAs: as, ref, children }), $[28] = as, $[29] = children, $[30] = ref, $[31] = restProps, $[32] = t0, $[33] = t1, $[34] = t2, $[35] = t3, $[36] = t4, $[37] = t5, $[38] = t6, $[39] = t7, $[40] = t8, $[41] = t9) : t9 = $[41], t9;
2381
2717
  });
2382
2718
  Grid.displayName = "ForwardRef(Grid)";
2383
2719
  function headingBaseStyle(props) {
@@ -2443,18 +2779,32 @@ const StyledHeading = /* @__PURE__ */ styledComponents.styled.div.withConfig({
2443
2779
  displayName: "StyledHeading",
2444
2780
  componentId: "sc-137lwim-0"
2445
2781
  })(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), Heading = react.forwardRef(function(props, ref) {
2446
- const {
2447
- accent = !1,
2782
+ const $ = reactCompilerRuntime.c(26);
2783
+ let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
2784
+ $[0] !== props ? ({
2785
+ accent: t0,
2448
2786
  align,
2449
2787
  children: childrenProp,
2450
- muted = !1,
2451
- size: size2 = 2,
2788
+ muted: t1,
2789
+ size: t2,
2452
2790
  textOverflow,
2453
2791
  weight,
2454
2792
  ...restProps
2455
- } = props;
2793
+ } = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = textOverflow, $[8] = weight) : (align = $[1], childrenProp = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], textOverflow = $[7], weight = $[8]);
2794
+ const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
2456
2795
  let children = childrenProp;
2457
- return textOverflow === "ellipsis" && (children = /* @__PURE__ */ jsxRuntime.jsx(SpanWithTextOverflow, { children })), /* @__PURE__ */ jsxRuntime.jsx(StyledHeading, { "data-ui": "Heading", ...restProps, $accent: accent, $align: _getArrayProp(align), $muted: muted, $size: _getArrayProp(size2), $weight: weight, ref, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children }) });
2796
+ if (textOverflow === "ellipsis") {
2797
+ let t32;
2798
+ $[9] !== children ? (t32 = /* @__PURE__ */ jsxRuntime.jsx(SpanWithTextOverflow, { children }), $[9] = children, $[10] = t32) : t32 = $[10], children = t32;
2799
+ }
2800
+ let t3;
2801
+ $[11] !== align ? (t3 = _getArrayProp(align), $[11] = align, $[12] = t3) : t3 = $[12];
2802
+ let t4;
2803
+ $[13] !== size2 ? (t4 = _getArrayProp(size2), $[13] = size2, $[14] = t4) : t4 = $[14];
2804
+ let t5;
2805
+ $[15] !== children ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { children }), $[15] = children, $[16] = t5) : t5 = $[16];
2806
+ let t6;
2807
+ return $[17] !== accent || $[18] !== muted || $[19] !== ref || $[20] !== restProps || $[21] !== t3 || $[22] !== t4 || $[23] !== t5 || $[24] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(StyledHeading, { "data-ui": "Heading", ...restProps, $accent: accent, $align: t3, $muted: muted, $size: t4, $weight: weight, ref, children: t5 }), $[17] = accent, $[18] = muted, $[19] = ref, $[20] = restProps, $[21] = t3, $[22] = t4, $[23] = t5, $[24] = weight, $[25] = t6) : t6 = $[25], t6;
2458
2808
  });
2459
2809
  Heading.displayName = "ForwardRef(Heading)";
2460
2810
  function inlineBaseStyle() {
@@ -2488,15 +2838,27 @@ const StyledInline = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
2488
2838
  displayName: "StyledInline",
2489
2839
  componentId: "sc-1pkiy6j-0"
2490
2840
  })(inlineBaseStyle, inlineSpaceStyle), Inline = react.forwardRef(function(props, ref) {
2491
- const {
2841
+ const $ = reactCompilerRuntime.c(15);
2842
+ let as, childrenProp, restProps, space;
2843
+ $[0] !== props ? ({
2492
2844
  as,
2493
2845
  children: childrenProp,
2494
2846
  space,
2495
2847
  ...restProps
2496
- } = props, children = react.useMemo(() => react.Children.map(childrenProp, (child) => child && /* @__PURE__ */ jsxRuntime.jsx("div", { children: child })), [childrenProp]);
2497
- return /* @__PURE__ */ jsxRuntime.jsx(StyledInline, { "data-ui": "Inline", ...restProps, $space: _getArrayProp(space), forwardedAs: as, ref, children });
2848
+ } = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = restProps, $[4] = space) : (as = $[1], childrenProp = $[2], restProps = $[3], space = $[4]);
2849
+ let t0;
2850
+ $[5] !== childrenProp ? (t0 = react.Children.map(childrenProp, _temp$5), $[5] = childrenProp, $[6] = t0) : t0 = $[6];
2851
+ const children = t0;
2852
+ let t1;
2853
+ $[7] !== space ? (t1 = _getArrayProp(space), $[7] = space, $[8] = t1) : t1 = $[8];
2854
+ const t2 = ref;
2855
+ let t3;
2856
+ return $[9] !== as || $[10] !== children || $[11] !== restProps || $[12] !== t1 || $[13] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(StyledInline, { "data-ui": "Inline", ...restProps, $space: t1, forwardedAs: as, ref: t2, children }), $[9] = as, $[10] = children, $[11] = restProps, $[12] = t1, $[13] = t2, $[14] = t3) : t3 = $[14], t3;
2498
2857
  });
2499
2858
  Inline.displayName = "ForwardRef(Inline)";
2859
+ function _temp$5(child) {
2860
+ return child && /* @__PURE__ */ jsxRuntime.jsx("div", { children: child });
2861
+ }
2500
2862
  function kbdStyle() {
2501
2863
  return styledComponents.css`
2502
2864
  --card-bg-color: var(--card-kbd-bg-color);
@@ -2518,14 +2880,24 @@ const StyledKBD = /* @__PURE__ */ styledComponents.styled.kbd.withConfig({
2518
2880
  displayName: "StyledKBD",
2519
2881
  componentId: "sc-1w7yd8w-0"
2520
2882
  })(responsiveRadiusStyle, kbdStyle), KBD = react.forwardRef(function(props, ref) {
2521
- const {
2883
+ const $ = reactCompilerRuntime.c(19);
2884
+ let children, restProps, t0, t1, t2;
2885
+ $[0] !== props ? ({
2522
2886
  children,
2523
- fontSize: fontSize2 = 0,
2524
- padding = 1,
2525
- radius = 2,
2887
+ fontSize: t0,
2888
+ padding: t1,
2889
+ radius: t2,
2526
2890
  ...restProps
2527
- } = props;
2528
- return /* @__PURE__ */ jsxRuntime.jsx(StyledKBD, { "data-ui": "KBD", ...restProps, $radius: _getArrayProp(radius), ref, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }) }) });
2891
+ } = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2) : (children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5]);
2892
+ const fontSize2 = t0 === void 0 ? 0 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? 2 : t2;
2893
+ let t3;
2894
+ $[6] !== radius ? (t3 = _getArrayProp(radius), $[6] = radius, $[7] = t3) : t3 = $[7];
2895
+ let t4;
2896
+ $[8] !== children || $[9] !== fontSize2 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }), $[8] = children, $[9] = fontSize2, $[10] = t4) : t4 = $[10];
2897
+ let t5;
2898
+ $[11] !== padding || $[12] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, children: t4 }), $[11] = padding, $[12] = t4, $[13] = t5) : t5 = $[13];
2899
+ let t6;
2900
+ return $[14] !== ref || $[15] !== restProps || $[16] !== t3 || $[17] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(StyledKBD, { "data-ui": "KBD", ...restProps, $radius: t3, ref, children: t5 }), $[14] = ref, $[15] = restProps, $[16] = t3, $[17] = t5, $[18] = t6) : t6 = $[18], t6;
2529
2901
  });
2530
2902
  KBD.displayName = "ForwardRef(KBD)";
2531
2903
  const origin = {
@@ -2653,12 +3025,15 @@ const StyledArrow = /* @__PURE__ */ styledComponents.styled.div.withConfig({
2653
3025
  displayName: "ShapePath",
2654
3026
  componentId: "sc-12vzy6c-2"
2655
3027
  })`fill:var(--card-bg-color);`, Arrow = react.forwardRef(function(props, ref) {
2656
- const {
3028
+ const $ = reactCompilerRuntime.c(24);
3029
+ let h, restProps, t0, w;
3030
+ $[0] !== props ? ({
2657
3031
  width: w,
2658
3032
  height: h,
2659
- radius = 0,
3033
+ radius: t0,
2660
3034
  ...restProps
2661
- } = props, {
3035
+ } = props, $[0] = props, $[1] = h, $[2] = restProps, $[3] = t0, $[4] = w) : (h = $[1], restProps = $[2], t0 = $[3], w = $[4]);
3036
+ const radius = t0 === void 0 ? 0 : t0, {
2662
3037
  card
2663
3038
  } = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, points = [{
2664
3039
  x: 0,
@@ -2678,24 +3053,38 @@ const StyledArrow = /* @__PURE__ */ styledComponents.styled.div.withConfig({
2678
3053
  }, {
2679
3054
  x: w,
2680
3055
  y: 0
2681
- }], cmds = getRoundedCommands(points), path = compileCommands(cmds), strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`;
2682
- return /* @__PURE__ */ jsxRuntime.jsx(StyledArrow, { ...restProps, $w: w, ref, children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: w, height: w, viewBox: `0 0 ${w} ${w}`, children: [
2683
- /* @__PURE__ */ jsxRuntime.jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: strokeWidth, width: w, height: w, fill: "white" }) }),
2684
- /* @__PURE__ */ jsxRuntime.jsx(StrokePath, { d: strokePath, mask: "url(#stroke-mask)", strokeWidth: strokeWidth * 2 }),
2685
- /* @__PURE__ */ jsxRuntime.jsx(ShapePath, { d: fillPath })
2686
- ] }) });
3056
+ }], cmds = getRoundedCommands(points), path = compileCommands(cmds), strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`, t1 = `0 0 ${w} ${w}`;
3057
+ let t2;
3058
+ $[5] !== strokeWidth || $[6] !== w ? (t2 = /* @__PURE__ */ jsxRuntime.jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: strokeWidth, width: w, height: w, fill: "white" }) }), $[5] = strokeWidth, $[6] = w, $[7] = t2) : t2 = $[7];
3059
+ const t3 = strokeWidth * 2;
3060
+ let t4;
3061
+ $[8] !== strokePath || $[9] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(StrokePath, { d: strokePath, mask: "url(#stroke-mask)", strokeWidth: t3 }), $[8] = strokePath, $[9] = t3, $[10] = t4) : t4 = $[10];
3062
+ let t5;
3063
+ $[11] !== fillPath ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(ShapePath, { d: fillPath }), $[11] = fillPath, $[12] = t5) : t5 = $[12];
3064
+ let t6;
3065
+ $[13] !== t1 || $[14] !== t2 || $[15] !== t4 || $[16] !== t5 || $[17] !== w ? (t6 = /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: w, height: w, viewBox: t1, children: [
3066
+ t2,
3067
+ t4,
3068
+ t5
3069
+ ] }), $[13] = t1, $[14] = t2, $[15] = t4, $[16] = t5, $[17] = w, $[18] = t6) : t6 = $[18];
3070
+ let t7;
3071
+ return $[19] !== ref || $[20] !== restProps || $[21] !== t6 || $[22] !== w ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(StyledArrow, { ...restProps, $w: w, ref, children: t6 }), $[19] = ref, $[20] = restProps, $[21] = t6, $[22] = w, $[23] = t7) : t7 = $[23], t7;
2687
3072
  });
2688
3073
  Arrow.displayName = "ForwardRef(Arrow)";
2689
3074
  const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null);
2690
3075
  function BoundaryElementProvider(props) {
2691
- const {
3076
+ const $ = reactCompilerRuntime.c(5), {
2692
3077
  children,
2693
3078
  element
2694
- } = props, value = react.useMemo(() => ({
3079
+ } = props;
3080
+ let t0;
3081
+ $[0] !== element ? (t0 = {
2695
3082
  version: 0,
2696
3083
  element
2697
- }), [element]);
2698
- return /* @__PURE__ */ jsxRuntime.jsx(BoundaryElementContext.Provider, { value, children });
3084
+ }, $[0] = element, $[1] = t0) : t0 = $[1];
3085
+ const value = t0;
3086
+ let t1;
3087
+ return $[2] !== children || $[3] !== value ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(BoundaryElementContext.Provider, { value, children }), $[2] = children, $[3] = value, $[4] = t1) : t1 = $[4], t1;
2699
3088
  }
2700
3089
  BoundaryElementProvider.displayName = "BoundaryElementProvider";
2701
3090
  function isRecord(value) {
@@ -2732,18 +3121,32 @@ function findMinBreakpoints(media, width) {
2732
3121
  return ret;
2733
3122
  }
2734
3123
  const ElementQuery = react.forwardRef(function(props, forwardedRef) {
2735
- const theme2 = useTheme_v2(), {
3124
+ const $ = reactCompilerRuntime.c(18), theme2 = useTheme_v2();
3125
+ let _media, children, restProps;
3126
+ $[0] !== props ? ({
2736
3127
  children,
2737
3128
  media: _media,
2738
3129
  ...restProps
2739
- } = props, media = _media ?? theme2.media, [element, setElement] = react.useState(null), elementSize = useElementSize(element), width = react.useMemo(() => elementSize?.border.width ?? window.innerWidth, [elementSize]), max = react.useMemo(() => {
3130
+ } = props, $[0] = props, $[1] = _media, $[2] = children, $[3] = restProps) : (_media = $[1], children = $[2], restProps = $[3]);
3131
+ const media = _media ?? theme2.media, [element, setElement] = react.useState(null), width = useElementSize(element)?.border.width ?? window.innerWidth;
3132
+ let t0;
3133
+ if ($[4] !== media || $[5] !== width) {
2740
3134
  const eq = findMaxBreakpoints(media, width);
2741
- return eq.length ? eq.join(" ") : void 0;
2742
- }, [media, width]), min = react.useMemo(() => {
2743
- const eq = findMinBreakpoints(media, width);
2744
- return eq.length ? eq.join(" ") : void 0;
2745
- }, [media, width]);
2746
- return react.useImperativeHandle(forwardedRef, () => element, [element]), /* @__PURE__ */ jsxRuntime.jsx("div", { "data-ui": "ElementQuery", ...restProps, "data-eq-max": max, "data-eq-min": min, ref: setElement, children });
3135
+ t0 = eq.length ? eq.join(" ") : void 0, $[4] = media, $[5] = width, $[6] = t0;
3136
+ } else
3137
+ t0 = $[6];
3138
+ const max = t0;
3139
+ let t1;
3140
+ if ($[7] !== media || $[8] !== width) {
3141
+ const eq_0 = findMinBreakpoints(media, width);
3142
+ t1 = eq_0.length ? eq_0.join(" ") : void 0, $[7] = media, $[8] = width, $[9] = t1;
3143
+ } else
3144
+ t1 = $[9];
3145
+ const min = t1;
3146
+ let t2, t3;
3147
+ $[10] !== element ? (t2 = () => element, t3 = [element], $[10] = element, $[11] = t2, $[12] = t3) : (t2 = $[11], t3 = $[12]), react.useImperativeHandle(forwardedRef, t2, t3);
3148
+ let t4;
3149
+ return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t4 = /* @__PURE__ */ jsxRuntime.jsx("div", { "data-ui": "ElementQuery", ...restProps, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[13] = children, $[14] = max, $[15] = min, $[16] = restProps, $[17] = t4) : t4 = $[17], t4;
2747
3150
  });
2748
3151
  ElementQuery.displayName = "ForwardRef(ElementQuery)";
2749
3152
  function getLayerContext(contextValue) {
@@ -2757,10 +3160,21 @@ function getLayerContext(contextValue) {
2757
3160
  }
2758
3161
  const LayerContext = createGlobalScopedContext("@sanity/ui/context/layer", null);
2759
3162
  function LayerProvider(props) {
2760
- const {
3163
+ const $ = reactCompilerRuntime.c(21), {
2761
3164
  children,
2762
- zOffset: zOffsetProp = 0
2763
- } = props, parentContextValue = react.useContext(LayerContext), parent = parentContextValue && getLayerContext(parentContextValue), parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1, zOffset = _getArrayProp(zOffsetProp), maxMediaIndex = zOffset.length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex], [, setChildLayers] = react.useState({}), [size2, setSize] = react.useState(0), isTopLayer = size2 === 0, registerChild = react.useCallback((childLevel) => {
3165
+ zOffset: t0
3166
+ } = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue = react.useContext(LayerContext);
3167
+ let t1;
3168
+ $[0] !== parentContextValue ? (t1 = parentContextValue && getLayerContext(parentContextValue), $[0] = parentContextValue, $[1] = t1) : t1 = $[1];
3169
+ const parent = t1, parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1;
3170
+ let t2;
3171
+ $[2] !== zOffsetProp ? (t2 = _getArrayProp(zOffsetProp), $[2] = zOffsetProp, $[3] = t2) : t2 = $[3];
3172
+ const zOffset = t2, maxMediaIndex = zOffset.length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex];
3173
+ let t3;
3174
+ $[4] === Symbol.for("react.memo_cache_sentinel") ? (t3 = {}, $[4] = t3) : t3 = $[4];
3175
+ const [, setChildLayers] = react.useState(t3), [size2, setSize] = react.useState(0), isTopLayer = size2 === 0;
3176
+ let t4;
3177
+ $[5] !== parentRegisterChild || $[6] !== setChildLayers ? (t4 = (childLevel) => {
2764
3178
  const parentDispose = parentRegisterChild?.(childLevel);
2765
3179
  return childLevel !== void 0 ? setChildLayers((state) => {
2766
3180
  const prevLen = state[childLevel] ?? 0, nextState = {
@@ -2768,34 +3182,47 @@ function LayerProvider(props) {
2768
3182
  [childLevel]: prevLen + 1
2769
3183
  };
2770
3184
  return setSize(Object.keys(nextState).length), nextState;
2771
- }) : setSize((v) => v + 1), () => {
2772
- childLevel !== void 0 ? setChildLayers((state) => {
2773
- const nextState = {
2774
- ...state
3185
+ }) : setSize(_temp$4), () => {
3186
+ childLevel !== void 0 ? setChildLayers((state_0) => {
3187
+ const nextState_0 = {
3188
+ ...state_0
2775
3189
  };
2776
- return nextState[childLevel] === 1 ? (delete nextState[childLevel], setSize(Object.keys(nextState).length)) : nextState[childLevel] -= 1, nextState;
2777
- }) : setSize((v) => v - 1), parentDispose?.();
3190
+ return nextState_0[childLevel] === 1 ? (delete nextState_0[childLevel], setSize(Object.keys(nextState_0).length)) : nextState_0[childLevel] = nextState_0[childLevel] - 1, nextState_0;
3191
+ }) : setSize(_temp2$2), parentDispose?.();
2778
3192
  };
2779
- }, [parentRegisterChild, setSize, setChildLayers]);
2780
- react.useEffect(() => parentRegisterChild?.(level), [level, parentRegisterChild]);
2781
- const value = react.useMemo(() => ({
3193
+ }, $[5] = parentRegisterChild, $[6] = setChildLayers, $[7] = t4) : t4 = $[7];
3194
+ const registerChild = t4;
3195
+ let t5, t6;
3196
+ $[8] !== level || $[9] !== parentRegisterChild ? (t5 = () => parentRegisterChild?.(level), t6 = [level, parentRegisterChild], $[8] = level, $[9] = parentRegisterChild, $[10] = t5, $[11] = t6) : (t5 = $[10], t6 = $[11]), react.useEffect(t5, t6);
3197
+ let t7;
3198
+ $[12] !== isTopLayer || $[13] !== level || $[14] !== registerChild || $[15] !== size2 || $[16] !== zIndex ? (t7 = {
2782
3199
  version: 0,
2783
3200
  isTopLayer,
2784
3201
  level,
2785
3202
  registerChild,
2786
3203
  size: size2,
2787
3204
  zIndex
2788
- }), [isTopLayer, level, registerChild, size2, zIndex]);
2789
- return /* @__PURE__ */ jsxRuntime.jsx(LayerContext.Provider, { value, children });
3205
+ }, $[12] = isTopLayer, $[13] = level, $[14] = registerChild, $[15] = size2, $[16] = zIndex, $[17] = t7) : t7 = $[17];
3206
+ const value = t7;
3207
+ let t8;
3208
+ return $[18] !== children || $[19] !== value ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(LayerContext.Provider, { value, children }), $[18] = children, $[19] = value, $[20] = t8) : t8 = $[20], t8;
3209
+ }
3210
+ function _temp2$2(v_0) {
3211
+ return v_0 - 1;
3212
+ }
3213
+ function _temp$4(v) {
3214
+ return v + 1;
2790
3215
  }
2791
3216
  LayerProvider.displayName = "LayerProvider";
2792
3217
  function useLayer() {
2793
- const value = react.useContext(LayerContext);
3218
+ const $ = reactCompilerRuntime.c(2), value = react.useContext(LayerContext);
2794
3219
  if (!value)
2795
3220
  throw new Error("useLayer(): missing context value");
2796
3221
  try {
2797
- return getLayerContext(value);
2798
- } catch (err) {
3222
+ let t1;
3223
+ return $[0] !== value ? (t1 = getLayerContext(value), $[0] = value, $[1] = t1) : t1 = $[1], t1;
3224
+ } catch (t0) {
3225
+ const err = t0;
2799
3226
  throw err instanceof Error ? new Error(`useLayer(): ${err.message}`) : new Error(`useLayer(): ${err}`);
2800
3227
  }
2801
3228
  }
@@ -2805,37 +3232,54 @@ const StyledLayer = /* @__PURE__ */ styledComponents.styled.div.withConfig({
2805
3232
  })({
2806
3233
  position: "relative"
2807
3234
  }), LayerChildren = react.forwardRef(function(props, forwardedRef) {
2808
- const {
3235
+ const $ = reactCompilerRuntime.c(22);
3236
+ let children, onActivate, onFocus, restProps, t0;
3237
+ $[0] !== props ? ({
2809
3238
  children,
2810
3239
  onActivate,
2811
3240
  onFocus,
2812
- style = EMPTY_RECORD,
3241
+ style: t0,
2813
3242
  ...restProps
2814
- } = props, {
3243
+ } = props, $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0) : (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]);
3244
+ const style = t0 === void 0 ? EMPTY_RECORD : t0, {
2815
3245
  zIndex,
2816
3246
  isTopLayer
2817
3247
  } = useLayer(), lastFocusedRef = react.useRef(null), ref = react.useRef(null), isTopLayerRef = react.useRef(isTopLayer);
2818
- react.useImperativeHandle(forwardedRef, () => ref.current), react.useEffect(() => {
3248
+ let t1;
3249
+ $[6] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => ref.current, $[6] = t1) : t1 = $[6], react.useImperativeHandle(forwardedRef, t1);
3250
+ let t2, t3;
3251
+ $[7] !== isTopLayer || $[8] !== onActivate ? (t2 = () => {
2819
3252
  isTopLayerRef.current !== isTopLayer && isTopLayer && onActivate?.({
2820
3253
  activeElement: lastFocusedRef.current
2821
3254
  }), isTopLayerRef.current = isTopLayer;
2822
- }, [isTopLayer, onActivate]);
2823
- const handleFocus = react.useCallback((event) => {
3255
+ }, t3 = [isTopLayer, onActivate], $[7] = isTopLayer, $[8] = onActivate, $[9] = t2, $[10] = t3) : (t2 = $[9], t3 = $[10]), react.useEffect(t2, t3);
3256
+ let t4;
3257
+ $[11] !== isTopLayer || $[12] !== onFocus ? (t4 = (event) => {
2824
3258
  onFocus?.(event);
2825
3259
  const rootElement = ref.current, target = document.activeElement;
2826
3260
  !isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
2827
- }, [isTopLayer, onFocus]);
2828
- return /* @__PURE__ */ jsxRuntime.jsx(StyledLayer, { ...restProps, "data-ui": "Layer", onFocus: handleFocus, ref, style: {
3261
+ }, $[11] = isTopLayer, $[12] = onFocus, $[13] = t4) : t4 = $[13];
3262
+ const handleFocus = t4;
3263
+ let t5;
3264
+ $[14] !== style || $[15] !== zIndex ? (t5 = {
2829
3265
  ...style,
2830
3266
  zIndex
2831
- }, children });
3267
+ }, $[14] = style, $[15] = zIndex, $[16] = t5) : t5 = $[16];
3268
+ let t6;
3269
+ return $[17] !== children || $[18] !== handleFocus || $[19] !== restProps || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(StyledLayer, { ...restProps, "data-ui": "Layer", onFocus: handleFocus, ref, style: t5, children }), $[17] = children, $[18] = handleFocus, $[19] = restProps, $[20] = t5, $[21] = t6) : t6 = $[21], t6;
2832
3270
  }), Layer = react.forwardRef(function(props, ref) {
2833
- const {
3271
+ const $ = reactCompilerRuntime.c(11);
3272
+ let children, restProps, t0;
3273
+ $[0] !== props ? ({
2834
3274
  children,
2835
- zOffset = 1,
3275
+ zOffset: t0,
2836
3276
  ...restProps
2837
- } = props;
2838
- return /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(LayerChildren, { ...restProps, ref, children }) });
3277
+ } = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
3278
+ const zOffset = t0 === void 0 ? 1 : t0;
3279
+ let t1;
3280
+ $[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(LayerChildren, { ...restProps, ref, children }), $[4] = children, $[5] = ref, $[6] = restProps, $[7] = t1) : t1 = $[7];
3281
+ let t2;
3282
+ return $[8] !== t1 || $[9] !== zOffset ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: t1 }), $[8] = t1, $[9] = zOffset, $[10] = t2) : t2 = $[10], t2;
2839
3283
  });
2840
3284
  Layer.displayName = "ForwardRef(Layer)";
2841
3285
  const key = "@sanity/ui/context/portal", elementKey = Symbol.for(`${key}/element`);
@@ -2856,26 +3300,39 @@ function usePortal() {
2856
3300
  return value;
2857
3301
  }
2858
3302
  function Portal(props) {
2859
- const {
3303
+ const $ = reactCompilerRuntime.c(3), {
2860
3304
  children,
2861
3305
  __unstable_name: name
2862
3306
  } = props, portal = usePortal(), portalElement = (name ? portal.elements && portal.elements[name] : portal.element) || portal.elements?.default;
2863
- return portalElement ? reactDom.createPortal(children, portalElement) : null;
3307
+ if (!portalElement)
3308
+ return null;
3309
+ let t0;
3310
+ return $[0] !== children || $[1] !== portalElement ? (t0 = reactDom.createPortal(children, portalElement), $[0] = children, $[1] = portalElement, $[2] = t0) : t0 = $[2], t0;
2864
3311
  }
2865
3312
  Portal.displayName = "Portal";
2866
3313
  function PortalProvider(props) {
2867
- const {
3314
+ const $ = reactCompilerRuntime.c(7), {
2868
3315
  boundaryElement,
2869
3316
  children,
2870
3317
  element,
2871
3318
  __unstable_elements: elements
2872
- } = props, fallbackElement = react.useSyncExternalStore(emptySubscribe, () => document.body, () => null), value = react.useMemo(() => ({
3319
+ } = props, fallbackElement = react.useSyncExternalStore(emptySubscribe, _temp$3, _temp2$1), t0 = boundaryElement || null, t1 = element || fallbackElement;
3320
+ let t2;
3321
+ $[0] !== elements || $[1] !== t0 || $[2] !== t1 ? (t2 = {
2873
3322
  version: 0,
2874
- boundaryElement: boundaryElement || null,
2875
- element: element || fallbackElement,
3323
+ boundaryElement: t0,
3324
+ element: t1,
2876
3325
  elements
2877
- }), [boundaryElement, element, elements, fallbackElement]);
2878
- return /* @__PURE__ */ jsxRuntime.jsx(PortalContext.Provider, { value, children });
3326
+ }, $[0] = elements, $[1] = t0, $[2] = t1, $[3] = t2) : t2 = $[3];
3327
+ const value = t2;
3328
+ let t3;
3329
+ return $[4] !== children || $[5] !== value ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(PortalContext.Provider, { value, children }), $[4] = children, $[5] = value, $[6] = t3) : t3 = $[6], t3;
3330
+ }
3331
+ function _temp2$1() {
3332
+ return null;
3333
+ }
3334
+ function _temp$3() {
3335
+ return document.body;
2879
3336
  }
2880
3337
  PortalProvider.displayName = "PortalProvider";
2881
3338
  const emptySubscribe = () => () => {
@@ -2883,11 +3340,12 @@ const emptySubscribe = () => () => {
2883
3340
  displayName: "StyledSrOnly",
2884
3341
  componentId: "sc-mubr0c-0"
2885
3342
  })`display:block;width:0;height:0;position:absolute;overflow:hidden;overflow:clip;`, SrOnly = react.forwardRef(function(props, ref) {
2886
- const {
3343
+ const $ = reactCompilerRuntime.c(4), {
2887
3344
  as,
2888
3345
  children
2889
3346
  } = props;
2890
- return /* @__PURE__ */ jsxRuntime.jsx(StyledSrOnly, { "aria-hidden": !0, as, "data-ui": "SrOnly", ref, children });
3347
+ let t0;
3348
+ return $[0] !== as || $[1] !== children || $[2] !== ref ? (t0 = /* @__PURE__ */ jsxRuntime.jsx(StyledSrOnly, { "aria-hidden": !0, as, "data-ui": "SrOnly", ref, children }), $[0] = as, $[1] = children, $[2] = ref, $[3] = t0) : t0 = $[3], t0;
2891
3349
  });
2892
3350
  SrOnly.displayName = "ForwardRef(SrOnly)";
2893
3351
  const StyledVirtualList = styledComponents.styled.div.withConfig({
@@ -2897,52 +3355,69 @@ const StyledVirtualList = styledComponents.styled.div.withConfig({
2897
3355
  displayName: "ItemWrapper",
2898
3356
  componentId: "sc-dlqsj4-1"
2899
3357
  })`position:absolute;left:0;right:0;`, VirtualList = react.forwardRef(function(props, forwardedRef) {
2900
- const {
2901
- as = "div",
2902
- gap = 0,
3358
+ const $ = reactCompilerRuntime.c(44);
3359
+ let getItemKey, onChange, renderItem, restProps, t0, t1, t2;
3360
+ $[0] !== props ? ({
3361
+ as: t0,
3362
+ gap: t1,
2903
3363
  getItemKey,
2904
- items = [],
3364
+ items: t2,
2905
3365
  onChange,
2906
3366
  renderItem,
2907
3367
  ...restProps
2908
- } = props, {
3368
+ } = props, $[0] = props, $[1] = getItemKey, $[2] = onChange, $[3] = renderItem, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = t2) : (getItemKey = $[1], onChange = $[2], renderItem = $[3], restProps = $[4], t0 = $[5], t1 = $[6], t2 = $[7]);
3369
+ const as = t0 === void 0 ? "div" : t0, gap = t1 === void 0 ? 0 : t1;
3370
+ let t3;
3371
+ $[8] !== t2 ? (t3 = t2 === void 0 ? [] : t2, $[8] = t2, $[9] = t3) : t3 = $[9];
3372
+ const items = t3, {
2909
3373
  space
2910
3374
  } = useTheme_v2(), ref = react.useRef(null), wrapperRef = react.useRef(null), [scrollTop, setScrollTop] = react.useState(0), [scrollHeight, setScrollHeight] = react.useState(0), [itemHeight, setItemHeight] = react.useState(-1);
2911
- react.useImperativeHandle(forwardedRef, () => ref.current), react.useEffect(() => {
2912
- if (!wrapperRef.current) return;
3375
+ let t4;
3376
+ $[10] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[10] = t4) : t4 = $[10], react.useImperativeHandle(forwardedRef, t4);
3377
+ let t5;
3378
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => {
3379
+ if (!wrapperRef.current)
3380
+ return;
2913
3381
  const firstElement = wrapperRef.current.firstChild;
2914
3382
  firstElement instanceof HTMLElement && setItemHeight(firstElement.offsetHeight);
2915
- }, [renderItem]), react.useEffect(() => {
2916
- if (!ref.current) return;
3383
+ }, $[11] = t5) : t5 = $[11];
3384
+ let t6;
3385
+ $[12] !== renderItem ? (t6 = [renderItem], $[12] = renderItem, $[13] = t6) : t6 = $[13], react.useEffect(t5, t6);
3386
+ let t7, t8;
3387
+ $[14] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => {
3388
+ if (!ref.current)
3389
+ return;
2917
3390
  const scrollEl = findScrollable(ref.current.parentNode);
2918
3391
  if (scrollEl) {
2919
- if (!(scrollEl instanceof HTMLElement)) return;
2920
- const handleScroll2 = () => {
3392
+ if (!(scrollEl instanceof HTMLElement))
3393
+ return;
3394
+ const handleScroll = () => {
2921
3395
  setScrollTop(scrollEl.scrollTop);
2922
3396
  };
2923
- scrollEl.addEventListener("scroll", handleScroll2, {
3397
+ scrollEl.addEventListener("scroll", handleScroll, {
2924
3398
  passive: !0
2925
3399
  });
2926
3400
  const ro = new _ResizeObserver((entries) => {
2927
3401
  setScrollHeight(entries[0].contentRect.height);
2928
3402
  });
2929
- return ro.observe(scrollEl), handleScroll2(), () => {
2930
- scrollEl.removeEventListener("scroll", handleScroll2), ro.unobserve(scrollEl), ro.disconnect();
3403
+ return ro.observe(scrollEl), handleScroll(), () => {
3404
+ scrollEl.removeEventListener("scroll", handleScroll), ro.unobserve(scrollEl), ro.disconnect();
2931
3405
  };
2932
3406
  }
2933
- const handleScroll = () => {
3407
+ const handleScroll_0 = () => {
2934
3408
  setScrollTop(window.scrollY);
2935
3409
  }, handleResize = () => {
2936
3410
  setScrollHeight(window.innerHeight);
2937
3411
  };
2938
- return window.addEventListener("scroll", handleScroll, {
3412
+ return window.addEventListener("scroll", handleScroll_0, {
2939
3413
  passive: !0
2940
- }), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll(), () => {
2941
- window.removeEventListener("scroll", handleScroll), window.removeEventListener("resize", handleResize);
3414
+ }), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll_0(), () => {
3415
+ window.removeEventListener("scroll", handleScroll_0), window.removeEventListener("resize", handleResize);
2942
3416
  };
2943
- }, []);
3417
+ }, t8 = [], $[14] = t7, $[15] = t8) : (t7 = $[14], t8 = $[15]), react.useEffect(t7, t8);
2944
3418
  const len = items.length, height = itemHeight ? len * (itemHeight + space[gap]) - space[gap] : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0;
2945
- react.useEffect(() => {
3419
+ let t10, t9;
3420
+ $[16] !== fromIndex || $[17] !== gap || $[18] !== itemHeight || $[19] !== onChange || $[20] !== scrollHeight || $[21] !== scrollTop || $[22] !== space || $[23] !== toIndex ? (t9 = () => {
2946
3421
  onChange && onChange({
2947
3422
  fromIndex,
2948
3423
  gap: space[gap],
@@ -2951,8 +3426,9 @@ const StyledVirtualList = styledComponents.styled.div.withConfig({
2951
3426
  scrollTop,
2952
3427
  toIndex
2953
3428
  });
2954
- }, [fromIndex, gap, itemHeight, onChange, scrollHeight, scrollTop, space, toIndex]);
2955
- const children = useChildren({
3429
+ }, t10 = [fromIndex, gap, itemHeight, onChange, scrollHeight, scrollTop, space, toIndex], $[16] = fromIndex, $[17] = gap, $[18] = itemHeight, $[19] = onChange, $[20] = scrollHeight, $[21] = scrollTop, $[22] = space, $[23] = toIndex, $[24] = t10, $[25] = t9) : (t10 = $[24], t9 = $[25]), react.useEffect(t9, t10);
3430
+ let t11;
3431
+ $[26] !== fromIndex || $[27] !== gap || $[28] !== getItemKey || $[29] !== itemHeight || $[30] !== items || $[31] !== renderItem || $[32] !== space || $[33] !== toIndex ? (t11 = {
2956
3432
  fromIndex,
2957
3433
  gap,
2958
3434
  itemHeight,
@@ -2961,28 +3437,49 @@ const StyledVirtualList = styledComponents.styled.div.withConfig({
2961
3437
  getItemKey,
2962
3438
  items,
2963
3439
  renderItem
2964
- });
2965
- return /* @__PURE__ */ jsxRuntime.jsx(StyledVirtualList, { as, "data-ui": "VirtualList", ...restProps, ref, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: wrapperRef, style: {
3440
+ }, $[26] = fromIndex, $[27] = gap, $[28] = getItemKey, $[29] = itemHeight, $[30] = items, $[31] = renderItem, $[32] = space, $[33] = toIndex, $[34] = t11) : t11 = $[34];
3441
+ const children = useChildren(t11);
3442
+ let t12;
3443
+ $[35] !== height ? (t12 = {
2966
3444
  height
2967
- }, children }) });
3445
+ }, $[35] = height, $[36] = t12) : t12 = $[36];
3446
+ let t13;
3447
+ $[37] !== children || $[38] !== t12 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: wrapperRef, style: t12, children }), $[37] = children, $[38] = t12, $[39] = t13) : t13 = $[39];
3448
+ let t14;
3449
+ return $[40] !== as || $[41] !== restProps || $[42] !== t13 ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(StyledVirtualList, { as, "data-ui": "VirtualList", ...restProps, ref, children: t13 }), $[40] = as, $[41] = restProps, $[42] = t13, $[43] = t14) : t14 = $[43], t14;
2968
3450
  });
2969
3451
  VirtualList.displayName = "ForwardRef(VirtualList)";
2970
- function useChildren({
2971
- fromIndex,
2972
- gap,
2973
- getItemKey,
2974
- itemHeight,
2975
- items,
2976
- renderItem,
2977
- space,
2978
- toIndex
2979
- }) {
2980
- return !renderItem || items.length === 0 ? null : itemHeight === -1 ? [/* @__PURE__ */ jsxRuntime.jsx(ItemWrapper, { children: renderItem(items[0]) }, 0)] : items.slice(fromIndex, toIndex).map((item, _itemIndex) => {
2981
- const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
2982
- return /* @__PURE__ */ jsxRuntime.jsx(ItemWrapper, { style: {
2983
- top: itemIndex * (itemHeight + space[gap])
2984
- }, children: node }, key2);
2985
- });
3452
+ function useChildren(t0) {
3453
+ const $ = reactCompilerRuntime.c(21), {
3454
+ fromIndex,
3455
+ gap,
3456
+ getItemKey,
3457
+ itemHeight,
3458
+ items,
3459
+ renderItem,
3460
+ space,
3461
+ toIndex
3462
+ } = t0;
3463
+ if (!renderItem || items.length === 0)
3464
+ return null;
3465
+ if (itemHeight === -1) {
3466
+ let t12;
3467
+ $[0] !== items[0] || $[1] !== renderItem ? (t12 = renderItem(items[0]), $[0] = items[0], $[1] = renderItem, $[2] = t12) : t12 = $[2];
3468
+ let t2;
3469
+ return $[3] !== t12 ? (t2 = [/* @__PURE__ */ jsxRuntime.jsx(ItemWrapper, { children: t12 }, 0)], $[3] = t12, $[4] = t2) : t2 = $[4], t2;
3470
+ }
3471
+ let t1;
3472
+ if ($[5] !== fromIndex || $[6] !== gap || $[7] !== getItemKey || $[8] !== itemHeight || $[9] !== items || $[10] !== renderItem || $[11] !== space || $[12] !== toIndex) {
3473
+ let t2;
3474
+ $[14] !== fromIndex || $[15] !== gap || $[16] !== getItemKey || $[17] !== itemHeight || $[18] !== renderItem || $[19] !== space ? (t2 = (item, _itemIndex) => {
3475
+ const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
3476
+ return /* @__PURE__ */ jsxRuntime.jsx(ItemWrapper, { style: {
3477
+ top: itemIndex * (itemHeight + space[gap])
3478
+ }, children: node }, key2);
3479
+ }, $[14] = fromIndex, $[15] = gap, $[16] = getItemKey, $[17] = itemHeight, $[18] = renderItem, $[19] = space, $[20] = t2) : t2 = $[20], t1 = items.slice(fromIndex, toIndex).map(t2), $[5] = fromIndex, $[6] = gap, $[7] = getItemKey, $[8] = itemHeight, $[9] = items, $[10] = renderItem, $[11] = space, $[12] = toIndex, $[13] = t1;
3480
+ } else
3481
+ t1 = $[13];
3482
+ return t1;
2986
3483
  }
2987
3484
  function findScrollable(parentNode) {
2988
3485
  let _scrollEl = parentNode;
@@ -3074,7 +3571,9 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card)).w
3074
3571
  displayName: "MotionFlex",
3075
3572
  componentId: "sc-ihg31s-1"
3076
3573
  })`will-change:opacity;`, PopoverCard = react.forwardRef(function(props, ref) {
3077
- const {
3574
+ const $ = reactCompilerRuntime.c(66);
3575
+ let animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, originX, originY, overflow, padding, placement, radius, restProps, scheme, shadow, strategy, style, tone, width, xProp, yProp;
3576
+ $[0] !== props ? ({
3078
3577
  __unstable_margins: marginsProp,
3079
3578
  animate,
3080
3579
  arrow,
@@ -3097,9 +3596,12 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card)).w
3097
3596
  x: xProp,
3098
3597
  y: yProp,
3099
3598
  ...restProps
3100
- } = props, {
3599
+ } = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = originX, $[9] = originY, $[10] = overflow, $[11] = padding, $[12] = placement, $[13] = radius, $[14] = restProps, $[15] = scheme, $[16] = shadow, $[17] = strategy, $[18] = style, $[19] = tone, $[20] = width, $[21] = xProp, $[22] = yProp) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], originX = $[8], originY = $[9], overflow = $[10], padding = $[11], placement = $[12], radius = $[13], restProps = $[14], scheme = $[15], shadow = $[16], strategy = $[17], style = $[18], tone = $[19], width = $[20], xProp = $[21], yProp = $[22]);
3600
+ const {
3101
3601
  zIndex
3102
- } = useLayer(), margins = react.useMemo(() => marginsProp || DEFAULT_POPOVER_MARGINS, [marginsProp]), x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0], rootStyle2 = react.useMemo(() => ({
3602
+ } = useLayer(), margins = marginsProp || DEFAULT_POPOVER_MARGINS, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0], t0 = animate ? "transform" : void 0;
3603
+ let t1;
3604
+ $[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t0 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t1 = {
3103
3605
  left: x,
3104
3606
  originX,
3105
3607
  originY,
@@ -3107,92 +3609,137 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card)).w
3107
3609
  top: y,
3108
3610
  width,
3109
3611
  zIndex,
3110
- willChange: animate ? "transform" : void 0,
3612
+ willChange: t0,
3111
3613
  ...style
3112
- }), [animate, originX, originY, strategy, style, width, x, y, zIndex]), arrowStyle = react.useMemo(() => ({
3113
- left: arrowX !== null ? arrowX : void 0,
3114
- top: arrowY !== null ? arrowY : void 0,
3614
+ }, $[23] = originX, $[24] = originY, $[25] = strategy, $[26] = style, $[27] = t0, $[28] = width, $[29] = x, $[30] = y, $[31] = zIndex, $[32] = t1) : t1 = $[32];
3615
+ const rootStyle2 = t1, t2 = arrowX !== null ? arrowX : void 0, t3 = arrowY !== null ? arrowY : void 0;
3616
+ let t4;
3617
+ $[33] !== t2 || $[34] !== t3 ? (t4 = {
3618
+ left: t2,
3619
+ top: t3,
3115
3620
  right: void 0,
3116
3621
  bottom: void 0
3117
- }), [arrowX, arrowY]);
3118
- return /* @__PURE__ */ jsxRuntime.jsxs(MotionCard$1, { "data-ui": "Popover", ...restProps, "data-placement": placement, radius, ref, scheme, shadow, sizing: "border", style: rootStyle2, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: animate ? ["hidden", "initial"] : void 0, animate: animate ? ["visible", "scaleIn"] : void 0, exit: animate ? ["hidden", "scaleOut"] : void 0, children: [
3119
- /* @__PURE__ */ jsxRuntime.jsx(MotionFlex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, overflow, variants: POPOVER_MOTION_PROPS.children, transition: POPOVER_MOTION_PROPS.transition, children: /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", flex: 1, padding, children }) }),
3120
- arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS })
3121
- ] });
3622
+ }, $[33] = t2, $[34] = t3, $[35] = t4) : t4 = $[35];
3623
+ const arrowStyle = t4, t5 = restProps;
3624
+ let t6;
3625
+ $[36] !== animate ? (t6 = animate ? ["hidden", "initial"] : void 0, $[36] = animate, $[37] = t6) : t6 = $[37];
3626
+ let t7;
3627
+ $[38] !== animate ? (t7 = animate ? ["visible", "scaleIn"] : void 0, $[38] = animate, $[39] = t7) : t7 = $[39];
3628
+ let t8;
3629
+ $[40] !== animate ? (t8 = animate ? ["hidden", "scaleOut"] : void 0, $[40] = animate, $[41] = t8) : t8 = $[41];
3630
+ let t9;
3631
+ $[42] !== children || $[43] !== padding ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", flex: 1, padding, children }), $[42] = children, $[43] = padding, $[44] = t9) : t9 = $[44];
3632
+ let t10;
3633
+ $[45] !== overflow || $[46] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsx(MotionFlex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, overflow, variants: POPOVER_MOTION_PROPS.children, transition: POPOVER_MOTION_PROPS.transition, children: t9 }), $[45] = overflow, $[46] = t9, $[47] = t10) : t10 = $[47];
3634
+ let t11;
3635
+ $[48] !== arrow || $[49] !== arrowRef || $[50] !== arrowStyle ? (t11 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[48] = arrow, $[49] = arrowRef, $[50] = arrowStyle, $[51] = t11) : t11 = $[51];
3636
+ let t12;
3637
+ return $[52] !== placement || $[53] !== radius || $[54] !== ref || $[55] !== rootStyle2 || $[56] !== scheme || $[57] !== shadow || $[58] !== t10 || $[59] !== t11 || $[60] !== t5 || $[61] !== t6 || $[62] !== t7 || $[63] !== t8 || $[64] !== tone ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard$1, { "data-ui": "Popover", ...t5, "data-placement": placement, radius, ref, scheme, shadow, sizing: "border", style: rootStyle2, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t6, animate: t7, exit: t8, children: [
3638
+ t10,
3639
+ t11
3640
+ ] }), $[52] = placement, $[53] = radius, $[54] = ref, $[55] = rootStyle2, $[56] = scheme, $[57] = shadow, $[58] = t10, $[59] = t11, $[60] = t5, $[61] = t6, $[62] = t7, $[63] = t8, $[64] = tone, $[65] = t12) : t12 = $[65], t12;
3122
3641
  });
3123
3642
  PopoverCard.displayName = "ForwardRef(PopoverCard)";
3124
3643
  const ViewportOverlay = () => {
3125
- const {
3644
+ const $ = reactCompilerRuntime.c(2), {
3126
3645
  zIndex
3127
3646
  } = useLayer();
3128
- return /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
3647
+ let t0;
3648
+ return $[0] !== zIndex ? (t0 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
3129
3649
  height: "100vh",
3130
3650
  inset: 0,
3131
3651
  position: "fixed",
3132
3652
  width: "100vw",
3133
3653
  zIndex
3134
- } });
3654
+ } }), $[0] = zIndex, $[1] = t0) : t0 = $[1], t0;
3135
3655
  }, Popover = react.forwardRef(function(props, forwardedRef) {
3136
- const {
3656
+ const $ = reactCompilerRuntime.c(126), {
3137
3657
  container,
3138
3658
  layer
3139
- } = useTheme_v2(), boundaryElementContext = useBoundaryElement(), {
3140
- __unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
3141
- animate: _animate = !1,
3142
- arrow: arrowProp = !1,
3143
- boundaryElement: _boundaryElement,
3144
- children: childProp,
3145
- constrainSize = !1,
3146
- content,
3147
- disabled,
3148
- fallbackPlacements: _fallbackPlacements,
3149
- matchReferenceWidth,
3150
- floatingBoundary: _floatingBoundary,
3151
- modal,
3152
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
3153
- onActivate,
3154
- open,
3155
- overflow = "hidden",
3156
- padding: paddingProp,
3157
- placement: placementProp = "bottom",
3158
- placementStrategy = "flip",
3159
- portal,
3160
- preventOverflow = !0,
3161
- radius: radiusProp = 3,
3162
- referenceBoundary: _referenceBoundary,
3163
- referenceElement,
3164
- scheme,
3165
- shadow: shadowProp = 3,
3166
- tone = "inherit",
3167
- width: widthProp = "auto",
3168
- zOffset: _zOffsetProp,
3169
- updateRef,
3170
- ...restProps
3171
- } = props, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacements = _fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"], floatingBoundary = _floatingBoundary ?? props.boundaryElement ?? boundaryElementContext.element, referenceBoundary = _referenceBoundary ?? props.boundaryElement ?? boundaryElementContext.element, zOffsetProp = _zOffsetProp ?? layer.popover.zOffset, animate = usePrefersReducedMotion() ? !1 : _animate, boundarySize = useElementSize(boundaryElement)?.border, padding = _getArrayProp(paddingProp), radius = _getArrayProp(radiusProp), shadow = _getArrayProp(shadowProp), widthArrayProp = _getArrayProp(widthProp), zOffset = _getArrayProp(zOffsetProp), ref = react.useRef(null), arrowRef = react.useRef(null), rootBoundary = "viewport";
3172
- react.useImperativeHandle(forwardedRef, () => ref.current);
3659
+ } = useTheme_v2(), boundaryElementContext = useBoundaryElement();
3660
+ let _boundaryElement, _fallbackPlacements, _floatingBoundary, _referenceBoundary, _zOffsetProp, childProp, content, disabled, matchReferenceWidth, modal, open, paddingProp, portal, referenceElement, restProps, scheme, t0, t1, t10, t11, t2, t3, t4, t5, t6, t7, t8, t9, updateRef;
3661
+ if ($[0] !== props) {
3662
+ const {
3663
+ __unstable_margins: t122,
3664
+ animate: t132,
3665
+ arrow: t142,
3666
+ boundaryElement: t152,
3667
+ children: t162,
3668
+ constrainSize: t172,
3669
+ content: t182,
3670
+ disabled: t192,
3671
+ fallbackPlacements: t202,
3672
+ matchReferenceWidth: t212,
3673
+ floatingBoundary: t222,
3674
+ modal: t232,
3675
+ onActivate,
3676
+ open: t242,
3677
+ overflow: t252,
3678
+ padding: t262,
3679
+ placement: t272,
3680
+ placementStrategy: t282,
3681
+ portal: t292,
3682
+ preventOverflow: t302,
3683
+ radius: t312,
3684
+ referenceBoundary: t322,
3685
+ referenceElement: t332,
3686
+ scheme: t342,
3687
+ shadow: t352,
3688
+ tone: t362,
3689
+ width: t372,
3690
+ zOffset: t382,
3691
+ updateRef: t392,
3692
+ ...t402
3693
+ } = props;
3694
+ t0 = t122, t1 = t132, t2 = t142, _boundaryElement = t152, childProp = t162, t3 = t172, content = t182, disabled = t192, _fallbackPlacements = t202, matchReferenceWidth = t212, _floatingBoundary = t222, modal = t232, open = t242, t4 = t252, paddingProp = t262, t5 = t272, t6 = t282, portal = t292, t7 = t302, t8 = t312, _referenceBoundary = t322, referenceElement = t332, scheme = t342, t9 = t352, t10 = t362, t11 = t372, _zOffsetProp = t382, updateRef = t392, restProps = t402, $[0] = props, $[1] = _boundaryElement, $[2] = _fallbackPlacements, $[3] = _floatingBoundary, $[4] = _referenceBoundary, $[5] = _zOffsetProp, $[6] = childProp, $[7] = content, $[8] = disabled, $[9] = matchReferenceWidth, $[10] = modal, $[11] = open, $[12] = paddingProp, $[13] = portal, $[14] = referenceElement, $[15] = restProps, $[16] = scheme, $[17] = t0, $[18] = t1, $[19] = t10, $[20] = t11, $[21] = t2, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = t6, $[26] = t7, $[27] = t8, $[28] = t9, $[29] = updateRef;
3695
+ } else
3696
+ _boundaryElement = $[1], _fallbackPlacements = $[2], _floatingBoundary = $[3], _referenceBoundary = $[4], _zOffsetProp = $[5], childProp = $[6], content = $[7], disabled = $[8], matchReferenceWidth = $[9], modal = $[10], open = $[11], paddingProp = $[12], portal = $[13], referenceElement = $[14], restProps = $[15], scheme = $[16], t0 = $[17], t1 = $[18], t10 = $[19], t11 = $[20], t2 = $[21], t3 = $[22], t4 = $[23], t5 = $[24], t6 = $[25], t7 = $[26], t8 = $[27], t9 = $[28], updateRef = $[29];
3697
+ const margins = t0 === void 0 ? DEFAULT_POPOVER_MARGINS : t0, _animate = t1 === void 0 ? !1 : t1, arrowProp = t2 === void 0 ? !1 : t2, constrainSize = t3 === void 0 ? !1 : t3, overflow = t4 === void 0 ? "hidden" : t4, placementProp = t5 === void 0 ? "bottom" : t5, placementStrategy = t6 === void 0 ? "flip" : t6, preventOverflow = t7 === void 0 ? !0 : t7, radiusProp = t8 === void 0 ? 3 : t8, shadowProp = t9 === void 0 ? 3 : t9, tone = t10 === void 0 ? "inherit" : t10, widthProp = t11 === void 0 ? "auto" : t11, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacements = _fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"], floatingBoundary = _floatingBoundary ?? props.boundaryElement ?? boundaryElementContext.element, referenceBoundary = _referenceBoundary ?? props.boundaryElement ?? boundaryElementContext.element, zOffsetProp = _zOffsetProp ?? layer.popover.zOffset, animate = usePrefersReducedMotion() ? !1 : _animate, boundarySize = useElementSize(boundaryElement)?.border;
3698
+ let t12;
3699
+ $[30] !== paddingProp ? (t12 = _getArrayProp(paddingProp), $[30] = paddingProp, $[31] = t12) : t12 = $[31];
3700
+ const padding = t12;
3701
+ let t13;
3702
+ $[32] !== radiusProp ? (t13 = _getArrayProp(radiusProp), $[32] = radiusProp, $[33] = t13) : t13 = $[33];
3703
+ const radius = t13;
3704
+ let t14;
3705
+ $[34] !== shadowProp ? (t14 = _getArrayProp(shadowProp), $[34] = shadowProp, $[35] = t14) : t14 = $[35];
3706
+ const shadow = t14, widthArrayProp = _getArrayProp(widthProp);
3707
+ let t15;
3708
+ $[36] !== zOffsetProp ? (t15 = _getArrayProp(zOffsetProp), $[36] = zOffsetProp, $[37] = t15) : t15 = $[37];
3709
+ const zOffset = t15, ref = react.useRef(null), arrowRef = react.useRef(null);
3710
+ let t16;
3711
+ $[38] === Symbol.for("react.memo_cache_sentinel") ? (t16 = () => ref.current, $[38] = t16) : t16 = $[38], react.useImperativeHandle(forwardedRef, t16);
3173
3712
  const mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize?.width : void 0, width = calcCurrentWidth({
3174
3713
  container,
3175
3714
  mediaIndex,
3176
3715
  width: widthArrayProp
3177
3716
  }), widthRef = react.useRef(width);
3178
- react.useEffect(() => {
3717
+ let t17, t18;
3718
+ $[39] !== width ? (t17 = () => {
3179
3719
  widthRef.current = width;
3180
- }, [width]);
3181
- const maxWidth = calcMaxWidth({
3720
+ }, t18 = [width], $[39] = width, $[40] = t17, $[41] = t18) : (t17 = $[40], t18 = $[41]), react.useEffect(t17, t18);
3721
+ let t19;
3722
+ $[42] !== boundaryWidth || $[43] !== width ? (t19 = calcMaxWidth({
3182
3723
  boundaryWidth,
3183
3724
  currentWidth: width
3184
- }), maxWidthRef = react.useRef(maxWidth);
3185
- react.useEffect(() => {
3725
+ }), $[42] = boundaryWidth, $[43] = width, $[44] = t19) : t19 = $[44];
3726
+ const maxWidth = t19, maxWidthRef = react.useRef(maxWidth);
3727
+ let t20, t21;
3728
+ $[45] !== maxWidth ? (t20 = () => {
3186
3729
  maxWidthRef.current = maxWidth;
3187
- }, [maxWidth]);
3730
+ }, t21 = [maxWidth], $[45] = maxWidth, $[46] = t20, $[47] = t21) : (t20 = $[46], t21 = $[47]), react.useEffect(t20, t21);
3188
3731
  const referenceWidthRef = react.useRef(void 0);
3189
- react.useEffect(() => {
3732
+ let t22, t23;
3733
+ $[48] !== matchReferenceWidth || $[49] !== maxWidth || $[50] !== open || $[51] !== width ? (t22 = () => {
3190
3734
  const floatingElement = ref.current;
3191
- if (!open || !floatingElement) return;
3192
- const referenceWidth2 = referenceWidthRef.current;
3193
- matchReferenceWidth ? referenceWidth2 !== void 0 && (floatingElement.style.width = `${referenceWidth2}px`) : width !== void 0 && (floatingElement.style.width = `${width}px`), typeof maxWidth == "number" && (floatingElement.style.maxWidth = `${maxWidth}px`);
3194
- }, [width, matchReferenceWidth, maxWidth, open]);
3195
- const [referenceWidth, setReferenceWidth] = react.useState(void 0), middleware = useMiddleware$1({
3735
+ if (!open || !floatingElement)
3736
+ return;
3737
+ const referenceWidth = referenceWidthRef.current;
3738
+ matchReferenceWidth ? referenceWidth !== void 0 && (floatingElement.style.width = `${referenceWidth}px`) : width !== void 0 && (floatingElement.style.width = `${width}px`), typeof maxWidth == "number" && (floatingElement.style.maxWidth = `${maxWidth}px`);
3739
+ }, t23 = [width, matchReferenceWidth, maxWidth, open], $[48] = matchReferenceWidth, $[49] = maxWidth, $[50] = open, $[51] = width, $[52] = t22, $[53] = t23) : (t22 = $[52], t23 = $[53]), react.useEffect(t22, t23);
3740
+ const [referenceWidth_0, setReferenceWidth] = react.useState(void 0);
3741
+ let t24;
3742
+ $[54] !== animate || $[55] !== arrowProp || $[56] !== constrainSize || $[57] !== fallbackPlacements || $[58] !== floatingBoundary || $[59] !== margins || $[60] !== matchReferenceWidth || $[61] !== placementProp || $[62] !== placementStrategy || $[63] !== preventOverflow || $[64] !== referenceBoundary ? (t24 = {
3196
3743
  animate,
3197
3744
  arrowProp,
3198
3745
  arrowRef,
@@ -3207,10 +3754,23 @@ const ViewportOverlay = () => {
3207
3754
  preventOverflow,
3208
3755
  referenceBoundary,
3209
3756
  referenceWidthRef,
3210
- rootBoundary,
3757
+ rootBoundary: "viewport",
3211
3758
  setReferenceWidth,
3212
3759
  widthRef
3213
- }), {
3760
+ }, $[54] = animate, $[55] = arrowProp, $[56] = constrainSize, $[57] = fallbackPlacements, $[58] = floatingBoundary, $[59] = margins, $[60] = matchReferenceWidth, $[61] = placementProp, $[62] = placementStrategy, $[63] = preventOverflow, $[64] = referenceBoundary, $[65] = t24) : t24 = $[65];
3761
+ const middleware = useMiddleware$1(t24);
3762
+ let t25;
3763
+ $[66] !== referenceElement ? (t25 = referenceElement ? {
3764
+ reference: referenceElement
3765
+ } : void 0, $[66] = referenceElement, $[67] = t25) : t25 = $[67];
3766
+ let t26;
3767
+ $[68] !== middleware || $[69] !== placementProp || $[70] !== t25 ? (t26 = {
3768
+ middleware,
3769
+ placement: placementProp,
3770
+ whileElementsMounted: reactDom$1.autoUpdate,
3771
+ elements: t25
3772
+ }, $[68] = middleware, $[69] = placementProp, $[70] = t25, $[71] = t26) : t26 = $[71];
3773
+ const {
3214
3774
  x,
3215
3775
  y,
3216
3776
  middlewareData,
@@ -3218,87 +3778,148 @@ const ViewportOverlay = () => {
3218
3778
  refs,
3219
3779
  strategy,
3220
3780
  update
3221
- } = reactDom$1.useFloating({
3222
- middleware,
3223
- placement: placementProp,
3224
- whileElementsMounted: reactDom$1.autoUpdate,
3225
- elements: referenceElement ? {
3226
- reference: referenceElement
3227
- } : void 0
3228
- }), referenceHidden = middlewareData.hide?.referenceHidden, arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, setArrow = react.useCallback((arrowEl) => {
3781
+ } = reactDom$1.useFloating(t26), referenceHidden = middlewareData.hide?.referenceHidden, arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY;
3782
+ let t27;
3783
+ $[72] === Symbol.for("react.memo_cache_sentinel") ? (t27 = (arrowEl) => {
3229
3784
  arrowRef.current = arrowEl;
3230
- }, []), setFloating = react.useCallback((node) => {
3785
+ }, $[72] = t27) : t27 = $[72];
3786
+ const setArrow = t27;
3787
+ let t28;
3788
+ $[73] !== refs ? (t28 = (node) => {
3231
3789
  ref.current = node, refs.setFloating(node);
3232
- }, [refs]);
3233
- react.useImperativeHandle(childProp ? getElementRef(childProp) : null, () => refs.reference.current);
3234
- const child = react.useMemo(() => referenceElement ? childProp : childProp ? react.cloneElement(childProp, {
3235
- ref: refs.setReference
3236
- }) : null, [childProp, referenceElement, refs.setReference]);
3237
- if (react.useImperativeHandle(updateRef, () => update, [update]), disabled)
3238
- return childProp || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
3239
- const popover = /* @__PURE__ */ jsxRuntime.jsxs(LayerProvider, { zOffset, children: [
3240
- modal && /* @__PURE__ */ jsxRuntime.jsx(ViewportOverlay, {}),
3241
- /* @__PURE__ */ jsxRuntime.jsx(PopoverCard, { ...restProps, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, hidden: referenceHidden, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, tone, width: matchReferenceWidth ? referenceWidth : width, x, y, children: content })
3242
- ] }), children = open && (portal ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: popover }) : popover);
3243
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3244
- animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
3790
+ }, $[73] = refs, $[74] = t28) : t28 = $[74];
3791
+ const setFloating = t28;
3792
+ let t29;
3793
+ $[75] !== childProp ? (t29 = childProp ? getElementRef(childProp) : null, $[75] = childProp, $[76] = t29) : t29 = $[76];
3794
+ let t30;
3795
+ $[77] !== refs.reference.current ? (t30 = () => refs.reference.current, $[77] = refs.reference.current, $[78] = t30) : t30 = $[78], react.useImperativeHandle(t29, t30);
3796
+ let t31;
3797
+ bb0: {
3798
+ if (referenceElement) {
3799
+ t31 = childProp;
3800
+ break bb0;
3801
+ }
3802
+ if (!childProp) {
3803
+ t31 = null;
3804
+ break bb0;
3805
+ }
3806
+ let t322;
3807
+ $[79] !== childProp || $[80] !== refs.setReference ? (t322 = react.cloneElement(childProp, {
3808
+ ref: refs.setReference
3809
+ }), $[79] = childProp, $[80] = refs.setReference, $[81] = t322) : t322 = $[81], t31 = t322;
3810
+ }
3811
+ const child = t31;
3812
+ let t32, t33;
3813
+ if ($[82] !== update ? (t32 = () => update, t33 = [update], $[82] = update, $[83] = t32, $[84] = t33) : (t32 = $[83], t33 = $[84]), react.useImperativeHandle(updateRef, t32, t33), disabled) {
3814
+ let t342;
3815
+ return $[85] !== childProp ? (t342 = childProp || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[85] = childProp, $[86] = t342) : t342 = $[86], t342;
3816
+ }
3817
+ let t34;
3818
+ $[87] !== modal ? (t34 = modal && /* @__PURE__ */ jsxRuntime.jsx(ViewportOverlay, {}), $[87] = modal, $[88] = t34) : t34 = $[88];
3819
+ const t35 = matchReferenceWidth ? referenceWidth_0 : width;
3820
+ let t36;
3821
+ $[89] !== animate || $[90] !== arrowProp || $[91] !== arrowX || $[92] !== arrowY || $[93] !== content || $[94] !== margins || $[95] !== originX || $[96] !== originY || $[97] !== overflow || $[98] !== padding || $[99] !== placement || $[100] !== radius || $[101] !== referenceHidden || $[102] !== restProps || $[103] !== scheme || $[104] !== setFloating || $[105] !== shadow || $[106] !== strategy || $[107] !== t35 || $[108] !== tone || $[109] !== x || $[110] !== y ? (t36 = /* @__PURE__ */ jsxRuntime.jsx(PopoverCard, { ...restProps, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, hidden: referenceHidden, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, tone, width: t35, x, y, children: content }), $[89] = animate, $[90] = arrowProp, $[91] = arrowX, $[92] = arrowY, $[93] = content, $[94] = margins, $[95] = originX, $[96] = originY, $[97] = overflow, $[98] = padding, $[99] = placement, $[100] = radius, $[101] = referenceHidden, $[102] = restProps, $[103] = scheme, $[104] = setFloating, $[105] = shadow, $[106] = strategy, $[107] = t35, $[108] = tone, $[109] = x, $[110] = y, $[111] = t36) : t36 = $[111];
3822
+ let t37;
3823
+ $[112] !== t34 || $[113] !== t36 || $[114] !== zOffset ? (t37 = /* @__PURE__ */ jsxRuntime.jsxs(LayerProvider, { zOffset, children: [
3824
+ t34,
3825
+ t36
3826
+ ] }), $[112] = t34, $[113] = t36, $[114] = zOffset, $[115] = t37) : t37 = $[115];
3827
+ const popover = t37;
3828
+ let t38;
3829
+ $[116] !== open || $[117] !== popover || $[118] !== portal ? (t38 = open && (portal ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: popover }) : popover), $[116] = open, $[117] = popover, $[118] = portal, $[119] = t38) : t38 = $[119];
3830
+ const children = t38;
3831
+ let t39;
3832
+ $[120] !== animate || $[121] !== children ? (t39 = animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children, $[120] = animate, $[121] = children, $[122] = t39) : t39 = $[122];
3833
+ let t40;
3834
+ return $[123] !== child || $[124] !== t39 ? (t40 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3835
+ t39,
3245
3836
  child
3246
- ] });
3837
+ ] }), $[123] = child, $[124] = t39, $[125] = t40) : t40 = $[125], t40;
3247
3838
  });
3248
3839
  Popover.displayName = "ForwardRef(Popover)";
3249
- function useMiddleware$1({
3250
- animate,
3251
- arrowProp,
3252
- arrowRef,
3253
- constrainSize,
3254
- fallbackPlacements,
3255
- floatingBoundary,
3256
- margins,
3257
- matchReferenceWidth,
3258
- maxWidthRef,
3259
- placementProp,
3260
- placementStrategy,
3261
- preventOverflow,
3262
- referenceBoundary,
3263
- referenceWidthRef,
3264
- rootBoundary,
3265
- setReferenceWidth,
3266
- widthRef
3267
- }) {
3268
- return react.useMemo(() => {
3269
- const ret = [];
3270
- return (constrainSize || preventOverflow) && (placementStrategy === "autoPlacement" ? ret.push(reactDom$1.autoPlacement({
3271
- allowedPlacements: [placementProp].concat(fallbackPlacements)
3272
- })) : ret.push(reactDom$1.flip({
3273
- boundary: floatingBoundary || void 0,
3274
- fallbackPlacements,
3275
- padding: DEFAULT_POPOVER_PADDING,
3276
- rootBoundary
3277
- }))), ret.push(reactDom$1.offset({
3840
+ function useMiddleware$1(t0) {
3841
+ const $ = reactCompilerRuntime.c(42), {
3842
+ animate,
3843
+ arrowProp,
3844
+ arrowRef,
3845
+ constrainSize,
3846
+ fallbackPlacements,
3847
+ floatingBoundary,
3848
+ margins,
3849
+ matchReferenceWidth,
3850
+ maxWidthRef,
3851
+ placementProp,
3852
+ placementStrategy,
3853
+ preventOverflow,
3854
+ referenceBoundary,
3855
+ referenceWidthRef,
3856
+ rootBoundary,
3857
+ setReferenceWidth,
3858
+ widthRef
3859
+ } = t0;
3860
+ let ret;
3861
+ if ($[0] !== animate || $[1] !== arrowProp || $[2] !== arrowRef || $[3] !== constrainSize || $[4] !== fallbackPlacements || $[5] !== floatingBoundary || $[6] !== margins || $[7] !== matchReferenceWidth || $[8] !== maxWidthRef || $[9] !== placementProp || $[10] !== placementStrategy || $[11] !== preventOverflow || $[12] !== referenceBoundary || $[13] !== referenceWidthRef || $[14] !== rootBoundary || $[15] !== setReferenceWidth || $[16] !== widthRef) {
3862
+ if (ret = [], constrainSize || preventOverflow)
3863
+ if (placementStrategy === "autoPlacement") {
3864
+ let t12;
3865
+ $[18] !== fallbackPlacements || $[19] !== placementProp ? (t12 = reactDom$1.autoPlacement({
3866
+ allowedPlacements: [placementProp].concat(fallbackPlacements)
3867
+ }), $[18] = fallbackPlacements, $[19] = placementProp, $[20] = t12) : t12 = $[20], ret.push(t12);
3868
+ } else {
3869
+ const t12 = floatingBoundary || void 0;
3870
+ let t22;
3871
+ $[21] !== fallbackPlacements || $[22] !== rootBoundary || $[23] !== t12 ? (t22 = reactDom$1.flip({
3872
+ boundary: t12,
3873
+ fallbackPlacements,
3874
+ padding: DEFAULT_POPOVER_PADDING,
3875
+ rootBoundary
3876
+ }), $[21] = fallbackPlacements, $[22] = rootBoundary, $[23] = t12, $[24] = t22) : t22 = $[24], ret.push(t22);
3877
+ }
3878
+ let t1;
3879
+ if ($[25] === Symbol.for("react.memo_cache_sentinel") ? (t1 = reactDom$1.offset({
3278
3880
  mainAxis: DEFAULT_POPOVER_DISTANCE
3279
- })), (constrainSize || matchReferenceWidth) && ret.push(size({
3280
- boundaryElement: floatingBoundary || void 0,
3281
- constrainSize,
3282
- margins,
3283
- matchReferenceWidth,
3284
- maxWidthRef,
3285
- padding: DEFAULT_POPOVER_PADDING,
3286
- referenceWidthRef,
3287
- setReferenceWidth,
3288
- widthRef
3289
- })), preventOverflow && ret.push(reactDom$1.shift({
3290
- boundary: floatingBoundary || void 0,
3291
- rootBoundary,
3292
- padding: DEFAULT_POPOVER_PADDING
3293
- })), arrowProp && ret.push(reactDom$1.arrow({
3294
- element: arrowRef,
3295
- padding: DEFAULT_POPOVER_PADDING
3296
- })), animate && ret.push(origin), ret.push(reactDom$1.hide({
3297
- boundary: referenceBoundary || void 0,
3881
+ }), $[25] = t1) : t1 = $[25], ret.push(t1), constrainSize || matchReferenceWidth) {
3882
+ const t22 = floatingBoundary || void 0;
3883
+ let t32;
3884
+ $[26] !== constrainSize || $[27] !== margins || $[28] !== matchReferenceWidth || $[29] !== maxWidthRef || $[30] !== referenceWidthRef || $[31] !== setReferenceWidth || $[32] !== t22 || $[33] !== widthRef ? (t32 = size({
3885
+ boundaryElement: t22,
3886
+ constrainSize,
3887
+ margins,
3888
+ matchReferenceWidth,
3889
+ maxWidthRef,
3890
+ padding: DEFAULT_POPOVER_PADDING,
3891
+ referenceWidthRef,
3892
+ setReferenceWidth,
3893
+ widthRef
3894
+ }), $[26] = constrainSize, $[27] = margins, $[28] = matchReferenceWidth, $[29] = maxWidthRef, $[30] = referenceWidthRef, $[31] = setReferenceWidth, $[32] = t22, $[33] = widthRef, $[34] = t32) : t32 = $[34], ret.push(t32);
3895
+ }
3896
+ if (preventOverflow) {
3897
+ const t22 = floatingBoundary || void 0;
3898
+ let t32;
3899
+ $[35] !== rootBoundary || $[36] !== t22 ? (t32 = reactDom$1.shift({
3900
+ boundary: t22,
3901
+ rootBoundary,
3902
+ padding: DEFAULT_POPOVER_PADDING
3903
+ }), $[35] = rootBoundary, $[36] = t22, $[37] = t32) : t32 = $[37], ret.push(t32);
3904
+ }
3905
+ if (arrowProp) {
3906
+ let t22;
3907
+ $[38] !== arrowRef ? (t22 = reactDom$1.arrow({
3908
+ element: arrowRef,
3909
+ padding: DEFAULT_POPOVER_PADDING
3910
+ }), $[38] = arrowRef, $[39] = t22) : t22 = $[39], ret.push(t22);
3911
+ }
3912
+ animate && ret.push(origin);
3913
+ const t2 = referenceBoundary || void 0;
3914
+ let t3;
3915
+ $[40] !== t2 ? (t3 = reactDom$1.hide({
3916
+ boundary: t2,
3298
3917
  padding: DEFAULT_POPOVER_PADDING,
3299
3918
  strategy: "referenceHidden"
3300
- })), ret;
3301
- }, [animate, arrowProp, arrowRef, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, maxWidthRef, placementProp, placementStrategy, preventOverflow, referenceBoundary, referenceWidthRef, rootBoundary, setReferenceWidth, widthRef]);
3919
+ }), $[40] = t2, $[41] = t3) : t3 = $[41], ret.push(t3), $[0] = animate, $[1] = arrowProp, $[2] = arrowRef, $[3] = constrainSize, $[4] = fallbackPlacements, $[5] = floatingBoundary, $[6] = margins, $[7] = matchReferenceWidth, $[8] = maxWidthRef, $[9] = placementProp, $[10] = placementStrategy, $[11] = preventOverflow, $[12] = referenceBoundary, $[13] = referenceWidthRef, $[14] = rootBoundary, $[15] = setReferenceWidth, $[16] = widthRef, $[17] = ret;
3920
+ } else
3921
+ ret = $[17];
3922
+ return ret;
3302
3923
  }
3303
3924
  function radioBaseStyle() {
3304
3925
  return styledComponents.css`
@@ -3421,18 +4042,29 @@ const StyledRadio = /* @__PURE__ */ styledComponents.styled.div.withConfig({
3421
4042
  displayName: "Input",
3422
4043
  componentId: "sc-ccrwkf-1"
3423
4044
  })(inputElementStyle), Radio = react.forwardRef(function(props, forwardedRef) {
3424
- const {
4045
+ const $ = reactCompilerRuntime.c(19);
4046
+ let className, customValidity, disabled, readOnly, restProps, style;
4047
+ $[0] !== props ? ({
3425
4048
  className,
3426
4049
  disabled,
3427
4050
  style,
3428
4051
  customValidity,
3429
4052
  readOnly,
3430
4053
  ...restProps
3431
- } = props, ref = react.useRef(null);
3432
- return react.useImperativeHandle(forwardedRef, () => ref.current), useCustomValidity(ref, customValidity), /* @__PURE__ */ jsxRuntime.jsxs(StyledRadio, { className, "data-ui": "Radio", style, children: [
3433
- /* @__PURE__ */ jsxRuntime.jsx(Input$4, { "data-read-only": !disabled && readOnly ? "" : void 0, "data-error": customValidity ? "" : void 0, ...restProps, disabled: disabled || readOnly, readOnly, ref, type: "radio" }),
3434
- /* @__PURE__ */ jsxRuntime.jsx("span", {})
3435
- ] });
4054
+ } = props, $[0] = props, $[1] = className, $[2] = customValidity, $[3] = disabled, $[4] = readOnly, $[5] = restProps, $[6] = style) : (className = $[1], customValidity = $[2], disabled = $[3], readOnly = $[4], restProps = $[5], style = $[6]);
4055
+ const ref = react.useRef(null);
4056
+ let t0;
4057
+ $[7] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[7] = t0) : t0 = $[7], react.useImperativeHandle(forwardedRef, t0), useCustomValidity(ref, customValidity);
4058
+ const t1 = !disabled && readOnly ? "" : void 0, t2 = customValidity ? "" : void 0, t3 = disabled || readOnly;
4059
+ let t4;
4060
+ $[8] !== readOnly || $[9] !== restProps || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Input$4, { "data-read-only": t1, "data-error": t2, ...restProps, disabled: t3, readOnly, ref, type: "radio" }), $[8] = readOnly, $[9] = restProps, $[10] = t1, $[11] = t2, $[12] = t3, $[13] = t4) : t4 = $[13];
4061
+ let t5;
4062
+ $[14] === Symbol.for("react.memo_cache_sentinel") ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", {}), $[14] = t5) : t5 = $[14];
4063
+ let t6;
4064
+ return $[15] !== className || $[16] !== style || $[17] !== t4 ? (t6 = /* @__PURE__ */ jsxRuntime.jsxs(StyledRadio, { className, "data-ui": "Radio", style, children: [
4065
+ t4,
4066
+ t5
4067
+ ] }), $[15] = className, $[16] = style, $[17] = t4, $[18] = t6) : t6 = $[18], t6;
3436
4068
  });
3437
4069
  Radio.displayName = "ForwardRef(Radio)";
3438
4070
  function rootStyle() {
@@ -3587,21 +4219,45 @@ const selectStyle = {
3587
4219
  displayName: "IconBox",
3588
4220
  componentId: "sc-5mxno7-2"
3589
4221
  })(selectStyle.iconBox), Select = react.forwardRef(function(props, forwardedRef) {
3590
- const {
4222
+ const $ = reactCompilerRuntime.c(37);
4223
+ let children, customValidity, disabled, readOnly, restProps, t0, t1, t2, t3;
4224
+ $[0] !== props ? ({
3591
4225
  children,
3592
4226
  customValidity,
3593
4227
  disabled,
3594
- fontSize: fontSize2 = 2,
3595
- padding = 3,
3596
- radius = 2,
4228
+ fontSize: t0,
4229
+ padding: t1,
4230
+ radius: t2,
3597
4231
  readOnly,
3598
- space = 3,
4232
+ space: t3,
3599
4233
  ...restProps
3600
- } = props, ref = react.useRef(null);
3601
- return react.useImperativeHandle(forwardedRef, () => ref.current), useCustomValidity(ref, customValidity), /* @__PURE__ */ jsxRuntime.jsxs(StyledSelect, { "data-ui": "Select", children: [
3602
- /* @__PURE__ */ jsxRuntime.jsx(Input$3, { "data-read-only": !disabled && readOnly ? "" : void 0, "data-ui": "Select", ...restProps, $fontSize: _getArrayProp(fontSize2), $padding: _getArrayProp(padding), $radius: _getArrayProp(radius), $space: _getArrayProp(space), disabled: disabled || readOnly, ref, children }),
3603
- /* @__PURE__ */ jsxRuntime.jsx(IconBox, { padding, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}) }) })
3604
- ] });
4234
+ } = props, $[0] = props, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = readOnly, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3) : (children = $[1], customValidity = $[2], disabled = $[3], readOnly = $[4], restProps = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9]);
4235
+ const fontSize2 = t0 === void 0 ? 2 : t0, padding = t1 === void 0 ? 3 : t1, radius = t2 === void 0 ? 2 : t2, space = t3 === void 0 ? 3 : t3, ref = react.useRef(null);
4236
+ let t4;
4237
+ $[10] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[10] = t4) : t4 = $[10], react.useImperativeHandle(forwardedRef, t4), useCustomValidity(ref, customValidity);
4238
+ const t5 = !disabled && readOnly ? "" : void 0;
4239
+ let t6;
4240
+ $[11] !== fontSize2 ? (t6 = _getArrayProp(fontSize2), $[11] = fontSize2, $[12] = t6) : t6 = $[12];
4241
+ let t7;
4242
+ $[13] !== padding ? (t7 = _getArrayProp(padding), $[13] = padding, $[14] = t7) : t7 = $[14];
4243
+ let t8;
4244
+ $[15] !== radius ? (t8 = _getArrayProp(radius), $[15] = radius, $[16] = t8) : t8 = $[16];
4245
+ let t9;
4246
+ $[17] !== space ? (t9 = _getArrayProp(space), $[17] = space, $[18] = t9) : t9 = $[18];
4247
+ const t10 = disabled || readOnly;
4248
+ let t11;
4249
+ $[19] !== children || $[20] !== restProps || $[21] !== t10 || $[22] !== t5 || $[23] !== t6 || $[24] !== t7 || $[25] !== t8 || $[26] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Input$3, { "data-read-only": t5, "data-ui": "Select", ...restProps, $fontSize: t6, $padding: t7, $radius: t8, $space: t9, disabled: t10, ref, children }), $[19] = children, $[20] = restProps, $[21] = t10, $[22] = t5, $[23] = t6, $[24] = t7, $[25] = t8, $[26] = t9, $[27] = t11) : t11 = $[27];
4250
+ let t12;
4251
+ $[28] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}), $[28] = t12) : t12 = $[28];
4252
+ let t13;
4253
+ $[29] !== fontSize2 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children: t12 }), $[29] = fontSize2, $[30] = t13) : t13 = $[30];
4254
+ let t14;
4255
+ $[31] !== padding || $[32] !== t13 ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(IconBox, { padding, children: t13 }), $[31] = padding, $[32] = t13, $[33] = t14) : t14 = $[33];
4256
+ let t15;
4257
+ return $[34] !== t11 || $[35] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs(StyledSelect, { "data-ui": "Select", children: [
4258
+ t11,
4259
+ t14
4260
+ ] }), $[34] = t11, $[35] = t14, $[36] = t15) : t15 = $[36], t15;
3605
4261
  });
3606
4262
  Select.displayName = "ForwardRef(Select)";
3607
4263
  const BASE_STYLE = {
@@ -3630,12 +4286,18 @@ const StyledStack = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
3630
4286
  displayName: "StyledStack",
3631
4287
  componentId: "sc-8dpfq2-0"
3632
4288
  })(stackBaseStyle, responsiveStackSpaceStyle), Stack = react.forwardRef(function(props, ref) {
3633
- const {
4289
+ const $ = reactCompilerRuntime.c(12);
4290
+ let as, restProps, space;
4291
+ $[0] !== props ? ({
3634
4292
  as,
3635
4293
  space,
3636
4294
  ...restProps
3637
- } = props;
3638
- return /* @__PURE__ */ jsxRuntime.jsx(StyledStack, { "data-as": typeof as == "string" ? as : void 0, "data-ui": "Stack", ...restProps, $space: _getArrayProp(space), forwardedAs: as, ref });
4295
+ } = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = space) : (as = $[1], restProps = $[2], space = $[3]);
4296
+ const t0 = typeof as == "string" ? as : void 0;
4297
+ let t1;
4298
+ $[4] !== space ? (t1 = _getArrayProp(space), $[4] = space, $[5] = t1) : t1 = $[5];
4299
+ let t2;
4300
+ return $[6] !== as || $[7] !== ref || $[8] !== restProps || $[9] !== t0 || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(StyledStack, { "data-as": t0, "data-ui": "Stack", ...restProps, $space: t1, forwardedAs: as, ref }), $[6] = as, $[7] = ref, $[8] = restProps, $[9] = t0, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
3639
4301
  });
3640
4302
  Stack.displayName = "ForwardRef(Stack)";
3641
4303
  function switchBaseStyles() {
@@ -3807,7 +4469,9 @@ const StyledSwitch = /* @__PURE__ */ styledComponents.styled.span.withConfig({
3807
4469
  displayName: "Thumb",
3808
4470
  componentId: "sc-dw1foe-4"
3809
4471
  })(switchThumbStyles), Switch = react.forwardRef(function(props, forwardedRef) {
3810
- const {
4472
+ const $ = reactCompilerRuntime.c(26);
4473
+ let checked, className, disabled, indeterminate, readOnly, restProps, style;
4474
+ $[0] !== props ? ({
3811
4475
  checked,
3812
4476
  className,
3813
4477
  disabled,
@@ -3815,16 +4479,29 @@ const StyledSwitch = /* @__PURE__ */ styledComponents.styled.span.withConfig({
3815
4479
  readOnly,
3816
4480
  style,
3817
4481
  ...restProps
3818
- } = props, ref = react.useRef(null);
3819
- return react.useImperativeHandle(forwardedRef, () => ref.current), react.useEffect(() => {
4482
+ } = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = disabled, $[4] = indeterminate, $[5] = readOnly, $[6] = restProps, $[7] = style) : (checked = $[1], className = $[2], disabled = $[3], indeterminate = $[4], readOnly = $[5], restProps = $[6], style = $[7]);
4483
+ const ref = react.useRef(null);
4484
+ let t0;
4485
+ $[8] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[8] = t0) : t0 = $[8], react.useImperativeHandle(forwardedRef, t0);
4486
+ let t1, t2;
4487
+ $[9] !== indeterminate ? (t1 = () => {
3820
4488
  ref.current && (ref.current.indeterminate = indeterminate || !1);
3821
- }, [indeterminate]), /* @__PURE__ */ jsxRuntime.jsxs(StyledSwitch, { className, "data-ui": "Switch", style, children: [
3822
- /* @__PURE__ */ jsxRuntime.jsx(Input$2, { "data-read-only": !disabled && readOnly ? "" : void 0, ...restProps, checked: indeterminate !== !0 && checked, disabled: disabled || readOnly, type: "checkbox", ref }),
3823
- /* @__PURE__ */ jsxRuntime.jsxs(Representation, { "aria-hidden": !0, "data-name": "representation", children: [
3824
- /* @__PURE__ */ jsxRuntime.jsx(Track, {}),
3825
- /* @__PURE__ */ jsxRuntime.jsx(Thumb, { $checked: checked, $indeterminate: indeterminate })
3826
- ] })
3827
- ] });
4489
+ }, t2 = [indeterminate], $[9] = indeterminate, $[10] = t1, $[11] = t2) : (t1 = $[10], t2 = $[11]), react.useEffect(t1, t2);
4490
+ const t3 = !disabled && readOnly ? "" : void 0, t4 = indeterminate !== !0 && checked, t5 = disabled || readOnly;
4491
+ let t6;
4492
+ $[12] !== restProps || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Input$2, { "data-read-only": t3, ...restProps, checked: t4, disabled: t5, type: "checkbox", ref }), $[12] = restProps, $[13] = t3, $[14] = t4, $[15] = t5, $[16] = t6) : t6 = $[16];
4493
+ let t7;
4494
+ $[17] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Track, {}), $[17] = t7) : t7 = $[17];
4495
+ let t8;
4496
+ $[18] !== checked || $[19] !== indeterminate ? (t8 = /* @__PURE__ */ jsxRuntime.jsxs(Representation, { "aria-hidden": !0, "data-name": "representation", children: [
4497
+ t7,
4498
+ /* @__PURE__ */ jsxRuntime.jsx(Thumb, { $checked: checked, $indeterminate: indeterminate })
4499
+ ] }), $[18] = checked, $[19] = indeterminate, $[20] = t8) : t8 = $[20];
4500
+ let t9;
4501
+ return $[21] !== className || $[22] !== style || $[23] !== t6 || $[24] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsxs(StyledSwitch, { className, "data-ui": "Switch", style, children: [
4502
+ t6,
4503
+ t8
4504
+ ] }), $[21] = className, $[22] = style, $[23] = t6, $[24] = t8, $[25] = t9) : t9 = $[25], t9;
3828
4505
  });
3829
4506
  Switch.displayName = "ForwardRef(Switch)";
3830
4507
  const StyledTextArea = /* @__PURE__ */ styledComponents.styled.span.withConfig({
@@ -3840,21 +4517,42 @@ const StyledTextArea = /* @__PURE__ */ styledComponents.styled.span.withConfig({
3840
4517
  displayName: "Presentation",
3841
4518
  componentId: "sc-1d6h1o8-3"
3842
4519
  })(responsiveRadiusStyle, textInputRepresentationStyle), TextArea = react.forwardRef(function(props, forwardedRef) {
3843
- const {
3844
- border: border2 = !0,
4520
+ const $ = reactCompilerRuntime.c(35);
4521
+ let __unstable_disableFocusRing, customValidity, restProps, t0, t1, t2, t3, t4, weight;
4522
+ $[0] !== props ? ({
4523
+ border: t0,
3845
4524
  customValidity,
3846
- disabled = !1,
3847
- fontSize: fontSize2 = 2,
3848
- padding = 3,
3849
- radius = 2,
4525
+ disabled: t1,
4526
+ fontSize: t2,
4527
+ padding: t3,
4528
+ radius: t4,
3850
4529
  weight,
3851
4530
  __unstable_disableFocusRing,
3852
4531
  ...restProps
3853
- } = props, ref = react.useRef(null), rootTheme = useRootTheme();
3854
- return react.useImperativeHandle(forwardedRef, () => ref.current), useCustomValidity(ref, customValidity), /* @__PURE__ */ jsxRuntime.jsx(StyledTextArea, { "data-ui": "TextArea", children: /* @__PURE__ */ jsxRuntime.jsxs(InputRoot$1, { children: [
3855
- /* @__PURE__ */ jsxRuntime.jsx(Input$1, { "data-as": "textarea", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: _getArrayProp(fontSize2), $padding: _getArrayProp(padding), $scheme: rootTheme.scheme, $space: _getArrayProp(0), $tone: rootTheme.tone, $weight: weight, disabled, ref }),
3856
- /* @__PURE__ */ jsxRuntime.jsx(Presentation$1, { $radius: _getArrayProp(radius), $unstableDisableFocusRing: __unstable_disableFocusRing, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": border2 ? "" : void 0, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone })
3857
- ] }) });
4532
+ } = props, $[0] = props, $[1] = __unstable_disableFocusRing, $[2] = customValidity, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = weight) : (__unstable_disableFocusRing = $[1], customValidity = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], weight = $[9]);
4533
+ const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize2 = t2 === void 0 ? 2 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, ref = react.useRef(null), rootTheme = useRootTheme();
4534
+ let t5;
4535
+ $[10] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[10] = t5) : t5 = $[10], react.useImperativeHandle(forwardedRef, t5), useCustomValidity(ref, customValidity);
4536
+ const t6 = rootTheme.scheme, t7 = rootTheme.tone;
4537
+ let t8;
4538
+ $[11] !== fontSize2 ? (t8 = _getArrayProp(fontSize2), $[11] = fontSize2, $[12] = t8) : t8 = $[12];
4539
+ let t9;
4540
+ $[13] !== padding ? (t9 = _getArrayProp(padding), $[13] = padding, $[14] = t9) : t9 = $[14];
4541
+ const t10 = rootTheme.scheme;
4542
+ let t11;
4543
+ $[15] === Symbol.for("react.memo_cache_sentinel") ? (t11 = _getArrayProp(0), $[15] = t11) : t11 = $[15];
4544
+ let t12;
4545
+ $[16] !== disabled || $[17] !== restProps || $[18] !== rootTheme.scheme || $[19] !== rootTheme.tone || $[20] !== t8 || $[21] !== t9 || $[22] !== weight ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(Input$1, { "data-as": "textarea", "data-scheme": t6, "data-tone": t7, ...restProps, $fontSize: t8, $padding: t9, $scheme: t10, $space: t11, $tone: rootTheme.tone, $weight: weight, disabled, ref }), $[16] = disabled, $[17] = restProps, $[18] = rootTheme.scheme, $[19] = rootTheme.tone, $[20] = t8, $[21] = t9, $[22] = weight, $[23] = t12) : t12 = $[23];
4546
+ let t13;
4547
+ $[24] !== radius ? (t13 = _getArrayProp(radius), $[24] = radius, $[25] = t13) : t13 = $[25];
4548
+ const t14 = border2 ? "" : void 0;
4549
+ let t15;
4550
+ $[26] !== __unstable_disableFocusRing || $[27] !== rootTheme.scheme || $[28] !== rootTheme.tone || $[29] !== t13 || $[30] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(Presentation$1, { $radius: t13, $unstableDisableFocusRing: __unstable_disableFocusRing, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t14, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone }), $[26] = __unstable_disableFocusRing, $[27] = rootTheme.scheme, $[28] = rootTheme.tone, $[29] = t13, $[30] = t14, $[31] = t15) : t15 = $[31];
4551
+ let t16;
4552
+ return $[32] !== t12 || $[33] !== t15 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(StyledTextArea, { "data-ui": "TextArea", children: /* @__PURE__ */ jsxRuntime.jsxs(InputRoot$1, { children: [
4553
+ t12,
4554
+ t15
4555
+ ] }) }), $[32] = t12, $[33] = t15, $[34] = t16) : t16 = $[34], t16;
3858
4556
  });
3859
4557
  TextArea.displayName = "ForwardRef(TextArea)";
3860
4558
  const CLEAR_BUTTON_BOX_STYLE = {
@@ -3900,61 +4598,119 @@ const CLEAR_BUTTON_BOX_STYLE = {
3900
4598
  display: "block"
3901
4599
  }
3902
4600
  }), TextInput = react.forwardRef(function(props, forwardedRef) {
3903
- const {
4601
+ const $ = reactCompilerRuntime.c(92);
4602
+ let IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
4603
+ $[0] !== props ? ({
3904
4604
  __unstable_disableFocusRing,
3905
- border: border2 = !0,
4605
+ border: t0,
3906
4606
  clearButton,
3907
- disabled = !1,
3908
- fontSize: fontSizeProp = 2,
4607
+ disabled: t1,
4608
+ fontSize: t2,
3909
4609
  icon: IconComponent,
3910
4610
  iconRight: IconRightComponent,
3911
4611
  onClear,
3912
- padding: paddingProp = 3,
4612
+ padding: t3,
3913
4613
  prefix,
3914
- radius: radiusProp = 2,
4614
+ radius: t4,
3915
4615
  readOnly,
3916
- space: spaceProp = 3,
4616
+ space: t5,
3917
4617
  suffix,
3918
4618
  customValidity,
3919
- type = "text",
4619
+ type: t6,
3920
4620
  weight,
3921
4621
  ...restProps
3922
- } = props, ref = react.useRef(null), rootTheme = useRootTheme(), fontSize2 = _getArrayProp(fontSizeProp), padding = _getArrayProp(paddingProp), radius = _getArrayProp(radiusProp), space = _getArrayProp(spaceProp), $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix;
3923
- react.useImperativeHandle(forwardedRef, () => ref.current), useCustomValidity(ref, customValidity);
3924
- const handleClearMouseDown = react.useCallback((event) => {
3925
- event.preventDefault(), event.stopPropagation();
3926
- }, []), handleClearClick = react.useCallback((event) => {
3927
- event.preventDefault(), event.stopPropagation(), onClear && onClear(), ref.current?.focus();
3928
- }, [onClear, ref]), prefixNode = react.useMemo(() => prefix && /* @__PURE__ */ jsxRuntime.jsx(Prefix, { borderTop: !0, borderLeft: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: prefix }) }), [prefix, radius]), presentationNode = react.useMemo(() => /* @__PURE__ */ jsxRuntime.jsxs(Presentation, { $hasPrefix, $unstableDisableFocusRing: __unstable_disableFocusRing, $hasSuffix, $radius: radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": border2 ? "" : void 0, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, children: [
3929
- IconComponent && /* @__PURE__ */ jsxRuntime.jsx(LeftBox, { padding, children: /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
3930
- react.isValidElement(IconComponent) && IconComponent,
3931
- ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
3932
- ] }) }),
3933
- !$hasClearButton && IconRightComponent && /* @__PURE__ */ jsxRuntime.jsx(RightBox, { padding, children: /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
3934
- react.isValidElement(IconRightComponent) && IconRightComponent,
3935
- ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
3936
- ] }) })
3937
- ] }), [__unstable_disableFocusRing, border2, fontSize2, IconComponent, IconRightComponent, padding, radius, rootTheme, $hasClearButton, $hasPrefix, $hasSuffix]), clearButtonBoxPadding = react.useMemo(() => padding.map((v) => v === 0 ? 0 : v === 1 || v === 2 ? 1 : v - 2), [padding]), clearButtonPadding = react.useMemo(() => padding.map((v) => v === 0 || v === 1 ? 0 : v === 2 ? 1 : v - 1), [padding]), clearButtonProps = react.useMemo(() => typeof clearButton == "object" ? clearButton : EMPTY_RECORD, [clearButton]), clearButtonNode = react.useMemo(() => !disabled && !readOnly && clearButton && /* @__PURE__ */ jsxRuntime.jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: icons.CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), [clearButton, clearButtonBoxPadding, clearButtonPadding, clearButtonProps, customValidity, disabled, fontSize2, handleClearClick, handleClearMouseDown, radius, readOnly]), suffixNode = react.useMemo(() => suffix && /* @__PURE__ */ jsxRuntime.jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: suffix }) }), [radius, suffix]);
3938
- return /* @__PURE__ */ jsxRuntime.jsxs(StyledTextInput, { "data-ui": "TextInput", tone: rootTheme.tone, children: [
4622
+ } = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = clearButton, $[5] = customValidity, $[6] = onClear, $[7] = prefix, $[8] = readOnly, $[9] = restProps, $[10] = suffix, $[11] = t0, $[12] = t1, $[13] = t2, $[14] = t3, $[15] = t4, $[16] = t5, $[17] = t6, $[18] = weight) : (IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], clearButton = $[4], customValidity = $[5], onClear = $[6], prefix = $[7], readOnly = $[8], restProps = $[9], suffix = $[10], t0 = $[11], t1 = $[12], t2 = $[13], t3 = $[14], t4 = $[15], t5 = $[16], t6 = $[17], weight = $[18]);
4623
+ const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSizeProp = t2 === void 0 ? 2 : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, spaceProp = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = react.useRef(null), rootTheme = useRootTheme();
4624
+ let t7;
4625
+ $[19] !== fontSizeProp ? (t7 = _getArrayProp(fontSizeProp), $[19] = fontSizeProp, $[20] = t7) : t7 = $[20];
4626
+ const fontSize2 = t7;
4627
+ let t8;
4628
+ $[21] !== paddingProp ? (t8 = _getArrayProp(paddingProp), $[21] = paddingProp, $[22] = t8) : t8 = $[22];
4629
+ const padding = t8;
4630
+ let t9;
4631
+ $[23] !== radiusProp ? (t9 = _getArrayProp(radiusProp), $[23] = radiusProp, $[24] = t9) : t9 = $[24];
4632
+ const radius = t9;
4633
+ let t10;
4634
+ $[25] !== spaceProp ? (t10 = _getArrayProp(spaceProp), $[25] = spaceProp, $[26] = t10) : t10 = $[26];
4635
+ const space = t10, $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix;
4636
+ let t11;
4637
+ $[27] === Symbol.for("react.memo_cache_sentinel") ? (t11 = () => ref.current, $[27] = t11) : t11 = $[27], react.useImperativeHandle(forwardedRef, t11), useCustomValidity(ref, customValidity);
4638
+ const handleClearMouseDown = _temp$2;
4639
+ let t12;
4640
+ $[28] !== onClear ? (t12 = (event_0) => {
4641
+ event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
4642
+ }, $[28] = onClear, $[29] = t12) : t12 = $[29];
4643
+ const handleClearClick = t12;
4644
+ let t13;
4645
+ $[30] !== prefix || $[31] !== radius ? (t13 = prefix && /* @__PURE__ */ jsxRuntime.jsx(Prefix, { borderTop: !0, borderLeft: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: prefix }) }), $[30] = prefix, $[31] = radius, $[32] = t13) : t13 = $[32];
4646
+ const prefixNode = t13, t14 = border2 ? "" : void 0;
4647
+ let t15;
4648
+ $[33] !== IconComponent || $[34] !== fontSize2 || $[35] !== padding ? (t15 = IconComponent && /* @__PURE__ */ jsxRuntime.jsx(LeftBox, { padding, children: /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
4649
+ react.isValidElement(IconComponent) && IconComponent,
4650
+ ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
4651
+ ] }) }), $[33] = IconComponent, $[34] = fontSize2, $[35] = padding, $[36] = t15) : t15 = $[36];
4652
+ let t16;
4653
+ $[37] !== $hasClearButton || $[38] !== IconRightComponent || $[39] !== fontSize2 || $[40] !== padding ? (t16 = !$hasClearButton && IconRightComponent && /* @__PURE__ */ jsxRuntime.jsx(RightBox, { padding, children: /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
4654
+ react.isValidElement(IconRightComponent) && IconRightComponent,
4655
+ ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
4656
+ ] }) }), $[37] = $hasClearButton, $[38] = IconRightComponent, $[39] = fontSize2, $[40] = padding, $[41] = t16) : t16 = $[41];
4657
+ let t17;
4658
+ $[42] !== $hasPrefix || $[43] !== $hasSuffix || $[44] !== __unstable_disableFocusRing || $[45] !== radius || $[46] !== rootTheme.scheme || $[47] !== rootTheme.tone || $[48] !== t14 || $[49] !== t15 || $[50] !== t16 ? (t17 = /* @__PURE__ */ jsxRuntime.jsxs(Presentation, { $hasPrefix, $unstableDisableFocusRing: __unstable_disableFocusRing, $hasSuffix, $radius: radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t14, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, children: [
4659
+ t15,
4660
+ t16
4661
+ ] }), $[42] = $hasPrefix, $[43] = $hasSuffix, $[44] = __unstable_disableFocusRing, $[45] = radius, $[46] = rootTheme.scheme, $[47] = rootTheme.tone, $[48] = t14, $[49] = t15, $[50] = t16, $[51] = t17) : t17 = $[51];
4662
+ const presentationNode = t17;
4663
+ let t18;
4664
+ $[52] !== padding ? (t18 = padding.map(_temp2), $[52] = padding, $[53] = t18) : t18 = $[53];
4665
+ const clearButtonBoxPadding = t18;
4666
+ let t19;
4667
+ $[54] !== padding ? (t19 = padding.map(_temp3), $[54] = padding, $[55] = t19) : t19 = $[55];
4668
+ const clearButtonPadding = t19, clearButtonProps = typeof clearButton == "object" ? clearButton : EMPTY_RECORD;
4669
+ let t20;
4670
+ $[56] !== clearButton || $[57] !== clearButtonBoxPadding || $[58] !== clearButtonPadding || $[59] !== clearButtonProps || $[60] !== customValidity || $[61] !== disabled || $[62] !== fontSize2 || $[63] !== handleClearClick || $[64] !== radius || $[65] !== readOnly ? (t20 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsxRuntime.jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: icons.CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[56] = clearButton, $[57] = clearButtonBoxPadding, $[58] = clearButtonPadding, $[59] = clearButtonProps, $[60] = customValidity, $[61] = disabled, $[62] = fontSize2, $[63] = handleClearClick, $[64] = radius, $[65] = readOnly, $[66] = t20) : t20 = $[66];
4671
+ const clearButtonNode = t20;
4672
+ let t21;
4673
+ $[67] !== radius || $[68] !== suffix ? (t21 = suffix && /* @__PURE__ */ jsxRuntime.jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: suffix }) }), $[67] = radius, $[68] = suffix, $[69] = t21) : t21 = $[69];
4674
+ const suffixNode = t21, t22 = $hasIconRight || $hasClearButton;
4675
+ let t23;
4676
+ $[70] !== $hasIcon || $[71] !== disabled || $[72] !== fontSize2 || $[73] !== padding || $[74] !== readOnly || $[75] !== restProps || $[76] !== rootTheme.scheme || $[77] !== rootTheme.tone || $[78] !== space || $[79] !== t22 || $[80] !== type || $[81] !== weight ? (t23 = /* @__PURE__ */ jsxRuntime.jsx(Input, { "data-as": "input", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: fontSize2, $iconLeft: $hasIcon, $iconRight: t22, $padding: padding, $scheme: rootTheme.scheme, $space: space, $tone: rootTheme.tone, $weight: weight, disabled, readOnly, ref, type }), $[70] = $hasIcon, $[71] = disabled, $[72] = fontSize2, $[73] = padding, $[74] = readOnly, $[75] = restProps, $[76] = rootTheme.scheme, $[77] = rootTheme.tone, $[78] = space, $[79] = t22, $[80] = type, $[81] = weight, $[82] = t23) : t23 = $[82];
4677
+ let t24;
4678
+ $[83] !== clearButtonNode || $[84] !== presentationNode || $[85] !== t23 ? (t24 = /* @__PURE__ */ jsxRuntime.jsxs(InputRoot, { children: [
4679
+ t23,
4680
+ presentationNode,
4681
+ clearButtonNode
4682
+ ] }), $[83] = clearButtonNode, $[84] = presentationNode, $[85] = t23, $[86] = t24) : t24 = $[86];
4683
+ let t25;
4684
+ return $[87] !== prefixNode || $[88] !== rootTheme.tone || $[89] !== suffixNode || $[90] !== t24 ? (t25 = /* @__PURE__ */ jsxRuntime.jsxs(StyledTextInput, { "data-ui": "TextInput", tone: rootTheme.tone, children: [
3939
4685
  prefixNode,
3940
- /* @__PURE__ */ jsxRuntime.jsxs(InputRoot, { children: [
3941
- /* @__PURE__ */ jsxRuntime.jsx(Input, { "data-as": "input", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: fontSize2, $iconLeft: $hasIcon, $iconRight: $hasIconRight || $hasClearButton, $padding: padding, $scheme: rootTheme.scheme, $space: space, $tone: rootTheme.tone, $weight: weight, disabled, readOnly, ref, type }),
3942
- presentationNode,
3943
- clearButtonNode
3944
- ] }),
4686
+ t24,
3945
4687
  suffixNode
3946
- ] });
4688
+ ] }), $[87] = prefixNode, $[88] = rootTheme.tone, $[89] = suffixNode, $[90] = t24, $[91] = t25) : t25 = $[91], t25;
3947
4689
  });
3948
4690
  TextInput.displayName = "ForwardRef(TextInput)";
4691
+ function _temp$2(event) {
4692
+ event.preventDefault(), event.stopPropagation();
4693
+ }
4694
+ function _temp2(v) {
4695
+ return v === 0 ? 0 : v === 1 || v === 2 ? 1 : v - 2;
4696
+ }
4697
+ function _temp3(v_0) {
4698
+ return v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1;
4699
+ }
3949
4700
  function useDelayedState(initialState) {
3950
- const [state, setState] = react.useState(initialState), delayedAction = react.useRef(void 0), onStateChange = react.useCallback((nextState, delay) => {
4701
+ const $ = reactCompilerRuntime.c(3), [state, setState] = react.useState(initialState), delayedAction = react.useRef(void 0);
4702
+ let t0;
4703
+ $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = (nextState, delay) => {
3951
4704
  const action = () => {
3952
4705
  setState(nextState);
3953
4706
  };
3954
- if (delayedAction.current && (clearTimeout(delayedAction.current), delayedAction.current = void 0), !delay) return action();
4707
+ if (delayedAction.current && (clearTimeout(delayedAction.current), delayedAction.current = void 0), !delay)
4708
+ return action();
3955
4709
  delayedAction.current = setTimeout(action, delay);
3956
- }, []);
3957
- return [state, onStateChange];
4710
+ }, $[0] = t0) : t0 = $[0];
4711
+ const onStateChange = t0;
4712
+ let t1;
4713
+ return $[1] !== state ? (t1 = [state, onStateChange], $[1] = state, $[2] = t1) : t1 = $[2], t1;
3958
4714
  }
3959
4715
  const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAULT_TOOLTIP_ARROW_RADIUS = 2, DEFAULT_TOOLTIP_DISTANCE = 4, DEFAULT_TOOLTIP_PADDING = 4, DEFAULT_FALLBACK_PLACEMENTS = {
3960
4716
  top: ["top-end", "top-start", "bottom", "left", "right"],
@@ -3973,7 +4729,9 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
3973
4729
  displayName: "MotionCard",
3974
4730
  componentId: "sc-1xn138w-0"
3975
4731
  })`will-change:transform;`, TooltipCard = react.forwardRef(function(props, ref) {
3976
- const {
4732
+ const $ = reactCompilerRuntime.c(48);
4733
+ let animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, restProps, scheme, shadow, style;
4734
+ $[0] !== props ? ({
3977
4735
  animate,
3978
4736
  arrow,
3979
4737
  arrowRef,
@@ -3989,37 +4747,56 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
3989
4747
  shadow,
3990
4748
  style,
3991
4749
  ...restProps
3992
- } = props, rootStyle2 = react.useMemo(() => ({
4750
+ } = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = restProps, $[13] = scheme, $[14] = shadow, $[15] = style) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], restProps = $[12], scheme = $[13], shadow = $[14], style = $[15]);
4751
+ const t0 = animate ? "transform" : void 0;
4752
+ let t1;
4753
+ $[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t0 ? (t1 = {
3993
4754
  originX,
3994
4755
  originY,
3995
- willChange: animate ? "transform" : void 0,
4756
+ willChange: t0,
3996
4757
  ...style
3997
- }), [animate, originX, originY, style]), arrowStyle = react.useMemo(() => ({
3998
- left: arrowX !== null ? arrowX : void 0,
3999
- top: arrowY !== null ? arrowY : void 0,
4758
+ }, $[16] = originX, $[17] = originY, $[18] = style, $[19] = t0, $[20] = t1) : t1 = $[20];
4759
+ const rootStyle2 = t1, t2 = arrowX !== null ? arrowX : void 0, t3 = arrowY !== null ? arrowY : void 0;
4760
+ let t4;
4761
+ $[21] !== t2 || $[22] !== t3 ? (t4 = {
4762
+ left: t2,
4763
+ top: t3,
4000
4764
  right: void 0,
4001
4765
  bottom: void 0
4002
- }), [arrowX, arrowY]);
4003
- return /* @__PURE__ */ jsxRuntime.jsxs(MotionCard, { "data-ui": "Tooltip__card", ...restProps, "data-placement": placement, padding, radius, ref, scheme, shadow, style: rootStyle2, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: animate ? ["hidden", "initial"] : void 0, animate: animate ? ["visible", "scaleIn"] : void 0, exit: animate ? ["hidden", "scaleOut"] : void 0, children: [
4766
+ }, $[21] = t2, $[22] = t3, $[23] = t4) : t4 = $[23];
4767
+ const arrowStyle = t4, t5 = restProps;
4768
+ let t6;
4769
+ $[24] !== animate ? (t6 = animate ? ["hidden", "initial"] : void 0, $[24] = animate, $[25] = t6) : t6 = $[25];
4770
+ let t7;
4771
+ $[26] !== animate ? (t7 = animate ? ["visible", "scaleIn"] : void 0, $[26] = animate, $[27] = t7) : t7 = $[27];
4772
+ let t8;
4773
+ $[28] !== animate ? (t8 = animate ? ["hidden", "scaleOut"] : void 0, $[28] = animate, $[29] = t8) : t8 = $[29];
4774
+ let t9;
4775
+ $[30] !== arrow || $[31] !== arrowRef || $[32] !== arrowStyle ? (t9 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[30] = arrow, $[31] = arrowRef, $[32] = arrowStyle, $[33] = t9) : t9 = $[33];
4776
+ let t10;
4777
+ return $[34] !== children || $[35] !== padding || $[36] !== placement || $[37] !== radius || $[38] !== ref || $[39] !== rootStyle2 || $[40] !== scheme || $[41] !== shadow || $[42] !== t5 || $[43] !== t6 || $[44] !== t7 || $[45] !== t8 || $[46] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard, { "data-ui": "Tooltip__card", ...t5, "data-placement": placement, padding, radius, ref, scheme, shadow, style: rootStyle2, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t6, animate: t7, exit: t8, children: [
4004
4778
  children,
4005
- arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS })
4006
- ] });
4779
+ t9
4780
+ ] }), $[34] = children, $[35] = padding, $[36] = placement, $[37] = radius, $[38] = ref, $[39] = rootStyle2, $[40] = scheme, $[41] = shadow, $[42] = t5, $[43] = t6, $[44] = t7, $[45] = t8, $[46] = t9, $[47] = t10) : t10 = $[47], t10;
4007
4781
  });
4008
4782
  TooltipCard.displayName = "ForwardRef(TooltipCard)";
4009
4783
  const TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
4010
4784
  function TooltipDelayGroupProvider(props) {
4011
- const {
4785
+ const $ = reactCompilerRuntime.c(9), {
4012
4786
  children,
4013
4787
  delay
4014
- } = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay : delay?.open || 0, closeDelay = typeof delay == "number" ? delay : delay?.close || 0, value = react.useMemo(() => ({
4788
+ } = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay : delay?.open || 0, closeDelay = typeof delay == "number" ? delay : delay?.close || 0, t0 = isGroupActive ? 1 : openDelay;
4789
+ let t1;
4790
+ $[0] !== closeDelay || $[1] !== openTooltipId || $[2] !== setIsGroupActive || $[3] !== setOpenTooltipId || $[4] !== t0 ? (t1 = {
4015
4791
  setIsGroupActive,
4016
4792
  openTooltipId,
4017
4793
  setOpenTooltipId,
4018
- // When the group is active, we want the next tooltip to open immediately.
4019
- openDelay: isGroupActive ? 1 : openDelay,
4794
+ openDelay: t0,
4020
4795
  closeDelay
4021
- }), [closeDelay, isGroupActive, openDelay, openTooltipId, setIsGroupActive, setOpenTooltipId]);
4022
- return /* @__PURE__ */ jsxRuntime.jsx(TooltipDelayGroupContext.Provider, { value, children });
4796
+ }, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] = t0, $[5] = t1) : t1 = $[5];
4797
+ const value = t1;
4798
+ let t2;
4799
+ return $[6] !== children || $[7] !== value ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(TooltipDelayGroupContext.Provider, { value, children }), $[6] = children, $[7] = value, $[8] = t2) : t2 = $[8], t2;
4023
4800
  }
4024
4801
  TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
4025
4802
  function useTooltipDelayGroup() {
@@ -4029,51 +4806,71 @@ const StyledTooltip = styledComponents.styled(Layer).withConfig({
4029
4806
  displayName: "StyledTooltip",
4030
4807
  componentId: "sc-13f2zvh-0"
4031
4808
  })`pointer-events:none;`, Tooltip = react.forwardRef(function(props, forwardedRef) {
4032
- const boundaryElementContext = useBoundaryElement(), {
4809
+ const $ = reactCompilerRuntime.c(137), boundaryElementContext = useBoundaryElement(), {
4033
4810
  layer
4034
- } = useTheme_v2(), {
4035
- animate: _animate = !1,
4036
- arrow: arrowProp = !1,
4811
+ } = useTheme_v2();
4812
+ let _boundaryElement, _fallbackPlacementsProp, _zOffset, childProp, content, delay, disabled, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5;
4813
+ $[0] !== props ? ({
4814
+ animate: t0,
4815
+ arrow: t1,
4037
4816
  boundaryElement: _boundaryElement,
4038
4817
  children: childProp,
4039
4818
  content,
4040
4819
  disabled,
4041
4820
  fallbackPlacements: _fallbackPlacementsProp,
4042
- padding = 2,
4043
- placement: placementProp = "bottom",
4821
+ padding: t2,
4822
+ placement: t3,
4044
4823
  portal: portalProp,
4045
- radius = 2,
4824
+ radius: t4,
4046
4825
  scheme,
4047
- shadow = 2,
4826
+ shadow: t5,
4048
4827
  zOffset: _zOffset,
4049
4828
  delay,
4050
4829
  ...restProps
4051
- } = props, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacementsProp = _fallbackPlacementsProp ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? "bottom"], zOffset = _zOffset ?? layer.tooltip.zOffset, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = _getArrayProp(fallbackPlacementsProp), ref = react.useRef(null), [referenceElement, setReferenceElement] = react.useState(null), arrowRef = react.useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = react.useState(0);
4052
- react.useImperativeHandle(forwardedRef, () => ref.current);
4053
- const portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements?.[portalProp] || null : portal.element, middleware = useMiddleware({
4830
+ } = props, $[0] = props, $[1] = _boundaryElement, $[2] = _fallbackPlacementsProp, $[3] = _zOffset, $[4] = childProp, $[5] = content, $[6] = delay, $[7] = disabled, $[8] = portalProp, $[9] = restProps, $[10] = scheme, $[11] = t0, $[12] = t1, $[13] = t2, $[14] = t3, $[15] = t4, $[16] = t5) : (_boundaryElement = $[1], _fallbackPlacementsProp = $[2], _zOffset = $[3], childProp = $[4], content = $[5], delay = $[6], disabled = $[7], portalProp = $[8], restProps = $[9], scheme = $[10], t0 = $[11], t1 = $[12], t2 = $[13], t3 = $[14], t4 = $[15], t5 = $[16]);
4831
+ const _animate = t0 === void 0 ? !1 : t0, arrowProp = t1 === void 0 ? !1 : t1, padding = t2 === void 0 ? 2 : t2, placementProp = t3 === void 0 ? "bottom" : t3, radius = t4 === void 0 ? 2 : t4, shadow = t5 === void 0 ? 2 : t5, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacementsProp = _fallbackPlacementsProp ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? "bottom"], zOffset = _zOffset ?? layer.tooltip.zOffset, animate = usePrefersReducedMotion() ? !1 : _animate;
4832
+ let t6;
4833
+ $[17] !== fallbackPlacementsProp ? (t6 = _getArrayProp(fallbackPlacementsProp), $[17] = fallbackPlacementsProp, $[18] = t6) : t6 = $[18];
4834
+ const fallbackPlacements = t6, ref = react.useRef(null), [referenceElement, setReferenceElement] = react.useState(null), arrowRef = react.useRef(null), [tooltipMaxWidth, setTooltipMaxWidth] = react.useState(0);
4835
+ let t7;
4836
+ $[19] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[19] = t7) : t7 = $[19], react.useImperativeHandle(forwardedRef, t7);
4837
+ const portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements?.[portalProp] || null : portal.element;
4838
+ let t8;
4839
+ $[20] !== animate || $[21] !== arrowProp || $[22] !== boundaryElement || $[23] !== fallbackPlacements ? (t8 = {
4054
4840
  animate,
4055
4841
  arrowProp,
4056
4842
  arrowRef,
4057
4843
  boundaryElement,
4058
4844
  fallbackPlacements,
4059
- rootBoundary
4060
- }), {
4845
+ rootBoundary: "viewport"
4846
+ }, $[20] = animate, $[21] = arrowProp, $[22] = boundaryElement, $[23] = fallbackPlacements, $[24] = t8) : t8 = $[24];
4847
+ const middleware = useMiddleware(t8);
4848
+ let t9;
4849
+ $[25] !== referenceElement ? (t9 = {
4850
+ reference: referenceElement
4851
+ }, $[25] = referenceElement, $[26] = t9) : t9 = $[26];
4852
+ let t10;
4853
+ $[27] !== middleware || $[28] !== placementProp || $[29] !== t9 ? (t10 = {
4854
+ middleware,
4855
+ placement: placementProp,
4856
+ whileElementsMounted: reactDom$1.autoUpdate,
4857
+ elements: t9
4858
+ }, $[27] = middleware, $[28] = placementProp, $[29] = t9, $[30] = t10) : t10 = $[30];
4859
+ const {
4061
4860
  floatingStyles,
4062
4861
  placement,
4063
4862
  middlewareData,
4064
4863
  refs,
4065
4864
  update
4066
- } = reactDom$1.useFloating({
4067
- middleware,
4068
- placement: placementProp,
4069
- whileElementsMounted: reactDom$1.autoUpdate,
4070
- elements: {
4071
- reference: referenceElement
4072
- }
4073
- }), arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, tooltipId = react.useId(), [isOpen, setIsOpen] = useDelayedState(!1), delayGroupContext = useTooltipDelayGroup(), {
4865
+ } = reactDom$1.useFloating(t10), arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, tooltipId = react.useId(), [isOpen, setIsOpen] = useDelayedState(!1), delayGroupContext = useTooltipDelayGroup();
4866
+ let t11;
4867
+ $[31] !== delayGroupContext ? (t11 = delayGroupContext || {}, $[31] = delayGroupContext, $[32] = t11) : t11 = $[32];
4868
+ const {
4074
4869
  setIsGroupActive,
4075
4870
  setOpenTooltipId
4076
- } = delayGroupContext || {}, showTooltip = isOpen || delayGroupContext?.openTooltipId === tooltipId, isInsideGroup = delayGroupContext !== null, openDelayProp = typeof delay == "number" ? delay : delay?.open || 0, closeDelayProp = typeof delay == "number" ? delay : delay?.close || 0, openDelay = isInsideGroup ? delayGroupContext.openDelay : openDelayProp, closeDelay = isInsideGroup ? delayGroupContext.closeDelay : closeDelayProp, handleIsOpenChange = react.useCallback((open, immediate) => {
4871
+ } = t11, showTooltip = isOpen || delayGroupContext?.openTooltipId === tooltipId, isInsideGroup = delayGroupContext !== null, openDelayProp = typeof delay == "number" ? delay : delay?.open || 0, closeDelayProp = typeof delay == "number" ? delay : delay?.close || 0, openDelay = isInsideGroup ? delayGroupContext.openDelay : openDelayProp, closeDelay = isInsideGroup ? delayGroupContext.closeDelay : closeDelayProp;
4872
+ let t12;
4873
+ $[33] !== closeDelay || $[34] !== isInsideGroup || $[35] !== openDelay || $[36] !== setIsGroupActive || $[37] !== setIsOpen || $[38] !== setOpenTooltipId || $[39] !== tooltipId ? (t12 = (open, immediate) => {
4077
4874
  if (isInsideGroup)
4078
4875
  if (open) {
4079
4876
  const groupedOpenDelay = immediate ? 0 : openDelay;
@@ -4084,108 +4881,196 @@ const StyledTooltip = styledComponents.styled(Layer).withConfig({
4084
4881
  }
4085
4882
  else
4086
4883
  setIsOpen(open, immediate ? 0 : open ? openDelay : closeDelay);
4087
- }, [isInsideGroup, openDelay, setIsGroupActive, setOpenTooltipId, tooltipId, closeDelay, setIsOpen]), handleBlur = react.useCallback((e) => {
4884
+ }, $[33] = closeDelay, $[34] = isInsideGroup, $[35] = openDelay, $[36] = setIsGroupActive, $[37] = setIsOpen, $[38] = setOpenTooltipId, $[39] = tooltipId, $[40] = t12) : t12 = $[40];
4885
+ const handleIsOpenChange = t12;
4886
+ let t13;
4887
+ $[41] !== childProp?.props || $[42] !== handleIsOpenChange ? (t13 = (e) => {
4088
4888
  handleIsOpenChange(!1), childProp?.props?.onBlur?.(e);
4089
- }, [childProp?.props, handleIsOpenChange]), handleClick = react.useCallback((e) => {
4090
- handleIsOpenChange(!1, !0), childProp?.props.onClick?.(e);
4091
- }, [childProp?.props, handleIsOpenChange]), handleContextMenu = react.useCallback((e) => {
4092
- handleIsOpenChange(!1, !0), childProp?.props.onContextMenu?.(e);
4093
- }, [childProp?.props, handleIsOpenChange]), handleFocus = react.useCallback((e) => {
4094
- handleIsOpenChange(!0), childProp?.props?.onFocus?.(e);
4095
- }, [childProp?.props, handleIsOpenChange]), handleMouseEnter = react.useCallback((e) => {
4096
- handleIsOpenChange(!0), childProp?.props?.onMouseEnter?.(e);
4097
- }, [childProp?.props, handleIsOpenChange]), handleMouseLeave = react.useCallback((e) => {
4098
- handleIsOpenChange(!1), childProp?.props?.onMouseLeave?.(e);
4099
- }, [childProp?.props, handleIsOpenChange]);
4100
- useCloseOnMouseLeave({
4889
+ }, $[41] = childProp?.props, $[42] = handleIsOpenChange, $[43] = t13) : t13 = $[43];
4890
+ const handleBlur = t13;
4891
+ let t14;
4892
+ $[44] !== childProp?.props || $[45] !== handleIsOpenChange ? (t14 = (e_0) => {
4893
+ handleIsOpenChange(!1, !0), childProp?.props.onClick?.(e_0);
4894
+ }, $[44] = childProp?.props, $[45] = handleIsOpenChange, $[46] = t14) : t14 = $[46];
4895
+ const handleClick = t14;
4896
+ let t15;
4897
+ $[47] !== childProp?.props || $[48] !== handleIsOpenChange ? (t15 = (e_1) => {
4898
+ handleIsOpenChange(!1, !0), childProp?.props.onContextMenu?.(e_1);
4899
+ }, $[47] = childProp?.props, $[48] = handleIsOpenChange, $[49] = t15) : t15 = $[49];
4900
+ const handleContextMenu = t15;
4901
+ let t16;
4902
+ $[50] !== childProp?.props || $[51] !== handleIsOpenChange ? (t16 = (e_2) => {
4903
+ handleIsOpenChange(!0), childProp?.props?.onFocus?.(e_2);
4904
+ }, $[50] = childProp?.props, $[51] = handleIsOpenChange, $[52] = t16) : t16 = $[52];
4905
+ const handleFocus = t16;
4906
+ let t17;
4907
+ $[53] !== childProp?.props || $[54] !== handleIsOpenChange ? (t17 = (e_3) => {
4908
+ handleIsOpenChange(!0), childProp?.props?.onMouseEnter?.(e_3);
4909
+ }, $[53] = childProp?.props, $[54] = handleIsOpenChange, $[55] = t17) : t17 = $[55];
4910
+ const handleMouseEnter = t17;
4911
+ let t18;
4912
+ $[56] !== childProp?.props || $[57] !== handleIsOpenChange ? (t18 = (e_4) => {
4913
+ handleIsOpenChange(!1), childProp?.props?.onMouseLeave?.(e_4);
4914
+ }, $[56] = childProp?.props, $[57] = handleIsOpenChange, $[58] = t18) : t18 = $[58];
4915
+ const handleMouseLeave = t18;
4916
+ let t19;
4917
+ $[59] !== handleIsOpenChange || $[60] !== isInsideGroup || $[61] !== referenceElement || $[62] !== showTooltip ? (t19 = {
4101
4918
  handleIsOpenChange,
4102
4919
  referenceElement,
4103
4920
  showTooltip,
4104
4921
  isInsideGroup
4105
- }), react.useEffect(() => {
4922
+ }, $[59] = handleIsOpenChange, $[60] = isInsideGroup, $[61] = referenceElement, $[62] = showTooltip, $[63] = t19) : t19 = $[63], useCloseOnMouseLeave(t19);
4923
+ let t20, t21;
4924
+ $[64] !== disabled || $[65] !== handleIsOpenChange || $[66] !== showTooltip ? (t20 = () => {
4106
4925
  disabled && showTooltip && handleIsOpenChange(!1);
4107
- }, [disabled, handleIsOpenChange, showTooltip]), react.useEffect(() => {
4926
+ }, t21 = [disabled, handleIsOpenChange, showTooltip], $[64] = disabled, $[65] = handleIsOpenChange, $[66] = showTooltip, $[67] = t20, $[68] = t21) : (t20 = $[67], t21 = $[68]), react.useEffect(t20, t21);
4927
+ let t22, t23;
4928
+ $[69] !== content || $[70] !== handleIsOpenChange || $[71] !== showTooltip ? (t22 = () => {
4108
4929
  !content && showTooltip && handleIsOpenChange(!1);
4109
- }, [content, handleIsOpenChange, showTooltip]), react.useEffect(() => {
4110
- if (!showTooltip) return;
4111
- function handleWindowKeyDown(event) {
4930
+ }, t23 = [content, handleIsOpenChange, showTooltip], $[69] = content, $[70] = handleIsOpenChange, $[71] = showTooltip, $[72] = t22, $[73] = t23) : (t22 = $[72], t23 = $[73]), react.useEffect(t22, t23);
4931
+ let t24, t25;
4932
+ $[74] !== handleIsOpenChange || $[75] !== showTooltip ? (t24 = () => {
4933
+ if (!showTooltip)
4934
+ return;
4935
+ const handleWindowKeyDown = function(event) {
4112
4936
  event.key === "Escape" && handleIsOpenChange(!1, !0);
4113
- }
4937
+ };
4114
4938
  return window.addEventListener("keydown", handleWindowKeyDown), () => {
4115
4939
  window.removeEventListener("keydown", handleWindowKeyDown);
4116
4940
  };
4117
- }, [handleIsOpenChange, showTooltip]), react.useLayoutEffect(() => {
4941
+ }, t25 = [handleIsOpenChange, showTooltip], $[74] = handleIsOpenChange, $[75] = showTooltip, $[76] = t24, $[77] = t25) : (t24 = $[76], t25 = $[77]), react.useEffect(t24, t25);
4942
+ let t26;
4943
+ $[78] !== boundaryElement || $[79] !== portalElement?.offsetWidth ? (t26 = () => {
4118
4944
  const availableWidths = [...boundaryElement ? [boundaryElement.offsetWidth] : [], portalElement?.offsetWidth || document.body.offsetWidth];
4119
4945
  setTooltipMaxWidth(Math.min(...availableWidths) - DEFAULT_TOOLTIP_PADDING * 2);
4120
- }, [boundaryElement, portalElement]);
4121
- const setArrow = react.useCallback((arrowEl) => {
4946
+ }, $[78] = boundaryElement, $[79] = portalElement?.offsetWidth, $[80] = t26) : t26 = $[80];
4947
+ let t27;
4948
+ $[81] !== boundaryElement || $[82] !== portalElement ? (t27 = [boundaryElement, portalElement], $[81] = boundaryElement, $[82] = portalElement, $[83] = t27) : t27 = $[83], react.useLayoutEffect(t26, t27);
4949
+ let t28;
4950
+ $[84] !== update ? (t28 = (arrowEl) => {
4122
4951
  arrowRef.current = arrowEl, update();
4123
- }, [update]), setFloating = react.useCallback((node) => {
4952
+ }, $[84] = update, $[85] = t28) : t28 = $[85];
4953
+ const setArrow = t28;
4954
+ let t29;
4955
+ $[86] !== refs ? (t29 = (node) => {
4124
4956
  ref.current = node, refs.setFloating(node);
4125
- }, [refs]), child = react.useMemo(() => childProp ? react.cloneElement(childProp, {
4126
- onBlur: handleBlur,
4127
- onFocus: handleFocus,
4128
- onMouseEnter: handleMouseEnter,
4129
- onMouseLeave: handleMouseLeave,
4130
- onClick: handleClick,
4131
- onContextMenu: handleContextMenu,
4132
- ref: setReferenceElement
4133
- }) : null, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave]);
4134
- if (react.useImperativeHandle(childProp ? getElementRef(childProp) : null, () => referenceElement, [referenceElement]), !child) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
4135
- if (disabled) return child;
4136
- const tooltip = /* @__PURE__ */ jsxRuntime.jsx(StyledTooltip, { "data-ui": "Tooltip", ...restProps, ref: setFloating, style: {
4957
+ }, $[86] = refs, $[87] = t29) : t29 = $[87];
4958
+ const setFloating = t29;
4959
+ let t30;
4960
+ bb0: {
4961
+ if (!childProp) {
4962
+ t30 = null;
4963
+ break bb0;
4964
+ }
4965
+ let t312;
4966
+ $[88] !== childProp || $[89] !== handleBlur || $[90] !== handleClick || $[91] !== handleContextMenu || $[92] !== handleFocus || $[93] !== handleMouseEnter || $[94] !== handleMouseLeave ? (t312 = react.cloneElement(childProp, {
4967
+ onBlur: handleBlur,
4968
+ onFocus: handleFocus,
4969
+ onMouseEnter: handleMouseEnter,
4970
+ onMouseLeave: handleMouseLeave,
4971
+ onClick: handleClick,
4972
+ onContextMenu: handleContextMenu,
4973
+ ref: setReferenceElement
4974
+ }), $[88] = childProp, $[89] = handleBlur, $[90] = handleClick, $[91] = handleContextMenu, $[92] = handleFocus, $[93] = handleMouseEnter, $[94] = handleMouseLeave, $[95] = t312) : t312 = $[95], t30 = t312;
4975
+ }
4976
+ const child = t30;
4977
+ let t31;
4978
+ $[96] !== childProp ? (t31 = childProp ? getElementRef(childProp) : null, $[96] = childProp, $[97] = t31) : t31 = $[97];
4979
+ let t32, t33;
4980
+ if ($[98] !== referenceElement ? (t32 = () => referenceElement, t33 = [referenceElement], $[98] = referenceElement, $[99] = t32, $[100] = t33) : (t32 = $[99], t33 = $[100]), react.useImperativeHandle(t31, t32, t33), !child) {
4981
+ let t342;
4982
+ return $[101] === Symbol.for("react.memo_cache_sentinel") ? (t342 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[101] = t342) : t342 = $[101], t342;
4983
+ }
4984
+ if (disabled)
4985
+ return child;
4986
+ const t34 = tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0;
4987
+ let t35;
4988
+ $[102] !== floatingStyles || $[103] !== t34 ? (t35 = {
4137
4989
  ...floatingStyles,
4138
- maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
4139
- }, zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipCard, { ...restProps, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, children: content }) }), children = showTooltip && (portalProp ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: tooltip }) : tooltip);
4140
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4141
- animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
4990
+ maxWidth: t34
4991
+ }, $[102] = floatingStyles, $[103] = t34, $[104] = t35) : t35 = $[104];
4992
+ let t36;
4993
+ $[105] !== animate || $[106] !== arrowProp || $[107] !== arrowX || $[108] !== arrowY || $[109] !== content || $[110] !== originX || $[111] !== originY || $[112] !== padding || $[113] !== placement || $[114] !== radius || $[115] !== restProps || $[116] !== scheme || $[117] !== setArrow || $[118] !== setFloating || $[119] !== shadow ? (t36 = /* @__PURE__ */ jsxRuntime.jsx(TooltipCard, { ...restProps, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, children: content }), $[105] = animate, $[106] = arrowProp, $[107] = arrowX, $[108] = arrowY, $[109] = content, $[110] = originX, $[111] = originY, $[112] = padding, $[113] = placement, $[114] = radius, $[115] = restProps, $[116] = scheme, $[117] = setArrow, $[118] = setFloating, $[119] = shadow, $[120] = t36) : t36 = $[120];
4994
+ let t37;
4995
+ $[121] !== restProps || $[122] !== setFloating || $[123] !== t35 || $[124] !== t36 || $[125] !== zOffset ? (t37 = /* @__PURE__ */ jsxRuntime.jsx(StyledTooltip, { "data-ui": "Tooltip", ...restProps, ref: setFloating, style: t35, zOffset, children: t36 }), $[121] = restProps, $[122] = setFloating, $[123] = t35, $[124] = t36, $[125] = zOffset, $[126] = t37) : t37 = $[126];
4996
+ const tooltip = t37;
4997
+ let t38;
4998
+ $[127] !== portalProp || $[128] !== showTooltip || $[129] !== tooltip ? (t38 = showTooltip && (portalProp ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: tooltip }) : tooltip), $[127] = portalProp, $[128] = showTooltip, $[129] = tooltip, $[130] = t38) : t38 = $[130];
4999
+ const children = t38;
5000
+ let t39;
5001
+ $[131] !== animate || $[132] !== children ? (t39 = animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children, $[131] = animate, $[132] = children, $[133] = t39) : t39 = $[133];
5002
+ let t40;
5003
+ return $[134] !== child || $[135] !== t39 ? (t40 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5004
+ t39,
4142
5005
  child
4143
- ] });
5006
+ ] }), $[134] = child, $[135] = t39, $[136] = t40) : t40 = $[136], t40;
4144
5007
  });
4145
5008
  Tooltip.displayName = "ForwardRef(Tooltip)";
4146
- function useMiddleware({
4147
- animate,
4148
- arrowProp,
4149
- arrowRef,
4150
- boundaryElement,
4151
- fallbackPlacements,
4152
- rootBoundary
4153
- }) {
4154
- return react.useMemo(() => {
4155
- const ret = [];
4156
- return ret.push(reactDom$1.flip({
4157
- boundary: boundaryElement || void 0,
5009
+ function useMiddleware(t0) {
5010
+ const $ = reactCompilerRuntime.c(17), {
5011
+ animate,
5012
+ arrowProp,
5013
+ arrowRef,
5014
+ boundaryElement,
5015
+ fallbackPlacements,
5016
+ rootBoundary
5017
+ } = t0;
5018
+ let ret;
5019
+ if ($[0] !== animate || $[1] !== arrowProp || $[2] !== arrowRef || $[3] !== boundaryElement || $[4] !== fallbackPlacements || $[5] !== rootBoundary) {
5020
+ ret = [];
5021
+ const t1 = boundaryElement || void 0;
5022
+ let t2;
5023
+ $[7] !== fallbackPlacements || $[8] !== rootBoundary || $[9] !== t1 ? (t2 = reactDom$1.flip({
5024
+ boundary: t1,
4158
5025
  fallbackPlacements,
4159
5026
  padding: DEFAULT_TOOLTIP_PADDING,
4160
5027
  rootBoundary
4161
- })), ret.push(reactDom$1.offset({
5028
+ }), $[7] = fallbackPlacements, $[8] = rootBoundary, $[9] = t1, $[10] = t2) : t2 = $[10], ret.push(t2);
5029
+ let t3;
5030
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t3 = reactDom$1.offset({
4162
5031
  mainAxis: DEFAULT_TOOLTIP_DISTANCE
4163
- })), ret.push(reactDom$1.shift({
4164
- boundary: boundaryElement || void 0,
5032
+ }), $[11] = t3) : t3 = $[11], ret.push(t3);
5033
+ const t4 = boundaryElement || void 0;
5034
+ let t5;
5035
+ if ($[12] !== rootBoundary || $[13] !== t4 ? (t5 = reactDom$1.shift({
5036
+ boundary: t4,
4165
5037
  rootBoundary,
4166
5038
  padding: DEFAULT_TOOLTIP_PADDING
4167
- })), arrowProp && ret.push(reactDom$1.arrow({
4168
- element: arrowRef,
4169
- padding: DEFAULT_TOOLTIP_PADDING
4170
- })), animate && ret.push(origin), ret;
4171
- }, [animate, arrowProp, arrowRef, boundaryElement, fallbackPlacements, rootBoundary]);
4172
- }
4173
- function useCloseOnMouseLeave({
4174
- handleIsOpenChange,
4175
- referenceElement,
4176
- showTooltip,
4177
- isInsideGroup
4178
- }) {
4179
- const onMouseMove = useEffectEvent.useEffectEvent((target, teardown) => {
5039
+ }), $[12] = rootBoundary, $[13] = t4, $[14] = t5) : t5 = $[14], ret.push(t5), arrowProp) {
5040
+ let t6;
5041
+ $[15] !== arrowRef ? (t6 = reactDom$1.arrow({
5042
+ element: arrowRef,
5043
+ padding: DEFAULT_TOOLTIP_PADDING
5044
+ }), $[15] = arrowRef, $[16] = t6) : t6 = $[16], ret.push(t6);
5045
+ }
5046
+ animate && ret.push(origin), $[0] = animate, $[1] = arrowProp, $[2] = arrowRef, $[3] = boundaryElement, $[4] = fallbackPlacements, $[5] = rootBoundary, $[6] = ret;
5047
+ } else
5048
+ ret = $[6];
5049
+ return ret;
5050
+ }
5051
+ function useCloseOnMouseLeave(t0) {
5052
+ const $ = reactCompilerRuntime.c(10), {
5053
+ handleIsOpenChange,
5054
+ referenceElement,
5055
+ showTooltip,
5056
+ isInsideGroup
5057
+ } = t0;
5058
+ let t1;
5059
+ $[0] !== handleIsOpenChange || $[1] !== referenceElement ? (t1 = (target, teardown) => {
4180
5060
  referenceElement && (referenceElement === target || target instanceof Node && referenceElement.contains(target) || (handleIsOpenChange(!1), teardown()));
4181
- });
4182
- react.useEffect(() => {
4183
- if (!showTooltip || isInsideGroup) return;
5061
+ }, $[0] = handleIsOpenChange, $[1] = referenceElement, $[2] = t1) : t1 = $[2];
5062
+ const onMouseMove = useEffectEvent.useEffectEvent(t1);
5063
+ let t2;
5064
+ $[3] !== isInsideGroup || $[4] !== onMouseMove || $[5] !== showTooltip ? (t2 = () => {
5065
+ if (!showTooltip || isInsideGroup)
5066
+ return;
4184
5067
  const handleMouseMove = (event) => {
4185
5068
  onMouseMove(event.target, () => window.removeEventListener("mousemove", handleMouseMove));
4186
5069
  };
4187
5070
  return window.addEventListener("mousemove", handleMouseMove), () => window.removeEventListener("mousemove", handleMouseMove);
4188
- }, [isInsideGroup, showTooltip]);
5071
+ }, $[3] = isInsideGroup, $[4] = onMouseMove, $[5] = showTooltip, $[6] = t2) : t2 = $[6];
5072
+ let t3;
5073
+ $[7] !== isInsideGroup || $[8] !== showTooltip ? (t3 = [isInsideGroup, showTooltip], $[7] = isInsideGroup, $[8] = showTooltip, $[9] = t3) : t3 = $[9], react.useEffect(t2, t3);
4189
5074
  }
4190
5075
  const StyledHotkeys = styledComponents.styled.kbd.withConfig({
4191
5076
  displayName: "StyledHotkeys",
@@ -4194,15 +5079,34 @@ const StyledHotkeys = styledComponents.styled.kbd.withConfig({
4194
5079
  displayName: "Key",
4195
5080
  componentId: "sc-b37mge-1"
4196
5081
  })`&:not([hidden]){display:block;}`, Hotkeys = react.forwardRef(function(props, ref) {
4197
- const {
5082
+ const $ = reactCompilerRuntime.c(26);
5083
+ let fontSize2, keys, padding, radius, restProps, t0;
5084
+ $[0] !== props ? ({
4198
5085
  fontSize: fontSize2,
4199
5086
  keys,
4200
5087
  padding,
4201
5088
  radius,
4202
- space: spaceProp = 0.5,
5089
+ space: t0,
4203
5090
  ...restProps
4204
- } = props, space = _getArrayProp(spaceProp);
4205
- return !keys || keys.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}) : /* @__PURE__ */ jsxRuntime.jsx(StyledHotkeys, { "data-ui": "Hotkeys", ...restProps, ref, children: /* @__PURE__ */ jsxRuntime.jsx(Inline, { as: "span", space, children: keys.map((key2, i) => /* @__PURE__ */ jsxRuntime.jsx(Key, { fontSize: fontSize2, padding, radius, children: key2 }, i)) }) });
5091
+ } = props, $[0] = props, $[1] = fontSize2, $[2] = keys, $[3] = padding, $[4] = radius, $[5] = restProps, $[6] = t0) : (fontSize2 = $[1], keys = $[2], padding = $[3], radius = $[4], restProps = $[5], t0 = $[6]);
5092
+ const spaceProp = t0 === void 0 ? 0.5 : t0;
5093
+ let t1;
5094
+ $[7] !== spaceProp ? (t1 = _getArrayProp(spaceProp), $[7] = spaceProp, $[8] = t1) : t1 = $[8];
5095
+ const space = t1;
5096
+ if (!keys || keys.length === 0) {
5097
+ let t22;
5098
+ return $[9] === Symbol.for("react.memo_cache_sentinel") ? (t22 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[9] = t22) : t22 = $[9], t22;
5099
+ }
5100
+ let t2;
5101
+ if ($[10] !== fontSize2 || $[11] !== keys || $[12] !== padding || $[13] !== radius) {
5102
+ let t32;
5103
+ $[15] !== fontSize2 || $[16] !== padding || $[17] !== radius ? (t32 = (key2, i) => /* @__PURE__ */ jsxRuntime.jsx(Key, { fontSize: fontSize2, padding, radius, children: key2 }, i), $[15] = fontSize2, $[16] = padding, $[17] = radius, $[18] = t32) : t32 = $[18], t2 = keys.map(t32), $[10] = fontSize2, $[11] = keys, $[12] = padding, $[13] = radius, $[14] = t2;
5104
+ } else
5105
+ t2 = $[14];
5106
+ let t3;
5107
+ $[19] !== space || $[20] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Inline, { as: "span", space, children: t2 }), $[19] = space, $[20] = t2, $[21] = t3) : t3 = $[21];
5108
+ let t4;
5109
+ return $[22] !== ref || $[23] !== restProps || $[24] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(StyledHotkeys, { "data-ui": "Hotkeys", ...restProps, ref, children: t3 }), $[22] = ref, $[23] = restProps, $[24] = t3, $[25] = t4) : t4 = $[25], t4;
4206
5110
  });
4207
5111
  Hotkeys.displayName = "ForwardRef(Hotkeys)";
4208
5112
  const MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
@@ -4243,16 +5147,24 @@ function _sortElements(rootElement, elements) {
4243
5147
  elements.sort(_sort);
4244
5148
  }
4245
5149
  function useMenuController(props) {
4246
- const {
5150
+ const $ = reactCompilerRuntime.c(21), {
4247
5151
  onKeyDown,
4248
5152
  originElement,
4249
5153
  shouldFocus,
4250
5154
  rootElementRef
4251
- } = props, elementsRef = react.useRef([]), [activeIndex, _setActiveIndex] = react.useState(-1), activeIndexRef = react.useRef(activeIndex), [activeElement, setActiveElement] = react.useState(null), setActiveIndex = react.useCallback((nextActiveIndex) => {
5155
+ } = props;
5156
+ let t0;
5157
+ $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = [], $[0] = t0) : t0 = $[0];
5158
+ const elementsRef = react.useRef(t0), [activeIndex, _setActiveIndex] = react.useState(-1), activeIndexRef = react.useRef(activeIndex), [activeElement, setActiveElement] = react.useState(null);
5159
+ let t1;
5160
+ $[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = (nextActiveIndex) => {
4252
5161
  _setActiveIndex(nextActiveIndex), activeIndexRef.current = nextActiveIndex, setActiveElement(elementsRef.current[nextActiveIndex] || null);
4253
- }, []), mount = react.useCallback((element, selected) => {
4254
- if (!element) return () => {
4255
- };
5162
+ }, $[1] = t1) : t1 = $[1];
5163
+ const setActiveIndex = t1;
5164
+ let t2;
5165
+ $[2] !== rootElementRef ? (t2 = (element, selected) => {
5166
+ if (!element)
5167
+ return _temp$1;
4256
5168
  if (elementsRef.current.indexOf(element) === -1 && (elementsRef.current.push(element), _sortElements(rootElementRef.current, elementsRef.current)), selected) {
4257
5169
  const selectedIndex = elementsRef.current.indexOf(element);
4258
5170
  setActiveIndex(selectedIndex);
@@ -4261,7 +5173,10 @@ function useMenuController(props) {
4261
5173
  const idx = elementsRef.current.indexOf(element);
4262
5174
  idx > -1 && elementsRef.current.splice(idx, 1);
4263
5175
  };
4264
- }, [rootElementRef, setActiveIndex]), handleKeyDown = react.useCallback((event) => {
5176
+ }, $[2] = rootElementRef, $[3] = t2) : t2 = $[3];
5177
+ const mount = t2;
5178
+ let t3;
5179
+ $[4] !== onKeyDown || $[5] !== originElement ? (t3 = (event) => {
4265
5180
  if (event.key === "Tab") {
4266
5181
  originElement && originElement.focus();
4267
5182
  return;
@@ -4269,64 +5184,77 @@ function useMenuController(props) {
4269
5184
  if (event.key === "Home") {
4270
5185
  event.preventDefault(), event.stopPropagation();
4271
5186
  const el = _getFocusableElements(elementsRef.current)[0];
4272
- if (!el) return;
5187
+ if (!el)
5188
+ return;
4273
5189
  const currentIndex = elementsRef.current.indexOf(el);
4274
5190
  setActiveIndex(currentIndex);
4275
5191
  return;
4276
5192
  }
4277
5193
  if (event.key === "End") {
4278
5194
  event.preventDefault(), event.stopPropagation();
4279
- const focusableElements = _getFocusableElements(elementsRef.current), el = focusableElements[focusableElements.length - 1];
4280
- if (!el) return;
4281
- const currentIndex = elementsRef.current.indexOf(el);
4282
- setActiveIndex(currentIndex);
5195
+ const focusableElements_0 = _getFocusableElements(elementsRef.current), el_0 = focusableElements_0[focusableElements_0.length - 1];
5196
+ if (!el_0)
5197
+ return;
5198
+ const currentIndex_0 = elementsRef.current.indexOf(el_0);
5199
+ setActiveIndex(currentIndex_0);
4283
5200
  return;
4284
5201
  }
4285
5202
  if (event.key === "ArrowUp") {
4286
5203
  event.preventDefault(), event.stopPropagation();
4287
- const focusableElements = _getFocusableElements(elementsRef.current), focusableLen = focusableElements.length;
4288
- if (focusableLen === 0) return;
5204
+ const focusableElements_1 = _getFocusableElements(elementsRef.current), focusableLen = focusableElements_1.length;
5205
+ if (focusableLen === 0)
5206
+ return;
4289
5207
  const focusedElement = elementsRef.current[activeIndexRef.current];
4290
- let focusedIndex = focusableElements.indexOf(focusedElement);
5208
+ let focusedIndex = focusableElements_1.indexOf(focusedElement);
4291
5209
  focusedIndex = (focusedIndex - 1 + focusableLen) % focusableLen;
4292
- const el = focusableElements[focusedIndex], currentIndex = elementsRef.current.indexOf(el);
4293
- setActiveIndex(currentIndex);
5210
+ const el_1 = focusableElements_1[focusedIndex], currentIndex_1 = elementsRef.current.indexOf(el_1);
5211
+ setActiveIndex(currentIndex_1);
4294
5212
  return;
4295
5213
  }
4296
5214
  if (event.key === "ArrowDown") {
4297
5215
  event.preventDefault(), event.stopPropagation();
4298
- const focusableElements = _getFocusableElements(elementsRef.current), focusableLen = focusableElements.length;
4299
- if (focusableLen === 0) return;
4300
- const focusedElement = elementsRef.current[activeIndexRef.current];
4301
- let focusedIndex = focusableElements.indexOf(focusedElement);
4302
- focusedIndex = (focusedIndex + 1) % focusableLen;
4303
- const el = focusableElements[focusedIndex], currentIndex = elementsRef.current.indexOf(el);
4304
- setActiveIndex(currentIndex);
5216
+ const focusableElements_2 = _getFocusableElements(elementsRef.current), focusableLen_0 = focusableElements_2.length;
5217
+ if (focusableLen_0 === 0)
5218
+ return;
5219
+ const focusedElement_0 = elementsRef.current[activeIndexRef.current];
5220
+ let focusedIndex_0 = focusableElements_2.indexOf(focusedElement_0);
5221
+ focusedIndex_0 = (focusedIndex_0 + 1) % focusableLen_0;
5222
+ const el_2 = focusableElements_2[focusedIndex_0], currentIndex_2 = elementsRef.current.indexOf(el_2);
5223
+ setActiveIndex(currentIndex_2);
4305
5224
  return;
4306
5225
  }
4307
5226
  onKeyDown && onKeyDown(event);
4308
- }, [onKeyDown, originElement, setActiveIndex]), handleItemMouseEnter = react.useCallback((event) => {
4309
- const element = event.currentTarget, currentIndex = elementsRef.current.indexOf(element);
4310
- setActiveIndex(currentIndex);
4311
- }, [setActiveIndex]), handleItemMouseLeave = react.useCallback(() => {
5227
+ }, $[4] = onKeyDown, $[5] = originElement, $[6] = t3) : t3 = $[6];
5228
+ const handleKeyDown = t3;
5229
+ let t4;
5230
+ $[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = (event_0) => {
5231
+ const element_0 = event_0.currentTarget, currentIndex_3 = elementsRef.current.indexOf(element_0);
5232
+ setActiveIndex(currentIndex_3);
5233
+ }, $[7] = t4) : t4 = $[7];
5234
+ const handleItemMouseEnter = t4;
5235
+ let t5;
5236
+ $[8] !== rootElementRef ? (t5 = () => {
4312
5237
  setActiveIndex(-2), rootElementRef.current?.focus();
4313
- }, [rootElementRef, setActiveIndex]);
4314
- return react.useEffect(() => {
4315
- if (!rootElementRef.current) return;
5238
+ }, $[8] = rootElementRef, $[9] = t5) : t5 = $[9];
5239
+ const handleItemMouseLeave = t5;
5240
+ let t6, t7;
5241
+ $[10] !== activeIndex || $[11] !== rootElementRef || $[12] !== shouldFocus ? (t6 = () => {
5242
+ if (!rootElementRef.current)
5243
+ return;
4316
5244
  const rafId = requestAnimationFrame(() => {
4317
5245
  if (activeIndex === -1) {
4318
5246
  if (shouldFocus === "first") {
4319
- const el = _getFocusableElements(elementsRef.current)[0];
4320
- if (el) {
4321
- const currentIndex = elementsRef.current.indexOf(el);
4322
- setActiveIndex(currentIndex);
5247
+ const el_3 = _getFocusableElements(elementsRef.current)[0];
5248
+ if (el_3) {
5249
+ const currentIndex_4 = elementsRef.current.indexOf(el_3);
5250
+ setActiveIndex(currentIndex_4);
4323
5251
  }
4324
5252
  }
4325
5253
  if (shouldFocus === "last") {
4326
- const focusableElements = _getFocusableElements(elementsRef.current), el = focusableElements[focusableElements.length - 1];
4327
- if (el) {
4328
- const currentIndex = elementsRef.current.indexOf(el);
4329
- setActiveIndex(currentIndex);
5254
+ const focusableElements_4 = _getFocusableElements(elementsRef.current), el_4 = focusableElements_4[focusableElements_4.length - 1];
5255
+ if (el_4) {
5256
+ const currentIndex_5 = elementsRef.current.indexOf(el_4);
5257
+ setActiveIndex(currentIndex_5);
4330
5258
  }
4331
5259
  }
4332
5260
  return;
@@ -4334,61 +5262,83 @@ function useMenuController(props) {
4334
5262
  (elementsRef.current[activeIndex] || null)?.focus();
4335
5263
  });
4336
5264
  return () => cancelAnimationFrame(rafId);
4337
- }, [activeIndex, rootElementRef, setActiveIndex, shouldFocus]), {
5265
+ }, t7 = [activeIndex, rootElementRef, setActiveIndex, shouldFocus], $[10] = activeIndex, $[11] = rootElementRef, $[12] = shouldFocus, $[13] = t6, $[14] = t7) : (t6 = $[13], t7 = $[14]), react.useEffect(t6, t7);
5266
+ let t8;
5267
+ return $[15] !== activeElement || $[16] !== activeIndex || $[17] !== handleItemMouseLeave || $[18] !== handleKeyDown || $[19] !== mount ? (t8 = {
4338
5268
  activeElement,
4339
5269
  activeIndex,
4340
5270
  handleItemMouseEnter,
4341
5271
  handleItemMouseLeave,
4342
5272
  handleKeyDown,
4343
5273
  mount
4344
- };
5274
+ }, $[15] = activeElement, $[16] = activeIndex, $[17] = handleItemMouseLeave, $[18] = handleKeyDown, $[19] = mount, $[20] = t8) : t8 = $[20], t8;
5275
+ }
5276
+ function _temp$1() {
4345
5277
  }
4346
5278
  const StyledMenu = styledComponents.styled(Box).withConfig({
4347
5279
  displayName: "StyledMenu",
4348
5280
  componentId: "sc-xt0tnv-0"
4349
5281
  })`outline:none;overflow:auto;`, Menu = react.forwardRef(function(props, forwardedRef) {
5282
+ const $ = reactCompilerRuntime.c(49);
5283
+ let _shouldFocus, children, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1;
5284
+ if ($[0] !== props) {
5285
+ const {
5286
+ children: t22,
5287
+ focusFirst,
5288
+ focusLast,
5289
+ onClickOutside: t32,
5290
+ onEscape: t42,
5291
+ onItemClick: t52,
5292
+ onItemSelect: t62,
5293
+ onKeyDown: t72,
5294
+ originElement: t82,
5295
+ padding: t92,
5296
+ registerElement: t102,
5297
+ shouldFocus: t112,
5298
+ space: t122,
5299
+ ...t13
5300
+ } = props;
5301
+ children = t22, onClickOutside = t32, onEscape = t42, onItemClick = t52, onItemSelect = t62, onKeyDown = t72, originElement = t82, t0 = t92, registerElement = t102, _shouldFocus = t112, t1 = t122, restProps = t13, $[0] = props, $[1] = _shouldFocus, $[2] = children, $[3] = onClickOutside, $[4] = onEscape, $[5] = onItemClick, $[6] = onItemSelect, $[7] = onKeyDown, $[8] = originElement, $[9] = registerElement, $[10] = restProps, $[11] = t0, $[12] = t1;
5302
+ } else
5303
+ _shouldFocus = $[1], children = $[2], onClickOutside = $[3], onEscape = $[4], onItemClick = $[5], onItemSelect = $[6], onKeyDown = $[7], originElement = $[8], registerElement = $[9], restProps = $[10], t0 = $[11], t1 = $[12];
5304
+ const padding = t0 === void 0 ? 1 : t0, space = t1 === void 0 ? 1 : t1, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = react.useRef(null);
5305
+ let t2;
5306
+ $[13] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[13] = t2) : t2 = $[13], react.useImperativeHandle(forwardedRef, t2);
4350
5307
  const {
4351
- children,
4352
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4353
- focusFirst,
4354
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4355
- focusLast,
4356
- onClickOutside,
4357
- onEscape,
4358
- onItemClick,
4359
- onItemSelect,
5308
+ isTopLayer
5309
+ } = useLayer();
5310
+ let t3;
5311
+ $[14] !== onKeyDown || $[15] !== originElement || $[16] !== shouldFocus ? (t3 = {
4360
5312
  onKeyDown,
4361
5313
  originElement,
4362
- padding = 1,
4363
- registerElement,
4364
- shouldFocus: _shouldFocus,
4365
- space = 1,
4366
- ...restProps
4367
- } = props, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = react.useRef(null);
4368
- react.useImperativeHandle(forwardedRef, () => ref.current);
5314
+ shouldFocus,
5315
+ rootElementRef: ref
5316
+ }, $[14] = onKeyDown, $[15] = originElement, $[16] = shouldFocus, $[17] = t3) : t3 = $[17];
4369
5317
  const {
4370
- isTopLayer
4371
- } = useLayer(), {
4372
5318
  activeElement,
4373
5319
  activeIndex,
4374
5320
  handleItemMouseEnter,
4375
5321
  handleItemMouseLeave,
4376
5322
  handleKeyDown,
4377
5323
  mount
4378
- } = useMenuController({
4379
- onKeyDown,
4380
- originElement,
4381
- shouldFocus,
4382
- rootElementRef: ref
4383
- }), unregisterElementRef = react.useRef(null), handleRefChange = react.useCallback((el) => {
5324
+ } = useMenuController(t3), unregisterElementRef = react.useRef(null);
5325
+ let t4;
5326
+ $[18] !== registerElement ? (t4 = (el) => {
4384
5327
  unregisterElementRef.current && (unregisterElementRef.current(), unregisterElementRef.current = null), ref.current = el, ref.current && registerElement && (unregisterElementRef.current = registerElement(ref.current));
4385
- }, [registerElement]);
4386
- react.useEffect(() => {
5328
+ }, $[18] = registerElement, $[19] = t4) : t4 = $[19];
5329
+ const handleRefChange = t4;
5330
+ let t5, t6;
5331
+ $[20] !== activeIndex || $[21] !== onItemSelect ? (t5 = () => {
4387
5332
  onItemSelect && onItemSelect(activeIndex);
4388
- }, [activeIndex, onItemSelect]), useClickOutsideEvent(isTopLayer && onClickOutside, () => [ref.current]), useGlobalKeyDown(react.useCallback((event) => {
5333
+ }, t6 = [activeIndex, onItemSelect], $[20] = activeIndex, $[21] = onItemSelect, $[22] = t5, $[23] = t6) : (t5 = $[22], t6 = $[23]), react.useEffect(t5, t6);
5334
+ let t7;
5335
+ $[24] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => [ref.current], $[24] = t7) : t7 = $[24], useClickOutsideEvent(isTopLayer && onClickOutside, t7);
5336
+ let t8;
5337
+ $[25] !== isTopLayer || $[26] !== onEscape ? (t8 = (event) => {
4389
5338
  isTopLayer && event.key === "Escape" && (event.stopPropagation(), onEscape && onEscape());
4390
- }, [isTopLayer, onEscape]));
4391
- const value = react.useMemo(() => ({
5339
+ }, $[25] = isTopLayer, $[26] = onEscape, $[27] = t8) : t8 = $[27], useGlobalKeyDown(t8);
5340
+ let t9;
5341
+ $[28] !== activeElement || $[29] !== handleItemMouseEnter || $[30] !== handleItemMouseLeave || $[31] !== mount || $[32] !== onClickOutside || $[33] !== onEscape || $[34] !== onItemClick || $[35] !== registerElement ? (t9 = {
4392
5342
  version: 2,
4393
5343
  activeElement,
4394
5344
  mount,
@@ -4398,8 +5348,14 @@ const StyledMenu = styledComponents.styled(Box).withConfig({
4398
5348
  onItemMouseEnter: handleItemMouseEnter,
4399
5349
  onItemMouseLeave: handleItemMouseLeave,
4400
5350
  registerElement
4401
- }), [activeElement, mount, handleItemMouseEnter, handleItemMouseLeave, onClickOutside, onEscape, onItemClick, registerElement]);
4402
- return /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(StyledMenu, { "data-ui": "Menu", ...restProps, onKeyDown: handleKeyDown, padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: /* @__PURE__ */ jsxRuntime.jsx(Stack, { space, children }) }) });
5351
+ }, $[28] = activeElement, $[29] = handleItemMouseEnter, $[30] = handleItemMouseLeave, $[31] = mount, $[32] = onClickOutside, $[33] = onEscape, $[34] = onItemClick, $[35] = registerElement, $[36] = t9) : t9 = $[36];
5352
+ const value = t9;
5353
+ let t10;
5354
+ $[37] !== children || $[38] !== space ? (t10 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { space, children }), $[37] = children, $[38] = space, $[39] = t10) : t10 = $[39];
5355
+ let t11;
5356
+ $[40] !== handleKeyDown || $[41] !== handleRefChange || $[42] !== padding || $[43] !== restProps || $[44] !== t10 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(StyledMenu, { "data-ui": "Menu", ...restProps, onKeyDown: handleKeyDown, padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: t10 }), $[40] = handleKeyDown, $[41] = handleRefChange, $[42] = padding, $[43] = restProps, $[44] = t10, $[45] = t11) : t11 = $[45];
5357
+ let t12;
5358
+ return $[46] !== t11 || $[47] !== value ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children: t11 }), $[46] = t11, $[47] = value, $[48] = t12) : t12 = $[48], t12;
4403
5359
  });
4404
5360
  Menu.displayName = "ForwardRef(Menu)";
4405
5361
  const MenuDivider = styledComponents.styled.hr.withConfig({
@@ -4521,21 +5477,24 @@ function useMenu() {
4521
5477
  return value;
4522
5478
  }
4523
5479
  function MenuGroup(props) {
4524
- const {
4525
- as = "button",
5480
+ const $ = reactCompilerRuntime.c(81);
5481
+ let IconComponent, children, menuProps, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;
5482
+ $[0] !== props ? ({
5483
+ as: t0,
4526
5484
  children,
4527
- fontSize: fontSize2 = 1,
5485
+ fontSize: t1,
4528
5486
  icon: IconComponent,
4529
5487
  menu: menuProps,
4530
5488
  onClick,
4531
- padding = 3,
5489
+ padding: t2,
4532
5490
  popover,
4533
- radius = 2,
4534
- space = 3,
5491
+ radius: t3,
5492
+ space: t4,
4535
5493
  text,
4536
- tone = "default",
5494
+ tone: t5,
4537
5495
  ...restProps
4538
- } = props, menu = useMenu(), {
5496
+ } = props, $[0] = props, $[1] = IconComponent, $[2] = children, $[3] = menuProps, $[4] = onClick, $[5] = popover, $[6] = restProps, $[7] = t0, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5, $[13] = text) : (IconComponent = $[1], children = $[2], menuProps = $[3], onClick = $[4], popover = $[5], restProps = $[6], t0 = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12], text = $[13]);
5497
+ const as = t0 === void 0 ? "button" : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, menu = useMenu(), {
4539
5498
  scheme
4540
5499
  } = useRootTheme(), {
4541
5500
  activeElement,
@@ -4545,54 +5504,100 @@ function MenuGroup(props) {
4545
5504
  onItemClick,
4546
5505
  onItemMouseEnter: _onItemMouseEnter,
4547
5506
  registerElement
4548
- } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, [rootElement, setRootElement] = react.useState(null), [open, setOpen] = react.useState(!1), [shouldFocus, setShouldFocus] = react.useState(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = react.useState(!1), handleMouseEnter = react.useCallback((event) => {
5507
+ } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, [rootElement, setRootElement] = react.useState(null), [open, setOpen] = react.useState(!1), [shouldFocus, setShouldFocus] = react.useState(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = react.useState(!1);
5508
+ let t6;
5509
+ $[14] !== onItemMouseEnter ? (t6 = (event) => {
4549
5510
  setWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);
4550
- }, [onItemMouseEnter]), handleMenuKeyDown = react.useCallback((event) => {
4551
- event.key === "ArrowLeft" && (event.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {
5511
+ }, $[14] = onItemMouseEnter, $[15] = t6) : t6 = $[15];
5512
+ const handleMouseEnter = t6;
5513
+ let t7;
5514
+ $[16] !== rootElement ? (t7 = (event_0) => {
5515
+ event_0.key === "ArrowLeft" && (event_0.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {
4552
5516
  rootElement?.focus();
4553
5517
  }));
4554
- }, [rootElement]), handleClick = react.useCallback((event) => {
4555
- onClick?.(event), setShouldFocus("first"), setOpen(!0);
4556
- }, [onClick]), handleChildItemClick = react.useCallback(() => {
5518
+ }, $[16] = rootElement, $[17] = t7) : t7 = $[17];
5519
+ const handleMenuKeyDown = t7;
5520
+ let t8;
5521
+ $[18] !== onClick ? (t8 = (event_1) => {
5522
+ onClick?.(event_1), setShouldFocus("first"), setOpen(!0);
5523
+ }, $[18] = onClick, $[19] = t8) : t8 = $[19];
5524
+ const handleClick = t8;
5525
+ let t9;
5526
+ $[20] !== onItemClick ? (t9 = () => {
4557
5527
  setOpen(!1), onItemClick?.();
4558
- }, [onItemClick]), handleMenuMouseEnter = react.useCallback(() => setWithinMenu(!0), []);
4559
- react.useEffect(() => mount(rootElement), [mount, rootElement]), react.useEffect(() => {
5528
+ }, $[20] = onItemClick, $[21] = t9) : t9 = $[21];
5529
+ const handleChildItemClick = t9;
5530
+ let t10;
5531
+ $[22] === Symbol.for("react.memo_cache_sentinel") ? (t10 = () => setWithinMenu(!0), $[22] = t10) : t10 = $[22];
5532
+ const handleMenuMouseEnter = t10;
5533
+ let t11, t12;
5534
+ $[23] !== mount || $[24] !== rootElement ? (t11 = () => mount(rootElement), t12 = [mount, rootElement], $[23] = mount, $[24] = rootElement, $[25] = t11, $[26] = t12) : (t11 = $[25], t12 = $[26]), react.useEffect(t11, t12);
5535
+ let t13, t14;
5536
+ $[27] !== active ? (t13 = () => {
4560
5537
  active || setOpen(!1);
4561
- }, [active]), react.useEffect(() => {
5538
+ }, t14 = [active], $[27] = active, $[28] = t13, $[29] = t14) : (t13 = $[28], t14 = $[29]), react.useEffect(t13, t14);
5539
+ let t15, t16;
5540
+ $[30] !== open ? (t15 = () => {
4562
5541
  open || setWithinMenu(!1);
4563
- }, [open]), react.useEffect(() => {
4564
- if (!shouldFocus) return;
5542
+ }, t16 = [open], $[30] = open, $[31] = t15, $[32] = t16) : (t15 = $[31], t16 = $[32]), react.useEffect(t15, t16);
5543
+ let t17, t18;
5544
+ $[33] !== shouldFocus ? (t17 = () => {
5545
+ if (!shouldFocus)
5546
+ return;
4565
5547
  const rafId = requestAnimationFrame(() => setShouldFocus(null));
4566
5548
  return () => cancelAnimationFrame(rafId);
4567
- }, [shouldFocus]);
4568
- const childMenu = /* @__PURE__ */ jsxRuntime.jsx(Menu, { ...menuProps, onClickOutside, onEscape, onItemClick: handleChildItemClick, onKeyDown: handleMenuKeyDown, onMouseEnter: handleMenuMouseEnter, registerElement, shouldFocus, children }), handleKeyDown = react.useCallback((event) => {
4569
- const target = event.currentTarget;
4570
- if (document.activeElement === target && event.key === "ArrowRight") {
5549
+ }, t18 = [shouldFocus], $[33] = shouldFocus, $[34] = t17, $[35] = t18) : (t17 = $[34], t18 = $[35]), react.useEffect(t17, t18);
5550
+ let t19;
5551
+ $[36] !== children || $[37] !== handleChildItemClick || $[38] !== handleMenuKeyDown || $[39] !== menuProps || $[40] !== onClickOutside || $[41] !== onEscape || $[42] !== registerElement || $[43] !== shouldFocus ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(Menu, { ...menuProps, onClickOutside, onEscape, onItemClick: handleChildItemClick, onKeyDown: handleMenuKeyDown, onMouseEnter: handleMenuMouseEnter, registerElement, shouldFocus, children }), $[36] = children, $[37] = handleChildItemClick, $[38] = handleMenuKeyDown, $[39] = menuProps, $[40] = onClickOutside, $[41] = onEscape, $[42] = registerElement, $[43] = shouldFocus, $[44] = t19) : t19 = $[44];
5552
+ const childMenu = t19;
5553
+ let t20;
5554
+ $[45] === Symbol.for("react.memo_cache_sentinel") ? (t20 = (event_2) => {
5555
+ const target = event_2.currentTarget;
5556
+ if (document.activeElement === target && event_2.key === "ArrowRight") {
4571
5557
  setShouldFocus("first"), setOpen(!0), setWithinMenu(!0);
4572
5558
  return;
4573
5559
  }
4574
- }, []);
4575
- return /* @__PURE__ */ jsxRuntime.jsx(Popover, { ...popover, content: childMenu, "data-ui": "MenuGroup__popover", open, children: /* @__PURE__ */ jsxRuntime.jsx(Selectable, { "data-as": as, "data-ui": "MenuGroup", forwardedAs: as, ...restProps, "aria-pressed": as === "button" ? withinMenu : void 0, "data-pressed": as !== "button" ? withinMenu : void 0, "data-selected": !withinMenu && active ? "" : void 0, $radius: _getArrayProp(radius), $tone: tone, $scheme: scheme, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, ref: setRootElement, tabIndex: -1, type: as === "button" ? "button" : void 0, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: space, padding, children: [
4576
- IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
4577
- react.isValidElement(IconComponent) && IconComponent,
4578
- ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
4579
- ] }),
4580
- /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, textOverflow: "ellipsis", weight: "medium", children: text }) }),
4581
- /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronRightIcon, {}) })
4582
- ] }) }) });
5560
+ }, $[45] = t20) : t20 = $[45];
5561
+ const handleKeyDown = t20, t21 = as === "button" ? withinMenu : void 0, t22 = as !== "button" ? withinMenu : void 0, t23 = !withinMenu && active ? "" : void 0;
5562
+ let t24;
5563
+ $[46] !== radius ? (t24 = _getArrayProp(radius), $[46] = radius, $[47] = t24) : t24 = $[47];
5564
+ const t25 = as === "button" ? "button" : void 0;
5565
+ let t26;
5566
+ $[48] !== IconComponent || $[49] !== fontSize2 ? (t26 = IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
5567
+ react.isValidElement(IconComponent) && IconComponent,
5568
+ ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
5569
+ ] }), $[48] = IconComponent, $[49] = fontSize2, $[50] = t26) : t26 = $[50];
5570
+ let t27;
5571
+ $[51] !== fontSize2 || $[52] !== text ? (t27 = /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, textOverflow: "ellipsis", weight: "medium", children: text }) }), $[51] = fontSize2, $[52] = text, $[53] = t27) : t27 = $[53];
5572
+ let t28;
5573
+ $[54] === Symbol.for("react.memo_cache_sentinel") ? (t28 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronRightIcon, {}), $[54] = t28) : t28 = $[54];
5574
+ let t29;
5575
+ $[55] !== fontSize2 ? (t29 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children: t28 }), $[55] = fontSize2, $[56] = t29) : t29 = $[56];
5576
+ let t30;
5577
+ $[57] !== padding || $[58] !== space || $[59] !== t26 || $[60] !== t27 || $[61] !== t29 ? (t30 = /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: space, padding, children: [
5578
+ t26,
5579
+ t27,
5580
+ t29
5581
+ ] }), $[57] = padding, $[58] = space, $[59] = t26, $[60] = t27, $[61] = t29, $[62] = t30) : t30 = $[62];
5582
+ let t31;
5583
+ $[63] !== as || $[64] !== handleClick || $[65] !== handleMouseEnter || $[66] !== restProps || $[67] !== scheme || $[68] !== t21 || $[69] !== t22 || $[70] !== t23 || $[71] !== t24 || $[72] !== t25 || $[73] !== t30 || $[74] !== tone ? (t31 = /* @__PURE__ */ jsxRuntime.jsx(Selectable, { "data-as": as, "data-ui": "MenuGroup", forwardedAs: as, ...restProps, "aria-pressed": t21, "data-pressed": t22, "data-selected": t23, $radius: t24, $tone: tone, $scheme: scheme, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, ref: setRootElement, tabIndex: -1, type: t25, children: t30 }), $[63] = as, $[64] = handleClick, $[65] = handleMouseEnter, $[66] = restProps, $[67] = scheme, $[68] = t21, $[69] = t22, $[70] = t23, $[71] = t24, $[72] = t25, $[73] = t30, $[74] = tone, $[75] = t31) : t31 = $[75];
5584
+ let t32;
5585
+ return $[76] !== childMenu || $[77] !== open || $[78] !== popover || $[79] !== t31 ? (t32 = /* @__PURE__ */ jsxRuntime.jsx(Popover, { ...popover, content: childMenu, "data-ui": "MenuGroup__popover", open, children: t31 }), $[76] = childMenu, $[77] = open, $[78] = popover, $[79] = t31, $[80] = t32) : t32 = $[80], t32;
4583
5586
  }
4584
5587
  MenuGroup.displayName = "MenuGroup";
4585
5588
  const MenuItem = react.forwardRef(function(props, forwardedRef) {
4586
- const {
4587
- as = "button",
5589
+ const $ = reactCompilerRuntime.c(75);
5590
+ let IconComponent, IconRightComponent, children, disabled, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
5591
+ $[0] !== props ? ({
5592
+ as: t0,
4588
5593
  children,
4589
5594
  disabled,
4590
- fontSize: fontSize2 = 1,
5595
+ fontSize: t1,
4591
5596
  hotkeys,
4592
5597
  icon: IconComponent,
4593
5598
  iconRight: IconRightComponent,
4594
5599
  onClick,
4595
- padding = 3,
5600
+ padding: t2,
4596
5601
  paddingX,
4597
5602
  paddingY,
4598
5603
  paddingTop,
@@ -4600,13 +5605,14 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
4600
5605
  paddingBottom,
4601
5606
  paddingLeft,
4602
5607
  pressed,
4603
- radius = 2,
5608
+ radius: t3,
4604
5609
  selected: selectedProp,
4605
- space = 3,
5610
+ space: t4,
4606
5611
  text,
4607
- tone = "default",
5612
+ tone: t5,
4608
5613
  ...restProps
4609
- } = props, {
5614
+ } = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = hotkeys, $[6] = onClick, $[7] = paddingBottom, $[8] = paddingLeft, $[9] = paddingRight, $[10] = paddingTop, $[11] = paddingX, $[12] = paddingY, $[13] = pressed, $[14] = restProps, $[15] = selectedProp, $[16] = t0, $[17] = t1, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5, $[22] = text) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], hotkeys = $[5], onClick = $[6], paddingBottom = $[7], paddingLeft = $[8], paddingRight = $[9], paddingTop = $[10], paddingX = $[11], paddingY = $[12], pressed = $[13], restProps = $[14], selectedProp = $[15], t0 = $[16], t1 = $[17], t2 = $[18], t3 = $[19], t4 = $[20], t5 = $[21], text = $[22]);
5615
+ const as = t0 === void 0 ? "button" : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, {
4610
5616
  scheme
4611
5617
  } = useRootTheme(), menu = useMenu(), {
4612
5618
  activeElement,
@@ -4615,10 +5621,17 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
4615
5621
  onItemMouseEnter: _onItemMouseEnter,
4616
5622
  onItemMouseLeave: _onItemMouseLeave
4617
5623
  } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, onItemMouseLeave = _onItemMouseLeave ?? menu.onItemMouseLeave, [rootElement, setRootElement] = react.useState(null), active = !!activeElement && activeElement === rootElement, ref = react.useRef(null);
4618
- react.useImperativeHandle(forwardedRef, () => ref.current), react.useEffect(() => mount(rootElement, selectedProp), [mount, rootElement, selectedProp]);
4619
- const handleClick = react.useCallback((event) => {
5624
+ let t6;
5625
+ $[23] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[23] = t6) : t6 = $[23], react.useImperativeHandle(forwardedRef, t6);
5626
+ let t7, t8;
5627
+ $[24] !== mount || $[25] !== rootElement || $[26] !== selectedProp ? (t7 = () => mount(rootElement, selectedProp), t8 = [mount, rootElement, selectedProp], $[24] = mount, $[25] = rootElement, $[26] = selectedProp, $[27] = t7, $[28] = t8) : (t7 = $[27], t8 = $[28]), react.useEffect(t7, t8);
5628
+ let t9;
5629
+ $[29] !== disabled || $[30] !== onClick || $[31] !== onItemClick ? (t9 = (event) => {
4620
5630
  disabled || (onClick && onClick(event), onItemClick && onItemClick());
4621
- }, [disabled, onClick, onItemClick]), paddingProps = react.useMemo(() => ({
5631
+ }, $[29] = disabled, $[30] = onClick, $[31] = onItemClick, $[32] = t9) : t9 = $[32];
5632
+ const handleClick = t9;
5633
+ let t10;
5634
+ $[33] !== padding || $[34] !== paddingBottom || $[35] !== paddingLeft || $[36] !== paddingRight || $[37] !== paddingTop || $[38] !== paddingX || $[39] !== paddingY ? (t10 = {
4622
5635
  padding,
4623
5636
  paddingX,
4624
5637
  paddingY,
@@ -4626,71 +5639,119 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
4626
5639
  paddingRight,
4627
5640
  paddingBottom,
4628
5641
  paddingLeft
4629
- }), [padding, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft]), hotkeysFontSize = _getArrayProp(fontSize2).map((s) => s - 1), setRef = react.useCallback((el) => {
5642
+ }, $[33] = padding, $[34] = paddingBottom, $[35] = paddingLeft, $[36] = paddingRight, $[37] = paddingTop, $[38] = paddingX, $[39] = paddingY, $[40] = t10) : t10 = $[40];
5643
+ const paddingProps = t10;
5644
+ let t11;
5645
+ $[41] !== fontSize2 ? (t11 = _getArrayProp(fontSize2).map(_temp), $[41] = fontSize2, $[42] = t11) : t11 = $[42];
5646
+ const hotkeysFontSize = t11;
5647
+ let t12;
5648
+ $[43] === Symbol.for("react.memo_cache_sentinel") ? (t12 = (el) => {
4630
5649
  ref.current = el, setRootElement(el);
4631
- }, []);
4632
- return /* @__PURE__ */ jsxRuntime.jsxs(Selectable, { "data-ui": "MenuItem", role: "menuitem", ...restProps, "data-pressed": as !== "button" && pressed ? "" : void 0, "data-selected": active ? "" : void 0, "data-disabled": disabled ? "" : void 0, forwardedAs: as, $radius: _getArrayProp(radius), $padding: _getArrayProp(0), $tone: disabled ? "default" : tone, $scheme: scheme, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, tabIndex: -1, type: as === "button" ? "button" : void 0, children: [
4633
- (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", gap: space, align: "center", ...paddingProps, children: [
4634
- IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
4635
- react.isValidElement(IconComponent) && IconComponent,
4636
- ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
4637
- ] }),
4638
- text && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, textOverflow: "ellipsis", weight: "medium", children: text }) }),
4639
- hotkeys && /* @__PURE__ */ jsxRuntime.jsx(Hotkeys, { fontSize: hotkeysFontSize, keys: hotkeys, style: {
4640
- marginTop: -4,
4641
- marginBottom: -4
4642
- } }),
4643
- IconRightComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
4644
- react.isValidElement(IconRightComponent) && IconRightComponent,
4645
- ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
4646
- ] })
5650
+ }, $[43] = t12) : t12 = $[43];
5651
+ const setRef = t12, t13 = as !== "button" && pressed ? "" : void 0, t14 = active ? "" : void 0, t15 = disabled ? "" : void 0;
5652
+ let t16;
5653
+ $[44] !== radius ? (t16 = _getArrayProp(radius), $[44] = radius, $[45] = t16) : t16 = $[45];
5654
+ let t17;
5655
+ $[46] === Symbol.for("react.memo_cache_sentinel") ? (t17 = _getArrayProp(0), $[46] = t17) : t17 = $[46];
5656
+ const t18 = disabled ? "default" : tone, t19 = as === "button" ? "button" : void 0;
5657
+ let t20;
5658
+ $[47] !== IconComponent || $[48] !== IconRightComponent || $[49] !== fontSize2 || $[50] !== hotkeys || $[51] !== hotkeysFontSize || $[52] !== paddingProps || $[53] !== space || $[54] !== text ? (t20 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", gap: space, align: "center", ...paddingProps, children: [
5659
+ IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
5660
+ react.isValidElement(IconComponent) && IconComponent,
5661
+ ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
4647
5662
  ] }),
4648
- children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...paddingProps, children })
4649
- ] });
5663
+ text && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, textOverflow: "ellipsis", weight: "medium", children: text }) }),
5664
+ hotkeys && /* @__PURE__ */ jsxRuntime.jsx(Hotkeys, { fontSize: hotkeysFontSize, keys: hotkeys, style: {
5665
+ marginTop: -4,
5666
+ marginBottom: -4
5667
+ } }),
5668
+ IconRightComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
5669
+ react.isValidElement(IconRightComponent) && IconRightComponent,
5670
+ ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
5671
+ ] })
5672
+ ] }), $[47] = IconComponent, $[48] = IconRightComponent, $[49] = fontSize2, $[50] = hotkeys, $[51] = hotkeysFontSize, $[52] = paddingProps, $[53] = space, $[54] = text, $[55] = t20) : t20 = $[55];
5673
+ let t21;
5674
+ $[56] !== children || $[57] !== paddingProps ? (t21 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...paddingProps, children }), $[56] = children, $[57] = paddingProps, $[58] = t21) : t21 = $[58];
5675
+ let t22;
5676
+ return $[59] !== as || $[60] !== disabled || $[61] !== handleClick || $[62] !== onItemMouseEnter || $[63] !== onItemMouseLeave || $[64] !== restProps || $[65] !== scheme || $[66] !== t13 || $[67] !== t14 || $[68] !== t15 || $[69] !== t16 || $[70] !== t18 || $[71] !== t19 || $[72] !== t20 || $[73] !== t21 ? (t22 = /* @__PURE__ */ jsxRuntime.jsxs(Selectable, { "data-ui": "MenuItem", role: "menuitem", ...restProps, "data-pressed": t13, "data-selected": t14, "data-disabled": t15, forwardedAs: as, $radius: t16, $padding: t17, $tone: t18, $scheme: scheme, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, tabIndex: -1, type: t19, children: [
5677
+ t20,
5678
+ t21
5679
+ ] }), $[59] = as, $[60] = disabled, $[61] = handleClick, $[62] = onItemMouseEnter, $[63] = onItemMouseLeave, $[64] = restProps, $[65] = scheme, $[66] = t13, $[67] = t14, $[68] = t15, $[69] = t16, $[70] = t18, $[71] = t19, $[72] = t20, $[73] = t21, $[74] = t22) : t22 = $[74], t22;
4650
5680
  });
4651
5681
  MenuItem.displayName = "ForwardRef(MenuItem)";
5682
+ function _temp(s) {
5683
+ return s - 1;
5684
+ }
4652
5685
  const CustomButton = styledComponents.styled(Button).withConfig({
4653
5686
  displayName: "CustomButton",
4654
5687
  componentId: "sc-1kns779-0"
4655
5688
  })`max-width:100%;`, Tab = react.forwardRef(function(props, forwardedRef) {
4656
- const {
5689
+ const $ = reactCompilerRuntime.c(30);
5690
+ let focused, icon, id, label, onClick, onFocus, restProps, selected, t0, t1;
5691
+ $[0] !== props ? ({
4657
5692
  icon,
4658
5693
  id,
4659
5694
  focused,
4660
- fontSize: fontSize2 = 1,
5695
+ fontSize: t0,
4661
5696
  label,
4662
5697
  onClick,
4663
5698
  onFocus,
4664
- padding = 2,
5699
+ padding: t1,
4665
5700
  selected,
4666
5701
  ...restProps
4667
- } = props, ref = react.useRef(null), focusedRef = react.useRef(!1);
4668
- react.useImperativeHandle(forwardedRef, () => ref.current);
4669
- const handleBlur = react.useCallback(() => {
5702
+ } = props, $[0] = props, $[1] = focused, $[2] = icon, $[3] = id, $[4] = label, $[5] = onClick, $[6] = onFocus, $[7] = restProps, $[8] = selected, $[9] = t0, $[10] = t1) : (focused = $[1], icon = $[2], id = $[3], label = $[4], onClick = $[5], onFocus = $[6], restProps = $[7], selected = $[8], t0 = $[9], t1 = $[10]);
5703
+ const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 2 : t1, ref = react.useRef(null), focusedRef = react.useRef(!1);
5704
+ let t2;
5705
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], react.useImperativeHandle(forwardedRef, t2);
5706
+ let t3;
5707
+ $[12] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
4670
5708
  focusedRef.current = !1;
4671
- }, []), handleFocus = react.useCallback((event) => {
5709
+ }, $[12] = t3) : t3 = $[12];
5710
+ const handleBlur = t3;
5711
+ let t4;
5712
+ $[13] !== onFocus ? (t4 = (event) => {
4672
5713
  focusedRef.current = !0, onFocus && onFocus(event);
4673
- }, [onFocus]);
4674
- return react.useEffect(() => {
5714
+ }, $[13] = onFocus, $[14] = t4) : t4 = $[14];
5715
+ const handleFocus = t4;
5716
+ let t5, t6;
5717
+ $[15] !== focused ? (t5 = () => {
4675
5718
  focused && !focusedRef.current && (ref.current && ref.current.focus(), focusedRef.current = !0);
4676
- }, [focused]), /* @__PURE__ */ jsxRuntime.jsx(CustomButton, { "data-ui": "Tab", ...restProps, "aria-selected": selected ? "true" : "false", fontSize: fontSize2, icon, id, mode: "bleed", onClick, onBlur: handleBlur, onFocus: handleFocus, padding, ref, role: "tab", selected, tabIndex: selected ? 0 : -1, text: label, type: "button" });
5719
+ }, t6 = [focused], $[15] = focused, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), react.useEffect(t5, t6);
5720
+ const t7 = selected ? "true" : "false", t8 = selected ? 0 : -1;
5721
+ let t9;
5722
+ return $[18] !== fontSize2 || $[19] !== handleFocus || $[20] !== icon || $[21] !== id || $[22] !== label || $[23] !== onClick || $[24] !== padding || $[25] !== restProps || $[26] !== selected || $[27] !== t7 || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(CustomButton, { "data-ui": "Tab", ...restProps, "aria-selected": t7, fontSize: fontSize2, icon, id, mode: "bleed", onClick, onBlur: handleBlur, onFocus: handleFocus, padding, ref, role: "tab", selected, tabIndex: t8, text: label, type: "button" }), $[18] = fontSize2, $[19] = handleFocus, $[20] = icon, $[21] = id, $[22] = label, $[23] = onClick, $[24] = padding, $[25] = restProps, $[26] = selected, $[27] = t7, $[28] = t8, $[29] = t9) : t9 = $[29], t9;
4677
5723
  });
4678
5724
  Tab.displayName = "ForwardRef(Tab)";
4679
5725
  const CustomInline = styledComponents.styled(Inline).withConfig({
4680
5726
  displayName: "CustomInline",
4681
5727
  componentId: "sc-5cm04m-0"
4682
5728
  })`& > div{display:inline-block;vertical-align:middle;max-width:100%;box-sizing:border-box;}`, TabList = react.forwardRef(function(props, ref) {
4683
- const {
5729
+ const $ = reactCompilerRuntime.c(15);
5730
+ let childrenProp, restProps;
5731
+ $[0] !== props ? ({
4684
5732
  children: childrenProp,
4685
5733
  ...restProps
4686
- } = props, [focusedIndex, setFocusedIndex] = react.useState(-1), tabs = react.Children.toArray(childrenProp).filter(react.isValidElement).map((child, childIndex) => react.cloneElement(child, {
4687
- focused: focusedIndex === childIndex,
4688
- key: childIndex,
4689
- onFocus: () => setFocusedIndex(childIndex)
4690
- })), numTabs = tabs.length, handleKeyDown = react.useCallback((event) => {
4691
- event.key === "ArrowLeft" && setFocusedIndex((prevIndex) => (prevIndex + numTabs - 1) % numTabs), event.key === "ArrowRight" && setFocusedIndex((prevIndex) => (prevIndex + 1) % numTabs);
4692
- }, [numTabs]);
4693
- return /* @__PURE__ */ jsxRuntime.jsx(CustomInline, { "data-ui": "TabList", ...restProps, onKeyDown: handleKeyDown, ref, role: "tablist", children: tabs });
5734
+ } = props, $[0] = props, $[1] = childrenProp, $[2] = restProps) : (childrenProp = $[1], restProps = $[2]);
5735
+ const [focusedIndex, setFocusedIndex] = react.useState(-1);
5736
+ let t0;
5737
+ if ($[3] !== childrenProp || $[4] !== focusedIndex) {
5738
+ const children = react.Children.toArray(childrenProp).filter(react.isValidElement);
5739
+ let t12;
5740
+ $[6] !== focusedIndex ? (t12 = (child, childIndex) => react.cloneElement(child, {
5741
+ focused: focusedIndex === childIndex,
5742
+ key: childIndex,
5743
+ onFocus: () => setFocusedIndex(childIndex)
5744
+ }), $[6] = focusedIndex, $[7] = t12) : t12 = $[7], t0 = children.map(t12), $[3] = childrenProp, $[4] = focusedIndex, $[5] = t0;
5745
+ } else
5746
+ t0 = $[5];
5747
+ const tabs = t0, numTabs = tabs.length;
5748
+ let t1;
5749
+ $[8] !== numTabs ? (t1 = (event) => {
5750
+ event.key === "ArrowLeft" && setFocusedIndex((prevIndex) => (prevIndex + numTabs - 1) % numTabs), event.key === "ArrowRight" && setFocusedIndex((prevIndex_0) => (prevIndex_0 + 1) % numTabs);
5751
+ }, $[8] = numTabs, $[9] = t1) : t1 = $[9];
5752
+ const handleKeyDown = t1;
5753
+ let t2;
5754
+ return $[10] !== handleKeyDown || $[11] !== ref || $[12] !== restProps || $[13] !== tabs ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(CustomInline, { "data-ui": "TabList", ...restProps, onKeyDown: handleKeyDown, ref, role: "tablist", children: tabs }), $[10] = handleKeyDown, $[11] = ref, $[12] = restProps, $[13] = tabs, $[14] = t2) : t2 = $[14], t2;
4694
5755
  });
4695
5756
  TabList.displayName = "ForwardRef(TabList)";
4696
5757
  exports.Arrow = Arrow;