@fairmint/ui 0.2.6 → 0.2.8

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.
@@ -3,7 +3,7 @@ import * as React from "react";
3
3
  import React__default, { useRef, useEffect, useMemo, useState, useCallback, useLayoutEffect, useReducer, useSyncExternalStore, isValidElement, cloneElement, Children, Fragment, createContext, useContext, useId as useId$2, forwardRef, createElement, startTransition } from "react";
4
4
  import * as ReactDOM from "react-dom";
5
5
  import ReactDOM__default, { flushSync, createPortal } from "react-dom";
6
- function clamp$3(value, min2, max2) {
6
+ function clamp$4(value, min2, max2) {
7
7
  if (min2 === void 0 && max2 === void 0) {
8
8
  return value;
9
9
  }
@@ -2733,6 +2733,23 @@ TransitionGroup.propTypes = process.env.NODE_ENV !== "production" ? {
2733
2733
  childFactory: PropTypes.func
2734
2734
  } : {};
2735
2735
  TransitionGroup.defaultProps = defaultProps$_;
2736
+ var extendStatics = function(d, b) {
2737
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
2738
+ d2.__proto__ = b2;
2739
+ } || function(d2, b2) {
2740
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
2741
+ };
2742
+ return extendStatics(d, b);
2743
+ };
2744
+ function __extends(d, b) {
2745
+ if (typeof b !== "function" && b !== null)
2746
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2747
+ extendStatics(d, b);
2748
+ function __() {
2749
+ this.constructor = d;
2750
+ }
2751
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2752
+ }
2736
2753
  var __assign = function() {
2737
2754
  __assign = Object.assign || function __assign2(t) {
2738
2755
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -3839,8 +3856,8 @@ function mergeClassNames(objects) {
3839
3856
  });
3840
3857
  return merged;
3841
3858
  }
3842
- function resolveClassNames({ theme: theme2, classNames, props, stylesCtx }) {
3843
- const arrayClassNames = Array.isArray(classNames) ? classNames : [classNames];
3859
+ function resolveClassNames({ theme: theme2, classNames: classNames2, props, stylesCtx }) {
3860
+ const arrayClassNames = Array.isArray(classNames2) ? classNames2 : [classNames2];
3844
3861
  const resolvedClassNames = arrayClassNames.map(
3845
3862
  (item) => typeof item === "function" ? item(theme2, props, stylesCtx) : item || EMPTY_CLASS_NAMES
3846
3863
  );
@@ -5150,7 +5167,7 @@ function MantineProvider({
5150
5167
  }
5151
5168
  MantineProvider.displayName = "@mantine/core/MantineProvider";
5152
5169
  function useResolvedStylesApi({
5153
- classNames,
5170
+ classNames: classNames2,
5154
5171
  styles,
5155
5172
  props,
5156
5173
  stylesCtx
@@ -5159,7 +5176,7 @@ function useResolvedStylesApi({
5159
5176
  return {
5160
5177
  resolvedClassNames: resolveClassNames({
5161
5178
  theme: theme2,
5162
- classNames,
5179
+ classNames: classNames2,
5163
5180
  props,
5164
5181
  stylesCtx: stylesCtx || void 0
5165
5182
  }),
@@ -5200,10 +5217,10 @@ function getResolvedClassNames({
5200
5217
  selector,
5201
5218
  stylesCtx,
5202
5219
  theme: theme2,
5203
- classNames,
5220
+ classNames: classNames2,
5204
5221
  props
5205
5222
  }) {
5206
- return resolveClassNames({ theme: theme2, classNames, props, stylesCtx })[selector];
5223
+ return resolveClassNames({ theme: theme2, classNames: classNames2, props, stylesCtx })[selector];
5207
5224
  }
5208
5225
  function getRootClassName({ rootSelector, selector, className }) {
5209
5226
  return rootSelector === selector ? className : void 0;
@@ -5252,7 +5269,7 @@ function getClassName({
5252
5269
  themeName,
5253
5270
  selector,
5254
5271
  classNamesPrefix,
5255
- classNames,
5272
+ classNames: classNames2,
5256
5273
  classes: classes2,
5257
5274
  unstyled,
5258
5275
  className,
@@ -5267,7 +5284,7 @@ function getClassName({
5267
5284
  getGlobalClassNames({ theme: theme2, options, unstyled: unstyled || headless }),
5268
5285
  getThemeClassNames({ theme: theme2, themeName, selector, props, stylesCtx }),
5269
5286
  getVariantClassName({ options, classes: classes2, selector, unstyled }),
5270
- getResolvedClassNames({ selector, stylesCtx, theme: theme2, classNames, props }),
5287
+ getResolvedClassNames({ selector, stylesCtx, theme: theme2, classNames: classNames2, props }),
5271
5288
  getResolvedClassNames({ selector, stylesCtx, theme: theme2, classNames: transformedStyles, props }),
5272
5289
  getOptionsClassNames({ selector, stylesCtx, options, props, theme: theme2 }),
5273
5290
  getRootClassName({ rootSelector, selector, className }),
@@ -5393,7 +5410,7 @@ function useStyles({
5393
5410
  style,
5394
5411
  rootSelector = "root",
5395
5412
  unstyled,
5396
- classNames,
5413
+ classNames: classNames2,
5397
5414
  styles,
5398
5415
  vars,
5399
5416
  varsResolver: varsResolver2,
@@ -5416,7 +5433,7 @@ function useStyles({
5416
5433
  themeName,
5417
5434
  selector,
5418
5435
  classNamesPrefix,
5419
- classNames,
5436
+ classNames: classNames2,
5420
5437
  classes: classes2,
5421
5438
  unstyled,
5422
5439
  className,
@@ -6354,7 +6371,7 @@ const oppositeSideMap = {
6354
6371
  bottom: "top",
6355
6372
  top: "bottom"
6356
6373
  };
6357
- function clamp$2(start, value, end) {
6374
+ function clamp$3(start, value, end) {
6358
6375
  return max(start, min(value, end));
6359
6376
  }
6360
6377
  function evaluate(value, param) {
@@ -6860,7 +6877,7 @@ const arrow$3 = (options) => ({
6860
6877
  const min$1 = minPadding;
6861
6878
  const max2 = clientSize - arrowDimensions[length] - maxPadding;
6862
6879
  const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
6863
- const offset2 = clamp$2(min$1, center, max2);
6880
+ const offset2 = clamp$3(min$1, center, max2);
6864
6881
  const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset2 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
6865
6882
  const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0;
6866
6883
  return {
@@ -7277,14 +7294,14 @@ const shift$2 = function(options) {
7277
7294
  const maxSide = mainAxis === "y" ? "bottom" : "right";
7278
7295
  const min2 = mainAxisCoord + overflow[minSide];
7279
7296
  const max2 = mainAxisCoord - overflow[maxSide];
7280
- mainAxisCoord = clamp$2(min2, mainAxisCoord, max2);
7297
+ mainAxisCoord = clamp$3(min2, mainAxisCoord, max2);
7281
7298
  }
7282
7299
  if (checkCrossAxis) {
7283
7300
  const minSide = crossAxis === "y" ? "top" : "left";
7284
7301
  const maxSide = crossAxis === "y" ? "bottom" : "right";
7285
7302
  const min2 = crossAxisCoord + overflow[minSide];
7286
7303
  const max2 = crossAxisCoord - overflow[maxSide];
7287
- crossAxisCoord = clamp$2(min2, crossAxisCoord, max2);
7304
+ crossAxisCoord = clamp$3(min2, crossAxisCoord, max2);
7288
7305
  }
7289
7306
  const limitedCoords = limiter.fn({
7290
7307
  ...state,
@@ -9751,7 +9768,7 @@ function linearScale(input, output) {
9751
9768
  return output[0] + ratio * (value - input[0]);
9752
9769
  };
9753
9770
  }
9754
- function clamp$1(value, [min2, max2]) {
9771
+ function clamp$2(value, [min2, max2]) {
9755
9772
  return Math.min(max2, Math.max(min2, value));
9756
9773
  }
9757
9774
  function getThumbOffsetFromScroll(scrollPos, sizes2, dir = "ltr") {
@@ -9761,7 +9778,7 @@ function getThumbOffsetFromScroll(scrollPos, sizes2, dir = "ltr") {
9761
9778
  const maxScrollPos = sizes2.content - sizes2.viewport;
9762
9779
  const maxThumbPos = scrollbar - thumbSizePx;
9763
9780
  const scrollClampRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
9764
- const scrollWithoutMomentum = clamp$1(scrollPos, scrollClampRange);
9781
+ const scrollWithoutMomentum = clamp$2(scrollPos, scrollClampRange);
9765
9782
  const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);
9766
9783
  return interpolate(scrollWithoutMomentum);
9767
9784
  }
@@ -10349,7 +10366,7 @@ const varsResolver$T = createVarsResolver(
10349
10366
  const ScrollArea = factory((_props, ref) => {
10350
10367
  const props = useProps("ScrollArea", defaultProps$X, _props);
10351
10368
  const {
10352
- classNames,
10369
+ classNames: classNames2,
10353
10370
  className,
10354
10371
  style,
10355
10372
  styles,
@@ -10379,7 +10396,7 @@ const ScrollArea = factory((_props, ref) => {
10379
10396
  classes: classes$Q,
10380
10397
  className,
10381
10398
  style,
10382
- classNames,
10399
+ classNames: classNames2,
10383
10400
  styles,
10384
10401
  unstyled,
10385
10402
  attributes,
@@ -10479,7 +10496,7 @@ ScrollArea.displayName = "@mantine/core/ScrollArea";
10479
10496
  const ScrollAreaAutosize = factory((props, ref) => {
10480
10497
  const {
10481
10498
  children,
10482
- classNames,
10499
+ classNames: classNames2,
10483
10500
  styles,
10484
10501
  scrollbarSize,
10485
10502
  scrollHideDelay,
@@ -10547,7 +10564,7 @@ const ScrollAreaAutosize = factory((props, ref) => {
10547
10564
  children: /* @__PURE__ */ jsx(
10548
10565
  ScrollArea,
10549
10566
  {
10550
- classNames,
10567
+ classNames: classNames2,
10551
10568
  styles,
10552
10569
  scrollHideDelay,
10553
10570
  scrollbarSize,
@@ -10587,7 +10604,7 @@ const UnstyledButton = polymorphicFactory(
10587
10604
  component = "button",
10588
10605
  __staticSelector,
10589
10606
  unstyled,
10590
- classNames,
10607
+ classNames: classNames2,
10591
10608
  styles,
10592
10609
  style,
10593
10610
  attributes,
@@ -10599,7 +10616,7 @@ const UnstyledButton = polymorphicFactory(
10599
10616
  classes: classes$P,
10600
10617
  className,
10601
10618
  style,
10602
- classNames,
10619
+ classNames: classNames2,
10603
10620
  styles,
10604
10621
  unstyled,
10605
10622
  attributes
@@ -10621,14 +10638,14 @@ UnstyledButton.displayName = "@mantine/core/UnstyledButton";
10621
10638
  var classes$O = { "root": "m_515a97f8" };
10622
10639
  const VisuallyHidden = factory((_props, ref) => {
10623
10640
  const props = useProps("VisuallyHidden", null, _props);
10624
- const { classNames, className, style, styles, unstyled, vars, attributes, ...others } = props;
10641
+ const { classNames: classNames2, className, style, styles, unstyled, vars, attributes, ...others } = props;
10625
10642
  const getStyles2 = useStyles({
10626
10643
  name: "VisuallyHidden",
10627
10644
  classes: classes$O,
10628
10645
  props,
10629
10646
  className,
10630
10647
  style,
10631
- classNames,
10648
+ classNames: classNames2,
10632
10649
  styles,
10633
10650
  unstyled,
10634
10651
  attributes
@@ -10647,7 +10664,7 @@ const varsResolver$S = createVarsResolver((_, { radius, shadow }) => ({
10647
10664
  const Paper = polymorphicFactory((_props, ref) => {
10648
10665
  const props = useProps("Paper", null, _props);
10649
10666
  const {
10650
- classNames,
10667
+ classNames: classNames2,
10651
10668
  className,
10652
10669
  style,
10653
10670
  styles,
@@ -10667,7 +10684,7 @@ const Paper = polymorphicFactory((_props, ref) => {
10667
10684
  classes: classes$N,
10668
10685
  className,
10669
10686
  style,
10670
- classNames,
10687
+ classNames: classNames2,
10671
10688
  styles,
10672
10689
  unstyled,
10673
10690
  attributes,
@@ -10843,7 +10860,7 @@ const varsResolver$R = createVarsResolver(
10843
10860
  const Overlay = polymorphicFactory((_props, ref) => {
10844
10861
  const props = useProps("Overlay", defaultProps$V, _props);
10845
10862
  const {
10846
- classNames,
10863
+ classNames: classNames2,
10847
10864
  className,
10848
10865
  style,
10849
10866
  styles,
@@ -10868,7 +10885,7 @@ const Overlay = polymorphicFactory((_props, ref) => {
10868
10885
  classes: classes$M,
10869
10886
  className,
10870
10887
  style,
10871
- classNames,
10888
+ classNames: classNames2,
10872
10889
  styles,
10873
10890
  unstyled,
10874
10891
  attributes,
@@ -11251,7 +11268,7 @@ const PopoverDropdown = factory((_props, ref) => {
11251
11268
  children,
11252
11269
  onKeyDownCapture,
11253
11270
  variant,
11254
- classNames,
11271
+ classNames: classNames2,
11255
11272
  styles,
11256
11273
  ...others
11257
11274
  } = props;
@@ -11301,7 +11318,7 @@ const PopoverDropdown = factory((_props, ref) => {
11301
11318
  ...ctx.getStyles("dropdown", {
11302
11319
  className,
11303
11320
  props,
11304
- classNames,
11321
+ classNames: classNames2,
11305
11322
  styles,
11306
11323
  style: [
11307
11324
  {
@@ -11333,7 +11350,7 @@ const PopoverDropdown = factory((_props, ref) => {
11333
11350
  arrowPosition: ctx.arrowPosition,
11334
11351
  ...ctx.getStyles("arrow", {
11335
11352
  props,
11336
- classNames,
11353
+ classNames: classNames2,
11337
11354
  styles
11338
11355
  })
11339
11356
  }
@@ -11571,7 +11588,7 @@ function Popover(_props) {
11571
11588
  arrowRadius,
11572
11589
  arrowPosition,
11573
11590
  unstyled,
11574
- classNames,
11591
+ classNames: classNames2,
11575
11592
  styles,
11576
11593
  closeOnClickOutside,
11577
11594
  withinPortal,
@@ -11607,7 +11624,7 @@ function Popover(_props) {
11607
11624
  name: __staticSelector,
11608
11625
  props,
11609
11626
  classes: classes$L,
11610
- classNames,
11627
+ classNames: classNames2,
11611
11628
  styles,
11612
11629
  unstyled,
11613
11630
  attributes,
@@ -11615,7 +11632,7 @@ function Popover(_props) {
11615
11632
  vars,
11616
11633
  varsResolver: varsResolver$Q
11617
11634
  });
11618
- const { resolvedStyles } = useResolvedStylesApi({ classNames, styles, props });
11635
+ const { resolvedStyles } = useResolvedStylesApi({ classNames: classNames2, styles, props });
11619
11636
  const [dropdownVisible, setDropdownVisible] = useState(opened ?? defaultOpened ?? false);
11620
11637
  const positionRef = useRef(position);
11621
11638
  const arrowRef = useRef(null);
@@ -11721,7 +11738,7 @@ function Popover(_props) {
11721
11738
  withRoles,
11722
11739
  targetProps: others,
11723
11740
  __staticSelector,
11724
- classNames,
11741
+ classNames: classNames2,
11725
11742
  styles,
11726
11743
  unstyled,
11727
11744
  variant,
@@ -11790,7 +11807,7 @@ const varsResolver$P = createVarsResolver((theme2, { size: size2, color }) => ({
11790
11807
  "--loader-color": color ? getThemeColor(color, theme2) : void 0
11791
11808
  }
11792
11809
  }));
11793
- const Loader = factory((_props, ref) => {
11810
+ const Loader$1 = factory((_props, ref) => {
11794
11811
  const props = useProps("Loader", defaultProps$R, _props);
11795
11812
  const {
11796
11813
  size: size2,
@@ -11799,7 +11816,7 @@ const Loader = factory((_props, ref) => {
11799
11816
  vars,
11800
11817
  className,
11801
11818
  style,
11802
- classNames,
11819
+ classNames: classNames2,
11803
11820
  styles,
11804
11821
  unstyled,
11805
11822
  loaders,
@@ -11814,7 +11831,7 @@ const Loader = factory((_props, ref) => {
11814
11831
  classes: classes$K,
11815
11832
  className,
11816
11833
  style,
11817
- classNames,
11834
+ classNames: classNames2,
11818
11835
  styles,
11819
11836
  unstyled,
11820
11837
  attributes,
@@ -11836,9 +11853,9 @@ const Loader = factory((_props, ref) => {
11836
11853
  }
11837
11854
  );
11838
11855
  });
11839
- Loader.defaultLoaders = defaultLoaders;
11840
- Loader.classes = classes$K;
11841
- Loader.displayName = "@mantine/core/Loader";
11856
+ Loader$1.defaultLoaders = defaultLoaders;
11857
+ Loader$1.classes = classes$K;
11858
+ Loader$1.displayName = "@mantine/core/Loader";
11842
11859
  var classes$J = { "root": "m_8d3f4000", "icon": "m_8d3afb97", "loader": "m_302b9fb1", "group": "m_1a0f1b21", "groupSection": "m_437b6484" };
11843
11860
  const defaultProps$Q = {
11844
11861
  orientation: "horizontal"
@@ -11851,7 +11868,7 @@ const ActionIconGroup = factory((_props, ref) => {
11851
11868
  const {
11852
11869
  className,
11853
11870
  style,
11854
- classNames,
11871
+ classNames: classNames2,
11855
11872
  styles,
11856
11873
  unstyled,
11857
11874
  orientation,
@@ -11868,7 +11885,7 @@ const ActionIconGroup = factory((_props, ref) => {
11868
11885
  classes: classes$J,
11869
11886
  className,
11870
11887
  style,
11871
- classNames,
11888
+ classNames: classNames2,
11872
11889
  styles,
11873
11890
  unstyled,
11874
11891
  attributes,
@@ -11917,7 +11934,7 @@ const ActionIconGroupSection = factory((_props, ref) => {
11917
11934
  const {
11918
11935
  className,
11919
11936
  style,
11920
- classNames,
11937
+ classNames: classNames2,
11921
11938
  styles,
11922
11939
  unstyled,
11923
11940
  vars,
@@ -11934,7 +11951,7 @@ const ActionIconGroupSection = factory((_props, ref) => {
11934
11951
  classes: classes$J,
11935
11952
  className,
11936
11953
  style,
11937
- classNames,
11954
+ classNames: classNames2,
11938
11955
  styles,
11939
11956
  unstyled,
11940
11957
  attributes,
@@ -11974,7 +11991,7 @@ const ActionIcon$1 = polymorphicFactory((_props, ref) => {
11974
11991
  className,
11975
11992
  unstyled,
11976
11993
  variant,
11977
- classNames,
11994
+ classNames: classNames2,
11978
11995
  styles,
11979
11996
  style,
11980
11997
  loading,
@@ -11999,7 +12016,7 @@ const ActionIcon$1 = polymorphicFactory((_props, ref) => {
11999
12016
  className,
12000
12017
  style,
12001
12018
  classes: classes$J,
12002
- classNames,
12019
+ classNames: classNames2,
12003
12020
  styles,
12004
12021
  unstyled,
12005
12022
  attributes,
@@ -12018,7 +12035,7 @@ const ActionIcon$1 = polymorphicFactory((_props, ref) => {
12018
12035
  ref,
12019
12036
  mod: [{ loading, disabled: disabled || dataDisabled }, mod],
12020
12037
  children: [
12021
- typeof loading === "boolean" && /* @__PURE__ */ jsx(Transition$1, { mounted: loading, transition: "slide-down", duration: 150, children: (transitionStyles) => /* @__PURE__ */ jsx(Box, { component: "span", ...getStyles2("loader", { style: transitionStyles }), "aria-hidden": true, children: /* @__PURE__ */ jsx(Loader, { color: "var(--ai-color)", size: "calc(var(--ai-size) * 0.55)", ...loaderProps }) }) }),
12038
+ typeof loading === "boolean" && /* @__PURE__ */ jsx(Transition$1, { mounted: loading, transition: "slide-down", duration: 150, children: (transitionStyles) => /* @__PURE__ */ jsx(Box, { component: "span", ...getStyles2("loader", { style: transitionStyles }), "aria-hidden": true, children: /* @__PURE__ */ jsx(Loader$1, { color: "var(--ai-color)", size: "calc(var(--ai-size) * 0.55)", ...loaderProps }) }) }),
12022
12039
  /* @__PURE__ */ jsx(Box, { component: "span", mod: { loading }, ...getStyles2("icon"), children })
12023
12040
  ]
12024
12041
  }
@@ -12070,7 +12087,7 @@ const CloseButton = polymorphicFactory((_props, ref) => {
12070
12087
  vars,
12071
12088
  radius,
12072
12089
  className,
12073
- classNames,
12090
+ classNames: classNames2,
12074
12091
  style,
12075
12092
  styles,
12076
12093
  unstyled,
@@ -12089,7 +12106,7 @@ const CloseButton = polymorphicFactory((_props, ref) => {
12089
12106
  className,
12090
12107
  style,
12091
12108
  classes: classes$I,
12092
- classNames,
12109
+ classNames: classNames2,
12093
12110
  styles,
12094
12111
  unstyled,
12095
12112
  attributes,
@@ -12140,7 +12157,7 @@ const varsResolver$K = createVarsResolver(
12140
12157
  const Group = factory((_props, ref) => {
12141
12158
  const props = useProps("Group", defaultProps$O, _props);
12142
12159
  const {
12143
- classNames,
12160
+ classNames: classNames2,
12144
12161
  className,
12145
12162
  style,
12146
12163
  styles,
@@ -12171,7 +12188,7 @@ const Group = factory((_props, ref) => {
12171
12188
  className,
12172
12189
  style,
12173
12190
  classes: classes$H,
12174
- classNames,
12191
+ classNames: classNames2,
12175
12192
  styles,
12176
12193
  unstyled,
12177
12194
  attributes,
@@ -12501,10 +12518,10 @@ const [InputContext, useInputContext] = createOptionalContext({
12501
12518
  var classes$F = { "wrapper": "m_6c018570", "input": "m_8fb7ebe7", "section": "m_82577fc2", "placeholder": "m_88bacfd0", "root": "m_46b77525", "label": "m_8fdc1311", "required": "m_78a94662", "error": "m_8f816625", "description": "m_fe47ce59" };
12502
12519
  const InputClearButton = factory((_props, ref) => {
12503
12520
  const props = useProps("InputClearButton", null, _props);
12504
- const { size: size2, variant, vars, classNames, styles, ...others } = props;
12521
+ const { size: size2, variant, vars, classNames: classNames2, styles, ...others } = props;
12505
12522
  const ctx = useInputContext();
12506
12523
  const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
12507
- classNames,
12524
+ classNames: classNames2,
12508
12525
  styles,
12509
12526
  props
12510
12527
  });
@@ -12574,7 +12591,7 @@ const varsResolver$J = createVarsResolver((_, { size: size2 }) => ({
12574
12591
  const InputDescription = factory((_props, ref) => {
12575
12592
  const props = useProps("InputDescription", null, _props);
12576
12593
  const {
12577
- classNames,
12594
+ classNames: classNames2,
12578
12595
  className,
12579
12596
  style,
12580
12597
  styles,
@@ -12594,7 +12611,7 @@ const InputDescription = factory((_props, ref) => {
12594
12611
  classes: classes$F,
12595
12612
  className,
12596
12613
  style,
12597
- classNames,
12614
+ classNames: classNames2,
12598
12615
  styles,
12599
12616
  unstyled,
12600
12617
  attributes,
@@ -12625,7 +12642,7 @@ const varsResolver$I = createVarsResolver((_, { size: size2 }) => ({
12625
12642
  const InputError = factory((_props, ref) => {
12626
12643
  const props = useProps("InputError", null, _props);
12627
12644
  const {
12628
- classNames,
12645
+ classNames: classNames2,
12629
12646
  className,
12630
12647
  style,
12631
12648
  styles,
@@ -12644,7 +12661,7 @@ const InputError = factory((_props, ref) => {
12644
12661
  classes: classes$F,
12645
12662
  className,
12646
12663
  style,
12647
- classNames,
12664
+ classNames: classNames2,
12648
12665
  styles,
12649
12666
  unstyled,
12650
12667
  attributes,
@@ -12680,7 +12697,7 @@ const varsResolver$H = createVarsResolver((_, { size: size2 }) => ({
12680
12697
  const InputLabel = factory((_props, ref) => {
12681
12698
  const props = useProps("InputLabel", defaultProps$N, _props);
12682
12699
  const {
12683
- classNames,
12700
+ classNames: classNames2,
12684
12701
  className,
12685
12702
  style,
12686
12703
  styles,
@@ -12704,7 +12721,7 @@ const InputLabel = factory((_props, ref) => {
12704
12721
  classes: classes$F,
12705
12722
  className,
12706
12723
  style,
12707
- classNames,
12724
+ classNames: classNames2,
12708
12725
  styles,
12709
12726
  unstyled,
12710
12727
  attributes,
@@ -12743,7 +12760,7 @@ InputLabel.displayName = "@mantine/core/InputLabel";
12743
12760
  const InputPlaceholder = factory((_props, ref) => {
12744
12761
  const props = useProps("InputPlaceholder", null, _props);
12745
12762
  const {
12746
- classNames,
12763
+ classNames: classNames2,
12747
12764
  className,
12748
12765
  style,
12749
12766
  styles,
@@ -12762,7 +12779,7 @@ const InputPlaceholder = factory((_props, ref) => {
12762
12779
  classes: classes$F,
12763
12780
  className,
12764
12781
  style,
12765
- classNames,
12782
+ classNames: classNames2,
12766
12783
  styles,
12767
12784
  unstyled,
12768
12785
  attributes,
@@ -12810,7 +12827,7 @@ const varsResolver$G = createVarsResolver((_, { size: size2 }) => ({
12810
12827
  const InputWrapper = factory((_props, ref) => {
12811
12828
  const props = useProps("InputWrapper", defaultProps$M, _props);
12812
12829
  const {
12813
- classNames,
12830
+ classNames: classNames2,
12814
12831
  className,
12815
12832
  style,
12816
12833
  styles,
@@ -12843,7 +12860,7 @@ const InputWrapper = factory((_props, ref) => {
12843
12860
  classes: classes$F,
12844
12861
  className,
12845
12862
  style,
12846
- classNames,
12863
+ classNames: classNames2,
12847
12864
  styles,
12848
12865
  unstyled,
12849
12866
  attributes,
@@ -12967,7 +12984,7 @@ const varsResolver$F = createVarsResolver((_, props, ctx) => ({
12967
12984
  const Input = polymorphicFactory((_props, ref) => {
12968
12985
  const props = useProps("Input", defaultProps$L, _props);
12969
12986
  const {
12970
- classNames,
12987
+ classNames: classNames2,
12971
12988
  className,
12972
12989
  style,
12973
12990
  styles,
@@ -13012,7 +13029,7 @@ const Input = polymorphicFactory((_props, ref) => {
13012
13029
  classes: classes$F,
13013
13030
  className,
13014
13031
  style,
13015
- classNames,
13032
+ classNames: classNames2,
13016
13033
  styles,
13017
13034
  unstyled,
13018
13035
  attributes,
@@ -13112,7 +13129,7 @@ function useInputProps(component, defaultProps2, _props) {
13112
13129
  description,
13113
13130
  error: error2,
13114
13131
  required,
13115
- classNames,
13132
+ classNames: classNames2,
13116
13133
  styles,
13117
13134
  className,
13118
13135
  unstyled,
@@ -13140,7 +13157,7 @@ function useInputProps(component, defaultProps2, _props) {
13140
13157
  description,
13141
13158
  error: error2,
13142
13159
  required,
13143
- classNames,
13160
+ classNames: classNames2,
13144
13161
  className,
13145
13162
  __staticSelector,
13146
13163
  __stylesApiProps: __stylesApiProps || props,
@@ -13162,13 +13179,13 @@ function useInputProps(component, defaultProps2, _props) {
13162
13179
  };
13163
13180
  return {
13164
13181
  ...rest,
13165
- classNames,
13182
+ classNames: classNames2,
13166
13183
  styles,
13167
13184
  unstyled,
13168
13185
  wrapperProps: { ...wrapperProps, ...styleProps },
13169
13186
  inputProps: {
13170
13187
  required,
13171
- classNames,
13188
+ classNames: classNames2,
13172
13189
  styles,
13173
13190
  unstyled,
13174
13191
  size: size2,
@@ -13205,7 +13222,7 @@ var classes$E = { "root": "m_8bffd616" };
13205
13222
  const Flex = polymorphicFactory((_props, ref) => {
13206
13223
  const props = useProps("Flex", null, _props);
13207
13224
  const {
13208
- classNames,
13225
+ classNames: classNames2,
13209
13226
  className,
13210
13227
  style,
13211
13228
  styles,
@@ -13227,7 +13244,7 @@ const Flex = polymorphicFactory((_props, ref) => {
13227
13244
  props,
13228
13245
  className,
13229
13246
  style,
13230
- classNames,
13247
+ classNames: classNames2,
13231
13248
  styles,
13232
13249
  unstyled,
13233
13250
  attributes,
@@ -13386,7 +13403,7 @@ const varsResolver$E = createVarsResolver(
13386
13403
  const FloatingIndicator = factory((_props, ref) => {
13387
13404
  const props = useProps("FloatingIndicator", null, _props);
13388
13405
  const {
13389
- classNames,
13406
+ classNames: classNames2,
13390
13407
  className,
13391
13408
  style,
13392
13409
  styles,
@@ -13406,7 +13423,7 @@ const FloatingIndicator = factory((_props, ref) => {
13406
13423
  props,
13407
13424
  className,
13408
13425
  style,
13409
- classNames,
13426
+ classNames: classNames2,
13410
13427
  styles,
13411
13428
  unstyled,
13412
13429
  attributes,
@@ -13498,7 +13515,7 @@ const varsResolver$D = createVarsResolver(
13498
13515
  const Alert$1 = factory((_props, ref) => {
13499
13516
  const props = useProps("Alert", null, _props);
13500
13517
  const {
13501
- classNames,
13518
+ classNames: classNames2,
13502
13519
  className,
13503
13520
  style,
13504
13521
  styles,
@@ -13525,7 +13542,7 @@ const Alert$1 = factory((_props, ref) => {
13525
13542
  props,
13526
13543
  className,
13527
13544
  style,
13528
- classNames,
13545
+ classNames: classNames2,
13529
13546
  styles,
13530
13547
  unstyled,
13531
13548
  attributes,
@@ -13609,7 +13626,7 @@ const Text = polymorphicFactory((_props, ref) => {
13609
13626
  vars,
13610
13627
  className,
13611
13628
  style,
13612
- classNames,
13629
+ classNames: classNames2,
13613
13630
  styles,
13614
13631
  unstyled,
13615
13632
  variant,
@@ -13624,7 +13641,7 @@ const Text = polymorphicFactory((_props, ref) => {
13624
13641
  classes: classes$B,
13625
13642
  className,
13626
13643
  style,
13627
- classNames,
13644
+ classNames: classNames2,
13628
13645
  styles,
13629
13646
  unstyled,
13630
13647
  attributes,
@@ -13685,7 +13702,7 @@ const [AppShellProvider, useAppShellContext] = createSafeContext(
13685
13702
  var classes$z = { "root": "m_89ab340", "navbar": "m_45252eee", "aside": "m_9cdde9a", "header": "m_3b16f56b", "main": "m_8983817", "footer": "m_3840c879", "section": "m_6dcfc7c7" };
13686
13703
  const AppShellAside = factory((_props, ref) => {
13687
13704
  const {
13688
- classNames,
13705
+ classNames: classNames2,
13689
13706
  className,
13690
13707
  style,
13691
13708
  styles,
@@ -13708,7 +13725,7 @@ const AppShellAside = factory((_props, ref) => {
13708
13725
  mod: [{ "with-border": withBorder ?? ctx.withBorder }, mod],
13709
13726
  ...ctx.getStyles("aside", {
13710
13727
  className: clsx({ [ReactRemoveScroll.classNames.zeroRight]: ctx.offsetScrollbars }, className),
13711
- classNames,
13728
+ classNames: classNames2,
13712
13729
  styles,
13713
13730
  style
13714
13731
  }),
@@ -13721,7 +13738,7 @@ AppShellAside.classes = classes$z;
13721
13738
  AppShellAside.displayName = "@mantine/core/AppShellAside";
13722
13739
  const AppShellFooter = factory((_props, ref) => {
13723
13740
  const {
13724
- classNames,
13741
+ classNames: classNames2,
13725
13742
  className,
13726
13743
  style,
13727
13744
  styles,
@@ -13744,7 +13761,7 @@ const AppShellFooter = factory((_props, ref) => {
13744
13761
  mod: [{ "with-border": withBorder ?? ctx.withBorder }, mod],
13745
13762
  ...ctx.getStyles("footer", {
13746
13763
  className: clsx({ [ReactRemoveScroll.classNames.zeroRight]: ctx.offsetScrollbars }, className),
13747
- classNames,
13764
+ classNames: classNames2,
13748
13765
  styles,
13749
13766
  style
13750
13767
  }),
@@ -13757,7 +13774,7 @@ AppShellFooter.classes = classes$z;
13757
13774
  AppShellFooter.displayName = "@mantine/core/AppShellFooter";
13758
13775
  const AppShellHeader = factory((_props, ref) => {
13759
13776
  const {
13760
- classNames,
13777
+ classNames: classNames2,
13761
13778
  className,
13762
13779
  style,
13763
13780
  styles,
@@ -13780,7 +13797,7 @@ const AppShellHeader = factory((_props, ref) => {
13780
13797
  mod: [{ "with-border": withBorder ?? ctx.withBorder }, mod],
13781
13798
  ...ctx.getStyles("header", {
13782
13799
  className: clsx({ [ReactRemoveScroll.classNames.zeroRight]: ctx.offsetScrollbars }, className),
13783
- classNames,
13800
+ classNames: classNames2,
13784
13801
  styles,
13785
13802
  style
13786
13803
  }),
@@ -13792,7 +13809,7 @@ const AppShellHeader = factory((_props, ref) => {
13792
13809
  AppShellHeader.classes = classes$z;
13793
13810
  AppShellHeader.displayName = "@mantine/core/AppShellHeader";
13794
13811
  const AppShellMain = factory((_props, ref) => {
13795
- const { classNames, className, style, styles, vars, ...others } = useProps(
13812
+ const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
13796
13813
  "AppShellMain",
13797
13814
  null,
13798
13815
  _props
@@ -13803,7 +13820,7 @@ const AppShellMain = factory((_props, ref) => {
13803
13820
  {
13804
13821
  component: "main",
13805
13822
  ref,
13806
- ...ctx.getStyles("main", { className, style, classNames, styles }),
13823
+ ...ctx.getStyles("main", { className, style, classNames: classNames2, styles }),
13807
13824
  ...others
13808
13825
  }
13809
13826
  );
@@ -14175,7 +14192,7 @@ function AppShellMediaStyles({
14175
14192
  }
14176
14193
  const AppShellNavbar = factory((_props, ref) => {
14177
14194
  const {
14178
- classNames,
14195
+ classNames: classNames2,
14179
14196
  className,
14180
14197
  style,
14181
14198
  styles,
@@ -14196,7 +14213,7 @@ const AppShellNavbar = factory((_props, ref) => {
14196
14213
  component: "nav",
14197
14214
  ref,
14198
14215
  mod: [{ "with-border": withBorder ?? ctx.withBorder }, mod],
14199
- ...ctx.getStyles("navbar", { className, classNames, styles, style }),
14216
+ ...ctx.getStyles("navbar", { className, classNames: classNames2, styles, style }),
14200
14217
  ...others,
14201
14218
  __vars: { "--app-shell-navbar-z-index": `calc(${zIndex ?? ctx.zIndex} + 1)` }
14202
14219
  }
@@ -14205,7 +14222,7 @@ const AppShellNavbar = factory((_props, ref) => {
14205
14222
  AppShellNavbar.classes = classes$z;
14206
14223
  AppShellNavbar.displayName = "@mantine/core/AppShellNavbar";
14207
14224
  const AppShellSection = polymorphicFactory((_props, ref) => {
14208
- const { classNames, className, style, styles, vars, grow, mod, ...others } = useProps(
14225
+ const { classNames: classNames2, className, style, styles, vars, grow, mod, ...others } = useProps(
14209
14226
  "AppShellSection",
14210
14227
  null,
14211
14228
  _props
@@ -14216,7 +14233,7 @@ const AppShellSection = polymorphicFactory((_props, ref) => {
14216
14233
  {
14217
14234
  ref,
14218
14235
  mod: [{ grow }, mod],
14219
- ...ctx.getStyles("section", { className, style, classNames, styles }),
14236
+ ...ctx.getStyles("section", { className, style, classNames: classNames2, styles }),
14220
14237
  ...others
14221
14238
  }
14222
14239
  );
@@ -14268,7 +14285,7 @@ const varsResolver$B = createVarsResolver(
14268
14285
  const AppShell = factory((_props, ref) => {
14269
14286
  const props = useProps("AppShell", defaultProps$H, _props);
14270
14287
  const {
14271
- classNames,
14288
+ classNames: classNames2,
14272
14289
  className,
14273
14290
  style,
14274
14291
  styles,
@@ -14298,7 +14315,7 @@ const AppShell = factory((_props, ref) => {
14298
14315
  props,
14299
14316
  className,
14300
14317
  style,
14301
- classNames,
14318
+ classNames: classNames2,
14302
14319
  styles,
14303
14320
  unstyled,
14304
14321
  attributes,
@@ -14385,14 +14402,14 @@ const varsResolver$A = createVarsResolver((theme2, { size: size2, color }) => ({
14385
14402
  }));
14386
14403
  const ComboboxChevron = factory((_props, ref) => {
14387
14404
  const props = useProps("ComboboxChevron", defaultProps$G, _props);
14388
- const { size: size2, error: error2, style, className, classNames, styles, unstyled, vars, mod, ...others } = props;
14405
+ const { size: size2, error: error2, style, className, classNames: classNames2, styles, unstyled, vars, mod, ...others } = props;
14389
14406
  const getStyles2 = useStyles({
14390
14407
  name: "ComboboxChevron",
14391
14408
  classes: classes$y,
14392
14409
  props,
14393
14410
  style,
14394
14411
  className,
14395
- classNames,
14412
+ classNames: classNames2,
14396
14413
  styles,
14397
14414
  unstyled,
14398
14415
  vars,
@@ -14449,7 +14466,7 @@ const ComboboxClearButton = forwardRef(
14449
14466
  );
14450
14467
  ComboboxClearButton.displayName = "@mantine/core/ComboboxClearButton";
14451
14468
  const ComboboxDropdown = factory((props, ref) => {
14452
- const { classNames, styles, className, style, hidden: hidden2, ...others } = useProps(
14469
+ const { classNames: classNames2, styles, className, style, hidden: hidden2, ...others } = useProps(
14453
14470
  "ComboboxDropdown",
14454
14471
  null,
14455
14472
  props
@@ -14462,7 +14479,7 @@ const ComboboxDropdown = factory((props, ref) => {
14462
14479
  ref,
14463
14480
  role: "presentation",
14464
14481
  "data-hidden": hidden2 || void 0,
14465
- ...ctx.getStyles("dropdown", { className, style, classNames, styles })
14482
+ ...ctx.getStyles("dropdown", { className, style, classNames: classNames2, styles })
14466
14483
  }
14467
14484
  );
14468
14485
  });
@@ -14483,7 +14500,7 @@ const ComboboxDropdownTarget = factory((props, ref) => {
14483
14500
  });
14484
14501
  ComboboxDropdownTarget.displayName = "@mantine/core/ComboboxDropdownTarget";
14485
14502
  const ComboboxEmpty = factory((props, ref) => {
14486
- const { classNames, className, style, styles, vars, ...others } = useProps(
14503
+ const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
14487
14504
  "ComboboxEmpty",
14488
14505
  null,
14489
14506
  props
@@ -14493,7 +14510,7 @@ const ComboboxEmpty = factory((props, ref) => {
14493
14510
  Box,
14494
14511
  {
14495
14512
  ref,
14496
- ...ctx.getStyles("empty", { className, classNames, styles, style }),
14513
+ ...ctx.getStyles("empty", { className, classNames: classNames2, styles, style }),
14497
14514
  ...others
14498
14515
  }
14499
14516
  );
@@ -14619,7 +14636,7 @@ const ComboboxEventsTarget = factory((props, ref) => {
14619
14636
  });
14620
14637
  ComboboxEventsTarget.displayName = "@mantine/core/ComboboxEventsTarget";
14621
14638
  const ComboboxFooter = factory((props, ref) => {
14622
- const { classNames, className, style, styles, vars, ...others } = useProps(
14639
+ const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
14623
14640
  "ComboboxFooter",
14624
14641
  null,
14625
14642
  props
@@ -14629,7 +14646,7 @@ const ComboboxFooter = factory((props, ref) => {
14629
14646
  Box,
14630
14647
  {
14631
14648
  ref,
14632
- ...ctx.getStyles("footer", { className, classNames, style, styles }),
14649
+ ...ctx.getStyles("footer", { className, classNames: classNames2, style, styles }),
14633
14650
  ...others,
14634
14651
  onMouseDown: (event) => {
14635
14652
  event.preventDefault();
@@ -14640,7 +14657,7 @@ const ComboboxFooter = factory((props, ref) => {
14640
14657
  ComboboxFooter.classes = classes$y;
14641
14658
  ComboboxFooter.displayName = "@mantine/core/ComboboxFooter";
14642
14659
  const ComboboxGroup = factory((props, ref) => {
14643
- const { classNames, className, style, styles, vars, children, label, id, ...others } = useProps(
14660
+ const { classNames: classNames2, className, style, styles, vars, children, label, id, ...others } = useProps(
14644
14661
  "ComboboxGroup",
14645
14662
  null,
14646
14663
  props
@@ -14653,10 +14670,10 @@ const ComboboxGroup = factory((props, ref) => {
14653
14670
  ref,
14654
14671
  role: "group",
14655
14672
  "aria-labelledby": label ? _id : void 0,
14656
- ...ctx.getStyles("group", { className, classNames, style, styles }),
14673
+ ...ctx.getStyles("group", { className, classNames: classNames2, style, styles }),
14657
14674
  ...others,
14658
14675
  children: [
14659
- label && /* @__PURE__ */ jsx("div", { id: _id, ...ctx.getStyles("groupLabel", { classNames, styles }), children: label }),
14676
+ label && /* @__PURE__ */ jsx("div", { id: _id, ...ctx.getStyles("groupLabel", { classNames: classNames2, styles }), children: label }),
14660
14677
  children
14661
14678
  ]
14662
14679
  }
@@ -14665,7 +14682,7 @@ const ComboboxGroup = factory((props, ref) => {
14665
14682
  ComboboxGroup.classes = classes$y;
14666
14683
  ComboboxGroup.displayName = "@mantine/core/ComboboxGroup";
14667
14684
  const ComboboxHeader = factory((props, ref) => {
14668
- const { classNames, className, style, styles, vars, ...others } = useProps(
14685
+ const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
14669
14686
  "ComboboxHeader",
14670
14687
  null,
14671
14688
  props
@@ -14675,7 +14692,7 @@ const ComboboxHeader = factory((props, ref) => {
14675
14692
  Box,
14676
14693
  {
14677
14694
  ref,
14678
- ...ctx.getStyles("header", { className, classNames, style, styles }),
14695
+ ...ctx.getStyles("header", { className, classNames: classNames2, style, styles }),
14679
14696
  ...others,
14680
14697
  onMouseDown: (event) => {
14681
14698
  event.preventDefault();
@@ -14703,7 +14720,7 @@ ComboboxHiddenInput.displayName = "@mantine/core/ComboboxHiddenInput";
14703
14720
  const ComboboxOption = factory((_props, ref) => {
14704
14721
  const props = useProps("ComboboxOption", null, _props);
14705
14722
  const {
14706
- classNames,
14723
+ classNames: classNames2,
14707
14724
  className,
14708
14725
  style,
14709
14726
  styles,
@@ -14724,7 +14741,7 @@ const ComboboxOption = factory((_props, ref) => {
14724
14741
  return /* @__PURE__ */ jsx(
14725
14742
  Box,
14726
14743
  {
14727
- ...ctx.getStyles("option", { className, classNames, styles, style }),
14744
+ ...ctx.getStyles("option", { className, classNames: classNames2, styles, style }),
14728
14745
  ...others,
14729
14746
  ref,
14730
14747
  id: _id,
@@ -14759,7 +14776,7 @@ ComboboxOption.classes = classes$y;
14759
14776
  ComboboxOption.displayName = "@mantine/core/ComboboxOption";
14760
14777
  const ComboboxOptions = factory((_props, ref) => {
14761
14778
  const props = useProps("ComboboxOptions", null, _props);
14762
- const { classNames, className, style, styles, id, onMouseDown, labelledBy, ...others } = props;
14779
+ const { classNames: classNames2, className, style, styles, id, onMouseDown, labelledBy, ...others } = props;
14763
14780
  const ctx = useComboboxContext();
14764
14781
  const _id = useId$1(id);
14765
14782
  useEffect(() => {
@@ -14769,7 +14786,7 @@ const ComboboxOptions = factory((_props, ref) => {
14769
14786
  Box,
14770
14787
  {
14771
14788
  ref,
14772
- ...ctx.getStyles("options", { className, style, classNames, styles }),
14789
+ ...ctx.getStyles("options", { className, style, classNames: classNames2, styles }),
14773
14790
  ...others,
14774
14791
  id: _id,
14775
14792
  role: "listbox",
@@ -14790,7 +14807,7 @@ const defaultProps$D = {
14790
14807
  const ComboboxSearch = factory((_props, ref) => {
14791
14808
  const props = useProps("ComboboxSearch", defaultProps$D, _props);
14792
14809
  const {
14793
- classNames,
14810
+ classNames: classNames2,
14794
14811
  styles,
14795
14812
  unstyled,
14796
14813
  vars,
@@ -14814,7 +14831,7 @@ const ComboboxSearch = factory((_props, ref) => {
14814
14831
  Input,
14815
14832
  {
14816
14833
  ref: useMergedRef(ref, ctx.store.searchRef),
14817
- classNames: [{ input: _styles.className }, classNames],
14834
+ classNames: [{ input: _styles.className }, classNames2],
14818
14835
  styles: [{ input: _styles.style }, styles],
14819
14836
  size: size2 || ctx.size,
14820
14837
  ...targetProps,
@@ -15114,7 +15131,7 @@ const varsResolver$z = createVarsResolver((_, { size: size2, dropdownPadding })
15114
15131
  function Combobox(_props) {
15115
15132
  const props = useProps("Combobox", defaultProps$B, _props);
15116
15133
  const {
15117
- classNames,
15134
+ classNames: classNames2,
15118
15135
  styles,
15119
15136
  unstyled,
15120
15137
  children,
@@ -15136,7 +15153,7 @@ function Combobox(_props) {
15136
15153
  name: __staticSelector || "Combobox",
15137
15154
  classes: classes$y,
15138
15155
  props,
15139
- classNames,
15156
+ classNames: classNames2,
15140
15157
  styles,
15141
15158
  unstyled,
15142
15159
  attributes,
@@ -15198,7 +15215,7 @@ const InlineInput = forwardRef(
15198
15215
  __staticSelector,
15199
15216
  __stylesApiProps,
15200
15217
  className,
15201
- classNames,
15218
+ classNames: classNames2,
15202
15219
  styles,
15203
15220
  unstyled,
15204
15221
  children,
@@ -15224,7 +15241,7 @@ const InlineInput = forwardRef(
15224
15241
  className,
15225
15242
  style,
15226
15243
  classes: classes$x,
15227
- classNames,
15244
+ classNames: classNames2,
15228
15245
  styles,
15229
15246
  unstyled,
15230
15247
  attributes
@@ -15289,7 +15306,7 @@ const varsResolver$y = createVarsResolver((_, { radius }) => ({
15289
15306
  const CheckboxCard = factory((_props, ref) => {
15290
15307
  const props = useProps("CheckboxCard", defaultProps$A, _props);
15291
15308
  const {
15292
- classNames,
15309
+ classNames: classNames2,
15293
15310
  className,
15294
15311
  style,
15295
15312
  styles,
@@ -15311,7 +15328,7 @@ const CheckboxCard = factory((_props, ref) => {
15311
15328
  props,
15312
15329
  className,
15313
15330
  style,
15314
- classNames,
15331
+ classNames: classNames2,
15315
15332
  styles,
15316
15333
  unstyled,
15317
15334
  attributes,
@@ -15453,7 +15470,7 @@ const varsResolver$x = createVarsResolver(
15453
15470
  const CheckboxIndicator = factory((_props, ref) => {
15454
15471
  const props = useProps("CheckboxIndicator", defaultProps$z, _props);
15455
15472
  const {
15456
- classNames,
15473
+ classNames: classNames2,
15457
15474
  className,
15458
15475
  style,
15459
15476
  styles,
@@ -15478,7 +15495,7 @@ const CheckboxIndicator = factory((_props, ref) => {
15478
15495
  props,
15479
15496
  className,
15480
15497
  style,
15481
- classNames,
15498
+ classNames: classNames2,
15482
15499
  styles,
15483
15500
  unstyled,
15484
15501
  attributes,
@@ -15524,7 +15541,7 @@ const varsResolver$w = createVarsResolver(
15524
15541
  const Checkbox$1 = factory((_props, forwardedRef) => {
15525
15542
  const props = useProps("Checkbox", defaultProps$y, _props);
15526
15543
  const {
15527
- classNames,
15544
+ classNames: classNames2,
15528
15545
  className,
15529
15546
  style,
15530
15547
  styles,
@@ -15560,7 +15577,7 @@ const Checkbox$1 = factory((_props, forwardedRef) => {
15560
15577
  classes: classes$w,
15561
15578
  className,
15562
15579
  style,
15563
- classNames,
15580
+ classNames: classNames2,
15564
15581
  styles,
15565
15582
  unstyled,
15566
15583
  attributes,
@@ -15602,7 +15619,7 @@ const Checkbox$1 = factory((_props, forwardedRef) => {
15602
15619
  description,
15603
15620
  error: error2,
15604
15621
  disabled: withContextProps.disabled,
15605
- classNames,
15622
+ classNames: classNames2,
15606
15623
  styles,
15607
15624
  unstyled,
15608
15625
  "data-checked": withContextProps.checked || checked || void 0,
@@ -15829,14 +15846,14 @@ const varsResolver$v = createVarsResolver((_, { spacing }) => ({
15829
15846
  }));
15830
15847
  const AvatarGroup = factory((_props, ref) => {
15831
15848
  const props = useProps("AvatarGroup", null, _props);
15832
- const { classNames, className, style, styles, unstyled, vars, spacing, attributes, ...others } = props;
15849
+ const { classNames: classNames2, className, style, styles, unstyled, vars, spacing, attributes, ...others } = props;
15833
15850
  const getStyles2 = useStyles({
15834
15851
  name: "AvatarGroup",
15835
15852
  classes: classes$t,
15836
15853
  props,
15837
15854
  className,
15838
15855
  style,
15839
- classNames,
15856
+ classNames: classNames2,
15840
15857
  styles,
15841
15858
  unstyled,
15842
15859
  attributes,
@@ -15927,7 +15944,7 @@ const varsResolver$u = createVarsResolver(
15927
15944
  const Avatar$1 = polymorphicFactory((_props, ref) => {
15928
15945
  const props = useProps("Avatar", null, _props);
15929
15946
  const {
15930
- classNames,
15947
+ classNames: classNames2,
15931
15948
  className,
15932
15949
  style,
15933
15950
  styles,
@@ -15955,7 +15972,7 @@ const Avatar$1 = polymorphicFactory((_props, ref) => {
15955
15972
  classes: classes$t,
15956
15973
  className,
15957
15974
  style,
15958
- classNames,
15975
+ classNames: classNames2,
15959
15976
  styles,
15960
15977
  unstyled,
15961
15978
  attributes,
@@ -16016,7 +16033,7 @@ const varsResolver$t = createVarsResolver(
16016
16033
  const Badge$1 = polymorphicFactory((_props, ref) => {
16017
16034
  const props = useProps("Badge", null, _props);
16018
16035
  const {
16019
- classNames,
16036
+ classNames: classNames2,
16020
16037
  className,
16021
16038
  style,
16022
16039
  styles,
@@ -16042,7 +16059,7 @@ const Badge$1 = polymorphicFactory((_props, ref) => {
16042
16059
  classes: classes$s,
16043
16060
  className,
16044
16061
  style,
16045
- classNames,
16062
+ classNames: classNames2,
16046
16063
  styles,
16047
16064
  unstyled,
16048
16065
  attributes,
@@ -16090,7 +16107,7 @@ const varsResolver$s = createVarsResolver(
16090
16107
  const Burger = factory((_props, ref) => {
16091
16108
  const props = useProps("Burger", null, _props);
16092
16109
  const {
16093
- classNames,
16110
+ classNames: classNames2,
16094
16111
  className,
16095
16112
  style,
16096
16113
  styles,
@@ -16110,7 +16127,7 @@ const Burger = factory((_props, ref) => {
16110
16127
  props,
16111
16128
  className,
16112
16129
  style,
16113
- classNames,
16130
+ classNames: classNames2,
16114
16131
  styles,
16115
16132
  unstyled,
16116
16133
  attributes,
@@ -16136,7 +16153,7 @@ const ButtonGroup = factory((_props, ref) => {
16136
16153
  const {
16137
16154
  className,
16138
16155
  style,
16139
- classNames,
16156
+ classNames: classNames2,
16140
16157
  styles,
16141
16158
  unstyled,
16142
16159
  orientation,
@@ -16153,7 +16170,7 @@ const ButtonGroup = factory((_props, ref) => {
16153
16170
  classes: classes$q,
16154
16171
  className,
16155
16172
  style,
16156
- classNames,
16173
+ classNames: classNames2,
16157
16174
  styles,
16158
16175
  unstyled,
16159
16176
  attributes,
@@ -16202,7 +16219,7 @@ const ButtonGroupSection = factory((_props, ref) => {
16202
16219
  const {
16203
16220
  className,
16204
16221
  style,
16205
- classNames,
16222
+ classNames: classNames2,
16206
16223
  styles,
16207
16224
  unstyled,
16208
16225
  vars,
@@ -16219,7 +16236,7 @@ const ButtonGroupSection = factory((_props, ref) => {
16219
16236
  classes: classes$q,
16220
16237
  className,
16221
16238
  style,
16222
- classNames,
16239
+ classNames: classNames2,
16223
16240
  styles,
16224
16241
  unstyled,
16225
16242
  attributes,
@@ -16279,7 +16296,7 @@ const Button$1 = polymorphicFactory((_props, ref) => {
16279
16296
  loading,
16280
16297
  loaderProps,
16281
16298
  gradient,
16282
- classNames,
16299
+ classNames: classNames2,
16283
16300
  styles,
16284
16301
  unstyled,
16285
16302
  "data-disabled": dataDisabled,
@@ -16294,7 +16311,7 @@ const Button$1 = polymorphicFactory((_props, ref) => {
16294
16311
  classes: classes$q,
16295
16312
  className,
16296
16313
  style,
16297
- classNames,
16314
+ classNames: classNames2,
16298
16315
  styles,
16299
16316
  unstyled,
16300
16317
  attributes,
@@ -16324,7 +16341,7 @@ const Button$1 = polymorphicFactory((_props, ref) => {
16324
16341
  ...others,
16325
16342
  children: [
16326
16343
  typeof loading === "boolean" && /* @__PURE__ */ jsx(Transition$1, { mounted: loading, transition: loaderTransition, duration: 150, children: (transitionStyles) => /* @__PURE__ */ jsx(Box, { component: "span", ...getStyles2("loader", { style: transitionStyles }), "aria-hidden": true, children: /* @__PURE__ */ jsx(
16327
- Loader,
16344
+ Loader$1,
16328
16345
  {
16329
16346
  color: "var(--button-color)",
16330
16347
  size: "calc(var(--button-height) / 1.8)",
@@ -16350,14 +16367,14 @@ const [CardProvider, useCardContext] = createSafeContext(
16350
16367
  var classes$p = { "root": "m_e615b15f", "section": "m_599a2148" };
16351
16368
  const CardSection = polymorphicFactory((_props, ref) => {
16352
16369
  const props = useProps("CardSection", null, _props);
16353
- const { classNames, className, style, styles, vars, withBorder, inheritPadding, mod, ...others } = props;
16370
+ const { classNames: classNames2, className, style, styles, vars, withBorder, inheritPadding, mod, ...others } = props;
16354
16371
  const ctx = useCardContext();
16355
16372
  return /* @__PURE__ */ jsx(
16356
16373
  Box,
16357
16374
  {
16358
16375
  ref,
16359
16376
  mod: [{ "with-border": withBorder, "inherit-padding": inheritPadding }, mod],
16360
- ...ctx.getStyles("section", { className, style, styles, classNames }),
16377
+ ...ctx.getStyles("section", { className, style, styles, classNames: classNames2 }),
16361
16378
  ...others
16362
16379
  }
16363
16380
  );
@@ -16372,7 +16389,7 @@ const varsResolver$o = createVarsResolver((_, { padding }) => ({
16372
16389
  const Card$1 = polymorphicFactory((_props, ref) => {
16373
16390
  const props = useProps("Card", null, _props);
16374
16391
  const {
16375
- classNames,
16392
+ classNames: classNames2,
16376
16393
  className,
16377
16394
  style,
16378
16395
  styles,
@@ -16389,7 +16406,7 @@ const Card$1 = polymorphicFactory((_props, ref) => {
16389
16406
  classes: classes$p,
16390
16407
  className,
16391
16408
  style,
16392
- classNames,
16409
+ classNames: classNames2,
16393
16410
  styles,
16394
16411
  unstyled,
16395
16412
  attributes,
@@ -16415,7 +16432,7 @@ var classes$o = { "root": "m_4451eb3a" };
16415
16432
  const Center = polymorphicFactory((_props, ref) => {
16416
16433
  const props = useProps("Center", null, _props);
16417
16434
  const {
16418
- classNames,
16435
+ classNames: classNames2,
16419
16436
  className,
16420
16437
  style,
16421
16438
  styles,
@@ -16432,7 +16449,7 @@ const Center = polymorphicFactory((_props, ref) => {
16432
16449
  classes: classes$o,
16433
16450
  className,
16434
16451
  style,
16435
- classNames,
16452
+ classNames: classNames2,
16436
16453
  styles,
16437
16454
  unstyled,
16438
16455
  attributes,
@@ -16451,7 +16468,7 @@ const varsResolver$n = createVarsResolver((_, { size: size2, fluid }) => ({
16451
16468
  const Container = factory((_props, ref) => {
16452
16469
  const props = useProps("Container", null, _props);
16453
16470
  const {
16454
- classNames,
16471
+ classNames: classNames2,
16455
16472
  className,
16456
16473
  style,
16457
16474
  styles,
@@ -16469,7 +16486,7 @@ const Container = factory((_props, ref) => {
16469
16486
  props,
16470
16487
  className,
16471
16488
  style,
16472
- classNames,
16489
+ classNames: classNames2,
16473
16490
  styles,
16474
16491
  unstyled,
16475
16492
  attributes,
@@ -16502,7 +16519,7 @@ const varsResolver$m = createVarsResolver((theme2, { color, variant, size: size2
16502
16519
  const Divider = factory((_props, ref) => {
16503
16520
  const props = useProps("Divider", defaultProps$w, _props);
16504
16521
  const {
16505
- classNames,
16522
+ classNames: classNames2,
16506
16523
  className,
16507
16524
  style,
16508
16525
  styles,
@@ -16522,7 +16539,7 @@ const Divider = factory((_props, ref) => {
16522
16539
  props,
16523
16540
  className,
16524
16541
  style,
16525
- classNames,
16542
+ classNames: classNames2,
16526
16543
  styles,
16527
16544
  unstyled,
16528
16545
  attributes,
@@ -16549,13 +16566,13 @@ const [DrawerProvider, useDrawerContext] = createSafeContext(
16549
16566
  );
16550
16567
  const DrawerBody = factory((_props, ref) => {
16551
16568
  const props = useProps("DrawerBody", null, _props);
16552
- const { classNames, className, style, styles, vars, ...others } = props;
16569
+ const { classNames: classNames2, className, style, styles, vars, ...others } = props;
16553
16570
  const ctx = useDrawerContext();
16554
16571
  return /* @__PURE__ */ jsx(
16555
16572
  ModalBaseBody,
16556
16573
  {
16557
16574
  ref,
16558
- ...ctx.getStyles("body", { classNames, style, styles, className }),
16575
+ ...ctx.getStyles("body", { classNames: classNames2, style, styles, className }),
16559
16576
  ...others
16560
16577
  }
16561
16578
  );
@@ -16564,13 +16581,13 @@ DrawerBody.classes = classes$l;
16564
16581
  DrawerBody.displayName = "@mantine/core/DrawerBody";
16565
16582
  const DrawerCloseButton = factory((_props, ref) => {
16566
16583
  const props = useProps("DrawerCloseButton", null, _props);
16567
- const { classNames, className, style, styles, vars, ...others } = props;
16584
+ const { classNames: classNames2, className, style, styles, vars, ...others } = props;
16568
16585
  const ctx = useDrawerContext();
16569
16586
  return /* @__PURE__ */ jsx(
16570
16587
  ModalBaseCloseButton,
16571
16588
  {
16572
16589
  ref,
16573
- ...ctx.getStyles("close", { classNames, style, styles, className }),
16590
+ ...ctx.getStyles("close", { classNames: classNames2, style, styles, className }),
16574
16591
  ...others
16575
16592
  }
16576
16593
  );
@@ -16579,14 +16596,14 @@ DrawerCloseButton.classes = classes$l;
16579
16596
  DrawerCloseButton.displayName = "@mantine/core/DrawerCloseButton";
16580
16597
  const DrawerContent = factory((_props, ref) => {
16581
16598
  const props = useProps("DrawerContent", null, _props);
16582
- const { classNames, className, style, styles, vars, children, radius, __hidden, ...others } = props;
16599
+ const { classNames: classNames2, className, style, styles, vars, children, radius, __hidden, ...others } = props;
16583
16600
  const ctx = useDrawerContext();
16584
16601
  const Scroll = ctx.scrollAreaComponent || NativeScrollArea;
16585
16602
  return /* @__PURE__ */ jsx(
16586
16603
  ModalBaseContent,
16587
16604
  {
16588
- ...ctx.getStyles("content", { className, style, styles, classNames }),
16589
- innerProps: ctx.getStyles("inner", { className, style, styles, classNames }),
16605
+ ...ctx.getStyles("content", { className, style, styles, classNames: classNames2 }),
16606
+ innerProps: ctx.getStyles("inner", { className, style, styles, classNames: classNames2 }),
16590
16607
  ref,
16591
16608
  ...others,
16592
16609
  radius: radius || ctx.radius || 0,
@@ -16599,13 +16616,13 @@ DrawerContent.classes = classes$l;
16599
16616
  DrawerContent.displayName = "@mantine/core/DrawerContent";
16600
16617
  const DrawerHeader = factory((_props, ref) => {
16601
16618
  const props = useProps("DrawerHeader", null, _props);
16602
- const { classNames, className, style, styles, vars, ...others } = props;
16619
+ const { classNames: classNames2, className, style, styles, vars, ...others } = props;
16603
16620
  const ctx = useDrawerContext();
16604
16621
  return /* @__PURE__ */ jsx(
16605
16622
  ModalBaseHeader,
16606
16623
  {
16607
16624
  ref,
16608
- ...ctx.getStyles("header", { classNames, style, styles, className }),
16625
+ ...ctx.getStyles("header", { classNames: classNames2, style, styles, className }),
16609
16626
  ...others
16610
16627
  }
16611
16628
  );
@@ -16614,13 +16631,13 @@ DrawerHeader.classes = classes$l;
16614
16631
  DrawerHeader.displayName = "@mantine/core/DrawerHeader";
16615
16632
  const DrawerOverlay = factory((_props, ref) => {
16616
16633
  const props = useProps("DrawerOverlay", null, _props);
16617
- const { classNames, className, style, styles, vars, ...others } = props;
16634
+ const { classNames: classNames2, className, style, styles, vars, ...others } = props;
16618
16635
  const ctx = useDrawerContext();
16619
16636
  return /* @__PURE__ */ jsx(
16620
16637
  ModalBaseOverlay,
16621
16638
  {
16622
16639
  ref,
16623
- ...ctx.getStyles("overlay", { classNames, style, styles, className }),
16640
+ ...ctx.getStyles("overlay", { classNames: classNames2, style, styles, className }),
16624
16641
  ...others
16625
16642
  }
16626
16643
  );
@@ -16679,7 +16696,7 @@ const varsResolver$l = createVarsResolver((_, { position, size: size2, offset: o
16679
16696
  const DrawerRoot = factory((_props, ref) => {
16680
16697
  const props = useProps("DrawerRoot", defaultProps$v, _props);
16681
16698
  const {
16682
- classNames,
16699
+ classNames: classNames2,
16683
16700
  className,
16684
16701
  style,
16685
16702
  styles,
@@ -16699,7 +16716,7 @@ const DrawerRoot = factory((_props, ref) => {
16699
16716
  props,
16700
16717
  className,
16701
16718
  style,
16702
- classNames,
16719
+ classNames: classNames2,
16703
16720
  styles,
16704
16721
  unstyled,
16705
16722
  attributes,
@@ -16748,13 +16765,13 @@ function DrawerStack({ children }) {
16748
16765
  DrawerStack.displayName = "@mantine/core/DrawerStack";
16749
16766
  const DrawerTitle = factory((_props, ref) => {
16750
16767
  const props = useProps("DrawerTitle", null, _props);
16751
- const { classNames, className, style, styles, vars, ...others } = props;
16768
+ const { classNames: classNames2, className, style, styles, vars, ...others } = props;
16752
16769
  const ctx = useDrawerContext();
16753
16770
  return /* @__PURE__ */ jsx(
16754
16771
  ModalBaseTitle,
16755
16772
  {
16756
16773
  ref,
16757
- ...ctx.getStyles("title", { classNames, style, styles, className }),
16774
+ ...ctx.getStyles("title", { classNames: classNames2, style, styles, className }),
16758
16775
  ...others
16759
16776
  }
16760
16777
  );
@@ -16927,7 +16944,7 @@ const defaultProps$t = {
16927
16944
  };
16928
16945
  const GridCol = factory((_props, ref) => {
16929
16946
  const props = useProps("GridCol", defaultProps$t, _props);
16930
- const { classNames, className, style, styles, vars, span, order, offset: offset2, ...others } = props;
16947
+ const { classNames: classNames2, className, style, styles, vars, span, order, offset: offset2, ...others } = props;
16931
16948
  const ctx = useGridContext();
16932
16949
  const responsiveClassName = useRandomClassName();
16933
16950
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
@@ -16947,7 +16964,7 @@ const GridCol = factory((_props, ref) => {
16947
16964
  ...ctx.getStyles("col", {
16948
16965
  className: clsx(className, responsiveClassName),
16949
16966
  style,
16950
- classNames,
16967
+ classNames: classNames2,
16951
16968
  styles
16952
16969
  }),
16953
16970
  ...others
@@ -17007,7 +17024,7 @@ const varsResolver$k = createVarsResolver((_, { justify, align, overflow }) => (
17007
17024
  const Grid = factory((_props, ref) => {
17008
17025
  const props = useProps("Grid", defaultProps$s, _props);
17009
17026
  const {
17010
- classNames,
17027
+ classNames: classNames2,
17011
17028
  className,
17012
17029
  style,
17013
17030
  styles,
@@ -17030,7 +17047,7 @@ const Grid = factory((_props, ref) => {
17030
17047
  props,
17031
17048
  className,
17032
17049
  style,
17033
- classNames,
17050
+ classNames: classNames2,
17034
17051
  styles,
17035
17052
  unstyled,
17036
17053
  attributes,
@@ -17057,7 +17074,7 @@ const [MenuContextProvider, useMenuContext] = createSafeContext(
17057
17074
  );
17058
17075
  var classes$j = { "dropdown": "m_dc9b7c9f", "label": "m_9bfac126", "divider": "m_efdf90cb", "item": "m_99ac2aa1", "itemLabel": "m_5476e0d3", "itemSection": "m_8b75e504", "chevron": "m_b85b0bed" };
17059
17076
  const MenuDivider = factory((props, ref) => {
17060
- const { classNames, className, style, styles, vars, ...others } = useProps(
17077
+ const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
17061
17078
  "MenuDivider",
17062
17079
  null,
17063
17080
  props
@@ -17067,7 +17084,7 @@ const MenuDivider = factory((props, ref) => {
17067
17084
  Box,
17068
17085
  {
17069
17086
  ref,
17070
- ...ctx.getStyles("divider", { className, style, styles, classNames }),
17087
+ ...ctx.getStyles("divider", { className, style, styles, classNames: classNames2 }),
17071
17088
  ...others
17072
17089
  }
17073
17090
  );
@@ -17076,7 +17093,7 @@ MenuDivider.classes = classes$j;
17076
17093
  MenuDivider.displayName = "@mantine/core/MenuDivider";
17077
17094
  const MenuDropdown = factory((props, ref) => {
17078
17095
  const {
17079
- classNames,
17096
+ classNames: classNames2,
17080
17097
  className,
17081
17098
  style,
17082
17099
  styles,
@@ -17116,7 +17133,7 @@ const MenuDropdown = factory((props, ref) => {
17116
17133
  className,
17117
17134
  style,
17118
17135
  styles,
17119
- classNames,
17136
+ classNames: classNames2,
17120
17137
  withStaticClass: false
17121
17138
  }),
17122
17139
  tabIndex: -1,
@@ -17134,7 +17151,7 @@ MenuDropdown.displayName = "@mantine/core/MenuDropdown";
17134
17151
  const [SubMenuProvider, useSubMenuContext] = createOptionalContext();
17135
17152
  const MenuItem = polymorphicFactory((props, ref) => {
17136
17153
  const {
17137
- classNames,
17154
+ classNames: classNames2,
17138
17155
  className,
17139
17156
  style,
17140
17157
  styles,
@@ -17179,7 +17196,7 @@ const MenuItem = polymorphicFactory((props, ref) => {
17179
17196
  ...others,
17180
17197
  unstyled: ctx.unstyled,
17181
17198
  tabIndex: ctx.menuItemTabIndex,
17182
- ...ctx.getStyles("item", { className, style, styles, classNames }),
17199
+ ...ctx.getStyles("item", { className, style, styles, classNames: classNames2 }),
17183
17200
  ref: useMergedRef(itemRef, ref),
17184
17201
  role: "menuitem",
17185
17202
  disabled,
@@ -17201,9 +17218,9 @@ const MenuItem = polymorphicFactory((props, ref) => {
17201
17218
  "--menu-item-hover": colors2?.hover
17202
17219
  },
17203
17220
  children: [
17204
- leftSection && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames }), "data-position": "left", children: leftSection }),
17205
- children && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemLabel", { styles, classNames }), children }),
17206
- rightSection && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames }), "data-position": "right", children: rightSection })
17221
+ leftSection && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames: classNames2 }), "data-position": "left", children: leftSection }),
17222
+ children && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemLabel", { styles, classNames: classNames2 }), children }),
17223
+ rightSection && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames: classNames2 }), "data-position": "right", children: rightSection })
17207
17224
  ]
17208
17225
  }
17209
17226
  );
@@ -17211,7 +17228,7 @@ const MenuItem = polymorphicFactory((props, ref) => {
17211
17228
  MenuItem.classes = classes$j;
17212
17229
  MenuItem.displayName = "@mantine/core/MenuItem";
17213
17230
  const MenuLabel = factory((props, ref) => {
17214
- const { classNames, className, style, styles, vars, ...others } = useProps(
17231
+ const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
17215
17232
  "MenuLabel",
17216
17233
  null,
17217
17234
  props
@@ -17221,7 +17238,7 @@ const MenuLabel = factory((props, ref) => {
17221
17238
  Box,
17222
17239
  {
17223
17240
  ref,
17224
- ...ctx.getStyles("label", { className, style, styles, classNames }),
17241
+ ...ctx.getStyles("label", { className, style, styles, classNames: classNames2 }),
17225
17242
  ...others
17226
17243
  }
17227
17244
  );
@@ -17230,7 +17247,7 @@ MenuLabel.classes = classes$j;
17230
17247
  MenuLabel.displayName = "@mantine/core/MenuLabel";
17231
17248
  const MenuSubDropdown = factory((props, ref) => {
17232
17249
  const {
17233
- classNames,
17250
+ classNames: classNames2,
17234
17251
  className,
17235
17252
  style,
17236
17253
  styles,
@@ -17259,7 +17276,7 @@ const MenuSubDropdown = factory((props, ref) => {
17259
17276
  className,
17260
17277
  style,
17261
17278
  styles,
17262
- classNames,
17279
+ classNames: classNames2,
17263
17280
  withStaticClass: false
17264
17281
  }),
17265
17282
  tabIndex: -1,
@@ -17272,7 +17289,7 @@ MenuSubDropdown.classes = classes$j;
17272
17289
  MenuSubDropdown.displayName = "@mantine/core/MenuSubDropdown";
17273
17290
  const MenuSubItem = polymorphicFactory((props, ref) => {
17274
17291
  const {
17275
- classNames,
17292
+ classNames: classNames2,
17276
17293
  className,
17277
17294
  style,
17278
17295
  styles,
@@ -17318,7 +17335,7 @@ const MenuSubItem = polymorphicFactory((props, ref) => {
17318
17335
  ...others,
17319
17336
  unstyled: ctx.unstyled,
17320
17337
  tabIndex: ctx.menuItemTabIndex,
17321
- ...ctx.getStyles("item", { className, style, styles, classNames }),
17338
+ ...ctx.getStyles("item", { className, style, styles, classNames: classNames2 }),
17322
17339
  ref: useMergedRef(itemRef, ref),
17323
17340
  role: "menuitem",
17324
17341
  disabled,
@@ -17343,9 +17360,9 @@ const MenuSubItem = polymorphicFactory((props, ref) => {
17343
17360
  "--menu-item-hover": colors2?.hover
17344
17361
  },
17345
17362
  children: [
17346
- leftSection && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames }), "data-position": "left", children: leftSection }),
17347
- children && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemLabel", { styles, classNames }), children }),
17348
- /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames }), "data-position": "right", children: rightSection || /* @__PURE__ */ jsx(AccordionChevron, { ...ctx.getStyles("chevron"), size: 14 }) })
17363
+ leftSection && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames: classNames2 }), "data-position": "left", children: leftSection }),
17364
+ children && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemLabel", { styles, classNames: classNames2 }), children }),
17365
+ /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames: classNames2 }), "data-position": "right", children: rightSection || /* @__PURE__ */ jsx(AccordionChevron, { ...ctx.getStyles("chevron"), size: 14 }) })
17349
17366
  ]
17350
17367
  }
17351
17368
  );
@@ -17480,7 +17497,7 @@ function Menu$1(_props) {
17480
17497
  trigger,
17481
17498
  openDelay,
17482
17499
  closeDelay,
17483
- classNames,
17500
+ classNames: classNames2,
17484
17501
  styles,
17485
17502
  unstyled,
17486
17503
  variant,
@@ -17495,7 +17512,7 @@ function Menu$1(_props) {
17495
17512
  name: "Menu",
17496
17513
  classes: classes$j,
17497
17514
  props,
17498
- classNames,
17515
+ classNames: classNames2,
17499
17516
  styles,
17500
17517
  unstyled,
17501
17518
  attributes
@@ -17522,7 +17539,7 @@ function Menu$1(_props) {
17522
17539
  const { openDropdown, closeDropdown } = useDelayedHover({ open, close, closeDelay, openDelay });
17523
17540
  const getItemIndex = (node) => getContextItemIndex("[data-menu-item]", "[data-menu-dropdown]", node);
17524
17541
  const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
17525
- classNames,
17542
+ classNames: classNames2,
17526
17543
  styles,
17527
17544
  props
17528
17545
  });
@@ -17584,13 +17601,13 @@ const [ModalProvider, useModalContext] = createSafeContext(
17584
17601
  );
17585
17602
  const ModalBody = factory((_props, ref) => {
17586
17603
  const props = useProps("ModalBody", null, _props);
17587
- const { classNames, className, style, styles, vars, ...others } = props;
17604
+ const { classNames: classNames2, className, style, styles, vars, ...others } = props;
17588
17605
  const ctx = useModalContext();
17589
17606
  return /* @__PURE__ */ jsx(
17590
17607
  ModalBaseBody,
17591
17608
  {
17592
17609
  ref,
17593
- ...ctx.getStyles("body", { classNames, style, styles, className }),
17610
+ ...ctx.getStyles("body", { classNames: classNames2, style, styles, className }),
17594
17611
  ...others
17595
17612
  }
17596
17613
  );
@@ -17599,13 +17616,13 @@ ModalBody.classes = classes$i;
17599
17616
  ModalBody.displayName = "@mantine/core/ModalBody";
17600
17617
  const ModalCloseButton = factory((_props, ref) => {
17601
17618
  const props = useProps("ModalCloseButton", null, _props);
17602
- const { classNames, className, style, styles, vars, ...others } = props;
17619
+ const { classNames: classNames2, className, style, styles, vars, ...others } = props;
17603
17620
  const ctx = useModalContext();
17604
17621
  return /* @__PURE__ */ jsx(
17605
17622
  ModalBaseCloseButton,
17606
17623
  {
17607
17624
  ref,
17608
- ...ctx.getStyles("close", { classNames, style, styles, className }),
17625
+ ...ctx.getStyles("close", { classNames: classNames2, style, styles, className }),
17609
17626
  ...others
17610
17627
  }
17611
17628
  );
@@ -17614,14 +17631,14 @@ ModalCloseButton.classes = classes$i;
17614
17631
  ModalCloseButton.displayName = "@mantine/core/ModalCloseButton";
17615
17632
  const ModalContent = factory((_props, ref) => {
17616
17633
  const props = useProps("ModalContent", null, _props);
17617
- const { classNames, className, style, styles, vars, children, __hidden, ...others } = props;
17634
+ const { classNames: classNames2, className, style, styles, vars, children, __hidden, ...others } = props;
17618
17635
  const ctx = useModalContext();
17619
17636
  const Scroll = ctx.scrollAreaComponent || NativeScrollArea;
17620
17637
  return /* @__PURE__ */ jsx(
17621
17638
  ModalBaseContent,
17622
17639
  {
17623
- ...ctx.getStyles("content", { className, style, styles, classNames }),
17624
- innerProps: ctx.getStyles("inner", { className, style, styles, classNames }),
17640
+ ...ctx.getStyles("content", { className, style, styles, classNames: classNames2 }),
17641
+ innerProps: ctx.getStyles("inner", { className, style, styles, classNames: classNames2 }),
17625
17642
  "data-full-screen": ctx.fullScreen || void 0,
17626
17643
  "data-modal-content": true,
17627
17644
  "data-hidden": __hidden || void 0,
@@ -17643,13 +17660,13 @@ ModalContent.classes = classes$i;
17643
17660
  ModalContent.displayName = "@mantine/core/ModalContent";
17644
17661
  const ModalHeader = factory((_props, ref) => {
17645
17662
  const props = useProps("ModalHeader", null, _props);
17646
- const { classNames, className, style, styles, vars, ...others } = props;
17663
+ const { classNames: classNames2, className, style, styles, vars, ...others } = props;
17647
17664
  const ctx = useModalContext();
17648
17665
  return /* @__PURE__ */ jsx(
17649
17666
  ModalBaseHeader,
17650
17667
  {
17651
17668
  ref,
17652
- ...ctx.getStyles("header", { classNames, style, styles, className }),
17669
+ ...ctx.getStyles("header", { classNames: classNames2, style, styles, className }),
17653
17670
  ...others
17654
17671
  }
17655
17672
  );
@@ -17658,13 +17675,13 @@ ModalHeader.classes = classes$i;
17658
17675
  ModalHeader.displayName = "@mantine/core/ModalHeader";
17659
17676
  const ModalOverlay = factory((_props, ref) => {
17660
17677
  const props = useProps("ModalOverlay", null, _props);
17661
- const { classNames, className, style, styles, vars, ...others } = props;
17678
+ const { classNames: classNames2, className, style, styles, vars, ...others } = props;
17662
17679
  const ctx = useModalContext();
17663
17680
  return /* @__PURE__ */ jsx(
17664
17681
  ModalBaseOverlay,
17665
17682
  {
17666
17683
  ref,
17667
- ...ctx.getStyles("overlay", { classNames, style, styles, className }),
17684
+ ...ctx.getStyles("overlay", { classNames: classNames2, style, styles, className }),
17668
17685
  ...others
17669
17686
  }
17670
17687
  );
@@ -17697,7 +17714,7 @@ const varsResolver$j = createVarsResolver(
17697
17714
  const ModalRoot = factory((_props, ref) => {
17698
17715
  const props = useProps("ModalRoot", defaultProps$o, _props);
17699
17716
  const {
17700
- classNames,
17717
+ classNames: classNames2,
17701
17718
  className,
17702
17719
  style,
17703
17720
  styles,
@@ -17719,7 +17736,7 @@ const ModalRoot = factory((_props, ref) => {
17719
17736
  props,
17720
17737
  className,
17721
17738
  style,
17722
- classNames,
17739
+ classNames: classNames2,
17723
17740
  styles,
17724
17741
  unstyled,
17725
17742
  attributes,
@@ -17768,13 +17785,13 @@ function ModalStack({ children }) {
17768
17785
  ModalStack.displayName = "@mantine/core/ModalStack";
17769
17786
  const ModalTitle = factory((_props, ref) => {
17770
17787
  const props = useProps("ModalTitle", null, _props);
17771
- const { classNames, className, style, styles, vars, ...others } = props;
17788
+ const { classNames: classNames2, className, style, styles, vars, ...others } = props;
17772
17789
  const ctx = useModalContext();
17773
17790
  return /* @__PURE__ */ jsx(
17774
17791
  ModalBaseTitle,
17775
17792
  {
17776
17793
  ref,
17777
- ...ctx.getStyles("title", { classNames, style, styles, className }),
17794
+ ...ctx.getStyles("title", { classNames: classNames2, style, styles, className }),
17778
17795
  ...others
17779
17796
  }
17780
17797
  );
@@ -17891,7 +17908,7 @@ const varsResolver$i = createVarsResolver(
17891
17908
  const NavLink = polymorphicFactory((_props, ref) => {
17892
17909
  const props = useProps("NavLink", null, _props);
17893
17910
  const {
17894
- classNames,
17911
+ classNames: classNames2,
17895
17912
  className,
17896
17913
  style,
17897
17914
  styles,
@@ -17923,7 +17940,7 @@ const NavLink = polymorphicFactory((_props, ref) => {
17923
17940
  classes: classes$h,
17924
17941
  className,
17925
17942
  style,
17926
- classNames,
17943
+ classNames: classNames2,
17927
17944
  styles,
17928
17945
  unstyled,
17929
17946
  attributes,
@@ -18009,7 +18026,7 @@ const Notification = factory((_props, ref) => {
18009
18026
  children,
18010
18027
  onClose,
18011
18028
  closeButtonProps,
18012
- classNames,
18029
+ classNames: classNames2,
18013
18030
  style,
18014
18031
  styles,
18015
18032
  unstyled,
@@ -18026,7 +18043,7 @@ const Notification = factory((_props, ref) => {
18026
18043
  props,
18027
18044
  className,
18028
18045
  style,
18029
- classNames,
18046
+ classNames: classNames2,
18030
18047
  styles,
18031
18048
  unstyled,
18032
18049
  attributes,
@@ -18043,7 +18060,7 @@ const Notification = factory((_props, ref) => {
18043
18060
  ...others,
18044
18061
  children: [
18045
18062
  icon && !loading && /* @__PURE__ */ jsx("div", { ...getStyles2("icon"), children: icon }),
18046
- loading && /* @__PURE__ */ jsx(Loader, { size: 28, color, ...loaderProps, ...getStyles2("loader") }),
18063
+ loading && /* @__PURE__ */ jsx(Loader$1, { size: 28, color, ...loaderProps, ...getStyles2("loader") }),
18047
18064
  /* @__PURE__ */ jsxs("div", { ...getStyles2("body"), children: [
18048
18065
  title && /* @__PURE__ */ jsx("div", { ...getStyles2("title"), children: title }),
18049
18066
  /* @__PURE__ */ jsx(Box, { ...getStyles2("description"), mod: { "data-with-title": !!title }, children })
@@ -18276,7 +18293,7 @@ var findChangedRangeFromCaretPositions = function(lastCaretPositions, currentCar
18276
18293
  to: { start: startPosition, end: currentCaretPosition }
18277
18294
  };
18278
18295
  };
18279
- function clamp(num, min2, max2) {
18296
+ function clamp$1(num, min2, max2) {
18280
18297
  return Math.min(Math.max(num, min2), max2);
18281
18298
  }
18282
18299
  function geInputCaretPosition(el) {
@@ -18354,7 +18371,7 @@ function getCaretPosition(newFormattedValue, lastFormattedValue, curValue, curCa
18354
18371
  }
18355
18372
  function getCaretPosInBoundary(value, caretPos, boundary, direction) {
18356
18373
  var valLn = value.length;
18357
- caretPos = clamp(caretPos, 0, valLn);
18374
+ caretPos = clamp$1(caretPos, 0, valLn);
18358
18375
  if (direction === "left") {
18359
18376
  while (caretPos >= 0 && !boundary[caretPos]) {
18360
18377
  caretPos--;
@@ -19153,7 +19170,7 @@ function clampAndSanitizeInput(sanitizedValue, max2, min2) {
19153
19170
  if (parsedValue > Number.MAX_SAFE_INTEGER) {
19154
19171
  return max2 !== void 0 ? max2 : replaced;
19155
19172
  }
19156
- const clamped = clamp$3(parsedValue, min2, max2);
19173
+ const clamped = clamp$4(parsedValue, min2, max2);
19157
19174
  if (hasTrailingDecimalSeparator) {
19158
19175
  const clampedString = clamped.toString().replace(/^0+(?=\d)/, "");
19159
19176
  return `${clampedString}.`;
@@ -19164,7 +19181,7 @@ const NumberInput = factory((_props, ref) => {
19164
19181
  const props = useProps("NumberInput", defaultProps$l, _props);
19165
19182
  const {
19166
19183
  className,
19167
- classNames,
19184
+ classNames: classNames2,
19168
19185
  styles,
19169
19186
  unstyled,
19170
19187
  vars,
@@ -19205,7 +19222,7 @@ const NumberInput = factory((_props, ref) => {
19205
19222
  name: "NumberInput",
19206
19223
  classes: classes$f,
19207
19224
  props,
19208
- classNames,
19225
+ classNames: classNames2,
19209
19226
  styles,
19210
19227
  unstyled,
19211
19228
  attributes,
@@ -19213,7 +19230,7 @@ const NumberInput = factory((_props, ref) => {
19213
19230
  varsResolver: varsResolver$g
19214
19231
  });
19215
19232
  const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
19216
- classNames,
19233
+ classNames: classNames2,
19217
19234
  styles,
19218
19235
  props
19219
19236
  });
@@ -19258,7 +19275,7 @@ const NumberInput = factory((_props, ref) => {
19258
19275
  const maxPrecision = Math.max(currentValuePrecision, stepPrecision);
19259
19276
  const factor = 10 ** maxPrecision;
19260
19277
  if (!isNumberString(_value) && (typeof _value !== "number" || Number.isNaN(_value))) {
19261
- val = clamp$3(startValue, min2, max2);
19278
+ val = clamp$4(startValue, min2, max2);
19262
19279
  } else if (max2 !== void 0) {
19263
19280
  const incrementedValue = (Math.round(Number(_value) * factor) + Math.round(step * factor)) / factor;
19264
19281
  val = incrementedValue <= max2 ? incrementedValue : max2;
@@ -19285,7 +19302,7 @@ const NumberInput = factory((_props, ref) => {
19285
19302
  const maxPrecision = Math.max(currentValuePrecision, stepPrecision);
19286
19303
  const factor = 10 ** maxPrecision;
19287
19304
  if (!isNumberString(_value) && typeof _value !== "number" || Number.isNaN(_value)) {
19288
- val = clamp$3(startValue, minValue, max2);
19305
+ val = clamp$4(startValue, minValue, max2);
19289
19306
  } else {
19290
19307
  const decrementedValue = (Math.round(Number(_value) * factor) - Math.round(step * factor)) / factor;
19291
19308
  val = minValue !== void 0 && decrementedValue < minValue ? minValue : decrementedValue;
@@ -19325,7 +19342,7 @@ const NumberInput = factory((_props, ref) => {
19325
19342
  const handleBlur = (event) => {
19326
19343
  let sanitizedValue = _value;
19327
19344
  if (clampBehavior === "blur" && typeof sanitizedValue === "number") {
19328
- sanitizedValue = clamp$3(sanitizedValue, min2, max2);
19345
+ sanitizedValue = clamp$4(sanitizedValue, min2, max2);
19329
19346
  }
19330
19347
  if (trimLeadingZeroesOnBlur && typeof sanitizedValue === "string" && getDecimalPlaces2(sanitizedValue) < 15) {
19331
19348
  sanitizedValue = clampAndSanitizeInput(sanitizedValue, max2, min2);
@@ -19454,7 +19471,7 @@ const defaultProps$k = {
19454
19471
  const PaginationControl = factory((_props, ref) => {
19455
19472
  const props = useProps("PaginationControl", defaultProps$k, _props);
19456
19473
  const {
19457
- classNames,
19474
+ classNames: classNames2,
19458
19475
  className,
19459
19476
  style,
19460
19477
  styles,
@@ -19473,7 +19490,7 @@ const PaginationControl = factory((_props, ref) => {
19473
19490
  ref,
19474
19491
  disabled: _disabled,
19475
19492
  mod: [{ active, disabled: _disabled, "with-padding": withPadding }, mod],
19476
- ...ctx.getStyles("control", { className, style, classNames, styles, active: !_disabled }),
19493
+ ...ctx.getStyles("control", { className, style, classNames: classNames2, styles, active: !_disabled }),
19477
19494
  ...others
19478
19495
  }
19479
19496
  );
@@ -19536,9 +19553,9 @@ const defaultProps$j = {
19536
19553
  };
19537
19554
  const PaginationDots = factory((_props, ref) => {
19538
19555
  const props = useProps("PaginationDots", defaultProps$j, _props);
19539
- const { classNames, className, style, styles, vars, icon: Icon, ...others } = props;
19556
+ const { classNames: classNames2, className, style, styles, vars, icon: Icon, ...others } = props;
19540
19557
  const ctx = usePaginationContext();
19541
- return /* @__PURE__ */ jsx(Box, { ref, ...ctx.getStyles("dots", { className, style, styles, classNames }), ...others, children: /* @__PURE__ */ jsx(
19558
+ return /* @__PURE__ */ jsx(Box, { ref, ...ctx.getStyles("dots", { className, style, styles, classNames: classNames2 }), ...others, children: /* @__PURE__ */ jsx(
19542
19559
  Icon,
19543
19560
  {
19544
19561
  style: {
@@ -19644,7 +19661,7 @@ const varsResolver$f = createVarsResolver(
19644
19661
  const PaginationRoot = factory((_props, ref) => {
19645
19662
  const props = useProps("PaginationRoot", defaultProps$i, _props);
19646
19663
  const {
19647
- classNames,
19664
+ classNames: classNames2,
19648
19665
  className,
19649
19666
  style,
19650
19667
  styles,
@@ -19674,7 +19691,7 @@ const PaginationRoot = factory((_props, ref) => {
19674
19691
  props,
19675
19692
  className,
19676
19693
  style,
19677
- classNames,
19694
+ classNames: classNames2,
19678
19695
  styles,
19679
19696
  unstyled,
19680
19697
  attributes,
@@ -19793,7 +19810,7 @@ const varsResolver$e = createVarsResolver((_, { size: size2 }) => ({
19793
19810
  const PasswordInput$1 = factory((_props, ref) => {
19794
19811
  const props = useProps("PasswordInput", defaultProps$g, _props);
19795
19812
  const {
19796
- classNames,
19813
+ classNames: classNames2,
19797
19814
  className,
19798
19815
  style,
19799
19816
  styles,
@@ -19847,7 +19864,7 @@ const PasswordInput$1 = factory((_props, ref) => {
19847
19864
  props,
19848
19865
  className,
19849
19866
  style,
19850
- classNames,
19867
+ classNames: classNames2,
19851
19868
  styles,
19852
19869
  unstyled,
19853
19870
  attributes,
@@ -19855,7 +19872,7 @@ const PasswordInput$1 = factory((_props, ref) => {
19855
19872
  varsResolver: varsResolver$e
19856
19873
  });
19857
19874
  const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
19858
- classNames,
19875
+ classNames: classNames2,
19859
19876
  styles,
19860
19877
  props
19861
19878
  });
@@ -20015,7 +20032,7 @@ const PinInput = factory((props, ref) => {
20015
20032
  gap,
20016
20033
  style,
20017
20034
  size: size2,
20018
- classNames,
20035
+ classNames: classNames2,
20019
20036
  styles,
20020
20037
  unstyled,
20021
20038
  length,
@@ -20049,7 +20066,7 @@ const PinInput = factory((props, ref) => {
20049
20066
  props,
20050
20067
  className,
20051
20068
  style,
20052
- classNames,
20069
+ classNames: classNames2,
20053
20070
  styles,
20054
20071
  unstyled,
20055
20072
  attributes,
@@ -20057,7 +20074,7 @@ const PinInput = factory((props, ref) => {
20057
20074
  varsResolver: varsResolver$d
20058
20075
  });
20059
20076
  const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
20060
- classNames,
20077
+ classNames: classNames2,
20061
20078
  styles,
20062
20079
  props
20063
20080
  });
@@ -20256,7 +20273,7 @@ const [ProgressProvider, useProgressContext] = createSafeContext(
20256
20273
  "Progress.Root component was not found in tree"
20257
20274
  );
20258
20275
  const ProgressLabel = factory((props, ref) => {
20259
- const { classNames, className, style, styles, vars, ...others } = useProps(
20276
+ const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
20260
20277
  "ProgressLabel",
20261
20278
  null,
20262
20279
  props
@@ -20266,7 +20283,7 @@ const ProgressLabel = factory((props, ref) => {
20266
20283
  Box,
20267
20284
  {
20268
20285
  ref,
20269
- ...ctx.getStyles("label", { className, style, classNames, styles }),
20286
+ ...ctx.getStyles("label", { className, style, classNames: classNames2, styles }),
20270
20287
  ...others
20271
20288
  }
20272
20289
  );
@@ -20285,7 +20302,7 @@ const varsResolver$c = createVarsResolver(
20285
20302
  const ProgressRoot = factory((_props, ref) => {
20286
20303
  const props = useProps("ProgressRoot", null, _props);
20287
20304
  const {
20288
- classNames,
20305
+ classNames: classNames2,
20289
20306
  className,
20290
20307
  style,
20291
20308
  styles,
@@ -20304,7 +20321,7 @@ const ProgressRoot = factory((_props, ref) => {
20304
20321
  props,
20305
20322
  className,
20306
20323
  style,
20307
- classNames,
20324
+ classNames: classNames2,
20308
20325
  styles,
20309
20326
  unstyled,
20310
20327
  attributes,
@@ -20320,7 +20337,7 @@ const defaultProps$e = {
20320
20337
  };
20321
20338
  const ProgressSection = factory((props, ref) => {
20322
20339
  const {
20323
- classNames,
20340
+ classNames: classNames2,
20324
20341
  className,
20325
20342
  style,
20326
20343
  styles,
@@ -20346,7 +20363,7 @@ const ProgressSection = factory((props, ref) => {
20346
20363
  Box,
20347
20364
  {
20348
20365
  ref,
20349
- ...ctx.getStyles("section", { className, classNames, styles, style }),
20366
+ ...ctx.getStyles("section", { className, classNames: classNames2, styles, style }),
20350
20367
  ...others,
20351
20368
  ...ariaAttributes,
20352
20369
  mod: [{ striped: striped || animated, animated }, mod],
@@ -20364,7 +20381,7 @@ const Progress = factory((_props, ref) => {
20364
20381
  const props = useProps("Progress", null, _props);
20365
20382
  const {
20366
20383
  value,
20367
- classNames,
20384
+ classNames: classNames2,
20368
20385
  styles,
20369
20386
  vars,
20370
20387
  color,
@@ -20374,7 +20391,7 @@ const Progress = factory((_props, ref) => {
20374
20391
  ...others
20375
20392
  } = props;
20376
20393
  const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
20377
- classNames,
20394
+ classNames: classNames2,
20378
20395
  styles,
20379
20396
  props
20380
20397
  });
@@ -20491,7 +20508,7 @@ const TooltipFloating = factory((_props, ref) => {
20491
20508
  withinPortal,
20492
20509
  style,
20493
20510
  className,
20494
- classNames,
20511
+ classNames: classNames2,
20495
20512
  styles,
20496
20513
  unstyled,
20497
20514
  radius,
@@ -20516,7 +20533,7 @@ const TooltipFloating = factory((_props, ref) => {
20516
20533
  classes: classes$a,
20517
20534
  className,
20518
20535
  style,
20519
- classNames,
20536
+ classNames: classNames2,
20520
20537
  styles,
20521
20538
  unstyled,
20522
20539
  attributes,
@@ -20734,7 +20751,7 @@ const Tooltip$1 = factory((_props, ref) => {
20734
20751
  withinPortal,
20735
20752
  radius,
20736
20753
  color,
20737
- classNames,
20754
+ classNames: classNames2,
20738
20755
  styles,
20739
20756
  unstyled,
20740
20757
  style,
@@ -20799,7 +20816,7 @@ const Tooltip$1 = factory((_props, ref) => {
20799
20816
  classes: classes$a,
20800
20817
  className,
20801
20818
  style,
20802
- classNames,
20819
+ classNames: classNames2,
20803
20820
  styles,
20804
20821
  unstyled,
20805
20822
  attributes,
@@ -20952,7 +20969,7 @@ const varsResolver$9 = createVarsResolver(
20952
20969
  const SegmentedControl = factory((_props, ref) => {
20953
20970
  const props = useProps("SegmentedControl", defaultProps$a, _props);
20954
20971
  const {
20955
- classNames,
20972
+ classNames: classNames2,
20956
20973
  className,
20957
20974
  style,
20958
20975
  styles,
@@ -20985,7 +21002,7 @@ const SegmentedControl = factory((_props, ref) => {
20985
21002
  classes: classes$9,
20986
21003
  className,
20987
21004
  style,
20988
- classNames,
21005
+ classNames: classNames2,
20989
21006
  styles,
20990
21007
  unstyled,
20991
21008
  attributes,
@@ -21107,7 +21124,7 @@ const defaultProps$9 = {
21107
21124
  const Select$1 = factory((_props, ref) => {
21108
21125
  const props = useProps("Select", defaultProps$9, _props);
21109
21126
  const {
21110
- classNames,
21127
+ classNames: classNames2,
21111
21128
  styles,
21112
21129
  unstyled,
21113
21130
  vars,
@@ -21205,7 +21222,7 @@ const Select$1 = factory((_props, ref) => {
21205
21222
  const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
21206
21223
  props,
21207
21224
  styles,
21208
- classNames
21225
+ classNames: classNames2
21209
21226
  });
21210
21227
  useEffect(() => {
21211
21228
  if (selectFirstOptionOnChange) {
@@ -21473,7 +21490,7 @@ const defaultProps$8 = {
21473
21490
  const SimpleGrid = factory((_props, ref) => {
21474
21491
  const props = useProps("SimpleGrid", defaultProps$8, _props);
21475
21492
  const {
21476
- classNames,
21493
+ classNames: classNames2,
21477
21494
  className,
21478
21495
  style,
21479
21496
  styles,
@@ -21492,7 +21509,7 @@ const SimpleGrid = factory((_props, ref) => {
21492
21509
  props,
21493
21510
  className,
21494
21511
  style,
21495
- classNames,
21512
+ classNames: classNames2,
21496
21513
  styles,
21497
21514
  unstyled,
21498
21515
  attributes,
@@ -21529,7 +21546,7 @@ const varsResolver$8 = createVarsResolver(
21529
21546
  const Skeleton$1 = factory((_props, ref) => {
21530
21547
  const props = useProps("Skeleton", defaultProps$7, _props);
21531
21548
  const {
21532
- classNames,
21549
+ classNames: classNames2,
21533
21550
  className,
21534
21551
  style,
21535
21552
  styles,
@@ -21551,7 +21568,7 @@ const Skeleton$1 = factory((_props, ref) => {
21551
21568
  props,
21552
21569
  className,
21553
21570
  style,
21554
- classNames,
21571
+ classNames: classNames2,
21555
21572
  styles,
21556
21573
  unstyled,
21557
21574
  attributes,
@@ -21583,7 +21600,7 @@ const varsResolver$7 = createVarsResolver((_, { gap, align, justify }) => ({
21583
21600
  const Stack = factory((_props, ref) => {
21584
21601
  const props = useProps("Stack", defaultProps$6, _props);
21585
21602
  const {
21586
- classNames,
21603
+ classNames: classNames2,
21587
21604
  className,
21588
21605
  style,
21589
21606
  styles,
@@ -21602,7 +21619,7 @@ const Stack = factory((_props, ref) => {
21602
21619
  classes: classes$6,
21603
21620
  className,
21604
21621
  style,
21605
- classNames,
21622
+ classNames: classNames2,
21606
21623
  styles,
21607
21624
  unstyled,
21608
21625
  attributes,
@@ -21674,7 +21691,7 @@ const varsResolver$6 = createVarsResolver((theme2, { radius, color, size: size2
21674
21691
  const Switch$1 = factory((_props, ref) => {
21675
21692
  const props = useProps("Switch", defaultProps$5, _props);
21676
21693
  const {
21677
- classNames,
21694
+ classNames: classNames2,
21678
21695
  className,
21679
21696
  style,
21680
21697
  styles,
@@ -21711,7 +21728,7 @@ const Switch$1 = factory((_props, ref) => {
21711
21728
  classes: classes$5,
21712
21729
  className,
21713
21730
  style,
21714
- classNames,
21731
+ classNames: classNames2,
21715
21732
  styles,
21716
21733
  unstyled,
21717
21734
  attributes,
@@ -21748,7 +21765,7 @@ const Switch$1 = factory((_props, ref) => {
21748
21765
  disabled: withContextProps.disabled,
21749
21766
  bodyElement: "label",
21750
21767
  labelElement: "span",
21751
- classNames,
21768
+ classNames: classNames2,
21752
21769
  styles,
21753
21770
  unstyled,
21754
21771
  "data-checked": withContextProps.checked,
@@ -21839,7 +21856,7 @@ function tableElement(element, options) {
21839
21856
  const name = `Table${element.charAt(0).toUpperCase()}${element.slice(1)}`;
21840
21857
  const Component = factory((_props, ref) => {
21841
21858
  const props = useProps(name, {}, _props);
21842
- const { classNames, className, style, styles, ...others } = props;
21859
+ const { classNames: classNames2, className, style, styles, ...others } = props;
21843
21860
  const ctx = useTableContext();
21844
21861
  return /* @__PURE__ */ jsx(
21845
21862
  Box,
@@ -21847,7 +21864,7 @@ function tableElement(element, options) {
21847
21864
  component: element,
21848
21865
  ref,
21849
21866
  ...getDataAttributes(ctx, options),
21850
- ...ctx.getStyles(element, { className, classNames, style, styles, props }),
21867
+ ...ctx.getStyles(element, { className, classNames: classNames2, style, styles, props }),
21851
21868
  ...others
21852
21869
  }
21853
21870
  );
@@ -21891,7 +21908,7 @@ const varsResolver$5 = createVarsResolver(
21891
21908
  const TableScrollContainer = factory((_props, ref) => {
21892
21909
  const props = useProps("TableScrollContainer", defaultProps$4, _props);
21893
21910
  const {
21894
- classNames,
21911
+ classNames: classNames2,
21895
21912
  className,
21896
21913
  style,
21897
21914
  styles,
@@ -21911,7 +21928,7 @@ const TableScrollContainer = factory((_props, ref) => {
21911
21928
  props,
21912
21929
  className,
21913
21930
  style,
21914
- classNames,
21931
+ classNames: classNames2,
21915
21932
  styles,
21916
21933
  unstyled,
21917
21934
  attributes,
@@ -21966,7 +21983,7 @@ const varsResolver$4 = createVarsResolver(
21966
21983
  const Table$1 = factory((_props, ref) => {
21967
21984
  const props = useProps("Table", defaultProps$3, _props);
21968
21985
  const {
21969
- classNames,
21986
+ classNames: classNames2,
21970
21987
  className,
21971
21988
  style,
21972
21989
  styles,
@@ -22000,7 +22017,7 @@ const Table$1 = factory((_props, ref) => {
22000
22017
  className,
22001
22018
  style,
22002
22019
  classes: classes$4,
22003
- classNames,
22020
+ classNames: classNames2,
22004
22021
  styles,
22005
22022
  unstyled,
22006
22023
  attributes,
@@ -22052,7 +22069,7 @@ const [TabsProvider, useTabsContext] = createSafeContext(
22052
22069
  var classes$3 = { "root": "m_89d60db1", "list--default": "m_576c9d4", "list": "m_89d33d6d", "tab": "m_4ec4dce6", "panel": "m_b0c91715", "tabSection": "m_fc420b1f", "tabLabel": "m_42bbd1ae", "tab--default": "m_539e827b", "list--outline": "m_6772fbd5", "tab--outline": "m_b59ab47c", "tab--pills": "m_c3381914" };
22053
22070
  const TabsList = factory((_props, ref) => {
22054
22071
  const props = useProps("TabsList", null, _props);
22055
- const { children, className, grow, justify, classNames, styles, style, mod, ...others } = props;
22072
+ const { children, className, grow, justify, classNames: classNames2, styles, style, mod, ...others } = props;
22056
22073
  const ctx = useTabsContext();
22057
22074
  return /* @__PURE__ */ jsx(
22058
22075
  Box,
@@ -22061,7 +22078,7 @@ const TabsList = factory((_props, ref) => {
22061
22078
  ...ctx.getStyles("list", {
22062
22079
  className,
22063
22080
  style,
22064
- classNames,
22081
+ classNames: classNames2,
22065
22082
  styles,
22066
22083
  props,
22067
22084
  variant: ctx.variant
@@ -22088,7 +22105,7 @@ TabsList.classes = classes$3;
22088
22105
  TabsList.displayName = "@mantine/core/TabsList";
22089
22106
  const TabsPanel = factory((_props, ref) => {
22090
22107
  const props = useProps("TabsPanel", null, _props);
22091
- const { children, className, value, classNames, styles, style, mod, keepMounted, ...others } = props;
22108
+ const { children, className, value, classNames: classNames2, styles, style, mod, keepMounted, ...others } = props;
22092
22109
  const ctx = useTabsContext();
22093
22110
  const active = ctx.value === value;
22094
22111
  const content = ctx.keepMounted || keepMounted ? children : active ? children : null;
@@ -22097,7 +22114,7 @@ const TabsPanel = factory((_props, ref) => {
22097
22114
  {
22098
22115
  ...ctx.getStyles("panel", {
22099
22116
  className,
22100
- classNames,
22117
+ classNames: classNames2,
22101
22118
  styles,
22102
22119
  style: [style, !active ? { display: "none" } : void 0],
22103
22120
  props
@@ -22127,7 +22144,7 @@ const TabsTab = factory((_props, ref) => {
22127
22144
  disabled,
22128
22145
  color,
22129
22146
  style,
22130
- classNames,
22147
+ classNames: classNames2,
22131
22148
  styles,
22132
22149
  vars,
22133
22150
  mod,
@@ -22142,7 +22159,7 @@ const TabsTab = factory((_props, ref) => {
22142
22159
  ctx.onChange(ctx.allowTabDeactivation ? value === ctx.value ? null : value : value);
22143
22160
  onClick?.(event);
22144
22161
  };
22145
- const stylesApiProps = { classNames, styles, props };
22162
+ const stylesApiProps = { classNames: classNames2, styles, props };
22146
22163
  return /* @__PURE__ */ jsxs(
22147
22164
  UnstyledButton,
22148
22165
  {
@@ -22222,7 +22239,7 @@ const Tabs$1 = factory((_props, ref) => {
22222
22239
  inverted,
22223
22240
  placement,
22224
22241
  keepMounted,
22225
- classNames,
22242
+ classNames: classNames2,
22226
22243
  styles,
22227
22244
  unstyled,
22228
22245
  className,
@@ -22246,7 +22263,7 @@ const Tabs$1 = factory((_props, ref) => {
22246
22263
  classes: classes$3,
22247
22264
  className,
22248
22265
  style,
22249
- classNames,
22266
+ classNames: classNames2,
22250
22267
  styles,
22251
22268
  unstyled,
22252
22269
  attributes,
@@ -22332,7 +22349,7 @@ const varsResolver$2 = createVarsResolver(
22332
22349
  const ThemeIcon = factory((_props, ref) => {
22333
22350
  const props = useProps("ThemeIcon", null, _props);
22334
22351
  const {
22335
- classNames,
22352
+ classNames: classNames2,
22336
22353
  className,
22337
22354
  style,
22338
22355
  styles,
@@ -22348,7 +22365,7 @@ const ThemeIcon = factory((_props, ref) => {
22348
22365
  props,
22349
22366
  className,
22350
22367
  style,
22351
- classNames,
22368
+ classNames: classNames2,
22352
22369
  styles,
22353
22370
  unstyled,
22354
22371
  attributes,
@@ -22401,7 +22418,7 @@ const varsResolver$1 = createVarsResolver((_, { order, size: size2, lineClamp, t
22401
22418
  const Title = factory((_props, ref) => {
22402
22419
  const props = useProps("Title", defaultProps$1, _props);
22403
22420
  const {
22404
- classNames,
22421
+ classNames: classNames2,
22405
22422
  className,
22406
22423
  style,
22407
22424
  styles,
@@ -22422,7 +22439,7 @@ const Title = factory((_props, ref) => {
22422
22439
  classes: classes$1,
22423
22440
  className,
22424
22441
  style,
22425
- classNames,
22442
+ classNames: classNames2,
22426
22443
  styles,
22427
22444
  unstyled,
22428
22445
  attributes,
@@ -22580,7 +22597,7 @@ const varsResolver = createVarsResolver((_, { zIndex, containerWidth }) => ({
22580
22597
  const Notifications = factory((_props, ref) => {
22581
22598
  const props = useProps("Notifications", defaultProps, _props);
22582
22599
  const {
22583
- classNames,
22600
+ classNames: classNames2,
22584
22601
  className,
22585
22602
  style,
22586
22603
  styles,
@@ -22612,7 +22629,7 @@ const Notifications = factory((_props, ref) => {
22612
22629
  props,
22613
22630
  className,
22614
22631
  style,
22615
- classNames,
22632
+ classNames: classNames2,
22616
22633
  styles,
22617
22634
  unstyled,
22618
22635
  vars,
@@ -26803,6 +26820,9 @@ Checkbox.displayName = "Checkbox";
26803
26820
  function Drawer(props) {
26804
26821
  return /* @__PURE__ */ jsx(Drawer$1, { position: "right", size: "lg", p: "lg", ...props });
26805
26822
  }
26823
+ function Loader(props) {
26824
+ return /* @__PURE__ */ jsx(Loader$1, { ...props });
26825
+ }
26806
26826
  function MenuBase(props) {
26807
26827
  return /* @__PURE__ */ jsx(Menu$1, { shadow: "md", ...props });
26808
26828
  }
@@ -28220,6 +28240,72 @@ function PhoneField({ error: error2, ...rest }) {
28220
28240
  }
28221
28241
  );
28222
28242
  }
28243
+ const US_STATES = [
28244
+ { value: "AL", label: "Alabama" },
28245
+ { value: "AK", label: "Alaska" },
28246
+ { value: "AZ", label: "Arizona" },
28247
+ { value: "AR", label: "Arkansas" },
28248
+ { value: "CA", label: "California" },
28249
+ { value: "CO", label: "Colorado" },
28250
+ { value: "CT", label: "Connecticut" },
28251
+ { value: "DE", label: "Delaware" },
28252
+ { value: "FL", label: "Florida" },
28253
+ { value: "GA", label: "Georgia" },
28254
+ { value: "HI", label: "Hawaii" },
28255
+ { value: "ID", label: "Idaho" },
28256
+ { value: "IL", label: "Illinois" },
28257
+ { value: "IN", label: "Indiana" },
28258
+ { value: "IA", label: "Iowa" },
28259
+ { value: "KS", label: "Kansas" },
28260
+ { value: "KY", label: "Kentucky" },
28261
+ { value: "LA", label: "Louisiana" },
28262
+ { value: "ME", label: "Maine" },
28263
+ { value: "MD", label: "Maryland" },
28264
+ { value: "MA", label: "Massachusetts" },
28265
+ { value: "MI", label: "Michigan" },
28266
+ { value: "MN", label: "Minnesota" },
28267
+ { value: "MS", label: "Mississippi" },
28268
+ { value: "MO", label: "Missouri" },
28269
+ { value: "MT", label: "Montana" },
28270
+ { value: "NE", label: "Nebraska" },
28271
+ { value: "NV", label: "Nevada" },
28272
+ { value: "NH", label: "New Hampshire" },
28273
+ { value: "NJ", label: "New Jersey" },
28274
+ { value: "NM", label: "New Mexico" },
28275
+ { value: "NY", label: "New York" },
28276
+ { value: "NC", label: "North Carolina" },
28277
+ { value: "ND", label: "North Dakota" },
28278
+ { value: "OH", label: "Ohio" },
28279
+ { value: "OK", label: "Oklahoma" },
28280
+ { value: "OR", label: "Oregon" },
28281
+ { value: "PA", label: "Pennsylvania" },
28282
+ { value: "RI", label: "Rhode Island" },
28283
+ { value: "SC", label: "South Carolina" },
28284
+ { value: "SD", label: "South Dakota" },
28285
+ { value: "TN", label: "Tennessee" },
28286
+ { value: "TX", label: "Texas" },
28287
+ { value: "UT", label: "Utah" },
28288
+ { value: "VT", label: "Vermont" },
28289
+ { value: "VA", label: "Virginia" },
28290
+ { value: "WA", label: "Washington" },
28291
+ { value: "WV", label: "West Virginia" },
28292
+ { value: "WI", label: "Wisconsin" },
28293
+ { value: "WY", label: "Wyoming" },
28294
+ { value: "DC", label: "District of Columbia" }
28295
+ ];
28296
+ function USStateField({ label, placeholder, ...rest }) {
28297
+ return /* @__PURE__ */ jsx(
28298
+ Select,
28299
+ {
28300
+ label: label ?? "State",
28301
+ placeholder: placeholder ?? "Select state",
28302
+ data: [...US_STATES],
28303
+ searchable: true,
28304
+ clearable: true,
28305
+ ...rest
28306
+ }
28307
+ );
28308
+ }
28223
28309
  const US_ZIP_REGEX = /^\d{5}(-\d{4})?$/;
28224
28310
  const INTL_POSTAL_REGEX = /^[A-Z0-9]+(?:[ -][A-Z0-9]+)*$/i;
28225
28311
  function createZipSchema(options) {
@@ -28638,6 +28724,1257 @@ function ListRow({
28638
28724
  function Percent({ value, decimals = 2, ...rest }) {
28639
28725
  return /* @__PURE__ */ jsx(Text, { component: "span", ...rest, children: formatPercent(value, decimals) });
28640
28726
  }
28727
+ var UserAgent_DEPRECATED_1;
28728
+ var hasRequiredUserAgent_DEPRECATED;
28729
+ function requireUserAgent_DEPRECATED() {
28730
+ if (hasRequiredUserAgent_DEPRECATED) return UserAgent_DEPRECATED_1;
28731
+ hasRequiredUserAgent_DEPRECATED = 1;
28732
+ var _populated = false;
28733
+ var _ie, _firefox, _opera, _webkit, _chrome;
28734
+ var _ie_real_version;
28735
+ var _osx, _windows, _linux, _android;
28736
+ var _win64;
28737
+ var _iphone, _ipad, _native;
28738
+ var _mobile;
28739
+ function _populate() {
28740
+ if (_populated) {
28741
+ return;
28742
+ }
28743
+ _populated = true;
28744
+ var uas = navigator.userAgent;
28745
+ var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
28746
+ var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
28747
+ _iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
28748
+ _ipad = /\b(iP[ao]d)/.exec(uas);
28749
+ _android = /Android/i.exec(uas);
28750
+ _native = /FBAN\/\w+;/i.exec(uas);
28751
+ _mobile = /Mobile/i.exec(uas);
28752
+ _win64 = !!/Win64/.exec(uas);
28753
+ if (agent) {
28754
+ _ie = agent[1] ? parseFloat(agent[1]) : agent[5] ? parseFloat(agent[5]) : NaN;
28755
+ if (_ie && document && document.documentMode) {
28756
+ _ie = document.documentMode;
28757
+ }
28758
+ var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
28759
+ _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
28760
+ _firefox = agent[2] ? parseFloat(agent[2]) : NaN;
28761
+ _opera = agent[3] ? parseFloat(agent[3]) : NaN;
28762
+ _webkit = agent[4] ? parseFloat(agent[4]) : NaN;
28763
+ if (_webkit) {
28764
+ agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
28765
+ _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
28766
+ } else {
28767
+ _chrome = NaN;
28768
+ }
28769
+ } else {
28770
+ _ie = _firefox = _opera = _chrome = _webkit = NaN;
28771
+ }
28772
+ if (os) {
28773
+ if (os[1]) {
28774
+ var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
28775
+ _osx = ver ? parseFloat(ver[1].replace("_", ".")) : true;
28776
+ } else {
28777
+ _osx = false;
28778
+ }
28779
+ _windows = !!os[2];
28780
+ _linux = !!os[3];
28781
+ } else {
28782
+ _osx = _windows = _linux = false;
28783
+ }
28784
+ }
28785
+ var UserAgent_DEPRECATED = {
28786
+ /**
28787
+ * Check if the UA is Internet Explorer.
28788
+ *
28789
+ *
28790
+ * @return float|NaN Version number (if match) or NaN.
28791
+ */
28792
+ ie: function() {
28793
+ return _populate() || _ie;
28794
+ },
28795
+ /**
28796
+ * Check if we're in Internet Explorer compatibility mode.
28797
+ *
28798
+ * @return bool true if in compatibility mode, false if
28799
+ * not compatibility mode or not ie
28800
+ */
28801
+ ieCompatibilityMode: function() {
28802
+ return _populate() || _ie_real_version > _ie;
28803
+ },
28804
+ /**
28805
+ * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
28806
+ * only need this because Skype can't handle 64-bit IE yet. We need to remove
28807
+ * this when we don't need it -- tracked by #601957.
28808
+ */
28809
+ ie64: function() {
28810
+ return UserAgent_DEPRECATED.ie() && _win64;
28811
+ },
28812
+ /**
28813
+ * Check if the UA is Firefox.
28814
+ *
28815
+ *
28816
+ * @return float|NaN Version number (if match) or NaN.
28817
+ */
28818
+ firefox: function() {
28819
+ return _populate() || _firefox;
28820
+ },
28821
+ /**
28822
+ * Check if the UA is Opera.
28823
+ *
28824
+ *
28825
+ * @return float|NaN Version number (if match) or NaN.
28826
+ */
28827
+ opera: function() {
28828
+ return _populate() || _opera;
28829
+ },
28830
+ /**
28831
+ * Check if the UA is WebKit.
28832
+ *
28833
+ *
28834
+ * @return float|NaN Version number (if match) or NaN.
28835
+ */
28836
+ webkit: function() {
28837
+ return _populate() || _webkit;
28838
+ },
28839
+ /**
28840
+ * For Push
28841
+ * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
28842
+ */
28843
+ safari: function() {
28844
+ return UserAgent_DEPRECATED.webkit();
28845
+ },
28846
+ /**
28847
+ * Check if the UA is a Chrome browser.
28848
+ *
28849
+ *
28850
+ * @return float|NaN Version number (if match) or NaN.
28851
+ */
28852
+ chrome: function() {
28853
+ return _populate() || _chrome;
28854
+ },
28855
+ /**
28856
+ * Check if the user is running Windows.
28857
+ *
28858
+ * @return bool `true' if the user's OS is Windows.
28859
+ */
28860
+ windows: function() {
28861
+ return _populate() || _windows;
28862
+ },
28863
+ /**
28864
+ * Check if the user is running Mac OS X.
28865
+ *
28866
+ * @return float|bool Returns a float if a version number is detected,
28867
+ * otherwise true/false.
28868
+ */
28869
+ osx: function() {
28870
+ return _populate() || _osx;
28871
+ },
28872
+ /**
28873
+ * Check if the user is running Linux.
28874
+ *
28875
+ * @return bool `true' if the user's OS is some flavor of Linux.
28876
+ */
28877
+ linux: function() {
28878
+ return _populate() || _linux;
28879
+ },
28880
+ /**
28881
+ * Check if the user is running on an iPhone or iPod platform.
28882
+ *
28883
+ * @return bool `true' if the user is running some flavor of the
28884
+ * iPhone OS.
28885
+ */
28886
+ iphone: function() {
28887
+ return _populate() || _iphone;
28888
+ },
28889
+ mobile: function() {
28890
+ return _populate() || (_iphone || _ipad || _android || _mobile);
28891
+ },
28892
+ nativeApp: function() {
28893
+ return _populate() || _native;
28894
+ },
28895
+ android: function() {
28896
+ return _populate() || _android;
28897
+ },
28898
+ ipad: function() {
28899
+ return _populate() || _ipad;
28900
+ }
28901
+ };
28902
+ UserAgent_DEPRECATED_1 = UserAgent_DEPRECATED;
28903
+ return UserAgent_DEPRECATED_1;
28904
+ }
28905
+ var ExecutionEnvironment_1;
28906
+ var hasRequiredExecutionEnvironment;
28907
+ function requireExecutionEnvironment() {
28908
+ if (hasRequiredExecutionEnvironment) return ExecutionEnvironment_1;
28909
+ hasRequiredExecutionEnvironment = 1;
28910
+ var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
28911
+ var ExecutionEnvironment = {
28912
+ canUseDOM,
28913
+ canUseWorkers: typeof Worker !== "undefined",
28914
+ canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
28915
+ canUseViewport: canUseDOM && !!window.screen,
28916
+ isInWorker: !canUseDOM
28917
+ // For now, this is true - might change in the future.
28918
+ };
28919
+ ExecutionEnvironment_1 = ExecutionEnvironment;
28920
+ return ExecutionEnvironment_1;
28921
+ }
28922
+ var isEventSupported_1;
28923
+ var hasRequiredIsEventSupported;
28924
+ function requireIsEventSupported() {
28925
+ if (hasRequiredIsEventSupported) return isEventSupported_1;
28926
+ hasRequiredIsEventSupported = 1;
28927
+ var ExecutionEnvironment = requireExecutionEnvironment();
28928
+ var useHasFeature;
28929
+ if (ExecutionEnvironment.canUseDOM) {
28930
+ useHasFeature = document.implementation && document.implementation.hasFeature && // always returns true in newer browsers as per the standard.
28931
+ // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
28932
+ document.implementation.hasFeature("", "") !== true;
28933
+ }
28934
+ function isEventSupported(eventNameSuffix, capture) {
28935
+ if (!ExecutionEnvironment.canUseDOM || capture && !("addEventListener" in document)) {
28936
+ return false;
28937
+ }
28938
+ var eventName = "on" + eventNameSuffix;
28939
+ var isSupported = eventName in document;
28940
+ if (!isSupported) {
28941
+ var element = document.createElement("div");
28942
+ element.setAttribute(eventName, "return;");
28943
+ isSupported = typeof element[eventName] === "function";
28944
+ }
28945
+ if (!isSupported && useHasFeature && eventNameSuffix === "wheel") {
28946
+ isSupported = document.implementation.hasFeature("Events.wheel", "3.0");
28947
+ }
28948
+ return isSupported;
28949
+ }
28950
+ isEventSupported_1 = isEventSupported;
28951
+ return isEventSupported_1;
28952
+ }
28953
+ var normalizeWheel_1;
28954
+ var hasRequiredNormalizeWheel$1;
28955
+ function requireNormalizeWheel$1() {
28956
+ if (hasRequiredNormalizeWheel$1) return normalizeWheel_1;
28957
+ hasRequiredNormalizeWheel$1 = 1;
28958
+ var UserAgent_DEPRECATED = requireUserAgent_DEPRECATED();
28959
+ var isEventSupported = requireIsEventSupported();
28960
+ var PIXEL_STEP = 10;
28961
+ var LINE_HEIGHT = 40;
28962
+ var PAGE_HEIGHT = 800;
28963
+ function normalizeWheel2(event) {
28964
+ var sX = 0, sY = 0, pX = 0, pY = 0;
28965
+ if ("detail" in event) {
28966
+ sY = event.detail;
28967
+ }
28968
+ if ("wheelDelta" in event) {
28969
+ sY = -event.wheelDelta / 120;
28970
+ }
28971
+ if ("wheelDeltaY" in event) {
28972
+ sY = -event.wheelDeltaY / 120;
28973
+ }
28974
+ if ("wheelDeltaX" in event) {
28975
+ sX = -event.wheelDeltaX / 120;
28976
+ }
28977
+ if ("axis" in event && event.axis === event.HORIZONTAL_AXIS) {
28978
+ sX = sY;
28979
+ sY = 0;
28980
+ }
28981
+ pX = sX * PIXEL_STEP;
28982
+ pY = sY * PIXEL_STEP;
28983
+ if ("deltaY" in event) {
28984
+ pY = event.deltaY;
28985
+ }
28986
+ if ("deltaX" in event) {
28987
+ pX = event.deltaX;
28988
+ }
28989
+ if ((pX || pY) && event.deltaMode) {
28990
+ if (event.deltaMode == 1) {
28991
+ pX *= LINE_HEIGHT;
28992
+ pY *= LINE_HEIGHT;
28993
+ } else {
28994
+ pX *= PAGE_HEIGHT;
28995
+ pY *= PAGE_HEIGHT;
28996
+ }
28997
+ }
28998
+ if (pX && !sX) {
28999
+ sX = pX < 1 ? -1 : 1;
29000
+ }
29001
+ if (pY && !sY) {
29002
+ sY = pY < 1 ? -1 : 1;
29003
+ }
29004
+ return {
29005
+ spinX: sX,
29006
+ spinY: sY,
29007
+ pixelX: pX,
29008
+ pixelY: pY
29009
+ };
29010
+ }
29011
+ normalizeWheel2.getEventType = function() {
29012
+ return UserAgent_DEPRECATED.firefox() ? "DOMMouseScroll" : isEventSupported("wheel") ? "wheel" : "mousewheel";
29013
+ };
29014
+ normalizeWheel_1 = normalizeWheel2;
29015
+ return normalizeWheel_1;
29016
+ }
29017
+ var normalizeWheel$1;
29018
+ var hasRequiredNormalizeWheel;
29019
+ function requireNormalizeWheel() {
29020
+ if (hasRequiredNormalizeWheel) return normalizeWheel$1;
29021
+ hasRequiredNormalizeWheel = 1;
29022
+ normalizeWheel$1 = requireNormalizeWheel$1();
29023
+ return normalizeWheel$1;
29024
+ }
29025
+ var normalizeWheelExports = requireNormalizeWheel();
29026
+ const normalizeWheel = /* @__PURE__ */ getDefaultExportFromCjs(normalizeWheelExports);
29027
+ function getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) {
29028
+ if (rotation === void 0) {
29029
+ rotation = 0;
29030
+ }
29031
+ var _a = rotateSize(mediaWidth, mediaHeight, rotation), width = _a.width, height = _a.height;
29032
+ var fittingWidth = Math.min(width, containerWidth);
29033
+ var fittingHeight = Math.min(height, containerHeight);
29034
+ if (fittingWidth > fittingHeight * aspect) {
29035
+ return {
29036
+ width: fittingHeight * aspect,
29037
+ height: fittingHeight
29038
+ };
29039
+ }
29040
+ return {
29041
+ width: fittingWidth,
29042
+ height: fittingWidth / aspect
29043
+ };
29044
+ }
29045
+ function getMediaZoom(mediaSize) {
29046
+ return mediaSize.width > mediaSize.height ? mediaSize.width / mediaSize.naturalWidth : mediaSize.height / mediaSize.naturalHeight;
29047
+ }
29048
+ function restrictPosition(position, mediaSize, cropSize, zoom, rotation) {
29049
+ if (rotation === void 0) {
29050
+ rotation = 0;
29051
+ }
29052
+ var _a = rotateSize(mediaSize.width, mediaSize.height, rotation), width = _a.width, height = _a.height;
29053
+ return {
29054
+ x: restrictPositionCoord(position.x, width, cropSize.width, zoom),
29055
+ y: restrictPositionCoord(position.y, height, cropSize.height, zoom)
29056
+ };
29057
+ }
29058
+ function restrictPositionCoord(position, mediaSize, cropSize, zoom) {
29059
+ var maxPosition = mediaSize * zoom / 2 - cropSize / 2;
29060
+ return clamp(position, -maxPosition, maxPosition);
29061
+ }
29062
+ function getDistanceBetweenPoints(pointA, pointB) {
29063
+ return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2));
29064
+ }
29065
+ function getRotationBetweenPoints(pointA, pointB) {
29066
+ return Math.atan2(pointB.y - pointA.y, pointB.x - pointA.x) * 180 / Math.PI;
29067
+ }
29068
+ function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition2) {
29069
+ if (rotation === void 0) {
29070
+ rotation = 0;
29071
+ }
29072
+ if (restrictPosition2 === void 0) {
29073
+ restrictPosition2 = true;
29074
+ }
29075
+ var limitAreaFn = restrictPosition2 ? limitArea : noOp;
29076
+ var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation);
29077
+ var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation);
29078
+ var croppedAreaPercentages = {
29079
+ x: limitAreaFn(100, ((mediaBBoxSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaBBoxSize.width * 100),
29080
+ y: limitAreaFn(100, ((mediaBBoxSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaBBoxSize.height * 100),
29081
+ width: limitAreaFn(100, cropSize.width / mediaBBoxSize.width * 100 / zoom),
29082
+ height: limitAreaFn(100, cropSize.height / mediaBBoxSize.height * 100 / zoom)
29083
+ };
29084
+ var widthInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.width, croppedAreaPercentages.width * mediaNaturalBBoxSize.width / 100));
29085
+ var heightInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.height, croppedAreaPercentages.height * mediaNaturalBBoxSize.height / 100));
29086
+ var isImgWiderThanHigh = mediaNaturalBBoxSize.width >= mediaNaturalBBoxSize.height * aspect;
29087
+ var sizePixels = isImgWiderThanHigh ? {
29088
+ width: Math.round(heightInPixels * aspect),
29089
+ height: heightInPixels
29090
+ } : {
29091
+ width: widthInPixels,
29092
+ height: Math.round(widthInPixels / aspect)
29093
+ };
29094
+ var croppedAreaPixels = __assign(__assign({}, sizePixels), {
29095
+ x: Math.round(limitAreaFn(mediaNaturalBBoxSize.width - sizePixels.width, croppedAreaPercentages.x * mediaNaturalBBoxSize.width / 100)),
29096
+ y: Math.round(limitAreaFn(mediaNaturalBBoxSize.height - sizePixels.height, croppedAreaPercentages.y * mediaNaturalBBoxSize.height / 100))
29097
+ });
29098
+ return {
29099
+ croppedAreaPercentages,
29100
+ croppedAreaPixels
29101
+ };
29102
+ }
29103
+ function limitArea(max2, value) {
29104
+ return Math.min(max2, Math.max(0, value));
29105
+ }
29106
+ function noOp(_max, value) {
29107
+ return value;
29108
+ }
29109
+ function getInitialCropFromCroppedAreaPercentages(croppedAreaPercentages, mediaSize, rotation, cropSize, minZoom, maxZoom) {
29110
+ var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation);
29111
+ var zoom = clamp(cropSize.width / mediaBBoxSize.width * (100 / croppedAreaPercentages.width), minZoom, maxZoom);
29112
+ var crop = {
29113
+ x: zoom * mediaBBoxSize.width / 2 - cropSize.width / 2 - mediaBBoxSize.width * zoom * (croppedAreaPercentages.x / 100),
29114
+ y: zoom * mediaBBoxSize.height / 2 - cropSize.height / 2 - mediaBBoxSize.height * zoom * (croppedAreaPercentages.y / 100)
29115
+ };
29116
+ return {
29117
+ crop,
29118
+ zoom
29119
+ };
29120
+ }
29121
+ function getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
29122
+ var mediaZoom = getMediaZoom(mediaSize);
29123
+ return cropSize.height > cropSize.width ? cropSize.height / (croppedAreaPixels.height * mediaZoom) : cropSize.width / (croppedAreaPixels.width * mediaZoom);
29124
+ }
29125
+ function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, rotation, cropSize, minZoom, maxZoom) {
29126
+ if (rotation === void 0) {
29127
+ rotation = 0;
29128
+ }
29129
+ var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation);
29130
+ var zoom = clamp(getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize), minZoom, maxZoom);
29131
+ var cropZoom = cropSize.height > cropSize.width ? cropSize.height / croppedAreaPixels.height : cropSize.width / croppedAreaPixels.width;
29132
+ var crop = {
29133
+ x: ((mediaNaturalBBoxSize.width - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom,
29134
+ y: ((mediaNaturalBBoxSize.height - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) * cropZoom
29135
+ };
29136
+ return {
29137
+ crop,
29138
+ zoom
29139
+ };
29140
+ }
29141
+ function getCenter(a, b) {
29142
+ return {
29143
+ x: (b.x + a.x) / 2,
29144
+ y: (b.y + a.y) / 2
29145
+ };
29146
+ }
29147
+ function getRadianAngle(degreeValue) {
29148
+ return degreeValue * Math.PI / 180;
29149
+ }
29150
+ function rotateSize(width, height, rotation) {
29151
+ var rotRad = getRadianAngle(rotation);
29152
+ return {
29153
+ width: Math.abs(Math.cos(rotRad) * width) + Math.abs(Math.sin(rotRad) * height),
29154
+ height: Math.abs(Math.sin(rotRad) * width) + Math.abs(Math.cos(rotRad) * height)
29155
+ };
29156
+ }
29157
+ function clamp(value, min2, max2) {
29158
+ return Math.min(Math.max(value, min2), max2);
29159
+ }
29160
+ function classNames() {
29161
+ var args = [];
29162
+ for (var _i = 0; _i < arguments.length; _i++) {
29163
+ args[_i] = arguments[_i];
29164
+ }
29165
+ return args.filter(function(value) {
29166
+ if (typeof value === "string" && value.length > 0) {
29167
+ return true;
29168
+ }
29169
+ return false;
29170
+ }).join(" ").trim();
29171
+ }
29172
+ var css_248z = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n";
29173
+ var MIN_ZOOM = 1;
29174
+ var MAX_ZOOM = 3;
29175
+ var KEYBOARD_STEP = 1;
29176
+ var Cropper = (
29177
+ /** @class */
29178
+ (function(_super) {
29179
+ __extends(Cropper2, _super);
29180
+ function Cropper2() {
29181
+ var _this = _super !== null && _super.apply(this, arguments) || this;
29182
+ _this.cropperRef = React.createRef();
29183
+ _this.imageRef = React.createRef();
29184
+ _this.videoRef = React.createRef();
29185
+ _this.containerPosition = {
29186
+ x: 0,
29187
+ y: 0
29188
+ };
29189
+ _this.containerRef = null;
29190
+ _this.styleRef = null;
29191
+ _this.containerRect = null;
29192
+ _this.mediaSize = {
29193
+ width: 0,
29194
+ height: 0,
29195
+ naturalWidth: 0,
29196
+ naturalHeight: 0
29197
+ };
29198
+ _this.dragStartPosition = {
29199
+ x: 0,
29200
+ y: 0
29201
+ };
29202
+ _this.dragStartCrop = {
29203
+ x: 0,
29204
+ y: 0
29205
+ };
29206
+ _this.gestureZoomStart = 0;
29207
+ _this.gestureRotationStart = 0;
29208
+ _this.isTouching = false;
29209
+ _this.lastPinchDistance = 0;
29210
+ _this.lastPinchRotation = 0;
29211
+ _this.rafDragTimeout = null;
29212
+ _this.rafPinchTimeout = null;
29213
+ _this.wheelTimer = null;
29214
+ _this.currentDoc = typeof document !== "undefined" ? document : null;
29215
+ _this.currentWindow = typeof window !== "undefined" ? window : null;
29216
+ _this.resizeObserver = null;
29217
+ _this.previousCropSize = null;
29218
+ _this.isInitialized = false;
29219
+ _this.state = {
29220
+ cropSize: null,
29221
+ hasWheelJustStarted: false,
29222
+ mediaObjectFit: void 0
29223
+ };
29224
+ _this.initResizeObserver = function() {
29225
+ if (typeof window.ResizeObserver === "undefined" || !_this.containerRef) {
29226
+ return;
29227
+ }
29228
+ var isFirstResize = true;
29229
+ _this.resizeObserver = new window.ResizeObserver(function(entries) {
29230
+ if (isFirstResize) {
29231
+ isFirstResize = false;
29232
+ return;
29233
+ }
29234
+ _this.computeSizes();
29235
+ });
29236
+ _this.resizeObserver.observe(_this.containerRef);
29237
+ };
29238
+ _this.preventZoomSafari = function(e) {
29239
+ return e.preventDefault();
29240
+ };
29241
+ _this.cleanEvents = function() {
29242
+ if (!_this.currentDoc) return;
29243
+ _this.currentDoc.removeEventListener("mousemove", _this.onMouseMove);
29244
+ _this.currentDoc.removeEventListener("mouseup", _this.onDragStopped);
29245
+ _this.currentDoc.removeEventListener("touchmove", _this.onTouchMove);
29246
+ _this.currentDoc.removeEventListener("touchend", _this.onDragStopped);
29247
+ _this.currentDoc.removeEventListener("gesturechange", _this.onGestureChange);
29248
+ _this.currentDoc.removeEventListener("gestureend", _this.onGestureEnd);
29249
+ _this.currentDoc.removeEventListener("scroll", _this.onScroll);
29250
+ };
29251
+ _this.clearScrollEvent = function() {
29252
+ if (_this.containerRef) _this.containerRef.removeEventListener("wheel", _this.onWheel);
29253
+ if (_this.wheelTimer) {
29254
+ clearTimeout(_this.wheelTimer);
29255
+ }
29256
+ };
29257
+ _this.onMediaLoad = function() {
29258
+ var cropSize = _this.computeSizes();
29259
+ if (cropSize) {
29260
+ _this.previousCropSize = cropSize;
29261
+ _this.emitCropData();
29262
+ _this.setInitialCrop(cropSize);
29263
+ _this.isInitialized = true;
29264
+ }
29265
+ if (_this.props.onMediaLoaded) {
29266
+ _this.props.onMediaLoaded(_this.mediaSize);
29267
+ }
29268
+ };
29269
+ _this.setInitialCrop = function(cropSize) {
29270
+ if (_this.props.initialCroppedAreaPercentages) {
29271
+ var _a = getInitialCropFromCroppedAreaPercentages(_this.props.initialCroppedAreaPercentages, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom), crop = _a.crop, zoom = _a.zoom;
29272
+ _this.props.onCropChange(crop);
29273
+ _this.props.onZoomChange && _this.props.onZoomChange(zoom);
29274
+ } else if (_this.props.initialCroppedAreaPixels) {
29275
+ var _b = getInitialCropFromCroppedAreaPixels(_this.props.initialCroppedAreaPixels, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom), crop = _b.crop, zoom = _b.zoom;
29276
+ _this.props.onCropChange(crop);
29277
+ _this.props.onZoomChange && _this.props.onZoomChange(zoom);
29278
+ }
29279
+ };
29280
+ _this.computeSizes = function() {
29281
+ var _a, _b, _c, _d, _e, _f;
29282
+ var mediaRef = _this.imageRef.current || _this.videoRef.current;
29283
+ if (mediaRef && _this.containerRef) {
29284
+ _this.containerRect = _this.containerRef.getBoundingClientRect();
29285
+ _this.saveContainerPosition();
29286
+ var containerAspect = _this.containerRect.width / _this.containerRect.height;
29287
+ var naturalWidth = ((_a = _this.imageRef.current) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef.current) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0;
29288
+ var naturalHeight = ((_c = _this.imageRef.current) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0;
29289
+ var isMediaScaledDown = mediaRef.offsetWidth < naturalWidth || mediaRef.offsetHeight < naturalHeight;
29290
+ var mediaAspect = naturalWidth / naturalHeight;
29291
+ var renderedMediaSize = void 0;
29292
+ if (isMediaScaledDown) {
29293
+ switch (_this.state.mediaObjectFit) {
29294
+ default:
29295
+ case "contain":
29296
+ renderedMediaSize = containerAspect > mediaAspect ? {
29297
+ width: _this.containerRect.height * mediaAspect,
29298
+ height: _this.containerRect.height
29299
+ } : {
29300
+ width: _this.containerRect.width,
29301
+ height: _this.containerRect.width / mediaAspect
29302
+ };
29303
+ break;
29304
+ case "horizontal-cover":
29305
+ renderedMediaSize = {
29306
+ width: _this.containerRect.width,
29307
+ height: _this.containerRect.width / mediaAspect
29308
+ };
29309
+ break;
29310
+ case "vertical-cover":
29311
+ renderedMediaSize = {
29312
+ width: _this.containerRect.height * mediaAspect,
29313
+ height: _this.containerRect.height
29314
+ };
29315
+ break;
29316
+ }
29317
+ } else {
29318
+ renderedMediaSize = {
29319
+ width: mediaRef.offsetWidth,
29320
+ height: mediaRef.offsetHeight
29321
+ };
29322
+ }
29323
+ _this.mediaSize = __assign(__assign({}, renderedMediaSize), {
29324
+ naturalWidth,
29325
+ naturalHeight
29326
+ });
29327
+ if (_this.props.setMediaSize) {
29328
+ _this.props.setMediaSize(_this.mediaSize);
29329
+ }
29330
+ var cropSize = _this.props.cropSize ? _this.props.cropSize : getCropSize(_this.mediaSize.width, _this.mediaSize.height, _this.containerRect.width, _this.containerRect.height, _this.props.aspect, _this.props.rotation);
29331
+ if (((_e = _this.state.cropSize) === null || _e === void 0 ? void 0 : _e.height) !== cropSize.height || ((_f = _this.state.cropSize) === null || _f === void 0 ? void 0 : _f.width) !== cropSize.width) {
29332
+ _this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize);
29333
+ }
29334
+ _this.setState({
29335
+ cropSize
29336
+ }, _this.recomputeCropPosition);
29337
+ if (_this.props.setCropSize) {
29338
+ _this.props.setCropSize(cropSize);
29339
+ }
29340
+ return cropSize;
29341
+ }
29342
+ };
29343
+ _this.saveContainerPosition = function() {
29344
+ if (_this.containerRef) {
29345
+ var bounds = _this.containerRef.getBoundingClientRect();
29346
+ _this.containerPosition = {
29347
+ x: bounds.left,
29348
+ y: bounds.top
29349
+ };
29350
+ }
29351
+ };
29352
+ _this.onMouseDown = function(e) {
29353
+ if (!_this.currentDoc) return;
29354
+ e.preventDefault();
29355
+ _this.currentDoc.addEventListener("mousemove", _this.onMouseMove);
29356
+ _this.currentDoc.addEventListener("mouseup", _this.onDragStopped);
29357
+ _this.saveContainerPosition();
29358
+ _this.onDragStart(Cropper2.getMousePoint(e));
29359
+ };
29360
+ _this.onMouseMove = function(e) {
29361
+ return _this.onDrag(Cropper2.getMousePoint(e));
29362
+ };
29363
+ _this.onScroll = function(e) {
29364
+ if (!_this.currentDoc) return;
29365
+ e.preventDefault();
29366
+ _this.saveContainerPosition();
29367
+ };
29368
+ _this.onTouchStart = function(e) {
29369
+ if (!_this.currentDoc) return;
29370
+ _this.isTouching = true;
29371
+ if (_this.props.onTouchRequest && !_this.props.onTouchRequest(e)) {
29372
+ return;
29373
+ }
29374
+ _this.currentDoc.addEventListener("touchmove", _this.onTouchMove, {
29375
+ passive: false
29376
+ });
29377
+ _this.currentDoc.addEventListener("touchend", _this.onDragStopped);
29378
+ _this.saveContainerPosition();
29379
+ if (e.touches.length === 2) {
29380
+ _this.onPinchStart(e);
29381
+ } else if (e.touches.length === 1) {
29382
+ _this.onDragStart(Cropper2.getTouchPoint(e.touches[0]));
29383
+ }
29384
+ };
29385
+ _this.onTouchMove = function(e) {
29386
+ e.preventDefault();
29387
+ if (e.touches.length === 2) {
29388
+ _this.onPinchMove(e);
29389
+ } else if (e.touches.length === 1) {
29390
+ _this.onDrag(Cropper2.getTouchPoint(e.touches[0]));
29391
+ }
29392
+ };
29393
+ _this.onGestureStart = function(e) {
29394
+ if (!_this.currentDoc) return;
29395
+ e.preventDefault();
29396
+ _this.currentDoc.addEventListener("gesturechange", _this.onGestureChange);
29397
+ _this.currentDoc.addEventListener("gestureend", _this.onGestureEnd);
29398
+ _this.gestureZoomStart = _this.props.zoom;
29399
+ _this.gestureRotationStart = _this.props.rotation;
29400
+ };
29401
+ _this.onGestureChange = function(e) {
29402
+ e.preventDefault();
29403
+ if (_this.isTouching) {
29404
+ return;
29405
+ }
29406
+ var point = Cropper2.getMousePoint(e);
29407
+ var newZoom = _this.gestureZoomStart - 1 + e.scale;
29408
+ _this.setNewZoom(newZoom, point, {
29409
+ shouldUpdatePosition: true
29410
+ });
29411
+ if (_this.props.onRotationChange) {
29412
+ var newRotation = _this.gestureRotationStart + e.rotation;
29413
+ _this.props.onRotationChange(newRotation);
29414
+ }
29415
+ };
29416
+ _this.onGestureEnd = function(e) {
29417
+ _this.cleanEvents();
29418
+ };
29419
+ _this.onDragStart = function(_a) {
29420
+ var _b, _c;
29421
+ var x = _a.x, y = _a.y;
29422
+ _this.dragStartPosition = {
29423
+ x,
29424
+ y
29425
+ };
29426
+ _this.dragStartCrop = __assign({}, _this.props.crop);
29427
+ (_c = (_b = _this.props).onInteractionStart) === null || _c === void 0 ? void 0 : _c.call(_b);
29428
+ };
29429
+ _this.onDrag = function(_a) {
29430
+ var x = _a.x, y = _a.y;
29431
+ if (!_this.currentWindow) return;
29432
+ if (_this.rafDragTimeout) _this.currentWindow.cancelAnimationFrame(_this.rafDragTimeout);
29433
+ _this.rafDragTimeout = _this.currentWindow.requestAnimationFrame(function() {
29434
+ if (!_this.state.cropSize) return;
29435
+ if (x === void 0 || y === void 0) return;
29436
+ var offsetX = x - _this.dragStartPosition.x;
29437
+ var offsetY = y - _this.dragStartPosition.y;
29438
+ var requestedPosition = {
29439
+ x: _this.dragStartCrop.x + offsetX,
29440
+ y: _this.dragStartCrop.y + offsetY
29441
+ };
29442
+ var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : requestedPosition;
29443
+ _this.props.onCropChange(newPosition);
29444
+ });
29445
+ };
29446
+ _this.onDragStopped = function() {
29447
+ var _a, _b;
29448
+ _this.isTouching = false;
29449
+ _this.cleanEvents();
29450
+ _this.emitCropData();
29451
+ (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
29452
+ };
29453
+ _this.onWheel = function(e) {
29454
+ if (!_this.currentWindow) return;
29455
+ if (_this.props.onWheelRequest && !_this.props.onWheelRequest(e)) {
29456
+ return;
29457
+ }
29458
+ e.preventDefault();
29459
+ var point = Cropper2.getMousePoint(e);
29460
+ var pixelY = normalizeWheel(e).pixelY;
29461
+ var newZoom = _this.props.zoom - pixelY * _this.props.zoomSpeed / 200;
29462
+ _this.setNewZoom(newZoom, point, {
29463
+ shouldUpdatePosition: true
29464
+ });
29465
+ if (!_this.state.hasWheelJustStarted) {
29466
+ _this.setState({
29467
+ hasWheelJustStarted: true
29468
+ }, function() {
29469
+ var _a, _b;
29470
+ return (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);
29471
+ });
29472
+ }
29473
+ if (_this.wheelTimer) {
29474
+ clearTimeout(_this.wheelTimer);
29475
+ }
29476
+ _this.wheelTimer = _this.currentWindow.setTimeout(function() {
29477
+ return _this.setState({
29478
+ hasWheelJustStarted: false
29479
+ }, function() {
29480
+ var _a, _b;
29481
+ return (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
29482
+ });
29483
+ }, 250);
29484
+ };
29485
+ _this.getPointOnContainer = function(_a, containerTopLeft) {
29486
+ var x = _a.x, y = _a.y;
29487
+ if (!_this.containerRect) {
29488
+ throw new Error("The Cropper is not mounted");
29489
+ }
29490
+ return {
29491
+ x: _this.containerRect.width / 2 - (x - containerTopLeft.x),
29492
+ y: _this.containerRect.height / 2 - (y - containerTopLeft.y)
29493
+ };
29494
+ };
29495
+ _this.getPointOnMedia = function(_a) {
29496
+ var x = _a.x, y = _a.y;
29497
+ var _b = _this.props, crop = _b.crop, zoom = _b.zoom;
29498
+ return {
29499
+ x: (x + crop.x) / zoom,
29500
+ y: (y + crop.y) / zoom
29501
+ };
29502
+ };
29503
+ _this.setNewZoom = function(zoom, point, _a) {
29504
+ var _b = _a === void 0 ? {} : _a, _c = _b.shouldUpdatePosition, shouldUpdatePosition = _c === void 0 ? true : _c;
29505
+ if (!_this.state.cropSize || !_this.props.onZoomChange) return;
29506
+ var newZoom = clamp(zoom, _this.props.minZoom, _this.props.maxZoom);
29507
+ if (shouldUpdatePosition) {
29508
+ var zoomPoint = _this.getPointOnContainer(point, _this.containerPosition);
29509
+ var zoomTarget = _this.getPointOnMedia(zoomPoint);
29510
+ var requestedPosition = {
29511
+ x: zoomTarget.x * newZoom - zoomPoint.x,
29512
+ y: zoomTarget.y * newZoom - zoomPoint.y
29513
+ };
29514
+ var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;
29515
+ _this.props.onCropChange(newPosition);
29516
+ }
29517
+ _this.props.onZoomChange(newZoom);
29518
+ };
29519
+ _this.getCropData = function() {
29520
+ if (!_this.state.cropSize) {
29521
+ return null;
29522
+ }
29523
+ var restrictedPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;
29524
+ return computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition);
29525
+ };
29526
+ _this.emitCropData = function() {
29527
+ var cropData = _this.getCropData();
29528
+ if (!cropData) return;
29529
+ var croppedAreaPercentages = cropData.croppedAreaPercentages, croppedAreaPixels = cropData.croppedAreaPixels;
29530
+ if (_this.props.onCropComplete) {
29531
+ _this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels);
29532
+ }
29533
+ if (_this.props.onCropAreaChange) {
29534
+ _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
29535
+ }
29536
+ };
29537
+ _this.emitCropAreaChange = function() {
29538
+ var cropData = _this.getCropData();
29539
+ if (!cropData) return;
29540
+ var croppedAreaPercentages = cropData.croppedAreaPercentages, croppedAreaPixels = cropData.croppedAreaPixels;
29541
+ if (_this.props.onCropAreaChange) {
29542
+ _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
29543
+ }
29544
+ };
29545
+ _this.recomputeCropPosition = function() {
29546
+ var _a, _b;
29547
+ if (!_this.state.cropSize) return;
29548
+ var adjustedCrop = _this.props.crop;
29549
+ if (_this.isInitialized && ((_a = _this.previousCropSize) === null || _a === void 0 ? void 0 : _a.width) && ((_b = _this.previousCropSize) === null || _b === void 0 ? void 0 : _b.height)) {
29550
+ var sizeChanged = Math.abs(_this.previousCropSize.width - _this.state.cropSize.width) > 1e-6 || Math.abs(_this.previousCropSize.height - _this.state.cropSize.height) > 1e-6;
29551
+ if (sizeChanged) {
29552
+ var scaleX = _this.state.cropSize.width / _this.previousCropSize.width;
29553
+ var scaleY = _this.state.cropSize.height / _this.previousCropSize.height;
29554
+ adjustedCrop = {
29555
+ x: _this.props.crop.x * scaleX,
29556
+ y: _this.props.crop.y * scaleY
29557
+ };
29558
+ }
29559
+ }
29560
+ var newPosition = _this.props.restrictPosition ? restrictPosition(adjustedCrop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : adjustedCrop;
29561
+ _this.previousCropSize = _this.state.cropSize;
29562
+ _this.props.onCropChange(newPosition);
29563
+ _this.emitCropData();
29564
+ };
29565
+ _this.onKeyDown = function(event) {
29566
+ var _a, _b;
29567
+ var _c = _this.props, crop = _c.crop, onCropChange = _c.onCropChange, keyboardStep = _c.keyboardStep, zoom = _c.zoom, rotation = _c.rotation;
29568
+ var step = keyboardStep;
29569
+ if (!_this.state.cropSize) return;
29570
+ if (event.shiftKey) {
29571
+ step *= 0.2;
29572
+ }
29573
+ var newCrop = __assign({}, crop);
29574
+ switch (event.key) {
29575
+ case "ArrowUp":
29576
+ newCrop.y -= step;
29577
+ event.preventDefault();
29578
+ break;
29579
+ case "ArrowDown":
29580
+ newCrop.y += step;
29581
+ event.preventDefault();
29582
+ break;
29583
+ case "ArrowLeft":
29584
+ newCrop.x -= step;
29585
+ event.preventDefault();
29586
+ break;
29587
+ case "ArrowRight":
29588
+ newCrop.x += step;
29589
+ event.preventDefault();
29590
+ break;
29591
+ default:
29592
+ return;
29593
+ }
29594
+ if (_this.props.restrictPosition) {
29595
+ newCrop = restrictPosition(newCrop, _this.mediaSize, _this.state.cropSize, zoom, rotation);
29596
+ }
29597
+ if (!event.repeat) {
29598
+ (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);
29599
+ }
29600
+ onCropChange(newCrop);
29601
+ };
29602
+ _this.onKeyUp = function(event) {
29603
+ var _a, _b;
29604
+ switch (event.key) {
29605
+ case "ArrowUp":
29606
+ case "ArrowDown":
29607
+ case "ArrowLeft":
29608
+ case "ArrowRight":
29609
+ event.preventDefault();
29610
+ break;
29611
+ default:
29612
+ return;
29613
+ }
29614
+ _this.emitCropData();
29615
+ (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
29616
+ };
29617
+ return _this;
29618
+ }
29619
+ Cropper2.prototype.componentDidMount = function() {
29620
+ if (!this.currentDoc || !this.currentWindow) return;
29621
+ if (this.containerRef) {
29622
+ if (this.containerRef.ownerDocument) {
29623
+ this.currentDoc = this.containerRef.ownerDocument;
29624
+ }
29625
+ if (this.currentDoc.defaultView) {
29626
+ this.currentWindow = this.currentDoc.defaultView;
29627
+ }
29628
+ this.initResizeObserver();
29629
+ if (typeof window.ResizeObserver === "undefined") {
29630
+ this.currentWindow.addEventListener("resize", this.computeSizes);
29631
+ }
29632
+ this.props.zoomWithScroll && this.containerRef.addEventListener("wheel", this.onWheel, {
29633
+ passive: false
29634
+ });
29635
+ this.containerRef.addEventListener("gesturestart", this.onGestureStart);
29636
+ }
29637
+ this.currentDoc.addEventListener("scroll", this.onScroll);
29638
+ if (!this.props.disableAutomaticStylesInjection) {
29639
+ this.styleRef = this.currentDoc.createElement("style");
29640
+ this.styleRef.setAttribute("type", "text/css");
29641
+ if (this.props.nonce) {
29642
+ this.styleRef.setAttribute("nonce", this.props.nonce);
29643
+ }
29644
+ this.styleRef.innerHTML = css_248z;
29645
+ this.currentDoc.head.appendChild(this.styleRef);
29646
+ }
29647
+ if (this.imageRef.current && this.imageRef.current.complete) {
29648
+ this.onMediaLoad();
29649
+ }
29650
+ if (this.props.setImageRef) {
29651
+ this.props.setImageRef(this.imageRef);
29652
+ }
29653
+ if (this.props.setVideoRef) {
29654
+ this.props.setVideoRef(this.videoRef);
29655
+ }
29656
+ if (this.props.setCropperRef) {
29657
+ this.props.setCropperRef(this.cropperRef);
29658
+ }
29659
+ };
29660
+ Cropper2.prototype.componentWillUnmount = function() {
29661
+ var _a, _b;
29662
+ if (!this.currentDoc || !this.currentWindow) return;
29663
+ if (typeof window.ResizeObserver === "undefined") {
29664
+ this.currentWindow.removeEventListener("resize", this.computeSizes);
29665
+ }
29666
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
29667
+ if (this.containerRef) {
29668
+ this.containerRef.removeEventListener("gesturestart", this.preventZoomSafari);
29669
+ }
29670
+ if (this.styleRef) {
29671
+ (_b = this.styleRef.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.styleRef);
29672
+ }
29673
+ this.cleanEvents();
29674
+ this.props.zoomWithScroll && this.clearScrollEvent();
29675
+ };
29676
+ Cropper2.prototype.componentDidUpdate = function(prevProps) {
29677
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
29678
+ if (prevProps.rotation !== this.props.rotation) {
29679
+ this.computeSizes();
29680
+ this.recomputeCropPosition();
29681
+ } else if (prevProps.aspect !== this.props.aspect) {
29682
+ this.computeSizes();
29683
+ } else if (prevProps.objectFit !== this.props.objectFit) {
29684
+ this.computeSizes();
29685
+ } else if (prevProps.zoom !== this.props.zoom) {
29686
+ this.recomputeCropPosition();
29687
+ } else if (((_a = prevProps.cropSize) === null || _a === void 0 ? void 0 : _a.height) !== ((_b = this.props.cropSize) === null || _b === void 0 ? void 0 : _b.height) || ((_c = prevProps.cropSize) === null || _c === void 0 ? void 0 : _c.width) !== ((_d = this.props.cropSize) === null || _d === void 0 ? void 0 : _d.width)) {
29688
+ this.computeSizes();
29689
+ } else if (((_e = prevProps.crop) === null || _e === void 0 ? void 0 : _e.x) !== ((_f = this.props.crop) === null || _f === void 0 ? void 0 : _f.x) || ((_g = prevProps.crop) === null || _g === void 0 ? void 0 : _g.y) !== ((_h = this.props.crop) === null || _h === void 0 ? void 0 : _h.y)) {
29690
+ this.emitCropAreaChange();
29691
+ }
29692
+ if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {
29693
+ this.props.zoomWithScroll ? this.containerRef.addEventListener("wheel", this.onWheel, {
29694
+ passive: false
29695
+ }) : this.clearScrollEvent();
29696
+ }
29697
+ if (prevProps.video !== this.props.video) {
29698
+ (_j = this.videoRef.current) === null || _j === void 0 ? void 0 : _j.load();
29699
+ }
29700
+ var objectFit = this.getObjectFit();
29701
+ if (objectFit !== this.state.mediaObjectFit) {
29702
+ this.setState({
29703
+ mediaObjectFit: objectFit
29704
+ }, this.computeSizes);
29705
+ }
29706
+ };
29707
+ Cropper2.prototype.getAspect = function() {
29708
+ var _a = this.props, cropSize = _a.cropSize, aspect = _a.aspect;
29709
+ if (cropSize) {
29710
+ return cropSize.width / cropSize.height;
29711
+ }
29712
+ return aspect;
29713
+ };
29714
+ Cropper2.prototype.getObjectFit = function() {
29715
+ var _a, _b, _c, _d;
29716
+ if (this.props.objectFit === "cover") {
29717
+ var mediaRef = this.imageRef.current || this.videoRef.current;
29718
+ if (mediaRef && this.containerRef) {
29719
+ this.containerRect = this.containerRef.getBoundingClientRect();
29720
+ var containerAspect = this.containerRect.width / this.containerRect.height;
29721
+ var naturalWidth = ((_a = this.imageRef.current) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = this.videoRef.current) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0;
29722
+ var naturalHeight = ((_c = this.imageRef.current) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = this.videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0;
29723
+ var mediaAspect = naturalWidth / naturalHeight;
29724
+ return mediaAspect < containerAspect ? "horizontal-cover" : "vertical-cover";
29725
+ }
29726
+ return "horizontal-cover";
29727
+ }
29728
+ return this.props.objectFit;
29729
+ };
29730
+ Cropper2.prototype.onPinchStart = function(e) {
29731
+ var pointA = Cropper2.getTouchPoint(e.touches[0]);
29732
+ var pointB = Cropper2.getTouchPoint(e.touches[1]);
29733
+ this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB);
29734
+ this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB);
29735
+ this.onDragStart(getCenter(pointA, pointB));
29736
+ };
29737
+ Cropper2.prototype.onPinchMove = function(e) {
29738
+ var _this = this;
29739
+ if (!this.currentDoc || !this.currentWindow) return;
29740
+ var pointA = Cropper2.getTouchPoint(e.touches[0]);
29741
+ var pointB = Cropper2.getTouchPoint(e.touches[1]);
29742
+ var center = getCenter(pointA, pointB);
29743
+ this.onDrag(center);
29744
+ if (this.rafPinchTimeout) this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout);
29745
+ this.rafPinchTimeout = this.currentWindow.requestAnimationFrame(function() {
29746
+ var distance = getDistanceBetweenPoints(pointA, pointB);
29747
+ var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance);
29748
+ _this.setNewZoom(newZoom, center, {
29749
+ shouldUpdatePosition: false
29750
+ });
29751
+ _this.lastPinchDistance = distance;
29752
+ var rotation = getRotationBetweenPoints(pointA, pointB);
29753
+ var newRotation = _this.props.rotation + (rotation - _this.lastPinchRotation);
29754
+ _this.props.onRotationChange && _this.props.onRotationChange(newRotation);
29755
+ _this.lastPinchRotation = rotation;
29756
+ });
29757
+ };
29758
+ Cropper2.prototype.render = function() {
29759
+ var _this = this;
29760
+ var _a;
29761
+ var _b = this.props, image = _b.image, video = _b.video, mediaProps = _b.mediaProps, cropperProps = _b.cropperProps, transform = _b.transform, _c = _b.crop, x = _c.x, y = _c.y, rotation = _b.rotation, zoom = _b.zoom, cropShape = _b.cropShape, showGrid = _b.showGrid, roundCropAreaPixels = _b.roundCropAreaPixels, _d = _b.style, containerStyle = _d.containerStyle, cropAreaStyle = _d.cropAreaStyle, mediaStyle = _d.mediaStyle, _e = _b.classes, containerClassName = _e.containerClassName, cropAreaClassName = _e.cropAreaClassName, mediaClassName = _e.mediaClassName;
29762
+ var objectFit = (_a = this.state.mediaObjectFit) !== null && _a !== void 0 ? _a : this.getObjectFit();
29763
+ return React.createElement("div", {
29764
+ onMouseDown: this.onMouseDown,
29765
+ onTouchStart: this.onTouchStart,
29766
+ ref: function ref(el) {
29767
+ return _this.containerRef = el;
29768
+ },
29769
+ "data-testid": "container",
29770
+ style: containerStyle,
29771
+ className: classNames("reactEasyCrop_Container", containerClassName)
29772
+ }, image ? React.createElement("img", __assign({
29773
+ alt: "",
29774
+ className: classNames("reactEasyCrop_Image", objectFit === "contain" && "reactEasyCrop_Contain", objectFit === "horizontal-cover" && "reactEasyCrop_Cover_Horizontal", objectFit === "vertical-cover" && "reactEasyCrop_Cover_Vertical", mediaClassName)
29775
+ }, mediaProps, {
29776
+ src: image,
29777
+ ref: this.imageRef,
29778
+ style: __assign(__assign({}, mediaStyle), {
29779
+ transform: transform || "translate(".concat(x, "px, ").concat(y, "px) rotate(").concat(rotation, "deg) scale(").concat(zoom, ")")
29780
+ }),
29781
+ onLoad: this.onMediaLoad
29782
+ })) : video && React.createElement("video", __assign({
29783
+ autoPlay: true,
29784
+ playsInline: true,
29785
+ loop: true,
29786
+ muted: true,
29787
+ className: classNames("reactEasyCrop_Video", objectFit === "contain" && "reactEasyCrop_Contain", objectFit === "horizontal-cover" && "reactEasyCrop_Cover_Horizontal", objectFit === "vertical-cover" && "reactEasyCrop_Cover_Vertical", mediaClassName)
29788
+ }, mediaProps, {
29789
+ ref: this.videoRef,
29790
+ onLoadedMetadata: this.onMediaLoad,
29791
+ style: __assign(__assign({}, mediaStyle), {
29792
+ transform: transform || "translate(".concat(x, "px, ").concat(y, "px) rotate(").concat(rotation, "deg) scale(").concat(zoom, ")")
29793
+ }),
29794
+ controls: false
29795
+ }), (Array.isArray(video) ? video : [{
29796
+ src: video
29797
+ }]).map(function(item) {
29798
+ return React.createElement("source", __assign({
29799
+ key: item.src
29800
+ }, item));
29801
+ })), this.state.cropSize && React.createElement("div", __assign({
29802
+ ref: this.cropperRef,
29803
+ style: __assign(__assign({}, cropAreaStyle), {
29804
+ width: roundCropAreaPixels ? Math.round(this.state.cropSize.width) : this.state.cropSize.width,
29805
+ height: roundCropAreaPixels ? Math.round(this.state.cropSize.height) : this.state.cropSize.height
29806
+ }),
29807
+ tabIndex: 0,
29808
+ onKeyDown: this.onKeyDown,
29809
+ onKeyUp: this.onKeyUp,
29810
+ "data-testid": "cropper",
29811
+ className: classNames("reactEasyCrop_CropArea", cropShape === "round" && "reactEasyCrop_CropAreaRound", showGrid && "reactEasyCrop_CropAreaGrid", cropAreaClassName)
29812
+ }, cropperProps)));
29813
+ };
29814
+ Cropper2.defaultProps = {
29815
+ zoom: 1,
29816
+ rotation: 0,
29817
+ aspect: 4 / 3,
29818
+ maxZoom: MAX_ZOOM,
29819
+ minZoom: MIN_ZOOM,
29820
+ cropShape: "rect",
29821
+ objectFit: "contain",
29822
+ showGrid: true,
29823
+ style: {},
29824
+ classes: {},
29825
+ mediaProps: {},
29826
+ cropperProps: {},
29827
+ zoomSpeed: 1,
29828
+ restrictPosition: true,
29829
+ zoomWithScroll: true,
29830
+ keyboardStep: KEYBOARD_STEP
29831
+ };
29832
+ Cropper2.getMousePoint = function(e) {
29833
+ return {
29834
+ x: Number(e.clientX),
29835
+ y: Number(e.clientY)
29836
+ };
29837
+ };
29838
+ Cropper2.getTouchPoint = function(touch) {
29839
+ return {
29840
+ x: Number(touch.clientX),
29841
+ y: Number(touch.clientY)
29842
+ };
29843
+ };
29844
+ return Cropper2;
29845
+ })(React.Component)
29846
+ );
29847
+ async function getCroppedBlob(imageSrc, croppedAreaPixels) {
29848
+ return new Promise((resolve, reject) => {
29849
+ const image = new Image();
29850
+ image.addEventListener("load", () => {
29851
+ const canvas = document.createElement("canvas");
29852
+ canvas.width = croppedAreaPixels.width;
29853
+ canvas.height = croppedAreaPixels.height;
29854
+ const ctx = canvas.getContext("2d");
29855
+ if (!ctx) {
29856
+ reject(new Error("Canvas 2D context unavailable"));
29857
+ return;
29858
+ }
29859
+ ctx.drawImage(
29860
+ image,
29861
+ croppedAreaPixels.x,
29862
+ croppedAreaPixels.y,
29863
+ croppedAreaPixels.width,
29864
+ croppedAreaPixels.height,
29865
+ 0,
29866
+ 0,
29867
+ croppedAreaPixels.width,
29868
+ croppedAreaPixels.height
29869
+ );
29870
+ canvas.toBlob(
29871
+ (blob) => {
29872
+ if (blob) resolve(blob);
29873
+ else reject(new Error("canvas.toBlob returned null"));
29874
+ },
29875
+ "image/jpeg",
29876
+ 0.92
29877
+ );
29878
+ });
29879
+ image.addEventListener("error", () => reject(new Error("Failed to load image for crop")));
29880
+ image.src = imageSrc;
29881
+ });
29882
+ }
29883
+ function PhotoCropModal({
29884
+ opened,
29885
+ file,
29886
+ onConfirm,
29887
+ onClose,
29888
+ onError,
29889
+ aspect = 1,
29890
+ cropShape = "round"
29891
+ }) {
29892
+ const [imageUrl, setImageUrl] = useState(null);
29893
+ const [crop, setCrop] = useState({ x: 0, y: 0 });
29894
+ const [zoom, setZoom] = useState(1);
29895
+ const [croppedAreaPixels, setCroppedAreaPixels] = useState(null);
29896
+ const [isConfirming, setIsConfirming] = useState(false);
29897
+ useEffect(() => {
29898
+ if (!file) {
29899
+ setImageUrl(null);
29900
+ setCrop({ x: 0, y: 0 });
29901
+ setZoom(1);
29902
+ setCroppedAreaPixels(null);
29903
+ return;
29904
+ }
29905
+ const url = URL.createObjectURL(file);
29906
+ setImageUrl(url);
29907
+ setCrop({ x: 0, y: 0 });
29908
+ setZoom(1);
29909
+ setCroppedAreaPixels(null);
29910
+ return () => URL.revokeObjectURL(url);
29911
+ }, [file]);
29912
+ const onCropComplete = useCallback((_croppedArea, pixels) => {
29913
+ setCroppedAreaPixels(pixels);
29914
+ }, []);
29915
+ const handleConfirm = async () => {
29916
+ if (!imageUrl || !croppedAreaPixels || isConfirming) return;
29917
+ setIsConfirming(true);
29918
+ try {
29919
+ let blob;
29920
+ try {
29921
+ blob = await getCroppedBlob(imageUrl, croppedAreaPixels);
29922
+ } catch (err) {
29923
+ onError?.(err instanceof Error ? err : new Error("Crop failed"));
29924
+ return;
29925
+ }
29926
+ try {
29927
+ await onConfirm(blob);
29928
+ } catch (err) {
29929
+ onError?.(err instanceof Error ? err : new Error("Upload failed"));
29930
+ }
29931
+ } finally {
29932
+ setIsConfirming(false);
29933
+ }
29934
+ };
29935
+ return /* @__PURE__ */ jsx(Modal, { opened, onClose, title: "Adjust photo", size: "md", children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
29936
+ /* @__PURE__ */ jsx(
29937
+ Box,
29938
+ {
29939
+ style: {
29940
+ position: "relative",
29941
+ height: 320,
29942
+ borderRadius: "var(--mantine-radius-md)",
29943
+ overflow: "hidden",
29944
+ background: neutralColors[900]
29945
+ },
29946
+ children: imageUrl && /* @__PURE__ */ jsx(
29947
+ Cropper,
29948
+ {
29949
+ image: imageUrl,
29950
+ crop,
29951
+ zoom,
29952
+ aspect,
29953
+ cropShape,
29954
+ showGrid: false,
29955
+ onCropChange: setCrop,
29956
+ onCropComplete,
29957
+ onZoomChange: setZoom,
29958
+ mediaProps: {
29959
+ onError: () => {
29960
+ onError?.(new Error("Failed to load image preview"));
29961
+ setImageUrl(null);
29962
+ setCrop({ x: 0, y: 0 });
29963
+ setZoom(1);
29964
+ setCroppedAreaPixels(null);
29965
+ }
29966
+ }
29967
+ }
29968
+ )
29969
+ }
29970
+ ),
29971
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", ta: "center", children: "Drag to reposition · Scroll or pinch to zoom" }),
29972
+ /* @__PURE__ */ jsxs(Group, { justify: "flex-end", gap: "xs", children: [
29973
+ /* @__PURE__ */ jsx(Button, { variant: "subtle", color: "gray", onClick: onClose, disabled: isConfirming, children: "Cancel" }),
29974
+ /* @__PURE__ */ jsx(Button, { onClick: handleConfirm, loading: isConfirming, disabled: !croppedAreaPixels, children: "Apply" })
29975
+ ] })
29976
+ ] }) });
29977
+ }
28641
29978
  function SearchInput({
28642
29979
  value,
28643
29980
  onChange,
@@ -28974,6 +30311,43 @@ function InvestmentCard({
28974
30311
  }
28975
30312
  );
28976
30313
  }
30314
+ function DefaultPencilIcon() {
30315
+ return /* @__PURE__ */ jsx(
30316
+ "svg",
30317
+ {
30318
+ width: "12",
30319
+ height: "12",
30320
+ viewBox: "0 0 24 24",
30321
+ fill: "none",
30322
+ stroke: "currentColor",
30323
+ strokeWidth: "2",
30324
+ strokeLinecap: "round",
30325
+ strokeLinejoin: "round",
30326
+ "aria-hidden": "true",
30327
+ children: /* @__PURE__ */ jsx("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
30328
+ }
30329
+ );
30330
+ }
30331
+ function DefaultCameraIcon() {
30332
+ return /* @__PURE__ */ jsxs(
30333
+ "svg",
30334
+ {
30335
+ width: "18",
30336
+ height: "18",
30337
+ viewBox: "0 0 24 24",
30338
+ fill: "none",
30339
+ stroke: "white",
30340
+ strokeWidth: "2",
30341
+ strokeLinecap: "round",
30342
+ strokeLinejoin: "round",
30343
+ "aria-hidden": "true",
30344
+ children: [
30345
+ /* @__PURE__ */ jsx("path", { d: "M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z" }),
30346
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "13", r: "4" })
30347
+ ]
30348
+ }
30349
+ );
30350
+ }
28977
30351
  function formatMemberSince(iso) {
28978
30352
  const date = new Date(iso);
28979
30353
  if (Number.isNaN(date.getTime())) return null;
@@ -28986,16 +30360,97 @@ function InvestorProfileCard({
28986
30360
  verificationStatus,
28987
30361
  memberSince,
28988
30362
  subtitle,
28989
- children
30363
+ children,
30364
+ onEditName,
30365
+ onUploadPhoto,
30366
+ photoUploading,
30367
+ editNameIcon,
30368
+ uploadPhotoIcon
28990
30369
  }) {
28991
30370
  const memberSinceText = memberSince ? formatMemberSince(memberSince) : null;
30371
+ const [isAvatarHovered, setIsAvatarHovered] = useState(false);
30372
+ const [isAvatarFocused, setIsAvatarFocused] = useState(false);
30373
+ const displayName = name?.trim() || "Add your name";
30374
+ const avatarEl = /* @__PURE__ */ jsx(
30375
+ Avatar,
30376
+ {
30377
+ src: avatarUrl,
30378
+ alt: displayName,
30379
+ radius: "md",
30380
+ size: 56,
30381
+ color: getAvatarColor(displayName),
30382
+ children: displayName.charAt(0).toUpperCase()
30383
+ }
30384
+ );
28992
30385
  return /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
28993
30386
  /* @__PURE__ */ jsxs(Group, { gap: "md", wrap: "nowrap", children: [
28994
- /* @__PURE__ */ jsx(Avatar, { src: avatarUrl, alt: name, radius: "md", size: 56, color: getAvatarColor(name), children: name.charAt(0).toUpperCase() }),
30387
+ onUploadPhoto ? /* @__PURE__ */ jsxs(
30388
+ Box,
30389
+ {
30390
+ component: "button",
30391
+ type: "button",
30392
+ onClick: onUploadPhoto,
30393
+ onMouseEnter: () => setIsAvatarHovered(true),
30394
+ onMouseLeave: () => setIsAvatarHovered(false),
30395
+ onFocus: () => setIsAvatarFocused(true),
30396
+ onBlur: () => setIsAvatarFocused(false),
30397
+ "aria-label": "Upload profile photo",
30398
+ disabled: !!photoUploading,
30399
+ style: {
30400
+ position: "relative",
30401
+ display: "inline-block",
30402
+ cursor: photoUploading ? "not-allowed" : "pointer",
30403
+ background: "none",
30404
+ border: "none",
30405
+ padding: 0,
30406
+ borderRadius: "var(--mantine-radius-md)",
30407
+ flexShrink: 0
30408
+ },
30409
+ children: [
30410
+ avatarEl,
30411
+ photoUploading ? /* @__PURE__ */ jsx(
30412
+ Box,
30413
+ {
30414
+ "data-testid": "photo-uploading-overlay",
30415
+ "aria-label": "Uploading photo",
30416
+ role: "status",
30417
+ style: {
30418
+ position: "absolute",
30419
+ inset: 0,
30420
+ borderRadius: "var(--mantine-radius-md)",
30421
+ backgroundColor: `${neutralColors[900]}80`,
30422
+ display: "flex",
30423
+ alignItems: "center",
30424
+ justifyContent: "center"
30425
+ },
30426
+ children: /* @__PURE__ */ jsx(Loader, { size: "xs", color: "white" })
30427
+ }
30428
+ ) : /* @__PURE__ */ jsx(
30429
+ Box,
30430
+ {
30431
+ style: {
30432
+ position: "absolute",
30433
+ inset: 0,
30434
+ borderRadius: "var(--mantine-radius-md)",
30435
+ backgroundColor: `${neutralColors[900]}73`,
30436
+ display: "flex",
30437
+ alignItems: "center",
30438
+ justifyContent: "center",
30439
+ opacity: isAvatarHovered || isAvatarFocused ? 1 : 0,
30440
+ transition: "opacity 150ms ease",
30441
+ pointerEvents: "none"
30442
+ },
30443
+ children: uploadPhotoIcon ?? /* @__PURE__ */ jsx(DefaultCameraIcon, {})
30444
+ }
30445
+ )
30446
+ ]
30447
+ }
30448
+ ) : avatarEl,
28995
30449
  /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
28996
- /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
28997
- /* @__PURE__ */ jsx(Text, { fw: 600, size: "md", children: name }),
28998
- verificationStatus && /* @__PURE__ */ jsx(StatusBadge, { status: verificationStatus, size: "xs" })
30450
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", align: "center", children: [
30451
+ /* @__PURE__ */ jsx(Text, { fw: 600, size: "md", children: displayName }),
30452
+ verificationStatus && /* @__PURE__ */ jsx(StatusBadge, { status: verificationStatus, size: "xs" }),
30453
+ onEditName && /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: "sm", onClick: onEditName, "aria-label": "Edit name", children: editNameIcon ?? /* @__PURE__ */ jsx(DefaultPencilIcon, {}) })
28999
30454
  ] }),
29000
30455
  email && /* @__PURE__ */ jsx(Text, { size: "sm", c: `${colors.neutral}.5`, children: email }),
29001
30456
  memberSinceText && /* @__PURE__ */ jsx(Text, { size: "xs", c: `${colors.neutral}.4`, children: memberSinceText }),
@@ -29267,6 +30722,7 @@ export {
29267
30722
  InvestmentCard,
29268
30723
  InvestorProfileCard,
29269
30724
  ListRow,
30725
+ Loader,
29270
30726
  LoadingSpinner,
29271
30727
  MOBILE_BREAKPOINT,
29272
30728
  Menu,
@@ -29282,6 +30738,7 @@ export {
29282
30738
  PasswordInput,
29283
30739
  Percent,
29284
30740
  PhoneField,
30741
+ PhotoCropModal,
29285
30742
  PinInput,
29286
30743
  Progress,
29287
30744
  ScrollArea,
@@ -29303,6 +30760,8 @@ export {
29303
30760
  ThemeIcon,
29304
30761
  Title,
29305
30762
  Tooltip,
30763
+ USStateField,
30764
+ US_STATES,
29306
30765
  UnstyledButton,
29307
30766
  UserMenu,
29308
30767
  WalletList,