"use client";
import { identity as d } from "./continuous.js";
import { initInterpolator as m } from "./init.js";
import { linearish as w } from "./linear.js";
import { loggish as k } from "./log.js";
import { symlogish as b } from "./symlog.js";
import { powish as M } from "./pow.js";
import N from "../../d3-interpolate/src/value.js";
import R from "../../d3-interpolate/src/round.js";
function p() {
  var n = 0, e = 1, o, a, i, l, u = d, s = !1, f;
  function r(t) {
    return t == null || isNaN(t = +t) ? f : u(i === 0 ? 0.5 : (t = (l(t) - o) * i, s ? Math.max(0, Math.min(1, t)) : t));
  }
  r.domain = function(t) {
    return arguments.length ? ([n, e] = t, o = l(n = +n), a = l(e = +e), i = o === a ? 0 : 1 / (a - o), r) : [n, e];
  }, r.clamp = function(t) {
    return arguments.length ? (s = !!t, r) : s;
  }, r.interpolator = function(t) {
    return arguments.length ? (u = t, r) : u;
  };
  function g(t) {
    return function(v) {
      var y, h;
      return arguments.length ? ([y, h] = v, u = t(y, h), r) : [u(0), u(1)];
    };
  }
  return r.range = g(N), r.rangeRound = g(R), r.unknown = function(t) {
    return arguments.length ? (f = t, r) : f;
  }, function(t) {
    return l = t, o = t(n), a = t(e), i = o === a ? 0 : 1 / (a - o), r;
  };
}
function c(n, e) {
  return e.domain(n.domain()).interpolator(n.interpolator()).clamp(n.clamp()).unknown(n.unknown());
}
function S() {
  var n = w(p()(d));
  return n.copy = function() {
    return c(n, S());
  }, m.apply(n, arguments);
}
function x() {
  var n = k(p()).domain([1, 10]);
  return n.copy = function() {
    return c(n, x()).base(n.base());
  }, m.apply(n, arguments);
}
function I() {
  var n = b(p());
  return n.copy = function() {
    return c(n, I()).constant(n.constant());
  }, m.apply(n, arguments);
}
function q() {
  var n = M(p());
  return n.copy = function() {
    return c(n, q()).exponent(n.exponent());
  }, m.apply(n, arguments);
}
function E() {
  return q.apply(null, arguments).exponent(0.5);
}
export {
  c as copy,
  S as default,
  x as sequentialLog,
  q as sequentialPow,
  E as sequentialSqrt,
  I as sequentialSymlog
};
