import * as H from "vue";
import k from "vue";
import * as be from "@vue/composition-api";
import { t as Z } from "@opentiny/vue-locale";
function ee(o, e) {
  var t = Object.keys(o);
  if (Object.getOwnPropertySymbols) {
    var n = Object.getOwnPropertySymbols(o);
    e && (n = n.filter(function(r) {
      return Object.getOwnPropertyDescriptor(o, r).enumerable;
    })), t.push.apply(t, n);
  }
  return t;
}
function T(o) {
  for (var e = 1; e < arguments.length; e++) {
    var t = arguments[e] != null ? arguments[e] : {};
    e % 2 ? ee(Object(t), !0).forEach(function(n) {
      R(o, n, t[n]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : ee(Object(t)).forEach(function(n) {
      Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
    });
  }
  return o;
}
function Ce(o, e) {
  if (typeof o != "object" || !o)
    return o;
  var t = o[Symbol.toPrimitive];
  if (t !== void 0) {
    var n = t.call(o, e || "default");
    if (typeof n != "object")
      return n;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(o);
}
function xe(o) {
  var e = Ce(o, "string");
  return typeof e == "symbol" ? e : String(e);
}
function E(o) {
  "@babel/helpers - typeof";
  return E = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
    return typeof e;
  } : function(e) {
    return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
  }, E(o);
}
function R(o, e, t) {
  return e = xe(e), e in o ? Object.defineProperty(o, e, {
    value: t,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : o[e] = t, o;
}
function Oe(o) {
  return $e(o) || we(o) || Ae(o) || Ie();
}
function $e(o) {
  if (Array.isArray(o))
    return G(o);
}
function we(o) {
  if (typeof Symbol < "u" && o[Symbol.iterator] != null || o["@@iterator"] != null)
    return Array.from(o);
}
function Ae(o, e) {
  if (o) {
    if (typeof o == "string")
      return G(o, e);
    var t = Object.prototype.toString.call(o).slice(8, -1);
    if (t === "Object" && o.constructor && (t = o.constructor.name), t === "Map" || t === "Set")
      return Array.from(o);
    if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
      return G(o, e);
  }
}
function G(o, e) {
  (e == null || e > o.length) && (e = o.length);
  for (var t = 0, n = new Array(e); t < e; t++)
    n[t] = o[t];
  return n;
}
function Ie() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
var ne = function() {
  var e = {}, t = function(i, a) {
    var u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
    if (i && typeof i == "string" && typeof a == "function") {
      var s = e[i] || [];
      e[i] = s, s.push(a), a.once = u;
    }
  }, n = {
    emit: function(i) {
      var a = arguments, u = e[i];
      u && (u.forEach(function(s) {
        return s.apply(null, [].slice.call(a, 1));
      }), e[i] = u.filter(function(s) {
        return !s.once;
      }));
    },
    on: t,
    once: function(i, a) {
      t(i, a, !0);
    },
    off: function(i, a) {
      if (i && typeof i == "string") {
        var u = e[i];
        typeof a == "function" ? e[i] = u.filter(function(s) {
          return s !== a;
        }) : delete e[i];
      } else
        e = {};
    }
  };
  return n;
}, je = function(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = {};
  for (var r in e)
    r.indexOf("_") !== 0 && (n[r] = e[r]);
  for (var i in t)
    n[i] = t[i];
  return n;
}, Pe = function(e, t) {
  if (!(!e || !t)) {
    var n = [];
    typeof e == "string" ? n.push(e) : Array.isArray(e) && (n = e);
    var r = [];
    typeof t == "string" ? r.push(t) : Array.isArray(t) && (r = t);
    var i = [];
    return r.forEach(function(a) {
      return n.forEach(function(u) {
        return i.push("".concat(a, ":").concat(u, "-").concat(a));
      });
    }), n.concat(i).join(" ");
  }
}, Se = function() {
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
  if (E(t) === "object") {
    var n = Array.isArray(t) ? t : Object.keys(t).filter(function(i) {
      return t[i];
    }), r = "";
    return n.forEach(function(i) {
      e[i] && (r += "".concat(e[i], " "));
    }), r;
  } else
    return e[t] || "";
}, Me = 0, Te = function(e) {
  return function(t) {
    for (var n = e.parent ? Array.from(e.parent.childNodes) : [], r = 0; r < n.length; r++)
      if (n[r].textContent === t)
        return !0;
  };
}, Ee = function(e) {
  var t = e.hasComment, n = e.startComment, r = e.state, i = e.endComment;
  return function(a) {
    var u = document.createDocumentFragment();
    if (a)
      !t(n) && u.appendChild(document.createComment(n)), r.nodes.forEach(function(p) {
        return u.appendChild(p);
      }), !t(i) && u.appendChild(document.createComment(i));
    else {
      var s = r.parent ? Array.from(r.parent.childNodes) : [], c, l;
      c = l = 0;
      for (var f = 0; f < s.length; f++) {
        var d = s[f];
        if (d.nodeType === 8 && (d.textContent === n && (c = f), d.textContent === i)) {
          l = f;
          break;
        }
      }
      l > c && s.slice(c + 1, l).forEach(function(p) {
        return u.appendChild(p);
      });
    }
    return u;
  };
}, ke = function(e) {
  var t = e.instance, n = e.getFragment, r = e.state, i = e.startComment, a = e.endComment;
  return function() {
    t.$el.appendChild(n());
    var u = [], s = r.parent ? Array.from(r.parent.childNodes) : [];
    s.forEach(function(f, d) {
      f.nodeType === 8 && (f.textContent === i || f.textContent === a) && u.push(d);
    });
    var c = Math.min.apply(Math, u), l = Math.max.apply(Math, u);
    s.slice(c, l + 1).reverse().forEach(function(f) {
      return r.parent && r.parent.removeChild(f);
    }), r.parent = null;
  };
}, De = function(e) {
  var t = e.state, n = e.props, r = e.disable, i = e.getFragment;
  return function() {
    if (t.waiting = !1, t.parent = document.querySelector(n.to), !t.parent) {
      r(), t.waiting = !0;
      return;
    }
    n.where === "before" ? t.parent.prepend(i(!0)) : t.parent.appendChild(i(!0));
  };
}, Ve = function(e) {
  return function() {
    e.observer && (e.observer.disconnect(), e.observer = null);
  };
}, Re = function(e) {
  var t = e.state, n = e.disable, r = e.props, i = e.move;
  return function(a) {
    for (var u = !1, s = 0; s < a.length; s++) {
      var c = a[s], l = Array.from(c.addedNodes).filter(function(f) {
        return !t.nodes.includes(f);
      });
      Array.from(c.removedNodes).includes(t.parent) ? (n(), t.waiting = !r.disabled) : t.waiting && l.length > 0 && (u = !0);
    }
    u && i();
  };
}, Fe = function(e) {
  var t = e.state, n = e.onMutations;
  return function() {
    t.observer || (t.observer = new MutationObserver(function(r) {
      return n(r);
    }), t.observer.observe(document.body, {
      attributes: !1,
      characterData: !1,
      childList: !0,
      subtree: !0
    }));
  };
}, Ne = function(e) {
  var t = e.state, n = e.instance, r = e.props, i = e.bootObserver, a = e.maybeMove;
  return function() {
    t.nodes = Array.from(n.$el.childNodes), !r.disabled && i(), a();
  };
}, Be = function(e) {
  var t = e.disable, n = e.teardownObserver, r = e.bootObserver, i = e.move;
  return function(a) {
    if (a) {
      t(), n();
      return;
    }
    r(), i();
  };
};
const Ue = function(o) {
  var e = o.reactive, t = o.watch, n = o.getCurrentInstance, r = o.onUpdated, i = o.onMounted, a = o.onBeforeUnmount, u = o.h, s = o.defineComponent;
  return s({
    name: "Vue2Teleport",
    props: {
      to: {
        type: String,
        required: !0
      },
      where: {
        type: String,
        default: "after"
      },
      disabled: Boolean
    },
    setup: function(l) {
      var f, d = e({
        nodes: [],
        waiting: !1,
        observer: null,
        parent: null,
        id: ++Me
      }), p = (f = n()) === null || f === void 0 ? void 0 : f.proxy, A = "[".concat(d.id, "]vue2-teleporter-start"), b = "[".concat(d.id, "]vue2-teleporter-end"), $ = Te(d), m = Ee({
        hasComment: $,
        startComment: A,
        state: d,
        endComment: b
      }), v = ke({
        instance: p,
        getFragment: m,
        state: d,
        startComment: A,
        endComment: b
      }), x = De({
        state: d,
        props: l,
        disable: v,
        getFragment: m
      }), g = function() {
        return !l.disabled && x();
      }, y = Ve(d), h = Re({
        state: d,
        disable: v,
        props: l,
        move: x
      }), w = Fe({
        state: d,
        onMutations: h
      }), I = Ne({
        state: d,
        instance: p,
        props: l,
        bootObserver: w,
        maybeMove: g
      }), j = Be({
        disable: v,
        teardownObserver: y,
        bootObserver: w,
        move: x
      });
      return t(function() {
        return l.to;
      }, g), t(function() {
        return l.where;
      }, g), t(function() {
        return l.disabled;
      }, j), r(I), i(I), a(function() {
        v(), y();
      }), function() {
        return u("div", {
          class: "vue2-teleporter",
          style: {
            "visibility:hidden;display:none;": !l.disabled
          }
        }, (typeof (p == null ? void 0 : p.$slots.default) == "function" ? p.$slots.default() : p.$slots.default) || null);
      };
    }
  });
};
var L, re = !!(!((L = k.version) === null || L === void 0) && L.includes("2.7")), O = re ? H : be, St = Ue(O);
!O.default.__composition_api_installed__ && !re && k.use(O.default);
var oe = function(e) {
  var t = e.loader, n = e.loadingComponent, r = e.errorComponent, i = e.delay, a = e.timeout;
  return function() {
    return {
      component: t(),
      loading: n,
      error: r,
      delay: i,
      timeout: a
    };
  };
}, Ke = function(e) {
  return e;
}, ie = function(e) {
  var t = e.view, n = t === void 0 ? null : t, r = e.component, i = r === void 0 ? null : r, a = e.props, u = e.context, s = u.attrs, c = u.listeners, l = u.slots, f = e.extend, d = f === void 0 ? {} : f;
  return function() {
    return O.h(n && n.value || i, Object.assign(R(R(R({
      props: a,
      attrs: s
    }, d.isSvg ? "nativeOn" : "on", c), "ref", "modeTemplate"), "scopedSlots", T({}, l)), d));
  };
}, Y = function() {
  var e;
  return (e = O.getCurrentInstance()) === null || e === void 0 ? void 0 : e.proxy.$root;
}, Le = function() {
  var e, t, n, r, i = O.getCurrentInstance(), a = i == null || (e = i.vnode) === null || e === void 0 || (t = e.componentOptions) === null || t === void 0 || (n = t.Ctor) === null || n === void 0 || (r = n.extendOptions) === null || r === void 0 ? void 0 : r.name;
  if (!a) {
    var u, s, c, l, f;
    a = i == null || (u = i.parent) === null || u === void 0 || (s = u.vnode) === null || s === void 0 || (c = s.componentOptions) === null || c === void 0 || (l = c.Ctor) === null || l === void 0 || (f = l.extendOptions) === null || f === void 0 ? void 0 : f.name;
  }
  return a || "";
}, _e = function() {
  return k;
}, He = function() {
  return k.prototype;
}, ae = function() {
  var e, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : (e = O.getCurrentInstance()) === null || e === void 0 ? void 0 : e.proxy;
  return {
    route: t == null ? void 0 : t.$route,
    router: t == null ? void 0 : t.$router
  };
}, Ge = function(e) {
  var t = function(r, i, a, u) {
    r.$children.forEach(function(s) {
      var c = s.$options.componentName;
      c === i ? s.$emit(a, u) : t(s, i, a, u);
    });
  };
  return {
    dispatch: function(r, i, a) {
      for (var u, s = e.$parent || e.$root, c = s.$options.componentName; s && (!c || c !== r); )
        s = s.$parent, s && (c = s.$options.componentName);
      s && (u = s).$emit.apply(u, Oe([i].concat(a)));
    },
    broadcast: function(r, i, a) {
      t(e, r, i, a);
    }
  };
}, qe = function(e) {
  return function(t) {
    var n = e.$parent, r = 0, i = function(u) {
      return {
        level: r,
        vm: F({}, u),
        el: u.$el,
        options: u.$options
      };
    };
    if (typeof t != "function")
      return n ? i(n) : {};
    for (r++; n && !t(i(n)); )
      n = n.$parent, r++;
  };
}, We = function(e) {
  return function(t) {
    if (typeof t != "function")
      return ue(e.$children);
    var n = 1, r = function i(a) {
      var u = n++;
      a.some(function(s) {
        return t({
          level: u,
          vm: F({}, s),
          el: s.$el,
          options: s.$options,
          isLevel1: u === 1
        });
      }) || a.forEach(function(s) {
        return i(s.$children);
      });
    };
    r(e.$children);
  };
}, ue = function(e) {
  var t = [];
  return t.refs = {}, e.forEach(function(n) {
    var r = F({}, n);
    t.push(r), n.$vnode.data.ref && (t.refs[n.$vnode.data.ref] = r);
  }), t;
}, se = function(e, t, n) {
  var r = function(u) {
    if (typeof n == "function" && n(u))
      return 1;
    Object.defineProperty(e, u, {
      configurable: !0,
      enumerable: !0,
      get: function() {
        return t[u];
      },
      set: function(c) {
        return t[u] = c;
      }
    });
  };
  for (var i in t)
    r(i);
  return e;
}, ce = function(e) {
  return e.indexOf("$") === 0 || e.indexOf("_") === 0 || e === "constructor";
}, F = function o(e, t) {
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0;
  return n || se(e, t, ce), Object.defineProperties(e, {
    $attrs: {
      get: function() {
        return t.$attrs;
      }
    },
    $children: {
      get: function() {
        return ue(t.$children);
      }
    },
    $constants: {
      get: function() {
        return t._constants;
      }
    },
    $emit: {
      get: function() {
        return t.$emit.bind(t);
      }
    },
    $el: {
      get: function() {
        return t.$el;
      }
    },
    $listeners: {
      get: function() {
        return t.$listeners;
      }
    },
    $mode: {
      get: function() {
        return t._tiny_mode;
      }
    },
    $nextTick: {
      get: function() {
        return O.nextTick;
      }
    },
    $off: {
      get: function() {
        return t.$off.bind(t);
      }
    },
    $on: {
      get: function() {
        return t.$on.bind(t);
      }
    },
    $once: {
      get: function() {
        return t.$once.bind(t);
      }
    },
    $options: {
      get: function() {
        return {
          componentName: t.$options.componentName
        };
      }
    },
    $parent: {
      get: function() {
        return t.$parent && o({}, t.$parent);
      }
    },
    $refs: {
      get: function() {
        return t.$refs;
      }
    },
    $renderless: {
      get: function() {
        return t.tiny_renderless;
      }
    },
    $scopedSlots: {
      get: function() {
        return t.$scopedSlots;
      }
    },
    $set: {
      get: function() {
        return t.$set;
      }
    },
    $slots: {
      get: function() {
        return t.$scopedSlots;
      }
    },
    $template: {
      get: function() {
        return t.tiny_template;
      }
    }
  }), e;
}, Qe = function(e, t) {
  Object.keys(e.$refs).forEach(function(n) {
    t[n] = e.$refs[n];
  });
}, Ye = function(e, t) {
  var n, r = (n = O.getCurrentInstance()) === null || n === void 0 ? void 0 : n.proxy, i = r == null ? void 0 : r.$root, a = ae(r), u = a.route, s = a.router, c = i == null ? void 0 : i.$i18n, l = Ge(r), f = l.dispatch, d = l.broadcast, p = qe(r), A = We(r), b = F({}, r, e), $ = e.emit, m = {}, v = r.$parent ? F({}, r.$parent) : null, x = function(w) {
    var I = w.name, j = w.value;
    r.$parent[I] = j, v[I] = j;
  }, g = function(w) {
    Object.defineProperties(b, w), Object.defineProperties(r, w);
  }, y = function(w) {
    v && Object.defineProperties(v, w);
  };
  return O.onBeforeMount(function() {
    return se(b, r, ce);
  }), H && O.onMounted(function() {
    return Qe(r, m);
  }), {
    framework: "vue2",
    vm: b,
    emit: $,
    emitter: ne,
    route: u,
    router: s,
    dispatch: f,
    broadcast: d,
    parentHandler: p,
    childrenHandler: A,
    // 因为vue2.6版本context.refs是有值的，但是vue2.7版本是undefined所以这里需要做个兼容
    refs: H ? m : e.refs,
    i18n: c,
    slots: e.slots,
    scopedSlots: e.slots,
    attrs: e.attrs,
    parent: v,
    nextTick: O.nextTick,
    constants: r == null ? void 0 : r._constants,
    mode: t,
    isPCMode: t === "pc",
    isMobileMode: t === "mobile",
    service: r == null ? void 0 : r.$service,
    getService: function() {
      return r == null ? void 0 : r.$getService(b);
    },
    setParentAttribute: x,
    defineInstanceProperties: g,
    defineParentInstanceProperties: y
  };
}, _ = function(e, t, n) {
  if (typeof e[t] < "u") {
    var r = e[t];
    e[n] = function(i, a, u) {
      a.instance = u.context, r(i, a, u);
    }, delete e[t];
  }
}, ze = function(e) {
  for (var t in e) {
    var n = e[t];
    _(n, "beforeMount", "bind"), _(n, "updated", "update"), _(n, "unmounted", "unbind");
  }
  return e;
}, Je = function(e) {
  var t = e.props, n = e.data, r = e.name, i = e.attr, a = i === void 0 ? r : i;
  Object.defineProperty(t, a, {
    get: function() {
      return n[r];
    },
    set: function(s) {
      return n[r] = s;
    }
  });
}, Xe = function(e) {
  var t = {}, n = e.componentOptions && e.componentOptions.propsData || {};
  for (var r in n)
    Je({
      props: t,
      data: n,
      name: r
    });
  return e.props = t, e.type = {
    name: e.componentOptions && e.componentOptions.tag
  }, e;
}, Ze = function(e) {
  return !e || !e.tag;
}, et = O.h, tt = function(e) {
  return function(t) {
    var n = t.component, r = t.propsData, i = t.el, a = Object.assign(n, {
      provide: R({}, e.configKey, e.configInstance)
    });
    return new (k.extend(a))({
      propsData: r,
      el: i
    }).$mount();
  };
}, nt = O.defineComponent;
const C = O;
var le = !0, Mt = !1, rt = function(e) {
  return ["isStatic", "isRootInsert", "isComment", "isCloned", "isOnce"].every(function(t) {
    return typeof e[t] < "u";
  });
}, Tt = k.component("KeepAlive"), q = function(e) {
  var t = [];
  return Object.keys(e).forEach(function(n) {
    return e[n] && t.push(n);
  }), t.join(" ");
}, ot = function(e) {
  var t = [];
  return e.forEach(function(n) {
    typeof n == "string" ? t.push(n) : E(n) === "object" && t.push(q(n));
  }), t.join(" ");
}, W = function(e) {
  if (!e)
    return "";
  if (typeof e == "string")
    return e;
  if (Array.isArray(e) && e.length > 0) {
    var t = [];
    return e.forEach(function(n) {
      n && (typeof n == "string" ? t.push(n) : Array.isArray(n) ? t.push(ot(n)) : E(n) === "object" && t.push(q(n)));
    }), t.join(" ");
  }
  return E(e) === "object" ? q(e) : "";
}, Et = function(e) {
  var t = W(e), n = Array.from(new Set(t.split(" "))).filter(function(r) {
    return r;
  });
  return W(n);
};
var it = typeof window > "u";
function te(o, e, t, n) {
  var r, i = 0;
  typeof e != "boolean" && (n = t, t = e, e = void 0);
  function a() {
    var s = this, c = (/* @__PURE__ */ new Date()).valueOf() - i, l = arguments;
    function f() {
      i = (/* @__PURE__ */ new Date()).valueOf(), t.apply(s, l);
    }
    function d() {
      r = void 0;
    }
    n && !r && f(), r && clearTimeout(r);
    var p = n === void 0;
    p && c > o ? f() : e !== !0 && (r = setTimeout(n ? d : f, p ? o - c : o));
  }
  function u() {
    r && (clearTimeout(r), r = null);
  }
  return a._cancel = u, a;
}
function at(o, e, t) {
  return t === void 0 ? te(o, e, !1) : te(o, t, e !== !1);
}
var ut = function() {
  if (!it) {
    var e = C.ref(""), t = ["2xl", "xl", "lg", "md", "sm"], n = {
      "2xl": window.matchMedia("(min-width:1536px)"),
      xl: window.matchMedia("(min-width:1280px)"),
      lg: window.matchMedia("(min-width:1024px)"),
      md: window.matchMedia("(min-width:768px)"),
      sm: window.matchMedia("(min-width:640px)")
    }, r = function() {
      for (var u = 0; u < t.length; u++) {
        var s = t[u];
        if (n[s].matches) {
          e.value = s;
          return;
        }
      }
      e.value = "default";
    }, i = at(0, function() {
      return r();
    });
    return r(), t.forEach(function(a) {
      return n[a].addEventListener("change", i);
    }), C.onBeforeUnmount(function() {
      t.forEach(function(a) {
        return n[a].removeEventListener("change", i);
      });
    }), {
      current: e
    };
  }
};
function kt() {
  var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 100, e = C.ref(0), t;
  function n() {
    t = requestAnimationFrame(function() {
      e.value++, !(e.value >= o) && n();
    });
  }
  function r() {
    t && (cancelAnimationFrame(t), t = 0);
  }
  return n(), C.onBeforeUnmount(function() {
    return r();
  }), {
    defer: function(a) {
      return e.value >= a;
    },
    reset: function() {
      r(), e.value = 0, n();
    },
    cancel: r
  };
}
var st = ["IconLoadingShadow", "IconNoData"], fe = 0, ct = function o(e, t) {
  {
    var n, r;
    if ((n = e.data) !== null && n !== void 0 && (r = n.attrs) !== null && r !== void 0 && r.id) {
      var i = "".concat(e.data.attrs.id).concat(fe);
      t[e.data.attrs.id] = i, e.data.attrs.id = i;
    }
  }
  Array.isArray(e == null ? void 0 : e.children) && e.children.forEach(function(a) {
    o(a, t);
  });
}, lt = function o(e, t) {
  var n = ["fill", "mask", "filter"];
  n.forEach(function(r) {
    {
      var i, a, u;
      if ((i = e.data) !== null && i !== void 0 && (a = i.attrs) !== null && a !== void 0 && (u = a[r]) !== null && u !== void 0 && u.includes("url(#")) {
        var s = e.data.attrs[r].replace("url(#", "").replace(")", ""), c = t[s];
        c && (e.data.attrs[r] = "url(#".concat(c, ")"));
      }
    }
  }), Array.isArray(e == null ? void 0 : e.children) && e.children.forEach(function(r) {
    o(r, t);
  });
}, ft = function(e) {
  if (e) {
    var t = {};
    ct(e, t), lt(e, t), fe++;
  }
}, dt = function(e) {
  var t = e.getCurrentInstance, n = e.isVue2, r = e.nextTick, i = e.onUnmounted;
  return function() {
    var a = t().proxy;
    n || Object.defineProperty(a, "$scopedSlots", {
      configurable: !0,
      value: null
    }), Object.defineProperty(a, "instanceSlots", {
      configurable: !0,
      get: function() {
        return a.$scopedSlots || a.$slots;
      }
    }), i(function() {
      r(function() {
        n || delete a.$scopedSlots, delete a.instanceSlots;
      });
    });
  };
}, vt = function() {
}, pt = function(e) {
  var t = e.onMounted, n = e.onActivated, r = e.nextTick;
  return function(i) {
    var a;
    t(function() {
      i(), r(function() {
        return a = !0;
      });
    }), n(function() {
      return a && i();
    });
  };
}, mt = function(e) {
  var t = e.computed, n = e.getCurrentInstance, r = e.inject, i = e.markRaw, a = e.nextTick, u = e.onMounted, s = e.onActivated, c = e.onUnmounted, l = e.provide, f = e.reactive, d = e.toRef;
  return function() {
    var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, A = p.relationKey, b = p.relationContainer, $ = p.onChange, m = p.childrenKey, v = p.delivery;
    if (!A)
      throw new Error("[TINY Error]<relationKey> must exist.");
    var x = n(), g = f({
      children: [],
      indexInParent: -1
    }), y = r(A, null), h = [];
    if (y) {
      var w = y.link, I = y.unlink, j = y.callbacks, S = y.childrenKey, N = y.delivery;
      h = j, m = m || S || "instanceChildren", v = N, g.indexInParent = w(x), c(function() {
        return I(x);
      });
    } else {
      m = m || "instanceChildren";
      var me = pt({
        onMounted: u,
        onActivated: s,
        nextTick: a
      }), J = $ ? function() {
        return a($);
      } : vt, D;
      a(function() {
        var P = typeof b == "function" ? b() : b;
        P && (D = new MutationObserver(function(V, M) {
          var X = [];
          gt(P.childNodes, X), h.forEach(function(he) {
            return he(X, V, M);
          }), J();
        }), D.observe(P, {
          attributes: !0,
          childList: !0,
          subtree: !0
        }));
      }), me(function() {
        return J();
      }), c(function() {
        D && (D.disconnect(), D = null), h = null;
      });
    }
    var ge = function(V) {
      var M = V.proxy;
      return g.children.push(i(M)), t(function() {
        return g.children.indexOf(M);
      });
    }, ye = function(V) {
      var M = g.children.indexOf(V.proxy);
      M > -1 && g.children.splice(M, 1);
    };
    return h.push(function(P) {
      return yt(g.children, P);
    }), l(A, {
      link: ge,
      unlink: ye,
      callbacks: h,
      childrenKey: m,
      delivery: v
    }), Object.defineProperty(x.proxy, m, {
      configurable: !0,
      get: function() {
        return g.children;
      }
    }), c(function() {
      return delete x.proxy[m];
    }), {
      children: d(g, "children"),
      index: d(g, "indexInParent"),
      delivery: v
    };
  };
}, gt = function o(e, t) {
  e.length && e.forEach(function(n) {
    t.push(n), n.childNodes && o(n.childNodes, t);
  });
}, yt = function(e, t) {
  e.sort(function(n, r) {
    return t.indexOf(n.$el) - t.indexOf(r.$el);
  });
};
const Dt = "3.20.1";
var Vt = dt(T(T({}, C), {}, {
  isVue2: le
})), Rt = mt(T(T({}, C), {}, {
  isVue2: le
})), U = "Tiny", ht = {
  tiny_mode: String,
  tiny_mode_root: Boolean,
  tiny_template: [Function, Object],
  tiny_renderless: Function,
  tiny_theme: String,
  tiny_chart_theme: Object
}, bt = ["tiny_mode", "tiny_mode_root", "tiny_template", "tiny_renderless", "_constants", "tiny_theme", "tiny_chart_theme"], z = function(e, t) {
  var n = function(f) {
    return ~["pc", "mobile", "mobile-first"].indexOf(f);
  }, r = Y(), i = typeof e.tiny_mode == "string" ? e.tiny_mode : null, a = C.inject("TinyMode", null), u;
  typeof r.tiny_mode == "string" ? u = r.tiny_mode : r.tiny_mode && (u = r.tiny_mode.value), n(i) || (i = null), n(a) || (a = null), n(u) || (u = null);
  var s = i || a || u || "pc";
  e.tiny_mode_root && C.provide("TinyMode", s);
  var c = C.getCurrentInstance();
  return c = c.proxy, Object.defineProperty(c, "_tiny_mode", {
    value: s
  }), s;
}, Ct = function(e, t) {
  var n = function(l) {
    return ~["tiny", "saas"].indexOf(l);
  }, r = Y(), i = typeof e.tiny_theme == "string" ? e.tiny_theme : null, a = C.inject("TinyTheme", null), u = r.tiny_theme && r.tiny_theme.value;
  n(i) || (i = null), n(a) || (a = null), n(u) || (u = null);
  var s = i || a || u || "tiny";
  return s;
}, xt = function(e, t) {
  var n = Y(), r = E(e.tiny_chart_theme) === "object" ? e.tiny_chart_theme : null, i = C.inject("TinyChartTheme", null), a = n.tiny_chart_theme && n.tiny_chart_theme.value, u = r || i || a || null;
  return u;
}, Ot = function(e) {
  var t = e.props, n = e.context, r = e.template, i = e.extend, a = i === void 0 ? {} : i, u = z(t), s = C.computed(function() {
    if (typeof t.tiny_template < "u")
      return t.tiny_template;
    var c = r(u, t);
    return typeof c == "function" ? oe(c) : c;
  });
  return ie({
    view: s,
    props: t,
    context: n,
    extend: a
  });
}, K = {
  configKey: Symbol("designConfigKey"),
  configInstance: null
}, Ft = function(e) {
  Object.keys(e).length && (C.provide(K.configKey, e), K.configInstance = e);
}, $t = tt(K), de = {
  designConfig: null,
  twMerge: function() {
    return "";
  }
}, Q = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return de.twMerge(W(t));
}, wt = function(e) {
  var t, n, r, i = e.props, a = e.context, u = e.renderless, s = e.api, c = e.extendOptions, l = c === void 0 ? {} : c, f = e.mono, d = f === void 0 ? !1 : f, p = e.classes, A = p === void 0 ? {} : p, b = typeof i.tiny_renderless == "function" ? i.tiny_renderless : u, $ = de.designConfig || C.inject(K.configKey, {});
  $ = ((t = $) === null || t === void 0 ? void 0 : t.value) || $ || {};
  var m = (n = $) === null || n === void 0 || (r = n.components) === null || r === void 0 ? void 0 : r[Le().replace(U, "")], v = T(T({
    $prefix: U,
    t: Z
  }, Ye(a, z(i))), {}, {
    designConfig: m,
    globalDesignConfig: $,
    useBreakpoint: ut,
    mergeClass: Q
  });
  v.vm.theme = Ct(i), v.vm.chartTheme = xt(i);
  var x = b(i, C, v, l);
  typeof (m == null ? void 0 : m.renderless) == "function" && Object.assign(x, m.renderless(i, C, v, x));
  var g = {
    t: Z,
    vm: v.vm,
    f: je,
    a: ve,
    d: v.defineInstanceProperties,
    dp: v.defineParentInstanceProperties,
    gcls: function(h) {
      return Se(A, h);
    },
    m: Q
  };
  return g.d({
    slots: {
      get: function() {
        return v.vm.$slots;
      },
      configurable: !0
    },
    scopedSlots: {
      get: function() {
        return v.vm.$scopedSlots;
      },
      configurable: !0
    }
  }), g.dp({
    slots: {
      get: function() {
        return v.parent.$slots;
      },
      configurable: !0
    },
    scopedSlots: {
      get: function() {
        return v.parent.$scopedSlots;
      },
      configurable: !0
    }
  }), pe(), Array.isArray(s) && (Array.isArray(m == null ? void 0 : m.api) && (s = s.concat(m.api)), s.forEach(function(y) {
    var h = x[y];
    typeof h < "u" && (g[y] = h, d || v.setParentAttribute({
      name: y,
      value: h
    }));
  })), g;
};
function At(o) {
  var e = o.name, t = e === void 0 ? "Icon" : e, n = o.component;
  return function(r) {
    return Ke(nt({
      name: U + t,
      setup: function(a, u) {
        var s = u.attrs || {}, c = s.fill, l = s.width, f = s.height, d = s["custom-class"], p = s["first-color"], A = s["second-color"], b = Object.assign({}, a, r || null), $ = z(b), m = $ === "mobile-first", v = {
          "data-tag": m ? "tiny-svg" : null
        }, x = {
          attrs: v
        }, g = "tiny-svg";
        m && (g = Q("h-4 w-4 inline-block", d || "", b.class || ""));
        var y = Object.assign({
          style: {
            fill: c,
            width: l,
            height: f,
            "--tiny-first-color": p || "",
            "--tiny-second-color": A || ""
          },
          class: g,
          isSvg: !0
        }, x);
        if (y.nativeOn = u.listeners, st.includes(t)) {
          var h = n.render;
          n.render = function() {
            for (var w = h.bind(this), I = arguments.length, j = new Array(I), S = 0; S < I; S++)
              j[S] = arguments[S];
            var N = w(j);
            return ft(N), N;
          };
        }
        return ie({
          component: n,
          props: b,
          context: u,
          extend: y
        });
      }
    }));
  };
}
var ve = function(e, t, n) {
  var r = {}, i = function(s) {
    var c = t.some(function(l) {
      return new RegExp(l).test(s);
    });
    (n && c || !n && !c) && (r[s] = e[s]);
  };
  for (var a in e)
    i(a);
  return r;
}, B = {}, pe = function() {
  for (var e in B) {
    var t = B[e];
    typeof t.install == "function" && t.install(_e()), typeof t.init == "function" && t.init(He());
  }
  B = {};
}, It = function(e) {
  e.install = function(t) {
    t.component(e.name, e);
  };
};
const Nt = {
  h: et,
  directive: ze,
  parseVnode: Xe,
  isEmptyVnode: Ze,
  useRouter: ae,
  emitter: ne,
  createComponent: $t,
  defineAsyncComponent: oe,
  filterAttrs: ve,
  initComponent: pe,
  setupComponent: B,
  svg: At,
  $prefix: U,
  $props: ht,
  props: bt,
  $setup: Ot,
  setup: wt,
  hooks: C,
  getElementStatusClass: Pe,
  $install: It,
  isVnode: rt
};
export {
  It as $install,
  U as $prefix,
  ht as $props,
  Ot as $setup,
  Tt as KeepAlive,
  St as Teleport,
  He as appProperties,
  $t as createComponent,
  de as customDesignConfig,
  Et as deduplicateCssClass,
  Nt as default,
  oe as defineAsyncComponent,
  nt as defineComponent,
  K as design,
  ze as directive,
  ne as emitter,
  ve as filterAttrs,
  Pe as getElementStatusClass,
  et as h,
  C as hooks,
  pe as initComponent,
  Ze as isEmptyVnode,
  rt as isVnode,
  le as isVue2,
  Mt as isVue3,
  Q as mergeClass,
  Xe as parseVnode,
  bt as props,
  Ft as provideDesignConfig,
  z as resolveMode,
  Ct as resolveTheme,
  wt as setup,
  B as setupComponent,
  W as stringifyCssClass,
  ot as stringifyCssClassArray,
  q as stringifyCssClassObject,
  At as svg,
  ut as useBreakpoint,
  kt as useDefer,
  Vt as useInstanceSlots,
  Rt as useRelation,
  ae as useRouter,
  Dt as version
};
