@1urso/generic-editor 0.1.67 → 0.1.69

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.
@@ -987,15 +987,15 @@ var DISMISSABLE_LAYER_NAME = "DismissableLayer", CONTEXT_UPDATE = "dismissableLa
987
987
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
988
988
  branches: /* @__PURE__ */ new Set()
989
989
  }), DismissableLayer = React$1.forwardRef((_, E) => {
990
- let { disableOutsidePointerEvents: O = !1, onEscapeKeyDown: A, onPointerDownOutside: j, onFocusOutside: M, onInteractOutside: N, onDismiss: P, ...z } = _, B = React$1.useContext(DismissableLayerContext), [H, U] = React$1.useState(null), W = H?.ownerDocument ?? globalThis?.document, [, G] = React$1.useState({}), Z = useComposedRefs$1(E, (n) => U(n)), KF = Array.from(B.layers), [qF] = [...B.layersWithOutsidePointerEventsDisabled].slice(-1), JF = KF.indexOf(qF), YF = H ? KF.indexOf(H) : -1, XF = B.layersWithOutsidePointerEventsDisabled.size > 0, ZF = YF >= JF, QF = usePointerDownOutside((n) => {
990
+ let { disableOutsidePointerEvents: O = !1, onEscapeKeyDown: A, onPointerDownOutside: j, onFocusOutside: M, onInteractOutside: N, onDismiss: P, ...z } = _, B = React$1.useContext(DismissableLayerContext), [H, U] = React$1.useState(null), W = H?.ownerDocument ?? globalThis?.document, [, G] = React$1.useState({}), Z = useComposedRefs$1(E, (n) => U(n)), qF = Array.from(B.layers), [JF] = [...B.layersWithOutsidePointerEventsDisabled].slice(-1), YF = qF.indexOf(JF), XF = H ? qF.indexOf(H) : -1, ZF = B.layersWithOutsidePointerEventsDisabled.size > 0, QF = XF >= YF, $F = usePointerDownOutside((n) => {
991
991
  let _ = n.target, E = [...B.branches].some((n) => n.contains(_));
992
- !ZF || E || (j?.(n), N?.(n), n.defaultPrevented || P?.());
993
- }, W), $F = useFocusOutside((n) => {
992
+ !QF || E || (j?.(n), N?.(n), n.defaultPrevented || P?.());
993
+ }, W), eI = useFocusOutside((n) => {
994
994
  let _ = n.target;
995
995
  [...B.branches].some((n) => n.contains(_)) || (M?.(n), N?.(n), n.defaultPrevented || P?.());
996
996
  }, W);
997
997
  return useEscapeKeydown((n) => {
998
- YF === B.layers.size - 1 && (A?.(n), !n.defaultPrevented && P && (n.preventDefault(), P()));
998
+ XF === B.layers.size - 1 && (A?.(n), !n.defaultPrevented && P && (n.preventDefault(), P()));
999
999
  }, W), React$1.useEffect(() => {
1000
1000
  if (H) return O && (B.layersWithOutsidePointerEventsDisabled.size === 0 && (originalBodyPointerEvents = W.body.style.pointerEvents, W.body.style.pointerEvents = "none"), B.layersWithOutsidePointerEventsDisabled.add(H)), B.layers.add(H), dispatchUpdate(), () => {
1001
1001
  O && B.layersWithOutsidePointerEventsDisabled.size === 1 && (W.body.style.pointerEvents = originalBodyPointerEvents);
@@ -1014,12 +1014,12 @@ var DISMISSABLE_LAYER_NAME = "DismissableLayer", CONTEXT_UPDATE = "dismissableLa
1014
1014
  ...z,
1015
1015
  ref: Z,
1016
1016
  style: {
1017
- pointerEvents: XF ? ZF ? "auto" : "none" : void 0,
1017
+ pointerEvents: ZF ? QF ? "auto" : "none" : void 0,
1018
1018
  ..._.style
1019
1019
  },
1020
- onFocusCapture: composeEventHandlers(_.onFocusCapture, $F.onFocusCapture),
1021
- onBlurCapture: composeEventHandlers(_.onBlurCapture, $F.onBlurCapture),
1022
- onPointerDownCapture: composeEventHandlers(_.onPointerDownCapture, QF.onPointerDownCapture)
1020
+ onFocusCapture: composeEventHandlers(_.onFocusCapture, eI.onFocusCapture),
1021
+ onBlurCapture: composeEventHandlers(_.onBlurCapture, eI.onBlurCapture),
1022
+ onPointerDownCapture: composeEventHandlers(_.onPointerDownCapture, $F.onPointerDownCapture)
1023
1023
  });
1024
1024
  });
1025
1025
  DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
@@ -1378,7 +1378,7 @@ var effectCar = createSidecarMedium(), nothing = function() {}, RemoveScroll = R
1378
1378
  onScrollCapture: nothing,
1379
1379
  onWheelCapture: nothing,
1380
1380
  onTouchMoveCapture: nothing
1381
- }), j = A[0], M = A[1], N = _.forwardProps, P = _.children, z = _.className, B = _.removeScrollBar, H = _.enabled, U = _.shards, W = _.sideCar, G = _.noRelative, Z = _.noIsolation, KF = _.inert, qF = _.allowPinchZoom, JF = _.as, YF = JF === void 0 ? "div" : JF, XF = _.gapMode, ZF = __rest(_, [
1381
+ }), j = A[0], M = A[1], N = _.forwardProps, P = _.children, z = _.className, B = _.removeScrollBar, H = _.enabled, U = _.shards, W = _.sideCar, G = _.noRelative, Z = _.noIsolation, qF = _.inert, JF = _.allowPinchZoom, YF = _.as, XF = YF === void 0 ? "div" : YF, ZF = _.gapMode, QF = __rest(_, [
1382
1382
  "forwardProps",
1383
1383
  "children",
1384
1384
  "className",
@@ -1392,21 +1392,21 @@ var effectCar = createSidecarMedium(), nothing = function() {}, RemoveScroll = R
1392
1392
  "allowPinchZoom",
1393
1393
  "as",
1394
1394
  "gapMode"
1395
- ]), QF = W, $F = useMergeRefs([O, E]), eI = __assign$2(__assign$2({}, ZF), j);
1396
- return React$1.createElement(React$1.Fragment, null, H && React$1.createElement(QF, {
1395
+ ]), $F = W, eI = useMergeRefs([O, E]), tI = __assign$2(__assign$2({}, QF), j);
1396
+ return React$1.createElement(React$1.Fragment, null, H && React$1.createElement($F, {
1397
1397
  sideCar: effectCar,
1398
1398
  removeScrollBar: B,
1399
1399
  shards: U,
1400
1400
  noRelative: G,
1401
1401
  noIsolation: Z,
1402
- inert: KF,
1402
+ inert: qF,
1403
1403
  setCallbacks: M,
1404
- allowPinchZoom: !!qF,
1404
+ allowPinchZoom: !!JF,
1405
1405
  lockRef: O,
1406
- gapMode: XF
1407
- }), N ? React$1.cloneElement(React$1.Children.only(P), __assign$2(__assign$2({}, eI), { ref: $F })) : React$1.createElement(YF, __assign$2({}, eI, {
1406
+ gapMode: ZF
1407
+ }), N ? React$1.cloneElement(React$1.Children.only(P), __assign$2(__assign$2({}, tI), { ref: eI })) : React$1.createElement(XF, __assign$2({}, tI, {
1408
1408
  className: z,
1409
- ref: $F
1409
+ ref: eI
1410
1410
  }), P));
1411
1411
  });
1412
1412
  RemoveScroll.defaultProps = {
@@ -1596,8 +1596,8 @@ var nonPassive = passiveSupported ? { passive: !1 } : !1, alwaysContainsScroll =
1596
1596
  if (!N) break;
1597
1597
  var W = getScrollVariables(n, N), G = W[0], Z = W[1] - W[2] - j * G;
1598
1598
  (G || Z) && elementCouldBeScrolled(n, N) && (H += Z, U += G);
1599
- var KF = N.parentNode;
1600
- N = KF && KF.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? KF.host : KF;
1599
+ var qF = N.parentNode;
1600
+ N = qF && qF.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? qF.host : qF;
1601
1601
  } while (!P && N !== document.body || P && (_.contains(N) || _ === N));
1602
1602
  return (B && (A && Math.abs(H) < 1 || !A && M > H) || !B && (A && Math.abs(U) < 1 || !A && -M > U)) && (z = !0), z;
1603
1603
  }, getTouchXY = function(n) {
@@ -2144,7 +2144,7 @@ var computePosition$1 = async (n, _, E) => {
2144
2144
  strategy: A
2145
2145
  }), { x: B, y: H } = computeCoordsFromPlacement(z, O, P), U = O, W = {}, G = 0;
2146
2146
  for (let E = 0; E < N.length; E++) {
2147
- let { name: j, fn: Z } = N[E], { x: KF, y: qF, data: JF, reset: YF } = await Z({
2147
+ let { name: j, fn: Z } = N[E], { x: qF, y: JF, data: YF, reset: XF } = await Z({
2148
2148
  x: B,
2149
2149
  y: H,
2150
2150
  initialPlacement: O,
@@ -2158,17 +2158,17 @@ var computePosition$1 = async (n, _, E) => {
2158
2158
  floating: _
2159
2159
  }
2160
2160
  });
2161
- B = KF ?? B, H = qF ?? H, W = {
2161
+ B = qF ?? B, H = JF ?? H, W = {
2162
2162
  ...W,
2163
2163
  [j]: {
2164
2164
  ...W[j],
2165
- ...JF
2165
+ ...YF
2166
2166
  }
2167
- }, YF && G <= 50 && (G++, typeof YF == "object" && (YF.placement && (U = YF.placement), YF.rects && (z = YF.rects === !0 ? await M.getElementRects({
2167
+ }, XF && G <= 50 && (G++, typeof XF == "object" && (XF.placement && (U = XF.placement), XF.rects && (z = XF.rects === !0 ? await M.getElementRects({
2168
2168
  reference: n,
2169
2169
  floating: _,
2170
2170
  strategy: A
2171
- }) : YF.rects), {x: B, y: H} = computeCoordsFromPlacement(z, U, P)), E = -1);
2171
+ }) : XF.rects), {x: B, y: H} = computeCoordsFromPlacement(z, U, P)), E = -1);
2172
2172
  }
2173
2173
  return {
2174
2174
  x: B,
@@ -2185,25 +2185,25 @@ async function detectOverflow$1(n, _) {
2185
2185
  boundary: P,
2186
2186
  rootBoundary: z,
2187
2187
  strategy: N
2188
- })), KF = B === "floating" ? {
2188
+ })), qF = B === "floating" ? {
2189
2189
  x: E,
2190
2190
  y: O,
2191
2191
  width: j.floating.width,
2192
2192
  height: j.floating.height
2193
- } : j.reference, qF = await (A.getOffsetParent == null ? void 0 : A.getOffsetParent(M.floating)), JF = await (A.isElement == null ? void 0 : A.isElement(qF)) && await (A.getScale == null ? void 0 : A.getScale(qF)) || {
2193
+ } : j.reference, JF = await (A.getOffsetParent == null ? void 0 : A.getOffsetParent(M.floating)), YF = await (A.isElement == null ? void 0 : A.isElement(JF)) && await (A.getScale == null ? void 0 : A.getScale(JF)) || {
2194
2194
  x: 1,
2195
2195
  y: 1
2196
- }, YF = rectToClientRect(A.convertOffsetParentRelativeRectToViewportRelativeRect ? await A.convertOffsetParentRelativeRectToViewportRelativeRect({
2196
+ }, XF = rectToClientRect(A.convertOffsetParentRelativeRectToViewportRelativeRect ? await A.convertOffsetParentRelativeRectToViewportRelativeRect({
2197
2197
  elements: M,
2198
- rect: KF,
2199
- offsetParent: qF,
2198
+ rect: qF,
2199
+ offsetParent: JF,
2200
2200
  strategy: N
2201
- }) : KF);
2201
+ }) : qF);
2202
2202
  return {
2203
- top: (Z.top - YF.top + W.top) / JF.y,
2204
- bottom: (YF.bottom - Z.bottom + W.bottom) / JF.y,
2205
- left: (Z.left - YF.left + W.left) / JF.x,
2206
- right: (YF.right - Z.right + W.right) / JF.x
2203
+ top: (Z.top - XF.top + W.top) / YF.y,
2204
+ bottom: (XF.bottom - Z.bottom + W.bottom) / YF.y,
2205
+ left: (Z.left - XF.left + W.left) / YF.x,
2206
+ right: (XF.right - Z.right + W.right) / YF.x
2207
2207
  };
2208
2208
  }
2209
2209
  var arrow$2 = (n) => ({
@@ -2215,17 +2215,17 @@ var arrow$2 = (n) => ({
2215
2215
  let H = getPaddingObject(B), U = {
2216
2216
  x: E,
2217
2217
  y: O
2218
- }, W = getAlignmentAxis(A), G = getAxisLength(W), Z = await M.getDimensions(z), KF = W === "y", qF = KF ? "top" : "left", JF = KF ? "bottom" : "right", YF = KF ? "clientHeight" : "clientWidth", XF = j.reference[G] + j.reference[W] - U[W] - j.floating[G], ZF = U[W] - j.reference[W], QF = await (M.getOffsetParent == null ? void 0 : M.getOffsetParent(z)), $F = QF ? QF[YF] : 0;
2219
- (!$F || !await (M.isElement == null ? void 0 : M.isElement(QF))) && ($F = N.floating[YF] || j.floating[G]);
2220
- let eI = XF / 2 - ZF / 2, tI = $F / 2 - Z[G] / 2 - 1, nI = min(H[qF], tI), rI = min(H[JF], tI), iI = nI, aI = $F - Z[G] - rI, oI = $F / 2 - Z[G] / 2 + eI, sI = clamp$3(iI, oI, aI), cI = !P.arrow && getAlignment(A) != null && oI !== sI && j.reference[G] / 2 - (oI < iI ? nI : rI) - Z[G] / 2 < 0, lI = cI ? oI < iI ? oI - iI : oI - aI : 0;
2218
+ }, W = getAlignmentAxis(A), G = getAxisLength(W), Z = await M.getDimensions(z), qF = W === "y", JF = qF ? "top" : "left", YF = qF ? "bottom" : "right", XF = qF ? "clientHeight" : "clientWidth", ZF = j.reference[G] + j.reference[W] - U[W] - j.floating[G], QF = U[W] - j.reference[W], $F = await (M.getOffsetParent == null ? void 0 : M.getOffsetParent(z)), eI = $F ? $F[XF] : 0;
2219
+ (!eI || !await (M.isElement == null ? void 0 : M.isElement($F))) && (eI = N.floating[XF] || j.floating[G]);
2220
+ let tI = ZF / 2 - QF / 2, nI = eI / 2 - Z[G] / 2 - 1, rI = min(H[JF], nI), iI = min(H[YF], nI), aI = rI, oI = eI - Z[G] - iI, sI = eI / 2 - Z[G] / 2 + tI, cI = clamp$3(aI, sI, oI), lI = !P.arrow && getAlignment(A) != null && sI !== cI && j.reference[G] / 2 - (sI < aI ? rI : iI) - Z[G] / 2 < 0, uI = lI ? sI < aI ? sI - aI : sI - oI : 0;
2221
2221
  return {
2222
- [W]: U[W] + lI,
2222
+ [W]: U[W] + uI,
2223
2223
  data: {
2224
- [W]: sI,
2225
- centerOffset: oI - sI - lI,
2226
- ...cI && { alignmentOffset: lI }
2224
+ [W]: cI,
2225
+ centerOffset: sI - cI - uI,
2226
+ ...lI && { alignmentOffset: uI }
2227
2227
  },
2228
- reset: cI
2228
+ reset: lI
2229
2229
  };
2230
2230
  }
2231
2231
  }), flip$2 = function(n) {
@@ -2236,32 +2236,32 @@ var arrow$2 = (n) => ({
2236
2236
  var E;
2237
2237
  let { placement: O, middlewareData: A, rects: j, initialPlacement: M, platform: N, elements: P } = _, { mainAxis: z = !0, crossAxis: B = !0, fallbackPlacements: H, fallbackStrategy: U = "bestFit", fallbackAxisSideDirection: W = "none", flipAlignment: G = !0, ...Z } = evaluate(n, _);
2238
2238
  if ((E = A.arrow) != null && E.alignmentOffset) return {};
2239
- let KF = getSide(O), qF = getSideAxis(M), JF = getSide(M) === M, YF = await (N.isRTL == null ? void 0 : N.isRTL(P.floating)), XF = H || (JF || !G ? [getOppositePlacement(M)] : getExpandedPlacements(M)), ZF = W !== "none";
2240
- !H && ZF && XF.push(...getOppositeAxisPlacements(M, G, W, YF));
2241
- let QF = [M, ...XF], $F = await detectOverflow$1(_, Z), eI = [], tI = A.flip?.overflows || [];
2242
- if (z && eI.push($F[KF]), B) {
2243
- let n = getAlignmentSides(O, j, YF);
2244
- eI.push($F[n[0]], $F[n[1]]);
2239
+ let qF = getSide(O), JF = getSideAxis(M), YF = getSide(M) === M, XF = await (N.isRTL == null ? void 0 : N.isRTL(P.floating)), ZF = H || (YF || !G ? [getOppositePlacement(M)] : getExpandedPlacements(M)), QF = W !== "none";
2240
+ !H && QF && ZF.push(...getOppositeAxisPlacements(M, G, W, XF));
2241
+ let $F = [M, ...ZF], eI = await detectOverflow$1(_, Z), tI = [], nI = A.flip?.overflows || [];
2242
+ if (z && tI.push(eI[qF]), B) {
2243
+ let n = getAlignmentSides(O, j, XF);
2244
+ tI.push(eI[n[0]], eI[n[1]]);
2245
2245
  }
2246
- if (tI = [...tI, {
2246
+ if (nI = [...nI, {
2247
2247
  placement: O,
2248
- overflows: eI
2249
- }], !eI.every((n) => n <= 0)) {
2250
- let n = (A.flip?.index || 0) + 1, _ = QF[n];
2251
- if (_ && (!(B === "alignment" && qF !== getSideAxis(_)) || tI.every((n) => getSideAxis(n.placement) === qF ? n.overflows[0] > 0 : !0))) return {
2248
+ overflows: tI
2249
+ }], !tI.every((n) => n <= 0)) {
2250
+ let n = (A.flip?.index || 0) + 1, _ = $F[n];
2251
+ if (_ && (!(B === "alignment" && JF !== getSideAxis(_)) || nI.every((n) => getSideAxis(n.placement) === JF ? n.overflows[0] > 0 : !0))) return {
2252
2252
  data: {
2253
2253
  index: n,
2254
- overflows: tI
2254
+ overflows: nI
2255
2255
  },
2256
2256
  reset: { placement: _ }
2257
2257
  };
2258
- let E = tI.filter((n) => n.overflows[0] <= 0).sort((n, _) => n.overflows[1] - _.overflows[1])[0]?.placement;
2258
+ let E = nI.filter((n) => n.overflows[0] <= 0).sort((n, _) => n.overflows[1] - _.overflows[1])[0]?.placement;
2259
2259
  if (!E) switch (U) {
2260
2260
  case "bestFit": {
2261
- let n = tI.filter((n) => {
2262
- if (ZF) {
2261
+ let n = nI.filter((n) => {
2262
+ if (QF) {
2263
2263
  let _ = getSideAxis(n.placement);
2264
- return _ === qF || _ === "y";
2264
+ return _ === JF || _ === "y";
2265
2265
  }
2266
2266
  return !0;
2267
2267
  }).map((n) => [n.placement, n.overflows.filter((n) => n > 0).reduce((n, _) => n + _, 0)]).sort((n, _) => n[1] - _[1])[0]?.[0];
@@ -2404,7 +2404,7 @@ var offset$2 = function(n) {
2404
2404
  let { x: E, y: O, placement: A, rects: j, middlewareData: M } = _, { offset: N = 0, mainAxis: P = !0, crossAxis: z = !0 } = evaluate(n, _), B = {
2405
2405
  x: E,
2406
2406
  y: O
2407
- }, H = getSideAxis(A), U = getOppositeAxis(H), W = B[U], G = B[H], Z = evaluate(N, _), KF = typeof Z == "number" ? {
2407
+ }, H = getSideAxis(A), U = getOppositeAxis(H), W = B[U], G = B[H], Z = evaluate(N, _), qF = typeof Z == "number" ? {
2408
2408
  mainAxis: Z,
2409
2409
  crossAxis: 0
2410
2410
  } : {
@@ -2413,11 +2413,11 @@ var offset$2 = function(n) {
2413
2413
  ...Z
2414
2414
  };
2415
2415
  if (P) {
2416
- let n = U === "y" ? "height" : "width", _ = j.reference[U] - j.floating[n] + KF.mainAxis, E = j.reference[U] + j.reference[n] - KF.mainAxis;
2416
+ let n = U === "y" ? "height" : "width", _ = j.reference[U] - j.floating[n] + qF.mainAxis, E = j.reference[U] + j.reference[n] - qF.mainAxis;
2417
2417
  W < _ ? W = _ : W > E && (W = E);
2418
2418
  }
2419
2419
  if (z) {
2420
- let n = U === "y" ? "width" : "height", _ = originSides.has(getSide(A)), E = j.reference[H] - j.floating[n] + (_ && M.offset?.[H] || 0) + (_ ? 0 : KF.crossAxis), O = j.reference[H] + j.reference[n] + (_ ? 0 : M.offset?.[H] || 0) - (_ ? KF.crossAxis : 0);
2420
+ let n = U === "y" ? "width" : "height", _ = originSides.has(getSide(A)), E = j.reference[H] - j.floating[n] + (_ && M.offset?.[H] || 0) + (_ ? 0 : qF.crossAxis), O = j.reference[H] + j.reference[n] + (_ ? 0 : M.offset?.[H] || 0) - (_ ? qF.crossAxis : 0);
2421
2421
  G < E ? G = E : G > O && (G = O);
2422
2422
  }
2423
2423
  return {
@@ -2432,20 +2432,20 @@ var offset$2 = function(n) {
2432
2432
  options: n,
2433
2433
  async fn(_) {
2434
2434
  var E, O;
2435
- let { placement: A, rects: j, platform: M, elements: N } = _, { apply: P = () => {}, ...z } = evaluate(n, _), B = await detectOverflow$1(_, z), H = getSide(A), U = getAlignment(A), W = getSideAxis(A) === "y", { width: G, height: Z } = j.floating, KF, qF;
2436
- H === "top" || H === "bottom" ? (KF = H, qF = U === (await (M.isRTL == null ? void 0 : M.isRTL(N.floating)) ? "start" : "end") ? "left" : "right") : (qF = H, KF = U === "end" ? "top" : "bottom");
2437
- let JF = Z - B.top - B.bottom, YF = G - B.left - B.right, XF = min(Z - B[KF], JF), ZF = min(G - B[qF], YF), QF = !_.middlewareData.shift, $F = XF, eI = ZF;
2438
- if ((E = _.middlewareData.shift) != null && E.enabled.x && (eI = YF), (O = _.middlewareData.shift) != null && O.enabled.y && ($F = JF), QF && !U) {
2435
+ let { placement: A, rects: j, platform: M, elements: N } = _, { apply: P = () => {}, ...z } = evaluate(n, _), B = await detectOverflow$1(_, z), H = getSide(A), U = getAlignment(A), W = getSideAxis(A) === "y", { width: G, height: Z } = j.floating, qF, JF;
2436
+ H === "top" || H === "bottom" ? (qF = H, JF = U === (await (M.isRTL == null ? void 0 : M.isRTL(N.floating)) ? "start" : "end") ? "left" : "right") : (JF = H, qF = U === "end" ? "top" : "bottom");
2437
+ let YF = Z - B.top - B.bottom, XF = G - B.left - B.right, ZF = min(Z - B[qF], YF), QF = min(G - B[JF], XF), $F = !_.middlewareData.shift, eI = ZF, tI = QF;
2438
+ if ((E = _.middlewareData.shift) != null && E.enabled.x && (tI = XF), (O = _.middlewareData.shift) != null && O.enabled.y && (eI = YF), $F && !U) {
2439
2439
  let n = max(B.left, 0), _ = max(B.right, 0), E = max(B.top, 0), O = max(B.bottom, 0);
2440
- W ? eI = G - 2 * (n !== 0 || _ !== 0 ? n + _ : max(B.left, B.right)) : $F = Z - 2 * (E !== 0 || O !== 0 ? E + O : max(B.top, B.bottom));
2440
+ W ? tI = G - 2 * (n !== 0 || _ !== 0 ? n + _ : max(B.left, B.right)) : eI = Z - 2 * (E !== 0 || O !== 0 ? E + O : max(B.top, B.bottom));
2441
2441
  }
2442
2442
  await P({
2443
2443
  ..._,
2444
- availableWidth: eI,
2445
- availableHeight: $F
2444
+ availableWidth: tI,
2445
+ availableHeight: eI
2446
2446
  });
2447
- let tI = await M.getDimensions(N.floating);
2448
- return G !== tI.width || Z !== tI.height ? { reset: { rects: !0 } } : {};
2447
+ let nI = await M.getDimensions(N.floating);
2448
+ return G !== nI.width || Z !== nI.height ? { reset: { rects: !0 } } : {};
2449
2449
  }
2450
2450
  };
2451
2451
  };
@@ -2829,27 +2829,27 @@ function observeMove(n, _) {
2829
2829
  N === void 0 && (N = !1), P === void 0 && (P = 1), j();
2830
2830
  let z = n.getBoundingClientRect(), { left: B, top: H, width: U, height: W } = z;
2831
2831
  if (N || _(), !U || !W) return;
2832
- let G = floor(H), Z = floor(A.clientWidth - (B + U)), KF = floor(A.clientHeight - (H + W)), qF = floor(B), JF = {
2833
- rootMargin: -G + "px " + -Z + "px " + -KF + "px " + -qF + "px",
2832
+ let G = floor(H), Z = floor(A.clientWidth - (B + U)), qF = floor(A.clientHeight - (H + W)), JF = floor(B), YF = {
2833
+ rootMargin: -G + "px " + -Z + "px " + -qF + "px " + -JF + "px",
2834
2834
  threshold: max(0, min(1, P)) || 1
2835
- }, YF = !0;
2836
- function XF(_) {
2835
+ }, XF = !0;
2836
+ function ZF(_) {
2837
2837
  let E = _[0].intersectionRatio;
2838
2838
  if (E !== P) {
2839
- if (!YF) return M();
2839
+ if (!XF) return M();
2840
2840
  E ? M(!1, E) : O = setTimeout(() => {
2841
2841
  M(!1, 1e-7);
2842
2842
  }, 1e3);
2843
2843
  }
2844
- E === 1 && !rectsAreEqual(z, n.getBoundingClientRect()) && M(), YF = !1;
2844
+ E === 1 && !rectsAreEqual(z, n.getBoundingClientRect()) && M(), XF = !1;
2845
2845
  }
2846
2846
  try {
2847
- E = new IntersectionObserver(XF, {
2848
- ...JF,
2847
+ E = new IntersectionObserver(ZF, {
2848
+ ...YF,
2849
2849
  root: A.ownerDocument
2850
2850
  });
2851
2851
  } catch {
2852
- E = new IntersectionObserver(XF, JF);
2852
+ E = new IntersectionObserver(ZF, YF);
2853
2853
  }
2854
2854
  E.observe(n);
2855
2855
  }
@@ -2870,10 +2870,10 @@ function autoUpdate(n, _, E, O) {
2870
2870
  })), E();
2871
2871
  }), z && !P && W.observe(z), W.observe(_));
2872
2872
  let G, Z = P ? getBoundingClientRect(n) : null;
2873
- P && KF();
2874
- function KF() {
2873
+ P && qF();
2874
+ function qF() {
2875
2875
  let _ = getBoundingClientRect(n);
2876
- Z && !rectsAreEqual(Z, _) && E(), Z = _, G = requestAnimationFrame(KF);
2876
+ Z && !rectsAreEqual(Z, _) && E(), Z = _, G = requestAnimationFrame(qF);
2877
2877
  }
2878
2878
  return E(), () => {
2879
2879
  var n;
@@ -2940,23 +2940,23 @@ function useFloating(_) {
2940
2940
  isPositioned: !1
2941
2941
  }), [W, G] = React$1.useState(A);
2942
2942
  deepEqual(W, A) || G(A);
2943
- let [Z, KF] = React$1.useState(null), [qF, JF] = React$1.useState(null), YF = React$1.useCallback((n) => {
2944
- n !== eI.current && (eI.current = n, KF(n));
2945
- }, []), XF = React$1.useCallback((n) => {
2946
- n !== tI.current && (tI.current = n, JF(n));
2947
- }, []), ZF = M || Z, QF = N || qF, eI = React$1.useRef(null), tI = React$1.useRef(null), nI = React$1.useRef(H), rI = z != null, iI = useLatestRef(z), aI = useLatestRef(j), oI = useLatestRef(B), sI = React$1.useCallback(() => {
2948
- if (!eI.current || !tI.current) return;
2943
+ let [Z, qF] = React$1.useState(null), [JF, YF] = React$1.useState(null), XF = React$1.useCallback((n) => {
2944
+ n !== tI.current && (tI.current = n, qF(n));
2945
+ }, []), ZF = React$1.useCallback((n) => {
2946
+ n !== nI.current && (nI.current = n, YF(n));
2947
+ }, []), QF = M || Z, $F = N || JF, tI = React$1.useRef(null), nI = React$1.useRef(null), rI = React$1.useRef(H), iI = z != null, aI = useLatestRef(z), oI = useLatestRef(j), sI = useLatestRef(B), cI = React$1.useCallback(() => {
2948
+ if (!tI.current || !nI.current) return;
2949
2949
  let n = {
2950
2950
  placement: E,
2951
2951
  strategy: O,
2952
2952
  middleware: W
2953
2953
  };
2954
- aI.current && (n.platform = aI.current), computePosition(eI.current, tI.current, n).then((n) => {
2954
+ oI.current && (n.platform = oI.current), computePosition(tI.current, nI.current, n).then((n) => {
2955
2955
  let _ = {
2956
2956
  ...n,
2957
- isPositioned: oI.current !== !1
2957
+ isPositioned: sI.current !== !1
2958
2958
  };
2959
- cI.current && !deepEqual(nI.current, _) && (nI.current = _, ReactDOM$1.flushSync(() => {
2959
+ lI.current && !deepEqual(rI.current, _) && (rI.current = _, ReactDOM$1.flushSync(() => {
2960
2960
  U(_);
2961
2961
  }));
2962
2962
  });
@@ -2964,50 +2964,50 @@ function useFloating(_) {
2964
2964
  W,
2965
2965
  E,
2966
2966
  O,
2967
- aI,
2968
- oI
2967
+ oI,
2968
+ sI
2969
2969
  ]);
2970
2970
  index(() => {
2971
- B === !1 && nI.current.isPositioned && (nI.current.isPositioned = !1, U((n) => ({
2971
+ B === !1 && rI.current.isPositioned && (rI.current.isPositioned = !1, U((n) => ({
2972
2972
  ...n,
2973
2973
  isPositioned: !1
2974
2974
  })));
2975
2975
  }, [B]);
2976
- let cI = React$1.useRef(!1);
2977
- index(() => (cI.current = !0, () => {
2978
- cI.current = !1;
2976
+ let lI = React$1.useRef(!1);
2977
+ index(() => (lI.current = !0, () => {
2978
+ lI.current = !1;
2979
2979
  }), []), index(() => {
2980
- if (ZF && (eI.current = ZF), QF && (tI.current = QF), ZF && QF) {
2981
- if (iI.current) return iI.current(ZF, QF, sI);
2982
- sI();
2980
+ if (QF && (tI.current = QF), $F && (nI.current = $F), QF && $F) {
2981
+ if (aI.current) return aI.current(QF, $F, cI);
2982
+ cI();
2983
2983
  }
2984
2984
  }, [
2985
- ZF,
2986
2985
  QF,
2987
- sI,
2988
- iI,
2989
- rI
2986
+ $F,
2987
+ cI,
2988
+ aI,
2989
+ iI
2990
2990
  ]);
2991
- let lI = React$1.useMemo(() => ({
2992
- reference: eI,
2993
- floating: tI,
2994
- setReference: YF,
2995
- setFloating: XF
2996
- }), [YF, XF]), uI = React$1.useMemo(() => ({
2997
- reference: ZF,
2998
- floating: QF
2999
- }), [ZF, QF]), dI = React$1.useMemo(() => {
2991
+ let uI = React$1.useMemo(() => ({
2992
+ reference: tI,
2993
+ floating: nI,
2994
+ setReference: XF,
2995
+ setFloating: ZF
2996
+ }), [XF, ZF]), dI = React$1.useMemo(() => ({
2997
+ reference: QF,
2998
+ floating: $F
2999
+ }), [QF, $F]), fI = React$1.useMemo(() => {
3000
3000
  let n = {
3001
3001
  position: O,
3002
3002
  left: 0,
3003
3003
  top: 0
3004
3004
  };
3005
- if (!uI.floating) return n;
3006
- let _ = roundByDPR(uI.floating, H.x), E = roundByDPR(uI.floating, H.y);
3005
+ if (!dI.floating) return n;
3006
+ let _ = roundByDPR(dI.floating, H.x), E = roundByDPR(dI.floating, H.y);
3007
3007
  return P ? {
3008
3008
  ...n,
3009
3009
  transform: "translate(" + _ + "px, " + E + "px)",
3010
- ...getDPR(uI.floating) >= 1.5 && { willChange: "transform" }
3010
+ ...getDPR(dI.floating) >= 1.5 && { willChange: "transform" }
3011
3011
  } : {
3012
3012
  position: O,
3013
3013
  left: _,
@@ -3016,22 +3016,22 @@ function useFloating(_) {
3016
3016
  }, [
3017
3017
  O,
3018
3018
  P,
3019
- uI.floating,
3019
+ dI.floating,
3020
3020
  H.x,
3021
3021
  H.y
3022
3022
  ]);
3023
3023
  return React$1.useMemo(() => ({
3024
3024
  ...H,
3025
- update: sI,
3026
- refs: lI,
3027
- elements: uI,
3028
- floatingStyles: dI
3025
+ update: cI,
3026
+ refs: uI,
3027
+ elements: dI,
3028
+ floatingStyles: fI
3029
3029
  }), [
3030
3030
  H,
3031
- sI,
3032
- lI,
3031
+ cI,
3033
3032
  uI,
3034
- dI
3033
+ dI,
3034
+ fI
3035
3035
  ]);
3036
3036
  }
3037
3037
  var arrow$1$1 = (n) => {
@@ -3108,70 +3108,70 @@ var ANCHOR_NAME$2 = "PopperAnchor", PopperAnchor = React$1.forwardRef((_, E) =>
3108
3108
  });
3109
3109
  PopperAnchor.displayName = ANCHOR_NAME$2;
3110
3110
  var CONTENT_NAME$6 = "PopperContent", [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$6), PopperContent = React$1.forwardRef((_, E) => {
3111
- let { __scopePopper: O, side: A = "bottom", sideOffset: j = 0, align: M = "center", alignOffset: N = 0, arrowPadding: P = 0, avoidCollisions: z = !0, collisionBoundary: B = [], collisionPadding: H = 0, sticky: U = "partial", hideWhenDetached: W = !1, updatePositionStrategy: G = "optimized", onPlaced: Z, ...KF } = _, qF = usePopperContext(CONTENT_NAME$6, O), [JF, YF] = React$1.useState(null), XF = useComposedRefs$1(E, (n) => YF(n)), [ZF, QF] = React$1.useState(null), $F = useSize(ZF), eI = $F?.width ?? 0, tI = $F?.height ?? 0, nI = A + (M === "center" ? "" : "-" + M), rI = typeof H == "number" ? H : {
3111
+ let { __scopePopper: O, side: A = "bottom", sideOffset: j = 0, align: M = "center", alignOffset: N = 0, arrowPadding: P = 0, avoidCollisions: z = !0, collisionBoundary: B = [], collisionPadding: H = 0, sticky: U = "partial", hideWhenDetached: W = !1, updatePositionStrategy: G = "optimized", onPlaced: Z, ...qF } = _, JF = usePopperContext(CONTENT_NAME$6, O), [YF, XF] = React$1.useState(null), ZF = useComposedRefs$1(E, (n) => XF(n)), [QF, $F] = React$1.useState(null), eI = useSize(QF), tI = eI?.width ?? 0, nI = eI?.height ?? 0, rI = A + (M === "center" ? "" : "-" + M), iI = typeof H == "number" ? H : {
3112
3112
  top: 0,
3113
3113
  right: 0,
3114
3114
  bottom: 0,
3115
3115
  left: 0,
3116
3116
  ...H
3117
- }, iI = Array.isArray(B) ? B : [B], oI = iI.length > 0, sI = {
3118
- padding: rI,
3119
- boundary: iI.filter(isNotNull$2),
3120
- altBoundary: oI
3121
- }, { refs: cI, floatingStyles: lI, placement: uI, isPositioned: dI, middlewareData: fI } = useFloating({
3117
+ }, aI = Array.isArray(B) ? B : [B], sI = aI.length > 0, cI = {
3118
+ padding: iI,
3119
+ boundary: aI.filter(isNotNull$2),
3120
+ altBoundary: sI
3121
+ }, { refs: lI, floatingStyles: uI, placement: dI, isPositioned: fI, middlewareData: pI } = useFloating({
3122
3122
  strategy: "fixed",
3123
- placement: nI,
3123
+ placement: rI,
3124
3124
  whileElementsMounted: (...n) => autoUpdate(...n, { animationFrame: G === "always" }),
3125
- elements: { reference: qF.anchor },
3125
+ elements: { reference: JF.anchor },
3126
3126
  middleware: [
3127
3127
  offset({
3128
- mainAxis: j + tI,
3128
+ mainAxis: j + nI,
3129
3129
  alignmentAxis: N
3130
3130
  }),
3131
3131
  z && shift({
3132
3132
  mainAxis: !0,
3133
3133
  crossAxis: !1,
3134
3134
  limiter: U === "partial" ? limitShift() : void 0,
3135
- ...sI
3135
+ ...cI
3136
3136
  }),
3137
- z && flip({ ...sI }),
3137
+ z && flip({ ...cI }),
3138
3138
  size({
3139
- ...sI,
3139
+ ...cI,
3140
3140
  apply: ({ elements: n, rects: _, availableWidth: E, availableHeight: O }) => {
3141
3141
  let { width: A, height: j } = _.reference, M = n.floating.style;
3142
3142
  M.setProperty("--radix-popper-available-width", `${E}px`), M.setProperty("--radix-popper-available-height", `${O}px`), M.setProperty("--radix-popper-anchor-width", `${A}px`), M.setProperty("--radix-popper-anchor-height", `${j}px`);
3143
3143
  }
3144
3144
  }),
3145
- ZF && arrow({
3146
- element: ZF,
3145
+ QF && arrow({
3146
+ element: QF,
3147
3147
  padding: P
3148
3148
  }),
3149
3149
  transformOrigin({
3150
- arrowWidth: eI,
3151
- arrowHeight: tI
3150
+ arrowWidth: tI,
3151
+ arrowHeight: nI
3152
3152
  }),
3153
3153
  W && hide({
3154
3154
  strategy: "referenceHidden",
3155
- ...sI
3155
+ ...cI
3156
3156
  })
3157
3157
  ]
3158
- }), [pI, mI] = getSideAndAlignFromPlacement(uI), hI = useCallbackRef(Z);
3158
+ }), [mI, hI] = getSideAndAlignFromPlacement(dI), gI = useCallbackRef(Z);
3159
3159
  useLayoutEffect2(() => {
3160
- dI && hI?.();
3161
- }, [dI, hI]);
3162
- let gI = fI.arrow?.x, _I = fI.arrow?.y, vI = fI.arrow?.centerOffset !== 0, [yI, bI] = React$1.useState();
3160
+ fI && gI?.();
3161
+ }, [fI, gI]);
3162
+ let _I = pI.arrow?.x, vI = pI.arrow?.y, yI = pI.arrow?.centerOffset !== 0, [bI, xI] = React$1.useState();
3163
3163
  return useLayoutEffect2(() => {
3164
- JF && bI(window.getComputedStyle(JF).zIndex);
3165
- }, [JF]), /* @__PURE__ */ jsx("div", {
3166
- ref: cI.setFloating,
3164
+ YF && xI(window.getComputedStyle(YF).zIndex);
3165
+ }, [YF]), /* @__PURE__ */ jsx("div", {
3166
+ ref: lI.setFloating,
3167
3167
  "data-radix-popper-content-wrapper": "",
3168
3168
  style: {
3169
- ...lI,
3170
- transform: dI ? lI.transform : "translate(0, -200%)",
3169
+ ...uI,
3170
+ transform: fI ? uI.transform : "translate(0, -200%)",
3171
3171
  minWidth: "max-content",
3172
- zIndex: yI,
3173
- "--radix-popper-transform-origin": [fI.transformOrigin?.x, fI.transformOrigin?.y].join(" "),
3174
- ...fI.hide?.referenceHidden && {
3172
+ zIndex: bI,
3173
+ "--radix-popper-transform-origin": [pI.transformOrigin?.x, pI.transformOrigin?.y].join(" "),
3174
+ ...pI.hide?.referenceHidden && {
3175
3175
  visibility: "hidden",
3176
3176
  pointerEvents: "none"
3177
3177
  }
@@ -3179,19 +3179,19 @@ var CONTENT_NAME$6 = "PopperContent", [PopperContentProvider, useContentContext]
3179
3179
  dir: _.dir,
3180
3180
  children: /* @__PURE__ */ jsx(PopperContentProvider, {
3181
3181
  scope: O,
3182
- placedSide: pI,
3183
- onArrowChange: QF,
3184
- arrowX: gI,
3185
- arrowY: _I,
3186
- shouldHideArrow: vI,
3182
+ placedSide: mI,
3183
+ onArrowChange: $F,
3184
+ arrowX: _I,
3185
+ arrowY: vI,
3186
+ shouldHideArrow: yI,
3187
3187
  children: /* @__PURE__ */ jsx(Primitive.div, {
3188
- "data-side": pI,
3189
- "data-align": mI,
3190
- ...KF,
3191
- ref: XF,
3188
+ "data-side": mI,
3189
+ "data-align": hI,
3190
+ ...qF,
3191
+ ref: ZF,
3192
3192
  style: {
3193
- ...KF.style,
3194
- animation: dI ? void 0 : "none"
3193
+ ...qF.style,
3194
+ animation: fI ? void 0 : "none"
3195
3195
  }
3196
3196
  })
3197
3197
  })
@@ -3274,27 +3274,27 @@ var Root2$4 = Popper, Anchor = PopperAnchor, Content$1 = PopperContent, Arrow =
3274
3274
  }));
3275
3275
  RovingFocusGroup.displayName = GROUP_NAME$3;
3276
3276
  var RovingFocusGroupImpl = React$1.forwardRef((_, E) => {
3277
- let { __scopeRovingFocusGroup: O, orientation: A, loop: j = !1, dir: M, currentTabStopId: N, defaultCurrentTabStopId: P, onCurrentTabStopIdChange: z, onEntryFocus: B, preventScrollOnEntryFocus: H = !1, ...U } = _, W = React$1.useRef(null), G = useComposedRefs$1(E, W), Z = useDirection(M), [KF, qF] = useControllableState({
3277
+ let { __scopeRovingFocusGroup: O, orientation: A, loop: j = !1, dir: M, currentTabStopId: N, defaultCurrentTabStopId: P, onCurrentTabStopIdChange: z, onEntryFocus: B, preventScrollOnEntryFocus: H = !1, ...U } = _, W = React$1.useRef(null), G = useComposedRefs$1(E, W), Z = useDirection(M), [qF, JF] = useControllableState({
3278
3278
  prop: N,
3279
3279
  defaultProp: P ?? null,
3280
3280
  onChange: z,
3281
3281
  caller: GROUP_NAME$3
3282
- }), [JF, YF] = React$1.useState(!1), XF = useCallbackRef(B), ZF = useCollection$1(O), QF = React$1.useRef(!1), [$F, eI] = React$1.useState(0);
3282
+ }), [YF, XF] = React$1.useState(!1), ZF = useCallbackRef(B), QF = useCollection$1(O), $F = React$1.useRef(!1), [eI, tI] = React$1.useState(0);
3283
3283
  return React$1.useEffect(() => {
3284
3284
  let n = W.current;
3285
- if (n) return n.addEventListener(ENTRY_FOCUS, XF), () => n.removeEventListener(ENTRY_FOCUS, XF);
3286
- }, [XF]), /* @__PURE__ */ jsx(RovingFocusProvider, {
3285
+ if (n) return n.addEventListener(ENTRY_FOCUS, ZF), () => n.removeEventListener(ENTRY_FOCUS, ZF);
3286
+ }, [ZF]), /* @__PURE__ */ jsx(RovingFocusProvider, {
3287
3287
  scope: O,
3288
3288
  orientation: A,
3289
3289
  dir: Z,
3290
3290
  loop: j,
3291
- currentTabStopId: KF,
3292
- onItemFocus: React$1.useCallback((n) => qF(n), [qF]),
3293
- onItemShiftTab: React$1.useCallback(() => YF(!0), []),
3294
- onFocusableItemAdd: React$1.useCallback(() => eI((n) => n + 1), []),
3295
- onFocusableItemRemove: React$1.useCallback(() => eI((n) => n - 1), []),
3291
+ currentTabStopId: qF,
3292
+ onItemFocus: React$1.useCallback((n) => JF(n), [JF]),
3293
+ onItemShiftTab: React$1.useCallback(() => XF(!0), []),
3294
+ onFocusableItemAdd: React$1.useCallback(() => tI((n) => n + 1), []),
3295
+ onFocusableItemRemove: React$1.useCallback(() => tI((n) => n - 1), []),
3296
3296
  children: /* @__PURE__ */ jsx(Primitive.div, {
3297
- tabIndex: JF || $F === 0 ? -1 : 0,
3297
+ tabIndex: YF || eI === 0 ? -1 : 0,
3298
3298
  "data-orientation": A,
3299
3299
  ...U,
3300
3300
  ref: G,
@@ -3303,28 +3303,28 @@ var RovingFocusGroupImpl = React$1.forwardRef((_, E) => {
3303
3303
  ..._.style
3304
3304
  },
3305
3305
  onMouseDown: composeEventHandlers(_.onMouseDown, () => {
3306
- QF.current = !0;
3306
+ $F.current = !0;
3307
3307
  }),
3308
3308
  onFocus: composeEventHandlers(_.onFocus, (n) => {
3309
- let _ = !QF.current;
3310
- if (n.target === n.currentTarget && _ && !JF) {
3309
+ let _ = !$F.current;
3310
+ if (n.target === n.currentTarget && _ && !YF) {
3311
3311
  let _ = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
3312
3312
  if (n.currentTarget.dispatchEvent(_), !_.defaultPrevented) {
3313
- let n = ZF().filter((n) => n.focusable);
3313
+ let n = QF().filter((n) => n.focusable);
3314
3314
  focusFirst$1([
3315
3315
  n.find((n) => n.active),
3316
- n.find((n) => n.id === KF),
3316
+ n.find((n) => n.id === qF),
3317
3317
  ...n
3318
3318
  ].filter(Boolean).map((n) => n.ref.current), H);
3319
3319
  }
3320
3320
  }
3321
- QF.current = !1;
3321
+ $F.current = !1;
3322
3322
  }),
3323
- onBlur: composeEventHandlers(_.onBlur, () => YF(!1))
3323
+ onBlur: composeEventHandlers(_.onBlur, () => XF(!1))
3324
3324
  })
3325
3325
  });
3326
3326
  }), ITEM_NAME$3 = "RovingFocusGroupItem", RovingFocusGroupItem = React$1.forwardRef((_, E) => {
3327
- let { __scopeRovingFocusGroup: O, focusable: A = !0, active: j = !1, tabStopId: M, children: N, ...P } = _, z = useId$1(), B = M || z, H = useRovingFocusContext(ITEM_NAME$3, O), U = H.currentTabStopId === B, W = useCollection$1(O), { onFocusableItemAdd: G, onFocusableItemRemove: Z, currentTabStopId: KF } = H;
3327
+ let { __scopeRovingFocusGroup: O, focusable: A = !0, active: j = !1, tabStopId: M, children: N, ...P } = _, z = useId$1(), B = M || z, H = useRovingFocusContext(ITEM_NAME$3, O), U = H.currentTabStopId === B, W = useCollection$1(O), { onFocusableItemAdd: G, onFocusableItemRemove: Z, currentTabStopId: qF } = H;
3328
3328
  return React$1.useEffect(() => {
3329
3329
  if (A) return G(), () => Z();
3330
3330
  }, [
@@ -3367,7 +3367,7 @@ var RovingFocusGroupImpl = React$1.forwardRef((_, E) => {
3367
3367
  }),
3368
3368
  children: typeof N == "function" ? N({
3369
3369
  isCurrentTabStop: U,
3370
- hasTabStop: KF != null
3370
+ hasTabStop: qF != null
3371
3371
  }) : N
3372
3372
  })
3373
3373
  });
@@ -3518,40 +3518,40 @@ var CONTENT_NAME$5 = "MenuContent", [MenuContentProvider, useMenuContentContext]
3518
3518
  onDismiss: () => E.onOpenChange(!1)
3519
3519
  });
3520
3520
  }), Slot$1 = /* @__PURE__ */ createSlot("MenuContent.ScrollLock"), MenuContentImpl = React$1.forwardRef((_, E) => {
3521
- let { __scopeMenu: O, loop: A = !1, trapFocus: j, onOpenAutoFocus: M, onCloseAutoFocus: N, disableOutsidePointerEvents: P, onEntryFocus: z, onEscapeKeyDown: B, onPointerDownOutside: H, onFocusOutside: U, onInteractOutside: W, onDismiss: G, disableOutsideScroll: Z, ...KF } = _, qF = useMenuContext(CONTENT_NAME$5, O), JF = useMenuRootContext(CONTENT_NAME$5, O), YF = usePopperScope$2(O), XF = useRovingFocusGroupScope$1(O), ZF = useCollection(O), [QF, $F] = React$1.useState(null), eI = React$1.useRef(null), tI = useComposedRefs$1(E, eI, qF.onContentChange), nI = React$1.useRef(0), rI = React$1.useRef(""), iI = React$1.useRef(0), oI = React$1.useRef(null), sI = React$1.useRef("right"), cI = React$1.useRef(0), lI = Z ? Combination_default : React$1.Fragment, uI = Z ? {
3521
+ let { __scopeMenu: O, loop: A = !1, trapFocus: j, onOpenAutoFocus: M, onCloseAutoFocus: N, disableOutsidePointerEvents: P, onEntryFocus: z, onEscapeKeyDown: B, onPointerDownOutside: H, onFocusOutside: U, onInteractOutside: W, onDismiss: G, disableOutsideScroll: Z, ...qF } = _, JF = useMenuContext(CONTENT_NAME$5, O), YF = useMenuRootContext(CONTENT_NAME$5, O), XF = usePopperScope$2(O), ZF = useRovingFocusGroupScope$1(O), QF = useCollection(O), [$F, eI] = React$1.useState(null), tI = React$1.useRef(null), nI = useComposedRefs$1(E, tI, JF.onContentChange), rI = React$1.useRef(0), iI = React$1.useRef(""), aI = React$1.useRef(0), sI = React$1.useRef(null), cI = React$1.useRef("right"), lI = React$1.useRef(0), uI = Z ? Combination_default : React$1.Fragment, dI = Z ? {
3522
3522
  as: Slot$1,
3523
3523
  allowPinchZoom: !0
3524
- } : void 0, dI = (n) => {
3525
- let _ = rI.current + n, E = ZF().filter((n) => !n.disabled), O = document.activeElement, A = E.find((n) => n.ref.current === O)?.textValue, j = getNextMatch(E.map((n) => n.textValue), _, A), M = E.find((n) => n.textValue === j)?.ref.current;
3524
+ } : void 0, fI = (n) => {
3525
+ let _ = iI.current + n, E = QF().filter((n) => !n.disabled), O = document.activeElement, A = E.find((n) => n.ref.current === O)?.textValue, j = getNextMatch(E.map((n) => n.textValue), _, A), M = E.find((n) => n.textValue === j)?.ref.current;
3526
3526
  (function n(_) {
3527
- rI.current = _, window.clearTimeout(nI.current), _ !== "" && (nI.current = window.setTimeout(() => n(""), 1e3));
3527
+ iI.current = _, window.clearTimeout(rI.current), _ !== "" && (rI.current = window.setTimeout(() => n(""), 1e3));
3528
3528
  })(_), M && setTimeout(() => M.focus());
3529
3529
  };
3530
- React$1.useEffect(() => () => window.clearTimeout(nI.current), []), useFocusGuards();
3531
- let fI = React$1.useCallback((n) => sI.current === oI.current?.side && isPointerInGraceArea(n, oI.current?.area), []);
3530
+ React$1.useEffect(() => () => window.clearTimeout(rI.current), []), useFocusGuards();
3531
+ let pI = React$1.useCallback((n) => cI.current === sI.current?.side && isPointerInGraceArea(n, sI.current?.area), []);
3532
3532
  return /* @__PURE__ */ jsx(MenuContentProvider, {
3533
3533
  scope: O,
3534
- searchRef: rI,
3534
+ searchRef: iI,
3535
3535
  onItemEnter: React$1.useCallback((n) => {
3536
- fI(n) && n.preventDefault();
3537
- }, [fI]),
3536
+ pI(n) && n.preventDefault();
3537
+ }, [pI]),
3538
3538
  onItemLeave: React$1.useCallback((n) => {
3539
- fI(n) || (eI.current?.focus(), $F(null));
3540
- }, [fI]),
3539
+ pI(n) || (tI.current?.focus(), eI(null));
3540
+ }, [pI]),
3541
3541
  onTriggerLeave: React$1.useCallback((n) => {
3542
- fI(n) && n.preventDefault();
3543
- }, [fI]),
3544
- pointerGraceTimerRef: iI,
3542
+ pI(n) && n.preventDefault();
3543
+ }, [pI]),
3544
+ pointerGraceTimerRef: aI,
3545
3545
  onPointerGraceIntentChange: React$1.useCallback((n) => {
3546
- oI.current = n;
3546
+ sI.current = n;
3547
3547
  }, []),
3548
- children: /* @__PURE__ */ jsx(lI, {
3549
- ...uI,
3548
+ children: /* @__PURE__ */ jsx(uI, {
3549
+ ...dI,
3550
3550
  children: /* @__PURE__ */ jsx(FocusScope, {
3551
3551
  asChild: !0,
3552
3552
  trapped: j,
3553
3553
  onMountAutoFocus: composeEventHandlers(M, (n) => {
3554
- n.preventDefault(), eI.current?.focus({ preventScroll: !0 });
3554
+ n.preventDefault(), tI.current?.focus({ preventScroll: !0 });
3555
3555
  }),
3556
3556
  onUnmountAutoFocus: N,
3557
3557
  children: /* @__PURE__ */ jsx(DismissableLayer, {
@@ -3564,44 +3564,44 @@ var CONTENT_NAME$5 = "MenuContent", [MenuContentProvider, useMenuContentContext]
3564
3564
  onDismiss: G,
3565
3565
  children: /* @__PURE__ */ jsx(Root$2, {
3566
3566
  asChild: !0,
3567
- ...XF,
3568
- dir: JF.dir,
3567
+ ...ZF,
3568
+ dir: YF.dir,
3569
3569
  orientation: "vertical",
3570
3570
  loop: A,
3571
- currentTabStopId: QF,
3572
- onCurrentTabStopIdChange: $F,
3571
+ currentTabStopId: $F,
3572
+ onCurrentTabStopIdChange: eI,
3573
3573
  onEntryFocus: composeEventHandlers(z, (n) => {
3574
- JF.isUsingKeyboardRef.current || n.preventDefault();
3574
+ YF.isUsingKeyboardRef.current || n.preventDefault();
3575
3575
  }),
3576
3576
  preventScrollOnEntryFocus: !0,
3577
3577
  children: /* @__PURE__ */ jsx(Content$1, {
3578
3578
  role: "menu",
3579
3579
  "aria-orientation": "vertical",
3580
- "data-state": getOpenState(qF.open),
3580
+ "data-state": getOpenState(JF.open),
3581
3581
  "data-radix-menu-content": "",
3582
- dir: JF.dir,
3583
- ...YF,
3584
- ...KF,
3585
- ref: tI,
3582
+ dir: YF.dir,
3583
+ ...XF,
3584
+ ...qF,
3585
+ ref: nI,
3586
3586
  style: {
3587
3587
  outline: "none",
3588
- ...KF.style
3588
+ ...qF.style
3589
3589
  },
3590
- onKeyDown: composeEventHandlers(KF.onKeyDown, (n) => {
3590
+ onKeyDown: composeEventHandlers(qF.onKeyDown, (n) => {
3591
3591
  let _ = n.target.closest("[data-radix-menu-content]") === n.currentTarget, E = n.ctrlKey || n.altKey || n.metaKey, O = n.key.length === 1;
3592
- _ && (n.key === "Tab" && n.preventDefault(), !E && O && dI(n.key));
3593
- let A = eI.current;
3592
+ _ && (n.key === "Tab" && n.preventDefault(), !E && O && fI(n.key));
3593
+ let A = tI.current;
3594
3594
  if (n.target !== A || !FIRST_LAST_KEYS.includes(n.key)) return;
3595
3595
  n.preventDefault();
3596
- let j = ZF().filter((n) => !n.disabled).map((n) => n.ref.current);
3596
+ let j = QF().filter((n) => !n.disabled).map((n) => n.ref.current);
3597
3597
  LAST_KEYS.includes(n.key) && j.reverse(), focusFirst(j);
3598
3598
  }),
3599
3599
  onBlur: composeEventHandlers(_.onBlur, (n) => {
3600
- n.currentTarget.contains(n.target) || (window.clearTimeout(nI.current), rI.current = "");
3600
+ n.currentTarget.contains(n.target) || (window.clearTimeout(rI.current), iI.current = "");
3601
3601
  }),
3602
3602
  onPointerMove: composeEventHandlers(_.onPointerMove, whenMouse((n) => {
3603
- let _ = n.target, E = cI.current !== n.clientX;
3604
- n.currentTarget.contains(_) && E && (sI.current = n.clientX > cI.current ? "right" : "left", cI.current = n.clientX);
3603
+ let _ = n.target, E = lI.current !== n.clientX;
3604
+ n.currentTarget.contains(_) && E && (cI.current = n.clientX > lI.current ? "right" : "left", lI.current = n.clientX);
3605
3605
  }))
3606
3606
  })
3607
3607
  })
@@ -4549,11 +4549,11 @@ function useStateMachine(_, E) {
4549
4549
  return React$1.useReducer((n, _) => E[n][_] ?? n, _);
4550
4550
  }
4551
4551
  var SCROLL_AREA_NAME = "ScrollArea", [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME), [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME), ScrollArea = React$1.forwardRef((_, E) => {
4552
- let { __scopeScrollArea: O, type: A = "hover", dir: j, scrollHideDelay: M = 600, ...N } = _, [P, z] = React$1.useState(null), [B, H] = React$1.useState(null), [U, W] = React$1.useState(null), [G, Z] = React$1.useState(null), [KF, qF] = React$1.useState(null), [JF, YF] = React$1.useState(0), [XF, ZF] = React$1.useState(0), [QF, $F] = React$1.useState(!1), [eI, tI] = React$1.useState(!1), nI = useComposedRefs$1(E, (n) => z(n)), rI = useDirection(j);
4552
+ let { __scopeScrollArea: O, type: A = "hover", dir: j, scrollHideDelay: M = 600, ...N } = _, [P, z] = React$1.useState(null), [B, H] = React$1.useState(null), [U, W] = React$1.useState(null), [G, Z] = React$1.useState(null), [qF, JF] = React$1.useState(null), [YF, XF] = React$1.useState(0), [ZF, QF] = React$1.useState(0), [$F, eI] = React$1.useState(!1), [tI, nI] = React$1.useState(!1), rI = useComposedRefs$1(E, (n) => z(n)), iI = useDirection(j);
4553
4553
  return /* @__PURE__ */ jsx(ScrollAreaProvider, {
4554
4554
  scope: O,
4555
4555
  type: A,
4556
- dir: rI,
4556
+ dir: iI,
4557
4557
  scrollHideDelay: M,
4558
4558
  scrollArea: P,
4559
4559
  viewport: B,
@@ -4562,22 +4562,22 @@ var SCROLL_AREA_NAME = "ScrollArea", [createScrollAreaContext, createScrollAreaS
4562
4562
  onContentChange: W,
4563
4563
  scrollbarX: G,
4564
4564
  onScrollbarXChange: Z,
4565
- scrollbarXEnabled: QF,
4566
- onScrollbarXEnabledChange: $F,
4567
- scrollbarY: KF,
4568
- onScrollbarYChange: qF,
4569
- scrollbarYEnabled: eI,
4570
- onScrollbarYEnabledChange: tI,
4571
- onCornerWidthChange: YF,
4572
- onCornerHeightChange: ZF,
4565
+ scrollbarXEnabled: $F,
4566
+ onScrollbarXEnabledChange: eI,
4567
+ scrollbarY: qF,
4568
+ onScrollbarYChange: JF,
4569
+ scrollbarYEnabled: tI,
4570
+ onScrollbarYEnabledChange: nI,
4571
+ onCornerWidthChange: XF,
4572
+ onCornerHeightChange: QF,
4573
4573
  children: /* @__PURE__ */ jsx(Primitive.div, {
4574
- dir: rI,
4574
+ dir: iI,
4575
4575
  ...N,
4576
- ref: nI,
4576
+ ref: rI,
4577
4577
  style: {
4578
4578
  position: "relative",
4579
- "--radix-scroll-area-corner-width": JF + "px",
4580
- "--radix-scroll-area-corner-height": XF + "px",
4579
+ "--radix-scroll-area-corner-width": YF + "px",
4580
+ "--radix-scroll-area-corner-height": ZF + "px",
4581
4581
  ..._.style
4582
4582
  }
4583
4583
  })
@@ -4848,46 +4848,46 @@ var ScrollAreaScrollbarHover = React$1.forwardRef((_, E) => {
4848
4848
  }
4849
4849
  });
4850
4850
  }), [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME), ScrollAreaScrollbarImpl = React$1.forwardRef((_, E) => {
4851
- let { __scopeScrollArea: O, sizes: A, hasThumb: j, onThumbChange: M, onThumbPointerUp: N, onThumbPointerDown: P, onThumbPositionChange: z, onDragScroll: B, onWheelScroll: H, onResize: U, ...W } = _, G = useScrollAreaContext(SCROLLBAR_NAME, O), [Z, KF] = React$1.useState(null), qF = useComposedRefs$1(E, (n) => KF(n)), JF = React$1.useRef(null), YF = React$1.useRef(""), XF = G.viewport, ZF = A.content - A.viewport, QF = useCallbackRef(H), $F = useCallbackRef(z), eI = useDebounceCallback(U, 10);
4852
- function tI(n) {
4853
- JF.current && B({
4854
- x: n.clientX - JF.current.left,
4855
- y: n.clientY - JF.current.top
4851
+ let { __scopeScrollArea: O, sizes: A, hasThumb: j, onThumbChange: M, onThumbPointerUp: N, onThumbPointerDown: P, onThumbPositionChange: z, onDragScroll: B, onWheelScroll: H, onResize: U, ...W } = _, G = useScrollAreaContext(SCROLLBAR_NAME, O), [Z, qF] = React$1.useState(null), JF = useComposedRefs$1(E, (n) => qF(n)), YF = React$1.useRef(null), XF = React$1.useRef(""), ZF = G.viewport, QF = A.content - A.viewport, $F = useCallbackRef(H), eI = useCallbackRef(z), tI = useDebounceCallback(U, 10);
4852
+ function nI(n) {
4853
+ YF.current && B({
4854
+ x: n.clientX - YF.current.left,
4855
+ y: n.clientY - YF.current.top
4856
4856
  });
4857
4857
  }
4858
4858
  return React$1.useEffect(() => {
4859
4859
  let n = (n) => {
4860
4860
  let _ = n.target;
4861
- Z?.contains(_) && QF(n, ZF);
4861
+ Z?.contains(_) && $F(n, QF);
4862
4862
  };
4863
4863
  return document.addEventListener("wheel", n, { passive: !1 }), () => document.removeEventListener("wheel", n, { passive: !1 });
4864
4864
  }, [
4865
- XF,
4866
- Z,
4867
4865
  ZF,
4868
- QF
4869
- ]), React$1.useEffect($F, [A, $F]), useResizeObserver$1(Z, eI), useResizeObserver$1(G.content, eI), /* @__PURE__ */ jsx(ScrollbarProvider, {
4866
+ Z,
4867
+ QF,
4868
+ $F
4869
+ ]), React$1.useEffect(eI, [A, eI]), useResizeObserver$1(Z, tI), useResizeObserver$1(G.content, tI), /* @__PURE__ */ jsx(ScrollbarProvider, {
4870
4870
  scope: O,
4871
4871
  scrollbar: Z,
4872
4872
  hasThumb: j,
4873
4873
  onThumbChange: useCallbackRef(M),
4874
4874
  onThumbPointerUp: useCallbackRef(N),
4875
- onThumbPositionChange: $F,
4875
+ onThumbPositionChange: eI,
4876
4876
  onThumbPointerDown: useCallbackRef(P),
4877
4877
  children: /* @__PURE__ */ jsx(Primitive.div, {
4878
4878
  ...W,
4879
- ref: qF,
4879
+ ref: JF,
4880
4880
  style: {
4881
4881
  position: "absolute",
4882
4882
  ...W.style
4883
4883
  },
4884
4884
  onPointerDown: composeEventHandlers(_.onPointerDown, (n) => {
4885
- n.button === 0 && (n.target.setPointerCapture(n.pointerId), JF.current = Z.getBoundingClientRect(), YF.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", G.viewport && (G.viewport.style.scrollBehavior = "auto"), tI(n));
4885
+ n.button === 0 && (n.target.setPointerCapture(n.pointerId), YF.current = Z.getBoundingClientRect(), XF.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", G.viewport && (G.viewport.style.scrollBehavior = "auto"), nI(n));
4886
4886
  }),
4887
- onPointerMove: composeEventHandlers(_.onPointerMove, tI),
4887
+ onPointerMove: composeEventHandlers(_.onPointerMove, nI),
4888
4888
  onPointerUp: composeEventHandlers(_.onPointerUp, (n) => {
4889
4889
  let _ = n.target;
4890
- _.hasPointerCapture(n.pointerId) && _.releasePointerCapture(n.pointerId), document.body.style.webkitUserSelect = YF.current, G.viewport && (G.viewport.style.scrollBehavior = ""), JF.current = null;
4890
+ _.hasPointerCapture(n.pointerId) && _.releasePointerCapture(n.pointerId), document.body.style.webkitUserSelect = XF.current, G.viewport && (G.viewport.style.scrollBehavior = ""), YF.current = null;
4891
4891
  })
4892
4892
  })
4893
4893
  });
@@ -5029,7 +5029,7 @@ function useResizeObserver$1(n, _) {
5029
5029
  }, [n, E]);
5030
5030
  }
5031
5031
  var Root$1 = ScrollArea, Viewport = ScrollAreaViewport, Scrollbar = ScrollAreaScrollbar, Thumb$1 = ScrollAreaThumb, Corner = ScrollAreaCorner, SWITCH_NAME = "Switch", [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME), [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME), Switch = React$1.forwardRef((_, E) => {
5032
- let { __scopeSwitch: O, name: A, checked: j, defaultChecked: M, required: N, disabled: P, value: z = "on", onCheckedChange: B, form: H, ...U } = _, [W, G] = React$1.useState(null), Z = useComposedRefs$1(E, (n) => G(n)), KF = React$1.useRef(!1), qF = W ? H || !!W.closest("form") : !0, [JF, YF] = useControllableState({
5032
+ let { __scopeSwitch: O, name: A, checked: j, defaultChecked: M, required: N, disabled: P, value: z = "on", onCheckedChange: B, form: H, ...U } = _, [W, G] = React$1.useState(null), Z = useComposedRefs$1(E, (n) => G(n)), qF = React$1.useRef(!1), JF = W ? H || !!W.closest("form") : !0, [YF, XF] = useControllableState({
5033
5033
  prop: j,
5034
5034
  defaultProp: M ?? !1,
5035
5035
  onChange: B,
@@ -5037,28 +5037,28 @@ var Root$1 = ScrollArea, Viewport = ScrollAreaViewport, Scrollbar = ScrollAreaSc
5037
5037
  });
5038
5038
  return /* @__PURE__ */ jsxs(SwitchProvider, {
5039
5039
  scope: O,
5040
- checked: JF,
5040
+ checked: YF,
5041
5041
  disabled: P,
5042
5042
  children: [/* @__PURE__ */ jsx(Primitive.button, {
5043
5043
  type: "button",
5044
5044
  role: "switch",
5045
- "aria-checked": JF,
5045
+ "aria-checked": YF,
5046
5046
  "aria-required": N,
5047
- "data-state": getState(JF),
5047
+ "data-state": getState(YF),
5048
5048
  "data-disabled": P ? "" : void 0,
5049
5049
  disabled: P,
5050
5050
  value: z,
5051
5051
  ...U,
5052
5052
  ref: Z,
5053
5053
  onClick: composeEventHandlers(_.onClick, (n) => {
5054
- YF((n) => !n), qF && (KF.current = n.isPropagationStopped(), KF.current || n.stopPropagation());
5054
+ XF((n) => !n), JF && (qF.current = n.isPropagationStopped(), qF.current || n.stopPropagation());
5055
5055
  })
5056
- }), qF && /* @__PURE__ */ jsx(SwitchBubbleInput, {
5056
+ }), JF && /* @__PURE__ */ jsx(SwitchBubbleInput, {
5057
5057
  control: W,
5058
- bubbles: !KF.current,
5058
+ bubbles: !qF.current,
5059
5059
  name: A,
5060
5060
  value: z,
5061
- checked: JF,
5061
+ checked: YF,
5062
5062
  required: N,
5063
5063
  disabled: P,
5064
5064
  form: H,
@@ -5242,22 +5242,22 @@ var Root2 = Tabs, List = TabsList, Trigger$1 = TabsTrigger, Content = TabsConten
5242
5242
  };
5243
5243
  TooltipProvider.displayName = PROVIDER_NAME;
5244
5244
  var TOOLTIP_NAME = "Tooltip", [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME), Tooltip = (_) => {
5245
- let { __scopeTooltip: E, children: O, open: A, defaultOpen: j, onOpenChange: M, disableHoverableContent: N, delayDuration: P } = _, z = useTooltipProviderContext(TOOLTIP_NAME, _.__scopeTooltip), B = usePopperScope(E), [H, U] = React$1.useState(null), W = useId$1(), G = React$1.useRef(0), Z = N ?? z.disableHoverableContent, KF = P ?? z.delayDuration, qF = React$1.useRef(!1), [JF, YF] = useControllableState({
5245
+ let { __scopeTooltip: E, children: O, open: A, defaultOpen: j, onOpenChange: M, disableHoverableContent: N, delayDuration: P } = _, z = useTooltipProviderContext(TOOLTIP_NAME, _.__scopeTooltip), B = usePopperScope(E), [H, U] = React$1.useState(null), W = useId$1(), G = React$1.useRef(0), Z = N ?? z.disableHoverableContent, qF = P ?? z.delayDuration, JF = React$1.useRef(!1), [YF, XF] = useControllableState({
5246
5246
  prop: A,
5247
5247
  defaultProp: j ?? !1,
5248
5248
  onChange: (n) => {
5249
5249
  n ? (z.onOpen(), document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))) : z.onClose(), M?.(n);
5250
5250
  },
5251
5251
  caller: TOOLTIP_NAME
5252
- }), XF = React$1.useMemo(() => JF ? qF.current ? "delayed-open" : "instant-open" : "closed", [JF]), ZF = React$1.useCallback(() => {
5253
- window.clearTimeout(G.current), G.current = 0, qF.current = !1, YF(!0);
5254
- }, [YF]), QF = React$1.useCallback(() => {
5255
- window.clearTimeout(G.current), G.current = 0, YF(!1);
5256
- }, [YF]), $F = React$1.useCallback(() => {
5252
+ }), ZF = React$1.useMemo(() => YF ? JF.current ? "delayed-open" : "instant-open" : "closed", [YF]), QF = React$1.useCallback(() => {
5253
+ window.clearTimeout(G.current), G.current = 0, JF.current = !1, XF(!0);
5254
+ }, [XF]), $F = React$1.useCallback(() => {
5255
+ window.clearTimeout(G.current), G.current = 0, XF(!1);
5256
+ }, [XF]), eI = React$1.useCallback(() => {
5257
5257
  window.clearTimeout(G.current), G.current = window.setTimeout(() => {
5258
- qF.current = !0, YF(!0), G.current = 0;
5259
- }, KF);
5260
- }, [KF, YF]);
5258
+ JF.current = !0, XF(!0), G.current = 0;
5259
+ }, qF);
5260
+ }, [qF, XF]);
5261
5261
  return React$1.useEffect(() => () => {
5262
5262
  G.current &&= (window.clearTimeout(G.current), 0);
5263
5263
  }, []), /* @__PURE__ */ jsx(Root2$4, {
@@ -5265,22 +5265,22 @@ var TOOLTIP_NAME = "Tooltip", [TooltipContextProvider, useTooltipContext] = crea
5265
5265
  children: /* @__PURE__ */ jsx(TooltipContextProvider, {
5266
5266
  scope: E,
5267
5267
  contentId: W,
5268
- open: JF,
5269
- stateAttribute: XF,
5268
+ open: YF,
5269
+ stateAttribute: ZF,
5270
5270
  trigger: H,
5271
5271
  onTriggerChange: U,
5272
5272
  onTriggerEnter: React$1.useCallback(() => {
5273
- z.isOpenDelayedRef.current ? $F() : ZF();
5273
+ z.isOpenDelayedRef.current ? eI() : QF();
5274
5274
  }, [
5275
5275
  z.isOpenDelayedRef,
5276
- $F,
5277
- ZF
5276
+ eI,
5277
+ QF
5278
5278
  ]),
5279
5279
  onTriggerLeave: React$1.useCallback(() => {
5280
- Z ? QF() : (window.clearTimeout(G.current), G.current = 0);
5281
- }, [QF, Z]),
5282
- onOpen: ZF,
5283
- onClose: QF,
5280
+ Z ? $F() : (window.clearTimeout(G.current), G.current = 0);
5281
+ }, [$F, Z]),
5282
+ onOpen: QF,
5283
+ onClose: $F,
5284
5284
  disableHoverableContent: Z,
5285
5285
  children: O
5286
5286
  })
@@ -6093,14 +6093,14 @@ var I$3 = React$1.forwardRef((_, E) => {
6093
6093
  React$1.useEffect(() => U(O), [O]);
6094
6094
  let [W, G] = React$1.useState(A);
6095
6095
  React$1.useEffect(() => G(A), [A]);
6096
- let [Z, KF] = React$1.useState(j);
6097
- React$1.useEffect(() => KF(j), [j]);
6098
- let [qF, JF] = React$1.useState(M);
6099
- React$1.useEffect(() => JF(M), [M]);
6100
- let [YF, XF] = React$1.useState(N);
6101
- React$1.useEffect(() => XF(N), [N]);
6102
- let [ZF, QF] = React$1.useState(P);
6103
- return React$1.useEffect(() => QF(P), [P]), React$1.createElement(A$2, {
6096
+ let [Z, qF] = React$1.useState(j);
6097
+ React$1.useEffect(() => qF(j), [j]);
6098
+ let [JF, YF] = React$1.useState(M);
6099
+ React$1.useEffect(() => YF(M), [M]);
6100
+ let [XF, ZF] = React$1.useState(N);
6101
+ React$1.useEffect(() => ZF(N), [N]);
6102
+ let [QF, $F] = React$1.useState(P);
6103
+ return React$1.useEffect(() => $F(P), [P]), React$1.createElement(A$2, {
6104
6104
  ...B,
6105
6105
  ref: E,
6106
6106
  isRoot: !0,
@@ -6108,62 +6108,62 @@ var I$3 = React$1.forwardRef((_, E) => {
6108
6108
  appearance: H,
6109
6109
  accentColor: W,
6110
6110
  grayColor: Z,
6111
- panelBackground: qF,
6112
- radius: YF,
6113
- scaling: ZF,
6111
+ panelBackground: JF,
6112
+ radius: XF,
6113
+ scaling: QF,
6114
6114
  onAppearanceChange: U,
6115
6115
  onAccentColorChange: G,
6116
- onGrayColorChange: KF,
6117
- onPanelBackgroundChange: JF,
6118
- onRadiusChange: XF,
6119
- onScalingChange: QF
6116
+ onGrayColorChange: qF,
6117
+ onPanelBackgroundChange: YF,
6118
+ onRadiusChange: ZF,
6119
+ onScalingChange: $F
6120
6120
  });
6121
6121
  });
6122
6122
  I$3.displayName = "ThemeRoot";
6123
6123
  var A$2 = React$1.forwardRef((_, E) => {
6124
- let O = React$1.useContext(P$3), { asChild: A, isRoot: j, hasBackground: M, appearance: N = O?.appearance ?? s$13.appearance.default, accentColor: P = O?.accentColor ?? s$13.accentColor.default, grayColor: z = O?.resolvedGrayColor ?? s$13.grayColor.default, panelBackground: B = O?.panelBackground ?? s$13.panelBackground.default, radius: H = O?.radius ?? s$13.radius.default, scaling: U = O?.scaling ?? s$13.scaling.default, onAppearanceChange: W = d$5, onAccentColorChange: G = d$5, onGrayColorChange: Z = d$5, onPanelBackgroundChange: KF = d$5, onRadiusChange: qF = d$5, onScalingChange: JF = d$5, ...YF } = _, XF = A ? Slot$3 : "div", ZF = z === "auto" ? a$12(P) : z, QF = _.appearance === "light" || _.appearance === "dark", $F = M === void 0 ? j || QF : M;
6124
+ let O = React$1.useContext(P$3), { asChild: A, isRoot: j, hasBackground: M, appearance: N = O?.appearance ?? s$13.appearance.default, accentColor: P = O?.accentColor ?? s$13.accentColor.default, grayColor: z = O?.resolvedGrayColor ?? s$13.grayColor.default, panelBackground: B = O?.panelBackground ?? s$13.panelBackground.default, radius: H = O?.radius ?? s$13.radius.default, scaling: U = O?.scaling ?? s$13.scaling.default, onAppearanceChange: W = d$5, onAccentColorChange: G = d$5, onGrayColorChange: Z = d$5, onPanelBackgroundChange: qF = d$5, onRadiusChange: JF = d$5, onScalingChange: YF = d$5, ...XF } = _, ZF = A ? Slot$3 : "div", QF = z === "auto" ? a$12(P) : z, $F = _.appearance === "light" || _.appearance === "dark", eI = M === void 0 ? j || $F : M;
6125
6125
  return React$1.createElement(P$3.Provider, { value: React$1.useMemo(() => ({
6126
6126
  appearance: N,
6127
6127
  accentColor: P,
6128
6128
  grayColor: z,
6129
- resolvedGrayColor: ZF,
6129
+ resolvedGrayColor: QF,
6130
6130
  panelBackground: B,
6131
6131
  radius: H,
6132
6132
  scaling: U,
6133
6133
  onAppearanceChange: W,
6134
6134
  onAccentColorChange: G,
6135
6135
  onGrayColorChange: Z,
6136
- onPanelBackgroundChange: KF,
6137
- onRadiusChange: qF,
6138
- onScalingChange: JF
6136
+ onPanelBackgroundChange: qF,
6137
+ onRadiusChange: JF,
6138
+ onScalingChange: YF
6139
6139
  }), [
6140
6140
  N,
6141
6141
  P,
6142
6142
  z,
6143
- ZF,
6143
+ QF,
6144
6144
  B,
6145
6145
  H,
6146
6146
  U,
6147
6147
  W,
6148
6148
  G,
6149
6149
  Z,
6150
- KF,
6151
6150
  qF,
6152
- JF
6153
- ]) }, React$1.createElement(XF, {
6151
+ JF,
6152
+ YF
6153
+ ]) }, React$1.createElement(ZF, {
6154
6154
  "data-is-root-theme": j ? "true" : "false",
6155
6155
  "data-accent-color": P,
6156
- "data-gray-color": ZF,
6157
- "data-has-background": $F ? "true" : "false",
6156
+ "data-gray-color": QF,
6157
+ "data-has-background": eI ? "true" : "false",
6158
6158
  "data-panel-background": B,
6159
6159
  "data-radius": H,
6160
6160
  "data-scaling": U,
6161
6161
  ref: E,
6162
- ...YF,
6162
+ ...XF,
6163
6163
  className: (0, import_classnames$20.default)("radix-themes", {
6164
6164
  light: N === "light",
6165
6165
  dark: N === "dark"
6166
- }, YF.className)
6166
+ }, XF.className)
6167
6167
  }));
6168
6168
  });
6169
6169
  A$2.displayName = "ThemeImpl";
@@ -6935,7 +6935,7 @@ function S$2(n) {
6935
6935
  return [(0, import_classnames$12.default)(_, O, j, N, z, H, W), l$1(E, A, M, P, B, U, G)];
6936
6936
  }
6937
6937
  var import_classnames$11 = /* @__PURE__ */ __toESM(require_classnames()), c = React$1.forwardRef((_, E) => {
6938
- let { rest: O, ...A } = a$5(_), [j, M] = S$2(A), { asChild: N, children: P, className: z, style: B, type: H, scrollHideDelay: U = H === "scroll" ? void 0 : 0, dir: W, size: G = t$3.size.default, radius: Z = t$3.radius.default, scrollbars: KF = t$3.scrollbars.default, ...qF } = O;
6938
+ let { rest: O, ...A } = a$5(_), [j, M] = S$2(A), { asChild: N, children: P, className: z, style: B, type: H, scrollHideDelay: U = H === "scroll" ? void 0 : 0, dir: W, size: G = t$3.size.default, radius: Z = t$3.radius.default, scrollbars: qF = t$3.scrollbars.default, ...JF } = O;
6939
6939
  return React$1.createElement(Root$1, {
6940
6940
  type: H,
6941
6941
  scrollHideDelay: U,
@@ -6946,10 +6946,10 @@ var import_classnames$11 = /* @__PURE__ */ __toESM(require_classnames()), c = Re
6946
6946
  asChild: N,
6947
6947
  children: P
6948
6948
  }, (_) => React$1.createElement(React$1.Fragment, null, React$1.createElement(Viewport, {
6949
- ...qF,
6949
+ ...JF,
6950
6950
  ref: E,
6951
6951
  className: "rt-ScrollAreaViewport"
6952
- }, _), React$1.createElement("div", { className: "rt-ScrollAreaViewportFocusRing" }), KF === "vertical" ? null : React$1.createElement(Scrollbar, {
6952
+ }, _), React$1.createElement("div", { className: "rt-ScrollAreaViewportFocusRing" }), qF === "vertical" ? null : React$1.createElement(Scrollbar, {
6953
6953
  "data-radius": Z,
6954
6954
  orientation: "horizontal",
6955
6955
  className: (0, import_classnames$11.default)("rt-ScrollAreaScrollbar", g$3({
@@ -6957,7 +6957,7 @@ var import_classnames$11 = /* @__PURE__ */ __toESM(require_classnames()), c = Re
6957
6957
  value: G,
6958
6958
  propValues: t$3.size.values
6959
6959
  }))
6960
- }, React$1.createElement(Thumb$1, { className: "rt-ScrollAreaThumb" })), KF === "horizontal" ? null : React$1.createElement(Scrollbar, {
6960
+ }, React$1.createElement(Thumb$1, { className: "rt-ScrollAreaThumb" })), qF === "horizontal" ? null : React$1.createElement(Scrollbar, {
6961
6961
  "data-radius": Z,
6962
6962
  orientation: "vertical",
6963
6963
  className: (0, import_classnames$11.default)("rt-ScrollAreaScrollbar", g$3({
@@ -6965,7 +6965,7 @@ var import_classnames$11 = /* @__PURE__ */ __toESM(require_classnames()), c = Re
6965
6965
  value: G,
6966
6966
  propValues: t$3.size.values
6967
6967
  }))
6968
- }, React$1.createElement(Thumb$1, { className: "rt-ScrollAreaThumb" })), KF === "both" ? React$1.createElement(Corner, { className: "rt-ScrollAreaCorner" }) : null)));
6968
+ }, React$1.createElement(Thumb$1, { className: "rt-ScrollAreaThumb" })), qF === "both" ? React$1.createElement(Corner, { className: "rt-ScrollAreaCorner" }) : null)));
6969
6969
  });
6970
6970
  c.displayName = "ScrollArea";
6971
6971
  var n$2 = {
@@ -8231,17 +8231,17 @@ function $e({ document: n, event: _, hitRegions: E, initialLayoutMap: O, mounted
8231
8231
  E.forEach((n) => {
8232
8232
  let { group: E, groupSize: P } = n, { disableCursor: z, orientation: B, panels: H } = E, U = 0;
8233
8233
  U = j ? B === "horizontal" ? (_.clientX - j.x) / P * 100 : (_.clientY - j.y) / P * 100 : B === "horizontal" ? _.clientX < 0 ? -100 : 100 : _.clientY < 0 ? -100 : 100;
8234
- let W = O.get(E), { defaultLayoutDeferred: G, derivedPanelConstraints: Z, layout: KF, separatorToPanels: qF } = A.get(E) ?? { defaultLayoutDeferred: !1 };
8235
- if (Z && W && KF && qF) {
8234
+ let W = O.get(E), { defaultLayoutDeferred: G, derivedPanelConstraints: Z, layout: qF, separatorToPanels: JF } = A.get(E) ?? { defaultLayoutDeferred: !1 };
8235
+ if (Z && W && qF && JF) {
8236
8236
  let _ = Z$1({
8237
8237
  delta: U,
8238
8238
  initialLayout: W,
8239
8239
  panelConstraints: Z,
8240
8240
  pivotIndices: n.panels.map((n) => H.indexOf(n)),
8241
- prevLayout: KF,
8241
+ prevLayout: qF,
8242
8242
  trigger: "mouse-or-touch"
8243
8243
  });
8244
- if (B$1(_, KF)) {
8244
+ if (B$1(_, qF)) {
8245
8245
  if (U !== 0 && !z) switch (B) {
8246
8246
  case "horizontal":
8247
8247
  M |= U < 0 ? De : Oe$1;
@@ -8255,7 +8255,7 @@ function $e({ document: n, event: _, hitRegions: E, initialLayoutMap: O, mounted
8255
8255
  defaultLayoutDeferred: G,
8256
8256
  derivedPanelConstraints: Z,
8257
8257
  layout: _,
8258
- separatorToPanels: qF
8258
+ separatorToPanels: JF
8259
8259
  });
8260
8260
  let E = n.group.panels.map(({ id: n }) => n).join(",");
8261
8261
  n.group.inMemoryLayouts[E] = _;
@@ -8467,64 +8467,64 @@ function Pt(n, _) {
8467
8467
  function Rt({ children: n, className: _, defaultLayout: E, disableCursor: O, disabled: A, elementRef: j, groupRef: M, id: N, onLayoutChange: P, orientation: z = "horizontal", style: B, ...H }) {
8468
8468
  let U = useRef({}), W = le$1((n) => {
8469
8469
  B$1(U.current, n) || (U.current = n, P?.(n));
8470
- }), Z = ae$1(N), KF = useRef(null), [qF, JF] = useState(!1), [XF, $F] = useState(E ?? {}), [eI, tI] = wt(), nI = useRef({
8470
+ }), Z = ae$1(N), qF = useRef(null), [JF, YF] = useState(!1), [ZF, eI] = useState(E ?? {}), [tI, nI] = wt(), rI = useRef({
8471
8471
  lastExpandedPanelSizes: {},
8472
8472
  layouts: {},
8473
8473
  panels: [],
8474
8474
  separators: []
8475
- }), rI = ue$1(KF, j);
8475
+ }), iI = ue$1(qF, j);
8476
8476
  Pt(Z, M);
8477
- let iI = useMemo(() => ({
8477
+ let aI = useMemo(() => ({
8478
8478
  id: Z,
8479
8479
  orientation: z,
8480
8480
  registerPanel: (n) => {
8481
- let _ = nI.current;
8482
- return _.panels = ie$1(z, [..._.panels, n]), tI(), () => {
8483
- _.panels = _.panels.filter((_) => _ !== n), tI();
8481
+ let _ = rI.current;
8482
+ return _.panels = ie$1(z, [..._.panels, n]), nI(), () => {
8483
+ _.panels = _.panels.filter((_) => _ !== n), nI();
8484
8484
  };
8485
8485
  },
8486
8486
  registerSeparator: (n) => {
8487
- let _ = nI.current;
8488
- return _.separators = ie$1(z, [..._.separators, n]), tI(), () => {
8489
- _.separators = _.separators.filter((_) => _ !== n), tI();
8487
+ let _ = rI.current;
8488
+ return _.separators = ie$1(z, [..._.separators, n]), nI(), () => {
8489
+ _.separators = _.separators.filter((_) => _ !== n), nI();
8490
8490
  };
8491
8491
  }
8492
8492
  }), [
8493
8493
  Z,
8494
- tI,
8494
+ nI,
8495
8495
  z
8496
- ]), oI = Lt({
8496
+ ]), sI = Lt({
8497
8497
  defaultLayout: E,
8498
8498
  disableCursor: O
8499
- }), sI = useRef(null);
8499
+ }), cI = useRef(null);
8500
8500
  A$1(() => {
8501
- let n = KF.current;
8501
+ let n = qF.current;
8502
8502
  if (n === null) return;
8503
- let _ = nI.current, E = {
8504
- defaultLayout: oI.defaultLayout,
8505
- disableCursor: !!oI.disableCursor,
8503
+ let _ = rI.current, E = {
8504
+ defaultLayout: sI.defaultLayout,
8505
+ disableCursor: !!sI.disableCursor,
8506
8506
  disabled: !!A,
8507
8507
  element: n,
8508
8508
  id: Z,
8509
- inMemoryLastExpandedPanelSizes: nI.current.lastExpandedPanelSizes,
8510
- inMemoryLayouts: nI.current.layouts,
8509
+ inMemoryLastExpandedPanelSizes: rI.current.lastExpandedPanelSizes,
8510
+ inMemoryLayouts: rI.current.layouts,
8511
8511
  orientation: z,
8512
8512
  panels: _.panels,
8513
8513
  separators: _.separators
8514
8514
  };
8515
- sI.current = E;
8515
+ cI.current = E;
8516
8516
  let O = bt(E), j = D$1().mountedGroups.get(E);
8517
8517
  if (j) {
8518
8518
  let { defaultLayoutDeferred: n, derivedPanelConstraints: _, layout: E } = j;
8519
- !n && _.length > 0 && ($F(E), W?.(E));
8519
+ !n && _.length > 0 && (eI(E), W?.(E));
8520
8520
  }
8521
8521
  let M = T$1.addListener("interactionStateChange", (n) => {
8522
8522
  switch (n.state) {
8523
8523
  case "active":
8524
- JF(n.hitRegions.some((n) => n.group === E));
8524
+ YF(n.hitRegions.some((n) => n.group === E));
8525
8525
  break;
8526
8526
  default:
8527
- JF(!1);
8527
+ YF(!1);
8528
8528
  break;
8529
8529
  }
8530
8530
  }), N = T$1.addListener("mountedGroupsChange", (n) => {
@@ -8532,30 +8532,30 @@ function Rt({ children: n, className: _, defaultLayout: E, disableCursor: O, dis
8532
8532
  if (_) {
8533
8533
  let { defaultLayoutDeferred: n, derivedPanelConstraints: E, layout: O } = _;
8534
8534
  if (n || E.length === 0) return;
8535
- $F(O), W?.(O);
8535
+ eI(O), W?.(O);
8536
8536
  }
8537
8537
  });
8538
8538
  return () => {
8539
- sI.current = null, O(), M(), N();
8539
+ cI.current = null, O(), M(), N();
8540
8540
  };
8541
8541
  }, [
8542
8542
  A,
8543
8543
  Z,
8544
8544
  W,
8545
8545
  z,
8546
- eI,
8547
- oI
8546
+ tI,
8547
+ sI
8548
8548
  ]), useEffect(() => {
8549
- let n = sI.current;
8549
+ let n = cI.current;
8550
8550
  n && (n.defaultLayout = E, n.disableCursor = !!O);
8551
8551
  });
8552
- let cI = { [Fe]: qF ? "none" : void 0 };
8553
- for (let n in XF) {
8552
+ let lI = { [Fe]: JF ? "none" : void 0 };
8553
+ for (let n in ZF) {
8554
8554
  let _ = Ve(Z, n);
8555
- cI[_] = XF[n];
8555
+ lI[_] = ZF[n];
8556
8556
  }
8557
8557
  return /* @__PURE__ */ jsx(je.Provider, {
8558
- value: iI,
8558
+ value: aI,
8559
8559
  children: /* @__PURE__ */ jsx("div", {
8560
8560
  ...H,
8561
8561
  "aria-orientation": z,
@@ -8563,13 +8563,13 @@ function Rt({ children: n, className: _, defaultLayout: E, disableCursor: O, dis
8563
8563
  "data-group": !0,
8564
8564
  "data-testid": Z,
8565
8565
  id: Z,
8566
- ref: rI,
8566
+ ref: iI,
8567
8567
  style: {
8568
8568
  height: "100%",
8569
8569
  width: "100%",
8570
8570
  overflow: "hidden",
8571
8571
  ...B,
8572
- ...cI,
8572
+ ...lI,
8573
8573
  display: "flex",
8574
8574
  flexDirection: z === "horizontal" ? "row" : "column",
8575
8575
  flexWrap: "nowrap"
@@ -8687,12 +8687,12 @@ function It(n, _) {
8687
8687
  });
8688
8688
  }
8689
8689
  function kt({ children: n, className: _, collapsedSize: E = "0%", collapsible: O = !1, defaultSize: A, elementRef: j, id: M, maxSize: N = "100%", minSize: P = "0%", onResize: z, panelRef: B, style: H, ...U }) {
8690
- let W = !!M, G = ae$1(M), Z = useRef(null), KF = ue$1(Z, j), { id: qF, registerPanel: JF } = ce$1(), YF = z !== null, XF = le$1((n, _, E) => {
8690
+ let W = !!M, G = ae$1(M), Z = useRef(null), qF = ue$1(Z, j), { id: JF, registerPanel: YF } = ce$1(), XF = z !== null, ZF = le$1((n, _, E) => {
8691
8691
  z?.(n, M, E);
8692
8692
  });
8693
8693
  A$1(() => {
8694
8694
  let n = Z.current;
8695
- if (n !== null) return JF({
8695
+ if (n !== null) return YF({
8696
8696
  element: n,
8697
8697
  id: G,
8698
8698
  idIsStable: W,
@@ -8700,7 +8700,7 @@ function kt({ children: n, className: _, collapsedSize: E = "0%", collapsible: O
8700
8700
  expandToSize: void 0,
8701
8701
  prevSize: void 0
8702
8702
  },
8703
- onResize: YF ? XF : void 0,
8703
+ onResize: XF ? ZF : void 0,
8704
8704
  panelConstraints: {
8705
8705
  collapsedSize: E,
8706
8706
  collapsible: O,
@@ -8713,25 +8713,25 @@ function kt({ children: n, className: _, collapsedSize: E = "0%", collapsible: O
8713
8713
  E,
8714
8714
  O,
8715
8715
  A,
8716
- YF,
8716
+ XF,
8717
8717
  G,
8718
8718
  W,
8719
8719
  N,
8720
8720
  P,
8721
- XF,
8722
- JF
8721
+ ZF,
8722
+ YF
8723
8723
  ]), It(G, B);
8724
- let QF = Ve(qF, G);
8724
+ let $F = Ve(JF, G);
8725
8725
  return /* @__PURE__ */ jsx("div", {
8726
8726
  ...U,
8727
8727
  "data-panel": !0,
8728
8728
  "data-testid": G,
8729
8729
  id: G,
8730
- ref: KF,
8730
+ ref: qF,
8731
8731
  style: {
8732
8732
  ...Gt,
8733
8733
  flexBasis: 0,
8734
- flexGrow: `var(${QF}, 1)`,
8734
+ flexGrow: `var(${$F}, 1)`,
8735
8735
  flexShrink: 1,
8736
8736
  overflow: "hidden",
8737
8737
  pointerEvents: `var(${Fe})`
@@ -8794,7 +8794,7 @@ function Dt({ layout: n, panelConstraints: _, panelId: E, panelIndex: O }) {
8794
8794
  };
8795
8795
  }
8796
8796
  function Ot({ children: n, className: _, elementRef: E, id: O, style: A, ...j }) {
8797
- let M = ae$1(O), [N, P] = useState({}), [z, B] = useState("inactive"), H = useRef(null), U = ue$1(H, E), { id: W, orientation: G, registerSeparator: Z } = ce$1(), KF = G === "horizontal" ? "vertical" : "horizontal";
8797
+ let M = ae$1(O), [N, P] = useState({}), [z, B] = useState("inactive"), H = useRef(null), U = ue$1(H, E), { id: W, orientation: G, registerSeparator: Z } = ce$1(), qF = G === "horizontal" ? "vertical" : "horizontal";
8798
8798
  return A$1(() => {
8799
8799
  let n = H.current;
8800
8800
  if (n !== null) {
@@ -8830,7 +8830,7 @@ function Ot({ children: n, className: _, elementRef: E, id: O, style: A, ...j })
8830
8830
  ]), /* @__PURE__ */ jsx("div", {
8831
8831
  ...j,
8832
8832
  "aria-controls": N.valueControls,
8833
- "aria-orientation": KF,
8833
+ "aria-orientation": qF,
8834
8834
  "aria-valuemax": N.valueMax,
8835
8835
  "aria-valuemin": N.valueMin,
8836
8836
  "aria-valuenow": N.valueNow,
@@ -8853,7 +8853,7 @@ function Ot({ children: n, className: _, elementRef: E, id: O, style: A, ...j })
8853
8853
  Ot.displayName = "Separator";
8854
8854
  var package_default = {
8855
8855
  name: "@1urso/generic-editor",
8856
- version: "0.1.67",
8856
+ version: "0.1.69",
8857
8857
  publishConfig: { access: "public" },
8858
8858
  type: "module",
8859
8859
  main: "./dist/generic-editor.umd.cjs",
@@ -9081,7 +9081,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9081
9081
  historyIndex: n,
9082
9082
  selectedElementIds: []
9083
9083
  } : _);
9084
- }, []), KF = React.useCallback(() => {
9084
+ }, []), qF = React.useCallback(() => {
9085
9085
  M((n) => {
9086
9086
  if (n.selectedElementIds.length > 0) {
9087
9087
  let _ = n.elements.filter((_) => n.selectedElementIds.includes(_.id));
@@ -9092,7 +9092,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9092
9092
  }
9093
9093
  return n;
9094
9094
  });
9095
- }, []), qF = React.useCallback(() => {
9095
+ }, []), JF = React.useCallback(() => {
9096
9096
  M((n) => {
9097
9097
  if (n.clipboard.length > 0) {
9098
9098
  let _ = n.clipboard.map((n) => ({
@@ -9111,7 +9111,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9111
9111
  }
9112
9112
  return n;
9113
9113
  });
9114
- }, []), JF = React.useCallback((n) => {
9114
+ }, []), YF = React.useCallback((n) => {
9115
9115
  let _ = {};
9116
9116
  n.type === "box" && (_.backgroundColor = "var(--gray-4)"), n.type === "text-container" && (_.backgroundColor = "var(--gray-4)", _.border = "1px solid var(--gray-8)", _.padding = "8px", _.display = "flex", _.alignItems = "flex-start", _.justifyContent = "flex-start");
9117
9117
  let E = {
@@ -9136,7 +9136,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9136
9136
  selectedElementIds: [E.id]
9137
9137
  };
9138
9138
  });
9139
- }, []), YF = React.useCallback((n) => {
9139
+ }, []), XF = React.useCallback((n) => {
9140
9140
  M((_) => {
9141
9141
  let E = _.elements.filter((_) => _.id !== n), O = _.history.slice(0, _.historyIndex + 1);
9142
9142
  O.push(E);
@@ -9150,7 +9150,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9150
9150
  historyIndex: O.length - 1
9151
9151
  };
9152
9152
  });
9153
- }, []), XF = React.useCallback(() => {
9153
+ }, []), ZF = React.useCallback(() => {
9154
9154
  M((n) => {
9155
9155
  if (n.selectedElementIds.length === 0) return n;
9156
9156
  let _ = n.elements.filter((_) => !n.selectedElementIds.includes(_.id)), E = n.history.slice(0, n.historyIndex + 1);
@@ -9165,7 +9165,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9165
9165
  historyIndex: E.length - 1
9166
9166
  };
9167
9167
  });
9168
- }, []), ZF = React.useCallback((n, _ = !1) => {
9168
+ }, []), QF = React.useCallback((n, _ = !1) => {
9169
9169
  M((E) => {
9170
9170
  if (n === null) return {
9171
9171
  ...E,
@@ -9182,12 +9182,12 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9182
9182
  selectedElementIds: [n]
9183
9183
  };
9184
9184
  });
9185
- }, []), $F = React.useCallback((n) => {
9185
+ }, []), eI = React.useCallback((n) => {
9186
9186
  M((_) => ({
9187
9187
  ..._,
9188
9188
  selectedElementIds: n
9189
9189
  }));
9190
- }, []), eI = React.useCallback((n, _) => {
9190
+ }, []), tI = React.useCallback((n, _) => {
9191
9191
  M((E) => {
9192
9192
  let O = [...E.elements], A = O[n];
9193
9193
  O.splice(n, 1), O.splice(_, 0, A);
@@ -9199,7 +9199,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9199
9199
  historyIndex: j.length - 1
9200
9200
  };
9201
9201
  });
9202
- }, []), tI = React.useCallback((n, _, E = !0) => {
9202
+ }, []), nI = React.useCallback((n, _, E = !0) => {
9203
9203
  M((O) => {
9204
9204
  let A = O.elements.map((E) => E.id === n ? {
9205
9205
  ...E,
@@ -9212,7 +9212,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9212
9212
  historyIndex: M
9213
9213
  };
9214
9214
  });
9215
- }, []), nI = React.useCallback((n, _ = !0) => {
9215
+ }, []), rI = React.useCallback((n, _ = !0) => {
9216
9216
  M((E) => {
9217
9217
  let O = [...E.elements], A = [], j = /* @__PURE__ */ new Set();
9218
9218
  n.forEach(({ id: n, changes: _ }) => {
@@ -9266,7 +9266,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9266
9266
  historyIndex: P
9267
9267
  };
9268
9268
  });
9269
- }, []), rI = React.useCallback((n) => {
9269
+ }, []), iI = React.useCallback((n) => {
9270
9270
  M((_) => {
9271
9271
  let E = _.elements.filter((_) => n.includes(_.id));
9272
9272
  if (E.length === 0) return _;
@@ -9297,7 +9297,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9297
9297
  historyIndex: z.length - 1
9298
9298
  };
9299
9299
  });
9300
- }, []), iI = React.useCallback((n) => {
9300
+ }, []), aI = React.useCallback((n) => {
9301
9301
  M((_) => {
9302
9302
  let E = _.elements.find((_) => _.id === n);
9303
9303
  if (!E || E.type !== "group") return _;
@@ -9316,7 +9316,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9316
9316
  historyIndex: j.length - 1
9317
9317
  };
9318
9318
  });
9319
- }, []), oI = React.useCallback((n, _) => {
9319
+ }, []), sI = React.useCallback((n, _) => {
9320
9320
  M((E) => {
9321
9321
  let O = E.elements.map((E) => E.id === n ? {
9322
9322
  ...E,
@@ -9327,7 +9327,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9327
9327
  elements: O
9328
9328
  };
9329
9329
  });
9330
- }, []), sI = React.useCallback((n, _) => {
9330
+ }, []), cI = React.useCallback((n, _) => {
9331
9331
  if (!n.find((n) => n.id === _ && n.type === "group")) return n;
9332
9332
  let E = n.filter((n) => n.groupId === _);
9333
9333
  if (E.length === 0) return n;
@@ -9339,7 +9339,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9339
9339
  width: j - O,
9340
9340
  height: M - A
9341
9341
  } : n);
9342
- }, []), cI = React.useCallback((n, _) => {
9342
+ }, []), lI = React.useCallback((n, _) => {
9343
9343
  M((E) => {
9344
9344
  let O = E.elements.find((_) => _.id === n), A = E.elements.find((n) => n.id === _ && n.type === "group");
9345
9345
  if (!O || !A) return E;
@@ -9347,7 +9347,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9347
9347
  ...E,
9348
9348
  groupId: _
9349
9349
  } : E);
9350
- j = sI(j, _);
9350
+ j = cI(j, _);
9351
9351
  let M = E.history.slice(0, E.historyIndex + 1);
9352
9352
  M.push(j);
9353
9353
  let N = E.historyDescriptions.slice(0, E.historyIndex + 1);
@@ -9359,7 +9359,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9359
9359
  historyIndex: M.length - 1
9360
9360
  };
9361
9361
  });
9362
- }, [sI]), lI = React.useCallback((n) => {
9362
+ }, [cI]), uI = React.useCallback((n) => {
9363
9363
  M((_) => {
9364
9364
  let E = _.elements.find((_) => _.id === n);
9365
9365
  if (!E || !E.groupId) return _;
@@ -9367,7 +9367,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9367
9367
  ..._,
9368
9368
  groupId: void 0
9369
9369
  } : _);
9370
- A = sI(A, O);
9370
+ A = cI(A, O);
9371
9371
  let j = _.history.slice(0, _.historyIndex + 1);
9372
9372
  j.push(A);
9373
9373
  let M = _.historyDescriptions.slice(0, _.historyIndex + 1);
@@ -9379,7 +9379,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9379
9379
  historyIndex: j.length - 1
9380
9380
  };
9381
9381
  });
9382
- }, [sI]), uI = React.useCallback((n, _, E) => {
9382
+ }, [cI]), dI = React.useCallback((n, _, E) => {
9383
9383
  M((O) => {
9384
9384
  let A = O.elements.find((_) => _.id === n && _.type === "group");
9385
9385
  if (!A) return O;
@@ -9411,13 +9411,13 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9411
9411
  historyIndex: B.length - 1
9412
9412
  };
9413
9413
  });
9414
- }, []), dI = React.useCallback((n, _) => {
9414
+ }, []), fI = React.useCallback((n, _) => {
9415
9415
  M((E) => ({
9416
9416
  ...E,
9417
9417
  mockData: n,
9418
9418
  singleMockData: _
9419
9419
  }));
9420
- }, []), fI = React.useCallback((n) => {
9420
+ }, []), pI = React.useCallback((n) => {
9421
9421
  M((_) => ({
9422
9422
  ..._,
9423
9423
  listSettings: {
@@ -9425,81 +9425,81 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9425
9425
  ...n
9426
9426
  }
9427
9427
  }));
9428
- }, []), pI = React.useCallback((n) => {
9428
+ }, []), mI = React.useCallback((n) => {
9429
9429
  M((_) => ({
9430
9430
  ..._,
9431
9431
  assets: [..._.assets, n]
9432
9432
  }));
9433
- }, []), mI = React.useCallback((n) => {
9433
+ }, []), hI = React.useCallback((n) => {
9434
9434
  M((_) => ({
9435
9435
  ..._,
9436
9436
  assets: _.assets.filter((_) => _.id !== n)
9437
9437
  }));
9438
- }, []), hI = React.useMemo(() => ({
9438
+ }, []), gI = React.useMemo(() => ({
9439
9439
  state: j,
9440
- addElement: JF,
9441
- removeElement: YF,
9442
- removeSelected: XF,
9443
- selectElement: ZF,
9444
- setSelectedElements: $F,
9445
- moveElement: eI,
9446
- updateElement: tI,
9447
- updateElements: nI,
9448
- groupElements: rI,
9449
- ungroupElements: iI,
9450
- renameElement: oI,
9451
- addToGroup: cI,
9452
- removeFromGroup: lI,
9453
- resizeGroup: uI,
9454
- setMockData: dI,
9455
- updateListSettings: fI,
9440
+ addElement: YF,
9441
+ removeElement: XF,
9442
+ removeSelected: ZF,
9443
+ selectElement: QF,
9444
+ setSelectedElements: eI,
9445
+ moveElement: tI,
9446
+ updateElement: nI,
9447
+ updateElements: rI,
9448
+ groupElements: iI,
9449
+ ungroupElements: aI,
9450
+ renameElement: sI,
9451
+ addToGroup: lI,
9452
+ removeFromGroup: uI,
9453
+ resizeGroup: dI,
9454
+ setMockData: fI,
9455
+ updateListSettings: pI,
9456
9456
  setCanvasHeight: N,
9457
9457
  loadState: U,
9458
9458
  undo: W,
9459
9459
  redo: G,
9460
9460
  jumpToHistory: Z,
9461
- copy: KF,
9462
- paste: qF,
9461
+ copy: qF,
9462
+ paste: JF,
9463
9463
  setGridSize: P,
9464
9464
  setZoom: z,
9465
9465
  setPan: B,
9466
9466
  setSnapLines: H,
9467
- addAsset: pI,
9468
- removeAsset: mI
9467
+ addAsset: mI,
9468
+ removeAsset: hI
9469
9469
  }), [
9470
9470
  j,
9471
- JF,
9472
9471
  YF,
9473
9472
  XF,
9474
9473
  ZF,
9475
- $F,
9474
+ QF,
9476
9475
  eI,
9477
9476
  tI,
9478
9477
  nI,
9479
9478
  rI,
9480
9479
  iI,
9481
- oI,
9482
- cI,
9480
+ aI,
9481
+ sI,
9483
9482
  lI,
9484
9483
  uI,
9485
9484
  dI,
9486
9485
  fI,
9486
+ pI,
9487
9487
  N,
9488
9488
  U,
9489
9489
  W,
9490
9490
  G,
9491
9491
  Z,
9492
- KF,
9493
9492
  qF,
9493
+ JF,
9494
9494
  P,
9495
9495
  z,
9496
9496
  B,
9497
9497
  H,
9498
- pI,
9499
- mI
9498
+ mI,
9499
+ hI
9500
9500
  ]);
9501
9501
  return /* @__PURE__ */ jsx(EditorContext.Provider, {
9502
- value: hI,
9502
+ value: gI,
9503
9503
  children: n
9504
9504
  });
9505
9505
  }, useEditor = () => {
@@ -9941,16 +9941,16 @@ var __assign$1 = function() {
9941
9941
  maxHeight: _
9942
9942
  };
9943
9943
  }, _.prototype.calculateNewSizeFromDirection = function(n, _) {
9944
- var E = this.props.scale || 1, O = normalizeToPair(this.props.resizeRatio || 1), A = O[0], j = O[1], M = this.state, N = M.direction, P = M.original, z = this.props, B = z.lockAspectRatio, H = z.lockAspectRatioExtraHeight, U = z.lockAspectRatioExtraWidth, W = P.width, G = P.height, Z = H || 0, KF = U || 0;
9945
- return hasDirection("right", N) && (W = P.width + (n - P.x) * A / E, B && (G = (W - KF) / this.ratio + Z)), hasDirection("left", N) && (W = P.width - (n - P.x) * A / E, B && (G = (W - KF) / this.ratio + Z)), hasDirection("bottom", N) && (G = P.height + (_ - P.y) * j / E, B && (W = (G - Z) * this.ratio + KF)), hasDirection("top", N) && (G = P.height - (_ - P.y) * j / E, B && (W = (G - Z) * this.ratio + KF)), {
9944
+ var E = this.props.scale || 1, O = normalizeToPair(this.props.resizeRatio || 1), A = O[0], j = O[1], M = this.state, N = M.direction, P = M.original, z = this.props, B = z.lockAspectRatio, H = z.lockAspectRatioExtraHeight, U = z.lockAspectRatioExtraWidth, W = P.width, G = P.height, Z = H || 0, qF = U || 0;
9945
+ return hasDirection("right", N) && (W = P.width + (n - P.x) * A / E, B && (G = (W - qF) / this.ratio + Z)), hasDirection("left", N) && (W = P.width - (n - P.x) * A / E, B && (G = (W - qF) / this.ratio + Z)), hasDirection("bottom", N) && (G = P.height + (_ - P.y) * j / E, B && (W = (G - Z) * this.ratio + qF)), hasDirection("top", N) && (G = P.height - (_ - P.y) * j / E, B && (W = (G - Z) * this.ratio + qF)), {
9946
9946
  newWidth: W,
9947
9947
  newHeight: G
9948
9948
  };
9949
9949
  }, _.prototype.calculateNewSizeFromAspectRatio = function(n, _, E, O) {
9950
9950
  var A = this.props, j = A.lockAspectRatio, M = A.lockAspectRatioExtraHeight, N = A.lockAspectRatioExtraWidth, P = O.width === void 0 ? 10 : O.width, z = E.width === void 0 || E.width < 0 ? n : E.width, B = O.height === void 0 ? 10 : O.height, H = E.height === void 0 || E.height < 0 ? _ : E.height, U = M || 0, W = N || 0;
9951
9951
  if (j) {
9952
- var G = (B - U) * this.ratio + W, Z = (H - U) * this.ratio + W, KF = (P - W) / this.ratio + U, qF = (z - W) / this.ratio + U, JF = Math.max(P, G), YF = Math.min(z, Z), XF = Math.max(B, KF), ZF = Math.min(H, qF);
9953
- n = clamp$1(n, JF, YF), _ = clamp$1(_, XF, ZF);
9952
+ var G = (B - U) * this.ratio + W, Z = (H - U) * this.ratio + W, qF = (P - W) / this.ratio + U, JF = (z - W) / this.ratio + U, YF = Math.max(P, G), XF = Math.min(z, Z), ZF = Math.max(B, qF), QF = Math.min(H, JF);
9953
+ n = clamp$1(n, YF, XF), _ = clamp$1(_, ZF, QF);
9954
9954
  } else n = clamp$1(n, P, z), _ = clamp$1(_, B, H);
9955
9955
  return {
9956
9956
  newWidth: n,
@@ -10007,56 +10007,56 @@ var __assign$1 = function() {
10007
10007
  } catch {}
10008
10008
  var E = this.props, O = E.maxWidth, A = E.maxHeight, j = E.minWidth, M = E.minHeight, N = isTouchEvent$1(n) ? n.touches[0].clientX : n.clientX, P = isTouchEvent$1(n) ? n.touches[0].clientY : n.clientY, z = this.state, B = z.direction, H = z.original, U = z.width, W = z.height, G = this.getParentSize(), Z = calculateNewMax(G, this.window.innerWidth, this.window.innerHeight, O, A, j, M);
10009
10009
  O = Z.maxWidth, A = Z.maxHeight, j = Z.minWidth, M = Z.minHeight;
10010
- var KF = this.calculateNewSizeFromDirection(N, P), qF = KF.newHeight, JF = KF.newWidth, YF = this.calculateNewMaxFromBoundary(O, A);
10011
- this.props.snap && this.props.snap.x && (JF = findClosestSnap(JF, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (qF = findClosestSnap(qF, this.props.snap.y, this.props.snapGap));
10012
- var XF = this.calculateNewSizeFromAspectRatio(JF, qF, {
10013
- width: YF.maxWidth,
10014
- height: YF.maxHeight
10010
+ var qF = this.calculateNewSizeFromDirection(N, P), JF = qF.newHeight, YF = qF.newWidth, XF = this.calculateNewMaxFromBoundary(O, A);
10011
+ this.props.snap && this.props.snap.x && (YF = findClosestSnap(YF, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (JF = findClosestSnap(JF, this.props.snap.y, this.props.snapGap));
10012
+ var ZF = this.calculateNewSizeFromAspectRatio(YF, JF, {
10013
+ width: XF.maxWidth,
10014
+ height: XF.maxHeight
10015
10015
  }, {
10016
10016
  width: j,
10017
10017
  height: M
10018
10018
  });
10019
- if (JF = XF.newWidth, qF = XF.newHeight, this.props.grid) {
10020
- var ZF = snap(JF, this.props.grid[0], this.props.gridGap ? this.props.gridGap[0] : 0), QF = snap(qF, this.props.grid[1], this.props.gridGap ? this.props.gridGap[1] : 0), $F = this.props.snapGap || 0, eI = $F === 0 || Math.abs(ZF - JF) <= $F ? ZF : JF, tI = $F === 0 || Math.abs(QF - qF) <= $F ? QF : qF;
10021
- JF = eI, qF = tI;
10019
+ if (YF = ZF.newWidth, JF = ZF.newHeight, this.props.grid) {
10020
+ var QF = snap(YF, this.props.grid[0], this.props.gridGap ? this.props.gridGap[0] : 0), $F = snap(JF, this.props.grid[1], this.props.gridGap ? this.props.gridGap[1] : 0), eI = this.props.snapGap || 0, tI = eI === 0 || Math.abs(QF - YF) <= eI ? QF : YF, nI = eI === 0 || Math.abs($F - JF) <= eI ? $F : JF;
10021
+ YF = tI, JF = nI;
10022
10022
  }
10023
- var rI = {
10024
- width: JF - H.width,
10025
- height: qF - H.height
10023
+ var iI = {
10024
+ width: YF - H.width,
10025
+ height: JF - H.height
10026
10026
  };
10027
- if (this.delta = rI, U && typeof U == "string") {
10027
+ if (this.delta = iI, U && typeof U == "string") {
10028
10028
  if (U.endsWith("%")) {
10029
- var iI = JF / G.width * 100;
10030
- JF = `${iI}%`;
10029
+ var aI = YF / G.width * 100;
10030
+ YF = `${aI}%`;
10031
10031
  } else if (U.endsWith("vw")) {
10032
- var aI = JF / this.window.innerWidth * 100;
10033
- JF = `${aI}vw`;
10032
+ var oI = YF / this.window.innerWidth * 100;
10033
+ YF = `${oI}vw`;
10034
10034
  } else if (U.endsWith("vh")) {
10035
- var oI = JF / this.window.innerHeight * 100;
10036
- JF = `${oI}vh`;
10035
+ var sI = YF / this.window.innerHeight * 100;
10036
+ YF = `${sI}vh`;
10037
10037
  }
10038
10038
  }
10039
10039
  if (W && typeof W == "string") {
10040
10040
  if (W.endsWith("%")) {
10041
- var iI = qF / G.height * 100;
10042
- qF = `${iI}%`;
10041
+ var aI = JF / G.height * 100;
10042
+ JF = `${aI}%`;
10043
10043
  } else if (W.endsWith("vw")) {
10044
- var aI = qF / this.window.innerWidth * 100;
10045
- qF = `${aI}vw`;
10044
+ var oI = JF / this.window.innerWidth * 100;
10045
+ JF = `${oI}vw`;
10046
10046
  } else if (W.endsWith("vh")) {
10047
- var oI = qF / this.window.innerHeight * 100;
10048
- qF = `${oI}vh`;
10047
+ var sI = JF / this.window.innerHeight * 100;
10048
+ JF = `${sI}vh`;
10049
10049
  }
10050
10050
  }
10051
- var sI = {
10052
- width: this.createSizeForCssProperty(JF, "width"),
10053
- height: this.createSizeForCssProperty(qF, "height")
10051
+ var cI = {
10052
+ width: this.createSizeForCssProperty(YF, "width"),
10053
+ height: this.createSizeForCssProperty(JF, "height")
10054
10054
  };
10055
- this.flexDir === "row" ? sI.flexBasis = sI.width : this.flexDir === "column" && (sI.flexBasis = sI.height);
10056
- var cI = this.state.width !== sI.width, lI = this.state.height !== sI.height, uI = this.state.flexBasis !== sI.flexBasis, dI = cI || lI || uI;
10057
- dI && flushSync(function() {
10058
- _.setState(sI);
10059
- }), this.props.onResize && dI && this.props.onResize(n, B, this.resizable, rI);
10055
+ this.flexDir === "row" ? cI.flexBasis = cI.width : this.flexDir === "column" && (cI.flexBasis = cI.height);
10056
+ var lI = this.state.width !== cI.width, uI = this.state.height !== cI.height, dI = this.state.flexBasis !== cI.flexBasis, fI = lI || uI || dI;
10057
+ fI && flushSync(function() {
10058
+ _.setState(cI);
10059
+ }), this.props.onResize && fI && this.props.onResize(n, B, this.resizable, iI);
10060
10060
  }
10061
10061
  }, _.prototype.onMouseUp = function(n) {
10062
10062
  var _ = this.state, E = _.isResizing, O = _.direction;
@@ -11190,6 +11190,10 @@ var AnimationSettings = ({ element: n, updateElement: _ }) => {
11190
11190
  {
11191
11191
  label: "Cor da Borda",
11192
11192
  value: "borderColor"
11193
+ },
11194
+ {
11195
+ label: "Cor da Sombra",
11196
+ value: "boxShadowColor"
11193
11197
  }
11194
11198
  ], P = (E, O) => {
11195
11199
  let j = { ...A };
@@ -11566,32 +11570,32 @@ var AnimationSettings = ({ element: n, updateElement: _ }) => {
11566
11570
  });
11567
11571
  }, stopProp = (n) => n.stopPropagation();
11568
11572
  const ElementContextMenu = ({ children: n, element: _ }) => {
11569
- let { updateElement: E, removeElement: O, removeSelected: A, addElement: j, moveElement: M, copy: N, paste: P, state: z, renameElement: B, groupElements: H, ungroupElements: U } = useEditor(), [W, G] = useState(!1), [Z, KF] = useState(!1), [qF, JF] = useState(!1), [YF, XF] = useState(!1), [$F, eI] = useState("formatting"), [tI, nI] = useState({
11573
+ let { updateElement: E, removeElement: O, removeSelected: A, addElement: j, moveElement: M, copy: N, paste: P, state: z, renameElement: B, groupElements: H, ungroupElements: U } = useEditor(), [W, G] = useState(!1), [Z, qF] = useState(!1), [JF, YF] = useState(!1), [XF, ZF] = useState(!1), [eI, tI] = useState("formatting"), [nI, rI] = useState({
11570
11574
  open: !1,
11571
11575
  prop: "",
11572
11576
  value: ""
11573
- }), [rI, sI] = useState(!1), [cI, lI] = useState(""), [uI, dI] = useState(""), [fI, pI] = useState(_.content), [mI, hI] = useState(_.dataBinding || ""), gI = useRef(null), _I = useRef(null), vI = (n) => {
11574
- let _ = gI.current;
11577
+ }), [iI, cI] = useState(!1), [lI, uI] = useState(""), [dI, fI] = useState(""), [pI, mI] = useState(_.content), [hI, gI] = useState(_.dataBinding || ""), _I = useRef(null), vI = useRef(null), yI = (n) => {
11578
+ let _ = _I.current;
11575
11579
  if (_) {
11576
- let E = _.selectionStart, O = _.selectionEnd, A = fI;
11577
- pI(A.substring(0, E) + `{{${n}}}` + A.substring(O)), setTimeout(() => {
11580
+ let E = _.selectionStart, O = _.selectionEnd, A = pI;
11581
+ mI(A.substring(0, E) + `{{${n}}}` + A.substring(O)), setTimeout(() => {
11578
11582
  _.focus();
11579
11583
  let O = E + n.length + 4;
11580
11584
  _.setSelectionRange(O, O);
11581
11585
  }, 0);
11582
- } else pI((_) => _ + `{{${n}}}`);
11583
- }, yI = (n) => {
11586
+ } else mI((_) => _ + `{{${n}}}`);
11587
+ }, bI = (n) => {
11584
11588
  E(_.id, { style: {
11585
11589
  ..._.style,
11586
11590
  ...n
11587
11591
  } });
11588
- }, bI = () => {
11592
+ }, xI = () => {
11589
11593
  let n = z.elements.findIndex((n) => n.id === _.id);
11590
11594
  n < z.elements.length - 1 && M(n, z.elements.length - 1);
11591
- }, xI = () => {
11595
+ }, SI = () => {
11592
11596
  let n = z.elements.findIndex((n) => n.id === _.id);
11593
11597
  n > 0 && M(n, 0);
11594
- }, SI = () => {
11598
+ }, CI = () => {
11595
11599
  z.selectedElementIds.includes(_.id) && z.selectedElementIds.length > 1 ? (N(), P()) : j({
11596
11600
  type: _.type,
11597
11601
  content: _.content,
@@ -11601,7 +11605,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11601
11605
  height: _.height,
11602
11606
  style: _.style
11603
11607
  });
11604
- }, CI = [
11608
+ }, wI = [
11605
11609
  "#000000",
11606
11610
  "#FFFFFF",
11607
11611
  "#FF0000",
@@ -11611,12 +11615,95 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11611
11615
  "#808080",
11612
11616
  "#800080",
11613
11617
  "transparent"
11614
- ], wI = (n, _) => {
11615
- nI({
11618
+ ], TI = [
11619
+ 0,
11620
+ 1,
11621
+ 2,
11622
+ 4,
11623
+ 8
11624
+ ], EI = [
11625
+ "solid",
11626
+ "dashed",
11627
+ "dotted",
11628
+ "double"
11629
+ ], DI = [
11630
+ {
11631
+ label: "Sem Sombra",
11632
+ value: "none"
11633
+ },
11634
+ {
11635
+ label: "Suave",
11636
+ value: "0 2px 8px rgba(0, 0, 0, 0.12)"
11637
+ },
11638
+ {
11639
+ label: "Média",
11640
+ value: "0 6px 16px rgba(0, 0, 0, 0.18)"
11641
+ },
11642
+ {
11643
+ label: "Forte",
11644
+ value: "0 10px 24px rgba(0, 0, 0, 0.28)"
11645
+ },
11646
+ {
11647
+ label: "Brilho",
11648
+ value: "0 0 16px rgba(0, 0, 0, 0.35)"
11649
+ }
11650
+ ], OI = (n, _) => {
11651
+ if (!n || n === "none") return `0 4px 12px ${_}`;
11652
+ let E = n.split(","), O = E[E.length - 1].trim(), A = /(rgba?\([^)]+\)|#(?:[0-9a-fA-F]{3,8})|[a-zA-Z]+)\s*$/, j = A.test(O) ? O.replace(A, _) : `${O} ${_}`;
11653
+ return E[E.length - 1] = j, E.join(", ");
11654
+ }, kI = (n, _) => {
11655
+ rI({
11616
11656
  open: !0,
11617
11657
  prop: n,
11618
11658
  value: _
11619
11659
  });
11660
+ }, AI = () => {
11661
+ if (nI.prop === "boxShadowColor") {
11662
+ bI({ boxShadow: OI(_.style?.boxShadow, nI.value) }), rI((n) => ({
11663
+ ...n,
11664
+ open: !1
11665
+ }));
11666
+ return;
11667
+ }
11668
+ bI({ [nI.prop]: nI.value }), rI((n) => ({
11669
+ ...n,
11670
+ open: !1
11671
+ }));
11672
+ }, jI = (n) => {
11673
+ if (n === 0) {
11674
+ bI({
11675
+ borderWidth: "0px",
11676
+ borderStyle: "none"
11677
+ });
11678
+ return;
11679
+ }
11680
+ bI({
11681
+ borderWidth: `${n}px`,
11682
+ borderStyle: _.style?.borderStyle || "solid"
11683
+ });
11684
+ }, MI = (n) => {
11685
+ if (!parseInt(_.style?.borderWidth || "0", 10)) {
11686
+ bI({
11687
+ borderStyle: n,
11688
+ borderWidth: "1px"
11689
+ });
11690
+ return;
11691
+ }
11692
+ bI({ borderStyle: n });
11693
+ }, NI = (n) => {
11694
+ if (!parseInt(_.style?.borderWidth || "0", 10)) {
11695
+ bI({
11696
+ borderColor: n,
11697
+ borderWidth: "1px",
11698
+ borderStyle: _.style?.borderStyle || "solid"
11699
+ });
11700
+ return;
11701
+ }
11702
+ bI({ borderColor: n });
11703
+ }, PI = (n) => {
11704
+ bI({ boxShadow: n });
11705
+ }, FI = (n) => {
11706
+ bI({ boxShadow: OI(_.style?.boxShadow, n) });
11620
11707
  };
11621
11708
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
11622
11709
  /* @__PURE__ */ jsx(s$4, {
@@ -11629,8 +11716,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11629
11716
  direction: "column",
11630
11717
  gap: "3",
11631
11718
  children: [/* @__PURE__ */ jsx(u$1, {
11632
- value: uI,
11633
- onChange: (n) => dI(n.target.value),
11719
+ value: dI,
11720
+ onChange: (n) => fI(n.target.value),
11634
11721
  placeholder: "Nome da camada..."
11635
11722
  }), /* @__PURE__ */ jsxs(p$1, {
11636
11723
  gap: "3",
@@ -11641,7 +11728,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11641
11728
  children: "Cancelar"
11642
11729
  }) }), /* @__PURE__ */ jsx(o, {
11643
11730
  onClick: () => {
11644
- B(_.id, uI), G(!1);
11731
+ B(_.id, dI), G(!1);
11645
11732
  },
11646
11733
  children: "Salvar"
11647
11734
  })]
@@ -11651,7 +11738,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11651
11738
  }),
11652
11739
  /* @__PURE__ */ jsx(s$4, {
11653
11740
  open: Z,
11654
- onOpenChange: KF,
11741
+ onOpenChange: qF,
11655
11742
  children: /* @__PURE__ */ jsxs(p$8, {
11656
11743
  style: { maxWidth: 450 },
11657
11744
  onPointerDown: stopProp,
@@ -11660,9 +11747,9 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11660
11747
  gap: "3",
11661
11748
  children: [
11662
11749
  /* @__PURE__ */ jsx(r$1, {
11663
- ref: gI,
11664
- value: fI,
11665
- onChange: (n) => pI(n.target.value),
11750
+ ref: _I,
11751
+ value: pI,
11752
+ onChange: (n) => mI(n.target.value),
11666
11753
  placeholder: "Digite o novo texto...",
11667
11754
  style: { height: 100 }
11668
11755
  }),
@@ -11680,7 +11767,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11680
11767
  color: "blue",
11681
11768
  variant: "surface",
11682
11769
  style: { cursor: "pointer" },
11683
- onClick: () => vI(n.dataName),
11770
+ onClick: () => yI(n.dataName),
11684
11771
  children: n.name
11685
11772
  }, n.dataName))
11686
11773
  })]
@@ -11694,7 +11781,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11694
11781
  children: "Cancelar"
11695
11782
  }) }), /* @__PURE__ */ jsx(o, {
11696
11783
  onClick: () => {
11697
- E(_.id, { content: fI }), KF(!1);
11784
+ E(_.id, { content: pI }), qF(!1);
11698
11785
  },
11699
11786
  children: "Salvar"
11700
11787
  })]
@@ -11704,8 +11791,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11704
11791
  })
11705
11792
  }),
11706
11793
  /* @__PURE__ */ jsx(s$4, {
11707
- open: qF,
11708
- onOpenChange: JF,
11794
+ open: JF,
11795
+ onOpenChange: YF,
11709
11796
  children: /* @__PURE__ */ jsxs(p$8, {
11710
11797
  style: { maxWidth: 450 },
11711
11798
  onPointerDown: stopProp,
@@ -11718,8 +11805,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11718
11805
  children: "Nome da propriedade (ex: titulo, preco, imagem):"
11719
11806
  }),
11720
11807
  /* @__PURE__ */ jsx(u$1, {
11721
- value: mI,
11722
- onChange: (n) => hI(n.target.value),
11808
+ value: hI,
11809
+ onChange: (n) => gI(n.target.value),
11723
11810
  placeholder: "propriedade"
11724
11811
  }),
11725
11812
  /* @__PURE__ */ jsxs(p$1, {
@@ -11731,8 +11818,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11731
11818
  children: "Cancelar"
11732
11819
  }) }), /* @__PURE__ */ jsx(o, {
11733
11820
  onClick: () => {
11734
- let n = mI, O = { dataBinding: n };
11735
- (_.type === "text" || _.type === "text-container") && (O.content = `{{${n}}}`), E(_.id, O), JF(!1);
11821
+ let n = hI, O = { dataBinding: n };
11822
+ (_.type === "text" || _.type === "text-container") && (O.content = `{{${n}}}`), E(_.id, O), YF(!1);
11736
11823
  },
11737
11824
  children: "Vincular"
11738
11825
  })]
@@ -11742,8 +11829,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11742
11829
  })
11743
11830
  }),
11744
11831
  /* @__PURE__ */ jsx(s$4, {
11745
- open: tI.open,
11746
- onOpenChange: (n) => nI((_) => ({
11832
+ open: nI.open,
11833
+ onOpenChange: (n) => rI((_) => ({
11747
11834
  ..._,
11748
11835
  open: n
11749
11836
  })),
@@ -11753,8 +11840,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11753
11840
  children: [
11754
11841
  /* @__PURE__ */ jsx(g$2, { children: "Selecionar Cor" }),
11755
11842
  /* @__PURE__ */ jsx(ColorPickerContent, {
11756
- color: tI.value,
11757
- onChange: (n) => nI((_) => ({
11843
+ color: nI.value,
11844
+ onChange: (n) => rI((_) => ({
11758
11845
  ..._,
11759
11846
  value: n
11760
11847
  }))
@@ -11768,12 +11855,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11768
11855
  color: "gray",
11769
11856
  children: "Cancelar"
11770
11857
  }) }), /* @__PURE__ */ jsx(o, {
11771
- onClick: () => {
11772
- yI({ [tI.prop]: tI.value }), nI((n) => ({
11773
- ...n,
11774
- open: !1
11775
- }));
11776
- },
11858
+ onClick: AI,
11777
11859
  children: "Aplicar"
11778
11860
  })]
11779
11861
  })
@@ -11782,13 +11864,13 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11782
11864
  }),
11783
11865
  /* @__PURE__ */ jsx(ElementAdvancedSettings, {
11784
11866
  elementId: _.id,
11785
- open: YF,
11786
- onOpenChange: XF,
11787
- initialTab: $F
11867
+ open: XF,
11868
+ onOpenChange: ZF,
11869
+ initialTab: eI
11788
11870
  }),
11789
11871
  /* @__PURE__ */ jsx(s$4, {
11790
- open: rI,
11791
- onOpenChange: sI,
11872
+ open: iI,
11873
+ onOpenChange: cI,
11792
11874
  children: /* @__PURE__ */ jsxs(p$8, {
11793
11875
  style: { maxWidth: 450 },
11794
11876
  onPointerDown: stopProp,
@@ -11796,8 +11878,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11796
11878
  direction: "column",
11797
11879
  gap: "3",
11798
11880
  children: [/* @__PURE__ */ jsx(u$1, {
11799
- value: cI,
11800
- onChange: (n) => lI(n.target.value),
11881
+ value: lI,
11882
+ onChange: (n) => uI(n.target.value),
11801
11883
  placeholder: "https://exemplo.com/imagem.png"
11802
11884
  }), /* @__PURE__ */ jsxs(p$1, {
11803
11885
  gap: "3",
@@ -11808,7 +11890,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11808
11890
  children: "Cancelar"
11809
11891
  }) }), /* @__PURE__ */ jsx(o, {
11810
11892
  onClick: () => {
11811
- E(_.id, { content: cI }), sI(!1);
11893
+ E(_.id, { content: lI }), cI(!1);
11812
11894
  },
11813
11895
  children: "Aplicar"
11814
11896
  })]
@@ -11818,7 +11900,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11818
11900
  }),
11819
11901
  /* @__PURE__ */ jsx("input", {
11820
11902
  type: "file",
11821
- ref: _I,
11903
+ ref: vI,
11822
11904
  style: { display: "none" },
11823
11905
  accept: "image/*",
11824
11906
  onChange: (n) => {
@@ -11906,7 +11988,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11906
11988
  className: "ContextMenuItem",
11907
11989
  onPointerDown: stopProp,
11908
11990
  onSelect: () => {
11909
- hI(_.dataBinding || ""), JF(!0);
11991
+ gI(_.dataBinding || ""), YF(!0);
11910
11992
  },
11911
11993
  children: "Outro / Manual..."
11912
11994
  }),
@@ -11924,7 +12006,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11924
12006
  className: "ContextMenuItem",
11925
12007
  onPointerDown: stopProp,
11926
12008
  onSelect: () => {
11927
- pI(_.content), KF(!0);
12009
+ mI(_.content), qF(!0);
11928
12010
  },
11929
12011
  children: "Editar Texto..."
11930
12012
  }), /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" })] }),
@@ -11932,7 +12014,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11932
12014
  className: "ContextMenuItem",
11933
12015
  onPointerDown: stopProp,
11934
12016
  onSelect: () => {
11935
- dI(_.name || (_.type === "group" ? "Grupo" : "Elemento")), G(!0);
12017
+ fI(_.name || (_.type === "group" ? "Grupo" : "Elemento")), G(!0);
11936
12018
  },
11937
12019
  children: "Renomear..."
11938
12020
  }),
@@ -11952,14 +12034,14 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11952
12034
  /* @__PURE__ */ jsx(Item2$1, {
11953
12035
  className: "ContextMenuItem",
11954
12036
  onPointerDown: stopProp,
11955
- onSelect: () => XF(!0),
12037
+ onSelect: () => ZF(!0),
11956
12038
  children: "Configurações Avançadas..."
11957
12039
  }),
11958
12040
  /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
11959
12041
  /* @__PURE__ */ jsx(Item2$1, {
11960
12042
  className: "ContextMenuItem",
11961
12043
  onPointerDown: stopProp,
11962
- onSelect: SI,
12044
+ onSelect: CI,
11963
12045
  children: z.selectedElementIds.includes(_.id) && z.selectedElementIds.length > 1 ? `Duplicar Selecionados (${z.selectedElementIds.length})` : "Duplicar"
11964
12046
  }),
11965
12047
  /* @__PURE__ */ jsx(Item2$1, {
@@ -11986,13 +12068,13 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11986
12068
  children: [/* @__PURE__ */ jsx(Item2$1, {
11987
12069
  className: "ContextMenuItem",
11988
12070
  onPointerDown: stopProp,
11989
- onSelect: () => _I.current?.click(),
12071
+ onSelect: () => vI.current?.click(),
11990
12072
  children: "Carregar do Computador"
11991
12073
  }), /* @__PURE__ */ jsx(Item2$1, {
11992
12074
  className: "ContextMenuItem",
11993
12075
  onPointerDown: stopProp,
11994
12076
  onSelect: () => {
11995
- lI(typeof _.content == "string" ? _.content : ""), sI(!0);
12077
+ uI(typeof _.content == "string" ? _.content : ""), cI(!0);
11996
12078
  },
11997
12079
  children: "Inserir URL"
11998
12080
  })]
@@ -12012,19 +12094,19 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12012
12094
  /* @__PURE__ */ jsx(Item2$1, {
12013
12095
  className: "ContextMenuItem",
12014
12096
  onPointerDown: stopProp,
12015
- onSelect: () => yI({ objectFit: "cover" }),
12097
+ onSelect: () => bI({ objectFit: "cover" }),
12016
12098
  children: "Preencher (Cover)"
12017
12099
  }),
12018
12100
  /* @__PURE__ */ jsx(Item2$1, {
12019
12101
  className: "ContextMenuItem",
12020
12102
  onPointerDown: stopProp,
12021
- onSelect: () => yI({ objectFit: "contain" }),
12103
+ onSelect: () => bI({ objectFit: "contain" }),
12022
12104
  children: "Ajustar (Contain)"
12023
12105
  }),
12024
12106
  /* @__PURE__ */ jsx(Item2$1, {
12025
12107
  className: "ContextMenuItem",
12026
12108
  onPointerDown: stopProp,
12027
- onSelect: () => yI({ objectFit: "fill" }),
12109
+ onSelect: () => bI({ objectFit: "fill" }),
12028
12110
  children: "Esticar (Fill)"
12029
12111
  })
12030
12112
  ]
@@ -12045,12 +12127,12 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12045
12127
  children: [/* @__PURE__ */ jsx(Item2$1, {
12046
12128
  className: "ContextMenuItem",
12047
12129
  onPointerDown: stopProp,
12048
- onSelect: bI,
12130
+ onSelect: xI,
12049
12131
  children: "Trazer para frente"
12050
12132
  }), /* @__PURE__ */ jsx(Item2$1, {
12051
12133
  className: "ContextMenuItem",
12052
12134
  onPointerDown: stopProp,
12053
- onSelect: xI,
12135
+ onSelect: SI,
12054
12136
  children: "Enviar para trás"
12055
12137
  })]
12056
12138
  }) })] }),
@@ -12070,7 +12152,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12070
12152
  children: z.availableFonts && z.availableFonts.map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12071
12153
  className: "ContextMenuItem",
12072
12154
  onPointerDown: stopProp,
12073
- onSelect: () => yI({ fontFamily: n }),
12155
+ onSelect: () => bI({ fontFamily: n }),
12074
12156
  style: { fontFamily: n },
12075
12157
  children: [n, _.style?.fontFamily === n && /* @__PURE__ */ jsx("div", {
12076
12158
  className: "RightSlot",
@@ -12101,7 +12183,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12101
12183
  ].map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12102
12184
  className: "ContextMenuItem",
12103
12185
  onPointerDown: stopProp,
12104
- onSelect: () => yI({ fontSize: `${n}px` }),
12186
+ onSelect: () => bI({ fontSize: `${n}px` }),
12105
12187
  children: [n, "px"]
12106
12188
  }, n))
12107
12189
  }) })] }),
@@ -12117,10 +12199,10 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12117
12199
  sideOffset: 2,
12118
12200
  alignOffset: -5,
12119
12201
  children: [
12120
- CI.filter((n) => n !== "transparent").map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12202
+ wI.filter((n) => n !== "transparent").map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12121
12203
  className: "ContextMenuItem",
12122
12204
  onPointerDown: stopProp,
12123
- onSelect: () => yI({ color: n }),
12205
+ onSelect: () => bI({ color: n }),
12124
12206
  children: [/* @__PURE__ */ jsx("div", { style: {
12125
12207
  width: 12,
12126
12208
  height: 12,
@@ -12133,7 +12215,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12133
12215
  /* @__PURE__ */ jsx(Item2$1, {
12134
12216
  className: "ContextMenuItem",
12135
12217
  onPointerDown: stopProp,
12136
- onSelect: () => wI("color", _.style?.color || "#000000"),
12218
+ onSelect: () => kI("color", _.style?.color || "#000000"),
12137
12219
  children: "Outra Cor..."
12138
12220
  })
12139
12221
  ]
@@ -12152,12 +12234,12 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12152
12234
  children: [/* @__PURE__ */ jsx(Item2$1, {
12153
12235
  className: "ContextMenuItem",
12154
12236
  onPointerDown: stopProp,
12155
- onSelect: () => yI({ fontWeight: "normal" }),
12237
+ onSelect: () => bI({ fontWeight: "normal" }),
12156
12238
  children: "Normal"
12157
12239
  }), /* @__PURE__ */ jsx(Item2$1, {
12158
12240
  className: "ContextMenuItem",
12159
12241
  onPointerDown: stopProp,
12160
- onSelect: () => yI({ fontWeight: "bold" }),
12242
+ onSelect: () => bI({ fontWeight: "bold" }),
12161
12243
  children: "Negrito"
12162
12244
  })]
12163
12245
  }) })] }),
@@ -12176,19 +12258,19 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12176
12258
  /* @__PURE__ */ jsx(Item2$1, {
12177
12259
  className: "ContextMenuItem",
12178
12260
  onPointerDown: stopProp,
12179
- onSelect: () => yI({ textAlign: "left" }),
12261
+ onSelect: () => bI({ textAlign: "left" }),
12180
12262
  children: "Esquerda"
12181
12263
  }),
12182
12264
  /* @__PURE__ */ jsx(Item2$1, {
12183
12265
  className: "ContextMenuItem",
12184
12266
  onPointerDown: stopProp,
12185
- onSelect: () => yI({ textAlign: "center" }),
12267
+ onSelect: () => bI({ textAlign: "center" }),
12186
12268
  children: "Centro"
12187
12269
  }),
12188
12270
  /* @__PURE__ */ jsx(Item2$1, {
12189
12271
  className: "ContextMenuItem",
12190
12272
  onPointerDown: stopProp,
12191
- onSelect: () => yI({ textAlign: "right" }),
12273
+ onSelect: () => bI({ textAlign: "right" }),
12192
12274
  children: "Direita"
12193
12275
  })
12194
12276
  ]
@@ -12208,7 +12290,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12208
12290
  /* @__PURE__ */ jsx(Item2$1, {
12209
12291
  className: "ContextMenuItem",
12210
12292
  onPointerDown: stopProp,
12211
- onSelect: () => yI({
12293
+ onSelect: () => bI({
12212
12294
  display: "flex",
12213
12295
  flexDirection: "column",
12214
12296
  justifyContent: "flex-start"
@@ -12218,7 +12300,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12218
12300
  /* @__PURE__ */ jsx(Item2$1, {
12219
12301
  className: "ContextMenuItem",
12220
12302
  onPointerDown: stopProp,
12221
- onSelect: () => yI({
12303
+ onSelect: () => bI({
12222
12304
  display: "flex",
12223
12305
  flexDirection: "column",
12224
12306
  justifyContent: "center"
@@ -12228,7 +12310,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12228
12310
  /* @__PURE__ */ jsx(Item2$1, {
12229
12311
  className: "ContextMenuItem",
12230
12312
  onPointerDown: stopProp,
12231
- onSelect: () => yI({
12313
+ onSelect: () => bI({
12232
12314
  display: "flex",
12233
12315
  flexDirection: "column",
12234
12316
  justifyContent: "flex-end"
@@ -12250,10 +12332,97 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12250
12332
  sideOffset: 2,
12251
12333
  alignOffset: -5,
12252
12334
  children: [
12253
- CI.map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12335
+ wI.map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12336
+ className: "ContextMenuItem",
12337
+ onPointerDown: stopProp,
12338
+ onSelect: () => bI({ backgroundColor: n }),
12339
+ children: [/* @__PURE__ */ jsx("div", { style: {
12340
+ width: 12,
12341
+ height: 12,
12342
+ backgroundColor: n,
12343
+ marginRight: 8,
12344
+ border: "1px solid #ccc"
12345
+ } }), n === "transparent" ? "Transparente" : n]
12346
+ }, n)),
12347
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
12348
+ /* @__PURE__ */ jsx(Item2$1, {
12349
+ className: "ContextMenuItem",
12350
+ onPointerDown: stopProp,
12351
+ onSelect: () => kI("backgroundColor", _.style?.backgroundColor || "transparent"),
12352
+ children: "Outra Cor..."
12353
+ })
12354
+ ]
12355
+ }) })] }),
12356
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
12357
+ className: "ContextMenuSubTrigger",
12358
+ onPointerDown: stopProp,
12359
+ children: ["Sombra", /* @__PURE__ */ jsx("div", {
12360
+ className: "RightSlot",
12361
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
12362
+ })]
12363
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsxs(SubContent2$1, {
12364
+ className: "ContextMenuSubContent",
12365
+ sideOffset: 2,
12366
+ alignOffset: -5,
12367
+ children: [
12368
+ DI.map((n) => /* @__PURE__ */ jsx(Item2$1, {
12369
+ className: "ContextMenuItem",
12370
+ onPointerDown: stopProp,
12371
+ onSelect: () => PI(n.value),
12372
+ children: n.label
12373
+ }, n.label)),
12374
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
12375
+ wI.filter((n) => n !== "transparent").map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12376
+ className: "ContextMenuItem",
12377
+ onPointerDown: stopProp,
12378
+ onSelect: () => FI(n),
12379
+ children: [/* @__PURE__ */ jsx("div", { style: {
12380
+ width: 12,
12381
+ height: 12,
12382
+ backgroundColor: n,
12383
+ marginRight: 8,
12384
+ border: "1px solid #ccc"
12385
+ } }), n]
12386
+ }, n)),
12387
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
12388
+ /* @__PURE__ */ jsx(Item2$1, {
12389
+ className: "ContextMenuItem",
12390
+ onPointerDown: stopProp,
12391
+ onSelect: () => kI("boxShadowColor", "#000000"),
12392
+ children: "Outra Cor..."
12393
+ })
12394
+ ]
12395
+ }) })] }),
12396
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
12397
+ className: "ContextMenuSubTrigger",
12398
+ onPointerDown: stopProp,
12399
+ children: ["Borda", /* @__PURE__ */ jsx("div", {
12400
+ className: "RightSlot",
12401
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
12402
+ })]
12403
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsxs(SubContent2$1, {
12404
+ className: "ContextMenuSubContent",
12405
+ sideOffset: 2,
12406
+ alignOffset: -5,
12407
+ children: [
12408
+ TI.map((n) => /* @__PURE__ */ jsx(Item2$1, {
12409
+ className: "ContextMenuItem",
12410
+ onPointerDown: stopProp,
12411
+ onSelect: () => jI(n),
12412
+ children: n === 0 ? "Sem Borda" : `${n}px`
12413
+ }, n)),
12414
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
12415
+ EI.map((n) => /* @__PURE__ */ jsx(Item2$1, {
12254
12416
  className: "ContextMenuItem",
12255
12417
  onPointerDown: stopProp,
12256
- onSelect: () => yI({ backgroundColor: n }),
12418
+ onSelect: () => MI(n),
12419
+ children: n
12420
+ }, n)),
12421
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
12422
+ wI.map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12423
+ className: "ContextMenuItem",
12424
+ onPointerDown: stopProp,
12425
+ onSelect: () => NI(n),
12257
12426
  children: [/* @__PURE__ */ jsx("div", { style: {
12258
12427
  width: 12,
12259
12428
  height: 12,
@@ -12266,7 +12435,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12266
12435
  /* @__PURE__ */ jsx(Item2$1, {
12267
12436
  className: "ContextMenuItem",
12268
12437
  onPointerDown: stopProp,
12269
- onSelect: () => wI("backgroundColor", _.style?.backgroundColor || "transparent"),
12438
+ onSelect: () => kI("borderColor", _.style?.borderColor || "#000000"),
12270
12439
  children: "Outra Cor..."
12271
12440
  })
12272
12441
  ]
@@ -12294,7 +12463,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12294
12463
  ].map((n) => /* @__PURE__ */ jsx(Item2$1, {
12295
12464
  className: "ContextMenuItem",
12296
12465
  onPointerDown: stopProp,
12297
- onSelect: () => yI({ borderRadius: typeof n == "number" ? `${n}px` : n }),
12466
+ onSelect: () => bI({ borderRadius: typeof n == "number" ? `${n}px` : n }),
12298
12467
  children: n === "50%" ? "Círculo" : `${n}px`
12299
12468
  }, n)),
12300
12469
  /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
@@ -12302,7 +12471,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12302
12471
  className: "ContextMenuItem",
12303
12472
  onPointerDown: stopProp,
12304
12473
  onSelect: () => {
12305
- eI("style"), XF(!0);
12474
+ tI("style"), ZF(!0);
12306
12475
  },
12307
12476
  children: "Personalizar..."
12308
12477
  })
@@ -12331,7 +12500,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12331
12500
  ].map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12332
12501
  className: "ContextMenuItem",
12333
12502
  onPointerDown: stopProp,
12334
- onSelect: () => yI({ padding: `${n}px` }),
12503
+ onSelect: () => bI({ padding: `${n}px` }),
12335
12504
  children: [n, "px"]
12336
12505
  }, n)),
12337
12506
  /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
@@ -12339,7 +12508,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12339
12508
  className: "ContextMenuItem",
12340
12509
  onPointerDown: stopProp,
12341
12510
  onSelect: () => {
12342
- eI("style"), XF(!0);
12511
+ tI("style"), ZF(!0);
12343
12512
  },
12344
12513
  children: "Personalizar..."
12345
12514
  })
@@ -12349,55 +12518,65 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12349
12518
  }) })] })
12350
12519
  ] });
12351
12520
  }, DraggableElement = React.memo(({ element: n, isSelected: _ }) => {
12352
- let { selectElement: E, updateElement: O, updateElements: A, state: j, resizeGroup: M, setSnapLines: N } = useEditor(), [P, z] = useState(!1), [B, H] = useState(!1), [U, W] = useState(!1), Z = useRef(null), KF = useRef({
12521
+ let { selectElement: E, updateElement: O, updateElements: A, state: j, resizeGroup: M, setSnapLines: N } = useEditor(), [P, z] = useState(!1), [B, H] = useState(!1), [U, W] = useState(!1), Z = useRef(null), qF = useRef({
12353
12522
  x: 0,
12354
12523
  y: 0
12355
- }), qF = useRef({}), JF = useRef(!1), YF = useRef(!1), XF = useRef(0), $F = useRef(0), eI = useRef({
12524
+ }), JF = useRef({}), YF = useRef(!1), XF = useRef(!1), ZF = useRef(0), eI = useRef(0), tI = useRef({
12356
12525
  x: 0,
12357
12526
  y: 0
12358
- }), tI = useRef(!1), nI = j.canvasHeight || 150, rI = j.isList ? j.mockData.length > 0 ? j.mockData[0] : null : j.singleMockData, iI = n.content, sI = {};
12359
- if (rI) {
12360
- if (n.type === "text" || n.type === "text-container") iI = iI.replace(/\{\{(.*?)\}\}/g, (_, E) => {
12361
- let O = rI[E.trim()];
12527
+ }), nI = useRef(!1), rI = j.canvasHeight || 150, iI = j.isList ? j.mockData.length > 0 ? j.mockData[0] : null : j.singleMockData, aI = n.content, cI = {}, lI = (n, _) => {
12528
+ if (!n || n === "none") return `0 4px 12px ${_}`;
12529
+ let E = n.split(","), O = E[E.length - 1].trim(), A = /(rgba?\([^)]+\)|#(?:[0-9a-fA-F]{3,8})|[a-zA-Z]+)\s*$/, j = A.test(O) ? O.replace(A, _) : `${O} ${_}`;
12530
+ return E[E.length - 1] = j, E.join(", ");
12531
+ };
12532
+ if (iI) {
12533
+ if (n.type === "text" || n.type === "text-container") aI = aI.replace(/\{\{(.*?)\}\}/g, (_, E) => {
12534
+ let O = iI[E.trim()];
12362
12535
  return O == null ? _ : n.formatting ? formatValue$1(O, n.formatting) : String(O);
12363
12536
  });
12364
12537
  else if (n.type === "image") if (n.dataBinding) {
12365
- let _ = rI[n.dataBinding];
12366
- _ != null && (iI = String(_));
12367
- } else iI = iI.replace(/\{\{(.*?)\}\}/g, (n, _) => {
12368
- let E = rI[_.trim()];
12538
+ let _ = iI[n.dataBinding];
12539
+ _ != null && (aI = String(_));
12540
+ } else aI = aI.replace(/\{\{(.*?)\}\}/g, (n, _) => {
12541
+ let E = iI[_.trim()];
12369
12542
  return E == null ? n : String(E);
12370
12543
  });
12371
- n.styleBindings && Object.entries(n.styleBindings).forEach(([n, _]) => {
12372
- let E = rI[_];
12373
- E != null && (sI = {
12374
- ...sI,
12375
- [n]: String(E)
12376
- });
12544
+ n.styleBindings && Object.entries(n.styleBindings).forEach(([_, E]) => {
12545
+ let O = iI[E];
12546
+ if (O != null) if (_ === "boxShadowColor") {
12547
+ let _ = cI.boxShadow || n.style?.boxShadow;
12548
+ cI = {
12549
+ ...cI,
12550
+ boxShadow: lI(_, String(O))
12551
+ };
12552
+ } else cI = {
12553
+ ...cI,
12554
+ [_]: String(O)
12555
+ };
12377
12556
  }), n.conditions && n.conditions.forEach((n) => {
12378
- let _ = rI[n.property];
12379
- checkCondition$1(_, n.operator, n.value) && (sI = {
12380
- ...sI,
12557
+ let _ = iI[n.property];
12558
+ checkCondition$1(_, n.operator, n.value) && (cI = {
12559
+ ...cI,
12381
12560
  ...n.style
12382
12561
  });
12383
12562
  });
12384
12563
  }
12385
- let cI = sI.display === "none";
12386
- if (cI && _) {
12387
- let { display: n, ..._ } = sI;
12388
- sI = _;
12564
+ let uI = cI.display === "none";
12565
+ if (uI && _) {
12566
+ let { display: n, ..._ } = cI;
12567
+ cI = _;
12389
12568
  }
12390
- let lI = (_) => {
12391
- _.stopPropagation(), !JF.current && !YF.current && !P && (_.shiftKey ? E(n.id, !0) : E(n.id, !1));
12392
- }, uI = (O) => {
12569
+ let dI = (_) => {
12570
+ _.stopPropagation(), !YF.current && !XF.current && !P && (_.shiftKey ? E(n.id, !0) : E(n.id, !1));
12571
+ }, fI = (O) => {
12393
12572
  if (n.locked || O.button !== 0) return;
12394
12573
  O.stopPropagation();
12395
12574
  let A = O.shiftKey;
12396
- if (JF.current = !1, YF.current = !1, n.groupId && !_) {
12575
+ if (YF.current = !1, XF.current = !1, n.groupId && !_) {
12397
12576
  E(n.groupId, A);
12398
12577
  return;
12399
12578
  }
12400
- _ || (E(n.id, A), YF.current = !0), z(!0), KF.current = {
12579
+ _ || (E(n.id, A), XF.current = !0), z(!0), qF.current = {
12401
12580
  x: O.clientX,
12402
12581
  y: O.clientY
12403
12582
  }, O.currentTarget.setPointerCapture(O.pointerId);
@@ -12409,17 +12588,17 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12409
12588
  x: n.x,
12410
12589
  y: n.y
12411
12590
  });
12412
- }), qF.current = N;
12413
- }, dI = (_) => {
12591
+ }), JF.current = N;
12592
+ }, pI = (_) => {
12414
12593
  if (P) {
12415
- let E = j.zoom || 1, O = (_.clientX - KF.current.x) / E, M = (_.clientY - KF.current.y) / E;
12416
- (Math.abs(O) > 2 || Math.abs(M) > 2) && (JF.current = !0);
12417
- let P = 5 / E, z = [], B = Object.entries(qF.current).map(([_, E]) => {
12594
+ let E = j.zoom || 1, O = (_.clientX - qF.current.x) / E, M = (_.clientY - qF.current.y) / E;
12595
+ (Math.abs(O) > 2 || Math.abs(M) > 2) && (YF.current = !0);
12596
+ let P = 5 / E, z = [], B = Object.entries(JF.current).map(([_, E]) => {
12418
12597
  let A = E.x + O, N = E.y + M;
12419
12598
  if (j.gridSize > 0) A = Math.round(A / j.gridSize) * j.gridSize, N = Math.round(N / j.gridSize) * j.gridSize;
12420
12599
  else {
12421
12600
  let E = !1, O = !1, M = n.width ?? 100, B = n.height ?? 100;
12422
- Object.keys(qF.current).length === 1 && j.elements.forEach((n) => {
12601
+ Object.keys(JF.current).length === 1 && j.elements.forEach((n) => {
12423
12602
  if (n.id === _) return;
12424
12603
  let j = n.width ?? 100, H = n.height ?? 100;
12425
12604
  E || (Math.abs(A - n.x) < P ? (A = n.x, E = !0, z.push({
@@ -12452,7 +12631,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12452
12631
  if (A = Math.max(0, A), j.isList) {
12453
12632
  N = Math.max(0, N);
12454
12633
  let _ = n.height ?? 100;
12455
- nI > 0 && (N = Math.min(N, nI - _)), N = Math.max(0, N);
12634
+ rI > 0 && (N = Math.min(N, rI - _)), N = Math.max(0, N);
12456
12635
  }
12457
12636
  return {
12458
12637
  id: _,
@@ -12464,25 +12643,25 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12464
12643
  });
12465
12644
  N && N(z), A(B, !1);
12466
12645
  }
12467
- }, fI = (n) => {
12646
+ }, mI = (n) => {
12468
12647
  P && (z(!1), n.currentTarget.releasePointerCapture(n.pointerId), A([], !0), N && N([]));
12469
- }, pI = (_) => {
12648
+ }, hI = (_) => {
12470
12649
  _.stopPropagation(), _.preventDefault(), W(!0);
12471
12650
  let E = _.target.closest(".resizable-element");
12472
12651
  if (E) {
12473
12652
  let O = E.getBoundingClientRect();
12474
- eI.current = {
12653
+ tI.current = {
12475
12654
  x: O.left + O.width / 2,
12476
12655
  y: O.top + O.height / 2
12477
12656
  };
12478
- let A = _.clientX - eI.current.x, j = _.clientY - eI.current.y;
12479
- XF.current = Math.atan2(j, A) * (180 / Math.PI), $F.current = n.rotation || 0;
12657
+ let A = _.clientX - tI.current.x, j = _.clientY - tI.current.y;
12658
+ ZF.current = Math.atan2(j, A) * (180 / Math.PI), eI.current = n.rotation || 0;
12480
12659
  }
12481
12660
  };
12482
12661
  useEffect(() => {
12483
12662
  let _ = (_) => {
12484
12663
  if (U) {
12485
- let E = _.clientX - eI.current.x, A = _.clientY - eI.current.y, j = Math.atan2(A, E) * (180 / Math.PI) - XF.current, M = ($F.current + j) % 360;
12664
+ let E = _.clientX - tI.current.x, A = _.clientY - tI.current.y, j = Math.atan2(A, E) * (180 / Math.PI) - ZF.current, M = (eI.current + j) % 360;
12486
12665
  O(n.id, { rotation: M }, !1);
12487
12666
  }
12488
12667
  }, E = () => {
@@ -12504,7 +12683,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12504
12683
  }
12505
12684
  });
12506
12685
  }, [
12507
- iI,
12686
+ aI,
12508
12687
  n.autoGrow,
12509
12688
  n.containerExpansion,
12510
12689
  n.style,
@@ -12514,7 +12693,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12514
12693
  n.id,
12515
12694
  n.type
12516
12695
  ]);
12517
- let mI = {
12696
+ let gI = {
12518
12697
  position: "relative",
12519
12698
  left: 0,
12520
12699
  top: 0,
@@ -12532,7 +12711,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12532
12711
  userSelect: "none",
12533
12712
  boxSizing: "border-box",
12534
12713
  ...n.style,
12535
- ...sI
12714
+ ...cI
12536
12715
  };
12537
12716
  return /* @__PURE__ */ jsx(Resizable, {
12538
12717
  className: "resizable-element",
@@ -12540,9 +12719,9 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12540
12719
  width: n.width ?? 100,
12541
12720
  height: n.autoGrow ? "auto" : n.height ?? 100
12542
12721
  },
12543
- maxHeight: j.isList ? Math.max(10, nI - n.y) : void 0,
12722
+ maxHeight: j.isList ? Math.max(10, rI - n.y) : void 0,
12544
12723
  onResizeStart: (n) => {
12545
- H(!0), tI.current = !!n.shiftKey;
12724
+ H(!0), nI.current = !!n.shiftKey;
12546
12725
  },
12547
12726
  onResizeStop: (_, E, A, j) => {
12548
12727
  H(!1);
@@ -12677,8 +12856,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12677
12856
  position: "absolute",
12678
12857
  transform: `translate(${n.x ?? 0}px, ${n.y ?? 0}px) rotate(${n.rotation || 0}deg)`,
12679
12858
  height: n.autoGrow ? "auto" : void 0,
12680
- display: cI && !_ ? "none" : void 0,
12681
- opacity: cI && _ ? .4 : 1,
12859
+ display: uI && !_ ? "none" : void 0,
12860
+ opacity: uI && _ ? .4 : 1,
12682
12861
  zIndex: _ ? 1e3 : void 0,
12683
12862
  outline: "none",
12684
12863
  overflow: "visible"
@@ -12693,7 +12872,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12693
12872
  bottomLeft: !1,
12694
12873
  topLeft: !1
12695
12874
  } : void 0,
12696
- lockAspectRatio: tI.current,
12875
+ lockAspectRatio: nI.current,
12697
12876
  grid: j.gridSize > 0 ? [j.gridSize, j.gridSize] : void 0,
12698
12877
  children: /* @__PURE__ */ jsx(ElementContextMenu, {
12699
12878
  element: n,
@@ -12706,18 +12885,18 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12706
12885
  children: [/* @__PURE__ */ jsxs(p, {
12707
12886
  ref: Z,
12708
12887
  style: {
12709
- ...mI,
12710
- whiteSpace: n.type === "text-container" && n.autoGrow && n.containerExpansion === "horizontal" ? "nowrap" : mI.whiteSpace,
12888
+ ...gI,
12889
+ whiteSpace: n.type === "text-container" && n.autoGrow && n.containerExpansion === "horizontal" ? "nowrap" : gI.whiteSpace,
12711
12890
  width: n.type === "text-container" && n.autoGrow && n.containerExpansion === "horizontal" ? "max-content" : "100%",
12712
12891
  height: n.type === "text-container" && n.autoGrow && n.containerExpansion === "vertical" ? "auto" : "100%"
12713
12892
  },
12714
- onPointerDown: uI,
12715
- onPointerMove: dI,
12716
- onPointerUp: fI,
12893
+ onPointerDown: fI,
12894
+ onPointerMove: pI,
12895
+ onPointerUp: mI,
12717
12896
  onMouseDown: (n) => {
12718
12897
  n.button === 0 && n.stopPropagation();
12719
12898
  },
12720
- onClick: lI,
12899
+ onClick: dI,
12721
12900
  title: n.name,
12722
12901
  onMouseEnter: (n) => {
12723
12902
  _ || (n.currentTarget.style.borderColor = "var(--gray-6)");
@@ -12748,7 +12927,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12748
12927
  width: "100%",
12749
12928
  height: "100%"
12750
12929
  },
12751
- children: iI
12930
+ children: aI
12752
12931
  }),
12753
12932
  n.type === "text-container" && /* @__PURE__ */ jsx(p$2, {
12754
12933
  style: {
@@ -12756,10 +12935,10 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12756
12935
  height: "100%",
12757
12936
  display: "block"
12758
12937
  },
12759
- children: iI
12938
+ children: aI
12760
12939
  }),
12761
- n.type === "image" && (iI ? /* @__PURE__ */ jsx("img", {
12762
- src: iI,
12940
+ n.type === "image" && (aI ? /* @__PURE__ */ jsx("img", {
12941
+ src: aI,
12763
12942
  alt: "Element",
12764
12943
  style: {
12765
12944
  width: "100%",
@@ -12825,7 +13004,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12825
13004
  zIndex: 50,
12826
13005
  boxShadow: "0 0 0 2px white"
12827
13006
  },
12828
- onMouseDown: pI,
13007
+ onMouseDown: hI,
12829
13008
  onPointerDown: (n) => n.stopPropagation(),
12830
13009
  children: /* @__PURE__ */ jsx(p, { style: {
12831
13010
  position: "absolute",
@@ -12855,74 +13034,74 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12855
13034
  borderTop: n.orientation === "horizontal" ? "1px dashed #ff0000" : "none"
12856
13035
  } }, _)) });
12857
13036
  }, Canvas = () => {
12858
- let { state: n, selectElement: _, setSelectedElements: E, addElement: O, setZoom: A, setPan: j, undo: M, redo: N, copy: P, paste: z, removeSelected: B, updateElements: H } = useEditor(), W = useRef(null), [Z, KF] = useState(null), qF = useRef(!1), JF = useRef(!1), YF = useRef(!1), XF = useRef({
13037
+ let { state: n, selectElement: _, setSelectedElements: E, addElement: O, setZoom: A, setPan: j, undo: M, redo: N, copy: P, paste: z, removeSelected: B, updateElements: H } = useEditor(), W = useRef(null), [Z, qF] = useState(null), JF = useRef(!1), YF = useRef(!1), XF = useRef(!1), ZF = useRef({
12859
13038
  x: 0,
12860
13039
  y: 0
12861
- }), $F = useRef({
13040
+ }), eI = useRef({
12862
13041
  x: 0,
12863
13042
  y: 0
12864
- }), eI = useRef([]), tI = useRef([]), nI = useRef(n), rI = useRef(0);
13043
+ }), tI = useRef([]), nI = useRef([]), rI = useRef(n), iI = useRef(0);
12865
13044
  useEffect(() => {
12866
- nI.current = n;
13045
+ rI.current = n;
12867
13046
  }, [n]);
12868
- let iI = useCallback((n) => {
13047
+ let aI = useCallback((n) => {
12869
13048
  if (!W.current) return;
12870
- let _ = nI.current;
12871
- if (JF.current) {
12872
- let E = n.clientX - $F.current.x, O = n.clientY - $F.current.y;
13049
+ let _ = rI.current;
13050
+ if (YF.current) {
13051
+ let E = n.clientX - eI.current.x, O = n.clientY - eI.current.y;
12873
13052
  j({
12874
13053
  x: _.pan.x + E,
12875
13054
  y: _.pan.y + O
12876
- }), $F.current = {
13055
+ }), eI.current = {
12877
13056
  x: n.clientX,
12878
13057
  y: n.clientY
12879
13058
  };
12880
13059
  return;
12881
13060
  }
12882
- if (!qF.current) return;
12883
- let O = W.current.getBoundingClientRect(), A = (n.clientX - O.left - _.pan.x) / _.zoom, M = (n.clientY - O.top - _.pan.y) / _.zoom, N = Math.min(XF.current.x, A), P = Math.min(XF.current.y, M), z = Math.abs(A - XF.current.x), B = Math.abs(M - XF.current.y);
12884
- KF({
13061
+ if (!JF.current) return;
13062
+ let O = W.current.getBoundingClientRect(), A = (n.clientX - O.left - _.pan.x) / _.zoom, M = (n.clientY - O.top - _.pan.y) / _.zoom, N = Math.min(ZF.current.x, A), P = Math.min(ZF.current.y, M), z = Math.abs(A - ZF.current.x), B = Math.abs(M - ZF.current.y);
13063
+ qF({
12885
13064
  x: N,
12886
13065
  y: P,
12887
13066
  width: z,
12888
13067
  height: B
12889
13068
  });
12890
13069
  let H = Date.now();
12891
- if (!(H - rI.current < 50) && (z > 0 || B > 0)) {
13070
+ if (!(H - iI.current < 50) && (z > 0 || B > 0)) {
12892
13071
  let n = [];
12893
13072
  _.elements.forEach((_) => {
12894
13073
  let E = _.x ?? 0, O = _.y ?? 0, A = _.width ?? 100, j = _.height ?? 100, M = E + A, H = O + j, U = N + z, W = P + B;
12895
13074
  E < U && M > N && O < W && H > P && n.push(_.id);
12896
13075
  });
12897
- let O = Array.from(new Set([...eI.current, ...n])), A = tI.current;
12898
- A.length === O.length && A.every((n) => O.includes(n)) || (E(O), tI.current = O, rI.current = H);
13076
+ let O = Array.from(new Set([...tI.current, ...n])), A = nI.current;
13077
+ A.length === O.length && A.every((n) => O.includes(n)) || (E(O), nI.current = O, iI.current = H);
12899
13078
  }
12900
- }, [E, j]), sI = useCallback((n) => {
12901
- (qF.current || JF.current) && n.target.releasePointerCapture(n.pointerId), qF.current = !1, JF.current = !1, KF(null);
12902
- }, []), cI = (E) => {
13079
+ }, [E, j]), cI = useCallback((n) => {
13080
+ (JF.current || YF.current) && n.target.releasePointerCapture(n.pointerId), JF.current = !1, YF.current = !1, qF(null);
13081
+ }, []), lI = (E) => {
12903
13082
  if (E.button === 2) return;
12904
13083
  let O = E.target;
12905
13084
  if (O.closest(".resize-handle") || O.closest(".rotate-handle")) return;
12906
- if (E.currentTarget.setPointerCapture(E.pointerId), E.button === 1 || E.button === 0 && YF.current) {
12907
- E.preventDefault(), JF.current = !0, $F.current = {
13085
+ if (E.currentTarget.setPointerCapture(E.pointerId), E.button === 1 || E.button === 0 && XF.current) {
13086
+ E.preventDefault(), YF.current = !0, eI.current = {
12908
13087
  x: E.clientX,
12909
13088
  y: E.clientY
12910
13089
  };
12911
13090
  return;
12912
13091
  }
12913
- qF.current = E.shiftKey;
13092
+ JF.current = E.shiftKey;
12914
13093
  let A = W.current?.getBoundingClientRect();
12915
13094
  if (!A) return;
12916
13095
  let j = A.left, M = A.top;
12917
- XF.current = {
13096
+ ZF.current = {
12918
13097
  x: (E.clientX - j - n.pan.x) / n.zoom,
12919
13098
  y: (E.clientY - M - n.pan.y) / n.zoom
12920
- }, eI.current = n.selectedElementIds, tI.current = n.selectedElementIds, E.shiftKey || (_(null), eI.current = [], tI.current = []);
13099
+ }, tI.current = n.selectedElementIds, nI.current = n.selectedElementIds, E.shiftKey || (_(null), tI.current = [], nI.current = []);
12921
13100
  };
12922
13101
  useEffect(() => {
12923
13102
  let n = (n) => {
12924
13103
  n.preventDefault();
12925
- let _ = nI.current;
13104
+ let _ = rI.current;
12926
13105
  if (n.ctrlKey || n.metaKey) A(Math.min(Math.max(.1, _.zoom - n.deltaY * .001), 5));
12927
13106
  else {
12928
13107
  let E = n.shiftKey ? n.deltaY : n.deltaX, O = n.shiftKey ? n.deltaX : n.deltaY;
@@ -12937,7 +13116,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12937
13116
  };
12938
13117
  }, [A, j]), useEffect(() => {
12939
13118
  let _ = (_) => {
12940
- if (_.code === "Space" && !_.repeat && !(_.target instanceof HTMLInputElement || _.target instanceof HTMLTextAreaElement) && (YF.current = !0, W.current && (W.current.style.cursor = "grab")), !(_.target instanceof HTMLInputElement || _.target instanceof HTMLTextAreaElement) && ((_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "z" && (_.preventDefault(), _.shiftKey ? N() : M()), (_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "y" && (_.preventDefault(), N()), (_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "c" && (_.preventDefault(), P()), (_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "v" && (_.preventDefault(), z()), (_.key === "Delete" || _.key === "Backspace") && (_.preventDefault(), B()), [
13119
+ if (_.code === "Space" && !_.repeat && !(_.target instanceof HTMLInputElement || _.target instanceof HTMLTextAreaElement) && (XF.current = !0, W.current && (W.current.style.cursor = "grab")), !(_.target instanceof HTMLInputElement || _.target instanceof HTMLTextAreaElement) && ((_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "z" && (_.preventDefault(), _.shiftKey ? N() : M()), (_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "y" && (_.preventDefault(), N()), (_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "c" && (_.preventDefault(), P()), (_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "v" && (_.preventDefault(), z()), (_.key === "Delete" || _.key === "Backspace") && (_.preventDefault(), B()), [
12941
13120
  "ArrowUp",
12942
13121
  "ArrowDown",
12943
13122
  "ArrowLeft",
@@ -12965,7 +13144,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12965
13144
  }), O.length > 0 && H(O);
12966
13145
  }
12967
13146
  }, E = (n) => {
12968
- n.code === "Space" && (YF.current = !1, W.current && !JF.current && (W.current.style.cursor = "default"));
13147
+ n.code === "Space" && (XF.current = !1, W.current && !YF.current && (W.current.style.cursor = "default"));
12969
13148
  };
12970
13149
  return window.addEventListener("keydown", _), window.addEventListener("keyup", E), () => {
12971
13150
  window.removeEventListener("keydown", _), window.removeEventListener("keyup", E);
@@ -12980,21 +13159,21 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12980
13159
  n.selectedElementIds,
12981
13160
  n.elements
12982
13161
  ]);
12983
- let lI = useRef(!1), { setCanvasHeight: uI } = useEditor(), dI = (n) => {
12984
- n.stopPropagation(), n.preventDefault(), lI.current = !0, window.addEventListener("mousemove", fI), window.addEventListener("mouseup", pI);
12985
- }, fI = useCallback((n) => {
12986
- if (!lI.current || !W.current) return;
13162
+ let uI = useRef(!1), { setCanvasHeight: dI } = useEditor(), fI = (n) => {
13163
+ n.stopPropagation(), n.preventDefault(), uI.current = !0, window.addEventListener("mousemove", pI), window.addEventListener("mouseup", mI);
13164
+ }, pI = useCallback((n) => {
13165
+ if (!uI.current || !W.current) return;
12987
13166
  let _ = W.current.getBoundingClientRect(), E = n.clientY - _.top, O = Math.max(50, Math.min(E, 2e3));
12988
- uI(Math.round(O));
12989
- }, [uI]), pI = useCallback(() => {
12990
- lI.current = !1, window.removeEventListener("mousemove", fI), window.removeEventListener("mouseup", pI);
12991
- }, [fI]);
13167
+ dI(Math.round(O));
13168
+ }, [dI]), mI = useCallback(() => {
13169
+ uI.current = !1, window.removeEventListener("mousemove", pI), window.removeEventListener("mouseup", mI);
13170
+ }, [pI]);
12992
13171
  useEffect(() => () => {
12993
- window.removeEventListener("mousemove", fI), window.removeEventListener("mouseup", pI);
12994
- }, [fI, pI]);
12995
- let mI = (n) => {
13172
+ window.removeEventListener("mousemove", pI), window.removeEventListener("mouseup", mI);
13173
+ }, [pI, mI]);
13174
+ let hI = (n) => {
12996
13175
  n.preventDefault(), n.dataTransfer.dropEffect = "copy";
12997
- }, hI = (_) => {
13176
+ }, gI = (_) => {
12998
13177
  _.preventDefault();
12999
13178
  let E = _.currentTarget.getBoundingClientRect(), A = (_.clientX - E.left - n.pan.x) / n.zoom, j = (_.clientY - E.top - n.pan.y) / n.zoom, M = _.dataTransfer.getData("application/x-editor-prop");
13000
13179
  if (M) {
@@ -13024,25 +13203,25 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13024
13203
  } catch (n) {
13025
13204
  console.error("Failed to parse asset", n);
13026
13205
  }
13027
- }, gI = n.canvasHeight || 150;
13206
+ }, _I = n.canvasHeight || 150;
13028
13207
  return /* @__PURE__ */ jsxs(p, {
13029
13208
  ref: W,
13030
- onPointerDown: cI,
13209
+ onPointerDown: lI,
13031
13210
  onPointerMove: (n) => {
13032
- (qF.current || JF.current) && iI(n.nativeEvent);
13211
+ (JF.current || YF.current) && aI(n.nativeEvent);
13033
13212
  },
13034
13213
  onPointerUp: (n) => {
13035
- (qF.current || JF.current) && sI(n.nativeEvent);
13214
+ (JF.current || YF.current) && cI(n.nativeEvent);
13036
13215
  },
13037
- onDragOver: mI,
13038
- onDrop: hI,
13216
+ onDragOver: hI,
13217
+ onDrop: gI,
13039
13218
  style: {
13040
13219
  width: "100%",
13041
13220
  height: "100%",
13042
13221
  position: "relative",
13043
13222
  overflow: "hidden",
13044
13223
  backgroundColor: "var(--gray-1)",
13045
- cursor: JF.current ? "grabbing" : "default",
13224
+ cursor: YF.current ? "grabbing" : "default",
13046
13225
  backgroundImage: "radial-gradient(var(--gray-5) 1px, transparent 1px)",
13047
13226
  backgroundSize: `${20 * n.zoom}px ${20 * n.zoom}px`,
13048
13227
  backgroundPosition: `${n.pan.x}px ${n.pan.y}px`
@@ -13106,7 +13285,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13106
13285
  n.isList && /* @__PURE__ */ jsxs("div", {
13107
13286
  style: {
13108
13287
  position: "absolute",
13109
- top: gI,
13288
+ top: _I,
13110
13289
  left: 0,
13111
13290
  right: 0,
13112
13291
  height: "10px",
@@ -13117,7 +13296,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13117
13296
  alignItems: "center",
13118
13297
  justifyContent: "center"
13119
13298
  },
13120
- onMouseDown: dI,
13299
+ onMouseDown: fI,
13121
13300
  children: [/* @__PURE__ */ jsx("div", { style: {
13122
13301
  width: "100%",
13123
13302
  height: "2px",
@@ -13141,7 +13320,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13141
13320
  },
13142
13321
  children: [
13143
13322
  "Altura do Item: ",
13144
- gI,
13323
+ _I,
13145
13324
  "px"
13146
13325
  ]
13147
13326
  })]
@@ -13201,22 +13380,22 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13201
13380
  ]
13202
13381
  });
13203
13382
  }, EditorSettings = () => {
13204
- let { state: n, updateListSettings: _, setCanvasHeight: E, setGridSize: O } = useEditor(), [A, j] = useState(!1), [M, N] = useState(""), [P, z] = useState("asc"), [B, H] = useState("bottom"), [U, W] = useState("down"), [Z, KF] = useState("150"), [qF, JF] = useState(""), [YF, XF] = useState("0"), [ZF, $F] = useState("slideIn"), [eI, tI] = useState(.3), [nI, rI] = useState("ease-out");
13383
+ let { state: n, updateListSettings: _, setCanvasHeight: E, setGridSize: O } = useEditor(), [A, j] = useState(!1), [M, N] = useState(""), [P, z] = useState("asc"), [B, H] = useState("bottom"), [U, W] = useState("down"), [Z, qF] = useState("150"), [JF, YF] = useState(""), [XF, ZF] = useState("0"), [QF, eI] = useState("slideIn"), [tI, nI] = useState(.3), [rI, iI] = useState("ease-out");
13205
13384
  return useEffect(() => {
13206
13385
  if (A) {
13207
- N(n.listSettings.sortProp || "__none__"), z(n.listSettings.sortOrder || "asc"), H(n.listSettings.newestPosition || "bottom"), W(n.listSettings.scrollDirection || "down"), JF(n.listSettings.containerHeight ? String(n.listSettings.containerHeight) : ""), KF(String(n.canvasHeight || 150)), XF(String(n.gridSize || 0));
13386
+ N(n.listSettings.sortProp || "__none__"), z(n.listSettings.sortOrder || "asc"), H(n.listSettings.newestPosition || "bottom"), W(n.listSettings.scrollDirection || "down"), YF(n.listSettings.containerHeight ? String(n.listSettings.containerHeight) : ""), qF(String(n.canvasHeight || 150)), ZF(String(n.gridSize || 0));
13208
13387
  let _ = n.listSettings.entryAnimation;
13209
- $F(_?.type || "slideIn"), tI(_?.duration || .3), rI(_?.timingFunction || "ease-out");
13388
+ eI(_?.type || "slideIn"), nI(_?.duration || .3), iI(_?.timingFunction || "ease-out");
13210
13389
  }
13211
13390
  }, [A]), useEffect(() => {
13212
13391
  if (!A) return;
13213
13392
  let _ = parseInt(Z, 10);
13214
13393
  !isNaN(_) && _ > 0 && n.canvasHeight !== _ && E(_);
13215
- let j = parseInt(YF, 10);
13394
+ let j = parseInt(XF, 10);
13216
13395
  !isNaN(j) && j >= 0 && n.gridSize !== j && O(j);
13217
13396
  }, [
13218
13397
  Z,
13219
- YF,
13398
+ XF,
13220
13399
  A,
13221
13400
  E,
13222
13401
  O,
@@ -13395,7 +13574,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13395
13574
  type: "number",
13396
13575
  min: "10",
13397
13576
  value: Z,
13398
- onChange: (n) => KF(n.target.value)
13577
+ onChange: (n) => qF(n.target.value)
13399
13578
  }),
13400
13579
  /* @__PURE__ */ jsx(p$2, {
13401
13580
  size: "1",
@@ -13416,8 +13595,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13416
13595
  type: "number",
13417
13596
  min: "0",
13418
13597
  placeholder: "Auto (100%)",
13419
- value: qF,
13420
- onChange: (n) => JF(n.target.value)
13598
+ value: JF,
13599
+ onChange: (n) => YF(n.target.value)
13421
13600
  }),
13422
13601
  /* @__PURE__ */ jsx(p$2, {
13423
13602
  size: "1",
@@ -13443,8 +13622,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13443
13622
  as: "div",
13444
13623
  children: "Efeito"
13445
13624
  }), /* @__PURE__ */ jsxs("select", {
13446
- value: ZF,
13447
- onChange: (n) => $F(n.target.value),
13625
+ value: QF,
13626
+ onChange: (n) => eI(n.target.value),
13448
13627
  style: {
13449
13628
  width: "100%",
13450
13629
  padding: "6px",
@@ -13506,8 +13685,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13506
13685
  type: "number",
13507
13686
  step: "0.1",
13508
13687
  min: "0.1",
13509
- value: eI,
13510
- onChange: (n) => tI(parseFloat(n.target.value) || .3)
13688
+ value: tI,
13689
+ onChange: (n) => nI(parseFloat(n.target.value) || .3)
13511
13690
  })] }),
13512
13691
  /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
13513
13692
  size: "1",
@@ -13515,8 +13694,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13515
13694
  as: "div",
13516
13695
  children: "Curva (Easing)"
13517
13696
  }), /* @__PURE__ */ jsxs("select", {
13518
- value: nI,
13519
- onChange: (n) => rI(n.target.value),
13697
+ value: rI,
13698
+ onChange: (n) => iI(n.target.value),
13520
13699
  style: {
13521
13700
  width: "100%",
13522
13701
  padding: "6px",
@@ -13571,8 +13750,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13571
13750
  children: "Tamanho do Grid (px) - 0 para desativar"
13572
13751
  }), /* @__PURE__ */ jsx(u$1, {
13573
13752
  type: "number",
13574
- value: YF,
13575
- onChange: (n) => XF(n.target.value),
13753
+ value: XF,
13754
+ onChange: (n) => ZF(n.target.value),
13576
13755
  placeholder: "0"
13577
13756
  })]
13578
13757
  })
@@ -13591,11 +13770,11 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13591
13770
  children: "Cancelar"
13592
13771
  }) }), /* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o, {
13593
13772
  onClick: () => {
13594
- let n = parseInt(qF, 10), E = {
13595
- type: ZF,
13596
- duration: Number(eI),
13773
+ let n = parseInt(JF, 10), E = {
13774
+ type: QF,
13775
+ duration: Number(tI),
13597
13776
  delay: 0,
13598
- timingFunction: nI
13777
+ timingFunction: rI
13599
13778
  };
13600
13779
  _({
13601
13780
  sortProp: M === "__none__" ? "" : M,
@@ -14374,7 +14553,7 @@ var defaultKeyboardCodes = {
14374
14553
  let A = n.code, { isTop: j, isRight: N, isLeft: P, isBottom: z, maxScroll: H, minScroll: U } = getScrollPosition(E), W = getScrollElementRect(E), G = {
14375
14554
  x: Math.min(A === KeyboardCode.Right ? W.right - W.width / 2 : W.right, Math.max(A === KeyboardCode.Right ? W.left : W.left + W.width / 2, B.x)),
14376
14555
  y: Math.min(A === KeyboardCode.Down ? W.bottom - W.height / 2 : W.bottom, Math.max(A === KeyboardCode.Down ? W.top : W.top + W.height / 2, B.y))
14377
- }, Z = A === KeyboardCode.Right && !N || A === KeyboardCode.Left && !P, KF = A === KeyboardCode.Down && !z || A === KeyboardCode.Up && !j;
14556
+ }, Z = A === KeyboardCode.Right && !N || A === KeyboardCode.Left && !P, qF = A === KeyboardCode.Down && !z || A === KeyboardCode.Up && !j;
14378
14557
  if (Z && G.x !== B.x) {
14379
14558
  let n = E.scrollLeft + _.x, j = A === KeyboardCode.Right && n <= H.x || A === KeyboardCode.Left && n >= U.x;
14380
14559
  if (j && !_.y) {
@@ -14389,7 +14568,7 @@ var defaultKeyboardCodes = {
14389
14568
  behavior: M
14390
14569
  });
14391
14570
  break;
14392
- } else if (KF && G.y !== B.y) {
14571
+ } else if (qF && G.y !== B.y) {
14393
14572
  let n = E.scrollTop + _.y, j = A === KeyboardCode.Down && n <= H.y || A === KeyboardCode.Up && n >= U.y;
14394
14573
  if (j && !_.x) {
14395
14574
  E.scrollTo({
@@ -14581,13 +14760,13 @@ function useAutoScroller(n) {
14581
14760
  let { acceleration: _, activator: E = AutoScrollActivator.Pointer, canScroll: O, draggingRect: A, enabled: j, interval: M = 5, order: N = TraversalOrder.TreeOrder, pointerCoordinates: P, scrollableAncestors: z, scrollableAncestorRects: B, delta: H, threshold: W } = n, Z = useScrollIntent({
14582
14761
  delta: H,
14583
14762
  disabled: !j
14584
- }), [KF, qF] = useInterval(), JF = useRef({
14763
+ }), [qF, JF] = useInterval(), YF = useRef({
14585
14764
  x: 0,
14586
14765
  y: 0
14587
- }), XF = useRef({
14766
+ }), ZF = useRef({
14588
14767
  x: 0,
14589
14768
  y: 0
14590
- }), QF = useMemo(() => {
14769
+ }), $F = useMemo(() => {
14591
14770
  switch (E) {
14592
14771
  case AutoScrollActivator.Pointer: return P ? {
14593
14772
  top: P.y,
@@ -14601,47 +14780,47 @@ function useAutoScroller(n) {
14601
14780
  E,
14602
14781
  A,
14603
14782
  P
14604
- ]), $F = useRef(null), eI = useCallback(() => {
14605
- let n = $F.current;
14783
+ ]), eI = useRef(null), tI = useCallback(() => {
14784
+ let n = eI.current;
14606
14785
  if (!n) return;
14607
- let _ = JF.current.x * XF.current.x, E = JF.current.y * XF.current.y;
14786
+ let _ = YF.current.x * ZF.current.x, E = YF.current.y * ZF.current.y;
14608
14787
  n.scrollBy(_, E);
14609
- }, []), tI = useMemo(() => N === TraversalOrder.TreeOrder ? [...z].reverse() : z, [N, z]);
14788
+ }, []), nI = useMemo(() => N === TraversalOrder.TreeOrder ? [...z].reverse() : z, [N, z]);
14610
14789
  useEffect(() => {
14611
- if (!j || !z.length || !QF) {
14612
- qF();
14790
+ if (!j || !z.length || !$F) {
14791
+ JF();
14613
14792
  return;
14614
14793
  }
14615
- for (let n of tI) {
14794
+ for (let n of nI) {
14616
14795
  if (O?.(n) === !1) continue;
14617
14796
  let E = B[z.indexOf(n)];
14618
14797
  if (!E) continue;
14619
- let { direction: A, speed: j } = getScrollDirectionAndSpeed(n, E, QF, _, W);
14798
+ let { direction: A, speed: j } = getScrollDirectionAndSpeed(n, E, $F, _, W);
14620
14799
  for (let n of ["x", "y"]) Z[n][A[n]] || (j[n] = 0, A[n] = 0);
14621
14800
  if (j.x > 0 || j.y > 0) {
14622
- qF(), $F.current = n, KF(eI, M), JF.current = j, XF.current = A;
14801
+ JF(), eI.current = n, qF(tI, M), YF.current = j, ZF.current = A;
14623
14802
  return;
14624
14803
  }
14625
14804
  }
14626
- JF.current = {
14805
+ YF.current = {
14627
14806
  x: 0,
14628
14807
  y: 0
14629
- }, XF.current = {
14808
+ }, ZF.current = {
14630
14809
  x: 0,
14631
14810
  y: 0
14632
- }, qF();
14811
+ }, JF();
14633
14812
  }, [
14634
14813
  _,
14635
- eI,
14814
+ tI,
14636
14815
  O,
14637
- qF,
14816
+ JF,
14638
14817
  j,
14639
14818
  M,
14640
- JSON.stringify(QF),
14819
+ JSON.stringify($F),
14641
14820
  JSON.stringify(Z),
14642
- KF,
14821
+ qF,
14643
14822
  z,
14644
- tI,
14823
+ nI,
14645
14824
  B,
14646
14825
  JSON.stringify(W)
14647
14826
  ]);
@@ -14703,9 +14882,9 @@ var MeasuringFrequency;
14703
14882
  })(MeasuringFrequency ||= {});
14704
14883
  var defaultValue = /* @__PURE__ */ new Map();
14705
14884
  function useDroppableMeasuring(n, _) {
14706
- let { dragging: E, dependencies: O, config: A } = _, [j, M] = useState(null), { frequency: N, measure: P, strategy: z } = A, B = useRef(n), H = JF(), W = useLatestValue(H), Z = useCallback(function(n) {
14885
+ let { dragging: E, dependencies: O, config: A } = _, [j, M] = useState(null), { frequency: N, measure: P, strategy: z } = A, B = useRef(n), H = YF(), W = useLatestValue(H), Z = useCallback(function(n) {
14707
14886
  n === void 0 && (n = []), !W.current && M((_) => _ === null ? n : _.concat(n.filter((n) => !_.includes(n))));
14708
- }, [W]), KF = useRef(null), qF = useLazyMemo((_) => {
14887
+ }, [W]), qF = useRef(null), JF = useLazyMemo((_) => {
14709
14888
  if (H && !E) return defaultValue;
14710
14889
  if (!_ || _ === defaultValue || B.current !== n || j != null) {
14711
14890
  let _ = /* @__PURE__ */ new Map();
@@ -14735,8 +14914,8 @@ function useDroppableMeasuring(n, _) {
14735
14914
  }, [E, H]), useEffect(() => {
14736
14915
  j && j.length > 0 && M(null);
14737
14916
  }, [JSON.stringify(j)]), useEffect(() => {
14738
- H || typeof N != "number" || KF.current !== null || (KF.current = setTimeout(() => {
14739
- Z(), KF.current = null;
14917
+ H || typeof N != "number" || qF.current !== null || (qF.current = setTimeout(() => {
14918
+ Z(), qF.current = null;
14740
14919
  }, N));
14741
14920
  }, [
14742
14921
  N,
@@ -14744,11 +14923,11 @@ function useDroppableMeasuring(n, _) {
14744
14923
  Z,
14745
14924
  ...O
14746
14925
  ]), {
14747
- droppableRects: qF,
14926
+ droppableRects: JF,
14748
14927
  measureDroppableContainers: Z,
14749
14928
  measuringScheduled: j != null
14750
14929
  };
14751
- function JF() {
14930
+ function YF() {
14752
14931
  switch (z) {
14753
14932
  case MeasuringStrategy.Always: return !1;
14754
14933
  case MeasuringStrategy.BeforeDragging: return E;
@@ -15173,84 +15352,84 @@ var ActiveDraggableContext = /* @__PURE__ */ createContext({
15173
15352
  n[n.Uninitialized = 0] = "Uninitialized", n[n.Initializing = 1] = "Initializing", n[n.Initialized = 2] = "Initialized";
15174
15353
  })(Status ||= {});
15175
15354
  var DndContext = /* @__PURE__ */ memo(function(n) {
15176
- let { id: E, accessibility: O, autoScroll: A = !0, children: j, sensors: M = defaultSensors, collisionDetection: N = rectIntersection, measuring: P, modifiers: z, ...B } = n, [H, W] = useReducer(reducer, void 0, getInitialState), [Z, KF] = useDndMonitorProvider(), [qF, JF] = useState(Status.Uninitialized), $F = qF === Status.Initialized, { draggable: { active: eI, nodes: tI, translate: nI }, droppable: { containers: iI } } = H, aI = eI == null ? null : tI.get(eI), oI = useRef({
15355
+ let { id: E, accessibility: O, autoScroll: A = !0, children: j, sensors: M = defaultSensors, collisionDetection: N = rectIntersection, measuring: P, modifiers: z, ...B } = n, [H, W] = useReducer(reducer, void 0, getInitialState), [Z, qF] = useDndMonitorProvider(), [JF, YF] = useState(Status.Uninitialized), eI = JF === Status.Initialized, { draggable: { active: tI, nodes: nI, translate: rI }, droppable: { containers: aI } } = H, oI = tI == null ? null : nI.get(tI), sI = useRef({
15177
15356
  initial: null,
15178
15357
  translated: null
15179
- }), sI = useMemo(() => eI == null ? null : {
15180
- id: eI,
15181
- data: aI?.data ?? defaultData,
15182
- rect: oI
15183
- }, [eI, aI]), cI = useRef(null), [lI, uI] = useState(null), [dI, fI] = useState(null), pI = useLatestValue(B, Object.values(B)), mI = useUniqueId("DndDescribedBy", E), hI = useMemo(() => iI.getEnabled(), [iI]), gI = useMeasuringConfiguration(P), { droppableRects: _I, measureDroppableContainers: vI, measuringScheduled: yI } = useDroppableMeasuring(hI, {
15184
- dragging: $F,
15185
- dependencies: [nI.x, nI.y],
15186
- config: gI.droppable
15187
- }), bI = useCachedNode(tI, eI), xI = useMemo(() => dI ? getEventCoordinates(dI) : null, [dI]), SI = $I(), CI = useInitialRect(bI, gI.draggable.measure);
15358
+ }), cI = useMemo(() => tI == null ? null : {
15359
+ id: tI,
15360
+ data: oI?.data ?? defaultData,
15361
+ rect: sI
15362
+ }, [tI, oI]), lI = useRef(null), [uI, dI] = useState(null), [fI, pI] = useState(null), mI = useLatestValue(B, Object.values(B)), hI = useUniqueId("DndDescribedBy", E), gI = useMemo(() => aI.getEnabled(), [aI]), _I = useMeasuringConfiguration(P), { droppableRects: vI, measureDroppableContainers: yI, measuringScheduled: bI } = useDroppableMeasuring(gI, {
15363
+ dragging: eI,
15364
+ dependencies: [rI.x, rI.y],
15365
+ config: _I.droppable
15366
+ }), xI = useCachedNode(nI, tI), SI = useMemo(() => fI ? getEventCoordinates(fI) : null, [fI]), CI = eL(), wI = useInitialRect(xI, _I.draggable.measure);
15188
15367
  useLayoutShiftScrollCompensation({
15189
- activeNode: eI == null ? null : tI.get(eI),
15190
- config: SI.layoutShiftCompensation,
15191
- initialRect: CI,
15192
- measure: gI.draggable.measure
15368
+ activeNode: tI == null ? null : nI.get(tI),
15369
+ config: CI.layoutShiftCompensation,
15370
+ initialRect: wI,
15371
+ measure: _I.draggable.measure
15193
15372
  });
15194
- let wI = useRect(bI, gI.draggable.measure, CI), TI = useRect(bI ? bI.parentElement : null), EI = useRef({
15373
+ let TI = useRect(xI, _I.draggable.measure, wI), EI = useRect(xI ? xI.parentElement : null), DI = useRef({
15195
15374
  activatorEvent: null,
15196
15375
  active: null,
15197
- activeNode: bI,
15376
+ activeNode: xI,
15198
15377
  collisionRect: null,
15199
15378
  collisions: null,
15200
- droppableRects: _I,
15201
- draggableNodes: tI,
15379
+ droppableRects: vI,
15380
+ draggableNodes: nI,
15202
15381
  draggingNode: null,
15203
15382
  draggingNodeRect: null,
15204
- droppableContainers: iI,
15383
+ droppableContainers: aI,
15205
15384
  over: null,
15206
15385
  scrollableAncestors: [],
15207
15386
  scrollAdjustedTranslate: null
15208
- }), DI = iI.getNodeFor(EI.current.over?.id), OI = useDragOverlayMeasuring({ measure: gI.dragOverlay.measure }), kI = OI.nodeRef.current ?? bI, AI = $F ? OI.rect ?? wI : null, jI = !!(OI.nodeRef.current && OI.rect), MI = useRectDelta(jI ? null : wI), NI = useWindowRect(kI ? getWindow(kI) : null), PI = useScrollableAncestors($F ? DI ?? bI : null), FI = useRects(PI), II = applyModifiers(z, {
15387
+ }), OI = aI.getNodeFor(DI.current.over?.id), kI = useDragOverlayMeasuring({ measure: _I.dragOverlay.measure }), AI = kI.nodeRef.current ?? xI, jI = eI ? kI.rect ?? TI : null, MI = !!(kI.nodeRef.current && kI.rect), NI = useRectDelta(MI ? null : TI), PI = useWindowRect(AI ? getWindow(AI) : null), FI = useScrollableAncestors(eI ? OI ?? xI : null), II = useRects(FI), LI = applyModifiers(z, {
15209
15388
  transform: {
15210
- x: nI.x - MI.x,
15211
- y: nI.y - MI.y,
15389
+ x: rI.x - NI.x,
15390
+ y: rI.y - NI.y,
15212
15391
  scaleX: 1,
15213
15392
  scaleY: 1
15214
15393
  },
15215
- activatorEvent: dI,
15216
- active: sI,
15217
- activeNodeRect: wI,
15218
- containerNodeRect: TI,
15219
- draggingNodeRect: AI,
15220
- over: EI.current.over,
15221
- overlayNodeRect: OI.rect,
15222
- scrollableAncestors: PI,
15223
- scrollableAncestorRects: FI,
15224
- windowRect: NI
15225
- }), LI = xI ? add(xI, nI) : null, RI = useScrollOffsets(PI), zI = useScrollOffsetsDelta(RI), BI = useScrollOffsetsDelta(RI, [wI]), VI = add(II, zI), HI = AI ? getAdjustedRect(AI, II) : null, UI = sI && HI ? N({
15226
- active: sI,
15227
- collisionRect: HI,
15228
- droppableRects: _I,
15229
- droppableContainers: hI,
15230
- pointerCoordinates: LI
15231
- }) : null, WI = getFirstCollision(UI, "id"), [GI, KI] = useState(null), qI = adjustScale(jI ? II : add(II, BI), GI?.rect ?? null, wI), JI = useRef(null), YI = useCallback((n, _) => {
15394
+ activatorEvent: fI,
15395
+ active: cI,
15396
+ activeNodeRect: TI,
15397
+ containerNodeRect: EI,
15398
+ draggingNodeRect: jI,
15399
+ over: DI.current.over,
15400
+ overlayNodeRect: kI.rect,
15401
+ scrollableAncestors: FI,
15402
+ scrollableAncestorRects: II,
15403
+ windowRect: PI
15404
+ }), RI = SI ? add(SI, rI) : null, zI = useScrollOffsets(FI), BI = useScrollOffsetsDelta(zI), VI = useScrollOffsetsDelta(zI, [TI]), HI = add(LI, BI), UI = jI ? getAdjustedRect(jI, LI) : null, WI = cI && UI ? N({
15405
+ active: cI,
15406
+ collisionRect: UI,
15407
+ droppableRects: vI,
15408
+ droppableContainers: gI,
15409
+ pointerCoordinates: RI
15410
+ }) : null, GI = getFirstCollision(WI, "id"), [KI, qI] = useState(null), JI = adjustScale(MI ? LI : add(LI, VI), KI?.rect ?? null, TI), YI = useRef(null), XI = useCallback((n, _) => {
15232
15411
  let { sensor: E, options: O } = _;
15233
- if (cI.current == null) return;
15234
- let A = tI.get(cI.current);
15412
+ if (lI.current == null) return;
15413
+ let A = nI.get(lI.current);
15235
15414
  if (!A) return;
15236
15415
  let j = n.nativeEvent;
15237
- JI.current = new E({
15238
- active: cI.current,
15416
+ YI.current = new E({
15417
+ active: lI.current,
15239
15418
  activeNode: A,
15240
15419
  event: j,
15241
15420
  options: O,
15242
- context: EI,
15421
+ context: DI,
15243
15422
  onAbort(n) {
15244
- if (!tI.get(n)) return;
15245
- let { onDragAbort: _ } = pI.current, E = { id: n };
15423
+ if (!nI.get(n)) return;
15424
+ let { onDragAbort: _ } = mI.current, E = { id: n };
15246
15425
  _?.(E), Z({
15247
15426
  type: "onDragAbort",
15248
15427
  event: E
15249
15428
  });
15250
15429
  },
15251
15430
  onPending(n, _, E, O) {
15252
- if (!tI.get(n)) return;
15253
- let { onDragPending: A } = pI.current, j = {
15431
+ if (!nI.get(n)) return;
15432
+ let { onDragPending: A } = mI.current, j = {
15254
15433
  id: n,
15255
15434
  constraint: _,
15256
15435
  initialCoordinates: E,
@@ -15262,27 +15441,27 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15262
15441
  });
15263
15442
  },
15264
15443
  onStart(n) {
15265
- let _ = cI.current;
15444
+ let _ = lI.current;
15266
15445
  if (_ == null) return;
15267
- let E = tI.get(_);
15446
+ let E = nI.get(_);
15268
15447
  if (!E) return;
15269
- let { onDragStart: O } = pI.current, A = {
15448
+ let { onDragStart: O } = mI.current, A = {
15270
15449
  activatorEvent: j,
15271
15450
  active: {
15272
15451
  id: _,
15273
15452
  data: E.data,
15274
- rect: oI
15453
+ rect: sI
15275
15454
  }
15276
15455
  };
15277
15456
  unstable_batchedUpdates(() => {
15278
- O?.(A), JF(Status.Initializing), W({
15457
+ O?.(A), YF(Status.Initializing), W({
15279
15458
  type: Action.DragStart,
15280
15459
  initialCoordinates: n,
15281
15460
  active: _
15282
15461
  }), Z({
15283
15462
  type: "onDragStart",
15284
15463
  event: A
15285
- }), uI(JI.current), fI(j);
15464
+ }), dI(YI.current), pI(j);
15286
15465
  });
15287
15466
  },
15288
15467
  onMove(n) {
@@ -15296,9 +15475,9 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15296
15475
  });
15297
15476
  function M(n) {
15298
15477
  return async function() {
15299
- let { active: _, collisions: E, over: O, scrollAdjustedTranslate: A } = EI.current, M = null;
15478
+ let { active: _, collisions: E, over: O, scrollAdjustedTranslate: A } = DI.current, M = null;
15300
15479
  if (_ && A) {
15301
- let { cancelDrop: N } = pI.current;
15480
+ let { cancelDrop: N } = mI.current;
15302
15481
  M = {
15303
15482
  activatorEvent: j,
15304
15483
  active: _,
@@ -15307,11 +15486,11 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15307
15486
  over: O
15308
15487
  }, n === Action.DragEnd && typeof N == "function" && await Promise.resolve(N(M)) && (n = Action.DragCancel);
15309
15488
  }
15310
- cI.current = null, unstable_batchedUpdates(() => {
15311
- W({ type: n }), JF(Status.Uninitialized), KI(null), uI(null), fI(null), JI.current = null;
15489
+ lI.current = null, unstable_batchedUpdates(() => {
15490
+ W({ type: n }), YF(Status.Uninitialized), qI(null), dI(null), pI(null), YI.current = null;
15312
15491
  let _ = n === Action.DragEnd ? "onDragEnd" : "onDragCancel";
15313
15492
  if (M) {
15314
- let n = pI.current[_];
15493
+ let n = mI.current[_];
15315
15494
  n?.(M), Z({
15316
15495
  type: _,
15317
15496
  event: M
@@ -15320,24 +15499,24 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15320
15499
  });
15321
15500
  };
15322
15501
  }
15323
- }, [tI]), XI = useCombineActivators(M, useCallback((n, _) => (E, O) => {
15324
- let A = E.nativeEvent, j = tI.get(O);
15325
- if (cI.current !== null || !j || A.dndKit || A.defaultPrevented) return;
15502
+ }, [nI]), ZI = useCombineActivators(M, useCallback((n, _) => (E, O) => {
15503
+ let A = E.nativeEvent, j = nI.get(O);
15504
+ if (lI.current !== null || !j || A.dndKit || A.defaultPrevented) return;
15326
15505
  let M = { active: j };
15327
- n(E, _.options, M) === !0 && (A.dndKit = { capturedBy: _.sensor }, cI.current = O, YI(E, _));
15328
- }, [tI, YI]));
15506
+ n(E, _.options, M) === !0 && (A.dndKit = { capturedBy: _.sensor }, lI.current = O, XI(E, _));
15507
+ }, [nI, XI]));
15329
15508
  useSensorSetup(M), useIsomorphicLayoutEffect$1(() => {
15330
- wI && qF === Status.Initializing && JF(Status.Initialized);
15331
- }, [wI, qF]), useEffect(() => {
15332
- let { onDragMove: n } = pI.current, { active: _, activatorEvent: E, collisions: O, over: A } = EI.current;
15509
+ TI && JF === Status.Initializing && YF(Status.Initialized);
15510
+ }, [TI, JF]), useEffect(() => {
15511
+ let { onDragMove: n } = mI.current, { active: _, activatorEvent: E, collisions: O, over: A } = DI.current;
15333
15512
  if (!_ || !E) return;
15334
15513
  let j = {
15335
15514
  active: _,
15336
15515
  activatorEvent: E,
15337
15516
  collisions: O,
15338
15517
  delta: {
15339
- x: VI.x,
15340
- y: VI.y
15518
+ x: HI.x,
15519
+ y: HI.y
15341
15520
  },
15342
15521
  over: A
15343
15522
  };
@@ -15347,10 +15526,10 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15347
15526
  event: j
15348
15527
  });
15349
15528
  });
15350
- }, [VI.x, VI.y]), useEffect(() => {
15351
- let { active: n, activatorEvent: _, collisions: E, droppableContainers: O, scrollAdjustedTranslate: A } = EI.current;
15352
- if (!n || cI.current == null || !_ || !A) return;
15353
- let { onDragOver: j } = pI.current, M = O.get(WI), N = M && M.rect.current ? {
15529
+ }, [HI.x, HI.y]), useEffect(() => {
15530
+ let { active: n, activatorEvent: _, collisions: E, droppableContainers: O, scrollAdjustedTranslate: A } = DI.current;
15531
+ if (!n || lI.current == null || !_ || !A) return;
15532
+ let { onDragOver: j } = mI.current, M = O.get(GI), N = M && M.rect.current ? {
15354
15533
  id: M.id,
15355
15534
  rect: M.rect.current,
15356
15535
  data: M.data,
@@ -15366,114 +15545,114 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15366
15545
  over: N
15367
15546
  };
15368
15547
  unstable_batchedUpdates(() => {
15369
- KI(N), j?.(P), Z({
15548
+ qI(N), j?.(P), Z({
15370
15549
  type: "onDragOver",
15371
15550
  event: P
15372
15551
  });
15373
15552
  });
15374
- }, [WI]), useIsomorphicLayoutEffect$1(() => {
15375
- EI.current = {
15376
- activatorEvent: dI,
15377
- active: sI,
15378
- activeNode: bI,
15379
- collisionRect: HI,
15380
- collisions: UI,
15381
- droppableRects: _I,
15382
- draggableNodes: tI,
15383
- draggingNode: kI,
15384
- draggingNodeRect: AI,
15385
- droppableContainers: iI,
15386
- over: GI,
15387
- scrollableAncestors: PI,
15388
- scrollAdjustedTranslate: VI
15389
- }, oI.current = {
15390
- initial: AI,
15391
- translated: HI
15553
+ }, [GI]), useIsomorphicLayoutEffect$1(() => {
15554
+ DI.current = {
15555
+ activatorEvent: fI,
15556
+ active: cI,
15557
+ activeNode: xI,
15558
+ collisionRect: UI,
15559
+ collisions: WI,
15560
+ droppableRects: vI,
15561
+ draggableNodes: nI,
15562
+ draggingNode: AI,
15563
+ draggingNodeRect: jI,
15564
+ droppableContainers: aI,
15565
+ over: KI,
15566
+ scrollableAncestors: FI,
15567
+ scrollAdjustedTranslate: HI
15568
+ }, sI.current = {
15569
+ initial: jI,
15570
+ translated: UI
15392
15571
  };
15393
15572
  }, [
15394
- sI,
15395
- bI,
15573
+ cI,
15574
+ xI,
15575
+ WI,
15396
15576
  UI,
15397
- HI,
15398
- tI,
15399
- kI,
15577
+ nI,
15400
15578
  AI,
15401
- _I,
15402
- iI,
15403
- GI,
15404
- PI,
15405
- VI
15579
+ jI,
15580
+ vI,
15581
+ aI,
15582
+ KI,
15583
+ FI,
15584
+ HI
15406
15585
  ]), useAutoScroller({
15407
- ...SI,
15408
- delta: nI,
15409
- draggingRect: HI,
15410
- pointerCoordinates: LI,
15411
- scrollableAncestors: PI,
15412
- scrollableAncestorRects: FI
15586
+ ...CI,
15587
+ delta: rI,
15588
+ draggingRect: UI,
15589
+ pointerCoordinates: RI,
15590
+ scrollableAncestors: FI,
15591
+ scrollableAncestorRects: II
15413
15592
  });
15414
- let ZI = useMemo(() => ({
15415
- active: sI,
15416
- activeNode: bI,
15417
- activeNodeRect: wI,
15418
- activatorEvent: dI,
15419
- collisions: UI,
15420
- containerNodeRect: TI,
15421
- dragOverlay: OI,
15422
- draggableNodes: tI,
15423
- droppableContainers: iI,
15424
- droppableRects: _I,
15425
- over: GI,
15426
- measureDroppableContainers: vI,
15427
- scrollableAncestors: PI,
15428
- scrollableAncestorRects: FI,
15429
- measuringConfiguration: gI,
15430
- measuringScheduled: yI,
15431
- windowRect: NI
15593
+ let QI = useMemo(() => ({
15594
+ active: cI,
15595
+ activeNode: xI,
15596
+ activeNodeRect: TI,
15597
+ activatorEvent: fI,
15598
+ collisions: WI,
15599
+ containerNodeRect: EI,
15600
+ dragOverlay: kI,
15601
+ draggableNodes: nI,
15602
+ droppableContainers: aI,
15603
+ droppableRects: vI,
15604
+ over: KI,
15605
+ measureDroppableContainers: yI,
15606
+ scrollableAncestors: FI,
15607
+ scrollableAncestorRects: II,
15608
+ measuringConfiguration: _I,
15609
+ measuringScheduled: bI,
15610
+ windowRect: PI
15432
15611
  }), [
15433
- sI,
15434
- bI,
15435
- wI,
15436
- dI,
15437
- UI,
15612
+ cI,
15613
+ xI,
15438
15614
  TI,
15439
- OI,
15440
- tI,
15441
- iI,
15442
- _I,
15443
- GI,
15615
+ fI,
15616
+ WI,
15617
+ EI,
15618
+ kI,
15619
+ nI,
15620
+ aI,
15444
15621
  vI,
15445
- PI,
15446
- FI,
15447
- gI,
15622
+ KI,
15448
15623
  yI,
15449
- NI
15450
- ]), QI = useMemo(() => ({
15451
- activatorEvent: dI,
15452
- activators: XI,
15453
- active: sI,
15454
- activeNodeRect: wI,
15455
- ariaDescribedById: { draggable: mI },
15624
+ FI,
15625
+ II,
15626
+ _I,
15627
+ bI,
15628
+ PI
15629
+ ]), $I = useMemo(() => ({
15630
+ activatorEvent: fI,
15631
+ activators: ZI,
15632
+ active: cI,
15633
+ activeNodeRect: TI,
15634
+ ariaDescribedById: { draggable: hI },
15456
15635
  dispatch: W,
15457
- draggableNodes: tI,
15458
- over: GI,
15459
- measureDroppableContainers: vI
15636
+ draggableNodes: nI,
15637
+ over: KI,
15638
+ measureDroppableContainers: yI
15460
15639
  }), [
15461
- dI,
15462
- XI,
15463
- sI,
15464
- wI,
15640
+ fI,
15641
+ ZI,
15642
+ cI,
15643
+ TI,
15465
15644
  W,
15466
- mI,
15467
- tI,
15468
- GI,
15469
- vI
15645
+ hI,
15646
+ nI,
15647
+ KI,
15648
+ yI
15470
15649
  ]);
15471
- return React.createElement(DndMonitorContext.Provider, { value: KF }, React.createElement(InternalContext.Provider, { value: QI }, React.createElement(PublicContext.Provider, { value: ZI }, React.createElement(ActiveDraggableContext.Provider, { value: qI }, j)), React.createElement(RestoreFocus, { disabled: O?.restoreFocus === !1 })), React.createElement(Accessibility, {
15650
+ return React.createElement(DndMonitorContext.Provider, { value: qF }, React.createElement(InternalContext.Provider, { value: $I }, React.createElement(PublicContext.Provider, { value: QI }, React.createElement(ActiveDraggableContext.Provider, { value: JI }, j)), React.createElement(RestoreFocus, { disabled: O?.restoreFocus === !1 })), React.createElement(Accessibility, {
15472
15651
  ...O,
15473
- hiddenTextDescribedById: mI
15652
+ hiddenTextDescribedById: hI
15474
15653
  }));
15475
- function $I() {
15476
- let n = lI?.autoScrollEnabled === !1, _ = typeof A == "object" ? A.enabled === !1 : A === !1, E = $F && !n && !_;
15654
+ function eL() {
15655
+ let n = uI?.autoScrollEnabled === !1, _ = typeof A == "object" ? A.enabled === !1 : A === !1, E = eI && !n && !_;
15477
15656
  return typeof A == "object" ? {
15478
15657
  ...A,
15479
15658
  enabled: E
@@ -15481,13 +15660,13 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15481
15660
  }
15482
15661
  }), NullContext = /* @__PURE__ */ createContext(null), defaultRole = "button", ID_PREFIX$1 = "Draggable";
15483
15662
  function useDraggable(n) {
15484
- let { id: _, data: E, disabled: O = !1, attributes: A } = n, j = useUniqueId(ID_PREFIX$1), { activators: M, activatorEvent: N, active: P, activeNodeRect: z, ariaDescribedById: B, draggableNodes: H, over: U } = useContext(InternalContext), { role: G = defaultRole, roleDescription: Z = "draggable", tabIndex: KF = 0 } = A ?? {}, qF = P?.id === _, JF = useContext(qF ? ActiveDraggableContext : NullContext), [XF, ZF] = useNodeRef(), [QF, $F] = useNodeRef(), eI = useSyntheticListeners(M, _), tI = useLatestValue(E);
15663
+ let { id: _, data: E, disabled: O = !1, attributes: A } = n, j = useUniqueId(ID_PREFIX$1), { activators: M, activatorEvent: N, active: P, activeNodeRect: z, ariaDescribedById: B, draggableNodes: H, over: U } = useContext(InternalContext), { role: G = defaultRole, roleDescription: Z = "draggable", tabIndex: qF = 0 } = A ?? {}, JF = P?.id === _, YF = useContext(JF ? ActiveDraggableContext : NullContext), [ZF, QF] = useNodeRef(), [$F, eI] = useNodeRef(), tI = useSyntheticListeners(M, _), nI = useLatestValue(E);
15485
15664
  return useIsomorphicLayoutEffect$1(() => (H.set(_, {
15486
15665
  id: _,
15487
15666
  key: j,
15488
- node: XF,
15489
- activatorNode: QF,
15490
- data: tI
15667
+ node: ZF,
15668
+ activatorNode: $F,
15669
+ data: nI
15491
15670
  }), () => {
15492
15671
  let n = H.get(_);
15493
15672
  n && n.key === j && H.delete(_);
@@ -15497,26 +15676,26 @@ function useDraggable(n) {
15497
15676
  activeNodeRect: z,
15498
15677
  attributes: useMemo(() => ({
15499
15678
  role: G,
15500
- tabIndex: KF,
15679
+ tabIndex: qF,
15501
15680
  "aria-disabled": O,
15502
- "aria-pressed": qF && G === defaultRole ? !0 : void 0,
15681
+ "aria-pressed": JF && G === defaultRole ? !0 : void 0,
15503
15682
  "aria-roledescription": Z,
15504
15683
  "aria-describedby": B.draggable
15505
15684
  }), [
15506
15685
  O,
15507
15686
  G,
15508
- KF,
15509
15687
  qF,
15688
+ JF,
15510
15689
  Z,
15511
15690
  B.draggable
15512
15691
  ]),
15513
- isDragging: qF,
15514
- listeners: O ? void 0 : eI,
15515
- node: XF,
15692
+ isDragging: JF,
15693
+ listeners: O ? void 0 : tI,
15694
+ node: ZF,
15516
15695
  over: U,
15517
- setNodeRef: ZF,
15518
- setActivatorNodeRef: $F,
15519
- transform: JF
15696
+ setNodeRef: QF,
15697
+ setActivatorNodeRef: eI,
15698
+ transform: YF
15520
15699
  };
15521
15700
  }
15522
15701
  function useDndContext() {
@@ -15524,34 +15703,34 @@ function useDndContext() {
15524
15703
  }
15525
15704
  var ID_PREFIX$1$1 = "Droppable", defaultResizeObserverConfig = { timeout: 25 };
15526
15705
  function useDroppable(n) {
15527
- let { data: _, disabled: E = !1, id: O, resizeObserverConfig: A } = n, j = useUniqueId(ID_PREFIX$1$1), { active: M, dispatch: N, over: P, measureDroppableContainers: z } = useContext(InternalContext), B = useRef({ disabled: E }), H = useRef(!1), Z = useRef(null), KF = useRef(null), { disabled: qF, updateMeasurementsFor: JF, timeout: YF } = {
15706
+ let { data: _, disabled: E = !1, id: O, resizeObserverConfig: A } = n, j = useUniqueId(ID_PREFIX$1$1), { active: M, dispatch: N, over: P, measureDroppableContainers: z } = useContext(InternalContext), B = useRef({ disabled: E }), H = useRef(!1), Z = useRef(null), qF = useRef(null), { disabled: JF, updateMeasurementsFor: YF, timeout: XF } = {
15528
15707
  ...defaultResizeObserverConfig,
15529
15708
  ...A
15530
- }, XF = useLatestValue(JF ?? O), QF = useResizeObserver({
15709
+ }, ZF = useLatestValue(YF ?? O), $F = useResizeObserver({
15531
15710
  callback: useCallback(() => {
15532
15711
  if (!H.current) {
15533
15712
  H.current = !0;
15534
15713
  return;
15535
15714
  }
15536
- KF.current != null && clearTimeout(KF.current), KF.current = setTimeout(() => {
15537
- z(Array.isArray(XF.current) ? XF.current : [XF.current]), KF.current = null;
15538
- }, YF);
15539
- }, [YF]),
15540
- disabled: qF || !M
15541
- }), [$F, eI] = useNodeRef(useCallback((n, _) => {
15542
- QF && (_ && (QF.unobserve(_), H.current = !1), n && QF.observe(n));
15543
- }, [QF])), tI = useLatestValue(_);
15715
+ qF.current != null && clearTimeout(qF.current), qF.current = setTimeout(() => {
15716
+ z(Array.isArray(ZF.current) ? ZF.current : [ZF.current]), qF.current = null;
15717
+ }, XF);
15718
+ }, [XF]),
15719
+ disabled: JF || !M
15720
+ }), [eI, tI] = useNodeRef(useCallback((n, _) => {
15721
+ $F && (_ && ($F.unobserve(_), H.current = !1), n && $F.observe(n));
15722
+ }, [$F])), nI = useLatestValue(_);
15544
15723
  return useEffect(() => {
15545
- !QF || !$F.current || (QF.disconnect(), H.current = !1, QF.observe($F.current));
15546
- }, [$F, QF]), useEffect(() => (N({
15724
+ !$F || !eI.current || ($F.disconnect(), H.current = !1, $F.observe(eI.current));
15725
+ }, [eI, $F]), useEffect(() => (N({
15547
15726
  type: Action.RegisterDroppable,
15548
15727
  element: {
15549
15728
  id: O,
15550
15729
  key: j,
15551
15730
  disabled: E,
15552
- node: $F,
15731
+ node: eI,
15553
15732
  rect: Z,
15554
- data: tI
15733
+ data: nI
15555
15734
  }
15556
15735
  }), () => N({
15557
15736
  type: Action.UnregisterDroppable,
@@ -15573,9 +15752,9 @@ function useDroppable(n) {
15573
15752
  active: M,
15574
15753
  rect: Z,
15575
15754
  isOver: P?.id === O,
15576
- node: $F,
15755
+ node: eI,
15577
15756
  over: P,
15578
- setNodeRef: eI
15757
+ setNodeRef: tI
15579
15758
  };
15580
15759
  }
15581
15760
  function AnimationManager(n) {
@@ -15712,13 +15891,13 @@ function createDefaultDropAnimation(n) {
15712
15891
  active: j,
15713
15892
  dragOverlay: M,
15714
15893
  ...P
15715
- }), KF = M.node.animate(U, {
15894
+ }), qF = M.node.animate(U, {
15716
15895
  duration: _,
15717
15896
  easing: E,
15718
15897
  fill: "forwards"
15719
15898
  });
15720
15899
  return new Promise((n) => {
15721
- KF.onfinish = () => {
15900
+ qF.onfinish = () => {
15722
15901
  Z?.(), n();
15723
15902
  };
15724
15903
  });
@@ -15731,39 +15910,39 @@ function useKey(n) {
15731
15910
  }, [n]);
15732
15911
  }
15733
15912
  var DragOverlay = /* @__PURE__ */ React.memo((n) => {
15734
- let { adjustScale: E = !1, children: O, dropAnimation: A, style: j, transition: M, modifiers: N, wrapperElement: P = "div", className: z, zIndex: B = 999 } = n, { activatorEvent: H, active: U, activeNodeRect: G, containerNodeRect: Z, draggableNodes: KF, droppableContainers: qF, dragOverlay: JF, over: YF, measuringConfiguration: XF, scrollableAncestors: ZF, scrollableAncestorRects: QF, windowRect: $F } = useDndContext(), eI = useContext(ActiveDraggableContext), tI = useKey(U?.id), nI = applyModifiers(N, {
15913
+ let { adjustScale: E = !1, children: O, dropAnimation: A, style: j, transition: M, modifiers: N, wrapperElement: P = "div", className: z, zIndex: B = 999 } = n, { activatorEvent: H, active: U, activeNodeRect: G, containerNodeRect: Z, draggableNodes: qF, droppableContainers: JF, dragOverlay: YF, over: XF, measuringConfiguration: ZF, scrollableAncestors: QF, scrollableAncestorRects: $F, windowRect: eI } = useDndContext(), tI = useContext(ActiveDraggableContext), nI = useKey(U?.id), rI = applyModifiers(N, {
15735
15914
  activatorEvent: H,
15736
15915
  active: U,
15737
15916
  activeNodeRect: G,
15738
15917
  containerNodeRect: Z,
15739
- draggingNodeRect: JF.rect,
15740
- over: YF,
15741
- overlayNodeRect: JF.rect,
15742
- scrollableAncestors: ZF,
15743
- scrollableAncestorRects: QF,
15744
- transform: eI,
15745
- windowRect: $F
15746
- }), rI = useInitialValue(G), iI = useDropAnimation({
15918
+ draggingNodeRect: YF.rect,
15919
+ over: XF,
15920
+ overlayNodeRect: YF.rect,
15921
+ scrollableAncestors: QF,
15922
+ scrollableAncestorRects: $F,
15923
+ transform: tI,
15924
+ windowRect: eI
15925
+ }), iI = useInitialValue(G), aI = useDropAnimation({
15747
15926
  config: A,
15748
- draggableNodes: KF,
15749
- droppableContainers: qF,
15750
- measuringConfiguration: XF
15751
- }), aI = rI ? JF.setRef : void 0;
15752
- return React.createElement(NullifiedContextProvider, null, React.createElement(AnimationManager, { animation: iI }, U && tI ? React.createElement(PositionedOverlay, {
15753
- key: tI,
15927
+ draggableNodes: qF,
15928
+ droppableContainers: JF,
15929
+ measuringConfiguration: ZF
15930
+ }), oI = iI ? YF.setRef : void 0;
15931
+ return React.createElement(NullifiedContextProvider, null, React.createElement(AnimationManager, { animation: aI }, U && nI ? React.createElement(PositionedOverlay, {
15932
+ key: nI,
15754
15933
  id: U.id,
15755
- ref: aI,
15934
+ ref: oI,
15756
15935
  as: P,
15757
15936
  activatorEvent: H,
15758
15937
  adjustScale: E,
15759
15938
  className: z,
15760
15939
  transition: M,
15761
- rect: rI,
15940
+ rect: iI,
15762
15941
  style: {
15763
15942
  zIndex: B,
15764
15943
  ...j
15765
15944
  },
15766
- transform: nI
15945
+ transform: rI
15767
15946
  }, O) : null));
15768
15947
  });
15769
15948
  function arrayMove(n, _, E) {
@@ -15847,40 +16026,40 @@ var ID_PREFIX = "Sortable", Context = /* @__PURE__ */ React.createContext({
15847
16026
  }
15848
16027
  });
15849
16028
  function SortableContext(n) {
15850
- let { children: E, id: O, items: A, strategy: j = rectSortingStrategy, disabled: M = !1 } = n, { active: N, dragOverlay: P, droppableRects: z, over: B, measureDroppableContainers: H } = useDndContext(), U = useUniqueId(ID_PREFIX, O), W = P.rect !== null, Z = useMemo(() => A.map((n) => typeof n == "object" && "id" in n ? n.id : n), [A]), KF = N != null, qF = N ? Z.indexOf(N.id) : -1, JF = B ? Z.indexOf(B.id) : -1, XF = useRef(Z), QF = !itemsEqual(Z, XF.current), $F = JF !== -1 && qF === -1 || QF, eI = normalizeDisabled(M);
16029
+ let { children: E, id: O, items: A, strategy: j = rectSortingStrategy, disabled: M = !1 } = n, { active: N, dragOverlay: P, droppableRects: z, over: B, measureDroppableContainers: H } = useDndContext(), U = useUniqueId(ID_PREFIX, O), W = P.rect !== null, Z = useMemo(() => A.map((n) => typeof n == "object" && "id" in n ? n.id : n), [A]), qF = N != null, JF = N ? Z.indexOf(N.id) : -1, YF = B ? Z.indexOf(B.id) : -1, ZF = useRef(Z), $F = !itemsEqual(Z, ZF.current), eI = YF !== -1 && JF === -1 || $F, tI = normalizeDisabled(M);
15851
16030
  useIsomorphicLayoutEffect$1(() => {
15852
- QF && KF && H(Z);
16031
+ $F && qF && H(Z);
15853
16032
  }, [
15854
- QF,
16033
+ $F,
15855
16034
  Z,
15856
- KF,
16035
+ qF,
15857
16036
  H
15858
16037
  ]), useEffect(() => {
15859
- XF.current = Z;
16038
+ ZF.current = Z;
15860
16039
  }, [Z]);
15861
- let tI = useMemo(() => ({
15862
- activeIndex: qF,
16040
+ let nI = useMemo(() => ({
16041
+ activeIndex: JF,
15863
16042
  containerId: U,
15864
- disabled: eI,
15865
- disableTransforms: $F,
16043
+ disabled: tI,
16044
+ disableTransforms: eI,
15866
16045
  items: Z,
15867
- overIndex: JF,
16046
+ overIndex: YF,
15868
16047
  useDragOverlay: W,
15869
16048
  sortedRects: getSortedRects(Z, z),
15870
16049
  strategy: j
15871
16050
  }), [
15872
- qF,
16051
+ JF,
15873
16052
  U,
15874
- eI.draggable,
15875
- eI.droppable,
15876
- $F,
16053
+ tI.draggable,
16054
+ tI.droppable,
16055
+ eI,
15877
16056
  Z,
15878
- JF,
16057
+ YF,
15879
16058
  z,
15880
16059
  W,
15881
16060
  j
15882
16061
  ]);
15883
- return React.createElement(Context.Provider, { value: tI }, E);
16062
+ return React.createElement(Context.Provider, { value: nI }, E);
15884
16063
  }
15885
16064
  var defaultNewIndexGetter = (n) => {
15886
16065
  let { id: _, items: E, activeIndex: O, overIndex: A } = n;
@@ -15922,112 +16101,112 @@ function useDerivedTransform(n) {
15922
16101
  }, [j]), j;
15923
16102
  }
15924
16103
  function useSortable(n) {
15925
- let { animateLayoutChanges: _ = defaultAnimateLayoutChanges, attributes: E, disabled: O, data: A, getNewIndex: j = defaultNewIndexGetter, id: M, strategy: N, resizeObserverConfig: P, transition: z = defaultTransition } = n, { items: B, containerId: H, activeIndex: U, disabled: Z, disableTransforms: KF, sortedRects: qF, overIndex: JF, useDragOverlay: XF, strategy: QF } = useContext(Context), $F = normalizeLocalDisabled(O, Z), eI = B.indexOf(M), tI = useMemo(() => ({
16104
+ let { animateLayoutChanges: _ = defaultAnimateLayoutChanges, attributes: E, disabled: O, data: A, getNewIndex: j = defaultNewIndexGetter, id: M, strategy: N, resizeObserverConfig: P, transition: z = defaultTransition } = n, { items: B, containerId: H, activeIndex: U, disabled: Z, disableTransforms: qF, sortedRects: JF, overIndex: YF, useDragOverlay: ZF, strategy: $F } = useContext(Context), eI = normalizeLocalDisabled(O, Z), tI = B.indexOf(M), nI = useMemo(() => ({
15926
16105
  sortable: {
15927
16106
  containerId: H,
15928
- index: eI,
16107
+ index: tI,
15929
16108
  items: B
15930
16109
  },
15931
16110
  ...A
15932
16111
  }), [
15933
16112
  H,
15934
16113
  A,
15935
- eI,
16114
+ tI,
15936
16115
  B
15937
- ]), nI = useMemo(() => B.slice(B.indexOf(M)), [B, M]), { rect: rI, node: iI, isOver: aI, setNodeRef: oI } = useDroppable({
16116
+ ]), rI = useMemo(() => B.slice(B.indexOf(M)), [B, M]), { rect: iI, node: aI, isOver: oI, setNodeRef: sI } = useDroppable({
15938
16117
  id: M,
15939
- data: tI,
15940
- disabled: $F.droppable,
16118
+ data: nI,
16119
+ disabled: eI.droppable,
15941
16120
  resizeObserverConfig: {
15942
- updateMeasurementsFor: nI,
16121
+ updateMeasurementsFor: rI,
15943
16122
  ...P
15944
16123
  }
15945
- }), { active: sI, activatorEvent: cI, activeNodeRect: lI, attributes: uI, setNodeRef: dI, listeners: fI, isDragging: pI, over: mI, setActivatorNodeRef: hI, transform: gI } = useDraggable({
16124
+ }), { active: cI, activatorEvent: lI, activeNodeRect: uI, attributes: dI, setNodeRef: fI, listeners: pI, isDragging: mI, over: hI, setActivatorNodeRef: gI, transform: _I } = useDraggable({
15946
16125
  id: M,
15947
- data: tI,
16126
+ data: nI,
15948
16127
  attributes: {
15949
16128
  ...defaultAttributes,
15950
16129
  ...E
15951
16130
  },
15952
- disabled: $F.draggable
15953
- }), _I = useCombinedRefs(oI, dI), vI = !!sI, yI = vI && !KF && isValidIndex(U) && isValidIndex(JF), bI = !XF && pI, xI = yI ? (bI && yI ? gI : null) ?? (N ?? QF)({
15954
- rects: qF,
15955
- activeNodeRect: lI,
16131
+ disabled: eI.draggable
16132
+ }), vI = useCombinedRefs(sI, fI), yI = !!cI, bI = yI && !qF && isValidIndex(U) && isValidIndex(YF), xI = !ZF && mI, SI = bI ? (xI && bI ? _I : null) ?? (N ?? $F)({
16133
+ rects: JF,
16134
+ activeNodeRect: uI,
15956
16135
  activeIndex: U,
15957
- overIndex: JF,
15958
- index: eI
15959
- }) : null, SI = isValidIndex(U) && isValidIndex(JF) ? j({
16136
+ overIndex: YF,
16137
+ index: tI
16138
+ }) : null, CI = isValidIndex(U) && isValidIndex(YF) ? j({
15960
16139
  id: M,
15961
16140
  items: B,
15962
16141
  activeIndex: U,
15963
- overIndex: JF
15964
- }) : eI, CI = sI?.id, wI = useRef({
15965
- activeId: CI,
16142
+ overIndex: YF
16143
+ }) : tI, wI = cI?.id, TI = useRef({
16144
+ activeId: wI,
15966
16145
  items: B,
15967
- newIndex: SI,
16146
+ newIndex: CI,
15968
16147
  containerId: H
15969
- }), TI = B !== wI.current.items, EI = _({
15970
- active: sI,
16148
+ }), EI = B !== TI.current.items, DI = _({
16149
+ active: cI,
15971
16150
  containerId: H,
15972
- isDragging: pI,
15973
- isSorting: vI,
16151
+ isDragging: mI,
16152
+ isSorting: yI,
15974
16153
  id: M,
15975
- index: eI,
16154
+ index: tI,
15976
16155
  items: B,
15977
- newIndex: wI.current.newIndex,
15978
- previousItems: wI.current.items,
15979
- previousContainerId: wI.current.containerId,
16156
+ newIndex: TI.current.newIndex,
16157
+ previousItems: TI.current.items,
16158
+ previousContainerId: TI.current.containerId,
15980
16159
  transition: z,
15981
- wasDragging: wI.current.activeId != null
15982
- }), DI = useDerivedTransform({
15983
- disabled: !EI,
15984
- index: eI,
15985
- node: iI,
15986
- rect: rI
16160
+ wasDragging: TI.current.activeId != null
16161
+ }), OI = useDerivedTransform({
16162
+ disabled: !DI,
16163
+ index: tI,
16164
+ node: aI,
16165
+ rect: iI
15987
16166
  });
15988
16167
  return useEffect(() => {
15989
- vI && wI.current.newIndex !== SI && (wI.current.newIndex = SI), H !== wI.current.containerId && (wI.current.containerId = H), B !== wI.current.items && (wI.current.items = B);
16168
+ yI && TI.current.newIndex !== CI && (TI.current.newIndex = CI), H !== TI.current.containerId && (TI.current.containerId = H), B !== TI.current.items && (TI.current.items = B);
15990
16169
  }, [
15991
- vI,
15992
- SI,
16170
+ yI,
16171
+ CI,
15993
16172
  H,
15994
16173
  B
15995
16174
  ]), useEffect(() => {
15996
- if (CI === wI.current.activeId) return;
15997
- if (CI != null && wI.current.activeId == null) {
15998
- wI.current.activeId = CI;
16175
+ if (wI === TI.current.activeId) return;
16176
+ if (wI != null && TI.current.activeId == null) {
16177
+ TI.current.activeId = wI;
15999
16178
  return;
16000
16179
  }
16001
16180
  let n = setTimeout(() => {
16002
- wI.current.activeId = CI;
16181
+ TI.current.activeId = wI;
16003
16182
  }, 50);
16004
16183
  return () => clearTimeout(n);
16005
- }, [CI]), {
16006
- active: sI,
16184
+ }, [wI]), {
16185
+ active: cI,
16007
16186
  activeIndex: U,
16008
- attributes: uI,
16009
- data: tI,
16010
- rect: rI,
16011
- index: eI,
16012
- newIndex: SI,
16187
+ attributes: dI,
16188
+ data: nI,
16189
+ rect: iI,
16190
+ index: tI,
16191
+ newIndex: CI,
16013
16192
  items: B,
16014
- isOver: aI,
16015
- isSorting: vI,
16016
- isDragging: pI,
16017
- listeners: fI,
16018
- node: iI,
16019
- overIndex: JF,
16020
- over: mI,
16021
- setNodeRef: _I,
16022
- setActivatorNodeRef: hI,
16023
- setDroppableNodeRef: oI,
16024
- setDraggableNodeRef: dI,
16025
- transform: DI ?? xI,
16026
- transition: OI()
16193
+ isOver: oI,
16194
+ isSorting: yI,
16195
+ isDragging: mI,
16196
+ listeners: pI,
16197
+ node: aI,
16198
+ overIndex: YF,
16199
+ over: hI,
16200
+ setNodeRef: vI,
16201
+ setActivatorNodeRef: gI,
16202
+ setDroppableNodeRef: sI,
16203
+ setDraggableNodeRef: fI,
16204
+ transform: OI ?? SI,
16205
+ transition: kI()
16027
16206
  };
16028
- function OI() {
16029
- if (DI || TI && wI.current.newIndex === eI) return disabledTransition;
16030
- if (!(bI && !isKeyboardEvent(cI) || !z) && (vI || EI)) return CSS$1.Transition.toString({
16207
+ function kI() {
16208
+ if (OI || EI && TI.current.newIndex === tI) return disabledTransition;
16209
+ if (!(xI && !isKeyboardEvent(lI) || !z) && (yI || DI)) return CSS$1.Transition.toString({
16031
16210
  ...z,
16032
16211
  property: transitionProperty
16033
16212
  });
@@ -16423,13 +16602,13 @@ function createRenderBatcher(n, _) {
16423
16602
  }, j = () => E = !0, M = stepsOrder.reduce((n, E) => (n[E] = createRenderStep(j, _ ? E : void 0), n), {}), { setup: N, read: P, resolveKeyframes: z, preUpdate: B, update: H, preRender: U, render: W, postRender: G } = M, Z = () => {
16424
16603
  let j = MotionGlobalConfig.useManualTiming ? A.timestamp : performance.now();
16425
16604
  E = !1, MotionGlobalConfig.useManualTiming || (A.delta = O ? 1e3 / 60 : Math.max(Math.min(j - A.timestamp, maxElapsed), 1)), A.timestamp = j, A.isProcessing = !0, N.process(A), P.process(A), z.process(A), B.process(A), H.process(A), U.process(A), W.process(A), G.process(A), A.isProcessing = !1, E && _ && (O = !1, n(Z));
16426
- }, KF = () => {
16605
+ }, qF = () => {
16427
16606
  E = !0, O = !0, A.isProcessing || n(Z);
16428
16607
  };
16429
16608
  return {
16430
16609
  schedule: stepsOrder.reduce((n, _) => {
16431
16610
  let O = M[_];
16432
- return n[_] = (n, _ = !1, A = !1) => (E || KF(), O.schedule(n, _, A)), n;
16611
+ return n[_] = (n, _ = !1, A = !1) => (E || qF(), O.schedule(n, _, A)), n;
16433
16612
  }, {}),
16434
16613
  cancel: (n) => {
16435
16614
  for (let _ = 0; _ < stepsOrder.length; _++) M[stepsOrder[_]].cancel(n);
@@ -16787,40 +16966,40 @@ function spring(n = springDefaults.visualDuration, _ = springDefaults.bounce) {
16787
16966
  }, { stiffness: P, damping: z, mass: B, duration: H, velocity: U, isResolvedFromDuration: W } = getSpringOptions({
16788
16967
  ...E,
16789
16968
  velocity: -/* @__PURE__ */ millisecondsToSeconds(E.velocity || 0)
16790
- }), G = U || 0, Z = z / (2 * Math.sqrt(P * B)), KF = M - j, qF = /* @__PURE__ */ millisecondsToSeconds(Math.sqrt(P / B)), JF = Math.abs(KF) < 5;
16791
- O ||= JF ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default, A ||= JF ? springDefaults.restDelta.granular : springDefaults.restDelta.default;
16792
- let YF;
16969
+ }), G = U || 0, Z = z / (2 * Math.sqrt(P * B)), qF = M - j, JF = /* @__PURE__ */ millisecondsToSeconds(Math.sqrt(P / B)), YF = Math.abs(qF) < 5;
16970
+ O ||= YF ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default, A ||= YF ? springDefaults.restDelta.granular : springDefaults.restDelta.default;
16971
+ let XF;
16793
16972
  if (Z < 1) {
16794
- let n = calcAngularFreq(qF, Z);
16795
- YF = (_) => M - Math.exp(-Z * qF * _) * ((G + Z * qF * KF) / n * Math.sin(n * _) + KF * Math.cos(n * _));
16796
- } else if (Z === 1) YF = (n) => M - Math.exp(-qF * n) * (KF + (G + qF * KF) * n);
16973
+ let n = calcAngularFreq(JF, Z);
16974
+ XF = (_) => M - Math.exp(-Z * JF * _) * ((G + Z * JF * qF) / n * Math.sin(n * _) + qF * Math.cos(n * _));
16975
+ } else if (Z === 1) XF = (n) => M - Math.exp(-JF * n) * (qF + (G + JF * qF) * n);
16797
16976
  else {
16798
- let n = qF * Math.sqrt(Z * Z - 1);
16799
- YF = (_) => {
16800
- let E = Math.exp(-Z * qF * _), O = Math.min(n * _, 300);
16801
- return M - E * ((G + Z * qF * KF) * Math.sinh(O) + n * KF * Math.cosh(O)) / n;
16977
+ let n = JF * Math.sqrt(Z * Z - 1);
16978
+ XF = (_) => {
16979
+ let E = Math.exp(-Z * JF * _), O = Math.min(n * _, 300);
16980
+ return M - E * ((G + Z * JF * qF) * Math.sinh(O) + n * qF * Math.cosh(O)) / n;
16802
16981
  };
16803
16982
  }
16804
- let XF = {
16983
+ let ZF = {
16805
16984
  calculatedDuration: W && H || null,
16806
16985
  next: (n) => {
16807
- let _ = YF(n);
16986
+ let _ = XF(n);
16808
16987
  if (W) N.done = n >= H;
16809
16988
  else {
16810
16989
  let E = n === 0 ? G : 0;
16811
- Z < 1 && (E = n === 0 ? /* @__PURE__ */ secondsToMilliseconds(G) : calcGeneratorVelocity(YF, n, _));
16990
+ Z < 1 && (E = n === 0 ? /* @__PURE__ */ secondsToMilliseconds(G) : calcGeneratorVelocity(XF, n, _));
16812
16991
  let j = Math.abs(E) <= O, P = Math.abs(M - _) <= A;
16813
16992
  N.done = j && P;
16814
16993
  }
16815
16994
  return N.value = N.done ? M : _, N;
16816
16995
  },
16817
16996
  toString: () => {
16818
- let n = Math.min(calcGeneratorDuration(XF), maxGeneratorDuration), _ = generateLinearEasing((_) => XF.next(n * _).value, n, 30);
16997
+ let n = Math.min(calcGeneratorDuration(ZF), maxGeneratorDuration), _ = generateLinearEasing((_) => ZF.next(n * _).value, n, 30);
16819
16998
  return n + "ms " + _;
16820
16999
  },
16821
17000
  toTransition: () => {}
16822
17001
  };
16823
- return XF;
17002
+ return ZF;
16824
17003
  }
16825
17004
  spring.applyToOptions = (n) => {
16826
17005
  let _ = createGeneratorEasing(n, 100, spring);
@@ -16830,26 +17009,26 @@ function inertia({ keyframes: n, velocity: _ = 0, power: E = .8, timeConstant: O
16830
17009
  let H = n[0], U = {
16831
17010
  done: !1,
16832
17011
  value: H
16833
- }, W = (n) => N !== void 0 && n < N || P !== void 0 && n > P, G = (n) => N === void 0 ? P : P === void 0 || Math.abs(N - n) < Math.abs(P - n) ? N : P, Z = E * _, KF = H + Z, qF = M === void 0 ? KF : M(KF);
16834
- qF !== KF && (Z = qF - H);
16835
- let JF = (n) => -Z * Math.exp(-n / O), YF = (n) => qF + JF(n), XF = (n) => {
16836
- let _ = JF(n), E = YF(n);
16837
- U.done = Math.abs(_) <= z, U.value = U.done ? qF : E;
16838
- }, ZF, QF, $F = (n) => {
16839
- W(U.value) && (ZF = n, QF = spring({
17012
+ }, W = (n) => N !== void 0 && n < N || P !== void 0 && n > P, G = (n) => N === void 0 ? P : P === void 0 || Math.abs(N - n) < Math.abs(P - n) ? N : P, Z = E * _, qF = H + Z, JF = M === void 0 ? qF : M(qF);
17013
+ JF !== qF && (Z = JF - H);
17014
+ let YF = (n) => -Z * Math.exp(-n / O), XF = (n) => JF + YF(n), ZF = (n) => {
17015
+ let _ = YF(n), E = XF(n);
17016
+ U.done = Math.abs(_) <= z, U.value = U.done ? JF : E;
17017
+ }, QF, $F, eI = (n) => {
17018
+ W(U.value) && (QF = n, $F = spring({
16840
17019
  keyframes: [U.value, G(U.value)],
16841
- velocity: calcGeneratorVelocity(YF, n, U.value),
17020
+ velocity: calcGeneratorVelocity(XF, n, U.value),
16842
17021
  damping: A,
16843
17022
  stiffness: j,
16844
17023
  restDelta: z,
16845
17024
  restSpeed: B
16846
17025
  }));
16847
17026
  };
16848
- return $F(0), {
17027
+ return eI(0), {
16849
17028
  calculatedDuration: null,
16850
17029
  next: (n) => {
16851
17030
  let _ = !1;
16852
- return !QF && ZF === void 0 && (_ = !0, XF(n), $F(n)), ZF !== void 0 && n >= ZF ? QF.next(n - ZF) : (!_ && XF(n), U);
17031
+ return !$F && QF === void 0 && (_ = !0, ZF(n), eI(n)), QF !== void 0 && n >= QF ? $F.next(n - QF) : (!_ && ZF(n), U);
16853
17032
  }
16854
17033
  };
16855
17034
  }
@@ -16969,22 +17148,22 @@ var WithPromise = class {
16969
17148
  if (this.startTime === null) return E.next(0);
16970
17149
  let { delay: P = 0, keyframes: z, repeat: B, repeatType: H, repeatDelay: U, type: W, onUpdate: G, finalKeyframe: Z } = this.options;
16971
17150
  this.speed > 0 ? this.startTime = Math.min(this.startTime, n) : this.speed < 0 && (this.startTime = Math.min(n - O / this.speed, this.startTime)), _ ? this.currentTime = n : this.updateTime(n);
16972
- let KF = this.currentTime - P * (this.playbackSpeed >= 0 ? 1 : -1), qF = this.playbackSpeed >= 0 ? KF < 0 : KF > O;
16973
- this.currentTime = Math.max(KF, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = O);
16974
- let JF = this.currentTime, YF = E;
17151
+ let qF = this.currentTime - P * (this.playbackSpeed >= 0 ? 1 : -1), JF = this.playbackSpeed >= 0 ? qF < 0 : qF > O;
17152
+ this.currentTime = Math.max(qF, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = O);
17153
+ let YF = this.currentTime, XF = E;
16975
17154
  if (B) {
16976
17155
  let n = Math.min(this.currentTime, O) / M, _ = Math.floor(n), E = n % 1;
16977
- !E && n >= 1 && (E = 1), E === 1 && _--, _ = Math.min(_, B + 1), _ % 2 && (H === "reverse" ? (E = 1 - E, U && (E -= U / M)) : H === "mirror" && (YF = j)), JF = clamp(0, 1, E) * M;
17156
+ !E && n >= 1 && (E = 1), E === 1 && _--, _ = Math.min(_, B + 1), _ % 2 && (H === "reverse" ? (E = 1 - E, U && (E -= U / M)) : H === "mirror" && (XF = j)), YF = clamp(0, 1, E) * M;
16978
17157
  }
16979
- let XF = qF ? {
17158
+ let ZF = JF ? {
16980
17159
  done: !1,
16981
17160
  value: z[0]
16982
- } : YF.next(JF);
16983
- A && (XF.value = A(XF.value));
16984
- let { done: ZF } = XF;
16985
- !qF && N !== null && (ZF = this.playbackSpeed >= 0 ? this.currentTime >= O : this.currentTime <= 0);
16986
- let QF = this.holdTime === null && (this.state === "finished" || this.state === "running" && ZF);
16987
- return QF && W !== inertia && (XF.value = getFinalKeyframe$1(z, this.options, Z, this.speed)), G && G(XF.value), QF && this.finish(), XF;
17161
+ } : XF.next(YF);
17162
+ A && (ZF.value = A(ZF.value));
17163
+ let { done: QF } = ZF;
17164
+ !JF && N !== null && (QF = this.playbackSpeed >= 0 ? this.currentTime >= O : this.currentTime <= 0);
17165
+ let $F = this.holdTime === null && (this.state === "finished" || this.state === "running" && QF);
17166
+ return $F && W !== inertia && (ZF.value = getFinalKeyframe$1(z, this.options, Z, this.speed)), G && G(ZF.value), $F && this.finish(), ZF;
16988
17167
  }
16989
17168
  then(n, _) {
16990
17169
  return this.finished.then(n, _);
@@ -18047,46 +18226,46 @@ function onlyElements(n) {
18047
18226
  }), _;
18048
18227
  }
18049
18228
  var AnimatePresence = ({ children: n, custom: _, initial: E = !0, onExitComplete: O, presenceAffectsLayout: A = !0, mode: j = "sync", propagate: M = !1, anchorX: N = "left", root: P }) => {
18050
- let [z, B] = usePresence(M), H = useMemo(() => onlyElements(n), [n]), U = M && !z ? [] : H.map(getChildKey), G = useRef(!0), Z = useRef(H), KF = useConstant(() => /* @__PURE__ */ new Map()), qF = useRef(/* @__PURE__ */ new Set()), [JF, XF] = useState(H), [$F, eI] = useState(H);
18229
+ let [z, B] = usePresence(M), H = useMemo(() => onlyElements(n), [n]), U = M && !z ? [] : H.map(getChildKey), G = useRef(!0), Z = useRef(H), qF = useConstant(() => /* @__PURE__ */ new Map()), JF = useRef(/* @__PURE__ */ new Set()), [YF, ZF] = useState(H), [eI, tI] = useState(H);
18051
18230
  useIsomorphicLayoutEffect(() => {
18052
18231
  G.current = !1, Z.current = H;
18053
- for (let n = 0; n < $F.length; n++) {
18054
- let _ = getChildKey($F[n]);
18055
- U.includes(_) ? (KF.delete(_), qF.current.delete(_)) : KF.get(_) !== !0 && KF.set(_, !1);
18232
+ for (let n = 0; n < eI.length; n++) {
18233
+ let _ = getChildKey(eI[n]);
18234
+ U.includes(_) ? (qF.delete(_), JF.current.delete(_)) : qF.get(_) !== !0 && qF.set(_, !1);
18056
18235
  }
18057
18236
  }, [
18058
- $F,
18237
+ eI,
18059
18238
  U.length,
18060
18239
  U.join("-")
18061
18240
  ]);
18062
- let tI = [];
18063
- if (H !== JF) {
18241
+ let nI = [];
18242
+ if (H !== YF) {
18064
18243
  let n = [...H];
18065
- for (let _ = 0; _ < $F.length; _++) {
18066
- let E = $F[_], O = getChildKey(E);
18067
- U.includes(O) || (n.splice(_, 0, E), tI.push(E));
18244
+ for (let _ = 0; _ < eI.length; _++) {
18245
+ let E = eI[_], O = getChildKey(E);
18246
+ U.includes(O) || (n.splice(_, 0, E), nI.push(E));
18068
18247
  }
18069
- return j === "wait" && tI.length && (n = tI), eI(onlyElements(n)), XF(H), null;
18248
+ return j === "wait" && nI.length && (n = nI), tI(onlyElements(n)), ZF(H), null;
18070
18249
  }
18071
- process.env.NODE_ENV !== "production" && j === "wait" && $F.length > 1 && console.warn("You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.");
18072
- let { forceRender: nI } = useContext(LayoutGroupContext);
18073
- return jsx(Fragment$1, { children: $F.map((n) => {
18074
- let W = getChildKey(n), JF = M && !z ? !1 : H === $F || U.includes(W);
18250
+ process.env.NODE_ENV !== "production" && j === "wait" && eI.length > 1 && console.warn("You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.");
18251
+ let { forceRender: rI } = useContext(LayoutGroupContext);
18252
+ return jsx(Fragment$1, { children: eI.map((n) => {
18253
+ let W = getChildKey(n), YF = M && !z ? !1 : H === eI || U.includes(W);
18075
18254
  return jsx(PresenceChild, {
18076
- isPresent: JF,
18255
+ isPresent: YF,
18077
18256
  initial: !G.current || E ? void 0 : !1,
18078
18257
  custom: _,
18079
18258
  presenceAffectsLayout: A,
18080
18259
  mode: j,
18081
18260
  root: P,
18082
- onExitComplete: JF ? void 0 : () => {
18083
- if (qF.current.has(W)) return;
18084
- if (qF.current.add(W), KF.has(W)) KF.set(W, !0);
18261
+ onExitComplete: YF ? void 0 : () => {
18262
+ if (JF.current.has(W)) return;
18263
+ if (JF.current.add(W), qF.has(W)) qF.set(W, !0);
18085
18264
  else return;
18086
18265
  let n = !0;
18087
- KF.forEach((_) => {
18266
+ qF.forEach((_) => {
18088
18267
  _ || (n = !1);
18089
- }), n && (nI?.(), eI(Z.current), M && B?.(), O && O());
18268
+ }), n && (rI?.(), tI(Z.current), M && B?.(), O && O());
18090
18269
  },
18091
18270
  anchorX: N,
18092
18271
  children: n
@@ -18515,12 +18694,12 @@ function useVisualElement(n, _, E, O, A, j) {
18515
18694
  useInsertionEffect(() => {
18516
18695
  H && Z.current && H.update(E, P);
18517
18696
  });
18518
- let KF = E[optimizedAppearDataAttribute], JF = useRef(!!KF && !window.MotionHandoffIsComplete?.(KF) && window.MotionHasOptimisedAnimation?.(KF));
18697
+ let qF = E[optimizedAppearDataAttribute], YF = useRef(!!qF && !window.MotionHandoffIsComplete?.(qF) && window.MotionHasOptimisedAnimation?.(qF));
18519
18698
  return useIsomorphicLayoutEffect(() => {
18520
- H && (Z.current = !0, window.MotionIsMounted = !0, H.updateFeatures(), H.scheduleRenderMicrotask(), JF.current && H.animationState && H.animationState.animateChanges());
18699
+ H && (Z.current = !0, window.MotionIsMounted = !0, H.updateFeatures(), H.scheduleRenderMicrotask(), YF.current && H.animationState && H.animationState.animateChanges());
18521
18700
  }), useEffect(() => {
18522
- H && (!JF.current && H.animationState && H.animationState.animateChanges(), JF.current &&= (queueMicrotask(() => {
18523
- window.MotionHandoffMarkAsComplete?.(KF);
18701
+ H && (!YF.current && H.animationState && H.animationState.animateChanges(), YF.current &&= (queueMicrotask(() => {
18702
+ window.MotionHandoffMarkAsComplete?.(qF);
18524
18703
  }), !1), H.enteringChildren = void 0);
18525
18704
  }), H;
18526
18705
  }
@@ -19198,34 +19377,34 @@ function createAnimationState(n) {
19198
19377
  function M(j) {
19199
19378
  let { props: M } = n, N = getVariantContext(n.parent) || {}, P = [], z = /* @__PURE__ */ new Set(), B = {}, H = Infinity;
19200
19379
  for (let _ = 0; _ < numAnimationTypes; _++) {
19201
- let U = reversePriorityOrder[_], W = E[U], G = M[U] === void 0 ? N[U] : M[U], Z = isVariantLabel(G), KF = U === j ? W.isActive : null;
19202
- KF === !1 && (H = _);
19203
- let qF = G === N[U] && G !== M[U] && Z;
19204
- if (qF && O && n.manuallyAnimateOnMount && (qF = !1), W.protectedKeys = { ...B }, !W.isActive && KF === null || !G && !W.prevProp || isAnimationControls(G) || typeof G == "boolean") continue;
19205
- let JF = checkVariantsDidChange(W.prevProp, G), YF = JF || U === j && W.isActive && !qF && Z || _ > H && Z, XF = !1, ZF = Array.isArray(G) ? G : [G], QF = ZF.reduce(A(U), {});
19206
- KF === !1 && (QF = {});
19207
- let { prevResolvedValues: $F = {} } = W, eI = {
19208
- ...$F,
19209
- ...QF
19210
- }, tI = (_) => {
19211
- YF = !0, z.has(_) && (XF = !0, z.delete(_)), W.needsAnimating[_] = !0;
19380
+ let U = reversePriorityOrder[_], W = E[U], G = M[U] === void 0 ? N[U] : M[U], Z = isVariantLabel(G), qF = U === j ? W.isActive : null;
19381
+ qF === !1 && (H = _);
19382
+ let JF = G === N[U] && G !== M[U] && Z;
19383
+ if (JF && O && n.manuallyAnimateOnMount && (JF = !1), W.protectedKeys = { ...B }, !W.isActive && qF === null || !G && !W.prevProp || isAnimationControls(G) || typeof G == "boolean") continue;
19384
+ let YF = checkVariantsDidChange(W.prevProp, G), XF = YF || U === j && W.isActive && !JF && Z || _ > H && Z, ZF = !1, QF = Array.isArray(G) ? G : [G], $F = QF.reduce(A(U), {});
19385
+ qF === !1 && ($F = {});
19386
+ let { prevResolvedValues: eI = {} } = W, tI = {
19387
+ ...eI,
19388
+ ...$F
19389
+ }, nI = (_) => {
19390
+ XF = !0, z.has(_) && (ZF = !0, z.delete(_)), W.needsAnimating[_] = !0;
19212
19391
  let E = n.getValue(_);
19213
19392
  E && (E.liveStyle = !1);
19214
19393
  };
19215
- for (let n in eI) {
19216
- let _ = QF[n], E = $F[n];
19394
+ for (let n in tI) {
19395
+ let _ = $F[n], E = eI[n];
19217
19396
  if (B.hasOwnProperty(n)) continue;
19218
19397
  let O = !1;
19219
- O = isKeyframesTarget(_) && isKeyframesTarget(E) ? !shallowCompare(_, E) : _ !== E, O ? _ == null ? z.add(n) : tI(n) : _ !== void 0 && z.has(n) ? tI(n) : W.protectedKeys[n] = !0;
19398
+ O = isKeyframesTarget(_) && isKeyframesTarget(E) ? !shallowCompare(_, E) : _ !== E, O ? _ == null ? z.add(n) : nI(n) : _ !== void 0 && z.has(n) ? nI(n) : W.protectedKeys[n] = !0;
19220
19399
  }
19221
- W.prevProp = G, W.prevResolvedValues = QF, W.isActive && (B = {
19400
+ W.prevProp = G, W.prevResolvedValues = $F, W.isActive && (B = {
19222
19401
  ...B,
19223
- ...QF
19224
- }), O && n.blockInitialAnimation && (YF = !1);
19225
- let nI = qF && JF;
19226
- YF && (!nI || XF) && P.push(...ZF.map((_) => {
19402
+ ...$F
19403
+ }), O && n.blockInitialAnimation && (XF = !1);
19404
+ let rI = JF && YF;
19405
+ XF && (!rI || ZF) && P.push(...QF.map((_) => {
19227
19406
  let E = { type: U };
19228
- if (typeof _ == "string" && O && !nI && n.manuallyAnimateOnMount && n.parent) {
19407
+ if (typeof _ == "string" && O && !rI && n.manuallyAnimateOnMount && n.parent) {
19229
19408
  let { parent: O } = n, A = resolveVariant(O, _);
19230
19409
  if (O.enteringChildren && A) {
19231
19410
  let { delayChildren: _ } = A.transition || {};
@@ -21383,10 +21562,10 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$4, { children: [/* @__PURE_
21383
21562
  });
21384
21563
  let N = j - n + 100, P = M - O + 100, z = window.innerWidth - 300, B = window.innerHeight - 100, H = z / N, U = B / P, W = Math.min(H, U);
21385
21564
  W = Math.min(Math.max(W, .1), 5), _(W);
21386
- let G = (n + j) / 2, Z = (O + M) / 2, KF = z / 2, qF = B / 2;
21565
+ let G = (n + j) / 2, Z = (O + M) / 2, qF = z / 2, JF = B / 2;
21387
21566
  E({
21388
- x: KF - G * W,
21389
- y: qF - Z * W
21567
+ x: qF - G * W,
21568
+ y: JF - Z * W
21390
21569
  });
21391
21570
  },
21392
21571
  children: /* @__PURE__ */ jsx(AspectRatioIcon, {})
@@ -21396,34 +21575,34 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$4, { children: [/* @__PURE_
21396
21575
  });
21397
21576
  };
21398
21577
  var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light", templates: j, activeTemplateId: M, onTemplateChange: N }) => {
21399
- let [P, z] = useState(!0), [B, H] = useState(!0), [U, W] = useState(null), [G, Z] = useState(!1), [KF, qF] = useState(!1), [JF, YF] = useState(j && j.length > 0 ? j[0].id : null), XF = React.useRef(null), { addElement: ZF, loadState: $F, state: eI, undo: tI, redo: nI, copy: rI, paste: iI, removeSelected: sI, updateElements: cI } = useEditor(), lI = React.useRef(null);
21578
+ let [P, z] = useState(!0), [B, H] = useState(!0), [U, W] = useState(null), [G, Z] = useState(!1), [qF, JF] = useState(!1), [YF, XF] = useState(j && j.length > 0 ? j[0].id : null), ZF = React.useRef(null), { addElement: QF, loadState: eI, state: tI, undo: nI, redo: rI, copy: iI, paste: aI, removeSelected: cI, updateElements: lI } = useEditor(), uI = React.useRef(null);
21400
21579
  React.useEffect(() => {
21401
21580
  let n = () => {
21402
- qF(window.innerWidth < 768);
21581
+ JF(window.innerWidth < 768);
21403
21582
  };
21404
21583
  return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
21405
21584
  }, []);
21406
- let uI = () => {
21585
+ let dI = () => {
21407
21586
  let n = {
21408
- elements: eI.elements,
21409
- isList: eI.isList,
21410
- mockData: eI.mockData,
21411
- singleMockData: eI.singleMockData,
21412
- listSettings: eI.listSettings,
21413
- canvasHeight: eI.canvasHeight,
21414
- gridSize: eI.gridSize
21587
+ elements: tI.elements,
21588
+ isList: tI.isList,
21589
+ mockData: tI.mockData,
21590
+ singleMockData: tI.singleMockData,
21591
+ listSettings: tI.listSettings,
21592
+ canvasHeight: tI.canvasHeight,
21593
+ gridSize: tI.gridSize
21415
21594
  }, _ = JSON.stringify(n, null, 2), E = new Blob([_], { type: "application/json" }), O = URL.createObjectURL(E), A = document.createElement("a");
21416
21595
  A.href = O, A.download = `layout-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.json`, document.body.appendChild(A), A.click(), document.body.removeChild(A), URL.revokeObjectURL(O);
21417
- }, dI = () => {
21418
- lI.current?.click();
21419
- }, fI = (n) => {
21596
+ }, fI = () => {
21597
+ uI.current?.click();
21598
+ }, pI = (n) => {
21420
21599
  let _ = n.target.files?.[0];
21421
21600
  if (!_) return;
21422
21601
  let E = new FileReader();
21423
21602
  E.onload = (n) => {
21424
21603
  try {
21425
21604
  let _ = n.target?.result;
21426
- $F(JSON.parse(_));
21605
+ eI(JSON.parse(_));
21427
21606
  } catch (n) {
21428
21607
  console.error("Failed to import layout", n), alert("Erro ao importar layout. Arquivo inválido.");
21429
21608
  }
@@ -21441,7 +21620,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21441
21620
  let n = new FileReader();
21442
21621
  n.onload = (n) => {
21443
21622
  let _ = n.target?.result;
21444
- ZF({
21623
+ QF({
21445
21624
  type: "image",
21446
21625
  content: _,
21447
21626
  width: 200,
@@ -21453,24 +21632,24 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21453
21632
  }
21454
21633
  };
21455
21634
  return window.addEventListener("paste", n), () => window.removeEventListener("paste", n);
21456
- }, [ZF]), React.useEffect(() => {
21635
+ }, [QF]), React.useEffect(() => {
21457
21636
  let n = (n) => {
21458
21637
  if (!(document.activeElement?.tagName === "INPUT" || document.activeElement?.tagName === "TEXTAREA" || document.activeElement?.isContentEditable)) {
21459
- if ((n.ctrlKey || n.metaKey) && n.key === "z") n.shiftKey ? (n.preventDefault(), nI()) : (n.preventDefault(), tI());
21460
- else if ((n.ctrlKey || n.metaKey) && n.key === "y") n.preventDefault(), nI();
21461
- else if ((n.ctrlKey || n.metaKey) && n.key === "c") n.preventDefault(), rI();
21462
- else if ((n.ctrlKey || n.metaKey) && n.key === "v") n.preventDefault(), iI();
21463
- else if (n.key === "Delete" || n.key === "Backspace") eI.selectedElementIds.length > 0 && (n.preventDefault(), sI());
21638
+ if ((n.ctrlKey || n.metaKey) && n.key === "z") n.shiftKey ? (n.preventDefault(), rI()) : (n.preventDefault(), nI());
21639
+ else if ((n.ctrlKey || n.metaKey) && n.key === "y") n.preventDefault(), rI();
21640
+ else if ((n.ctrlKey || n.metaKey) && n.key === "c") n.preventDefault(), iI();
21641
+ else if ((n.ctrlKey || n.metaKey) && n.key === "v") n.preventDefault(), aI();
21642
+ else if (n.key === "Delete" || n.key === "Backspace") tI.selectedElementIds.length > 0 && (n.preventDefault(), cI());
21464
21643
  else if ([
21465
21644
  "ArrowUp",
21466
21645
  "ArrowDown",
21467
21646
  "ArrowLeft",
21468
21647
  "ArrowRight"
21469
- ].includes(n.key) && eI.selectedElementIds.length > 0) {
21648
+ ].includes(n.key) && tI.selectedElementIds.length > 0) {
21470
21649
  n.preventDefault();
21471
21650
  let _ = n.shiftKey ? 10 : 1, E = [];
21472
- eI.selectedElementIds.forEach((O) => {
21473
- let A = eI.elements.find((n) => n.id === O);
21651
+ tI.selectedElementIds.forEach((O) => {
21652
+ let A = tI.elements.find((n) => n.id === O);
21474
21653
  if (A) {
21475
21654
  let j = {};
21476
21655
  n.key === "ArrowUp" && (j.y = A.y - _), n.key === "ArrowDown" && (j.y = A.y + _), n.key === "ArrowLeft" && (j.x = A.x - _), n.key === "ArrowRight" && (j.x = A.x + _), E.push({
@@ -21478,66 +21657,66 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21478
21657
  changes: j
21479
21658
  });
21480
21659
  }
21481
- }), E.length > 0 && cI(E);
21660
+ }), E.length > 0 && lI(E);
21482
21661
  }
21483
21662
  }
21484
21663
  };
21485
21664
  return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
21486
21665
  }, [
21487
- tI,
21488
21666
  nI,
21489
21667
  rI,
21490
21668
  iI,
21491
- sI,
21492
- eI.selectedElementIds,
21493
- eI.elements,
21494
- cI
21669
+ aI,
21670
+ cI,
21671
+ tI.selectedElementIds,
21672
+ tI.elements,
21673
+ lI
21495
21674
  ]), React.useEffect(() => {
21496
21675
  if (E) try {
21497
21676
  let n = typeof E == "string" ? JSON.parse(E) : E;
21498
- Array.isArray(n) ? $F({ elements: n }) : n.elements && $F(n);
21677
+ Array.isArray(n) ? eI({ elements: n }) : n.elements && eI(n);
21499
21678
  } catch (n) {
21500
21679
  console.error("Failed to load initial state", n);
21501
21680
  }
21502
- }, [E, $F]), React.useEffect(() => {
21681
+ }, [E, eI]), React.useEffect(() => {
21503
21682
  if (!(!j || j.length === 0)) {
21504
21683
  if (M) {
21505
- YF(M);
21684
+ XF(M);
21506
21685
  return;
21507
21686
  }
21508
- JF || YF(j[0].id);
21687
+ YF || XF(j[0].id);
21509
21688
  }
21510
21689
  }, [
21511
21690
  M,
21512
- JF,
21691
+ YF,
21513
21692
  j
21514
21693
  ]);
21515
- let pI = React.useCallback((n) => {
21694
+ let mI = React.useCallback((n) => {
21516
21695
  if (n) try {
21517
21696
  let _ = typeof n == "string" ? JSON.parse(n) : n;
21518
21697
  if (Array.isArray(_)) {
21519
- $F({ elements: _ });
21698
+ eI({ elements: _ });
21520
21699
  return;
21521
21700
  }
21522
21701
  if (_ && typeof _ == "object" && "elements" in _) {
21523
- $F(_);
21702
+ eI(_);
21524
21703
  return;
21525
21704
  }
21526
21705
  } catch (n) {
21527
21706
  console.error("Failed to apply template", n);
21528
21707
  }
21529
- }, [$F]);
21708
+ }, [eI]);
21530
21709
  React.useEffect(() => {
21531
- if (!j || j.length === 0 || !M || XF.current === M) return;
21710
+ if (!j || j.length === 0 || !M || ZF.current === M) return;
21532
21711
  let n = j.find((n) => n.id === M);
21533
- n && (pI(n.state), XF.current = M);
21712
+ n && (mI(n.state), ZF.current = M);
21534
21713
  }, [
21535
21714
  M,
21536
- pI,
21715
+ mI,
21537
21716
  j
21538
21717
  ]);
21539
- let mI = (n) => {
21540
- console.log(`Adding element of type: ${n}`), ZF({
21718
+ let hI = (n) => {
21719
+ console.log(`Adding element of type: ${n}`), QF({
21541
21720
  type: n,
21542
21721
  content: `New ${n}`
21543
21722
  });
@@ -21607,19 +21786,19 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21607
21786
  style: { width: "240px" },
21608
21787
  children: [
21609
21788
  /* @__PURE__ */ jsx(v$3, {
21610
- onSelect: () => mI("text"),
21789
+ onSelect: () => hI("text"),
21611
21790
  children: "Texto"
21612
21791
  }),
21613
21792
  /* @__PURE__ */ jsx(v$3, {
21614
- onSelect: () => mI("image"),
21793
+ onSelect: () => hI("image"),
21615
21794
  children: "Imagem"
21616
21795
  }),
21617
21796
  /* @__PURE__ */ jsx(v$3, {
21618
- onSelect: () => mI("box"),
21797
+ onSelect: () => hI("box"),
21619
21798
  children: "Caixa (Container)"
21620
21799
  }),
21621
21800
  /* @__PURE__ */ jsx(v$3, {
21622
- onSelect: () => mI("text-container"),
21801
+ onSelect: () => hI("text-container"),
21623
21802
  children: "Container com Texto"
21624
21803
  })
21625
21804
  ]
@@ -21635,12 +21814,12 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21635
21814
  onClick: () => {
21636
21815
  if (O) {
21637
21816
  let n = {
21638
- elements: eI.elements,
21639
- isList: eI.isList,
21640
- mockData: eI.mockData,
21641
- singleMockData: eI.singleMockData,
21642
- listSettings: eI.listSettings,
21643
- canvasHeight: eI.canvasHeight
21817
+ elements: tI.elements,
21818
+ isList: tI.isList,
21819
+ mockData: tI.mockData,
21820
+ singleMockData: tI.singleMockData,
21821
+ listSettings: tI.listSettings,
21822
+ canvasHeight: tI.canvasHeight
21644
21823
  };
21645
21824
  O(JSON.stringify(n, null, 2));
21646
21825
  }
@@ -21658,7 +21837,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21658
21837
  cursor: "pointer",
21659
21838
  justifyContent: "center"
21660
21839
  },
21661
- onClick: uI,
21840
+ onClick: dI,
21662
21841
  children: [/* @__PURE__ */ jsx(DownloadIcon, {}), " Exportar"]
21663
21842
  }), /* @__PURE__ */ jsxs(o, {
21664
21843
  variant: "soft",
@@ -21668,16 +21847,16 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21668
21847
  cursor: "pointer",
21669
21848
  justifyContent: "center"
21670
21849
  },
21671
- onClick: dI,
21850
+ onClick: fI,
21672
21851
  children: [/* @__PURE__ */ jsx(UploadIcon, {}), " Importar"]
21673
21852
  })]
21674
21853
  }),
21675
21854
  /* @__PURE__ */ jsx("input", {
21676
21855
  type: "file",
21677
- ref: lI,
21856
+ ref: uI,
21678
21857
  style: { display: "none" },
21679
21858
  accept: ".json",
21680
- onChange: fI
21859
+ onChange: pI
21681
21860
  }),
21682
21861
  /* @__PURE__ */ jsxs(p, {
21683
21862
  mt: "3",
@@ -21738,8 +21917,8 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21738
21917
  /* @__PURE__ */ jsx(p, {
21739
21918
  mt: "2",
21740
21919
  children: /* @__PURE__ */ jsx("select", {
21741
- value: JF || "",
21742
- onChange: (n) => YF(n.target.value),
21920
+ value: YF || "",
21921
+ onChange: (n) => XF(n.target.value),
21743
21922
  style: {
21744
21923
  width: "100%",
21745
21924
  padding: "8px",
@@ -21756,12 +21935,12 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21756
21935
  }, n.id))
21757
21936
  })
21758
21937
  }),
21759
- JF && j.find((n) => n.id === JF)?.description && /* @__PURE__ */ jsx(p$2, {
21938
+ YF && j.find((n) => n.id === YF)?.description && /* @__PURE__ */ jsx(p$2, {
21760
21939
  size: "1",
21761
21940
  color: "gray",
21762
21941
  as: "div",
21763
21942
  mt: "2",
21764
- children: j.find((n) => n.id === JF)?.description
21943
+ children: j.find((n) => n.id === YF)?.description
21765
21944
  }),
21766
21945
  /* @__PURE__ */ jsx(o, {
21767
21946
  variant: "soft",
@@ -21773,13 +21952,13 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21773
21952
  marginTop: "10px"
21774
21953
  },
21775
21954
  onClick: () => {
21776
- if (!JF) return;
21955
+ if (!YF) return;
21777
21956
  if (N) {
21778
- N(JF);
21957
+ N(YF);
21779
21958
  return;
21780
21959
  }
21781
- let n = j.find((n) => n.id === JF);
21782
- n && (pI(n.state), XF.current = JF);
21960
+ let n = j.find((n) => n.id === YF);
21961
+ n && (mI(n.state), ZF.current = YF);
21783
21962
  },
21784
21963
  children: "Aplicar Template"
21785
21964
  })
@@ -22033,7 +22212,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
22033
22212
  onOpenChange: Z
22034
22213
  }),
22035
22214
  /* @__PURE__ */ jsx(s$4, {
22036
- open: KF,
22215
+ open: qF,
22037
22216
  children: /* @__PURE__ */ jsxs(p$8, {
22038
22217
  style: { maxWidth: 450 },
22039
22218
  children: [/* @__PURE__ */ jsx(g$2, { children: "Dispositivo Não Suportado" }), /* @__PURE__ */ jsx(m$3, {
@@ -22084,6 +22263,10 @@ var camelToKebab = (n) => n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toL
22084
22263
  let O = camelToKebab(n), A = typeof E == "number" && _.includes(n) ? E + "px" : E;
22085
22264
  return typeof A == "string" && /^#([0-9a-fA-F]{8})$/.test(A) && (A = hex8ToRgba(A)), `${O}: ${A}`;
22086
22265
  }).filter(Boolean).join("; ");
22266
+ }, applyShadowColor = (n, _) => {
22267
+ if (!n || n === "none") return `0 4px 12px ${_}`;
22268
+ let E = n.split(","), O = E[E.length - 1].trim(), A = /(rgba?\([^)]+\)|#(?:[0-9a-fA-F]{3,8})|[a-zA-Z]+)\s*$/, j = A.test(O) ? O.replace(A, _) : `${O} ${_}`;
22269
+ return E[E.length - 1] = j, E.join(", ");
22087
22270
  }, measureTextHeight = (n, _, E, O, A = 1.2) => {
22088
22271
  if (!n) return 0;
22089
22272
  try {
@@ -22184,8 +22367,8 @@ var camelToKebab = (n) => n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toL
22184
22367
  } else _ = measureTextHeight(M, B, z, P);
22185
22368
  let U = _ + N * 2;
22186
22369
  (!H || H && !_) && (U += 4);
22187
- let W = parseInt(String(n.style && n.style.minHeight || 0)), G = Math.max(U, W), Z = n.height, KF = G - Z;
22188
- if (KF > 0) {
22370
+ let W = parseInt(String(n.style && n.style.minHeight || 0)), G = Math.max(U, W), Z = n.height, qF = G - Z;
22371
+ if (qF > 0) {
22189
22372
  n.height = G, n.content = M;
22190
22373
  let _ = [], N = O.get(n.id);
22191
22374
  N && E.forEach((E) => {
@@ -22195,10 +22378,10 @@ var camelToKebab = (n) => n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toL
22195
22378
  });
22196
22379
  let P = new Set([n.id]);
22197
22380
  _.forEach((n) => {
22198
- n.height += KF, P.add(n.id);
22381
+ n.height += qF, P.add(n.id);
22199
22382
  }), A.push({
22200
22383
  triggerY: n.y + Z,
22201
- delta: KF,
22384
+ delta: qF,
22202
22385
  ignoreIds: P
22203
22386
  });
22204
22387
  }
@@ -22246,9 +22429,9 @@ var camelToKebab = (n) => n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toL
22246
22429
  });
22247
22430
  });
22248
22431
  let j = {};
22249
- n.styleBindings && Object.entries(n.styleBindings).forEach(([n, E]) => {
22250
- let O = _[E];
22251
- O != null && (j[n] = String(O));
22432
+ n.styleBindings && Object.entries(n.styleBindings).forEach(([E, O]) => {
22433
+ let M = _[O];
22434
+ M != null && (E === "boxShadowColor" ? j.boxShadow = applyShadowColor(A.boxShadow || n.style?.boxShadow, String(M)) : j[E] = String(M));
22252
22435
  });
22253
22436
  let M = {
22254
22437
  width: n.width,
@@ -22316,9 +22499,9 @@ var camelToKebab = (n) => n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toL
22316
22499
  });
22317
22500
  });
22318
22501
  let j = {};
22319
- n.styleBindings && Object.entries(n.styleBindings).forEach(([n, E]) => {
22320
- let O = _[E];
22321
- O != null && (j[n] = String(O));
22502
+ n.styleBindings && Object.entries(n.styleBindings).forEach(([E, O]) => {
22503
+ let M = _[O];
22504
+ M != null && (E === "boxShadowColor" ? j.boxShadow = applyShadowColor(A.boxShadow || n.style?.boxShadow, String(M)) : j[E] = String(M));
22322
22505
  });
22323
22506
  let M = {
22324
22507
  position: "absolute",
@@ -22463,6 +22646,7 @@ var getRuntimeScript = (n, _) => `
22463
22646
  const camelToKebab = ${camelToKebab.toString()};
22464
22647
  const hex8ToRgba = ${hex8ToRgba.toString()};
22465
22648
  const styleObjectToString = ${styleObjectToString.toString()};
22649
+ const applyShadowColor = ${applyShadowColor.toString()};
22466
22650
  const measureTextHeight = ${measureTextHeight.toString()};
22467
22651
  const checkCondition = ${checkCondition.toString()};
22468
22652
  const formatValue = ${formatValue.toString()};