"use client";
import m from "./continuous.js";
import { initRange as c } from "./init.js";
import { linearish as s } from "./linear.js";
import f from "./number.js";
function i(n) {
  return Math.sign(n) * n * n;
}
function g(n) {
  return Math.sign(n) * Math.sqrt(Math.abs(n));
}
function l() {
  var n = m(), a = [0, 1], u = !1, e;
  function r(t) {
    var o = g(n(t));
    return isNaN(o) ? e : u ? Math.round(o) : o;
  }
  return r.invert = function(t) {
    return n.invert(i(t));
  }, r.domain = function(t) {
    return arguments.length ? (n.domain(t), r) : n.domain();
  }, r.range = function(t) {
    return arguments.length ? (n.range((a = Array.from(t, f)).map(i)), r) : a.slice();
  }, r.rangeRound = function(t) {
    return r.range(t).round(!0);
  }, r.round = function(t) {
    return arguments.length ? (u = !!t, r) : u;
  }, r.clamp = function(t) {
    return arguments.length ? (n.clamp(t), r) : n.clamp();
  }, r.unknown = function(t) {
    return arguments.length ? (e = t, r) : e;
  }, r.copy = function() {
    return l(n.domain(), a).round(u).clamp(n.clamp()).unknown(e);
  }, c.apply(r, arguments), s(r);
}
export {
  l as default
};
