@k3-tech/react-kit 0.0.64 → 0.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
5
5
  import * as React from "react";
6
- import React__default, { createContext, useSyncExternalStore, useEffect, useMemo, useContext, forwardRef, createElement, Fragment as Fragment$1, memo as memo$1, useRef, useCallback, useLayoutEffect, useReducer, cloneElement, Component, useState, useImperativeHandle, use as use$1, isValidElement, PureComponent } from "react";
6
+ import React__default, { createContext, useSyncExternalStore, useEffect, useMemo, useContext, forwardRef, createElement, Fragment as Fragment$1, memo as memo$1, useRef, useCallback, useLayoutEffect, useReducer, cloneElement, Component, useState, useImperativeHandle, use as use$7, isValidElement, PureComponent } from "react";
7
7
  import * as ReactDOM from "react-dom";
8
8
  import ReactDOM__default from "react-dom";
9
9
  import { useRouter, useLocation, Link as Link$1 } from "@tanstack/react-router";
@@ -4621,7 +4621,28 @@ function clsx() {
4621
4621
  for (var e2, t2, f = 0, n2 = "", o2 = arguments.length; f < o2; f++) (e2 = arguments[f]) && (t2 = r$2(e2)) && (n2 && (n2 += " "), n2 += t2);
4622
4622
  return n2;
4623
4623
  }
4624
+ const concatArrays = (array1, array2) => {
4625
+ const combinedArray = new Array(array1.length + array2.length);
4626
+ for (let i2 = 0; i2 < array1.length; i2++) {
4627
+ combinedArray[i2] = array1[i2];
4628
+ }
4629
+ for (let i2 = 0; i2 < array2.length; i2++) {
4630
+ combinedArray[array1.length + i2] = array2[i2];
4631
+ }
4632
+ return combinedArray;
4633
+ };
4634
+ const createClassValidatorObject = (classGroupId, validator) => ({
4635
+ classGroupId,
4636
+ validator
4637
+ });
4638
+ const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators2 = null, classGroupId) => ({
4639
+ nextPart,
4640
+ validators: validators2,
4641
+ classGroupId
4642
+ });
4624
4643
  const CLASS_PART_SEPARATOR = "-";
4644
+ const EMPTY_CONFLICTS = [];
4645
+ const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
4625
4646
  const createClassGroupUtils = (config2) => {
4626
4647
  const classMap = createClassMap(config2);
4627
4648
  const {
@@ -4629,104 +4650,134 @@ const createClassGroupUtils = (config2) => {
4629
4650
  conflictingClassGroupModifiers
4630
4651
  } = config2;
4631
4652
  const getClassGroupId = (className) => {
4632
- const classParts = className.split(CLASS_PART_SEPARATOR);
4633
- if (classParts[0] === "" && classParts.length !== 1) {
4634
- classParts.shift();
4653
+ if (className.startsWith("[") && className.endsWith("]")) {
4654
+ return getGroupIdForArbitraryProperty(className);
4635
4655
  }
4636
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
4656
+ const classParts = className.split(CLASS_PART_SEPARATOR);
4657
+ const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
4658
+ return getGroupRecursive(classParts, startIndex, classMap);
4637
4659
  };
4638
4660
  const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
4639
- const conflicts = conflictingClassGroups[classGroupId] || [];
4640
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
4641
- return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
4661
+ if (hasPostfixModifier) {
4662
+ const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
4663
+ const baseConflicts = conflictingClassGroups[classGroupId];
4664
+ if (modifierConflicts) {
4665
+ if (baseConflicts) {
4666
+ return concatArrays(baseConflicts, modifierConflicts);
4667
+ }
4668
+ return modifierConflicts;
4669
+ }
4670
+ return baseConflicts || EMPTY_CONFLICTS;
4642
4671
  }
4643
- return conflicts;
4672
+ return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
4644
4673
  };
4645
4674
  return {
4646
4675
  getClassGroupId,
4647
4676
  getConflictingClassGroupIds
4648
4677
  };
4649
4678
  };
4650
- const getGroupRecursive = (classParts, classPartObject) => {
4651
- var _a2;
4652
- if (classParts.length === 0) {
4679
+ const getGroupRecursive = (classParts, startIndex, classPartObject) => {
4680
+ const classPathsLength = classParts.length - startIndex;
4681
+ if (classPathsLength === 0) {
4653
4682
  return classPartObject.classGroupId;
4654
4683
  }
4655
- const currentClassPart = classParts[0];
4684
+ const currentClassPart = classParts[startIndex];
4656
4685
  const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
4657
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
4658
- if (classGroupFromNextClassPart) {
4659
- return classGroupFromNextClassPart;
4686
+ if (nextClassPartObject) {
4687
+ const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
4688
+ if (result) return result;
4660
4689
  }
4661
- if (classPartObject.validators.length === 0) {
4690
+ const validators2 = classPartObject.validators;
4691
+ if (validators2 === null) {
4662
4692
  return void 0;
4663
4693
  }
4664
- const classRest = classParts.join(CLASS_PART_SEPARATOR);
4665
- return (_a2 = classPartObject.validators.find(({
4666
- validator
4667
- }) => validator(classRest))) == null ? void 0 : _a2.classGroupId;
4668
- };
4669
- const arbitraryPropertyRegex = /^\[(.+)\]$/;
4670
- const getGroupIdForArbitraryProperty = (className) => {
4671
- if (arbitraryPropertyRegex.test(className)) {
4672
- const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
4673
- const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
4674
- if (property) {
4675
- return "arbitrary.." + property;
4694
+ const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
4695
+ const validatorsLength = validators2.length;
4696
+ for (let i2 = 0; i2 < validatorsLength; i2++) {
4697
+ const validatorObj = validators2[i2];
4698
+ if (validatorObj.validator(classRest)) {
4699
+ return validatorObj.classGroupId;
4676
4700
  }
4677
4701
  }
4702
+ return void 0;
4678
4703
  };
4704
+ const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
4705
+ const content = className.slice(1, -1);
4706
+ const colonIndex = content.indexOf(":");
4707
+ const property = content.slice(0, colonIndex);
4708
+ return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
4709
+ })();
4679
4710
  const createClassMap = (config2) => {
4680
4711
  const {
4681
4712
  theme,
4682
4713
  classGroups
4683
4714
  } = config2;
4684
- const classMap = {
4685
- nextPart: /* @__PURE__ */ new Map(),
4686
- validators: []
4687
- };
4715
+ return processClassGroups(classGroups, theme);
4716
+ };
4717
+ const processClassGroups = (classGroups, theme) => {
4718
+ const classMap = createClassPartObject();
4688
4719
  for (const classGroupId in classGroups) {
4689
- processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);
4720
+ const group = classGroups[classGroupId];
4721
+ processClassesRecursively(group, classMap, classGroupId, theme);
4690
4722
  }
4691
4723
  return classMap;
4692
4724
  };
4693
4725
  const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
4694
- classGroup.forEach((classDefinition) => {
4695
- if (typeof classDefinition === "string") {
4696
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
4697
- classPartObjectToEdit.classGroupId = classGroupId;
4698
- return;
4699
- }
4700
- if (typeof classDefinition === "function") {
4701
- if (isThemeGetter(classDefinition)) {
4702
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
4703
- return;
4704
- }
4705
- classPartObject.validators.push({
4706
- validator: classDefinition,
4707
- classGroupId
4708
- });
4709
- return;
4710
- }
4711
- Object.entries(classDefinition).forEach(([key, classGroup2]) => {
4712
- processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
4713
- });
4714
- });
4726
+ const len = classGroup.length;
4727
+ for (let i2 = 0; i2 < len; i2++) {
4728
+ const classDefinition = classGroup[i2];
4729
+ processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
4730
+ }
4731
+ };
4732
+ const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
4733
+ if (typeof classDefinition === "string") {
4734
+ processStringDefinition(classDefinition, classPartObject, classGroupId);
4735
+ return;
4736
+ }
4737
+ if (typeof classDefinition === "function") {
4738
+ processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
4739
+ return;
4740
+ }
4741
+ processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
4742
+ };
4743
+ const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
4744
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
4745
+ classPartObjectToEdit.classGroupId = classGroupId;
4746
+ };
4747
+ const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
4748
+ if (isThemeGetter(classDefinition)) {
4749
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
4750
+ return;
4751
+ }
4752
+ if (classPartObject.validators === null) {
4753
+ classPartObject.validators = [];
4754
+ }
4755
+ classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
4756
+ };
4757
+ const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
4758
+ const entries = Object.entries(classDefinition);
4759
+ const len = entries.length;
4760
+ for (let i2 = 0; i2 < len; i2++) {
4761
+ const [key, value] = entries[i2];
4762
+ processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
4763
+ }
4715
4764
  };
4716
4765
  const getPart = (classPartObject, path) => {
4717
- let currentClassPartObject = classPartObject;
4718
- path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
4719
- if (!currentClassPartObject.nextPart.has(pathPart)) {
4720
- currentClassPartObject.nextPart.set(pathPart, {
4721
- nextPart: /* @__PURE__ */ new Map(),
4722
- validators: []
4723
- });
4724
- }
4725
- currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
4726
- });
4727
- return currentClassPartObject;
4766
+ let current = classPartObject;
4767
+ const parts = path.split(CLASS_PART_SEPARATOR);
4768
+ const len = parts.length;
4769
+ for (let i2 = 0; i2 < len; i2++) {
4770
+ const part = parts[i2];
4771
+ let next = current.nextPart.get(part);
4772
+ if (!next) {
4773
+ next = createClassPartObject();
4774
+ current.nextPart.set(part, next);
4775
+ }
4776
+ current = next;
4777
+ }
4778
+ return current;
4728
4779
  };
4729
- const isThemeGetter = (func) => func.isThemeGetter;
4780
+ const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
4730
4781
  const createLruCache = (maxCacheSize) => {
4731
4782
  if (maxCacheSize < 1) {
4732
4783
  return {
@@ -4736,31 +4787,31 @@ const createLruCache = (maxCacheSize) => {
4736
4787
  };
4737
4788
  }
4738
4789
  let cacheSize = 0;
4739
- let cache2 = /* @__PURE__ */ new Map();
4740
- let previousCache = /* @__PURE__ */ new Map();
4790
+ let cache2 = /* @__PURE__ */ Object.create(null);
4791
+ let previousCache = /* @__PURE__ */ Object.create(null);
4741
4792
  const update = (key, value) => {
4742
- cache2.set(key, value);
4793
+ cache2[key] = value;
4743
4794
  cacheSize++;
4744
4795
  if (cacheSize > maxCacheSize) {
4745
4796
  cacheSize = 0;
4746
4797
  previousCache = cache2;
4747
- cache2 = /* @__PURE__ */ new Map();
4798
+ cache2 = /* @__PURE__ */ Object.create(null);
4748
4799
  }
4749
4800
  };
4750
4801
  return {
4751
4802
  get(key) {
4752
- let value = cache2.get(key);
4803
+ let value = cache2[key];
4753
4804
  if (value !== void 0) {
4754
4805
  return value;
4755
4806
  }
4756
- if ((value = previousCache.get(key)) !== void 0) {
4807
+ if ((value = previousCache[key]) !== void 0) {
4757
4808
  update(key, value);
4758
4809
  return value;
4759
4810
  }
4760
4811
  },
4761
4812
  set(key, value) {
4762
- if (cache2.has(key)) {
4763
- cache2.set(key, value);
4813
+ if (key in cache2) {
4814
+ cache2[key] = value;
4764
4815
  } else {
4765
4816
  update(key, value);
4766
4817
  }
@@ -4769,7 +4820,14 @@ const createLruCache = (maxCacheSize) => {
4769
4820
  };
4770
4821
  const IMPORTANT_MODIFIER = "!";
4771
4822
  const MODIFIER_SEPARATOR = ":";
4772
- const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
4823
+ const EMPTY_MODIFIERS = [];
4824
+ const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
4825
+ modifiers,
4826
+ hasImportantModifier,
4827
+ baseClassName,
4828
+ maybePostfixModifierPosition,
4829
+ isExternal
4830
+ });
4773
4831
  const createParseClassName = (config2) => {
4774
4832
  const {
4775
4833
  prefix,
@@ -4781,12 +4839,13 @@ const createParseClassName = (config2) => {
4781
4839
  let parenDepth = 0;
4782
4840
  let modifierStart = 0;
4783
4841
  let postfixModifierPosition;
4784
- for (let index2 = 0; index2 < className.length; index2++) {
4785
- let currentCharacter = className[index2];
4842
+ const len = className.length;
4843
+ for (let index2 = 0; index2 < len; index2++) {
4844
+ const currentCharacter = className[index2];
4786
4845
  if (bracketDepth === 0 && parenDepth === 0) {
4787
4846
  if (currentCharacter === MODIFIER_SEPARATOR) {
4788
4847
  modifiers.push(className.slice(modifierStart, index2));
4789
- modifierStart = index2 + MODIFIER_SEPARATOR_LENGTH;
4848
+ modifierStart = index2 + 1;
4790
4849
  continue;
4791
4850
  }
4792
4851
  if (currentCharacter === "/") {
@@ -4794,37 +4853,34 @@ const createParseClassName = (config2) => {
4794
4853
  continue;
4795
4854
  }
4796
4855
  }
4797
- if (currentCharacter === "[") {
4798
- bracketDepth++;
4799
- } else if (currentCharacter === "]") {
4800
- bracketDepth--;
4801
- } else if (currentCharacter === "(") {
4802
- parenDepth++;
4803
- } else if (currentCharacter === ")") {
4804
- parenDepth--;
4805
- }
4856
+ if (currentCharacter === "[") bracketDepth++;
4857
+ else if (currentCharacter === "]") bracketDepth--;
4858
+ else if (currentCharacter === "(") parenDepth++;
4859
+ else if (currentCharacter === ")") parenDepth--;
4860
+ }
4861
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
4862
+ let baseClassName = baseClassNameWithImportantModifier;
4863
+ let hasImportantModifier = false;
4864
+ if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
4865
+ baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
4866
+ hasImportantModifier = true;
4867
+ } else if (
4868
+ /**
4869
+ * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
4870
+ * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
4871
+ */
4872
+ baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
4873
+ ) {
4874
+ baseClassName = baseClassNameWithImportantModifier.slice(1);
4875
+ hasImportantModifier = true;
4806
4876
  }
4807
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
4808
- const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
4809
- const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
4810
4877
  const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
4811
- return {
4812
- modifiers,
4813
- hasImportantModifier,
4814
- baseClassName,
4815
- maybePostfixModifierPosition
4816
- };
4878
+ return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
4817
4879
  };
4818
4880
  if (prefix) {
4819
4881
  const fullPrefix = prefix + MODIFIER_SEPARATOR;
4820
4882
  const parseClassNameOriginal = parseClassName;
4821
- parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
4822
- isExternal: true,
4823
- modifiers: [],
4824
- hasImportantModifier: false,
4825
- baseClassName: className,
4826
- maybePostfixModifierPosition: void 0
4827
- };
4883
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
4828
4884
  }
4829
4885
  if (experimentalParseClassName) {
4830
4886
  const parseClassNameOriginal = parseClassName;
@@ -4835,36 +4891,35 @@ const createParseClassName = (config2) => {
4835
4891
  }
4836
4892
  return parseClassName;
4837
4893
  };
4838
- const stripImportantModifier = (baseClassName) => {
4839
- if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
4840
- return baseClassName.substring(0, baseClassName.length - 1);
4841
- }
4842
- if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
4843
- return baseClassName.substring(1);
4844
- }
4845
- return baseClassName;
4846
- };
4847
4894
  const createSortModifiers = (config2) => {
4848
- const orderSensitiveModifiers = Object.fromEntries(config2.orderSensitiveModifiers.map((modifier) => [modifier, true]));
4849
- const sortModifiers = (modifiers) => {
4850
- if (modifiers.length <= 1) {
4851
- return modifiers;
4852
- }
4853
- const sortedModifiers = [];
4854
- let unsortedModifiers = [];
4855
- modifiers.forEach((modifier) => {
4856
- const isPositionSensitive = modifier[0] === "[" || orderSensitiveModifiers[modifier];
4857
- if (isPositionSensitive) {
4858
- sortedModifiers.push(...unsortedModifiers.sort(), modifier);
4859
- unsortedModifiers = [];
4895
+ const modifierWeights = /* @__PURE__ */ new Map();
4896
+ config2.orderSensitiveModifiers.forEach((mod, index2) => {
4897
+ modifierWeights.set(mod, 1e6 + index2);
4898
+ });
4899
+ return (modifiers) => {
4900
+ const result = [];
4901
+ let currentSegment = [];
4902
+ for (let i2 = 0; i2 < modifiers.length; i2++) {
4903
+ const modifier = modifiers[i2];
4904
+ const isArbitrary = modifier[0] === "[";
4905
+ const isOrderSensitive = modifierWeights.has(modifier);
4906
+ if (isArbitrary || isOrderSensitive) {
4907
+ if (currentSegment.length > 0) {
4908
+ currentSegment.sort();
4909
+ result.push(...currentSegment);
4910
+ currentSegment = [];
4911
+ }
4912
+ result.push(modifier);
4860
4913
  } else {
4861
- unsortedModifiers.push(modifier);
4914
+ currentSegment.push(modifier);
4862
4915
  }
4863
- });
4864
- sortedModifiers.push(...unsortedModifiers.sort());
4865
- return sortedModifiers;
4916
+ }
4917
+ if (currentSegment.length > 0) {
4918
+ currentSegment.sort();
4919
+ result.push(...currentSegment);
4920
+ }
4921
+ return result;
4866
4922
  };
4867
- return sortModifiers;
4868
4923
  };
4869
4924
  const createConfigUtils = (config2) => ({
4870
4925
  cache: createLruCache(config2.cacheSize),
@@ -4910,10 +4965,10 @@ const mergeClassList = (classList, configUtils) => {
4910
4965
  }
4911
4966
  hasPostfixModifier = false;
4912
4967
  }
4913
- const variantModifier = sortModifiers(modifiers).join(":");
4968
+ const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
4914
4969
  const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
4915
4970
  const classId = modifierId + classGroupId;
4916
- if (classGroupsInConflict.includes(classId)) {
4971
+ if (classGroupsInConflict.indexOf(classId) > -1) {
4917
4972
  continue;
4918
4973
  }
4919
4974
  classGroupsInConflict.push(classId);
@@ -4926,13 +4981,13 @@ const mergeClassList = (classList, configUtils) => {
4926
4981
  }
4927
4982
  return result;
4928
4983
  };
4929
- function twJoin() {
4984
+ const twJoin = (...classLists) => {
4930
4985
  let index2 = 0;
4931
4986
  let argument;
4932
4987
  let resolvedValue;
4933
4988
  let string2 = "";
4934
- while (index2 < arguments.length) {
4935
- if (argument = arguments[index2++]) {
4989
+ while (index2 < classLists.length) {
4990
+ if (argument = classLists[index2++]) {
4936
4991
  if (resolvedValue = toValue(argument)) {
4937
4992
  string2 && (string2 += " ");
4938
4993
  string2 += resolvedValue;
@@ -4940,7 +4995,7 @@ function twJoin() {
4940
4995
  }
4941
4996
  }
4942
4997
  return string2;
4943
- }
4998
+ };
4944
4999
  const toValue = (mix) => {
4945
5000
  if (typeof mix === "string") {
4946
5001
  return mix;
@@ -4957,20 +5012,20 @@ const toValue = (mix) => {
4957
5012
  }
4958
5013
  return string2;
4959
5014
  };
4960
- function createTailwindMerge(createConfigFirst, ...createConfigRest) {
5015
+ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
4961
5016
  let configUtils;
4962
5017
  let cacheGet;
4963
5018
  let cacheSet;
4964
- let functionToCall = initTailwindMerge;
4965
- function initTailwindMerge(classList) {
5019
+ let functionToCall;
5020
+ const initTailwindMerge = (classList) => {
4966
5021
  const config2 = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
4967
5022
  configUtils = createConfigUtils(config2);
4968
5023
  cacheGet = configUtils.cache.get;
4969
5024
  cacheSet = configUtils.cache.set;
4970
5025
  functionToCall = tailwindMerge;
4971
5026
  return tailwindMerge(classList);
4972
- }
4973
- function tailwindMerge(classList) {
5027
+ };
5028
+ const tailwindMerge = (classList) => {
4974
5029
  const cachedResult = cacheGet(classList);
4975
5030
  if (cachedResult) {
4976
5031
  return cachedResult;
@@ -4978,13 +5033,13 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
4978
5033
  const result = mergeClassList(classList, configUtils);
4979
5034
  cacheSet(classList, result);
4980
5035
  return result;
4981
- }
4982
- return function callTailwindMerge() {
4983
- return functionToCall(twJoin.apply(null, arguments));
4984
5036
  };
4985
- }
5037
+ functionToCall = initTailwindMerge;
5038
+ return (...args) => functionToCall(twJoin(...args));
5039
+ };
5040
+ const fallbackThemeArr = [];
4986
5041
  const fromTheme = (key) => {
4987
- const themeGetter = (theme) => theme[key] || [];
5042
+ const themeGetter = (theme) => theme[key] || fallbackThemeArr;
4988
5043
  themeGetter.isThemeGetter = true;
4989
5044
  return themeGetter;
4990
5045
  };
@@ -7592,7 +7647,7 @@ function createContext2(rootComponentName, defaultContext) {
7592
7647
  }
7593
7648
  return [Provider2, useContext2];
7594
7649
  }
7595
- function createContextScope(scopeName, createContextScopeDeps = []) {
7650
+ function createContextScope$2(scopeName, createContextScopeDeps = []) {
7596
7651
  let defaultContexts = [];
7597
7652
  function createContext3(rootComponentName, defaultContext) {
7598
7653
  const BaseContext = React.createContext(defaultContext);
@@ -7629,9 +7684,9 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
7629
7684
  };
7630
7685
  };
7631
7686
  createScope.scopeName = scopeName;
7632
- return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
7687
+ return [createContext3, composeContextScopes$2(createScope, ...createContextScopeDeps)];
7633
7688
  }
7634
- function composeContextScopes(...scopes) {
7689
+ function composeContextScopes$2(...scopes) {
7635
7690
  const baseScope = scopes[0];
7636
7691
  if (scopes.length === 1) return baseScope;
7637
7692
  const createScope = () => {
@@ -7651,18 +7706,18 @@ function composeContextScopes(...scopes) {
7651
7706
  createScope.scopeName = baseScope.scopeName;
7652
7707
  return createScope;
7653
7708
  }
7654
- function setRef$2(ref, value) {
7709
+ function setRef$1(ref, value) {
7655
7710
  if (typeof ref === "function") {
7656
7711
  return ref(value);
7657
7712
  } else if (ref !== null && ref !== void 0) {
7658
7713
  ref.current = value;
7659
7714
  }
7660
7715
  }
7661
- function composeRefs$2(...refs) {
7716
+ function composeRefs$1(...refs) {
7662
7717
  return (node) => {
7663
7718
  let hasCleanup = false;
7664
7719
  const cleanups = refs.map((ref) => {
7665
- const cleanup = setRef$2(ref, node);
7720
+ const cleanup = setRef$1(ref, node);
7666
7721
  if (!hasCleanup && typeof cleanup == "function") {
7667
7722
  hasCleanup = true;
7668
7723
  }
@@ -7675,7 +7730,7 @@ function composeRefs$2(...refs) {
7675
7730
  if (typeof cleanup == "function") {
7676
7731
  cleanup();
7677
7732
  } else {
7678
- setRef$2(refs[i2], null);
7733
+ setRef$1(refs[i2], null);
7679
7734
  }
7680
7735
  }
7681
7736
  };
@@ -7683,15 +7738,15 @@ function composeRefs$2(...refs) {
7683
7738
  };
7684
7739
  }
7685
7740
  function useComposedRefs$1(...refs) {
7686
- return React.useCallback(composeRefs$2(...refs), refs);
7741
+ return React.useCallback(composeRefs$1(...refs), refs);
7687
7742
  }
7688
7743
  // @__NO_SIDE_EFFECTS__
7689
- function createSlot$1(ownerName) {
7690
- const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
7744
+ function createSlot$7(ownerName) {
7745
+ const SlotClone = /* @__PURE__ */ createSlotClone$7(ownerName);
7691
7746
  const Slot2 = React.forwardRef((props2, forwardedRef) => {
7692
7747
  const { children, ...slotProps } = props2;
7693
7748
  const childrenArray = React.Children.toArray(children);
7694
- const slottable = childrenArray.find(isSlottable$1);
7749
+ const slottable = childrenArray.find(isSlottable$7);
7695
7750
  if (slottable) {
7696
7751
  const newElement = slottable.props.children;
7697
7752
  const newChildren = childrenArray.map((child) => {
@@ -7710,14 +7765,14 @@ function createSlot$1(ownerName) {
7710
7765
  return Slot2;
7711
7766
  }
7712
7767
  // @__NO_SIDE_EFFECTS__
7713
- function createSlotClone$1(ownerName) {
7768
+ function createSlotClone$7(ownerName) {
7714
7769
  const SlotClone = React.forwardRef((props2, forwardedRef) => {
7715
7770
  const { children, ...slotProps } = props2;
7716
7771
  if (React.isValidElement(children)) {
7717
- const childrenRef = getElementRef$2(children);
7718
- const props22 = mergeProps$1(slotProps, children.props);
7772
+ const childrenRef = getElementRef$8(children);
7773
+ const props22 = mergeProps$7(slotProps, children.props);
7719
7774
  if (children.type !== React.Fragment) {
7720
- props22.ref = forwardedRef ? composeRefs$2(forwardedRef, childrenRef) : childrenRef;
7775
+ props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
7721
7776
  }
7722
7777
  return React.cloneElement(children, props22);
7723
7778
  }
@@ -7726,20 +7781,20 @@ function createSlotClone$1(ownerName) {
7726
7781
  SlotClone.displayName = `${ownerName}.SlotClone`;
7727
7782
  return SlotClone;
7728
7783
  }
7729
- var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
7784
+ var SLOTTABLE_IDENTIFIER$7 = Symbol("radix.slottable");
7730
7785
  // @__NO_SIDE_EFFECTS__
7731
7786
  function createSlottable(ownerName) {
7732
7787
  const Slottable2 = ({ children }) => {
7733
7788
  return /* @__PURE__ */ jsx(Fragment, { children });
7734
7789
  };
7735
7790
  Slottable2.displayName = `${ownerName}.Slottable`;
7736
- Slottable2.__radixId = SLOTTABLE_IDENTIFIER$1;
7791
+ Slottable2.__radixId = SLOTTABLE_IDENTIFIER$7;
7737
7792
  return Slottable2;
7738
7793
  }
7739
- function isSlottable$1(child) {
7740
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
7794
+ function isSlottable$7(child) {
7795
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$7;
7741
7796
  }
7742
- function mergeProps$1(slotProps, childProps) {
7797
+ function mergeProps$7(slotProps, childProps) {
7743
7798
  const overrideProps = { ...childProps };
7744
7799
  for (const propName in childProps) {
7745
7800
  const slotPropValue = slotProps[propName];
@@ -7763,7 +7818,7 @@ function mergeProps$1(slotProps, childProps) {
7763
7818
  }
7764
7819
  return { ...slotProps, ...overrideProps };
7765
7820
  }
7766
- function getElementRef$2(element) {
7821
+ function getElementRef$8(element) {
7767
7822
  var _a2, _b;
7768
7823
  let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
7769
7824
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -7779,7 +7834,7 @@ function getElementRef$2(element) {
7779
7834
  }
7780
7835
  function createCollection(name) {
7781
7836
  const PROVIDER_NAME2 = name + "CollectionProvider";
7782
- const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME2);
7837
+ const [createCollectionContext, createCollectionScope2] = createContextScope$2(PROVIDER_NAME2);
7783
7838
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
7784
7839
  PROVIDER_NAME2,
7785
7840
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
@@ -7792,7 +7847,7 @@ function createCollection(name) {
7792
7847
  };
7793
7848
  CollectionProvider.displayName = PROVIDER_NAME2;
7794
7849
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
7795
- const CollectionSlotImpl = /* @__PURE__ */ createSlot$1(COLLECTION_SLOT_NAME);
7850
+ const CollectionSlotImpl = /* @__PURE__ */ createSlot$7(COLLECTION_SLOT_NAME);
7796
7851
  const CollectionSlot = React__default.forwardRef(
7797
7852
  (props2, forwardedRef) => {
7798
7853
  const { scope, children } = props2;
@@ -7804,7 +7859,7 @@ function createCollection(name) {
7804
7859
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
7805
7860
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
7806
7861
  const ITEM_DATA_ATTR = "data-radix-collection-item";
7807
- const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$1(ITEM_SLOT_NAME);
7862
+ const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$7(ITEM_SLOT_NAME);
7808
7863
  const CollectionItemSlot = React__default.forwardRef(
7809
7864
  (props2, forwardedRef) => {
7810
7865
  const { scope, children, ...itemData } = props2;
@@ -7915,7 +7970,7 @@ function useUncontrolledState$1({
7915
7970
  function isFunction$3(value) {
7916
7971
  return typeof value === "function";
7917
7972
  }
7918
- var NODES = [
7973
+ var NODES$6 = [
7919
7974
  "a",
7920
7975
  "button",
7921
7976
  "div",
@@ -7934,8 +7989,8 @@ var NODES = [
7934
7989
  "svg",
7935
7990
  "ul"
7936
7991
  ];
7937
- var Primitive = NODES.reduce((primitive, node) => {
7938
- const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
7992
+ var Primitive$6 = NODES$6.reduce((primitive, node) => {
7993
+ const Slot2 = /* @__PURE__ */ createSlot$7(`Primitive.${node}`);
7939
7994
  const Node2 = React.forwardRef((props2, forwardedRef) => {
7940
7995
  const { asChild, ...primitiveProps } = props2;
7941
7996
  const Comp = asChild ? Slot2 : node;
@@ -7960,7 +8015,7 @@ var Presence = (props2) => {
7960
8015
  const { present, children } = props2;
7961
8016
  const presence = usePresence(present);
7962
8017
  const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
7963
- const ref = useComposedRefs$1(presence.ref, getElementRef$1(child));
8018
+ const ref = useComposedRefs$1(presence.ref, getElementRef$7(child));
7964
8019
  const forceMount = typeof children === "function";
7965
8020
  return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;
7966
8021
  };
@@ -8059,7 +8114,7 @@ function usePresence(present) {
8059
8114
  function getAnimationName(styles) {
8060
8115
  return (styles == null ? void 0 : styles.animationName) || "none";
8061
8116
  }
8062
- function getElementRef$1(element) {
8117
+ function getElementRef$7(element) {
8063
8118
  var _a2, _b;
8064
8119
  let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
8065
8120
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -8083,7 +8138,7 @@ function useId$1(deterministicId) {
8083
8138
  return deterministicId || (id ? `radix-${id}` : "");
8084
8139
  }
8085
8140
  var COLLAPSIBLE_NAME = "Collapsible";
8086
- var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
8141
+ var [createCollapsibleContext, createCollapsibleScope] = createContextScope$2(COLLAPSIBLE_NAME);
8087
8142
  var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
8088
8143
  var Collapsible$1 = React.forwardRef(
8089
8144
  (props2, forwardedRef) => {
@@ -8110,7 +8165,7 @@ var Collapsible$1 = React.forwardRef(
8110
8165
  open,
8111
8166
  onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
8112
8167
  children: /* @__PURE__ */ jsx(
8113
- Primitive.div,
8168
+ Primitive$6.div,
8114
8169
  {
8115
8170
  "data-state": getState$7(open),
8116
8171
  "data-disabled": disabled ? "" : void 0,
@@ -8129,7 +8184,7 @@ var CollapsibleTrigger$1 = React.forwardRef(
8129
8184
  const { __scopeCollapsible, ...triggerProps } = props2;
8130
8185
  const context = useCollapsibleContext(TRIGGER_NAME$d, __scopeCollapsible);
8131
8186
  return /* @__PURE__ */ jsx(
8132
- Primitive.button,
8187
+ Primitive$6.button,
8133
8188
  {
8134
8189
  type: "button",
8135
8190
  "aria-controls": context.contentId,
@@ -8191,7 +8246,7 @@ var CollapsibleContentImpl = React.forwardRef((props2, forwardedRef) => {
8191
8246
  }
8192
8247
  }, [context.open, present]);
8193
8248
  return /* @__PURE__ */ jsx(
8194
- Primitive.div,
8249
+ Primitive$6.div,
8195
8250
  {
8196
8251
  "data-state": getState$7(context.open),
8197
8252
  "data-disabled": context.disabled ? "" : void 0,
@@ -8222,7 +8277,7 @@ function useDirection(localDir) {
8222
8277
  var ACCORDION_NAME = "Accordion";
8223
8278
  var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
8224
8279
  var [Collection$6, useCollection$6, createCollectionScope$6] = createCollection(ACCORDION_NAME);
8225
- var [createAccordionContext] = createContextScope(ACCORDION_NAME, [
8280
+ var [createAccordionContext] = createContextScope$2(ACCORDION_NAME, [
8226
8281
  createCollectionScope$6,
8227
8282
  createCollapsibleScope
8228
8283
  ]);
@@ -8385,7 +8440,7 @@ var AccordionImpl = React__default.forwardRef(
8385
8440
  direction: dir,
8386
8441
  orientation,
8387
8442
  children: /* @__PURE__ */ jsx(Collection$6.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(
8388
- Primitive.div,
8443
+ Primitive$6.div,
8389
8444
  {
8390
8445
  ...accordionProps,
8391
8446
  "data-orientation": orientation,
@@ -8446,7 +8501,7 @@ var AccordionHeader = React__default.forwardRef(
8446
8501
  const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
8447
8502
  const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
8448
8503
  return /* @__PURE__ */ jsx(
8449
- Primitive.h3,
8504
+ Primitive$6.h3,
8450
8505
  {
8451
8506
  "data-orientation": accordionContext.orientation,
8452
8507
  "data-state": getState$6(itemContext.open),
@@ -8568,55 +8623,24 @@ function AccordionContent({
8568
8623
  }
8569
8624
  );
8570
8625
  }
8571
- function setRef$1(ref, value) {
8572
- if (typeof ref === "function") {
8573
- return ref(value);
8574
- } else if (ref !== null && ref !== void 0) {
8575
- ref.current = value;
8576
- }
8577
- }
8578
- function composeRefs$1(...refs) {
8579
- return (node) => {
8580
- let hasCleanup = false;
8581
- const cleanups = refs.map((ref) => {
8582
- const cleanup = setRef$1(ref, node);
8583
- if (!hasCleanup && typeof cleanup == "function") {
8584
- hasCleanup = true;
8585
- }
8586
- return cleanup;
8587
- });
8588
- if (hasCleanup) {
8589
- return () => {
8590
- for (let i2 = 0; i2 < cleanups.length; i2++) {
8591
- const cleanup = cleanups[i2];
8592
- if (typeof cleanup == "function") {
8593
- cleanup();
8594
- } else {
8595
- setRef$1(refs[i2], null);
8596
- }
8597
- }
8598
- };
8599
- }
8600
- };
8601
- }
8602
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
8603
- var use = React[" use ".trim().toString()];
8604
- function isPromiseLike(value) {
8626
+ var REACT_LAZY_TYPE$6 = Symbol.for("react.lazy");
8627
+ var use$6 = React[" use ".trim().toString()];
8628
+ function isPromiseLike$6(value) {
8605
8629
  return typeof value === "object" && value !== null && "then" in value;
8606
8630
  }
8607
- function isLazyComponent(element) {
8608
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
8631
+ function isLazyComponent$6(element) {
8632
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$6 && "_payload" in element && isPromiseLike$6(element._payload);
8609
8633
  }
8610
8634
  // @__NO_SIDE_EFFECTS__
8611
- function createSlot(ownerName) {
8612
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
8635
+ function createSlot$6(ownerName) {
8636
+ const SlotClone = /* @__PURE__ */ createSlotClone$6(ownerName);
8613
8637
  const Slot2 = React.forwardRef((props2, forwardedRef) => {
8614
8638
  let { children, ...slotProps } = props2;
8615
- if (isLazyComponent(children) && typeof use === "function") {
8616
- children = use(children._payload);
8639
+ if (isLazyComponent$6(children) && typeof use$6 === "function") {
8640
+ children = use$6(children._payload);
8617
8641
  }
8618
8642
  const childrenArray = React.Children.toArray(children);
8619
- const slottable = childrenArray.find(isSlottable);
8643
+ const slottable = childrenArray.find(isSlottable$6);
8620
8644
  if (slottable) {
8621
8645
  const newElement = slottable.props.children;
8622
8646
  const newChildren = childrenArray.map((child) => {
@@ -8634,17 +8658,17 @@ function createSlot(ownerName) {
8634
8658
  Slot2.displayName = `${ownerName}.Slot`;
8635
8659
  return Slot2;
8636
8660
  }
8637
- var Slot$4 = /* @__PURE__ */ createSlot("Slot");
8661
+ var Slot$4 = /* @__PURE__ */ createSlot$6("Slot");
8638
8662
  // @__NO_SIDE_EFFECTS__
8639
- function createSlotClone(ownerName) {
8663
+ function createSlotClone$6(ownerName) {
8640
8664
  const SlotClone = React.forwardRef((props2, forwardedRef) => {
8641
8665
  let { children, ...slotProps } = props2;
8642
- if (isLazyComponent(children) && typeof use === "function") {
8643
- children = use(children._payload);
8666
+ if (isLazyComponent$6(children) && typeof use$6 === "function") {
8667
+ children = use$6(children._payload);
8644
8668
  }
8645
8669
  if (React.isValidElement(children)) {
8646
- const childrenRef = getElementRef(children);
8647
- const props22 = mergeProps(slotProps, children.props);
8670
+ const childrenRef = getElementRef$6(children);
8671
+ const props22 = mergeProps$6(slotProps, children.props);
8648
8672
  if (children.type !== React.Fragment) {
8649
8673
  props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
8650
8674
  }
@@ -8655,11 +8679,11 @@ function createSlotClone(ownerName) {
8655
8679
  SlotClone.displayName = `${ownerName}.SlotClone`;
8656
8680
  return SlotClone;
8657
8681
  }
8658
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
8659
- function isSlottable(child) {
8660
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
8682
+ var SLOTTABLE_IDENTIFIER$6 = Symbol("radix.slottable");
8683
+ function isSlottable$6(child) {
8684
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$6;
8661
8685
  }
8662
- function mergeProps(slotProps, childProps) {
8686
+ function mergeProps$6(slotProps, childProps) {
8663
8687
  const overrideProps = { ...childProps };
8664
8688
  for (const propName in childProps) {
8665
8689
  const slotPropValue = slotProps[propName];
@@ -8683,7 +8707,7 @@ function mergeProps(slotProps, childProps) {
8683
8707
  }
8684
8708
  return { ...slotProps, ...overrideProps };
8685
8709
  }
8686
- function getElementRef(element) {
8710
+ function getElementRef$6(element) {
8687
8711
  var _a2, _b;
8688
8712
  let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
8689
8713
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -8824,7 +8848,7 @@ function useSize(element) {
8824
8848
  return size2;
8825
8849
  }
8826
8850
  var CHECKBOX_NAME = "Checkbox";
8827
- var [createCheckboxContext] = createContextScope(CHECKBOX_NAME);
8851
+ var [createCheckboxContext] = createContextScope$2(CHECKBOX_NAME);
8828
8852
  var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
8829
8853
  function CheckboxProvider(props2) {
8830
8854
  const {
@@ -8905,7 +8929,7 @@ var CheckboxTrigger = React.forwardRef(
8905
8929
  }
8906
8930
  }, [control, setChecked]);
8907
8931
  return /* @__PURE__ */ jsx(
8908
- Primitive.button,
8932
+ Primitive$6.button,
8909
8933
  {
8910
8934
  type: "button",
8911
8935
  role: "checkbox",
@@ -8989,7 +9013,7 @@ var CheckboxIndicator = React.forwardRef(
8989
9013
  {
8990
9014
  present: forceMount || isIndeterminate$1(context.checked) || context.checked === true,
8991
9015
  children: /* @__PURE__ */ jsx(
8992
- Primitive.span,
9016
+ Primitive$6.span,
8993
9017
  {
8994
9018
  "data-state": getState$5(context.checked),
8995
9019
  "data-disabled": context.disabled ? "" : void 0,
@@ -9041,7 +9065,7 @@ var CheckboxBubbleInput = React.forwardRef(
9041
9065
  }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
9042
9066
  const defaultCheckedRef = React.useRef(isIndeterminate$1(checked) ? false : checked);
9043
9067
  return /* @__PURE__ */ jsx(
9044
- Primitive.input,
9068
+ Primitive$6.input,
9045
9069
  {
9046
9070
  type: "checkbox",
9047
9071
  "aria-hidden": true,
@@ -9183,7 +9207,7 @@ function TableHead({ className, ...props2 }) {
9183
9207
  {
9184
9208
  "data-slot": "table-head",
9185
9209
  className: cn$1(
9186
- "bg-primary text-white h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
9210
+ "bg-[#30A4A1] text-white h-10 px-2 text-left align-middle font-bold whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
9187
9211
  className
9188
9212
  ),
9189
9213
  ...props2
@@ -9426,7 +9450,7 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
9426
9450
  var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
9427
9451
  function deepEqual$1(object1, object2, _internal_visited = /* @__PURE__ */ new WeakSet()) {
9428
9452
  if (isPrimitive(object1) || isPrimitive(object2)) {
9429
- return object1 === object2;
9453
+ return Object.is(object1, object2);
9430
9454
  }
9431
9455
  if (isDateObject(object1) && isDateObject(object2)) {
9432
9456
  return object1.getTime() === object2.getTime();
@@ -9448,7 +9472,7 @@ function deepEqual$1(object1, object2, _internal_visited = /* @__PURE__ */ new W
9448
9472
  }
9449
9473
  if (key !== "ref") {
9450
9474
  const val2 = object2[key];
9451
- if (isDateObject(val1) && isDateObject(val2) || isObject$5(val1) && isObject$5(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$1(val1, val2, _internal_visited) : val1 !== val2) {
9475
+ if (isDateObject(val1) && isDateObject(val2) || isObject$5(val1) && isObject$5(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$1(val1, val2, _internal_visited) : !Object.is(val1, val2)) {
9452
9476
  return false;
9453
9477
  }
9454
9478
  }
@@ -9461,48 +9485,76 @@ function useWatch(props2) {
9461
9485
  const _defaultValue = React__default.useRef(defaultValue);
9462
9486
  const _compute = React__default.useRef(compute);
9463
9487
  const _computeFormValues = React__default.useRef(void 0);
9488
+ const _prevControl = React__default.useRef(control);
9489
+ const _prevName = React__default.useRef(name);
9464
9490
  _compute.current = compute;
9465
- const defaultValueMemo = React__default.useMemo(() => control._getWatch(name, _defaultValue.current), [control, name]);
9466
- const [value, updateValue] = React__default.useState(_compute.current ? _compute.current(defaultValueMemo) : defaultValueMemo);
9467
- useIsomorphicLayoutEffect$4(() => control._subscribe({
9468
- name,
9469
- formState: {
9470
- values: true
9471
- },
9472
- exact,
9473
- callback: (formState) => {
9474
- if (!disabled) {
9475
- const formValues = generateWatchOutput(name, control._names, formState.values || control._formValues, false, _defaultValue.current);
9476
- if (_compute.current) {
9477
- const computedFormValues = _compute.current(formValues);
9478
- if (!deepEqual$1(computedFormValues, _computeFormValues.current)) {
9479
- updateValue(computedFormValues);
9480
- _computeFormValues.current = computedFormValues;
9481
- }
9482
- } else {
9483
- updateValue(formValues);
9491
+ const [value, updateValue] = React__default.useState(() => {
9492
+ const defaultValue2 = control._getWatch(name, _defaultValue.current);
9493
+ return _compute.current ? _compute.current(defaultValue2) : defaultValue2;
9494
+ });
9495
+ const getCurrentOutput = React__default.useCallback((values) => {
9496
+ const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);
9497
+ return _compute.current ? _compute.current(formValues) : formValues;
9498
+ }, [control._formValues, control._names, name]);
9499
+ const refreshValue = React__default.useCallback((values) => {
9500
+ if (!disabled) {
9501
+ const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);
9502
+ if (_compute.current) {
9503
+ const computedFormValues = _compute.current(formValues);
9504
+ if (!deepEqual$1(computedFormValues, _computeFormValues.current)) {
9505
+ updateValue(computedFormValues);
9506
+ _computeFormValues.current = computedFormValues;
9484
9507
  }
9508
+ } else {
9509
+ updateValue(formValues);
9485
9510
  }
9486
9511
  }
9487
- }), [control, disabled, name, exact]);
9512
+ }, [control._formValues, control._names, disabled, name]);
9513
+ useIsomorphicLayoutEffect$4(() => {
9514
+ if (_prevControl.current !== control || !deepEqual$1(_prevName.current, name)) {
9515
+ _prevControl.current = control;
9516
+ _prevName.current = name;
9517
+ refreshValue();
9518
+ }
9519
+ return control._subscribe({
9520
+ name,
9521
+ formState: {
9522
+ values: true
9523
+ },
9524
+ exact,
9525
+ callback: (formState) => {
9526
+ refreshValue(formState.values);
9527
+ }
9528
+ });
9529
+ }, [control, exact, name, refreshValue]);
9488
9530
  React__default.useEffect(() => control._removeUnmounted());
9489
- return value;
9531
+ const controlChanged = _prevControl.current !== control;
9532
+ const prevName = _prevName.current;
9533
+ const computedOutput = React__default.useMemo(() => {
9534
+ if (disabled) {
9535
+ return null;
9536
+ }
9537
+ const nameChanged = !controlChanged && !deepEqual$1(prevName, name);
9538
+ const shouldReturnImmediate = controlChanged || nameChanged;
9539
+ return shouldReturnImmediate ? getCurrentOutput() : null;
9540
+ }, [disabled, controlChanged, name, prevName, getCurrentOutput]);
9541
+ return computedOutput !== null ? computedOutput : value;
9490
9542
  }
9491
9543
  function useController(props2) {
9492
9544
  const methods = useFormContext();
9493
- const { name, disabled, control = methods.control, shouldUnregister, defaultValue } = props2;
9545
+ const { name, disabled, control = methods.control, shouldUnregister, defaultValue, exact = true } = props2;
9494
9546
  const isArrayField = isNameInFieldArray(control._names.array, name);
9495
9547
  const defaultValueMemo = React__default.useMemo(() => get(control._formValues, name, get(control._defaultValues, name, defaultValue)), [control, name, defaultValue]);
9496
9548
  const value = useWatch({
9497
9549
  control,
9498
9550
  name,
9499
9551
  defaultValue: defaultValueMemo,
9500
- exact: true
9552
+ exact
9501
9553
  });
9502
9554
  const formState = useFormState({
9503
9555
  control,
9504
9556
  name,
9505
- exact: true
9557
+ exact
9506
9558
  });
9507
9559
  const _props = React__default.useRef(props2);
9508
9560
  const _previousNameRef = React__default.useRef(void 0);
@@ -9719,10 +9771,11 @@ function isTraversable(value) {
9719
9771
  }
9720
9772
  function markFieldsDirty(data, fields = {}) {
9721
9773
  for (const key in data) {
9722
- if (isTraversable(data[key])) {
9723
- fields[key] = Array.isArray(data[key]) ? [] : {};
9724
- markFieldsDirty(data[key], fields[key]);
9725
- } else if (!isUndefined(data[key])) {
9774
+ const value = data[key];
9775
+ if (isTraversable(value)) {
9776
+ fields[key] = Array.isArray(value) ? [] : {};
9777
+ markFieldsDirty(value, fields[key]);
9778
+ } else if (!isUndefined(value)) {
9726
9779
  fields[key] = true;
9727
9780
  }
9728
9781
  }
@@ -9733,14 +9786,16 @@ function getDirtyFields(data, formValues, dirtyFieldsFromValues) {
9733
9786
  dirtyFieldsFromValues = markFieldsDirty(formValues);
9734
9787
  }
9735
9788
  for (const key in data) {
9736
- if (isTraversable(data[key])) {
9789
+ const value = data[key];
9790
+ if (isTraversable(value)) {
9737
9791
  if (isUndefined(formValues) || isPrimitive(dirtyFieldsFromValues[key])) {
9738
- dirtyFieldsFromValues[key] = markFieldsDirty(data[key], Array.isArray(data[key]) ? [] : {});
9792
+ dirtyFieldsFromValues[key] = markFieldsDirty(value, Array.isArray(value) ? [] : {});
9739
9793
  } else {
9740
- getDirtyFields(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
9794
+ getDirtyFields(value, isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
9741
9795
  }
9742
9796
  } else {
9743
- dirtyFieldsFromValues[key] = !deepEqual$1(data[key], formValues[key]);
9797
+ const formValue = formValues[key];
9798
+ dirtyFieldsFromValues[key] = !deepEqual$1(value, formValue);
9744
9799
  }
9745
9800
  }
9746
9801
  return dirtyFieldsFromValues;
@@ -10195,7 +10250,7 @@ function createFormControl(props2 = {}) {
10195
10250
  if (field) {
10196
10251
  const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);
10197
10252
  isUndefined(defaultValue) || ref && ref.defaultChecked || shouldSkipSetValueAs ? set$1(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f)) : setFieldValue(name, defaultValue);
10198
- _state.mount && _setValid();
10253
+ _state.mount && !_state.action && _setValid();
10199
10254
  }
10200
10255
  };
10201
10256
  const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {
@@ -10806,8 +10861,12 @@ function createFormControl(props2 = {}) {
10806
10861
  watchAll: false,
10807
10862
  focus: ""
10808
10863
  };
10809
- _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues;
10864
+ _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues || !_options.shouldUnregister && !isEmptyObject(values);
10810
10865
  _state.watch = !!_options.shouldUnregister;
10866
+ _state.action = false;
10867
+ if (!keepStateOptions.keepErrors) {
10868
+ _formState.errors = {};
10869
+ }
10811
10870
  _subjects.state.next({
10812
10871
  submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
10813
10872
  isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual$1(formValues, _defaultValues)),
@@ -11233,11 +11292,15 @@ function useForm(props2 = {}) {
11233
11292
  }
11234
11293
  }, [control, formState.isDirty]);
11235
11294
  React__default.useEffect(() => {
11295
+ var _a2;
11236
11296
  if (props2.values && !deepEqual$1(props2.values, _values.current)) {
11237
11297
  control._reset(props2.values, {
11238
11298
  keepFieldsRef: true,
11239
11299
  ...control._options.resetOptions
11240
11300
  });
11301
+ if (!((_a2 = control._options.resetOptions) === null || _a2 === void 0 ? void 0 : _a2.keepIsValid)) {
11302
+ control._setValid();
11303
+ }
11241
11304
  _values.current = props2.values;
11242
11305
  updateFormState((state) => ({ ...state }));
11243
11306
  } else {
@@ -11272,7 +11335,7 @@ var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
11272
11335
  var EVENT_OPTIONS$1 = { bubbles: false, cancelable: true };
11273
11336
  var GROUP_NAME$5 = "RovingFocusGroup";
11274
11337
  var [Collection$5, useCollection$5, createCollectionScope$5] = createCollection(GROUP_NAME$5);
11275
- var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
11338
+ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope$2(
11276
11339
  GROUP_NAME$5,
11277
11340
  [createCollectionScope$5]
11278
11341
  );
@@ -11339,7 +11402,7 @@ var RovingFocusGroupImpl = React.forwardRef((props2, forwardedRef) => {
11339
11402
  []
11340
11403
  ),
11341
11404
  children: /* @__PURE__ */ jsx(
11342
- Primitive.div,
11405
+ Primitive$6.div,
11343
11406
  {
11344
11407
  tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
11345
11408
  "data-orientation": orientation,
@@ -11404,7 +11467,7 @@ var RovingFocusGroupItem = React.forwardRef(
11404
11467
  focusable,
11405
11468
  active,
11406
11469
  children: /* @__PURE__ */ jsx(
11407
- Primitive.span,
11470
+ Primitive$6.span,
11408
11471
  {
11409
11472
  tabIndex: isCurrentTabStop ? 0 : -1,
11410
11473
  "data-orientation": context.orientation,
@@ -11478,7 +11541,7 @@ function wrapArray$3(array2, startIndex) {
11478
11541
  var Root$e = RovingFocusGroup;
11479
11542
  var Item$2 = RovingFocusGroupItem;
11480
11543
  var TABS_NAME = "Tabs";
11481
- var [createTabsContext] = createContextScope(TABS_NAME, [
11544
+ var [createTabsContext] = createContextScope$2(TABS_NAME, [
11482
11545
  createRovingFocusGroupScope
11483
11546
  ]);
11484
11547
  var useRovingFocusGroupScope$4 = createRovingFocusGroupScope();
@@ -11513,7 +11576,7 @@ var Tabs$1 = React.forwardRef(
11513
11576
  dir: direction,
11514
11577
  activationMode,
11515
11578
  children: /* @__PURE__ */ jsx(
11516
- Primitive.div,
11579
+ Primitive$6.div,
11517
11580
  {
11518
11581
  dir: direction,
11519
11582
  "data-orientation": orientation,
@@ -11541,7 +11604,7 @@ var TabsList$1 = React.forwardRef(
11541
11604
  dir: context.dir,
11542
11605
  loop,
11543
11606
  children: /* @__PURE__ */ jsx(
11544
- Primitive.div,
11607
+ Primitive$6.div,
11545
11608
  {
11546
11609
  role: "tablist",
11547
11610
  "aria-orientation": context.orientation,
@@ -11571,7 +11634,7 @@ var TabsTrigger$1 = React.forwardRef(
11571
11634
  focusable: !disabled,
11572
11635
  active: isSelected,
11573
11636
  children: /* @__PURE__ */ jsx(
11574
- Primitive.button,
11637
+ Primitive$6.button,
11575
11638
  {
11576
11639
  type: "button",
11577
11640
  role: "tab",
@@ -11620,7 +11683,7 @@ var TabsContent$1 = React.forwardRef(
11620
11683
  return () => cancelAnimationFrame(rAF);
11621
11684
  }, []);
11622
11685
  return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(
11623
- Primitive.div,
11686
+ Primitive$6.div,
11624
11687
  {
11625
11688
  "data-state": isSelected ? "active" : "inactive",
11626
11689
  "data-orientation": context.orientation,
@@ -11788,6 +11851,135 @@ function CardFooter({ className, ...props2 }) {
11788
11851
  }
11789
11852
  );
11790
11853
  }
11854
+ var REACT_LAZY_TYPE$5 = Symbol.for("react.lazy");
11855
+ var use$5 = React[" use ".trim().toString()];
11856
+ function isPromiseLike$5(value) {
11857
+ return typeof value === "object" && value !== null && "then" in value;
11858
+ }
11859
+ function isLazyComponent$5(element) {
11860
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$5 && "_payload" in element && isPromiseLike$5(element._payload);
11861
+ }
11862
+ // @__NO_SIDE_EFFECTS__
11863
+ function createSlot$5(ownerName) {
11864
+ const SlotClone = /* @__PURE__ */ createSlotClone$5(ownerName);
11865
+ const Slot2 = React.forwardRef((props2, forwardedRef) => {
11866
+ let { children, ...slotProps } = props2;
11867
+ if (isLazyComponent$5(children) && typeof use$5 === "function") {
11868
+ children = use$5(children._payload);
11869
+ }
11870
+ const childrenArray = React.Children.toArray(children);
11871
+ const slottable = childrenArray.find(isSlottable$5);
11872
+ if (slottable) {
11873
+ const newElement = slottable.props.children;
11874
+ const newChildren = childrenArray.map((child) => {
11875
+ if (child === slottable) {
11876
+ if (React.Children.count(newElement) > 1) return React.Children.only(null);
11877
+ return React.isValidElement(newElement) ? newElement.props.children : null;
11878
+ } else {
11879
+ return child;
11880
+ }
11881
+ });
11882
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
11883
+ }
11884
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
11885
+ });
11886
+ Slot2.displayName = `${ownerName}.Slot`;
11887
+ return Slot2;
11888
+ }
11889
+ // @__NO_SIDE_EFFECTS__
11890
+ function createSlotClone$5(ownerName) {
11891
+ const SlotClone = React.forwardRef((props2, forwardedRef) => {
11892
+ let { children, ...slotProps } = props2;
11893
+ if (isLazyComponent$5(children) && typeof use$5 === "function") {
11894
+ children = use$5(children._payload);
11895
+ }
11896
+ if (React.isValidElement(children)) {
11897
+ const childrenRef = getElementRef$5(children);
11898
+ const props22 = mergeProps$5(slotProps, children.props);
11899
+ if (children.type !== React.Fragment) {
11900
+ props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
11901
+ }
11902
+ return React.cloneElement(children, props22);
11903
+ }
11904
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
11905
+ });
11906
+ SlotClone.displayName = `${ownerName}.SlotClone`;
11907
+ return SlotClone;
11908
+ }
11909
+ var SLOTTABLE_IDENTIFIER$5 = Symbol("radix.slottable");
11910
+ function isSlottable$5(child) {
11911
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$5;
11912
+ }
11913
+ function mergeProps$5(slotProps, childProps) {
11914
+ const overrideProps = { ...childProps };
11915
+ for (const propName in childProps) {
11916
+ const slotPropValue = slotProps[propName];
11917
+ const childPropValue = childProps[propName];
11918
+ const isHandler = /^on[A-Z]/.test(propName);
11919
+ if (isHandler) {
11920
+ if (slotPropValue && childPropValue) {
11921
+ overrideProps[propName] = (...args) => {
11922
+ const result = childPropValue(...args);
11923
+ slotPropValue(...args);
11924
+ return result;
11925
+ };
11926
+ } else if (slotPropValue) {
11927
+ overrideProps[propName] = slotPropValue;
11928
+ }
11929
+ } else if (propName === "style") {
11930
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
11931
+ } else if (propName === "className") {
11932
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
11933
+ }
11934
+ }
11935
+ return { ...slotProps, ...overrideProps };
11936
+ }
11937
+ function getElementRef$5(element) {
11938
+ var _a2, _b;
11939
+ let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
11940
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
11941
+ if (mayWarn) {
11942
+ return element.ref;
11943
+ }
11944
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
11945
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
11946
+ if (mayWarn) {
11947
+ return element.props.ref;
11948
+ }
11949
+ return element.props.ref || element.ref;
11950
+ }
11951
+ var NODES$5 = [
11952
+ "a",
11953
+ "button",
11954
+ "div",
11955
+ "form",
11956
+ "h2",
11957
+ "h3",
11958
+ "img",
11959
+ "input",
11960
+ "label",
11961
+ "li",
11962
+ "nav",
11963
+ "ol",
11964
+ "p",
11965
+ "select",
11966
+ "span",
11967
+ "svg",
11968
+ "ul"
11969
+ ];
11970
+ var Primitive$5 = NODES$5.reduce((primitive, node) => {
11971
+ const Slot2 = /* @__PURE__ */ createSlot$5(`Primitive.${node}`);
11972
+ const Node2 = React.forwardRef((props2, forwardedRef) => {
11973
+ const { asChild, ...primitiveProps } = props2;
11974
+ const Comp = asChild ? Slot2 : node;
11975
+ if (typeof window !== "undefined") {
11976
+ window[Symbol.for("radix-ui")] = true;
11977
+ }
11978
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
11979
+ });
11980
+ Node2.displayName = `Primitive.${node}`;
11981
+ return { ...primitive, [node]: Node2 };
11982
+ }, {});
11791
11983
  var NAME$5 = "Separator";
11792
11984
  var DEFAULT_ORIENTATION = "horizontal";
11793
11985
  var ORIENTATIONS = ["horizontal", "vertical"];
@@ -11797,7 +11989,7 @@ var Separator$3 = React.forwardRef((props2, forwardedRef) => {
11797
11989
  const ariaOrientation = orientation === "vertical" ? orientation : void 0;
11798
11990
  const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
11799
11991
  return /* @__PURE__ */ jsx(
11800
- Primitive.div,
11992
+ Primitive$5.div,
11801
11993
  {
11802
11994
  "data-orientation": orientation,
11803
11995
  ...semanticProps,
@@ -12238,212 +12430,6 @@ const r$1 = (t2, r2, o2) => {
12238
12430
  function n$1(e2) {
12239
12431
  return e2.replace(/\]|\[/g, "");
12240
12432
  }
12241
- function $constructor$1(name, initializer2, params) {
12242
- function init(inst, def) {
12243
- var _a2;
12244
- Object.defineProperty(inst, "_zod", {
12245
- value: inst._zod ?? {},
12246
- enumerable: false
12247
- });
12248
- (_a2 = inst._zod).traits ?? (_a2.traits = /* @__PURE__ */ new Set());
12249
- inst._zod.traits.add(name);
12250
- initializer2(inst, def);
12251
- for (const k2 in _2.prototype) {
12252
- if (!(k2 in inst))
12253
- Object.defineProperty(inst, k2, { value: _2.prototype[k2].bind(inst) });
12254
- }
12255
- inst._zod.constr = _2;
12256
- inst._zod.def = def;
12257
- }
12258
- const Parent = (params == null ? void 0 : params.Parent) ?? Object;
12259
- class Definition extends Parent {
12260
- }
12261
- Object.defineProperty(Definition, "name", { value: name });
12262
- function _2(def) {
12263
- var _a2;
12264
- const inst = (params == null ? void 0 : params.Parent) ? new Definition() : this;
12265
- init(inst, def);
12266
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
12267
- for (const fn of inst._zod.deferred) {
12268
- fn();
12269
- }
12270
- return inst;
12271
- }
12272
- Object.defineProperty(_2, "init", { value: init });
12273
- Object.defineProperty(_2, Symbol.hasInstance, {
12274
- value: (inst) => {
12275
- var _a2, _b;
12276
- if ((params == null ? void 0 : params.Parent) && inst instanceof params.Parent)
12277
- return true;
12278
- return (_b = (_a2 = inst == null ? void 0 : inst._zod) == null ? void 0 : _a2.traits) == null ? void 0 : _b.has(name);
12279
- }
12280
- });
12281
- Object.defineProperty(_2, "name", { value: name });
12282
- return _2;
12283
- }
12284
- let $ZodAsyncError$1 = class $ZodAsyncError extends Error {
12285
- constructor() {
12286
- super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
12287
- }
12288
- };
12289
- const globalConfig$1 = {};
12290
- function config$1(newConfig) {
12291
- return globalConfig$1;
12292
- }
12293
- function jsonStringifyReplacer$1(_2, value) {
12294
- if (typeof value === "bigint")
12295
- return value.toString();
12296
- return value;
12297
- }
12298
- const captureStackTrace$1 = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
12299
- };
12300
- function unwrapMessage$1(message2) {
12301
- return typeof message2 === "string" ? message2 : message2 == null ? void 0 : message2.message;
12302
- }
12303
- function finalizeIssue$1(iss, ctx, config2) {
12304
- var _a2, _b, _c, _d, _e2, _f;
12305
- const full = { ...iss, path: iss.path ?? [] };
12306
- if (!iss.message) {
12307
- const message2 = unwrapMessage$1((_c = (_b = (_a2 = iss.inst) == null ? void 0 : _a2._zod.def) == null ? void 0 : _b.error) == null ? void 0 : _c.call(_b, iss)) ?? unwrapMessage$1((_d = ctx == null ? void 0 : ctx.error) == null ? void 0 : _d.call(ctx, iss)) ?? unwrapMessage$1((_e2 = config2.customError) == null ? void 0 : _e2.call(config2, iss)) ?? unwrapMessage$1((_f = config2.localeError) == null ? void 0 : _f.call(config2, iss)) ?? "Invalid input";
12308
- full.message = message2;
12309
- }
12310
- delete full.inst;
12311
- delete full.continue;
12312
- if (!(ctx == null ? void 0 : ctx.reportInput)) {
12313
- delete full.input;
12314
- }
12315
- return full;
12316
- }
12317
- const initializer$2 = (inst, def) => {
12318
- inst.name = "$ZodError";
12319
- Object.defineProperty(inst, "_zod", {
12320
- value: inst._zod,
12321
- enumerable: false
12322
- });
12323
- Object.defineProperty(inst, "issues", {
12324
- value: def,
12325
- enumerable: false
12326
- });
12327
- inst.message = JSON.stringify(def, jsonStringifyReplacer$1, 2);
12328
- Object.defineProperty(inst, "toString", {
12329
- value: () => inst.message,
12330
- enumerable: false
12331
- });
12332
- };
12333
- const $ZodError$1 = $constructor$1("$ZodError", initializer$2);
12334
- const $ZodRealError$1 = $constructor$1("$ZodError", initializer$2, { Parent: Error });
12335
- const _parse$1 = (_Err) => (schema, value, _ctx, _params) => {
12336
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
12337
- const result = schema._zod.run({ value, issues: [] }, ctx);
12338
- if (result instanceof Promise) {
12339
- throw new $ZodAsyncError$1();
12340
- }
12341
- if (result.issues.length) {
12342
- const e2 = new ((_params == null ? void 0 : _params.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue$1(iss, ctx, config$1())));
12343
- captureStackTrace$1(e2, _params == null ? void 0 : _params.callee);
12344
- throw e2;
12345
- }
12346
- return result.value;
12347
- };
12348
- const parse$2 = /* @__PURE__ */ _parse$1($ZodRealError$1);
12349
- const _parseAsync$1 = (_Err) => async (schema, value, _ctx, params) => {
12350
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
12351
- let result = schema._zod.run({ value, issues: [] }, ctx);
12352
- if (result instanceof Promise)
12353
- result = await result;
12354
- if (result.issues.length) {
12355
- const e2 = new ((params == null ? void 0 : params.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue$1(iss, ctx, config$1())));
12356
- captureStackTrace$1(e2, params == null ? void 0 : params.callee);
12357
- throw e2;
12358
- }
12359
- return result.value;
12360
- };
12361
- const parseAsync$1 = /* @__PURE__ */ _parseAsync$1($ZodRealError$1);
12362
- function t$1(r2, e2) {
12363
- try {
12364
- var o2 = r2();
12365
- } catch (r3) {
12366
- return e2(r3);
12367
- }
12368
- return o2 && o2.then ? o2.then(void 0, e2) : o2;
12369
- }
12370
- function s$1(r2, e2) {
12371
- for (var n2 = {}; r2.length; ) {
12372
- var t2 = r2[0], s2 = t2.code, i2 = t2.message, a2 = t2.path.join(".");
12373
- if (!n2[a2]) if ("unionErrors" in t2) {
12374
- var u2 = t2.unionErrors[0].errors[0];
12375
- n2[a2] = { message: u2.message, type: u2.code };
12376
- } else n2[a2] = { message: i2, type: s2 };
12377
- if ("unionErrors" in t2 && t2.unionErrors.forEach(function(e3) {
12378
- return e3.errors.forEach(function(e4) {
12379
- return r2.push(e4);
12380
- });
12381
- }), e2) {
12382
- var c2 = n2[a2].types, f = c2 && c2[t2.code];
12383
- n2[a2] = appendErrors(a2, e2, n2, s2, f ? [].concat(f, t2.message) : t2.message);
12384
- }
12385
- r2.shift();
12386
- }
12387
- return n2;
12388
- }
12389
- function i$1(r2, e2) {
12390
- for (var n2 = {}; r2.length; ) {
12391
- var t2 = r2[0], s2 = t2.code, i2 = t2.message, a2 = t2.path.join(".");
12392
- if (!n2[a2]) if ("invalid_union" === t2.code && t2.errors.length > 0) {
12393
- var u2 = t2.errors[0][0];
12394
- n2[a2] = { message: u2.message, type: u2.code };
12395
- } else n2[a2] = { message: i2, type: s2 };
12396
- if ("invalid_union" === t2.code && t2.errors.forEach(function(e3) {
12397
- return e3.forEach(function(e4) {
12398
- return r2.push(e4);
12399
- });
12400
- }), e2) {
12401
- var c2 = n2[a2].types, f = c2 && c2[t2.code];
12402
- n2[a2] = appendErrors(a2, e2, n2, s2, f ? [].concat(f, t2.message) : t2.message);
12403
- }
12404
- r2.shift();
12405
- }
12406
- return n2;
12407
- }
12408
- function a$2(o2, a2, u2) {
12409
- if (void 0 === u2 && (u2 = {}), (function(r2) {
12410
- return "_def" in r2 && "object" == typeof r2._def && "typeName" in r2._def;
12411
- })(o2)) return function(n2, i2, c2) {
12412
- try {
12413
- return Promise.resolve(t$1(function() {
12414
- return Promise.resolve(o2["sync" === u2.mode ? "parse" : "parseAsync"](n2, a2)).then(function(e2) {
12415
- return c2.shouldUseNativeValidation && o$1({}, c2), { errors: {}, values: u2.raw ? Object.assign({}, n2) : e2 };
12416
- });
12417
- }, function(r2) {
12418
- if ((function(r3) {
12419
- return Array.isArray(null == r3 ? void 0 : r3.issues);
12420
- })(r2)) return { values: {}, errors: s$2(s$1(r2.errors, !c2.shouldUseNativeValidation && "all" === c2.criteriaMode), c2) };
12421
- throw r2;
12422
- }));
12423
- } catch (r2) {
12424
- return Promise.reject(r2);
12425
- }
12426
- };
12427
- if ((function(r2) {
12428
- return "_zod" in r2 && "object" == typeof r2._zod;
12429
- })(o2)) return function(s2, c2, f) {
12430
- try {
12431
- return Promise.resolve(t$1(function() {
12432
- return Promise.resolve(("sync" === u2.mode ? parse$2 : parseAsync$1)(o2, s2, a2)).then(function(e2) {
12433
- return f.shouldUseNativeValidation && o$1({}, f), { errors: {}, values: u2.raw ? Object.assign({}, s2) : e2 };
12434
- });
12435
- }, function(r2) {
12436
- if ((function(r3) {
12437
- return r3 instanceof $ZodError$1;
12438
- })(r2)) return { values: {}, errors: s$2(i$1(r2.issues, !f.shouldUseNativeValidation && "all" === f.criteriaMode), f) };
12439
- throw r2;
12440
- }));
12441
- } catch (r2) {
12442
- return Promise.reject(r2);
12443
- }
12444
- };
12445
- throw new Error("Invalid input: not a Zod schema");
12446
- }
12447
12433
  function $constructor(name, initializer2, params) {
12448
12434
  function init(inst, def) {
12449
12435
  if (!inst._zod) {
@@ -12496,7 +12482,7 @@ function $constructor(name, initializer2, params) {
12496
12482
  Object.defineProperty(_2, "name", { value: name });
12497
12483
  return _2;
12498
12484
  }
12499
- class $ZodAsyncError2 extends Error {
12485
+ class $ZodAsyncError extends Error {
12500
12486
  constructor() {
12501
12487
  super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
12502
12488
  }
@@ -12955,7 +12941,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
12955
12941
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
12956
12942
  const result = schema._zod.run({ value, issues: [] }, ctx);
12957
12943
  if (result instanceof Promise) {
12958
- throw new $ZodAsyncError2();
12944
+ throw new $ZodAsyncError();
12959
12945
  }
12960
12946
  if (result.issues.length) {
12961
12947
  const e2 = new ((_params == null ? void 0 : _params.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
@@ -12964,6 +12950,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
12964
12950
  }
12965
12951
  return result.value;
12966
12952
  };
12953
+ const parse$2 = /* @__PURE__ */ _parse($ZodRealError);
12967
12954
  const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
12968
12955
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
12969
12956
  let result = schema._zod.run({ value, issues: [] }, ctx);
@@ -12976,11 +12963,12 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
12976
12963
  }
12977
12964
  return result.value;
12978
12965
  };
12966
+ const parseAsync$1 = /* @__PURE__ */ _parseAsync($ZodRealError);
12979
12967
  const _safeParse = (_Err) => (schema, value, _ctx) => {
12980
12968
  const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
12981
12969
  const result = schema._zod.run({ value, issues: [] }, ctx);
12982
12970
  if (result instanceof Promise) {
12983
- throw new $ZodAsyncError2();
12971
+ throw new $ZodAsyncError();
12984
12972
  }
12985
12973
  return result.issues.length ? {
12986
12974
  success: false,
@@ -13542,7 +13530,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
13542
13530
  const currLen = payload.issues.length;
13543
13531
  const _2 = ch._zod.check(payload);
13544
13532
  if (_2 instanceof Promise && (ctx == null ? void 0 : ctx.async) === false) {
13545
- throw new $ZodAsyncError2();
13533
+ throw new $ZodAsyncError();
13546
13534
  }
13547
13535
  if (asyncResult || _2 instanceof Promise) {
13548
13536
  asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
@@ -13576,7 +13564,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
13576
13564
  const checkResult = runChecks(payload, checks, ctx);
13577
13565
  if (checkResult instanceof Promise) {
13578
13566
  if (ctx.async === false)
13579
- throw new $ZodAsyncError2();
13567
+ throw new $ZodAsyncError();
13580
13568
  return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx));
13581
13569
  }
13582
13570
  return inst._zod.parse(checkResult, ctx);
@@ -13597,7 +13585,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
13597
13585
  const result = inst._zod.parse(payload, ctx);
13598
13586
  if (result instanceof Promise) {
13599
13587
  if (ctx.async === false)
13600
- throw new $ZodAsyncError2();
13588
+ throw new $ZodAsyncError();
13601
13589
  return result.then((result2) => runChecks(result2, checks, ctx));
13602
13590
  }
13603
13591
  return runChecks(result, checks, ctx);
@@ -14437,7 +14425,7 @@ const $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def)
14437
14425
  });
14438
14426
  }
14439
14427
  if (_out instanceof Promise) {
14440
- throw new $ZodAsyncError2();
14428
+ throw new $ZodAsyncError();
14441
14429
  }
14442
14430
  payload.value = _out;
14443
14431
  return payload;
@@ -15199,6 +15187,91 @@ function _check(fn, params) {
15199
15187
  ch._zod.check = fn;
15200
15188
  return ch;
15201
15189
  }
15190
+ function t$1(r2, e2) {
15191
+ try {
15192
+ var o2 = r2();
15193
+ } catch (r3) {
15194
+ return e2(r3);
15195
+ }
15196
+ return o2 && o2.then ? o2.then(void 0, e2) : o2;
15197
+ }
15198
+ function s$1(r2, e2) {
15199
+ for (var n2 = {}; r2.length; ) {
15200
+ var t2 = r2[0], s2 = t2.code, i2 = t2.message, a2 = t2.path.join(".");
15201
+ if (!n2[a2]) if ("unionErrors" in t2) {
15202
+ var u2 = t2.unionErrors[0].errors[0];
15203
+ n2[a2] = { message: u2.message, type: u2.code };
15204
+ } else n2[a2] = { message: i2, type: s2 };
15205
+ if ("unionErrors" in t2 && t2.unionErrors.forEach(function(e3) {
15206
+ return e3.errors.forEach(function(e4) {
15207
+ return r2.push(e4);
15208
+ });
15209
+ }), e2) {
15210
+ var c2 = n2[a2].types, f = c2 && c2[t2.code];
15211
+ n2[a2] = appendErrors(a2, e2, n2, s2, f ? [].concat(f, t2.message) : t2.message);
15212
+ }
15213
+ r2.shift();
15214
+ }
15215
+ return n2;
15216
+ }
15217
+ function i$1(r2, e2) {
15218
+ for (var n2 = {}; r2.length; ) {
15219
+ var t2 = r2[0], s2 = t2.code, i2 = t2.message, a2 = t2.path.join(".");
15220
+ if (!n2[a2]) if ("invalid_union" === t2.code && t2.errors.length > 0) {
15221
+ var u2 = t2.errors[0][0];
15222
+ n2[a2] = { message: u2.message, type: u2.code };
15223
+ } else n2[a2] = { message: i2, type: s2 };
15224
+ if ("invalid_union" === t2.code && t2.errors.forEach(function(e3) {
15225
+ return e3.forEach(function(e4) {
15226
+ return r2.push(e4);
15227
+ });
15228
+ }), e2) {
15229
+ var c2 = n2[a2].types, f = c2 && c2[t2.code];
15230
+ n2[a2] = appendErrors(a2, e2, n2, s2, f ? [].concat(f, t2.message) : t2.message);
15231
+ }
15232
+ r2.shift();
15233
+ }
15234
+ return n2;
15235
+ }
15236
+ function a$2(o2, a2, u2) {
15237
+ if (void 0 === u2 && (u2 = {}), (function(r2) {
15238
+ return "_def" in r2 && "object" == typeof r2._def && "typeName" in r2._def;
15239
+ })(o2)) return function(n2, i2, c2) {
15240
+ try {
15241
+ return Promise.resolve(t$1(function() {
15242
+ return Promise.resolve(o2["sync" === u2.mode ? "parse" : "parseAsync"](n2, a2)).then(function(e2) {
15243
+ return c2.shouldUseNativeValidation && o$1({}, c2), { errors: {}, values: u2.raw ? Object.assign({}, n2) : e2 };
15244
+ });
15245
+ }, function(r2) {
15246
+ if ((function(r3) {
15247
+ return Array.isArray(null == r3 ? void 0 : r3.issues);
15248
+ })(r2)) return { values: {}, errors: s$2(s$1(r2.errors, !c2.shouldUseNativeValidation && "all" === c2.criteriaMode), c2) };
15249
+ throw r2;
15250
+ }));
15251
+ } catch (r2) {
15252
+ return Promise.reject(r2);
15253
+ }
15254
+ };
15255
+ if ((function(r2) {
15256
+ return "_zod" in r2 && "object" == typeof r2._zod;
15257
+ })(o2)) return function(s2, c2, f) {
15258
+ try {
15259
+ return Promise.resolve(t$1(function() {
15260
+ return Promise.resolve(("sync" === u2.mode ? parse$2 : parseAsync$1)(o2, s2, a2)).then(function(e2) {
15261
+ return f.shouldUseNativeValidation && o$1({}, f), { errors: {}, values: u2.raw ? Object.assign({}, s2) : e2 };
15262
+ });
15263
+ }, function(r2) {
15264
+ if ((function(r3) {
15265
+ return r3 instanceof $ZodError;
15266
+ })(r2)) return { values: {}, errors: s$2(i$1(r2.issues, !f.shouldUseNativeValidation && "all" === f.criteriaMode), f) };
15267
+ throw r2;
15268
+ }));
15269
+ } catch (r2) {
15270
+ return Promise.reject(r2);
15271
+ }
15272
+ };
15273
+ throw new Error("Invalid input: not a Zod schema");
15274
+ }
15202
15275
  const ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
15203
15276
  $ZodISODateTime.init(inst, def);
15204
15277
  ZodStringFormat.init(inst, def);
@@ -16174,10 +16247,139 @@ function useFormBuilder(options) {
16174
16247
  };
16175
16248
  }
16176
16249
  const FormBuilderContext = createContext(null);
16250
+ var REACT_LAZY_TYPE$4 = Symbol.for("react.lazy");
16251
+ var use$4 = React[" use ".trim().toString()];
16252
+ function isPromiseLike$4(value) {
16253
+ return typeof value === "object" && value !== null && "then" in value;
16254
+ }
16255
+ function isLazyComponent$4(element) {
16256
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$4 && "_payload" in element && isPromiseLike$4(element._payload);
16257
+ }
16258
+ // @__NO_SIDE_EFFECTS__
16259
+ function createSlot$4(ownerName) {
16260
+ const SlotClone = /* @__PURE__ */ createSlotClone$4(ownerName);
16261
+ const Slot2 = React.forwardRef((props2, forwardedRef) => {
16262
+ let { children, ...slotProps } = props2;
16263
+ if (isLazyComponent$4(children) && typeof use$4 === "function") {
16264
+ children = use$4(children._payload);
16265
+ }
16266
+ const childrenArray = React.Children.toArray(children);
16267
+ const slottable = childrenArray.find(isSlottable$4);
16268
+ if (slottable) {
16269
+ const newElement = slottable.props.children;
16270
+ const newChildren = childrenArray.map((child) => {
16271
+ if (child === slottable) {
16272
+ if (React.Children.count(newElement) > 1) return React.Children.only(null);
16273
+ return React.isValidElement(newElement) ? newElement.props.children : null;
16274
+ } else {
16275
+ return child;
16276
+ }
16277
+ });
16278
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
16279
+ }
16280
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
16281
+ });
16282
+ Slot2.displayName = `${ownerName}.Slot`;
16283
+ return Slot2;
16284
+ }
16285
+ // @__NO_SIDE_EFFECTS__
16286
+ function createSlotClone$4(ownerName) {
16287
+ const SlotClone = React.forwardRef((props2, forwardedRef) => {
16288
+ let { children, ...slotProps } = props2;
16289
+ if (isLazyComponent$4(children) && typeof use$4 === "function") {
16290
+ children = use$4(children._payload);
16291
+ }
16292
+ if (React.isValidElement(children)) {
16293
+ const childrenRef = getElementRef$4(children);
16294
+ const props22 = mergeProps$4(slotProps, children.props);
16295
+ if (children.type !== React.Fragment) {
16296
+ props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
16297
+ }
16298
+ return React.cloneElement(children, props22);
16299
+ }
16300
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
16301
+ });
16302
+ SlotClone.displayName = `${ownerName}.SlotClone`;
16303
+ return SlotClone;
16304
+ }
16305
+ var SLOTTABLE_IDENTIFIER$4 = Symbol("radix.slottable");
16306
+ function isSlottable$4(child) {
16307
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$4;
16308
+ }
16309
+ function mergeProps$4(slotProps, childProps) {
16310
+ const overrideProps = { ...childProps };
16311
+ for (const propName in childProps) {
16312
+ const slotPropValue = slotProps[propName];
16313
+ const childPropValue = childProps[propName];
16314
+ const isHandler = /^on[A-Z]/.test(propName);
16315
+ if (isHandler) {
16316
+ if (slotPropValue && childPropValue) {
16317
+ overrideProps[propName] = (...args) => {
16318
+ const result = childPropValue(...args);
16319
+ slotPropValue(...args);
16320
+ return result;
16321
+ };
16322
+ } else if (slotPropValue) {
16323
+ overrideProps[propName] = slotPropValue;
16324
+ }
16325
+ } else if (propName === "style") {
16326
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
16327
+ } else if (propName === "className") {
16328
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
16329
+ }
16330
+ }
16331
+ return { ...slotProps, ...overrideProps };
16332
+ }
16333
+ function getElementRef$4(element) {
16334
+ var _a2, _b;
16335
+ let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
16336
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
16337
+ if (mayWarn) {
16338
+ return element.ref;
16339
+ }
16340
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
16341
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
16342
+ if (mayWarn) {
16343
+ return element.props.ref;
16344
+ }
16345
+ return element.props.ref || element.ref;
16346
+ }
16347
+ var NODES$4 = [
16348
+ "a",
16349
+ "button",
16350
+ "div",
16351
+ "form",
16352
+ "h2",
16353
+ "h3",
16354
+ "img",
16355
+ "input",
16356
+ "label",
16357
+ "li",
16358
+ "nav",
16359
+ "ol",
16360
+ "p",
16361
+ "select",
16362
+ "span",
16363
+ "svg",
16364
+ "ul"
16365
+ ];
16366
+ var Primitive$4 = NODES$4.reduce((primitive, node) => {
16367
+ const Slot2 = /* @__PURE__ */ createSlot$4(`Primitive.${node}`);
16368
+ const Node2 = React.forwardRef((props2, forwardedRef) => {
16369
+ const { asChild, ...primitiveProps } = props2;
16370
+ const Comp = asChild ? Slot2 : node;
16371
+ if (typeof window !== "undefined") {
16372
+ window[Symbol.for("radix-ui")] = true;
16373
+ }
16374
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
16375
+ });
16376
+ Node2.displayName = `Primitive.${node}`;
16377
+ return { ...primitive, [node]: Node2 };
16378
+ }, {});
16177
16379
  var NAME$4 = "Label";
16178
16380
  var Label$3 = React.forwardRef((props2, forwardedRef) => {
16179
16381
  return /* @__PURE__ */ jsx(
16180
- Primitive.label,
16382
+ Primitive$4.label,
16181
16383
  {
16182
16384
  ...props2,
16183
16385
  ref: forwardedRef,
@@ -18760,28 +18962,32 @@ var useElementIds = "useId" in React__default ? function useElementIds2(_ref) {
18760
18962
  if (!id) {
18761
18963
  id = reactId;
18762
18964
  }
18763
- var elementIdsRef = useRef({
18764
- labelId: labelId || id + "-label",
18765
- menuId: menuId || id + "-menu",
18766
- getItemId: getItemId || function(index2) {
18767
- return id + "-item-" + index2;
18768
- },
18769
- toggleButtonId: toggleButtonId || id + "-toggle-button",
18770
- inputId: inputId || id + "-input"
18771
- });
18772
- return elementIdsRef.current;
18965
+ var elementIds = useMemo(function() {
18966
+ return {
18967
+ labelId: labelId || id + "-label",
18968
+ menuId: menuId || id + "-menu",
18969
+ getItemId: getItemId || function(index2) {
18970
+ return id + "-item-" + index2;
18971
+ },
18972
+ toggleButtonId: toggleButtonId || id + "-toggle-button",
18973
+ inputId: inputId || id + "-input"
18974
+ };
18975
+ }, [getItemId, id, inputId, labelId, menuId, toggleButtonId]);
18976
+ return elementIds;
18773
18977
  } : function useElementIds3(_ref2) {
18774
18978
  var _ref2$id = _ref2.id, id = _ref2$id === void 0 ? "downshift-" + generateId() : _ref2$id, labelId = _ref2.labelId, menuId = _ref2.menuId, getItemId = _ref2.getItemId, toggleButtonId = _ref2.toggleButtonId, inputId = _ref2.inputId;
18775
- var elementIdsRef = useRef({
18776
- labelId: labelId || id + "-label",
18777
- menuId: menuId || id + "-menu",
18778
- getItemId: getItemId || function(index2) {
18779
- return id + "-item-" + index2;
18780
- },
18781
- toggleButtonId: toggleButtonId || id + "-toggle-button",
18782
- inputId: inputId || id + "-input"
18783
- });
18784
- return elementIdsRef.current;
18979
+ var elementIds = useMemo(function() {
18980
+ return {
18981
+ labelId: labelId || id + "-label",
18982
+ menuId: menuId || id + "-menu",
18983
+ getItemId: getItemId || function(index2) {
18984
+ return id + "-item-" + index2;
18985
+ },
18986
+ toggleButtonId: toggleButtonId || id + "-toggle-button",
18987
+ inputId: inputId || id + "-input"
18988
+ };
18989
+ }, [getItemId, id, inputId, labelId, menuId, toggleButtonId]);
18990
+ return elementIds;
18785
18991
  };
18786
18992
  function getItemAndIndex(itemProp, indexProp, items, errorMessage) {
18787
18993
  var item, index2;
@@ -18918,20 +19124,22 @@ function useMouseAndTouchTracker(environment, handleBlur, downshiftElementsRefs)
18918
19124
  isTouchMove: false,
18919
19125
  isTouchEnd: false
18920
19126
  });
19127
+ function getDownshiftElements() {
19128
+ return downshiftElementsRefs.map(function(ref) {
19129
+ return ref.current;
19130
+ });
19131
+ }
18921
19132
  useEffect(function() {
18922
19133
  if (!environment) {
18923
19134
  return noop$3;
18924
19135
  }
18925
- var downshiftElements = downshiftElementsRefs.map(function(ref) {
18926
- return ref.current;
18927
- });
18928
19136
  function onMouseDown() {
18929
19137
  mouseAndTouchTrackersRef.current.isTouchEnd = false;
18930
19138
  mouseAndTouchTrackersRef.current.isMouseDown = true;
18931
19139
  }
18932
19140
  function onMouseUp(event) {
18933
19141
  mouseAndTouchTrackersRef.current.isMouseDown = false;
18934
- if (!targetWithinDownshift(event.target, downshiftElements, environment)) {
19142
+ if (!targetWithinDownshift(event.target, getDownshiftElements(), environment)) {
18935
19143
  handleBlur();
18936
19144
  }
18937
19145
  }
@@ -18944,7 +19152,7 @@ function useMouseAndTouchTracker(environment, handleBlur, downshiftElementsRefs)
18944
19152
  }
18945
19153
  function onTouchEnd(event) {
18946
19154
  mouseAndTouchTrackersRef.current.isTouchEnd = true;
18947
- if (!mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, downshiftElements, environment, false)) {
19155
+ if (!mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, getDownshiftElements(), environment, false)) {
18948
19156
  handleBlur();
18949
19157
  }
18950
19158
  }
@@ -19483,9 +19691,13 @@ function useCombobox(userProps) {
19483
19691
  selectItem: false
19484
19692
  });
19485
19693
  }
19486
- }, [dispatch, latest]), useMemo(function() {
19487
- return [menuRef, toggleButtonRef, inputRef];
19488
- }, [menuRef.current, toggleButtonRef.current, inputRef.current]));
19694
+ }, [dispatch, latest]), useMemo(
19695
+ function() {
19696
+ return [menuRef, toggleButtonRef, inputRef];
19697
+ },
19698
+ // dependencies can be left empty because refs are getting mutated
19699
+ []
19700
+ ));
19489
19701
  var setGetterPropCallInfo = useGetterPropsCalledChecker("getInputProps", "getMenuProps");
19490
19702
  useEffect(function() {
19491
19703
  if (!isOpen) {
@@ -19984,7 +20196,7 @@ var DismissableLayer = React.forwardRef(
19984
20196
  return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
19985
20197
  }, []);
19986
20198
  return /* @__PURE__ */ jsx(
19987
- Primitive.div,
20199
+ Primitive$6.div,
19988
20200
  {
19989
20201
  ...layerProps,
19990
20202
  ref: composedRefs,
@@ -20017,7 +20229,7 @@ var DismissableLayerBranch = React.forwardRef((props2, forwardedRef) => {
20017
20229
  };
20018
20230
  }
20019
20231
  }, [context.branches]);
20020
- return /* @__PURE__ */ jsx(Primitive.div, { ...props2, ref: composedRefs });
20232
+ return /* @__PURE__ */ jsx(Primitive$6.div, { ...props2, ref: composedRefs });
20021
20233
  });
20022
20234
  DismissableLayerBranch.displayName = BRANCH_NAME;
20023
20235
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
@@ -20239,7 +20451,7 @@ var FocusScope = React.forwardRef((props2, forwardedRef) => {
20239
20451
  },
20240
20452
  [loop, trapped, focusScope.paused]
20241
20453
  );
20242
- return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
20454
+ return /* @__PURE__ */ jsx(Primitive$6.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
20243
20455
  });
20244
20456
  FocusScope.displayName = FOCUS_SCOPE_NAME;
20245
20457
  function focusFirst$2(candidates, { select = false } = {}) {
@@ -22203,7 +22415,7 @@ var NAME$3 = "Arrow";
22203
22415
  var Arrow$1 = React.forwardRef((props2, forwardedRef) => {
22204
22416
  const { children, width = 10, height = 5, ...arrowProps } = props2;
22205
22417
  return /* @__PURE__ */ jsx(
22206
- Primitive.svg,
22418
+ Primitive$6.svg,
22207
22419
  {
22208
22420
  ...arrowProps,
22209
22421
  ref: forwardedRef,
@@ -22218,7 +22430,7 @@ var Arrow$1 = React.forwardRef((props2, forwardedRef) => {
22218
22430
  Arrow$1.displayName = NAME$3;
22219
22431
  var Root$b = Arrow$1;
22220
22432
  var POPPER_NAME = "Popper";
22221
- var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
22433
+ var [createPopperContext, createPopperScope] = createContextScope$2(POPPER_NAME);
22222
22434
  var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
22223
22435
  var Popper = (props2) => {
22224
22436
  const { __scopePopper, children } = props2;
@@ -22241,7 +22453,7 @@ var PopperAnchor = React.forwardRef(
22241
22453
  context.onAnchorChange(anchorRef.current);
22242
22454
  }
22243
22455
  });
22244
- return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
22456
+ return virtualRef ? null : /* @__PURE__ */ jsx(Primitive$6.div, { ...anchorProps, ref: composedRefs });
22245
22457
  }
22246
22458
  );
22247
22459
  PopperAnchor.displayName = ANCHOR_NAME$2;
@@ -22369,7 +22581,7 @@ var PopperContent = React.forwardRef(
22369
22581
  arrowY,
22370
22582
  shouldHideArrow: cannotCenterArrow,
22371
22583
  children: /* @__PURE__ */ jsx(
22372
- Primitive.div,
22584
+ Primitive$6.div,
22373
22585
  {
22374
22586
  "data-side": placedSide,
22375
22587
  "data-align": placedAlign,
@@ -22495,7 +22707,7 @@ var Portal$7 = React.forwardRef((props2, forwardedRef) => {
22495
22707
  const [mounted, setMounted] = React.useState(false);
22496
22708
  useLayoutEffect2(() => setMounted(true), []);
22497
22709
  const container = containerProp || mounted && ((_a2 = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a2.body);
22498
- return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
22710
+ return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive$6.div, { ...portalProps, ref: forwardedRef }), container) : null;
22499
22711
  });
22500
22712
  Portal$7.displayName = PORTAL_NAME$a;
22501
22713
  var getDefaultParent = function(originalTarget) {
@@ -23126,6 +23338,12 @@ function RemoveScrollSideCar(props2) {
23126
23338
  if ("touches" in event && moveDirection === "h" && target.type === "range") {
23127
23339
  return false;
23128
23340
  }
23341
+ var selection = window.getSelection();
23342
+ var anchorNode = selection && selection.anchorNode;
23343
+ var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
23344
+ if (isTouchingSelection) {
23345
+ return false;
23346
+ }
23129
23347
  var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
23130
23348
  if (!canBeScrolledInMainDirection) {
23131
23349
  return true;
@@ -23238,7 +23456,7 @@ var ReactRemoveScroll = React.forwardRef(function(props2, ref) {
23238
23456
  });
23239
23457
  ReactRemoveScroll.classNames = RemoveScroll.classNames;
23240
23458
  var POPOVER_NAME = "Popover";
23241
- var [createPopoverContext] = createContextScope(POPOVER_NAME, [
23459
+ var [createPopoverContext] = createContextScope$2(POPOVER_NAME, [
23242
23460
  createPopperScope
23243
23461
  ]);
23244
23462
  var usePopperScope$4 = createPopperScope();
@@ -23302,7 +23520,7 @@ var PopoverTrigger$1 = React.forwardRef(
23302
23520
  const popperScope = usePopperScope$4(__scopePopover);
23303
23521
  const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
23304
23522
  const trigger = /* @__PURE__ */ jsx(
23305
- Primitive.button,
23523
+ Primitive$6.button,
23306
23524
  {
23307
23525
  type: "button",
23308
23526
  "aria-haspopup": "dialog",
@@ -23338,7 +23556,7 @@ var PopoverContent$1 = React.forwardRef(
23338
23556
  }
23339
23557
  );
23340
23558
  PopoverContent$1.displayName = CONTENT_NAME$a;
23341
- var Slot$3 = /* @__PURE__ */ createSlot$1("PopoverContent.RemoveScroll");
23559
+ var Slot$3 = /* @__PURE__ */ createSlot$7("PopoverContent.RemoveScroll");
23342
23560
  var PopoverContentModal = React.forwardRef(
23343
23561
  (props2, forwardedRef) => {
23344
23562
  const context = usePopoverContext(CONTENT_NAME$a, props2.__scopePopover);
@@ -23491,7 +23709,7 @@ var PopoverClose = React.forwardRef(
23491
23709
  const { __scopePopover, ...closeProps } = props2;
23492
23710
  const context = usePopoverContext(CLOSE_NAME$1, __scopePopover);
23493
23711
  return /* @__PURE__ */ jsx(
23494
- Primitive.button,
23712
+ Primitive$6.button,
23495
23713
  {
23496
23714
  type: "button",
23497
23715
  ...closeProps,
@@ -24262,7 +24480,7 @@ var NAME$2 = "VisuallyHidden";
24262
24480
  var VisuallyHidden = React.forwardRef(
24263
24481
  (props2, forwardedRef) => {
24264
24482
  return /* @__PURE__ */ jsx(
24265
- Primitive.span,
24483
+ Primitive$6.span,
24266
24484
  {
24267
24485
  ...props2,
24268
24486
  ref: forwardedRef,
@@ -24277,7 +24495,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
24277
24495
  var SELECTION_KEYS$1 = [" ", "Enter"];
24278
24496
  var SELECT_NAME = "Select";
24279
24497
  var [Collection$4, useCollection$4, createCollectionScope$4] = createCollection(SELECT_NAME);
24280
- var [createSelectContext] = createContextScope(SELECT_NAME, [
24498
+ var [createSelectContext] = createContextScope$2(SELECT_NAME, [
24281
24499
  createCollectionScope$4,
24282
24500
  createPopperScope
24283
24501
  ]);
@@ -24414,7 +24632,7 @@ var SelectTrigger$1 = React.forwardRef(
24414
24632
  }
24415
24633
  };
24416
24634
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
24417
- Primitive.button,
24635
+ Primitive$6.button,
24418
24636
  {
24419
24637
  type: "button",
24420
24638
  role: "combobox",
@@ -24473,7 +24691,7 @@ var SelectValue$1 = React.forwardRef(
24473
24691
  onValueNodeHasChildrenChange(hasChildren);
24474
24692
  }, [onValueNodeHasChildrenChange, hasChildren]);
24475
24693
  return /* @__PURE__ */ jsx(
24476
- Primitive.span,
24694
+ Primitive$6.span,
24477
24695
  {
24478
24696
  ...valueProps,
24479
24697
  ref: composedRefs,
@@ -24488,7 +24706,7 @@ var ICON_NAME = "SelectIcon";
24488
24706
  var SelectIcon = React.forwardRef(
24489
24707
  (props2, forwardedRef) => {
24490
24708
  const { __scopeSelect, children, ...iconProps } = props2;
24491
- return /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
24709
+ return /* @__PURE__ */ jsx(Primitive$6.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
24492
24710
  }
24493
24711
  );
24494
24712
  SelectIcon.displayName = ICON_NAME;
@@ -24519,7 +24737,7 @@ SelectContent$1.displayName = CONTENT_NAME$9;
24519
24737
  var CONTENT_MARGIN = 10;
24520
24738
  var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME$9);
24521
24739
  var CONTENT_IMPL_NAME = "SelectContentImpl";
24522
- var Slot$2 = /* @__PURE__ */ createSlot$1("SelectContent.RemoveScroll");
24740
+ var Slot$2 = /* @__PURE__ */ createSlot$7("SelectContent.RemoveScroll");
24523
24741
  var SelectContentImpl = React.forwardRef(
24524
24742
  (props2, forwardedRef) => {
24525
24743
  const {
@@ -24899,7 +25117,7 @@ var SelectItemAlignedPosition = React.forwardRef((props2, forwardedRef) => {
24899
25117
  zIndex: contentZIndex
24900
25118
  },
24901
25119
  children: /* @__PURE__ */ jsx(
24902
- Primitive.div,
25120
+ Primitive$6.div,
24903
25121
  {
24904
25122
  ...popperProps,
24905
25123
  ref: composedRefs,
@@ -24973,7 +25191,7 @@ var SelectViewport = React.forwardRef(
24973
25191
  }
24974
25192
  ),
24975
25193
  /* @__PURE__ */ jsx(Collection$4.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
24976
- Primitive.div,
25194
+ Primitive$6.div,
24977
25195
  {
24978
25196
  "data-radix-select-viewport": "",
24979
25197
  role: "presentation",
@@ -25028,7 +25246,7 @@ var SelectGroup$1 = React.forwardRef(
25028
25246
  (props2, forwardedRef) => {
25029
25247
  const { __scopeSelect, ...groupProps } = props2;
25030
25248
  const groupId = useId$1();
25031
- return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
25249
+ return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive$6.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
25032
25250
  }
25033
25251
  );
25034
25252
  SelectGroup$1.displayName = GROUP_NAME$4;
@@ -25037,7 +25255,7 @@ var SelectLabel$1 = React.forwardRef(
25037
25255
  (props2, forwardedRef) => {
25038
25256
  const { __scopeSelect, ...labelProps } = props2;
25039
25257
  const groupContext = useSelectGroupContext(LABEL_NAME$4, __scopeSelect);
25040
- return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
25258
+ return /* @__PURE__ */ jsx(Primitive$6.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
25041
25259
  }
25042
25260
  );
25043
25261
  SelectLabel$1.displayName = LABEL_NAME$4;
@@ -25096,7 +25314,7 @@ var SelectItem$1 = React.forwardRef(
25096
25314
  disabled,
25097
25315
  textValue,
25098
25316
  children: /* @__PURE__ */ jsx(
25099
- Primitive.div,
25317
+ Primitive$6.div,
25100
25318
  {
25101
25319
  role: "option",
25102
25320
  "aria-labelledby": textId,
@@ -25179,7 +25397,7 @@ var SelectItemText = React.forwardRef(
25179
25397
  return () => onNativeOptionRemove(nativeOption);
25180
25398
  }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
25181
25399
  return /* @__PURE__ */ jsxs(Fragment, { children: [
25182
- /* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
25400
+ /* @__PURE__ */ jsx(Primitive$6.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
25183
25401
  itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null
25184
25402
  ] });
25185
25403
  }
@@ -25190,7 +25408,7 @@ var SelectItemIndicator = React.forwardRef(
25190
25408
  (props2, forwardedRef) => {
25191
25409
  const { __scopeSelect, ...itemIndicatorProps } = props2;
25192
25410
  const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME$1, __scopeSelect);
25193
- return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
25411
+ return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive$6.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
25194
25412
  }
25195
25413
  );
25196
25414
  SelectItemIndicator.displayName = ITEM_INDICATOR_NAME$1;
@@ -25281,7 +25499,7 @@ var SelectScrollButtonImpl = React.forwardRef((props2, forwardedRef) => {
25281
25499
  (_a2 = activeItem == null ? void 0 : activeItem.ref.current) == null ? void 0 : _a2.scrollIntoView({ block: "nearest" });
25282
25500
  }, [getItems]);
25283
25501
  return /* @__PURE__ */ jsx(
25284
- Primitive.div,
25502
+ Primitive$6.div,
25285
25503
  {
25286
25504
  "aria-hidden": true,
25287
25505
  ...scrollIndicatorProps,
@@ -25309,7 +25527,7 @@ var SEPARATOR_NAME$4 = "SelectSeparator";
25309
25527
  var SelectSeparator$1 = React.forwardRef(
25310
25528
  (props2, forwardedRef) => {
25311
25529
  const { __scopeSelect, ...separatorProps } = props2;
25312
- return /* @__PURE__ */ jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
25530
+ return /* @__PURE__ */ jsx(Primitive$6.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
25313
25531
  }
25314
25532
  );
25315
25533
  SelectSeparator$1.displayName = SEPARATOR_NAME$4;
@@ -25346,7 +25564,7 @@ var SelectBubbleInput = React.forwardRef(
25346
25564
  }
25347
25565
  }, [prevValue, value]);
25348
25566
  return /* @__PURE__ */ jsx(
25349
- Primitive.select,
25567
+ Primitive$6.select,
25350
25568
  {
25351
25569
  ...props2,
25352
25570
  style: { ...VISUALLY_HIDDEN_STYLES, ...props2.style },
@@ -25603,7 +25821,7 @@ function SelectField({
25603
25821
  }
25604
25822
  );
25605
25823
  }
25606
- var [createTooltipContext] = createContextScope("Tooltip", [
25824
+ var [createTooltipContext] = createContextScope$2("Tooltip", [
25607
25825
  createPopperScope
25608
25826
  ]);
25609
25827
  var usePopperScope$2 = createPopperScope();
@@ -25762,7 +25980,7 @@ var TooltipTrigger$1 = React.forwardRef(
25762
25980
  return () => document.removeEventListener("pointerup", handlePointerUp2);
25763
25981
  }, [handlePointerUp2]);
25764
25982
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
25765
- Primitive.button,
25983
+ Primitive$6.button,
25766
25984
  {
25767
25985
  "aria-describedby": context.open ? context.contentId : void 0,
25768
25986
  "data-state": context.stateAttribute,
@@ -26207,7 +26425,7 @@ function CheckboxField({
26207
26425
  ] });
26208
26426
  }
26209
26427
  var SWITCH_NAME = "Switch";
26210
- var [createSwitchContext] = createContextScope(SWITCH_NAME);
26428
+ var [createSwitchContext] = createContextScope$2(SWITCH_NAME);
26211
26429
  var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
26212
26430
  var Switch$1 = React.forwardRef(
26213
26431
  (props2, forwardedRef) => {
@@ -26235,7 +26453,7 @@ var Switch$1 = React.forwardRef(
26235
26453
  });
26236
26454
  return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
26237
26455
  /* @__PURE__ */ jsx(
26238
- Primitive.button,
26456
+ Primitive$6.button,
26239
26457
  {
26240
26458
  type: "button",
26241
26459
  role: "switch",
@@ -26280,7 +26498,7 @@ var SwitchThumb = React.forwardRef(
26280
26498
  const { __scopeSwitch, ...thumbProps } = props2;
26281
26499
  const context = useSwitchContext(THUMB_NAME$2, __scopeSwitch);
26282
26500
  return /* @__PURE__ */ jsx(
26283
- Primitive.span,
26501
+ Primitive$6.span,
26284
26502
  {
26285
26503
  "data-state": getState$2(context.checked),
26286
26504
  "data-disabled": context.disabled ? "" : void 0,
@@ -26447,7 +26665,7 @@ function SwitchField({
26447
26665
  ] });
26448
26666
  }
26449
26667
  var RADIO_NAME = "Radio";
26450
- var [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);
26668
+ var [createRadioContext, createRadioScope] = createContextScope$2(RADIO_NAME);
26451
26669
  var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
26452
26670
  var Radio = React.forwardRef(
26453
26671
  (props2, forwardedRef) => {
@@ -26468,7 +26686,7 @@ var Radio = React.forwardRef(
26468
26686
  const isFormControl = button ? form || !!button.closest("form") : true;
26469
26687
  return /* @__PURE__ */ jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [
26470
26688
  /* @__PURE__ */ jsx(
26471
- Primitive.button,
26689
+ Primitive$6.button,
26472
26690
  {
26473
26691
  type: "button",
26474
26692
  role: "radio",
@@ -26512,7 +26730,7 @@ var RadioIndicator = React.forwardRef(
26512
26730
  const { __scopeRadio, forceMount, ...indicatorProps } = props2;
26513
26731
  const context = useRadioContext(INDICATOR_NAME$5, __scopeRadio);
26514
26732
  return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsx(
26515
- Primitive.span,
26733
+ Primitive$6.span,
26516
26734
  {
26517
26735
  "data-state": getState$1(context.checked),
26518
26736
  "data-disabled": context.disabled ? "" : void 0,
@@ -26552,7 +26770,7 @@ var RadioBubbleInput = React.forwardRef(
26552
26770
  }
26553
26771
  }, [prevChecked, checked, bubbles]);
26554
26772
  return /* @__PURE__ */ jsx(
26555
- Primitive.input,
26773
+ Primitive$6.input,
26556
26774
  {
26557
26775
  type: "radio",
26558
26776
  "aria-hidden": true,
@@ -26578,7 +26796,7 @@ function getState$1(checked) {
26578
26796
  }
26579
26797
  var ARROW_KEYS$2 = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
26580
26798
  var RADIO_GROUP_NAME$4 = "RadioGroup";
26581
- var [createRadioGroupContext] = createContextScope(RADIO_GROUP_NAME$4, [
26799
+ var [createRadioGroupContext] = createContextScope$2(RADIO_GROUP_NAME$4, [
26582
26800
  createRovingFocusGroupScope,
26583
26801
  createRadioScope
26584
26802
  ]);
@@ -26626,7 +26844,7 @@ var RadioGroup$2 = React.forwardRef(
26626
26844
  dir: direction,
26627
26845
  loop,
26628
26846
  children: /* @__PURE__ */ jsx(
26629
- Primitive.div,
26847
+ Primitive$6.div,
26630
26848
  {
26631
26849
  role: "radiogroup",
26632
26850
  "aria-required": required2,
@@ -27779,7 +27997,7 @@ const match = {
27779
27997
  defaultParseWidth: "any"
27780
27998
  })
27781
27999
  };
27782
- const enUS = {
28000
+ const enUS$1 = {
27783
28001
  code: "en-US",
27784
28002
  formatDistance,
27785
28003
  formatLong,
@@ -28626,7 +28844,7 @@ const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
28626
28844
  function format(date2, formatStr, options) {
28627
28845
  var _a2, _b, _c, _d, _e2, _f, _g, _h;
28628
28846
  const defaultOptions2 = getDefaultOptions();
28629
- const locale = (options == null ? void 0 : options.locale) ?? defaultOptions2.locale ?? enUS;
28847
+ const locale = (options == null ? void 0 : options.locale) ?? defaultOptions2.locale ?? enUS$1;
28630
28848
  const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a2 = options == null ? void 0 : options.locale) == null ? void 0 : _a2.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
28631
28849
  const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_f = (_e2 = options == null ? void 0 : options.locale) == null ? void 0 : _e2.options) == null ? void 0 : _f.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_h = (_g = defaultOptions2.locale) == null ? void 0 : _g.options) == null ? void 0 : _h.weekStartsOn) ?? 0;
28632
28850
  const originalDate = toDate(date2, options == null ? void 0 : options.in);
@@ -28764,6 +28982,63 @@ function endOfBroadcastWeek(date2, dateLib) {
28764
28982
  const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);
28765
28983
  return endDate;
28766
28984
  }
28985
+ const enUS = {
28986
+ ...enUS$1,
28987
+ labels: {
28988
+ labelDayButton: (date2, modifiers, options, dateLib) => {
28989
+ let formatDate;
28990
+ if (dateLib && typeof dateLib.format === "function") {
28991
+ formatDate = dateLib.format.bind(dateLib);
28992
+ } else {
28993
+ formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
28994
+ }
28995
+ let label = formatDate(date2, "PPPP");
28996
+ if (modifiers.today)
28997
+ label = `Today, ${label}`;
28998
+ if (modifiers.selected)
28999
+ label = `${label}, selected`;
29000
+ return label;
29001
+ },
29002
+ labelMonthDropdown: "Choose the Month",
29003
+ labelNext: "Go to the Next Month",
29004
+ labelPrevious: "Go to the Previous Month",
29005
+ labelWeekNumber: (weekNumber) => `Week ${weekNumber}`,
29006
+ labelYearDropdown: "Choose the Year",
29007
+ labelGrid: (date2, options, dateLib) => {
29008
+ let formatDate;
29009
+ if (dateLib && typeof dateLib.format === "function") {
29010
+ formatDate = dateLib.format.bind(dateLib);
29011
+ } else {
29012
+ formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
29013
+ }
29014
+ return formatDate(date2, "LLLL yyyy");
29015
+ },
29016
+ labelGridcell: (date2, modifiers, options, dateLib) => {
29017
+ let formatDate;
29018
+ if (dateLib && typeof dateLib.format === "function") {
29019
+ formatDate = dateLib.format.bind(dateLib);
29020
+ } else {
29021
+ formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
29022
+ }
29023
+ let label = formatDate(date2, "PPPP");
29024
+ if (modifiers == null ? void 0 : modifiers.today) {
29025
+ label = `Today, ${label}`;
29026
+ }
29027
+ return label;
29028
+ },
29029
+ labelNav: "Navigation bar",
29030
+ labelWeekNumberHeader: "Week Number",
29031
+ labelWeekday: (date2, options, dateLib) => {
29032
+ let formatDate;
29033
+ if (dateLib && typeof dateLib.format === "function") {
29034
+ formatDate = dateLib.format.bind(dateLib);
29035
+ } else {
29036
+ formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
29037
+ }
29038
+ return formatDate(date2, "cccc");
29039
+ }
29040
+ }
29041
+ };
28767
29042
  class DateLib {
28768
29043
  /**
28769
29044
  * Creates an instance of `DateLib`.
@@ -29047,6 +29322,9 @@ class CalendarDay {
29047
29322
  this.displayMonth = displayMonth;
29048
29323
  this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date2, displayMonth));
29049
29324
  this.dateLib = dateLib;
29325
+ this.isoDate = dateLib.format(date2, "yyyy-MM-dd");
29326
+ this.displayMonthId = dateLib.format(displayMonth, "yyyy-MM");
29327
+ this.dateMonthId = dateLib.format(date2, "yyyy-MM");
29050
29328
  }
29051
29329
  /**
29052
29330
  * Checks if this day is equal to another `CalendarDay`, considering both the
@@ -29357,7 +29635,7 @@ function dateMatchModifiers(date2, matchers, dateLib = defaultDateLib) {
29357
29635
  return isSameDay2(date2, matcher);
29358
29636
  }
29359
29637
  if (isDatesArray(matcher, dateLib)) {
29360
- return matcher.includes(date2);
29638
+ return matcher.some((matcherDate) => isSameDay2(date2, matcherDate));
29361
29639
  }
29362
29640
  if (isDateRange(matcher)) {
29363
29641
  return rangeIncludesDate(matcher, date2, false, dateLib);
@@ -29393,7 +29671,7 @@ function dateMatchModifiers(date2, matchers, dateLib = defaultDateLib) {
29393
29671
  });
29394
29672
  }
29395
29673
  function createGetModifiers(days, props2, navStart, navEnd, dateLib) {
29396
- const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props2;
29674
+ const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today = dateLib.today() } = props2;
29397
29675
  const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
29398
29676
  const computedNavStart = navStart && startOfMonth2(navStart);
29399
29677
  const computedNavEnd = navEnd && endOfMonth2(navEnd);
@@ -29413,7 +29691,7 @@ function createGetModifiers(days, props2, navStart, navEnd, dateLib) {
29413
29691
  const isDisabled = Boolean(disabled && dateMatchModifiers(date2, disabled, dateLib));
29414
29692
  const isHidden2 = Boolean(hidden && dateMatchModifiers(date2, hidden, dateLib)) || isBeforeNavStart || isAfterNavEnd || // Broadcast calendar will show outside days as default
29415
29693
  !broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
29416
- const isToday = isSameDay2(date2, today ?? dateLib.today());
29694
+ const isToday = isSameDay2(date2, today);
29417
29695
  if (isOutside)
29418
29696
  internalModifiersMap.outside.push(day);
29419
29697
  if (isDisabled)
@@ -29561,60 +29839,6 @@ function getFormatters(customFormatters) {
29561
29839
  ...customFormatters
29562
29840
  };
29563
29841
  }
29564
- function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
29565
- const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
29566
- const months = eachMonthOfInterval2({
29567
- start: startOfYear2(displayMonth),
29568
- end: endOfYear2(displayMonth)
29569
- });
29570
- const options = months.map((month) => {
29571
- const label = formatters2.formatMonthDropdown(month, dateLib);
29572
- const value = getMonth2(month);
29573
- const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
29574
- return { value, label, disabled };
29575
- });
29576
- return options;
29577
- }
29578
- function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
29579
- let style = { ...styles == null ? void 0 : styles[UI.Day] };
29580
- Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
29581
- style = {
29582
- ...style,
29583
- ...modifiersStyles == null ? void 0 : modifiersStyles[modifier]
29584
- };
29585
- });
29586
- return style;
29587
- }
29588
- function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
29589
- const today = dateLib.today();
29590
- const start = ISOWeek ? dateLib.startOfISOWeek(today) : dateLib.startOfWeek(today);
29591
- const days = [];
29592
- for (let i2 = 0; i2 < 7; i2++) {
29593
- const day = dateLib.addDays(start, i2);
29594
- days.push(day);
29595
- }
29596
- return days;
29597
- }
29598
- function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
29599
- if (!navStart)
29600
- return void 0;
29601
- if (!navEnd)
29602
- return void 0;
29603
- const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
29604
- const firstNavYear = startOfYear2(navStart);
29605
- const lastNavYear = endOfYear2(navEnd);
29606
- const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
29607
- if (reverse)
29608
- years.reverse();
29609
- return years.map((year) => {
29610
- const label = formatters2.formatYearDropdown(year, dateLib);
29611
- return {
29612
- value: getYear2(year),
29613
- label,
29614
- disabled: false
29615
- };
29616
- });
29617
- }
29618
29842
  function labelDayButton(date2, modifiers, options, dateLib) {
29619
29843
  let label = (dateLib ?? new DateLib(options)).format(date2, "PPPP");
29620
29844
  if (modifiers.today)
@@ -29642,8 +29866,9 @@ function labelMonthDropdown(_options) {
29642
29866
  function labelNav() {
29643
29867
  return "";
29644
29868
  }
29645
- function labelNext(_month) {
29646
- return "Go to the Next Month";
29869
+ const defaultLabel = "Go to the Next Month";
29870
+ function labelNext(_month, _options) {
29871
+ return defaultLabel;
29647
29872
  }
29648
29873
  function labelPrevious(_month) {
29649
29874
  return "Go to the Previous Month";
@@ -29676,6 +29901,87 @@ const defaultLabels = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
29676
29901
  labelWeekday,
29677
29902
  labelYearDropdown
29678
29903
  }, Symbol.toStringTag, { value: "Module" }));
29904
+ const resolveLabel = (defaultLabel2, customLabel, localeLabel) => {
29905
+ if (customLabel)
29906
+ return customLabel;
29907
+ if (localeLabel) {
29908
+ return typeof localeLabel === "function" ? localeLabel : (..._args) => localeLabel;
29909
+ }
29910
+ return defaultLabel2;
29911
+ };
29912
+ function getLabels(customLabels, options) {
29913
+ var _a2;
29914
+ const localeLabels = ((_a2 = options.locale) == null ? void 0 : _a2.labels) ?? {};
29915
+ return {
29916
+ ...defaultLabels,
29917
+ ...customLabels ?? {},
29918
+ labelDayButton: resolveLabel(labelDayButton, customLabels == null ? void 0 : customLabels.labelDayButton, localeLabels.labelDayButton),
29919
+ labelMonthDropdown: resolveLabel(labelMonthDropdown, customLabels == null ? void 0 : customLabels.labelMonthDropdown, localeLabels.labelMonthDropdown),
29920
+ labelNext: resolveLabel(labelNext, customLabels == null ? void 0 : customLabels.labelNext, localeLabels.labelNext),
29921
+ labelPrevious: resolveLabel(labelPrevious, customLabels == null ? void 0 : customLabels.labelPrevious, localeLabels.labelPrevious),
29922
+ labelWeekNumber: resolveLabel(labelWeekNumber, customLabels == null ? void 0 : customLabels.labelWeekNumber, localeLabels.labelWeekNumber),
29923
+ labelYearDropdown: resolveLabel(labelYearDropdown, customLabels == null ? void 0 : customLabels.labelYearDropdown, localeLabels.labelYearDropdown),
29924
+ labelGrid: resolveLabel(labelGrid, customLabels == null ? void 0 : customLabels.labelGrid, localeLabels.labelGrid),
29925
+ labelGridcell: resolveLabel(labelGridcell, customLabels == null ? void 0 : customLabels.labelGridcell, localeLabels.labelGridcell),
29926
+ labelNav: resolveLabel(labelNav, customLabels == null ? void 0 : customLabels.labelNav, localeLabels.labelNav),
29927
+ labelWeekNumberHeader: resolveLabel(labelWeekNumberHeader, customLabels == null ? void 0 : customLabels.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),
29928
+ labelWeekday: resolveLabel(labelWeekday, customLabels == null ? void 0 : customLabels.labelWeekday, localeLabels.labelWeekday)
29929
+ };
29930
+ }
29931
+ function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
29932
+ const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
29933
+ const months = eachMonthOfInterval2({
29934
+ start: startOfYear2(displayMonth),
29935
+ end: endOfYear2(displayMonth)
29936
+ });
29937
+ const options = months.map((month) => {
29938
+ const label = formatters2.formatMonthDropdown(month, dateLib);
29939
+ const value = getMonth2(month);
29940
+ const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
29941
+ return { value, label, disabled };
29942
+ });
29943
+ return options;
29944
+ }
29945
+ function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
29946
+ let style = { ...styles == null ? void 0 : styles[UI.Day] };
29947
+ Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
29948
+ style = {
29949
+ ...style,
29950
+ ...modifiersStyles == null ? void 0 : modifiersStyles[modifier]
29951
+ };
29952
+ });
29953
+ return style;
29954
+ }
29955
+ function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {
29956
+ const referenceToday = today ?? dateLib.today();
29957
+ const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(referenceToday, dateLib) : ISOWeek ? dateLib.startOfISOWeek(referenceToday) : dateLib.startOfWeek(referenceToday);
29958
+ const days = [];
29959
+ for (let i2 = 0; i2 < 7; i2++) {
29960
+ const day = dateLib.addDays(start, i2);
29961
+ days.push(day);
29962
+ }
29963
+ return days;
29964
+ }
29965
+ function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
29966
+ if (!navStart)
29967
+ return void 0;
29968
+ if (!navEnd)
29969
+ return void 0;
29970
+ const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
29971
+ const firstNavYear = startOfYear2(navStart);
29972
+ const lastNavYear = endOfYear2(navEnd);
29973
+ const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
29974
+ if (reverse)
29975
+ years.reverse();
29976
+ return years.map((year) => {
29977
+ const label = formatters2.formatYearDropdown(year, dateLib);
29978
+ return {
29979
+ value: getYear2(year),
29980
+ label,
29981
+ disabled: false
29982
+ };
29983
+ });
29984
+ }
29679
29985
  const asHtmlElement = (element) => {
29680
29986
  if (element instanceof HTMLElement)
29681
29987
  return element;
@@ -29805,15 +30111,14 @@ function getDates(displayMonths, maxDate, props2, dateLib) {
29805
30111
  const { ISOWeek, fixedWeeks, broadcastCalendar } = props2 ?? {};
29806
30112
  const { addDays: addDays2, differenceInCalendarDays: differenceInCalendarDays2, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, isAfter: isAfter2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
29807
30113
  const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
29808
- const endWeekLastDate = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
29809
- const nOfDays = differenceInCalendarDays2(endWeekLastDate, startWeekFirstDate);
30114
+ const displayMonthsWeekEnd = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
30115
+ const constraintWeekEnd = maxDate && (broadcastCalendar ? endOfBroadcastWeek2(maxDate) : ISOWeek ? endOfISOWeek2(maxDate) : endOfWeek2(maxDate));
30116
+ const gridEndDate = constraintWeekEnd && isAfter2(displayMonthsWeekEnd, constraintWeekEnd) ? constraintWeekEnd : displayMonthsWeekEnd;
30117
+ const nOfDays = differenceInCalendarDays2(gridEndDate, startWeekFirstDate);
29810
30118
  const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
29811
30119
  const dates = [];
29812
30120
  for (let i2 = 0; i2 <= nOfDays; i2++) {
29813
30121
  const date2 = addDays2(startWeekFirstDate, i2);
29814
- if (maxDate && isAfter2(date2, maxDate)) {
29815
- break;
29816
- }
29817
30122
  dates.push(date2);
29818
30123
  }
29819
30124
  const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
@@ -29980,6 +30285,7 @@ function useControlledValue(defaultValue, controlledValue) {
29980
30285
  return [value, setValue];
29981
30286
  }
29982
30287
  function useCalendar(props2, dateLib) {
30288
+ var _a2;
29983
30289
  const [navStart, navEnd] = getNavMonths(props2, dateLib);
29984
30290
  const { startOfMonth: startOfMonth2, endOfMonth: endOfMonth2 } = dateLib;
29985
30291
  const initialMonth = getInitialMonth(props2, navStart, navEnd, dateLib);
@@ -29992,13 +30298,44 @@ function useCalendar(props2, dateLib) {
29992
30298
  const newInitialMonth = getInitialMonth(props2, navStart, navEnd, dateLib);
29993
30299
  setFirstMonth(newInitialMonth);
29994
30300
  }, [props2.timeZone]);
29995
- const displayMonths = getDisplayMonths(firstMonth, navEnd, props2, dateLib);
29996
- const dates = getDates(displayMonths, props2.endMonth ? endOfMonth2(props2.endMonth) : void 0, props2, dateLib);
29997
- const months = getMonths(displayMonths, dates, props2, dateLib);
29998
- const weeks = getWeeks(months);
29999
- const days = getDays(months);
30000
- const previousMonth = getPreviousMonth(firstMonth, navStart, props2, dateLib);
30001
- const nextMonth = getNextMonth(firstMonth, navEnd, props2, dateLib);
30301
+ const { months, weeks, days, previousMonth, nextMonth } = useMemo(() => {
30302
+ const displayMonths = getDisplayMonths(firstMonth, navEnd, { numberOfMonths: props2.numberOfMonths }, dateLib);
30303
+ const dates = getDates(displayMonths, props2.endMonth ? endOfMonth2(props2.endMonth) : void 0, {
30304
+ ISOWeek: props2.ISOWeek,
30305
+ fixedWeeks: props2.fixedWeeks,
30306
+ broadcastCalendar: props2.broadcastCalendar
30307
+ }, dateLib);
30308
+ const months2 = getMonths(displayMonths, dates, {
30309
+ broadcastCalendar: props2.broadcastCalendar,
30310
+ fixedWeeks: props2.fixedWeeks,
30311
+ ISOWeek: props2.ISOWeek,
30312
+ reverseMonths: props2.reverseMonths
30313
+ }, dateLib);
30314
+ const weeks2 = getWeeks(months2);
30315
+ const days2 = getDays(months2);
30316
+ const previousMonth2 = getPreviousMonth(firstMonth, navStart, props2, dateLib);
30317
+ const nextMonth2 = getNextMonth(firstMonth, navEnd, props2, dateLib);
30318
+ return {
30319
+ months: months2,
30320
+ weeks: weeks2,
30321
+ days: days2,
30322
+ previousMonth: previousMonth2,
30323
+ nextMonth: nextMonth2
30324
+ };
30325
+ }, [
30326
+ dateLib,
30327
+ firstMonth.getTime(),
30328
+ navEnd == null ? void 0 : navEnd.getTime(),
30329
+ navStart == null ? void 0 : navStart.getTime(),
30330
+ props2.disableNavigation,
30331
+ props2.broadcastCalendar,
30332
+ (_a2 = props2.endMonth) == null ? void 0 : _a2.getTime(),
30333
+ props2.fixedWeeks,
30334
+ props2.ISOWeek,
30335
+ props2.numberOfMonths,
30336
+ props2.pagedNavigation,
30337
+ props2.reverseMonths
30338
+ ]);
30002
30339
  const { disableNavigation, onMonthChange } = props2;
30003
30340
  const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));
30004
30341
  const goToMonth = (date2) => {
@@ -30366,38 +30703,104 @@ function useSelection(props2, dateLib) {
30366
30703
  return void 0;
30367
30704
  }
30368
30705
  }
30706
+ function toTimeZone(date2, timeZone) {
30707
+ if (date2 instanceof TZDate && date2.timeZone === timeZone) {
30708
+ return date2;
30709
+ }
30710
+ return new TZDate(date2, timeZone);
30711
+ }
30712
+ function convertMatcher(matcher, timeZone) {
30713
+ if (typeof matcher === "boolean" || typeof matcher === "function") {
30714
+ return matcher;
30715
+ }
30716
+ if (matcher instanceof Date) {
30717
+ return toTimeZone(matcher, timeZone);
30718
+ }
30719
+ if (Array.isArray(matcher)) {
30720
+ return matcher.map((value) => value instanceof Date ? toTimeZone(value, timeZone) : value);
30721
+ }
30722
+ if (isDateRange(matcher)) {
30723
+ return {
30724
+ ...matcher,
30725
+ from: matcher.from ? toTimeZone(matcher.from, timeZone) : matcher.from,
30726
+ to: matcher.to ? toTimeZone(matcher.to, timeZone) : matcher.to
30727
+ };
30728
+ }
30729
+ if (isDateInterval(matcher)) {
30730
+ return {
30731
+ before: toTimeZone(matcher.before, timeZone),
30732
+ after: toTimeZone(matcher.after, timeZone)
30733
+ };
30734
+ }
30735
+ if (isDateAfterType(matcher)) {
30736
+ return {
30737
+ after: toTimeZone(matcher.after, timeZone)
30738
+ };
30739
+ }
30740
+ if (isDateBeforeType(matcher)) {
30741
+ return {
30742
+ before: toTimeZone(matcher.before, timeZone)
30743
+ };
30744
+ }
30745
+ return matcher;
30746
+ }
30747
+ function convertMatchersToTimeZone(matchers, timeZone) {
30748
+ if (!matchers) {
30749
+ return matchers;
30750
+ }
30751
+ if (Array.isArray(matchers)) {
30752
+ return matchers.map((matcher) => convertMatcher(matcher, timeZone));
30753
+ }
30754
+ return convertMatcher(matchers, timeZone);
30755
+ }
30369
30756
  function DayPicker(initialProps) {
30370
30757
  var _a2;
30371
30758
  let props2 = initialProps;
30372
- if (props2.timeZone) {
30759
+ const timeZone = props2.timeZone;
30760
+ if (timeZone) {
30373
30761
  props2 = {
30374
- ...initialProps
30762
+ ...initialProps,
30763
+ timeZone
30375
30764
  };
30376
30765
  if (props2.today) {
30377
- props2.today = new TZDate(props2.today, props2.timeZone);
30766
+ props2.today = toTimeZone(props2.today, timeZone);
30378
30767
  }
30379
30768
  if (props2.month) {
30380
- props2.month = new TZDate(props2.month, props2.timeZone);
30769
+ props2.month = toTimeZone(props2.month, timeZone);
30381
30770
  }
30382
30771
  if (props2.defaultMonth) {
30383
- props2.defaultMonth = new TZDate(props2.defaultMonth, props2.timeZone);
30772
+ props2.defaultMonth = toTimeZone(props2.defaultMonth, timeZone);
30384
30773
  }
30385
30774
  if (props2.startMonth) {
30386
- props2.startMonth = new TZDate(props2.startMonth, props2.timeZone);
30775
+ props2.startMonth = toTimeZone(props2.startMonth, timeZone);
30387
30776
  }
30388
30777
  if (props2.endMonth) {
30389
- props2.endMonth = new TZDate(props2.endMonth, props2.timeZone);
30778
+ props2.endMonth = toTimeZone(props2.endMonth, timeZone);
30390
30779
  }
30391
30780
  if (props2.mode === "single" && props2.selected) {
30392
- props2.selected = new TZDate(props2.selected, props2.timeZone);
30781
+ props2.selected = toTimeZone(props2.selected, timeZone);
30393
30782
  } else if (props2.mode === "multiple" && props2.selected) {
30394
- props2.selected = (_a2 = props2.selected) == null ? void 0 : _a2.map((date2) => new TZDate(date2, props2.timeZone));
30783
+ props2.selected = (_a2 = props2.selected) == null ? void 0 : _a2.map((date2) => toTimeZone(date2, timeZone));
30395
30784
  } else if (props2.mode === "range" && props2.selected) {
30396
30785
  props2.selected = {
30397
- from: props2.selected.from ? new TZDate(props2.selected.from, props2.timeZone) : void 0,
30398
- to: props2.selected.to ? new TZDate(props2.selected.to, props2.timeZone) : void 0
30786
+ from: props2.selected.from ? toTimeZone(props2.selected.from, timeZone) : props2.selected.from,
30787
+ to: props2.selected.to ? toTimeZone(props2.selected.to, timeZone) : props2.selected.to
30399
30788
  };
30400
30789
  }
30790
+ if (props2.disabled !== void 0) {
30791
+ props2.disabled = convertMatchersToTimeZone(props2.disabled, timeZone);
30792
+ }
30793
+ if (props2.hidden !== void 0) {
30794
+ props2.hidden = convertMatchersToTimeZone(props2.hidden, timeZone);
30795
+ }
30796
+ if (props2.modifiers) {
30797
+ const nextModifiers = {};
30798
+ Object.keys(props2.modifiers).forEach((key) => {
30799
+ var _a3;
30800
+ nextModifiers[key] = convertMatchersToTimeZone((_a3 = props2.modifiers) == null ? void 0 : _a3[key], timeZone);
30801
+ });
30802
+ props2.modifiers = nextModifiers;
30803
+ }
30401
30804
  }
30402
30805
  const { components: components2, formatters: formatters2, labels, dateLib, locale, classNames } = useMemo(() => {
30403
30806
  const locale2 = { ...enUS, ...props2.locale };
@@ -30414,7 +30817,7 @@ function DayPicker(initialProps) {
30414
30817
  dateLib: dateLib2,
30415
30818
  components: getComponents(props2.components),
30416
30819
  formatters: getFormatters(props2.formatters),
30417
- labels: { ...defaultLabels, ...props2.labels },
30820
+ labels: getLabels(props2.labels, dateLib2.options),
30418
30821
  locale: locale2,
30419
30822
  classNames: { ...getDefaultClassNames(), ...props2.classNames }
30420
30823
  };
@@ -30433,6 +30836,9 @@ function DayPicker(initialProps) {
30433
30836
  props2.labels,
30434
30837
  props2.classNames
30435
30838
  ]);
30839
+ if (!props2.today) {
30840
+ props2 = { ...props2, today: dateLib.today() };
30841
+ }
30436
30842
  const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props2;
30437
30843
  const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters2;
30438
30844
  const calendar = useCalendar(props2, dateLib);
@@ -30441,7 +30847,7 @@ function DayPicker(initialProps) {
30441
30847
  const { isSelected, select, selected: selectedValue } = useSelection(props2, dateLib) ?? {};
30442
30848
  const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props2, calendar, getModifiers, isSelected ?? (() => false), dateLib);
30443
30849
  const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
30444
- const weekdays = useMemo(() => getWeekdays(dateLib, props2.ISOWeek), [dateLib, props2.ISOWeek]);
30850
+ const weekdays = useMemo(() => getWeekdays(dateLib, props2.ISOWeek, props2.broadcastCalendar, props2.today), [dateLib, props2.ISOWeek, props2.broadcastCalendar, props2.today]);
30445
30851
  const isInteractive = mode !== void 0 || onDayClick !== void 0;
30446
30852
  const handlePreviousClick = useCallback(() => {
30447
30853
  if (!previousMonth)
@@ -30459,6 +30865,9 @@ function DayPicker(initialProps) {
30459
30865
  e2.preventDefault();
30460
30866
  e2.stopPropagation();
30461
30867
  setFocused(day);
30868
+ if (m2.disabled) {
30869
+ return;
30870
+ }
30462
30871
  select == null ? void 0 : select(day.date, m2, e2);
30463
30872
  onDayClick == null ? void 0 : onDayClick(day.date, m2, e2);
30464
30873
  }, [select, onDayClick, setFocused]);
@@ -30587,10 +30996,7 @@ function DayPicker(initialProps) {
30587
30996
  whiteSpace: "nowrap",
30588
30997
  wordWrap: "normal"
30589
30998
  } }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
30590
- ) : (
30591
- // biome-ignore lint/a11y/useSemanticElements: breaking change
30592
- React__default.createElement(components2.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
30593
- )),
30999
+ ) : React__default.createElement(components2.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
30594
31000
  navLayout === "around" && !props2.hideNavigation && displayIndex === numberOfMonths - 1 && React__default.createElement(
30595
31001
  components2.NextMonthButton,
30596
31002
  { type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props2.animate ? "true" : void 0 },
@@ -30610,8 +31016,7 @@ function DayPicker(initialProps) {
30610
31016
  return React__default.createElement(
30611
31017
  components2.Week,
30612
31018
  { className: classNames[UI.Week], key: week.weekNumber, style: styles == null ? void 0 : styles[UI.Week], week },
30613
- showWeekNumber && // biome-ignore lint/a11y/useSemanticElements: react component
30614
- React__default.createElement(components2.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
31019
+ showWeekNumber && React__default.createElement(components2.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
30615
31020
  locale
30616
31021
  }), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
30617
31022
  week.days.map((day) => {
@@ -30628,10 +31033,7 @@ function DayPicker(initialProps) {
30628
31033
  const style2 = getStyleForModifiers(modifiers, styles, props2.modifiersStyles);
30629
31034
  const className2 = getClassNamesForModifiers(modifiers, classNames, props2.modifiersClassNames);
30630
31035
  const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date2, modifiers, dateLib.options, dateLib) : void 0;
30631
- return (
30632
- // biome-ignore lint/a11y/useSemanticElements: react component
30633
- React__default.createElement(components2.Day, { key: `${dateLib.format(date2, "yyyy-MM-dd")}_${dateLib.format(day.displayMonth, "yyyy-MM")}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": dateLib.format(date2, "yyyy-MM-dd"), "data-month": day.outside ? dateLib.format(date2, "yyyy-MM") : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? React__default.createElement(components2.DayButton, { className: classNames[UI.DayButton], style: styles == null ? void 0 : styles[UI.DayButton], type: "button", day, modifiers, disabled: modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date2, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date2, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib))
30634
- );
31036
+ return React__default.createElement(components2.Day, { key: `${day.isoDate}_${day.displayMonthId}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": day.isoDate, "data-month": day.outside ? day.dateMonthId : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? React__default.createElement(components2.DayButton, { className: classNames[UI.DayButton], style: styles == null ? void 0 : styles[UI.DayButton], type: "button", day, modifiers, disabled: !modifiers.focused && modifiers.disabled || void 0, "aria-disabled": modifiers.focused && modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date2, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date2, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib));
30635
31037
  })
30636
31038
  );
30637
31039
  }))
@@ -30639,8 +31041,7 @@ function DayPicker(initialProps) {
30639
31041
  );
30640
31042
  })
30641
31043
  ),
30642
- props2.footer && // biome-ignore lint/a11y/useSemanticElements: react component
30643
- React__default.createElement(components2.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props2.footer)
31044
+ props2.footer && React__default.createElement(components2.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props2.footer)
30644
31045
  )
30645
31046
  );
30646
31047
  }
@@ -36013,7 +36414,7 @@ function reducer(state, action) {
36013
36414
  function noop$1() {
36014
36415
  }
36015
36416
  var DIALOG_NAME = "Dialog";
36016
- var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
36417
+ var [createDialogContext, createDialogScope] = createContextScope$2(DIALOG_NAME);
36017
36418
  var [DialogProvider$1, useDialogContext] = createDialogContext(DIALOG_NAME);
36018
36419
  var Dialog$1 = (props2) => {
36019
36420
  const {
@@ -36057,7 +36458,7 @@ var DialogTrigger$1 = React.forwardRef(
36057
36458
  const context = useDialogContext(TRIGGER_NAME$6, __scopeDialog);
36058
36459
  const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
36059
36460
  return /* @__PURE__ */ jsx(
36060
- Primitive.button,
36461
+ Primitive$6.button,
36061
36462
  {
36062
36463
  type: "button",
36063
36464
  "aria-haspopup": "dialog",
@@ -36092,7 +36493,7 @@ var DialogOverlay$1 = React.forwardRef(
36092
36493
  }
36093
36494
  );
36094
36495
  DialogOverlay$1.displayName = OVERLAY_NAME$1;
36095
- var Slot$1 = /* @__PURE__ */ createSlot$1("DialogOverlay.RemoveScroll");
36496
+ var Slot$1 = /* @__PURE__ */ createSlot$7("DialogOverlay.RemoveScroll");
36096
36497
  var DialogOverlayImpl = React.forwardRef(
36097
36498
  (props2, forwardedRef) => {
36098
36499
  const { __scopeDialog, ...overlayProps } = props2;
@@ -36101,7 +36502,7 @@ var DialogOverlayImpl = React.forwardRef(
36101
36502
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
36102
36503
  // ie. when `Overlay` and `Content` are siblings
36103
36504
  /* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot$1, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
36104
- Primitive.div,
36505
+ Primitive$6.div,
36105
36506
  {
36106
36507
  "data-state": getState(context.open),
36107
36508
  ...overlayProps,
@@ -36242,7 +36643,7 @@ var DialogTitle$1 = React.forwardRef(
36242
36643
  (props2, forwardedRef) => {
36243
36644
  const { __scopeDialog, ...titleProps } = props2;
36244
36645
  const context = useDialogContext(TITLE_NAME$1, __scopeDialog);
36245
- return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
36646
+ return /* @__PURE__ */ jsx(Primitive$6.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
36246
36647
  }
36247
36648
  );
36248
36649
  DialogTitle$1.displayName = TITLE_NAME$1;
@@ -36251,7 +36652,7 @@ var DialogDescription$1 = React.forwardRef(
36251
36652
  (props2, forwardedRef) => {
36252
36653
  const { __scopeDialog, ...descriptionProps } = props2;
36253
36654
  const context = useDialogContext(DESCRIPTION_NAME$1, __scopeDialog);
36254
- return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
36655
+ return /* @__PURE__ */ jsx(Primitive$6.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
36255
36656
  }
36256
36657
  );
36257
36658
  DialogDescription$1.displayName = DESCRIPTION_NAME$1;
@@ -36261,7 +36662,7 @@ var DialogClose$1 = React.forwardRef(
36261
36662
  const { __scopeDialog, ...closeProps } = props2;
36262
36663
  const context = useDialogContext(CLOSE_NAME, __scopeDialog);
36263
36664
  return /* @__PURE__ */ jsx(
36264
- Primitive.button,
36665
+ Primitive$6.button,
36265
36666
  {
36266
36667
  type: "button",
36267
36668
  ...closeProps,
@@ -36438,9 +36839,198 @@ function DialogDescription({
36438
36839
  }
36439
36840
  );
36440
36841
  }
36842
+ function createContextScope$1(scopeName, createContextScopeDeps = []) {
36843
+ let defaultContexts = [];
36844
+ function createContext3(rootComponentName, defaultContext) {
36845
+ const BaseContext = React.createContext(defaultContext);
36846
+ BaseContext.displayName = rootComponentName + "Context";
36847
+ const index2 = defaultContexts.length;
36848
+ defaultContexts = [...defaultContexts, defaultContext];
36849
+ const Provider2 = (props2) => {
36850
+ var _a2;
36851
+ const { scope, children, ...context } = props2;
36852
+ const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
36853
+ const value = React.useMemo(() => context, Object.values(context));
36854
+ return /* @__PURE__ */ jsx(Context.Provider, { value, children });
36855
+ };
36856
+ Provider2.displayName = rootComponentName + "Provider";
36857
+ function useContext2(consumerName, scope) {
36858
+ var _a2;
36859
+ const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
36860
+ const context = React.useContext(Context);
36861
+ if (context) return context;
36862
+ if (defaultContext !== void 0) return defaultContext;
36863
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
36864
+ }
36865
+ return [Provider2, useContext2];
36866
+ }
36867
+ const createScope = () => {
36868
+ const scopeContexts = defaultContexts.map((defaultContext) => {
36869
+ return React.createContext(defaultContext);
36870
+ });
36871
+ return function useScope(scope) {
36872
+ const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
36873
+ return React.useMemo(
36874
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
36875
+ [scope, contexts]
36876
+ );
36877
+ };
36878
+ };
36879
+ createScope.scopeName = scopeName;
36880
+ return [createContext3, composeContextScopes$1(createScope, ...createContextScopeDeps)];
36881
+ }
36882
+ function composeContextScopes$1(...scopes) {
36883
+ const baseScope = scopes[0];
36884
+ if (scopes.length === 1) return baseScope;
36885
+ const createScope = () => {
36886
+ const scopeHooks = scopes.map((createScope2) => ({
36887
+ useScope: createScope2(),
36888
+ scopeName: createScope2.scopeName
36889
+ }));
36890
+ return function useComposedScopes(overrideScopes) {
36891
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
36892
+ const scopeProps = useScope(overrideScopes);
36893
+ const currentScope = scopeProps[`__scope${scopeName}`];
36894
+ return { ...nextScopes2, ...currentScope };
36895
+ }, {});
36896
+ return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
36897
+ };
36898
+ };
36899
+ createScope.scopeName = baseScope.scopeName;
36900
+ return createScope;
36901
+ }
36902
+ var REACT_LAZY_TYPE$3 = Symbol.for("react.lazy");
36903
+ var use$3 = React[" use ".trim().toString()];
36904
+ function isPromiseLike$3(value) {
36905
+ return typeof value === "object" && value !== null && "then" in value;
36906
+ }
36907
+ function isLazyComponent$3(element) {
36908
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$3 && "_payload" in element && isPromiseLike$3(element._payload);
36909
+ }
36910
+ // @__NO_SIDE_EFFECTS__
36911
+ function createSlot$3(ownerName) {
36912
+ const SlotClone = /* @__PURE__ */ createSlotClone$3(ownerName);
36913
+ const Slot2 = React.forwardRef((props2, forwardedRef) => {
36914
+ let { children, ...slotProps } = props2;
36915
+ if (isLazyComponent$3(children) && typeof use$3 === "function") {
36916
+ children = use$3(children._payload);
36917
+ }
36918
+ const childrenArray = React.Children.toArray(children);
36919
+ const slottable = childrenArray.find(isSlottable$3);
36920
+ if (slottable) {
36921
+ const newElement = slottable.props.children;
36922
+ const newChildren = childrenArray.map((child) => {
36923
+ if (child === slottable) {
36924
+ if (React.Children.count(newElement) > 1) return React.Children.only(null);
36925
+ return React.isValidElement(newElement) ? newElement.props.children : null;
36926
+ } else {
36927
+ return child;
36928
+ }
36929
+ });
36930
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
36931
+ }
36932
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
36933
+ });
36934
+ Slot2.displayName = `${ownerName}.Slot`;
36935
+ return Slot2;
36936
+ }
36937
+ // @__NO_SIDE_EFFECTS__
36938
+ function createSlotClone$3(ownerName) {
36939
+ const SlotClone = React.forwardRef((props2, forwardedRef) => {
36940
+ let { children, ...slotProps } = props2;
36941
+ if (isLazyComponent$3(children) && typeof use$3 === "function") {
36942
+ children = use$3(children._payload);
36943
+ }
36944
+ if (React.isValidElement(children)) {
36945
+ const childrenRef = getElementRef$3(children);
36946
+ const props22 = mergeProps$3(slotProps, children.props);
36947
+ if (children.type !== React.Fragment) {
36948
+ props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
36949
+ }
36950
+ return React.cloneElement(children, props22);
36951
+ }
36952
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
36953
+ });
36954
+ SlotClone.displayName = `${ownerName}.SlotClone`;
36955
+ return SlotClone;
36956
+ }
36957
+ var SLOTTABLE_IDENTIFIER$3 = Symbol("radix.slottable");
36958
+ function isSlottable$3(child) {
36959
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$3;
36960
+ }
36961
+ function mergeProps$3(slotProps, childProps) {
36962
+ const overrideProps = { ...childProps };
36963
+ for (const propName in childProps) {
36964
+ const slotPropValue = slotProps[propName];
36965
+ const childPropValue = childProps[propName];
36966
+ const isHandler = /^on[A-Z]/.test(propName);
36967
+ if (isHandler) {
36968
+ if (slotPropValue && childPropValue) {
36969
+ overrideProps[propName] = (...args) => {
36970
+ const result = childPropValue(...args);
36971
+ slotPropValue(...args);
36972
+ return result;
36973
+ };
36974
+ } else if (slotPropValue) {
36975
+ overrideProps[propName] = slotPropValue;
36976
+ }
36977
+ } else if (propName === "style") {
36978
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
36979
+ } else if (propName === "className") {
36980
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
36981
+ }
36982
+ }
36983
+ return { ...slotProps, ...overrideProps };
36984
+ }
36985
+ function getElementRef$3(element) {
36986
+ var _a2, _b;
36987
+ let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
36988
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
36989
+ if (mayWarn) {
36990
+ return element.ref;
36991
+ }
36992
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
36993
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
36994
+ if (mayWarn) {
36995
+ return element.props.ref;
36996
+ }
36997
+ return element.props.ref || element.ref;
36998
+ }
36999
+ var NODES$3 = [
37000
+ "a",
37001
+ "button",
37002
+ "div",
37003
+ "form",
37004
+ "h2",
37005
+ "h3",
37006
+ "img",
37007
+ "input",
37008
+ "label",
37009
+ "li",
37010
+ "nav",
37011
+ "ol",
37012
+ "p",
37013
+ "select",
37014
+ "span",
37015
+ "svg",
37016
+ "ul"
37017
+ ];
37018
+ var Primitive$3 = NODES$3.reduce((primitive, node) => {
37019
+ const Slot2 = /* @__PURE__ */ createSlot$3(`Primitive.${node}`);
37020
+ const Node2 = React.forwardRef((props2, forwardedRef) => {
37021
+ const { asChild, ...primitiveProps } = props2;
37022
+ const Comp = asChild ? Slot2 : node;
37023
+ if (typeof window !== "undefined") {
37024
+ window[Symbol.for("radix-ui")] = true;
37025
+ }
37026
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
37027
+ });
37028
+ Node2.displayName = `Primitive.${node}`;
37029
+ return { ...primitive, [node]: Node2 };
37030
+ }, {});
36441
37031
  var PROGRESS_NAME = "Progress";
36442
37032
  var DEFAULT_MAX = 100;
36443
- var [createProgressContext] = createContextScope(PROGRESS_NAME);
37033
+ var [createProgressContext] = createContextScope$1(PROGRESS_NAME);
36444
37034
  var [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
36445
37035
  var Progress$1 = React.forwardRef(
36446
37036
  (props2, forwardedRef) => {
@@ -36461,7 +37051,7 @@ var Progress$1 = React.forwardRef(
36461
37051
  const value = isValidValueNumber(valueProp, max2) ? valueProp : null;
36462
37052
  const valueLabel = isNumber$3(value) ? getValueLabel(value, max2) : void 0;
36463
37053
  return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max: max2, children: /* @__PURE__ */ jsx(
36464
- Primitive.div,
37054
+ Primitive$3.div,
36465
37055
  {
36466
37056
  "aria-valuemax": max2,
36467
37057
  "aria-valuemin": 0,
@@ -36484,7 +37074,7 @@ var ProgressIndicator = React.forwardRef(
36484
37074
  const { __scopeProgress, ...indicatorProps } = props2;
36485
37075
  const context = useProgressContext(INDICATOR_NAME$4, __scopeProgress);
36486
37076
  return /* @__PURE__ */ jsx(
36487
- Primitive.div,
37077
+ Primitive$3.div,
36488
37078
  {
36489
37079
  "data-state": getProgressState(context.value, context.max),
36490
37080
  "data-value": context.value ?? void 0,
@@ -38794,14 +39384,18 @@ const commonForms = {
38794
39384
  };
38795
39385
  function DataTablePagination({
38796
39386
  table,
38797
- paginationVariant = "full"
39387
+ showPageInfo = true,
39388
+ showSelectedRowInfo = true,
39389
+ showRowsPerPageSelection = true,
39390
+ showFirstAndLastPageButton = true,
39391
+ wrapperClassName
38798
39392
  }) {
38799
39393
  const pagination = table.getState().pagination ?? {
38800
39394
  pageIndex: 0,
38801
39395
  pageSize: 10
38802
39396
  };
38803
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-2", children: [
38804
- paginationVariant === "full" && /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex-1 text-sm", children: [
39397
+ return /* @__PURE__ */ jsxs("div", { className: cn$1("flex items-center justify-between px-2", wrapperClassName), children: [
39398
+ showSelectedRowInfo && /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex-1 text-sm", children: [
38805
39399
  table.getFilteredSelectedRowModel().rows.length,
38806
39400
  " of",
38807
39401
  " ",
@@ -38809,7 +39403,7 @@ function DataTablePagination({
38809
39403
  " row(s) selected."
38810
39404
  ] }),
38811
39405
  /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
38812
- paginationVariant === "full" && /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
39406
+ showRowsPerPageSelection && /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
38813
39407
  /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Rows per page" }),
38814
39408
  /* @__PURE__ */ jsxs(
38815
39409
  Select$1,
@@ -38823,14 +39417,14 @@ function DataTablePagination({
38823
39417
  }
38824
39418
  )
38825
39419
  ] }),
38826
- /* @__PURE__ */ jsx("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: table.getRowCount() > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
39420
+ showPageInfo && /* @__PURE__ */ jsx("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: table.getRowCount() > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
38827
39421
  "Page ",
38828
39422
  pagination.pageIndex + 1,
38829
39423
  " of ",
38830
39424
  table.getPageCount()
38831
39425
  ] }) : "Page 0 of 0" }),
38832
39426
  /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
38833
- /* @__PURE__ */ jsxs(
39427
+ showFirstAndLastPageButton && /* @__PURE__ */ jsxs(
38834
39428
  Button$1,
38835
39429
  {
38836
39430
  type: "button",
@@ -38875,7 +39469,7 @@ function DataTablePagination({
38875
39469
  ]
38876
39470
  }
38877
39471
  ),
38878
- /* @__PURE__ */ jsxs(
39472
+ showFirstAndLastPageButton && /* @__PURE__ */ jsxs(
38879
39473
  Button$1,
38880
39474
  {
38881
39475
  type: "button",
@@ -38908,7 +39502,7 @@ var SUB_CLOSE_KEYS = {
38908
39502
  };
38909
39503
  var MENU_NAME$1 = "Menu";
38910
39504
  var [Collection$3, useCollection$3, createCollectionScope$3] = createCollection(MENU_NAME$1);
38911
- var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME$1, [
39505
+ var [createMenuContext, createMenuScope] = createContextScope$2(MENU_NAME$1, [
38912
39506
  createCollectionScope$3,
38913
39507
  createPopperScope,
38914
39508
  createRovingFocusGroupScope
@@ -39032,7 +39626,7 @@ var MenuRootContentNonModal = React.forwardRef((props2, forwardedRef) => {
39032
39626
  }
39033
39627
  );
39034
39628
  });
39035
- var Slot = /* @__PURE__ */ createSlot$1("MenuContent.ScrollLock");
39629
+ var Slot = /* @__PURE__ */ createSlot$7("MenuContent.ScrollLock");
39036
39630
  var MenuContentImpl = React.forwardRef(
39037
39631
  (props2, forwardedRef) => {
39038
39632
  const {
@@ -39224,7 +39818,7 @@ var GROUP_NAME$3 = "MenuGroup";
39224
39818
  var MenuGroup = React.forwardRef(
39225
39819
  (props2, forwardedRef) => {
39226
39820
  const { __scopeMenu, ...groupProps } = props2;
39227
- return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
39821
+ return /* @__PURE__ */ jsx(Primitive$6.div, { role: "group", ...groupProps, ref: forwardedRef });
39228
39822
  }
39229
39823
  );
39230
39824
  MenuGroup.displayName = GROUP_NAME$3;
@@ -39232,7 +39826,7 @@ var LABEL_NAME$3 = "MenuLabel";
39232
39826
  var MenuLabel = React.forwardRef(
39233
39827
  (props2, forwardedRef) => {
39234
39828
  const { __scopeMenu, ...labelProps } = props2;
39235
- return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
39829
+ return /* @__PURE__ */ jsx(Primitive$6.div, { ...labelProps, ref: forwardedRef });
39236
39830
  }
39237
39831
  );
39238
39832
  MenuLabel.displayName = LABEL_NAME$3;
@@ -39310,7 +39904,7 @@ var MenuItemImpl = React.forwardRef(
39310
39904
  disabled,
39311
39905
  textValue: textValue ?? textContent,
39312
39906
  children: /* @__PURE__ */ jsx(Item$2, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(
39313
- Primitive.div,
39907
+ Primitive$6.div,
39314
39908
  {
39315
39909
  role: "menuitem",
39316
39910
  "data-highlighted": isFocused ? "" : void 0,
@@ -39421,7 +40015,7 @@ var MenuItemIndicator = React.forwardRef(
39421
40015
  {
39422
40016
  present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
39423
40017
  children: /* @__PURE__ */ jsx(
39424
- Primitive.span,
40018
+ Primitive$6.span,
39425
40019
  {
39426
40020
  ...itemIndicatorProps,
39427
40021
  ref: forwardedRef,
@@ -39438,7 +40032,7 @@ var MenuSeparator = React.forwardRef(
39438
40032
  (props2, forwardedRef) => {
39439
40033
  const { __scopeMenu, ...separatorProps } = props2;
39440
40034
  return /* @__PURE__ */ jsx(
39441
- Primitive.div,
40035
+ Primitive$6.div,
39442
40036
  {
39443
40037
  role: "separator",
39444
40038
  "aria-orientation": "horizontal",
@@ -39525,7 +40119,7 @@ var MenuSubTrigger = React.forwardRef(
39525
40119
  "aria-controls": subContext.contentId,
39526
40120
  "data-state": getOpenState$1(context.open),
39527
40121
  ...props2,
39528
- ref: composeRefs$2(forwardedRef, subContext.onTriggerChange),
40122
+ ref: composeRefs$1(forwardedRef, subContext.onTriggerChange),
39529
40123
  onClick: (event) => {
39530
40124
  var _a2;
39531
40125
  (_a2 = props2.onClick) == null ? void 0 : _a2.call(props2, event);
@@ -39720,7 +40314,7 @@ var Sub = MenuSub;
39720
40314
  var SubTrigger = MenuSubTrigger;
39721
40315
  var SubContent = MenuSubContent;
39722
40316
  var DROPDOWN_MENU_NAME = "DropdownMenu";
39723
- var [createDropdownMenuContext] = createContextScope(
40317
+ var [createDropdownMenuContext] = createContextScope$2(
39724
40318
  DROPDOWN_MENU_NAME,
39725
40319
  [createMenuScope]
39726
40320
  );
@@ -39767,7 +40361,7 @@ var DropdownMenuTrigger$1 = React.forwardRef(
39767
40361
  const context = useDropdownMenuContext(TRIGGER_NAME$5, __scopeDropdownMenu);
39768
40362
  const menuScope = useMenuScope$2(__scopeDropdownMenu);
39769
40363
  return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
39770
- Primitive.button,
40364
+ Primitive$6.button,
39771
40365
  {
39772
40366
  type: "button",
39773
40367
  id: context.triggerId,
@@ -39778,7 +40372,7 @@ var DropdownMenuTrigger$1 = React.forwardRef(
39778
40372
  "data-disabled": disabled ? "" : void 0,
39779
40373
  disabled,
39780
40374
  ...triggerProps,
39781
- ref: composeRefs$2(forwardedRef, context.triggerRef),
40375
+ ref: composeRefs$1(forwardedRef, context.triggerRef),
39782
40376
  onPointerDown: composeEventHandlers$1(props2.onPointerDown, (event) => {
39783
40377
  if (!disabled && event.button === 0 && event.ctrlKey === false) {
39784
40378
  context.onOpenToggle();
@@ -40232,7 +40826,11 @@ function DataTable({
40232
40826
  onColumnFiltersChange,
40233
40827
  rowCount,
40234
40828
  pagination,
40235
- paginationVariant = "full",
40829
+ paginationShowPageInfo = true,
40830
+ paginationShowSelectedRowInfo = true,
40831
+ paginationShowRowsPerPageSelection = true,
40832
+ paginationShowFirstAndLastPageButton = true,
40833
+ paginationWrapperClassName,
40236
40834
  onPaginationChange,
40237
40835
  paginationState,
40238
40836
  columnVisibility,
@@ -40564,7 +41162,11 @@ function DataTable({
40564
41162
  DataTablePagination,
40565
41163
  {
40566
41164
  table,
40567
- paginationVariant
41165
+ showPageInfo: paginationShowPageInfo,
41166
+ showSelectedRowInfo: paginationShowSelectedRowInfo,
41167
+ showRowsPerPageSelection: paginationShowRowsPerPageSelection,
41168
+ showFirstAndLastPageButton: paginationShowFirstAndLastPageButton,
41169
+ wrapperClassName: paginationWrapperClassName
40568
41170
  }
40569
41171
  )
40570
41172
  ] });
@@ -46101,7 +46703,7 @@ function dotAccessor(path) {
46101
46703
  return (row) => lodashExports.get(row, path);
46102
46704
  }
46103
46705
  var ROOT_NAME = "AlertDialog";
46104
- var [createAlertDialogContext] = createContextScope(ROOT_NAME, [
46706
+ var [createAlertDialogContext] = createContextScope$2(ROOT_NAME, [
46105
46707
  createDialogScope
46106
46708
  ]);
46107
46709
  var useDialogScope = createDialogScope();
@@ -46370,7 +46972,7 @@ function AlertDialogCancel({
46370
46972
  }
46371
46973
  const DialogContext = createContext(null);
46372
46974
  function useDialogController() {
46373
- const ctx = use$1(DialogContext);
46975
+ const ctx = use$7(DialogContext);
46374
46976
  if (!ctx)
46375
46977
  throw new Error("useDialogController must be used within DialogProvider");
46376
46978
  return ctx;
@@ -49176,7 +49778,7 @@ function ThemeBridge({ children, ...props2 }) {
49176
49778
  return /* @__PURE__ */ jsx(ThemeProviderContext, { ...props2, value, children });
49177
49779
  }
49178
49780
  const useTheme = () => {
49179
- const context = use$1(ThemeProviderContext);
49781
+ const context = use$7(ThemeProviderContext);
49180
49782
  if (context === void 0)
49181
49783
  throw new Error("useTheme must be used within a ThemeProvider");
49182
49784
  return context;
@@ -49330,6 +49932,7 @@ function AdminLayoutContent({
49330
49932
  const isOpen = openMap[item.id] ?? (hasChildren && hasActiveDescendant(item));
49331
49933
  const indentClassMap = ["", "pl-6", "pl-10", "pl-14"];
49332
49934
  const indent = indentClassMap[Math.min(level, 3)];
49935
+ const activeText = isActive ? "text-sidebar-primary-foreground" : "text-sidebar-foreground group-hover:text-sidebar-accent-foreground";
49333
49936
  const content = /* @__PURE__ */ jsxs(
49334
49937
  SidebarMenuItem,
49335
49938
  {
@@ -49345,27 +49948,54 @@ function AdminLayoutContent({
49345
49948
  if (hasChildren) setOpen(item.id);
49346
49949
  },
49347
49950
  disabled: item.disabled,
49348
- className: `group relative overflow-hidden rounded-lg transition-all duration-200 hover:bg-sidebar-accent/70 data-[active=true]:bg-primary data-[active=true]:text-primary-foreground ${indent}`,
49951
+ className: `group relative overflow-hidden rounded-lg transition-all duration-200 hover:bg-sidebar-accent/70 data-[active=true]:bg-sidebar-primary data-[active=true]:text-sidebar-primary-foreground ${indent}`,
49349
49952
  children: item.url && !hasChildren ? /* @__PURE__ */ jsxs(Link$1, { to: item.url, className: "flex items-center gap-3 px-3", children: [
49350
49953
  item.icon && /* @__PURE__ */ jsx(
49351
49954
  item.icon,
49352
49955
  {
49353
- className: `h-4 w-4 transition-colors ${isActive ? "text-primary-foreground" : "text-sidebar-foreground group-hover:text-sidebar-accent-foreground"}`
49956
+ className: `h-4 w-4 transition-colors ${activeText}`
49354
49957
  }
49355
49958
  ),
49356
49959
  /* @__PURE__ */ jsx(
49357
49960
  "span",
49358
49961
  {
49359
- className: `font-medium transition-colors ${isActive ? "text-primary-foreground" : "text-sidebar-foreground group-hover:text-sidebar-accent-foreground"}`,
49962
+ className: `font-medium transition-colors ${activeText}`,
49360
49963
  children: item.title
49361
49964
  }
49362
49965
  ),
49363
- item.badge && /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs bg-primary/10 text-primary px-2 py-0.5 rounded-full", children: item.badge })
49966
+ item.badge && /* @__PURE__ */ jsx(
49967
+ "span",
49968
+ {
49969
+ className: `ml-auto text-xs px-2 py-0.5 rounded-full ${isActive ? "bg-white/20 text-sidebar-primary-foreground" : "bg-sidebar-primary/10 text-sidebar-primary"}`,
49970
+ children: item.badge
49971
+ }
49972
+ )
49364
49973
  ] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 px-3 py-2.5 w-full", children: [
49365
- hasChildren && (isOpen ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-3.5 w-3.5 text-muted-foreground" })),
49366
- item.icon ? /* @__PURE__ */ jsx(item.icon, { className: "h-4 w-4 text-sidebar-foreground group-hover:text-sidebar-accent-foreground" }) : /* @__PURE__ */ jsx(FallbackIcon, { className: "h-3.5 w-3.5 text-muted-foreground" }),
49367
- item.url ? /* @__PURE__ */ jsx(Link$1, { to: item.url, className: "flex-1 text-left", children: /* @__PURE__ */ jsx("span", { className: "font-medium text-sidebar-foreground group-hover:text-sidebar-accent-foreground", children: item.title }) }) : /* @__PURE__ */ jsx("span", { className: "font-medium text-sidebar-foreground group-hover:text-sidebar-accent-foreground flex-1", children: item.title }),
49368
- item.badge && /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs bg-primary/10 text-primary px-2 py-0.5 rounded-full", children: item.badge })
49974
+ hasChildren && (isOpen ? /* @__PURE__ */ jsx(
49975
+ ChevronDown,
49976
+ {
49977
+ className: `h-3.5 w-3.5 ${isActive ? "text-sidebar-primary-foreground" : "text-muted-foreground"}`
49978
+ }
49979
+ ) : /* @__PURE__ */ jsx(
49980
+ ChevronRight,
49981
+ {
49982
+ className: `h-3.5 w-3.5 ${isActive ? "text-sidebar-primary-foreground" : "text-muted-foreground"}`
49983
+ }
49984
+ )),
49985
+ item.icon ? /* @__PURE__ */ jsx(item.icon, { className: `h-4 w-4 ${activeText}` }) : /* @__PURE__ */ jsx(
49986
+ FallbackIcon,
49987
+ {
49988
+ className: `h-3.5 w-3.5 ${isActive ? "text-sidebar-primary-foreground" : "text-muted-foreground"}`
49989
+ }
49990
+ ),
49991
+ item.url ? /* @__PURE__ */ jsx(Link$1, { to: item.url, className: "flex-1 text-left", children: /* @__PURE__ */ jsx("span", { className: `font-medium ${activeText}`, children: item.title }) }) : /* @__PURE__ */ jsx("span", { className: `font-medium ${activeText} flex-1`, children: item.title }),
49992
+ item.badge && /* @__PURE__ */ jsx(
49993
+ "span",
49994
+ {
49995
+ className: `ml-auto text-xs px-2 py-0.5 rounded-full ${isActive ? "bg-white/20 text-sidebar-primary-foreground" : "bg-sidebar-primary/10 text-sidebar-primary"}`,
49996
+ children: item.badge
49997
+ }
49998
+ )
49369
49999
  ] })
49370
50000
  }
49371
50001
  ),
@@ -50544,6 +51174,135 @@ const Toaster$1 = /* @__PURE__ */ React__default.forwardRef(function Toaster(pro
50544
51174
  }))
50545
51175
  );
50546
51176
  });
51177
+ var REACT_LAZY_TYPE$2 = Symbol.for("react.lazy");
51178
+ var use$2 = React[" use ".trim().toString()];
51179
+ function isPromiseLike$2(value) {
51180
+ return typeof value === "object" && value !== null && "then" in value;
51181
+ }
51182
+ function isLazyComponent$2(element) {
51183
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$2 && "_payload" in element && isPromiseLike$2(element._payload);
51184
+ }
51185
+ // @__NO_SIDE_EFFECTS__
51186
+ function createSlot$2(ownerName) {
51187
+ const SlotClone = /* @__PURE__ */ createSlotClone$2(ownerName);
51188
+ const Slot2 = React.forwardRef((props2, forwardedRef) => {
51189
+ let { children, ...slotProps } = props2;
51190
+ if (isLazyComponent$2(children) && typeof use$2 === "function") {
51191
+ children = use$2(children._payload);
51192
+ }
51193
+ const childrenArray = React.Children.toArray(children);
51194
+ const slottable = childrenArray.find(isSlottable$2);
51195
+ if (slottable) {
51196
+ const newElement = slottable.props.children;
51197
+ const newChildren = childrenArray.map((child) => {
51198
+ if (child === slottable) {
51199
+ if (React.Children.count(newElement) > 1) return React.Children.only(null);
51200
+ return React.isValidElement(newElement) ? newElement.props.children : null;
51201
+ } else {
51202
+ return child;
51203
+ }
51204
+ });
51205
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
51206
+ }
51207
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
51208
+ });
51209
+ Slot2.displayName = `${ownerName}.Slot`;
51210
+ return Slot2;
51211
+ }
51212
+ // @__NO_SIDE_EFFECTS__
51213
+ function createSlotClone$2(ownerName) {
51214
+ const SlotClone = React.forwardRef((props2, forwardedRef) => {
51215
+ let { children, ...slotProps } = props2;
51216
+ if (isLazyComponent$2(children) && typeof use$2 === "function") {
51217
+ children = use$2(children._payload);
51218
+ }
51219
+ if (React.isValidElement(children)) {
51220
+ const childrenRef = getElementRef$2(children);
51221
+ const props22 = mergeProps$2(slotProps, children.props);
51222
+ if (children.type !== React.Fragment) {
51223
+ props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
51224
+ }
51225
+ return React.cloneElement(children, props22);
51226
+ }
51227
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
51228
+ });
51229
+ SlotClone.displayName = `${ownerName}.SlotClone`;
51230
+ return SlotClone;
51231
+ }
51232
+ var SLOTTABLE_IDENTIFIER$2 = Symbol("radix.slottable");
51233
+ function isSlottable$2(child) {
51234
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$2;
51235
+ }
51236
+ function mergeProps$2(slotProps, childProps) {
51237
+ const overrideProps = { ...childProps };
51238
+ for (const propName in childProps) {
51239
+ const slotPropValue = slotProps[propName];
51240
+ const childPropValue = childProps[propName];
51241
+ const isHandler = /^on[A-Z]/.test(propName);
51242
+ if (isHandler) {
51243
+ if (slotPropValue && childPropValue) {
51244
+ overrideProps[propName] = (...args) => {
51245
+ const result = childPropValue(...args);
51246
+ slotPropValue(...args);
51247
+ return result;
51248
+ };
51249
+ } else if (slotPropValue) {
51250
+ overrideProps[propName] = slotPropValue;
51251
+ }
51252
+ } else if (propName === "style") {
51253
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
51254
+ } else if (propName === "className") {
51255
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
51256
+ }
51257
+ }
51258
+ return { ...slotProps, ...overrideProps };
51259
+ }
51260
+ function getElementRef$2(element) {
51261
+ var _a2, _b;
51262
+ let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
51263
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
51264
+ if (mayWarn) {
51265
+ return element.ref;
51266
+ }
51267
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
51268
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
51269
+ if (mayWarn) {
51270
+ return element.props.ref;
51271
+ }
51272
+ return element.props.ref || element.ref;
51273
+ }
51274
+ var NODES$2 = [
51275
+ "a",
51276
+ "button",
51277
+ "div",
51278
+ "form",
51279
+ "h2",
51280
+ "h3",
51281
+ "img",
51282
+ "input",
51283
+ "label",
51284
+ "li",
51285
+ "nav",
51286
+ "ol",
51287
+ "p",
51288
+ "select",
51289
+ "span",
51290
+ "svg",
51291
+ "ul"
51292
+ ];
51293
+ var Primitive$2 = NODES$2.reduce((primitive, node) => {
51294
+ const Slot2 = /* @__PURE__ */ createSlot$2(`Primitive.${node}`);
51295
+ const Node2 = React.forwardRef((props2, forwardedRef) => {
51296
+ const { asChild, ...primitiveProps } = props2;
51297
+ const Comp = asChild ? Slot2 : node;
51298
+ if (typeof window !== "undefined") {
51299
+ window[Symbol.for("radix-ui")] = true;
51300
+ }
51301
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
51302
+ });
51303
+ Node2.displayName = `Primitive.${node}`;
51304
+ return { ...primitive, [node]: Node2 };
51305
+ }, {});
50547
51306
  var NAME$1 = "AspectRatio";
50548
51307
  var AspectRatio$1 = React.forwardRef(
50549
51308
  (props2, forwardedRef) => {
@@ -50560,7 +51319,7 @@ var AspectRatio$1 = React.forwardRef(
50560
51319
  },
50561
51320
  "data-radix-aspect-ratio-wrapper": "",
50562
51321
  children: /* @__PURE__ */ jsx(
50563
- Primitive.div,
51322
+ Primitive$2.div,
50564
51323
  {
50565
51324
  ...aspectRatioProps,
50566
51325
  ref: forwardedRef,
@@ -50586,6 +51345,195 @@ function AspectRatio({
50586
51345
  }) {
50587
51346
  return /* @__PURE__ */ jsx(Root$5, { "data-slot": "aspect-ratio", ...props2 });
50588
51347
  }
51348
+ function createContextScope(scopeName, createContextScopeDeps = []) {
51349
+ let defaultContexts = [];
51350
+ function createContext3(rootComponentName, defaultContext) {
51351
+ const BaseContext = React.createContext(defaultContext);
51352
+ BaseContext.displayName = rootComponentName + "Context";
51353
+ const index2 = defaultContexts.length;
51354
+ defaultContexts = [...defaultContexts, defaultContext];
51355
+ const Provider2 = (props2) => {
51356
+ var _a2;
51357
+ const { scope, children, ...context } = props2;
51358
+ const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
51359
+ const value = React.useMemo(() => context, Object.values(context));
51360
+ return /* @__PURE__ */ jsx(Context.Provider, { value, children });
51361
+ };
51362
+ Provider2.displayName = rootComponentName + "Provider";
51363
+ function useContext2(consumerName, scope) {
51364
+ var _a2;
51365
+ const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
51366
+ const context = React.useContext(Context);
51367
+ if (context) return context;
51368
+ if (defaultContext !== void 0) return defaultContext;
51369
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
51370
+ }
51371
+ return [Provider2, useContext2];
51372
+ }
51373
+ const createScope = () => {
51374
+ const scopeContexts = defaultContexts.map((defaultContext) => {
51375
+ return React.createContext(defaultContext);
51376
+ });
51377
+ return function useScope(scope) {
51378
+ const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
51379
+ return React.useMemo(
51380
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
51381
+ [scope, contexts]
51382
+ );
51383
+ };
51384
+ };
51385
+ createScope.scopeName = scopeName;
51386
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
51387
+ }
51388
+ function composeContextScopes(...scopes) {
51389
+ const baseScope = scopes[0];
51390
+ if (scopes.length === 1) return baseScope;
51391
+ const createScope = () => {
51392
+ const scopeHooks = scopes.map((createScope2) => ({
51393
+ useScope: createScope2(),
51394
+ scopeName: createScope2.scopeName
51395
+ }));
51396
+ return function useComposedScopes(overrideScopes) {
51397
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
51398
+ const scopeProps = useScope(overrideScopes);
51399
+ const currentScope = scopeProps[`__scope${scopeName}`];
51400
+ return { ...nextScopes2, ...currentScope };
51401
+ }, {});
51402
+ return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
51403
+ };
51404
+ };
51405
+ createScope.scopeName = baseScope.scopeName;
51406
+ return createScope;
51407
+ }
51408
+ var REACT_LAZY_TYPE$1 = Symbol.for("react.lazy");
51409
+ var use$1 = React[" use ".trim().toString()];
51410
+ function isPromiseLike$1(value) {
51411
+ return typeof value === "object" && value !== null && "then" in value;
51412
+ }
51413
+ function isLazyComponent$1(element) {
51414
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$1 && "_payload" in element && isPromiseLike$1(element._payload);
51415
+ }
51416
+ // @__NO_SIDE_EFFECTS__
51417
+ function createSlot$1(ownerName) {
51418
+ const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
51419
+ const Slot2 = React.forwardRef((props2, forwardedRef) => {
51420
+ let { children, ...slotProps } = props2;
51421
+ if (isLazyComponent$1(children) && typeof use$1 === "function") {
51422
+ children = use$1(children._payload);
51423
+ }
51424
+ const childrenArray = React.Children.toArray(children);
51425
+ const slottable = childrenArray.find(isSlottable$1);
51426
+ if (slottable) {
51427
+ const newElement = slottable.props.children;
51428
+ const newChildren = childrenArray.map((child) => {
51429
+ if (child === slottable) {
51430
+ if (React.Children.count(newElement) > 1) return React.Children.only(null);
51431
+ return React.isValidElement(newElement) ? newElement.props.children : null;
51432
+ } else {
51433
+ return child;
51434
+ }
51435
+ });
51436
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
51437
+ }
51438
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
51439
+ });
51440
+ Slot2.displayName = `${ownerName}.Slot`;
51441
+ return Slot2;
51442
+ }
51443
+ // @__NO_SIDE_EFFECTS__
51444
+ function createSlotClone$1(ownerName) {
51445
+ const SlotClone = React.forwardRef((props2, forwardedRef) => {
51446
+ let { children, ...slotProps } = props2;
51447
+ if (isLazyComponent$1(children) && typeof use$1 === "function") {
51448
+ children = use$1(children._payload);
51449
+ }
51450
+ if (React.isValidElement(children)) {
51451
+ const childrenRef = getElementRef$1(children);
51452
+ const props22 = mergeProps$1(slotProps, children.props);
51453
+ if (children.type !== React.Fragment) {
51454
+ props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
51455
+ }
51456
+ return React.cloneElement(children, props22);
51457
+ }
51458
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
51459
+ });
51460
+ SlotClone.displayName = `${ownerName}.SlotClone`;
51461
+ return SlotClone;
51462
+ }
51463
+ var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
51464
+ function isSlottable$1(child) {
51465
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
51466
+ }
51467
+ function mergeProps$1(slotProps, childProps) {
51468
+ const overrideProps = { ...childProps };
51469
+ for (const propName in childProps) {
51470
+ const slotPropValue = slotProps[propName];
51471
+ const childPropValue = childProps[propName];
51472
+ const isHandler = /^on[A-Z]/.test(propName);
51473
+ if (isHandler) {
51474
+ if (slotPropValue && childPropValue) {
51475
+ overrideProps[propName] = (...args) => {
51476
+ const result = childPropValue(...args);
51477
+ slotPropValue(...args);
51478
+ return result;
51479
+ };
51480
+ } else if (slotPropValue) {
51481
+ overrideProps[propName] = slotPropValue;
51482
+ }
51483
+ } else if (propName === "style") {
51484
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
51485
+ } else if (propName === "className") {
51486
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
51487
+ }
51488
+ }
51489
+ return { ...slotProps, ...overrideProps };
51490
+ }
51491
+ function getElementRef$1(element) {
51492
+ var _a2, _b;
51493
+ let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
51494
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
51495
+ if (mayWarn) {
51496
+ return element.ref;
51497
+ }
51498
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
51499
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
51500
+ if (mayWarn) {
51501
+ return element.props.ref;
51502
+ }
51503
+ return element.props.ref || element.ref;
51504
+ }
51505
+ var NODES$1 = [
51506
+ "a",
51507
+ "button",
51508
+ "div",
51509
+ "form",
51510
+ "h2",
51511
+ "h3",
51512
+ "img",
51513
+ "input",
51514
+ "label",
51515
+ "li",
51516
+ "nav",
51517
+ "ol",
51518
+ "p",
51519
+ "select",
51520
+ "span",
51521
+ "svg",
51522
+ "ul"
51523
+ ];
51524
+ var Primitive$1 = NODES$1.reduce((primitive, node) => {
51525
+ const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
51526
+ const Node2 = React.forwardRef((props2, forwardedRef) => {
51527
+ const { asChild, ...primitiveProps } = props2;
51528
+ const Comp = asChild ? Slot2 : node;
51529
+ if (typeof window !== "undefined") {
51530
+ window[Symbol.for("radix-ui")] = true;
51531
+ }
51532
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
51533
+ });
51534
+ Node2.displayName = `Primitive.${node}`;
51535
+ return { ...primitive, [node]: Node2 };
51536
+ }, {});
50589
51537
  var shim = { exports: {} };
50590
51538
  var useSyncExternalStoreShim_production = {};
50591
51539
  /**
@@ -50754,7 +51702,7 @@ var Avatar$1 = React.forwardRef(
50754
51702
  scope: __scopeAvatar,
50755
51703
  imageLoadingStatus,
50756
51704
  onImageLoadingStatusChange: setImageLoadingStatus,
50757
- children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })
51705
+ children: /* @__PURE__ */ jsx(Primitive$1.span, { ...avatarProps, ref: forwardedRef })
50758
51706
  }
50759
51707
  );
50760
51708
  }
@@ -50776,7 +51724,7 @@ var AvatarImage$1 = React.forwardRef(
50776
51724
  handleLoadingStatusChange(imageLoadingStatus);
50777
51725
  }
50778
51726
  }, [imageLoadingStatus, handleLoadingStatusChange]);
50779
- return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
51727
+ return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive$1.img, { ...imageProps, ref: forwardedRef, src }) : null;
50780
51728
  }
50781
51729
  );
50782
51730
  AvatarImage$1.displayName = IMAGE_NAME;
@@ -50792,7 +51740,7 @@ var AvatarFallback$1 = React.forwardRef(
50792
51740
  return () => window.clearTimeout(timerId);
50793
51741
  }
50794
51742
  }, [delayMs]);
50795
- return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
51743
+ return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive$1.span, { ...fallbackProps, ref: forwardedRef }) : null;
50796
51744
  }
50797
51745
  );
50798
51746
  AvatarFallback$1.displayName = FALLBACK_NAME;
@@ -58827,6 +59775,135 @@ function D(_2) {
58827
59775
  function W(_2, C, h) {
58828
59776
  return _2 = h && h.length > 0 ? `${_2 + " " + h.join(" ")}` : _2, G(_2, C, D(_2), D(C), 0, 0, {});
58829
59777
  }
59778
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
59779
+ var use = React[" use ".trim().toString()];
59780
+ function isPromiseLike(value) {
59781
+ return typeof value === "object" && value !== null && "then" in value;
59782
+ }
59783
+ function isLazyComponent(element) {
59784
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
59785
+ }
59786
+ // @__NO_SIDE_EFFECTS__
59787
+ function createSlot(ownerName) {
59788
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
59789
+ const Slot2 = React.forwardRef((props2, forwardedRef) => {
59790
+ let { children, ...slotProps } = props2;
59791
+ if (isLazyComponent(children) && typeof use === "function") {
59792
+ children = use(children._payload);
59793
+ }
59794
+ const childrenArray = React.Children.toArray(children);
59795
+ const slottable = childrenArray.find(isSlottable);
59796
+ if (slottable) {
59797
+ const newElement = slottable.props.children;
59798
+ const newChildren = childrenArray.map((child) => {
59799
+ if (child === slottable) {
59800
+ if (React.Children.count(newElement) > 1) return React.Children.only(null);
59801
+ return React.isValidElement(newElement) ? newElement.props.children : null;
59802
+ } else {
59803
+ return child;
59804
+ }
59805
+ });
59806
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
59807
+ }
59808
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
59809
+ });
59810
+ Slot2.displayName = `${ownerName}.Slot`;
59811
+ return Slot2;
59812
+ }
59813
+ // @__NO_SIDE_EFFECTS__
59814
+ function createSlotClone(ownerName) {
59815
+ const SlotClone = React.forwardRef((props2, forwardedRef) => {
59816
+ let { children, ...slotProps } = props2;
59817
+ if (isLazyComponent(children) && typeof use === "function") {
59818
+ children = use(children._payload);
59819
+ }
59820
+ if (React.isValidElement(children)) {
59821
+ const childrenRef = getElementRef(children);
59822
+ const props22 = mergeProps(slotProps, children.props);
59823
+ if (children.type !== React.Fragment) {
59824
+ props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
59825
+ }
59826
+ return React.cloneElement(children, props22);
59827
+ }
59828
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
59829
+ });
59830
+ SlotClone.displayName = `${ownerName}.SlotClone`;
59831
+ return SlotClone;
59832
+ }
59833
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
59834
+ function isSlottable(child) {
59835
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
59836
+ }
59837
+ function mergeProps(slotProps, childProps) {
59838
+ const overrideProps = { ...childProps };
59839
+ for (const propName in childProps) {
59840
+ const slotPropValue = slotProps[propName];
59841
+ const childPropValue = childProps[propName];
59842
+ const isHandler = /^on[A-Z]/.test(propName);
59843
+ if (isHandler) {
59844
+ if (slotPropValue && childPropValue) {
59845
+ overrideProps[propName] = (...args) => {
59846
+ const result = childPropValue(...args);
59847
+ slotPropValue(...args);
59848
+ return result;
59849
+ };
59850
+ } else if (slotPropValue) {
59851
+ overrideProps[propName] = slotPropValue;
59852
+ }
59853
+ } else if (propName === "style") {
59854
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
59855
+ } else if (propName === "className") {
59856
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
59857
+ }
59858
+ }
59859
+ return { ...slotProps, ...overrideProps };
59860
+ }
59861
+ function getElementRef(element) {
59862
+ var _a2, _b;
59863
+ let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
59864
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
59865
+ if (mayWarn) {
59866
+ return element.ref;
59867
+ }
59868
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
59869
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
59870
+ if (mayWarn) {
59871
+ return element.props.ref;
59872
+ }
59873
+ return element.props.ref || element.ref;
59874
+ }
59875
+ var NODES = [
59876
+ "a",
59877
+ "button",
59878
+ "div",
59879
+ "form",
59880
+ "h2",
59881
+ "h3",
59882
+ "img",
59883
+ "input",
59884
+ "label",
59885
+ "li",
59886
+ "nav",
59887
+ "ol",
59888
+ "p",
59889
+ "select",
59890
+ "span",
59891
+ "svg",
59892
+ "ul"
59893
+ ];
59894
+ var Primitive = NODES.reduce((primitive, node) => {
59895
+ const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
59896
+ const Node2 = React.forwardRef((props2, forwardedRef) => {
59897
+ const { asChild, ...primitiveProps } = props2;
59898
+ const Comp = asChild ? Slot2 : node;
59899
+ if (typeof window !== "undefined") {
59900
+ window[Symbol.for("radix-ui")] = true;
59901
+ }
59902
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
59903
+ });
59904
+ Node2.displayName = `Primitive.${node}`;
59905
+ return { ...primitive, [node]: Node2 };
59906
+ }, {});
58830
59907
  var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-heading=""]', le = '[cmdk-item=""]', ce = `${le}:not([aria-disabled="true"])`, Z = "cmdk-item-select", T = "data-value", Re = (r2, o2, n2) => W(r2, o2, n2), ue = React.createContext(void 0), K = () => React.useContext(ue), de = React.createContext(void 0), ee = () => React.useContext(de), fe = React.createContext(void 0), me = React.forwardRef((r2, o2) => {
58831
59908
  let n2 = L(() => {
58832
59909
  var e2, a2;
@@ -59022,15 +60099,15 @@ var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-head
59022
60099
  }
59023
60100
  if (!x2) return null;
59024
60101
  let { disabled: A, value: ge, onSelect: j, forceMount: O2, keywords: $2, ...q } = r2;
59025
- return React.createElement(Primitive.div, { ref: composeRefs$2(u2, o2), ...q, id: n2, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r2.children);
60102
+ return React.createElement(Primitive.div, { ref: composeRefs$1(u2, o2), ...q, id: n2, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r2.children);
59026
60103
  }), Ee = React.forwardRef((r2, o2) => {
59027
60104
  let { heading: n2, children: u2, forceMount: c2, ...d } = r2, f = useId$1(), p2 = React.useRef(null), b2 = React.useRef(null), m2 = useId$1(), R = K(), x2 = P((S) => c2 || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
59028
60105
  k(() => R.group(f), []), ve(f, p2, [r2.value, r2.heading, b2]);
59029
60106
  let C = React.useMemo(() => ({ id: f, forceMount: c2 }), [c2]);
59030
- return React.createElement(Primitive.div, { ref: composeRefs$2(p2, o2), ...d, "cmdk-group": "", role: "presentation", hidden: x2 ? void 0 : true }, n2 && React.createElement("div", { ref: b2, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n2), B(r2, (S) => React.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n2 ? m2 : void 0 }, React.createElement(fe.Provider, { value: C }, S))));
60107
+ return React.createElement(Primitive.div, { ref: composeRefs$1(p2, o2), ...d, "cmdk-group": "", role: "presentation", hidden: x2 ? void 0 : true }, n2 && React.createElement("div", { ref: b2, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n2), B(r2, (S) => React.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n2 ? m2 : void 0 }, React.createElement(fe.Provider, { value: C }, S))));
59031
60108
  }), ye = React.forwardRef((r2, o2) => {
59032
60109
  let { alwaysRender: n2, ...u2 } = r2, c2 = React.useRef(null), d = P((f) => !f.search);
59033
- return !n2 && !d ? null : React.createElement(Primitive.div, { ref: composeRefs$2(c2, o2), ...u2, "cmdk-separator": "", role: "separator" });
60110
+ return !n2 && !d ? null : React.createElement(Primitive.div, { ref: composeRefs$1(c2, o2), ...u2, "cmdk-separator": "", role: "separator" });
59034
60111
  }), Se = React.forwardRef((r2, o2) => {
59035
60112
  let { onValueChange: n2, ...u2 } = r2, c2 = r2.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b2 = K();
59036
60113
  return React.useEffect(() => {
@@ -59052,7 +60129,7 @@ var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-head
59052
60129
  cancelAnimationFrame(x2), C.unobserve(m2);
59053
60130
  };
59054
60131
  }
59055
- }, []), React.createElement(Primitive.div, { ref: composeRefs$2(d, o2), ...c2, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b2.listId }, B(r2, (m2) => React.createElement("div", { ref: composeRefs$2(f, b2.listInnerRef), "cmdk-list-sizer": "" }, m2)));
60132
+ }, []), React.createElement(Primitive.div, { ref: composeRefs$1(d, o2), ...c2, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b2.listId }, B(r2, (m2) => React.createElement("div", { ref: composeRefs$1(f, b2.listInnerRef), "cmdk-list-sizer": "" }, m2)));
59056
60133
  }), xe = React.forwardRef((r2, o2) => {
59057
60134
  let { open: n2, onOpenChange: u2, overlayClassName: c2, contentClassName: d, container: f, ...p2 } = r2;
59058
60135
  return React.createElement(Root$7, { open: n2, onOpenChange: u2 }, React.createElement(Portal$3, { container: f }, React.createElement(Overlay$1, { "cmdk-overlay": "", className: c2 }), React.createElement(Content$2, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, React.createElement(me, { ref: o2, ...p2 }))));
@@ -59274,7 +60351,7 @@ function CommandShortcut({
59274
60351
  );
59275
60352
  }
59276
60353
  var CONTEXT_MENU_NAME = "ContextMenu";
59277
- var [createContextMenuContext] = createContextScope(CONTEXT_MENU_NAME, [
60354
+ var [createContextMenuContext] = createContextScope$2(CONTEXT_MENU_NAME, [
59278
60355
  createMenuScope
59279
60356
  ]);
59280
60357
  var useMenuScope$1 = createMenuScope();
@@ -59337,7 +60414,7 @@ var ContextMenuTrigger$1 = React.forwardRef(
59337
60414
  return /* @__PURE__ */ jsxs(Fragment, { children: [
59338
60415
  /* @__PURE__ */ jsx(Anchor2, { ...menuScope, virtualRef }),
59339
60416
  /* @__PURE__ */ jsx(
59340
- Primitive.span,
60417
+ Primitive$6.span,
59341
60418
  {
59342
60419
  "data-state": context.open ? "open" : "closed",
59343
60420
  "data-disabled": disabled ? "" : void 0,
@@ -61435,7 +62512,7 @@ function FormMessage({ className, ...props2 }) {
61435
62512
  }
61436
62513
  var originalBodyUserSelect;
61437
62514
  var HOVERCARD_NAME = "HoverCard";
61438
- var [createHoverCardContext] = createContextScope(HOVERCARD_NAME, [
62515
+ var [createHoverCardContext] = createContextScope$2(HOVERCARD_NAME, [
61439
62516
  createPopperScope
61440
62517
  ]);
61441
62518
  var usePopperScope = createPopperScope();
@@ -61501,7 +62578,7 @@ var HoverCardTrigger$1 = React.forwardRef(
61501
62578
  const context = useHoverCardContext(TRIGGER_NAME$2, __scopeHoverCard);
61502
62579
  const popperScope = usePopperScope(__scopeHoverCard);
61503
62580
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
61504
- Primitive.a,
62581
+ Primitive$6.a,
61505
62582
  {
61506
62583
  "data-state": context.open ? "open" : "closed",
61507
62584
  ...triggerProps,
@@ -61948,7 +63025,7 @@ function InputOTPSeparator({ ...props2 }) {
61948
63025
  }
61949
63026
  var MENUBAR_NAME = "Menubar";
61950
63027
  var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection(MENUBAR_NAME);
61951
- var [createMenubarContext] = createContextScope(MENUBAR_NAME, [
63028
+ var [createMenubarContext] = createContextScope$2(MENUBAR_NAME, [
61952
63029
  createCollectionScope$2,
61953
63030
  createRovingFocusGroupScope
61954
63031
  ]);
@@ -62007,7 +63084,7 @@ var Menubar$1 = React.forwardRef(
62007
63084
  dir: direction,
62008
63085
  currentTabStopId,
62009
63086
  onCurrentTabStopIdChange: setCurrentTabStopId,
62010
- children: /* @__PURE__ */ jsx(Primitive.div, { role: "menubar", ...menubarProps, ref: forwardedRef })
63087
+ children: /* @__PURE__ */ jsx(Primitive$6.div, { role: "menubar", ...menubarProps, ref: forwardedRef })
62011
63088
  }
62012
63089
  ) }) })
62013
63090
  }
@@ -62075,7 +63152,7 @@ var MenubarTrigger$1 = React.forwardRef(
62075
63152
  focusable: !disabled,
62076
63153
  tabStopId: menuContext.value,
62077
63154
  children: /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
62078
- Primitive.button,
63155
+ Primitive$6.button,
62079
63156
  {
62080
63157
  type: "button",
62081
63158
  role: "menuitem",
@@ -62597,7 +63674,7 @@ function MenubarSubContent({
62597
63674
  var NAVIGATION_MENU_NAME = "NavigationMenu";
62598
63675
  var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(NAVIGATION_MENU_NAME);
62599
63676
  var [FocusGroupCollection, useFocusGroupCollection, createFocusGroupCollectionScope] = createCollection(NAVIGATION_MENU_NAME);
62600
- var [createNavigationMenuContext] = createContextScope(
63677
+ var [createNavigationMenuContext] = createContextScope$2(
62601
63678
  NAVIGATION_MENU_NAME,
62602
63679
  [createCollectionScope$1, createFocusGroupCollectionScope]
62603
63680
  );
@@ -62700,7 +63777,7 @@ var NavigationMenu$1 = React.forwardRef(
62700
63777
  },
62701
63778
  onItemDismiss: () => setValue(""),
62702
63779
  children: /* @__PURE__ */ jsx(
62703
- Primitive.nav,
63780
+ Primitive$6.nav,
62704
63781
  {
62705
63782
  "aria-label": "Main",
62706
63783
  "data-orientation": orientation,
@@ -62744,7 +63821,7 @@ var NavigationMenuSub = React.forwardRef(
62744
63821
  onTriggerEnter: (itemValue) => setValue(itemValue),
62745
63822
  onItemSelect: (itemValue) => setValue(itemValue),
62746
63823
  onItemDismiss: () => setValue(""),
62747
- children: /* @__PURE__ */ jsx(Primitive.div, { "data-orientation": orientation, ...subProps, ref: forwardedRef })
63824
+ children: /* @__PURE__ */ jsx(Primitive$6.div, { "data-orientation": orientation, ...subProps, ref: forwardedRef })
62748
63825
  }
62749
63826
  );
62750
63827
  }
@@ -62812,8 +63889,8 @@ var NavigationMenuList$1 = React.forwardRef(
62812
63889
  (props2, forwardedRef) => {
62813
63890
  const { __scopeNavigationMenu, ...listProps } = props2;
62814
63891
  const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu);
62815
- const list = /* @__PURE__ */ jsx(Primitive.ul, { "data-orientation": context.orientation, ...listProps, ref: forwardedRef });
62816
- return /* @__PURE__ */ jsx(Primitive.div, { style: { position: "relative" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ jsx(Collection$1.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: list }) : list }) });
63892
+ const list = /* @__PURE__ */ jsx(Primitive$6.ul, { "data-orientation": context.orientation, ...listProps, ref: forwardedRef });
63893
+ return /* @__PURE__ */ jsx(Primitive$6.div, { style: { position: "relative" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ jsx(Collection$1.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: list }) : list }) });
62817
63894
  }
62818
63895
  );
62819
63896
  NavigationMenuList$1.displayName = LIST_NAME;
@@ -62856,7 +63933,7 @@ var NavigationMenuItem$1 = React.forwardRef(
62856
63933
  onFocusProxyEnter: handleContentEntry,
62857
63934
  onRootContentClose: handleContentExit,
62858
63935
  onContentFocusOutside: handleContentExit,
62859
- children: /* @__PURE__ */ jsx(Primitive.li, { ...itemProps, ref: forwardedRef })
63936
+ children: /* @__PURE__ */ jsx(Primitive$6.li, { ...itemProps, ref: forwardedRef })
62860
63937
  }
62861
63938
  );
62862
63939
  }
@@ -62876,7 +63953,7 @@ var NavigationMenuTrigger$1 = React.forwardRef((props2, forwardedRef) => {
62876
63953
  const open = itemContext.value === context.value;
62877
63954
  return /* @__PURE__ */ jsxs(Fragment, { children: [
62878
63955
  /* @__PURE__ */ jsx(Collection$1.ItemSlot, { scope: __scopeNavigationMenu, value: itemContext.value, children: /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(
62879
- Primitive.button,
63956
+ Primitive$6.button,
62880
63957
  {
62881
63958
  id: triggerId,
62882
63959
  disabled,
@@ -62950,7 +64027,7 @@ var NavigationMenuLink$1 = React.forwardRef(
62950
64027
  (props2, forwardedRef) => {
62951
64028
  const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props2;
62952
64029
  return /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(
62953
- Primitive.a,
64030
+ Primitive$6.a,
62954
64031
  {
62955
64032
  "data-active": active ? "" : void 0,
62956
64033
  "aria-current": active ? "page" : void 0,
@@ -63019,7 +64096,7 @@ var NavigationMenuIndicatorImpl = React.forwardRef((props2, forwardedRef) => {
63019
64096
  useResizeObserver$1(activeTrigger, handlePositionChange);
63020
64097
  useResizeObserver$1(context.indicatorTrack, handlePositionChange);
63021
64098
  return position ? /* @__PURE__ */ jsx(
63022
- Primitive.div,
64099
+ Primitive$6.div,
63023
64100
  {
63024
64101
  "aria-hidden": true,
63025
64102
  "data-state": isVisible ? "visible" : "hidden",
@@ -63228,7 +64305,7 @@ var NavigationMenuViewportImpl = React.forwardRef((props2, forwardedRef) => {
63228
64305
  };
63229
64306
  useResizeObserver$1(content, handleSizeChange);
63230
64307
  return /* @__PURE__ */ jsx(
63231
- Primitive.div,
64308
+ Primitive$6.div,
63232
64309
  {
63233
64310
  "data-state": getOpenState(open),
63234
64311
  "data-orientation": context.orientation,
@@ -63249,7 +64326,7 @@ var NavigationMenuViewportImpl = React.forwardRef((props2, forwardedRef) => {
63249
64326
  NavigationMenuContentImpl,
63250
64327
  {
63251
64328
  ...props22,
63252
- ref: composeRefs$2(ref, (node) => {
64329
+ ref: composeRefs$1(ref, (node) => {
63253
64330
  if (isActive && node) setContent(node);
63254
64331
  })
63255
64332
  }
@@ -63263,7 +64340,7 @@ var FocusGroup = React.forwardRef(
63263
64340
  (props2, forwardedRef) => {
63264
64341
  const { __scopeNavigationMenu, ...groupProps } = props2;
63265
64342
  const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu);
63266
- return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(Primitive.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) });
64343
+ return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(Primitive$6.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) });
63267
64344
  }
63268
64345
  );
63269
64346
  var ARROW_KEYS$1 = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"];
@@ -63274,7 +64351,7 @@ var FocusGroupItem = React.forwardRef(
63274
64351
  const getItems = useFocusGroupCollection(__scopeNavigationMenu);
63275
64352
  const context = useNavigationMenuContext(FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);
63276
64353
  return /* @__PURE__ */ jsx(FocusGroupCollection.ItemSlot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(
63277
- Primitive.button,
64354
+ Primitive$6.button,
63278
64355
  {
63279
64356
  ...groupProps,
63280
64357
  ref: forwardedRef,
@@ -65779,7 +66856,7 @@ function useStateMachine(initialState2, machine) {
65779
66856
  }, initialState2);
65780
66857
  }
65781
66858
  var SCROLL_AREA_NAME = "ScrollArea";
65782
- var [createScrollAreaContext] = createContextScope(SCROLL_AREA_NAME);
66859
+ var [createScrollAreaContext] = createContextScope$2(SCROLL_AREA_NAME);
65783
66860
  var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
65784
66861
  var ScrollArea$1 = React.forwardRef(
65785
66862
  (props2, forwardedRef) => {
@@ -65824,7 +66901,7 @@ var ScrollArea$1 = React.forwardRef(
65824
66901
  onCornerWidthChange: setCornerWidth,
65825
66902
  onCornerHeightChange: setCornerHeight,
65826
66903
  children: /* @__PURE__ */ jsx(
65827
- Primitive.div,
66904
+ Primitive$6.div,
65828
66905
  {
65829
66906
  dir: direction,
65830
66907
  ...scrollAreaProps,
@@ -65861,7 +66938,7 @@ var ScrollAreaViewport = React.forwardRef(
65861
66938
  }
65862
66939
  ),
65863
66940
  /* @__PURE__ */ jsx(
65864
- Primitive.div,
66941
+ Primitive$6.div,
65865
66942
  {
65866
66943
  "data-radix-scroll-area-viewport": "",
65867
66944
  ...viewportProps,
@@ -66247,7 +67324,7 @@ var ScrollAreaScrollbarImpl = React.forwardRef((props2, forwardedRef) => {
66247
67324
  onThumbPositionChange: handleThumbPositionChange,
66248
67325
  onThumbPointerDown: useCallbackRef$2(onThumbPointerDown),
66249
67326
  children: /* @__PURE__ */ jsx(
66250
- Primitive.div,
67327
+ Primitive$6.div,
66251
67328
  {
66252
67329
  ...scrollbarProps,
66253
67330
  ref: composeRefs2,
@@ -66321,7 +67398,7 @@ var ScrollAreaThumbImpl = React.forwardRef(
66321
67398
  }
66322
67399
  }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);
66323
67400
  return /* @__PURE__ */ jsx(
66324
- Primitive.div,
67401
+ Primitive$6.div,
66325
67402
  {
66326
67403
  "data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
66327
67404
  ...thumbProps,
@@ -66373,7 +67450,7 @@ var ScrollAreaCornerImpl = React.forwardRef((props2, forwardedRef) => {
66373
67450
  setWidth(width2);
66374
67451
  });
66375
67452
  return hasSize ? /* @__PURE__ */ jsx(
66376
- Primitive.div,
67453
+ Primitive$6.div,
66377
67454
  {
66378
67455
  ...cornerProps,
66379
67456
  ref: forwardedRef,
@@ -66541,7 +67618,7 @@ var BACK_KEYS = {
66541
67618
  };
66542
67619
  var SLIDER_NAME = "Slider";
66543
67620
  var [Collection, useCollection, createCollectionScope] = createCollection(SLIDER_NAME);
66544
- var [createSliderContext] = createContextScope(SLIDER_NAME, [
67621
+ var [createSliderContext] = createContextScope$2(SLIDER_NAME, [
66545
67622
  createCollectionScope
66546
67623
  ]);
66547
67624
  var [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME);
@@ -66812,7 +67889,7 @@ var SliderImpl = React.forwardRef(
66812
67889
  } = props2;
66813
67890
  const context = useSliderContext(SLIDER_NAME, __scopeSlider);
66814
67891
  return /* @__PURE__ */ jsx(
66815
- Primitive.span,
67892
+ Primitive$6.span,
66816
67893
  {
66817
67894
  ...sliderProps,
66818
67895
  ref: forwardedRef,
@@ -66859,7 +67936,7 @@ var SliderTrack = React.forwardRef(
66859
67936
  const { __scopeSlider, ...trackProps } = props2;
66860
67937
  const context = useSliderContext(TRACK_NAME, __scopeSlider);
66861
67938
  return /* @__PURE__ */ jsx(
66862
- Primitive.span,
67939
+ Primitive$6.span,
66863
67940
  {
66864
67941
  "data-disabled": context.disabled ? "" : void 0,
66865
67942
  "data-orientation": context.orientation,
@@ -66885,7 +67962,7 @@ var SliderRange = React.forwardRef(
66885
67962
  const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;
66886
67963
  const offsetEnd = 100 - Math.max(...percentages);
66887
67964
  return /* @__PURE__ */ jsx(
66888
- Primitive.span,
67965
+ Primitive$6.span,
66889
67966
  {
66890
67967
  "data-orientation": context.orientation,
66891
67968
  "data-disabled": context.disabled ? "" : void 0,
@@ -66946,7 +68023,7 @@ var SliderThumbImpl = React.forwardRef(
66946
68023
  },
66947
68024
  children: [
66948
68025
  /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: props2.__scopeSlider, children: /* @__PURE__ */ jsx(
66949
- Primitive.span,
68026
+ Primitive$6.span,
66950
68027
  {
66951
68028
  role: "slider",
66952
68029
  "aria-label": props2["aria-label"] || label,
@@ -66999,7 +68076,7 @@ var SliderBubbleInput = React.forwardRef(
66999
68076
  }
67000
68077
  }, [prevValue, value]);
67001
68078
  return /* @__PURE__ */ jsx(
67002
- Primitive.input,
68079
+ Primitive$6.input,
67003
68080
  {
67004
68081
  style: { display: "none" },
67005
68082
  ...props2,
@@ -67153,7 +68230,7 @@ var Toggle$1 = React.forwardRef((props2, forwardedRef) => {
67153
68230
  caller: NAME
67154
68231
  });
67155
68232
  return /* @__PURE__ */ jsx(
67156
- Primitive.button,
68233
+ Primitive$6.button,
67157
68234
  {
67158
68235
  type: "button",
67159
68236
  "aria-pressed": pressed,
@@ -67172,7 +68249,7 @@ var Toggle$1 = React.forwardRef((props2, forwardedRef) => {
67172
68249
  Toggle$1.displayName = NAME;
67173
68250
  var Root = Toggle$1;
67174
68251
  var TOGGLE_GROUP_NAME = "ToggleGroup";
67175
- var [createToggleGroupContext] = createContextScope(TOGGLE_GROUP_NAME, [
68252
+ var [createToggleGroupContext] = createContextScope$2(TOGGLE_GROUP_NAME, [
67176
68253
  createRovingFocusGroupScope
67177
68254
  ]);
67178
68255
  var useRovingFocusGroupScope = createRovingFocusGroupScope();
@@ -67274,9 +68351,9 @@ var ToggleGroupImpl = React__default.forwardRef(
67274
68351
  orientation,
67275
68352
  dir: direction,
67276
68353
  loop,
67277
- children: /* @__PURE__ */ jsx(Primitive.div, { ...commonProps, ref: forwardedRef })
68354
+ children: /* @__PURE__ */ jsx(Primitive$6.div, { ...commonProps, ref: forwardedRef })
67278
68355
  }
67279
- ) : /* @__PURE__ */ jsx(Primitive.div, { ...commonProps, ref: forwardedRef }) });
68356
+ ) : /* @__PURE__ */ jsx(Primitive$6.div, { ...commonProps, ref: forwardedRef }) });
67280
68357
  }
67281
68358
  );
67282
68359
  var ITEM_NAME = "ToggleGroupItem";