vue-finder-senior
Version:
VueFinderSenior is a file manager component for vue3. And there are multiple adaptable backends available . like Python PHP Go Rust
1,468 lines • 204 kB
JavaScript
var rr = Object.defineProperty;
var lr = (t, e, n) => e in t ? rr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
var En = (t, e, n) => lr(t, typeof e != "symbol" ? e + "" : e, n);
import { reactive as St, watch as Ve, ref as A, shallowRef as ar, onMounted as Ce, onUnmounted as Jn, onUpdated as Rs, nextTick as vt, computed as wt, inject as re, createElementBlock as g, openBlock as f, withKeys as $t, unref as r, createElementVNode as l, withModifiers as et, renderSlot as Lt, normalizeClass as ae, toDisplayString as b, createBlock as K, resolveDynamicComponent as Us, withCtx as J, createVNode as q, createCommentVNode as R, Fragment as we, renderList as xe, withDirectives as ve, vModelCheckbox as Xt, createTextVNode as Z, vModelSelect as In, vModelText as Ct, onBeforeUnmount as Ns, customRef as ir, vShow as ze, isRef as cr, TransitionGroup as dr, normalizeStyle as vn, mergeModels as ur, useModel as Ps, resolveComponent as vr, provide as fr, Transition as _r } from "vue";
import mr from "mitt";
import pr from "dragselect";
import hr from "@uppy/core";
import gr from "@uppy/xhr-upload";
import br from "vanilla-lazyload";
import "cropperjs/dist/cropper.css";
import wr from "cropperjs";
var Bs;
const Tn = (Bs = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : Bs.getAttribute("content");
class yr {
/** @param {RequestConfig} config */
constructor(e) {
/** @type {RequestConfig} */
En(this, "config");
En(this, "customFetch", async (...e) => {
let [n, o] = e;
this.config.fetchRequestInterceptor && (o = this.config.fetchRequestInterceptor(o));
let s = await fetch(n, o);
return this.config.fetchResponseInterceptor && (s = await this.config.fetchResponseInterceptor(s)), s;
});
this.config = e;
}
/** @type {RequestConfig} */
get config() {
return this.config;
}
/**
* Transform request params
* @param {Object} input
* @param {String} input.url
* @param {'get'|'post'|'put'|'patch'|'delete'} input.method
* @param {Record<String,String>=} input.headers
* @param {Record<String,?String>=} input.params
* @param {Record<String,?String>|FormData=} input.body
* @return {RequestTransformResultInternal}
*/
transformRequestParams(e) {
const n = this.config, o = {};
Tn != null && Tn !== "" && (o[n.xsrfHeaderName] = Tn);
const s = Object.assign({}, n.headers, o, e.headers), i = Object.assign({}, n.params, e.params), c = e.body, u = n.baseUrl + e.url, a = e.method;
let d;
a !== "get" && (c instanceof FormData ? (d = c, n.body != null && Object.entries(this.config.body).forEach(([v, p]) => {
d.append(v, p);
})) : (d = { ...c }, n.body != null && Object.assign(d, this.config.body)));
const _ = {
url: u,
method: a,
headers: s,
params: i,
body: d
};
if (n.transformRequest != null) {
const v = n.transformRequest({
url: u,
method: a,
headers: s,
params: i,
body: d
});
v.url != null && (_.url = v.url), v.method != null && (_.method = v.method), v.params != null && (_.params = v.params ?? {}), v.headers != null && (_.headers = v.headers ?? {}), v.body != null && (_.body = v.body);
}
return _;
}
/**
* Get download url
* @param {String} adapter
* @param {String} node
* @param {String} node.path
* @param {String=} node.url
* @return {String}
*/
getDownloadUrl(e, n) {
if (n.url != null)
return n.url;
const o = this.transformRequestParams({
url: "",
method: "get",
params: { q: "download", adapter: e, path: n.path }
});
return o.url + "?" + new URLSearchParams(o.params).toString();
}
/**
* Get preview url
* @param {String} adapter
* @param {String} node
* @param {String} node.path
* @param {String=} node.url
* @return {String}
*/
getPreviewUrl(e, n) {
if (n.url != null)
return n.url;
const o = this.transformRequestParams({
url: "",
method: "get",
params: { q: "preview", adapter: e, path: n.path }
});
return o.url + "?" + new URLSearchParams(o.params).toString();
}
/**
* Send request
* @param {Object} input
* @param {String} input.url
* @param {'get'|'post'|'put'|'patch'|'delete'} input.method
* @param {Record<String,String>=} input.headers
* @param {Record<String,?String>=} input.params
* @param {(Record<String,?String>|FormData|null)=} input.body
* @param {'arrayBuffer'|'blob'|'json'|'text'=} input.responseType
* @param {AbortSignal=} input.abortSignal
* @returns {Promise<(ArrayBuffer|Blob|Record<String,?String>|String|null)>}
* @throws {Record<String,?String>|null} resp json error
*/
async send(e) {
const n = this.transformRequestParams(e), o = e.responseType || "json", s = {
method: e.method,
headers: n.headers,
signal: e.abortSignal
}, i = n.url + "?" + new URLSearchParams(n.params);
if (n.method !== "get" && n.body != null) {
let u;
n.body instanceof FormData ? u = e.body : (u = JSON.stringify(n.body), s.headers["Content-Type"] = "application/json"), s.body = u;
}
this.config.fetchParams && Object.assign(s, this.config.fetchParams);
const c = await this.customFetch(i, s);
if (c.ok)
return await c[o]();
throw await c.json();
}
}
function kr(t) {
const e = {
baseUrl: "",
headers: {},
params: {},
body: {},
xsrfHeaderName: "X-CSRF-Token",
fetchParams: {}
};
return typeof t == "string" ? Object.assign(e, { baseUrl: t }) : Object.assign(e, t), new yr(e);
}
function xr(t) {
let e = localStorage.getItem(t + "_storage");
const n = St(JSON.parse(e ?? "{}"));
Ve(n, o);
function o() {
Object.keys(n).length ? localStorage.setItem(t + "_storage", JSON.stringify(n)) : localStorage.removeItem(t + "_storage");
}
function s(a, d) {
n[a] = d;
}
function i(a) {
delete n[a];
}
function c() {
Object.keys(n).map((a) => i(a));
}
return { getStore: (a, d = null) => n.hasOwnProperty(a) ? n[a] : d, setStore: s, removeStore: i, clearStore: c };
}
async function Sr(t, e) {
const n = e[t];
return typeof n == "function" ? (await n()).default : n;
}
function $r(t, e, n, o) {
const { getStore: s, setStore: i } = t, c = A({}), u = A(s("locale", e)), a = (v, p = e) => {
Sr(v, o).then((m) => {
c.value = m, i("locale", v), u.value = v, i("translations", m), Object.values(o).length > 1 && (n.emit("vf-toast-push", { label: "The language is set to " + v }), n.emit("vf-language-saved"));
}).catch((m) => {
p ? (n.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), a(p, null)) : n.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" });
});
};
Ve(u, (v) => {
a(v);
}), !s("locale") && !o.length ? a(e) : c.value = s("translations");
const d = (v, ...p) => p.length ? d(v = v.replace("%s", p.shift()), ...p) : v;
function _(v, ...p) {
return c.value && c.value.hasOwnProperty(v) ? d(c.value[v], ...p) : d(v, ...p);
}
return St({ t: _, locale: u });
}
const ue = {
EDIT: "edit",
NEW_FILE: "newfile",
NEW_FOLDER: "newfolder",
PREVIEW: "preview",
ARCHIVE: "archive",
UNARCHIVE: "unarchive",
SEARCH: "search",
RENAME: "rename",
UPLOAD: "upload",
DELETE: "delete",
FULL_SCREEN: "fullscreen",
DOWNLOAD: "download",
LANGUAGE: "language"
}, Cr = Object.values(ue), Er = "2.7.1";
function qs(t, e, n, o, s) {
return (e = Math, n = e.log, o = 1024, s = n(t) / n(o) | 0, t / e.pow(o, s)).toFixed(0) + " " + (s ? "KMGTPEZY"[--s] + "iB" : "B");
}
function zs(t, e, n, o, s) {
return (e = Math, n = e.log, o = 1e3, s = n(t) / n(o) | 0, t / e.pow(o, s)).toFixed(0) + " " + (s ? "KMGTPEZY"[--s] + "B" : "B");
}
function Tr(t) {
const e = { k: 1, m: 2, g: 3, t: 4 }, o = /(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(t);
return o[1] * Math.pow(1024, e[o[2].toLowerCase()]);
}
const ot = {
SYSTEM: "system",
LIGHT: "light",
DARK: "dark"
};
function Mr(t, e) {
const n = A(ot.SYSTEM), o = A(ot.LIGHT);
n.value = t.getStore("theme", e ?? ot.SYSTEM);
const s = window.matchMedia("(prefers-color-scheme: dark)"), i = (c) => {
n.value === ot.DARK || n.value === ot.SYSTEM && c.matches ? o.value = ot.DARK : o.value = ot.LIGHT;
};
return i(s), s.addEventListener("change", i), {
/**
* @type {import('vue').Ref<Theme>}
*/
value: n,
/**
* @type {import('vue').Ref<Theme>}
*/
actualValue: o,
/**
* @param {Theme} value
*/
set(c) {
n.value = c, c !== ot.SYSTEM ? t.setStore("theme", c) : t.removeStore("theme"), i(s);
}
};
}
function Ar() {
const t = ar(null), e = A(!1), n = A();
return { visible: e, type: t, data: n, open: (i, c = null) => {
document.querySelector("body").style.overflow = "hidden", e.value = !0, t.value = i, n.value = c;
}, close: () => {
document.querySelector("body").style.overflow = "", e.value = !1, t.value = null;
} };
}
/*!
* OverlayScrollbars
* Version: 2.11.1
*
* Copyright (c) Rene Haas | KingSora.
* https://github.com/KingSora
*
* Released under the MIT license.
*/
const Oe = (t, e) => {
const { o: n, i: o, u: s } = t;
let i = n, c;
const u = (_, v) => {
const p = i, m = _, h = v || (o ? !o(p, m) : p !== m);
return (h || s) && (i = m, c = p), [i, h, c];
};
return [e ? (_) => u(e(i, c), _) : u, (_) => [i, !!_, c]];
}, Dr = typeof window < "u" && typeof HTMLElement < "u" && !!window.document, Le = Dr ? window : {}, js = Math.max, Vr = Math.min, Hn = Math.round, sn = Math.abs, bs = Math.sign, Gs = Le.cancelAnimationFrame, es = Le.requestAnimationFrame, on = Le.setTimeout, Bn = Le.clearTimeout, fn = (t) => typeof Le[t] < "u" ? Le[t] : void 0, Lr = fn("MutationObserver"), ws = fn("IntersectionObserver"), mt = fn("ResizeObserver"), Vt = fn("ScrollTimeline"), ts = (t) => t === void 0, _n = (t) => t === null, Ge = (t) => typeof t == "number", Ht = (t) => typeof t == "string", mn = (t) => typeof t == "boolean", Re = (t) => typeof t == "function", We = (t) => Array.isArray(t), rn = (t) => typeof t == "object" && !We(t) && !_n(t), ns = (t) => {
const e = !!t && t.length, n = Ge(e) && e > -1 && e % 1 == 0;
return We(t) || !Re(t) && n ? e > 0 && rn(t) ? e - 1 in t : !0 : !1;
}, ln = (t) => !!t && t.constructor === Object, an = (t) => t instanceof HTMLElement, pn = (t) => t instanceof Element;
function ie(t, e) {
if (ns(t))
for (let n = 0; n < t.length && e(t[n], n, t) !== !1; n++)
;
else t && ie(Object.keys(t), (n) => e(t[n], n, t));
return t;
}
const Ws = (t, e) => t.indexOf(e) >= 0, Ot = (t, e) => t.concat(e), he = (t, e, n) => (!Ht(e) && ns(e) ? Array.prototype.push.apply(t, e) : t.push(e), t), it = (t) => Array.from(t || []), ss = (t) => We(t) ? t : !Ht(t) && ns(t) ? it(t) : [t], Rn = (t) => !!t && !t.length, Un = (t) => it(new Set(t)), Ie = (t, e, n) => {
ie(t, (s) => s ? s.apply(void 0, e || []) : !0), n || (t.length = 0);
}, Ks = "paddingTop", Ys = "paddingRight", Xs = "paddingLeft", Zs = "paddingBottom", Qs = "marginLeft", Js = "marginRight", eo = "marginBottom", to = "overflowX", no = "overflowY", hn = "width", gn = "height", rt = "visible", ut = "hidden", yt = "scroll", Or = (t) => {
const e = String(t || "");
return e ? e[0].toUpperCase() + e.slice(1) : "";
}, bn = (t, e, n, o) => {
if (t && e) {
let s = !0;
return ie(n, (i) => {
const c = t[i], u = e[i];
c !== u && (s = !1);
}), s;
}
return !1;
}, so = (t, e) => bn(t, e, ["w", "h"]), en = (t, e) => bn(t, e, ["x", "y"]), Fr = (t, e) => bn(t, e, ["t", "r", "b", "l"]), lt = () => {
}, X = (t, ...e) => t.bind(0, ...e), pt = (t) => {
let e;
const n = t ? on : es, o = t ? Bn : Gs;
return [(s) => {
o(e), e = n(() => s(), Re(t) ? t() : t);
}, () => o(e)];
}, cn = (t, e) => {
const { _: n, p: o, v: s, S: i } = e || {};
let c, u, a, d, _ = lt;
const v = function($) {
_(), Bn(c), d = c = u = void 0, _ = lt, t.apply(this, $);
}, p = (x) => i && u ? i(u, x) : x, m = () => {
_ !== lt && v(p(a) || a);
}, h = function() {
const $ = it(arguments), M = Re(n) ? n() : n;
if (Ge(M) && M >= 0) {
const D = Re(o) ? o() : o, C = Ge(D) && D >= 0, V = M > 0 ? on : es, F = M > 0 ? Bn : Gs, O = p($) || $, w = v.bind(0, O);
let y;
_(), s && !d ? (w(), d = !0, y = V(() => d = void 0, M)) : (y = V(w, M), C && !c && (c = on(m, D))), _ = () => F(y), u = a = O;
} else
v($);
};
return h.m = m, h;
}, oo = (t, e) => Object.prototype.hasOwnProperty.call(t, e), Ue = (t) => t ? Object.keys(t) : [], oe = (t, e, n, o, s, i, c) => {
const u = [e, n, o, s, i, c];
return (typeof t != "object" || _n(t)) && !Re(t) && (t = {}), ie(u, (a) => {
ie(a, (d, _) => {
const v = a[_];
if (t === v)
return !0;
const p = We(v);
if (v && ln(v)) {
const m = t[_];
let h = m;
p && !We(m) ? h = [] : !p && !ln(m) && (h = {}), t[_] = oe(h, v);
} else
t[_] = p ? v.slice() : v;
});
}), t;
}, ro = (t, e) => ie(oe({}, t), (n, o, s) => {
n === void 0 ? delete s[o] : n && ln(n) && (s[o] = ro(n));
}), os = (t) => !Ue(t).length, lo = (t, e, n) => js(t, Vr(e, n)), ft = (t) => Un((We(t) ? t : (t || "").split(" ")).filter((e) => e)), rs = (t, e) => t && t.getAttribute(e), ys = (t, e) => t && t.hasAttribute(e), Qe = (t, e, n) => {
ie(ft(e), (o) => {
t && t.setAttribute(o, String(n || ""));
});
}, qe = (t, e) => {
ie(ft(e), (n) => t && t.removeAttribute(n));
}, wn = (t, e) => {
const n = ft(rs(t, e)), o = X(Qe, t, e), s = (i, c) => {
const u = new Set(n);
return ie(ft(i), (a) => {
u[c](a);
}), it(u).join(" ");
};
return {
O: (i) => o(s(i, "delete")),
$: (i) => o(s(i, "add")),
C: (i) => {
const c = ft(i);
return c.reduce((u, a) => u && n.includes(a), c.length > 0);
}
};
}, ao = (t, e, n) => (wn(t, e).O(n), X(ls, t, e, n)), ls = (t, e, n) => (wn(t, e).$(n), X(ao, t, e, n)), dn = (t, e, n, o) => (o ? ls : ao)(t, e, n), as = (t, e, n) => wn(t, e).C(n), io = (t) => wn(t, "class"), co = (t, e) => {
io(t).O(e);
}, is = (t, e) => (io(t).$(e), X(co, t, e)), uo = (t, e) => {
const n = e ? pn(e) && e : document;
return n ? it(n.querySelectorAll(t)) : [];
}, Ir = (t, e) => {
const n = e ? pn(e) && e : document;
return n && n.querySelector(t);
}, Nn = (t, e) => pn(t) && t.matches(e), vo = (t) => Nn(t, "body"), Pn = (t) => t ? it(t.childNodes) : [], Ft = (t) => t && t.parentElement, ht = (t, e) => pn(t) && t.closest(e), qn = (t) => document.activeElement, Hr = (t, e, n) => {
const o = ht(t, e), s = t && Ir(n, o), i = ht(s, e) === o;
return o && s ? o === t || s === t || i && ht(ht(t, n), e) !== o : !1;
}, kt = (t) => {
ie(ss(t), (e) => {
const n = Ft(e);
e && n && n.removeChild(e);
});
}, De = (t, e) => X(kt, t && e && ie(ss(e), (n) => {
n && t.appendChild(n);
}));
let fo;
const Br = () => fo, Rr = (t) => {
fo = t;
}, gt = (t) => {
const e = document.createElement("div");
return Qe(e, "class", t), e;
}, _o = (t) => {
const e = gt(), n = Br(), o = t.trim();
return e.innerHTML = n ? n.createHTML(o) : o, ie(Pn(e), (s) => kt(s));
}, ks = (t, e) => t.getPropertyValue(e) || t[e] || "", mo = (t) => {
const e = t || 0;
return isFinite(e) ? e : 0;
}, Zt = (t) => mo(parseFloat(t || "")), zn = (t) => Math.round(t * 1e4) / 1e4, po = (t) => `${zn(mo(t))}px`;
function It(t, e) {
t && e && ie(e, (n, o) => {
try {
const s = t.style, i = _n(n) || mn(n) ? "" : Ge(n) ? po(n) : n;
o.indexOf("--") === 0 ? s.setProperty(o, i) : s[o] = i;
} catch {
}
});
}
function tt(t, e, n) {
const o = Ht(e);
let s = o ? "" : {};
if (t) {
const i = Le.getComputedStyle(t, n) || t.style;
s = o ? ks(i, e) : it(e).reduce((c, u) => (c[u] = ks(i, u), c), s);
}
return s;
}
const xs = (t, e, n) => {
const o = e ? `${e}-` : "", s = n ? `-${n}` : "", i = `${o}top${s}`, c = `${o}right${s}`, u = `${o}bottom${s}`, a = `${o}left${s}`, d = tt(t, [i, c, u, a]);
return {
t: Zt(d[i]),
r: Zt(d[c]),
b: Zt(d[u]),
l: Zt(d[a])
};
}, Mn = (t, e) => `translate${rn(t) ? `(${t.x},${t.y})` : `${e ? "X" : "Y"}(${t})`}`, Ur = (t) => !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length), Nr = {
w: 0,
h: 0
}, yn = (t, e) => e ? {
w: e[`${t}Width`],
h: e[`${t}Height`]
} : Nr, Pr = (t) => yn("inner", t || Le), bt = X(yn, "offset"), ho = X(yn, "client"), un = X(yn, "scroll"), cs = (t) => {
const e = parseFloat(tt(t, hn)) || 0, n = parseFloat(tt(t, gn)) || 0;
return {
w: e - Hn(e),
h: n - Hn(n)
};
}, An = (t) => t.getBoundingClientRect(), qr = (t) => !!t && Ur(t), jn = (t) => !!(t && (t[gn] || t[hn])), go = (t, e) => {
const n = jn(t);
return !jn(e) && n;
}, Ss = (t, e, n, o) => {
ie(ft(e), (s) => {
t && t.removeEventListener(s, n, o);
});
}, _e = (t, e, n, o) => {
var s;
const i = (s = o && o.H) != null ? s : !0, c = o && o.I || !1, u = o && o.A || !1, a = {
passive: i,
capture: c
};
return X(Ie, ft(e).map((d) => {
const _ = u ? (v) => {
Ss(t, d, _, c), n && n(v);
} : n;
return t && t.addEventListener(d, _, a), X(Ss, t, d, _, c);
}));
}, bo = (t) => t.stopPropagation(), Gn = (t) => t.preventDefault(), wo = (t) => bo(t) || Gn(t), je = (t, e) => {
const { x: n, y: o } = Ge(e) ? {
x: e,
y: e
} : e || {};
Ge(n) && (t.scrollLeft = n), Ge(o) && (t.scrollTop = o);
}, Fe = (t) => ({
x: t.scrollLeft,
y: t.scrollTop
}), yo = () => ({
D: {
x: 0,
y: 0
},
M: {
x: 0,
y: 0
}
}), zr = (t, e) => {
const { D: n, M: o } = t, { w: s, h: i } = e, c = (v, p, m) => {
let h = bs(v) * m, x = bs(p) * m;
if (h === x) {
const $ = sn(v), M = sn(p);
x = $ > M ? 0 : x, h = $ < M ? 0 : h;
}
return h = h === x ? 0 : h, [h + 0, x + 0];
}, [u, a] = c(n.x, o.x, s), [d, _] = c(n.y, o.y, i);
return {
D: {
x: u,
y: d
},
M: {
x: a,
y: _
}
};
}, Dn = ({ D: t, M: e }) => {
const n = (o, s) => o === 0 && o <= s;
return {
x: n(t.x, e.x),
y: n(t.y, e.y)
};
}, $s = ({ D: t, M: e }, n) => {
const o = (s, i, c) => lo(0, 1, (s - c) / (s - i) || 0);
return {
x: o(t.x, e.x, n.x),
y: o(t.y, e.y, n.y)
};
}, Wn = (t) => {
t && t.focus && t.focus({
preventScroll: !0
});
}, Cs = (t, e) => {
ie(ss(e), t);
}, Kn = (t) => {
const e = /* @__PURE__ */ new Map(), n = (i, c) => {
if (i) {
const u = e.get(i);
Cs((a) => {
u && u[a ? "delete" : "clear"](a);
}, c);
} else
e.forEach((u) => {
u.clear();
}), e.clear();
}, o = (i, c) => {
if (Ht(i)) {
const d = e.get(i) || /* @__PURE__ */ new Set();
return e.set(i, d), Cs((_) => {
Re(_) && d.add(_);
}, c), X(n, i, c);
}
mn(c) && c && n();
const u = Ue(i), a = [];
return ie(u, (d) => {
const _ = i[d];
_ && he(a, o(d, _));
}), X(Ie, a);
}, s = (i, c) => {
ie(it(e.get(i)), (u) => {
c && !Rn(c) ? u.apply(0, c) : u();
});
};
return o(t || {}), [o, n, s];
}, ko = {}, xo = {}, jr = (t) => {
ie(t, (e) => ie(e, (n, o) => {
ko[o] = e[o];
}));
}, So = (t, e, n) => Ue(t).map((o) => {
const { static: s, instance: i } = t[o], [c, u, a] = n || [], d = n ? i : s;
if (d) {
const _ = n ? d(c, u, e) : d(e);
return (a || xo)[o] = _;
}
}), Bt = (t) => xo[t], Gr = "__osOptionsValidationPlugin", Et = "data-overlayscrollbars", tn = "os-environment", Qt = `${tn}-scrollbar-hidden`, Vn = `${Et}-initialize`, nn = "noClipping", Es = `${Et}-body`, at = Et, Wr = "host", Je = `${Et}-viewport`, Kr = to, Yr = no, Xr = "arrange", $o = "measuring", Zr = "scrolling", Co = "scrollbarHidden", Qr = "noContent", Yn = `${Et}-padding`, Ts = `${Et}-content`, ds = "os-size-observer", Jr = `${ds}-appear`, el = `${ds}-listener`, tl = "os-trinsic-observer", nl = "os-theme-none", He = "os-scrollbar", sl = `${He}-rtl`, ol = `${He}-horizontal`, rl = `${He}-vertical`, Eo = `${He}-track`, us = `${He}-handle`, ll = `${He}-visible`, al = `${He}-cornerless`, Ms = `${He}-interaction`, As = `${He}-unusable`, Xn = `${He}-auto-hide`, Ds = `${Xn}-hidden`, Vs = `${He}-wheel`, il = `${Eo}-interactive`, cl = `${us}-interactive`, dl = "__osSizeObserverPlugin", ul = (t, e) => {
const { T: n } = e, [o, s] = t("showNativeOverlaidScrollbars");
return [o && n.x && n.y, s];
}, xt = (t) => t.indexOf(rt) === 0, vl = (t, e) => {
const n = (s, i, c, u) => {
const a = s === rt ? ut : s.replace(`${rt}-`, ""), d = xt(s), _ = xt(c);
return !i && !u ? ut : d && _ ? rt : d ? i && u ? a : i ? rt : ut : i ? a : _ && u ? rt : ut;
}, o = {
x: n(e.x, t.x, e.y, t.y),
y: n(e.y, t.y, e.x, t.x)
};
return {
k: o,
R: {
x: o.x === yt,
y: o.y === yt
}
};
}, To = "__osScrollbarsHidingPlugin", fl = "__osClickScrollPlugin", Ls = (t) => JSON.stringify(t, (e, n) => {
if (Re(n))
throw 0;
return n;
}), Os = (t, e) => t ? `${e}`.split(".").reduce((n, o) => n && oo(n, o) ? n[o] : void 0, t) : void 0, _l = {
paddingAbsolute: !1,
showNativeOverlaidScrollbars: !1,
update: {
elementEvents: [["img", "load"]],
debounce: [0, 33],
attributes: null,
ignoreMutation: null
},
overflow: {
x: "scroll",
y: "scroll"
},
scrollbars: {
theme: "os-theme-dark",
visibility: "auto",
autoHide: "never",
autoHideDelay: 1300,
autoHideSuspend: !1,
dragScroll: !0,
clickScroll: !1,
pointers: ["mouse", "touch", "pen"]
}
}, Mo = (t, e) => {
const n = {}, o = Ot(Ue(e), Ue(t));
return ie(o, (s) => {
const i = t[s], c = e[s];
if (rn(i) && rn(c))
oe(n[s] = {}, Mo(i, c)), os(n[s]) && delete n[s];
else if (oo(e, s) && c !== i) {
let u = !0;
if (We(i) || We(c))
try {
Ls(i) === Ls(c) && (u = !1);
} catch {
}
u && (n[s] = c);
}
}), n;
}, Fs = (t, e, n) => (o) => [Os(t, o), n || Os(e, o) !== void 0];
let Ao;
const ml = () => Ao, pl = (t) => {
Ao = t;
};
let Ln;
const hl = () => {
const t = (C, V, F) => {
De(document.body, C), De(document.body, C);
const j = ho(C), O = bt(C), w = cs(V);
return F && kt(C), {
x: O.h - j.h + w.h,
y: O.w - j.w + w.w
};
}, e = (C) => {
let V = !1;
const F = is(C, Qt);
try {
V = tt(C, "scrollbar-width") === "none" || tt(C, "display", "::-webkit-scrollbar") === "none";
} catch {
}
return F(), V;
}, n = `.${tn}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${tn} div{width:200%;height:200%;margin:10px 0}.${Qt}{scrollbar-width:none!important}.${Qt}::-webkit-scrollbar,.${Qt}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`, s = _o(`<div class="${tn}"><div></div><style>${n}</style></div>`)[0], i = s.firstChild, c = s.lastChild, u = ml();
u && (c.nonce = u);
const [a, , d] = Kn(), [_, v] = Oe({
o: t(s, i),
i: en
}, X(t, s, i, !0)), [p] = v(), m = e(s), h = {
x: p.x === 0,
y: p.y === 0
}, x = {
elements: {
host: null,
padding: !m,
viewport: (C) => m && vo(C) && C,
content: !1
},
scrollbars: {
slot: !0
},
cancel: {
nativeScrollbarsOverlaid: !1,
body: null
}
}, $ = oe({}, _l), M = X(oe, {}, $), I = X(oe, {}, x), D = {
N: p,
T: h,
P: m,
G: !!Vt,
K: X(a, "r"),
Z: I,
tt: (C) => oe(x, C) && I(),
nt: M,
ot: (C) => oe($, C) && M(),
st: oe({}, x),
et: oe({}, $)
};
if (qe(s, "style"), kt(s), _e(Le, "resize", () => {
d("r", []);
}), Re(Le.matchMedia) && !m && (!h.x || !h.y)) {
const C = (V) => {
const F = Le.matchMedia(`(resolution: ${Le.devicePixelRatio}dppx)`);
_e(F, "change", () => {
V(), C(V);
}, {
A: !0
});
};
C(() => {
const [V, F] = _();
oe(D.N, V), d("r", [F]);
});
}
return D;
}, Ke = () => (Ln || (Ln = hl()), Ln), gl = (t, e, n) => {
let o = !1;
const s = n ? /* @__PURE__ */ new WeakMap() : !1, i = () => {
o = !0;
}, c = (u) => {
if (s && n) {
const a = n.map((d) => {
const [_, v] = d || [];
return [v && _ ? (u || uo)(_, t) : [], v];
});
ie(a, (d) => ie(d[0], (_) => {
const v = d[1], p = s.get(_) || [];
if (t.contains(_) && v) {
const h = _e(_, v, (x) => {
o ? (h(), s.delete(_)) : e(x);
});
s.set(_, he(p, h));
} else
Ie(p), s.delete(_);
}));
}
};
return c(), [i, c];
}, Is = (t, e, n, o) => {
let s = !1;
const { ct: i, rt: c, lt: u, it: a, ut: d, ft: _ } = o || {}, v = cn(() => s && n(!0), {
_: 33,
p: 99
}), [p, m] = gl(t, v, u), h = i || [], x = c || [], $ = Ot(h, x), M = (D, C) => {
if (!Rn(C)) {
const V = d || lt, F = _ || lt, j = [], O = [];
let w = !1, y = !1;
if (ie(C, (L) => {
const { attributeName: k, target: B, type: S, oldValue: U, addedNodes: N, removedNodes: ee } = L, se = S === "attributes", ne = S === "childList", me = t === B, Y = se && k, E = Y && rs(B, k || ""), H = Ht(E) ? E : null, P = Y && U !== H, T = Ws(x, k) && P;
if (e && (ne || !me)) {
const G = se && P, z = G && a && Nn(B, a), Q = (z ? !V(B, k, U, H) : !se || G) && !F(L, !!z, t, o);
ie(N, (le) => he(j, le)), ie(ee, (le) => he(j, le)), y = y || Q;
}
!e && me && P && !V(B, k, U, H) && (he(O, k), w = w || T);
}), m((L) => Un(j).reduce((k, B) => (he(k, uo(L, B)), Nn(B, L) ? he(k, B) : k), [])), e)
return !D && y && n(!1), [!1];
if (!Rn(O) || w) {
const L = [Un(O), w];
return D || n.apply(0, L), L;
}
}
}, I = new Lr(X(M, !1));
return [() => (I.observe(t, {
attributes: !0,
attributeOldValue: !0,
attributeFilter: $,
subtree: e,
childList: e,
characterData: e
}), s = !0, () => {
s && (p(), I.disconnect(), s = !1);
}), () => {
if (s)
return v.m(), M(!0, I.takeRecords());
}];
};
let dt = null;
const Do = (t, e, n) => {
const { _t: o } = n || {}, s = Bt(dl), [i] = Oe({
o: !1,
u: !0
});
return () => {
const c = [], a = _o(`<div class="${ds}"><div class="${el}"></div></div>`)[0], d = a.firstChild, _ = (v) => {
const p = v instanceof ResizeObserverEntry;
let m = !1, h = !1;
if (p) {
const [x, , $] = i(v.contentRect), M = jn(x);
h = go(x, $), m = !h && !M;
} else
h = v === !0;
m || e({
dt: !0,
_t: h
});
};
if (mt) {
if (!mn(dt)) {
const h = new mt(lt);
h.observe(t, {
get box() {
dt = !0;
}
}), dt = dt || !1, h.disconnect();
}
const v = cn(_, {
_: 0,
p: 0
}), p = (h) => v(h.pop()), m = new mt(p);
if (m.observe(dt ? t : d), he(c, [() => m.disconnect(), !dt && De(t, a)]), dt) {
const h = new mt(p);
h.observe(t, {
box: "border-box"
}), he(c, () => h.disconnect());
}
} else if (s) {
const [v, p] = s(d, _, o);
he(c, Ot([is(a, Jr), _e(a, "animationstart", v), De(t, a)], p));
} else
return lt;
return X(Ie, c);
};
}, bl = (t, e) => {
let n;
const o = (a) => a.h === 0 || a.isIntersecting || a.intersectionRatio > 0, s = gt(tl), [i] = Oe({
o: !1
}), c = (a, d) => {
if (a) {
const _ = i(o(a)), [, v] = _;
return v && !d && e(_) && [_];
}
}, u = (a, d) => c(d.pop(), a);
return [() => {
const a = [];
if (ws)
n = new ws(X(u, !1), {
root: t
}), n.observe(s), he(a, () => {
n.disconnect();
});
else {
const d = () => {
const _ = bt(s);
c(_);
};
he(a, Do(s, d)()), d();
}
return X(Ie, he(a, De(t, s)));
}, () => n && u(!0, n.takeRecords())];
}, wl = (t, e, n, o) => {
let s, i, c, u, a, d;
const _ = `[${at}]`, v = `[${Je}]`, p = ["id", "class", "style", "open", "wrap", "cols", "rows"], { vt: m, ht: h, U: x, gt: $, bt: M, L: I, wt: D, yt: C, St: V, Ot: F } = t, j = (T) => tt(T, "direction") === "rtl", O = {
$t: !1,
F: j(m)
}, w = Ke(), y = Bt(To), [L] = Oe({
i: so,
o: {
w: 0,
h: 0
}
}, () => {
const T = y && y.V(t, e, O, w, n).W, z = !(D && I) && as(h, at, nn), W = !I && C(Xr), Q = W && Fe($), le = Q && F(), fe = V($o, z), ce = W && T && T()[0], Ee = un(x), te = cs(x);
return ce && ce(), je($, Q), le && le(), z && fe(), {
w: Ee.w + te.w,
h: Ee.h + te.h
};
}), k = cn(o, {
_: () => s,
p: () => i,
S(T, G) {
const [z] = T, [W] = G;
return [Ot(Ue(z), Ue(W)).reduce((Q, le) => (Q[le] = z[le] || W[le], Q), {})];
}
}), B = (T) => {
const G = j(m);
oe(T, {
Ct: d !== G
}), oe(O, {
F: G
}), d = G;
}, S = (T, G) => {
const [z, W] = T, Q = {
xt: W
};
return oe(O, {
$t: z
}), G || o(Q), Q;
}, U = ({ dt: T, _t: G }) => {
const W = !(T && !G) && w.P ? k : o, Q = {
dt: T || G,
_t: G
};
B(Q), W(Q);
}, N = (T, G) => {
const [, z] = L(), W = {
Ht: z
};
return B(W), z && !G && (T ? o : k)(W), W;
}, ee = (T, G, z) => {
const W = {
Et: G
};
return B(W), G && !z && k(W), W;
}, [se, ne] = M ? bl(h, S) : [], me = !I && Do(h, U, {
_t: !0
}), [Y, E] = Is(h, !1, ee, {
rt: p,
ct: p
}), H = I && mt && new mt((T) => {
const G = T[T.length - 1].contentRect;
U({
dt: !0,
_t: go(G, a)
}), a = G;
}), P = cn(() => {
const [, T] = L();
o({
Ht: T
});
}, {
_: 222,
v: !0
});
return [() => {
H && H.observe(h);
const T = me && me(), G = se && se(), z = Y(), W = w.K((Q) => {
Q ? k({
zt: Q
}) : P();
});
return () => {
H && H.disconnect(), T && T(), G && G(), u && u(), z(), W();
};
}, ({ It: T, At: G, Dt: z }) => {
const W = {}, [Q] = T("update.ignoreMutation"), [le, fe] = T("update.attributes"), [ce, Ee] = T("update.elementEvents"), [te, ye] = T("update.debounce"), Ae = Ee || fe, ke = G || z, Se = (ge) => Re(Q) && Q(ge);
if (Ae) {
c && c(), u && u();
const [ge, be] = Is(M || x, !0, N, {
ct: Ot(p, le || []),
lt: ce,
it: _,
ft: (pe, de) => {
const { target: $e, attributeName: Me } = pe;
return (!de && Me && !I ? Hr($e, _, v) : !1) || !!ht($e, `.${He}`) || !!Se(pe);
}
});
u = ge(), c = be;
}
if (ye)
if (k.m(), We(te)) {
const ge = te[0], be = te[1];
s = Ge(ge) && ge, i = Ge(be) && be;
} else Ge(te) ? (s = te, i = !1) : (s = !1, i = !1);
if (ke) {
const ge = E(), be = ne && ne(), pe = c && c();
ge && oe(W, ee(ge[0], ge[1], ke)), be && oe(W, S(be[0], ke)), pe && oe(W, N(pe[0], ke));
}
return B(W), W;
}, O];
}, Vo = (t, e) => Re(e) ? e.apply(0, t) : e, yl = (t, e, n, o) => {
const s = ts(o) ? n : o;
return Vo(t, s) || e.apply(0, t);
}, Lo = (t, e, n, o) => {
const s = ts(o) ? n : o, i = Vo(t, s);
return !!i && (an(i) ? i : e.apply(0, t));
}, kl = (t, e) => {
const { nativeScrollbarsOverlaid: n, body: o } = e || {}, { T: s, P: i, Z: c } = Ke(), { nativeScrollbarsOverlaid: u, body: a } = c().cancel, d = n ?? u, _ = ts(o) ? a : o, v = (s.x || s.y) && d, p = t && (_n(_) ? !i : _);
return !!v || !!p;
}, xl = (t, e, n, o) => {
const s = "--os-viewport-percent", i = "--os-scroll-percent", c = "--os-scroll-direction", { Z: u } = Ke(), { scrollbars: a } = u(), { slot: d } = a, { vt: _, ht: v, U: p, Mt: m, gt: h, wt: x, L: $ } = e, { scrollbars: M } = m ? {} : t, { slot: I } = M || {}, D = [], C = [], V = [], F = Lo([_, v, p], () => $ && x ? _ : v, d, I), j = (Y) => {
if (Vt) {
let E = null, H = [];
const P = new Vt({
source: h,
axis: Y
}), T = () => {
E && E.cancel(), E = null;
};
return {
Rt: (z) => {
const { Tt: W } = n, Q = Dn(W)[Y], le = Y === "x", fe = [Mn(0, le), Mn(`calc(100cq${le ? "w" : "h"} + -100%)`, le)], ce = Q ? fe : fe.reverse();
return H[0] === ce[0] && H[1] === ce[1] || (T(), H = ce, E = z.kt.animate({
clear: ["left"],
transform: ce
}, {
timeline: P
})), T;
}
};
}
}, O = {
x: j("x"),
y: j("y")
}, w = () => {
const { Vt: Y, Lt: E } = n, H = (P, T) => lo(0, 1, P / (P + T) || 0);
return {
x: H(E.x, Y.x),
y: H(E.y, Y.y)
};
}, y = (Y, E, H) => {
const P = H ? is : co;
ie(Y, (T) => {
P(T.Ut, E);
});
}, L = (Y, E) => {
ie(Y, (H) => {
const [P, T] = E(H);
It(P, T);
});
}, k = (Y, E, H) => {
const P = mn(H), T = P ? H : !0, G = P ? !H : !0;
T && y(C, Y, E), G && y(V, Y, E);
}, B = () => {
const Y = w(), E = (H) => (P) => [P.Ut, {
[s]: zn(H) + ""
}];
L(C, E(Y.x)), L(V, E(Y.y));
}, S = () => {
if (!Vt) {
const { Tt: Y } = n, E = $s(Y, Fe(h)), H = (P) => (T) => [T.Ut, {
[i]: zn(P) + ""
}];
L(C, H(E.x)), L(V, H(E.y));
}
}, U = () => {
const { Tt: Y } = n, E = Dn(Y), H = (P) => (T) => [T.Ut, {
[c]: P ? "0" : "1"
}];
L(C, H(E.x)), L(V, H(E.y)), Vt && (C.forEach(O.x.Rt), V.forEach(O.y.Rt));
}, N = () => {
if ($ && !x) {
const { Vt: Y, Tt: E } = n, H = Dn(E), P = $s(E, Fe(h)), T = (G) => {
const { Ut: z } = G, W = Ft(z) === p && z, Q = (le, fe, ce) => {
const Ee = fe * le;
return po(ce ? Ee : -Ee);
};
return [W, W && {
transform: Mn({
x: Q(P.x, Y.x, H.x),
y: Q(P.y, Y.y, H.y)
})
}];
};
L(C, T), L(V, T);
}
}, ee = (Y) => {
const E = Y ? "x" : "y", P = gt(`${He} ${Y ? ol : rl}`), T = gt(Eo), G = gt(us), z = {
Ut: P,
Pt: T,
kt: G
}, W = O[E];
return he(Y ? C : V, z), he(D, [De(P, T), De(T, G), X(kt, P), W && W.Rt(z), o(z, k, Y)]), z;
}, se = X(ee, !0), ne = X(ee, !1), me = () => (De(F, C[0].Ut), De(F, V[0].Ut), X(Ie, D));
return se(), ne(), [{
Nt: B,
qt: S,
Bt: U,
Ft: N,
jt: k,
Xt: {
Yt: C,
Wt: se,
Jt: X(L, C)
},
Gt: {
Yt: V,
Wt: ne,
Jt: X(L, V)
}
}, me];
}, Sl = (t, e, n, o) => (s, i, c) => {
const { ht: u, U: a, L: d, gt: _, Kt: v, Ot: p } = e, { Ut: m, Pt: h, kt: x } = s, [$, M] = pt(333), [I, D] = pt(444), C = (j) => {
Re(_.scrollBy) && _.scrollBy({
behavior: "smooth",
left: j.x,
top: j.y
});
}, V = () => {
const j = "pointerup pointercancel lostpointercapture", O = `client${c ? "X" : "Y"}`, w = c ? hn : gn, y = c ? "left" : "top", L = c ? "w" : "h", k = c ? "x" : "y", B = (U, N) => (ee) => {
const { Vt: se } = n, ne = bt(h)[L] - bt(x)[L], Y = N * ee / ne * se[k];
je(_, {
[k]: U + Y
});
}, S = [];
return _e(h, "pointerdown", (U) => {
const N = ht(U.target, `.${us}`) === x, ee = N ? x : h, se = t.scrollbars, ne = se[N ? "dragScroll" : "clickScroll"], { button: me, isPrimary: Y, pointerType: E } = U, { pointers: H } = se;
if (me === 0 && Y && ne && (H || []).includes(E)) {
Ie(S), D();
const T = !N && (U.shiftKey || ne === "instant"), G = X(An, x), z = X(An, h), W = (de, $e) => (de || G())[y] - ($e || z())[y], Q = Hn(An(_)[w]) / bt(_)[L] || 1, le = B(Fe(_)[k], 1 / Q), fe = U[O], ce = G(), Ee = z(), te = ce[w], ye = W(ce, Ee) + te / 2, Ae = fe - Ee[y], ke = N ? 0 : Ae - ye, Se = (de) => {
Ie(pe), ee.releasePointerCapture(de.pointerId);
}, ge = N || T, be = p(), pe = [_e(v, j, Se), _e(v, "selectstart", (de) => Gn(de), {
H: !1
}), _e(h, j, Se), ge && _e(h, "pointermove", (de) => le(ke + (de[O] - fe))), ge && (() => {
const de = Fe(_);
be();
const $e = Fe(_), Me = {
x: $e.x - de.x,
y: $e.y - de.y
};
(sn(Me.x) > 3 || sn(Me.y) > 3) && (p(), je(_, de), C(Me), I(be));
})];
if (ee.setPointerCapture(U.pointerId), T)
le(ke);
else if (!N) {
const de = Bt(fl);
if (de) {
const $e = de(le, ke, te, (Me) => {
Me ? be() : he(pe, be);
});
he(pe, $e), he(S, X($e, !0));
}
}
}
});
};
let F = !0;
return X(Ie, [_e(x, "pointermove pointerleave", o), _e(m, "pointerenter", () => {
i(Ms, !0);
}), _e(m, "pointerleave pointercancel", () => {
i(Ms, !1);
}), !d && _e(m, "mousedown", () => {
const j = qn();
(ys(j, Je) || ys(j, at) || j === document.body) && on(X(Wn, a), 25);
}), _e(m, "wheel", (j) => {
const { deltaX: O, deltaY: w, deltaMode: y } = j;
F && y === 0 && Ft(m) === u && C({
x: O,
y: w
}), F = !1, i(Vs, !0), $(() => {
F = !0, i(Vs);
}), Gn(j);
}, {
H: !1,
I: !0
}), _e(m, "pointerdown", X(_e, v, "click", wo, {
A: !0,
I: !0,
H: !1
}), {
I: !0
}), V(), M, D]);
}, $l = (t, e, n, o, s, i) => {
let c, u, a, d, _, v = lt, p = 0;
const m = ["mouse", "pen"], h = (E) => m.includes(E.pointerType), [x, $] = pt(), [M, I] = pt(100), [D, C] = pt(100), [V, F] = pt(() => p), [j, O] = xl(t, s, o, Sl(e, s, o, (E) => h(E) && se())), { ht: w, Qt: y, wt: L } = s, { jt: k, Nt: B, qt: S, Bt: U, Ft: N } = j, ee = (E, H) => {
if (F(), E)
k(Ds);
else {
const P = X(k, Ds, !0);
p > 0 && !H ? V(P) : P();
}
}, se = () => {
(a ? !c : !d) && (ee(!0), M(() => {
ee(!1);
}));
}, ne = (E) => {
k(Xn, E, !0), k(Xn, E, !1);
}, me = (E) => {
h(E) && (c = a, a && ee(!0));
}, Y = [F, I, C, $, () => v(), _e(w, "pointerover", me, {
A: !0
}), _e(w, "pointerenter", me), _e(w, "pointerleave", (E) => {
h(E) && (c = !1, a && ee(!1));
}), _e(w, "pointermove", (E) => {
h(E) && u && se();
}), _e(y, "scroll", (E) => {
x(() => {
S(), se();
}), i(E), N();
})];
return [() => X(Ie, he(Y, O())), ({ It: E, Dt: H, Zt: P, tn: T }) => {
const { nn: G, sn: z, en: W, cn: Q } = T || {}, { Ct: le, _t: fe } = P || {}, { F: ce } = n, { T: Ee } = Ke(), { k: te, rn: ye } = o, [Ae, ke] = E("showNativeOverlaidScrollbars"), [Se, ge] = E("scrollbars.theme"), [be, pe] = E("scrollbars.visibility"), [de, $e] = E("scrollbars.autoHide"), [Me, Tt] = E("scrollbars.autoHideSuspend"), [Rt] = E("scrollbars.autoHideDelay"), [Ut, Nt] = E("scrollbars.dragScroll"), [ct, Mt] = E("scrollbars.clickScroll"), [Pt, xn] = E("overflow"), Sn = fe && !H, $n = ye.x || ye.y, Pe = G || z || Q || le || H, Cn = W || pe || xn, qt = Ae && Ee.x && Ee.y, zt = (st, At, Dt) => {
const jt = st.includes(yt) && (be === rt || be === "auto" && At === yt);
return k(ll, jt, Dt), jt;
};
if (p = Rt, Sn && (Me && $n ? (ne(!1), v(), D(() => {
v = _e(y, "scroll", X(ne, !0), {
A: !0
});
})) : ne(!0)), ke && k(nl, qt), ge && (k(_), k(Se, !0), _ = Se), Tt && !Me && ne(!0), $e && (u = de === "move", a = de === "leave", d = de === "never", ee(d, !0)), Nt && k(cl, Ut), Mt && k(il, !!ct), Cn) {
const st = zt(Pt.x, te.x, !0), At = zt(Pt.y, te.y, !1);
k(al, !(st && At));
}
Pe && (S(), B(), N(), Q && U(), k(As, !ye.x, !0), k(As, !ye.y, !1), k(sl, ce && !L));
}, {}, j];
}, Cl = (t) => {
const e = Ke(), { Z: n, P: o } = e, { elements: s } = n(), { padding: i, viewport: c, content: u } = s, a = an(t), d = a ? {} : t, { elements: _ } = d, { padding: v, viewport: p, content: m } = _ || {}, h = a ? t : d.target, x = vo(h), $ = h.ownerDocument, M = $.documentElement, I = () => $.defaultView || Le, D = X(yl, [h]), C = X(Lo, [h]), V = X(gt, ""), F = X(D, V, c), j = X(C, V, u), O = (te) => {
const ye = bt(te), Ae = un(te), ke = tt(te, to), Se = tt(te, no);
return Ae.w - ye.w > 0 && !xt(ke) || Ae.h - ye.h > 0 && !xt(Se);
}, w = F(p), y = w === h, L = y && x, k = !y && j(m), B = !y && w === k, S = L ? M : w, U = L ? S : h, N = !y && C(V, i, v), ee = !B && k, se = [ee, S, N, U].map((te) => an(te) && !Ft(te) && te), ne = (te) => te && Ws(se, te), me = !ne(S) && O(S) ? S : h, Y = L ? M : S, H = {
vt: h,
ht: U,
U: S,
ln: N,
bt: ee,
gt: Y,
Qt: L ? $ : S,
an: x ? M : me,
Kt: $,
wt: x,
Mt: a,
L: y,
un: I,
yt: (te) => as(S, Je, te),
St: (te, ye) => dn(S, Je, te, ye),
Ot: () => dn(Y, Je, Zr, !0)
}, { vt: P, ht: T, ln: G, U: z, bt: W } = H, Q = [() => {
qe(T, [at, Vn]), qe(P, Vn), x && qe(M, [Vn, at]);
}];
let le = Pn([W, z, G, T, P].find((te) => te && !ne(te)));
const fe = L ? P : W || z, ce = X(Ie, Q);
return [H, () => {
const te = I(), ye = qn(), Ae = (pe) => {
De(Ft(pe), Pn(pe)), kt(pe);
}, ke = (pe) => _e(pe, "focusin focusout focus blur", wo, {
I: !0,
H: !1
}), Se = "tabindex", ge = rs(z, Se), be = ke(ye);
return Qe(T, at, y ? "" : Wr), Qe(G, Yn, ""), Qe(z, Je, ""), Qe(W, Ts, ""), y || (Qe(z, Se, ge || "-1"), x && Qe(M, Es, "")), De(fe, le), De(T, G), De(G || T, !y && z), De(z, W), he(Q, [be, () => {
const pe = qn(), de = ne(z), $e = de && pe === z ? P : pe, Me = ke($e);
qe(G, Yn), qe(W, Ts), qe(z, Je), x && qe(M, Es), ge ? Qe(z, Se, ge) : qe(z, Se), ne(W) && Ae(W), de && Ae(z), ne(G) && Ae(G), Wn($e), Me();
}]), o && !y && (ls(z, Je, Co), he(Q, X(qe, z, Je))), Wn(!y && x && ye === P && te.top === te ? z : ye), be(), le = 0, ce;
}, ce];
}, El = ({ bt: t }) => ({ Zt: e, fn: n, Dt: o }) => {
const { xt: s } = e || {}, { $t: i } = n;
t && (s || o) && It(t, {
[gn]: i && "100%"
});
}, Tl = ({ ht: t, ln: e, U: n, L: o }, s) => {
const [i, c] = Oe({
i: Fr,
o: xs()
}, X(xs, t, "padding", ""));
return ({ It: u, Zt: a, fn: d, Dt: _ }) => {
let [v, p] = c(_);
const { P: m } = Ke(), { dt: h, Ht: x, Ct: $ } = a || {}, { F: M } = d, [I, D] = u("paddingAbsolute");
(h || p || (_ || x)) && ([v, p] = i(_));
const V = !o && (D || $ || p);
if (V) {
const F = !I || !e && !m, j = v.r + v.l, O = v.t + v.b, w = {
[Js]: F && !M ? -j : 0,
[eo]: F ? -O : 0,
[Qs]: F && M ? -j : 0,
top: F ? -v.t : 0,
right: F ? M ? -v.r : "auto" : 0,
left: F ? M ? "auto" : -v.l : 0,
[hn]: F && `calc(100% + ${j}px)`
}, y = {
[Ks]: F ? v.t : 0,
[Ys]: F ? v.r : 0,
[Zs]: F ? v.b : 0,
[Xs]: F ? v.l : 0
};
It(e || n, w), It(n, y), oe(s, {
ln: v,
_n: !F,
j: e ? y : oe({}, w, y)
});
}
return {
dn: V
};
};
}, Ml = (t, e) => {
const n = Ke(), { ht: o, ln: s, U: i, L: c, Qt: u, gt: a, wt: d, St: _, un: v } = t, { P: p } = n, m = d && c, h = X(js, 0), x = {
display: () => !1,
direction: (E) => E !== "ltr",
flexDirection: (E) => E.endsWith("-reverse"),
writingMode: (E) => E !== "horizontal-tb"
}, $ = Ue(x), M = {
i: so,
o: {
w: 0,
h: 0
}
}, I = {
i: en,
o: {}
}, D = (E) => {
_($o, !m && E);
}, C = (E) => {
if (!$.some((fe) => {
const ce = E[fe];
return ce && x[fe](ce);
}))
return {
D: {
x: 0,
y: 0
},
M: {
x: 1,
y: 1
}
};
D(!0);
const P = Fe(a), T = _(Qr, !0), G = _e(u, yt, (fe) => {
const ce = Fe(a);
fe.isTrusted && ce.x === P.x && ce.y === P.y && bo(fe);
}, {
I: !0,
A: !0
});
je(a, {
x: 0,
y: 0
}), T();
const z = Fe(a), W = un(a);
je(a, {
x: W.w,
y: W.h
});
const Q = Fe(a);
je(a, {
x: Q.x - z.x < 1 && -W.w,
y: Q.y - z.y < 1 && -W.h
});
const le = Fe(a);
return je(a, P), es(() => G()), {
D: z,
M: le
};
}, V = (E, H) => {
const P = Le.devicePixelRatio % 1 !== 0 ? 1 : 0, T = {
w: h(E.w - H.w),
h: h(E.h - H.h)
};
return {
w: T.w > P ? T.w : 0,
h: T.h > P ? T.h : 0
};
}, [F, j] = Oe(M, X(cs, i)), [O, w] = Oe(M, X(un, i)), [y, L] = Oe(M), [k] = Oe(I), [B, S] = Oe(M), [U] = Oe(I), [N] = Oe({
i: (E, H) => bn(E, H, $),
o: {}
}, () => qr(i) ? tt(i, $) : {}), [ee, se] = Oe({
i: (E, H) => en(E.D, H.D) && en(E.M, H.M),
o: yo()
}), ne = Bt(To), me = (E, H) => `${H ? Kr : Yr}${Or(E)}`, Y = (E) => {
const H = (T) => [rt, ut, yt].map((G) => me(G, T)), P = H(!0).concat(H()).join(" ");
_(P), _(Ue(E).map((T) => me(E[T], T === "x")).join(" "), !0);
};
return ({ It: E, Zt: H, fn: P, Dt: T }, { dn: G }) => {
const { dt: z, Ht: W, Ct: Q, _t: le, zt: fe } = H || {}, ce = ne && ne.V(t, e, P, n, E), { Y: Ee, W: te, J: ye } = ce || {}, [Ae, ke] = ul(E, n), [Se, ge] = E("overflow"), be = xt(Se.x), pe = xt(Se.y), de = z || G || W || Q || fe || ke;
let $e = j(T), Me = w(T), Tt = L(T), Rt = S(T);
if (ke && p && _(Co, !Ae), de) {
as(o, at, nn) && D(!0);
const [hs] = te ? te() : [], [Gt] = $e = F(T), [Wt] = Me = O(T), Kt = ho(i), Yt = m && Pr(v()), or = {
w: h(Wt.w + Gt.w),
h: h(Wt.h + Gt.h)
}, gs = {
w: h((Yt ? Yt.w : Kt.w + h(Kt.w - Wt.w)) + Gt.w),
h: h((Yt ? Yt.h : Kt.h + h(Kt.h - Wt.h)) + Gt.h)
};
hs && hs(), Rt = B(gs), Tt = y(V(or, gs), T);
}
const [Ut, Nt] = Rt, [ct, Mt] = Tt, [Pt, xn] = Me, [Sn, $n] = $e, [Pe, Cn] = k({
x: ct.w > 0,
y: ct.h > 0
}), qt = be && pe && (Pe.x || Pe.y) || be && Pe.x && !Pe.y || pe && Pe.y && !Pe.x, zt = G || Q || fe || $n || xn || Nt || Mt || ge || ke || de, st = vl(Pe, Se), [At, Dt] = U(st.k), [jt, tr] = N(T), ps = Q || le || tr || Cn || T, [nr, sr] = ps ? ee(C(jt), T) : se();
return zt && (Dt && Y(st.k), ye && Ee && It(i, ye(st, P, Ee(st, Pt, Sn)))), D(!1), dn(o, at, nn, qt), dn(s, Yn, nn, qt), oe(e, {
k: At,
Lt: {
x: Ut.w,
y: Ut.h
},
Vt: {
x: ct.w,
y: ct.h
},
rn: Pe,
Tt: zr(nr, ct)
}), {
en: Dt,
nn: Nt,
sn: Mt,
cn: sr || Mt,
pn: ps
};
};
}, Al = (t) => {
const [e, n, o] = Cl(t), s = {
ln: {
t: 0,
r: 0,
b: 0,
l: 0
},
_n: !1,
j: {
[Js]: 0,
[eo]: 0,
[Qs]: 0,
[Ks]: 0,
[Ys]: 0,
[Zs]: 0,
[Xs]: 0
},
Lt: {
x: 0,
y: 0
},
Vt: {
x: 0,
y: 0
},
k: {
x: ut,
y: ut
},
rn: {
x: !1,
y: !1
},
Tt: yo()
}, { vt: i, gt: c, L: u, Ot: a } = e, { P: d, T: _ } = Ke(), v = !d && (_.x || _.y), p = [El(e), Tl(e, s), Ml(e, s)];
return [n, (m) => {
const h = {}, $ = v && Fe(c), M = $ && a();
return ie(p, (I) => {
oe(h, I(m, h) || {});
}), je(c, $), M && M(), u || je(i, 0), h;
}, s, e, o];
}, Dl = (t, e, n, o, s) => {
let i = !1;
const c = Fs(e, {}), [u, a, d, _, v] = Al(t), [p, m, h] = wl(_, d, c, (C) => {
D({}, C);
}), [x, $, , M] = $l(t, e, h, d, _, s), I = (C) => Ue(C).some((V) => !!C[V]), D = (C, V) => {
if (n())
return !1;
const { vn: F, Dt: j, At: O, hn: w } = C, y = F || {}, L = !!j || !i, k = {
It: Fs(e, y, L),
vn: y,
Dt: L
};
if (w)
return $(k), !1;
const B = V || m(oe({}, k, {
At: O
})), S = a(oe({}, k, {
fn: h,
Zt: B
}));
$(oe({}, k, {
Zt: B,
tn: S
}));
const U = I(B), N = I(S), ee = U || N || !os(y) || L;
return i = !0, ee && o(C, {
Zt: B,
tn: S
}), ee;
};
return [() => {
const { an: C, gt: V, Ot: F } = _, j = Fe(C), O = [p(), u(), x()], w = F();
return je(V, j), w(), X(Ie, O);
}, D, () => ({
gn: h,
bn: d
}), {
wn: _,
yn: M
}, v];
}, vs = /* @__PURE__ */ new WeakMap(), Vl = (t, e) => {
vs.set(t, e);
}, Ll = (t) => {
vs.delete(t);
}, Oo = (t) => vs.get(t), Ne = (t, e, n) => {
const { nt: o } = Ke(), s = an(t), i = s ? t : t.target, c = Oo(i);
if (e && !c) {
let u = !1;
const a = [], d = {}, _ = (y) => {
const L = ro(y), k = Bt(Gr);
return k ? k(L, !0) : L;
}, v = oe({}, o(), _(e)), [p, m, h] = Kn(), [x, $, M] = Kn(n), I = (y, L) => {
M(y, L), h(y, L);
}, [D, C, V, F, j] = Dl(t, v, () => u, ({ vn: y, Dt: L }, { Zt: k, tn: B }) => {
const { dt: S, Ct: U, xt: N, Ht: ee, Et: se, _t: ne } = k, { nn: me, sn: Y, en: E, cn: H } = B;
I("updated", [w, {
updateHints: {
sizeChanged: !!S,
directionChanged: !!U,
heightIntrinsicChanged: !!N,
overflowEdgeChanged: !!me,
overflowAmountChanged: !!Y,
overflowStyleChanged: !!E,
scrollCoordinatesChanged: !!H,
contentMutation: !!ee,
hostMutation: !!se,
appear: !!ne
},
changedOptions: y || {},
force: !!L
}]);
}, (y) => I("scroll", [w, y])), O = (y) => {
Ll(i), Ie(a), u = !0, I("destroyed", [w, y]), m(), $();
}, w = {
options(y, L) {
if (y) {
const k = L ? o() : {}, B = Mo(v, oe(k, _(y)));
os(B) || (oe(v, B), C({
vn: B
}));
}
return oe({}, v);
},
on: x,
off: (y, L) => {
y && L && $(y, L);
},
state() {
const { gn: y, bn: L } = V(), { F: k } = y, { Lt: B, Vt: S, k: U, rn: N, ln: ee, _n: se, Tt: ne } = L;
return oe({}, {
overflowEdge: B,
overflowAmount: S,
overflowStyle: U,
hasOverflow: N,
scrollCoordinat