import { __require as q } from "./conversions.js";
var l, f;
function b() {
  if (f) return l;
  f = 1;
  const i = q();
  function p() {
    const e = {}, n = Object.keys(i);
    for (let r = n.length, t = 0; t < r; t++)
      e[n[t]] = {
        // http://jsperf.com/1-vs-infinity
        // micro-opt, but this is simple.
        distance: -1,
        parent: null
      };
    return e;
  }
  function d(e) {
    const n = p(), r = [e];
    for (n[e].distance = 0; r.length; ) {
      const t = r.pop(), o = Object.keys(i[t]);
      for (let s = o.length, c = 0; c < s; c++) {
        const u = o[c], a = n[u];
        a.distance === -1 && (a.distance = n[t].distance + 1, a.parent = t, r.unshift(u));
      }
    }
    return n;
  }
  function h(e, n) {
    return function(r) {
      return n(e(r));
    };
  }
  function v(e, n) {
    const r = [n[e].parent, e];
    let t = i[n[e].parent][e], o = n[e].parent;
    for (; n[o].parent; )
      r.unshift(n[o].parent), t = h(i[n[o].parent][o], t), o = n[o].parent;
    return t.conversion = r, t;
  }
  return l = function(e) {
    const n = d(e), r = {}, t = Object.keys(n);
    for (let o = t.length, s = 0; s < o; s++) {
      const c = t[s];
      n[c].parent !== null && (r[c] = v(c, n));
    }
    return r;
  }, l;
}
export {
  b as __require
};
