@nswds/app 1.126.2 → 1.126.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -4865,12 +4865,9 @@ var ScrollButton = ({ icon, onClick, disabled }) => {
4865
4865
  }
4866
4866
  return () => clearInterval(intervalRef.current);
4867
4867
  }, [isPressed, onClick]);
4868
- React5__namespace.default.useEffect(() => {
4869
- if (disabled) {
4870
- clearInterval(intervalRef.current);
4871
- setIsPressed(false);
4872
- }
4873
- }, [disabled]);
4868
+ if (disabled && isPressed) {
4869
+ setIsPressed(false);
4870
+ }
4874
4871
  return /* @__PURE__ */ jsxRuntime.jsx(
4875
4872
  "button",
4876
4873
  {
@@ -6138,12 +6135,9 @@ var ScrollButton2 = ({ icon, onClick, disabled }) => {
6138
6135
  }
6139
6136
  return () => clearInterval(intervalRef.current);
6140
6137
  }, [isPressed, onClick]);
6141
- React5__namespace.default.useEffect(() => {
6142
- if (disabled) {
6143
- clearInterval(intervalRef.current);
6144
- setIsPressed(false);
6145
- }
6146
- }, [disabled]);
6138
+ if (disabled && isPressed) {
6139
+ setIsPressed(false);
6140
+ }
6147
6141
  return /* @__PURE__ */ jsxRuntime.jsx(
6148
6142
  "button",
6149
6143
  {
@@ -8348,7 +8342,7 @@ function ChartTooltipContent({
8348
8342
  )
8349
8343
  ] })
8350
8344
  },
8351
- item.dataKey
8345
+ key
8352
8346
  );
8353
8347
  }) })
8354
8348
  ]
@@ -11741,12 +11735,9 @@ var ScrollButton3 = ({ icon, onClick, disabled }) => {
11741
11735
  }
11742
11736
  return () => clearInterval(intervalRef.current);
11743
11737
  }, [isPressed, onClick]);
11744
- React5__namespace.default.useEffect(() => {
11745
- if (disabled) {
11746
- clearInterval(intervalRef.current);
11747
- setIsPressed(false);
11748
- }
11749
- }, [disabled]);
11738
+ if (disabled && isPressed) {
11739
+ setIsPressed(false);
11740
+ }
11750
11741
  return /* @__PURE__ */ jsxRuntime.jsx(
11751
11742
  "button",
11752
11743
  {
@@ -13478,24 +13469,6 @@ var ChartTooltip5 = ({ active, payload, valueFormatter }) => {
13478
13469
  }
13479
13470
  return null;
13480
13471
  };
13481
- var renderInactiveShape = (props) => {
13482
- const { cx, cy, innerRadius, outerRadius, startAngle, endAngle, className } = props;
13483
- return /* @__PURE__ */ jsxRuntime.jsx(
13484
- RechartsPrimitive.Sector,
13485
- {
13486
- cx,
13487
- cy,
13488
- innerRadius,
13489
- outerRadius,
13490
- startAngle,
13491
- endAngle,
13492
- className,
13493
- fill: "",
13494
- opacity: 0.3,
13495
- style: { outline: "none" }
13496
- }
13497
- );
13498
- };
13499
13472
  var DonutChart = React5__namespace.default.forwardRef(
13500
13473
  ({
13501
13474
  data = [],
@@ -13536,6 +13509,10 @@ var DonutChart = React5__namespace.default.forwardRef(
13536
13509
  });
13537
13510
  }
13538
13511
  };
13512
+ const renderShape3 = (props) => {
13513
+ const isInactive = activeIndex !== void 0 && props.index !== activeIndex;
13514
+ return /* @__PURE__ */ jsxRuntime.jsx(RechartsPrimitive.Sector, { ...props, opacity: isInactive ? 0.3 : 1, style: { outline: "none" } });
13515
+ };
13539
13516
  return /* @__PURE__ */ jsxRuntime.jsx(
13540
13517
  "div",
13541
13518
  {
@@ -13583,8 +13560,7 @@ var DonutChart = React5__namespace.default.forwardRef(
13583
13560
  nameKey: category,
13584
13561
  isAnimationActive: false,
13585
13562
  onClick: handleShapeClick,
13586
- activeIndex,
13587
- inactiveShape: renderInactiveShape,
13563
+ shape: renderShape3,
13588
13564
  style: { outline: "none" }
13589
13565
  }
13590
13566
  ),
@@ -14495,7 +14471,7 @@ function FormatToggle({ format, setFormat }) {
14495
14471
 
14496
14472
  // package.json
14497
14473
  var package_default = {
14498
- version: "1.126.1"};
14474
+ version: "1.126.3"};
14499
14475
  var SluggerContext = React5__namespace.default.createContext(null);
14500
14476
  function flattenText(nodes) {
14501
14477
  if (nodes == null || typeof nodes === "boolean") return "";
@@ -15150,12 +15126,9 @@ var ScrollButton4 = ({ icon, onClick, disabled }) => {
15150
15126
  }
15151
15127
  return () => clearInterval(intervalRef.current);
15152
15128
  }, [isPressed, onClick]);
15153
- React5__namespace.default.useEffect(() => {
15154
- if (disabled) {
15155
- clearInterval(intervalRef.current);
15156
- setIsPressed(false);
15157
- }
15158
- }, [disabled]);
15129
+ if (disabled && isPressed) {
15130
+ setIsPressed(false);
15131
+ }
15159
15132
  return /* @__PURE__ */ jsxRuntime.jsx(
15160
15133
  "button",
15161
15134
  {
@@ -16867,9 +16840,7 @@ var MotionGlobalConfig = {};
16867
16840
  var isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v);
16868
16841
 
16869
16842
  // node_modules/motion-utils/dist/es/is-object.mjs
16870
- function isObject(value) {
16871
- return typeof value === "object" && value !== null;
16872
- }
16843
+ var isObject = (value) => typeof value === "object" && value !== null;
16873
16844
 
16874
16845
  // node_modules/motion-utils/dist/es/is-zero-value-string.mjs
16875
16846
  var isZeroValueString = (v) => /^0[^.\s]+$/u.test(v);
@@ -16889,13 +16860,12 @@ function memo(callback) {
16889
16860
  var noop = /* @__NO_SIDE_EFFECTS__ */ (any) => any;
16890
16861
 
16891
16862
  // node_modules/motion-utils/dist/es/pipe.mjs
16892
- var combineFunctions = (a, b) => (v) => b(a(v));
16893
- var pipe = (...transformers) => transformers.reduce(combineFunctions);
16863
+ var pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));
16894
16864
 
16895
16865
  // node_modules/motion-utils/dist/es/progress.mjs
16896
16866
  var progress = /* @__NO_SIDE_EFFECTS__ */ (from, to, value) => {
16897
- const toFromDifference = to - from;
16898
- return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
16867
+ const range = to - from;
16868
+ return range ? (value - from) / range : 1;
16899
16869
  };
16900
16870
 
16901
16871
  // node_modules/motion-utils/dist/es/subscription-manager.mjs
@@ -16933,9 +16903,7 @@ var secondsToMilliseconds = /* @__NO_SIDE_EFFECTS__ */ (seconds) => seconds * 1e
16933
16903
  var millisecondsToSeconds = /* @__NO_SIDE_EFFECTS__ */ (milliseconds) => milliseconds / 1e3;
16934
16904
 
16935
16905
  // node_modules/motion-utils/dist/es/velocity-per-second.mjs
16936
- function velocityPerSecond(velocity, frameDuration) {
16937
- return frameDuration ? velocity * (1e3 / frameDuration) : 0;
16938
- }
16906
+ var velocityPerSecond = /* @__NO_SIDE_EFFECTS__ */ (velocity, frameDuration) => frameDuration ? velocity * (1e3 / frameDuration) : 0;
16939
16907
 
16940
16908
  // node_modules/motion-utils/dist/es/warn-once.mjs
16941
16909
  var warned = /* @__PURE__ */ new Set();
@@ -16965,6 +16933,7 @@ function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
16965
16933
  } while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);
16966
16934
  return currentT;
16967
16935
  }
16936
+ // @__NO_SIDE_EFFECTS__
16968
16937
  function cubicBezier(mX1, mY1, mX2, mY2) {
16969
16938
  if (mX1 === mY1 && mX2 === mY2)
16970
16939
  return noop;
@@ -16973,10 +16942,10 @@ function cubicBezier(mX1, mY1, mX2, mY2) {
16973
16942
  }
16974
16943
 
16975
16944
  // node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs
16976
- var mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
16945
+ var mirrorEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
16977
16946
 
16978
16947
  // node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs
16979
- var reverseEasing = (easing) => (p) => 1 - easing(1 - p);
16948
+ var reverseEasing = /* @__NO_SIDE_EFFECTS__ */ (easing) => (p) => 1 - easing(1 - p);
16980
16949
 
16981
16950
  // node_modules/motion-utils/dist/es/easing/back.mjs
16982
16951
  var backOut = /* @__PURE__ */ cubicBezier(0.33, 1.53, 0.69, 0.99);
@@ -16997,12 +16966,12 @@ var easeOut = /* @__PURE__ */ cubicBezier(0, 0, 0.58, 1);
16997
16966
  var easeInOut = /* @__PURE__ */ cubicBezier(0.42, 0, 0.58, 1);
16998
16967
 
16999
16968
  // node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs
17000
- var isEasingArray = (ease2) => {
16969
+ var isEasingArray = /* @__NO_SIDE_EFFECTS__ */ (ease2) => {
17001
16970
  return Array.isArray(ease2) && typeof ease2[0] !== "number";
17002
16971
  };
17003
16972
 
17004
16973
  // node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs
17005
- var isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number";
16974
+ var isBezierDefinition = /* @__NO_SIDE_EFFECTS__ */ (easing) => Array.isArray(easing) && typeof easing[0] === "number";
17006
16975
 
17007
16976
  // node_modules/motion-utils/dist/es/easing/utils/map.mjs
17008
16977
  var easingLookup = {
@@ -17054,7 +17023,7 @@ var stepsOrder = [
17054
17023
  ];
17055
17024
 
17056
17025
  // node_modules/motion-dom/dist/es/frameloop/render-step.mjs
17057
- function createRenderStep(runNextFrame, stepName) {
17026
+ function createRenderStep(runNextFrame) {
17058
17027
  let thisFrame = /* @__PURE__ */ new Set();
17059
17028
  let nextFrame = /* @__PURE__ */ new Set();
17060
17029
  let isProcessing = false;
@@ -18506,7 +18475,7 @@ var transformPropOrder = [
18506
18475
  "skewX",
18507
18476
  "skewY"
18508
18477
  ];
18509
- var transformProps = /* @__PURE__ */ (() => new Set(transformPropOrder))();
18478
+ var transformProps = /* @__PURE__ */ (() => /* @__PURE__ */ new Set([...transformPropOrder, "pathRotation"]))();
18510
18479
 
18511
18480
  // node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs
18512
18481
  var isNumOrPxType = (v) => v === number || v === px;
@@ -18751,8 +18720,7 @@ function startWaapiAnimation(element, valueName, keyframes2, { delay: delay2 = 0
18751
18720
  };
18752
18721
  if (pseudoElement)
18753
18722
  options.pseudoElement = pseudoElement;
18754
- const animation = element.animate(keyframeOptions, options);
18755
- return animation;
18723
+ return element.animate(keyframeOptions, options);
18756
18724
  }
18757
18725
 
18758
18726
  // node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs
@@ -19230,201 +19198,6 @@ function calcChildStagger(children, child, delayChildren, staggerChildren = 0, s
19230
19198
  return delayIsFunction ? delayChildren(index, numChildren) : staggerDirection === 1 ? index * staggerChildren : maxStaggerDuration - index * staggerChildren;
19231
19199
  }
19232
19200
 
19233
- // node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs
19234
- var splitCSSVariableRegex = (
19235
- // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
19236
- /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
19237
- );
19238
- function parseCSSVariable(current) {
19239
- const match = splitCSSVariableRegex.exec(current);
19240
- if (!match)
19241
- return [,];
19242
- const [, token1, token2, fallback] = match;
19243
- return [`--${token1 ?? token2}`, fallback];
19244
- }
19245
- var maxDepth = 4;
19246
- function getVariableValue(current, element, depth = 1) {
19247
- invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
19248
- const [token, fallback] = parseCSSVariable(current);
19249
- if (!token)
19250
- return;
19251
- const resolved = window.getComputedStyle(element).getPropertyValue(token);
19252
- if (resolved) {
19253
- const trimmed = resolved.trim();
19254
- return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;
19255
- }
19256
- return isCSSVariableToken(fallback) ? getVariableValue(fallback, element, depth + 1) : fallback;
19257
- }
19258
-
19259
- // node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs
19260
- var underDampedSpring = {
19261
- type: "spring",
19262
- stiffness: 500,
19263
- damping: 25,
19264
- restSpeed: 10
19265
- };
19266
- var criticallyDampedSpring = (target) => ({
19267
- type: "spring",
19268
- stiffness: 550,
19269
- damping: target === 0 ? 2 * Math.sqrt(550) : 30,
19270
- restSpeed: 10
19271
- });
19272
- var keyframesTransition = {
19273
- type: "keyframes",
19274
- duration: 0.8
19275
- };
19276
- var ease = {
19277
- type: "keyframes",
19278
- ease: [0.25, 0.1, 0.35, 1],
19279
- duration: 0.3
19280
- };
19281
- var getDefaultTransition = (valueKey, { keyframes: keyframes2 }) => {
19282
- if (keyframes2.length > 2) {
19283
- return keyframesTransition;
19284
- } else if (transformProps.has(valueKey)) {
19285
- return valueKey.startsWith("scale") ? criticallyDampedSpring(keyframes2[1]) : underDampedSpring;
19286
- }
19287
- return ease;
19288
- };
19289
-
19290
- // node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs
19291
- function resolveTransition(transition, parentTransition) {
19292
- if (transition?.inherit && parentTransition) {
19293
- const { inherit: _, ...rest } = transition;
19294
- return { ...parentTransition, ...rest };
19295
- }
19296
- return transition;
19297
- }
19298
-
19299
- // node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs
19300
- function getValueTransition(transition, key) {
19301
- const valueTransition = transition?.[key] ?? transition?.["default"] ?? transition;
19302
- if (valueTransition !== transition) {
19303
- return resolveTransition(valueTransition, transition);
19304
- }
19305
- return valueTransition;
19306
- }
19307
-
19308
- // node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs
19309
- var orchestrationKeys = /* @__PURE__ */ new Set([
19310
- "when",
19311
- "delay",
19312
- "delayChildren",
19313
- "staggerChildren",
19314
- "staggerDirection",
19315
- "repeat",
19316
- "repeatType",
19317
- "repeatDelay",
19318
- "from",
19319
- "elapsed"
19320
- ]);
19321
- function isTransitionDefined(transition) {
19322
- for (const key in transition) {
19323
- if (!orchestrationKeys.has(key))
19324
- return true;
19325
- }
19326
- return false;
19327
- }
19328
-
19329
- // node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs
19330
- var animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
19331
- const valueTransition = getValueTransition(transition, name) || {};
19332
- const delay2 = valueTransition.delay || transition.delay || 0;
19333
- let { elapsed = 0 } = transition;
19334
- elapsed = elapsed - secondsToMilliseconds(delay2);
19335
- const options = {
19336
- keyframes: Array.isArray(target) ? target : [null, target],
19337
- ease: "easeOut",
19338
- velocity: value.getVelocity(),
19339
- ...valueTransition,
19340
- delay: -elapsed,
19341
- onUpdate: (v) => {
19342
- value.set(v);
19343
- valueTransition.onUpdate && valueTransition.onUpdate(v);
19344
- },
19345
- onComplete: () => {
19346
- onComplete();
19347
- valueTransition.onComplete && valueTransition.onComplete();
19348
- },
19349
- name,
19350
- motionValue: value,
19351
- element: isHandoff ? void 0 : element
19352
- };
19353
- if (!isTransitionDefined(valueTransition)) {
19354
- Object.assign(options, getDefaultTransition(name, options));
19355
- }
19356
- options.duration && (options.duration = secondsToMilliseconds(options.duration));
19357
- options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));
19358
- if (options.from !== void 0) {
19359
- options.keyframes[0] = options.from;
19360
- }
19361
- let shouldSkip = false;
19362
- if (options.type === false || options.duration === 0 && !options.repeatDelay) {
19363
- makeAnimationInstant(options);
19364
- if (options.delay === 0) {
19365
- shouldSkip = true;
19366
- }
19367
- }
19368
- if (MotionGlobalConfig.instantAnimations || MotionGlobalConfig.skipAnimations || element?.shouldSkipAnimations) {
19369
- shouldSkip = true;
19370
- makeAnimationInstant(options);
19371
- options.delay = 0;
19372
- }
19373
- options.allowFlatten = !valueTransition.type && !valueTransition.ease;
19374
- if (shouldSkip && !isHandoff && value.get() !== void 0) {
19375
- const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);
19376
- if (finalKeyframe !== void 0) {
19377
- frame.update(() => {
19378
- options.onUpdate(finalKeyframe);
19379
- options.onComplete();
19380
- });
19381
- return;
19382
- }
19383
- }
19384
- return valueTransition.isSync ? new JSAnimation(options) : new AsyncMotionValueAnimation(options);
19385
- };
19386
-
19387
- // node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs
19388
- function getValueState(visualElement) {
19389
- const state = [{}, {}];
19390
- visualElement?.values.forEach((value, key) => {
19391
- state[0][key] = value.get();
19392
- state[1][key] = value.getVelocity();
19393
- });
19394
- return state;
19395
- }
19396
- function resolveVariantFromProps(props, definition, custom, visualElement) {
19397
- if (typeof definition === "function") {
19398
- const [current, velocity] = getValueState(visualElement);
19399
- definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
19400
- }
19401
- if (typeof definition === "string") {
19402
- definition = props.variants && props.variants[definition];
19403
- }
19404
- if (typeof definition === "function") {
19405
- const [current, velocity] = getValueState(visualElement);
19406
- definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
19407
- }
19408
- return definition;
19409
- }
19410
-
19411
- // node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs
19412
- function resolveVariant(visualElement, definition, custom) {
19413
- const props = visualElement.getProps();
19414
- return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);
19415
- }
19416
-
19417
- // node_modules/motion-dom/dist/es/render/utils/keys-position.mjs
19418
- var positionalKeys = /* @__PURE__ */ new Set([
19419
- "width",
19420
- "height",
19421
- "top",
19422
- "left",
19423
- "right",
19424
- "bottom",
19425
- ...transformPropOrder
19426
- ]);
19427
-
19428
19201
  // node_modules/motion-dom/dist/es/value/index.mjs
19429
19202
  var MAX_VELOCITY_DELTA = 30;
19430
19203
  var isFloat = (value) => {
@@ -19704,6 +19477,201 @@ function motionValue(init, options) {
19704
19477
  return new MotionValue(init, options);
19705
19478
  }
19706
19479
 
19480
+ // node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs
19481
+ function resolveTransition(transition, parentTransition) {
19482
+ if (transition?.inherit && parentTransition) {
19483
+ const { inherit: _, ...rest } = transition;
19484
+ return { ...parentTransition, ...rest };
19485
+ }
19486
+ return transition;
19487
+ }
19488
+
19489
+ // node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs
19490
+ function getValueTransition(transition, key) {
19491
+ const valueTransition = transition?.[key] ?? transition?.["default"] ?? transition;
19492
+ if (valueTransition !== transition) {
19493
+ return resolveTransition(valueTransition, transition);
19494
+ }
19495
+ return valueTransition;
19496
+ }
19497
+
19498
+ // node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs
19499
+ var underDampedSpring = {
19500
+ type: "spring",
19501
+ stiffness: 500,
19502
+ damping: 25,
19503
+ restSpeed: 10
19504
+ };
19505
+ var criticallyDampedSpring = (target) => ({
19506
+ type: "spring",
19507
+ stiffness: 550,
19508
+ damping: target === 0 ? 2 * Math.sqrt(550) : 30,
19509
+ restSpeed: 10
19510
+ });
19511
+ var keyframesTransition = {
19512
+ type: "keyframes",
19513
+ duration: 0.8
19514
+ };
19515
+ var ease = {
19516
+ type: "keyframes",
19517
+ ease: [0.25, 0.1, 0.35, 1],
19518
+ duration: 0.3
19519
+ };
19520
+ var getDefaultTransition = (valueKey, { keyframes: keyframes2 }) => {
19521
+ if (keyframes2.length > 2) {
19522
+ return keyframesTransition;
19523
+ } else if (transformProps.has(valueKey)) {
19524
+ return valueKey.startsWith("scale") ? criticallyDampedSpring(keyframes2[1]) : underDampedSpring;
19525
+ }
19526
+ return ease;
19527
+ };
19528
+
19529
+ // node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs
19530
+ var orchestrationKeys = /* @__PURE__ */ new Set([
19531
+ "when",
19532
+ "delay",
19533
+ "delayChildren",
19534
+ "staggerChildren",
19535
+ "staggerDirection",
19536
+ "repeat",
19537
+ "repeatType",
19538
+ "repeatDelay",
19539
+ "from",
19540
+ "elapsed"
19541
+ ]);
19542
+ function isTransitionDefined(transition) {
19543
+ for (const key in transition) {
19544
+ if (!orchestrationKeys.has(key))
19545
+ return true;
19546
+ }
19547
+ return false;
19548
+ }
19549
+
19550
+ // node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs
19551
+ var animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
19552
+ const valueTransition = getValueTransition(transition, name) || {};
19553
+ const delay2 = valueTransition.delay || transition.delay || 0;
19554
+ let { elapsed = 0 } = transition;
19555
+ elapsed = elapsed - secondsToMilliseconds(delay2);
19556
+ const options = {
19557
+ keyframes: Array.isArray(target) ? target : [null, target],
19558
+ ease: "easeOut",
19559
+ velocity: value.getVelocity(),
19560
+ ...valueTransition,
19561
+ delay: -elapsed,
19562
+ onUpdate: (v) => {
19563
+ value.set(v);
19564
+ valueTransition.onUpdate && valueTransition.onUpdate(v);
19565
+ },
19566
+ onComplete: () => {
19567
+ onComplete();
19568
+ valueTransition.onComplete && valueTransition.onComplete();
19569
+ },
19570
+ name,
19571
+ motionValue: value,
19572
+ element: isHandoff ? void 0 : element
19573
+ };
19574
+ if (!isTransitionDefined(valueTransition)) {
19575
+ Object.assign(options, getDefaultTransition(name, options));
19576
+ }
19577
+ options.duration && (options.duration = secondsToMilliseconds(options.duration));
19578
+ options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));
19579
+ if (options.from !== void 0) {
19580
+ options.keyframes[0] = options.from;
19581
+ }
19582
+ let shouldSkip = false;
19583
+ if (options.type === false || options.duration === 0 && !options.repeatDelay) {
19584
+ makeAnimationInstant(options);
19585
+ if (options.delay === 0) {
19586
+ shouldSkip = true;
19587
+ }
19588
+ }
19589
+ if (MotionGlobalConfig.instantAnimations || MotionGlobalConfig.skipAnimations || element?.shouldSkipAnimations || valueTransition.skipAnimations) {
19590
+ shouldSkip = true;
19591
+ makeAnimationInstant(options);
19592
+ options.delay = 0;
19593
+ }
19594
+ options.allowFlatten = !valueTransition.type && !valueTransition.ease;
19595
+ if (shouldSkip && !isHandoff && value.get() !== void 0) {
19596
+ const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);
19597
+ if (finalKeyframe !== void 0) {
19598
+ frame.update(() => {
19599
+ options.onUpdate(finalKeyframe);
19600
+ options.onComplete();
19601
+ });
19602
+ return;
19603
+ }
19604
+ }
19605
+ return valueTransition.isSync ? new JSAnimation(options) : new AsyncMotionValueAnimation(options);
19606
+ };
19607
+
19608
+ // node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs
19609
+ var splitCSSVariableRegex = (
19610
+ // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
19611
+ /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
19612
+ );
19613
+ function parseCSSVariable(current) {
19614
+ const match = splitCSSVariableRegex.exec(current);
19615
+ if (!match)
19616
+ return [,];
19617
+ const [, token1, token2, fallback] = match;
19618
+ return [`--${token1 ?? token2}`, fallback];
19619
+ }
19620
+ var maxDepth = 4;
19621
+ function getVariableValue(current, element, depth = 1) {
19622
+ invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
19623
+ const [token, fallback] = parseCSSVariable(current);
19624
+ if (!token)
19625
+ return;
19626
+ const resolved = window.getComputedStyle(element).getPropertyValue(token);
19627
+ if (resolved) {
19628
+ const trimmed = resolved.trim();
19629
+ return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;
19630
+ }
19631
+ return isCSSVariableToken(fallback) ? getVariableValue(fallback, element, depth + 1) : fallback;
19632
+ }
19633
+
19634
+ // node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs
19635
+ function getValueState(visualElement) {
19636
+ const state = [{}, {}];
19637
+ visualElement?.values.forEach((value, key) => {
19638
+ state[0][key] = value.get();
19639
+ state[1][key] = value.getVelocity();
19640
+ });
19641
+ return state;
19642
+ }
19643
+ function resolveVariantFromProps(props, definition, custom, visualElement) {
19644
+ if (typeof definition === "function") {
19645
+ const [current, velocity] = getValueState(visualElement);
19646
+ definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
19647
+ }
19648
+ if (typeof definition === "string") {
19649
+ definition = props.variants && props.variants[definition];
19650
+ }
19651
+ if (typeof definition === "function") {
19652
+ const [current, velocity] = getValueState(visualElement);
19653
+ definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
19654
+ }
19655
+ return definition;
19656
+ }
19657
+
19658
+ // node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs
19659
+ function resolveVariant(visualElement, definition, custom) {
19660
+ const props = visualElement.getProps();
19661
+ return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);
19662
+ }
19663
+
19664
+ // node_modules/motion-dom/dist/es/render/utils/keys-position.mjs
19665
+ var positionalKeys = /* @__PURE__ */ new Set([
19666
+ "width",
19667
+ "height",
19668
+ "top",
19669
+ "left",
19670
+ "right",
19671
+ "bottom",
19672
+ ...transformPropOrder
19673
+ ]);
19674
+
19707
19675
  // node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs
19708
19676
  var isKeyframesTarget = (v) => {
19709
19677
  return Array.isArray(v);
@@ -19775,10 +19743,15 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
19775
19743
  const defaultTransition = visualElement.getDefaultTransition();
19776
19744
  transition = transition ? resolveTransition(transition, defaultTransition) : defaultTransition;
19777
19745
  const reduceMotion = transition?.reduceMotion;
19746
+ const skipAnimations = transition?.skipAnimations;
19778
19747
  if (transitionOverride)
19779
19748
  transition = transitionOverride;
19780
19749
  const animations2 = [];
19781
19750
  const animationTypeState = type && visualElement.animationState && visualElement.animationState.getState()[type];
19751
+ const path = transition?.path;
19752
+ if (path) {
19753
+ path.animateVisualElement(visualElement, target, transition, delay2, animations2);
19754
+ }
19782
19755
  for (const key in target) {
19783
19756
  const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);
19784
19757
  const valueTarget = target[key];
@@ -19789,6 +19762,8 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
19789
19762
  delay: delay2,
19790
19763
  ...getValueTransition(transition || {}, key)
19791
19764
  };
19765
+ if (skipAnimations)
19766
+ valueTransition.skipAnimations = true;
19792
19767
  const currentValue = value.get();
19793
19768
  if (currentValue !== void 0 && !value.isAnimating() && !Array.isArray(valueTarget) && valueTarget === currentValue && !valueTransition.velocity) {
19794
19769
  frame.update(() => value.set(valueTarget));
@@ -19943,6 +19918,12 @@ var int = {
19943
19918
  // node_modules/motion-dom/dist/es/value/types/maps/transform.mjs
19944
19919
  var transformValueTypes = {
19945
19920
  rotate: degrees,
19921
+ /**
19922
+ * Internal channel for `transition.path` orientToPath. Composed onto
19923
+ * `rotate` at the transform-build sites so the user's `rotate` is
19924
+ * never read or overwritten. Not part of `transformPropOrder`.
19925
+ */
19926
+ pathRotation: degrees,
19946
19927
  rotateX: degrees,
19947
19928
  rotateY: degrees,
19948
19929
  rotateZ: degrees,
@@ -20181,6 +20162,14 @@ var DOMKeyframesResolver = class extends KeyframeResolver {
20181
20162
  }
20182
20163
  };
20183
20164
 
20165
+ // node_modules/motion-dom/dist/es/utils/border-radius.mjs
20166
+ var cornerRadiusProps = [
20167
+ "borderTopLeftRadius",
20168
+ "borderTopRightRadius",
20169
+ "borderBottomRightRadius",
20170
+ "borderBottomLeftRadius"
20171
+ ];
20172
+
20184
20173
  // node_modules/motion-dom/dist/es/utils/resolve-elements.mjs
20185
20174
  function resolveElements(elementOrSelector, scope, selectorCache) {
20186
20175
  if (elementOrSelector == null) {
@@ -20400,9 +20389,10 @@ function press(targetOrSelector, onPressStart, options = {}) {
20400
20389
  claimedPointerDownEvents.add(startEvent);
20401
20390
  }
20402
20391
  const onPressEnd = onPressStart(target, startEvent);
20392
+ const endEventOptions = { ...eventOptions, capture: true };
20403
20393
  const onPointerEnd = (endEvent, success) => {
20404
- window.removeEventListener("pointerup", onPointerUp);
20405
- window.removeEventListener("pointercancel", onPointerCancel);
20394
+ window.removeEventListener("pointerup", onPointerUp, endEventOptions);
20395
+ window.removeEventListener("pointercancel", onPointerCancel, endEventOptions);
20406
20396
  if (isPressing.has(target)) {
20407
20397
  isPressing.delete(target);
20408
20398
  }
@@ -20419,8 +20409,8 @@ function press(targetOrSelector, onPressStart, options = {}) {
20419
20409
  const onPointerCancel = (cancelEvent) => {
20420
20410
  onPointerEnd(cancelEvent, false);
20421
20411
  };
20422
- window.addEventListener("pointerup", onPointerUp, eventOptions);
20423
- window.addEventListener("pointercancel", onPointerCancel, eventOptions);
20412
+ window.addEventListener("pointerup", onPointerUp, endEventOptions);
20413
+ window.addEventListener("pointercancel", onPointerCancel, endEventOptions);
20424
20414
  };
20425
20415
  targets.forEach((target) => {
20426
20416
  const pointerDownTarget = options.useGlobalTarget ? window : target;
@@ -20831,8 +20821,6 @@ var VisualElement = class {
20831
20821
  removeOnChange();
20832
20822
  if (removeSyncCheck)
20833
20823
  removeSyncCheck();
20834
- if (value.owner)
20835
- value.stop();
20836
20824
  });
20837
20825
  }
20838
20826
  sortNodePosition(other) {
@@ -21251,6 +21239,11 @@ function buildTransform(latestValues, transform, transformTemplate) {
21251
21239
  }
21252
21240
  }
21253
21241
  }
21242
+ const pathRotation = latestValues.pathRotation;
21243
+ if (pathRotation) {
21244
+ transformIsDefault = false;
21245
+ transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `;
21246
+ }
21254
21247
  transformString = transformString.trim();
21255
21248
  if (transformTemplate) {
21256
21249
  transformString = transformTemplate(transform, transformIsDefault ? "" : transformString);
@@ -21358,12 +21351,7 @@ var correctBoxShadow = {
21358
21351
  var scaleCorrectors = {
21359
21352
  borderRadius: {
21360
21353
  ...correctBorderRadius,
21361
- applyTo: [
21362
- "borderTopLeftRadius",
21363
- "borderTopRightRadius",
21364
- "borderBottomLeftRadius",
21365
- "borderBottomRightRadius"
21366
- ]
21354
+ applyTo: [...cornerRadiusProps]
21367
21355
  },
21368
21356
  borderTopLeftRadius: correctBorderRadius,
21369
21357
  borderTopRightRadius: correctBorderRadius,
@@ -21708,7 +21696,7 @@ function createAnimationState(visualElement) {
21708
21696
  continue;
21709
21697
  let valueHasChanged = false;
21710
21698
  if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {
21711
- valueHasChanged = !shallowCompare(next, prev);
21699
+ valueHasChanged = !shallowCompare(next, prev) || variantDidChange;
21712
21700
  } else {
21713
21701
  valueHasChanged = next !== prev;
21714
21702
  }
@@ -21968,11 +21956,13 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
21968
21956
  transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;
21969
21957
  }
21970
21958
  if (latestTransform) {
21971
- const { transformPerspective, rotate: rotate2, rotateX, rotateY, skewX, skewY } = latestTransform;
21959
+ const { transformPerspective, rotate: rotate2, pathRotation, rotateX, rotateY, skewX, skewY } = latestTransform;
21972
21960
  if (transformPerspective)
21973
21961
  transform = `perspective(${transformPerspective}px) ${transform}`;
21974
21962
  if (rotate2)
21975
21963
  transform += `rotate(${rotate2}deg) `;
21964
+ if (pathRotation)
21965
+ transform += `rotate(${pathRotation}deg) `;
21976
21966
  if (rotateX)
21977
21967
  transform += `rotateX(${rotateX}deg) `;
21978
21968
  if (rotateY)
@@ -21991,13 +21981,7 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
21991
21981
  }
21992
21982
 
21993
21983
  // node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs
21994
- var borderLabels = [
21995
- "borderTopLeftRadius",
21996
- "borderTopRightRadius",
21997
- "borderBottomLeftRadius",
21998
- "borderBottomRightRadius"
21999
- ];
22000
- var numBorders = borderLabels.length;
21984
+ var numBorders = cornerRadiusProps.length;
22001
21985
  var asNumber = (value) => typeof value === "string" ? parseFloat(value) : value;
22002
21986
  var isPx = (value) => typeof value === "number" || px.test(value);
22003
21987
  function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOnlyMember) {
@@ -22008,7 +21992,7 @@ function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOn
22008
21992
  target.opacity = mixNumber(follow.opacity ?? 1, lead.opacity ?? 1, progress2);
22009
21993
  }
22010
21994
  for (let i = 0; i < numBorders; i++) {
22011
- const borderLabel = borderLabels[i];
21995
+ const borderLabel = cornerRadiusProps[i];
22012
21996
  let followRadius = getRadius(follow, borderLabel);
22013
21997
  let leadRadius = getRadius(lead, borderLabel);
22014
21998
  if (followRadius === void 0 && leadRadius === void 0)
@@ -22054,7 +22038,7 @@ function animateSingleValue(value, keyframes2, options) {
22054
22038
  // node_modules/motion-dom/dist/es/events/add-dom-event.mjs
22055
22039
  function addDomEvent(target, eventName, handler, options = { passive: true }) {
22056
22040
  target.addEventListener(eventName, handler, options);
22057
- return () => target.removeEventListener(eventName, handler);
22041
+ return () => target.removeEventListener(eventName, handler, options);
22058
22042
  }
22059
22043
 
22060
22044
  // node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs
@@ -22362,7 +22346,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
22362
22346
  animationOptions.type = false;
22363
22347
  }
22364
22348
  this.startAnimation(animationOptions);
22365
- this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
22349
+ this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged, animationOptions.path);
22366
22350
  } else {
22367
22351
  if (!hasLayoutChanged) {
22368
22352
  finishAnimation(this);
@@ -22834,7 +22818,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
22834
22818
  this.projectionDelta = createDelta();
22835
22819
  this.projectionDeltaWithTransform = createDelta();
22836
22820
  }
22837
- setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {
22821
+ setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false, pathFn) {
22838
22822
  const snapshot = this.snapshot;
22839
22823
  const snapshotLatestValues = snapshot ? snapshot.latestValues : {};
22840
22824
  const mixedValues = { ...this.latestValues };
@@ -22852,10 +22836,23 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
22852
22836
  const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && !isOnlyMember && this.options.crossfade === true && !this.path.some(hasOpacityCrossfade));
22853
22837
  this.animationProgress = 0;
22854
22838
  let prevRelativeTarget;
22839
+ const interpolate3 = pathFn?.interpolateProjection(delta);
22855
22840
  this.mixTargetDelta = (latest) => {
22856
22841
  const progress2 = latest / 1e3;
22857
- mixAxisDelta(targetDelta.x, delta.x, progress2);
22858
- mixAxisDelta(targetDelta.y, delta.y, progress2);
22842
+ const point = interpolate3?.(progress2);
22843
+ if (point) {
22844
+ targetDelta.x.translate = point.x;
22845
+ targetDelta.x.scale = mixNumber(delta.x.scale, 1, progress2);
22846
+ targetDelta.x.origin = delta.x.origin;
22847
+ targetDelta.x.originPoint = delta.x.originPoint;
22848
+ targetDelta.y.translate = point.y;
22849
+ targetDelta.y.scale = mixNumber(delta.y.scale, 1, progress2);
22850
+ targetDelta.y.origin = delta.y.origin;
22851
+ targetDelta.y.originPoint = delta.y.originPoint;
22852
+ } else {
22853
+ mixAxisDeltaLinear(targetDelta.x, delta.x, progress2);
22854
+ mixAxisDeltaLinear(targetDelta.y, delta.y, progress2);
22855
+ }
22859
22856
  this.setTargetDelta(targetDelta);
22860
22857
  if (this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout) {
22861
22858
  calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0);
@@ -22871,6 +22868,11 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
22871
22868
  this.animationValues = mixedValues;
22872
22869
  mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress2, shouldCrossfadeOpacity, isOnlyMember);
22873
22870
  }
22871
+ if (point && point.rotate !== void 0) {
22872
+ if (!this.animationValues)
22873
+ this.animationValues = mixedValues;
22874
+ this.animationValues.pathRotation = point.rotate;
22875
+ }
22874
22876
  this.root.scheduleUpdateProjection();
22875
22877
  this.scheduleRender();
22876
22878
  this.animationProgress = progress2;
@@ -22897,8 +22899,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
22897
22899
  this.mixTargetDelta(latest);
22898
22900
  options.onUpdate && options.onUpdate(latest);
22899
22901
  },
22900
- onStop: () => {
22901
- },
22902
22902
  onComplete: () => {
22903
22903
  options.onComplete && options.onComplete();
22904
22904
  this.completeAnimation();
@@ -23227,7 +23227,7 @@ function resetSkewAndRotation(node) {
23227
23227
  function removeLeadSnapshots(stack) {
23228
23228
  stack.removeLeadSnapshot();
23229
23229
  }
23230
- function mixAxisDelta(output, delta, p) {
23230
+ function mixAxisDeltaLinear(output, delta, p) {
23231
23231
  output.translate = mixNumber(delta.translate, 0, p);
23232
23232
  output.scale = mixNumber(delta.scale, 1, p);
23233
23233
  output.origin = delta.origin;
@@ -23743,6 +23743,9 @@ function useMotionRef(visualState, visualElement, externalRef) {
23743
23743
  if (instance) {
23744
23744
  visualState.onMount?.(instance);
23745
23745
  }
23746
+ if (visualElement) {
23747
+ instance ? visualElement.mount(instance) : visualElement.unmount();
23748
+ }
23746
23749
  const ref = externalRefContainer.current;
23747
23750
  if (typeof ref === "function") {
23748
23751
  if (instance) {
@@ -23759,9 +23762,6 @@ function useMotionRef(visualState, visualElement, externalRef) {
23759
23762
  } else if (ref) {
23760
23763
  ref.current = instance;
23761
23764
  }
23762
- if (visualElement) {
23763
- instance ? visualElement.mount(instance) : visualElement.unmount();
23764
- }
23765
23765
  }, [visualElement]);
23766
23766
  }
23767
23767
  var SwitchLayoutGroupContext = React5.createContext({});
@@ -24011,7 +24011,7 @@ var ExitAnimationFeature = class extends Feature {
24011
24011
  if (isPresent && prevIsPresent === false) {
24012
24012
  if (this.isExitComplete) {
24013
24013
  const { initial, custom } = this.node.getProps();
24014
- if (typeof initial === "string") {
24014
+ if (typeof initial === "string" || typeof initial === "object" && initial !== null && !Array.isArray(initial)) {
24015
24015
  const resolved = resolveVariant(this.node, initial, custom);
24016
24016
  if (resolved) {
24017
24017
  const { transition, transitionEnd, ...target } = resolved;
@@ -24161,7 +24161,8 @@ var PanSession = class {
24161
24161
  this.history = [{ ...point, timestamp }];
24162
24162
  const { onSessionStart } = handlers;
24163
24163
  onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
24164
- this.removeListeners = pipe(addPointerEvent(this.contextWindow, "pointermove", this.handlePointerMove), addPointerEvent(this.contextWindow, "pointerup", this.handlePointerUp), addPointerEvent(this.contextWindow, "pointercancel", this.handlePointerUp));
24164
+ const eventOptions = { passive: true, capture: true };
24165
+ this.removeListeners = pipe(addPointerEvent(this.contextWindow, "pointermove", this.handlePointerMove, eventOptions), addPointerEvent(this.contextWindow, "pointerup", this.handlePointerUp, eventOptions), addPointerEvent(this.contextWindow, "pointercancel", this.handlePointerUp, eventOptions));
24165
24166
  if (element) {
24166
24167
  this.startScrollTracking(element);
24167
24168
  }
@@ -24574,6 +24575,10 @@ var VisualElementDragControls = class {
24574
24575
  const { projection } = this.visualElement;
24575
24576
  if (!projection || !projection.layout)
24576
24577
  return false;
24578
+ if (projection.root) {
24579
+ projection.root.scroll = void 0;
24580
+ projection.root.updateScroll();
24581
+ }
24577
24582
  const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());
24578
24583
  let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);
24579
24584
  if (onMeasureDragConstraints) {
@@ -24630,7 +24635,7 @@ var VisualElementDragControls = class {
24630
24635
  const dragKey = `_drag${axis.toUpperCase()}`;
24631
24636
  const props = this.visualElement.getProps();
24632
24637
  const externalMotionValue = props[dragKey];
24633
- return externalMotionValue ? externalMotionValue : this.visualElement.getValue(axis, (props.initial ? props.initial[axis] : void 0) || 0);
24638
+ return externalMotionValue ? externalMotionValue : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0);
24634
24639
  }
24635
24640
  snapToCursor(point) {
24636
24641
  eachAxis((axis) => {
@@ -26191,7 +26196,7 @@ function NSWCard({
26191
26196
  {
26192
26197
  className: cn(
26193
26198
  "h-full rounded-[inherit] border border-(--nsw-card-border)",
26194
- hasImage && "border-t-0 rounded-t-none"
26199
+ hasImage && "rounded-t-none border-t-0"
26195
26200
  ),
26196
26201
  children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full flex-col p-8", children: bodyChildren })
26197
26202
  }
@@ -26203,7 +26208,7 @@ function NSWCard({
26203
26208
  {
26204
26209
  className: cn(
26205
26210
  "flex h-full flex-col rounded-[inherit] border border-(--nsw-card-border) p-8",
26206
- hasImage && "border-t-0 rounded-t-none"
26211
+ hasImage && "rounded-t-none border-t-0"
26207
26212
  ),
26208
26213
  children: bodyChildren
26209
26214
  }
@@ -26876,18 +26881,18 @@ function Skeleton({ className, ...props }) {
26876
26881
  );
26877
26882
  }
26878
26883
  var MOBILE_BREAKPOINT = 768;
26884
+ function subscribeToViewport(callback) {
26885
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
26886
+ mql.addEventListener("change", callback);
26887
+ return () => mql.removeEventListener("change", callback);
26888
+ }
26879
26889
  function useIsMobile() {
26880
- const [isMobile, setIsMobile] = React5__namespace.useState(void 0);
26881
- React5__namespace.useEffect(() => {
26882
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
26883
- const onChange = () => {
26884
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
26885
- };
26886
- mql.addEventListener("change", onChange);
26887
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
26888
- return () => mql.removeEventListener("change", onChange);
26889
- }, []);
26890
- return !!isMobile;
26890
+ return React5__namespace.useSyncExternalStore(
26891
+ subscribeToViewport,
26892
+ () => window.innerWidth < MOBILE_BREAKPOINT,
26893
+ // No viewport on the server — match the old `undefined → false` default.
26894
+ () => false
26895
+ );
26891
26896
  }
26892
26897
  var SIDEBAR_COOKIE_NAME = "sidebar_state";
26893
26898
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
@@ -27284,7 +27289,7 @@ var sidebarMenuButtonVariants = classVarianceAuthority.cva(
27284
27289
  variants: {
27285
27290
  variant: {
27286
27291
  default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
27287
- outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
27292
+ outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
27288
27293
  },
27289
27294
  size: {
27290
27295
  default: "h-8 text-sm",
@@ -29560,12 +29565,12 @@ var CodeBlock = ({
29560
29565
  margin: 0,
29561
29566
  padding: "1rem",
29562
29567
  fontSize: "0.875rem",
29563
- background: "hsl(var(--background))",
29564
- color: "hsl(var(--foreground))"
29568
+ background: "var(--background)",
29569
+ color: "var(--foreground)"
29565
29570
  },
29566
29571
  language,
29567
29572
  lineNumberStyle: {
29568
- color: "hsl(var(--muted-foreground))",
29573
+ color: "var(--muted-foreground)",
29569
29574
  paddingRight: "1rem",
29570
29575
  minWidth: "2.5rem"
29571
29576
  },
@@ -29585,12 +29590,12 @@ var CodeBlock = ({
29585
29590
  margin: 0,
29586
29591
  padding: "1rem",
29587
29592
  fontSize: "0.875rem",
29588
- background: "hsl(var(--background))",
29589
- color: "hsl(var(--foreground))"
29593
+ background: "var(--background)",
29594
+ color: "var(--foreground)"
29590
29595
  },
29591
29596
  language,
29592
29597
  lineNumberStyle: {
29593
- color: "hsl(var(--muted-foreground))",
29598
+ color: "var(--muted-foreground)",
29594
29599
  paddingRight: "1rem",
29595
29600
  minWidth: "2.5rem"
29596
29601
  },
@@ -30626,13 +30631,19 @@ var POOL_SIZE_MULTIPLIER = 128;
30626
30631
  var pool;
30627
30632
  var poolOffset;
30628
30633
  var fillPool = (bytes) => {
30629
- if (!pool || pool.length < bytes) {
30630
- pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
30631
- crypto__default.default.randomFillSync(pool);
30632
- poolOffset = 0;
30633
- } else if (poolOffset + bytes > pool.length) {
30634
- crypto__default.default.randomFillSync(pool);
30635
- poolOffset = 0;
30634
+ if (bytes < 0) throw new RangeError("Wrong ID size");
30635
+ try {
30636
+ if (!pool || pool.length < bytes) {
30637
+ pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
30638
+ crypto__default.default.randomFillSync(pool);
30639
+ poolOffset = 0;
30640
+ } else if (poolOffset + bytes > pool.length) {
30641
+ crypto__default.default.randomFillSync(pool);
30642
+ poolOffset = 0;
30643
+ }
30644
+ } catch (e) {
30645
+ pool = void 0;
30646
+ throw e;
30636
30647
  }
30637
30648
  poolOffset += bytes;
30638
30649
  };