` instead.
tabIndex: void 0,
onPointerDownCapture(event) {
if (event.isPrimary) {
store4.context.pointerDownItemRef.current = event.currentTarget;
}
event.preventDefault();
},
onMouseDown(event) {
event.preventDefault();
},
onClick(event) {
if (disabled2 || readOnly) {
return;
}
commitSelection(event.nativeEvent);
},
onMouseUp(event) {
const pointerStartedOnItem = store4.context.pointerDownItemRef.current === event.currentTarget;
store4.context.pointerDownItemRef.current = null;
if (disabled2 || readOnly || event.button !== 0 || pointerStartedOnItem || !highlighted) {
return;
}
commitSelection(event.nativeEvent);
}
};
const element = useRenderElement("div", componentProps, {
ref: [buttonRef, forwardedRef, listItem.ref, itemRef],
state: state2,
props: [itemProps, defaultProps, elementProps, getButtonProps]
});
const contextValue = React83.useMemo(() => ({
selected,
textRef
}), [selected, textRef]);
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(ComboboxItemContext.Provider, {
value: contextValue,
children: element
});
}
function ComboboxItemVirtualizedIndex(props) {
const {
componentProps,
forwardedRef
} = props;
const store4 = useComboboxRootContext();
const isItemEqualToValue = store4.useState("isItemEqualToValue");
const {
flatFilteredValues
} = useComboboxDerivedItemsContext();
const lookupValue = componentProps.value ?? null;
const indexFromFilter = findItemIndex(flatFilteredValues, lookupValue, isItemEqualToValue);
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(ComboboxItemInner, {
componentProps,
forwardedRef,
virtualized: true,
indexFromFilter
});
}
var ComboboxItem = /* @__PURE__ */ React83.memo(/* @__PURE__ */ React83.forwardRef(function ComboboxItem2(componentProps, forwardedRef) {
const store4 = useComboboxRootContext();
const virtualized = store4.useState("virtualized");
if (virtualized && componentProps.index == null) {
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(ComboboxItemVirtualizedIndex, {
componentProps,
forwardedRef
});
}
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(ComboboxItemInner, {
componentProps,
forwardedRef,
virtualized,
indexFromFilter: void 0
});
}));
if (true) ComboboxItem.displayName = "ComboboxItem";
// node_modules/@base-ui/react/combobox/row/ComboboxRow.mjs
var React84 = __toESM(require_react(), 1);
var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
var ComboboxRow = /* @__PURE__ */ React84.forwardRef(function ComboboxRow2(componentProps, forwardedRef) {
const {
render: render5,
className,
style,
...elementProps
} = componentProps;
const element = useRenderElement("div", componentProps, {
ref: forwardedRef,
props: [{
role: "row"
}, elementProps]
});
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ComboboxRowContext.Provider, {
value: true,
children: element
});
});
if (true) ComboboxRow.displayName = "ComboboxRow";
// node_modules/@base-ui/react/combobox/empty/ComboboxEmpty.mjs
var React85 = __toESM(require_react(), 1);
var ComboboxEmpty = /* @__PURE__ */ React85.forwardRef(function ComboboxEmpty2(componentProps, forwardedRef) {
const {
render: render5,
className,
style,
children: childrenProp,
...elementProps
} = componentProps;
const {
filteredItems
} = useComboboxDerivedItemsContext();
const store4 = useComboboxRootContext();
const emptyRef = useInitialLiveRegionTextMutation();
const children = filteredItems.length === 0 ? childrenProp : null;
return useRenderElement("div", componentProps, {
ref: [forwardedRef, store4.context.emptyRef, emptyRef],
props: [{
children,
role: "status",
"aria-live": "polite",
"aria-atomic": true
}, elementProps]
});
});
if (true) ComboboxEmpty.displayName = "ComboboxEmpty";
// node_modules/@base-ui/react/utils/listbox-separator/ListboxSeparator.mjs
var React86 = __toESM(require_react(), 1);
var ListboxSeparator = /* @__PURE__ */ React86.forwardRef(function ListboxSeparator2(componentProps, forwardedRef) {
const {
className,
render: render5,
orientation = "horizontal",
style,
...elementProps
} = componentProps;
const state2 = {
orientation
};
return useRenderElement("div", componentProps, {
state: state2,
ref: forwardedRef,
props: [{
role: "presentation"
}, elementProps]
});
});
if (true) ListboxSeparator.displayName = "ListboxSeparator";
// node_modules/@base-ui/react/combobox/root/utils/useFilteredItems.mjs
function useFilteredItems() {
const items = useComboboxDerivedItemsContext();
return items.filteredItems;
}
// node_modules/@base-ui/react/button/Button.mjs
var React87 = __toESM(require_react(), 1);
var Button2 = /* @__PURE__ */ React87.forwardRef(function Button3(componentProps, forwardedRef) {
const {
render: render5,
className,
disabled: disabled2 = false,
focusableWhenDisabled = false,
nativeButton = true,
style,
...elementProps
} = componentProps;
const {
getButtonProps,
buttonRef
} = useButton({
disabled: disabled2,
focusableWhenDisabled,
native: nativeButton
});
const state2 = {
disabled: disabled2
};
return useRenderElement("button", componentProps, {
state: state2,
ref: [forwardedRef, buttonRef],
props: [elementProps, getButtonProps]
});
});
if (true) Button2.displayName = "Button";
// node_modules/@base-ui/react/field/item/FieldItemContext.mjs
var React88 = __toESM(require_react(), 1);
var FieldItemContext = /* @__PURE__ */ React88.createContext({
disabled: false
});
if (true) FieldItemContext.displayName = "FieldItemContext";
function useFieldItemContext() {
const context = React88.useContext(FieldItemContext);
return context;
}
// node_modules/@base-ui/react/field/root/useFieldValidation.mjs
var React89 = __toESM(require_react(), 1);
// node_modules/@base-ui/react/field/utils/getCombinedFieldValidityData.mjs
function getCombinedFieldValidityData(validityData, invalid2) {
return {
...validityData,
state: {
...validityData.state,
valid: !invalid2 && validityData.state.valid
}
};
}
// node_modules/@base-ui/react/field/root/useFieldValidation.mjs
var validityKeys = Object.keys(DEFAULT_VALIDITY_STATE);
function isEligibleInput(input, formElement) {
if (input.matches(":disabled")) {
return false;
}
if (!formElement || input.form === formElement) {
return true;
}
return input.form === null && !input.hasAttribute("form");
}
function findRepresentativeInput(inputs, formElement) {
let fallback = null;
for (const input of inputs.keys()) {
if (!isEligibleInput(input, formElement)) {
continue;
}
if (!input.validity.valid) {
return input;
}
fallback ??= input;
}
return fallback;
}
function makeState(customError) {
return {
...DEFAULT_VALIDITY_STATE,
valid: !customError,
customError
};
}
function getNativeErrors(element) {
return element && element.validationMessage ? [element.validationMessage] : [];
}
function useFieldValidation(params) {
const {
elementRef,
formRef
} = useFormContext();
const {
setValidityData,
validate,
validityData,
validationDebounceTime,
invalid: invalid2,
markedDirtyRef,
state: state2,
shouldValidateOnChange,
validationMode,
registeredFieldIdRef
} = params;
const {
controlId,
getDescriptionProps
} = useLabelableContext();
const timeout = useTimeout();
const inputRef = React89.useRef(null);
const registeredInputs = useRefWithInit(() => /* @__PURE__ */ new Map()).current;
const validationCommitIdRef = React89.useRef(0);
const customValidityRef = React89.useRef(null);
const registerInput = React89.useCallback((element, registration) => {
registeredInputs.set(element, registration);
return () => {
registeredInputs.delete(element);
};
}, [registeredInputs]);
const getInputControl = useStableCallback(() => {
const element = findRepresentativeInput(registeredInputs, elementRef.current);
return element && registeredInputs.get(element)?.controlRef.current || null;
});
const commit = useStableCallback(async (value, revalidate = false) => {
validationCommitIdRef.current += 1;
const validationCommitId = validationCommitIdRef.current;
function updateRegisteredFieldValidity(nextValidityData, externalInvalid = invalid2) {
const fieldId = registeredFieldIdRef.current ?? controlId;
if (fieldId == null) {
return;
}
const currentFieldData = formRef.current.fields.get(fieldId);
if (!currentFieldData) {
return;
}
const validityDataWithFormErrors = getCombinedFieldValidityData(nextValidityData, externalInvalid);
formRef.current.fields.set(fieldId, {
...currentFieldData,
validityData: validityDataWithFormErrors
});
}
function makeValidityData(validityState, errorMessages) {
const errors = validityState.valid === false ? errorMessages : [];
return {
value,
state: validityState,
error: errors[0] ?? "",
errors,
initialValue: validityData.initialValue
};
}
function setCustomValidity(element2, message2) {
const displaced = element2.validity.customError ? element2.validationMessage : "";
const ownedMessage = message2.replace(/\r\n?/g, "\n");
element2.setCustomValidity(ownedMessage);
customValidityRef.current = [element2, ownedMessage, displaced];
}
function clearCustomValidity() {
const record = customValidityRef.current;
customValidityRef.current = null;
if (record && (!record[0].willValidate || record[0].validationMessage === record[1])) {
record[0].setCustomValidity(record[2]);
}
}
function publish(validityState, errorMessages, externalInvalid) {
const nextValidityData = makeValidityData(validityState, errorMessages);
updateRegisteredFieldValidity(nextValidityData, externalInvalid);
setValidityData(nextValidityData);
}
function getState2(el) {
const computedState = validityKeys.reduce((acc, key) => {
acc[key] = el.validity[key];
return acc;
}, {});
let hasOnlyValueMissingError = false;
for (const key of validityKeys) {
if (key === "valid") {
continue;
}
if (key === "valueMissing" && computedState[key]) {
hasOnlyValueMissingError = true;
} else if (computedState[key]) {
return computedState;
}
}
if (hasOnlyValueMissingError && !markedDirtyRef.current) {
computedState.valid = true;
computedState.valueMissing = false;
}
return computedState;
}
function resolveRepresentativeInput() {
return registeredInputs.size > 0 ? findRepresentativeInput(registeredInputs, elementRef.current) : inputRef.current;
}
let element = resolveRepresentativeInput();
function refreshState() {
element = resolveRepresentativeInput();
return element?.willValidate ? getState2(element) : makeState(false);
}
if (revalidate) {
if (state2.valid !== false || !element) {
return;
}
if (!element.validity.valueMissing) {
clearCustomValidity();
const currentElement = resolveRepresentativeInput();
const foreign = currentElement?.validity.customError ? getNativeErrors(currentElement) : [];
publish(makeState(foreign.length > 0), foreign, false);
return;
}
for (const key of validityKeys) {
if (key !== "valid" && key !== "valueMissing" && key !== "customError" && element.validity[key]) {
return;
}
}
}
timeout.clear();
clearCustomValidity();
let nextState = refreshState();
let validationErrors = getNativeErrors(element);
const isValidatingOnChange = shouldValidateOnChange();
if (validationErrors.length === 0 || isValidatingOnChange) {
const formValues = Array.from(formRef.current.fields.values()).reduce((acc, field) => {
if (field.name) {
acc[field.name] = field.getValue();
}
return acc;
}, {});
const resultOrPromise = validate(value, formValues);
let result;
if (typeof resultOrPromise === "object" && resultOrPromise !== null && "then" in resultOrPromise) {
if (nextState.valid === false) {
publish(nextState, validationErrors);
} else if (validationMode === "onSubmit" || !validityData.state.customError) {
nextState.valid = null;
publish(nextState, validationErrors);
}
result = await resultOrPromise;
if (validationCommitId !== validationCommitIdRef.current) {
return;
}
nextState = refreshState();
} else {
result = resultOrPromise;
}
validationErrors = result ? [].concat(result).filter(Boolean) : [];
if (validationErrors.length > 0) {
nextState.valid = false;
nextState.customError = true;
if (element?.willValidate) {
setCustomValidity(element, validationErrors.join("\n"));
}
} else {
validationErrors = getNativeErrors(element);
}
}
publish(nextState, validationErrors);
});
const change = useStableCallback((value, cancelPending = false) => {
timeout.clear();
validationCommitIdRef.current += 1;
if (cancelPending) {
return;
}
const validateOnChange = shouldValidateOnChange();
if (validateOnChange && value !== "" && validationDebounceTime) {
timeout.start(validationDebounceTime, () => {
commit(value);
});
} else {
commit(value, !validateOnChange);
}
});
const getValidationProps = React89.useCallback((disabled2, externalProps = {}) => mergeProps(getDescriptionProps(externalProps), state2.valid === false && !state2.disabled && !disabled2 ? {
"aria-invalid": true
} : EMPTY_OBJECT2), [getDescriptionProps, state2.disabled, state2.valid]);
return React89.useMemo(() => ({
getValidationProps,
inputRef,
registeredInputs,
registerInput,
getInputControl,
commit,
change
}), [getValidationProps, registeredInputs, registerInput, getInputControl, commit, change]);
}
// node_modules/@base-ui/react/collapsible/index.parts.mjs
var index_parts_exports = {};
__export(index_parts_exports, {
Panel: () => CollapsiblePanel,
Root: () => CollapsibleRoot,
Trigger: () => CollapsibleTrigger
});
// node_modules/@base-ui/react/collapsible/root/CollapsibleRoot.mjs
var React90 = __toESM(require_react(), 1);
// node_modules/@base-ui/react/collapsible/root/stateAttributesMapping.mjs
var collapsibleStateAttributesMapping = {
...collapsibleOpenStateMapping,
...transitionStatusMapping
};
// node_modules/@base-ui/react/collapsible/root/CollapsibleRoot.mjs
var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1);
var CollapsibleRoot = /* @__PURE__ */ React90.forwardRef(function CollapsibleRoot2(componentProps, forwardedRef) {
const {
render: render5,
className,
defaultOpen = false,
disabled: disabled2 = false,
onOpenChange: onOpenChangeProp,
open: open3,
style,
...elementProps
} = componentProps;
const onOpenChange = useStableCallback(onOpenChangeProp);
const collapsible = useCollapsibleRoot({
open: open3,
defaultOpen,
onOpenChange,
disabled: disabled2
});
const state2 = React90.useMemo(() => ({
open: collapsible.open,
disabled: collapsible.disabled,
transitionStatus: collapsible.transitionStatus
}), [collapsible.open, collapsible.disabled, collapsible.transitionStatus]);
const contextValue = React90.useMemo(() => ({
...collapsible,
onOpenChange,
state: state2
}), [collapsible, onOpenChange, state2]);
const element = useRenderElement("div", componentProps, {
state: state2,
ref: forwardedRef,
props: elementProps,
stateAttributesMapping: collapsibleStateAttributesMapping
});
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(CollapsibleRootContext.Provider, {
value: contextValue,
children: element
});
});
if (true) CollapsibleRoot.displayName = "CollapsibleRoot";
// node_modules/@base-ui/react/collapsible/trigger/CollapsibleTrigger.mjs
var React91 = __toESM(require_react(), 1);
var stateAttributesMapping4 = {
...triggerOpenStateMapping,
...transitionStatusMapping
};
var CollapsibleTrigger = /* @__PURE__ */ React91.forwardRef(function CollapsibleTrigger2(componentProps, forwardedRef) {
const {
panelId,
open: open3,
handleTrigger,
state: state2,
disabled: contextDisabled
} = useCollapsibleRootContext();
const {
className,
disabled: disabled2 = contextDisabled,
render: render5,
nativeButton = true,
style,
...elementProps
} = componentProps;
const {
getButtonProps,
buttonRef
} = useButton({
disabled: disabled2,
focusableWhenDisabled: true,
native: nativeButton
});
const element = useRenderElement("button", componentProps, {
state: state2,
ref: [forwardedRef, buttonRef],
props: [{
"aria-controls": open3 ? panelId : void 0,
"aria-expanded": open3,
onClick: handleTrigger
}, elementProps, getButtonProps],
stateAttributesMapping: stateAttributesMapping4
});
return element;
});
if (true) CollapsibleTrigger.displayName = "CollapsibleTrigger";
// node_modules/@base-ui/react/collapsible/panel/CollapsiblePanel.mjs
var React92 = __toESM(require_react(), 1);
// node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelCssVars.mjs
var collapsiblePanelHeight = "--collapsible-panel-height";
var collapsiblePanelWidth = "--collapsible-panel-width";
// node_modules/@base-ui/react/collapsible/panel/CollapsiblePanel.mjs
var CollapsiblePanel = /* @__PURE__ */ React92.forwardRef(function CollapsiblePanel2(componentProps, forwardedRef) {
const {
className,
hiddenUntilFound: hiddenUntilFoundProp,
keepMounted: keepMountedProp,
render: render5,
id: idProp,
style,
...elementProps
} = componentProps;
if (true) {
React92.useEffect(() => {
if (hiddenUntilFoundProp && keepMountedProp === false) {
warn("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.");
}
}, [hiddenUntilFoundProp, keepMountedProp]);
}
const {
defaultPanelId,
mounted,
onOpenChange,
open: open3,
setMounted,
setPanelIdState,
setOpen,
state: state2,
transitionStatus
} = useCollapsibleRootContext();
const hiddenUntilFound = hiddenUntilFoundProp ?? false;
const keepMounted = keepMountedProp ?? false;
const registeredId = idProp || void 0;
const id = registeredId ?? defaultPanelId;
useIsoLayoutEffect(() => {
setPanelIdState((currentId) => registeredId ?? (currentId === null ? void 0 : currentId));
return () => {
setPanelIdState((currentId) => currentId === registeredId ? null : currentId);
};
}, [registeredId, setPanelIdState]);
const {
height,
props,
ref,
shouldPreventOpenAnimation,
shouldRender,
transitionStatus: panelTransitionStatus,
width
} = useCollapsiblePanel({
externalRef: forwardedRef,
hiddenUntilFound,
id,
keepMounted,
mounted,
onOpenChange,
open: open3,
setMounted,
setOpen,
transitionStatus
});
const panelState = {
...state2,
transitionStatus: panelTransitionStatus
};
const resolvedStyle = resolveStyle2(style, panelState);
const element = useRenderElement("div", {
...componentProps,
style: void 0
}, {
state: panelState,
ref,
props: [
props,
{
style: {
[collapsiblePanelHeight]: height === void 0 ? "auto" : `${height}px`,
[collapsiblePanelWidth]: width === void 0 ? "auto" : `${width}px`
}
},
elementProps,
resolvedStyle ? {
style: resolvedStyle
} : void 0,
// Resolve the public `style` prop so temporary `animationName: 'none'`
// can still win after user's inline styles have been merged.
shouldPreventOpenAnimation ? {
style: {
animationName: "none"
}
} : void 0
],
stateAttributesMapping: collapsibleStateAttributesMapping
});
if (!shouldRender) {
return null;
}
return element;
});
if (true) CollapsiblePanel.displayName = "CollapsiblePanel";
// node_modules/@base-ui/react/combobox/index.parts.mjs
var index_parts_exports2 = {};
__export(index_parts_exports2, {
Arrow: () => ComboboxArrow,
Backdrop: () => ComboboxBackdrop,
Chip: () => ComboboxChip,
ChipRemove: () => ComboboxChipRemove,
Chips: () => ComboboxChips,
Clear: () => ComboboxClear,
Collection: () => ComboboxCollection,
Empty: () => ComboboxEmpty,
Group: () => ComboboxGroup,
GroupLabel: () => ComboboxGroupLabel,
Icon: () => ComboboxIcon,
Input: () => ComboboxInput,
InputGroup: () => ComboboxInputGroup,
Item: () => ComboboxItem,
ItemIndicator: () => ComboboxItemIndicator,
Label: () => ComboboxLabel,
List: () => ComboboxList,
Popup: () => ComboboxPopup,
Portal: () => ComboboxPortal,
Positioner: () => ComboboxPositioner,
Root: () => ComboboxRoot,
Row: () => ComboboxRow,
Separator: () => ComboboxSeparator,
Status: () => ComboboxStatus,
Trigger: () => ComboboxTrigger,
Value: () => ComboboxValue,
createItems: () => createComboboxItems,
useFilter: () => useComboboxFilter,
useFilteredItems: () => useFilteredItems
});
// node_modules/@base-ui/react/combobox/root/ComboboxRoot.mjs
var React93 = __toESM(require_react(), 1);
var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
function ComboboxRoot(props) {
const {
multiple = false,
defaultValue: defaultValue2,
value,
onValueChange,
autoComplete,
...other
} = props;
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(AriaCombobox, {
...other,
selectionMode: multiple ? "multiple" : "single",
selectedValue: value,
defaultSelectedValue: defaultValue2,
onSelectedValueChange: onValueChange,
formAutoComplete: autoComplete
});
}
// node_modules/@base-ui/react/combobox/label/ComboboxLabel.mjs
var React94 = __toESM(require_react(), 1);
// node_modules/@base-ui/react/utils/useRegisteredLabelId.mjs
function useRegisteredLabelId(idProp, setLabelId) {
const id = useBaseUiId(idProp);
useIsoLayoutEffect(() => {
setLabelId(id);
return () => {
setLabelId((currentId) => currentId === id ? void 0 : currentId);
};
}, [id, setLabelId]);
return id;
}
// node_modules/@base-ui/react/internals/labelable-provider/useLabel.mjs
function useLabel(params = {}) {
const {
id: idProp,
fallbackControlId,
native = false,
setLabelId: setLabelIdProp,
focusControl: focusControlProp
} = params;
const {
controlId: contextControlId,
setLabelId: setContextLabelId
} = useLabelableContext();
const syncLabelId = useStableCallback((nextLabelId) => {
setContextLabelId(nextLabelId);
setLabelIdProp?.(nextLabelId);
});
const id = useRegisteredLabelId(idProp, syncLabelId);
const resolvedControlId = contextControlId ?? fallbackControlId;
function focusControl(event) {
if (focusControlProp) {
focusControlProp(event, resolvedControlId);
return;
}
if (!resolvedControlId) {
return;
}
const controlElement = ownerDocument(event.currentTarget).getElementById(resolvedControlId);
if (isHTMLElement(controlElement)) {
focusElementWithVisible(controlElement);
}
}
function handleInteraction(event) {
const target = getTarget(event.nativeEvent);
if (target?.closest("button,input,select,textarea")) {
return;
}
if (!event.defaultPrevented && event.detail > 1) {
event.preventDefault();
}
if (native) {
return;
}
focusControl(event);
}
return native ? {
id,
htmlFor: resolvedControlId,
onMouseDown: handleInteraction
} : {
id,
onClick: handleInteraction,
onPointerDown(event) {
event.preventDefault();
}
};
}
function focusElementWithVisible(element) {
element.focus({
// Available from Chrome 144+ (January 2026).
// Safari and Firefox already support it.
focusVisible: true
});
}
// node_modules/@base-ui/react/combobox/label/ComboboxLabel.mjs
var ComboboxLabel = /* @__PURE__ */ React94.forwardRef(function ComboboxLabel2(componentProps, forwardedRef) {
const {
render: render5,
className,
style,
...elementProps
} = componentProps;
const elementPropsWithoutId = elementProps;
delete elementPropsWithoutId.id;
const fieldRootContext = useFieldRootContext();
const store4 = useComboboxRootContext();
const inputInsidePopup = store4.useState("inputInsidePopup");
const triggerElement = store4.useState("triggerElement");
const inputElement = store4.useState("inputElement");
const rootId = store4.useState("id");
const defaultLabelId = getDefaultLabelId(rootId);
const localControlId = triggerElement?.id ?? (inputInsidePopup ? rootId : void 0);
if (true) {
React94.useEffect(() => {
if (!inputElement || inputInsidePopup) {
return;
}
const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
const message2 = "
labels only. When is the form control, use a native