import { e as $8ae05eaa5c114e9c$export$7f54fc3180508a52, b as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "./utils-cvK1vxO7.js";
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DWVaNd2E.js";
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
import React__default, { useRef, useMemo, useCallback, useState, useEffect, forwardRef, createContext, useContext } from "react";
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-BCmkV-7c.js";
import { e as $03deb23ff14920c4$export$4eaf04e54aa8eed6, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715, v as $507fabe10e71c6fb$export$8397ddfc504fdb9a, z as $7215afc6de606d6b$export$de79e2c695e052f3, A as $46d819fcbaf35654$export$8f71654801c2f7cd, $ as $f645667febf57a63$export$4c014de7c8940b4c, w as $6179b936705e76d3$export$ae780daf29e6d456 } from "./useHover-LmGemtHE.js";
import { a as $9446cca9a3875146$export$cb6e0bb50bc19463, $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./number-7sOvrqo0.js";
import { $ as $14c0b72509d70225$export$b0d6fa1ab32e3295, a as $14c0b72509d70225$export$16a4697467175487 } from "./textSelection-k0u64dDA.js";
import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-C8umX0gk.js";
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DMOmz986.js";
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-yV9VVy9R.js";
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-CUxgjvAY.js";
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-X6SggVVO.js";
function $e8a7022cf87cba2a$export$36da96379f79f245(props) {
  let { onMoveStart, onMove, onMoveEnd } = props;
  let state = useRef({
    didMove: false,
    lastPosition: null,
    id: null
  });
  let { addGlobalListener, removeGlobalListener } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
  let move = $8ae05eaa5c114e9c$export$7f54fc3180508a52((originalEvent, pointerType, deltaX, deltaY) => {
    if (deltaX === 0 && deltaY === 0) return;
    if (!state.current.didMove) {
      state.current.didMove = true;
      onMoveStart === null || onMoveStart === void 0 ? void 0 : onMoveStart({
        type: "movestart",
        pointerType,
        shiftKey: originalEvent.shiftKey,
        metaKey: originalEvent.metaKey,
        ctrlKey: originalEvent.ctrlKey,
        altKey: originalEvent.altKey
      });
    }
    onMove === null || onMove === void 0 ? void 0 : onMove({
      type: "move",
      pointerType,
      deltaX,
      deltaY,
      shiftKey: originalEvent.shiftKey,
      metaKey: originalEvent.metaKey,
      ctrlKey: originalEvent.ctrlKey,
      altKey: originalEvent.altKey
    });
  });
  let end = $8ae05eaa5c114e9c$export$7f54fc3180508a52((originalEvent, pointerType) => {
    $14c0b72509d70225$export$b0d6fa1ab32e3295();
    if (state.current.didMove) onMoveEnd === null || onMoveEnd === void 0 ? void 0 : onMoveEnd({
      type: "moveend",
      pointerType,
      shiftKey: originalEvent.shiftKey,
      metaKey: originalEvent.metaKey,
      ctrlKey: originalEvent.ctrlKey,
      altKey: originalEvent.altKey
    });
  });
  let moveProps = useMemo(() => {
    let moveProps2 = {};
    let start = () => {
      $14c0b72509d70225$export$16a4697467175487();
      state.current.didMove = false;
    };
    if (typeof PointerEvent === "undefined" && process.env.NODE_ENV === "test") {
      let onMouseMove = (e) => {
        if (e.button === 0) {
          var _state_current_lastPosition, _state_current_lastPosition1;
          var _state_current_lastPosition_pageX, _state_current_lastPosition_pageY;
          move(e, "mouse", e.pageX - ((_state_current_lastPosition_pageX = (_state_current_lastPosition = state.current.lastPosition) === null || _state_current_lastPosition === void 0 ? void 0 : _state_current_lastPosition.pageX) !== null && _state_current_lastPosition_pageX !== void 0 ? _state_current_lastPosition_pageX : 0), e.pageY - ((_state_current_lastPosition_pageY = (_state_current_lastPosition1 = state.current.lastPosition) === null || _state_current_lastPosition1 === void 0 ? void 0 : _state_current_lastPosition1.pageY) !== null && _state_current_lastPosition_pageY !== void 0 ? _state_current_lastPosition_pageY : 0));
          state.current.lastPosition = {
            pageX: e.pageX,
            pageY: e.pageY
          };
        }
      };
      let onMouseUp = (e) => {
        if (e.button === 0) {
          end(e, "mouse");
          removeGlobalListener(window, "mousemove", onMouseMove, false);
          removeGlobalListener(window, "mouseup", onMouseUp, false);
        }
      };
      moveProps2.onMouseDown = (e) => {
        if (e.button === 0) {
          start();
          e.stopPropagation();
          e.preventDefault();
          state.current.lastPosition = {
            pageX: e.pageX,
            pageY: e.pageY
          };
          addGlobalListener(window, "mousemove", onMouseMove, false);
          addGlobalListener(window, "mouseup", onMouseUp, false);
        }
      };
      let onTouchMove = (e) => {
        let touch = [
          ...e.changedTouches
        ].findIndex(({ identifier }) => identifier === state.current.id);
        if (touch >= 0) {
          var _state_current_lastPosition, _state_current_lastPosition1;
          let { pageX, pageY } = e.changedTouches[touch];
          var _state_current_lastPosition_pageX, _state_current_lastPosition_pageY;
          move(e, "touch", pageX - ((_state_current_lastPosition_pageX = (_state_current_lastPosition = state.current.lastPosition) === null || _state_current_lastPosition === void 0 ? void 0 : _state_current_lastPosition.pageX) !== null && _state_current_lastPosition_pageX !== void 0 ? _state_current_lastPosition_pageX : 0), pageY - ((_state_current_lastPosition_pageY = (_state_current_lastPosition1 = state.current.lastPosition) === null || _state_current_lastPosition1 === void 0 ? void 0 : _state_current_lastPosition1.pageY) !== null && _state_current_lastPosition_pageY !== void 0 ? _state_current_lastPosition_pageY : 0));
          state.current.lastPosition = {
            pageX,
            pageY
          };
        }
      };
      let onTouchEnd = (e) => {
        let touch = [
          ...e.changedTouches
        ].findIndex(({ identifier }) => identifier === state.current.id);
        if (touch >= 0) {
          end(e, "touch");
          state.current.id = null;
          removeGlobalListener(window, "touchmove", onTouchMove);
          removeGlobalListener(window, "touchend", onTouchEnd);
          removeGlobalListener(window, "touchcancel", onTouchEnd);
        }
      };
      moveProps2.onTouchStart = (e) => {
        if (e.changedTouches.length === 0 || state.current.id != null) return;
        let { pageX, pageY, identifier } = e.changedTouches[0];
        start();
        e.stopPropagation();
        e.preventDefault();
        state.current.lastPosition = {
          pageX,
          pageY
        };
        state.current.id = identifier;
        addGlobalListener(window, "touchmove", onTouchMove, false);
        addGlobalListener(window, "touchend", onTouchEnd, false);
        addGlobalListener(window, "touchcancel", onTouchEnd, false);
      };
    } else {
      let onPointerMove = (e) => {
        if (e.pointerId === state.current.id) {
          var _state_current_lastPosition, _state_current_lastPosition1;
          let pointerType = e.pointerType || "mouse";
          var _state_current_lastPosition_pageX, _state_current_lastPosition_pageY;
          move(e, pointerType, e.pageX - ((_state_current_lastPosition_pageX = (_state_current_lastPosition = state.current.lastPosition) === null || _state_current_lastPosition === void 0 ? void 0 : _state_current_lastPosition.pageX) !== null && _state_current_lastPosition_pageX !== void 0 ? _state_current_lastPosition_pageX : 0), e.pageY - ((_state_current_lastPosition_pageY = (_state_current_lastPosition1 = state.current.lastPosition) === null || _state_current_lastPosition1 === void 0 ? void 0 : _state_current_lastPosition1.pageY) !== null && _state_current_lastPosition_pageY !== void 0 ? _state_current_lastPosition_pageY : 0));
          state.current.lastPosition = {
            pageX: e.pageX,
            pageY: e.pageY
          };
        }
      };
      let onPointerUp = (e) => {
        if (e.pointerId === state.current.id) {
          let pointerType = e.pointerType || "mouse";
          end(e, pointerType);
          state.current.id = null;
          removeGlobalListener(window, "pointermove", onPointerMove, false);
          removeGlobalListener(window, "pointerup", onPointerUp, false);
          removeGlobalListener(window, "pointercancel", onPointerUp, false);
        }
      };
      moveProps2.onPointerDown = (e) => {
        if (e.button === 0 && state.current.id == null) {
          start();
          e.stopPropagation();
          e.preventDefault();
          state.current.lastPosition = {
            pageX: e.pageX,
            pageY: e.pageY
          };
          state.current.id = e.pointerId;
          addGlobalListener(window, "pointermove", onPointerMove, false);
          addGlobalListener(window, "pointerup", onPointerUp, false);
          addGlobalListener(window, "pointercancel", onPointerUp, false);
        }
      };
    }
    let triggerKeyboardMove = (e, deltaX, deltaY) => {
      start();
      move(e, "keyboard", deltaX, deltaY);
      end(e, "keyboard");
    };
    moveProps2.onKeyDown = (e) => {
      switch (e.key) {
        case "Left":
        case "ArrowLeft":
          e.preventDefault();
          e.stopPropagation();
          triggerKeyboardMove(e, -1, 0);
          break;
        case "Right":
        case "ArrowRight":
          e.preventDefault();
          e.stopPropagation();
          triggerKeyboardMove(e, 1, 0);
          break;
        case "Up":
        case "ArrowUp":
          e.preventDefault();
          e.stopPropagation();
          triggerKeyboardMove(e, 0, -1);
          break;
        case "Down":
        case "ArrowDown":
          e.preventDefault();
          e.stopPropagation();
          triggerKeyboardMove(e, 0, 1);
          break;
      }
    };
    return moveProps2;
  }, [
    state,
    addGlobalListener,
    removeGlobalListener,
    move,
    end
  ]);
  return {
    moveProps
  };
}
const $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE = 0;
const $28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE = 100;
const $28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE = 1;
function $28f99e3e86e6ec45$export$e5fda3247f5d67f9(props) {
  const { isDisabled = false, minValue = $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE, maxValue = $28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE, numberFormatter: formatter, step = $28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE, orientation = "horizontal" } = props;
  let pageSize = useMemo(() => {
    let calcPageSize = (maxValue - minValue) / 10;
    calcPageSize = $9446cca9a3875146$export$cb6e0bb50bc19463(calcPageSize, 0, calcPageSize + step, step);
    return Math.max(calcPageSize, step);
  }, [
    step,
    maxValue,
    minValue
  ]);
  let restrictValues = useCallback((values2) => values2 === null || values2 === void 0 ? void 0 : values2.map((val, idx) => {
    let min = idx === 0 ? minValue : values2[idx - 1];
    let max = idx === values2.length - 1 ? maxValue : values2[idx + 1];
    return $9446cca9a3875146$export$cb6e0bb50bc19463(val, min, max, step);
  }), [
    minValue,
    maxValue,
    step
  ]);
  let value = useMemo(() => restrictValues($28f99e3e86e6ec45$var$convertValue(props.value)), [
    props.value,
    restrictValues
  ]);
  let defaultValue = useMemo(() => {
    var _convertValue;
    return restrictValues((_convertValue = $28f99e3e86e6ec45$var$convertValue(props.defaultValue)) !== null && _convertValue !== void 0 ? _convertValue : [
      minValue
    ]);
  }, [
    props.defaultValue,
    minValue,
    restrictValues
  ]);
  let onChange = $28f99e3e86e6ec45$var$createOnChange(props.value, props.defaultValue, props.onChange);
  let onChangeEnd = $28f99e3e86e6ec45$var$createOnChange(props.value, props.defaultValue, props.onChangeEnd);
  const [values, setValuesState] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange);
  let [initialValues] = useState(values);
  const [isDraggings, setDraggingsState] = useState(new Array(values.length).fill(false));
  const isEditablesRef = useRef(new Array(values.length).fill(true));
  const [focusedIndex, setFocusedIndex] = useState(void 0);
  const valuesRef = useRef(values);
  const isDraggingsRef = useRef(isDraggings);
  let setValues = (values2) => {
    valuesRef.current = values2;
    setValuesState(values2);
  };
  let setDraggings = (draggings) => {
    isDraggingsRef.current = draggings;
    setDraggingsState(draggings);
  };
  function getValuePercent(value2) {
    return (value2 - minValue) / (maxValue - minValue);
  }
  function getThumbMinValue(index) {
    return index === 0 ? minValue : values[index - 1];
  }
  function getThumbMaxValue(index) {
    return index === values.length - 1 ? maxValue : values[index + 1];
  }
  function isThumbEditable(index) {
    return isEditablesRef.current[index];
  }
  function setThumbEditable(index, editable) {
    isEditablesRef.current[index] = editable;
  }
  function updateValue(index, value2) {
    if (isDisabled || !isThumbEditable(index)) return;
    const thisMin = getThumbMinValue(index);
    const thisMax = getThumbMaxValue(index);
    value2 = $9446cca9a3875146$export$cb6e0bb50bc19463(value2, thisMin, thisMax, step);
    let newValues = $28f99e3e86e6ec45$var$replaceIndex(valuesRef.current, index, value2);
    setValues(newValues);
  }
  function updateDragging(index, dragging) {
    if (isDisabled || !isThumbEditable(index)) return;
    if (dragging) valuesRef.current = values;
    const wasDragging = isDraggingsRef.current[index];
    isDraggingsRef.current = $28f99e3e86e6ec45$var$replaceIndex(isDraggingsRef.current, index, dragging);
    setDraggings(isDraggingsRef.current);
    if (onChangeEnd && wasDragging && !isDraggingsRef.current.some(Boolean)) onChangeEnd(valuesRef.current);
  }
  function getFormattedValue(value2) {
    return formatter.format(value2);
  }
  function setThumbPercent(index, percent) {
    updateValue(index, getPercentValue(percent));
  }
  function getRoundedValue(value2) {
    return Math.round((value2 - minValue) / step) * step + minValue;
  }
  function getPercentValue(percent) {
    const val = percent * (maxValue - minValue) + minValue;
    return $9446cca9a3875146$export$7d15b64cf5a3a4c4(getRoundedValue(val), minValue, maxValue);
  }
  function incrementThumb(index, stepSize = 1) {
    let s = Math.max(stepSize, step);
    updateValue(index, $9446cca9a3875146$export$cb6e0bb50bc19463(values[index] + s, minValue, maxValue, step));
  }
  function decrementThumb(index, stepSize = 1) {
    let s = Math.max(stepSize, step);
    updateValue(index, $9446cca9a3875146$export$cb6e0bb50bc19463(values[index] - s, minValue, maxValue, step));
  }
  return {
    values,
    defaultValues: props.defaultValue !== void 0 ? defaultValue : initialValues,
    getThumbValue: (index) => values[index],
    setThumbValue: updateValue,
    setThumbPercent,
    isThumbDragging: (index) => isDraggings[index],
    setThumbDragging: updateDragging,
    focusedThumb: focusedIndex,
    setFocusedThumb: setFocusedIndex,
    getThumbPercent: (index) => getValuePercent(values[index]),
    getValuePercent,
    getThumbValueLabel: (index) => getFormattedValue(values[index]),
    getFormattedValue,
    getThumbMinValue,
    getThumbMaxValue,
    getPercentValue,
    isThumbEditable,
    setThumbEditable,
    incrementThumb,
    decrementThumb,
    step,
    pageSize,
    orientation,
    isDisabled
  };
}
function $28f99e3e86e6ec45$var$replaceIndex(array, index, value) {
  if (array[index] === value) return array;
  return [
    ...array.slice(0, index),
    value,
    ...array.slice(index + 1)
  ];
}
function $28f99e3e86e6ec45$var$convertValue(value) {
  if (value == null) return void 0;
  return Array.isArray(value) ? value : [
    value
  ];
}
function $28f99e3e86e6ec45$var$createOnChange(value, defaultValue, onChange) {
  return (newValue) => {
    if (typeof value === "number" || typeof defaultValue === "number") onChange === null || onChange === void 0 ? void 0 : onChange(newValue[0]);
    else onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
  };
}
const $aa519ee6cf463259$export$d6c8d9636a3dc49c = /* @__PURE__ */ new WeakMap();
function $aa519ee6cf463259$export$68e648cbec363a18(state, index) {
  let data = $aa519ee6cf463259$export$d6c8d9636a3dc49c.get(state);
  if (!data) throw new Error("Unknown slider state");
  return `${data.id}-${index}`;
}
function $bcca50147b47f54d$export$56b2c08e277f365(props, state, trackRef) {
  let { labelProps, fieldProps } = $d191a55c9702f145$export$8467354a121f1b9f(props);
  let isVertical = props.orientation === "vertical";
  var _labelProps_id;
  $aa519ee6cf463259$export$d6c8d9636a3dc49c.set(state, {
    id: (_labelProps_id = labelProps.id) !== null && _labelProps_id !== void 0 ? _labelProps_id : fieldProps.id,
    "aria-describedby": props["aria-describedby"],
    "aria-details": props["aria-details"]
  });
  let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
  let { addGlobalListener, removeGlobalListener } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
  const realTimeTrackDraggingIndex = useRef(null);
  const reverseX = direction === "rtl";
  const currentPosition = useRef(null);
  const { moveProps } = $e8a7022cf87cba2a$export$36da96379f79f245({
    onMoveStart() {
      currentPosition.current = null;
    },
    onMove({ deltaX, deltaY }) {
      if (!trackRef.current) return;
      let { height, width } = trackRef.current.getBoundingClientRect();
      let size = isVertical ? height : width;
      if (currentPosition.current == null && realTimeTrackDraggingIndex.current != null) currentPosition.current = state.getThumbPercent(realTimeTrackDraggingIndex.current) * size;
      let delta = isVertical ? deltaY : deltaX;
      if (isVertical || reverseX) delta = -delta;
      currentPosition.current += delta;
      if (realTimeTrackDraggingIndex.current != null && trackRef.current) {
        const percent = $9446cca9a3875146$export$7d15b64cf5a3a4c4(currentPosition.current / size, 0, 1);
        state.setThumbPercent(realTimeTrackDraggingIndex.current, percent);
      }
    },
    onMoveEnd() {
      if (realTimeTrackDraggingIndex.current != null) {
        state.setThumbDragging(realTimeTrackDraggingIndex.current, false);
        realTimeTrackDraggingIndex.current = null;
      }
    }
  });
  let currentPointer = useRef(void 0);
  let onDownTrack = (e, id, clientX, clientY) => {
    if (trackRef.current && !props.isDisabled && state.values.every((_, i) => !state.isThumbDragging(i))) {
      let { height, width, top, left } = trackRef.current.getBoundingClientRect();
      let size = isVertical ? height : width;
      const trackPosition = isVertical ? top : left;
      const clickPosition = isVertical ? clientY : clientX;
      const offset = clickPosition - trackPosition;
      let percent = offset / size;
      if (direction === "rtl" || isVertical) percent = 1 - percent;
      let value = state.getPercentValue(percent);
      let closestThumb;
      let split = state.values.findIndex((v) => value - v < 0);
      if (split === 0) closestThumb = split;
      else if (split === -1) closestThumb = state.values.length - 1;
      else {
        let lastLeft = state.values[split - 1];
        let firstRight = state.values[split];
        if (Math.abs(lastLeft - value) < Math.abs(firstRight - value)) closestThumb = split - 1;
        else closestThumb = split;
      }
      if (closestThumb >= 0 && state.isThumbEditable(closestThumb)) {
        e.preventDefault();
        realTimeTrackDraggingIndex.current = closestThumb;
        state.setFocusedThumb(closestThumb);
        currentPointer.current = id;
        state.setThumbDragging(realTimeTrackDraggingIndex.current, true);
        state.setThumbValue(closestThumb, value);
        addGlobalListener(window, "mouseup", onUpTrack, false);
        addGlobalListener(window, "touchend", onUpTrack, false);
        addGlobalListener(window, "pointerup", onUpTrack, false);
      } else realTimeTrackDraggingIndex.current = null;
    }
  };
  let onUpTrack = (e) => {
    var _e_changedTouches;
    var _e_pointerId;
    let id = (_e_pointerId = e.pointerId) !== null && _e_pointerId !== void 0 ? _e_pointerId : (_e_changedTouches = e.changedTouches) === null || _e_changedTouches === void 0 ? void 0 : _e_changedTouches[0].identifier;
    if (id === currentPointer.current) {
      if (realTimeTrackDraggingIndex.current != null) {
        state.setThumbDragging(realTimeTrackDraggingIndex.current, false);
        realTimeTrackDraggingIndex.current = null;
      }
      removeGlobalListener(window, "mouseup", onUpTrack, false);
      removeGlobalListener(window, "touchend", onUpTrack, false);
      removeGlobalListener(window, "pointerup", onUpTrack, false);
    }
  };
  if ("htmlFor" in labelProps && labelProps.htmlFor) {
    delete labelProps.htmlFor;
    labelProps.onClick = () => {
      var _document_getElementById;
      (_document_getElementById = document.getElementById($aa519ee6cf463259$export$68e648cbec363a18(state, 0))) === null || _document_getElementById === void 0 ? void 0 : _document_getElementById.focus();
      $507fabe10e71c6fb$export$8397ddfc504fdb9a("keyboard");
    };
  }
  return {
    labelProps,
    // The root element of the Slider will have role="group" to group together
    // all the thumb inputs in the Slider.  The label of the Slider will
    // be used to label the group.
    groupProps: {
      role: "group",
      ...fieldProps
    },
    trackProps: $3ef42575df84b30b$export$9d1611c77c2fe928({
      onMouseDown(e) {
        if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) return;
        onDownTrack(e, void 0, e.clientX, e.clientY);
      },
      onPointerDown(e) {
        if (e.pointerType === "mouse" && (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey)) return;
        onDownTrack(e, e.pointerId, e.clientX, e.clientY);
      },
      onTouchStart(e) {
        onDownTrack(e, e.changedTouches[0].identifier, e.changedTouches[0].clientX, e.changedTouches[0].clientY);
      },
      style: {
        position: "relative",
        touchAction: "none"
      }
    }, moveProps),
    outputProps: {
      htmlFor: state.values.map((_, index) => $aa519ee6cf463259$export$68e648cbec363a18(state, index)).join(" "),
      "aria-live": "off"
    }
  };
}
function $47b897dc8cdb026b$export$8d15029008292ae(opts, state) {
  let { index = 0, isRequired, validationState, isInvalid, trackRef, inputRef, orientation = state.orientation, name, form } = opts;
  let isDisabled = opts.isDisabled || state.isDisabled;
  let isVertical = orientation === "vertical";
  let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
  let { addGlobalListener, removeGlobalListener } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
  let data = $aa519ee6cf463259$export$d6c8d9636a3dc49c.get(state);
  var _opts_arialabelledby;
  const { labelProps, fieldProps } = $d191a55c9702f145$export$8467354a121f1b9f({
    ...opts,
    id: $aa519ee6cf463259$export$68e648cbec363a18(state, index),
    "aria-labelledby": `${data.id} ${(_opts_arialabelledby = opts["aria-labelledby"]) !== null && _opts_arialabelledby !== void 0 ? _opts_arialabelledby : ""}`.trim()
  });
  const value = state.values[index];
  const focusInput = useCallback(() => {
    if (inputRef.current) $7215afc6de606d6b$export$de79e2c695e052f3(inputRef.current);
  }, [
    inputRef
  ]);
  const isFocused = state.focusedThumb === index;
  useEffect(() => {
    if (isFocused) focusInput();
  }, [
    isFocused,
    focusInput
  ]);
  let reverseX = direction === "rtl";
  let currentPosition = useRef(null);
  let { keyboardProps } = $46d819fcbaf35654$export$8f71654801c2f7cd({
    onKeyDown(e) {
      let { getThumbMaxValue, getThumbMinValue, decrementThumb, incrementThumb, setThumbValue, setThumbDragging, pageSize } = state;
      if (!/^(PageUp|PageDown|Home|End)$/.test(e.key)) {
        e.continuePropagation();
        return;
      }
      e.preventDefault();
      setThumbDragging(index, true);
      switch (e.key) {
        case "PageUp":
          incrementThumb(index, pageSize);
          break;
        case "PageDown":
          decrementThumb(index, pageSize);
          break;
        case "Home":
          setThumbValue(index, getThumbMinValue(index));
          break;
        case "End":
          setThumbValue(index, getThumbMaxValue(index));
          break;
      }
      setThumbDragging(index, false);
    }
  });
  let { moveProps } = $e8a7022cf87cba2a$export$36da96379f79f245({
    onMoveStart() {
      currentPosition.current = null;
      state.setThumbDragging(index, true);
    },
    onMove({ deltaX, deltaY, pointerType, shiftKey }) {
      const { getThumbPercent, setThumbPercent, decrementThumb, incrementThumb, step, pageSize } = state;
      if (!trackRef.current) return;
      let { width, height } = trackRef.current.getBoundingClientRect();
      let size = isVertical ? height : width;
      if (currentPosition.current == null) currentPosition.current = getThumbPercent(index) * size;
      if (pointerType === "keyboard") {
        if (deltaX > 0 && reverseX || deltaX < 0 && !reverseX || deltaY > 0) decrementThumb(index, shiftKey ? pageSize : step);
        else incrementThumb(index, shiftKey ? pageSize : step);
      } else {
        let delta = isVertical ? deltaY : deltaX;
        if (isVertical || reverseX) delta = -delta;
        currentPosition.current += delta;
        setThumbPercent(index, $9446cca9a3875146$export$7d15b64cf5a3a4c4(currentPosition.current / size, 0, 1));
      }
    },
    onMoveEnd() {
      state.setThumbDragging(index, false);
    }
  });
  state.setThumbEditable(index, !isDisabled);
  const { focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c($3ef42575df84b30b$export$9d1611c77c2fe928(opts, {
    onFocus: () => state.setFocusedThumb(index),
    onBlur: () => state.setFocusedThumb(void 0)
  }), inputRef);
  let currentPointer = useRef(void 0);
  let onDown = (id) => {
    focusInput();
    currentPointer.current = id;
    state.setThumbDragging(index, true);
    addGlobalListener(window, "mouseup", onUp, false);
    addGlobalListener(window, "touchend", onUp, false);
    addGlobalListener(window, "pointerup", onUp, false);
  };
  let onUp = (e) => {
    var _e_changedTouches;
    var _e_pointerId;
    let id = (_e_pointerId = e.pointerId) !== null && _e_pointerId !== void 0 ? _e_pointerId : (_e_changedTouches = e.changedTouches) === null || _e_changedTouches === void 0 ? void 0 : _e_changedTouches[0].identifier;
    if (id === currentPointer.current) {
      focusInput();
      state.setThumbDragging(index, false);
      removeGlobalListener(window, "mouseup", onUp, false);
      removeGlobalListener(window, "touchend", onUp, false);
      removeGlobalListener(window, "pointerup", onUp, false);
    }
  };
  let thumbPosition = state.getThumbPercent(index);
  if (isVertical || direction === "rtl") thumbPosition = 1 - thumbPosition;
  let interactions = !isDisabled ? $3ef42575df84b30b$export$9d1611c77c2fe928(keyboardProps, moveProps, {
    onMouseDown: (e) => {
      if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) return;
      onDown();
    },
    onPointerDown: (e) => {
      if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) return;
      onDown(e.pointerId);
    },
    onTouchStart: (e) => {
      onDown(e.changedTouches[0].identifier);
    }
  }) : {};
  $99facab73266f662$export$5add1d006293d136(inputRef, state.defaultValues[index], (v) => {
    state.setThumbValue(index, v);
  });
  return {
    inputProps: $3ef42575df84b30b$export$9d1611c77c2fe928(focusableProps, fieldProps, {
      type: "range",
      tabIndex: !isDisabled ? 0 : void 0,
      min: state.getThumbMinValue(index),
      max: state.getThumbMaxValue(index),
      step: state.step,
      value,
      name,
      form,
      disabled: isDisabled,
      "aria-orientation": orientation,
      "aria-valuetext": state.getThumbValueLabel(index),
      "aria-required": isRequired || void 0,
      "aria-invalid": isInvalid || validationState === "invalid" || void 0,
      "aria-errormessage": opts["aria-errormessage"],
      "aria-describedby": [
        data["aria-describedby"],
        opts["aria-describedby"]
      ].filter(Boolean).join(" "),
      "aria-details": [
        data["aria-details"],
        opts["aria-details"]
      ].filter(Boolean).join(" "),
      onChange: (e) => {
        state.setThumbValue(index, parseFloat(e.target.value));
      }
    }),
    thumbProps: {
      ...interactions,
      style: {
        position: "absolute",
        [isVertical ? "top" : "left"]: `${thumbPosition * 100}%`,
        transform: "translate(-50%, -50%)",
        touchAction: "none"
      }
    },
    labelProps,
    isDragging: state.isThumbDragging(index),
    isDisabled,
    isFocused
  };
}
const $6f909507e6374d18$export$e99164f0030f3bff = /* @__PURE__ */ createContext(null);
const $6f909507e6374d18$export$1e7083018727fa60 = /* @__PURE__ */ createContext(null);
const $6f909507e6374d18$export$f1fce0420cc6d8ee = /* @__PURE__ */ createContext(null);
const $6f909507e6374d18$export$6189c2744041d8f8 = /* @__PURE__ */ createContext(null);
const $6f909507e6374d18$export$472062a354075cee = /* @__PURE__ */ forwardRef(function Slider(props, ref) {
  [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $6f909507e6374d18$export$e99164f0030f3bff);
  let trackRef = useRef(null);
  let numberFormatter = $a916eb452884faea$export$b7a616150fdb9f44(props.formatOptions);
  let state = $28f99e3e86e6ec45$export$e5fda3247f5d67f9({
    ...props,
    numberFormatter
  });
  let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
  let { groupProps, trackProps, labelProps, outputProps } = $bcca50147b47f54d$export$56b2c08e277f365({
    ...props,
    label
  }, state, trackRef);
  let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
    ...props,
    values: {
      orientation: state.orientation,
      isDisabled: state.isDisabled,
      state
    },
    defaultClassName: "react-aria-Slider"
  });
  let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
    global: true
  });
  delete DOMProps.id;
  return /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
    values: [
      [
        $6f909507e6374d18$export$1e7083018727fa60,
        state
      ],
      [
        $6f909507e6374d18$export$f1fce0420cc6d8ee,
        {
          ...trackProps,
          ref: trackRef
        }
      ],
      [
        $6f909507e6374d18$export$6189c2744041d8f8,
        outputProps
      ],
      [
        $01b77f81d0f07f68$export$75b6ee27786ba447,
        {
          ...labelProps,
          ref: labelRef
        }
      ]
    ]
  }, /* @__PURE__ */ React__default.createElement("div", {
    ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, groupProps),
    ref,
    slot: props.slot || void 0,
    "data-orientation": state.orientation,
    "data-disabled": state.isDisabled || void 0
  }));
});
const $6f909507e6374d18$export$a590f758a961cb5b = /* @__PURE__ */ forwardRef(function SliderOutput(props, ref) {
  [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $6f909507e6374d18$export$6189c2744041d8f8);
  let { children, style, className, ...otherProps } = props;
  let state = useContext($6f909507e6374d18$export$1e7083018727fa60);
  let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
    className,
    style,
    children,
    defaultChildren: state.getThumbValueLabel(0),
    defaultClassName: "react-aria-SliderOutput",
    values: {
      orientation: state.orientation,
      isDisabled: state.isDisabled,
      state
    }
  });
  return /* @__PURE__ */ React__default.createElement("output", {
    ...otherProps,
    ...renderProps,
    ref,
    "data-orientation": state.orientation || void 0,
    "data-disabled": state.isDisabled || void 0
  });
});
const $6f909507e6374d18$export$105594979f116971 = /* @__PURE__ */ forwardRef(function SliderTrack(props, ref) {
  [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $6f909507e6374d18$export$f1fce0420cc6d8ee);
  let state = useContext($6f909507e6374d18$export$1e7083018727fa60);
  let { onHoverStart, onHoverEnd, onHoverChange, ...otherProps } = props;
  let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({
    onHoverStart,
    onHoverEnd,
    onHoverChange
  });
  let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
    ...props,
    defaultClassName: "react-aria-SliderTrack",
    values: {
      orientation: state.orientation,
      isDisabled: state.isDisabled,
      isHovered,
      state
    }
  });
  return /* @__PURE__ */ React__default.createElement("div", {
    ...$3ef42575df84b30b$export$9d1611c77c2fe928(otherProps, hoverProps),
    ...renderProps,
    ref,
    "data-hovered": isHovered || void 0,
    "data-orientation": state.orientation || void 0,
    "data-disabled": state.isDisabled || void 0
  });
});
const $6f909507e6374d18$export$2c1b491743890dec = /* @__PURE__ */ forwardRef(function SliderThumb(props, ref) {
  let { inputRef: userInputRef = null } = props;
  let state = useContext($6f909507e6374d18$export$1e7083018727fa60);
  let { ref: trackRef } = $64fa3d84918910a7$export$fabf2dc03a41866e($6f909507e6374d18$export$f1fce0420cc6d8ee);
  let { index = 0 } = props;
  let defaultInputRef = useRef(null);
  let inputRef = userInputRef || defaultInputRef;
  let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
  let { thumbProps, inputProps, labelProps, isDragging, isFocused, isDisabled } = $47b897dc8cdb026b$export$8d15029008292ae({
    ...props,
    index,
    trackRef,
    inputRef,
    label
  }, state);
  let { focusProps, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f();
  let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456(props);
  let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
    ...props,
    defaultClassName: "react-aria-SliderThumb",
    values: {
      state,
      isHovered,
      isDragging,
      isFocused,
      isFocusVisible,
      isDisabled
    }
  });
  let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
    global: true
  });
  delete DOMProps.id;
  return /* @__PURE__ */ React__default.createElement("div", {
    ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, thumbProps, hoverProps),
    ...renderProps,
    ref,
    style: {
      ...thumbProps.style,
      ...renderProps.style
    },
    "data-hovered": isHovered || void 0,
    "data-dragging": isDragging || void 0,
    "data-focused": isFocused || void 0,
    "data-focus-visible": isFocusVisible || void 0,
    "data-disabled": isDisabled || void 0
  }, /* @__PURE__ */ React__default.createElement($5c3e21d68f1c4674$export$439d29a4e110a164, null, /* @__PURE__ */ React__default.createElement("input", {
    ref: inputRef,
    ...$3ef42575df84b30b$export$9d1611c77c2fe928(inputProps, focusProps)
  })), /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
    values: [
      [
        $01b77f81d0f07f68$export$75b6ee27786ba447,
        {
          ...labelProps,
          ref: labelRef
        }
      ]
    ]
  }, renderProps.children));
});
export {
  $6f909507e6374d18$export$472062a354075cee as $,
  $6f909507e6374d18$export$105594979f116971 as a,
  $6f909507e6374d18$export$2c1b491743890dec as b,
  $6f909507e6374d18$export$a590f758a961cb5b as c,
  $6f909507e6374d18$export$1e7083018727fa60 as d,
  $28f99e3e86e6ec45$export$e5fda3247f5d67f9 as e,
  $e8a7022cf87cba2a$export$36da96379f79f245 as f,
  $bcca50147b47f54d$export$56b2c08e277f365 as g,
  $47b897dc8cdb026b$export$8d15029008292ae as h,
  $6f909507e6374d18$export$f1fce0420cc6d8ee as i,
  $6f909507e6374d18$export$6189c2744041d8f8 as j
};
