import { e as f } from "./init-8lPFe2y8-B2MlpiqM.js";
var o = class extends Map {
  constructor(t, n = p) {
    if (super(), Object.defineProperties(this, {
      _intern: { value: /* @__PURE__ */ new Map() },
      _key: { value: n }
    }), t != null) for (let [e, r] of t) this.set(e, r);
  }
  get(t) {
    return super.get(a(this, t));
  }
  has(t) {
    return super.has(a(this, t));
  }
  set(t, n) {
    return super.set(c(this, t), n);
  }
  delete(t) {
    return super.delete(h(this, t));
  }
};
function a({ _intern: t, _key: n }, e) {
  let r = n(e);
  return t.has(r) ? t.get(r) : e;
}
function c({ _intern: t, _key: n }, e) {
  let r = n(e);
  return t.has(r) ? t.get(r) : (t.set(r, e), e);
}
function h({ _intern: t, _key: n }, e) {
  let r = n(e);
  return t.has(r) && (e = t.get(r), t.delete(r)), e;
}
function p(t) {
  return typeof t == "object" && t ? t.valueOf() : t;
}
var l = Symbol("implicit");
function g() {
  var t = new o(), n = [], e = [], r = l;
  function u(s) {
    let i = t.get(s);
    if (i === void 0) {
      if (r !== l) return r;
      t.set(s, i = n.push(s) - 1);
    }
    return e[i % e.length];
  }
  return u.domain = function(s) {
    if (!arguments.length) return n.slice();
    n = [], t = new o();
    for (let i of s) t.has(i) || t.set(i, n.push(i) - 1);
    return u;
  }, u.range = function(s) {
    return arguments.length ? (e = Array.from(s), u) : e.slice();
  }, u.unknown = function(s) {
    return arguments.length ? (r = s, u) : r;
  }, u.copy = function() {
    return g(n, e).unknown(r);
  }, f.apply(u, arguments), u;
}
export {
  g as s
};
