import { jsx as je, jsxs as Wt } from "react/jsx-runtime";
import { c as he } from "./index.CfM2L_w0.js";
import * as l from "react";
import { a as Xt } from "./index.CfQlFjZU.js";
import { n as Bt } from "./index.B0wX8xO7.js";
function Re(e) {
  "@babel/helpers - typeof";
  return Re = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
    return typeof t;
  } : function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, Re(e);
}
function zt(e, t) {
  if (Re(e) != "object" || !e) return e;
  var r = e[Symbol.toPrimitive];
  if (r !== void 0) {
    var n = r.call(e, t);
    if (Re(n) != "object") return n;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (t === "string" ? String : Number)(e);
}
function Gt(e) {
  var t = zt(e, "string");
  return Re(t) == "symbol" ? t : t + "";
}
function ee(e, t, r) {
  return (t = Gt(t)) in e ? Object.defineProperty(e, t, {
    value: r,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = r, e;
}
function yt(e, t) {
  var r = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var n = Object.getOwnPropertySymbols(e);
    t && (n = n.filter(function(o) {
      return Object.getOwnPropertyDescriptor(e, o).enumerable;
    })), r.push.apply(r, n);
  }
  return r;
}
function z(e) {
  for (var t = 1; t < arguments.length; t++) {
    var r = arguments[t] != null ? arguments[t] : {};
    t % 2 ? yt(Object(r), !0).forEach(function(n) {
      ee(e, n, r[n]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : yt(Object(r)).forEach(function(n) {
      Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
    });
  }
  return e;
}
function ze(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
  return n;
}
function qt(e) {
  if (Array.isArray(e)) return ze(e);
}
function Kt(e) {
  if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
}
function kt(e, t) {
  if (e) {
    if (typeof e == "string") return ze(e, t);
    var r = {}.toString.call(e).slice(8, -1);
    return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? ze(e, t) : void 0;
  }
}
function Jt() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function ve(e) {
  return qt(e) || Kt(e) || kt(e) || Jt();
}
function Zt(e) {
  if (Array.isArray(e)) return e;
}
function Qt(e, t) {
  var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (r != null) {
    var n, o, u, c, f = [], b = !0, d = !1;
    try {
      if (u = (r = r.call(e)).next, t === 0) {
        if (Object(r) !== r) return;
        b = !1;
      } else for (; !(b = (n = u.call(r)).done) && (f.push(n.value), f.length !== t); b = !0) ;
    } catch (g) {
      d = !0, o = g;
    } finally {
      try {
        if (!b && r.return != null && (c = r.return(), Object(c) !== c)) return;
      } finally {
        if (d) throw o;
      }
    }
    return f;
  }
}
function er() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function Q(e, t) {
  return Zt(e) || Qt(e, t) || kt(e, t) || er();
}
function tr(e) {
  if (Array.isArray(e)) return e;
}
function rr(e, t) {
  var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (r != null) {
    var n, o, u, c, f = [], b = !0, d = !1;
    try {
      if (u = (r = r.call(e)).next, t !== 0) for (; !(b = (n = u.call(r)).done) && (f.push(n.value), f.length !== t); b = !0) ;
    } catch (g) {
      d = !0, o = g;
    } finally {
      try {
        if (!b && r.return != null && (c = r.return(), Object(c) !== c)) return;
      } finally {
        if (d) throw o;
      }
    }
    return f;
  }
}
function bt(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
  return n;
}
function nr(e, t) {
  if (e) {
    if (typeof e == "string") return bt(e, t);
    var r = {}.toString.call(e).slice(8, -1);
    return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? bt(e, t) : void 0;
  }
}
function ar() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function Ge(e, t) {
  return tr(e) || rr(e, t) || nr(e, t) || ar();
}
function qe(e) {
  var t = l.useRef();
  t.current = e;
  var r = l.useCallback(function() {
    for (var n, o = arguments.length, u = new Array(o), c = 0; c < o; c++)
      u[c] = arguments[c];
    return (n = t.current) === null || n === void 0 ? void 0 : n.call.apply(n, [t].concat(u));
  }, []);
  return r;
}
function or() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
var gt = process.env.NODE_ENV !== "test" && or() ? l.useLayoutEffect : l.useEffect, ur = function(t, r) {
  var n = l.useRef(!0);
  gt(function() {
    return t(n.current);
  }, r), gt(function() {
    return n.current = !1, function() {
      n.current = !0;
    };
  }, []);
}, ht = function(t, r) {
  ur(function(n) {
    if (!n)
      return t();
  }, r);
};
function St(e) {
  var t = l.useRef(!1), r = l.useState(e), n = Ge(r, 2), o = n[0], u = n[1];
  l.useEffect(function() {
    return t.current = !1, function() {
      t.current = !0;
    };
  }, []);
  function c(f, b) {
    b && t.current || u(f);
  }
  return [o, c];
}
function Be(e) {
  return e !== void 0;
}
function ir(e, t) {
  var r = t || {}, n = r.defaultValue, o = r.value, u = r.onChange, c = r.postState, f = St(function() {
    return Be(o) ? o : Be(n) ? typeof n == "function" ? n() : n : typeof e == "function" ? e() : e;
  }), b = Ge(f, 2), d = b[0], g = b[1], S = o !== void 0 ? o : d, E = c ? c(S) : S, p = qe(u), y = St([S]), s = Ge(y, 2), a = s[0], v = s[1];
  ht(function() {
    var C = a[0];
    d !== C && p(d, C);
  }, [a]), ht(function() {
    Be(o) || g(o);
  }, [o]);
  var i = qe(function(C, R) {
    g(C, R), v([S], R);
  });
  return [E, i];
}
function Ve(e) {
  "@babel/helpers - typeof";
  return Ve = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
    return typeof t;
  } : function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, Ve(e);
}
var Ke = {}, Qe = [], lr = function(t) {
  Qe.push(t);
};
function cr(e, t) {
  if (process.env.NODE_ENV !== "production" && !e && console !== void 0) {
    var r = Qe.reduce(function(n, o) {
      return o(n ?? "", "warning");
    }, t);
    r && console.error("Warning: ".concat(r));
  }
}
function sr(e, t) {
  if (process.env.NODE_ENV !== "production" && !e && console !== void 0) {
    var r = Qe.reduce(function(n, o) {
      return o(n ?? "", "note");
    }, t);
    r && console.warn("Note: ".concat(r));
  }
}
function fr() {
  Ke = {};
}
function Pt(e, t, r) {
  !t && !Ke[r] && (e(!1, r), Ke[r] = !0);
}
function _e(e, t) {
  Pt(cr, e, t);
}
function dr(e, t) {
  Pt(sr, e, t);
}
_e.preMessage = lr;
_e.resetWarned = fr;
_e.noteOnce = dr;
function vr(e, t) {
  var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, n = /* @__PURE__ */ new Set();
  function o(u, c) {
    var f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, b = n.has(u);
    if (_e(!b, "Warning: There may be circular references"), b)
      return !1;
    if (u === c)
      return !0;
    if (r && f > 1)
      return !1;
    n.add(u);
    var d = f + 1;
    if (Array.isArray(u)) {
      if (!Array.isArray(c) || u.length !== c.length)
        return !1;
      for (var g = 0; g < u.length; g++)
        if (!o(u[g], c[g], d))
          return !1;
      return !0;
    }
    if (u && c && Ve(u) === "object" && Ve(c) === "object") {
      var S = Object.keys(u);
      return S.length !== Object.keys(c).length ? !1 : S.every(function(E) {
        return o(u[E], c[E], d);
      });
    }
    return !1;
  }
  return o(e, t);
}
function $e() {
  return $e = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var r = arguments[t];
      for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
    }
    return e;
  }, $e.apply(null, arguments);
}
function mr(e, t) {
  if (e == null) return {};
  var r = {};
  for (var n in e) if ({}.hasOwnProperty.call(e, n)) {
    if (t.includes(n)) continue;
    r[n] = e[n];
  }
  return r;
}
function wt(e, t) {
  if (e == null) return {};
  var r, n, o = mr(e, t);
  if (Object.getOwnPropertySymbols) {
    var u = Object.getOwnPropertySymbols(e);
    for (n = 0; n < u.length; n++) r = u[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
  }
  return o;
}
function Je(e, t, r) {
  return (e - t) / (r - t);
}
function et(e, t, r, n) {
  var o = Je(t, r, n), u = {};
  switch (e) {
    case "rtl":
      u.right = "".concat(o * 100, "%"), u.transform = "translateX(50%)";
      break;
    case "btt":
      u.bottom = "".concat(o * 100, "%"), u.transform = "translateY(50%)";
      break;
    case "ttb":
      u.top = "".concat(o * 100, "%"), u.transform = "translateY(-50%)";
      break;
    default:
      u.left = "".concat(o * 100, "%"), u.transform = "translateX(-50%)";
      break;
  }
  return u;
}
function pe(e, t) {
  return Array.isArray(e) ? e[t] : e;
}
var B = {
  /**
   * PAGE_UP
   */
  PAGE_UP: 33,
  // also NUM_NORTH_EAST
  /**
   * PAGE_DOWN
   */
  PAGE_DOWN: 34,
  // also NUM_SOUTH_EAST
  /**
   * END
   */
  END: 35,
  // also NUM_SOUTH_WEST
  /**
   * HOME
   */
  HOME: 36,
  // also NUM_NORTH_WEST
  /**
   * LEFT
   */
  LEFT: 37,
  // also NUM_WEST
  /**
   * UP
   */
  UP: 38,
  // also NUM_NORTH
  /**
   * RIGHT
   */
  RIGHT: 39,
  // also NUM_EAST
  /**
   * DOWN
   */
  DOWN: 40
}, Se = /* @__PURE__ */ l.createContext({
  min: 0,
  max: 0,
  direction: "ltr",
  step: 1,
  includedStart: 0,
  includedEnd: 0,
  tabIndex: 0,
  keyboard: !0,
  styles: {},
  classNames: {}
}), yr = ["prefixCls", "value", "valueIndex", "onStartMove", "style", "render", "dragging", "onOffsetChange", "onChangeComplete", "onFocus", "onMouseEnter"], Ze = /* @__PURE__ */ l.forwardRef(function(e, t) {
  var r = e.prefixCls, n = e.value, o = e.valueIndex, u = e.onStartMove, c = e.style, f = e.render, b = e.dragging, d = e.onOffsetChange, g = e.onChangeComplete, S = e.onFocus, E = e.onMouseEnter, p = wt(e, yr), y = l.useContext(Se), s = y.min, a = y.max, v = y.direction, i = y.disabled, C = y.keyboard, R = y.range, h = y.tabIndex, O = y.ariaLabelForHandle, w = y.ariaLabelledByForHandle, W = y.ariaValueTextFormatterForHandle, F = y.styles, _ = y.classNames, H = "".concat(r, "-handle"), X = function(I) {
    i || u(I, o);
  }, J = function(I) {
    S?.(I, o);
  }, te = function(I) {
    E(I, o);
  }, N = function(I) {
    if (!i && C) {
      var U = null;
      switch (I.which || I.keyCode) {
        case B.LEFT:
          U = v === "ltr" || v === "btt" ? -1 : 1;
          break;
        case B.RIGHT:
          U = v === "ltr" || v === "btt" ? 1 : -1;
          break;
        // Up is plus
        case B.UP:
          U = v !== "ttb" ? 1 : -1;
          break;
        // Down is minus
        case B.DOWN:
          U = v !== "ttb" ? -1 : 1;
          break;
        case B.HOME:
          U = "min";
          break;
        case B.END:
          U = "max";
          break;
        case B.PAGE_UP:
          U = 2;
          break;
        case B.PAGE_DOWN:
          U = -2;
          break;
      }
      U !== null && (I.preventDefault(), d(U, o));
    }
  }, A = function(I) {
    switch (I.which || I.keyCode) {
      case B.LEFT:
      case B.RIGHT:
      case B.UP:
      case B.DOWN:
      case B.HOME:
      case B.END:
      case B.PAGE_UP:
      case B.PAGE_DOWN:
        g?.();
        break;
    }
  }, x = et(v, n, s, a), L = {};
  if (o !== null) {
    var V;
    L = {
      tabIndex: i ? null : pe(h, o),
      role: "slider",
      "aria-valuemin": s,
      "aria-valuemax": a,
      "aria-valuenow": n,
      "aria-disabled": i,
      "aria-label": pe(O, o),
      "aria-labelledby": pe(w, o),
      "aria-valuetext": (V = pe(W, o)) === null || V === void 0 ? void 0 : V(n),
      "aria-orientation": v === "ltr" || v === "rtl" ? "horizontal" : "vertical",
      onMouseDown: X,
      onTouchStart: X,
      onFocus: J,
      onMouseEnter: te,
      onKeyDown: N,
      onKeyUp: A
    };
  }
  var q = /* @__PURE__ */ l.createElement("div", $e({
    ref: t,
    className: he(H, ee(ee({}, "".concat(H, "-").concat(o + 1), o !== null && R), "".concat(H, "-dragging"), b), _.handle),
    style: z(z(z({}, x), c), F.handle)
  }, L, p));
  return f && (q = f(q, {
    index: o,
    prefixCls: r,
    value: n,
    dragging: b
  })), q;
});
process.env.NODE_ENV !== "production" && (Ze.displayName = "Handle");
var br = ["prefixCls", "style", "onStartMove", "onOffsetChange", "values", "handleRender", "activeHandleRender", "draggingIndex", "onFocus"], Ot = /* @__PURE__ */ l.forwardRef(function(e, t) {
  var r = e.prefixCls, n = e.style, o = e.onStartMove, u = e.onOffsetChange, c = e.values, f = e.handleRender, b = e.activeHandleRender, d = e.draggingIndex, g = e.onFocus, S = wt(e, br), E = l.useRef({});
  l.useImperativeHandle(t, function() {
    return {
      focus: function(h) {
        var O;
        (O = E.current[h]) === null || O === void 0 || O.focus();
      }
    };
  });
  var p = l.useState(-1), y = Q(p, 2), s = y[0], a = y[1], v = function(h, O) {
    a(O), g?.(h);
  }, i = function(h, O) {
    a(O);
  }, C = z({
    prefixCls: r,
    onStartMove: o,
    onOffsetChange: u,
    render: f,
    onFocus: v,
    onMouseEnter: i
  }, S);
  return /* @__PURE__ */ l.createElement(l.Fragment, null, c.map(function(R, h) {
    return /* @__PURE__ */ l.createElement(Ze, $e({
      ref: function(w) {
        w ? E.current[h] = w : delete E.current[h];
      },
      dragging: d === h,
      style: pe(n, h),
      key: h,
      value: R,
      valueIndex: h
    }, C));
  }), b && /* @__PURE__ */ l.createElement(Ze, $e({
    key: "a11y"
  }, C, {
    value: c[s],
    valueIndex: null,
    dragging: d !== -1,
    render: b,
    style: {
      pointerEvents: "none"
    },
    tabIndex: null,
    "aria-hidden": !0
  })));
});
process.env.NODE_ENV !== "production" && (Ot.displayName = "Handles");
var gr = function(t) {
  var r = t.prefixCls, n = t.style, o = t.children, u = t.value, c = t.onClick, f = l.useContext(Se), b = f.min, d = f.max, g = f.direction, S = f.includedStart, E = f.includedEnd, p = f.included, y = "".concat(r, "-text"), s = et(g, u, b, d);
  return /* @__PURE__ */ l.createElement("span", {
    className: he(y, ee({}, "".concat(y, "-active"), p && S <= u && u <= E)),
    style: z(z({}, s), n),
    onMouseDown: function(v) {
      v.stopPropagation();
    },
    onClick: function() {
      c(u);
    }
  }, o);
}, hr = function(t) {
  var r = t.prefixCls, n = t.marks, o = t.onClick, u = "".concat(r, "-mark");
  return n.length ? /* @__PURE__ */ l.createElement("div", {
    className: u
  }, n.map(function(c) {
    var f = c.value, b = c.style, d = c.label;
    return /* @__PURE__ */ l.createElement(gr, {
      key: f,
      prefixCls: u,
      style: b,
      value: f,
      onClick: o
    }, d);
  })) : null;
}, Sr = function(t) {
  var r = t.prefixCls, n = t.value, o = t.style, u = t.activeStyle, c = l.useContext(Se), f = c.min, b = c.max, d = c.direction, g = c.included, S = c.includedStart, E = c.includedEnd, p = "".concat(r, "-dot"), y = g && S <= n && n <= E, s = z(z({}, et(d, n, f, b)), typeof o == "function" ? o(n) : o);
  return y && (s = z(z({}, s), typeof u == "function" ? u(n) : u)), /* @__PURE__ */ l.createElement("span", {
    className: he(p, ee({}, "".concat(p, "-active"), y)),
    style: s
  });
}, Er = function(t) {
  var r = t.prefixCls, n = t.marks, o = t.dots, u = t.style, c = t.activeStyle, f = l.useContext(Se), b = f.min, d = f.max, g = f.step, S = l.useMemo(function() {
    var E = /* @__PURE__ */ new Set();
    if (n.forEach(function(y) {
      E.add(y.value);
    }), o && g !== null)
      for (var p = b; p <= d; )
        E.add(p), p += g;
    return Array.from(E);
  }, [b, d, g, o, n]);
  return /* @__PURE__ */ l.createElement("div", {
    className: "".concat(r, "-step")
  }, S.map(function(E) {
    return /* @__PURE__ */ l.createElement(Sr, {
      prefixCls: r,
      key: E,
      value: E,
      style: u,
      activeStyle: c
    });
  }));
}, Et = function(t) {
  var r = t.prefixCls, n = t.style, o = t.start, u = t.end, c = t.index, f = t.onStartMove, b = t.replaceCls, d = l.useContext(Se), g = d.direction, S = d.min, E = d.max, p = d.disabled, y = d.range, s = d.classNames, a = "".concat(r, "-track"), v = Je(o, S, E), i = Je(u, S, E), C = function(w) {
    !p && f && f(w, -1);
  }, R = {};
  switch (g) {
    case "rtl":
      R.right = "".concat(v * 100, "%"), R.width = "".concat(i * 100 - v * 100, "%");
      break;
    case "btt":
      R.bottom = "".concat(v * 100, "%"), R.height = "".concat(i * 100 - v * 100, "%");
      break;
    case "ttb":
      R.top = "".concat(v * 100, "%"), R.height = "".concat(i * 100 - v * 100, "%");
      break;
    default:
      R.left = "".concat(v * 100, "%"), R.width = "".concat(i * 100 - v * 100, "%");
  }
  var h = b || he(a, ee(ee({}, "".concat(a, "-").concat(c + 1), c !== null && y), "".concat(r, "-track-draggable"), f), s.track);
  return /* @__PURE__ */ l.createElement("div", {
    className: h,
    style: z(z({}, R), n),
    onMouseDown: C,
    onTouchStart: C
  });
}, Cr = function(t) {
  var r = t.prefixCls, n = t.style, o = t.values, u = t.startPoint, c = t.onStartMove, f = l.useContext(Se), b = f.included, d = f.range, g = f.min, S = f.styles, E = f.classNames, p = l.useMemo(function() {
    if (!d) {
      if (o.length === 0)
        return [];
      var s = u ?? g, a = o[0];
      return [{
        start: Math.min(s, a),
        end: Math.max(s, a)
      }];
    }
    for (var v = [], i = 0; i < o.length - 1; i += 1)
      v.push({
        start: o[i],
        end: o[i + 1]
      });
    return v;
  }, [o, d, u, g]);
  if (!b)
    return null;
  var y = E.tracks || S.tracks ? /* @__PURE__ */ l.createElement(Et, {
    index: null,
    prefixCls: r,
    start: p[0].start,
    end: p[p.length - 1].end,
    replaceCls: he(E.tracks, "".concat(r, "-tracks")),
    style: S.tracks
  }) : null;
  return /* @__PURE__ */ l.createElement(l.Fragment, null, y, p.map(function(s, a) {
    var v = s.start, i = s.end;
    return /* @__PURE__ */ l.createElement(Et, {
      index: a,
      prefixCls: r,
      style: z(z({}, pe(n, a)), S.track),
      start: v,
      end: i,
      key: a,
      onStartMove: c
    });
  }));
}, Ye = { exports: {} }, k = {};
/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var Ct;
function Mr() {
  if (Ct) return k;
  Ct = 1;
  var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), c = Symbol.for("react.context"), f = Symbol.for("react.server_context"), b = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), y;
  y = Symbol.for("react.module.reference");
  function s(a) {
    if (typeof a == "object" && a !== null) {
      var v = a.$$typeof;
      switch (v) {
        case e:
          switch (a = a.type, a) {
            case r:
            case o:
            case n:
            case d:
            case g:
              return a;
            default:
              switch (a = a && a.$$typeof, a) {
                case f:
                case c:
                case b:
                case E:
                case S:
                case u:
                  return a;
                default:
                  return v;
              }
          }
        case t:
          return v;
      }
    }
  }
  return k.ContextConsumer = c, k.ContextProvider = u, k.Element = e, k.ForwardRef = b, k.Fragment = r, k.Lazy = E, k.Memo = S, k.Portal = t, k.Profiler = o, k.StrictMode = n, k.Suspense = d, k.SuspenseList = g, k.isAsyncMode = function() {
    return !1;
  }, k.isConcurrentMode = function() {
    return !1;
  }, k.isContextConsumer = function(a) {
    return s(a) === c;
  }, k.isContextProvider = function(a) {
    return s(a) === u;
  }, k.isElement = function(a) {
    return typeof a == "object" && a !== null && a.$$typeof === e;
  }, k.isForwardRef = function(a) {
    return s(a) === b;
  }, k.isFragment = function(a) {
    return s(a) === r;
  }, k.isLazy = function(a) {
    return s(a) === E;
  }, k.isMemo = function(a) {
    return s(a) === S;
  }, k.isPortal = function(a) {
    return s(a) === t;
  }, k.isProfiler = function(a) {
    return s(a) === o;
  }, k.isStrictMode = function(a) {
    return s(a) === n;
  }, k.isSuspense = function(a) {
    return s(a) === d;
  }, k.isSuspenseList = function(a) {
    return s(a) === g;
  }, k.isValidElementType = function(a) {
    return typeof a == "string" || typeof a == "function" || a === r || a === o || a === n || a === d || a === g || a === p || typeof a == "object" && a !== null && (a.$$typeof === E || a.$$typeof === S || a.$$typeof === u || a.$$typeof === c || a.$$typeof === b || a.$$typeof === y || a.getModuleId !== void 0);
  }, k.typeOf = s, k;
}
var P = {};
/**
 * @license React
 * react-is.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var Mt;
function pr() {
  return Mt || (Mt = 1, process.env.NODE_ENV !== "production" && function() {
    var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), c = Symbol.for("react.context"), f = Symbol.for("react.server_context"), b = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), y = !1, s = !1, a = !1, v = !1, i = !1, C;
    C = Symbol.for("react.module.reference");
    function R(m) {
      return !!(typeof m == "string" || typeof m == "function" || m === r || m === o || i || m === n || m === d || m === g || v || m === p || y || s || a || typeof m == "object" && m !== null && (m.$$typeof === E || m.$$typeof === S || m.$$typeof === u || m.$$typeof === c || m.$$typeof === b || // This needs to include all possible module reference object
      // types supported by any Flight configuration anywhere since
      // we don't know which Flight build this will end up being used
      // with.
      m.$$typeof === C || m.getModuleId !== void 0));
    }
    function h(m) {
      if (typeof m == "object" && m !== null) {
        var le = m.$$typeof;
        switch (le) {
          case e:
            var G = m.type;
            switch (G) {
              case r:
              case o:
              case n:
              case d:
              case g:
                return G;
              default:
                var ce = G && G.$$typeof;
                switch (ce) {
                  case f:
                  case c:
                  case b:
                  case E:
                  case S:
                  case u:
                    return ce;
                  default:
                    return le;
                }
            }
          case t:
            return le;
        }
      }
    }
    var O = c, w = u, W = e, F = b, _ = r, H = E, X = S, J = t, te = o, N = n, A = d, x = g, L = !1, V = !1;
    function q(m) {
      return L || (L = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
    }
    function D(m) {
      return V || (V = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
    }
    function I(m) {
      return h(m) === c;
    }
    function U(m) {
      return h(m) === u;
    }
    function Z(m) {
      return typeof m == "object" && m !== null && m.$$typeof === e;
    }
    function re(m) {
      return h(m) === b;
    }
    function ne(m) {
      return h(m) === r;
    }
    function ae(m) {
      return h(m) === E;
    }
    function fe(m) {
      return h(m) === S;
    }
    function ke(m) {
      return h(m) === t;
    }
    function Pe(m) {
      return h(m) === o;
    }
    function Ee(m) {
      return h(m) === n;
    }
    function me(m) {
      return h(m) === d;
    }
    function ye(m) {
      return h(m) === g;
    }
    P.ContextConsumer = O, P.ContextProvider = w, P.Element = W, P.ForwardRef = F, P.Fragment = _, P.Lazy = H, P.Memo = X, P.Portal = J, P.Profiler = te, P.StrictMode = N, P.Suspense = A, P.SuspenseList = x, P.isAsyncMode = q, P.isConcurrentMode = D, P.isContextConsumer = I, P.isContextProvider = U, P.isElement = Z, P.isForwardRef = re, P.isFragment = ne, P.isLazy = ae, P.isMemo = fe, P.isPortal = ke, P.isProfiler = Pe, P.isStrictMode = Ee, P.isSuspense = me, P.isSuspenseList = ye, P.isValidElementType = R, P.typeOf = h;
  }()), P;
}
var pt;
function Rr() {
  return pt || (pt = 1, process.env.NODE_ENV === "production" ? Ye.exports = Mr() : Ye.exports = pr()), Ye.exports;
}
Rr();
function Rt(e) {
  var t = "touches" in e ? e.touches[0] : e;
  return {
    pageX: t.pageX,
    pageY: t.pageY
  };
}
function _r(e, t, r, n, o, u, c, f, b) {
  var d = l.useState(null), g = Q(d, 2), S = g[0], E = g[1], p = l.useState(-1), y = Q(p, 2), s = y[0], a = y[1], v = l.useState(r), i = Q(v, 2), C = i[0], R = i[1], h = l.useState(r), O = Q(h, 2), w = O[0], W = O[1], F = l.useRef(null), _ = l.useRef(null);
  l.useLayoutEffect(function() {
    s === -1 && R(r);
  }, [r, s]), l.useEffect(function() {
    return function() {
      document.removeEventListener("mousemove", F.current), document.removeEventListener("mouseup", _.current), document.removeEventListener("touchmove", F.current), document.removeEventListener("touchend", _.current);
    };
  }, []);
  var H = function(A, x) {
    C.some(function(L, V) {
      return L !== A[V];
    }) && (x !== void 0 && E(x), R(A), c(A));
  }, X = qe(function(N, A) {
    if (N === -1) {
      var x = w[0], L = w[w.length - 1], V = n - x, q = o - L, D = A * (o - n);
      D = Math.max(D, V), D = Math.min(D, q);
      var I = u(x + D);
      D = I - x;
      var U = w.map(function(ae) {
        return ae + D;
      });
      H(U);
    } else {
      var Z = (o - n) * A, re = ve(C);
      re[N] = w[N];
      var ne = b(re, Z, N, "dist");
      H(ne.values, ne.value);
    }
  }), J = function(A, x, L) {
    A.stopPropagation();
    var V = L || r, q = V[x];
    a(x), E(q), W(V);
    var D = Rt(A), I = D.pageX, U = D.pageY, Z = function(ae) {
      ae.preventDefault();
      var fe = Rt(ae), ke = fe.pageX, Pe = fe.pageY, Ee = ke - I, me = Pe - U, ye = e.current.getBoundingClientRect(), m = ye.width, le = ye.height, G;
      switch (t) {
        case "btt":
          G = -me / le;
          break;
        case "ttb":
          G = me / le;
          break;
        case "rtl":
          G = -Ee / m;
          break;
        default:
          G = Ee / m;
      }
      X(x, G);
    }, re = function ne(ae) {
      ae.preventDefault(), document.removeEventListener("mouseup", ne), document.removeEventListener("mousemove", Z), document.removeEventListener("touchend", ne), document.removeEventListener("touchmove", Z), F.current = null, _.current = null, a(-1), f();
    };
    document.addEventListener("mouseup", re), document.addEventListener("mousemove", Z), document.addEventListener("touchend", re), document.addEventListener("touchmove", Z), F.current = Z, _.current = re;
  }, te = l.useMemo(function() {
    var N = ve(r).sort(function(x, L) {
      return x - L;
    }), A = ve(C).sort(function(x, L) {
      return x - L;
    });
    return N.every(function(x, L) {
      return x === A[L];
    }) ? C : r;
  }, [r, C]);
  return [s, S, te, J];
}
function kr(e, t, r, n, o, u) {
  var c = l.useCallback(function(p) {
    return Math.max(e, Math.min(t, p));
  }, [e, t]), f = l.useCallback(function(p) {
    if (r !== null) {
      var y = e + Math.round((c(p) - e) / r) * r, s = function(C) {
        return (String(C).split(".")[1] || "").length;
      }, a = Math.max(s(r), s(t), s(e)), v = Number(y.toFixed(a));
      return e <= v && v <= t ? v : null;
    }
    return null;
  }, [r, e, t, c]), b = l.useCallback(function(p) {
    var y = c(p), s = n.map(function(i) {
      return i.value;
    });
    r !== null && s.push(f(p)), s.push(e, t);
    var a = s[0], v = t - e;
    return s.forEach(function(i) {
      var C = Math.abs(y - i);
      C <= v && (a = i, v = C);
    }), a;
  }, [e, t, n, r, c, f]), d = function p(y, s, a) {
    var v = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "unit";
    if (typeof s == "number") {
      var i, C = y[a], R = C + s, h = [];
      n.forEach(function(_) {
        h.push(_.value);
      }), h.push(e, t), h.push(f(C));
      var O = s > 0 ? 1 : -1;
      v === "unit" ? h.push(f(C + O * r)) : h.push(f(R)), h = h.filter(function(_) {
        return _ !== null;
      }).filter(function(_) {
        return s < 0 ? _ <= C : _ >= C;
      }), v === "unit" && (h = h.filter(function(_) {
        return _ !== C;
      }));
      var w = v === "unit" ? C : R;
      i = h[0];
      var W = Math.abs(i - w);
      if (h.forEach(function(_) {
        var H = Math.abs(_ - w);
        H < W && (i = _, W = H);
      }), i === void 0)
        return s < 0 ? e : t;
      if (v === "dist")
        return i;
      if (Math.abs(s) > 1) {
        var F = ve(y);
        return F[a] = i, p(F, s - O, a, v);
      }
      return i;
    } else {
      if (s === "min")
        return e;
      if (s === "max")
        return t;
    }
  }, g = function(y, s, a) {
    var v = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "unit", i = y[a], C = d(y, s, a, v);
    return {
      value: C,
      changed: C !== i
    };
  }, S = function(y) {
    return u === null && y === 0 || typeof u == "number" && y < u;
  }, E = function(y, s, a) {
    var v = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "unit", i = y.map(b), C = i[a], R = d(i, s, a, v);
    if (i[a] = R, o === !1) {
      var h = u || 0;
      a > 0 && i[a - 1] !== C && (i[a] = Math.max(i[a], i[a - 1] + h)), a < i.length - 1 && i[a + 1] !== C && (i[a] = Math.min(i[a], i[a + 1] - h));
    } else if (typeof u == "number" || u === null) {
      for (var O = a + 1; O < i.length; O += 1)
        for (var w = !0; S(i[O] - i[O - 1]) && w; ) {
          var W = g(i, 1, O);
          i[O] = W.value, w = W.changed;
        }
      for (var F = a; F > 0; F -= 1)
        for (var _ = !0; S(i[F] - i[F - 1]) && _; ) {
          var H = g(i, -1, F - 1);
          i[F - 1] = H.value, _ = H.changed;
        }
      for (var X = i.length - 1; X > 0; X -= 1)
        for (var J = !0; S(i[X] - i[X - 1]) && J; ) {
          var te = g(i, -1, X - 1);
          i[X - 1] = te.value, J = te.changed;
        }
      for (var N = 0; N < i.length - 1; N += 1)
        for (var A = !0; S(i[N + 1] - i[N]) && A; ) {
          var x = g(i, 1, N + 1);
          i[N + 1] = x.value, A = x.changed;
        }
    }
    return {
      value: i[a],
      values: i
    };
  };
  return [b, E];
}
var xt = /* @__PURE__ */ l.forwardRef(function(e, t) {
  var r = e.prefixCls, n = r === void 0 ? "rc-slider" : r, o = e.className, u = e.style, c = e.classNames, f = e.styles, b = e.disabled, d = b === void 0 ? !1 : b, g = e.keyboard, S = g === void 0 ? !0 : g, E = e.autoFocus, p = e.onFocus, y = e.onBlur, s = e.min, a = s === void 0 ? 0 : s, v = e.max, i = v === void 0 ? 100 : v, C = e.step, R = C === void 0 ? 1 : C, h = e.value, O = e.defaultValue, w = e.range, W = e.count, F = e.onChange, _ = e.onBeforeChange, H = e.onAfterChange, X = e.onChangeComplete, J = e.allowCross, te = J === void 0 ? !0 : J, N = e.pushable, A = N === void 0 ? !1 : N, x = e.draggableTrack, L = e.reverse, V = e.vertical, q = e.included, D = q === void 0 ? !0 : q, I = e.startPoint, U = e.trackStyle, Z = e.handleStyle, re = e.railStyle, ne = e.dotStyle, ae = e.activeDotStyle, fe = e.marks, ke = e.dots, Pe = e.handleRender, Ee = e.activeHandleRender, me = e.tabIndex, ye = me === void 0 ? 0 : me, m = e.ariaLabelForHandle, le = e.ariaLabelledByForHandle, G = e.ariaValueTextFormatterForHandle, ce = l.useRef(null), Ae = l.useRef(null), Ne = l.useMemo(function() {
    return V ? L ? "ttb" : "btt" : L ? "rtl" : "ltr";
  }, [L, V]), K = l.useMemo(function() {
    return isFinite(a) ? a : 0;
  }, [a]), Ce = l.useMemo(function() {
    return isFinite(i) ? i : 100;
  }, [i]), be = l.useMemo(function() {
    return R !== null && R <= 0 ? 1 : R;
  }, [R]), Tt = l.useMemo(function() {
    return typeof A == "boolean" ? A ? be : !1 : A >= 0 ? A : !1;
  }, [A, be]), Fe = l.useMemo(function() {
    return Object.keys(fe || {}).map(function($) {
      var M = fe[$], T = {
        value: Number($)
      };
      return M && Re(M) === "object" && !/* @__PURE__ */ l.isValidElement(M) && ("label" in M || "style" in M) ? (T.style = M.style, T.label = M.label) : T.label = M, T;
    }).filter(function($) {
      var M = $.label;
      return M || typeof M == "number";
    }).sort(function($, M) {
      return $.value - M.value;
    });
  }, [fe]), $t = kr(K, Ce, be, Fe, te, Tt), tt = Q($t, 2), Le = tt[0], rt = tt[1], At = ir(O, {
    value: h
  }), nt = Q(At, 2), de = nt[0], Nt = nt[1], oe = l.useMemo(function() {
    var $ = de == null ? [] : Array.isArray(de) ? de : [de], M = Q($, 1), T = M[0], j = T === void 0 ? K : T, Y = de === null ? [] : [j];
    if (w) {
      if (Y = ve($), W || de === void 0) {
        var ue = W >= 0 ? W + 1 : 2;
        for (Y = Y.slice(0, ue); Y.length < ue; ) {
          var ie;
          Y.push((ie = Y[Y.length - 1]) !== null && ie !== void 0 ? ie : K);
        }
      }
      Y.sort(function(se, ge) {
        return se - ge;
      });
    }
    return Y.forEach(function(se, ge) {
      Y[ge] = Le(se);
    }), Y;
  }, [de, w, K, W, Le]), De = l.useRef(oe);
  De.current = oe;
  var we = function(M) {
    return w ? M : M[0];
  }, Ue = function(M) {
    var T = ve(M).sort(function(j, Y) {
      return j - Y;
    });
    F && !vr(T, De.current, !0) && F(we(T)), Nt(T);
  }, at = function() {
    var M = we(De.current);
    H?.(M), _e(!H, "[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."), X?.(M);
  }, Ft = _r(Ae, Ne, oe, K, Ce, Le, Ue, at, rt), Ie = Q(Ft, 4), ot = Ie[0], Lt = Ie[1], We = Ie[2], ut = Ie[3], it = function(M, T) {
    if (!d) {
      var j = 0, Y = Ce - K;
      oe.forEach(function(ge, He) {
        var Oe = Math.abs(M - ge);
        Oe <= Y && (Y = Oe, j = He);
      });
      var ue = ve(oe);
      if (ue[j] = M, w && !oe.length && W === void 0 && ue.push(M), _?.(we(ue)), Ue(ue), T) {
        var ie, se;
        (ie = document.activeElement) === null || ie === void 0 || (se = ie.blur) === null || se === void 0 || se.call(ie), ce.current.focus(j), ut(T, j, ue);
      }
    }
  }, Dt = function(M) {
    M.preventDefault();
    var T = Ae.current.getBoundingClientRect(), j = T.width, Y = T.height, ue = T.left, ie = T.top, se = T.bottom, ge = T.right, He = M.clientX, Oe = M.clientY, xe;
    switch (Ne) {
      case "btt":
        xe = (se - Oe) / Y;
        break;
      case "ttb":
        xe = (Oe - ie) / Y;
        break;
      case "rtl":
        xe = (ge - He) / j;
        break;
      default:
        xe = (He - ue) / j;
    }
    var Ut = K + xe * (Ce - K);
    it(Le(Ut), M);
  }, It = l.useState(null), lt = Q(It, 2), Xe = lt[0], ct = lt[1], Ht = function(M, T) {
    if (!d) {
      var j = rt(oe, M, T);
      _?.(we(oe)), Ue(j.values), ct(j.value);
    }
  };
  l.useEffect(function() {
    if (Xe !== null) {
      var $ = oe.indexOf(Xe);
      $ >= 0 && ce.current.focus($);
    }
    ct(null);
  }, [Xe]);
  var jt = l.useMemo(function() {
    return x && be === null ? (process.env.NODE_ENV !== "production" && _e(!1, "`draggableTrack` is not supported when `step` is `null`."), !1) : x;
  }, [x, be]), st = function(M, T) {
    ut(M, T), _?.(we(De.current));
  }, ft = ot !== -1;
  l.useEffect(function() {
    if (!ft) {
      var $ = oe.lastIndexOf(Lt);
      ce.current.focus($);
    }
  }, [ft]);
  var Me = l.useMemo(function() {
    return ve(We).sort(function($, M) {
      return $ - M;
    });
  }, [We]), Yt = l.useMemo(function() {
    return w ? [Me[0], Me[Me.length - 1]] : [K, Me[0]];
  }, [Me, w, K]), dt = Q(Yt, 2), vt = dt[0], mt = dt[1];
  l.useImperativeHandle(t, function() {
    return {
      focus: function() {
        ce.current.focus(0);
      },
      blur: function() {
        var M, T = document, j = T.activeElement;
        (M = Ae.current) !== null && M !== void 0 && M.contains(j) && j?.blur();
      }
    };
  }), l.useEffect(function() {
    E && ce.current.focus(0);
  }, []);
  var Vt = l.useMemo(function() {
    return {
      min: K,
      max: Ce,
      direction: Ne,
      disabled: d,
      keyboard: S,
      step: be,
      included: D,
      includedStart: vt,
      includedEnd: mt,
      range: w,
      tabIndex: ye,
      ariaLabelForHandle: m,
      ariaLabelledByForHandle: le,
      ariaValueTextFormatterForHandle: G,
      styles: f || {},
      classNames: c || {}
    };
  }, [K, Ce, Ne, d, S, be, D, vt, mt, w, ye, m, le, G, f, c]);
  return /* @__PURE__ */ l.createElement(Se.Provider, {
    value: Vt
  }, /* @__PURE__ */ l.createElement("div", {
    ref: Ae,
    className: he(n, o, ee(ee(ee(ee({}, "".concat(n, "-disabled"), d), "".concat(n, "-vertical"), V), "".concat(n, "-horizontal"), !V), "".concat(n, "-with-marks"), Fe.length)),
    style: u,
    onMouseDown: Dt
  }, /* @__PURE__ */ l.createElement("div", {
    className: he("".concat(n, "-rail"), c?.rail),
    style: z(z({}, re), f?.rail)
  }), /* @__PURE__ */ l.createElement(Cr, {
    prefixCls: n,
    style: U,
    values: Me,
    startPoint: I,
    onStartMove: jt ? st : void 0
  }), /* @__PURE__ */ l.createElement(Er, {
    prefixCls: n,
    marks: Fe,
    dots: ke,
    style: ne,
    activeStyle: ae
  }), /* @__PURE__ */ l.createElement(Ot, {
    ref: ce,
    prefixCls: n,
    style: Z,
    values: We,
    draggingIndex: ot,
    onStartMove: st,
    onOffsetChange: Ht,
    onFocus: p,
    onBlur: y,
    handleRender: Pe,
    activeHandleRender: Ee,
    onChangeComplete: at
  }), /* @__PURE__ */ l.createElement(hr, {
    prefixCls: n,
    marks: Fe,
    onClick: it
  })));
});
process.env.NODE_ENV !== "production" && (xt.displayName = "Slider");
const Pr = "creator_slider_8qohz", wr = "creator_indicator_Po3eJ", Or = "creator_track_xSYxG", xr = "creator_knob_PunLw", Tr = "creator_label_YMN2m", Te = { slider: Pr, indicator: wr, track: Or, knob: xr, label: Tr }, _t = xt;
function $r({
  onChangeComplete: e,
  onChange: t,
  value: r,
  min: n = 0,
  max: o = 100,
  defaultValue: u = 0,
  step: c = 1,
  label: f
}) {
  return {
    className: Te.slider,
    classNames: {
      // These CSS class names do not match the corresponding design system vocabulary terms.
      // This pairing ensures the styling matches the design system.
      track: Te.indicator,
      rail: Te.track,
      handle: Te.knob
    },
    onChangeComplete: e,
    onChange: t,
    value: r,
    min: n,
    max: o,
    defaultValue: u,
    step: c,
    label: f
  };
}
const Ar = (e) => /* @__PURE__ */ je(
  Bt,
  {
    value: e.label,
    then: /* @__PURE__ */ Wt("div", { children: [
      /* @__PURE__ */ je("label", { className: Te.label, children: e.label }),
      /* @__PURE__ */ je(_t, { ...e })
    ] }),
    otherwise: /* @__PURE__ */ je(_t, { ...e })
  }
), Ir = Xt(Ar, $r);
export {
  Ir as S
};
